@stainless-api/docs-ui 0.1.0-beta.73 → 0.1.0-beta.74

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 (122) hide show
  1. package/dist/{chunk-BN_g-Awi.js → chunk-BYypO7fO.js} +3 -3
  2. package/dist/components/MaskedInput.d.ts +3 -3
  3. package/dist/components/MaskedInput.js +1 -1
  4. package/dist/components/breadcrumbs.d.ts +24 -1
  5. package/dist/components/breadcrumbs.js +62 -7
  6. package/dist/components/icons.d.ts +12 -12
  7. package/dist/components/icons.js +883 -1
  8. package/dist/components/index.d.ts +16 -14
  9. package/dist/components/index.js +72 -18
  10. package/dist/components/method.d.ts +58 -1
  11. package/dist/components/method.js +95 -8
  12. package/dist/components/overview.d.ts +38 -1
  13. package/dist/components/overview.js +137 -9
  14. package/dist/components/primitives.d.ts +104 -1
  15. package/dist/components/primitives.js +250 -6
  16. package/dist/components/properties.d.ts +53 -1
  17. package/dist/components/properties.js +138 -7
  18. package/dist/components/sdk-sidebar.d.ts +14 -1
  19. package/dist/components/sdk-sidebar.js +50 -8
  20. package/dist/components/sdk.d.ts +121 -1
  21. package/dist/components/sdk.js +404 -8
  22. package/dist/components/snippets.d.ts +70 -13
  23. package/dist/components/snippets.js +182 -7
  24. package/dist/components/stl-sidebar.d.ts +57 -1
  25. package/dist/components/stl-sidebar.js +105 -3
  26. package/dist/contexts/component-generics.d.ts +29 -1
  27. package/dist/contexts/component-generics.js +31 -1
  28. package/dist/contexts/component-types.d.ts +4 -15
  29. package/dist/contexts/component.d.ts +7 -17
  30. package/dist/contexts/component.js +22 -28
  31. package/dist/contexts/docs.d.ts +61 -1
  32. package/dist/contexts/docs.js +89 -1
  33. package/dist/contexts/index.d.ts +13 -14
  34. package/dist/contexts/index.js +44 -6
  35. package/dist/contexts/markdown.d.ts +21 -1
  36. package/dist/contexts/markdown.js +47 -2
  37. package/dist/contexts/navigation.d.ts +28 -1
  38. package/dist/contexts/navigation.js +22 -1
  39. package/dist/contexts/use-components.d.ts +1 -13
  40. package/dist/contexts/use-components.js +6 -2
  41. package/dist/index.d.ts +4 -14
  42. package/dist/index.js +7 -30
  43. package/dist/languages/cli.d.ts +38 -14
  44. package/dist/languages/cli.js +166 -20
  45. package/dist/languages/csharp.d.ts +42 -14
  46. package/dist/languages/csharp.js +283 -8
  47. package/dist/languages/go.d.ts +40 -14
  48. package/dist/languages/go.js +303 -8
  49. package/dist/languages/http.d.ts +46 -14
  50. package/dist/languages/http.js +390 -19
  51. package/dist/languages/index.d.ts +50 -14
  52. package/dist/languages/index.js +30 -28
  53. package/dist/languages/java.d.ts +43 -14
  54. package/dist/languages/java.js +403 -8
  55. package/dist/languages/python.d.ts +40 -14
  56. package/dist/languages/python.js +269 -8
  57. package/dist/languages/ruby.d.ts +40 -14
  58. package/dist/languages/ruby.js +387 -8
  59. package/dist/languages/terraform.d.ts +48 -14
  60. package/dist/languages/terraform.js +243 -8
  61. package/dist/languages/typescript.d.ts +40 -14
  62. package/dist/languages/typescript.js +449 -8
  63. package/dist/markdown/index.d.ts +1 -2
  64. package/dist/markdown/index.js +1 -28
  65. package/dist/markdown/printer.d.ts +2 -2
  66. package/dist/markdown/printer.js +6 -30
  67. package/dist/markdown/utils.d.ts +3 -3
  68. package/dist/routing.d.ts +61 -2
  69. package/dist/routing.js +204 -2
  70. package/dist/spec.d.ts +4 -4
  71. package/dist/spec.js +2 -2
  72. package/dist/style.js +176 -1
  73. package/dist/use-strict-context-L0c8JKg4.js +16 -0
  74. package/dist/utils.d.ts +1 -1
  75. package/dist/utils.js +53 -2
  76. package/package.json +2 -2
  77. package/dist/breadcrumbs-Dei_5sHd.d.ts +0 -25
  78. package/dist/breadcrumbs-oUp-6oJK.js +0 -63
  79. package/dist/cli-BX9ofVCR.js +0 -166
  80. package/dist/component-Dl5ZEHxB.js +0 -23
  81. package/dist/component-generics-C9ALAcZI.d.ts +0 -30
  82. package/dist/component-generics-POFirVVb.js +0 -45
  83. package/dist/components-DQPlXEwE.js +0 -72
  84. package/dist/contexts-_NNW5yqC.js +0 -44
  85. package/dist/csharp-sn5CJu9t.js +0 -283
  86. package/dist/docs-YgoQ3bzY.js +0 -81
  87. package/dist/docs-x-kfjRMc.d.ts +0 -66
  88. package/dist/go-BoaAVmP0.js +0 -303
  89. package/dist/http-Ccj1dOvE.js +0 -389
  90. package/dist/icons-BYKn5X8E.js +0 -885
  91. package/dist/index-OCM-LZIo.d.ts +0 -428
  92. package/dist/java-BiLRuLuD.js +0 -403
  93. package/dist/languages-COjc0Nwx.js +0 -30
  94. package/dist/markdown-BszOPZhh.d.ts +0 -22
  95. package/dist/markdown-Cq3XEhrR.js +0 -49
  96. package/dist/method-DjzVBzZe.js +0 -96
  97. package/dist/method-KkWyhvKa.d.ts +0 -59
  98. package/dist/navigation-BZjwfN2P.d.ts +0 -29
  99. package/dist/navigation-aoYZ_tl4.js +0 -24
  100. package/dist/overview-BNmMeDUE.d.ts +0 -39
  101. package/dist/overview-Clq5psZe.js +0 -138
  102. package/dist/primitives-B8OnSXRP.d.ts +0 -105
  103. package/dist/primitives-BBUs_flm.js +0 -250
  104. package/dist/properties-BhlRtWo4.d.ts +0 -54
  105. package/dist/properties-DQU0NBzb.js +0 -138
  106. package/dist/python-nqOBH7GS.js +0 -269
  107. package/dist/routing-GvhEMw6E.js +0 -205
  108. package/dist/routing-qJMPICGo.d.ts +0 -61
  109. package/dist/ruby-BBc8HdIt.js +0 -387
  110. package/dist/sdk-C8C6IRQp.d.ts +0 -122
  111. package/dist/sdk-DzCHhEoX.js +0 -405
  112. package/dist/sdk-sidebar-CkjSLggl.js +0 -50
  113. package/dist/sdk-sidebar-lgNmf-ns.d.ts +0 -15
  114. package/dist/snippets-CLpNVNlA.js +0 -181
  115. package/dist/stl-sidebar-8jF9cdnn.d.ts +0 -58
  116. package/dist/stl-sidebar-DC5UOJiT.js +0 -106
  117. package/dist/style-DJIYkFhO.js +0 -178
  118. package/dist/terraform-DVx2ea2h.js +0 -243
  119. package/dist/typescript-Cmk-jBBw.js +0 -449
  120. package/dist/use-components-BUz3GbO4.js +0 -7
  121. package/dist/utils-D6zJxUZ9.js +0 -54
  122. /package/dist/{index-HDt5wRiR.d.ts → index-PdnFhQF9.d.ts} +0 -0
