@stainless-api/docs-ui 0.1.0-beta.25 → 0.1.0-beta.26
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.
- package/dist/breadcrumbs-D5viAm7a.d.ts +20 -0
- package/dist/chunk-Bp6m_JJh.js +13 -0
- package/dist/component-generics-BnrVqdQj.d.ts +29 -0
- package/dist/component-generics-Df4EDvxk.js +41 -0
- package/dist/components/breadcrumbs.d.ts +2 -0
- package/dist/components/breadcrumbs.js +16 -0
- package/dist/components/chat.d.ts +14 -0
- package/dist/components/chat.js +128 -0
- package/dist/components/dropdown.d.ts +2 -0
- package/dist/components/dropdown.js +4 -0
- package/dist/components/icons.d.ts +50 -0
- package/dist/components/icons.js +3 -0
- package/dist/components/index.d.ts +12 -0
- package/dist/components/index.js +16 -0
- package/dist/components/method.d.ts +2 -0
- package/dist/components/method.js +16 -0
- package/dist/components/overview.d.ts +2 -0
- package/dist/components/overview.js +16 -0
- package/dist/components/primitives.d.ts +2 -0
- package/dist/components/primitives.js +16 -0
- package/dist/components/properties.d.ts +2 -0
- package/dist/components/properties.js +16 -0
- package/dist/components/scripts/dropdown.d.ts +12 -0
- package/dist/components/scripts/dropdown.js +50 -0
- package/dist/components/sdk.d.ts +3 -0
- package/dist/components/sdk.js +16 -0
- package/dist/components/sidebar.d.ts +2 -0
- package/dist/components/sidebar.js +16 -0
- package/dist/components/snippets.d.ts +4 -0
- package/dist/components/snippets.js +16 -0
- package/dist/contexts/component-generics.d.ts +2 -0
- package/dist/contexts/component-generics.js +3 -0
- package/dist/contexts/component-types.d.ts +18 -0
- package/dist/contexts/component-types.js +1 -0
- package/dist/contexts/component.d.ts +30 -0
- package/dist/contexts/component.js +16 -0
- package/dist/contexts/docs.d.ts +2 -0
- package/dist/contexts/docs.js +3 -0
- package/dist/contexts/index.d.ts +20 -0
- package/dist/contexts/index.js +16 -0
- package/dist/contexts/markdown.d.ts +2 -0
- package/dist/contexts/markdown.js +4 -0
- package/dist/contexts/navigation.d.ts +3 -0
- package/dist/contexts/navigation.js +3 -0
- package/dist/contexts/search.d.ts +4 -0
- package/dist/contexts/search.js +16 -0
- package/dist/contexts/use-components.d.ts +16 -0
- package/dist/contexts/use-components.js +4 -0
- package/dist/contexts-DO0sMzym.js +2581 -0
- package/dist/docs-Cj25B-Sh.js +50 -0
- package/dist/docs-DhNaW0DE.d.ts +45 -0
- package/dist/dropdown-Dv9VAYCW.d.ts +42 -0
- package/dist/dropdown-kUhwBigR.js +38 -0
- package/dist/icons--8QR-PrL.js +222 -0
- package/dist/index-BW6OPqAo.d.ts +16 -0
- package/dist/index-BXO3gZup.d.ts +239 -0
- package/dist/index-d8_VR8Z5.d.ts +14 -0
- package/dist/index.d.ts +22 -0
- package/dist/languages/go.d.ts +13 -0
- package/dist/languages/go.js +16 -0
- package/dist/languages/http.d.ts +13 -0
- package/dist/languages/http.js +16 -0
- package/dist/languages/index.d.ts +13 -0
- package/dist/languages/index.js +16 -0
- package/dist/languages/java.d.ts +13 -0
- package/dist/languages/java.js +16 -0
- package/dist/languages/python.d.ts +13 -0
- package/dist/languages/python.js +16 -0
- package/dist/languages/ruby.d.ts +13 -0
- package/dist/languages/ruby.js +16 -0
- package/dist/languages/typescript.d.ts +13 -0
- package/dist/languages/typescript.js +16 -0
- package/dist/markdown/index.d.ts +12 -0
- package/dist/markdown/index.js +16 -0
- package/dist/markdown/md.d.ts +15 -0
- package/dist/markdown/md.js +3 -0
- package/dist/markdown/utils.d.ts +4 -0
- package/dist/markdown/utils.js +3 -0
- package/dist/markdown-DN8KaRR2.d.ts +21 -0
- package/dist/markdown-DunIdqFE.js +39 -0
- package/dist/md-Dg8aOyMA.js +41 -0
- package/dist/method-c3XDArUn.d.ts +70 -0
- package/dist/navigation-BSn6PX-7.d.ts +28 -0
- package/dist/navigation-CuCg3le8.js +20 -0
- package/dist/overview-D21weqVJ.d.ts +39 -0
- package/dist/pagefind-ChrPfuVv.js +15 -0
- package/dist/primitives-iB9fIrMF.d.ts +98 -0
- package/dist/properties-Ba6F_GGj.d.ts +46 -0
- package/dist/routing-BE6Vrs-z.d.ts +54 -0
- package/dist/routing-C8oZYLsf.js +189 -0
- package/dist/routing.d.ts +2 -0
- package/dist/sdk-D2x2l6JH.d.ts +118 -0
- package/dist/search/index.d.ts +26 -0
- package/dist/search/index.js +211 -0
- package/dist/search/providers/algolia.d.ts +24 -0
- package/dist/search/providers/algolia.js +16 -0
- package/dist/search/providers/fuse.d.ts +18 -0
- package/dist/search/providers/fuse.js +31 -0
- package/dist/search/providers/pagefind.d.ts +7 -0
- package/dist/search/providers/pagefind.js +3 -0
- package/dist/search/providers/walker.d.ts +9 -0
- package/dist/search/providers/walker.js +35 -0
- package/dist/search/types.d.ts +3 -0
- package/dist/search/types.js +3 -0
- package/dist/search-KMqOU2tz.d.ts +20 -0
- package/dist/sidebar-B1X4gmY2.d.ts +35 -0
- package/dist/snippets-BApdMOXp.d.ts +45 -0
- package/dist/style-BWu-Pqcm.d.ts +182 -0
- package/dist/style-CkbsakoF.js +183 -0
- package/dist/style.d.ts +2 -0
- package/dist/style.js +3 -0
- package/dist/types-BLgvxY4i.d.ts +83 -0
- package/dist/types-DFN4M1Sp.js +34 -0
- package/dist/use-components-DI-AbT-D.js +7 -0
- package/dist/utils-B9JL_XWH.d.ts +21 -0
- package/dist/utils-BhYTrLot.js +32 -0
- package/dist/utils-ByZH9QWT.js +30 -0
- package/dist/utils-DlayebL1.d.ts +14 -0
- package/dist/utils.d.ts +2 -0
- package/dist/utils.js +4 -0
- package/package.json +2 -2
- package/src/search/mcp.ts +1 -1
- package/dist/mcp.js +0 -15967
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { i as PropertyProps } from "./properties-Ba6F_GGj.js";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import React, { ReactNode } from "react";
|
|
4
|
+
import { DeclarationNode, GoAST, HttpAST, JavaAST, PythonAST, RubyAST, TSAST, Type } from "@stainless/sdk-json";
|
|
5
|
+
|
|
6
|
+
//#region src/languages/typescript.d.ts
|
|
7
|
+
declare namespace typescript_d_exports {
|
|
8
|
+
export { Declaration$5 as Declaration, DeclarationProps$5 as DeclarationProps, MethodSignature$5 as MethodSignature, MethodSignatureProps$5 as MethodSignatureProps, Property$5 as Property, PropertyProps$6 as PropertyProps, Type$6 as Type, TypeName$5 as TypeName };
|
|
9
|
+
}
|
|
10
|
+
type TypeProps$5 = {
|
|
11
|
+
type: TSAST.TSType;
|
|
12
|
+
};
|
|
13
|
+
declare function TypeName$5({
|
|
14
|
+
type
|
|
15
|
+
}: TypeProps$5): string | React$1.JSX.Element;
|
|
16
|
+
declare function Type$6({
|
|
17
|
+
type
|
|
18
|
+
}: TypeProps$5): React$1.JSX.Element;
|
|
19
|
+
type MethodSignatureProps$5 = {
|
|
20
|
+
decl: TSAST.TSDeclFunction;
|
|
21
|
+
};
|
|
22
|
+
declare function MethodSignature$5({
|
|
23
|
+
decl
|
|
24
|
+
}: MethodSignatureProps$5): React$1.JSX.Element;
|
|
25
|
+
type PropertyProps$6 = {
|
|
26
|
+
decl: TSAST.TSDeclaration;
|
|
27
|
+
children: PropertyFn;
|
|
28
|
+
};
|
|
29
|
+
declare function Property$5({
|
|
30
|
+
decl,
|
|
31
|
+
children
|
|
32
|
+
}: PropertyProps$6): React$1.ReactNode;
|
|
33
|
+
type DeclarationProps$5 = {
|
|
34
|
+
decl: TSAST.TSDeclaration;
|
|
35
|
+
};
|
|
36
|
+
declare function Declaration$5({
|
|
37
|
+
decl
|
|
38
|
+
}: DeclarationProps$5): React$1.JSX.Element | undefined;
|
|
39
|
+
declare namespace java_d_exports {
|
|
40
|
+
export { Declaration$4 as Declaration, DeclarationProps$4 as DeclarationProps, MethodSignature$4 as MethodSignature, MethodSignatureProps$4 as MethodSignatureProps, Property$4 as Property, PropertyProps$5 as PropertyProps, Type$5 as Type, TypeName$4 as TypeName };
|
|
41
|
+
}
|
|
42
|
+
type TypeProps$4 = {
|
|
43
|
+
type: JavaAST.JavaType;
|
|
44
|
+
optional?: boolean;
|
|
45
|
+
};
|
|
46
|
+
declare function TypeName$4({
|
|
47
|
+
type,
|
|
48
|
+
optional
|
|
49
|
+
}: TypeProps$4): React$1.JSX.Element | "List";
|
|
50
|
+
declare function Type$5({
|
|
51
|
+
type,
|
|
52
|
+
optional
|
|
53
|
+
}: TypeProps$4): React$1.JSX.Element;
|
|
54
|
+
type MethodSignatureProps$4 = {
|
|
55
|
+
decl: JavaAST.JavaDeclFunction;
|
|
56
|
+
};
|
|
57
|
+
declare function MethodSignature$4({
|
|
58
|
+
decl
|
|
59
|
+
}: MethodSignatureProps$4): React$1.JSX.Element;
|
|
60
|
+
type PropertyProps$5 = {
|
|
61
|
+
decl: JavaAST.JavaDeclaration;
|
|
62
|
+
children: PropertyFn;
|
|
63
|
+
};
|
|
64
|
+
declare function Property$4({
|
|
65
|
+
decl,
|
|
66
|
+
children
|
|
67
|
+
}: PropertyProps$5): React$1.ReactNode;
|
|
68
|
+
type DeclarationProps$4 = {
|
|
69
|
+
decl: JavaAST.JavaDeclaration;
|
|
70
|
+
};
|
|
71
|
+
declare function Declaration$4({
|
|
72
|
+
decl
|
|
73
|
+
}: DeclarationProps$4): React$1.JSX.Element | null | undefined;
|
|
74
|
+
declare namespace go_d_exports {
|
|
75
|
+
export { Declaration$3 as Declaration, DeclarationProps$3 as DeclarationProps, MethodSignature$3 as MethodSignature, MethodSignatureProps$3 as MethodSignatureProps, Property$3 as Property, PropertyProps$4 as PropertyProps, Type$4 as Type, TypeName$3 as TypeName, TypeProps$3 as TypeProps };
|
|
76
|
+
}
|
|
77
|
+
type TypeProps$3 = {
|
|
78
|
+
type: GoAST.GoType;
|
|
79
|
+
};
|
|
80
|
+
declare function TypeName$3({
|
|
81
|
+
type
|
|
82
|
+
}: TypeProps$3): string | React$1.JSX.Element;
|
|
83
|
+
declare function Type$4({
|
|
84
|
+
type
|
|
85
|
+
}: TypeProps$3): React$1.JSX.Element;
|
|
86
|
+
type MethodSignatureProps$3 = {
|
|
87
|
+
decl: GoAST.GoDeclFunction;
|
|
88
|
+
};
|
|
89
|
+
declare function MethodSignature$3({
|
|
90
|
+
decl
|
|
91
|
+
}: MethodSignatureProps$3): React$1.JSX.Element;
|
|
92
|
+
type PropertyProps$4 = {
|
|
93
|
+
decl: GoAST.GoDeclaration;
|
|
94
|
+
children: PropertyFn;
|
|
95
|
+
};
|
|
96
|
+
declare function Property$3({
|
|
97
|
+
decl,
|
|
98
|
+
children
|
|
99
|
+
}: PropertyProps$4): React$1.ReactNode;
|
|
100
|
+
type DeclarationProps$3 = {
|
|
101
|
+
decl: GoAST.GoDeclaration;
|
|
102
|
+
};
|
|
103
|
+
declare function Declaration$3({
|
|
104
|
+
decl
|
|
105
|
+
}: DeclarationProps$3): React$1.JSX.Element | undefined;
|
|
106
|
+
declare namespace python_d_exports {
|
|
107
|
+
export { Declaration$2 as Declaration, DeclarationProps$2 as DeclarationProps, MethodSignature$2 as MethodSignature, MethodSignatureProps$2 as MethodSignatureProps, Property$2 as Property, PropertyProps$3 as PropertyProps, Type$3 as Type, TypeName$2 as TypeName };
|
|
108
|
+
}
|
|
109
|
+
type TypeProps$2 = {
|
|
110
|
+
type: PythonAST.PythonType;
|
|
111
|
+
};
|
|
112
|
+
declare function TypeName$2({
|
|
113
|
+
type
|
|
114
|
+
}: TypeProps$2): string | React$1.JSX.Element;
|
|
115
|
+
declare function Type$3({
|
|
116
|
+
type
|
|
117
|
+
}: TypeProps$2): React$1.JSX.Element;
|
|
118
|
+
type MethodSignatureProps$2 = {
|
|
119
|
+
decl: PythonAST.PythonDeclFunction;
|
|
120
|
+
};
|
|
121
|
+
declare function MethodSignature$2({
|
|
122
|
+
decl
|
|
123
|
+
}: MethodSignatureProps$2): React$1.JSX.Element;
|
|
124
|
+
type PropertyProps$3 = {
|
|
125
|
+
decl: PythonAST.PythonDeclaration;
|
|
126
|
+
children: PropertyFn;
|
|
127
|
+
};
|
|
128
|
+
declare function Property$2({
|
|
129
|
+
decl,
|
|
130
|
+
children
|
|
131
|
+
}: PropertyProps$3): React$1.ReactNode;
|
|
132
|
+
type DeclarationProps$2 = {
|
|
133
|
+
decl: PythonAST.PythonDeclaration;
|
|
134
|
+
};
|
|
135
|
+
declare function Declaration$2({
|
|
136
|
+
decl
|
|
137
|
+
}: DeclarationProps$2): React$1.JSX.Element | undefined;
|
|
138
|
+
declare namespace ruby_d_exports {
|
|
139
|
+
export { Declaration$1 as Declaration, DeclarationProps$1 as DeclarationProps, MethodSignature$1 as MethodSignature, MethodSignatureProps$1 as MethodSignatureProps, Property$1 as Property, PropertyProps$2 as PropertyProps, Type$2 as Type, TypeName$1 as TypeName };
|
|
140
|
+
}
|
|
141
|
+
type TypeProps$1 = {
|
|
142
|
+
type: RubyAST.RubyType;
|
|
143
|
+
};
|
|
144
|
+
declare function TypeName$1({
|
|
145
|
+
type
|
|
146
|
+
}: TypeProps$1): string | React$1.JSX.Element;
|
|
147
|
+
declare function Type$2({
|
|
148
|
+
type
|
|
149
|
+
}: TypeProps$1): React$1.JSX.Element;
|
|
150
|
+
type MethodSignatureProps$1 = {
|
|
151
|
+
decl: RubyAST.RubyDeclFunction;
|
|
152
|
+
};
|
|
153
|
+
declare function MethodSignature$1({
|
|
154
|
+
decl
|
|
155
|
+
}: MethodSignatureProps$1): React$1.JSX.Element;
|
|
156
|
+
type PropertyProps$2 = {
|
|
157
|
+
decl: RubyAST.RubyDeclaration;
|
|
158
|
+
children: PropertyFn;
|
|
159
|
+
};
|
|
160
|
+
declare function Property$1({
|
|
161
|
+
decl,
|
|
162
|
+
children
|
|
163
|
+
}: PropertyProps$2): React$1.ReactNode;
|
|
164
|
+
type DeclarationProps$1 = {
|
|
165
|
+
decl: RubyAST.RubyDeclaration;
|
|
166
|
+
};
|
|
167
|
+
declare function Declaration$1({
|
|
168
|
+
decl
|
|
169
|
+
}: DeclarationProps$1): React$1.JSX.Element | undefined;
|
|
170
|
+
declare namespace http_d_exports {
|
|
171
|
+
export { Declaration, DeclarationProps, MethodInfo, MethodSignature, MethodSignatureProps, Property, PropertyProps$1 as PropertyProps, Type$1 as Type, TypeName };
|
|
172
|
+
}
|
|
173
|
+
type TypeProps = {
|
|
174
|
+
type: HttpAST.HttpType;
|
|
175
|
+
};
|
|
176
|
+
declare function TypeName({
|
|
177
|
+
type
|
|
178
|
+
}: TypeProps): string | React.JSX.Element;
|
|
179
|
+
declare function Type$1({
|
|
180
|
+
type
|
|
181
|
+
}: TypeProps): React.JSX.Element | undefined;
|
|
182
|
+
type MethodSignatureProps = {
|
|
183
|
+
decl: HttpAST.HttpDeclFunction;
|
|
184
|
+
};
|
|
185
|
+
declare function MethodSignature({
|
|
186
|
+
decl
|
|
187
|
+
}: MethodSignatureProps): null;
|
|
188
|
+
declare function MethodInfo({
|
|
189
|
+
decl,
|
|
190
|
+
children
|
|
191
|
+
}: MethodSignatureProps & {
|
|
192
|
+
children: React.ReactNode;
|
|
193
|
+
}): React.JSX.Element;
|
|
194
|
+
type PropertyProps$1 = {
|
|
195
|
+
decl: HttpAST.HttpDeclaration;
|
|
196
|
+
children: PropertyFn;
|
|
197
|
+
};
|
|
198
|
+
declare function Property({
|
|
199
|
+
decl,
|
|
200
|
+
children
|
|
201
|
+
}: PropertyProps$1): React.ReactNode;
|
|
202
|
+
type DeclarationProps = {
|
|
203
|
+
decl: HttpAST.HttpDeclaration;
|
|
204
|
+
};
|
|
205
|
+
declare function Declaration({
|
|
206
|
+
decl
|
|
207
|
+
}: DeclarationProps): React.JSX.Element | undefined;
|
|
208
|
+
declare namespace index_d_exports {
|
|
209
|
+
export { LanguageComponentDefinition, PropertyFn, go_d_exports as go, http_d_exports as http, java_d_exports as java, kotlin, node, python_d_exports as python, ruby_d_exports as ruby, typescript_d_exports as typescript };
|
|
210
|
+
}
|
|
211
|
+
declare const node: typeof typescript_d_exports;
|
|
212
|
+
declare const kotlin: typeof java_d_exports;
|
|
213
|
+
type PropertyFn = (params: PropertyProps) => ReactNode;
|
|
214
|
+
interface LanguageComponentDefinition {
|
|
215
|
+
Declaration(props: {
|
|
216
|
+
decl: DeclarationNode;
|
|
217
|
+
}): ReactNode;
|
|
218
|
+
Property(props: {
|
|
219
|
+
decl: DeclarationNode;
|
|
220
|
+
children: PropertyFn;
|
|
221
|
+
}): ReactNode;
|
|
222
|
+
TypeName(props: {
|
|
223
|
+
type: Type;
|
|
224
|
+
optional?: boolean;
|
|
225
|
+
}): ReactNode;
|
|
226
|
+
Type(props: {
|
|
227
|
+
type: Type;
|
|
228
|
+
optional?: boolean;
|
|
229
|
+
}): ReactNode;
|
|
230
|
+
MethodSignature(props: {
|
|
231
|
+
decl: DeclarationNode;
|
|
232
|
+
}): ReactNode;
|
|
233
|
+
MethodInfo?(props: {
|
|
234
|
+
decl: DeclarationNode;
|
|
235
|
+
children?: ReactNode;
|
|
236
|
+
}): ReactNode;
|
|
237
|
+
}
|
|
238
|
+
//#endregion
|
|
239
|
+
export { Declaration$5 as $, PropertyProps$3 as A, Type$4 as B, TypeName$1 as C, MethodSignature$2 as D, DeclarationProps$2 as E, DeclarationProps$3 as F, DeclarationProps$4 as G, TypeProps$3 as H, MethodSignature$3 as I, Property$4 as J, MethodSignature$4 as K, MethodSignatureProps$3 as L, TypeName$2 as M, python_d_exports as N, MethodSignatureProps$2 as O, Declaration$3 as P, java_d_exports as Q, Property$3 as R, Type$2 as S, Declaration$2 as T, go_d_exports as U, TypeName$3 as V, Declaration$4 as W, Type$5 as X, PropertyProps$5 as Y, TypeName$4 as Z, DeclarationProps$1 as _, node as a, Type$6 as at, Property$1 as b, MethodInfo as c, Property as d, DeclarationProps$5 as et, PropertyProps$1 as f, Declaration$1 as g, http_d_exports as h, kotlin as i, PropertyProps$6 as it, Type$3 as j, Property$2 as k, MethodSignature as l, TypeName as m, PropertyFn as n, MethodSignatureProps$5 as nt, Declaration as o, TypeName$5 as ot, Type$1 as p, MethodSignatureProps$4 as q, index_d_exports as r, Property$5 as rt, DeclarationProps as s, typescript_d_exports as st, LanguageComponentDefinition as t, MethodSignature$5 as tt, MethodSignatureProps as u, MethodSignature$1 as v, ruby_d_exports as w, PropertyProps$2 as x, MethodSignatureProps$1 as y, PropertyProps$4 as z };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { a as useComponents, i as useComponentContext, n as ComponentsContextType, r as customizeComponents, t as ComponentProvider } from "./component-generics-BnrVqdQj.js";
|
|
2
|
+
import { t as LanguageComponentDefinition } from "./index-BXO3gZup.js";
|
|
3
|
+
import { a as PropertySettingsType, c as useDocs, d as useSettings, f as useSnippet, i as DocsProviderProps, l as useLanguage, n as DocsContextType, o as useContentPanelLayout, p as useSpec, r as DocsProvider, s as useDeclaration, t as ContentPanelLayout, u as useResource } from "./docs-DhNaW0DE.js";
|
|
4
|
+
import { a as useNavigation, i as NavigationProviderProps, n as NavigationHandler, r as NavigationProvider, t as NavigationContextType } from "./navigation-BSn6PX-7.js";
|
|
5
|
+
import { a as useMarkdownContext, i as useHighlight, n as MarkdownProvider, o as useRenderMarkdown, r as MarkdownProviderProps, t as MarkdownContext } from "./markdown-DN8KaRR2.js";
|
|
6
|
+
import { a as useSearchContext, i as useSearch, n as SearchProvider, r as SearchProviderProps, t as SearchContextType } from "./search-KMqOU2tz.js";
|
|
7
|
+
|
|
8
|
+
//#region src/contexts/index.d.ts
|
|
9
|
+
declare namespace index_d_exports {
|
|
10
|
+
export { ComponentProvider, ComponentsContextType, ContentPanelLayout, DocsContextType, DocsProvider, DocsProviderProps, MarkdownContext, MarkdownProvider, MarkdownProviderProps, NavigationContextType, NavigationHandler, NavigationProvider, NavigationProviderProps, PropertySettingsType, SearchContextType, SearchProvider, SearchProviderProps, customizeComponents, useComponentContext, useComponents, useContentPanelLayout, useDeclaration, useDocs, useHighlight, useLanguage, useLanguageComponents, useMarkdownContext, useNavigation, useRenderMarkdown, useResource, useSearch, useSearchContext, useSettings, useSnippet, useSpec };
|
|
11
|
+
}
|
|
12
|
+
declare function useLanguageComponents(): LanguageComponentDefinition;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { useLanguageComponents as n, index_d_exports as t };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "./breadcrumbs-D5viAm7a.js";
|
|
2
|
+
import "./dropdown-Dv9VAYCW.js";
|
|
3
|
+
import "./method-c3XDArUn.js";
|
|
4
|
+
import "./primitives-iB9fIrMF.js";
|
|
5
|
+
import "./properties-Ba6F_GGj.js";
|
|
6
|
+
import { _ as routing_d_exports } from "./routing-BE6Vrs-z.js";
|
|
7
|
+
import "./sdk-D2x2l6JH.js";
|
|
8
|
+
import "./snippets-BApdMOXp.js";
|
|
9
|
+
import "./overview-D21weqVJ.js";
|
|
10
|
+
import "./sidebar-B1X4gmY2.js";
|
|
11
|
+
import { t as index_d_exports } from "./index-BW6OPqAo.js";
|
|
12
|
+
import "./component-generics-BnrVqdQj.js";
|
|
13
|
+
import { r as index_d_exports$2 } from "./index-BXO3gZup.js";
|
|
14
|
+
import "./docs-DhNaW0DE.js";
|
|
15
|
+
import "./navigation-BSn6PX-7.js";
|
|
16
|
+
import "./markdown-DN8KaRR2.js";
|
|
17
|
+
import "./types-BLgvxY4i.js";
|
|
18
|
+
import "./search-KMqOU2tz.js";
|
|
19
|
+
import { t as index_d_exports$1 } from "./index-d8_VR8Z5.js";
|
|
20
|
+
import { i as utils_d_exports } from "./utils-DlayebL1.js";
|
|
21
|
+
import { t as _default } from "./style-BWu-Pqcm.js";
|
|
22
|
+
export { index_d_exports as components, index_d_exports$1 as contexts, index_d_exports$2 as languages, routing_d_exports as routing, _default as style, utils_d_exports as utils };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "../breadcrumbs-D5viAm7a.js";
|
|
2
|
+
import "../dropdown-Dv9VAYCW.js";
|
|
3
|
+
import "../method-c3XDArUn.js";
|
|
4
|
+
import "../primitives-iB9fIrMF.js";
|
|
5
|
+
import "../properties-Ba6F_GGj.js";
|
|
6
|
+
import "../routing-BE6Vrs-z.js";
|
|
7
|
+
import "../sdk-D2x2l6JH.js";
|
|
8
|
+
import "../snippets-BApdMOXp.js";
|
|
9
|
+
import "../overview-D21weqVJ.js";
|
|
10
|
+
import "../sidebar-B1X4gmY2.js";
|
|
11
|
+
import "../index-BW6OPqAo.js";
|
|
12
|
+
import { B as Type, F as DeclarationProps, H as TypeProps, I as MethodSignature, L as MethodSignatureProps, P as Declaration, R as Property, V as TypeName, z as PropertyProps } from "../index-BXO3gZup.js";
|
|
13
|
+
export { Declaration, DeclarationProps, MethodSignature, MethodSignatureProps, Property, PropertyProps, Type, TypeName, TypeProps };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "../docs-Cj25B-Sh.js";
|
|
2
|
+
import "../component-generics-Df4EDvxk.js";
|
|
3
|
+
import "../navigation-CuCg3le8.js";
|
|
4
|
+
import "../markdown-DunIdqFE.js";
|
|
5
|
+
import "../routing-C8oZYLsf.js";
|
|
6
|
+
import "../style-CkbsakoF.js";
|
|
7
|
+
import "../use-components-DI-AbT-D.js";
|
|
8
|
+
import { B as Type, L as Declaration, R as MethodSignature, V as TypeName, z as Property } from "../contexts-DO0sMzym.js";
|
|
9
|
+
import "../icons--8QR-PrL.js";
|
|
10
|
+
import "../utils-BhYTrLot.js";
|
|
11
|
+
import "../dropdown-kUhwBigR.js";
|
|
12
|
+
import "../md-Dg8aOyMA.js";
|
|
13
|
+
import "../utils-ByZH9QWT.js";
|
|
14
|
+
import "../types-DFN4M1Sp.js";
|
|
15
|
+
|
|
16
|
+
export { Declaration, MethodSignature, Property, Type, TypeName };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "../breadcrumbs-D5viAm7a.js";
|
|
2
|
+
import "../dropdown-Dv9VAYCW.js";
|
|
3
|
+
import "../method-c3XDArUn.js";
|
|
4
|
+
import "../primitives-iB9fIrMF.js";
|
|
5
|
+
import "../properties-Ba6F_GGj.js";
|
|
6
|
+
import "../routing-BE6Vrs-z.js";
|
|
7
|
+
import "../sdk-D2x2l6JH.js";
|
|
8
|
+
import "../snippets-BApdMOXp.js";
|
|
9
|
+
import "../overview-D21weqVJ.js";
|
|
10
|
+
import "../sidebar-B1X4gmY2.js";
|
|
11
|
+
import "../index-BW6OPqAo.js";
|
|
12
|
+
import { c as MethodInfo, d as Property, f as PropertyProps, l as MethodSignature, m as TypeName, o as Declaration, p as Type, s as DeclarationProps, u as MethodSignatureProps } from "../index-BXO3gZup.js";
|
|
13
|
+
export { Declaration, DeclarationProps, MethodInfo, MethodSignature, MethodSignatureProps, Property, PropertyProps, Type, TypeName };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "../docs-Cj25B-Sh.js";
|
|
2
|
+
import "../component-generics-Df4EDvxk.js";
|
|
3
|
+
import "../navigation-CuCg3le8.js";
|
|
4
|
+
import "../markdown-DunIdqFE.js";
|
|
5
|
+
import "../routing-C8oZYLsf.js";
|
|
6
|
+
import "../style-CkbsakoF.js";
|
|
7
|
+
import "../use-components-DI-AbT-D.js";
|
|
8
|
+
import { C as TypeName, S as Type, b as MethodSignature, v as Declaration, x as Property, y as MethodInfo } from "../contexts-DO0sMzym.js";
|
|
9
|
+
import "../icons--8QR-PrL.js";
|
|
10
|
+
import "../utils-BhYTrLot.js";
|
|
11
|
+
import "../dropdown-kUhwBigR.js";
|
|
12
|
+
import "../md-Dg8aOyMA.js";
|
|
13
|
+
import "../utils-ByZH9QWT.js";
|
|
14
|
+
import "../types-DFN4M1Sp.js";
|
|
15
|
+
|
|
16
|
+
export { Declaration, MethodInfo, MethodSignature, Property, Type, TypeName };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "../breadcrumbs-D5viAm7a.js";
|
|
2
|
+
import "../dropdown-Dv9VAYCW.js";
|
|
3
|
+
import "../method-c3XDArUn.js";
|
|
4
|
+
import "../primitives-iB9fIrMF.js";
|
|
5
|
+
import "../properties-Ba6F_GGj.js";
|
|
6
|
+
import "../routing-BE6Vrs-z.js";
|
|
7
|
+
import "../sdk-D2x2l6JH.js";
|
|
8
|
+
import "../snippets-BApdMOXp.js";
|
|
9
|
+
import "../overview-D21weqVJ.js";
|
|
10
|
+
import "../sidebar-B1X4gmY2.js";
|
|
11
|
+
import "../index-BW6OPqAo.js";
|
|
12
|
+
import { N as python_d_exports, Q as java_d_exports, U as go_d_exports, a as node, h as http_d_exports, i as kotlin, n as PropertyFn, st as typescript_d_exports, t as LanguageComponentDefinition, w as ruby_d_exports } from "../index-BXO3gZup.js";
|
|
13
|
+
export { LanguageComponentDefinition, PropertyFn, go_d_exports as go, http_d_exports as http, java_d_exports as java, kotlin, node, python_d_exports as python, ruby_d_exports as ruby, typescript_d_exports as typescript };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "../docs-Cj25B-Sh.js";
|
|
2
|
+
import "../component-generics-Df4EDvxk.js";
|
|
3
|
+
import "../navigation-CuCg3le8.js";
|
|
4
|
+
import "../markdown-DunIdqFE.js";
|
|
5
|
+
import "../routing-C8oZYLsf.js";
|
|
6
|
+
import "../style-CkbsakoF.js";
|
|
7
|
+
import "../use-components-DI-AbT-D.js";
|
|
8
|
+
import { A as ruby_exports, H as go_exports, I as python_exports, J as java_exports, _ as node, et as typescript_exports, h as kotlin, w as http_exports } from "../contexts-DO0sMzym.js";
|
|
9
|
+
import "../icons--8QR-PrL.js";
|
|
10
|
+
import "../utils-BhYTrLot.js";
|
|
11
|
+
import "../dropdown-kUhwBigR.js";
|
|
12
|
+
import "../md-Dg8aOyMA.js";
|
|
13
|
+
import "../utils-ByZH9QWT.js";
|
|
14
|
+
import "../types-DFN4M1Sp.js";
|
|
15
|
+
|
|
16
|
+
export { go_exports as go, http_exports as http, java_exports as java, kotlin, node, python_exports as python, ruby_exports as ruby, typescript_exports as typescript };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "../breadcrumbs-D5viAm7a.js";
|
|
2
|
+
import "../dropdown-Dv9VAYCW.js";
|
|
3
|
+
import "../method-c3XDArUn.js";
|
|
4
|
+
import "../primitives-iB9fIrMF.js";
|
|
5
|
+
import "../properties-Ba6F_GGj.js";
|
|
6
|
+
import "../routing-BE6Vrs-z.js";
|
|
7
|
+
import "../sdk-D2x2l6JH.js";
|
|
8
|
+
import "../snippets-BApdMOXp.js";
|
|
9
|
+
import "../overview-D21weqVJ.js";
|
|
10
|
+
import "../sidebar-B1X4gmY2.js";
|
|
11
|
+
import "../index-BW6OPqAo.js";
|
|
12
|
+
import { G as DeclarationProps, J as Property, K as MethodSignature, W as Declaration, X as Type, Y as PropertyProps, Z as TypeName, q as MethodSignatureProps } from "../index-BXO3gZup.js";
|
|
13
|
+
export { Declaration, DeclarationProps, MethodSignature, MethodSignatureProps, Property, PropertyProps, Type, TypeName };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "../docs-Cj25B-Sh.js";
|
|
2
|
+
import "../component-generics-Df4EDvxk.js";
|
|
3
|
+
import "../navigation-CuCg3le8.js";
|
|
4
|
+
import "../markdown-DunIdqFE.js";
|
|
5
|
+
import "../routing-C8oZYLsf.js";
|
|
6
|
+
import "../style-CkbsakoF.js";
|
|
7
|
+
import "../use-components-DI-AbT-D.js";
|
|
8
|
+
import { G as Property, K as Type, U as Declaration, W as MethodSignature, q as TypeName } from "../contexts-DO0sMzym.js";
|
|
9
|
+
import "../icons--8QR-PrL.js";
|
|
10
|
+
import "../utils-BhYTrLot.js";
|
|
11
|
+
import "../dropdown-kUhwBigR.js";
|
|
12
|
+
import "../md-Dg8aOyMA.js";
|
|
13
|
+
import "../utils-ByZH9QWT.js";
|
|
14
|
+
import "../types-DFN4M1Sp.js";
|
|
15
|
+
|
|
16
|
+
export { Declaration, MethodSignature, Property, Type, TypeName };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "../breadcrumbs-D5viAm7a.js";
|
|
2
|
+
import "../dropdown-Dv9VAYCW.js";
|
|
3
|
+
import "../method-c3XDArUn.js";
|
|
4
|
+
import "../primitives-iB9fIrMF.js";
|
|
5
|
+
import "../properties-Ba6F_GGj.js";
|
|
6
|
+
import "../routing-BE6Vrs-z.js";
|
|
7
|
+
import "../sdk-D2x2l6JH.js";
|
|
8
|
+
import "../snippets-BApdMOXp.js";
|
|
9
|
+
import "../overview-D21weqVJ.js";
|
|
10
|
+
import "../sidebar-B1X4gmY2.js";
|
|
11
|
+
import "../index-BW6OPqAo.js";
|
|
12
|
+
import { A as PropertyProps, D as MethodSignature, E as DeclarationProps, M as TypeName, O as MethodSignatureProps, T as Declaration, j as Type, k as Property } from "../index-BXO3gZup.js";
|
|
13
|
+
export { Declaration, DeclarationProps, MethodSignature, MethodSignatureProps, Property, PropertyProps, Type, TypeName };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "../docs-Cj25B-Sh.js";
|
|
2
|
+
import "../component-generics-Df4EDvxk.js";
|
|
3
|
+
import "../navigation-CuCg3le8.js";
|
|
4
|
+
import "../markdown-DunIdqFE.js";
|
|
5
|
+
import "../routing-C8oZYLsf.js";
|
|
6
|
+
import "../style-CkbsakoF.js";
|
|
7
|
+
import "../use-components-DI-AbT-D.js";
|
|
8
|
+
import { F as TypeName, M as MethodSignature, N as Property, P as Type, j as Declaration } from "../contexts-DO0sMzym.js";
|
|
9
|
+
import "../icons--8QR-PrL.js";
|
|
10
|
+
import "../utils-BhYTrLot.js";
|
|
11
|
+
import "../dropdown-kUhwBigR.js";
|
|
12
|
+
import "../md-Dg8aOyMA.js";
|
|
13
|
+
import "../utils-ByZH9QWT.js";
|
|
14
|
+
import "../types-DFN4M1Sp.js";
|
|
15
|
+
|
|
16
|
+
export { Declaration, MethodSignature, Property, Type, TypeName };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "../breadcrumbs-D5viAm7a.js";
|
|
2
|
+
import "../dropdown-Dv9VAYCW.js";
|
|
3
|
+
import "../method-c3XDArUn.js";
|
|
4
|
+
import "../primitives-iB9fIrMF.js";
|
|
5
|
+
import "../properties-Ba6F_GGj.js";
|
|
6
|
+
import "../routing-BE6Vrs-z.js";
|
|
7
|
+
import "../sdk-D2x2l6JH.js";
|
|
8
|
+
import "../snippets-BApdMOXp.js";
|
|
9
|
+
import "../overview-D21weqVJ.js";
|
|
10
|
+
import "../sidebar-B1X4gmY2.js";
|
|
11
|
+
import "../index-BW6OPqAo.js";
|
|
12
|
+
import { C as TypeName, S as Type, _ as DeclarationProps, b as Property, g as Declaration, v as MethodSignature, x as PropertyProps, y as MethodSignatureProps } from "../index-BXO3gZup.js";
|
|
13
|
+
export { Declaration, DeclarationProps, MethodSignature, MethodSignatureProps, Property, PropertyProps, Type, TypeName };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "../docs-Cj25B-Sh.js";
|
|
2
|
+
import "../component-generics-Df4EDvxk.js";
|
|
3
|
+
import "../navigation-CuCg3le8.js";
|
|
4
|
+
import "../markdown-DunIdqFE.js";
|
|
5
|
+
import "../routing-C8oZYLsf.js";
|
|
6
|
+
import "../style-CkbsakoF.js";
|
|
7
|
+
import "../use-components-DI-AbT-D.js";
|
|
8
|
+
import { D as Property, E as MethodSignature, O as Type, T as Declaration, k as TypeName } from "../contexts-DO0sMzym.js";
|
|
9
|
+
import "../icons--8QR-PrL.js";
|
|
10
|
+
import "../utils-BhYTrLot.js";
|
|
11
|
+
import "../dropdown-kUhwBigR.js";
|
|
12
|
+
import "../md-Dg8aOyMA.js";
|
|
13
|
+
import "../utils-ByZH9QWT.js";
|
|
14
|
+
import "../types-DFN4M1Sp.js";
|
|
15
|
+
|
|
16
|
+
export { Declaration, MethodSignature, Property, Type, TypeName };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "../breadcrumbs-D5viAm7a.js";
|
|
2
|
+
import "../dropdown-Dv9VAYCW.js";
|
|
3
|
+
import "../method-c3XDArUn.js";
|
|
4
|
+
import "../primitives-iB9fIrMF.js";
|
|
5
|
+
import "../properties-Ba6F_GGj.js";
|
|
6
|
+
import "../routing-BE6Vrs-z.js";
|
|
7
|
+
import "../sdk-D2x2l6JH.js";
|
|
8
|
+
import "../snippets-BApdMOXp.js";
|
|
9
|
+
import "../overview-D21weqVJ.js";
|
|
10
|
+
import "../sidebar-B1X4gmY2.js";
|
|
11
|
+
import "../index-BW6OPqAo.js";
|
|
12
|
+
import { $ as Declaration, at as Type, et as DeclarationProps, it as PropertyProps, nt as MethodSignatureProps, ot as TypeName, rt as Property, tt as MethodSignature } from "../index-BXO3gZup.js";
|
|
13
|
+
export { Declaration, DeclarationProps, MethodSignature, MethodSignatureProps, Property, PropertyProps, Type, TypeName };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "../docs-Cj25B-Sh.js";
|
|
2
|
+
import "../component-generics-Df4EDvxk.js";
|
|
3
|
+
import "../navigation-CuCg3le8.js";
|
|
4
|
+
import "../markdown-DunIdqFE.js";
|
|
5
|
+
import "../routing-C8oZYLsf.js";
|
|
6
|
+
import "../style-CkbsakoF.js";
|
|
7
|
+
import "../use-components-DI-AbT-D.js";
|
|
8
|
+
import { $ as TypeName, Q as Type, X as MethodSignature, Y as Declaration, Z as Property } from "../contexts-DO0sMzym.js";
|
|
9
|
+
import "../icons--8QR-PrL.js";
|
|
10
|
+
import "../utils-BhYTrLot.js";
|
|
11
|
+
import "../dropdown-kUhwBigR.js";
|
|
12
|
+
import "../md-Dg8aOyMA.js";
|
|
13
|
+
import "../utils-ByZH9QWT.js";
|
|
14
|
+
import "../types-DFN4M1Sp.js";
|
|
15
|
+
|
|
16
|
+
export { Declaration, MethodSignature, Property, Type, TypeName };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "../routing-BE6Vrs-z.js";
|
|
2
|
+
import "../sdk-D2x2l6JH.js";
|
|
3
|
+
import { t as EnvironmentType } from "../utils-B9JL_XWH.js";
|
|
4
|
+
import { Node } from "@markdoc/markdoc";
|
|
5
|
+
import * as SDKJSON from "@stainless/sdk-json";
|
|
6
|
+
|
|
7
|
+
//#region src/markdown/index.d.ts
|
|
8
|
+
declare function declaration(env: EnvironmentType, decl: SDKJSON.DeclarationNode): Node;
|
|
9
|
+
declare function render(env: EnvironmentType, node: SDKJSON.Resource | SDKJSON.Method | SDKJSON.Model): Node[];
|
|
10
|
+
declare function renderMarkdown(env: EnvironmentType, node: SDKJSON.Resource | SDKJSON.Method | SDKJSON.Model): string;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { declaration, render, renderMarkdown };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "../docs-Cj25B-Sh.js";
|
|
2
|
+
import "../component-generics-Df4EDvxk.js";
|
|
3
|
+
import "../navigation-CuCg3le8.js";
|
|
4
|
+
import "../markdown-DunIdqFE.js";
|
|
5
|
+
import "../routing-C8oZYLsf.js";
|
|
6
|
+
import "../style-CkbsakoF.js";
|
|
7
|
+
import "../use-components-DI-AbT-D.js";
|
|
8
|
+
import { d as render, f as renderMarkdown, u as declaration } from "../contexts-DO0sMzym.js";
|
|
9
|
+
import "../icons--8QR-PrL.js";
|
|
10
|
+
import "../utils-BhYTrLot.js";
|
|
11
|
+
import "../dropdown-kUhwBigR.js";
|
|
12
|
+
import "../md-Dg8aOyMA.js";
|
|
13
|
+
import "../utils-ByZH9QWT.js";
|
|
14
|
+
import "../types-DFN4M1Sp.js";
|
|
15
|
+
|
|
16
|
+
export { declaration, render, renderMarkdown };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Node } from "@markdoc/markdoc";
|
|
2
|
+
|
|
3
|
+
//#region src/markdown/md.d.ts
|
|
4
|
+
declare function heading(level: number, children: string | Node[]): Node;
|
|
5
|
+
declare function text(content: string): Node;
|
|
6
|
+
declare function code(content: string): Node;
|
|
7
|
+
declare function paragraph(...children: Node[]): Node;
|
|
8
|
+
declare function list(...children: Node[]): Node;
|
|
9
|
+
declare function item(...children: Node[]): Node;
|
|
10
|
+
declare function strong(...children: Node[]): Node;
|
|
11
|
+
declare function inline(...children: Node[]): Node;
|
|
12
|
+
declare function fence(language: string, content: string): Node;
|
|
13
|
+
declare function parse(content: string): Node[];
|
|
14
|
+
//#endregion
|
|
15
|
+
export { code, fence, heading, inline, item, list, paragraph, parse, strong, text };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/contexts/markdown.d.ts
|
|
4
|
+
type MarkdownContext = {
|
|
5
|
+
highlight: (content: string, language: string) => string | Promise<string>;
|
|
6
|
+
render: (content: string) => string;
|
|
7
|
+
};
|
|
8
|
+
declare const MarkdownContext: React$1.Context<MarkdownContext>;
|
|
9
|
+
declare const useMarkdownContext: () => MarkdownContext;
|
|
10
|
+
declare function useRenderMarkdown(content?: string): string | undefined;
|
|
11
|
+
declare function useHighlight(content: string, language?: string): string;
|
|
12
|
+
type MarkdownProviderProps = MarkdownContext & {
|
|
13
|
+
children: React$1.ReactNode;
|
|
14
|
+
};
|
|
15
|
+
declare function MarkdownProvider({
|
|
16
|
+
render,
|
|
17
|
+
highlight,
|
|
18
|
+
children
|
|
19
|
+
}: MarkdownProviderProps): React$1.JSX.Element;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { useMarkdownContext as a, useHighlight as i, MarkdownProvider as n, useRenderMarkdown as o, MarkdownProviderProps as r, MarkdownContext as t };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { a as useLanguage } from "./docs-Cj25B-Sh.js";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/contexts/markdown.tsx
|
|
5
|
+
const HighlightLanguageMappings = {
|
|
6
|
+
node: "typescript",
|
|
7
|
+
http: "bash"
|
|
8
|
+
};
|
|
9
|
+
const MarkdownContext = React$1.createContext({
|
|
10
|
+
highlight: (content) => content,
|
|
11
|
+
render: (content) => content
|
|
12
|
+
});
|
|
13
|
+
const useMarkdownContext = () => React$1.useContext(MarkdownContext);
|
|
14
|
+
function useRenderMarkdown(content) {
|
|
15
|
+
const { render } = React$1.useContext(MarkdownContext);
|
|
16
|
+
return React$1.useMemo(() => content ? render(content) : void 0, [content, render]);
|
|
17
|
+
}
|
|
18
|
+
function useHighlight(content, language) {
|
|
19
|
+
const { highlight } = React$1.useContext(MarkdownContext);
|
|
20
|
+
const defaultLanguage = useLanguage();
|
|
21
|
+
const lang = language ?? defaultLanguage;
|
|
22
|
+
return React$1.useMemo(() => {
|
|
23
|
+
const rendered = highlight(content, HighlightLanguageMappings[lang] ?? lang);
|
|
24
|
+
return typeof rendered === "string" ? rendered : React$1.use(rendered);
|
|
25
|
+
}, [
|
|
26
|
+
content,
|
|
27
|
+
highlight,
|
|
28
|
+
lang
|
|
29
|
+
]);
|
|
30
|
+
}
|
|
31
|
+
function MarkdownProvider({ render, highlight, children }) {
|
|
32
|
+
return <MarkdownContext.Provider value={{
|
|
33
|
+
render,
|
|
34
|
+
highlight
|
|
35
|
+
}}>{children}</MarkdownContext.Provider>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
export { useRenderMarkdown as a, useMarkdownContext as i, MarkdownProvider as n, useHighlight as r, MarkdownContext as t };
|