@stainless-api/docs-ui 0.1.0-beta.85 → 0.1.0-beta.87

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/breadcrumbs-DC2_z7nh.d.ts +25 -0
  2. package/dist/chunk-pbuEa-1d.js +13 -0
  3. package/dist/component-generics-DYxBWv1v.js +42 -0
  4. package/dist/component-generics-q-ujwX4P.d.ts +30 -0
  5. package/dist/components/MaskedInput.d.ts +1 -1
  6. package/dist/components/MaskedInput.js +1 -3
  7. package/dist/components/breadcrumbs.d.ts +1 -24
  8. package/dist/components/breadcrumbs.js +2 -4
  9. package/dist/components/icons.js +4 -6
  10. package/dist/components/index.d.ts +10 -16
  11. package/dist/components/index.js +3 -5
  12. package/dist/components/method.d.ts +1 -58
  13. package/dist/components/method.js +12 -14
  14. package/dist/components/overview.d.ts +1 -38
  15. package/dist/components/overview.js +6 -5
  16. package/dist/components/primitives.d.ts +1 -106
  17. package/dist/components/primitives.js +2 -4
  18. package/dist/components/properties.d.ts +1 -53
  19. package/dist/components/properties.js +17 -19
  20. package/dist/components/sdk-sidebar.d.ts +1 -14
  21. package/dist/components/sdk-sidebar.js +2 -4
  22. package/dist/components/sdk.d.ts +1 -127
  23. package/dist/components/sdk.js +3 -5
  24. package/dist/components/snippets.d.ts +1 -70
  25. package/dist/components/snippets.js +16 -16
  26. package/dist/components/stl-sidebar.d.ts +1 -57
  27. package/dist/components/stl-sidebar.js +2 -4
  28. package/dist/contexts/component-generics.d.ts +1 -29
  29. package/dist/contexts/component-generics.js +2 -33
  30. package/dist/contexts/component-types.d.ts +3 -5
  31. package/dist/contexts/component.d.ts +4 -5
  32. package/dist/contexts/component.js +2 -5
  33. package/dist/contexts/docs.d.ts +1 -61
  34. package/dist/contexts/docs.js +1 -3
  35. package/dist/contexts/index.d.ts +6 -13
  36. package/dist/contexts/index.js +5 -7
  37. package/dist/contexts/markdown.d.ts +2 -22
  38. package/dist/contexts/markdown.js +28 -15
  39. package/dist/contexts/navigation.d.ts +1 -28
  40. package/dist/contexts/navigation.js +1 -3
  41. package/dist/contexts/use-components.d.ts +1 -2
  42. package/dist/contexts/use-components.js +2 -5
  43. package/dist/docs-BomxNGuD.d.ts +62 -0
  44. package/dist/docs-DSjdvCh5.d.ts +62 -0
  45. package/dist/index-gGDaf6FK.d.ts +464 -0
  46. package/dist/index-uRQlPa4x.d.ts +464 -0
  47. package/dist/index.d.ts +2 -4
  48. package/dist/index.js +2 -3
  49. package/dist/languages/cli.d.ts +2 -38
  50. package/dist/languages/cli.js +3 -5
  51. package/dist/languages/csharp.d.ts +2 -42
  52. package/dist/languages/csharp.js +3 -5
  53. package/dist/languages/go.d.ts +2 -40
  54. package/dist/languages/go.js +3 -5
  55. package/dist/languages/http.d.ts +2 -46
  56. package/dist/languages/http.js +5 -7
  57. package/dist/languages/index.d.ts +2 -51
  58. package/dist/languages/index.js +3 -5
  59. package/dist/languages/java.d.ts +2 -43
  60. package/dist/languages/java.js +3 -5
  61. package/dist/languages/php.d.ts +2 -40
  62. package/dist/languages/php.js +3 -5
  63. package/dist/languages/python.d.ts +2 -40
  64. package/dist/languages/python.js +3 -5
  65. package/dist/languages/ruby.d.ts +2 -40
  66. package/dist/languages/ruby.js +3 -5
  67. package/dist/languages/terraform.d.ts +2 -48
  68. package/dist/languages/terraform.js +25 -10
  69. package/dist/languages/typescript.d.ts +2 -40
  70. package/dist/languages/typescript.js +5 -7
  71. package/dist/markdown/index.d.ts +1 -1
  72. package/dist/markdown/index.js +3 -6
  73. package/dist/markdown/md.js +1 -3
  74. package/dist/markdown/printer.d.ts +2 -2
  75. package/dist/markdown/printer.js +3 -5
  76. package/dist/markdown/utils.d.ts +3 -3
  77. package/dist/markdown/utils.js +2 -4
  78. package/dist/markdown-Cwdboi_V.d.ts +33 -0
  79. package/dist/method-CNRMOUfn.d.ts +59 -0
  80. package/dist/navigation-22WDJvRF.d.ts +29 -0
  81. package/dist/navigation-C9ckAfpV.d.ts +29 -0
  82. package/dist/overview-CDvh184n.d.ts +39 -0
  83. package/dist/primitives-DFE_4MvV.d.ts +107 -0
  84. package/dist/properties-CVwrzWVa.d.ts +54 -0
  85. package/dist/routing-C_fawH40.d.ts +61 -0
  86. package/dist/routing-yTSG7nWM.d.ts +61 -0
  87. package/dist/routing.d.ts +2 -61
  88. package/dist/routing.js +2 -4
  89. package/dist/sdk-BkW3MDco.d.ts +128 -0
  90. package/dist/sdk-Cx2Z7bDk.d.ts +128 -0
  91. package/dist/sdk-sidebar-BpDlOMat.d.ts +15 -0
  92. package/dist/spec.d.ts +2 -2
  93. package/dist/spec.js +1 -3
  94. package/dist/stl-sidebar-CKrR5ZGs.d.ts +58 -0
  95. package/dist/style.js +1 -2
  96. package/dist/styles/main.css +333 -351
  97. package/dist/styles/primitives.css +133 -185
  98. package/dist/styles/resets.css +7 -14
  99. package/dist/styles/search.css +91 -96
  100. package/dist/styles/sidebar.css +44 -71
  101. package/dist/styles/variables.css +0 -5
  102. package/dist/styles.css +1008 -1263
  103. package/dist/utils.d.ts +1 -1
  104. package/dist/utils.js +2 -4
  105. package/package.json +9 -8
  106. package/dist/chunk-BYypO7fO.js +0 -18
  107. package/dist/styles/main.js +0 -0
  108. package/dist/styles/primitives.js +0 -0
  109. package/dist/styles/resets.js +0 -0
  110. package/dist/styles/search.js +0 -0
  111. package/dist/styles/sidebar.js +0 -0
  112. package/dist/styles/variables.js +0 -0
  113. package/dist/styles.mjs +0 -1
  114. package/dist/use-strict-context-Clb6Yjly.js +0 -16
  115. /package/dist/{index-pvh-w1xa.d.ts → index-DFr9Mesr.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- import { d as Method, f as Model, h as Resource, i as DeclarationNode } from "../index-pvh-w1xa.js";
1
+ import { d as Method, f as Model, h as Resource, i as DeclarationNode } from "../index-DFr9Mesr.js";
2
2
  import { EnvironmentType } from "./utils.js";
3
3
  import { t as printer_d_exports } from "./printer.js";
4
4
  import { Node } from "@markdoc/markdoc";
@@ -1,13 +1,11 @@
1
- import "../use-strict-context-Clb6Yjly.js";
1
+ import "../component-generics-DYxBWv1v.js";
2
2
  import { code, fence, heading, item, list, paragraph, parse, strong, text } from "./md.js";
3
3
  import { getCustomSnippetTitle, getDecl, getSnippets, stripMarkup } from "./utils.js";
4
4
  import { declaration as declaration$1, methodSignature, t as printer_exports } from "./printer.js";
5
5
  import Markdoc from "@markdoc/markdoc";
6
-
7
6
  //#region src/markdown/index.ts
8
7
  function declaration(env, decl) {
9
- const content = declaration$1(env.language, decl);
10
- return paragraph(code(stripMarkup(content)));
8
+ return paragraph(code(stripMarkup(declaration$1(env.language, decl))));
11
9
  }
12
10
  function renderChildren(env, children, nesting = /* @__PURE__ */ new Set()) {
13
11
  return list(...children.map((child) => renderDecl(env, child, nesting)));
@@ -85,6 +83,5 @@ function renderMarkdown(env, node) {
85
83
  const doc = new Markdoc.Ast.Node("document", {}, content);
86
84
  return Markdoc.format(doc);
87
85
  }
88
-
89
86
  //#endregion
90
- export { declaration, printer_exports as printer, render, renderMarkdown };
87
+ export { declaration, printer_exports as printer, render, renderMarkdown };
@@ -1,5 +1,4 @@
1
1
  import Markdoc from "@markdoc/markdoc";
2
-
3
2
  //#region src/markdown/md.ts
4
3
  function heading(level, children) {
5
4
  const content = inline(...typeof children === "string" ? [text(children)] : children);
@@ -36,6 +35,5 @@ function fence(language, content) {
36
35
  function parse(content) {
37
36
  return Markdoc.parse(content).children;
38
37
  }
39
-
40
38
  //#endregion
41
- export { code, fence, heading, inline, item, list, paragraph, parse, strong, text };
39
+ export { code, fence, heading, inline, item, list, paragraph, parse, strong, text };
@@ -1,5 +1,5 @@
1
- import { S as Type, i as DeclarationNode } from "../index-pvh-w1xa.js";
2
- import { DocsLanguage } from "../routing.js";
1
+ import { S as Type, i as DeclarationNode } from "../index-DFr9Mesr.js";
2
+ import { t as DocsLanguage } from "../routing-C_fawH40.js";
3
3
 
4
4
  //#region src/markdown/printer.d.ts
5
5
  declare namespace printer_d_exports {
@@ -1,13 +1,12 @@
1
- import { t as __exportAll } from "../chunk-BYypO7fO.js";
1
+ import { t as __exportAll } from "../chunk-pbuEa-1d.js";
2
2
  import { DocsProvider } from "../contexts/docs.js";
3
- import "../use-strict-context-Clb6Yjly.js";
3
+ import "../component-generics-DYxBWv1v.js";
4
4
  import { useLanguageComponents } from "../contexts/index.js";
5
5
  import style_default from "../style.js";
6
6
  import { ComponentProvider } from "../contexts/component.js";
7
7
  import "react";
8
8
  import { jsx } from "react/jsx-runtime";
9
9
  import { renderToStaticMarkup } from "react-dom/server";
10
-
11
10
  //#region src/markdown/printer.tsx
12
11
  var printer_exports = /* @__PURE__ */ __exportAll({
13
12
  declaration: () => declaration,
@@ -71,6 +70,5 @@ function methodSignature(language, decl) {
71
70
  children: /* @__PURE__ */ jsx(RenderMethod, { method: decl })
72
71
  }));
73
72
  }
74
-
75
73
  //#endregion
76
- export { declaration, methodSignature, printer_exports as t, type, typeName };
74
+ export { declaration, methodSignature, printer_exports as t, type, typeName };
@@ -1,6 +1,6 @@
1
- import { u as LanguageDeclNodes, v as Spec, y as SpecLanguage } from "../index-pvh-w1xa.js";
2
- import { DocsLanguage } from "../routing.js";
3
- import { TransformRequestSnippetFn } from "../components/sdk.js";
1
+ import { u as LanguageDeclNodes, v as Spec, y as SpecLanguage } from "../index-DFr9Mesr.js";
2
+ import { t as DocsLanguage } from "../routing-C_fawH40.js";
3
+ import { E as TransformRequestSnippetFn } from "../sdk-Cx2Z7bDk.js";
4
4
 
5
5
  //#region src/markdown/utils.d.ts
6
6
  type EnvironmentType = {
@@ -1,5 +1,4 @@
1
1
  import { Parser } from "htmlparser2";
2
-
3
2
  //#region src/markdown/utils.ts
4
3
  function getDecl(env, path) {
5
4
  const decl = env.spec?.decls?.[env.language]?.[path];
@@ -11,7 +10,7 @@ function getDecl(env, path) {
11
10
  return decl;
12
11
  }
13
12
  const customSnippetPrefix = "custom:";
14
- const getCustomSnippetTitle = (snippetId) => snippetId.startsWith(customSnippetPrefix) ? snippetId.slice(7) : snippetId;
13
+ const getCustomSnippetTitle = (snippetId) => snippetId.startsWith("custom:") ? snippetId.slice(7) : snippetId;
15
14
  function getSnippets(env, path) {
16
15
  const lang = env.language === "http" ? "http.curl" : `${env.language}.default`;
17
16
  const snippets = env.spec?.snippets?.[lang]?.[path];
@@ -28,6 +27,5 @@ function stripMarkup(content) {
28
27
  } }).parseComplete(content);
29
28
  return output;
30
29
  }
31
-
32
30
  //#endregion
33
- export { customSnippetPrefix, getCustomSnippetTitle, getDecl, getSnippets, stripMarkup };
31
+ export { customSnippetPrefix, getCustomSnippetTitle, getDecl, getSnippets, stripMarkup };
@@ -0,0 +1,33 @@
1
+ import React from "react";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region src/contexts/markdown.d.ts
5
+ type MarkdownContextValue = {
6
+ highlight: (content: string, language: string) => string | Promise<string>;
7
+ render: (content: string) => string | Promise<string>;
8
+ };
9
+ declare const MarkdownContext: React.Context<MarkdownContextValue>;
10
+ declare const useMarkdownContext: () => MarkdownContextValue;
11
+ declare function useRenderMarkdown(content?: string): string | undefined;
12
+ declare function useHighlight(content: string, language?: string): string;
13
+ type MarkdownProviderProps = MarkdownContextValue & {
14
+ children: React.ReactNode;
15
+ };
16
+ declare function MarkdownProvider({
17
+ render,
18
+ highlight,
19
+ children
20
+ }: MarkdownProviderProps): react_jsx_runtime0.JSX.Element;
21
+ declare function SuspensefulMarkdownProviderInner({
22
+ value,
23
+ children
24
+ }: {
25
+ value: Promise<MarkdownContextValue>;
26
+ children: React.ReactNode;
27
+ }): react_jsx_runtime0.JSX.Element;
28
+ declare function SuspensefulMarkdownProvider({
29
+ value,
30
+ children
31
+ }: React.ComponentProps<typeof SuspensefulMarkdownProviderInner>): react_jsx_runtime0.JSX.Element;
32
+ //#endregion
33
+ export { SuspensefulMarkdownProvider as a, useRenderMarkdown as c, MarkdownProviderProps as i, MarkdownContextValue as n, useHighlight as o, MarkdownProvider as r, useMarkdownContext as s, MarkdownContext as t };
@@ -0,0 +1,59 @@
1
+ import * as React$1 from "react";
2
+ import { ReactNode } from "react";
3
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+
5
+ //#region src/components/method.d.ts
6
+ type MethodHeaderProps = {
7
+ title: ReactNode;
8
+ level?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5';
9
+ signature?: ReactNode;
10
+ badges?: ReactNode;
11
+ children?: ReactNode;
12
+ };
13
+ declare function MethodHeader({
14
+ title,
15
+ badges,
16
+ signature,
17
+ children,
18
+ level
19
+ }: MethodHeaderProps): react_jsx_runtime0.JSX.Element;
20
+ type MethodRouteProps = {
21
+ httpMethod?: string;
22
+ endpoint?: string | ReactNode;
23
+ iconOnly?: boolean;
24
+ };
25
+ declare function MethodRoute({
26
+ httpMethod,
27
+ endpoint,
28
+ iconOnly
29
+ }: MethodRouteProps): react_jsx_runtime0.JSX.Element;
30
+ type MethodDescriptionProps = {
31
+ description?: string;
32
+ };
33
+ declare function MethodDescription({
34
+ description
35
+ }: MethodDescriptionProps): react_jsx_runtime0.JSX.Element | undefined;
36
+ type MethodInfoProps = {
37
+ children?: ReactNode;
38
+ parameters?: ReactNode;
39
+ returns?: ReactNode;
40
+ };
41
+ declare function MethodInfo({
42
+ children,
43
+ parameters,
44
+ returns
45
+ }: MethodInfoProps): react_jsx_runtime0.JSX.Element;
46
+ type MethodProps = {
47
+ id?: string;
48
+ header?: ReactNode;
49
+ children?: ReactNode;
50
+ } & React$1.HTMLProps<HTMLDivElement>;
51
+ declare function Method({
52
+ id,
53
+ header,
54
+ children,
55
+ className,
56
+ ...props
57
+ }: MethodProps): react_jsx_runtime0.JSX.Element;
58
+ //#endregion
59
+ export { MethodHeaderProps as a, MethodProps as c, MethodHeader as i, MethodRoute as l, MethodDescription as n, MethodInfo as o, MethodDescriptionProps as r, MethodInfoProps as s, Method as t, MethodRouteProps as u };
@@ -0,0 +1,29 @@
1
+ import { t as DocsLanguage } from "./routing-C_fawH40.js";
2
+ import * as React$1 from "react";
3
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+
5
+ //#region src/contexts/navigation.d.ts
6
+ type NavigationHandler = (ev: React$1.MouseEvent | null, opts: {
7
+ href: string;
8
+ language: DocsLanguage;
9
+ stainlessPath: string;
10
+ scroll: boolean;
11
+ }) => void;
12
+ type NavigationContextType = {
13
+ basePath?: string;
14
+ selectedPath?: string;
15
+ navigationPath?: string[];
16
+ onNavigate?: NavigationHandler;
17
+ };
18
+ declare function useNavigation(): NavigationContextType;
19
+ type NavigationProviderProps = NavigationContextType & {
20
+ children: React$1.ReactNode;
21
+ };
22
+ declare function NavigationProvider({
23
+ basePath,
24
+ selectedPath,
25
+ onNavigate,
26
+ children
27
+ }: NavigationProviderProps): react_jsx_runtime0.JSX.Element;
28
+ //#endregion
29
+ export { useNavigation as a, NavigationProviderProps as i, NavigationHandler as n, NavigationProvider as r, NavigationContextType as t };
@@ -0,0 +1,29 @@
1
+ import { t as DocsLanguage } from "./routing-yTSG7nWM.js";
2
+ import * as React$1 from "react";
3
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+
5
+ //#region src/contexts/navigation.d.ts
6
+ type NavigationHandler = (ev: React$1.MouseEvent | null, opts: {
7
+ href: string;
8
+ language: DocsLanguage;
9
+ stainlessPath: string;
10
+ scroll: boolean;
11
+ }) => void;
12
+ type NavigationContextType = {
13
+ basePath?: string;
14
+ selectedPath?: string;
15
+ navigationPath?: string[];
16
+ onNavigate?: NavigationHandler;
17
+ };
18
+ declare function useNavigation(): NavigationContextType;
19
+ type NavigationProviderProps = NavigationContextType & {
20
+ children: React$1.ReactNode;
21
+ };
22
+ declare function NavigationProvider({
23
+ basePath,
24
+ selectedPath,
25
+ onNavigate,
26
+ children
27
+ }: NavigationProviderProps): react_jsx_runtime0.JSX.Element;
28
+ //#endregion
29
+ export { useNavigation as a, NavigationProviderProps as i, NavigationHandler as n, NavigationProvider as r, NavigationContextType as t };
@@ -0,0 +1,39 @@
1
+ import { d as Method, h as Resource } from "./index-DFr9Mesr.js";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region src/components/overview.d.ts
5
+ type SDKResourceProps = {
6
+ resource: Resource;
7
+ parents?: Resource[];
8
+ };
9
+ declare function SDKResourceHeader({
10
+ resource,
11
+ parents
12
+ }: SDKResourceProps): react_jsx_runtime0.JSX.Element | null;
13
+ type SDKMethodSummaryProps = {
14
+ method: Method;
15
+ };
16
+ declare function SDKMethodSummary({
17
+ method
18
+ }: SDKMethodSummaryProps): react_jsx_runtime0.JSX.Element;
19
+ declare function SDKResource({
20
+ resource,
21
+ parents,
22
+ showModels
23
+ }: SDKResourceProps & {
24
+ showModels?: boolean;
25
+ }): react_jsx_runtime0.JSX.Element;
26
+ type SDKOverviewProps = {
27
+ resource: Resource;
28
+ };
29
+ declare function SDKOverview({
30
+ resource
31
+ }: SDKOverviewProps): react_jsx_runtime0.JSX.Element;
32
+ type SDKRootProps = {
33
+ stainlessPath: string;
34
+ };
35
+ declare function SDKRoot({
36
+ stainlessPath
37
+ }: SDKRootProps): react_jsx_runtime0.JSX.Element | null;
38
+ //#endregion
39
+ export { SDKResource as a, SDKRoot as c, SDKOverviewProps as i, SDKRootProps as l, SDKMethodSummaryProps as n, SDKResourceHeader as o, SDKOverview as r, SDKResourceProps as s, SDKMethodSummary as t };
@@ -0,0 +1,107 @@
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 BadgeProps = {
47
+ id: string;
48
+ children?: ReactNode;
49
+ };
50
+ declare function Badge({
51
+ id,
52
+ children
53
+ }: BadgeProps): react_jsx_runtime0.JSX.Element;
54
+ type TooltipProps = {
55
+ content: ReactNode;
56
+ children: ReactNode;
57
+ };
58
+ declare function Tooltip({
59
+ content,
60
+ children
61
+ }: TooltipProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime0.JSX.Element | null | undefined;
62
+ type LinkProps = {
63
+ stainlessPath?: string;
64
+ scroll?: boolean;
65
+ children?: ReactNode;
66
+ } & React.HTMLProps<HTMLAnchorElement>;
67
+ declare function Link({
68
+ stainlessPath,
69
+ scroll,
70
+ children,
71
+ ...props
72
+ }: LinkProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime0.JSX.Element | null | undefined;
73
+ type InputProps = {
74
+ left?: ReactNode;
75
+ right?: ReactNode;
76
+ ref?: React.Ref<HTMLInputElement>;
77
+ } & React.InputHTMLAttributes<HTMLInputElement>;
78
+ declare function Input({
79
+ left,
80
+ right,
81
+ ref,
82
+ className,
83
+ ...props
84
+ }: InputProps): react_jsx_runtime0.JSX.Element;
85
+ type ToggleButtonProps = {
86
+ children?: ReactNode;
87
+ selected?: boolean;
88
+ } & React.ComponentProps<'button'>;
89
+ declare function ToggleButton({
90
+ children,
91
+ selected,
92
+ ref,
93
+ ...props
94
+ }: ToggleButtonProps): react_jsx_runtime0.JSX.Element;
95
+ type ListViewProps<TItem> = {
96
+ items: Array<TItem>;
97
+ itemDelegate: (item: TItem, selected: boolean) => React.ReactNode;
98
+ onSelectListItem?: (item: TItem) => void;
99
+ } & React.HTMLAttributes<HTMLDivElement>;
100
+ declare function ListView<TItem>({
101
+ items,
102
+ itemDelegate,
103
+ onSelectListItem,
104
+ ...rest
105
+ }: ListViewProps<TItem>): react_jsx_runtime0.JSX.Element;
106
+ //#endregion
107
+ export { Join as a, ListViewProps as c, ToggleButtonProps as d, Tooltip as f, InputProps as i, Markdown as l, Expander as n, Link as o, VirtualExpander as p, Input as r, ListView as s, Badge as t, ToggleButton as u };
@@ -0,0 +1,54 @@
1
+ import { ReactNode } from "react";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region src/components/properties.d.ts
5
+ type PropertyToggleProps = {
6
+ target: string;
7
+ };
8
+ declare function PropertyToggle({
9
+ target
10
+ }: PropertyToggleProps): react_jsx_runtime0.JSX.Element;
11
+ type PropertyDescriptionProps = {
12
+ description?: string;
13
+ };
14
+ declare function PropertyDescription({
15
+ description
16
+ }: PropertyDescriptionProps): react_jsx_runtime0.JSX.Element | undefined;
17
+ type PropertyTitleProps = {
18
+ title?: string;
19
+ };
20
+ declare function PropertyTitle({
21
+ title
22
+ }: PropertyTitleProps): react_jsx_runtime0.JSX.Element | undefined;
23
+ type PropertyProps = {
24
+ id?: string;
25
+ name?: ReactNode;
26
+ typeName?: ReactNode;
27
+ badges?: ReactNode;
28
+ type?: ReactNode;
29
+ description?: string;
30
+ title?: string;
31
+ expand?: boolean;
32
+ deprecated?: boolean | string;
33
+ additional?: ReactNode;
34
+ declaration?: ReactNode;
35
+ constraints?: ReactNode;
36
+ children?: ReactNode;
37
+ };
38
+ declare function Property({
39
+ id,
40
+ name,
41
+ typeName,
42
+ badges,
43
+ type,
44
+ declaration,
45
+ description,
46
+ title,
47
+ deprecated,
48
+ expand,
49
+ additional,
50
+ constraints,
51
+ children
52
+ }: PropertyProps): react_jsx_runtime0.JSX.Element | null;
53
+ //#endregion
54
+ export { PropertyTitle as a, PropertyToggleProps as c, PropertyProps as i, PropertyDescription as n, PropertyTitleProps as o, PropertyDescriptionProps as r, PropertyToggle as s, Property as t };
@@ -0,0 +1,61 @@
1
+ import { d as Method, f as Model, h as Resource, v as Spec } from "./index-DFr9Mesr.js";
2
+
3
+ //#region src/routing.d.ts
4
+ declare namespace routing_d_exports {
5
+ export { DocsLanguage, LanguageNames, Languages, ParsedStainlessPath, RouteEntry, SpecTreeEntry, SupportedLanguageSyntaxes, expandToElement, findNavigationPath, generateMissingRouteList, generateRoute, generateRouteList, getLanguageSnippet, getResource, isSupportedLanguage, parseRoute, parseStainlessPath, scrollToPath, trimStainlessPath, updateHistory, walkTree };
6
+ }
7
+ declare const Languages: readonly ["http", "node", "python", "go", "typescript", "terraform", "ruby", "java", "kotlin", "csharp", "php", "cli"];
8
+ declare const SupportedLanguageSyntaxes: string[];
9
+ type DocsLanguage = (typeof Languages)[number];
10
+ declare const LanguageNames: Record<DocsLanguage, string>;
11
+ declare function getLanguageSnippet(language: DocsLanguage): "cli.default" | "csharp.default" | "go.default" | "http.curl" | "java.default" | "kotlin.default" | "node.default" | "php.default" | "python.default" | "ruby.default" | "terraform.default" | "typescript.default";
12
+ declare function isSupportedLanguage(language: string): language is DocsLanguage;
13
+ type ParsedStainlessPath = ReturnType<typeof parseStainlessPath>;
14
+ declare function parseStainlessPath(stainlessPath: string): {
15
+ resource: string[] | null;
16
+ method: string | null;
17
+ model: string | null;
18
+ routable: string | undefined;
19
+ } | null;
20
+ declare function trimStainlessPath(stainlessPath: string): string;
21
+ declare function getResource(stainlessPath: string): string | undefined;
22
+ declare function parseRoute(basePath: string, route: string): {
23
+ stainlessPath: string;
24
+ language: DocsLanguage;
25
+ };
26
+ declare function generateRoute(basePath: string, language: string, stainlessPath: string): string | null;
27
+ type SpecTreeEntry = {
28
+ data: Method | Resource | Model;
29
+ path: string[];
30
+ };
31
+ declare function walkTree(spec: Spec, includeModels?: boolean): Generator<SpecTreeEntry, void, any>;
32
+ type RouteEntry = {
33
+ title: string;
34
+ kind: SpecTreeEntry['data']['kind'];
35
+ language: DocsLanguage;
36
+ stainlessPath: string;
37
+ slug: string;
38
+ };
39
+ declare function generateRouteList({
40
+ spec,
41
+ languages,
42
+ excludeLanguages
43
+ }: {
44
+ spec: Spec;
45
+ languages?: DocsLanguage[];
46
+ excludeLanguages?: DocsLanguage[];
47
+ }): RouteEntry[];
48
+ declare function generateMissingRouteList({
49
+ spec,
50
+ basePath
51
+ }: {
52
+ spec: Spec;
53
+ basePath: string;
54
+ }): string[];
55
+ type ResourceOrMethod = Resource | Method;
56
+ declare function findNavigationPath(items: ResourceOrMethod[], target: string): string[] | undefined;
57
+ declare function expandToElement(el: HTMLElement | null): void;
58
+ declare function scrollToPath(stainlessPath: string): void;
59
+ declare function updateHistory(basePath: string, language: DocsLanguage, stainlessPath: string): void;
60
+ //#endregion
61
+ export { walkTree as S, parseStainlessPath as _, RouteEntry as a, trimStainlessPath as b, expandToElement as c, generateRoute as d, generateRouteList as f, parseRoute as g, isSupportedLanguage as h, ParsedStainlessPath as i, findNavigationPath as l, getResource as m, LanguageNames as n, SpecTreeEntry as o, getLanguageSnippet as p, Languages as r, SupportedLanguageSyntaxes as s, DocsLanguage as t, generateMissingRouteList as u, routing_d_exports as v, updateHistory as x, scrollToPath as y };
@@ -0,0 +1,61 @@
1
+ import { d as Method, f as Model, h as Resource, v as Spec } from "./index-DFr9Mesr.js";
2
+
3
+ //#region src/routing.d.ts
4
+ declare namespace routing_d_exports {
5
+ export { DocsLanguage, LanguageNames, Languages, ParsedStainlessPath, RouteEntry, SpecTreeEntry, SupportedLanguageSyntaxes, expandToElement, findNavigationPath, generateMissingRouteList, generateRoute, generateRouteList, getLanguageSnippet, getResource, isSupportedLanguage, parseRoute, parseStainlessPath, scrollToPath, trimStainlessPath, updateHistory, walkTree };
6
+ }
7
+ declare const Languages: readonly ["http", "node", "python", "go", "typescript", "terraform", "ruby", "java", "kotlin", "csharp", "php", "cli"];
8
+ declare const SupportedLanguageSyntaxes: string[];
9
+ type DocsLanguage = (typeof Languages)[number];
10
+ declare const LanguageNames: Record<DocsLanguage, string>;
11
+ declare function getLanguageSnippet(language: DocsLanguage): "http.curl" | "node.default" | "python.default" | "go.default" | "typescript.default" | "terraform.default" | "ruby.default" | "java.default" | "kotlin.default" | "csharp.default" | "php.default" | "cli.default";
12
+ declare function isSupportedLanguage(language: string): language is DocsLanguage;
13
+ type ParsedStainlessPath = ReturnType<typeof parseStainlessPath>;
14
+ declare function parseStainlessPath(stainlessPath: string): {
15
+ resource: string[] | null;
16
+ method: string | null;
17
+ model: string | null;
18
+ routable: string | undefined;
19
+ } | null;
20
+ declare function trimStainlessPath(stainlessPath: string): string;
21
+ declare function getResource(stainlessPath: string): string | undefined;
22
+ declare function parseRoute(basePath: string, route: string): {
23
+ stainlessPath: string;
24
+ language: DocsLanguage;
25
+ };
26
+ declare function generateRoute(basePath: string, language: string, stainlessPath: string): string | null;
27
+ type SpecTreeEntry = {
28
+ data: Method | Resource | Model;
29
+ path: string[];
30
+ };
31
+ declare function walkTree(spec: Spec, includeModels?: boolean): Generator<SpecTreeEntry, void, any>;
32
+ type RouteEntry = {
33
+ title: string;
34
+ kind: SpecTreeEntry['data']['kind'];
35
+ language: DocsLanguage;
36
+ stainlessPath: string;
37
+ slug: string;
38
+ };
39
+ declare function generateRouteList({
40
+ spec,
41
+ languages,
42
+ excludeLanguages
43
+ }: {
44
+ spec: Spec;
45
+ languages?: DocsLanguage[];
46
+ excludeLanguages?: DocsLanguage[];
47
+ }): RouteEntry[];
48
+ declare function generateMissingRouteList({
49
+ spec,
50
+ basePath
51
+ }: {
52
+ spec: Spec;
53
+ basePath: string;
54
+ }): string[];
55
+ type ResourceOrMethod = Resource | Method;
56
+ declare function findNavigationPath(items: ResourceOrMethod[], target: string): string[] | undefined;
57
+ declare function expandToElement(el: HTMLElement | null): void;
58
+ declare function scrollToPath(stainlessPath: string): void;
59
+ declare function updateHistory(basePath: string, language: DocsLanguage, stainlessPath: string): void;
60
+ //#endregion
61
+ export { walkTree as S, parseStainlessPath as _, RouteEntry as a, trimStainlessPath as b, expandToElement as c, generateRoute as d, generateRouteList as f, parseRoute as g, isSupportedLanguage as h, ParsedStainlessPath as i, findNavigationPath as l, getResource as m, LanguageNames as n, SpecTreeEntry as o, getLanguageSnippet as p, Languages as r, SupportedLanguageSyntaxes as s, DocsLanguage as t, generateMissingRouteList as u, routing_d_exports as v, updateHistory as x, scrollToPath as y };
package/dist/routing.d.ts CHANGED
@@ -1,61 +1,2 @@
1
- import { d as Method, f as Model, h as Resource, v as Spec } from "./index-pvh-w1xa.js";
2
-
3
- //#region src/routing.d.ts
4
- declare namespace routing_d_exports {
5
- export { DocsLanguage, LanguageNames, Languages, ParsedStainlessPath, RouteEntry, SpecTreeEntry, SupportedLanguageSyntaxes, expandToElement, findNavigationPath, generateMissingRouteList, generateRoute, generateRouteList, getLanguageSnippet, getResource, isSupportedLanguage, parseRoute, parseStainlessPath, scrollToPath, trimStainlessPath, updateHistory, walkTree };
6
- }
7
- declare const Languages: readonly ["http", "node", "python", "go", "typescript", "terraform", "ruby", "java", "kotlin", "csharp", "php", "cli"];
8
- declare const SupportedLanguageSyntaxes: string[];
9
- type DocsLanguage = (typeof Languages)[number];
10
- declare const LanguageNames: Record<DocsLanguage, string>;
11
- declare function getLanguageSnippet(language: DocsLanguage): "cli.default" | "csharp.default" | "go.default" | "http.curl" | "java.default" | "kotlin.default" | "node.default" | "php.default" | "python.default" | "ruby.default" | "terraform.default" | "typescript.default";
12
- declare function isSupportedLanguage(language: string): language is DocsLanguage;
13
- type ParsedStainlessPath = ReturnType<typeof parseStainlessPath>;
14
- declare function parseStainlessPath(stainlessPath: string): {
15
- resource: string[] | null;
16
- method: string | null;
17
- model: string | null;
18
- routable: string | undefined;
19
- } | null;
20
- declare function trimStainlessPath(stainlessPath: string): string;
21
- declare function getResource(stainlessPath: string): string | undefined;
22
- declare function parseRoute(basePath: string, route: string): {
23
- stainlessPath: string;
24
- language: DocsLanguage;
25
- };
26
- declare function generateRoute(basePath: string, language: string, stainlessPath: string): string | null;
27
- type SpecTreeEntry = {
28
- data: Method | Resource | Model;
29
- path: string[];
30
- };
31
- declare function walkTree(spec: Spec, includeModels?: boolean): Generator<SpecTreeEntry, void, any>;
32
- type RouteEntry = {
33
- title: string;
34
- kind: SpecTreeEntry['data']['kind'];
35
- language: DocsLanguage;
36
- stainlessPath: string;
37
- slug: string;
38
- };
39
- declare function generateRouteList({
40
- spec,
41
- languages,
42
- excludeLanguages
43
- }: {
44
- spec: Spec;
45
- languages?: DocsLanguage[];
46
- excludeLanguages?: DocsLanguage[];
47
- }): RouteEntry[];
48
- declare function generateMissingRouteList({
49
- spec,
50
- basePath
51
- }: {
52
- spec: Spec;
53
- basePath: string;
54
- }): string[];
55
- type ResourceOrMethod = Resource | Method;
56
- declare function findNavigationPath(items: ResourceOrMethod[], target: string): string[] | undefined;
57
- declare function expandToElement(el: HTMLElement | null): void;
58
- declare function scrollToPath(stainlessPath: string): void;
59
- declare function updateHistory(basePath: string, language: DocsLanguage, stainlessPath: string): void;
60
- //#endregion
61
- export { DocsLanguage, LanguageNames, Languages, ParsedStainlessPath, RouteEntry, SpecTreeEntry, SupportedLanguageSyntaxes, expandToElement, findNavigationPath, generateMissingRouteList, generateRoute, generateRouteList, getLanguageSnippet, getResource, isSupportedLanguage, parseRoute, parseStainlessPath, scrollToPath, routing_d_exports as t, trimStainlessPath, updateHistory, walkTree };
1
+ import { S as walkTree, _ as parseStainlessPath, a as RouteEntry, b as trimStainlessPath, c as expandToElement, d as generateRoute, f as generateRouteList, g as parseRoute, h as isSupportedLanguage, i as ParsedStainlessPath, l as findNavigationPath, m as getResource, n as LanguageNames, o as SpecTreeEntry, p as getLanguageSnippet, r as Languages, s as SupportedLanguageSyntaxes, t as DocsLanguage, u as generateMissingRouteList, x as updateHistory, y as scrollToPath } from "./routing-C_fawH40.js";
2
+ export { DocsLanguage, LanguageNames, Languages, ParsedStainlessPath, RouteEntry, SpecTreeEntry, SupportedLanguageSyntaxes, expandToElement, findNavigationPath, generateMissingRouteList, generateRoute, generateRouteList, getLanguageSnippet, getResource, isSupportedLanguage, parseRoute, parseStainlessPath, scrollToPath, trimStainlessPath, updateHistory, walkTree };