@stainless-api/docs-ui 0.1.0-beta.5 → 0.1.0-beta.51
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-BdYnaHA8.d.ts +20 -0
- package/dist/breadcrumbs-CA7GmW_8.d.ts +20 -0
- package/dist/breadcrumbs-nSFZO5Gf.js +63 -0
- package/dist/chunk-DRcLgZ1e.js +18 -0
- package/dist/component-DRO8kQSp.js +23 -0
- package/dist/component-generics-B6Fn47Mz.js +45 -0
- package/dist/component-generics-BHFUK06s.d.ts +30 -0
- package/dist/component-generics-BJSyydZ-.d.ts +30 -0
- package/dist/components/MaskedInput.d.ts +14 -0
- package/dist/components/MaskedInput.js +76 -0
- package/dist/components/breadcrumbs.d.ts +2 -0
- package/dist/components/breadcrumbs.js +9 -0
- package/dist/components/icons.d.ts +55 -0
- package/dist/components/icons.js +3 -0
- package/dist/components/index.d.ts +10 -0
- package/dist/components/index.js +18 -0
- package/dist/components/method.d.ts +2 -0
- package/dist/components/method.js +10 -0
- package/dist/components/overview.d.ts +2 -0
- package/dist/components/overview.js +11 -0
- package/dist/components/primitives.d.ts +2 -0
- package/dist/components/primitives.js +8 -0
- package/dist/components/properties.d.ts +2 -0
- package/dist/components/properties.js +9 -0
- package/dist/components/sdk.d.ts +2 -0
- package/dist/components/sdk.js +10 -0
- package/dist/components/sidebar.d.ts +2 -0
- package/dist/components/sidebar.js +11 -0
- package/dist/components/snippets.d.ts +3 -0
- package/dist/components/snippets.js +9 -0
- package/dist/components-D7M-BwNI.js +71 -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 +16 -0
- package/dist/contexts/component-types.js +0 -0
- package/dist/contexts/component.d.ts +29 -0
- package/dist/contexts/component.js +27 -0
- package/dist/contexts/docs.d.ts +2 -0
- package/dist/contexts/docs.js +3 -0
- package/dist/contexts/index.d.ts +16 -0
- package/dist/contexts/index.js +7 -0
- package/dist/contexts/markdown.d.ts +2 -0
- package/dist/contexts/markdown.js +4 -0
- package/dist/contexts/navigation.d.ts +2 -0
- package/dist/contexts/navigation.js +3 -0
- package/dist/contexts/use-components.d.ts +14 -0
- package/dist/contexts/use-components.js +4 -0
- package/dist/contexts-p3rRZDlM.js +39 -0
- package/dist/csharp-CDSxfCZE.js +283 -0
- package/dist/docs-BUS__I1m.d.ts +47 -0
- package/dist/docs-CXqi26jB.js +54 -0
- package/dist/docs-fKyo35eI.d.ts +47 -0
- package/dist/go-1c3S5ETL.js +303 -0
- package/dist/http-2QNWXH9t.js +330 -0
- package/dist/icons-Ckod9aod.js +869 -0
- package/dist/index-5Yl-BBg3.d.ts +15 -0
- package/dist/index-9LRO8R1a.d.ts +274 -0
- package/dist/index-CBIJwoyp.d.ts +13 -0
- package/dist/index-ClCZKGcw.d.ts +274 -0
- package/dist/index-pMKpm2Jk.d.ts +13 -0
- package/dist/index-q3bZhNWj.d.ts +15 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +29 -7542
- package/dist/java-BbjF_oUI.js +403 -0
- package/dist/languages/csharp.d.ts +11 -0
- package/dist/languages/csharp.js +9 -0
- package/dist/languages/go.d.ts +11 -0
- package/dist/languages/go.js +9 -0
- package/dist/languages/http.d.ts +11 -0
- package/dist/languages/http.js +19 -0
- package/dist/languages/index.d.ts +11 -0
- package/dist/languages/index.js +26 -0
- package/dist/languages/java.d.ts +11 -0
- package/dist/languages/java.js +9 -0
- package/dist/languages/python.d.ts +11 -0
- package/dist/languages/python.js +9 -0
- package/dist/languages/ruby.d.ts +11 -0
- package/dist/languages/ruby.js +9 -0
- package/dist/languages/typescript.d.ts +11 -0
- package/dist/languages/typescript.js +9 -0
- package/dist/languages-BCYZjzuS.js +26 -0
- package/dist/markdown/index.d.ts +12 -0
- package/dist/markdown/index.js +104 -0
- package/dist/markdown/md.d.ts +15 -0
- package/dist/markdown/md.js +3 -0
- package/dist/markdown/printer.d.ts +2 -0
- package/dist/markdown/printer.js +28 -0
- package/dist/markdown/utils.d.ts +3 -0
- package/dist/markdown/utils.js +3 -0
- package/dist/markdown-C8o8WrwG.d.ts +22 -0
- package/dist/markdown-CqJohZei.d.ts +22 -0
- package/dist/markdown-CxdeWgjV.js +48 -0
- package/dist/md-oM2tUaCA.js +41 -0
- package/dist/method-CE08mUME.js +115 -0
- package/dist/method-CMt6uyix.d.ts +71 -0
- package/dist/method-r5UAB40b.d.ts +71 -0
- package/dist/navigation-9_4wRkcT.d.ts +29 -0
- package/dist/navigation-C5TN0SgC.js +24 -0
- package/dist/navigation-zuoWsXzh.d.ts +29 -0
- package/dist/overview-DXmLmmr7.d.ts +39 -0
- package/dist/overview-S2hUqPXA.js +139 -0
- package/dist/overview-ixhAhHj8.d.ts +39 -0
- package/dist/primitives-BIWfwN5L.js +258 -0
- package/dist/primitives-BVXfSSiS.d.ts +97 -0
- package/dist/primitives-Bl0wzAGo.d.ts +97 -0
- package/dist/printer-DBw4S_Jn.d.ts +13 -0
- package/dist/printer-bNxiG6UB.js +74 -0
- package/dist/properties-C-NU_ghj.d.ts +54 -0
- package/dist/properties-GT9ixNTg.d.ts +54 -0
- package/dist/properties-jlGW3USi.js +131 -0
- package/dist/python-USOwFDv_.js +279 -0
- package/dist/routing-CMqh1cTZ.d.ts +54 -0
- package/dist/routing-Wbb7YECB.js +194 -0
- package/dist/routing.d.ts +2 -0
- package/dist/routing.js +3 -180
- package/dist/ruby-CSvGbSLe.js +387 -0
- package/dist/sdk-B5W3VipN.d.ts +118 -0
- package/dist/sdk-CS6A3HW3.d.ts +118 -0
- package/dist/sdk-CSCbbn3O.js +336 -0
- package/dist/sidebar-C3fZrgmP.d.ts +36 -0
- package/dist/sidebar-CWyvCrJ0.js +81 -0
- package/dist/sidebar-CbCLUteD.d.ts +36 -0
- package/dist/snippets-BQLXEIf6.js +161 -0
- package/dist/snippets-C72s2IwS.d.ts +51 -0
- package/dist/snippets-DcFph7ir.d.ts +51 -0
- package/dist/spec.d.ts +65 -0
- package/dist/spec.js +167 -0
- package/dist/style-D7RO5ymE.d.ts +168 -0
- package/dist/style-gnVEeXFj.js +169 -0
- package/dist/style.d.ts +2 -0
- package/dist/style.js +3 -0
- package/dist/styles/main.css +727 -754
- package/dist/styles/main.js +0 -0
- package/dist/styles/primitives.css +317 -461
- package/dist/styles/primitives.js +0 -0
- package/dist/styles/resets.css +32 -41
- package/dist/styles/resets.js +0 -0
- package/dist/styles/search.css +175 -274
- package/dist/styles/search.js +0 -0
- package/dist/styles/sidebar.css +59 -60
- package/dist/styles/sidebar.js +0 -0
- package/dist/styles/variables.css +26 -89
- package/dist/styles/variables.js +0 -0
- package/dist/styles.css +2910 -0
- package/dist/styles.mjs +1 -0
- package/dist/typescript-DXG9psK3.js +449 -0
- package/dist/use-components-RWQbviGq.js +7 -0
- package/dist/utils-CqnL9Fc3.js +31 -0
- package/dist/utils-DGnJ6mcU.d.ts +21 -0
- package/dist/utils-D_1AWSRX.js +32 -0
- package/dist/utils-d8paVwKN.d.ts +14 -0
- package/dist/utils-uQbtk0-_.d.ts +21 -0
- package/dist/utils.d.ts +2 -0
- package/dist/utils.js +3 -0
- package/package.json +73 -21
- package/dist/mcp.js +0 -16003
- package/dist/styles/snippets.css +0 -132
- package/src/components/breadcrumbs.tsx +0 -94
- package/src/components/chat.tsx +0 -154
- package/src/components/dropdown.tsx +0 -91
- package/src/components/icons.tsx +0 -584
- package/src/components/index.ts +0 -9
- package/src/components/method.tsx +0 -144
- package/src/components/overview.tsx +0 -159
- package/src/components/primitives.tsx +0 -284
- package/src/components/properties.tsx +0 -130
- package/src/components/scripts/dropdown.ts +0 -78
- package/src/components/sdk.tsx +0 -402
- package/src/components/sidebar.tsx +0 -99
- package/src/components/snippets.tsx +0 -179
- package/src/contexts/component-generics.tsx +0 -48
- package/src/contexts/component-types.tsx +0 -5
- package/src/contexts/component.tsx +0 -32
- package/src/contexts/docs.tsx +0 -75
- package/src/contexts/index.tsx +0 -17
- package/src/contexts/markdown.tsx +0 -43
- package/src/contexts/navigation.tsx +0 -44
- package/src/contexts/search.tsx +0 -28
- package/src/contexts/use-components.tsx +0 -4
- package/src/index.ts +0 -6
- package/src/languages/go.tsx +0 -281
- package/src/languages/http.tsx +0 -321
- package/src/languages/index.ts +0 -26
- package/src/languages/java.tsx +0 -358
- package/src/languages/python.tsx +0 -255
- package/src/languages/ruby.tsx +0 -320
- package/src/languages/typescript.tsx +0 -393
- package/src/markdown/index.ts +0 -107
- package/src/markdown/md.ts +0 -45
- package/src/markdown/utils.ts +0 -49
- package/src/routing.ts +0 -238
- package/src/search/form.tsx +0 -127
- package/src/search/index.tsx +0 -1
- package/src/search/indexer.ts +0 -246
- package/src/search/mcp.ts +0 -61
- package/src/search/printer.tsx +0 -86
- package/src/search/providers/algolia.ts +0 -88
- package/src/search/providers/fuse.ts +0 -19
- package/src/search/providers/pagefind.ts +0 -17
- package/src/search/providers/walker.ts +0 -30
- package/src/search/results.tsx +0 -181
- package/src/search/state.ts +0 -64
- package/src/search/types.ts +0 -116
- package/src/style.ts +0 -197
- package/src/styles/main.css +0 -993
- package/src/styles/primitives.css +0 -573
- package/src/styles/resets.css +0 -47
- package/src/styles/search.css +0 -342
- package/src/styles/sidebar.css +0 -87
- package/src/styles/snippets.css +0 -132
- package/src/styles/variables.css +0 -90
- package/src/utils.ts +0 -41
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as useComponents, i as useComponentContext, n as ComponentsContextType, r as customizeComponents, t as ComponentProvider } from "../component-generics-BJSyydZ-.js";
|
|
2
|
+
export { ComponentProvider, ComponentsContextType, customizeComponents, useComponentContext, useComponents };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "../primitives-BVXfSSiS.js";
|
|
2
|
+
import "../breadcrumbs-CA7GmW_8.js";
|
|
3
|
+
import "../method-r5UAB40b.js";
|
|
4
|
+
import "../properties-GT9ixNTg.js";
|
|
5
|
+
import "../sdk-CS6A3HW3.js";
|
|
6
|
+
import "../snippets-C72s2IwS.js";
|
|
7
|
+
import "../overview-ixhAhHj8.js";
|
|
8
|
+
import "../sidebar-CbCLUteD.js";
|
|
9
|
+
import { t as index_d_exports } from "../index-q3bZhNWj.js";
|
|
10
|
+
import { r as index_d_exports$1 } from "../index-ClCZKGcw.js";
|
|
11
|
+
|
|
12
|
+
//#region src/contexts/component-types.d.ts
|
|
13
|
+
type AppComponents = typeof index_d_exports;
|
|
14
|
+
type AppLanguage = typeof index_d_exports$1;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { AppComponents, AppLanguage };
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import "../primitives-BVXfSSiS.js";
|
|
2
|
+
import "../breadcrumbs-CA7GmW_8.js";
|
|
3
|
+
import "../method-r5UAB40b.js";
|
|
4
|
+
import "../properties-GT9ixNTg.js";
|
|
5
|
+
import "../sdk-CS6A3HW3.js";
|
|
6
|
+
import "../snippets-C72s2IwS.js";
|
|
7
|
+
import "../overview-ixhAhHj8.js";
|
|
8
|
+
import "../sidebar-CbCLUteD.js";
|
|
9
|
+
import { t as index_d_exports } from "../index-q3bZhNWj.js";
|
|
10
|
+
import { n as ComponentsContextType } from "../component-generics-BJSyydZ-.js";
|
|
11
|
+
import { r as index_d_exports$1 } from "../index-ClCZKGcw.js";
|
|
12
|
+
import React from "react";
|
|
13
|
+
import * as react_jsx_runtime33 from "react/jsx-runtime";
|
|
14
|
+
|
|
15
|
+
//#region src/contexts/component.d.ts
|
|
16
|
+
type AppComponents = typeof index_d_exports;
|
|
17
|
+
type AppLanguage = typeof index_d_exports$1;
|
|
18
|
+
declare const defaultContextValue: ComponentsContextType<AppComponents, AppLanguage>;
|
|
19
|
+
declare function ComponentProvider({
|
|
20
|
+
components,
|
|
21
|
+
language,
|
|
22
|
+
children
|
|
23
|
+
}: {
|
|
24
|
+
components?: Partial<AppComponents>;
|
|
25
|
+
language?: { [K in keyof AppLanguage]?: Partial<AppLanguage[K]> };
|
|
26
|
+
children: React.ReactNode;
|
|
27
|
+
}): react_jsx_runtime33.JSX.Element;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { AppComponents, AppLanguage, ComponentProvider, defaultContextValue };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import "../docs-CXqi26jB.js";
|
|
2
|
+
import "../component-generics-B6Fn47Mz.js";
|
|
3
|
+
import "../navigation-C5TN0SgC.js";
|
|
4
|
+
import "../markdown-CxdeWgjV.js";
|
|
5
|
+
import "../contexts-p3rRZDlM.js";
|
|
6
|
+
import "../use-components-RWQbviGq.js";
|
|
7
|
+
import "../properties-jlGW3USi.js";
|
|
8
|
+
import "../method-CE08mUME.js";
|
|
9
|
+
import "../primitives-BIWfwN5L.js";
|
|
10
|
+
import "../icons-Ckod9aod.js";
|
|
11
|
+
import "../sdk-CSCbbn3O.js";
|
|
12
|
+
import "../snippets-BQLXEIf6.js";
|
|
13
|
+
import "../overview-S2hUqPXA.js";
|
|
14
|
+
import "../breadcrumbs-nSFZO5Gf.js";
|
|
15
|
+
import "../sidebar-CWyvCrJ0.js";
|
|
16
|
+
import "../components-D7M-BwNI.js";
|
|
17
|
+
import "../typescript-DXG9psK3.js";
|
|
18
|
+
import "../java-BbjF_oUI.js";
|
|
19
|
+
import "../go-1c3S5ETL.js";
|
|
20
|
+
import "../python-USOwFDv_.js";
|
|
21
|
+
import "../ruby-CSvGbSLe.js";
|
|
22
|
+
import "../http-2QNWXH9t.js";
|
|
23
|
+
import "../csharp-CDSxfCZE.js";
|
|
24
|
+
import "../languages-BCYZjzuS.js";
|
|
25
|
+
import { n as defaultContextValue, t as ComponentProvider } from "../component-DRO8kQSp.js";
|
|
26
|
+
|
|
27
|
+
export { ComponentProvider, defaultContextValue };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
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-BUS__I1m.js";
|
|
2
|
+
export { ContentPanelLayout, DocsContextType, DocsProvider, DocsProviderProps, PropertySettingsType, useContentPanelLayout, useDeclaration, useDocs, useLanguage, useResource, useSettings, useSnippet, useSpec };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { a as useLanguage, c as useSnippet, i as useDocs, l as useSpec, n as useContentPanelLayout, o as useResource, r as useDeclaration, s as useSettings, t as DocsProvider } from "../docs-CXqi26jB.js";
|
|
2
|
+
|
|
3
|
+
export { DocsProvider, useContentPanelLayout, useDeclaration, useDocs, useLanguage, useResource, useSettings, useSnippet, useSpec };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "../primitives-BVXfSSiS.js";
|
|
2
|
+
import "../breadcrumbs-CA7GmW_8.js";
|
|
3
|
+
import "../method-r5UAB40b.js";
|
|
4
|
+
import "../properties-GT9ixNTg.js";
|
|
5
|
+
import "../sdk-CS6A3HW3.js";
|
|
6
|
+
import "../snippets-C72s2IwS.js";
|
|
7
|
+
import "../overview-ixhAhHj8.js";
|
|
8
|
+
import "../sidebar-CbCLUteD.js";
|
|
9
|
+
import "../index-q3bZhNWj.js";
|
|
10
|
+
import { a as useComponents, i as useComponentContext, n as ComponentsContextType, r as customizeComponents, t as ComponentProvider } from "../component-generics-BJSyydZ-.js";
|
|
11
|
+
import "../index-ClCZKGcw.js";
|
|
12
|
+
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-BUS__I1m.js";
|
|
13
|
+
import { a as useNavigation, i as NavigationProviderProps, n as NavigationHandler, r as NavigationProvider, t as NavigationContextType } from "../navigation-9_4wRkcT.js";
|
|
14
|
+
import { a as useMarkdownContext, i as useHighlight, n as MarkdownProvider, o as useRenderMarkdown, r as MarkdownProviderProps, t as MarkdownContext } from "../markdown-CqJohZei.js";
|
|
15
|
+
import { n as useLanguageComponents } from "../index-pMKpm2Jk.js";
|
|
16
|
+
export { ComponentProvider, ComponentsContextType, ContentPanelLayout, DocsContextType, DocsProvider, DocsProviderProps, MarkdownContext, MarkdownProvider, MarkdownProviderProps, NavigationContextType, NavigationHandler, NavigationProvider, NavigationProviderProps, PropertySettingsType, customizeComponents, useComponentContext, useComponents, useContentPanelLayout, useDeclaration, useDocs, useHighlight, useLanguage, useLanguageComponents, useMarkdownContext, useNavigation, useRenderMarkdown, useResource, useSettings, useSnippet, useSpec };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { a as useLanguage, c as useSnippet, i as useDocs, l as useSpec, n as useContentPanelLayout, o as useResource, r as useDeclaration, s as useSettings, t as DocsProvider } from "../docs-CXqi26jB.js";
|
|
2
|
+
import { i as useComponents, n as customizeComponents, r as useComponentContext, t as ComponentProvider } from "../component-generics-B6Fn47Mz.js";
|
|
3
|
+
import { n as useNavigation, t as NavigationProvider } from "../navigation-C5TN0SgC.js";
|
|
4
|
+
import { a as useRenderMarkdown, i as useMarkdownContext, n as MarkdownProvider, r as useHighlight, t as MarkdownContext } from "../markdown-CxdeWgjV.js";
|
|
5
|
+
import { n as useLanguageComponents } from "../contexts-p3rRZDlM.js";
|
|
6
|
+
|
|
7
|
+
export { ComponentProvider, DocsProvider, MarkdownContext, MarkdownProvider, NavigationProvider, customizeComponents, useComponentContext, useComponents, useContentPanelLayout, useDeclaration, useDocs, useHighlight, useLanguage, useLanguageComponents, useMarkdownContext, useNavigation, useRenderMarkdown, useResource, useSettings, useSnippet, useSpec };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as useMarkdownContext, i as useHighlight, n as MarkdownProvider, o as useRenderMarkdown, r as MarkdownProviderProps, t as MarkdownContext } from "../markdown-CqJohZei.js";
|
|
2
|
+
export { MarkdownContext, MarkdownProvider, MarkdownProviderProps, useHighlight, useMarkdownContext, useRenderMarkdown };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import "../docs-CXqi26jB.js";
|
|
2
|
+
import { a as useRenderMarkdown, i as useMarkdownContext, n as MarkdownProvider, r as useHighlight, t as MarkdownContext } from "../markdown-CxdeWgjV.js";
|
|
3
|
+
|
|
4
|
+
export { MarkdownContext, MarkdownProvider, useHighlight, useMarkdownContext, useRenderMarkdown };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as useNavigation, i as NavigationProviderProps, n as NavigationHandler, r as NavigationProvider, t as NavigationContextType } from "../navigation-9_4wRkcT.js";
|
|
2
|
+
export { NavigationContextType, NavigationHandler, NavigationProvider, NavigationProviderProps, useNavigation };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "../primitives-BVXfSSiS.js";
|
|
2
|
+
import "../breadcrumbs-CA7GmW_8.js";
|
|
3
|
+
import "../method-r5UAB40b.js";
|
|
4
|
+
import "../properties-GT9ixNTg.js";
|
|
5
|
+
import "../sdk-CS6A3HW3.js";
|
|
6
|
+
import "../snippets-C72s2IwS.js";
|
|
7
|
+
import "../overview-ixhAhHj8.js";
|
|
8
|
+
import "../sidebar-CbCLUteD.js";
|
|
9
|
+
import { t as index_d_exports } from "../index-q3bZhNWj.js";
|
|
10
|
+
|
|
11
|
+
//#region src/contexts/use-components.d.ts
|
|
12
|
+
declare const useComponents: () => typeof index_d_exports;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { useComponents };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { t as __export } from "./chunk-DRcLgZ1e.js";
|
|
2
|
+
import { a as useLanguage, c as useSnippet, i as useDocs, l as useSpec, n as useContentPanelLayout, o as useResource, r as useDeclaration, s as useSettings, t as DocsProvider } from "./docs-CXqi26jB.js";
|
|
3
|
+
import { i as useComponents, n as customizeComponents, r as useComponentContext, t as ComponentProvider } from "./component-generics-B6Fn47Mz.js";
|
|
4
|
+
import { n as useNavigation, t as NavigationProvider } from "./navigation-C5TN0SgC.js";
|
|
5
|
+
import { a as useRenderMarkdown, i as useMarkdownContext, n as MarkdownProvider, r as useHighlight, t as MarkdownContext } from "./markdown-CxdeWgjV.js";
|
|
6
|
+
|
|
7
|
+
//#region src/contexts/index.tsx
|
|
8
|
+
var contexts_exports = /* @__PURE__ */ __export({
|
|
9
|
+
ComponentProvider: () => ComponentProvider,
|
|
10
|
+
DocsProvider: () => DocsProvider,
|
|
11
|
+
MarkdownContext: () => MarkdownContext,
|
|
12
|
+
MarkdownProvider: () => MarkdownProvider,
|
|
13
|
+
NavigationProvider: () => NavigationProvider,
|
|
14
|
+
customizeComponents: () => customizeComponents,
|
|
15
|
+
useComponentContext: () => useComponentContext,
|
|
16
|
+
useComponents: () => useComponents,
|
|
17
|
+
useContentPanelLayout: () => useContentPanelLayout,
|
|
18
|
+
useDeclaration: () => useDeclaration,
|
|
19
|
+
useDocs: () => useDocs,
|
|
20
|
+
useHighlight: () => useHighlight,
|
|
21
|
+
useLanguage: () => useLanguage,
|
|
22
|
+
useLanguageComponents: () => useLanguageComponents,
|
|
23
|
+
useMarkdownContext: () => useMarkdownContext,
|
|
24
|
+
useNavigation: () => useNavigation,
|
|
25
|
+
useRenderMarkdown: () => useRenderMarkdown,
|
|
26
|
+
useResource: () => useResource,
|
|
27
|
+
useSettings: () => useSettings,
|
|
28
|
+
useSnippet: () => useSnippet,
|
|
29
|
+
useSpec: () => useSpec
|
|
30
|
+
});
|
|
31
|
+
function useLanguageComponents() {
|
|
32
|
+
const language = useLanguage();
|
|
33
|
+
const definition = useComponentContext().language[language];
|
|
34
|
+
if (!definition) throw new Error(`Language component definition not found for language: ${language}`);
|
|
35
|
+
return definition;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
export { useLanguageComponents as n, contexts_exports as t };
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
import { t as __export } from "./chunk-DRcLgZ1e.js";
|
|
2
|
+
import { n as useLanguageComponents } from "./contexts-p3rRZDlM.js";
|
|
3
|
+
import { t as useComponents } from "./use-components-RWQbviGq.js";
|
|
4
|
+
import { t as style_default } from "./style-gnVEeXFj.js";
|
|
5
|
+
import * as React$1 from "react";
|
|
6
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/languages/csharp.tsx
|
|
9
|
+
var csharp_exports = /* @__PURE__ */ __export({
|
|
10
|
+
Declaration: () => Declaration,
|
|
11
|
+
MethodSignature: () => MethodSignature,
|
|
12
|
+
Property: () => Property,
|
|
13
|
+
Type: () => Type,
|
|
14
|
+
TypeName: () => TypeName
|
|
15
|
+
});
|
|
16
|
+
const constStyle = {
|
|
17
|
+
string: style_default.LiteralString,
|
|
18
|
+
number: style_default.LiteralNumeric,
|
|
19
|
+
boolean: style_default.LiteralBoolean
|
|
20
|
+
};
|
|
21
|
+
function TypeName({ type, optional }) {
|
|
22
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(useLanguageComponents().Type, { type }), optional && /* @__PURE__ */ jsx("span", {
|
|
23
|
+
className: style_default.TextOperator,
|
|
24
|
+
children: "? "
|
|
25
|
+
})] });
|
|
26
|
+
}
|
|
27
|
+
function Type({ type }) {
|
|
28
|
+
const Lang = useLanguageComponents();
|
|
29
|
+
const { Join, SDKReference } = useComponents();
|
|
30
|
+
switch (type.kind) {
|
|
31
|
+
case "CSharpTypeReference": {
|
|
32
|
+
const params = type.typeParameters?.map((param, key) => /* @__PURE__ */ jsx(Lang.Type, { type: param }, key));
|
|
33
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
34
|
+
className: style_default.Type,
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ jsx(SDKReference, {
|
|
37
|
+
stainlessPath: type.$ref,
|
|
38
|
+
children: type.typeName
|
|
39
|
+
}),
|
|
40
|
+
params && params.length > 0 ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
41
|
+
/* @__PURE__ */ jsx("span", {
|
|
42
|
+
className: style_default.TypeBracket,
|
|
43
|
+
children: "<"
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ jsx(Join, {
|
|
46
|
+
items: params,
|
|
47
|
+
limit: 3,
|
|
48
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
49
|
+
className: style_default.TextOperator,
|
|
50
|
+
children: ", "
|
|
51
|
+
})
|
|
52
|
+
}),
|
|
53
|
+
/* @__PURE__ */ jsx("span", {
|
|
54
|
+
className: style_default.TypeBracket,
|
|
55
|
+
children: ">"
|
|
56
|
+
})
|
|
57
|
+
] }) : null,
|
|
58
|
+
type.nullable && /* @__PURE__ */ jsx("span", {
|
|
59
|
+
className: style_default.TextOperator,
|
|
60
|
+
children: "?"
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
case "CSharpTypeClass":
|
|
66
|
+
case "CSharpTypeUnion": return /* @__PURE__ */ jsx("span", {
|
|
67
|
+
className: style_default.Type,
|
|
68
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
69
|
+
className: style_default.TypeKeyword,
|
|
70
|
+
children: "class"
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
case "CSharpTypeEnum":
|
|
74
|
+
case "CSharpTypeBoolean":
|
|
75
|
+
case "CSharpTypeFloat":
|
|
76
|
+
case "CSharpTypeDouble":
|
|
77
|
+
case "CSharpTypeInt":
|
|
78
|
+
case "CSharpTypeLong": return /* @__PURE__ */ jsx("span", {
|
|
79
|
+
className: style_default.Type,
|
|
80
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
81
|
+
className: style_default.TypeKeyword,
|
|
82
|
+
children: type.kind.slice(10)
|
|
83
|
+
})
|
|
84
|
+
});
|
|
85
|
+
case "CSharpTypeString": return /* @__PURE__ */ jsx("span", {
|
|
86
|
+
className: style_default.Type,
|
|
87
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
88
|
+
className: style_default.TypeString,
|
|
89
|
+
children: "string"
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
case "CSharpTypeConstant": return /* @__PURE__ */ jsx("span", {
|
|
93
|
+
className: style_default.Type,
|
|
94
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
95
|
+
className: style_default.TypeKeyword,
|
|
96
|
+
children: "JsonElement"
|
|
97
|
+
})
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
function MethodSignature({ decl }) {
|
|
102
|
+
const Lang = useLanguageComponents();
|
|
103
|
+
const { Join, Tooltip } = useComponents();
|
|
104
|
+
const params = decl.parameters.map((param, i) => /* @__PURE__ */ jsx(React$1.Fragment, { children: /* @__PURE__ */ jsxs(Tooltip, {
|
|
105
|
+
content: /* @__PURE__ */ jsx(Lang.Type, { type: param.typeAnnotation }),
|
|
106
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
107
|
+
className: style_default.TextIdentifier,
|
|
108
|
+
children: param.ident
|
|
109
|
+
}), param.hasDefault && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
110
|
+
" ",
|
|
111
|
+
/* @__PURE__ */ jsx("span", {
|
|
112
|
+
className: style_default.TextOperator,
|
|
113
|
+
children: "="
|
|
114
|
+
}),
|
|
115
|
+
" ",
|
|
116
|
+
/* @__PURE__ */ jsx("span", {
|
|
117
|
+
className: style_default.TextKeyword,
|
|
118
|
+
children: "default"
|
|
119
|
+
})
|
|
120
|
+
] })]
|
|
121
|
+
}) }, i));
|
|
122
|
+
return /* @__PURE__ */ jsx("div", {
|
|
123
|
+
className: style_default.MethodSignature,
|
|
124
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
125
|
+
className: style_default.SignatureTitle,
|
|
126
|
+
children: [
|
|
127
|
+
decl.returnType && /* @__PURE__ */ jsxs("span", {
|
|
128
|
+
className: style_default.SignatureReturns,
|
|
129
|
+
children: [/* @__PURE__ */ jsx(Lang.Type, { type: decl.returnType }), " "]
|
|
130
|
+
}),
|
|
131
|
+
decl.qualified && /* @__PURE__ */ jsx("span", {
|
|
132
|
+
className: style_default.SignatureQualified,
|
|
133
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
134
|
+
className: style_default.TextIdentifier,
|
|
135
|
+
children: decl.qualified?.slice(0, -decl.ident.length)
|
|
136
|
+
})
|
|
137
|
+
}),
|
|
138
|
+
/* @__PURE__ */ jsx("span", {
|
|
139
|
+
className: style_default.SignatureName,
|
|
140
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
141
|
+
className: style_default.TextIdentifier,
|
|
142
|
+
children: decl.ident
|
|
143
|
+
})
|
|
144
|
+
}),
|
|
145
|
+
/* @__PURE__ */ jsxs("span", {
|
|
146
|
+
className: style_default.MethodSignature,
|
|
147
|
+
children: [
|
|
148
|
+
/* @__PURE__ */ jsx("span", {
|
|
149
|
+
className: style_default.SignatureParen,
|
|
150
|
+
children: "("
|
|
151
|
+
}),
|
|
152
|
+
/* @__PURE__ */ jsx("span", {
|
|
153
|
+
className: style_default.SignatureParams,
|
|
154
|
+
children: /* @__PURE__ */ jsx(Join, {
|
|
155
|
+
items: params,
|
|
156
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
157
|
+
className: style_default.TextOperator,
|
|
158
|
+
children: ", "
|
|
159
|
+
})
|
|
160
|
+
})
|
|
161
|
+
}),
|
|
162
|
+
/* @__PURE__ */ jsxs("span", {
|
|
163
|
+
className: style_default.SignatureParen,
|
|
164
|
+
children: [")", " "]
|
|
165
|
+
})
|
|
166
|
+
]
|
|
167
|
+
})
|
|
168
|
+
]
|
|
169
|
+
})
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
function Property({ decl, children }) {
|
|
173
|
+
const Lang = useLanguageComponents();
|
|
174
|
+
if (!decl) return null;
|
|
175
|
+
switch (decl.kind) {
|
|
176
|
+
case "CSharpDeclProperty": {
|
|
177
|
+
const type = /* @__PURE__ */ jsx(Lang.Type, {
|
|
178
|
+
type: decl.type,
|
|
179
|
+
optional: decl.optional
|
|
180
|
+
});
|
|
181
|
+
return children({
|
|
182
|
+
name: decl.ident,
|
|
183
|
+
typeName: /* @__PURE__ */ jsx(Lang.TypeName, {
|
|
184
|
+
type: decl.type,
|
|
185
|
+
optional: decl.optional
|
|
186
|
+
}),
|
|
187
|
+
type
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
case "CSharpDeclConst": return children({
|
|
191
|
+
name: decl.ident,
|
|
192
|
+
typeName: "constant",
|
|
193
|
+
type: /* @__PURE__ */ jsx("span", {
|
|
194
|
+
className: constStyle[typeof decl.value],
|
|
195
|
+
children: JSON.stringify(decl.value)
|
|
196
|
+
})
|
|
197
|
+
});
|
|
198
|
+
case "CSharpDeclType": {
|
|
199
|
+
const typeName = decl.type.kind === "CSharpTypeUnion" ? "union" : decl.type.kind === "CSharpTypeEnum" ? "enum" : "class";
|
|
200
|
+
return children({
|
|
201
|
+
name: decl.ident,
|
|
202
|
+
typeName
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
case "CSharpDeclReference": return children({ type: /* @__PURE__ */ jsx(Lang.Type, { type: decl.type }) });
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
function Declaration({ decl }) {
|
|
209
|
+
const Docs = useComponents();
|
|
210
|
+
const Lang = useLanguageComponents();
|
|
211
|
+
if (!decl) return null;
|
|
212
|
+
switch (decl.kind) {
|
|
213
|
+
case "CSharpDeclConst": return /* @__PURE__ */ jsxs(Fragment$1, { children: [" ", /* @__PURE__ */ jsx(Docs.Tooltip, {
|
|
214
|
+
content: /* @__PURE__ */ jsx("span", {
|
|
215
|
+
className: style_default.TextIdentifier,
|
|
216
|
+
children: decl.value
|
|
217
|
+
}),
|
|
218
|
+
children: /* @__PURE__ */ jsx(Docs.Badge, { id: "constant" })
|
|
219
|
+
})] });
|
|
220
|
+
case "CSharpDeclType": {
|
|
221
|
+
const keyword = decl.type.kind === "CSharpTypeEnum" ? "enum" : "class";
|
|
222
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
223
|
+
/* @__PURE__ */ jsx("span", {
|
|
224
|
+
className: style_default.TextKeyword,
|
|
225
|
+
children: keyword
|
|
226
|
+
}),
|
|
227
|
+
" ",
|
|
228
|
+
/* @__PURE__ */ jsx("span", {
|
|
229
|
+
className: style_default.TextIdentifier,
|
|
230
|
+
children: decl.ident
|
|
231
|
+
}),
|
|
232
|
+
/* @__PURE__ */ jsx("span", {
|
|
233
|
+
className: style_default.TextPunctuation,
|
|
234
|
+
children: ":"
|
|
235
|
+
}),
|
|
236
|
+
decl.type.kind === "CSharpTypeUnion" && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
237
|
+
" ",
|
|
238
|
+
/* @__PURE__ */ jsx(Docs.Tooltip, {
|
|
239
|
+
content: "A class that can be one of several variants.",
|
|
240
|
+
children: /* @__PURE__ */ jsx(Docs.Badge, {
|
|
241
|
+
id: "csharp-union",
|
|
242
|
+
children: "union"
|
|
243
|
+
})
|
|
244
|
+
}),
|
|
245
|
+
" "
|
|
246
|
+
] })
|
|
247
|
+
] });
|
|
248
|
+
}
|
|
249
|
+
case "CSharpDeclProperty": return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
250
|
+
decl.optional === false && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
251
|
+
className: style_default.TextKeyword,
|
|
252
|
+
children: "required"
|
|
253
|
+
}), " "] }),
|
|
254
|
+
/* @__PURE__ */ jsx(Lang.Type, {
|
|
255
|
+
type: decl.type,
|
|
256
|
+
optional: decl.optional
|
|
257
|
+
}),
|
|
258
|
+
decl.nullable && !("nullable" in decl.type && decl.type.nullable) && /* @__PURE__ */ jsx("span", {
|
|
259
|
+
className: style_default.TextOperator,
|
|
260
|
+
children: "?"
|
|
261
|
+
}),
|
|
262
|
+
" ",
|
|
263
|
+
/* @__PURE__ */ jsx("span", {
|
|
264
|
+
className: style_default.TextIdentifier,
|
|
265
|
+
children: decl.ident
|
|
266
|
+
}),
|
|
267
|
+
decl.type.kind === "CSharpTypeConstant" && /* @__PURE__ */ jsxs(Fragment$1, { children: [" ", /* @__PURE__ */ jsx(Docs.Tooltip, {
|
|
268
|
+
content: /* @__PURE__ */ jsx("span", {
|
|
269
|
+
className: style_default.TextIdentifier,
|
|
270
|
+
children: decl.type.value
|
|
271
|
+
}),
|
|
272
|
+
children: /* @__PURE__ */ jsx(Docs.Badge, {
|
|
273
|
+
id: "csharp-constant",
|
|
274
|
+
children: "constant"
|
|
275
|
+
})
|
|
276
|
+
})] })
|
|
277
|
+
] });
|
|
278
|
+
case "CSharpDeclReference": return /* @__PURE__ */ jsx(Lang.Type, { type: decl.type });
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
//#endregion
|
|
283
|
+
export { TypeName as a, Type as i, MethodSignature as n, csharp_exports as o, Property as r, Declaration as t };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as react_jsx_runtime34 from "react/jsx-runtime";
|
|
3
|
+
import * as _stainless_sdk_json0 from "@stainless/sdk-json";
|
|
4
|
+
import { LanguageDeclNodes, Spec, SpecLanguage } from "@stainless/sdk-json";
|
|
5
|
+
|
|
6
|
+
//#region src/contexts/docs.d.ts
|
|
7
|
+
type ContentPanelLayout = 'double-pane' | 'single-pane';
|
|
8
|
+
type PropertySettingsType = {
|
|
9
|
+
types?: 'simple' | 'rich';
|
|
10
|
+
includeModelProperties?: boolean;
|
|
11
|
+
collapseDescription?: boolean;
|
|
12
|
+
showTitle?: boolean;
|
|
13
|
+
expandDepth?: number;
|
|
14
|
+
};
|
|
15
|
+
type DocsContextType = {
|
|
16
|
+
language: SpecLanguage;
|
|
17
|
+
spec: Spec | null;
|
|
18
|
+
settings?: {
|
|
19
|
+
properties?: PropertySettingsType;
|
|
20
|
+
contentPanelLayout?: ContentPanelLayout;
|
|
21
|
+
virtualExpanders?: boolean;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
declare function useDocs(): DocsContextType;
|
|
25
|
+
declare function useSpec(): Spec | null;
|
|
26
|
+
declare function useSettings(): {
|
|
27
|
+
properties?: PropertySettingsType;
|
|
28
|
+
contentPanelLayout?: ContentPanelLayout;
|
|
29
|
+
virtualExpanders?: boolean;
|
|
30
|
+
} | undefined;
|
|
31
|
+
declare function useSnippet(stainlessPath: string, language?: SpecLanguage, variant?: string): string | undefined;
|
|
32
|
+
type Declaration = LanguageDeclNodes[SpecLanguage];
|
|
33
|
+
declare function useDeclaration<Required extends boolean>(stainlessPath: string, required: Required, language?: SpecLanguage): (Required extends true ? never : undefined) | Declaration;
|
|
34
|
+
declare function useResource(name: string): _stainless_sdk_json0.Resource | undefined;
|
|
35
|
+
declare function useLanguage(): "http" | "node" | "python" | "go" | "typescript" | "terraform" | "ruby" | "java" | "kotlin" | "csharp" | "php";
|
|
36
|
+
declare function useContentPanelLayout(): ContentPanelLayout;
|
|
37
|
+
type DocsProviderProps = DocsContextType & {
|
|
38
|
+
children: React$1.ReactNode;
|
|
39
|
+
};
|
|
40
|
+
declare function DocsProvider({
|
|
41
|
+
spec,
|
|
42
|
+
language,
|
|
43
|
+
settings,
|
|
44
|
+
children
|
|
45
|
+
}: DocsProviderProps): react_jsx_runtime34.JSX.Element;
|
|
46
|
+
//#endregion
|
|
47
|
+
export { PropertySettingsType as a, useDocs as c, useSettings as d, useSnippet as f, DocsProviderProps as i, useLanguage as l, DocsContextType as n, useContentPanelLayout as o, useSpec as p, DocsProvider as r, useDeclaration as s, ContentPanelLayout as t, useResource as u };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/contexts/docs.tsx
|
|
5
|
+
const DocsContextDefaults = {
|
|
6
|
+
settings: {},
|
|
7
|
+
language: "node",
|
|
8
|
+
spec: null
|
|
9
|
+
};
|
|
10
|
+
const DocsContext = React$1.createContext(DocsContextDefaults);
|
|
11
|
+
function useDocs() {
|
|
12
|
+
return React$1.useContext(DocsContext);
|
|
13
|
+
}
|
|
14
|
+
function useSpec() {
|
|
15
|
+
return useDocs().spec;
|
|
16
|
+
}
|
|
17
|
+
function useSettings() {
|
|
18
|
+
return useDocs().settings;
|
|
19
|
+
}
|
|
20
|
+
function useSnippet(stainlessPath, language, variant) {
|
|
21
|
+
const defaultLanguage = useLanguage();
|
|
22
|
+
const snippetLanguage = [language ?? defaultLanguage, variant ?? "default"].join(".");
|
|
23
|
+
return useSpec()?.snippets?.[snippetLanguage]?.[stainlessPath];
|
|
24
|
+
}
|
|
25
|
+
function useDeclaration(stainlessPath, required, language) {
|
|
26
|
+
const defaultLanguage = useLanguage();
|
|
27
|
+
const decl = useSpec()?.decls?.[language ?? defaultLanguage]?.[stainlessPath];
|
|
28
|
+
if (required && !decl) throw new Error(`Declaration not found for '${stainlessPath}'`);
|
|
29
|
+
return decl;
|
|
30
|
+
}
|
|
31
|
+
function useResource(name) {
|
|
32
|
+
return useSpec()?.resources?.[name];
|
|
33
|
+
}
|
|
34
|
+
function useLanguage() {
|
|
35
|
+
return useDocs().language;
|
|
36
|
+
}
|
|
37
|
+
function useContentPanelLayout() {
|
|
38
|
+
return useDocs().settings?.contentPanelLayout ?? "double-pane";
|
|
39
|
+
}
|
|
40
|
+
function DocsProvider({ spec, language, settings, children }) {
|
|
41
|
+
const value = {
|
|
42
|
+
...DocsContextDefaults,
|
|
43
|
+
spec,
|
|
44
|
+
settings: settings ?? DocsContextDefaults.settings,
|
|
45
|
+
language: language ?? DocsContextDefaults.language
|
|
46
|
+
};
|
|
47
|
+
return /* @__PURE__ */ jsx(DocsContext.Provider, {
|
|
48
|
+
value,
|
|
49
|
+
children
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
//#endregion
|
|
54
|
+
export { useLanguage as a, useSnippet as c, useDocs as i, useSpec as l, useContentPanelLayout as n, useResource as o, useDeclaration as r, useSettings as s, DocsProvider as t };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as react_jsx_runtime26 from "react/jsx-runtime";
|
|
3
|
+
import * as _stainless_sdk_json0 from "@stainless/sdk-json";
|
|
4
|
+
import { LanguageDeclNodes, Spec, SpecLanguage } from "@stainless/sdk-json";
|
|
5
|
+
|
|
6
|
+
//#region src/contexts/docs.d.ts
|
|
7
|
+
type ContentPanelLayout = 'double-pane' | 'single-pane';
|
|
8
|
+
type PropertySettingsType = {
|
|
9
|
+
types?: 'simple' | 'rich';
|
|
10
|
+
includeModelProperties?: boolean;
|
|
11
|
+
collapseDescription?: boolean;
|
|
12
|
+
showTitle?: boolean;
|
|
13
|
+
expandDepth?: number;
|
|
14
|
+
};
|
|
15
|
+
type DocsContextType = {
|
|
16
|
+
language: SpecLanguage;
|
|
17
|
+
spec: Spec | null;
|
|
18
|
+
settings?: {
|
|
19
|
+
properties?: PropertySettingsType;
|
|
20
|
+
contentPanelLayout?: ContentPanelLayout;
|
|
21
|
+
virtualExpanders?: boolean;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
declare function useDocs(): DocsContextType;
|
|
25
|
+
declare function useSpec(): Spec | null;
|
|
26
|
+
declare function useSettings(): {
|
|
27
|
+
properties?: PropertySettingsType;
|
|
28
|
+
contentPanelLayout?: ContentPanelLayout;
|
|
29
|
+
virtualExpanders?: boolean;
|
|
30
|
+
} | undefined;
|
|
31
|
+
declare function useSnippet(stainlessPath: string, language?: SpecLanguage, variant?: string): string | undefined;
|
|
32
|
+
type Declaration = LanguageDeclNodes[SpecLanguage];
|
|
33
|
+
declare function useDeclaration<Required extends boolean>(stainlessPath: string, required: Required, language?: SpecLanguage): (Required extends true ? never : undefined) | Declaration;
|
|
34
|
+
declare function useResource(name: string): _stainless_sdk_json0.Resource | undefined;
|
|
35
|
+
declare function useLanguage(): "http" | "node" | "python" | "go" | "typescript" | "terraform" | "ruby" | "java" | "kotlin" | "csharp" | "php";
|
|
36
|
+
declare function useContentPanelLayout(): ContentPanelLayout;
|
|
37
|
+
type DocsProviderProps = DocsContextType & {
|
|
38
|
+
children: React$1.ReactNode;
|
|
39
|
+
};
|
|
40
|
+
declare function DocsProvider({
|
|
41
|
+
spec,
|
|
42
|
+
language,
|
|
43
|
+
settings,
|
|
44
|
+
children
|
|
45
|
+
}: DocsProviderProps): react_jsx_runtime26.JSX.Element;
|
|
46
|
+
//#endregion
|
|
47
|
+
export { PropertySettingsType as a, useDocs as c, useSettings as d, useSnippet as f, DocsProviderProps as i, useLanguage as l, DocsContextType as n, useContentPanelLayout as o, useSpec as p, DocsProvider as r, useDeclaration as s, ContentPanelLayout as t, useResource as u };
|