@stainless-api/docs-ui 0.1.0-beta.94 → 1.0.0-beta.96

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.
@@ -84,7 +84,9 @@ function normalizeDeclaration(raw, http) {
84
84
  function SDKDeclaration({ path, expand, depth = 0 }) {
85
85
  const Lang = useLanguageComponents();
86
86
  const Docs = useComponents();
87
- let pendingDecl = normalizeDeclaration(useDeclaration(path, true), useDeclaration(path.replace(/ > \(schema\)$/, "") + " > (schema)", false, "http"));
87
+ const rawDecl = useDeclaration(path, true);
88
+ const spec = useSpec();
89
+ let pendingDecl = normalizeDeclaration(rawDecl, useDeclaration(path.replace(/ > \(schema\)$/, "") + " > (schema)", false, "http"));
88
90
  const settings = useSettings();
89
91
  const model = usePropertyModel();
90
92
  const nesting = useReferenceNesting();
@@ -147,7 +149,7 @@ function SDKDeclaration({ path, expand, depth = 0 }) {
147
149
  const decl = pendingDecl;
148
150
  if (decl.kind.endsWith("Reference")) {
149
151
  const refId = "type" in decl && decl.type !== void 0 && typeof decl.type !== "string" && "$ref" in decl.type ? decl.type["$ref"] : void 0;
150
- if (refId && refId !== path && !nesting.includes(refId)) return /* @__PURE__ */ jsx(AddToDeclarationParents, {
152
+ if (refId && refId !== path && !nesting.includes(refId) && spec?.decls?.[language]?.[refId]) return /* @__PURE__ */ jsx(AddToDeclarationParents, {
151
153
  id: path,
152
154
  children: /* @__PURE__ */ jsx(ReferenceNestingContext, {
153
155
  value: [...nesting, refId],
@@ -0,0 +1,464 @@
1
+ import { a as Link, c as Markdown, d as Tooltip, f as VirtualExpander, i as Join, l as ToggleButton, n as Input, o as ListView, r as InputProps, s as ListViewProps, t as Expander, u as ToggleButtonProps } from "./primitives-CW9dapDc.js";
2
+ import { S as Type$10, a as GoAST, b as TSAST, d as Method, g as RubyAST, h as Resource$1, i as DeclarationNode, l as JavaAST, m as PythonAST, n as CLIAST, o as HasStainlessPath, p as PhpAST, r as CSharpAST, s as HttpAST, x as TerraformAST } from "./index-BnjlyeQW.js";
3
+ import { n as generateApiBreadcrumbs, t as SDKBreadcrumbs } from "./breadcrumbs-6s9Nm3WS.js";
4
+ import { a as MethodHeaderProps, c as MethodProps, i as MethodHeader, l as MethodRoute, n as MethodDescription, o as MethodInfo$1, r as MethodDescriptionProps, s as MethodInfoProps, t as Method$1, u as MethodRouteProps } from "./method-BKJnP-rW.js";
5
+ import { a as PropertyTitle, c as PropertyToggleProps, i as PropertyProps$10, n as PropertyDescription, o as PropertyTitleProps, r as PropertyDescriptionProps, s as PropertyToggle, t as Property$10 } from "./properties-CCbMRhSX.js";
6
+ import { A as useStreamingResponse, C as SDKRequestTitleProps, D as useDeclarationParents, E as TransformRequestSnippetFn, O as usePropertyModel, S as SDKRequestTitle, T as SDKSnippetLanguagesType, _ as SDKMethodNotImplemented, a as ReferenceNestingContextType, b as SDKModelProps, c as SDKConstraintsProps, d as SDKIcon, f as SDKLanguageBlock, g as SDKMethodInfoContent, h as SDKMethodInfo, i as ReferenceNestingContext, k as useReferenceNesting, l as SDKDeclaration, m as SDKMethodHeader, n as PropertyModelContext, o as SDKChildren, p as SDKMethod, r as PropertyModelContextType, s as SDKConstraints, t as DeclarationParentsContextType, u as SDKExample, v as SDKMethodProps, w as SDKSnippetLanguages, x as SDKReference, y as SDKModel } from "./sdk-C5uXpgjw.js";
7
+ import { a as useNavigation, i as NavigationProviderProps, n as NavigationHandler, r as NavigationProvider, t as NavigationContextType } from "./navigation-0gY-w3QQ.js";
8
+ import { a as SuspensefulMarkdownProvider, c as useRenderMarkdown, i as MarkdownProviderProps, n as MarkdownContextValue, o as useHighlight, r as MarkdownProvider, s as useMarkdownContext, t as MarkdownContext } from "./markdown-B30HO-Vy.js";
9
+ import { a as useComponents, i as useComponentContext, n as ComponentsContextType, r as customizeComponents, t as ComponentProvider } from "./component-generics-D9XaPlr8.js";
10
+ import { _ as useSnippetResponse, a as DocsProviderProps, c as useContentPanelLayout, d as useIgnoredResources, f as useLanguage, g as useSnippetIds, h as useSnippet, i as DocsProvider, l as useDeclaration, m as useSettings, n as Declaration$10, o as PropertySettingsType, p as useResource, r as DocsContextType, s as useAvailableLanguages, t as ContentPanelLayout, u as useDocs, v as useSnippets, y as useSpec } from "./docs-CCsL1_Y6.js";
11
+ import { a as SDKResource, c as SDKRoot, i as SDKOverviewProps, l as SDKRootProps, n as SDKMethodSummaryProps, o as SDKResourceHeader, r as SDKOverview, s as SDKResourceProps, t as SDKMethodSummary } from "./overview-ByEjLgyh.js";
12
+ import { n as SDKSidebarProps, t as SDKSidebar } from "./sdk-sidebar-uQZp3Qf-.js";
13
+ import { a as StlSidebarProps, i as StlSidebarLink, n as StlSidebarEntry, o as StlSidebarTarget, r as StlSidebarGroup, t as StlSidebar } from "./stl-sidebar-Pra9uCYo.js";
14
+ import * as React$1 from "react";
15
+ import React, { ReactNode } from "react";
16
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
17
+
18
+ //#region src/languages/typescript.d.ts
19
+ declare namespace typescript_d_exports {
20
+ export { Declaration$9 as Declaration, DeclarationProps$9 as DeclarationProps, MethodSignature$9 as MethodSignature, MethodSignatureProps$8 as MethodSignatureProps, Property$9 as Property, PropertyProps$9 as PropertyProps, Type$9 as Type, TypeName$9 as TypeName };
21
+ }
22
+ type TypeProps$9 = {
23
+ type: TSAST.TSType;
24
+ };
25
+ declare function TypeName$9({
26
+ type
27
+ }: TypeProps$9): string | _$react_jsx_runtime0.JSX.Element;
28
+ declare function Type$9({
29
+ type
30
+ }: TypeProps$9): _$react_jsx_runtime0.JSX.Element;
31
+ type MethodSignatureProps$8 = {
32
+ decl: TSAST.TSDeclFunction;
33
+ };
34
+ declare function MethodSignature$9({
35
+ decl
36
+ }: MethodSignatureProps$8): _$react_jsx_runtime0.JSX.Element;
37
+ type PropertyProps$9 = {
38
+ decl: TSAST.TSDeclaration;
39
+ children: PropertyFn;
40
+ };
41
+ declare function Property$9({
42
+ decl,
43
+ children
44
+ }: PropertyProps$9): React$1.ReactNode;
45
+ type DeclarationProps$9 = {
46
+ decl: TSAST.TSDeclaration;
47
+ };
48
+ declare function Declaration$9({
49
+ decl
50
+ }: DeclarationProps$9): _$react_jsx_runtime0.JSX.Element | undefined;
51
+ declare namespace java_d_exports {
52
+ export { Declaration$8 as Declaration, DeclarationProps$8 as DeclarationProps, MethodSignature$8 as MethodSignature, MethodSignatureProps$7 as MethodSignatureProps, Property$8 as Property, PropertyProps$8 as PropertyProps, Type$8 as Type, TypeName$8 as TypeName };
53
+ }
54
+ type TypeProps$8 = {
55
+ type: JavaAST.JavaType;
56
+ optional?: boolean;
57
+ };
58
+ declare function TypeName$8({
59
+ type,
60
+ optional
61
+ }: TypeProps$8): _$react_jsx_runtime0.JSX.Element | "List";
62
+ declare function Type$8({
63
+ type,
64
+ optional
65
+ }: TypeProps$8): _$react_jsx_runtime0.JSX.Element;
66
+ type MethodSignatureProps$7 = {
67
+ decl: JavaAST.JavaDeclFunction;
68
+ };
69
+ declare function MethodSignature$8({
70
+ decl
71
+ }: MethodSignatureProps$7): _$react_jsx_runtime0.JSX.Element;
72
+ type PropertyProps$8 = {
73
+ decl: JavaAST.JavaDeclaration;
74
+ children: PropertyFn;
75
+ };
76
+ declare function Property$8({
77
+ decl,
78
+ children
79
+ }: PropertyProps$8): React$1.ReactNode;
80
+ type DeclarationProps$8 = {
81
+ decl: JavaAST.JavaDeclaration;
82
+ };
83
+ declare function Declaration$8({
84
+ decl
85
+ }: DeclarationProps$8): _$react_jsx_runtime0.JSX.Element | null | undefined;
86
+ declare namespace go_d_exports {
87
+ export { Declaration$7 as Declaration, DeclarationProps$7 as DeclarationProps, MethodSignature$7 as MethodSignature, MethodSignatureProps$6 as MethodSignatureProps, Property$7 as Property, PropertyProps$7 as PropertyProps, Type$7 as Type, TypeName$7 as TypeName, TypeProps$7 as TypeProps };
88
+ }
89
+ type TypeProps$7 = {
90
+ type: GoAST.GoType;
91
+ };
92
+ declare function TypeName$7({
93
+ type
94
+ }: TypeProps$7): string | _$react_jsx_runtime0.JSX.Element;
95
+ declare function Type$7({
96
+ type
97
+ }: TypeProps$7): _$react_jsx_runtime0.JSX.Element;
98
+ type MethodSignatureProps$6 = {
99
+ decl: GoAST.GoDeclFunction;
100
+ };
101
+ declare function MethodSignature$7({
102
+ decl
103
+ }: MethodSignatureProps$6): _$react_jsx_runtime0.JSX.Element;
104
+ type PropertyProps$7 = {
105
+ decl: GoAST.GoDeclaration;
106
+ children: PropertyFn;
107
+ };
108
+ declare function Property$7({
109
+ decl,
110
+ children
111
+ }: PropertyProps$7): React$1.ReactNode;
112
+ type DeclarationProps$7 = {
113
+ decl: GoAST.GoDeclaration;
114
+ };
115
+ declare function Declaration$7({
116
+ decl
117
+ }: DeclarationProps$7): _$react_jsx_runtime0.JSX.Element | undefined;
118
+ declare namespace python_d_exports {
119
+ export { Declaration$6 as Declaration, DeclarationProps$6 as DeclarationProps, MethodSignature$6 as MethodSignature, MethodSignatureProps$5 as MethodSignatureProps, Property$6 as Property, PropertyProps$6 as PropertyProps, Type$6 as Type, TypeName$6 as TypeName };
120
+ }
121
+ type TypeProps$6 = {
122
+ type: PythonAST.PythonType;
123
+ };
124
+ declare function TypeName$6({
125
+ type
126
+ }: TypeProps$6): string | _$react_jsx_runtime0.JSX.Element;
127
+ declare function Type$6({
128
+ type
129
+ }: TypeProps$6): _$react_jsx_runtime0.JSX.Element;
130
+ type MethodSignatureProps$5 = {
131
+ decl: PythonAST.PythonDeclFunction;
132
+ };
133
+ declare function MethodSignature$6({
134
+ decl
135
+ }: MethodSignatureProps$5): _$react_jsx_runtime0.JSX.Element;
136
+ type PropertyProps$6 = {
137
+ decl: PythonAST.PythonDeclaration;
138
+ children: PropertyFn;
139
+ };
140
+ declare function Property$6({
141
+ decl,
142
+ children
143
+ }: PropertyProps$6): React$1.ReactNode;
144
+ type DeclarationProps$6 = {
145
+ decl: PythonAST.PythonDeclaration;
146
+ };
147
+ declare function Declaration$6({
148
+ decl
149
+ }: DeclarationProps$6): _$react_jsx_runtime0.JSX.Element | undefined;
150
+ declare namespace ruby_d_exports {
151
+ export { Declaration$5 as Declaration, DeclarationProps$5 as DeclarationProps, MethodSignature$5 as MethodSignature, MethodSignatureProps$4 as MethodSignatureProps, Property$5 as Property, PropertyProps$5 as PropertyProps, Type$5 as Type, TypeName$5 as TypeName };
152
+ }
153
+ type TypeProps$5 = {
154
+ type: RubyAST.RubyType;
155
+ };
156
+ declare function TypeName$5({
157
+ type
158
+ }: TypeProps$5): string | _$react_jsx_runtime0.JSX.Element;
159
+ declare function Type$5({
160
+ type
161
+ }: TypeProps$5): _$react_jsx_runtime0.JSX.Element;
162
+ type MethodSignatureProps$4 = {
163
+ decl: RubyAST.RubyDeclFunction;
164
+ };
165
+ declare function MethodSignature$5({
166
+ decl
167
+ }: MethodSignatureProps$4): _$react_jsx_runtime0.JSX.Element;
168
+ type PropertyProps$5 = {
169
+ decl: RubyAST.RubyDeclaration;
170
+ children: PropertyFn;
171
+ };
172
+ declare function Property$5({
173
+ decl,
174
+ children
175
+ }: PropertyProps$5): React$1.ReactNode;
176
+ type DeclarationProps$5 = {
177
+ decl: RubyAST.RubyDeclaration;
178
+ };
179
+ declare function Declaration$5({
180
+ decl
181
+ }: DeclarationProps$5): _$react_jsx_runtime0.JSX.Element | undefined;
182
+ declare namespace http_d_exports {
183
+ export { Declaration$4 as Declaration, DeclarationProps$4 as DeclarationProps, MethodInfo, MethodSignature$4 as MethodSignature, MethodSignatureProps$3 as MethodSignatureProps, Property$4 as Property, PropertyProps$4 as PropertyProps, Type$4 as Type, TypeName$4 as TypeName };
184
+ }
185
+ type TypeProps$4 = {
186
+ type: HttpAST.HttpType;
187
+ };
188
+ declare function TypeName$4({
189
+ type
190
+ }: TypeProps$4): string | _$react_jsx_runtime0.JSX.Element;
191
+ declare function Type$4({
192
+ type
193
+ }: TypeProps$4): _$react_jsx_runtime0.JSX.Element;
194
+ type MethodSignatureProps$3 = {
195
+ decl: HttpAST.HttpDeclFunction;
196
+ };
197
+ declare function MethodSignature$4({
198
+ decl
199
+ }: MethodSignatureProps$3): null;
200
+ declare function MethodInfo({
201
+ decl,
202
+ children
203
+ }: MethodSignatureProps$3 & {
204
+ children: React.ReactNode;
205
+ }): _$react_jsx_runtime0.JSX.Element;
206
+ type PropertyProps$4 = {
207
+ decl: HttpAST.HttpDeclaration;
208
+ children: PropertyFn;
209
+ };
210
+ declare function Property$4({
211
+ decl,
212
+ children
213
+ }: PropertyProps$4): React.ReactNode;
214
+ type DeclarationProps$4 = {
215
+ decl: HttpAST.HttpDeclaration;
216
+ };
217
+ declare function Declaration$4({
218
+ decl
219
+ }: DeclarationProps$4): _$react_jsx_runtime0.JSX.Element | undefined;
220
+ declare namespace csharp_d_exports {
221
+ export { Declaration$3 as Declaration, DeclarationProps$3 as DeclarationProps, MethodSignature$3 as MethodSignature, MethodSignatureProps$2 as MethodSignatureProps, Property$3 as Property, PropertyProps$3 as PropertyProps, Type$3 as Type, TypeName$3 as TypeName };
222
+ }
223
+ declare function TypeName$3({
224
+ type,
225
+ optional
226
+ }: TypeProps$3): _$react_jsx_runtime0.JSX.Element;
227
+ type TypeProps$3 = {
228
+ type: CSharpAST.CSharpType;
229
+ optional?: boolean;
230
+ };
231
+ declare function Type$3({
232
+ type
233
+ }: TypeProps$3): _$react_jsx_runtime0.JSX.Element;
234
+ type MethodSignatureProps$2 = {
235
+ decl: CSharpAST.CSharpDeclFunction;
236
+ };
237
+ declare function MethodSignature$3({
238
+ decl
239
+ }: MethodSignatureProps$2): _$react_jsx_runtime0.JSX.Element;
240
+ type PropertyProps$3 = {
241
+ decl: CSharpAST.CSharpDeclaration;
242
+ children: PropertyFn;
243
+ };
244
+ declare function Property$3({
245
+ decl,
246
+ children
247
+ }: PropertyProps$3): React$1.ReactNode;
248
+ type DeclarationProps$3 = {
249
+ decl: CSharpAST.CSharpDeclaration;
250
+ };
251
+ declare function Declaration$3({
252
+ decl
253
+ }: DeclarationProps$3): _$react_jsx_runtime0.JSX.Element | null | undefined;
254
+ declare namespace php_d_exports {
255
+ export { Declaration$2 as Declaration, DeclarationProps$2 as DeclarationProps, MethodSignature$2 as MethodSignature, MethodSignatureProps$1 as MethodSignatureProps, Property$2 as Property, PropertyProps$2 as PropertyProps, Type$2 as Type, TypeName$2 as TypeName };
256
+ }
257
+ type TypeProps$2 = {
258
+ type: PhpAST.PhpType;
259
+ };
260
+ declare function TypeName$2({
261
+ type
262
+ }: TypeProps$2): string | _$react_jsx_runtime0.JSX.Element;
263
+ declare function Type$2({
264
+ type
265
+ }: TypeProps$2): _$react_jsx_runtime0.JSX.Element;
266
+ type MethodSignatureProps$1 = {
267
+ decl: PhpAST.PhpDeclMethod;
268
+ };
269
+ declare function MethodSignature$2({
270
+ decl
271
+ }: MethodSignatureProps$1): _$react_jsx_runtime0.JSX.Element;
272
+ type PropertyProps$2 = {
273
+ decl: PhpAST.PhpDeclaration;
274
+ children: PropertyFn;
275
+ };
276
+ declare function Property$2({
277
+ decl,
278
+ children
279
+ }: PropertyProps$2): React$1.ReactNode;
280
+ type DeclarationProps$2 = {
281
+ decl: PhpAST.PhpDeclaration;
282
+ };
283
+ declare function Declaration$2({
284
+ decl
285
+ }: DeclarationProps$2): _$react_jsx_runtime0.JSX.Element | undefined;
286
+ declare namespace cli_d_exports {
287
+ export { Declaration$1 as Declaration, DeclarationProps$1 as DeclarationProps, MethodSignature$1 as MethodSignature, MethodSignatureProps, Property$1 as Property, PropertyProps$1 as PropertyProps, Type$1 as Type, TypeName$1 as TypeName };
288
+ }
289
+ type TypeProps$1 = {
290
+ type: HttpAST.HttpType;
291
+ };
292
+ declare function TypeName$1(props: TypeProps$1): string | _$react_jsx_runtime0.JSX.Element;
293
+ declare function Type$1({
294
+ type
295
+ }: TypeProps$1): _$react_jsx_runtime0.JSX.Element;
296
+ type MethodSignatureProps = {
297
+ decl: CLIAST.CLICommand;
298
+ };
299
+ declare function MethodSignature$1({
300
+ decl
301
+ }: MethodSignatureProps): _$react_jsx_runtime0.JSX.Element;
302
+ type PropertyProps$1 = {
303
+ decl: CLIAST.CLIDeclaration;
304
+ children: PropertyFn;
305
+ };
306
+ declare function Property$1({
307
+ decl,
308
+ children
309
+ }: PropertyProps$1): React.ReactNode;
310
+ type DeclarationProps$1 = {
311
+ decl: CLIAST.CLIDeclaration;
312
+ };
313
+ declare function Declaration$1({
314
+ decl
315
+ }: DeclarationProps$1): _$react_jsx_runtime0.JSX.Element | undefined;
316
+ declare namespace terraform_d_exports {
317
+ export { Declaration, DeclarationProps, MethodSignature, Property, PropertyProps, Resource, ResourceProps, TerraformSource, Type, TypeName, TypeProps, isResourceEntirelyUnsupported };
318
+ }
319
+ type TypeProps = {
320
+ type: TerraformAST.AttributeType;
321
+ };
322
+ declare function TypeName({
323
+ type
324
+ }: TypeProps): _$react_jsx_runtime0.JSX.Element;
325
+ declare function Type({
326
+ type
327
+ }: TypeProps): _$react_jsx_runtime0.JSX.Element | undefined;
328
+ declare function MethodSignature(): null;
329
+ type PropertyProps = {
330
+ decl: TerraformAST.TerraformDeclaration;
331
+ children: PropertyFn;
332
+ };
333
+ declare function Property({
334
+ decl,
335
+ children
336
+ }: PropertyProps): React$1.ReactNode;
337
+ declare function TerraformSource({
338
+ path,
339
+ group
340
+ }: {
341
+ path: string;
342
+ group: string;
343
+ }): _$react_jsx_runtime0.JSX.Element | undefined;
344
+ type DeclarationProps = {
345
+ decl: TerraformAST.TerraformDeclaration;
346
+ };
347
+ declare function Declaration({
348
+ decl
349
+ }: DeclarationProps): _$react_jsx_runtime0.JSX.Element | undefined;
350
+ declare function isResourceEntirelyUnsupported(resource: Resource$1, decls?: Record<string, unknown>): boolean;
351
+ type ResourceProps = {
352
+ resource: Resource$1;
353
+ parents?: Resource$1[];
354
+ };
355
+ declare function Resource({
356
+ resource,
357
+ parents
358
+ }: ResourceProps): _$react_jsx_runtime0.JSX.Element | undefined;
359
+ declare namespace index_d_exports$2 {
360
+ export { LanguageComponentDefinition, PropertyFn, cli_d_exports as cli, csharp_d_exports as csharp, go_d_exports as go, http_d_exports as http, java_d_exports as java, kotlin, node, php_d_exports as php, python_d_exports as python, ruby_d_exports as ruby, terraform_d_exports as terraform, typescript_d_exports as typescript };
361
+ }
362
+ declare const node: typeof typescript_d_exports;
363
+ declare const kotlin: typeof java_d_exports;
364
+ type PropertyFn = (params: PropertyProps$10) => ReactNode;
365
+ interface LanguageComponentDefinition {
366
+ Declaration: (props: {
367
+ decl: DeclarationNode;
368
+ }) => ReactNode;
369
+ Property: (props: {
370
+ decl: DeclarationNode;
371
+ children: PropertyFn;
372
+ }) => ReactNode;
373
+ TypeName: (props: {
374
+ type: Type$10;
375
+ optional?: boolean;
376
+ }) => ReactNode;
377
+ Type: (props: {
378
+ type: Type$10;
379
+ optional?: boolean;
380
+ }) => ReactNode;
381
+ MethodSignature: (props: {
382
+ decl: DeclarationNode;
383
+ }) => ReactNode;
384
+ MethodInfo?: (props: {
385
+ decl: DeclarationNode;
386
+ children?: ReactNode;
387
+ }) => ReactNode;
388
+ Resource?: (props: {
389
+ resource: Resource$1;
390
+ parents?: Resource$1[];
391
+ }) => ReactNode;
392
+ }
393
+ declare namespace index_d_exports$1 {
394
+ export { ComponentProvider, ComponentsContextType, ContentPanelLayout, Declaration$10 as Declaration, DocsContextType, DocsProvider, DocsProviderProps, MarkdownContext, MarkdownContextValue, MarkdownProvider, MarkdownProviderProps, NavigationContextType, NavigationHandler, NavigationProvider, NavigationProviderProps, PropertySettingsType, SuspensefulMarkdownProvider, customizeComponents, useAvailableLanguages, useComponentContext, useComponents, useContentPanelLayout, useDeclaration, useDocs, useHighlight, useIgnoredResources, useLanguage, useLanguageComponents, useMarkdownContext, useNavigation, useRenderMarkdown, useResource, useSettings, useSnippet, useSnippetIds, useSnippetResponse, useSnippets, useSpec };
395
+ }
396
+ declare function useLanguageComponents(): LanguageComponentDefinition;
397
+ //#endregion
398
+ //#region src/components/snippets.d.ts
399
+ type SnippetCodeProps = {
400
+ content: string;
401
+ signature?: string;
402
+ language?: string;
403
+ };
404
+ declare function SnippetCode({
405
+ content,
406
+ language
407
+ }: SnippetCodeProps): _$react_jsx_runtime0.JSX.Element;
408
+ type SnippetContainerProps = {
409
+ method: Partial<Method> & HasStainlessPath;
410
+ children: React.ReactNode;
411
+ signature?: string;
412
+ } & React.ComponentProps<'div'>;
413
+ declare function SnippetContainer({
414
+ children,
415
+ className,
416
+ ...props
417
+ }: SnippetContainerProps): _$react_jsx_runtime0.JSX.Element;
418
+ type SnippetRequestContainerProps = {
419
+ children?: React.ReactNode;
420
+ signature?: string;
421
+ };
422
+ declare function SnippetRequestContainer({
423
+ children
424
+ }: SnippetRequestContainerProps): _$react_jsx_runtime0.JSX.Element;
425
+ type SnippetProps = {
426
+ requestTitle?: React.ReactNode;
427
+ method: Partial<Method> & HasStainlessPath;
428
+ snippet?: Parameters<typeof useSnippet>[2];
429
+ transformRequestSnippet?: TransformRequestSnippetFn;
430
+ };
431
+ declare function Snippet({
432
+ requestTitle,
433
+ method,
434
+ snippet,
435
+ transformRequestSnippet
436
+ }: SnippetProps): _$react_jsx_runtime0.JSX.Element | null;
437
+ type MultiSnippetsProps = {
438
+ method: Partial<Method> & HasStainlessPath;
439
+ requestTitle?: React.ReactNode;
440
+ };
441
+ declare function MultiSnippets({
442
+ requestTitle,
443
+ method
444
+ }: MultiSnippetsProps): _$react_jsx_runtime0.JSX.Element | null;
445
+ declare function SnippetButtons({
446
+ content
447
+ }: {
448
+ content: string;
449
+ }): _$react_jsx_runtime0.JSX.Element;
450
+ declare function SnippetFooter(): React.ReactNode;
451
+ declare function SnippetResponse({
452
+ responses
453
+ }: {
454
+ responses?: {
455
+ status?: string;
456
+ content: string;
457
+ contentType?: string;
458
+ }[];
459
+ }): _$react_jsx_runtime0.JSX.Element | null;
460
+ declare namespace index_d_exports {
461
+ export { DeclarationParentsContextType, Expander, Input, InputProps, Join, Link, ListView, ListViewProps, Markdown, Method$1 as Method, MethodDescription, MethodDescriptionProps, MethodHeader, MethodHeaderProps, MethodInfo$1 as MethodInfo, MethodInfoProps, MethodProps, MethodRoute, MethodRouteProps, MultiSnippets, MultiSnippetsProps, Property$10 as Property, PropertyDescription, PropertyDescriptionProps, PropertyModelContext, PropertyModelContextType, PropertyProps$10 as PropertyProps, PropertyTitle, PropertyTitleProps, PropertyToggle, PropertyToggleProps, ReferenceNestingContext, ReferenceNestingContextType, SDKBreadcrumbs, SDKChildren, SDKConstraints, SDKConstraintsProps, SDKDeclaration, SDKExample, SDKIcon, SDKLanguageBlock, SDKMethod, SDKMethodHeader, SDKMethodInfo, SDKMethodInfoContent, SDKMethodNotImplemented, SDKMethodProps, SDKMethodSummary, SDKMethodSummaryProps, SDKModel, SDKModelProps, SDKOverview, SDKOverviewProps, SDKReference, SDKRequestTitle, SDKRequestTitleProps, SDKResource, SDKResourceHeader, SDKResourceProps, SDKRoot, SDKRootProps, SDKSidebar, SDKSidebarProps, SDKSnippetLanguages, SDKSnippetLanguagesType, Snippet, SnippetButtons, SnippetCode, SnippetCodeProps, SnippetContainer, SnippetContainerProps, SnippetFooter, SnippetProps, SnippetRequestContainer, SnippetRequestContainerProps, SnippetResponse, StlSidebar, StlSidebarEntry, StlSidebarGroup, StlSidebarLink, StlSidebarProps, StlSidebarTarget, ToggleButton, ToggleButtonProps, Tooltip, TransformRequestSnippetFn, VirtualExpander, generateApiBreadcrumbs, useDeclarationParents, usePropertyModel, useReferenceNesting, useStreamingResponse };
462
+ }
463
+ //#endregion
464
+ export { Declaration$3 as $, TypeName$8 as $t, Type as A, MethodSignatureProps$5 as At, PropertyProps$1 as B, Property$7 as Bt, DeclarationProps as C, PropertyProps$5 as Ct, Resource as D, Declaration$6 as Dt, PropertyProps as E, ruby_d_exports as Et, Declaration$1 as F, python_d_exports as Ft, DeclarationProps$2 as G, go_d_exports as Gt, TypeName$1 as H, Type$7 as Ht, DeclarationProps$1 as I, Declaration$7 as It, Property$2 as J, MethodSignature$8 as Jt, MethodSignature$2 as K, Declaration$8 as Kt, MethodSignature$1 as L, DeclarationProps$7 as Lt, TypeProps as M, PropertyProps$6 as Mt, isResourceEntirelyUnsupported as N, Type$6 as Nt, ResourceProps as O, DeclarationProps$6 as Ot, terraform_d_exports as P, TypeName$6 as Pt, php_d_exports as Q, Type$8 as Qt, MethodSignatureProps as R, MethodSignature$7 as Rt, Declaration as S, Property$5 as St, Property as T, TypeName$5 as Tt, cli_d_exports as U, TypeName$7 as Ut, Type$1 as V, PropertyProps$7 as Vt, Declaration$2 as W, TypeProps$7 as Wt, Type$2 as X, Property$8 as Xt, PropertyProps$2 as Y, MethodSignatureProps$7 as Yt, TypeName$2 as Z, PropertyProps$8 as Zt, LanguageComponentDefinition as _, http_d_exports as _t, SnippetButtons as a, Property$9 as an, Type$3 as at, kotlin as b, MethodSignature$5 as bt, SnippetContainer as c, TypeName$9 as cn, Declaration$4 as ct, SnippetProps as d, MethodSignature$4 as dt, java_d_exports as en, DeclarationProps$3 as et, SnippetRequestContainer as f, MethodSignatureProps$3 as ft, useLanguageComponents as g, TypeName$4 as gt, index_d_exports$1 as h, Type$4 as ht, Snippet as i, MethodSignatureProps$8 as in, PropertyProps$3 as it, TypeName as j, Property$6 as jt, TerraformSource as k, MethodSignature$6 as kt, SnippetContainerProps as l, typescript_d_exports as ln, DeclarationProps$4 as lt, SnippetResponse as m, PropertyProps$4 as mt, MultiSnippets as n, DeclarationProps$9 as nn, MethodSignatureProps$2 as nt, SnippetCode as o, PropertyProps$9 as on, TypeName$3 as ot, SnippetRequestContainerProps as p, Property$4 as pt, MethodSignatureProps$1 as q, DeclarationProps$8 as qt, MultiSnippetsProps as r, MethodSignature$9 as rn, Property$3 as rt, SnippetCodeProps as s, Type$9 as sn, csharp_d_exports as st, index_d_exports as t, Declaration$9 as tn, MethodSignature$3 as tt, SnippetFooter as u, MethodInfo as ut, PropertyFn as v, Declaration$5 as vt, MethodSignature as w, Type$5 as wt, node as x, MethodSignatureProps$4 as xt, index_d_exports$2 as y, DeclarationProps$5 as yt, Property$1 as z, MethodSignatureProps$6 as zt };
@@ -0,0 +1,99 @@
1
+ import * as _$react from "react";
2
+ import { ReactNode } from "react";
3
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
4
+
5
+ //#region src/components/primitives.d.ts
6
+ type JoinProps = {
7
+ items: ReactNode[];
8
+ limit?: number;
9
+ children: ReactNode;
10
+ };
11
+ declare function Join({
12
+ items,
13
+ limit,
14
+ children
15
+ }: JoinProps): _$react_jsx_runtime0.JSX.Element[];
16
+ type ExpanderProps = {
17
+ id?: string;
18
+ open?: boolean;
19
+ summary: ReactNode;
20
+ virtual?: boolean;
21
+ muted?: boolean;
22
+ children?: ReactNode;
23
+ };
24
+ declare function Expander({
25
+ id,
26
+ open,
27
+ summary,
28
+ virtual,
29
+ muted,
30
+ children
31
+ }: ExpanderProps): _$react_jsx_runtime0.JSX.Element;
32
+ declare function VirtualExpander({
33
+ id,
34
+ open: isOpen,
35
+ muted,
36
+ summary,
37
+ children
38
+ }: Omit<ExpanderProps, 'virtual'>): _$react_jsx_runtime0.JSX.Element;
39
+ declare function Markdown({
40
+ content,
41
+ style: cssStyle
42
+ }: {
43
+ content: string;
44
+ style?: React.CSSProperties;
45
+ }): "" | _$react_jsx_runtime0.JSX.Element | undefined;
46
+ type TooltipProps = {
47
+ content: ReactNode;
48
+ children: ReactNode;
49
+ };
50
+ declare function Tooltip({
51
+ content,
52
+ children
53
+ }: TooltipProps): string | number | bigint | boolean | _$react_jsx_runtime0.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | _$react.ReactPortal | _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
54
+ type LinkProps = {
55
+ stainlessPath?: string;
56
+ scroll?: boolean;
57
+ children?: ReactNode;
58
+ } & React.HTMLProps<HTMLAnchorElement>;
59
+ declare function Link({
60
+ stainlessPath,
61
+ scroll,
62
+ children,
63
+ ...props
64
+ }: LinkProps): string | number | bigint | boolean | _$react_jsx_runtime0.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | _$react.ReactPortal | _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
65
+ type InputProps = {
66
+ left?: ReactNode;
67
+ right?: ReactNode;
68
+ ref?: React.Ref<HTMLInputElement>;
69
+ } & React.InputHTMLAttributes<HTMLInputElement>;
70
+ declare function Input({
71
+ left,
72
+ right,
73
+ ref,
74
+ className,
75
+ ...props
76
+ }: InputProps): _$react_jsx_runtime0.JSX.Element;
77
+ type ToggleButtonProps = {
78
+ children?: ReactNode;
79
+ selected?: boolean;
80
+ } & React.ComponentProps<'button'>;
81
+ declare function ToggleButton({
82
+ children,
83
+ selected,
84
+ ref,
85
+ ...props
86
+ }: ToggleButtonProps): _$react_jsx_runtime0.JSX.Element;
87
+ type ListViewProps<TItem> = {
88
+ items: Array<TItem>;
89
+ itemDelegate: (item: TItem, selected: boolean) => React.ReactNode;
90
+ onSelectListItem?: (item: TItem) => void;
91
+ } & React.HTMLAttributes<HTMLDivElement>;
92
+ declare function ListView<TItem>({
93
+ items,
94
+ itemDelegate,
95
+ onSelectListItem,
96
+ ...rest
97
+ }: ListViewProps<TItem>): _$react_jsx_runtime0.JSX.Element;
98
+ //#endregion
99
+ export { Link as a, Markdown as c, Tooltip as d, VirtualExpander as f, Join as i, ToggleButton as l, Input as n, ListView as o, InputProps as r, ListViewProps as s, Expander as t, ToggleButtonProps as u };
@@ -0,0 +1,128 @@
1
+ import { _ as SnippetLanguage, c as ID, d as Method, f as Model, o as HasStainlessPath, t as BaseDeclaration } from "./index-BnjlyeQW.js";
2
+ import { t as DocsLanguage } from "./routing-BJ8MkvFn.js";
3
+ import * as React$1 from "react";
4
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
5
+
6
+ //#region src/components/sdk.d.ts
7
+ type PropertyModelContextType = {
8
+ modelPath?: string;
9
+ propertyPath?: string;
10
+ };
11
+ declare const PropertyModelContext: React$1.Context<PropertyModelContextType>;
12
+ declare function usePropertyModel(): PropertyModelContextType;
13
+ type ReferenceNestingContextType = string[];
14
+ declare const ReferenceNestingContext: React$1.Context<ReferenceNestingContextType>;
15
+ declare function useReferenceNesting(): ReferenceNestingContextType;
16
+ type DeclarationParentsContextType = ReadonlySet<string>;
17
+ declare function useDeclarationParents(): DeclarationParentsContextType;
18
+ type SDKSnippetLanguagesType = Record<SnippetLanguage, {
19
+ name: string;
20
+ }>;
21
+ declare const SDKSnippetLanguages: SDKSnippetLanguagesType;
22
+ type TransformRequestSnippetFn = ({
23
+ snippet,
24
+ language
25
+ }: {
26
+ snippet: string;
27
+ language: DocsLanguage;
28
+ }) => string;
29
+ type SDKChildrenProps = {
30
+ paths: ID[];
31
+ expand?: boolean;
32
+ depth?: number;
33
+ };
34
+ declare function SDKChildren({
35
+ paths,
36
+ expand,
37
+ depth
38
+ }: SDKChildrenProps): _$react_jsx_runtime0.JSX.Element;
39
+ type SDKDeclarationProps = {
40
+ path: string;
41
+ expand?: boolean;
42
+ depth?: number;
43
+ };
44
+ declare function SDKDeclaration({
45
+ path,
46
+ expand,
47
+ depth
48
+ }: SDKDeclarationProps): _$react_jsx_runtime0.JSX.Element;
49
+ type SDKConstraintsProps = {
50
+ constraints?: Record<string, unknown>;
51
+ };
52
+ declare function SDKConstraints({
53
+ constraints
54
+ }: SDKConstraintsProps): _$react_jsx_runtime0.JSX.Element | undefined;
55
+ type SDKIconProps = {
56
+ language: SnippetLanguage;
57
+ size?: number;
58
+ };
59
+ declare function SDKIcon({
60
+ language
61
+ }: SDKIconProps): _$react_jsx_runtime0.JSX.Element | null;
62
+ type SDKRequestTitleProps = {
63
+ snippetLanguage: SnippetLanguage;
64
+ };
65
+ declare function SDKRequestTitle({
66
+ snippetLanguage
67
+ }: SDKRequestTitleProps): _$react_jsx_runtime0.JSX.Element;
68
+ type SDKExampleProps = {
69
+ method: Partial<Method> & HasStainlessPath;
70
+ transformRequestSnippet?: TransformRequestSnippetFn;
71
+ };
72
+ declare function SDKExample({
73
+ method,
74
+ transformRequestSnippet
75
+ }: SDKExampleProps): _$react_jsx_runtime0.JSX.Element;
76
+ type SDKMethodProps = {
77
+ method: Method;
78
+ transformRequestSnippet?: TransformRequestSnippetFn;
79
+ };
80
+ declare function SDKMethodHeader({
81
+ method
82
+ }: SDKMethodProps): _$react_jsx_runtime0.JSX.Element;
83
+ declare function useStreamingResponse(method: BaseDeclaration): ID | undefined;
84
+ declare function SDKMethodInfo({
85
+ method,
86
+ children
87
+ }: SDKMethodProps & {
88
+ children?: React$1.ReactNode;
89
+ }): _$react_jsx_runtime0.JSX.Element;
90
+ declare function SDKMethodNotImplemented({
91
+ method
92
+ }: SDKMethodProps): _$react_jsx_runtime0.JSX.Element;
93
+ declare function SDKMethodInfoContent(_props: SDKMethodProps): React$1.ReactNode;
94
+ declare function SDKMethod({
95
+ method,
96
+ transformRequestSnippet
97
+ }: SDKMethodProps): _$react_jsx_runtime0.JSX.Element;
98
+ type SDKModelProps = {
99
+ model: Model;
100
+ };
101
+ declare function SDKModel({
102
+ model
103
+ }: SDKModelProps): _$react_jsx_runtime0.JSX.Element | null;
104
+ type SDKReferenceProps = {
105
+ stainlessPath: string;
106
+ children?: React$1.ReactNode;
107
+ };
108
+ declare function SDKReference({
109
+ stainlessPath,
110
+ children
111
+ }: SDKReferenceProps): string | number | bigint | boolean | _$react_jsx_runtime0.JSX.Element | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | null | undefined;
112
+ type SDKLanguageBlockProps = {
113
+ language: DocsLanguage;
114
+ version: string;
115
+ install: string;
116
+ links: {
117
+ repo: string;
118
+ docs: string;
119
+ };
120
+ };
121
+ declare function SDKLanguageBlock({
122
+ language,
123
+ version,
124
+ install,
125
+ links
126
+ }: SDKLanguageBlockProps): _$react_jsx_runtime0.JSX.Element;
127
+ //#endregion
128
+ export { useStreamingResponse as A, SDKRequestTitleProps as C, useDeclarationParents as D, TransformRequestSnippetFn as E, usePropertyModel as O, SDKRequestTitle as S, SDKSnippetLanguagesType as T, SDKMethodNotImplemented as _, ReferenceNestingContextType as a, SDKModelProps as b, SDKConstraintsProps as c, SDKIcon as d, SDKLanguageBlock as f, SDKMethodInfoContent as g, SDKMethodInfo as h, ReferenceNestingContext as i, useReferenceNesting as k, SDKDeclaration as l, SDKMethodHeader as m, PropertyModelContext as n, SDKChildren as o, SDKMethod as p, PropertyModelContextType as r, SDKConstraints as s, DeclarationParentsContextType as t, SDKExample as u, SDKMethodProps as v, SDKSnippetLanguages as w, SDKReference as x, SDKModel as y };
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@stainless-api/docs-ui",
3
3
  "private": false,
4
- "version": "0.1.0-beta.94",
4
+ "version": "1.0.0-beta.96",
5
+ "license": "MIT",
5
6
  "publishConfig": {
6
7
  "access": "public"
7
8
  },
@@ -17,20 +18,20 @@
17
18
  "@markdoc/markdoc": "^0.5.7",
18
19
  "clsx": "^2.1.1",
19
20
  "htmlparser2": "^12.0.0",
20
- "lucide-react": "^0.577.0",
21
- "@stainless-api/ui-primitives": "0.1.0-beta.53"
21
+ "lucide-react": "^1.14.0",
22
+ "@stainless-api/ui-primitives": "1.0.0-beta.54"
22
23
  },
23
24
  "devDependencies": {
24
- "@tsdown/css": "^0.21.7",
25
+ "@tsdown/css": "^0.22.0",
25
26
  "@types/node": "24.12.2",
26
27
  "@types/react": "19.2.14",
27
28
  "@types/react-dom": "^19.2.3",
28
- "react": "^19.2.4",
29
- "react-dom": "^19.2.4",
30
- "tsdown": "^0.21.7",
31
- "typescript": "6.0.2",
29
+ "react": "^19.2.6",
30
+ "react-dom": "^19.2.6",
31
+ "tsdown": "^0.22.0",
32
+ "typescript": "6.0.3",
32
33
  "@stainless/eslint-config": "0.1.0-beta.2",
33
- "@stainless/sdk-json": "^0.1.0-beta.10"
34
+ "@stainless/sdk-json": "^0.1.0-beta.11"
34
35
  },
35
36
  "exports": {
36
37
  ".": {