@xyo-network/react-typedoc 3.0.1 → 3.0.3

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 (93) hide show
  1. package/dist/browser/CommentViewer.d.ts +8 -0
  2. package/dist/browser/CommentViewer.d.ts.map +1 -0
  3. package/dist/browser/JsonViewerButton.d.ts +9 -0
  4. package/dist/browser/JsonViewerButton.d.ts.map +1 -0
  5. package/dist/browser/ProjectTwoPanelReflectionViewer.d.ts +5 -0
  6. package/dist/browser/ProjectTwoPanelReflectionViewer.d.ts.map +1 -0
  7. package/dist/browser/ReflectionLookup.d.ts +3 -0
  8. package/dist/browser/ReflectionLookup.d.ts.map +1 -0
  9. package/dist/browser/ReflectionViewer/Container.d.ts +8 -0
  10. package/dist/browser/ReflectionViewer/Container.d.ts.map +1 -0
  11. package/dist/browser/ReflectionViewer/Declaration.d.ts +5 -0
  12. package/dist/browser/ReflectionViewer/Declaration.d.ts.map +1 -0
  13. package/dist/browser/ReflectionViewer/DeclarationContainer.d.ts +8 -0
  14. package/dist/browser/ReflectionViewer/DeclarationContainer.d.ts.map +1 -0
  15. package/dist/browser/ReflectionViewer/NameViewer.d.ts +12 -0
  16. package/dist/browser/ReflectionViewer/NameViewer.d.ts.map +1 -0
  17. package/dist/browser/ReflectionViewer/Project.d.ts +5 -0
  18. package/dist/browser/ReflectionViewer/Project.d.ts.map +1 -0
  19. package/dist/browser/ReflectionViewer/ReflectionGroupViewer.d.ts +11 -0
  20. package/dist/browser/ReflectionViewer/ReflectionGroupViewer.d.ts.map +1 -0
  21. package/dist/browser/ReflectionViewer/ReflectionViewer.d.ts +4 -0
  22. package/dist/browser/ReflectionViewer/ReflectionViewer.d.ts.map +1 -0
  23. package/dist/browser/ReflectionViewer/ReflectionViewerProps.d.ts +15 -0
  24. package/dist/browser/ReflectionViewer/ReflectionViewerProps.d.ts.map +1 -0
  25. package/dist/browser/ReflectionViewer/SomeTypeViewer/SomeTypeViewer.d.ts +11 -0
  26. package/dist/browser/ReflectionViewer/SomeTypeViewer/SomeTypeViewer.d.ts.map +1 -0
  27. package/dist/browser/ReflectionViewer/SomeTypeViewer/TypeBuilder.d.ts +5 -0
  28. package/dist/browser/ReflectionViewer/SomeTypeViewer/TypeBuilder.d.ts.map +1 -0
  29. package/dist/browser/ReflectionViewer/SomeTypeViewer/buildArrayString.d.ts +5 -0
  30. package/dist/browser/ReflectionViewer/SomeTypeViewer/buildArrayString.d.ts.map +1 -0
  31. package/dist/browser/ReflectionViewer/SomeTypeViewer/buildIntersectionString.d.ts +5 -0
  32. package/dist/browser/ReflectionViewer/SomeTypeViewer/buildIntersectionString.d.ts.map +1 -0
  33. package/dist/browser/ReflectionViewer/SomeTypeViewer/buildReferenceString.d.ts +5 -0
  34. package/dist/browser/ReflectionViewer/SomeTypeViewer/buildReferenceString.d.ts.map +1 -0
  35. package/dist/browser/ReflectionViewer/SomeTypeViewer/buildReflectionString.d.ts +5 -0
  36. package/dist/browser/ReflectionViewer/SomeTypeViewer/buildReflectionString.d.ts.map +1 -0
  37. package/dist/browser/ReflectionViewer/SomeTypeViewer/buildTypeString.d.ts +3 -0
  38. package/dist/browser/ReflectionViewer/SomeTypeViewer/buildTypeString.d.ts.map +1 -0
  39. package/dist/browser/ReflectionViewer/SomeTypeViewer/buildUnionString.d.ts +5 -0
  40. package/dist/browser/ReflectionViewer/SomeTypeViewer/buildUnionString.d.ts.map +1 -0
  41. package/dist/browser/ReflectionViewer/SomeTypeViewer/index.d.ts +2 -0
  42. package/dist/browser/ReflectionViewer/SomeTypeViewer/index.d.ts.map +1 -0
  43. package/dist/browser/ReflectionViewer/index.d.ts +9 -0
  44. package/dist/browser/ReflectionViewer/index.d.ts.map +1 -0
  45. package/dist/browser/SomeReflection.d.ts +9 -0
  46. package/dist/browser/SomeReflection.d.ts.map +1 -0
  47. package/dist/browser/SourceViewer.d.ts +8 -0
  48. package/dist/browser/SourceViewer.d.ts.map +1 -0
  49. package/dist/browser/TreeViewer/Reflection.d.ts +13 -0
  50. package/dist/browser/TreeViewer/Reflection.d.ts.map +1 -0
  51. package/dist/browser/TreeViewer/ReflectionGroup.d.ts +4 -0
  52. package/dist/browser/TreeViewer/ReflectionGroup.d.ts.map +1 -0
  53. package/dist/browser/TreeViewer/index.d.ts +3 -0
  54. package/dist/browser/TreeViewer/index.d.ts.map +1 -0
  55. package/dist/browser/TwoPanelReflectionViewer.d.ts +4 -0
  56. package/dist/browser/TwoPanelReflectionViewer.d.ts.map +1 -0
  57. package/dist/browser/createLookup.d.ts +3 -0
  58. package/dist/browser/createLookup.d.ts.map +1 -0
  59. package/dist/browser/index.d.ts +10 -89
  60. package/dist/browser/index.d.ts.map +1 -0
  61. package/dist/browser/index.mjs.map +1 -1
  62. package/dist/browser/resolveChildren.d.ts +9 -0
  63. package/dist/browser/resolveChildren.d.ts.map +1 -0
  64. package/dist/browser/trimFlagLabel.d.ts +2 -0
  65. package/dist/browser/trimFlagLabel.d.ts.map +1 -0
  66. package/package.json +51 -48
  67. package/src/CommentViewer.tsx +2 -1
  68. package/src/JsonViewerButton.tsx +10 -4
  69. package/src/ProjectTwoPanelReflectionViewer.stories.tsx +2 -6
  70. package/src/ProjectTwoPanelReflectionViewer.tsx +2 -1
  71. package/src/ReflectionViewer/Container.tsx +1 -1
  72. package/src/ReflectionViewer/Declaration.tsx +4 -2
  73. package/src/ReflectionViewer/DeclarationContainer.tsx +2 -1
  74. package/src/ReflectionViewer/NameViewer.tsx +11 -5
  75. package/src/ReflectionViewer/Project.tsx +1 -1
  76. package/src/ReflectionViewer/ReflectionGroupViewer.tsx +7 -3
  77. package/src/ReflectionViewer/ReflectionViewer.tsx +5 -3
  78. package/src/ReflectionViewer/ReflectionViewerProps.tsx +4 -4
  79. package/src/ReflectionViewer/SomeTypeViewer/SomeTypeViewer.tsx +7 -4
  80. package/src/ReflectionViewer/SomeTypeViewer/TypeBuilder.ts +2 -2
  81. package/src/ReflectionViewer/SomeTypeViewer/buildArrayString.tsx +2 -2
  82. package/src/ReflectionViewer/SomeTypeViewer/buildIntersectionString.tsx +2 -2
  83. package/src/ReflectionViewer/SomeTypeViewer/buildReferenceString.ts +2 -2
  84. package/src/ReflectionViewer/SomeTypeViewer/buildReflectionString.tsx +1 -1
  85. package/src/ReflectionViewer/SomeTypeViewer/buildTypeString.tsx +3 -3
  86. package/src/ReflectionViewer/SomeTypeViewer/buildUnionString.tsx +2 -2
  87. package/src/SomeReflection.ts +3 -1
  88. package/src/SourceViewer.tsx +2 -1
  89. package/src/TreeViewer/Reflection.tsx +7 -4
  90. package/src/TreeViewer/ReflectionGroup.tsx +9 -2
  91. package/src/TwoPanelReflectionViewer.tsx +7 -5
  92. package/src/resolveChildren.ts +2 -2
  93. package/xy.config.ts +2 -4
