@xyd-js/atlas 0.1.0-xyd.15 → 0.1.0-xyd.18

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 (79) hide show
  1. package/.storybook/index.css +1 -2
  2. package/.storybook/preview.ts +1 -2
  3. package/CHANGELOG.md +31 -0
  4. package/dist/Update-BlhP2VFR-COLbZvRj.js +4 -0
  5. package/dist/Update-BlhP2VFR-COLbZvRj.js.map +1 -0
  6. package/dist/Update-CMM38Snc-COLbZvRj.js +4 -0
  7. package/dist/Update-CMM38Snc-COLbZvRj.js.map +1 -0
  8. package/dist/Update-D5e_yqty-COLbZvRj.js +4 -0
  9. package/dist/Update-D5e_yqty-COLbZvRj.js.map +1 -0
  10. package/dist/index.css +47 -58
  11. package/dist/index.d.ts +30 -11
  12. package/dist/index.js +1 -1
  13. package/dist/index.js.map +1 -1
  14. package/dist/styles.css +89 -0
  15. package/dist/tokens.css +5 -2
  16. package/dist/xydPlugin.d.ts +5 -0
  17. package/dist/xydPlugin.js +2 -0
  18. package/dist/xydPlugin.js.map +1 -0
  19. package/index.ts +2 -1
  20. package/package.json +13 -9
  21. package/packages/xyd-plugin/SidebarItem.tsx +27 -0
  22. package/packages/xyd-plugin/index.ts +19 -0
  23. package/rollup.config.js +27 -25
  24. package/src/components/ApiRef/ApiRefItem/ApiRefItem.styles.tsx +60 -17
  25. package/src/components/ApiRef/ApiRefItem/ApiRefItem.tsx +508 -49
  26. package/src/components/ApiRef/ApiRefProperties/ApiRefProperties.styles.tsx +73 -16
  27. package/src/components/ApiRef/ApiRefProperties/ApiRefProperties.tsx +574 -56
  28. package/src/components/ApiRef/ApiRefSamples/ApiRefSamples.styles.tsx +2 -1
  29. package/src/components/ApiRef/ApiRefSamples/ApiRefSamples.tsx +37 -19
  30. package/src/components/Atlas/Atlas.styles.tsx +1 -1
  31. package/src/components/Atlas/Atlas.tsx +35 -19
  32. package/src/components/Atlas/AtlasContext.tsx +47 -0
  33. package/src/components/Atlas/AtlasDecorator.styles.ts +22 -0
  34. package/src/components/Atlas/AtlasDecorator.tsx +15 -0
  35. package/src/components/Atlas/AtlasLazy/AtlasLazy.tsx +2 -2
  36. package/src/components/Atlas/AtlasPrimary.tsx +21 -0
  37. package/src/components/Atlas/AtlasSecondary.tsx +148 -0
  38. package/src/components/Atlas/index.ts +6 -2
  39. package/src/components/Atlas/types.ts +11 -0
  40. package/src/components/Code/CodeSampleButtons/CodeSampleButtons.styles.tsx +4 -5
  41. package/src/components/Code/CodeSampleButtons/CodeSampleButtons.tsx +6 -8
  42. package/src/components/Code/index.ts +0 -4
  43. package/src/components/Icon/index.tsx +384 -0
  44. package/src/styles/styles.css +89 -0
  45. package/src/styles/tokens.css +5 -2
  46. package/src/utils/mdx.ts +0 -29
  47. package/tsconfig.json +6 -2
  48. package/types.d.ts +22 -0
  49. package/dist/CodeSample-B9VUhTKF-DJ2leksk.js +0 -2
  50. package/dist/CodeSample-B9VUhTKF-DJ2leksk.js.map +0 -1
  51. package/dist/CodeSample-BSXeFy0x-DJ2leksk.js +0 -2
  52. package/dist/CodeSample-BSXeFy0x-DJ2leksk.js.map +0 -1
  53. package/dist/CodeSample-BwP208sQ-DJ2leksk.js +0 -2
  54. package/dist/CodeSample-BwP208sQ-DJ2leksk.js.map +0 -1
  55. package/dist/CodeSample-CK-CQYrV-DJ2leksk.js +0 -2
  56. package/dist/CodeSample-CK-CQYrV-DJ2leksk.js.map +0 -1
  57. package/dist/CodeSample-CUemtj_W-DJ2leksk.js +0 -2
  58. package/dist/CodeSample-CUemtj_W-DJ2leksk.js.map +0 -1
  59. package/dist/CodeSample-D0iKih-A-DJ2leksk.js +0 -2
  60. package/dist/CodeSample-D0iKih-A-DJ2leksk.js.map +0 -1
  61. package/dist/CodeSample-D33vTa6M-DJ2leksk.js +0 -2
  62. package/dist/CodeSample-D33vTa6M-DJ2leksk.js.map +0 -1
  63. package/dist/CodeSample-DUSx2KBt-DJ2leksk.js +0 -2
  64. package/dist/CodeSample-DUSx2KBt-DJ2leksk.js.map +0 -1
  65. package/dist/CodeSample-P4yxkHPW-DJ2leksk.js +0 -2
  66. package/dist/CodeSample-P4yxkHPW-DJ2leksk.js.map +0 -1
  67. package/dist/atlas-index.d.ts +0 -15
  68. package/dist/atlas-index.js +0 -2
  69. package/dist/atlas-index.js.map +0 -1
  70. package/packages/atlas-index/AtlasIndex.tsx +0 -79
  71. package/packages/atlas-index/index.ts +0 -3
  72. package/src/components/Code/CodeCopy/CodeCopy.styles.tsx +0 -17
  73. package/src/components/Code/CodeCopy/CodeCopy.tsx +0 -30
  74. package/src/components/Code/CodeCopy/index.ts +0 -7
  75. package/src/components/Code/CodeSample/CodeSample.styles.tsx +0 -131
  76. package/src/components/Code/CodeSample/CodeSample.tsx +0 -143
  77. package/src/components/Code/CodeSample/index.ts +0 -8
  78. package/src/components/Code/CodeSample/withLocalStored.tsx +0 -52
  79. package/src/components/Code/default-theme.ts +0 -266
