@stainless-api/docs-ui 0.1.0-beta.22 → 0.1.0-beta.23
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/index.js +5997 -6197
- package/dist/mcp.js +15967 -0
- package/dist/routing.js +4 -4
- package/dist/styles/main.css +747 -742
- package/dist/styles/primitives.css +427 -444
- package/dist/styles/resets.css +41 -33
- package/dist/styles/search.css +248 -265
- package/dist/styles/sidebar.css +60 -58
- package/dist/styles/snippets.css +88 -86
- package/dist/styles/variables.css +90 -86
- package/package.json +3 -3
- package/src/search/mcp.ts +11 -8
- package/dist/mcp.cjs +0 -983441
package/dist/routing.js
CHANGED
|
@@ -42,9 +42,9 @@ var DefaultLanguage = "http";
|
|
|
42
42
|
var StainlessPathPattern = /(\(resource\) (?<resource>[^\s]+))( > (\(method\) (?<method>[^\s]+)|\(model\) (?<model>[^\s]+))?)?/;
|
|
43
43
|
function parseStainlessPath(stainlessPath) {
|
|
44
44
|
const match = stainlessPath.match(StainlessPathPattern);
|
|
45
|
-
if (!match
|
|
45
|
+
if (!match) return null;
|
|
46
46
|
return {
|
|
47
|
-
resource: match.groups.resource
|
|
47
|
+
resource: match.groups.resource.split("."),
|
|
48
48
|
method: match.groups.method ?? null,
|
|
49
49
|
model: match.groups.model ?? null,
|
|
50
50
|
routable: match.groups.model ? match[1] : match[0]
|
|
@@ -55,7 +55,7 @@ function trimStainlessPath(stainlessPath) {
|
|
|
55
55
|
}
|
|
56
56
|
function getResource(stainlessPath) {
|
|
57
57
|
const parsed = parseStainlessPath(stainlessPath);
|
|
58
|
-
return parsed?.resource
|
|
58
|
+
return parsed?.resource[0];
|
|
59
59
|
}
|
|
60
60
|
function parseRoute(basePath, route) {
|
|
61
61
|
if (!route.startsWith(basePath)) return { stainlessPath: "", language: DefaultLanguage };
|
|
@@ -145,7 +145,7 @@ function findNavigationPath(items, target) {
|
|
|
145
145
|
}
|
|
146
146
|
function expandToElement(el) {
|
|
147
147
|
while (el) {
|
|
148
|
-
if (el
|
|
148
|
+
if (el.tagName === "DETAILS") el["open"] = true;
|
|
149
149
|
el = el.parentElement;
|
|
150
150
|
}
|
|
151
151
|
}
|