@@ -1,9 +1,9 @@
1
- import { TypographyVariant } from '@mui/material'
2
- import { FlexBoxProps } from '@xylabs/react-flexbox'
3
- import { ReactElement } from 'react'
1
+ import type { TypographyVariant } from '@mui/material'
2
+ import type { FlexBoxProps } from '@xylabs/react-flexbox'
3
+ import type { ReactElement } from 'react'
4
4
  import type { Reflection } from 'typedoc'
5
5
 
6
- import { ReflectionLookup } from '../ReflectionLookup.ts'
6
+ import type { ReflectionLookup } from '../ReflectionLookup.ts'
7
7
 
8
8
  export type FlagFilter = 'isPublic' | 'isPrivate' | 'isProtected'
9
9
 
@@ -1,8 +1,9 @@
1
- import { Typography, TypographyProps } from '@mui/material'
1
+ import type { TypographyProps } from '@mui/material'
2
+ import { Typography } from '@mui/material'
2
3
  import React from 'react'
3
4
 
4
- import { SomeReflection } from '../../SomeReflection.ts'
5
- import { ReflectionViewerProps } from '../ReflectionViewerProps.tsx'
5
+ import type { SomeReflection } from '../../SomeReflection.ts'
6
+ import type { ReflectionViewerProps } from '../ReflectionViewerProps.tsx'
6
7
  import { buildTypeString } from './buildTypeString.tsx'
