@stainless-api/docs-ui 0.1.0-beta.29 → 0.1.0-beta.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{breadcrumbs-D5viAm7a.d.ts → breadcrumbs-wJ7A9MGt.d.ts} +2 -2
- package/dist/{component-generics-BnrVqdQj.d.ts → component-generics--y1IC_M-.d.ts} +2 -1
- package/dist/{component-generics-Df4EDvxk.js → component-generics-D3ybuN5r.js} +5 -1
- package/dist/components/breadcrumbs.d.ts +1 -1
- package/dist/components/breadcrumbs.js +13 -14
- package/dist/components/chat.d.ts +3 -3
- package/dist/components/chat.js +64 -50
- package/dist/components/icons.d.ts +10 -10
- package/dist/components/icons.js +1 -1
- package/dist/components/index.d.ts +11 -12
- package/dist/components/index.js +14 -15
- package/dist/components/method.d.ts +1 -1
- package/dist/components/method.js +13 -14
- package/dist/components/overview.d.ts +1 -1
- package/dist/components/overview.js +13 -14
- package/dist/components/primitives.d.ts +1 -1
- package/dist/components/primitives.js +13 -14
- package/dist/components/properties.d.ts +1 -1
- package/dist/components/properties.js +13 -14
- package/dist/components/sdk.d.ts +2 -2
- package/dist/components/sdk.js +13 -14
- package/dist/components/sidebar.d.ts +1 -1
- package/dist/components/sidebar.js +13 -14
- package/dist/components/snippets.d.ts +3 -3
- package/dist/components/snippets.js +13 -14
- package/dist/contexts/component-generics.d.ts +1 -1
- package/dist/contexts/component-generics.js +1 -1
- package/dist/contexts/component-types.d.ts +11 -12
- package/dist/contexts/component-types.js +0 -1
- package/dist/contexts/component.d.ts +14 -14
- package/dist/contexts/component.js +13 -14
- package/dist/contexts/docs.d.ts +1 -1
- package/dist/contexts/docs.js +1 -1
- package/dist/contexts/index.d.ts +18 -19
- package/dist/contexts/index.js +13 -14
- package/dist/contexts/markdown.d.ts +1 -1
- package/dist/contexts/markdown.js +2 -2
- package/dist/contexts/navigation.d.ts +2 -2
- package/dist/contexts/navigation.js +1 -1
- package/dist/contexts/search.d.ts +3 -3
- package/dist/contexts/search.js +13 -14
- package/dist/contexts/use-components.d.ts +10 -11
- package/dist/contexts/use-components.js +2 -2
- package/dist/contexts-CMNI3ctP.js +3799 -0
- package/dist/{docs-DhNaW0DE.d.ts → docs-BvahWQ28.d.ts} +2 -1
- package/dist/{docs-Cj25B-Sh.js → docs-CopwX9a7.js} +5 -1
- package/dist/icons-yb-Jhkmg.js +753 -0
- package/dist/{index-d8_VR8Z5.d.ts → index-BmPNhnpe.d.ts} +6 -6
- package/dist/{index-BXO3gZup.d.ts → index-D5NMSAld.d.ts} +26 -25
- package/dist/index-rVFBdVz8.d.ts +15 -0
- package/dist/index.d.ts +20 -21
- package/dist/index.js +15 -7700
- package/dist/languages/go.d.ts +11 -12
- package/dist/languages/go.js +13 -14
- package/dist/languages/http.d.ts +11 -12
- package/dist/languages/http.js +13 -14
- package/dist/languages/index.d.ts +11 -12
- package/dist/languages/index.js +13 -14
- package/dist/languages/java.d.ts +11 -12
- package/dist/languages/java.js +13 -14
- package/dist/languages/python.d.ts +11 -12
- package/dist/languages/python.js +13 -14
- package/dist/languages/ruby.d.ts +11 -12
- package/dist/languages/ruby.js +13 -14
- package/dist/languages/typescript.d.ts +11 -12
- package/dist/languages/typescript.js +13 -14
- package/dist/markdown/index.d.ts +3 -3
- package/dist/markdown/index.js +13 -14
- package/dist/markdown/md.js +1 -1
- package/dist/markdown/utils.d.ts +3 -3
- package/dist/markdown/utils.js +1 -1
- package/dist/{markdown-DunIdqFE.js → markdown-BmpyokB7.js} +9 -5
- package/dist/{markdown-DN8KaRR2.d.ts → markdown-w5UpIiGc.d.ts} +2 -1
- package/dist/{method-c3XDArUn.d.ts → method-CLpRObBV.d.ts} +7 -6
- package/dist/{navigation-BSn6PX-7.d.ts → navigation-Blr3LaES.d.ts} +3 -2
- package/dist/{navigation-CuCg3le8.js → navigation-CGr5_w6z.js} +5 -1
- package/dist/{overview-D21weqVJ.d.ts → overview-DBnqhjAg.d.ts} +6 -6
- package/dist/{primitives-iB9fIrMF.d.ts → primitives-BFubD3w8.d.ts} +9 -8
- package/dist/{properties-Ba6F_GGj.d.ts → properties-DeQRa6VK.d.ts} +4 -4
- package/dist/{routing-C8oZYLsf.js → routing-8itEXLx6.js} +1 -1
- package/dist/{routing-BE6Vrs-z.d.ts → routing-DNN8R6bZ.d.ts} +1 -1
- package/dist/routing.d.ts +1 -1
- package/dist/routing.js +3 -180
- package/dist/{sdk-D2x2l6JH.d.ts → sdk-BVQyp5Dw.d.ts} +14 -13
- package/dist/search/index.d.ts +6 -6
- package/dist/search/index.js +233 -110
- package/dist/search/providers/algolia.d.ts +2 -2
- package/dist/search/providers/algolia.js +13 -14
- package/dist/search/providers/fuse.d.ts +2 -2
- package/dist/search/providers/fuse.js +13 -14
- package/dist/search/providers/pagefind.d.ts +2 -2
- package/dist/search/providers/pagefind.js +1 -1
- package/dist/search/providers/walker.d.ts +2 -2
- package/dist/search/providers/walker.js +13 -14
- package/dist/search/types.d.ts +2 -2
- package/dist/search/types.js +1 -1
- package/dist/{search-KMqOU2tz.d.ts → search-CPp6HpUy.d.ts} +3 -2
- package/dist/{sidebar-B1X4gmY2.d.ts → sidebar-BoPLeaxp.d.ts} +5 -4
- package/dist/{snippets-BApdMOXp.d.ts → snippets-DLHH_Voi.d.ts} +7 -6
- package/dist/{style-BWu-Pqcm.d.ts → style-BEMLtSIK.d.ts} +0 -10
- package/dist/{style-CkbsakoF.js → style-CPgcT0Fw.js} +1 -11
- package/dist/style.d.ts +1 -1
- package/dist/style.js +1 -1
- package/dist/styles/main.css +51 -20
- package/dist/styles/main.js +0 -0
- package/dist/styles/primitives.css +1 -0
- package/dist/styles/primitives.js +0 -0
- package/dist/styles/resets.css +1 -0
- package/dist/styles/resets.js +0 -0
- package/dist/styles/search.css +1 -0
- package/dist/styles/search.js +0 -0
- package/dist/styles/sidebar.css +1 -0
- package/dist/styles/sidebar.js +0 -0
- package/dist/styles/snippets.css +1 -0
- package/dist/styles/snippets.js +0 -0
- package/dist/styles/variables.css +2 -0
- package/dist/styles/variables.js +0 -0
- package/dist/{types-BLgvxY4i.d.ts → types-DNSz4kuM.d.ts} +1 -1
- package/dist/{use-components-DI-AbT-D.js → use-components-BHEwm0mE.js} +1 -1
- package/dist/{utils-BhYTrLot.js → utils-2FmcHPHp.js} +2 -2
- package/dist/{utils-B9JL_XWH.d.ts → utils-DVi3gJLL.d.ts} +2 -2
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +2 -2
- package/package.json +63 -10
- package/dist/components/dropdown.d.ts +0 -2
- package/dist/components/dropdown.js +0 -4
- package/dist/components/scripts/dropdown.d.ts +0 -12
- package/dist/components/scripts/dropdown.js +0 -50
- package/dist/contexts-DO0sMzym.js +0 -2581
- package/dist/dropdown-Dv9VAYCW.d.ts +0 -42
- package/dist/dropdown-kUhwBigR.js +0 -38
- package/dist/icons--8QR-PrL.js +0 -222
- package/dist/index-BW6OPqAo.d.ts +0 -16
- package/dist/mcp.cjs +0 -983418
- package/src/components/breadcrumbs.tsx +0 -94
- package/src/components/chat.tsx +0 -157
- package/src/components/icons.tsx +0 -584
- package/src/components/index.ts +0 -8
- package/src/components/method.tsx +0 -145
- package/src/components/overview.tsx +0 -172
- package/src/components/primitives.tsx +0 -301
- package/src/components/properties.tsx +0 -132
- package/src/components/sdk.tsx +0 -408
- package/src/components/sidebar.tsx +0 -99
- package/src/components/snippets.tsx +0 -197
- package/src/contexts/component-generics.tsx +0 -43
- package/src/contexts/component-types.tsx +0 -5
- package/src/contexts/component.tsx +0 -32
- package/src/contexts/docs.tsx +0 -86
- package/src/contexts/index.tsx +0 -20
- package/src/contexts/markdown.tsx +0 -44
- package/src/contexts/navigation.tsx +0 -44
- package/src/contexts/search.tsx +0 -27
- package/src/contexts/use-components.tsx +0 -4
- package/src/hooks/use-strict-context.tsx +0 -16
- package/src/index.ts +0 -6
- package/src/languages/go.tsx +0 -281
- package/src/languages/http.tsx +0 -329
- package/src/languages/index.ts +0 -26
- package/src/languages/java.tsx +0 -358
- package/src/languages/python.tsx +0 -258
- package/src/languages/ruby.tsx +0 -327
- package/src/languages/typescript.tsx +0 -399
- package/src/markdown/index.ts +0 -112
- package/src/markdown/md.ts +0 -45
- package/src/markdown/utils.ts +0 -52
- package/src/routing.ts +0 -238
- package/src/search/form.tsx +0 -130
- package/src/search/index.tsx +0 -1
- package/src/search/indexer.ts +0 -248
- package/src/search/mcp.ts +0 -156
- 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 -32
- package/src/search/results.tsx +0 -183
- package/src/search/state.ts +0 -64
- package/src/search/types.ts +0 -116
- package/src/style.ts +0 -185
- package/src/styles/main.css +0 -989
- package/src/styles/primitives.css +0 -392
- package/src/styles/resets.css +0 -39
- package/src/styles/search.css +0 -359
- package/src/styles/sidebar.css +0 -85
- package/src/styles/snippets.css +0 -130
- package/src/styles/variables.css +0 -86
- package/src/utils.ts +0 -40
- /package/dist/{chunk-Bp6m_JJh.js → chunk-DsStOjWQ.js} +0 -0
- /package/dist/{md-Dg8aOyMA.js → md-DxiV1_vy.js} +0 -0
- /package/dist/{pagefind-ChrPfuVv.js → pagefind-BaK1krMe.js} +0 -0
- /package/dist/{types-DFN4M1Sp.js → types-__XoFvJ_.js} +0 -0
- /package/dist/{utils-ByZH9QWT.js → utils-BCfb0F9R.js} +0 -0
- /package/dist/{utils-DlayebL1.d.ts → utils-D43p_yTd.d.ts} +0 -0
package/dist/search/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { a as useLanguage } from "../docs-
|
|
2
|
-
import "../component-generics-
|
|
3
|
-
import "../navigation-
|
|
4
|
-
import "../markdown-
|
|
5
|
-
import "../routing-
|
|
6
|
-
import { t as style_default } from "../style-
|
|
7
|
-
import { t as useComponents } from "../use-components-
|
|
8
|
-
import { a as useSearchContext, i as useSearch } from "../contexts-
|
|
9
|
-
import "../icons
|
|
10
|
-
import "../utils-
|
|
11
|
-
import "../
|
|
12
|
-
import "../
|
|
13
|
-
import "../
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as guideSearch } from "../pagefind-ChrPfuVv.js";
|
|
1
|
+
import { a as useLanguage } from "../docs-CopwX9a7.js";
|
|
2
|
+
import "../component-generics-D3ybuN5r.js";
|
|
3
|
+
import "../navigation-CGr5_w6z.js";
|
|
4
|
+
import "../markdown-BmpyokB7.js";
|
|
5
|
+
import "../routing-8itEXLx6.js";
|
|
6
|
+
import { t as style_default } from "../style-CPgcT0Fw.js";
|
|
7
|
+
import { t as useComponents } from "../use-components-BHEwm0mE.js";
|
|
8
|
+
import { a as useSearchContext, i as useSearch } from "../contexts-CMNI3ctP.js";
|
|
9
|
+
import "../icons-yb-Jhkmg.js";
|
|
10
|
+
import "../utils-2FmcHPHp.js";
|
|
11
|
+
import "../md-DxiV1_vy.js";
|
|
12
|
+
import "../utils-BCfb0F9R.js";
|
|
13
|
+
import { t as QueryKinds } from "../types-__XoFvJ_.js";
|
|
14
|
+
import { t as guideSearch } from "../pagefind-BaK1krMe.js";
|
|
16
15
|
import * as React$1 from "react";
|
|
16
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
17
17
|
import { BookOpenText, Box, Code, Folder, Search, Wrench, X } from "lucide-react";
|
|
18
18
|
|
|
19
19
|
//#region src/search/results.tsx
|
|
@@ -45,98 +45,180 @@ const QueryKindDisplay = {
|
|
|
45
45
|
};
|
|
46
46
|
function Highlight({ result, name }) {
|
|
47
47
|
const value = result._highlightResult[name]?.value;
|
|
48
|
-
if (value) return
|
|
48
|
+
if (value) return /* @__PURE__ */ jsx("span", { dangerouslySetInnerHTML: { __html: value } });
|
|
49
49
|
}
|
|
50
50
|
function SearchResultBreadcrumb({ result }) {
|
|
51
51
|
const Docs = useComponents();
|
|
52
52
|
const Icon = QueryKindDisplay[result.kind].icon;
|
|
53
|
-
const items = result.crumbs?.map((crumb) =>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
53
|
+
const items = result.crumbs?.map((crumb) => /* @__PURE__ */ jsx("span", {
|
|
54
|
+
className: style_default.SearchBreadcrumbItem,
|
|
55
|
+
children: crumb
|
|
56
|
+
}, crumb));
|
|
57
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
58
|
+
className: style_default.SearchBreadcrumb,
|
|
59
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
60
|
+
className: style_default.Icon,
|
|
61
|
+
size: 14
|
|
62
|
+
}), Array.isArray(result.crumbs) && /* @__PURE__ */ jsx(Docs.Join, {
|
|
63
|
+
items,
|
|
64
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
65
|
+
className: style_default.SearchBreadcrumbDivider,
|
|
66
|
+
children: "›"
|
|
67
|
+
})
|
|
68
|
+
})]
|
|
69
|
+
});
|
|
62
70
|
}
|
|
63
71
|
function SearchResult({ result }) {
|
|
64
|
-
return
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
72
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
73
|
+
className: style_default.SearchResult,
|
|
74
|
+
"data-stldocs-search-result": result.kind,
|
|
75
|
+
children: [/* @__PURE__ */ jsx(SearchResultBreadcrumb, { result }), /* @__PURE__ */ jsx(SearchResultContent, { result })]
|
|
76
|
+
});
|
|
68
77
|
}
|
|
69
78
|
function GuideResult({ result }) {
|
|
70
79
|
const Docs = useComponents();
|
|
71
80
|
const Icon = QueryKindDisplay["guide"].icon;
|
|
72
|
-
const path = result.data.url.slice(1, -1).split("/").map((crumb) =>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
81
|
+
const path = result.data.url.slice(1, -1).split("/").map((crumb) => /* @__PURE__ */ jsx("span", {
|
|
82
|
+
className: style_default.SearchBreadcrumbItem,
|
|
83
|
+
children: crumb
|
|
84
|
+
}, crumb));
|
|
85
|
+
const crumbs = path.length > 1 ? path : [/* @__PURE__ */ jsx("span", {
|
|
86
|
+
className: style_default.SearchBreadcrumbItem,
|
|
87
|
+
children: "Overview"
|
|
88
|
+
}, "overview")];
|
|
89
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
90
|
+
className: style_default.SearchResult,
|
|
91
|
+
"data-stldocs-search-result": "guide",
|
|
92
|
+
children: [
|
|
93
|
+
/* @__PURE__ */ jsxs("div", {
|
|
94
|
+
className: style_default.SearchBreadcrumb,
|
|
95
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
96
|
+
className: style_default.Icon,
|
|
97
|
+
size: 14
|
|
98
|
+
}), /* @__PURE__ */ jsx(Docs.Join, {
|
|
99
|
+
items: crumbs,
|
|
100
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
101
|
+
className: style_default.SearchBreadcrumbDivider,
|
|
102
|
+
children: "›"
|
|
103
|
+
})
|
|
104
|
+
})]
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ jsx("h3", {
|
|
107
|
+
className: style_default.SearchResultGuideTitle,
|
|
108
|
+
children: result.data.meta.title
|
|
109
|
+
}),
|
|
110
|
+
/* @__PURE__ */ jsx("div", {
|
|
111
|
+
className: style_default.SearchResultGuideExcerpt,
|
|
112
|
+
dangerouslySetInnerHTML: { __html: result.data.excerpt }
|
|
113
|
+
})
|
|
114
|
+
]
|
|
115
|
+
});
|
|
88
116
|
}
|
|
89
117
|
function SearchResultContent({ result }) {
|
|
90
118
|
const Docs = useComponents();
|
|
91
119
|
const language = useLanguage();
|
|
92
120
|
switch (result.kind) {
|
|
93
|
-
case "http_method": return
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
121
|
+
case "http_method": return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Docs.MethodHeader, {
|
|
122
|
+
level: "h5",
|
|
123
|
+
title: /* @__PURE__ */ jsx(Highlight, {
|
|
124
|
+
result,
|
|
125
|
+
name: result.summary ? "summary" : "title"
|
|
126
|
+
}),
|
|
127
|
+
signature: result["qualified"] && /* @__PURE__ */ jsx(Highlight, {
|
|
128
|
+
result,
|
|
129
|
+
name: "qualified"
|
|
130
|
+
}),
|
|
131
|
+
children: /* @__PURE__ */ jsx(Docs.MethodRoute, {
|
|
132
|
+
httpMethod: result.httpMethod,
|
|
133
|
+
endpoint: /* @__PURE__ */ jsx(Highlight, {
|
|
134
|
+
result,
|
|
135
|
+
name: "endpoint"
|
|
136
|
+
})
|
|
137
|
+
})
|
|
138
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
139
|
+
className: `${style_default.MethodDescription} ${style_default.Content}`,
|
|
140
|
+
children: /* @__PURE__ */ jsx(Highlight, {
|
|
141
|
+
result,
|
|
142
|
+
name: "description"
|
|
143
|
+
})
|
|
144
|
+
})] });
|
|
101
145
|
case "model": {
|
|
102
|
-
const properties = result.children?.map((child, index) =>
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
146
|
+
const properties = result.children?.map((child, index) => /* @__PURE__ */ jsx("span", {
|
|
147
|
+
className: style_default.TextIdentifier,
|
|
148
|
+
children: child
|
|
149
|
+
}, index)) ?? [];
|
|
150
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
151
|
+
className: style_default.Property,
|
|
152
|
+
"data-stldocs-language": language,
|
|
153
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
154
|
+
className: style_default.PropertyHeader,
|
|
155
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
156
|
+
className: style_default.PropertyName,
|
|
157
|
+
children: /* @__PURE__ */ jsx(Highlight, {
|
|
158
|
+
result,
|
|
159
|
+
name: result.title ? "title" : "name"
|
|
160
|
+
})
|
|
161
|
+
})
|
|
162
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
163
|
+
className: style_default.PropertyDeclaration,
|
|
164
|
+
children: [
|
|
165
|
+
/* @__PURE__ */ jsx(Highlight, {
|
|
166
|
+
result,
|
|
167
|
+
name: "ident"
|
|
168
|
+
}),
|
|
169
|
+
":",
|
|
170
|
+
" ",
|
|
171
|
+
/* @__PURE__ */ jsx(Docs.Join, {
|
|
172
|
+
items: properties,
|
|
173
|
+
limit: 3,
|
|
174
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
175
|
+
className: style_default.TextPunctuation,
|
|
176
|
+
children: ", "
|
|
177
|
+
})
|
|
178
|
+
})
|
|
179
|
+
]
|
|
180
|
+
})]
|
|
181
|
+
});
|
|
118
182
|
}
|
|
119
|
-
case "resource": return
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
183
|
+
case "resource": return /* @__PURE__ */ jsxs("div", {
|
|
184
|
+
className: style_default.SearchResultResourceInfo,
|
|
185
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
186
|
+
className: style_default.SearchResultResourceTitle,
|
|
187
|
+
children: /* @__PURE__ */ jsx(Highlight, {
|
|
188
|
+
result,
|
|
189
|
+
name: "title"
|
|
190
|
+
})
|
|
191
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
192
|
+
className: style_default.SearchResultResourcePath,
|
|
193
|
+
children: /* @__PURE__ */ jsx(Highlight, {
|
|
194
|
+
result,
|
|
195
|
+
name: "QualifiedName"
|
|
196
|
+
})
|
|
197
|
+
})]
|
|
198
|
+
});
|
|
199
|
+
case "property": return /* @__PURE__ */ jsxs("div", {
|
|
200
|
+
className: style_default.Property,
|
|
201
|
+
"data-stldocs-language": language,
|
|
202
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
203
|
+
className: style_default.PropertyHeader,
|
|
204
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
205
|
+
className: style_default.PropertyName,
|
|
206
|
+
children: /* @__PURE__ */ jsx(Highlight, {
|
|
207
|
+
result,
|
|
208
|
+
name: "name"
|
|
209
|
+
})
|
|
210
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
211
|
+
className: style_default.PropertyTypeName,
|
|
212
|
+
children: /* @__PURE__ */ jsx("span", { dangerouslySetInnerHTML: { __html: result.type ?? "" } })
|
|
213
|
+
})]
|
|
214
|
+
}), result.docstring && /* @__PURE__ */ jsx("span", {
|
|
215
|
+
className: style_default.PropertyDescription,
|
|
216
|
+
children: /* @__PURE__ */ jsx(Highlight, {
|
|
217
|
+
result,
|
|
218
|
+
name: "docstring"
|
|
219
|
+
})
|
|
220
|
+
})]
|
|
221
|
+
});
|
|
140
222
|
}
|
|
141
223
|
}
|
|
142
224
|
|
|
@@ -177,34 +259,75 @@ function SearchForm() {
|
|
|
177
259
|
filterKind,
|
|
178
260
|
language
|
|
179
261
|
]);
|
|
180
|
-
return
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
262
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
263
|
+
className: style_default.SearchForm,
|
|
264
|
+
children: [
|
|
265
|
+
/* @__PURE__ */ jsx(Docs.Input, {
|
|
266
|
+
ref: inputRef,
|
|
267
|
+
autoFocus: true,
|
|
268
|
+
onChange: (ev) => setSearchQuery(ev.target.value),
|
|
269
|
+
left: /* @__PURE__ */ jsx(Search, {
|
|
270
|
+
size: 16,
|
|
271
|
+
className: style_default.Icon
|
|
272
|
+
}),
|
|
273
|
+
right: searchQuery && /* @__PURE__ */ jsx(X, {
|
|
274
|
+
cursor: "pointer",
|
|
275
|
+
onClick: () => clearInput(),
|
|
276
|
+
size: 16,
|
|
277
|
+
className: style_default.Icon
|
|
278
|
+
}),
|
|
279
|
+
value: searchQuery,
|
|
280
|
+
placeholder: "Search"
|
|
281
|
+
}),
|
|
282
|
+
/* @__PURE__ */ jsx(SearchFilter, {
|
|
283
|
+
results,
|
|
284
|
+
filterKind,
|
|
285
|
+
onChange: (filterKind$1) => setFilterKind(filterKind$1)
|
|
286
|
+
}),
|
|
287
|
+
/* @__PURE__ */ jsx(Docs.ListView, {
|
|
288
|
+
items: results?.items ?? [],
|
|
289
|
+
itemDelegate: (item) => "kind" in item ? /* @__PURE__ */ jsx(SearchResult, { result: item }) : /* @__PURE__ */ jsx(GuideResult, { result: item }),
|
|
290
|
+
onSelectListItem: (item) => onSelect?.(item["data"]?.["url"] ?? item["stainlessPath"])
|
|
291
|
+
})
|
|
292
|
+
]
|
|
293
|
+
});
|
|
187
294
|
}
|
|
188
295
|
function SearchFilter({ results, filterKind, onChange }) {
|
|
189
296
|
const Docs = useComponents();
|
|
190
297
|
const { pageFind } = useSearchContext();
|
|
191
298
|
const toggles = pageFind ? QueryKinds : QueryKinds.slice(0, -1);
|
|
192
|
-
return
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
299
|
+
return /* @__PURE__ */ jsx("div", {
|
|
300
|
+
className: style_default.SearchFilter,
|
|
301
|
+
children: toggles.map((kind, index) => /* @__PURE__ */ jsxs(Docs.ToggleButton, {
|
|
302
|
+
selected: filterKind === kind,
|
|
303
|
+
onClick: () => onChange?.(kind),
|
|
304
|
+
children: [
|
|
305
|
+
React$1.createElement(QueryKindDisplay[kind].icon, {
|
|
306
|
+
size: 16,
|
|
307
|
+
className: style_default.Icon
|
|
308
|
+
}),
|
|
309
|
+
/* @__PURE__ */ jsx("span", {
|
|
310
|
+
className: style_default.SearchFilterLabel,
|
|
311
|
+
children: QueryKindDisplay[kind].name
|
|
312
|
+
}),
|
|
313
|
+
/* @__PURE__ */ jsx("span", {
|
|
314
|
+
className: style_default.SearchFilterCount,
|
|
315
|
+
children: results?.counts?.[kind] ?? 0
|
|
316
|
+
})
|
|
317
|
+
]
|
|
318
|
+
}, index))
|
|
319
|
+
});
|
|
202
320
|
}
|
|
203
321
|
function SearchModal({ id, open: isOpen }) {
|
|
204
322
|
const [open, setOpen] = React$1.useState(isOpen ?? false);
|
|
205
|
-
return
|
|
206
|
-
|
|
207
|
-
|
|
323
|
+
return /* @__PURE__ */ jsx("div", {
|
|
324
|
+
id,
|
|
325
|
+
onToggle: (ev) => setOpen(ev.newState === "open"),
|
|
326
|
+
className: style_default.SearchModal,
|
|
327
|
+
popover: "auto",
|
|
328
|
+
"data-stldocs-modal-open": open,
|
|
329
|
+
children: open && /* @__PURE__ */ jsx(SearchForm, {})
|
|
330
|
+
});
|
|
208
331
|
}
|
|
209
332
|
|
|
210
333
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../routing-
|
|
2
|
-
import { d as ResultType, h as SearchSettings, m as SearchParams } from "../../types-
|
|
1
|
+
import "../../routing-DNN8R6bZ.js";
|
|
2
|
+
import { d as ResultType, h as SearchSettings, m as SearchParams } from "../../types-DNSz4kuM.js";
|
|
3
3
|
import * as SDKJSON from "@stainless/sdk-json";
|
|
4
4
|
|
|
5
5
|
//#region src/search/providers/algolia.d.ts
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import "../../docs-
|
|
2
|
-
import "../../component-generics-
|
|
3
|
-
import "../../navigation-
|
|
4
|
-
import "../../markdown-
|
|
5
|
-
import "../../routing-
|
|
6
|
-
import "../../style-
|
|
7
|
-
import "../../use-components-
|
|
8
|
-
import { c as search, o as buildChatIndex, s as buildIndex } from "../../contexts-
|
|
9
|
-
import "../../icons
|
|
10
|
-
import "../../utils-
|
|
11
|
-
import "../../
|
|
12
|
-
import "../../
|
|
13
|
-
import "../../
|
|
14
|
-
import "../../types-DFN4M1Sp.js";
|
|
1
|
+
import "../../docs-CopwX9a7.js";
|
|
2
|
+
import "../../component-generics-D3ybuN5r.js";
|
|
3
|
+
import "../../navigation-CGr5_w6z.js";
|
|
4
|
+
import "../../markdown-BmpyokB7.js";
|
|
5
|
+
import "../../routing-8itEXLx6.js";
|
|
6
|
+
import "../../style-CPgcT0Fw.js";
|
|
7
|
+
import "../../use-components-BHEwm0mE.js";
|
|
8
|
+
import { c as search, o as buildChatIndex, s as buildIndex } from "../../contexts-CMNI3ctP.js";
|
|
9
|
+
import "../../icons-yb-Jhkmg.js";
|
|
10
|
+
import "../../utils-2FmcHPHp.js";
|
|
11
|
+
import "../../md-DxiV1_vy.js";
|
|
12
|
+
import "../../utils-BCfb0F9R.js";
|
|
13
|
+
import "../../types-__XoFvJ_.js";
|
|
15
14
|
|
|
16
15
|
export { buildChatIndex, buildIndex, search };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as DocsLanguage } from "../../routing-
|
|
2
|
-
import { n as IndexEntry } from "../../types-
|
|
1
|
+
import { t as DocsLanguage } from "../../routing-DNN8R6bZ.js";
|
|
2
|
+
import { n as IndexEntry } from "../../types-DNSz4kuM.js";
|
|
3
3
|
import * as fuse_js0 from "fuse.js";
|
|
4
4
|
import { FuseIndex } from "fuse.js";
|
|
5
5
|
import * as SDKJSON from "@stainless/sdk-json";
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import "../../docs-
|
|
2
|
-
import "../../component-generics-
|
|
3
|
-
import "../../navigation-
|
|
4
|
-
import "../../markdown-
|
|
5
|
-
import "../../routing-
|
|
6
|
-
import "../../style-
|
|
7
|
-
import "../../use-components-
|
|
8
|
-
import { l as generateIndex } from "../../contexts-
|
|
9
|
-
import "../../icons
|
|
10
|
-
import "../../utils-
|
|
11
|
-
import "../../
|
|
12
|
-
import "../../
|
|
13
|
-
import "../../
|
|
14
|
-
import { n as SearchableAttributes } from "../../types-DFN4M1Sp.js";
|
|
1
|
+
import "../../docs-CopwX9a7.js";
|
|
2
|
+
import "../../component-generics-D3ybuN5r.js";
|
|
3
|
+
import "../../navigation-CGr5_w6z.js";
|
|
4
|
+
import "../../markdown-BmpyokB7.js";
|
|
5
|
+
import "../../routing-8itEXLx6.js";
|
|
6
|
+
import "../../style-CPgcT0Fw.js";
|
|
7
|
+
import "../../use-components-BHEwm0mE.js";
|
|
8
|
+
import { l as generateIndex } from "../../contexts-CMNI3ctP.js";
|
|
9
|
+
import "../../icons-yb-Jhkmg.js";
|
|
10
|
+
import "../../utils-2FmcHPHp.js";
|
|
11
|
+
import "../../md-DxiV1_vy.js";
|
|
12
|
+
import "../../utils-BCfb0F9R.js";
|
|
13
|
+
import { n as SearchableAttributes } from "../../types-__XoFvJ_.js";
|
|
15
14
|
import Fuse from "fuse.js";
|
|
16
15
|
|
|
17
16
|
//#region src/search/providers/fuse.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../routing-
|
|
2
|
-
import { t as GuideResultType } from "../../types-
|
|
1
|
+
import "../../routing-DNN8R6bZ.js";
|
|
2
|
+
import { t as GuideResultType } from "../../types-DNSz4kuM.js";
|
|
3
3
|
|
|
4
4
|
//#region src/search/providers/pagefind.d.ts
|
|
5
5
|
declare function guideSearch(loadPath: string, query: string, limit?: number): Promise<GuideResultType[]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as DocsLanguage } from "../../routing-
|
|
2
|
-
import { n as IndexEntry } from "../../types-
|
|
1
|
+
import { t as DocsLanguage } from "../../routing-DNN8R6bZ.js";
|
|
2
|
+
import { n as IndexEntry } from "../../types-DNSz4kuM.js";
|
|
3
3
|
import * as SDKJSON from "@stainless/sdk-json";
|
|
4
4
|
|
|
5
5
|
//#region src/search/providers/walker.d.ts
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import "../../docs-
|
|
2
|
-
import "../../component-generics-
|
|
3
|
-
import "../../navigation-
|
|
4
|
-
import "../../markdown-
|
|
5
|
-
import "../../routing-
|
|
6
|
-
import "../../style-
|
|
7
|
-
import "../../use-components-
|
|
8
|
-
import { l as generateIndex } from "../../contexts-
|
|
9
|
-
import "../../icons
|
|
10
|
-
import "../../utils-
|
|
11
|
-
import "../../
|
|
12
|
-
import "../../
|
|
13
|
-
import "../../
|
|
14
|
-
import { n as SearchableAttributes } from "../../types-DFN4M1Sp.js";
|
|
1
|
+
import "../../docs-CopwX9a7.js";
|
|
2
|
+
import "../../component-generics-D3ybuN5r.js";
|
|
3
|
+
import "../../navigation-CGr5_w6z.js";
|
|
4
|
+
import "../../markdown-BmpyokB7.js";
|
|
5
|
+
import "../../routing-8itEXLx6.js";
|
|
6
|
+
import "../../style-CPgcT0Fw.js";
|
|
7
|
+
import "../../use-components-BHEwm0mE.js";
|
|
8
|
+
import { l as generateIndex } from "../../contexts-CMNI3ctP.js";
|
|
9
|
+
import "../../icons-yb-Jhkmg.js";
|
|
10
|
+
import "../../utils-2FmcHPHp.js";
|
|
11
|
+
import "../../md-DxiV1_vy.js";
|
|
12
|
+
import "../../utils-BCfb0F9R.js";
|
|
13
|
+
import { n as SearchableAttributes } from "../../types-__XoFvJ_.js";
|
|
15
14
|
|
|
16
15
|
//#region src/search/providers/walker.ts
|
|
17
16
|
function buildIndex(spec) {
|
package/dist/search/types.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../routing-
|
|
2
|
-
import { _ as SearchableAttributesChat, a as IndexProperty, c as QueryKindsType, d as ResultType, f as RoutableJsonNode, g as SearchableAttributes, h as SearchSettings, i as IndexModel, l as ResultData, m as SearchParams, n as IndexEntry, o as IndexResource, p as SearchAttributeNames, r as IndexMethod, s as QueryKinds, t as GuideResultType, u as ResultRecordType } from "../types-
|
|
1
|
+
import "../routing-DNN8R6bZ.js";
|
|
2
|
+
import { _ as SearchableAttributesChat, a as IndexProperty, c as QueryKindsType, d as ResultType, f as RoutableJsonNode, g as SearchableAttributes, h as SearchSettings, i as IndexModel, l as ResultData, m as SearchParams, n as IndexEntry, o as IndexResource, p as SearchAttributeNames, r as IndexMethod, s as QueryKinds, t as GuideResultType, u as ResultRecordType } from "../types-DNSz4kuM.js";
|
|
3
3
|
export { GuideResultType, IndexEntry, IndexMethod, IndexModel, IndexProperty, IndexResource, QueryKinds, QueryKindsType, ResultData, ResultRecordType, ResultType, RoutableJsonNode, SearchAttributeNames, SearchParams, SearchSettings, SearchableAttributes, SearchableAttributesChat };
|
package/dist/search/types.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as SearchableAttributes, r as SearchableAttributesChat, t as QueryKinds } from "../types-
|
|
1
|
+
import { n as SearchableAttributes, r as SearchableAttributesChat, t as QueryKinds } from "../types-__XoFvJ_.js";
|
|
2
2
|
|
|
3
3
|
export { QueryKinds, SearchableAttributes, SearchableAttributesChat };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { d as ResultType, h as SearchSettings, m as SearchParams } from "./types-
|
|
1
|
+
import { d as ResultType, h as SearchSettings, m as SearchParams } from "./types-DNSz4kuM.js";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
|
+
import * as react_jsx_runtime83 from "react/jsx-runtime";
|
|
3
4
|
|
|
4
5
|
//#region src/contexts/search.d.ts
|
|
5
6
|
type SearchContextType = {
|
|
@@ -15,6 +16,6 @@ type SearchProviderProps = SearchContextType & {
|
|
|
15
16
|
declare function SearchProvider({
|
|
16
17
|
children,
|
|
17
18
|
...props
|
|
18
|
-
}: SearchProviderProps):
|
|
19
|
+
}: SearchProviderProps): react_jsx_runtime83.JSX.Element;
|
|
19
20
|
//#endregion
|
|
20
21
|
export { useSearchContext as a, useSearch as i, SearchProvider as n, SearchProviderProps as r, SearchContextType as t };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
+
import * as react_jsx_runtime71 from "react/jsx-runtime";
|
|
2
3
|
import * as SDKJSON from "@stainless/sdk-json";
|
|
3
4
|
|
|
4
5
|
//#region src/components/sidebar.d.ts
|
|
@@ -11,25 +12,25 @@ declare function SidebarExpander({
|
|
|
11
12
|
open,
|
|
12
13
|
summary,
|
|
13
14
|
children
|
|
14
|
-
}: SidebarExpanderProps):
|
|
15
|
+
}: SidebarExpanderProps): react_jsx_runtime71.JSX.Element;
|
|
15
16
|
type SidebarMethodProps = {
|
|
16
17
|
method: SDKJSON.Method;
|
|
17
18
|
};
|
|
18
19
|
declare function SidebarMethod({
|
|
19
20
|
method
|
|
20
|
-
}: SidebarMethodProps):
|
|
21
|
+
}: SidebarMethodProps): react_jsx_runtime71.JSX.Element;
|
|
21
22
|
type SidebarResourceProps = {
|
|
22
23
|
resource: SDKJSON.Resource;
|
|
23
24
|
};
|
|
24
25
|
declare function SidebarResource({
|
|
25
26
|
resource
|
|
26
|
-
}: SidebarResourceProps):
|
|
27
|
+
}: SidebarResourceProps): react_jsx_runtime71.JSX.Element;
|
|
27
28
|
type SidebarProps = {
|
|
28
29
|
resources: SDKJSON.Resource[];
|
|
29
30
|
selectedPath?: string;
|
|
30
31
|
};
|
|
31
32
|
declare function Sidebar({
|
|
32
33
|
resources
|
|
33
|
-
}: SidebarProps):
|
|
34
|
+
}: SidebarProps): react_jsx_runtime71.JSX.Element;
|
|
34
35
|
//#endregion
|
|
35
36
|
export { SidebarProps as a, SidebarMethodProps as i, SidebarExpander as n, SidebarResource as o, SidebarMethod as r, SidebarResourceProps as s, Sidebar as t };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { C as TransformRequestSnippetFn } from "./sdk-
|
|
1
|
+
import { C as TransformRequestSnippetFn } from "./sdk-BVQyp5Dw.js";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
|
+
import * as react_jsx_runtime47 from "react/jsx-runtime";
|
|
3
4
|
import * as SDKJSON from "@stainless/sdk-json";
|
|
4
5
|
|
|
5
6
|
//#region src/components/snippets.d.ts
|
|
@@ -11,7 +12,7 @@ type SnippetCodeProps = {
|
|
|
11
12
|
declare function SnippetCode({
|
|
12
13
|
content,
|
|
13
14
|
language
|
|
14
|
-
}: SnippetCodeProps):
|
|
15
|
+
}: SnippetCodeProps): react_jsx_runtime47.JSX.Element;
|
|
15
16
|
type SnippetProps = {
|
|
16
17
|
method: SDKJSON.Method;
|
|
17
18
|
requestTitle?: React$1.ReactNode;
|
|
@@ -23,23 +24,23 @@ type SnippetContainerProps = {
|
|
|
23
24
|
};
|
|
24
25
|
declare function SnippetContainer({
|
|
25
26
|
children
|
|
26
|
-
}: SnippetContainerProps):
|
|
27
|
+
}: SnippetContainerProps): react_jsx_runtime47.JSX.Element;
|
|
27
28
|
type SnippetRequestContainerProps = {
|
|
28
29
|
children?: React$1.ReactNode;
|
|
29
30
|
signature?: string;
|
|
30
31
|
};
|
|
31
32
|
declare function SnippetRequestContainer({
|
|
32
33
|
children
|
|
33
|
-
}: SnippetRequestContainerProps):
|
|
34
|
+
}: SnippetRequestContainerProps): react_jsx_runtime47.JSX.Element;
|
|
34
35
|
declare function Snippet({
|
|
35
36
|
requestTitle,
|
|
36
37
|
method,
|
|
37
38
|
transformRequestSnippet
|
|
38
|
-
}: SnippetProps):
|
|
39
|
+
}: SnippetProps): react_jsx_runtime47.JSX.Element | null;
|
|
39
40
|
declare function SnippetResponse({
|
|
40
41
|
responses
|
|
41
42
|
}: {
|
|
42
43
|
responses: SDKJSON.Method['exampleResponses'];
|
|
43
|
-
}):
|
|
44
|
+
}): react_jsx_runtime47.JSX.Element | null;
|
|
44
45
|
//#endregion
|
|
45
46
|
export { SnippetContainerProps as a, SnippetRequestContainerProps as c, SnippetContainer as i, SnippetResponse as l, SnippetCode as n, SnippetProps as o, SnippetCodeProps as r, SnippetRequestContainer as s, Snippet as t };
|