@stainless-api/docs-ui 0.1.0-beta.34 → 0.1.0-beta.36
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-B1IJ7O7x.d.ts → breadcrumbs-dtzB0F5w.d.ts} +2 -2
- package/dist/{component-generics-B_yTG3I2.d.ts → component-generics-BDiaS39j.d.ts} +2 -2
- package/dist/components/breadcrumbs.d.ts +1 -1
- package/dist/components/breadcrumbs.js +13 -13
- package/dist/components/icons.d.ts +10 -10
- package/dist/components/icons.js +1 -1
- package/dist/components/index.d.ts +10 -10
- package/dist/components/index.js +13 -13
- package/dist/components/method.d.ts +1 -1
- package/dist/components/method.js +13 -13
- package/dist/components/overview.d.ts +1 -1
- package/dist/components/overview.js +13 -13
- package/dist/components/primitives.d.ts +1 -1
- package/dist/components/primitives.js +13 -13
- package/dist/components/properties.d.ts +1 -1
- package/dist/components/properties.js +13 -13
- package/dist/components/sdk.d.ts +2 -2
- package/dist/components/sdk.js +13 -13
- package/dist/components/sidebar.d.ts +1 -1
- package/dist/components/sidebar.js +13 -13
- package/dist/components/snippets.d.ts +3 -3
- package/dist/components/snippets.js +13 -13
- 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 -11
- package/dist/contexts/component.d.ts +14 -14
- package/dist/contexts/component.js +13 -13
- package/dist/contexts/docs.d.ts +1 -1
- package/dist/contexts/docs.js +1 -1
- package/dist/contexts/index.d.ts +18 -18
- package/dist/contexts/index.js +13 -13
- 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 -13
- package/dist/contexts/use-components.d.ts +10 -10
- package/dist/contexts/use-components.js +2 -2
- package/dist/{contexts-CA0Kr3z6.js → contexts-BsscycD4.js} +49 -16
- package/dist/{docs-DJf7vMYk.d.ts → docs-M2vPMlOU.d.ts} +3 -3
- package/dist/{index-Csilgc_m.d.ts → index-QAn9oMm0.d.ts} +26 -26
- package/dist/{index-B-N_GkfU.d.ts → index-rJGGwEE1.d.ts} +8 -8
- package/dist/{index-DSLoPjXF.d.ts → index-yemeeTKf.d.ts} +6 -6
- package/dist/index.d.ts +20 -20
- package/dist/index.js +13 -13
- package/dist/languages/go.d.ts +11 -11
- package/dist/languages/go.js +13 -13
- package/dist/languages/http.d.ts +11 -11
- package/dist/languages/http.js +13 -13
- package/dist/languages/index.d.ts +11 -11
- package/dist/languages/index.js +13 -13
- package/dist/languages/java.d.ts +11 -11
- package/dist/languages/java.js +13 -13
- package/dist/languages/python.d.ts +11 -11
- package/dist/languages/python.js +13 -13
- package/dist/languages/ruby.d.ts +11 -11
- package/dist/languages/ruby.js +13 -13
- package/dist/languages/typescript.d.ts +11 -11
- package/dist/languages/typescript.js +13 -13
- package/dist/markdown/index.d.ts +3 -3
- package/dist/markdown/index.js +13 -13
- 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-CfXfEs-F.js → markdown-CI4kbU64.js} +1 -1
- package/dist/{markdown-D6OsZV9a.d.ts → markdown-DqmOO2yJ.d.ts} +2 -2
- package/dist/{method-CYFc08pR.d.ts → method-CZzWOx_C.d.ts} +7 -7
- package/dist/{navigation-BDYYwaKI.d.ts → navigation-Cup7hBYA.d.ts} +3 -3
- package/dist/{overview-Deat1kEk.d.ts → overview-DQbnFeID.d.ts} +6 -6
- package/dist/{primitives-BnYw5tM1.d.ts → primitives-CLZY-K6r.d.ts} +9 -9
- package/dist/{properties-4UqNumXj.d.ts → properties-BbVUdVi5.d.ts} +4 -4
- package/dist/{routing-C4JpPxpl.js → routing-8itEXLx6.js} +1 -1
- package/dist/{routing-BLDP60j9.d.ts → routing-DNN8R6bZ.d.ts} +1 -1
- package/dist/routing.d.ts +1 -1
- package/dist/routing.js +1 -1
- package/dist/{sdk-DUfaMi9P.d.ts → sdk-CrXkrSx-.d.ts} +14 -14
- package/dist/search/index.d.ts +2 -2
- package/dist/search/index.js +14 -14
- package/dist/search/providers/algolia.d.ts +2 -2
- package/dist/search/providers/algolia.js +13 -13
- package/dist/search/providers/fuse.d.ts +2 -2
- package/dist/search/providers/fuse.js +13 -13
- 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 -13
- package/dist/search/types.d.ts +2 -2
- package/dist/search/types.js +1 -1
- package/dist/{search-CtCvT_CB.d.ts → search-CuNBTBix.d.ts} +3 -3
- package/dist/{snippets-mXu8qmRt.d.ts → snippets-De1PSCNy.d.ts} +7 -7
- package/dist/spec.d.ts +65 -0
- package/dist/spec.js +167 -0
- package/dist/{style-BUaRdg0v.js → style-CuGfVeTo.js} +0 -6
- package/dist/{style-DZBqvhxT.d.ts → style-Dku3IzwI.d.ts} +0 -6
- package/dist/style.d.ts +1 -1
- package/dist/style.js +1 -1
- package/dist/styles/search.css +0 -117
- package/dist/{types-D3jChPAG.d.ts → types-DNSz4kuM.d.ts} +1 -1
- package/dist/{use-components-mJnQErn0.js → use-components-BHEwm0mE.js} +1 -1
- package/dist/{utils-B0F_20cr.js → utils-2FmcHPHp.js} +2 -2
- package/dist/{utils-BJ2b0pdl.d.ts → utils-BwsGzMOo.d.ts} +2 -2
- package/dist/{utils-Br_vI9GZ.js → utils-Jo_o4DX9.js} +2 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +2 -2
- package/package.json +30 -27
- /package/dist/{chunk-BZIdVjpq.js → chunk-DsStOjWQ.js} +0 -0
- /package/dist/{component-generics-Baa_QTKJ.js → component-generics-D3ybuN5r.js} +0 -0
- /package/dist/{docs-C2BtCAV3.js → docs-CopwX9a7.js} +0 -0
- /package/dist/{icons-CHd7NU9a.js → icons-yb-Jhkmg.js} +0 -0
- /package/dist/{md-Bz1tDY4G.js → md-DxiV1_vy.js} +0 -0
- /package/dist/{navigation-Bnr8b_IW.js → navigation-CGr5_w6z.js} +0 -0
- /package/dist/{pagefind-CbOkIJf-.js → pagefind-BaK1krMe.js} +0 -0
- /package/dist/{sidebar-D6pMIVu7.d.ts → sidebar-eox2y7Tm.d.ts} +0 -0
- /package/dist/{types-DmEzjqL2.js → types-__XoFvJ_.js} +0 -0
- /package/dist/{utils-By4F4SN7.d.ts → utils-D43p_yTd.d.ts} +0 -0
package/dist/spec.js
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { n as Languages } from "./routing-8itEXLx6.js";
|
|
2
|
+
import { r as isResourceEmpty } from "./utils-2FmcHPHp.js";
|
|
3
|
+
|
|
4
|
+
//#region src/spec.ts
|
|
5
|
+
const defaultTransforms = {
|
|
6
|
+
resource: (resource) => resource,
|
|
7
|
+
method: (method) => method,
|
|
8
|
+
model: (model) => model,
|
|
9
|
+
declaration: (decl) => decl,
|
|
10
|
+
securityScheme: (scheme) => scheme,
|
|
11
|
+
snippet: (snippet) => snippet,
|
|
12
|
+
markdown: (content) => content
|
|
13
|
+
};
|
|
14
|
+
function defineTransforms(transforms = {}) {
|
|
15
|
+
return {
|
|
16
|
+
...defaultTransforms,
|
|
17
|
+
...transforms
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function removeStudioRefs(obj) {
|
|
21
|
+
if (typeof obj !== "object" || obj === null) return obj;
|
|
22
|
+
if (Array.isArray(obj)) return obj.map(removeStudioRefs);
|
|
23
|
+
const newObj = {};
|
|
24
|
+
for (const [key, value] of Object.entries(obj)) if (key !== "oasRef" && key !== "configRef") newObj[key] = removeStudioRefs(value);
|
|
25
|
+
return newObj;
|
|
26
|
+
}
|
|
27
|
+
function mapEntries({ input, fn, filter }) {
|
|
28
|
+
if (!input) return;
|
|
29
|
+
const output = {};
|
|
30
|
+
for (const [name, entry] of Object.entries(input)) {
|
|
31
|
+
if (filter && !filter(name, entry)) continue;
|
|
32
|
+
output[name] = fn ? fn(entry) : entry;
|
|
33
|
+
}
|
|
34
|
+
return output;
|
|
35
|
+
}
|
|
36
|
+
function transformRecursively(resource, transforms) {
|
|
37
|
+
return {
|
|
38
|
+
...transforms.resource(resource),
|
|
39
|
+
methods: mapEntries({
|
|
40
|
+
input: resource.methods,
|
|
41
|
+
fn: (method) => transforms.method(method)
|
|
42
|
+
}) ?? {},
|
|
43
|
+
models: mapEntries({
|
|
44
|
+
input: resource.models,
|
|
45
|
+
fn: (model) => transforms.model(model)
|
|
46
|
+
}) ?? {},
|
|
47
|
+
subresources: mapEntries({
|
|
48
|
+
input: resource.subresources,
|
|
49
|
+
fn: (sub) => transformRecursively(sub, transforms)
|
|
50
|
+
}) ?? {}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function generateNavigation(resource) {
|
|
54
|
+
const { title, name, stainlessPath, terraform } = resource;
|
|
55
|
+
return {
|
|
56
|
+
title,
|
|
57
|
+
name,
|
|
58
|
+
subresources: mapEntries({
|
|
59
|
+
input: resource.subresources,
|
|
60
|
+
fn: generateNavigation
|
|
61
|
+
}),
|
|
62
|
+
methods: mapEntries({
|
|
63
|
+
input: resource.methods,
|
|
64
|
+
fn: (method) => ({
|
|
65
|
+
name: method.name,
|
|
66
|
+
stainlessPath: method.stainlessPath,
|
|
67
|
+
summary: method.summary,
|
|
68
|
+
httpMethod: method.httpMethod
|
|
69
|
+
})
|
|
70
|
+
}),
|
|
71
|
+
models: mapEntries({
|
|
72
|
+
input: resource.models,
|
|
73
|
+
fn: (model) => ({
|
|
74
|
+
name: model.name,
|
|
75
|
+
stainlessPath: model.stainlessPath
|
|
76
|
+
})
|
|
77
|
+
}),
|
|
78
|
+
stainlessPath,
|
|
79
|
+
terraform
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function generateSpecForResource(spec, name, lang, transforms) {
|
|
83
|
+
const resource = spec.resources[name];
|
|
84
|
+
if (!resource) throw new Error(`Invalid resource: ${name}`);
|
|
85
|
+
return {
|
|
86
|
+
resources: {
|
|
87
|
+
[name]: transformRecursively(resource, transforms),
|
|
88
|
+
...spec.resources["$shared"] ? { $shared: transformRecursively(spec.resources["$shared"], transforms) } : {}
|
|
89
|
+
},
|
|
90
|
+
security_schemes: spec.security_schemes?.map((scheme) => transforms.securityScheme(scheme)),
|
|
91
|
+
decls: { [lang]: mapEntries({
|
|
92
|
+
input: spec.decls[lang] ?? {},
|
|
93
|
+
filter: (name$1) => name$1.startsWith(resource.stainlessPath) || name$1.startsWith("(resource) $shared"),
|
|
94
|
+
fn: (decl) => transforms.declaration(decl, lang)
|
|
95
|
+
}) },
|
|
96
|
+
snippets: mapEntries({
|
|
97
|
+
input: spec.snippets,
|
|
98
|
+
filter: (name$1) => name$1.startsWith(lang),
|
|
99
|
+
fn: (snippets) => mapEntries({
|
|
100
|
+
input: snippets,
|
|
101
|
+
filter: (name$1) => name$1.startsWith(resource.stainlessPath),
|
|
102
|
+
fn: (snippet) => transforms.snippet(snippet, lang)
|
|
103
|
+
}) ?? {}
|
|
104
|
+
})
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function transform(spec, transforms) {
|
|
108
|
+
const t = {
|
|
109
|
+
...transforms,
|
|
110
|
+
declaration: (decl, lang) => transforms.declaration({
|
|
111
|
+
...decl,
|
|
112
|
+
..."docstring" in decl ? { docstring: transforms.markdown(decl.docstring) } : {}
|
|
113
|
+
}, lang),
|
|
114
|
+
method: (method) => transforms.method({
|
|
115
|
+
...method,
|
|
116
|
+
description: transforms.markdown(method.description),
|
|
117
|
+
deprecated: typeof method.deprecated === "string" ? transforms.markdown(method.deprecated) : method.deprecated
|
|
118
|
+
}),
|
|
119
|
+
securityScheme: (scheme) => transforms.securityScheme({
|
|
120
|
+
...scheme,
|
|
121
|
+
description: transforms.markdown(scheme.description)
|
|
122
|
+
})
|
|
123
|
+
};
|
|
124
|
+
const output = [];
|
|
125
|
+
for (const lang of Languages) for (const [name, resource] of Object.entries(spec.resources)) {
|
|
126
|
+
if (isResourceEmpty(resource)) continue;
|
|
127
|
+
output.push({
|
|
128
|
+
name,
|
|
129
|
+
lang,
|
|
130
|
+
spec: generateSpecForResource(spec, name, lang, t)
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
return output;
|
|
134
|
+
}
|
|
135
|
+
function split(spec, transforms) {
|
|
136
|
+
return {
|
|
137
|
+
resources: transform(spec, transforms ?? defineTransforms()).map(removeStudioRefs),
|
|
138
|
+
navigation: {
|
|
139
|
+
languages: spec.docs?.languages,
|
|
140
|
+
resources: Object.fromEntries(Object.entries(spec.resources).filter(([, res]) => !isResourceEmpty(res)).map(([name, res]) => [name, generateNavigation(res)]))
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
function parseSpec(content) {
|
|
145
|
+
const parsed = JSON.parse(content);
|
|
146
|
+
if (parsed && typeof parsed === "object" && "kind" in parsed && parsed.kind === "spec") return parsed;
|
|
147
|
+
}
|
|
148
|
+
async function retrieve(apiKey, project, revision) {
|
|
149
|
+
const data = await (await fetch("https://app.stainless.com/api/generate/spec", {
|
|
150
|
+
method: "POST",
|
|
151
|
+
headers: {
|
|
152
|
+
Authorization: `Bearer ${apiKey}`,
|
|
153
|
+
"Content-Type": "application/json"
|
|
154
|
+
},
|
|
155
|
+
body: JSON.stringify({
|
|
156
|
+
project,
|
|
157
|
+
source: {
|
|
158
|
+
type: "git",
|
|
159
|
+
revision
|
|
160
|
+
}
|
|
161
|
+
})
|
|
162
|
+
})).json();
|
|
163
|
+
if (typeof data.spec === "string") return parseSpec(data.spec);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
//#endregion
|
|
167
|
+
export { defineTransforms, generateNavigation, generateSpecForResource, parseSpec, retrieve, split, transform };
|
|
@@ -149,12 +149,6 @@ var style_default = {
|
|
|
149
149
|
SearchResultResourcePath: "stldocs-search-result-resource-path",
|
|
150
150
|
SearchResultGuideTitle: "stldocs-search-result-guide-title",
|
|
151
151
|
SearchResultGuideExcerpt: "stldocs-search-result-guide-excerpt",
|
|
152
|
-
Chat: "stldocs-chat",
|
|
153
|
-
ChatHeader: "stldocs-chat-header",
|
|
154
|
-
ChatInput: "stldocs-chat-input",
|
|
155
|
-
ChatInputButtons: "stldocs-chat-input-buttons",
|
|
156
|
-
ChatMessages: "stldocs-chat-messages",
|
|
157
|
-
ChatMessage: "stldocs-chat-message",
|
|
158
152
|
LanguageBlock: "stldocs-language-block",
|
|
159
153
|
LanguageBlockContent: "stldocs-language-block-content",
|
|
160
154
|
LanguageBlockContentIcon: "stldocs-language-block-content-icon",
|
|
@@ -149,12 +149,6 @@ declare const _default: {
|
|
|
149
149
|
readonly SearchResultResourcePath: "stldocs-search-result-resource-path";
|
|
150
150
|
readonly SearchResultGuideTitle: "stldocs-search-result-guide-title";
|
|
151
151
|
readonly SearchResultGuideExcerpt: "stldocs-search-result-guide-excerpt";
|
|
152
|
-
readonly Chat: "stldocs-chat";
|
|
153
|
-
readonly ChatHeader: "stldocs-chat-header";
|
|
154
|
-
readonly ChatInput: "stldocs-chat-input";
|
|
155
|
-
readonly ChatInputButtons: "stldocs-chat-input-buttons";
|
|
156
|
-
readonly ChatMessages: "stldocs-chat-messages";
|
|
157
|
-
readonly ChatMessage: "stldocs-chat-message";
|
|
158
152
|
readonly LanguageBlock: "stldocs-language-block";
|
|
159
153
|
readonly LanguageBlockContent: "stldocs-language-block-content";
|
|
160
154
|
readonly LanguageBlockContentIcon: "stldocs-language-block-content-icon";
|
package/dist/style.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./style-
|
|
1
|
+
import { t as _default } from "./style-Dku3IzwI.js";
|
|
2
2
|
export { _default as default };
|
package/dist/style.js
CHANGED
package/dist/styles/search.css
CHANGED
|
@@ -226,123 +226,6 @@
|
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
.stldocs-root #stldocs-chat {
|
|
230
|
-
display: flex;
|
|
231
|
-
flex-direction: column;
|
|
232
|
-
display: none;
|
|
233
|
-
|
|
234
|
-
.stldocs-chat-header {
|
|
235
|
-
display: flex;
|
|
236
|
-
gap: 0.5rem;
|
|
237
|
-
padding-bottom: 10px;
|
|
238
|
-
|
|
239
|
-
h5 {
|
|
240
|
-
flex-grow: 1;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
.lucide-message-square-plus {
|
|
244
|
-
cursor: pointer;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
&[data-stldocs-modal-open='true'] {
|
|
249
|
-
display: flex;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
.stldocs-chat-messages {
|
|
253
|
-
padding: 0 2rem;
|
|
254
|
-
overflow-y: auto;
|
|
255
|
-
flex-grow: 1;
|
|
256
|
-
|
|
257
|
-
.stldocs-loading-spinner {
|
|
258
|
-
svg {
|
|
259
|
-
animation: stldocs-spinner-rotate 1s linear infinite;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
.stldocs-chat-message {
|
|
264
|
-
margin-bottom: 50px;
|
|
265
|
-
display: flex;
|
|
266
|
-
flex-direction: column;
|
|
267
|
-
gap: 1rem;
|
|
268
|
-
|
|
269
|
-
p,
|
|
270
|
-
li {
|
|
271
|
-
line-height: 150%;
|
|
272
|
-
|
|
273
|
-
code {
|
|
274
|
-
white-space: pre;
|
|
275
|
-
word-break: normal;
|
|
276
|
-
overflow-wrap: normal;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
pre {
|
|
281
|
-
background-color: rgb(30, 30, 30);
|
|
282
|
-
padding: 10px;
|
|
283
|
-
border-radius: 8px;
|
|
284
|
-
font-family: var(--stldocs-font-mono);
|
|
285
|
-
font-size: var(--stldocs-font-size-code);
|
|
286
|
-
line-height: 1.3rem;
|
|
287
|
-
white-space: pre;
|
|
288
|
-
margin-bottom: 1rem;
|
|
289
|
-
overflow-x: auto;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
table {
|
|
293
|
-
border-spacing: 10px;
|
|
294
|
-
|
|
295
|
-
thead tr {
|
|
296
|
-
font-weight: bold;
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.stldocs-chat-message[data-stldocs-chat-message='user'] {
|
|
302
|
-
background-color: var(--stldocs-color-gray-6);
|
|
303
|
-
border-radius: 6px;
|
|
304
|
-
margin-left: auto;
|
|
305
|
-
padding: 12px;
|
|
306
|
-
width: 60%;
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
.stldocs-chat-input {
|
|
311
|
-
border: 1px solid var(--stldocs-color-hairline);
|
|
312
|
-
background-color: var(--stldocs-color-snippet-box-bg);
|
|
313
|
-
border-radius: 8px;
|
|
314
|
-
padding: 10px;
|
|
315
|
-
display: flex;
|
|
316
|
-
gap: 1rem;
|
|
317
|
-
min-height: 100px;
|
|
318
|
-
|
|
319
|
-
textarea {
|
|
320
|
-
flex-grow: 1;
|
|
321
|
-
border: none;
|
|
322
|
-
background-color: var(--stldocs-color-snippet-box-bg);
|
|
323
|
-
outline: none;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
.stldocs-chat-input-buttons {
|
|
327
|
-
display: flex;
|
|
328
|
-
flex-direction: column;
|
|
329
|
-
gap: 0.5rem;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
button {
|
|
333
|
-
padding: 0.3rem;
|
|
334
|
-
align-self: flex-start;
|
|
335
|
-
border-radius: 8px;
|
|
336
|
-
border: 1px solid var(--stldocs-color-hairline);
|
|
337
|
-
cursor: pointer;
|
|
338
|
-
|
|
339
|
-
&:hover {
|
|
340
|
-
background-color: var(--stldocs-color-gray-6);
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
|
|
346
229
|
@keyframes stldocs-spinner-rotate {
|
|
347
230
|
100% {
|
|
348
231
|
transform: rotate(360deg);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as __export } from "./chunk-
|
|
2
|
-
import { f as parseStainlessPath } from "./routing-
|
|
1
|
+
import { t as __export } from "./chunk-DsStOjWQ.js";
|
|
2
|
+
import { f as parseStainlessPath } from "./routing-8itEXLx6.js";
|
|
3
3
|
|
|
4
4
|
//#region src/utils.ts
|
|
5
5
|
var utils_exports = /* @__PURE__ */ __export({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as DocsLanguage } from "./routing-
|
|
2
|
-
import { C as TransformRequestSnippetFn } from "./sdk-
|
|
1
|
+
import { t as DocsLanguage } from "./routing-DNN8R6bZ.js";
|
|
2
|
+
import { C as TransformRequestSnippetFn } from "./sdk-CrXkrSx-.js";
|
|
3
3
|
import * as SDKJSON from "@stainless/sdk-json";
|
|
4
4
|
|
|
5
5
|
//#region src/markdown/utils.d.ts
|
|
@@ -11,7 +11,8 @@ function getDecl(env, path) {
|
|
|
11
11
|
return decl;
|
|
12
12
|
}
|
|
13
13
|
function getSnippet(env, path) {
|
|
14
|
-
|
|
14
|
+
const lang = env.language === "http" ? "http.curl" : `${env.language}.default`;
|
|
15
|
+
let snippet = env.spec?.snippets?.[lang]?.[path];
|
|
15
16
|
if (typeof snippet === "string" && env.transforms?.transformRequestSnippet) snippet = env.transforms.transformRequestSnippet({
|
|
16
17
|
snippet,
|
|
17
18
|
language: env.language
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as getResourceFromSpec, r as isResourceEmpty, t as flatResources } from "./utils-
|
|
1
|
+
import { n as getResourceFromSpec, r as isResourceEmpty, t as flatResources } from "./utils-D43p_yTd.js";
|
|
2
2
|
export { flatResources, getResourceFromSpec, isResourceEmpty };
|
package/dist/utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./routing-
|
|
2
|
-
import { n as getResourceFromSpec, r as isResourceEmpty, t as flatResources } from "./utils-
|
|
1
|
+
import "./routing-8itEXLx6.js";
|
|
2
|
+
import { n as getResourceFromSpec, r as isResourceEmpty, t as flatResources } from "./utils-2FmcHPHp.js";
|
|
3
3
|
|
|
4
4
|
export { flatResources, getResourceFromSpec, isResourceEmpty };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stainless-api/docs-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.0-beta.
|
|
4
|
+
"version": "0.1.0-beta.36",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -9,6 +9,32 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
12
|
+
"peerDependencies": {
|
|
13
|
+
"react": ">=19.0.0",
|
|
14
|
+
"react-dom": ">=19.0.0"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@algolia/client-search": "^5.25.0",
|
|
18
|
+
"@markdoc/markdoc": "^0.5.4",
|
|
19
|
+
"clsx": "^2.1.1",
|
|
20
|
+
"fuse.js": "^7.1.0",
|
|
21
|
+
"htmlparser2": "^10.0.0",
|
|
22
|
+
"lucide-react": "^0.554.0",
|
|
23
|
+
"@stainless-api/ui-primitives": "0.1.0-beta.25"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@types/node": "24.10.1",
|
|
27
|
+
"@types/react": "^19.2.6",
|
|
28
|
+
"@types/react-dom": "^19.2.3",
|
|
29
|
+
"dotenv": "17.2.3",
|
|
30
|
+
"react": "^19.2.0",
|
|
31
|
+
"react-dom": "^19.2.0",
|
|
32
|
+
"tsdown": "^0.16.5",
|
|
33
|
+
"tsx": "^4.20.3",
|
|
34
|
+
"typescript": "5.9.3",
|
|
35
|
+
"@stainless/eslint-config": "0.1.0-beta.0",
|
|
36
|
+
"@stainless/sdk-json": "^0.1.0-beta.0"
|
|
37
|
+
},
|
|
12
38
|
"exports": {
|
|
13
39
|
".": {
|
|
14
40
|
"default": "./dist/index.js"
|
|
@@ -60,34 +86,11 @@
|
|
|
60
86
|
},
|
|
61
87
|
"./search/providers/*": {
|
|
62
88
|
"default": "./dist/search/providers/*.js"
|
|
89
|
+
},
|
|
90
|
+
"./spec": {
|
|
91
|
+
"default": "./dist/spec.js"
|
|
63
92
|
}
|
|
64
93
|
},
|
|
65
|
-
"peerDependencies": {
|
|
66
|
-
"react": ">=19.0.0",
|
|
67
|
-
"react-dom": ">=19.0.0"
|
|
68
|
-
},
|
|
69
|
-
"dependencies": {
|
|
70
|
-
"@algolia/client-search": "^5.25.0",
|
|
71
|
-
"@markdoc/markdoc": "^0.5.2",
|
|
72
|
-
"clsx": "^2.1.1",
|
|
73
|
-
"fuse.js": "^7.1.0",
|
|
74
|
-
"htmlparser2": "^10.0.0",
|
|
75
|
-
"lucide-react": "^0.553.0",
|
|
76
|
-
"@stainless-api/ui-primitives": "0.1.0-beta.25"
|
|
77
|
-
},
|
|
78
|
-
"devDependencies": {
|
|
79
|
-
"@types/node": "24.5.1",
|
|
80
|
-
"@types/react": "^19.2.4",
|
|
81
|
-
"@types/react-dom": "^19.2.3",
|
|
82
|
-
"dotenv": "17.2.3",
|
|
83
|
-
"react": "^19.2.0",
|
|
84
|
-
"react-dom": "^19.2.0",
|
|
85
|
-
"tsdown": "^0.16.4",
|
|
86
|
-
"tsx": "^4.20.3",
|
|
87
|
-
"typescript": "5.9.3",
|
|
88
|
-
"@stainless/eslint-config": "0.1.0-beta.0",
|
|
89
|
-
"@stainless/sdk-json": "^0.1.0-beta.0"
|
|
90
|
-
},
|
|
91
94
|
"scripts": {
|
|
92
95
|
"build": "tsdown",
|
|
93
96
|
"clean": "rm -rf dist",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|