7
8
 
8
9
  export interface SomeTypeViewerProps extends TypographyProps {
@@ -11,7 +12,9 @@ export interface SomeTypeViewerProps extends TypographyProps {
11
12
  reflectionViewer: React.FC<ReflectionViewerProps>
12
13
  }
13
14
 
14
- export const SomeTypeViewer: React.FC<SomeTypeViewerProps> = ({ opacity = 0.5, reflection, reflectionViewer, ...props }) => {
15
+ export const SomeTypeViewer: React.FC<SomeTypeViewerProps> = ({
16
+ opacity = 0.5, reflection, reflectionViewer, ...props
17
+ }) => {
15
18
  const typeReactNode = reflection.type ? buildTypeString(reflection.type, reflectionViewer) : ''
16
19
  if (typeof typeReactNode === 'string') {
17
20
  return (
@@ -1,6 +1,6 @@
1
- import { ReactNode } from 'react'
1
+ import type { ReactNode } from 'react'
2
2
  import type { SomeType, Type } from 'typedoc'
3
3
 
4
- import { ReflectionViewerProps } from '../ReflectionViewerProps.tsx'
4
+ import type { ReflectionViewerProps } from '../ReflectionViewerProps.tsx'
5
5
 
6
6
  export type TypeBuilder = (type: SomeType | Type, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder?: TypeBuilder) => ReactNode
@@ -1,7 +1,7 @@
1
1
  import type { ArrayType } from 'typedoc'
2
2
 
3
- import { ReflectionViewerProps } from '../ReflectionViewerProps.tsx'
4
- import { TypeBuilder } from './TypeBuilder.ts'
3
+ import type { ReflectionViewerProps } from '../ReflectionViewerProps.tsx'
4
+ import type { TypeBuilder } from './TypeBuilder.ts'
5
5
 
6
6
  export const buildArrayString = (typeObj: ArrayType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {
7
7
  const parts: string[] = []
@@ -1,7 +1,7 @@
1
1
  import type { IntersectionType } from 'typedoc'
2
2
 
3
- import { ReflectionViewerProps } from '../ReflectionViewerProps.tsx'
4
- import { TypeBuilder } from './TypeBuilder.ts'
3
+ import type { ReflectionViewerProps } from '../ReflectionViewerProps.tsx'
4
+ import type { TypeBuilder } from './TypeBuilder.ts'
5
5
 
6
6
  export const buildIntersectionString = (typeObj: IntersectionType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {
7
7
  const parts: string[] = []
@@ -1,7 +1,7 @@
1
1
  import type { ReferenceType } from 'typedoc'
2
2
 
3
- import { ReflectionViewerProps } from '../ReflectionViewerProps.tsx'
4
- import { TypeBuilder } from './TypeBuilder.ts'
3
+ import type { ReflectionViewerProps } from '../ReflectionViewerProps.tsx'
4
+ import type { TypeBuilder } from './TypeBuilder.ts'
5
5
 
6
6
  export const buildReferenceString = (typeObj: ReferenceType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {
7
7
  const parts: string[] = []
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import type { ReflectionType } from 'typedoc'
3
3
 
4
- import { ReflectionViewerProps } from '../ReflectionViewerProps.tsx'
4
+ import type { ReflectionViewerProps } from '../ReflectionViewerProps.tsx'
5
5
 
6
6
  export const buildReflectionString = (typeObj: ReflectionType, reflectionViewer: React.FC<ReflectionViewerProps>) => {
7
7
  if (typeObj.declaration) {
@@ -1,13 +1,13 @@
1
- import { ReactNode } from 'react'
1
+ import type { ReactNode } from 'react'
2
2
  import type { SomeType, Type } from 'typedoc'
3
3
 
4
- import { ReflectionViewerProps } from '../ReflectionViewerProps.tsx'
4
+ import type { ReflectionViewerProps } from '../ReflectionViewerProps.tsx'
5
5
  import { buildArrayString } from './buildArrayString.tsx'
6
6
  import { buildIntersectionString } from './buildIntersectionString.tsx'
7
7
  import { buildReferenceString } from './buildReferenceString.ts'
8
8
  import { buildReflectionString } from './buildReflectionString.tsx'
9
9
  import { buildUnionString } from './buildUnionString.tsx'
10
- import { TypeBuilder } from './TypeBuilder.ts'
10
+ import type { TypeBuilder } from './TypeBuilder.ts'
11
11
 
12
12
  export const buildTypeString: TypeBuilder = (type: SomeType | Type, reflectionViewer: React.FC<ReflectionViewerProps>): ReactNode => {
13
13
  const someType = type as SomeType
@@ -1,7 +1,7 @@
1
1
  import type { UnionType } from 'typedoc'
2
2
 
3
- import { ReflectionViewerProps } from '../ReflectionViewerProps.tsx'
4
- import { TypeBuilder } from './TypeBuilder.ts'
3
+ import type { ReflectionViewerProps } from '../ReflectionViewerProps.tsx'
4
+ import type { TypeBuilder } from './TypeBuilder.ts'
5
5
 
6
6
  export const buildUnionString = (typeObj: UnionType, reflectionViewer: React.FC<ReflectionViewerProps>, typeBuilder: TypeBuilder) => {
7
7
  const parts: string[] = []
@@ -1,4 +1,6 @@
1
- import type { ParameterReflection, Reflection, SomeType } from 'typedoc'
1
+ import type {
2
+ ParameterReflection, Reflection, SomeType,
3
+ } from 'typedoc'
2
4
 
3
5
  export type WithSomeType<T> = T & { type?: SomeType }
4
6
 
@@ -1,5 +1,6 @@
1
1
  import { Typography } from '@mui/material'
2
- import { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'
2
+ import type { FlexBoxProps } from '@xylabs/react-flexbox'
3
+ import { FlexCol } from '@xylabs/react-flexbox'
3
4
  import React from 'react'
4
5
  import type { SourceReference } from 'typedoc'
5
6
 
@@ -1,13 +1,14 @@
1
1
  import { Add, Remove } from '@mui/icons-material'
2
2
  import { Typography } from '@mui/material'
3
3
  import { TreeItem, TreeView } from '@mui/x-tree-view'
4
- import { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'
4
+ import type { FlexBoxProps } from '@xylabs/react-flexbox'
5
+ import { FlexCol } from '@xylabs/react-flexbox'
5
6
  import React from 'react'
6
7
  import { useNavigate } from 'react-router-dom'
7
8
  import type { ContainerReflection, Reflection } from 'typedoc'
8
9
 
9
- import { ReflectionLookup } from '../ReflectionLookup.ts'
10
- import { FlagFilter } from '../ReflectionViewer/index.ts'
10
+ import type { ReflectionLookup } from '../ReflectionLookup.ts'
11
+ import type { FlagFilter } from '../ReflectionViewer/index.ts'
11
12
 
12
13
  export interface ReflectionTreeViewerProps<T extends Reflection = ContainerReflection> extends FlexBoxProps {
13
14
  hiddenFlags?: FlagFilter[]
@@ -16,7 +17,9 @@ export interface ReflectionTreeViewerProps<T extends Reflection = ContainerRefle
16
17
  searchTerm?: string
17
18
  }
18
19
 
19
- export const ReflectionTreeViewer: React.FC<ReflectionTreeViewerProps> = ({ lookup, reflection, searchTerm, ...props }) => {
20
+ export const ReflectionTreeViewer: React.FC<ReflectionTreeViewerProps> = ({
21
+ lookup, reflection, searchTerm, ...props
22
+ }) => {
20
23
  const navigate = useNavigate()
21
24
  return (
22
25
  <FlexCol alignItems="stretch" {...props}>
@@ -3,7 +3,8 @@ import { FlexCol, FlexRow } from '@xylabs/react-flexbox'
3
3
  import React from 'react'
4
4
 
5
5
  import { JsonViewerButton } from '../JsonViewerButton.tsx'
6
- import { ReflectionGroupViewerProps, ReflectionViewer } from '../ReflectionViewer/index.ts'
6
+ import type { ReflectionGroupViewerProps } from '../ReflectionViewer/index.ts'
7
+ import { ReflectionViewer } from '../ReflectionViewer/index.ts'
7
8
  import { resolveChildren } from '../resolveChildren.ts'
8
9
 
9
10
  export const ReflectionGroupTreeViewer: React.FC<ReflectionGroupViewerProps> = ({
@@ -23,7 +24,13 @@ export const ReflectionGroupTreeViewer: React.FC<ReflectionGroupViewerProps> = (
23
24
  {resolveChildren(group, lookup).map((reflection) => {
24
25
  return reflection
25
26
  // I wrap this in a div since React does not understand that they have keys using the Renderer
26
- ? <div key={reflection.id}>{renderer({ lookup, margin: 1, reflection })}</div>
27
+ ? (
28
+ <div key={reflection.id}>
29
+ {renderer({
30
+ lookup, margin: 1, reflection,
31
+ })}
32
+ </div>
33
+ )
27
34
  : null
28
35
  })}
29
36
  {children}
@@ -1,11 +1,15 @@
1
1
  import { Search } from '@mui/icons-material'
2
2
  import { TextField, useTheme } from '@mui/material'
3
- import { FlexBoxProps, FlexCol, FlexGrowCol, FlexRow } from '@xylabs/react-flexbox'
3
+ import type { FlexBoxProps } from '@xylabs/react-flexbox'
4
+ import {
5
+ FlexCol, FlexGrowCol, FlexRow,
6
+ } from '@xylabs/react-flexbox'
4
7
  import React, { useMemo, useState } from 'react'
5
8
  import type { ReflectionGroup } from 'typedoc'
6
9
 
7
10
  import { createLookup } from './createLookup.ts'
8
- import { ContainerReflectionViewerProps, ReflectionGroupViewer, ReflectionViewer } from './ReflectionViewer/index.ts'
11
+ import type { ContainerReflectionViewerProps } from './ReflectionViewer/index.ts'
12
+ import { ReflectionGroupViewer, ReflectionViewer } from './ReflectionViewer/index.ts'
9
13
  import { ReflectionTreeViewer } from './TreeViewer/index.ts'
10
14
 
11
15
  export const TwoPanelReflectionViewer: React.FC<ContainerReflectionViewerProps> = ({
@@ -45,9 +49,7 @@ export const TwoPanelReflectionViewer: React.FC<ContainerReflectionViewerProps>
45
49
  <FlexCol {...props}>
46
50
  <TextField
47
51
  fullWidth
48
- InputProps={{
49
- startAdornment: <Search />,
50
- }}
52
+ InputProps={{ startAdornment: <Search /> }}
51
53
  onChange={onSearchTermChange}
52
54
  />
53
55
  <FlexGrowCol marginTop={1} alignItems="stretch">
@@ -1,7 +1,7 @@
1
1
  import type { Reflection } from 'typedoc'
2
2
 
3
- import { ReflectionLookup } from './ReflectionLookup.ts'
4
- import { SomeReflection } from './SomeReflection.ts'
3
+ import type { ReflectionLookup } from './ReflectionLookup.ts'
4
+ import type { SomeReflection } from './SomeReflection.ts'
5
5
 
6
6
  type ReflectionWithChildren = { children: Reflection[] }
7
7
 
package/xy.config.ts CHANGED
@@ -1,9 +1,7 @@
1
- import { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
1
+ import type { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
2
2
  const config: XyTsupConfig = {
3
3
  compile: {
4
- browser: {
5
- src: true,
6
- },
4
+ browser: { src: true },
7
5
  node: {},
8
6
  neutral: {},
9
7
  },