@@ -1,8 +1,9 @@
1
1
  import {css} from "@linaria/core";
2
2
 
3
3
  export const ApiRefSamplesContainerHost = css`
4
+ height: fit-content;
4
5
  position: sticky;
5
- top: 6rem;
6
+ top: 12px;
6
7
  display: flex;
7
8
  gap: 32px;
8
9
  flex-direction: column;
@@ -1,45 +1,63 @@
1
- import {Example, ExampleRoot} from "@xyd-js/uniform";
2
- import React, {useState} from "react";
1
+ import React, {useState, useMemo} from "react";
3
2
 
4
- import {MDXReference} from "@/utils/mdx"
5
- import {CodeExampleButtons, CodeSample} from "@/components/Code";
6
- import type {MDXCodeSampleBlock} from "@/components/Code/CodeSample/CodeSample";
3
+ import {ExampleRoot} from "@xyd-js/uniform";
4
+ import {CodeSample, type CodeThemeBlockProps} from "@xyd-js/components/coder";
5
+
6
+ import {CodeExampleButtons} from "@/components/Code";
7
+ import {useSyntaxHighlight} from "@/components/Atlas/AtlasContext";
7
8
 
8
9
  import * as cn from "./ApiRefSamples.styles";
9
10
 
10
11
  export interface ApiRefSamplesProps {
11
- examples: MDXReference<ExampleRoot>
12
+ examples: ExampleRoot
12
13
  }
13
14
 
14
15
  export function ApiRefSamples({examples}: ApiRefSamplesProps) {
15
- return <div className={cn.ApiRefSamplesContainerHost}>
16
+ const syntaxHighlight = useSyntaxHighlight()
17
+ const [activeExampleIndices, setActiveExampleIndices] = useState<Record<number, number>>({})
18
+
19
+ const handleExampleChange = (groupIndex: number, exampleIndex: number) => {
20
+ setActiveExampleIndices(prev => ({
21
+ ...prev,
22
+ [groupIndex]: exampleIndex
23
+ }))
24
+ }
25
+
26
+ return <atlas-apiref-samples className={cn.ApiRefSamplesContainerHost}>
16
27
  {
17
- examples.groups?.map(({description, examples}, i) => {
18
- const [activeExample, setActiveExample] = useState<MDXReference<Example> | null>(examples?.[0])
28
+ examples.groups?.map(({description, examples: example}, i) => {
29
+ const activeExampleIndex = activeExampleIndices[i] || 0
30
+ const activeExample = example[activeExampleIndex]
19
31
 
20
- const codeblocks = activeExample?.codeblock?.tabs?.map(tab => {
21
- return tab.code as unknown as MDXCodeSampleBlock // TODO: because atlas use mdx uniform reference - we need to unify it !!!
22
- })
32
+ const codeblocks = activeExample?.codeblock?.tabs?.map(tab => ({
33
+ value: String(tab.code || ""),
34
+ lang: String(tab.language || ""),
35
+ meta: String(tab.context || ""),
36
+ highlighted: tab.highlighted
37
+ } as CodeThemeBlockProps)) || []
23
38
 
24
39
  return <div key={i} className={cn.ApiRefSamplesGroupHost}>
25
40
  {
26
- examples?.length > 1
41
+ example?.length > 1
27
42
  ? <CodeExampleButtons
28
43
  activeExample={activeExample}
29
- examples={examples}
30
- onClick={(example) => {
31
- setActiveExample(example)
44
+ examples={example}
45
+ onClick={(ex) => {
46
+ const index = example.findIndex(e => e === ex)
47
+ handleExampleChange(i, index)
32
48
  }}
33
49
  />
34
50
  : null
35
51
  }
36
52
  <CodeSample
37
53
  name={String(i)}
38
- description={description?.title || ""}
39
- codeblocks={codeblocks || []}
54
+ description={description || ""}
55
+ codeblocks={codeblocks}
56
+ theme={syntaxHighlight || undefined}
57
+ // controlByMeta
40
58
  />
41
59
  </div>
42
60
  })
43
61
  }
44
- </div>
62
+ </atlas-apiref-samples>
45
63
  }
@@ -2,4 +2,4 @@ import {css} from "@linaria/core";
2
2
 
3
3
  export const AtlasHost = css`
