@xyo-network/react-typedoc 2.64.5 → 2.64.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.
Files changed (86) hide show
  1. package/dist/browser/ProjectTwoPanelReflectionViewer.cjs +6 -6
  2. package/dist/browser/ProjectTwoPanelReflectionViewer.cjs.map +1 -1
  3. package/dist/browser/ProjectTwoPanelReflectionViewer.js +3 -3
  4. package/dist/browser/ProjectTwoPanelReflectionViewer.js.map +1 -1
  5. package/dist/browser/ReflectionViewer/Container.cjs +2 -2
  6. package/dist/browser/ReflectionViewer/Container.cjs.map +1 -1
  7. package/dist/browser/ReflectionViewer/Container.js +1 -1
  8. package/dist/browser/ReflectionViewer/Container.js.map +1 -1
  9. package/dist/browser/ReflectionViewer/DeclarationContainer.cjs +4 -4
  10. package/dist/browser/ReflectionViewer/DeclarationContainer.cjs.map +1 -1
  11. package/dist/browser/ReflectionViewer/DeclarationContainer.js +2 -2
  12. package/dist/browser/ReflectionViewer/DeclarationContainer.js.map +1 -1
  13. package/dist/browser/ReflectionViewer/Project.cjs +2 -2
  14. package/dist/browser/ReflectionViewer/Project.cjs.map +1 -1
  15. package/dist/browser/ReflectionViewer/Project.js +1 -1
  16. package/dist/browser/ReflectionViewer/Project.js.map +1 -1
  17. package/dist/browser/ReflectionViewer/ReflectionGroupViewer.cjs +2 -2
  18. package/dist/browser/ReflectionViewer/ReflectionGroupViewer.cjs.map +1 -1
  19. package/dist/browser/ReflectionViewer/ReflectionGroupViewer.js +1 -1
  20. package/dist/browser/ReflectionViewer/ReflectionGroupViewer.js.map +1 -1
  21. package/dist/browser/ReflectionViewer/index.cjs +4 -4
  22. package/dist/browser/ReflectionViewer/index.cjs.map +1 -1
  23. package/dist/browser/ReflectionViewer/index.js +2 -2
  24. package/dist/browser/ReflectionViewer/index.js.map +1 -1
  25. package/dist/browser/TreeViewer/Reflection.cjs +2 -2
  26. package/dist/browser/TreeViewer/Reflection.cjs.map +1 -1
  27. package/dist/browser/TreeViewer/Reflection.js +1 -1
  28. package/dist/browser/TreeViewer/Reflection.js.map +1 -1
  29. package/dist/browser/TreeViewer/index.cjs +2 -2
  30. package/dist/browser/TreeViewer/index.cjs.map +1 -1
  31. package/dist/browser/TreeViewer/index.js +1 -1
  32. package/dist/browser/TreeViewer/index.js.map +1 -1
  33. package/dist/browser/TwoPanelReflectionViewer.cjs +4 -4
  34. package/dist/browser/TwoPanelReflectionViewer.cjs.map +1 -1
  35. package/dist/browser/TwoPanelReflectionViewer.js +2 -2
  36. package/dist/browser/TwoPanelReflectionViewer.js.map +1 -1
  37. package/dist/browser/index.cjs +6 -6
  38. package/dist/browser/index.cjs.map +1 -1
  39. package/dist/browser/index.js +3 -3
  40. package/dist/browser/index.js.map +1 -1
  41. package/dist/docs.json +86 -86
  42. package/dist/node/ProjectTwoPanelReflectionViewer.cjs +6 -6
  43. package/dist/node/ProjectTwoPanelReflectionViewer.cjs.map +1 -1
  44. package/dist/node/ProjectTwoPanelReflectionViewer.js +3 -3
  45. package/dist/node/ProjectTwoPanelReflectionViewer.js.map +1 -1
  46. package/dist/node/ReflectionViewer/Container.cjs +2 -2
  47. package/dist/node/ReflectionViewer/Container.cjs.map +1 -1
  48. package/dist/node/ReflectionViewer/Container.js +1 -1
  49. package/dist/node/ReflectionViewer/Container.js.map +1 -1
  50. package/dist/node/ReflectionViewer/DeclarationContainer.cjs +4 -4
  51. package/dist/node/ReflectionViewer/DeclarationContainer.cjs.map +1 -1
  52. package/dist/node/ReflectionViewer/DeclarationContainer.js +2 -2
  53. package/dist/node/ReflectionViewer/DeclarationContainer.js.map +1 -1
  54. package/dist/node/ReflectionViewer/Project.cjs +2 -2
  55. package/dist/node/ReflectionViewer/Project.cjs.map +1 -1
  56. package/dist/node/ReflectionViewer/Project.js +1 -1
  57. package/dist/node/ReflectionViewer/Project.js.map +1 -1
  58. package/dist/node/ReflectionViewer/ReflectionGroupViewer.cjs +2 -2
  59. package/dist/node/ReflectionViewer/ReflectionGroupViewer.cjs.map +1 -1
  60. package/dist/node/ReflectionViewer/ReflectionGroupViewer.js +1 -1
  61. package/dist/node/ReflectionViewer/ReflectionGroupViewer.js.map +1 -1
  62. package/dist/node/ReflectionViewer/index.cjs +4 -4
  63. package/dist/node/ReflectionViewer/index.cjs.map +1 -1
  64. package/dist/node/ReflectionViewer/index.js +2 -2
  65. package/dist/node/ReflectionViewer/index.js.map +1 -1
  66. package/dist/node/TreeViewer/Reflection.cjs +2 -2
  67. package/dist/node/TreeViewer/Reflection.cjs.map +1 -1
  68. package/dist/node/TreeViewer/Reflection.js +1 -1
  69. package/dist/node/TreeViewer/Reflection.js.map +1 -1
  70. package/dist/node/TreeViewer/index.cjs +2 -2
  71. package/dist/node/TreeViewer/index.cjs.map +1 -1
  72. package/dist/node/TreeViewer/index.js +1 -1
  73. package/dist/node/TreeViewer/index.js.map +1 -1
  74. package/dist/node/TwoPanelReflectionViewer.cjs +4 -4
  75. package/dist/node/TwoPanelReflectionViewer.cjs.map +1 -1
  76. package/dist/node/TwoPanelReflectionViewer.js +2 -2
  77. package/dist/node/TwoPanelReflectionViewer.js.map +1 -1
  78. package/dist/node/index.cjs +6 -6
  79. package/dist/node/index.cjs.map +1 -1
  80. package/dist/node/index.js +3 -3
  81. package/dist/node/index.js.map +1 -1
  82. package/package.json +6 -6
  83. package/src/ProjectTwoPanelReflectionViewer.stories.tsx +1 -1
  84. package/src/ReflectionViewer/DeclarationContainer.tsx +1 -1
  85. package/src/ReflectionViewer/ReflectionGroupViewer.tsx +1 -1
  86. package/src/TreeViewer/Reflection.tsx +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/ReflectionViewer/Container.tsx","../../../src/createLookup.ts","../../../src/ReflectionViewer/ReflectionGroupViewer.tsx","../../../src/JsonViewerButton.tsx","../../../src/resolveChildren.ts","../../../src/ReflectionViewer/ReflectionViewer.tsx","../../../src/CommentViewer.tsx","../../../src/ReflectionViewer/NameViewer.tsx","../../../src/trimFlagLabel.ts","../../../src/ReflectionViewer/SomeTypeViewer/SomeTypeViewer.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildArrayString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildIntersectionString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildReferenceString.ts","../../../src/ReflectionViewer/SomeTypeViewer/buildReflectionString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildUnionString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildTypeString.tsx"],"sourcesContent":["import type { ContainerReflection, ReflectionGroup } from 'typedoc'\n\nimport { createLookup } from '../createLookup'\nimport { ReflectionGroupViewer } from './ReflectionGroupViewer'\nimport { ReflectionViewer } from './ReflectionViewer'\nimport { ReflectionViewerProps } from './ReflectionViewerProps'\n\nexport interface ContainerReflectionViewerProps<T extends ContainerReflection = ContainerReflection> extends ReflectionViewerProps<T> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n itemRenderer?: React.FC<ReflectionViewerProps<any>>\n}\n\nexport const ContainerReflectionViewer: React.FC<ContainerReflectionViewerProps> = ({\n children,\n reflection,\n hiddenFlags,\n itemRenderer = ReflectionViewer,\n ...props\n}) => {\n const lookup = createLookup(reflection)\n\n return (\n <ReflectionViewer title=\"ContainerReflectionViewer\" sources reflection={reflection} lookup={lookup} {...props}>\n {reflection.groups?.map((group: ReflectionGroup) => {\n return (\n <ReflectionGroupViewer\n margin={1}\n lookup={lookup}\n renderer={itemRenderer}\n key={group.title}\n group={group}\n reflection={reflection}\n hiddenFlags={hiddenFlags}\n alignItems=\"stretch\"\n />\n )\n })}\n {children}\n </ReflectionViewer>\n )\n}\n","import type { ContainerReflection, DeclarationReflection } from 'typedoc'\n\nexport const createLookup = <T extends DeclarationReflection>(reflection: ContainerReflection) => {\n const lookup: Record<number, T> = {}\n reflection.children?.forEach((item) => (lookup[item.id] = item as unknown as T))\n return lookup\n}\n","import { Typography } from '@mui/material'\nimport { FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { useEffect } from 'react'\nimport { useLocation } from 'react-router-dom'\nimport type { ContainerReflection, ReflectionFlags, ReflectionGroup } from 'typedoc'\n\nimport { JsonViewerButton } from '../JsonViewerButton'\nimport { resolveChildren } from '../resolveChildren'\nimport { ReflectionViewer } from './ReflectionViewer'\nimport { FlagFilter, ReflectionViewerProps } from './ReflectionViewerProps'\n\nexport interface ReflectionGroupViewerProps extends ReflectionViewerProps<ContainerReflection> {\n autoscroll?: boolean\n group: ReflectionGroup\n reflection: ContainerReflection\n renderer?: React.FC<ReflectionViewerProps>\n}\n\nexport const ReflectionGroupViewer: React.FC<ReflectionGroupViewerProps> = ({\n autoscroll = false,\n children,\n hiddenFlags,\n group,\n lookup,\n renderer = ReflectionViewer,\n variant,\n ...props\n}) => {\n const hide = (flags?: ReflectionFlags, hiddenFlags: FlagFilter[] = []) => {\n let hide = false\n hiddenFlags.map((hiddenFlag) => {\n if (flags?.[hiddenFlag]) {\n hide = true\n }\n })\n return hide\n }\n\n const resolvedChildern = resolveChildren(group, lookup) ?? []\n\n const visibleChildren = hiddenFlags\n ? resolvedChildern.reduce((acc, item) => {\n return acc + (hide(item.flags, hiddenFlags) ? 0 : 1)\n }, 0)\n : 1\n\n const { hash } = useLocation()\n useEffect(() => {\n if (hash && autoscroll) {\n document.querySelector(hash)?.scrollIntoView({ behavior: 'smooth' })\n }\n }, [hash, autoscroll])\n return visibleChildren > 0 ? (\n <FlexCol title=\"ReflectionGroupViewer\" {...props}>\n <FlexRow marginY={1} justifyContent=\"flex-start\">\n <Typography variant={variant}>{group.title}</Typography>\n <JsonViewerButton\n jsonViewProps={{ collapsed: 1 }}\n size=\"small\"\n variant=\"contained\"\n padding={0}\n marginX={1}\n src={resolveChildren(group, lookup)}\n />\n </FlexRow>\n {resolveChildren(group, lookup).map((reflection) => {\n return reflection ? (\n // I wrap this in a div since React does not understand that they have keys using the Renderer\n <div id={reflection.name} key={reflection.id}>\n {renderer({ hiddenFlags, lookup, margin: 1, padding: 1, reflection })}\n </div>\n ) : null\n })}\n {children}\n </FlexCol>\n ) : null\n}\n","import { Dialog, DialogActions, DialogContent, DialogTitle } from '@mui/material'\nimport { ButtonEx, ButtonExProps } from '@xylabs/react-button'\nimport { lazy, Suspense, useState } from 'react'\nimport { ReactJsonViewProps } from 'react-json-view'\n\nconst JsonView = lazy(() => import(/* webpackChunkName: \"jsonView\" */ 'react-json-view'))\n\nexport interface JsonViewerButtonProps extends ButtonExProps {\n jsonViewProps?: Partial<ReactJsonViewProps>\n src: object\n}\n\nexport const JsonViewerButton: React.FC<JsonViewerButtonProps> = ({ jsonViewProps, src, title, ...props }) => {\n const [open, setOpen] = useState(false)\n return (\n <>\n <ButtonEx onClick={() => setOpen(!open)} {...props}>\n JSON\n </ButtonEx>\n <Dialog open={open} onClose={() => setOpen(false)}>\n {title ? <DialogTitle>{title}</DialogTitle> : null}\n <DialogContent>\n <Suspense fallback={<div />}>\n <JsonView src={src} {...jsonViewProps} />\n </Suspense>\n </DialogContent>\n <DialogActions>\n <ButtonEx onClick={() => setOpen(false)}>Close</ButtonEx>\n </DialogActions>\n </Dialog>\n </>\n )\n}\n","import type { Reflection } from 'typedoc'\n\nimport { ReflectionLookup } from './ReflectionLookup'\nimport { SomeReflection } from './SomeReflection'\n\ntype ReflectionWithChildren = { children: Reflection[] }\n\nexport const resolveChildren = <T extends SomeReflection>(reflection: ReflectionWithChildren, lookup: ReflectionLookup = {}): T[] => {\n return (reflection.children?.map((child) => {\n switch (typeof child) {\n case 'object':\n return child\n case 'number': {\n const childObj = lookup[child]\n if (childObj === undefined) {\n throw Error(`Child Reference Not Found [${child}]`)\n }\n return childObj\n }\n default:\n throw Error(`Invalid Child Type [${typeof child}, ${child}]`)\n }\n }) ?? []) as T[]\n}\n","import { FlexCol } from '@xylabs/react-flexbox'\nimport type { ReflectionFlags } from 'typedoc'\n\nimport { CommentViewer } from '../CommentViewer'\nimport { SomeReflection } from '../SomeReflection'\nimport { NameViewer } from './NameViewer'\nimport { FlagFilter, ReflectionViewerProps } from './ReflectionViewerProps'\n\nconst hide = (flags?: ReflectionFlags, hiddenFlags: FlagFilter[] = []) => {\n let hide = false\n hiddenFlags.map((hiddenFlag) => {\n if (flags?.[hiddenFlag]) {\n hide = true\n }\n })\n return hide\n}\n\nexport const ReflectionViewer: React.FC<ReflectionViewerProps> = ({ variant, nameViewer, children, reflection, hiddenFlags, ...props }) => {\n const someReflection = reflection as SomeReflection\n\n return hide(reflection?.flags, hiddenFlags) ? null : (\n <FlexCol title=\"ReflectionViewer\" alignItems=\"stretch\" {...props}>\n {nameViewer === undefined ? (\n <NameViewer marginY={0.25} variant={variant} reflection={someReflection} reflectionViewer={ReflectionViewer} />\n ) : (\n nameViewer\n )}\n {reflection.comment ? <CommentViewer comment={reflection.comment} /> : null}\n {/*sources && reflection.sources && children ? (\n <>\n {reflection.sources.map((source, index) => {\n return <SourceViewer key={index} source={source} />\n })}\n </>\n ) : null*/}\n {someReflection.parameters?.map((parameter) => {\n return <ReflectionViewer hiddenFlags={hiddenFlags} marginY={0.25} marginX={1} key={parameter.id} reflection={parameter} />\n }) ?? null}\n {children}\n </FlexCol>\n )\n}\n","import { Typography } from '@mui/material'\nimport { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'\nimport type { Comment } from 'typedoc'\n\nexport interface CommentViewerProps extends FlexBoxProps {\n comment: Comment\n}\n\nexport const CommentViewer: React.FC<CommentViewerProps> = ({ comment, ...props }) => {\n return (\n <FlexCol alignItems=\"stretch\" {...props}>\n <Typography variant=\"body2\">{comment.summary[0]?.text}</Typography>\n </FlexCol>\n )\n}\n","import { Chip, Stack, Typography, TypographyVariant } from '@mui/material'\nimport { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'\n\nimport { JsonViewerButton } from '../JsonViewerButton'\nimport { SomeReflection } from '../SomeReflection'\nimport { trimFlagLabel } from '../trimFlagLabel'\nimport { ReflectionViewerProps } from './ReflectionViewerProps'\nimport { SomeTypeViewer } from './SomeTypeViewer'\n\nexport interface NameViewerProps extends FlexBoxProps {\n reflection: SomeReflection\n reflectionViewer: React.FC<ReflectionViewerProps>\n variant?: TypographyVariant\n}\n\nexport const NameViewer: React.FC<NameViewerProps> = ({ reflectionViewer, variant, reflection, ...props }) => {\n return (\n <FlexRow justifyContent=\"flex-start\" {...props}>\n <FlexRow marginRight={1}>\n <Typography variant={variant} noWrap>\n {reflection.name}\n {reflection.type ? <>:&nbsp;</> : null}\n </Typography>\n <SomeTypeViewer reflection={reflection} reflectionViewer={reflectionViewer} />\n </FlexRow>\n <Stack direction=\"row\" spacing={1}>\n <Chip size=\"small\" label={reflection.kind} />\n {reflection.flags\n ? Object.entries(reflection.flags).map(([flag, value]) => {\n return value ? <Chip size=\"small\" key={flag} label={trimFlagLabel(flag)} variant=\"outlined\" /> : null\n })\n : null}\n </Stack>\n {document && document?.location.hostname === 'localhost' && (\n <JsonViewerButton jsonViewProps={{ collapsed: 1 }} size=\"small\" variant=\"contained\" padding={0} marginX={1} src={reflection} />\n )}\n </FlexRow>\n )\n}\n","export const trimFlagLabel = (label: string) => {\n if (label.startsWith('is')) {\n return label.substring(2)\n }\n return label\n}\n","import { Typography, TypographyProps } from '@mui/material'\n\nimport { SomeReflection } from '../../SomeReflection'\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { buildTypeString } from './buildTypeString'\n\nexport interface SomeTypeViewerProps extends TypographyProps {\n opacity?: number\n reflection: SomeReflection\n reflectionViewer: React.FC<ReflectionViewerProps>\n}\n\nexport const SomeTypeViewer: React.FC<SomeTypeViewerProps> = ({ opacity = 0.5, reflection, reflectionViewer, ...props }) => {\n const typeReactNode = reflection.type ? buildTypeString(reflection.type, reflectionViewer) : ''\n if (typeof typeReactNode === 'string') {\n return (\n <Typography title=\"SomeTypeViewer\" style={{ opacity }} {...props}>\n {typeReactNode}\n </Typography>\n )\n }\n return <>{typeReactNode}</>\n}\n","import type { ArrayType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildArrayString = (typeObj: ArrayType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n const typeString = typeBuilder(typeObj.elementType, reflectionViewer)\n if (typeof typeString === 'string') {\n parts.push(typeString)\n }\n parts.push('[]')\n return parts\n}\n","import type { IntersectionType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildIntersectionString = (typeObj: IntersectionType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n if (typeObj.types) {\n parts.push(\n typeObj.types\n .map((arg) => {\n return typeBuilder(arg, reflectionViewer)\n })\n .join(' & '),\n )\n }\n return parts\n}\n","import type { ReferenceType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildReferenceString = (typeObj: ReferenceType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n parts.push(typeObj.name)\n if (typeObj.typeArguments) {\n parts.push('<')\n parts.push(\n typeObj.typeArguments\n .map((arg) => {\n return typeBuilder(arg, reflectionViewer)\n })\n .join(', '),\n )\n parts.push('>')\n }\n return parts\n}\n","import type { ReflectionType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\n\nexport const buildRelfectionString = (typeObj: ReflectionType, reflectionViewer: React.FC<ReflectionViewerProps>) => {\n if (typeObj.declaration) {\n return <>{reflectionViewer({ reflection: typeObj.declaration })}</>\n }\n}\n","import type { UnionType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildUnionString = (typeObj: UnionType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n if (typeObj.types) {\n parts.push(\n typeObj.types\n .map((arg) => {\n return typeBuilder(arg, reflectionViewer)\n })\n .join(' | '),\n )\n }\n return parts\n}\n","import { ReactNode } from 'react'\nimport type { SomeType, Type } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { buildArrayString } from './buildArrayString'\nimport { buildIntersectionString } from './buildIntersectionString'\nimport { buildReferenceString } from './buildReferenceString'\nimport { buildRelfectionString } from './buildReflectionString'\nimport { buildUnionString } from './buildUnionString'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildTypeString: TypeBuilder = (type: SomeType | Type, reflectionViewer: React.FC<ReflectionViewerProps>): ReactNode => {\n const someType = type as SomeType\n const parts: string[] = []\n\n switch (someType.type) {\n case 'intrinsic':\n parts.push(someType.name)\n break\n case 'intersection': {\n parts.push(...buildIntersectionString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'literal':\n parts.push(JSON.stringify(someType.value))\n break\n case 'array': {\n parts.push(...buildArrayString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'reference': {\n parts.push(...buildReferenceString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'union': {\n parts.push(...buildUnionString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'reflection': {\n return buildRelfectionString(someType, reflectionViewer)\n }\n default:\n parts.push('#')\n parts.push(someType.type)\n parts.push('#')\n break\n }\n return parts.join('')\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEO,IAAM,eAAe,CAAkC,eAAoC;AAChG,QAAM,SAA4B,CAAC;AACnC,aAAW,UAAU,QAAQ,CAAC,SAAU,OAAO,KAAK,EAAE,IAAI,IAAqB;AAC/E,SAAO;AACT;;;ACNA,IAAAA,mBAA2B;AAC3B,IAAAC,wBAAiC;AACjC,IAAAC,gBAA0B;AAC1B,8BAA4B;;;ACH5B,sBAAkE;AAClE,0BAAwC;AACxC,mBAAyC;AAarC;AAVJ,IAAM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C;AAAA,IACA;AAAA,KACH;AAEJ;","names":["import_material","import_react_flexbox","import_react","import_react_flexbox","import_material","import_jsx_runtime","import_material","import_react_flexbox","import_material","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","hide","import_jsx_runtime","hide","hiddenFlags","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../../src/ReflectionViewer/Container.tsx","../../../src/createLookup.ts","../../../src/ReflectionViewer/ReflectionGroupViewer.tsx","../../../src/JsonViewerButton.tsx","../../../src/resolveChildren.ts","../../../src/ReflectionViewer/ReflectionViewer.tsx","../../../src/CommentViewer.tsx","../../../src/ReflectionViewer/NameViewer.tsx","../../../src/trimFlagLabel.ts","../../../src/ReflectionViewer/SomeTypeViewer/SomeTypeViewer.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildArrayString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildIntersectionString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildReferenceString.ts","../../../src/ReflectionViewer/SomeTypeViewer/buildReflectionString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildUnionString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildTypeString.tsx"],"sourcesContent":["import type { ContainerReflection, ReflectionGroup } from 'typedoc'\n\nimport { createLookup } from '../createLookup'\nimport { ReflectionGroupViewer } from './ReflectionGroupViewer'\nimport { ReflectionViewer } from './ReflectionViewer'\nimport { ReflectionViewerProps } from './ReflectionViewerProps'\n\nexport interface ContainerReflectionViewerProps<T extends ContainerReflection = ContainerReflection> extends ReflectionViewerProps<T> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n itemRenderer?: React.FC<ReflectionViewerProps<any>>\n}\n\nexport const ContainerReflectionViewer: React.FC<ContainerReflectionViewerProps> = ({\n children,\n reflection,\n hiddenFlags,\n itemRenderer = ReflectionViewer,\n ...props\n}) => {\n const lookup = createLookup(reflection)\n\n return (\n <ReflectionViewer title=\"ContainerReflectionViewer\" sources reflection={reflection} lookup={lookup} {...props}>\n {reflection.groups?.map((group: ReflectionGroup) => {\n return (\n <ReflectionGroupViewer\n margin={1}\n lookup={lookup}\n renderer={itemRenderer}\n key={group.title}\n group={group}\n reflection={reflection}\n hiddenFlags={hiddenFlags}\n alignItems=\"stretch\"\n />\n )\n })}\n {children}\n </ReflectionViewer>\n )\n}\n","import type { ContainerReflection, DeclarationReflection } from 'typedoc'\n\nexport const createLookup = <T extends DeclarationReflection>(reflection: ContainerReflection) => {\n const lookup: Record<number, T> = {}\n reflection.children?.forEach((item) => (lookup[item.id] = item as unknown as T))\n return lookup\n}\n","import { Typography } from '@mui/material'\nimport { FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { useEffect } from 'react'\nimport { useLocation } from 'react-router-dom-6'\nimport type { ContainerReflection, ReflectionFlags, ReflectionGroup } from 'typedoc'\n\nimport { JsonViewerButton } from '../JsonViewerButton'\nimport { resolveChildren } from '../resolveChildren'\nimport { ReflectionViewer } from './ReflectionViewer'\nimport { FlagFilter, ReflectionViewerProps } from './ReflectionViewerProps'\n\nexport interface ReflectionGroupViewerProps extends ReflectionViewerProps<ContainerReflection> {\n autoscroll?: boolean\n group: ReflectionGroup\n reflection: ContainerReflection\n renderer?: React.FC<ReflectionViewerProps>\n}\n\nexport const ReflectionGroupViewer: React.FC<ReflectionGroupViewerProps> = ({\n autoscroll = false,\n children,\n hiddenFlags,\n group,\n lookup,\n renderer = ReflectionViewer,\n variant,\n ...props\n}) => {\n const hide = (flags?: ReflectionFlags, hiddenFlags: FlagFilter[] = []) => {\n let hide = false\n hiddenFlags.map((hiddenFlag) => {\n if (flags?.[hiddenFlag]) {\n hide = true\n }\n })\n return hide\n }\n\n const resolvedChildern = resolveChildren(group, lookup) ?? []\n\n const visibleChildren = hiddenFlags\n ? resolvedChildern.reduce((acc, item) => {\n return acc + (hide(item.flags, hiddenFlags) ? 0 : 1)\n }, 0)\n : 1\n\n const { hash } = useLocation()\n useEffect(() => {\n if (hash && autoscroll) {\n document.querySelector(hash)?.scrollIntoView({ behavior: 'smooth' })\n }\n }, [hash, autoscroll])\n return visibleChildren > 0 ? (\n <FlexCol title=\"ReflectionGroupViewer\" {...props}>\n <FlexRow marginY={1} justifyContent=\"flex-start\">\n <Typography variant={variant}>{group.title}</Typography>\n <JsonViewerButton\n jsonViewProps={{ collapsed: 1 }}\n size=\"small\"\n variant=\"contained\"\n padding={0}\n marginX={1}\n src={resolveChildren(group, lookup)}\n />\n </FlexRow>\n {resolveChildren(group, lookup).map((reflection) => {\n return reflection ? (\n // I wrap this in a div since React does not understand that they have keys using the Renderer\n <div id={reflection.name} key={reflection.id}>\n {renderer({ hiddenFlags, lookup, margin: 1, padding: 1, reflection })}\n </div>\n ) : null\n })}\n {children}\n </FlexCol>\n ) : null\n}\n","import { Dialog, DialogActions, DialogContent, DialogTitle } from '@mui/material'\nimport { ButtonEx, ButtonExProps } from '@xylabs/react-button'\nimport { lazy, Suspense, useState } from 'react'\nimport { ReactJsonViewProps } from 'react-json-view'\n\nconst JsonView = lazy(() => import(/* webpackChunkName: \"jsonView\" */ 'react-json-view'))\n\nexport interface JsonViewerButtonProps extends ButtonExProps {\n jsonViewProps?: Partial<ReactJsonViewProps>\n src: object\n}\n\nexport const JsonViewerButton: React.FC<JsonViewerButtonProps> = ({ jsonViewProps, src, title, ...props }) => {\n const [open, setOpen] = useState(false)\n return (\n <>\n <ButtonEx onClick={() => setOpen(!open)} {...props}>\n JSON\n </ButtonEx>\n <Dialog open={open} onClose={() => setOpen(false)}>\n {title ? <DialogTitle>{title}</DialogTitle> : null}\n <DialogContent>\n <Suspense fallback={<div />}>\n <JsonView src={src} {...jsonViewProps} />\n </Suspense>\n </DialogContent>\n <DialogActions>\n <ButtonEx onClick={() => setOpen(false)}>Close</ButtonEx>\n </DialogActions>\n </Dialog>\n </>\n )\n}\n","import type { Reflection } from 'typedoc'\n\nimport { ReflectionLookup } from './ReflectionLookup'\nimport { SomeReflection } from './SomeReflection'\n\ntype ReflectionWithChildren = { children: Reflection[] }\n\nexport const resolveChildren = <T extends SomeReflection>(reflection: ReflectionWithChildren, lookup: ReflectionLookup = {}): T[] => {\n return (reflection.children?.map((child) => {\n switch (typeof child) {\n case 'object':\n return child\n case 'number': {\n const childObj = lookup[child]\n if (childObj === undefined) {\n throw Error(`Child Reference Not Found [${child}]`)\n }\n return childObj\n }\n default:\n throw Error(`Invalid Child Type [${typeof child}, ${child}]`)\n }\n }) ?? []) as T[]\n}\n","import { FlexCol } from '@xylabs/react-flexbox'\nimport type { ReflectionFlags } from 'typedoc'\n\nimport { CommentViewer } from '../CommentViewer'\nimport { SomeReflection } from '../SomeReflection'\nimport { NameViewer } from './NameViewer'\nimport { FlagFilter, ReflectionViewerProps } from './ReflectionViewerProps'\n\nconst hide = (flags?: ReflectionFlags, hiddenFlags: FlagFilter[] = []) => {\n let hide = false\n hiddenFlags.map((hiddenFlag) => {\n if (flags?.[hiddenFlag]) {\n hide = true\n }\n })\n return hide\n}\n\nexport const ReflectionViewer: React.FC<ReflectionViewerProps> = ({ variant, nameViewer, children, reflection, hiddenFlags, ...props }) => {\n const someReflection = reflection as SomeReflection\n\n return hide(reflection?.flags, hiddenFlags) ? null : (\n <FlexCol title=\"ReflectionViewer\" alignItems=\"stretch\" {...props}>\n {nameViewer === undefined ? (\n <NameViewer marginY={0.25} variant={variant} reflection={someReflection} reflectionViewer={ReflectionViewer} />\n ) : (\n nameViewer\n )}\n {reflection.comment ? <CommentViewer comment={reflection.comment} /> : null}\n {/*sources && reflection.sources && children ? (\n <>\n {reflection.sources.map((source, index) => {\n return <SourceViewer key={index} source={source} />\n })}\n </>\n ) : null*/}\n {someReflection.parameters?.map((parameter) => {\n return <ReflectionViewer hiddenFlags={hiddenFlags} marginY={0.25} marginX={1} key={parameter.id} reflection={parameter} />\n }) ?? null}\n {children}\n </FlexCol>\n )\n}\n","import { Typography } from '@mui/material'\nimport { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'\nimport type { Comment } from 'typedoc'\n\nexport interface CommentViewerProps extends FlexBoxProps {\n comment: Comment\n}\n\nexport const CommentViewer: React.FC<CommentViewerProps> = ({ comment, ...props }) => {\n return (\n <FlexCol alignItems=\"stretch\" {...props}>\n <Typography variant=\"body2\">{comment.summary[0]?.text}</Typography>\n </FlexCol>\n )\n}\n","import { Chip, Stack, Typography, TypographyVariant } from '@mui/material'\nimport { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'\n\nimport { JsonViewerButton } from '../JsonViewerButton'\nimport { SomeReflection } from '../SomeReflection'\nimport { trimFlagLabel } from '../trimFlagLabel'\nimport { ReflectionViewerProps } from './ReflectionViewerProps'\nimport { SomeTypeViewer } from './SomeTypeViewer'\n\nexport interface NameViewerProps extends FlexBoxProps {\n reflection: SomeReflection\n reflectionViewer: React.FC<ReflectionViewerProps>\n variant?: TypographyVariant\n}\n\nexport const NameViewer: React.FC<NameViewerProps> = ({ reflectionViewer, variant, reflection, ...props }) => {\n return (\n <FlexRow justifyContent=\"flex-start\" {...props}>\n <FlexRow marginRight={1}>\n <Typography variant={variant} noWrap>\n {reflection.name}\n {reflection.type ? <>:&nbsp;</> : null}\n </Typography>\n <SomeTypeViewer reflection={reflection} reflectionViewer={reflectionViewer} />\n </FlexRow>\n <Stack direction=\"row\" spacing={1}>\n <Chip size=\"small\" label={reflection.kind} />\n {reflection.flags\n ? Object.entries(reflection.flags).map(([flag, value]) => {\n return value ? <Chip size=\"small\" key={flag} label={trimFlagLabel(flag)} variant=\"outlined\" /> : null\n })\n : null}\n </Stack>\n {document && document?.location.hostname === 'localhost' && (\n <JsonViewerButton jsonViewProps={{ collapsed: 1 }} size=\"small\" variant=\"contained\" padding={0} marginX={1} src={reflection} />\n )}\n </FlexRow>\n )\n}\n","export const trimFlagLabel = (label: string) => {\n if (label.startsWith('is')) {\n return label.substring(2)\n }\n return label\n}\n","import { Typography, TypographyProps } from '@mui/material'\n\nimport { SomeReflection } from '../../SomeReflection'\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { buildTypeString } from './buildTypeString'\n\nexport interface SomeTypeViewerProps extends TypographyProps {\n opacity?: number\n reflection: SomeReflection\n reflectionViewer: React.FC<ReflectionViewerProps>\n}\n\nexport const SomeTypeViewer: React.FC<SomeTypeViewerProps> = ({ opacity = 0.5, reflection, reflectionViewer, ...props }) => {\n const typeReactNode = reflection.type ? buildTypeString(reflection.type, reflectionViewer) : ''\n if (typeof typeReactNode === 'string') {\n return (\n <Typography title=\"SomeTypeViewer\" style={{ opacity }} {...props}>\n {typeReactNode}\n </Typography>\n )\n }\n return <>{typeReactNode}</>\n}\n","import type { ArrayType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildArrayString = (typeObj: ArrayType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n const typeString = typeBuilder(typeObj.elementType, reflectionViewer)\n if (typeof typeString === 'string') {\n parts.push(typeString)\n }\n parts.push('[]')\n return parts\n}\n","import type { IntersectionType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildIntersectionString = (typeObj: IntersectionType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n if (typeObj.types) {\n parts.push(\n typeObj.types\n .map((arg) => {\n return typeBuilder(arg, reflectionViewer)\n })\n .join(' & '),\n )\n }\n return parts\n}\n","import type { ReferenceType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildReferenceString = (typeObj: ReferenceType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n parts.push(typeObj.name)\n if (typeObj.typeArguments) {\n parts.push('<')\n parts.push(\n typeObj.typeArguments\n .map((arg) => {\n return typeBuilder(arg, reflectionViewer)\n })\n .join(', '),\n )\n parts.push('>')\n }\n return parts\n}\n","import type { ReflectionType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\n\nexport const buildRelfectionString = (typeObj: ReflectionType, reflectionViewer: React.FC<ReflectionViewerProps>) => {\n if (typeObj.declaration) {\n return <>{reflectionViewer({ reflection: typeObj.declaration })}</>\n }\n}\n","import type { UnionType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildUnionString = (typeObj: UnionType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n if (typeObj.types) {\n parts.push(\n typeObj.types\n .map((arg) => {\n return typeBuilder(arg, reflectionViewer)\n })\n .join(' | '),\n )\n }\n return parts\n}\n","import { ReactNode } from 'react'\nimport type { SomeType, Type } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { buildArrayString } from './buildArrayString'\nimport { buildIntersectionString } from './buildIntersectionString'\nimport { buildReferenceString } from './buildReferenceString'\nimport { buildRelfectionString } from './buildReflectionString'\nimport { buildUnionString } from './buildUnionString'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildTypeString: TypeBuilder = (type: SomeType | Type, reflectionViewer: React.FC<ReflectionViewerProps>): ReactNode => {\n const someType = type as SomeType\n const parts: string[] = []\n\n switch (someType.type) {\n case 'intrinsic':\n parts.push(someType.name)\n break\n case 'intersection': {\n parts.push(...buildIntersectionString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'literal':\n parts.push(JSON.stringify(someType.value))\n break\n case 'array': {\n parts.push(...buildArrayString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'reference': {\n parts.push(...buildReferenceString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'union': {\n parts.push(...buildUnionString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'reflection': {\n return buildRelfectionString(someType, reflectionViewer)\n }\n default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AAVG,IAAM,4BAAsE,CAAC;AAAA,EAClF;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf,GAAG;AACL,MAAM;AACJ,QAAM,SAAS,aAAa,UAAU;AAEtC,SACE,8CAAC,oBAAiB,OAAM,6BAA4B,SAAO,MAAC,YAAwB,QAAiB,GAAG,OACrG;AAAA,eAAW,QAAQ,IAAI,CAAC,UAA2B;AAClD,aACE;AAAA,QAAC;AAAA;AAAA,UACC,QAAQ;AAAA,UACR;AAAA,UACA,UAAU;AAAA,UAEV;AAAA,UACA;AAAA,UACA;AAAA,UACA,YAAW;AAAA;AAAA,QAJN,MAAM;AAAA,MAKb;AAAA,IAEJ,CAAC;AAAA,IACA;AAAA,KACH;AAEJ;","names":["import_material","import_react_flexbox","import_react","import_react_flexbox","import_material","import_jsx_runtime","import_material","import_react_flexbox","import_material","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","hide","import_jsx_runtime","hide","hiddenFlags","import_jsx_runtime"]}
@@ -9,7 +9,7 @@ var createLookup = (reflection) => {
9
9
  import { Typography as Typography4 } from "@mui/material";
10
10
  import { FlexCol as FlexCol3, FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
11
11
  import { useEffect } from "react";
12
- import { useLocation } from "react-router-dom";
12
+ import { useLocation } from "react-router-dom-6";
13
13
 
14
14
  // src/JsonViewerButton.tsx
15
15
  import { Dialog, DialogActions, DialogContent, DialogTitle } from "@mui/material";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/createLookup.ts","../../../src/ReflectionViewer/ReflectionGroupViewer.tsx","../../../src/JsonViewerButton.tsx","../../../src/resolveChildren.ts","../../../src/ReflectionViewer/ReflectionViewer.tsx","../../../src/CommentViewer.tsx","../../../src/ReflectionViewer/NameViewer.tsx","../../../src/trimFlagLabel.ts","../../../src/ReflectionViewer/SomeTypeViewer/SomeTypeViewer.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildArrayString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildIntersectionString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildReferenceString.ts","../../../src/ReflectionViewer/SomeTypeViewer/buildReflectionString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildUnionString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildTypeString.tsx","../../../src/ReflectionViewer/Container.tsx"],"sourcesContent":["import type { ContainerReflection, DeclarationReflection } from 'typedoc'\n\nexport const createLookup = <T extends DeclarationReflection>(reflection: ContainerReflection) => {\n const lookup: Record<number, T> = {}\n reflection.children?.forEach((item) => (lookup[item.id] = item as unknown as T))\n return lookup\n}\n","import { Typography } from '@mui/material'\nimport { FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { useEffect } from 'react'\nimport { useLocation } from 'react-router-dom'\nimport type { ContainerReflection, ReflectionFlags, ReflectionGroup } from 'typedoc'\n\nimport { JsonViewerButton } from '../JsonViewerButton'\nimport { resolveChildren } from '../resolveChildren'\nimport { ReflectionViewer } from './ReflectionViewer'\nimport { FlagFilter, ReflectionViewerProps } from './ReflectionViewerProps'\n\nexport interface ReflectionGroupViewerProps extends ReflectionViewerProps<ContainerReflection> {\n autoscroll?: boolean\n group: ReflectionGroup\n reflection: ContainerReflection\n renderer?: React.FC<ReflectionViewerProps>\n}\n\nexport const ReflectionGroupViewer: React.FC<ReflectionGroupViewerProps> = ({\n autoscroll = false,\n children,\n hiddenFlags,\n group,\n lookup,\n renderer = ReflectionViewer,\n variant,\n ...props\n}) => {\n const hide = (flags?: ReflectionFlags, hiddenFlags: FlagFilter[] = []) => {\n let hide = false\n hiddenFlags.map((hiddenFlag) => {\n if (flags?.[hiddenFlag]) {\n hide = true\n }\n })\n return hide\n }\n\n const resolvedChildern = resolveChildren(group, lookup) ?? []\n\n const visibleChildren = hiddenFlags\n ? resolvedChildern.reduce((acc, item) => {\n return acc + (hide(item.flags, hiddenFlags) ? 0 : 1)\n }, 0)\n : 1\n\n const { hash } = useLocation()\n useEffect(() => {\n if (hash && autoscroll) {\n document.querySelector(hash)?.scrollIntoView({ behavior: 'smooth' })\n }\n }, [hash, autoscroll])\n return visibleChildren > 0 ? (\n <FlexCol title=\"ReflectionGroupViewer\" {...props}>\n <FlexRow marginY={1} justifyContent=\"flex-start\">\n <Typography variant={variant}>{group.title}</Typography>\n <JsonViewerButton\n jsonViewProps={{ collapsed: 1 }}\n size=\"small\"\n variant=\"contained\"\n padding={0}\n marginX={1}\n src={resolveChildren(group, lookup)}\n />\n </FlexRow>\n {resolveChildren(group, lookup).map((reflection) => {\n return reflection ? (\n // I wrap this in a div since React does not understand that they have keys using the Renderer\n <div id={reflection.name} key={reflection.id}>\n {renderer({ hiddenFlags, lookup, margin: 1, padding: 1, reflection })}\n </div>\n ) : null\n })}\n {children}\n </FlexCol>\n ) : null\n}\n","import { Dialog, DialogActions, DialogContent, DialogTitle } from '@mui/material'\nimport { ButtonEx, ButtonExProps } from '@xylabs/react-button'\nimport { lazy, Suspense, useState } from 'react'\nimport { ReactJsonViewProps } from 'react-json-view'\n\nconst JsonView = lazy(() => import(/* webpackChunkName: \"jsonView\" */ 'react-json-view'))\n\nexport interface JsonViewerButtonProps extends ButtonExProps {\n jsonViewProps?: Partial<ReactJsonViewProps>\n src: object\n}\n\nexport const JsonViewerButton: React.FC<JsonViewerButtonProps> = ({ jsonViewProps, src, title, ...props }) => {\n const [open, setOpen] = useState(false)\n return (\n <>\n <ButtonEx onClick={() => setOpen(!open)} {...props}>\n JSON\n </ButtonEx>\n <Dialog open={open} onClose={() => setOpen(false)}>\n {title ? <DialogTitle>{title}</DialogTitle> : null}\n <DialogContent>\n <Suspense fallback={<div />}>\n <JsonView src={src} {...jsonViewProps} />\n </Suspense>\n </DialogContent>\n <DialogActions>\n <ButtonEx onClick={() => setOpen(false)}>Close</ButtonEx>\n </DialogActions>\n </Dialog>\n </>\n )\n}\n","import type { Reflection } from 'typedoc'\n\nimport { ReflectionLookup } from './ReflectionLookup'\nimport { SomeReflection } from './SomeReflection'\n\ntype ReflectionWithChildren = { children: Reflection[] }\n\nexport const resolveChildren = <T extends SomeReflection>(reflection: ReflectionWithChildren, lookup: ReflectionLookup = {}): T[] => {\n return (reflection.children?.map((child) => {\n switch (typeof child) {\n case 'object':\n return child\n case 'number': {\n const childObj = lookup[child]\n if (childObj === undefined) {\n throw Error(`Child Reference Not Found [${child}]`)\n }\n return childObj\n }\n default:\n throw Error(`Invalid Child Type [${typeof child}, ${child}]`)\n }\n }) ?? []) as T[]\n}\n","import { FlexCol } from '@xylabs/react-flexbox'\nimport type { ReflectionFlags } from 'typedoc'\n\nimport { CommentViewer } from '../CommentViewer'\nimport { SomeReflection } from '../SomeReflection'\nimport { NameViewer } from './NameViewer'\nimport { FlagFilter, ReflectionViewerProps } from './ReflectionViewerProps'\n\nconst hide = (flags?: ReflectionFlags, hiddenFlags: FlagFilter[] = []) => {\n let hide = false\n hiddenFlags.map((hiddenFlag) => {\n if (flags?.[hiddenFlag]) {\n hide = true\n }\n })\n return hide\n}\n\nexport const ReflectionViewer: React.FC<ReflectionViewerProps> = ({ variant, nameViewer, children, reflection, hiddenFlags, ...props }) => {\n const someReflection = reflection as SomeReflection\n\n return hide(reflection?.flags, hiddenFlags) ? null : (\n <FlexCol title=\"ReflectionViewer\" alignItems=\"stretch\" {...props}>\n {nameViewer === undefined ? (\n <NameViewer marginY={0.25} variant={variant} reflection={someReflection} reflectionViewer={ReflectionViewer} />\n ) : (\n nameViewer\n )}\n {reflection.comment ? <CommentViewer comment={reflection.comment} /> : null}\n {/*sources && reflection.sources && children ? (\n <>\n {reflection.sources.map((source, index) => {\n return <SourceViewer key={index} source={source} />\n })}\n </>\n ) : null*/}\n {someReflection.parameters?.map((parameter) => {\n return <ReflectionViewer hiddenFlags={hiddenFlags} marginY={0.25} marginX={1} key={parameter.id} reflection={parameter} />\n }) ?? null}\n {children}\n </FlexCol>\n )\n}\n","import { Typography } from '@mui/material'\nimport { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'\nimport type { Comment } from 'typedoc'\n\nexport interface CommentViewerProps extends FlexBoxProps {\n comment: Comment\n}\n\nexport const CommentViewer: React.FC<CommentViewerProps> = ({ comment, ...props }) => {\n return (\n <FlexCol alignItems=\"stretch\" {...props}>\n <Typography variant=\"body2\">{comment.summary[0]?.text}</Typography>\n </FlexCol>\n )\n}\n","import { Chip, Stack, Typography, TypographyVariant } from '@mui/material'\nimport { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'\n\nimport { JsonViewerButton } from '../JsonViewerButton'\nimport { SomeReflection } from '../SomeReflection'\nimport { trimFlagLabel } from '../trimFlagLabel'\nimport { ReflectionViewerProps } from './ReflectionViewerProps'\nimport { SomeTypeViewer } from './SomeTypeViewer'\n\nexport interface NameViewerProps extends FlexBoxProps {\n reflection: SomeReflection\n reflectionViewer: React.FC<ReflectionViewerProps>\n variant?: TypographyVariant\n}\n\nexport const NameViewer: React.FC<NameViewerProps> = ({ reflectionViewer, variant, reflection, ...props }) => {\n return (\n <FlexRow justifyContent=\"flex-start\" {...props}>\n <FlexRow marginRight={1}>\n <Typography variant={variant} noWrap>\n {reflection.name}\n {reflection.type ? <>:&nbsp;</> : null}\n </Typography>\n <SomeTypeViewer reflection={reflection} reflectionViewer={reflectionViewer} />\n </FlexRow>\n <Stack direction=\"row\" spacing={1}>\n <Chip size=\"small\" label={reflection.kind} />\n {reflection.flags\n ? Object.entries(reflection.flags).map(([flag, value]) => {\n return value ? <Chip size=\"small\" key={flag} label={trimFlagLabel(flag)} variant=\"outlined\" /> : null\n })\n : null}\n </Stack>\n {document && document?.location.hostname === 'localhost' && (\n <JsonViewerButton jsonViewProps={{ collapsed: 1 }} size=\"small\" variant=\"contained\" padding={0} marginX={1} src={reflection} />\n )}\n </FlexRow>\n )\n}\n","export const trimFlagLabel = (label: string) => {\n if (label.startsWith('is')) {\n return label.substring(2)\n }\n return label\n}\n","import { Typography, TypographyProps } from '@mui/material'\n\nimport { SomeReflection } from '../../SomeReflection'\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { buildTypeString } from './buildTypeString'\n\nexport interface SomeTypeViewerProps extends TypographyProps {\n opacity?: number\n reflection: SomeReflection\n reflectionViewer: React.FC<ReflectionViewerProps>\n}\n\nexport const SomeTypeViewer: React.FC<SomeTypeViewerProps> = ({ opacity = 0.5, reflection, reflectionViewer, ...props }) => {\n const typeReactNode = reflection.type ? buildTypeString(reflection.type, reflectionViewer) : ''\n if (typeof typeReactNode === 'string') {\n return (\n <Typography title=\"SomeTypeViewer\" style={{ opacity }} {...props}>\n {typeReactNode}\n </Typography>\n )\n }\n return <>{typeReactNode}</>\n}\n","import type { ArrayType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildArrayString = (typeObj: ArrayType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n const typeString = typeBuilder(typeObj.elementType, reflectionViewer)\n if (typeof typeString === 'string') {\n parts.push(typeString)\n }\n parts.push('[]')\n return parts\n}\n","import type { IntersectionType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildIntersectionString = (typeObj: IntersectionType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n if (typeObj.types) {\n parts.push(\n typeObj.types\n .map((arg) => {\n return typeBuilder(arg, reflectionViewer)\n })\n .join(' & '),\n )\n }\n return parts\n}\n","import type { ReferenceType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildReferenceString = (typeObj: ReferenceType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n parts.push(typeObj.name)\n if (typeObj.typeArguments) {\n parts.push('<')\n parts.push(\n typeObj.typeArguments\n .map((arg) => {\n return typeBuilder(arg, reflectionViewer)\n })\n .join(', '),\n )\n parts.push('>')\n }\n return parts\n}\n","import type { ReflectionType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\n\nexport const buildRelfectionString = (typeObj: ReflectionType, reflectionViewer: React.FC<ReflectionViewerProps>) => {\n if (typeObj.declaration) {\n return <>{reflectionViewer({ reflection: typeObj.declaration })}</>\n }\n}\n","import type { UnionType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildUnionString = (typeObj: UnionType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n if (typeObj.types) {\n parts.push(\n typeObj.types\n .map((arg) => {\n return typeBuilder(arg, reflectionViewer)\n })\n .join(' | '),\n )\n }\n return parts\n}\n","import { ReactNode } from 'react'\nimport type { SomeType, Type } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { buildArrayString } from './buildArrayString'\nimport { buildIntersectionString } from './buildIntersectionString'\nimport { buildReferenceString } from './buildReferenceString'\nimport { buildRelfectionString } from './buildReflectionString'\nimport { buildUnionString } from './buildUnionString'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildTypeString: TypeBuilder = (type: SomeType | Type, reflectionViewer: React.FC<ReflectionViewerProps>): ReactNode => {\n const someType = type as SomeType\n const parts: string[] = []\n\n switch (someType.type) {\n case 'intrinsic':\n parts.push(someType.name)\n break\n case 'intersection': {\n parts.push(...buildIntersectionString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'literal':\n parts.push(JSON.stringify(someType.value))\n break\n case 'array': {\n parts.push(...buildArrayString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'reference': {\n parts.push(...buildReferenceString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'union': {\n parts.push(...buildUnionString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'reflection': {\n return buildRelfectionString(someType, reflectionViewer)\n }\n default:\n parts.push('#')\n parts.push(someType.type)\n parts.push('#')\n break\n }\n return parts.join('')\n}\n","import type { ContainerReflection, ReflectionGroup } from 'typedoc'\n\nimport { createLookup } from '../createLookup'\nimport { ReflectionGroupViewer } from './ReflectionGroupViewer'\nimport { ReflectionViewer } from './ReflectionViewer'\nimport { ReflectionViewerProps } from './ReflectionViewerProps'\n\nexport interface ContainerReflectionViewerProps<T extends ContainerReflection = ContainerReflection> extends ReflectionViewerProps<T> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n itemRenderer?: React.FC<ReflectionViewerProps<any>>\n}\n\nexport const ContainerReflectionViewer: React.FC<ContainerReflectionViewerProps> = ({\n children,\n reflection,\n hiddenFlags,\n itemRenderer = ReflectionViewer,\n ...props\n}) => {\n const lookup = createLookup(reflection)\n\n return (\n <ReflectionViewer title=\"ContainerReflectionViewer\" sources reflection={reflection} lookup={lookup} {...props}>\n {reflection.groups?.map((group: ReflectionGroup) => {\n return (\n <ReflectionGroupViewer\n margin={1}\n lookup={lookup}\n renderer={itemRenderer}\n key={group.title}\n group={group}\n reflection={reflection}\n hiddenFlags={hiddenFlags}\n alignItems=\"stretch\"\n />\n )\n })}\n {children}\n </ReflectionViewer>\n )\n}\n"],"mappings":";AAEO,IAAM,eAAe,CAAkC,eAAoC;AAChG,QAAM,SAA4B,CAAC;AACnC,aAAW,UAAU,QAAQ,CAAC,SAAU,OAAO,KAAK,EAAE,IAAI,IAAqB;AAC/E,SAAO;AACT;;;ACNA,SAAS,cAAAA,mBAAkB;AAC3B,SAAS,WAAAC,UAAS,WAAAC,gBAAe;AACjC,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB;;;ACH5B,SAAS,QAAQ,eAAe,eAAe,mBAAmB;AAClE,SAAS,gBAA+B;AACxC,SAAS,MAAM,UAAU,gBAAgB;AAarC,mBACE,KAGA,YAJF;AAVJ,IAAM,WAAW,KAAK,MAAM;AAAA;AAAA,EAA0C;AAAiB,CA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AAS,aAAa,UAAU;AAEtC,SACE,gBAAAA,MAAC,oBAAiB,OAAM,6BAA4B,SAAO,MAAC,YAAwB,QAAiB,GAAG,OACrG;AAAA,eAAW,QAAQ,IAAI,CAAC,UAA2B;AAClD,aACE,gBAAAD;AAAA,QAAC;AAAA;AAAA,UACC,QAAQ;AAAA,UACR;AAAA,UACA,UAAU;AAAA,UAEV;AAAA,UACA;AAAA,UACA;AAAA,UACA,YAAW;AAAA;AAAA,QAJN,MAAM;AAAA,MAKb;AAAA,IAEJ,CAAC;AAAA,IACA;AAAA,KACH;AAEJ;","names":["Typography","FlexCol","FlexRow","FlexCol","jsx","Typography","Typography","Fragment","jsx","Fragment","jsx","Typography","Fragment","jsx","jsxs","Typography","jsx","jsxs","hide","FlexCol","jsx","jsxs","hide","hiddenFlags","FlexCol","FlexRow","Typography","jsx","jsxs"]}
1
+ {"version":3,"sources":["../../../src/createLookup.ts","../../../src/ReflectionViewer/ReflectionGroupViewer.tsx","../../../src/JsonViewerButton.tsx","../../../src/resolveChildren.ts","../../../src/ReflectionViewer/ReflectionViewer.tsx","../../../src/CommentViewer.tsx","../../../src/ReflectionViewer/NameViewer.tsx","../../../src/trimFlagLabel.ts","../../../src/ReflectionViewer/SomeTypeViewer/SomeTypeViewer.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildArrayString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildIntersectionString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildReferenceString.ts","../../../src/ReflectionViewer/SomeTypeViewer/buildReflectionString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildUnionString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildTypeString.tsx","../../../src/ReflectionViewer/Container.tsx"],"sourcesContent":["import type { ContainerReflection, DeclarationReflection } from 'typedoc'\n\nexport const createLookup = <T extends DeclarationReflection>(reflection: ContainerReflection) => {\n const lookup: Record<number, T> = {}\n reflection.children?.forEach((item) => (lookup[item.id] = item as unknown as T))\n return lookup\n}\n","import { Typography } from '@mui/material'\nimport { FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { useEffect } from 'react'\nimport { useLocation } from 'react-router-dom-6'\nimport type { ContainerReflection, ReflectionFlags, ReflectionGroup } from 'typedoc'\n\nimport { JsonViewerButton } from '../JsonViewerButton'\nimport { resolveChildren } from '../resolveChildren'\nimport { ReflectionViewer } from './ReflectionViewer'\nimport { FlagFilter, ReflectionViewerProps } from './ReflectionViewerProps'\n\nexport interface ReflectionGroupViewerProps extends ReflectionViewerProps<ContainerReflection> {\n autoscroll?: boolean\n group: ReflectionGroup\n reflection: ContainerReflection\n renderer?: React.FC<ReflectionViewerProps>\n}\n\nexport const ReflectionGroupViewer: React.FC<ReflectionGroupViewerProps> = ({\n autoscroll = false,\n children,\n hiddenFlags,\n group,\n lookup,\n renderer = ReflectionViewer,\n variant,\n ...props\n}) => {\n const hide = (flags?: ReflectionFlags, hiddenFlags: FlagFilter[] = []) => {\n let hide = false\n hiddenFlags.map((hiddenFlag) => {\n if (flags?.[hiddenFlag]) {\n hide = true\n }\n })\n return hide\n }\n\n const resolvedChildern = resolveChildren(group, lookup) ?? []\n\n const visibleChildren = hiddenFlags\n ? resolvedChildern.reduce((acc, item) => {\n return acc + (hide(item.flags, hiddenFlags) ? 0 : 1)\n }, 0)\n : 1\n\n const { hash } = useLocation()\n useEffect(() => {\n if (hash && autoscroll) {\n document.querySelector(hash)?.scrollIntoView({ behavior: 'smooth' })\n }\n }, [hash, autoscroll])\n return visibleChildren > 0 ? (\n <FlexCol title=\"ReflectionGroupViewer\" {...props}>\n <FlexRow marginY={1} justifyContent=\"flex-start\">\n <Typography variant={variant}>{group.title}</Typography>\n <JsonViewerButton\n jsonViewProps={{ collapsed: 1 }}\n size=\"small\"\n variant=\"contained\"\n padding={0}\n marginX={1}\n src={resolveChildren(group, lookup)}\n />\n </FlexRow>\n {resolveChildren(group, lookup).map((reflection) => {\n return reflection ? (\n // I wrap this in a div since React does not understand that they have keys using the Renderer\n <div id={reflection.name} key={reflection.id}>\n {renderer({ hiddenFlags, lookup, margin: 1, padding: 1, reflection })}\n </div>\n ) : null\n })}\n {children}\n </FlexCol>\n ) : null\n}\n","import { Dialog, DialogActions, DialogContent, DialogTitle } from '@mui/material'\nimport { ButtonEx, ButtonExProps } from '@xylabs/react-button'\nimport { lazy, Suspense, useState } from 'react'\nimport { ReactJsonViewProps } from 'react-json-view'\n\nconst JsonView = lazy(() => import(/* webpackChunkName: \"jsonView\" */ 'react-json-view'))\n\nexport interface JsonViewerButtonProps extends ButtonExProps {\n jsonViewProps?: Partial<ReactJsonViewProps>\n src: object\n}\n\nexport const JsonViewerButton: React.FC<JsonViewerButtonProps> = ({ jsonViewProps, src, title, ...props }) => {\n const [open, setOpen] = useState(false)\n return (\n <>\n <ButtonEx onClick={() => setOpen(!open)} {...props}>\n JSON\n </ButtonEx>\n <Dialog open={open} onClose={() => setOpen(false)}>\n {title ? <DialogTitle>{title}</DialogTitle> : null}\n <DialogContent>\n <Suspense fallback={<div />}>\n <JsonView src={src} {...jsonViewProps} />\n </Suspense>\n </DialogContent>\n <DialogActions>\n <ButtonEx onClick={() => setOpen(false)}>Close</ButtonEx>\n </DialogActions>\n </Dialog>\n </>\n )\n}\n","import type { Reflection } from 'typedoc'\n\nimport { ReflectionLookup } from './ReflectionLookup'\nimport { SomeReflection } from './SomeReflection'\n\ntype ReflectionWithChildren = { children: Reflection[] }\n\nexport const resolveChildren = <T extends SomeReflection>(reflection: ReflectionWithChildren, lookup: ReflectionLookup = {}): T[] => {\n return (reflection.children?.map((child) => {\n switch (typeof child) {\n case 'object':\n return child\n case 'number': {\n const childObj = lookup[child]\n if (childObj === undefined) {\n throw Error(`Child Reference Not Found [${child}]`)\n }\n return childObj\n }\n default:\n throw Error(`Invalid Child Type [${typeof child}, ${child}]`)\n }\n }) ?? []) as T[]\n}\n","import { FlexCol } from '@xylabs/react-flexbox'\nimport type { ReflectionFlags } from 'typedoc'\n\nimport { CommentViewer } from '../CommentViewer'\nimport { SomeReflection } from '../SomeReflection'\nimport { NameViewer } from './NameViewer'\nimport { FlagFilter, ReflectionViewerProps } from './ReflectionViewerProps'\n\nconst hide = (flags?: ReflectionFlags, hiddenFlags: FlagFilter[] = []) => {\n let hide = false\n hiddenFlags.map((hiddenFlag) => {\n if (flags?.[hiddenFlag]) {\n hide = true\n }\n })\n return hide\n}\n\nexport const ReflectionViewer: React.FC<ReflectionViewerProps> = ({ variant, nameViewer, children, reflection, hiddenFlags, ...props }) => {\n const someReflection = reflection as SomeReflection\n\n return hide(reflection?.flags, hiddenFlags) ? null : (\n <FlexCol title=\"ReflectionViewer\" alignItems=\"stretch\" {...props}>\n {nameViewer === undefined ? (\n <NameViewer marginY={0.25} variant={variant} reflection={someReflection} reflectionViewer={ReflectionViewer} />\n ) : (\n nameViewer\n )}\n {reflection.comment ? <CommentViewer comment={reflection.comment} /> : null}\n {/*sources && reflection.sources && children ? (\n <>\n {reflection.sources.map((source, index) => {\n return <SourceViewer key={index} source={source} />\n })}\n </>\n ) : null*/}\n {someReflection.parameters?.map((parameter) => {\n return <ReflectionViewer hiddenFlags={hiddenFlags} marginY={0.25} marginX={1} key={parameter.id} reflection={parameter} />\n }) ?? null}\n {children}\n </FlexCol>\n )\n}\n","import { Typography } from '@mui/material'\nimport { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'\nimport type { Comment } from 'typedoc'\n\nexport interface CommentViewerProps extends FlexBoxProps {\n comment: Comment\n}\n\nexport const CommentViewer: React.FC<CommentViewerProps> = ({ comment, ...props }) => {\n return (\n <FlexCol alignItems=\"stretch\" {...props}>\n <Typography variant=\"body2\">{comment.summary[0]?.text}</Typography>\n </FlexCol>\n )\n}\n","import { Chip, Stack, Typography, TypographyVariant } from '@mui/material'\nimport { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'\n\nimport { JsonViewerButton } from '../JsonViewerButton'\nimport { SomeReflection } from '../SomeReflection'\nimport { trimFlagLabel } from '../trimFlagLabel'\nimport { ReflectionViewerProps } from './ReflectionViewerProps'\nimport { SomeTypeViewer } from './SomeTypeViewer'\n\nexport interface NameViewerProps extends FlexBoxProps {\n reflection: SomeReflection\n reflectionViewer: React.FC<ReflectionViewerProps>\n variant?: TypographyVariant\n}\n\nexport const NameViewer: React.FC<NameViewerProps> = ({ reflectionViewer, variant, reflection, ...props }) => {\n return (\n <FlexRow justifyContent=\"flex-start\" {...props}>\n <FlexRow marginRight={1}>\n <Typography variant={variant} noWrap>\n {reflection.name}\n {reflection.type ? <>:&nbsp;</> : null}\n </Typography>\n <SomeTypeViewer reflection={reflection} reflectionViewer={reflectionViewer} />\n </FlexRow>\n <Stack direction=\"row\" spacing={1}>\n <Chip size=\"small\" label={reflection.kind} />\n {reflection.flags\n ? Object.entries(reflection.flags).map(([flag, value]) => {\n return value ? <Chip size=\"small\" key={flag} label={trimFlagLabel(flag)} variant=\"outlined\" /> : null\n })\n : null}\n </Stack>\n {document && document?.location.hostname === 'localhost' && (\n <JsonViewerButton jsonViewProps={{ collapsed: 1 }} size=\"small\" variant=\"contained\" padding={0} marginX={1} src={reflection} />\n )}\n </FlexRow>\n )\n}\n","export const trimFlagLabel = (label: string) => {\n if (label.startsWith('is')) {\n return label.substring(2)\n }\n return label\n}\n","import { Typography, TypographyProps } from '@mui/material'\n\nimport { SomeReflection } from '../../SomeReflection'\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { buildTypeString } from './buildTypeString'\n\nexport interface SomeTypeViewerProps extends TypographyProps {\n opacity?: number\n reflection: SomeReflection\n reflectionViewer: React.FC<ReflectionViewerProps>\n}\n\nexport const SomeTypeViewer: React.FC<SomeTypeViewerProps> = ({ opacity = 0.5, reflection, reflectionViewer, ...props }) => {\n const typeReactNode = reflection.type ? buildTypeString(reflection.type, reflectionViewer) : ''\n if (typeof typeReactNode === 'string') {\n return (\n <Typography title=\"SomeTypeViewer\" style={{ opacity }} {...props}>\n {typeReactNode}\n </Typography>\n )\n }\n return <>{typeReactNode}</>\n}\n","import type { ArrayType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildArrayString = (typeObj: ArrayType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n const typeString = typeBuilder(typeObj.elementType, reflectionViewer)\n if (typeof typeString === 'string') {\n parts.push(typeString)\n }\n parts.push('[]')\n return parts\n}\n","import type { IntersectionType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildIntersectionString = (typeObj: IntersectionType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n if (typeObj.types) {\n parts.push(\n typeObj.types\n .map((arg) => {\n return typeBuilder(arg, reflectionViewer)\n })\n .join(' & '),\n )\n }\n return parts\n}\n","import type { ReferenceType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildReferenceString = (typeObj: ReferenceType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n parts.push(typeObj.name)\n if (typeObj.typeArguments) {\n parts.push('<')\n parts.push(\n typeObj.typeArguments\n .map((arg) => {\n return typeBuilder(arg, reflectionViewer)\n })\n .join(', '),\n )\n parts.push('>')\n }\n return parts\n}\n","import type { ReflectionType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\n\nexport const buildRelfectionString = (typeObj: ReflectionType, reflectionViewer: React.FC<ReflectionViewerProps>) => {\n if (typeObj.declaration) {\n return <>{reflectionViewer({ reflection: typeObj.declaration })}</>\n }\n}\n","import type { UnionType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildUnionString = (typeObj: UnionType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n if (typeObj.types) {\n parts.push(\n typeObj.types\n .map((arg) => {\n return typeBuilder(arg, reflectionViewer)\n })\n .join(' | '),\n )\n }\n return parts\n}\n","import { ReactNode } from 'react'\nimport type { SomeType, Type } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { buildArrayString } from './buildArrayString'\nimport { buildIntersectionString } from './buildIntersectionString'\nimport { buildReferenceString } from './buildReferenceString'\nimport { buildRelfectionString } from './buildReflectionString'\nimport { buildUnionString } from './buildUnionString'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildTypeString: TypeBuilder = (type: SomeType | Type, reflectionViewer: React.FC<ReflectionViewerProps>): ReactNode => {\n const someType = type as SomeType\n const parts: string[] = []\n\n switch (someType.type) {\n case 'intrinsic':\n parts.push(someType.name)\n break\n case 'intersection': {\n parts.push(...buildIntersectionString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'literal':\n parts.push(JSON.stringify(someType.value))\n break\n case 'array': {\n parts.push(...buildArrayString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'reference': {\n parts.push(...buildReferenceString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'union': {\n parts.push(...buildUnionString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'reflection': {\n return buildRelfectionString(someType, reflectionViewer)\n }\n default:\n parts.push('#')\n parts.push(someType.type)\n parts.push('#')\n break\n }\n return parts.join('')\n}\n","import type { ContainerReflection, ReflectionGroup } from 'typedoc'\n\nimport { createLookup } from '../createLookup'\nimport { ReflectionGroupViewer } from './ReflectionGroupViewer'\nimport { ReflectionViewer } from './ReflectionViewer'\nimport { ReflectionViewerProps } from './ReflectionViewerProps'\n\nexport interface ContainerReflectionViewerProps<T extends ContainerReflection = ContainerReflection> extends ReflectionViewerProps<T> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n itemRenderer?: React.FC<ReflectionViewerProps<any>>\n}\n\nexport const ContainerReflectionViewer: React.FC<ContainerReflectionViewerProps> = ({\n children,\n reflection,\n hiddenFlags,\n itemRenderer = ReflectionViewer,\n ...props\n}) => {\n const lookup = createLookup(reflection)\n\n return (\n <ReflectionViewer title=\"ContainerReflectionViewer\" sources reflection={reflection} lookup={lookup} {...props}>\n {reflection.groups?.map((group: ReflectionGroup) => {\n return (\n <ReflectionGroupViewer\n margin={1}\n lookup={lookup}\n renderer={itemRenderer}\n key={group.title}\n group={group}\n reflection={reflection}\n hiddenFlags={hiddenFlags}\n alignItems=\"stretch\"\n />\n )\n })}\n {children}\n </ReflectionViewer>\n )\n}\n"],"mappings":";AAEO,IAAM,eAAe,CAAkC,eAAoC;AAChG,QAAM,SAA4B,CAAC;AACnC,aAAW,UAAU,QAAQ,CAAC,SAAU,OAAO,KAAK,EAAE,IAAI,IAAqB;AAC/E,SAAO;AACT;;;ACNA,SAAS,cAAAA,mBAAkB;AAC3B,SAAS,WAAAC,UAAS,WAAAC,gBAAe;AACjC,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB;;;ACH5B,SAAS,QAAQ,eAAe,eAAe,mBAAmB;AAClE,SAAS,gBAA+B;AACxC,SAAS,MAAM,UAAU,gBAAgB;AAarC,mBACE,KAGA,YAJF;AAVJ,IAAM,WAAW,KAAK,MAAM;AAAA;AAAA,EAA0C;AAAiB,CAAC;AAOjF,IAAM,mBAAoD,CAAC,EAAE,eAAe,KAAK,OAAO,GAAG,MAAM,MAAM;AAC5G,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS,KAAK;AACtC,SACE,iCACE;AAAA,wBAAC,YAAS,SAAS,MAAM,QAAQ,CAAC,IAAI,GAAI,GAAG,OAAO,kBAEpD;AAAA,IACA,qBAAC,UAAO,MAAY,SAAS,MAAM,QAAQ,KAAK,GAC7C;AAAA,cAAQ,oBAAC,eAAa,iBAAM,IAAiB;AAAA,MAC9C,oBAAC,iBACC,8BAAC,YAAS,UAAU,oBAAC,SAAI,GACvB,8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lexCol","jsx","Typography","Typography","Fragment","jsx","Fragment","jsx","Typography","Fragment","jsx","jsxs","Typography","jsx","jsxs","hide","FlexCol","jsx","jsxs","hide","hiddenFlags","FlexCol","FlexRow","Typography","jsx","jsxs"]}
@@ -34,7 +34,7 @@ __export(DeclarationContainer_exports, {
34
34
  });
35
35
  module.exports = __toCommonJS(DeclarationContainer_exports);
36
36
  var import_material6 = require("@mui/material");
37
- var import_react_router_dom2 = require("react-router-dom");
37
+ var import_react_router_dom_62 = require("react-router-dom-6");
38
38
 
39
39
  // src/createLookup.ts
40
40
  var createLookup = (reflection) => {
@@ -47,7 +47,7 @@ var createLookup = (reflection) => {
47
47
  var import_material5 = require("@mui/material");
48
48
  var import_react_flexbox4 = require("@xylabs/react-flexbox");
49
49
  var import_react2 = require("react");
50
- var import_react_router_dom = require("react-router-dom");
50
+ var import_react_router_dom_6 = require("react-router-dom-6");
51
51
 
52
52
  // src/JsonViewerButton.tsx
53
53
  var import_material = require("@mui/material");
@@ -294,7 +294,7 @@ var ReflectionGroupViewer = ({
294
294
  const visibleChildren = hiddenFlags ? resolvedChildern.reduce((acc, item) => {
295
295
  return acc + (hide2(item.flags, hiddenFlags) ? 0 : 1);
296
296
  }, 0) : 1;
297
- const { hash } = (0, import_react_router_dom.useLocation)();
297
+ const { hash } = (0, import_react_router_dom_6.useLocation)();
298
298
  (0, import_react2.useEffect)(() => {
299
299
  if (hash && autoscroll) {
300
300
  document.querySelector(hash)?.scrollIntoView({ behavior: "smooth" });
@@ -392,7 +392,7 @@ var DeclarationContainerReflectionViewer = ({
392
392
  itemRenderer = DeclarationReflectionViewer,
393
393
  ...props
394
394
  }) => {
395
- const { hash } = (0, import_react_router_dom2.useLocation)();
395
+ const { hash } = (0, import_react_router_dom_62.useLocation)();
396
396
  const theme = (0, import_material6.useTheme)();
397
397
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
398
398
  ContainerReflectionViewer,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/ReflectionViewer/DeclarationContainer.tsx","../../../src/createLookup.ts","../../../src/ReflectionViewer/ReflectionGroupViewer.tsx","../../../src/JsonViewerButton.tsx","../../../src/resolveChildren.ts","../../../src/ReflectionViewer/ReflectionViewer.tsx","../../../src/CommentViewer.tsx","../../../src/ReflectionViewer/NameViewer.tsx","../../../src/trimFlagLabel.ts","../../../src/ReflectionViewer/SomeTypeViewer/SomeTypeViewer.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildArrayString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildIntersectionString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildReferenceString.ts","../../../src/ReflectionViewer/SomeTypeViewer/buildReflectionString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildUnionString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildTypeString.tsx","../../../src/ReflectionViewer/Container.tsx","../../../src/ReflectionViewer/Declaration.tsx"],"sourcesContent":["import { useTheme } from '@mui/material'\nimport { useLocation } from 'react-router-dom'\nimport type { DeclarationReflection } from 'typedoc'\n\nimport { ContainerReflectionViewer, ContainerReflectionViewerProps } from './Container'\nimport { DeclarationReflectionViewer } from './Declaration'\n\nexport interface DeclarationContainerReflectionViewerProps extends ContainerReflectionViewerProps {\n reflection: DeclarationReflection\n}\n\nexport const DeclarationContainerReflectionViewer: React.FC<DeclarationContainerReflectionViewerProps> = ({\n reflection,\n lookup,\n itemRenderer = DeclarationReflectionViewer,\n ...props\n}) => {\n const { hash } = useLocation()\n const theme = useTheme()\n\n return (\n <ContainerReflectionViewer\n title=\"DeclarationContainerReflectionViewer\"\n paper={hash.substring(1) === reflection.name}\n bgcolor={hash.substring(1) === reflection.name ? theme.palette.background.default : undefined}\n lookup={lookup}\n itemRenderer={itemRenderer}\n reflection={reflection}\n {...props}\n />\n )\n}\n","import type { ContainerReflection, DeclarationReflection } from 'typedoc'\n\nexport const createLookup = <T extends DeclarationReflection>(reflection: ContainerReflection) => {\n const lookup: Record<number, T> = {}\n reflection.children?.forEach((item) => (lookup[item.id] = item as unknown as T))\n return lookup\n}\n","import { Typography } from '@mui/material'\nimport { FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { useEffect } from 'react'\nimport { useLocation } from 'react-router-dom'\nimport type { ContainerReflection, ReflectionFlags, ReflectionGroup } from 'typedoc'\n\nimport { JsonViewerButton } from '../JsonViewerButton'\nimport { resolveChildren } from '../resolveChildren'\nimport { ReflectionViewer } from './ReflectionViewer'\nimport { FlagFilter, ReflectionViewerProps } from './ReflectionViewerProps'\n\nexport interface ReflectionGroupViewerProps extends ReflectionViewerProps<ContainerReflection> {\n autoscroll?: boolean\n group: ReflectionGroup\n reflection: ContainerReflection\n renderer?: React.FC<ReflectionViewerProps>\n}\n\nexport const ReflectionGroupViewer: React.FC<ReflectionGroupViewerProps> = ({\n autoscroll = false,\n children,\n hiddenFlags,\n group,\n lookup,\n renderer = ReflectionViewer,\n variant,\n ...props\n}) => {\n const hide = (flags?: ReflectionFlags, hiddenFlags: FlagFilter[] = []) => {\n let hide = false\n hiddenFlags.map((hiddenFlag) => {\n if (flags?.[hiddenFlag]) {\n hide = true\n }\n })\n return hide\n }\n\n const resolvedChildern = resolveChildren(group, lookup) ?? []\n\n const visibleChildren = hiddenFlags\n ? resolvedChildern.reduce((acc, item) => {\n return acc + (hide(item.flags, hiddenFlags) ? 0 : 1)\n }, 0)\n : 1\n\n const { hash } = useLocation()\n useEffect(() => {\n if (hash && autoscroll) {\n document.querySelector(hash)?.scrollIntoView({ behavior: 'smooth' })\n }\n }, [hash, autoscroll])\n return visibleChildren > 0 ? (\n <FlexCol title=\"ReflectionGroupViewer\" {...props}>\n <FlexRow marginY={1} justifyContent=\"flex-start\">\n <Typography variant={variant}>{group.title}</Typography>\n <JsonViewerButton\n jsonViewProps={{ collapsed: 1 }}\n size=\"small\"\n variant=\"contained\"\n padding={0}\n marginX={1}\n src={resolveChildren(group, lookup)}\n />\n </FlexRow>\n {resolveChildren(group, lookup).map((reflection) => {\n return reflection ? (\n // I wrap this in a div since React does not understand that they have keys using the Renderer\n <div id={reflection.name} key={reflection.id}>\n {renderer({ hiddenFlags, lookup, margin: 1, padding: 1, reflection })}\n </div>\n ) : null\n })}\n {children}\n </FlexCol>\n ) : null\n}\n","import { Dialog, DialogActions, DialogContent, DialogTitle } from '@mui/material'\nimport { ButtonEx, ButtonExProps } from '@xylabs/react-button'\nimport { lazy, Suspense, useState } from 'react'\nimport { ReactJsonViewProps } from 'react-json-view'\n\nconst JsonView = lazy(() => import(/* webpackChunkName: \"jsonView\" */ 'react-json-view'))\n\nexport interface JsonViewerButtonProps extends ButtonExProps {\n jsonViewProps?: Partial<ReactJsonViewProps>\n src: object\n}\n\nexport const JsonViewerButton: React.FC<JsonViewerButtonProps> = ({ jsonViewProps, src, title, ...props }) => {\n const [open, setOpen] = useState(false)\n return (\n <>\n <ButtonEx onClick={() => setOpen(!open)} {...props}>\n JSON\n </ButtonEx>\n <Dialog open={open} onClose={() => setOpen(false)}>\n {title ? <DialogTitle>{title}</DialogTitle> : null}\n <DialogContent>\n <Suspense fallback={<div />}>\n <JsonView src={src} {...jsonViewProps} />\n </Suspense>\n </DialogContent>\n <DialogActions>\n <ButtonEx onClick={() => setOpen(false)}>Close</ButtonEx>\n </DialogActions>\n </Dialog>\n </>\n )\n}\n","import type { Reflection } from 'typedoc'\n\nimport { ReflectionLookup } from './ReflectionLookup'\nimport { SomeReflection } from './SomeReflection'\n\ntype ReflectionWithChildren = { children: Reflection[] }\n\nexport const resolveChildren = <T extends SomeReflection>(reflection: ReflectionWithChildren, lookup: ReflectionLookup = {}): T[] => {\n return (reflection.children?.map((child) => {\n switch (typeof child) {\n case 'object':\n return child\n case 'number': {\n const childObj = lookup[child]\n if (childObj === undefined) {\n throw Error(`Child Reference Not Found [${child}]`)\n }\n return childObj\n }\n default:\n throw Error(`Invalid Child Type [${typeof child}, ${child}]`)\n }\n }) ?? []) as T[]\n}\n","import { FlexCol } from '@xylabs/react-flexbox'\nimport type { ReflectionFlags } from 'typedoc'\n\nimport { CommentViewer } from '../CommentViewer'\nimport { SomeReflection } from '../SomeReflection'\nimport { NameViewer } from './NameViewer'\nimport { FlagFilter, ReflectionViewerProps } from './ReflectionViewerProps'\n\nconst hide = (flags?: ReflectionFlags, hiddenFlags: FlagFilter[] = []) => {\n let hide = false\n hiddenFlags.map((hiddenFlag) => {\n if (flags?.[hiddenFlag]) {\n hide = true\n }\n })\n return hide\n}\n\nexport const ReflectionViewer: React.FC<ReflectionViewerProps> = ({ variant, nameViewer, children, reflection, hiddenFlags, ...props }) => {\n const someReflection = reflection as SomeReflection\n\n return hide(reflection?.flags, hiddenFlags) ? null : (\n <FlexCol title=\"ReflectionViewer\" alignItems=\"stretch\" {...props}>\n {nameViewer === undefined ? (\n <NameViewer marginY={0.25} variant={variant} reflection={someReflection} reflectionViewer={ReflectionViewer} />\n ) : (\n nameViewer\n )}\n {reflection.comment ? <CommentViewer comment={reflection.comment} /> : null}\n {/*sources && reflection.sources && children ? (\n <>\n {reflection.sources.map((source, index) => {\n return <SourceViewer key={index} source={source} />\n })}\n </>\n ) : null*/}\n {someReflection.parameters?.map((parameter) => {\n return <ReflectionViewer hiddenFlags={hiddenFlags} marginY={0.25} marginX={1} key={parameter.id} reflection={parameter} />\n }) ?? null}\n {children}\n </FlexCol>\n )\n}\n","import { Typography } from '@mui/material'\nimport { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'\nimport type { Comment } from 'typedoc'\n\nexport interface CommentViewerProps extends FlexBoxProps {\n comment: Comment\n}\n\nexport const CommentViewer: React.FC<CommentViewerProps> = ({ comment, ...props }) => {\n return (\n <FlexCol alignItems=\"stretch\" {...props}>\n <Typography variant=\"body2\">{comment.summary[0]?.text}</Typography>\n </FlexCol>\n )\n}\n","import { Chip, Stack, Typography, TypographyVariant } from '@mui/material'\nimport { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'\n\nimport { JsonViewerButton } from '../JsonViewerButton'\nimport { SomeReflection } from '../SomeReflection'\nimport { trimFlagLabel } from '../trimFlagLabel'\nimport { ReflectionViewerProps } from './ReflectionViewerProps'\nimport { SomeTypeViewer } from './SomeTypeViewer'\n\nexport interface NameViewerProps extends FlexBoxProps {\n reflection: SomeReflection\n reflectionViewer: React.FC<ReflectionViewerProps>\n variant?: TypographyVariant\n}\n\nexport const NameViewer: React.FC<NameViewerProps> = ({ reflectionViewer, variant, reflection, ...props }) => {\n return (\n <FlexRow justifyContent=\"flex-start\" {...props}>\n <FlexRow marginRight={1}>\n <Typography variant={variant} noWrap>\n {reflection.name}\n {reflection.type ? <>:&nbsp;</> : null}\n </Typography>\n <SomeTypeViewer reflection={reflection} reflectionViewer={reflectionViewer} />\n </FlexRow>\n <Stack direction=\"row\" spacing={1}>\n <Chip size=\"small\" label={reflection.kind} />\n {reflection.flags\n ? Object.entries(reflection.flags).map(([flag, value]) => {\n return value ? <Chip size=\"small\" key={flag} label={trimFlagLabel(flag)} variant=\"outlined\" /> : null\n })\n : null}\n </Stack>\n {document && document?.location.hostname === 'localhost' && (\n <JsonViewerButton jsonViewProps={{ collapsed: 1 }} size=\"small\" variant=\"contained\" padding={0} marginX={1} src={reflection} />\n )}\n </FlexRow>\n )\n}\n","export const trimFlagLabel = (label: string) => {\n if (label.startsWith('is')) {\n return label.substring(2)\n }\n return label\n}\n","import { Typography, TypographyProps } from '@mui/material'\n\nimport { SomeReflection } from '../../SomeReflection'\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { buildTypeString } from './buildTypeString'\n\nexport interface SomeTypeViewerProps extends TypographyProps {\n opacity?: number\n reflection: SomeReflection\n reflectionViewer: React.FC<ReflectionViewerProps>\n}\n\nexport const SomeTypeViewer: React.FC<SomeTypeViewerProps> = ({ opacity = 0.5, reflection, reflectionViewer, ...props }) => {\n const typeReactNode = reflection.type ? buildTypeString(reflection.type, reflectionViewer) : ''\n if (typeof typeReactNode === 'string') {\n return (\n <Typography title=\"SomeTypeViewer\" style={{ opacity }} {...props}>\n {typeReactNode}\n </Typography>\n )\n }\n return <>{typeReactNode}</>\n}\n","import type { ArrayType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildArrayString = (typeObj: ArrayType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n const typeString = typeBuilder(typeObj.elementType, reflectionViewer)\n if (typeof typeString === 'string') {\n parts.push(typeString)\n }\n parts.push('[]')\n return parts\n}\n","import type { IntersectionType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildIntersectionString = (typeObj: IntersectionType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n if (typeObj.types) {\n parts.push(\n typeObj.types\n .map((arg) => {\n return typeBuilder(arg, reflectionViewer)\n })\n .join(' & '),\n )\n }\n return parts\n}\n","import type { ReferenceType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildReferenceString = (typeObj: ReferenceType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n parts.push(typeObj.name)\n if (typeObj.typeArguments) {\n parts.push('<')\n parts.push(\n typeObj.typeArguments\n .map((arg) => {\n return typeBuilder(arg, reflectionViewer)\n })\n .join(', '),\n )\n parts.push('>')\n }\n return parts\n}\n","import type { ReflectionType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\n\nexport const buildRelfectionString = (typeObj: ReflectionType, reflectionViewer: React.FC<ReflectionViewerProps>) => {\n if (typeObj.declaration) {\n return <>{reflectionViewer({ reflection: typeObj.declaration })}</>\n }\n}\n","import type { UnionType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildUnionString = (typeObj: UnionType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n if (typeObj.types) {\n parts.push(\n typeObj.types\n .map((arg) => {\n return typeBuilder(arg, reflectionViewer)\n })\n .join(' | '),\n )\n }\n return parts\n}\n","import { ReactNode } from 'react'\nimport type { SomeType, Type } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { buildArrayString } from './buildArrayString'\nimport { buildIntersectionString } from './buildIntersectionString'\nimport { buildReferenceString } from './buildReferenceString'\nimport { buildRelfectionString } from './buildReflectionString'\nimport { buildUnionString } from './buildUnionString'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildTypeString: TypeBuilder = (type: SomeType | Type, reflectionViewer: React.FC<ReflectionViewerProps>): ReactNode => {\n const someType = type as SomeType\n const parts: string[] = []\n\n switch (someType.type) {\n case 'intrinsic':\n parts.push(someType.name)\n break\n case 'intersection': {\n parts.push(...buildIntersectionString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'literal':\n parts.push(JSON.stringify(someType.value))\n break\n case 'array': {\n parts.push(...buildArrayString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'reference': {\n parts.push(...buildReferenceString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'union': {\n parts.push(...buildUnionString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'reflection': {\n return buildRelfectionString(someType, reflectionViewer)\n }\n default:\n parts.push('#')\n parts.push(someType.type)\n parts.push('#')\n break\n }\n return parts.join('')\n}\n","import type { ContainerReflection, ReflectionGroup } from 'typedoc'\n\nimport { createLookup } from '../createLookup'\nimport { ReflectionGroupViewer } from './ReflectionGroupViewer'\nimport { ReflectionViewer } from './ReflectionViewer'\nimport { ReflectionViewerProps } from './ReflectionViewerProps'\n\nexport interface ContainerReflectionViewerProps<T extends ContainerReflection = ContainerReflection> extends ReflectionViewerProps<T> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n itemRenderer?: React.FC<ReflectionViewerProps<any>>\n}\n\nexport const ContainerReflectionViewer: React.FC<ContainerReflectionViewerProps> = ({\n children,\n reflection,\n hiddenFlags,\n itemRenderer = ReflectionViewer,\n ...props\n}) => {\n const lookup = createLookup(reflection)\n\n return (\n <ReflectionViewer title=\"ContainerReflectionViewer\" sources reflection={reflection} lookup={lookup} {...props}>\n {reflection.groups?.map((group: ReflectionGroup) => {\n return (\n <ReflectionGroupViewer\n margin={1}\n lookup={lookup}\n renderer={itemRenderer}\n key={group.title}\n group={group}\n reflection={reflection}\n hiddenFlags={hiddenFlags}\n alignItems=\"stretch\"\n />\n )\n })}\n {children}\n </ReflectionViewer>\n )\n}\n","import type { DeclarationReflection, SignatureReflection } from 'typedoc'\n\nimport { ReflectionViewer } from './ReflectionViewer'\nimport { ReflectionViewerProps } from './ReflectionViewerProps'\n\nexport const DeclarationReflectionViewer: React.FC<ReflectionViewerProps<DeclarationReflection>> = ({ reflection, hiddenFlags, ...props }) => {\n const safeSignatures = (signatures?: SignatureReflection[] | SignatureReflection) => {\n return Array.isArray(signatures) ? signatures : signatures ? [signatures] : undefined\n }\n\n return (\n <ReflectionViewer\n nameViewer={reflection.signatures || reflection.getSignature || reflection.setSignature ? null : undefined}\n title=\"DeclarationReflectionViewer\"\n hiddenFlags={hiddenFlags}\n reflection={reflection}\n {...props}\n >\n {reflection.signatures?.map((signature) => {\n return <ReflectionViewer key={signature.id} hiddenFlags={hiddenFlags} reflection={signature} />\n })}\n {safeSignatures(reflection.getSignature)?.map((signature) => {\n return <ReflectionViewer marginX={1} key={signature.id} hiddenFlags={hiddenFlags} reflection={signature} />\n })}\n {safeSignatures(reflection.setSignature)?.map((signature) => {\n return <ReflectionViewer marginX={1} key={signature.id} hiddenFlags={hiddenFlags} reflection={signature} />\n })}\n </ReflectionViewer>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,I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AA,EACA;AAAA,EACA,eAAe;AAAA,EACf,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,KAAK,QAAI,sCAAY;AAC7B,QAAM,YAAQ,2BAAS;AAEvB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAM;AAAA,MACN,OAAO,KAAK,UAAU,CAAC,MAAM,WAAW;AAAA,MACxC,SAAS,KAAK,UAAU,CAAC,MAAM,WAAW,OAAO,MAAM,QAAQ,WAAW,UAAU;AAAA,MACpF;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;","names":["import_material","import_react_router_dom","import_material","import_react_flexbox","import_react","import_react_flexbox","import_material","import_jsx_runtime","import_material","import_react_flexbox","import_material","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","hide","import_jsx_runtime","hide","hiddenFlags","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../../src/ReflectionViewer/DeclarationContainer.tsx","../../../src/createLookup.ts","../../../src/ReflectionViewer/ReflectionGroupViewer.tsx","../../../src/JsonViewerButton.tsx","../../../src/resolveChildren.ts","../../../src/ReflectionViewer/ReflectionViewer.tsx","../../../src/CommentViewer.tsx","../../../src/ReflectionViewer/NameViewer.tsx","../../../src/trimFlagLabel.ts","../../../src/ReflectionViewer/SomeTypeViewer/SomeTypeViewer.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildArrayString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildIntersectionString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildReferenceString.ts","../../../src/ReflectionViewer/SomeTypeViewer/buildReflectionString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildUnionString.tsx","../../../src/ReflectionViewer/SomeTypeViewer/buildTypeString.tsx","../../../src/ReflectionViewer/Container.tsx","../../../src/ReflectionViewer/Declaration.tsx"],"sourcesContent":["import { useTheme } from '@mui/material'\nimport { useLocation } from 'react-router-dom-6'\nimport type { DeclarationReflection } from 'typedoc'\n\nimport { ContainerReflectionViewer, ContainerReflectionViewerProps } from './Container'\nimport { DeclarationReflectionViewer } from './Declaration'\n\nexport interface DeclarationContainerReflectionViewerProps extends ContainerReflectionViewerProps {\n reflection: DeclarationReflection\n}\n\nexport const DeclarationContainerReflectionViewer: React.FC<DeclarationContainerReflectionViewerProps> = ({\n reflection,\n lookup,\n itemRenderer = DeclarationReflectionViewer,\n ...props\n}) => {\n const { hash } = useLocation()\n const theme = useTheme()\n\n return (\n <ContainerReflectionViewer\n title=\"DeclarationContainerReflectionViewer\"\n paper={hash.substring(1) === reflection.name}\n bgcolor={hash.substring(1) === reflection.name ? theme.palette.background.default : undefined}\n lookup={lookup}\n itemRenderer={itemRenderer}\n reflection={reflection}\n {...props}\n />\n )\n}\n","import type { ContainerReflection, DeclarationReflection } from 'typedoc'\n\nexport const createLookup = <T extends DeclarationReflection>(reflection: ContainerReflection) => {\n const lookup: Record<number, T> = {}\n reflection.children?.forEach((item) => (lookup[item.id] = item as unknown as T))\n return lookup\n}\n","import { Typography } from '@mui/material'\nimport { FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { useEffect } from 'react'\nimport { useLocation } from 'react-router-dom-6'\nimport type { ContainerReflection, ReflectionFlags, ReflectionGroup } from 'typedoc'\n\nimport { JsonViewerButton } from '../JsonViewerButton'\nimport { resolveChildren } from '../resolveChildren'\nimport { ReflectionViewer } from './ReflectionViewer'\nimport { FlagFilter, ReflectionViewerProps } from './ReflectionViewerProps'\n\nexport interface ReflectionGroupViewerProps extends ReflectionViewerProps<ContainerReflection> {\n autoscroll?: boolean\n group: ReflectionGroup\n reflection: ContainerReflection\n renderer?: React.FC<ReflectionViewerProps>\n}\n\nexport const ReflectionGroupViewer: React.FC<ReflectionGroupViewerProps> = ({\n autoscroll = false,\n children,\n hiddenFlags,\n group,\n lookup,\n renderer = ReflectionViewer,\n variant,\n ...props\n}) => {\n const hide = (flags?: ReflectionFlags, hiddenFlags: FlagFilter[] = []) => {\n let hide = false\n hiddenFlags.map((hiddenFlag) => {\n if (flags?.[hiddenFlag]) {\n hide = true\n }\n })\n return hide\n }\n\n const resolvedChildern = resolveChildren(group, lookup) ?? []\n\n const visibleChildren = hiddenFlags\n ? resolvedChildern.reduce((acc, item) => {\n return acc + (hide(item.flags, hiddenFlags) ? 0 : 1)\n }, 0)\n : 1\n\n const { hash } = useLocation()\n useEffect(() => {\n if (hash && autoscroll) {\n document.querySelector(hash)?.scrollIntoView({ behavior: 'smooth' })\n }\n }, [hash, autoscroll])\n return visibleChildren > 0 ? (\n <FlexCol title=\"ReflectionGroupViewer\" {...props}>\n <FlexRow marginY={1} justifyContent=\"flex-start\">\n <Typography variant={variant}>{group.title}</Typography>\n <JsonViewerButton\n jsonViewProps={{ collapsed: 1 }}\n size=\"small\"\n variant=\"contained\"\n padding={0}\n marginX={1}\n src={resolveChildren(group, lookup)}\n />\n </FlexRow>\n {resolveChildren(group, lookup).map((reflection) => {\n return reflection ? (\n // I wrap this in a div since React does not understand that they have keys using the Renderer\n <div id={reflection.name} key={reflection.id}>\n {renderer({ hiddenFlags, lookup, margin: 1, padding: 1, reflection })}\n </div>\n ) : null\n })}\n {children}\n </FlexCol>\n ) : null\n}\n","import { Dialog, DialogActions, DialogContent, DialogTitle } from '@mui/material'\nimport { ButtonEx, ButtonExProps } from '@xylabs/react-button'\nimport { lazy, Suspense, useState } from 'react'\nimport { ReactJsonViewProps } from 'react-json-view'\n\nconst JsonView = lazy(() => import(/* webpackChunkName: \"jsonView\" */ 'react-json-view'))\n\nexport interface JsonViewerButtonProps extends ButtonExProps {\n jsonViewProps?: Partial<ReactJsonViewProps>\n src: object\n}\n\nexport const JsonViewerButton: React.FC<JsonViewerButtonProps> = ({ jsonViewProps, src, title, ...props }) => {\n const [open, setOpen] = useState(false)\n return (\n <>\n <ButtonEx onClick={() => setOpen(!open)} {...props}>\n JSON\n </ButtonEx>\n <Dialog open={open} onClose={() => setOpen(false)}>\n {title ? <DialogTitle>{title}</DialogTitle> : null}\n <DialogContent>\n <Suspense fallback={<div />}>\n <JsonView src={src} {...jsonViewProps} />\n </Suspense>\n </DialogContent>\n <DialogActions>\n <ButtonEx onClick={() => setOpen(false)}>Close</ButtonEx>\n </DialogActions>\n </Dialog>\n </>\n )\n}\n","import type { Reflection } from 'typedoc'\n\nimport { ReflectionLookup } from './ReflectionLookup'\nimport { SomeReflection } from './SomeReflection'\n\ntype ReflectionWithChildren = { children: Reflection[] }\n\nexport const resolveChildren = <T extends SomeReflection>(reflection: ReflectionWithChildren, lookup: ReflectionLookup = {}): T[] => {\n return (reflection.children?.map((child) => {\n switch (typeof child) {\n case 'object':\n return child\n case 'number': {\n const childObj = lookup[child]\n if (childObj === undefined) {\n throw Error(`Child Reference Not Found [${child}]`)\n }\n return childObj\n }\n default:\n throw Error(`Invalid Child Type [${typeof child}, ${child}]`)\n }\n }) ?? []) as T[]\n}\n","import { FlexCol } from '@xylabs/react-flexbox'\nimport type { ReflectionFlags } from 'typedoc'\n\nimport { CommentViewer } from '../CommentViewer'\nimport { SomeReflection } from '../SomeReflection'\nimport { NameViewer } from './NameViewer'\nimport { FlagFilter, ReflectionViewerProps } from './ReflectionViewerProps'\n\nconst hide = (flags?: ReflectionFlags, hiddenFlags: FlagFilter[] = []) => {\n let hide = false\n hiddenFlags.map((hiddenFlag) => {\n if (flags?.[hiddenFlag]) {\n hide = true\n }\n })\n return hide\n}\n\nexport const ReflectionViewer: React.FC<ReflectionViewerProps> = ({ variant, nameViewer, children, reflection, hiddenFlags, ...props }) => {\n const someReflection = reflection as SomeReflection\n\n return hide(reflection?.flags, hiddenFlags) ? null : (\n <FlexCol title=\"ReflectionViewer\" alignItems=\"stretch\" {...props}>\n {nameViewer === undefined ? (\n <NameViewer marginY={0.25} variant={variant} reflection={someReflection} reflectionViewer={ReflectionViewer} />\n ) : (\n nameViewer\n )}\n {reflection.comment ? <CommentViewer comment={reflection.comment} /> : null}\n {/*sources && reflection.sources && children ? (\n <>\n {reflection.sources.map((source, index) => {\n return <SourceViewer key={index} source={source} />\n })}\n </>\n ) : null*/}\n {someReflection.parameters?.map((parameter) => {\n return <ReflectionViewer hiddenFlags={hiddenFlags} marginY={0.25} marginX={1} key={parameter.id} reflection={parameter} />\n }) ?? null}\n {children}\n </FlexCol>\n )\n}\n","import { Typography } from '@mui/material'\nimport { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'\nimport type { Comment } from 'typedoc'\n\nexport interface CommentViewerProps extends FlexBoxProps {\n comment: Comment\n}\n\nexport const CommentViewer: React.FC<CommentViewerProps> = ({ comment, ...props }) => {\n return (\n <FlexCol alignItems=\"stretch\" {...props}>\n <Typography variant=\"body2\">{comment.summary[0]?.text}</Typography>\n </FlexCol>\n )\n}\n","import { Chip, Stack, Typography, TypographyVariant } from '@mui/material'\nimport { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'\n\nimport { JsonViewerButton } from '../JsonViewerButton'\nimport { SomeReflection } from '../SomeReflection'\nimport { trimFlagLabel } from '../trimFlagLabel'\nimport { ReflectionViewerProps } from './ReflectionViewerProps'\nimport { SomeTypeViewer } from './SomeTypeViewer'\n\nexport interface NameViewerProps extends FlexBoxProps {\n reflection: SomeReflection\n reflectionViewer: React.FC<ReflectionViewerProps>\n variant?: TypographyVariant\n}\n\nexport const NameViewer: React.FC<NameViewerProps> = ({ reflectionViewer, variant, reflection, ...props }) => {\n return (\n <FlexRow justifyContent=\"flex-start\" {...props}>\n <FlexRow marginRight={1}>\n <Typography variant={variant} noWrap>\n {reflection.name}\n {reflection.type ? <>:&nbsp;</> : null}\n </Typography>\n <SomeTypeViewer reflection={reflection} reflectionViewer={reflectionViewer} />\n </FlexRow>\n <Stack direction=\"row\" spacing={1}>\n <Chip size=\"small\" label={reflection.kind} />\n {reflection.flags\n ? Object.entries(reflection.flags).map(([flag, value]) => {\n return value ? <Chip size=\"small\" key={flag} label={trimFlagLabel(flag)} variant=\"outlined\" /> : null\n })\n : null}\n </Stack>\n {document && document?.location.hostname === 'localhost' && (\n <JsonViewerButton jsonViewProps={{ collapsed: 1 }} size=\"small\" variant=\"contained\" padding={0} marginX={1} src={reflection} />\n )}\n </FlexRow>\n )\n}\n","export const trimFlagLabel = (label: string) => {\n if (label.startsWith('is')) {\n return label.substring(2)\n }\n return label\n}\n","import { Typography, TypographyProps } from '@mui/material'\n\nimport { SomeReflection } from '../../SomeReflection'\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { buildTypeString } from './buildTypeString'\n\nexport interface SomeTypeViewerProps extends TypographyProps {\n opacity?: number\n reflection: SomeReflection\n reflectionViewer: React.FC<ReflectionViewerProps>\n}\n\nexport const SomeTypeViewer: React.FC<SomeTypeViewerProps> = ({ opacity = 0.5, reflection, reflectionViewer, ...props }) => {\n const typeReactNode = reflection.type ? buildTypeString(reflection.type, reflectionViewer) : ''\n if (typeof typeReactNode === 'string') {\n return (\n <Typography title=\"SomeTypeViewer\" style={{ opacity }} {...props}>\n {typeReactNode}\n </Typography>\n )\n }\n return <>{typeReactNode}</>\n}\n","import type { ArrayType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildArrayString = (typeObj: ArrayType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n const typeString = typeBuilder(typeObj.elementType, reflectionViewer)\n if (typeof typeString === 'string') {\n parts.push(typeString)\n }\n parts.push('[]')\n return parts\n}\n","import type { IntersectionType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildIntersectionString = (typeObj: IntersectionType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n if (typeObj.types) {\n parts.push(\n typeObj.types\n .map((arg) => {\n return typeBuilder(arg, reflectionViewer)\n })\n .join(' & '),\n )\n }\n return parts\n}\n","import type { ReferenceType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildReferenceString = (typeObj: ReferenceType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n parts.push(typeObj.name)\n if (typeObj.typeArguments) {\n parts.push('<')\n parts.push(\n typeObj.typeArguments\n .map((arg) => {\n return typeBuilder(arg, reflectionViewer)\n })\n .join(', '),\n )\n parts.push('>')\n }\n return parts\n}\n","import type { ReflectionType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\n\nexport const buildRelfectionString = (typeObj: ReflectionType, reflectionViewer: React.FC<ReflectionViewerProps>) => {\n if (typeObj.declaration) {\n return <>{reflectionViewer({ reflection: typeObj.declaration })}</>\n }\n}\n","import type { UnionType } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildUnionString = (typeObj: UnionType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {\n const parts: string[] = []\n if (typeObj.types) {\n parts.push(\n typeObj.types\n .map((arg) => {\n return typeBuilder(arg, reflectionViewer)\n })\n .join(' | '),\n )\n }\n return parts\n}\n","import { ReactNode } from 'react'\nimport type { SomeType, Type } from 'typedoc'\n\nimport { ReflectionViewerProps } from '../ReflectionViewerProps'\nimport { buildArrayString } from './buildArrayString'\nimport { buildIntersectionString } from './buildIntersectionString'\nimport { buildReferenceString } from './buildReferenceString'\nimport { buildRelfectionString } from './buildReflectionString'\nimport { buildUnionString } from './buildUnionString'\nimport { TypeBuilder } from './TypeBuilder'\n\nexport const buildTypeString: TypeBuilder = (type: SomeType | Type, reflectionViewer: React.FC<ReflectionViewerProps>): ReactNode => {\n const someType = type as SomeType\n const parts: string[] = []\n\n switch (someType.type) {\n case 'intrinsic':\n parts.push(someType.name)\n break\n case 'intersection': {\n parts.push(...buildIntersectionString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'literal':\n parts.push(JSON.stringify(someType.value))\n break\n case 'array': {\n parts.push(...buildArrayString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'reference': {\n parts.push(...buildReferenceString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'union': {\n parts.push(...buildUnionString(someType, reflectionViewer, buildTypeString))\n break\n }\n case 'reflection': {\n return buildRelfectionString(someType, reflectionViewer)\n }\n default:\n parts.push('#')\n parts.push(someType.type)\n parts.push('#')\n break\n }\n return parts.join('')\n}\n","import type { ContainerReflection, ReflectionGroup } from 'typedoc'\n\nimport { createLookup } from '../createLookup'\nimport { ReflectionGroupViewer } from './ReflectionGroupViewer'\nimport { ReflectionViewer } from './ReflectionViewer'\nimport { ReflectionViewerProps } from './ReflectionViewerProps'\n\nexport interface ContainerReflectionViewerProps<T extends ContainerReflection = ContainerReflection> extends ReflectionViewerProps<T> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n itemRenderer?: React.FC<ReflectionViewerProps<any>>\n}\n\nexport const ContainerReflectionViewer: React.FC<ContainerReflectionViewerProps> = ({\n children,\n reflection,\n hiddenFlags,\n itemRenderer = ReflectionViewer,\n ...props\n}) => {\n const lookup = createLookup(reflection)\n\n return (\n <ReflectionViewer title=\"ContainerReflectionViewer\" sources reflection={reflection} lookup={lookup} {...props}>\n {reflection.groups?.map((group: ReflectionGroup) => {\n return (\n <ReflectionGroupViewer\n margin={1}\n lookup={lookup}\n renderer={itemRenderer}\n key={group.title}\n group={group}\n reflection={reflection}\n hiddenFlags={hiddenFlags}\n alignItems=\"stretch\"\n />\n )\n })}\n {children}\n </ReflectionViewer>\n )\n}\n","import type { DeclarationReflection, SignatureReflection } from 'typedoc'\n\nimport { ReflectionViewer } from './ReflectionViewer'\nimport { ReflectionViewerProps } from './ReflectionViewerProps'\n\nexport const DeclarationReflectionViewer: React.FC<ReflectionViewerProps<DeclarationReflection>> = ({ reflection, hiddenFlags, ...props }) => {\n const safeSignatures = (signatures?: SignatureReflection[] | SignatureReflection) => {\n return Array.isArray(signatures) ? signatures : signatures ? [signatures] : undefined\n }\n\n return (\n <ReflectionViewer\n nameViewer={reflection.signatures || reflection.getSignature || reflection.setSignature ? null : undefined}\n title=\"DeclarationReflectionViewer\"\n hiddenFlags={hiddenFlags}\n reflection={reflection}\n {...props}\n >\n {reflection.signatures?.map((signature) => {\n return <ReflectionViewer key={signature.id} hiddenFlags={hiddenFlags} reflection={signature} />\n })}\n {safeSignatures(reflection.getSignature)?.map((signature) => {\n return <ReflectionViewer marginX={1} key={signature.id} hiddenFlags={hiddenFlags} reflection={signature} />\n })}\n {safeSignatures(reflection.setSignature)?.map((signature) => {\n return <ReflectionViewer marginX={1} key={signature.id} hiddenFlags={hiddenFlags} reflection={signature} />\n })}\n </ReflectionViewer>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,mBAAyB;AACzB,IAAAC,6BAA4B;;;ACCrB,IAAM,eAAe,CAAkC,eAAoC;AAChG,QAAM,SAA4B,CAAC;AACnC,aAAW,UAAU,QAAQ,CAAC,SAAU,OAAO,KAAK,EAAE,IAAI,IAAqB;AAC/E,SAAO;AACT;;;ACNA,IAAAC,mBAA2B;AAC3B,IAAAC,wBAAiC;AACjC,IAAAC,gBAA0B;AAC1B,gCAA4B;;;ACH5B,sBAAkE;AAClE,0BAAwC;AACxC,mBAAyC;AAarC;AAVJ,IAAM,eAAW,mBAAK,MAAM;AAAA;AAAA,EAA0C;AAAiB,CAAC;AAOjF,IAAM,mBAAoD,CAAC,EAAE,eAAe,KAAK,OAAO,GAAG,MAAM,MAAM;AAC5G,QAAM,CAAC,MAAM,OAAO,QAAI,uBAAS,KAAK;AACtC,SACE,4EACE;AAAA,gDAAC,gCAAS,SAAS,MAAM,QAAQ,CAAC,IAAI,GAAI,GAAG,OAAO,kBAEpD;AAAA,IACA,6CAAC,0BAAO,MAA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AAgB,WAAW,eAAe,OAAO;AAAA,MACjG,OAAM;AAAA,MACN;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEH;AAAA,mBAAW,YAAY,IAAI,CAAC,cAAc;AACzC,iBAAO,6CAAC,oBAAoC,aAA0B,YAAY,aAApD,UAAU,EAAqD;AAAA,QAC/F,CAAC;AAAA,QACA,eAAe,WAAW,YAAY,GAAG,IAAI,CAAC,cAAc;AAC3D,iBAAO,6CAAC,oBAAiB,SAAS,GAAsB,aAA0B,YAAY,aAApD,UAAU,EAAqD;AAAA,QAC3G,CAAC;AAAA,QACA,eAAe,WAAW,YAAY,GAAG,IAAI,CAAC,cAAc;AAC3D,iBAAO,6CAAC,oBAAiB,SAAS,GAAsB,aAA0B,YAAY,aAApD,UAAU,EAAqD;AAAA,QAC3G,CAAC;AAAA;AAAA;AAAA,EACH;AAEJ;;;AjBRI,IAAAC,uBAAA;AAVG,IAAM,uCAA4F,CAAC;AAAA,EACxG;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,KAAK,QAAI,wCAAY;AAC7B,QAAM,YAAQ,2BAAS;AAEvB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAM;AAAA,MACN,OAAO,KAAK,UAAU,CAAC,MAAM,WAAW;AAAA,MACxC,SAAS,KAAK,UAAU,CAAC,MAAM,WAAW,OAAO,MAAM,QAAQ,WAAW,UAAU;AAAA,MACpF;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;","names":["import_material","import_react_router_dom_6","import_material","import_react_flexbox","import_react","import_react_flexbox","import_material","import_jsx_runtime","import_material","import_react_flexbox","import_material","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","hide","import_jsx_runtime","hide","hiddenFlags","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime"]}
@@ -1,6 +1,6 @@
1
1
  // src/ReflectionViewer/DeclarationContainer.tsx
2
2
  import { useTheme } from "@mui/material";
3
- import { useLocation as useLocation2 } from "react-router-dom";
3
+ import { useLocation as useLocation2 } from "react-router-dom-6";
4
4
 
5
5
  // src/createLookup.ts
6
6
  var createLookup = (reflection) => {
@@ -13,7 +13,7 @@ var createLookup = (reflection) => {
13
13
  import { Typography as Typography4 } from "@mui/material";
14
14
  import { FlexCol as FlexCol3, FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
15
15
  import { useEffect } from "react";
16
- import { useLocation } from "react-router-dom";
16
+ import { useLocation } from "react-router-dom-6";
17
17
 
18
18
  // src/JsonViewerButton.tsx
19
19
  import { Dialog, DialogActions, DialogContent, DialogTitle } from "@mui/material";