@@ -1,6 +1,6 @@
1
- //#region rolldown:runtime
1
+ //#region \0rolldown/runtime.js
2
2
  var __defProp = Object.defineProperty;
3
- var __exportAll = (all, symbols) => {
3
+ var __exportAll = (all, no_symbols) => {
4
4
  let target = {};
5
5
  for (var name in all) {
6
6
  __defProp(target, name, {
@@ -8,7 +8,7 @@ var __exportAll = (all, symbols) => {
8
8
  enumerable: true
9
9
  });
10
10
  }
11
- if (symbols) {
11
+ if (!no_symbols) {
12
12
  __defProp(target, Symbol.toStringTag, { value: "Module" });
13
13
  }
14
14
  return target;
@@ -1,5 +1,5 @@
1
- import { i as InputProps } from "../primitives-B8OnSXRP.js";
2
- import * as react_jsx_runtime3 from "react/jsx-runtime";
1
+ import { InputProps } from "./primitives.js";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/MaskedInput.d.ts
5
5
  declare const MaskedInput: ({
@@ -9,6 +9,6 @@ declare const MaskedInput: ({
9
9
  value,
10
10
  ref,
11
11
  ...props
12
- }: InputProps) => react_jsx_runtime3.JSX.Element;
12
+ }: InputProps) => react_jsx_runtime0.JSX.Element;
13
13
  //#endregion
14
14
  export { MaskedInput };
@@ -1,4 +1,4 @@
1
- import { t as style_default } from "../style-DJIYkFhO.js";
1
+ import style_default from "../style.js";
2
2
  import * as React$1 from "react";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
 
@@ -1,2 +1,25 @@
1
- import { n as generateApiBreadcrumbs, t as SDKBreadcrumbs } from "../breadcrumbs-Dei_5sHd.js";
1
+ import { _ as Spec } from "../index-PdnFhQF9.js";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region src/components/breadcrumbs.d.ts
5
+ type Breadcrumb = {
6
+ title: string;
7
+ href: string;
8
+ };
9
+ type BreadcrumbConfig = {
10
+ includeCurrentPage?: boolean;
11
+ };
12
+ declare function generateApiBreadcrumbs(fullPath: string, spec: any, basePath: string): Breadcrumb[] | null;
13
+ declare function SDKBreadcrumbs({
14
+ spec,
15
+ currentPath,
16
+ basePath,
17
+ config
18
+ }: {
19
+ spec: Spec;
20
+ currentPath: string;
21
+ basePath?: string;
22
+ config?: BreadcrumbConfig | null;
23
+ }): react_jsx_runtime0.JSX.Element | null;
24
+ //#endregion
2
25
  export { SDKBreadcrumbs, generateApiBreadcrumbs };
@@ -1,9 +1,64 @@
1
- import "../docs-YgoQ3bzY.js";
2
- import "../component-generics-POFirVVb.js";
3
- import "../navigation-aoYZ_tl4.js";
4
- import "../markdown-Cq3XEhrR.js";
5
- import "../contexts-_NNW5yqC.js";
6
- import "../primitives-BBUs_flm.js";
7
- import { n as generateApiBreadcrumbs, t as SDKBreadcrumbs } from "../breadcrumbs-oUp-6oJK.js";
1
+ import "../use-strict-context-L0c8JKg4.js";
2
+ import style_default from "../style.js";
3
+ import { Languages } from "../routing.js";
4
+ import { Join } from "./primitives.js";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { ChevronRight } from "lucide-react";
8
7
 
8
+ //#region src/components/breadcrumbs.tsx
9
+ function generateApiBreadcrumbs(fullPath, spec, basePath) {
10
+ const cleanBasePath = basePath.replace(/\/+$/, "");
11
+ const cleanPath = fullPath.replace(/\/+$/, "");
12
+ if (!cleanPath.startsWith(cleanBasePath)) return null;
13
+ const rest = cleanPath.slice(cleanBasePath.length).split("/").filter(Boolean);
14
+ const breadcrumbs = [];
15
+ let href = cleanBasePath;
16
+ let i = 0;
17
+ if (Languages.includes(rest[0])) {
18
+ href += `/${rest[0]}`;
19
+ i++;
20
+ }
21
+ breadcrumbs.push({
22
+ title: "API Reference",
23
+ href
24
+ });
25
+ let currentSpec = spec;
26
+ while (i < rest.length) {
27
+ const idType = rest[i];
28
+ const idValue = rest[i + 1];
29
+ if (!idType || !idValue || !currentSpec?.[idType]?.[idValue]) break;
30
+ currentSpec = currentSpec[idType][idValue];
31
+ href += `/${idType}/${idValue}`;
32
+ const title = (idType === "methods" ? currentSpec.summary : currentSpec.title) ?? idValue;
33
+ breadcrumbs.push({
34
+ title,
35
+ href
36
+ });
37
+ i += 2;
38
+ }
39
+ return breadcrumbs;
40
+ }
41
+ function SDKBreadcrumbs({ spec, currentPath, basePath = "/api", config = { includeCurrentPage: false } }) {
42
+ const breadcrumbs = generateApiBreadcrumbs(currentPath, spec, basePath);
43
+ if (!breadcrumbs || breadcrumbs.length === 0) return null;
44
+ if (!config?.includeCurrentPage && breadcrumbs.length > 1) breadcrumbs.pop();
45
+ const items = breadcrumbs.map((crumb, index) => /* @__PURE__ */ jsx("div", {
46
+ className: style_default.BreadcrumbsItem,
47
+ children: /* @__PURE__ */ jsx("a", {
48
+ href: crumb.href,
49
+ className: style_default.BreadcrumbsLink,
50
+ children: crumb.title
51
+ })
52
+ }, index));
53
+ return /* @__PURE__ */ jsx("div", {
54
+ className: style_default.Breadcrumbs,
55
+ children: /* @__PURE__ */ jsx(Join, {
56
+ limit: breadcrumbs.length,
57
+ items,
58
+ children: /* @__PURE__ */ jsx(ChevronRight, {})
59
+ })
60
+ });
61
+ }
62
+
63
+ //#endregion
9
64
  export { SDKBreadcrumbs, generateApiBreadcrumbs };
@@ -1,60 +1,60 @@
1
- import * as react_jsx_runtime5 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/components/icons.d.ts
4
4
  declare function CSharpIcon({
5
5
  className
6
6
  }: {
7
7
  className?: string;
8
- }): react_jsx_runtime5.JSX.Element;
8
+ }): react_jsx_runtime0.JSX.Element;
9
9
  declare function GoIcon({
10
10
  className
11
11
  }: {
12
12
  className?: string;
13
- }): react_jsx_runtime5.JSX.Element;
13
+ }): react_jsx_runtime0.JSX.Element;
14
14
  declare function JavaIcon({
15
15
  className
16
16
  }: {
17
17
  className?: string;
18
- }): react_jsx_runtime5.JSX.Element;
18
+ }): react_jsx_runtime0.JSX.Element;
19
19
  declare function KotlinIcon({
20
20
  className
21
21
  }: {
22
22
  className?: string;
23
- }): react_jsx_runtime5.JSX.Element;
23
+ }): react_jsx_runtime0.JSX.Element;
24
24
  declare function PythonIcon({
25
25
  className
26
26
  }: {
27
27
  className?: string;
28
- }): react_jsx_runtime5.JSX.Element;
28
+ }): react_jsx_runtime0.JSX.Element;
29
29
  declare function RubyIcon({
30
30
  className
31
31
  }: {
32
32
  className?: string;
33
- }): react_jsx_runtime5.JSX.Element;
33
+ }): react_jsx_runtime0.JSX.Element;
34
34
  declare function TerraformIcon({
35
35
  className
36
36
  }: {
37
37
  className?: string;
38
- }): react_jsx_runtime5.JSX.Element;
38
+ }): react_jsx_runtime0.JSX.Element;
39
39
  declare function TypescriptIcon({
40
40
  className
41
41
  }: {
42
42
  className?: string;
43
- }): react_jsx_runtime5.JSX.Element;
43
+ }): react_jsx_runtime0.JSX.Element;
44
44
  declare function CurlIcon({
45
45
  className
46
46
  }: {
47
47
  className?: string;
48
- }): react_jsx_runtime5.JSX.Element;
48
+ }): react_jsx_runtime0.JSX.Element;
49
49
  declare function PowershellIcon({
50
50
  className
51
51
  }: {
52
52
  className?: string;
53
- }): react_jsx_runtime5.JSX.Element;
53
+ }): react_jsx_runtime0.JSX.Element;
54
54
  declare function CLIIcon({
55
55
  className
56
56
  }: {
57
57
  className?: string;
58
- }): react_jsx_runtime5.JSX.Element;
58
+ }): react_jsx_runtime0.JSX.Element;
59
59
  //#endregion
60
60
  export { CLIIcon, CSharpIcon, CurlIcon, GoIcon, JavaIcon, KotlinIcon, PowershellIcon, PythonIcon, RubyIcon, TerraformIcon, TypescriptIcon };