4
4
  width: 100%;
5
- `;
5
+ `;
@@ -1,27 +1,43 @@
1
1
  import React from "react";
2
2
 
3
- import {Reference} from "@xyd-js/uniform";
3
+ import { MDXCommonAtlasProps } from "./types";
4
+ import { AtlasDecorator } from "./AtlasDecorator";
5
+ import { AtlasPrimary } from "./AtlasPrimary";
6
+ import { AtlasSecondary } from "./AtlasSecondary";
4
7
 
5
- import {MDXReference} from "@/utils/mdx";
6
- import {ApiRefItem} from "@/components/ApiRef";
8
+ import * as cn from "./Atlas.styles";
7
9
 
8
- import * as cn from "@/components/Atlas/Atlas.styles";
9
-
10
- export interface AtlasProps {
11
- references: MDXReference<Reference[]> | []
10
+ interface AtlasProps<T> extends MDXCommonAtlasProps<T> {
11
+ kind: "secondary" | "primary" | undefined | null
12
12
  }
13
13
 
14
- export function Atlas(props: AtlasProps) {
15
- return <div className={cn.AtlasHost}>
16
- {
17
- props.references?.map((reference, i) => <div key={i}>
18
- <ApiRefItem
19
- reference={{
20
- ...reference
21
- }}
22
- />
23
- </div>
24
- )
14
+ export function Atlas<T>(props: AtlasProps<T>) {
15
+ let AtlasComponent: React.FC<MDXCommonAtlasProps<T>>;
16
+
17
+ if (props.kind === "secondary") {
18
+ AtlasComponent = AtlasSecondary;
19
+ } else {
20
+ AtlasComponent = AtlasPrimary;
21
+ }
22
+
23
+ let references = props.references
24
+ {
25
+ // TODO: find better solution - if we pass from md then its string
26
+ if (references && typeof references === "string") { // TODO: DO IT BETTER
27
+ try {
28
+ references = JSON.parse(references)
29
+ } catch (error) {
30
+ console.error("Error parsing references", error)
31
+ }
25
32
  }
26
- </div>
33
+ }
34
+
35
+ return <AtlasDecorator>
36
+ <div className={cn.AtlasHost}>
37
+ <AtlasComponent
38
+ references={references}
39
+ apiRefItemKind={props.apiRefItemKind}
40
+ />
41
+ </div>
42
+ </AtlasDecorator>
27
43
  }
@@ -0,0 +1,47 @@
1
+ import { createContext, useContext } from "react";
2
+
3
+ import { type Theme } from "@code-hike/lighter";
4
+
5
+ export interface VariantToggleConfig {
6
+ key: string;
7
+ defaultValue: string;
8
+ }
9
+
10
+ export const AtlasContext = createContext<{
11
+ syntaxHighlight: Theme | null,
12
+ baseMatch?: string,
13
+ variantToggles?: VariantToggleConfig[], // Array of toggle configurations
14
+ Link?: any
15
+ }>({
16
+ syntaxHighlight: null
17
+ })
18
+
19
+ export function useSyntaxHighlight() {
20
+ const context = useContext(AtlasContext)
21
+
22
+ if (!context) {
23
+ throw new Error("useSyntaxHighlight must be used within a AtlasContext")
24
+ }
25
+
26
+ return context.syntaxHighlight
27
+ }
28
+
29
+ export function useBaseMatch() {
30
+ const context = useContext(AtlasContext)
31
+
32
+ if (!context) {
33
+ throw new Error("useBaseMatch must be used within a AtlasContext")
34
+ }
35
+
36
+ return context.baseMatch
37
+ }
38
+
39
+ export function useVariantToggles() {
40
+ const context = useContext(AtlasContext)
41
+
42
+ if (!context) {
43
+ throw new Error("useVariantToggles must be used within a AtlasContext")
44
+ }
45
+
46
+ return context.variantToggles || []
47
+ }
@@ -0,0 +1,22 @@
1
+ import { css } from "@linaria/core";
2
+
3
+ export default {
4
+ AtlasDecoratorHost: css`
5
+ @layer templates {
6
+ atlas-apiref-proptype {
7
+ font-size: var(--xyd-font-size-xsmall);
8
+ line-height: var(--xyd-line-height-xsmall);
9
+ }
10
+
11
+ atlas-apiref-item-showcase {
12
+ font-size: var(--xyd-font-size-small);
13
+ line-height: var(--xyd-line-height-medium);
14
+
15
+ p {
16
+ font-size: var(--xyd-font-size-small);
17
+ line-height: var(--xyd-line-height-medium);
18
+ }
19
+ }
20
+ }
21
+ `
22
+ }
@@ -0,0 +1,15 @@
1
+ import React from 'react'
2
+
3
+ import cn from "./AtlasDecorator.styles";
4
+
5
+ interface AtlasDecoratorProps {
6
+ children: React.ReactNode
7
+ }
8
+
9
+ export function AtlasDecorator({ children }: AtlasDecoratorProps) {
10
+ return <atlas-decorator
11
+ className={cn.AtlasDecoratorHost}
12
+ >
13
+ {children}
14
+ </atlas-decorator>
15
+ }
@@ -2,12 +2,12 @@ import React, {useEffect, useRef} from "react";
2
2
 
3
3
  import {Reference} from "@xyd-js/uniform";
4
4
 
5
- import {MDXReference} from "@/utils/mdx";
6
5
  import {ApiRefItem} from "@/components/ApiRef";
6
+
7
7
  import * as cn from "./AtlasLazy.styles";
8
8
 
9
9
  export interface AtlasLazyProps {
10
- references: MDXReference<Reference>[]
10
+ references: Reference[]
11
11
  urlPrefix: string
12
12
  slug: string,
13
13
  onLoaded?: () => void
@@ -0,0 +1,21 @@
1
+ import React, {} from "react";
2
+
3
+ import {ApiRefItem} from "@/components/ApiRef";
4
+
5
+ import {MDXCommonAtlasProps} from "./types";
6
+
7
+ export function AtlasPrimary<T>(props: MDXCommonAtlasProps<T>) {
8
+ return <>
9
+ {
10
+ props.references?.map((reference, i) =>
11
+ <ApiRefItem
12
+ key={i}
13
+ reference={{
14
+ ...reference
15
+ }}
16
+ kind={props.apiRefItemKind || undefined}
17
+ />
18
+ )
19
+ }
20
+ </>
21
+ }
@@ -0,0 +1,148 @@
1
+ import * as React from "react"
2
+
3
+ import {type Theme} from "@code-hike/lighter";
4
+
5
+ import {
6
+ Heading,
7
+ Table,
8
+ Details,
9
+ Code,
10
+ } from "@xyd-js/components/writer";
11
+ import {CodeSample} from "@xyd-js/components/coder";
12
+
13
+ import {MDXCommonAtlasProps} from "@/components/Atlas/types";
14
+ import {useSyntaxHighlight} from "./AtlasContext";
15
+ import {IconQuote} from "@/components/Icon";
16
+
17
+ // TODO: interface should be imported from somewhere
18
+ interface CodeSourceContext {
19
+ fileName: string;
20
+ fileFullPath: string;
21
+ sourcecode: string;
22
+ }
23
+
24
+ const MAX_REFERENCES = 2;
25
+
26
+ interface ReferenceItemProps {
27
+ reference: any;
28
+ index: number;
29
+ syntaxHighlight: Theme | null;
30
+ }
31
+
32
+
33
+ export function AtlasSecondary<T>({references}: MDXCommonAtlasProps<T>) {
34
+ const syntaxHighlight = useSyntaxHighlight()
35
+
36
+ if (!references) return null;
37
+
38
+ const initialReferences = references.slice(0, MAX_REFERENCES);
39
+ const remainingReferences = references.slice(MAX_REFERENCES);
40
+
41
+ const showMoreText = remainingReferences.length > 0 ?
42
+ `Show more (${remainingReferences.length}) reference${remainingReferences.length === 1 ? '' : 's'}` :
43
+ '';
44
+
45
+ return (
46
+ <>
47
+ {initialReferences.map((reference, i) => (
48
+ <$ReferenceItem
49
+ key={i}
50
+ reference={reference}
51
+ index={i}
52
+ syntaxHighlight={syntaxHighlight}
53
+ />
54
+ ))}
55
+
56
+ {remainingReferences.length > 0 && (
57
+ <Details
58
+ label={showMoreText}
59
+ >
60
+ {remainingReferences.map((reference, i) => (
61
+ <$ReferenceItem
62
+ key={i + MAX_REFERENCES}
63
+ reference={reference}
64
+ index={i + MAX_REFERENCES}
65
+ syntaxHighlight={syntaxHighlight}
66
+ />
67
+ ))}
68
+ </Details>
69
+ )}
70
+ </>
71
+ )
72
+ }
73
+
74
+ function $ReferenceItem({reference, index, syntaxHighlight}: ReferenceItemProps) {
75
+ return (
76
+ <React.Fragment key={index}>
77
+ <Heading size={3}>
78
+ {reference.title}
79
+ </Heading>
80
+
81
+ {/*<p>*/}
82
+ {/* {uniformChild(reference.description)}*/}
83
+ {/*</p>*/}
84
+
85
+ {
86
+ reference.context?.fileName && <Details
87
+ label=""
88
+ kind="tertiary"
89
+ title={<>
90
+ Source code in <Code>{reference.context.fileFullPath}</Code>
91
+ </>}
92
+ icon={<IconQuote/>}>
93
+ <CodeSample
94
+ name={reference.context.fileName}
95
+ description={reference.context.sourcecode.description}
96
+ theme={syntaxHighlight || undefined}
97
+ codeblocks={[
98
+ {
99
+ lang: reference.context.sourcecode.lang,
100
+ meta: "",
101
+ value: reference.context.sourcecode.code
102
+ }
103
+ ]}
104
+ />
105
+ {/* {parseChild(reference.context.sourcecode)} */}
106
+ </Details>
107
+ }
108
+
109
+ {
110
+ reference.definitions.map((definition: any, index: number) => {
111
+ return (
112
+ <React.Fragment key={index}>
113
+ <Heading size={4}>
114
+ {definition.title}
115
+ </Heading>
116
+ <Table>
117
+ <Table.Head>
118
+ <Table.Tr>
119
+ <Table.Th>Name</Table.Th>
120
+ <Table.Th>Type</Table.Th>
121
+ <Table.Th>Description</Table.Th>
122
+ </Table.Tr>
123
+ </Table.Head>
124
+ <Table.Body>
125
+ {definition.properties?.map((property: any, propIndex: number) => (
126
+ <Table.Tr key={propIndex}>
127
+ <Table.Td>
128
+ <Code>{property.name}</Code>
129
+ </Table.Td>
130
+ <Table.Td>
131
+ <Code>{property.type}</Code>
132
+ </Table.Td>
133
+ <Table.Td muted>
134
+ {property.description}
135
+ </Table.Td>
136
+ </Table.Tr>
137
+ ))}
138
+ </Table.Body>
139
+ </Table>
140
+ </React.Fragment>
141
+ )
142
+ })
143
+ }
144
+
145
+ <br/>
146
+ </React.Fragment>
147
+ )
148
+ }
@@ -1,3 +1,7 @@
1
- export * from "./Atlas"
1
+ export { AtlasLazy } from "./AtlasLazy"
2
2
 
3
- export * from "./AtlasLazy"
3
+ export { Atlas } from "./Atlas"
4
+
5
+ export { AtlasContext, type VariantToggleConfig } from "./AtlasContext"
6
+
7
+ export type { AtlasProps } from "./types"
@@ -0,0 +1,11 @@
1
+ import type { Reference } from "@xyd-js/uniform";
2
+
3
+ // TODO unify MDXCommonAtlasProps and AtlasProps
4
+ export interface MDXCommonAtlasProps<T> {
5
+ references: Reference<T>[] | []
6
+ apiRefItemKind?: "secondary"
7
+ }
8
+
9
+ export interface AtlasProps {
10
+ references: Reference<any>[]
11
+ }
@@ -6,7 +6,8 @@ export const CodeSampleButtonsHost = css`
6
6
  `;
7
7
 
8
8
  export const CodeSampleButtonsContainer = css`
9
- display: flex;
9
+ display: inline-flex;
10
+ width: 100%;
10
11
  align-items: center;
11
12
  border-radius: 8px;
12
13
  background-color: var(--XydAtlas-Component-Code-SampleButtons__color-containerBackground);
@@ -26,6 +27,7 @@ export const CodeSampleButtonsArrowIcon = css`
26
27
  export const CodeSampleButtonsScrollerHost = css`
27
28
  overflow-x: auto;
28
29
  flex-grow: 1;
30
+ font-weight: var(--xyd-font-weight-semibold);
29
31
  `;
30
32
 
31
33
  export const CodeSampleButtonsScrollerContainer = css`
@@ -36,11 +38,8 @@ export const CodeSampleButtonsScrollerContainer = css`
36
38
  `;
37
39
 
38
40
  export const CodeSampleButtonsButtonHost = css`
39
- padding: 0.5rem 1rem;
41
+ padding: 4px 16px;
40
42
  border-radius: 0.375rem;
41
- font-size: 0.875rem;
42
- line-height: 1.25rem;
43
- font-weight: 500;
44
43
  white-space: nowrap;
45
44
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
46
45
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
@@ -3,14 +3,12 @@ import {ChevronLeft, ChevronRight} from "lucide-react"
3
3
 
4
4
  import {Example} from "@xyd-js/uniform";
5
5
 
6
- import {MDXReference, mdxValue} from "@/utils/mdx";
7
-
8
6
  import * as cn from "./CodeSampleButtons.styles";
9
7
 
10
8
  export interface CodeExampleButtonsProps {
11
- examples: MDXReference<Example[]>
12
- activeExample: MDXReference<Example> | null
13
- onClick: (example: MDXReference<Example>) => void
9
+ examples: Example[]
10
+ activeExample: Example | null
11
+ onClick: (example: Example) => void
14
12
  }
15
13
 
16
14
  export function CodeExampleButtons({examples, activeExample, onClick}: CodeExampleButtonsProps) {
@@ -63,7 +61,7 @@ export function CodeExampleButtons({examples, activeExample, onClick}: CodeExamp
63
61
  example={example}
64
62
  activeExample={activeExample}
65
63
  >
66
- {mdxValue(example.codeblock.title || null)}
64
+ {(example.codeblock.title || null)}
67
65
  </SampleButton>
68
66
  ))}
69
67
  </div>
@@ -84,8 +82,8 @@ export function CodeExampleButtons({examples, activeExample, onClick}: CodeExamp
84
82
  function SampleButton({onClick, children, activeExample, example}: {
85
83
  onClick: () => void,
86
84
  children: React.ReactNode,
87
- example: MDXReference<Example>,
88
- activeExample: MDXReference<Example> | null,
85
+ example: Example,
86
+ activeExample: Example | null,
89
87
  }) {
90
88
  const markExampleAsActive = (activeExample?.description && activeExample?.description === example?.description) ||
91
89
  (activeExample?.codeblock?.title && activeExample?.codeblock?.title === example.codeblock.title)
@@ -1,6 +1,2 @@
1
- export * from "./CodeCopy";
2
-
3
- export * from "./CodeSample";
4
-
5
1
  export * from "./CodeSampleButtons";
6
2