@wildo-ai/saas-technical-doc 1.1.5 → 1.1.7
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/esm/build/csp-emit.d.ts.map +1 -1
- package/dist/esm/build/load-materialized-frontend-providers.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-authentication-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-connection-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-documentation-chapters.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-organization-role-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-organization-unit-resource-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/docs-api-origin-substitution.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-operational-evidence.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.d.ts.map +1 -1
- package/dist/esm/companion/content/application-consumer-documentation-content-loader.d.ts.map +1 -1
- package/dist/esm/companion/index.d.ts.map +1 -1
- package/dist/esm/companion/manual-controller-route-projection.d.ts.map +1 -1
- package/dist/esm/companion/openapi-example-derivation.d.ts +53 -0
- package/dist/esm/companion/openapi-example-derivation.d.ts.map +1 -0
- package/dist/esm/companion/openapi-example-derivation.js +229 -0
- package/dist/esm/companion/openapi-example-derivation.js.map +1 -0
- package/dist/esm/companion/openapi-generator.d.ts.map +1 -1
- package/dist/esm/companion/openapi-generator.js +284 -16
- package/dist/esm/companion/openapi-generator.js.map +1 -1
- package/dist/esm/companion/operation-projection.schemas.d.ts +36 -0
- package/dist/esm/companion/operation-projection.schemas.d.ts.map +1 -1
- package/dist/esm/companion/operation-projection.schemas.js +18 -0
- package/dist/esm/companion/operation-projection.schemas.js.map +1 -1
- package/dist/esm/companion/publish-result.types.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-authorized-bundle-reader.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.js +20 -0
- package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.js.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-markdown-links.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-openapi-renderer.d.ts +2 -0
- package/dist/esm/companion/rendering/technical-documentation-openapi-renderer.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-openapi-renderer.js +48 -31
- package/dist/esm/companion/rendering/technical-documentation-openapi-renderer.js.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-render-model.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.d.ts.map +1 -1
- package/dist/esm/companion/spec-to-operation-doc.d.ts +52 -10
- package/dist/esm/companion/spec-to-operation-doc.d.ts.map +1 -1
- package/dist/esm/companion/spec-to-operation-doc.js +125 -7
- package/dist/esm/companion/spec-to-operation-doc.js.map +1 -1
- package/dist/esm/companion/technical-documentation-asset-path.d.ts.map +1 -1
- package/dist/esm/companion/technical-documentation-capture-execution-port.d.ts.map +1 -1
- package/dist/esm/companion/technical-documentation-diagram-definitions.d.ts.map +1 -1
- package/dist/esm/companion/technical-documentation-diagram-materializer.d.ts.map +1 -1
- package/dist/esm/companion/technical-documentation-placeholder-materializer.d.ts.map +1 -1
- package/dist/esm/companion/zod-to-openapi.d.ts.map +1 -1
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/config/define-tech-doc-config.d.ts.map +1 -1
- package/dist/esm/config/index.d.ts.map +1 -1
- package/dist/esm/config/wildo-tech-doc-config.schemas.d.ts.map +1 -1
- package/dist/esm/content/application-consumer-documentation-content-manifest.schemas.d.ts.map +1 -1
- package/dist/esm/content/application-consumer-documentation-content.techdoc.d.ts +10 -10
- package/dist/esm/content/application-consumer-documentation-content.techdoc.d.ts.map +1 -1
- package/dist/esm/content/application-consumer-documentation-content.techdoc.js +43 -28
- package/dist/esm/content/application-consumer-documentation-content.techdoc.js.map +1 -1
- package/dist/esm/content.exports.d.ts.map +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/openapi/api-reference-link-index.d.ts +3 -0
- package/dist/esm/openapi/api-reference-link-index.d.ts.map +1 -1
- package/dist/esm/openapi/api-reference-link-index.js +26 -15
- package/dist/esm/openapi/api-reference-link-index.js.map +1 -1
- package/dist/esm/openapi/api-reference-pages.d.ts +55 -0
- package/dist/esm/openapi/api-reference-pages.d.ts.map +1 -0
- package/dist/esm/openapi/api-reference-pages.js +229 -0
- package/dist/esm/openapi/api-reference-pages.js.map +1 -0
- package/dist/esm/openapi/api-reference-search.d.ts +53 -0
- package/dist/esm/openapi/api-reference-search.d.ts.map +1 -0
- package/dist/esm/openapi/api-reference-search.js +100 -0
- package/dist/esm/openapi/api-reference-search.js.map +1 -0
- package/dist/esm/openapi/api-reference-targets.d.ts +11 -0
- package/dist/esm/openapi/api-reference-targets.d.ts.map +1 -1
- package/dist/esm/openapi/api-reference-targets.js +8 -0
- package/dist/esm/openapi/api-reference-targets.js.map +1 -1
- package/dist/esm/openapi/index.d.ts +2 -0
- package/dist/esm/openapi/index.d.ts.map +1 -1
- package/dist/esm/openapi/index.js +2 -0
- package/dist/esm/openapi/index.js.map +1 -1
- package/dist/esm/openapi/openapi-generation-output.schemas.d.ts.map +1 -1
- package/dist/esm/openapi-reference-model.exports.d.ts +2 -0
- package/dist/esm/openapi-reference-model.exports.d.ts.map +1 -1
- package/dist/esm/openapi-reference-model.exports.js +2 -0
- package/dist/esm/openapi-reference-model.exports.js.map +1 -1
- package/dist/esm/runtime/AuthExchangePage.d.ts +45 -4
- package/dist/esm/runtime/AuthExchangePage.d.ts.map +1 -1
- package/dist/esm/runtime/AuthExchangePage.js +45 -12
- package/dist/esm/runtime/AuthExchangePage.js.map +1 -1
- package/dist/esm/runtime/DocsAuthContext.d.ts.map +1 -1
- package/dist/esm/runtime/DocsFrontendProviders.d.ts +15 -1
- package/dist/esm/runtime/DocsFrontendProviders.d.ts.map +1 -1
- package/dist/esm/runtime/DocsFrontendProviders.js +16 -3
- package/dist/esm/runtime/DocsFrontendProviders.js.map +1 -1
- package/dist/esm/runtime/DocsProviderComponent.d.ts +41 -0
- package/dist/esm/runtime/DocsProviderComponent.d.ts.map +1 -0
- package/dist/esm/runtime/DocsProviderComponent.js +17 -0
- package/dist/esm/runtime/DocsProviderComponent.js.map +1 -0
- package/dist/esm/runtime/decode-jwt-claims.d.ts.map +1 -1
- package/dist/esm/runtime/docs-auth-client.d.ts.map +1 -1
- package/dist/esm/runtime/docs-auth-session.schemas.d.ts.map +1 -1
- package/dist/esm/runtime/documentation-site-translator.d.ts +53 -0
- package/dist/esm/runtime/documentation-site-translator.d.ts.map +1 -0
- package/dist/esm/runtime/documentation-site-translator.js +51 -0
- package/dist/esm/runtime/documentation-site-translator.js.map +1 -0
- package/dist/esm/runtime/frontend-provider-registry.techdoc.d.ts.map +1 -1
- package/dist/esm/runtime/index.d.ts +6 -0
- package/dist/esm/runtime/index.d.ts.map +1 -1
- package/dist/esm/runtime/index.js +6 -0
- package/dist/esm/runtime/index.js.map +1 -1
- package/dist/esm/runtime/openapi-reference-conservation.d.ts.map +1 -1
- package/dist/esm/runtime/openapi-reference-model.d.ts +25 -0
- package/dist/esm/runtime/openapi-reference-model.d.ts.map +1 -1
- package/dist/esm/runtime/openapi-reference-model.js +82 -13
- package/dist/esm/runtime/openapi-reference-model.js.map +1 -1
- package/dist/esm/runtime/openapi-reference-navigation.d.ts +50 -0
- package/dist/esm/runtime/openapi-reference-navigation.d.ts.map +1 -0
- package/dist/esm/runtime/openapi-reference-navigation.js +46 -0
- package/dist/esm/runtime/openapi-reference-navigation.js.map +1 -0
- package/dist/esm/runtime/openapi-reference-samples.d.ts +40 -0
- package/dist/esm/runtime/openapi-reference-samples.d.ts.map +1 -0
- package/dist/esm/runtime/openapi-reference-samples.js +169 -0
- package/dist/esm/runtime/openapi-reference-samples.js.map +1 -0
- package/dist/esm/runtime/openapi-reference-styles.d.ts +28 -0
- package/dist/esm/runtime/openapi-reference-styles.d.ts.map +1 -0
- package/dist/esm/runtime/openapi-reference-styles.js +292 -0
- package/dist/esm/runtime/openapi-reference-styles.js.map +1 -0
- package/dist/esm/runtime/openapi-reference-view.d.ts +40 -5
- package/dist/esm/runtime/openapi-reference-view.d.ts.map +1 -1
- package/dist/esm/runtime/openapi-reference-view.js +828 -82
- package/dist/esm/runtime/openapi-reference-view.js.map +1 -1
- package/dist/esm/runtime/openapi-reference-words-context.d.ts +12 -0
- package/dist/esm/runtime/openapi-reference-words-context.d.ts.map +1 -0
- package/dist/esm/runtime/openapi-reference-words-context.js +30 -0
- package/dist/esm/runtime/openapi-reference-words-context.js.map +1 -0
- package/dist/esm/runtime/openapi-reference-words.d.ts +205 -0
- package/dist/esm/runtime/openapi-reference-words.d.ts.map +1 -0
- package/dist/esm/runtime/openapi-reference-words.js +162 -0
- package/dist/esm/runtime/openapi-reference-words.js.map +1 -0
- package/dist/esm/runtime/provider-component-registry.techdoc.d.ts +31 -0
- package/dist/esm/runtime/provider-component-registry.techdoc.d.ts.map +1 -0
- package/dist/esm/runtime/provider-component-registry.techdoc.js +35 -0
- package/dist/esm/runtime/provider-component-registry.techdoc.js.map +1 -0
- package/dist/esm/runtime/use-docs-auth-session.d.ts.map +1 -1
- package/dist/esm/runtime/use-docs-frontend-provider-registry.d.ts.map +1 -1
- package/dist/esm/runtime/use-docs-provider-component.d.ts +29 -0
- package/dist/esm/runtime/use-docs-provider-component.d.ts.map +1 -0
- package/dist/esm/runtime/use-docs-provider-component.js +42 -0
- package/dist/esm/runtime/use-docs-provider-component.js.map +1 -0
- package/dist/esm/runtime/use-docs-provider-scripts.d.ts +12 -5
- package/dist/esm/runtime/use-docs-provider-scripts.d.ts.map +1 -1
- package/dist/esm/runtime/use-docs-provider-scripts.js +15 -8
- package/dist/esm/runtime/use-docs-provider-scripts.js.map +1 -1
- package/dist/esm/runtime/use-docs-provider-sdks.d.ts.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi-reference-navigation.js","sourceRoot":"","sources":["../../../src/runtime/openapi-reference-navigation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AA+BhF,qGAAqG;AACrG,MAAM,UAAU,wBAAwB,CAAC,QAAmD;IAC1F,OAAO,4BAA4B,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,WAAW,CAAC,CAAC;AACtG,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,2BAA2B,CACzC,KAAwB,EACxB,OAAmI;IAEnI,MAAM,UAAU,GAAG,IAAI,GAAG,EAAiF,CAAC;IAC5G,KAAK,MAAM,QAAQ,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;QACvC,MAAM,EAAE,GAAG,QAAQ,CAAC,QAAQ,EAAE,EAAE,IAAI,mBAAmB,CAAC;QACxD,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,QAAQ,EAAE,KAAK,IAAI,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;QAClG,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC;YACtB,WAAW,EAAE,QAAQ,CAAC,WAAW;YACjC,KAAK,EAAE,QAAQ,CAAC,KAAK;YACrB,IAAI,EAAE,GAAG,OAAO,CAAC,eAAe,IAAI,wBAAwB,CAAC,QAAQ,CAAC,EAAE;YACxE,cAAc,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;SAC/F,CAAC,CAAC;QACH,UAAU,CAAC,GAAG,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO;QACL,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,eAAe,EAAE,OAAO,CAAC,eAAe;QACxC,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,EAAE;QAChC,UAAU,EAAE,CAAC,GAAG,UAAU,CAAC,OAAO,EAAE,CAAC;aAClC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC;aACvF,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;QACvH,aAAa,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;QACrC,cAAc,EAAE,KAAK,CAAC,cAAc;KACrC,CAAC;AACJ,CAAC","sourcesContent":["/**\n * The navigation a reference page's left rail shows: every resource of the section, grouped by its\n * source-declared category, each leading to its own page.\n *\n * A resource page carries only its own slice of the document (#1623), so it cannot compute this from\n * its own model. The portal builds it ONCE per section from the section's index model, at compile\n * time, and hands the same small value to every page of that section. It is plain data — labels,\n * links and counts — so it serializes into a route module and holds no schema.\n *\n * Browser-safe and Node-safe: no React, no Node built-ins.\n */\n\nimport type { ApiReferenceModel, ApiReferenceResource } from './openapi-reference-model';\nimport { apiReferenceResourcePageSlug } from '../openapi/api-reference-targets';\n\n/** A section of the same portal the reader can switch to (the API, the administration API, …). */\nexport interface ApiReferenceNavigationSection {\n readonly label: string;\n readonly href: string;\n}\n\nexport interface ApiReferenceNavigationResource {\n readonly resourceRef: string;\n readonly label: string;\n readonly href: string;\n readonly operationCount: number;\n}\n\n/** A category of resources; `label` is `null` for resources whose document declares no category. */\nexport interface ApiReferenceNavigationCategory {\n readonly id: string;\n readonly label: string | null;\n readonly resources: readonly ApiReferenceNavigationResource[];\n}\n\nexport interface ApiReferenceNavigation {\n readonly title: string;\n readonly sectionRootPath: string;\n readonly sections: readonly ApiReferenceNavigationSection[];\n readonly categories: readonly ApiReferenceNavigationCategory[];\n readonly resourceCount: number;\n readonly operationCount: number;\n}\n\n/** The page slug of a resource: the readable part of its reference, as the page plan computes it. */\nexport function apiReferenceResourceSlug(resource: Pick<ApiReferenceResource, 'resourceRef'>): string {\n return apiReferenceResourcePageSlug(resource.resourceRef.split('/').at(-1) ?? resource.resourceRef);\n}\n\n/**\n * Builds a section's navigation from its index model. Categories and resources keep the order the\n * reader sees on the index page: categories by label (uncategorized last), resources as the document\n * lists them.\n */\nexport function buildApiReferenceNavigation(\n model: ApiReferenceModel,\n options: { readonly title: string; readonly sectionRootPath: string; readonly sections?: readonly ApiReferenceNavigationSection[] },\n): ApiReferenceNavigation {\n const categories = new Map<string, { label: string | null; resources: ApiReferenceNavigationResource[] }>();\n for (const resource of model.resources) {\n const id = resource.category?.id ?? '__uncategorized__';\n const category = categories.get(id) ?? { label: resource.category?.label ?? null, resources: [] };\n category.resources.push({\n resourceRef: resource.resourceRef,\n label: resource.label,\n href: `${options.sectionRootPath}/${apiReferenceResourceSlug(resource)}`,\n operationCount: resource.families.reduce((count, family) => count + family.variants.length, 0),\n });\n categories.set(id, category);\n }\n return {\n title: options.title,\n sectionRootPath: options.sectionRootPath,\n sections: options.sections ?? [],\n categories: [...categories.entries()]\n .map(([id, category]) => ({ id, label: category.label, resources: category.resources }))\n .sort((left, right) => (left.label === null ? 1 : right.label === null ? -1 : left.label.localeCompare(right.label))),\n resourceCount: model.resources.length,\n operationCount: model.operationCount,\n };\n}\n"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The request sample and response examples shown beside an operation's contract (#1618).
|
|
3
|
+
*
|
|
4
|
+
* Everything here is DERIVED from the verified OpenAPI model: the server, the path, the parameters,
|
|
5
|
+
* the security scheme and the body example all come from the document, so a sample can only say what
|
|
6
|
+
* the contract says. It is a sample, not a console — nothing here sends a request or holds a
|
|
7
|
+
* credential; `<token>` and `<api-key>` are placeholders the reader replaces.
|
|
8
|
+
*
|
|
9
|
+
* curl is the one form every major API reference shows (Stripe, GitHub, Scalar) and the one a reader
|
|
10
|
+
* can paste into any terminal. JavaScript (`fetch`) and Python (`requests`) are the same call, spelled
|
|
11
|
+
* from the same parts, so the three tabs cannot disagree.
|
|
12
|
+
*/
|
|
13
|
+
import type { ApiReferenceResponse, ApiReferenceSecurityScheme, ApiReferenceVariant } from './openapi-reference-model';
|
|
14
|
+
/** The code languages a request sample is offered in, in tab order. */
|
|
15
|
+
export declare enum ApiReferenceSampleLanguage {
|
|
16
|
+
CURL = "curl",
|
|
17
|
+
JAVASCRIPT = "javascript",
|
|
18
|
+
PYTHON = "python"
|
|
19
|
+
}
|
|
20
|
+
/** A curl command that calls `variant`, one option per line. */
|
|
21
|
+
export declare function buildCurlSample(variant: ApiReferenceVariant, serverUrl: string | null, securitySchemes: readonly ApiReferenceSecurityScheme[]): string;
|
|
22
|
+
/** The same call with the browser and Node `fetch`. */
|
|
23
|
+
export declare function buildJavaScriptSample(variant: ApiReferenceVariant, serverUrl: string | null, securitySchemes: readonly ApiReferenceSecurityScheme[]): string;
|
|
24
|
+
/** The same call with Python's `requests`. */
|
|
25
|
+
export declare function buildPythonSample(variant: ApiReferenceVariant, serverUrl: string | null, securitySchemes: readonly ApiReferenceSecurityScheme[]): string;
|
|
26
|
+
/** Every language's sample for `variant`, keyed by language. */
|
|
27
|
+
export declare function buildRequestSamples(variant: ApiReferenceVariant, serverUrl: string | null, securitySchemes: readonly ApiReferenceSecurityScheme[]): Readonly<Record<ApiReferenceSampleLanguage, string>>;
|
|
28
|
+
/** One response status that has an example to show, with that example's JSON. */
|
|
29
|
+
export interface ApiReferenceResponseSample {
|
|
30
|
+
readonly status: string;
|
|
31
|
+
readonly description: string | null;
|
|
32
|
+
readonly exampleName: string;
|
|
33
|
+
readonly jsonValue: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The response examples to show beside the contract: one per status that has one, successes first
|
|
37
|
+
* (they are what the reader is building for), then errors in status order.
|
|
38
|
+
*/
|
|
39
|
+
export declare function responseSamples(responses: readonly ApiReferenceResponse[]): readonly ApiReferenceResponseSample[];
|
|
40
|
+
//# sourceMappingURL=openapi-reference-samples.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi-reference-samples.d.ts","sourceRoot":"","sources":["../../../src/runtime/openapi-reference-samples.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAyB,oBAAoB,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AA8B9I,uEAAuE;AACvE,oBAAY,0BAA0B;IACpC,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,MAAM,WAAW;CAClB;AAgDD,gEAAgE;AAChE,wBAAgB,eAAe,CAC7B,OAAO,EAAE,mBAAmB,EAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,eAAe,EAAE,SAAS,0BAA0B,EAAE,GACrD,MAAM,CAMR;AAED,uDAAuD;AACvD,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,mBAAmB,EAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,eAAe,EAAE,SAAS,0BAA0B,EAAE,GACrD,MAAM,CAaR;AAED,8CAA8C;AAC9C,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,mBAAmB,EAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,eAAe,EAAE,SAAS,0BAA0B,EAAE,GACrD,MAAM,CAWR;AAED,gEAAgE;AAChE,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,mBAAmB,EAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,eAAe,EAAE,SAAS,0BAA0B,EAAE,GACrD,QAAQ,CAAC,MAAM,CAAC,0BAA0B,EAAE,MAAM,CAAC,CAAC,CAMtD;AAiCD,iFAAiF;AACjF,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,SAAS,oBAAoB,EAAE,GAAG,SAAS,0BAA0B,EAAE,CASjH"}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The request sample and response examples shown beside an operation's contract (#1618).
|
|
3
|
+
*
|
|
4
|
+
* Everything here is DERIVED from the verified OpenAPI model: the server, the path, the parameters,
|
|
5
|
+
* the security scheme and the body example all come from the document, so a sample can only say what
|
|
6
|
+
* the contract says. It is a sample, not a console — nothing here sends a request or holds a
|
|
7
|
+
* credential; `<token>` and `<api-key>` are placeholders the reader replaces.
|
|
8
|
+
*
|
|
9
|
+
* curl is the one form every major API reference shows (Stripe, GitHub, Scalar) and the one a reader
|
|
10
|
+
* can paste into any terminal. JavaScript (`fetch`) and Python (`requests`) are the same call, spelled
|
|
11
|
+
* from the same parts, so the three tabs cannot disagree.
|
|
12
|
+
*/
|
|
13
|
+
/** Quote a value for a POSIX shell: single quotes, with an embedded `'` closed, escaped and reopened. */
|
|
14
|
+
function shellQuote(value) {
|
|
15
|
+
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
16
|
+
}
|
|
17
|
+
/** The value a parameter's first example gives, as the raw string that goes on the wire. */
|
|
18
|
+
function parameterExampleValue(parameter) {
|
|
19
|
+
const jsonValue = parameter.examples.find((example) => example.jsonValue !== null)?.jsonValue ?? null;
|
|
20
|
+
if (jsonValue === null)
|
|
21
|
+
return null;
|
|
22
|
+
try {
|
|
23
|
+
const parsed = JSON.parse(jsonValue);
|
|
24
|
+
return typeof parsed === 'string' ? parsed : jsonValue;
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
return jsonValue;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The header a security scheme is sent in, with a placeholder credential — or `null` when the scheme
|
|
32
|
+
* is not one a header can carry (a cookie or query scheme is left to the reader rather than guessed).
|
|
33
|
+
*/
|
|
34
|
+
function securityHeader(scheme) {
|
|
35
|
+
if (scheme.type === 'http' && scheme.scheme?.toLowerCase() === 'bearer')
|
|
36
|
+
return ['Authorization', 'Bearer <token>'];
|
|
37
|
+
if (scheme.type === 'http' && scheme.scheme?.toLowerCase() === 'basic')
|
|
38
|
+
return ['Authorization', 'Basic <credentials>'];
|
|
39
|
+
if (scheme.type === 'apiKey' && scheme.location === 'header' && scheme.parameterName !== null)
|
|
40
|
+
return [scheme.parameterName, '<api-key>'];
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
/** The code languages a request sample is offered in, in tab order. */
|
|
44
|
+
export var ApiReferenceSampleLanguage;
|
|
45
|
+
(function (ApiReferenceSampleLanguage) {
|
|
46
|
+
ApiReferenceSampleLanguage["CURL"] = "curl";
|
|
47
|
+
ApiReferenceSampleLanguage["JAVASCRIPT"] = "javascript";
|
|
48
|
+
ApiReferenceSampleLanguage["PYTHON"] = "python";
|
|
49
|
+
})(ApiReferenceSampleLanguage || (ApiReferenceSampleLanguage = {}));
|
|
50
|
+
function requestSampleParts(variant, serverUrl, securitySchemes) {
|
|
51
|
+
const query = variant.parameters
|
|
52
|
+
.filter((parameter) => parameter.location === 'query' && parameter.required)
|
|
53
|
+
.map((parameter) => `${encodeURIComponent(parameter.name)}=${parameterExampleValue(parameter) ?? `{${parameter.name}}`}`);
|
|
54
|
+
const url = `${(serverUrl ?? '').replace(/\/$/, '')}${variant.path}${query.length > 0 ? `?${query.join('&')}` : ''}`;
|
|
55
|
+
const headers = [];
|
|
56
|
+
const credential = variant.securitySchemes
|
|
57
|
+
.map((name) => securitySchemes.find((candidate) => candidate.name === name))
|
|
58
|
+
.map((scheme) => (scheme === undefined ? null : securityHeader(scheme)))
|
|
59
|
+
.find((candidate) => candidate !== null);
|
|
60
|
+
if (credential !== undefined)
|
|
61
|
+
headers.push(credential);
|
|
62
|
+
for (const parameter of variant.parameters.filter((candidate) => candidate.location === 'header' && candidate.required)) {
|
|
63
|
+
headers.push([parameter.name, parameterExampleValue(parameter) ?? `<${parameter.name}>`]);
|
|
64
|
+
}
|
|
65
|
+
const jsonMedia = variant.requestBody?.mediaTypes.find((media) => media.mediaType === 'application/json');
|
|
66
|
+
if (jsonMedia !== undefined)
|
|
67
|
+
headers.push(['Content-Type', 'application/json']);
|
|
68
|
+
return {
|
|
69
|
+
method: variant.method,
|
|
70
|
+
url,
|
|
71
|
+
headers,
|
|
72
|
+
jsonBody: jsonMedia === undefined ? null : jsonMedia.examples.find((candidate) => candidate.jsonValue !== null)?.jsonValue ?? '{}',
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
/** A curl command that calls `variant`, one option per line. */
|
|
76
|
+
export function buildCurlSample(variant, serverUrl, securitySchemes) {
|
|
77
|
+
const parts = requestSampleParts(variant, serverUrl, securitySchemes);
|
|
78
|
+
const lines = [parts.method === 'GET' ? `curl ${shellQuote(parts.url)}` : `curl -X ${parts.method} ${shellQuote(parts.url)}`];
|
|
79
|
+
for (const [name, value] of parts.headers)
|
|
80
|
+
lines.push(`-H ${shellQuote(`${name}: ${value}`)}`);
|
|
81
|
+
if (parts.jsonBody !== null)
|
|
82
|
+
lines.push(`--data ${shellQuote(parts.jsonBody)}`);
|
|
83
|
+
return lines.join(' \\\n ');
|
|
84
|
+
}
|
|
85
|
+
/** The same call with the browser and Node `fetch`. */
|
|
86
|
+
export function buildJavaScriptSample(variant, serverUrl, securitySchemes) {
|
|
87
|
+
const parts = requestSampleParts(variant, serverUrl, securitySchemes);
|
|
88
|
+
const options = [];
|
|
89
|
+
if (parts.method !== 'GET')
|
|
90
|
+
options.push(` method: ${JSON.stringify(parts.method)},`);
|
|
91
|
+
if (parts.headers.length > 0) {
|
|
92
|
+
options.push(' headers: {', ...parts.headers.map(([name, value]) => ` ${JSON.stringify(name)}: ${JSON.stringify(value)},`), ' },');
|
|
93
|
+
}
|
|
94
|
+
if (parts.jsonBody !== null) {
|
|
95
|
+
const parsed = parseJson(parts.jsonBody);
|
|
96
|
+
options.push(` body: JSON.stringify(${parsed.ok ? indentContinuation(JSON.stringify(parsed.value, null, 2), ' ') : JSON.stringify(parts.jsonBody)}),`);
|
|
97
|
+
}
|
|
98
|
+
const call = options.length === 0 ? `fetch(${JSON.stringify(parts.url)})` : `fetch(${JSON.stringify(parts.url)}, {\n${options.join('\n')}\n})`;
|
|
99
|
+
return `const response = await ${call};\nconst data = await response.json();`;
|
|
100
|
+
}
|
|
101
|
+
/** The same call with Python's `requests`. */
|
|
102
|
+
export function buildPythonSample(variant, serverUrl, securitySchemes) {
|
|
103
|
+
const parts = requestSampleParts(variant, serverUrl, securitySchemes);
|
|
104
|
+
const argumentsList = [` ${JSON.stringify(parts.url)},`];
|
|
105
|
+
if (parts.headers.length > 0) {
|
|
106
|
+
argumentsList.push(' headers={', ...parts.headers.map(([name, value]) => ` ${JSON.stringify(name)}: ${JSON.stringify(value)},`), ' },');
|
|
107
|
+
}
|
|
108
|
+
if (parts.jsonBody !== null) {
|
|
109
|
+
const parsed = parseJson(parts.jsonBody);
|
|
110
|
+
argumentsList.push(parsed.ok ? ` json=${indentContinuation(pythonLiteral(parsed.value, 0), ' ')},` : ` data=${JSON.stringify(parts.jsonBody)},`);
|
|
111
|
+
}
|
|
112
|
+
return `import requests\n\nresponse = requests.${parts.method.toLowerCase()}(\n${argumentsList.join('\n')}\n)\nprint(response.json())`;
|
|
113
|
+
}
|
|
114
|
+
/** Every language's sample for `variant`, keyed by language. */
|
|
115
|
+
export function buildRequestSamples(variant, serverUrl, securitySchemes) {
|
|
116
|
+
return {
|
|
117
|
+
[ApiReferenceSampleLanguage.CURL]: buildCurlSample(variant, serverUrl, securitySchemes),
|
|
118
|
+
[ApiReferenceSampleLanguage.JAVASCRIPT]: buildJavaScriptSample(variant, serverUrl, securitySchemes),
|
|
119
|
+
[ApiReferenceSampleLanguage.PYTHON]: buildPythonSample(variant, serverUrl, securitySchemes),
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
function parseJson(source) {
|
|
123
|
+
try {
|
|
124
|
+
return { ok: true, value: JSON.parse(source) };
|
|
125
|
+
}
|
|
126
|
+
catch {
|
|
127
|
+
return { ok: false };
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
/** Indents every line after the first, so a multi-line value sits under the key that introduces it. */
|
|
131
|
+
function indentContinuation(text, indent) {
|
|
132
|
+
return text.split('\n').map((line, index) => (index === 0 ? line : `${indent}${line}`)).join('\n');
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* A parsed JSON value written as a Python literal. JSON strings are valid Python strings, so only the
|
|
136
|
+
* three words differ: `true`, `false` and `null` become `True`, `False` and `None`.
|
|
137
|
+
*/
|
|
138
|
+
function pythonLiteral(value, depth) {
|
|
139
|
+
const pad = ' '.repeat(depth + 1);
|
|
140
|
+
const closing = ' '.repeat(depth);
|
|
141
|
+
if (value === null)
|
|
142
|
+
return 'None';
|
|
143
|
+
if (value === true)
|
|
144
|
+
return 'True';
|
|
145
|
+
if (value === false)
|
|
146
|
+
return 'False';
|
|
147
|
+
if (typeof value === 'number' || typeof value === 'string')
|
|
148
|
+
return JSON.stringify(value);
|
|
149
|
+
if (Array.isArray(value)) {
|
|
150
|
+
return value.length === 0 ? '[]' : `[\n${value.map((item) => `${pad}${pythonLiteral(item, depth + 1)},`).join('\n')}\n${closing}]`;
|
|
151
|
+
}
|
|
152
|
+
const entries = Object.entries(value);
|
|
153
|
+
return entries.length === 0 ? '{}' : `{\n${entries.map(([key, item]) => `${pad}${JSON.stringify(key)}: ${pythonLiteral(item, depth + 1)},`).join('\n')}\n${closing}}`;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* The response examples to show beside the contract: one per status that has one, successes first
|
|
157
|
+
* (they are what the reader is building for), then errors in status order.
|
|
158
|
+
*/
|
|
159
|
+
export function responseSamples(responses) {
|
|
160
|
+
const samples = responses.flatMap((response) => {
|
|
161
|
+
const example = response.mediaTypes.flatMap((media) => media.examples).find((candidate) => candidate.jsonValue !== null);
|
|
162
|
+
return example === undefined || example.jsonValue === null
|
|
163
|
+
? []
|
|
164
|
+
: [{ status: response.status, description: response.description, exampleName: example.name, jsonValue: example.jsonValue }];
|
|
165
|
+
});
|
|
166
|
+
const isSuccess = (status) => /^[23]/.test(status);
|
|
167
|
+
return [...samples.filter((sample) => isSuccess(sample.status)), ...samples.filter((sample) => !isSuccess(sample.status))];
|
|
168
|
+
}
|
|
169
|
+
//# sourceMappingURL=openapi-reference-samples.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi-reference-samples.js","sourceRoot":"","sources":["../../../src/runtime/openapi-reference-samples.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,yGAAyG;AACzG,SAAS,UAAU,CAAC,KAAa;IAC/B,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE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cesContent":["/**\n * The request sample and response examples shown beside an operation's contract (#1618).\n *\n * Everything here is DERIVED from the verified OpenAPI model: the server, the path, the parameters,\n * the security scheme and the body example all come from the document, so a sample can only say what\n * the contract says. It is a sample, not a console — nothing here sends a request or holds a\n * credential; `<token>` and `<api-key>` are placeholders the reader replaces.\n *\n * curl is the one form every major API reference shows (Stripe, GitHub, Scalar) and the one a reader\n * can paste into any terminal. JavaScript (`fetch`) and Python (`requests`) are the same call, spelled\n * from the same parts, so the three tabs cannot disagree.\n */\n\nimport type { ApiReferenceParameter, ApiReferenceResponse, ApiReferenceSecurityScheme, ApiReferenceVariant } from './openapi-reference-model';\n\n/** Quote a value for a POSIX shell: single quotes, with an embedded `'` closed, escaped and reopened. */\nfunction shellQuote(value: string): string {\n return `'${value.replace(/'/g, `'\\\\''`)}'`;\n}\n\n/** The value a parameter's first example gives, as the raw string that goes on the wire. */\nfunction parameterExampleValue(parameter: ApiReferenceParameter): string | null {\n const jsonValue = parameter.examples.find((example) => example.jsonValue !== null)?.jsonValue ?? null;\n if (jsonValue === null) return null;\n try {\n const parsed: unknown = JSON.parse(jsonValue);\n return typeof parsed === 'string' ? parsed : jsonValue;\n } catch {\n return jsonValue;\n }\n}\n\n/**\n * The header a security scheme is sent in, with a placeholder credential — or `null` when the scheme\n * is not one a header can carry (a cookie or query scheme is left to the reader rather than guessed).\n */\nfunction securityHeader(scheme: ApiReferenceSecurityScheme): readonly [string, string] | null {\n if (scheme.type === 'http' && scheme.scheme?.toLowerCase() === 'bearer') return ['Authorization', 'Bearer <token>'];\n if (scheme.type === 'http' && scheme.scheme?.toLowerCase() === 'basic') return ['Authorization', 'Basic <credentials>'];\n if (scheme.type === 'apiKey' && scheme.location === 'header' && scheme.parameterName !== null) return [scheme.parameterName, '<api-key>'];\n return null;\n}\n\n/** The code languages a request sample is offered in, in tab order. */\nexport enum ApiReferenceSampleLanguage {\n CURL = 'curl',\n JAVASCRIPT = 'javascript',\n PYTHON = 'python',\n}\n\n/**\n * Everything a request sample says, before it is written in any language: the method, the full URL,\n * the headers and the JSON body. The three builders below only change the spelling, so they cannot\n * disagree about what the call is.\n *\n * Path parameters stay as `{name}` placeholders — the reader's ids are what belong there, and an\n * example id would look like a real one. Only REQUIRED query and header parameters are included, so\n * the sample is the smallest valid call; the parameter list shows the rest. The body is the request's\n * first example, authored or derived.\n */\ninterface RequestSampleParts {\n readonly method: string;\n readonly url: string;\n readonly headers: ReadonlyArray<readonly [name: string, value: string]>;\n /** The JSON body example exactly as the document gives it, or `null` for a call with no JSON body. */\n readonly jsonBody: string | null;\n}\n\nfunction requestSampleParts(\n variant: ApiReferenceVariant,\n serverUrl: string | null,\n securitySchemes: readonly ApiReferenceSecurityScheme[],\n): RequestSampleParts {\n const query = variant.parameters\n .filter((parameter) => parameter.location === 'query' && parameter.required)\n .map((parameter) => `${encodeURIComponent(parameter.name)}=${parameterExampleValue(parameter) ?? `{${parameter.name}}`}`);\n const url = `${(serverUrl ?? '').replace(/\\/$/, '')}${variant.path}${query.length > 0 ? `?${query.join('&')}` : ''}`;\n const headers: Array<readonly [string, string]> = [];\n const credential = variant.securitySchemes\n .map((name) => securitySchemes.find((candidate) => candidate.name === name))\n .map((scheme) => (scheme === undefined ? null : securityHeader(scheme)))\n .find((candidate): candidate is readonly [string, string] => candidate !== null);\n if (credential !== undefined) headers.push(credential);\n for (const parameter of variant.parameters.filter((candidate) => candidate.location === 'header' && candidate.required)) {\n headers.push([parameter.name, parameterExampleValue(parameter) ?? `<${parameter.name}>`]);\n }\n const jsonMedia = variant.requestBody?.mediaTypes.find((media) => media.mediaType === 'application/json');\n if (jsonMedia !== undefined) headers.push(['Content-Type', 'application/json']);\n return {\n method: variant.method,\n url,\n headers,\n jsonBody: jsonMedia === undefined ? null : jsonMedia.examples.find((candidate) => candidate.jsonValue !== null)?.jsonValue ?? '{}',\n };\n}\n\n/** A curl command that calls `variant`, one option per line. */\nexport function buildCurlSample(\n variant: ApiReferenceVariant,\n serverUrl: string | null,\n securitySchemes: readonly ApiReferenceSecurityScheme[],\n): string {\n const parts = requestSampleParts(variant, serverUrl, securitySchemes);\n const lines = [parts.method === 'GET' ? `curl ${shellQuote(parts.url)}` : `curl -X ${parts.method} ${shellQuote(parts.url)}`];\n for (const [name, value] of parts.headers) lines.push(`-H ${shellQuote(`${name}: ${value}`)}`);\n if (parts.jsonBody !== null) lines.push(`--data ${shellQuote(parts.jsonBody)}`);\n return lines.join(' \\\\\\n ');\n}\n\n/** The same call with the browser and Node `fetch`. */\nexport function buildJavaScriptSample(\n variant: ApiReferenceVariant,\n serverUrl: string | null,\n securitySchemes: readonly ApiReferenceSecurityScheme[],\n): string {\n const parts = requestSampleParts(variant, serverUrl, securitySchemes);\n const options: string[] = [];\n if (parts.method !== 'GET') options.push(` method: ${JSON.stringify(parts.method)},`);\n if (parts.headers.length > 0) {\n options.push(' headers: {', ...parts.headers.map(([name, value]) => ` ${JSON.stringify(name)}: ${JSON.stringify(value)},`), ' },');\n }\n if (parts.jsonBody !== null) {\n const parsed = parseJson(parts.jsonBody);\n options.push(` body: JSON.stringify(${parsed.ok ? indentContinuation(JSON.stringify(parsed.value, null, 2), ' ') : JSON.stringify(parts.jsonBody)}),`);\n }\n const call = options.length === 0 ? `fetch(${JSON.stringify(parts.url)})` : `fetch(${JSON.stringify(parts.url)}, {\\n${options.join('\\n')}\\n})`;\n return `const response = await ${call};\\nconst data = await response.json();`;\n}\n\n/** The same call with Python's `requests`. */\nexport function buildPythonSample(\n variant: ApiReferenceVariant,\n serverUrl: string | null,\n securitySchemes: readonly ApiReferenceSecurityScheme[],\n): string {\n const parts = requestSampleParts(variant, serverUrl, securitySchemes);\n const argumentsList = [` ${JSON.stringify(parts.url)},`];\n if (parts.headers.length > 0) {\n argumentsList.push(' headers={', ...parts.headers.map(([name, value]) => ` ${JSON.stringify(name)}: ${JSON.stringify(value)},`), ' },');\n }\n if (parts.jsonBody !== null) {\n const parsed = parseJson(parts.jsonBody);\n argumentsList.push(parsed.ok ? ` json=${indentContinuation(pythonLiteral(parsed.value, 0), ' ')},` : ` data=${JSON.stringify(parts.jsonBody)},`);\n }\n return `import requests\\n\\nresponse = requests.${parts.method.toLowerCase()}(\\n${argumentsList.join('\\n')}\\n)\\nprint(response.json())`;\n}\n\n/** Every language's sample for `variant`, keyed by language. */\nexport function buildRequestSamples(\n variant: ApiReferenceVariant,\n serverUrl: string | null,\n securitySchemes: readonly ApiReferenceSecurityScheme[],\n): Readonly<Record<ApiReferenceSampleLanguage, string>> {\n return {\n [ApiReferenceSampleLanguage.CURL]: buildCurlSample(variant, serverUrl, securitySchemes),\n [ApiReferenceSampleLanguage.JAVASCRIPT]: buildJavaScriptSample(variant, serverUrl, securitySchemes),\n [ApiReferenceSampleLanguage.PYTHON]: buildPythonSample(variant, serverUrl, securitySchemes),\n };\n}\n\nfunction parseJson(source: string): { readonly ok: true; readonly value: unknown } | { readonly ok: false } {\n try {\n return { ok: true, value: JSON.parse(source) as unknown };\n } catch {\n return { ok: false };\n }\n}\n\n/** Indents every line after the first, so a multi-line value sits under the key that introduces it. */\nfunction indentContinuation(text: string, indent: string): string {\n return text.split('\\n').map((line, index) => (index === 0 ? line : `${indent}${line}`)).join('\\n');\n}\n\n/**\n * A parsed JSON value written as a Python literal. JSON strings are valid Python strings, so only the\n * three words differ: `true`, `false` and `null` become `True`, `False` and `None`.\n */\nfunction pythonLiteral(value: unknown, depth: number): string {\n const pad = ' '.repeat(depth + 1);\n const closing = ' '.repeat(depth);\n if (value === null) return 'None';\n if (value === true) return 'True';\n if (value === false) return 'False';\n if (typeof value === 'number' || typeof value === 'string') return JSON.stringify(value);\n if (Array.isArray(value)) {\n return value.length === 0 ? '[]' : `[\\n${value.map((item) => `${pad}${pythonLiteral(item, depth + 1)},`).join('\\n')}\\n${closing}]`;\n }\n const entries = Object.entries(value as Record<string, unknown>);\n return entries.length === 0 ? '{}' : `{\\n${entries.map(([key, item]) => `${pad}${JSON.stringify(key)}: ${pythonLiteral(item, depth + 1)},`).join('\\n')}\\n${closing}}`;\n}\n\n/** One response status that has an example to show, with that example's JSON. */\nexport interface ApiReferenceResponseSample {\n readonly status: string;\n readonly description: string | null;\n readonly exampleName: string;\n readonly jsonValue: string;\n}\n\n/**\n * The response examples to show beside the contract: one per status that has one, successes first\n * (they are what the reader is building for), then errors in status order.\n */\nexport function responseSamples(responses: readonly ApiReferenceResponse[]): readonly ApiReferenceResponseSample[] {\n const samples = responses.flatMap((response) => {\n const example = response.mediaTypes.flatMap((media) => media.examples).find((candidate) => candidate.jsonValue !== null);\n return example === undefined || example.jsonValue === null\n ? []\n : [{ status: response.status, description: response.description, exampleName: example.name, jsonValue: example.jsonValue }];\n });\n const isSuccess = (status: string): boolean => /^[23]/.test(status);\n return [...samples.filter((sample) => isSuccess(sample.status)), ...samples.filter((sample) => !isSuccess(sample.status))];\n}\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The API reference's stylesheet, rendered once by each reference view.
|
|
3
|
+
*
|
|
4
|
+
* It ships as a string rather than a `.css` file because this runtime is compiled by `tsc`, which does
|
|
5
|
+
* not copy stylesheets into `dist`, and the docs portal consumes the compiled package: a relative CSS
|
|
6
|
+
* import would resolve in source and break every consumer. The portal's content security policy
|
|
7
|
+
* allows inline styles for exactly this.
|
|
8
|
+
*
|
|
9
|
+
* Layout (#1616 redesign):
|
|
10
|
+
*
|
|
11
|
+
* - ≥ 1280 px: three columns. The navigation rail, the operation's documentation, and a dark
|
|
12
|
+
* request/response panel that stays in view while the documentation beside it scrolls.
|
|
13
|
+
* - 960–1279 px: the rail becomes a drawer behind a Menu button in a sticky sub-bar, which also holds
|
|
14
|
+
* an operation switcher. Documentation and samples stay side by side.
|
|
15
|
+
* - < 960 px: one column. The samples open in a bottom sheet from a button in each operation.
|
|
16
|
+
*
|
|
17
|
+
* The wide layout is the unconditioned default and the narrow ones are `max-width` overrides, so a
|
|
18
|
+
* renderer that evaluates no media query (a crawler, a test DOM) sees every sample in place.
|
|
19
|
+
*
|
|
20
|
+
* Colours are tokens on `.wildo-api-ref`, redefined under Docusaurus's `[data-theme='dark']`. The
|
|
21
|
+
* accent is the portal's own primary colour, so an application's brand carries into its reference.
|
|
22
|
+
* The code panel is dark in both themes.
|
|
23
|
+
*
|
|
24
|
+
* Method badges are coloured text on a tint, each at least 5.5:1 in light mode (POST, the lowest, 5.59:1). They were white on a
|
|
25
|
+
* solid colour until #1626 measured `PUT` at 3.4:1 on the default palette.
|
|
26
|
+
*/
|
|
27
|
+
export declare const API_REFERENCE_STYLES = "\n.wildo-api-ref {\n --wr-ink: #15171c; --wr-text: #3d434f; --wr-muted: #5b6270;\n --wr-bg: #ffffff; --wr-rail: #f7f7f4; --wr-subtle: #fafaf8;\n --wr-line: #e4e4de; --wr-line-soft: #eeeee9; --wr-chip: #f1f1ec; --wr-control: #dadad3;\n --wr-accent: var(--ifm-color-primary); --wr-accent-ink: var(--ifm-color-primary-darkest);\n --wr-accent-soft: color-mix(in srgb, var(--ifm-color-primary) 9%, transparent);\n --wr-required: #a8231a;\n --wr-ok: #16a34a; --wr-warn: #d97706; --wr-fail: #b42318;\n --wr-code-bg: #0f1217; --wr-code-card: #151920; --wr-code-line: #262b35; --wr-code-control: #1b2029;\n --wr-code-selected: #2a303b; --wr-code-text: #e3e6ec; --wr-code-muted: #a3abb9;\n --wr-top: var(--ifm-navbar-height, 3.75rem); --wr-subbar: 0px;\n --wr-rail-width: 18rem; --wr-code-width: clamp(22rem, 40%, 33rem);\n --wr-gutter: clamp(1rem, 3.5vw, 3.25rem);\n --wr-mono: var(--ifm-font-family-monospace);\n color: var(--wr-ink); background: var(--wr-bg); font-size: 0.9375rem; line-height: 1.55;\n}\n[data-theme='dark'] .wildo-api-ref {\n --wr-ink: #e8eaee; --wr-text: #c3c8d2; --wr-muted: #9aa2b1;\n --wr-bg: #16181d; --wr-rail: #1b1e24; --wr-subtle: #1d2027;\n --wr-line: #2c313a; --wr-line-soft: #252a32; --wr-chip: #262b34; --wr-control: #3a404c;\n --wr-accent-ink: var(--ifm-color-primary-lightest);\n --wr-accent-soft: color-mix(in srgb, var(--ifm-color-primary) 18%, transparent);\n --wr-required: #ff8a80; --wr-ok: #4ade80; --wr-warn: #f59e0b; --wr-fail: #f87171;\n --wr-code-bg: #0b0d11; --wr-code-card: #11151b;\n}\n.wildo-api-ref *, .wildo-api-ref *::before, .wildo-api-ref *::after { box-sizing: border-box; }\n.wildo-api-ref a { color: var(--wr-accent-ink); }\n.wildo-api-ref :is(a, button, input, select, summary, [tabindex]):focus-visible { outline: 2px solid var(--wr-accent); outline-offset: 2px; }\n.wildo-api-ref [id] { scroll-margin-top: calc(var(--wr-top) + var(--wr-subbar) + 1rem); }\n.wildo-api-ref h1, .wildo-api-ref h2, .wildo-api-ref h3, .wildo-api-ref h4, .wildo-api-ref h5, .wildo-api-ref h6 { color: var(--wr-ink); }\n.wildo-api-ref code { border: 0; background: var(--wr-chip); color: var(--wr-ink); font-size: 0.85em; padding: 0.05rem 0.3rem; border-radius: 4px; }\n.wildo-api-ref pre code { background: transparent; padding: 0; font-size: inherit; color: inherit; }\n.wildo-api-ref :not(pre) > code { overflow-wrap: anywhere; }\n.wildo-api-ref pre { max-width: 100%; overflow: auto; }\n.wildo-api-ref details > summary { cursor: pointer; }\n.wildo-api-ref table { display: table; width: 100%; border-collapse: collapse; margin: 0; font-size: 0.875rem; }\n.wildo-api-ref tr, .wildo-api-ref tr:nth-child(2n) { border: 0; background: transparent; }\n.wildo-api-ref th, .wildo-api-ref td { border: 0; border-bottom: 1px solid var(--wr-line-soft); padding: 0.6rem 0.9rem 0.6rem 0; text-align: left; vertical-align: top; background: transparent; }\n.wildo-api-ref thead th { font-size: 0.75rem; font-weight: 600; color: var(--wr-muted); border-bottom-color: var(--wr-line); }\n.wildo-api-ref__visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }\n.wildo-api-ref__table-scroll { max-width: 100%; overflow-x: auto; }\n\n/* Shell ------------------------------------------------------------------------------------------ */\n.wildo-api-ref__shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: calc(100vh - var(--wr-top)); }\n.wildo-api-ref__main { min-width: 0; }\n.wildo-api-ref__subbar { position: sticky; top: var(--wr-top); z-index: 150; display: flex; align-items: center; gap: 0.5rem; height: 3.25rem; padding: 0 var(--wr-gutter) 0 0.5rem; background: var(--wr-subtle); border-bottom: 1px solid var(--wr-line-soft); }\n.wildo-api-ref__subbar-title { flex: 1; min-width: 0; font-weight: 600; font-size: 0.9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.wildo-api-ref__icon-button { width: 2.75rem; height: 2.75rem; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 9px; background: transparent; color: var(--wr-ink); cursor: pointer; }\n.wildo-api-ref__icon-button:hover { background: var(--wr-chip); }\n.wildo-api-ref__backdrop { display: none; }\n@media (min-width: 1280px) {\n .wildo-api-ref__shell--with-rail { grid-template-columns: var(--wr-rail-width) minmax(0, 1fr); }\n .wildo-api-ref__subbar { display: none; }\n .wildo-api-ref__rail { position: sticky; top: var(--wr-top); height: calc(100vh - var(--wr-top)); overflow-y: auto; }\n}\n@media (max-width: 1279.98px) {\n /* Only a page with a rail has a sub-bar, so only it offsets sticky elements and anchors by one. */\n .wildo-api-ref__shell--with-rail { --wr-subbar: 3.25rem; }\n .wildo-api-ref__rail { position: fixed; z-index: 400; top: 0; bottom: 0; left: 0; width: min(21rem, 88vw); overflow-y: auto; transform: translateX(-100%); visibility: hidden; transition: transform 0.2s ease, visibility 0s linear 0.2s; box-shadow: 8px 0 32px rgba(15, 18, 23, 0.18); }\n .wildo-api-ref--rail-open .wildo-api-ref__rail { transform: none; visibility: visible; transition: transform 0.2s ease; }\n .wildo-api-ref--rail-open .wildo-api-ref__backdrop { display: block; position: fixed; inset: 0; z-index: 399; border: 0; padding: 0; background: rgba(15, 18, 23, 0.45); cursor: default; }\n}\n@media (prefers-reduced-motion: reduce) { .wildo-api-ref__rail { transition: none !important; } }\n\n/* Rail ------------------------------------------------------------------------------------------- */\n.wildo-api-ref__rail { background: var(--wr-rail); border-right: 1px solid var(--wr-line); padding: 1.1rem 0.85rem 2rem; display: flex; flex-direction: column; gap: 1.1rem; font-size: 0.875rem; }\n.wildo-api-ref__rail-head { display: flex; align-items: center; gap: 0.5rem; margin: -0.5rem -0.35rem 0 0.25rem; }\n@media (min-width: 1280px) { .wildo-api-ref__rail-head { display: none; } }\n.wildo-api-ref__rail-head strong { flex: 1; font-size: 0.9375rem; }\n.wildo-api-ref__sections { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 3px; background: var(--wr-chip); border-radius: 9px; }\n.wildo-api-ref__sections a { text-align: center; padding: 0.35rem 0.5rem; border-radius: 7px; color: var(--wr-text); font-size: 0.8rem; font-weight: 500; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.wildo-api-ref__sections a[aria-current='page'] { background: var(--wr-bg); color: var(--wr-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(21, 23, 28, 0.08); }\n.wildo-api-ref__label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--wr-text); margin-bottom: 0.35rem; }\n.wildo-api-ref__input { width: 100%; height: 2.25rem; border: 1px solid var(--wr-control); border-radius: 8px; padding: 0 0.7rem; font: inherit; font-size: 0.875rem; background: var(--wr-bg); color: var(--wr-ink); }\n.wildo-api-ref__rail-group-title { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wr-muted); padding: 0 0.5rem 0.35rem; }\n.wildo-api-ref__rail-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }\n.wildo-api-ref__rail-link { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.5rem; border-radius: 6px; color: var(--wr-text) !important; text-decoration: none !important; line-height: 1.35; }\n.wildo-api-ref__rail-link:hover { background: var(--wr-chip); color: var(--wr-ink) !important; }\n.wildo-api-ref__rail-link[aria-current='page'] { color: var(--wr-ink) !important; font-weight: 600; background: var(--wr-bg); box-shadow: inset 0 0 0 1px var(--wr-line); }\n.wildo-api-ref__rail-link[aria-current='location'] { background: var(--wr-accent-soft); color: var(--wr-ink) !important; font-weight: 600; }\n.wildo-api-ref__rail-count { margin-left: auto; font-family: var(--wr-mono); font-size: 0.6875rem; color: var(--wr-muted); }\n.wildo-api-ref__rail-families { list-style: none; margin: 0.15rem 0 0.35rem 0.35rem; padding: 0 0 0 0.35rem; border-left: 1px solid var(--wr-line); display: flex; flex-direction: column; gap: 1px; }\n.wildo-api-ref__rail-families .wildo-api-ref__rail-link { font-size: 0.8125rem; padding: 0.3rem 0.4rem; }\n.wildo-api-ref__rail-categories { display: flex; flex-direction: column; border-top: 1px solid var(--wr-line); padding-top: 0.5rem; }\n.wildo-api-ref__rail-category > summary { list-style: none; display: flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.5rem; border-radius: 6px; color: var(--wr-text); font-weight: 500; }\n.wildo-api-ref__rail-category > summary::-webkit-details-marker { display: none; }\n.wildo-api-ref__rail-category > summary:hover { background: var(--wr-chip); }\n.wildo-api-ref__rail-category > summary::before { content: ''; width: 0.4rem; height: 0.4rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 0.15s ease; flex-shrink: 0; margin-right: 0.15rem; }\n.wildo-api-ref__rail-category[open] > summary::before { transform: rotate(45deg); }\n.wildo-api-ref__rail-category > .wildo-api-ref__rail-list { padding: 0.1rem 0 0.4rem 0.9rem; }\n.wildo-api-ref__rail-empty { color: var(--wr-muted); padding: 0 0.5rem; margin: 0; }\n\n/* Operation switcher (sub-bar popover) ------------------------------------------------------------ */\n.wildo-api-ref__switcher { position: relative; flex-shrink: 0; }\n.wildo-api-ref__switcher-panel { position: absolute; right: 0; top: calc(100% + 0.4rem); width: min(24rem, calc(100vw - 1.5rem)); max-height: min(34rem, calc(100vh - var(--wr-top) - 5rem)); display: flex; flex-direction: column; background: var(--wr-bg); border: 1px solid var(--wr-line); border-radius: 14px; box-shadow: 0 18px 48px rgba(15, 18, 23, 0.22); overflow: hidden; z-index: 160; }\n.wildo-api-ref__switcher-filter { padding: 0.75rem; border-bottom: 1px solid var(--wr-line-soft); }\n.wildo-api-ref__switcher-list { list-style: none; margin: 0; padding: 0.35rem; overflow-y: auto; }\n.wildo-api-ref__switcher-list .wildo-api-ref__rail-link { min-height: 2.5rem; font-size: 0.875rem; }\n\n/* Buttons and chips ------------------------------------------------------------------------------- */\n.wildo-api-ref__button { display: inline-flex; align-items: center; gap: 0.4rem; height: 2rem; padding: 0 0.7rem; border: 1px solid var(--wr-control); border-radius: 8px; background: var(--wr-bg); color: var(--wr-text); font: inherit; font-size: 0.8rem; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none !important; }\n.wildo-api-ref__button:hover { border-color: var(--wr-muted); color: var(--wr-ink); }\n.wildo-api-ref__chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.35rem 0; padding: 0; list-style: none; }\n.wildo-api-ref__chip { font-family: var(--wr-mono); font-size: 0.75rem !important; padding: 0.1rem 0.45rem !important; border-radius: 5px; background: var(--wr-chip); color: var(--wr-ink); }\n.wildo-api-ref__chip--outline { background: transparent !important; box-shadow: inset 0 0 0 1px var(--wr-line); color: var(--wr-text) !important; }\n.wildo-api-ref__method { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-width: 3.6rem; font-family: var(--wr-mono); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.02em; line-height: 1; padding: 0.35rem 0.4rem; border-radius: 5px; color: #3d434f; background: #ebebe5; }\n.wildo-api-ref__method--small { min-width: 3.25rem; font-size: 0.625rem; padding: 0.22rem 0.3rem; }\n.wildo-api-ref__method--get { color: #1747a6; background: #e6eefd; }\n.wildo-api-ref__method--post { color: #146c43; background: #e1f3e8; }\n.wildo-api-ref__method--put { color: #8f4308; background: #fceedd; }\n.wildo-api-ref__method--patch { color: #5b35b3; background: #efe9fd; }\n.wildo-api-ref__method--delete { color: #a8231a; background: #fce8e6; }\n[data-theme='dark'] .wildo-api-ref__method { color: #c3c8d2; background: #2a2f38; }\n[data-theme='dark'] .wildo-api-ref__method--get { color: #a9c4ff; background: rgba(59, 110, 246, 0.2); }\n[data-theme='dark'] .wildo-api-ref__method--post { color: #86dcaa; background: rgba(34, 160, 90, 0.2); }\n[data-theme='dark'] .wildo-api-ref__method--put { color: #f5bf86; background: rgba(234, 140, 40, 0.2); }\n[data-theme='dark'] .wildo-api-ref__method--patch { color: #cbb8ff; background: rgba(140, 100, 240, 0.22); }\n[data-theme='dark'] .wildo-api-ref__method--delete { color: #ffa39a; background: rgba(220, 60, 50, 0.22); }\n.wildo-api-ref__status-dot { display: inline-block; width: 0.45rem; height: 0.45rem; border-radius: 99px; background: var(--wr-muted); flex-shrink: 0; }\n.wildo-api-ref__status-dot--success { background: var(--wr-ok); }\n.wildo-api-ref__status-dot--client-error { background: var(--wr-warn); }\n.wildo-api-ref__status-dot--server-error { background: var(--wr-fail); }\n\n/* Pages ------------------------------------------------------------------------------------------- */\n.wildo-api-ref__page { padding: 2.25rem var(--wr-gutter) 3rem; max-width: 76rem; }\n.wildo-api-ref__intro { padding: 2.25rem var(--wr-gutter) 1.75rem; max-width: 60rem; }\n.wildo-api-ref__eyebrow { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wr-muted); margin: 0 0 0.5rem; }\n.wildo-api-ref__title { font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 0.75rem; }\n.wildo-api-ref__lead { font-size: 1rem; line-height: 1.6; color: var(--wr-text); max-width: 46rem; }\n.wildo-api-ref__breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; list-style: none; margin: 0 0 0.9rem; padding: 0; font-size: 0.8125rem; color: var(--wr-muted); }\n.wildo-api-ref__breadcrumb li + li::before { content: '/'; margin-right: 0.5rem; color: var(--wr-control); }\n.wildo-api-ref__breadcrumb a { color: var(--wr-muted); }\n.wildo-api-ref__stats { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0; padding: 0; list-style: none; }\n.wildo-api-ref__stats li { font-size: 0.8125rem; color: var(--wr-text); padding: 0.2rem 0.65rem; border: 1px solid var(--wr-line); border-radius: 999px; }\n.wildo-api-ref__panel { border: 1px solid var(--wr-line); border-radius: 12px; padding: 1.1rem 1.25rem; margin: 0 0 1.5rem; background: var(--wr-bg); }\n.wildo-api-ref__panel > :first-child { margin-top: 0; }\n.wildo-api-ref__panel > :last-child { margin-bottom: 0; }\n.wildo-api-ref__panel h2 { font-size: 1.05rem; }\n.wildo-api-ref__panel h3 { font-size: 0.9rem; margin: 1rem 0 0.35rem; }\n.wildo-api-ref__disclosure { border: 1px solid var(--wr-line); border-radius: 12px; margin: 0 0 1.25rem; }\n.wildo-api-ref__disclosure > summary { padding: 0.8rem 1.1rem; font-weight: 600; }\n.wildo-api-ref__disclosure > summary > h2, .wildo-api-ref__disclosure > summary > h3 { display: inline; font-size: inherit; margin: 0; }\n.wildo-api-ref__disclosure > div, .wildo-api-ref__disclosure > ul, .wildo-api-ref__disclosure > section, .wildo-api-ref__disclosure > p { padding: 0 1.1rem 1rem; margin: 0; }\n.wildo-api-ref__search { display: flex; flex-wrap: wrap; align-items: end; gap: 0.5rem; margin: 1.5rem 0 0.25rem; max-width: 34rem; }\n.wildo-api-ref__search > div { flex: 1; min-width: 14rem; }\n.wildo-api-ref__search-status { min-height: 1.4rem; margin: 0 0 1rem; font-size: 0.8125rem; color: var(--wr-muted); }\n.wildo-api-ref__category { margin: 2rem 0 0; }\n.wildo-api-ref__category > h2 { font-size: 1.15rem; margin: 0 0 0.25rem; }\n.wildo-api-ref__category > p { color: var(--wr-text); margin: 0 0 0.75rem; }\n.wildo-api-ref__resource-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); list-style: none; margin: 0.75rem 0 0; padding: 0; }\n.wildo-api-ref__resource-card { position: relative; display: flex; flex-direction: column; gap: 0.35rem; border: 1px solid var(--wr-line); border-radius: 12px; padding: 0.95rem 1.1rem; background: var(--wr-bg); transition: border-color 0.15s ease, box-shadow 0.15s ease; }\n.wildo-api-ref__resource-card:hover { border-color: var(--wr-accent); box-shadow: 0 4px 16px rgba(21, 23, 28, 0.07); }\n.wildo-api-ref__resource-card a { color: var(--wr-ink); font-weight: 600; text-decoration: none; }\n.wildo-api-ref__resource-card a::after { content: ''; position: absolute; inset: 0; border-radius: 12px; }\n.wildo-api-ref__resource-card p { margin: 0; font-size: 0.8125rem; color: var(--wr-text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }\n.wildo-api-ref__resource-card .wildo-api-ref__card-meta { margin-top: auto; padding-top: 0.25rem; font-size: 0.75rem; color: var(--wr-muted); -webkit-line-clamp: 1; }\n\n/* Operations -------------------------------------------------------------------------------------- */\n.wildo-api-ref__operations { border-top: 1px solid var(--wr-line); background: linear-gradient(to right, var(--wr-bg) calc(100% - var(--wr-code-width)), var(--wr-code-bg) 0); }\n.wildo-api-ref__operation { display: grid; grid-template-columns: minmax(0, 1fr) var(--wr-code-width); }\n.wildo-api-ref__operation-doc { min-width: 0; padding: 2.25rem var(--wr-gutter) 2.75rem; }\n.wildo-api-ref__operation-code { min-width: 0; padding: 2rem 1.25rem 2.5rem; }\n.wildo-api-ref__family + .wildo-api-ref__family .wildo-api-ref__operation-doc { border-top: 1px solid var(--wr-line); }\n.wildo-api-ref__family + .wildo-api-ref__family .wildo-api-ref__operation-code { border-top: 1px solid var(--wr-code-line); }\n.wildo-api-ref__samples { position: sticky; top: calc(var(--wr-top) + var(--wr-subbar) + 1rem); max-height: calc(100vh - var(--wr-top) - var(--wr-subbar) - 2rem); overflow: auto; }\n.wildo-api-ref__sheet-open { display: none !important; }\n@media (max-width: 959.98px) {\n .wildo-api-ref__operations { background: none; }\n .wildo-api-ref__operation { grid-template-columns: minmax(0, 1fr); }\n .wildo-api-ref__operation-code { display: none; }\n .wildo-api-ref__sheet-open { display: inline-flex !important; }\n}\n.wildo-api-ref__family-title { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wr-muted); margin: 0 0 0.6rem; }\n.wildo-api-ref__operation-title { font-size: clamp(1.35rem, 2.2vw, 1.65rem); line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 0.9rem; }\n.wildo-api-ref__segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--wr-chip); border-radius: 9px; margin: 0 0 1.1rem; max-width: 100%; }\n.wildo-api-ref__segment { display: inline-flex; align-items: center; gap: 0.4rem; border: 0; background: transparent; border-radius: 7px; padding: 0.3rem 0.6rem; font: inherit; font-size: 0.8125rem; color: var(--wr-text); cursor: pointer; text-align: left; }\n.wildo-api-ref__segment[aria-selected='true'] { background: var(--wr-bg); color: var(--wr-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(21, 23, 28, 0.1); }\n.wildo-api-ref__endpoint { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.45rem 0.4rem 0.55rem; background: var(--wr-rail); border: 1px solid var(--wr-line); border-radius: 10px; margin: 0 0 1rem; }\n.wildo-api-ref__path { flex: 1; min-width: 0; font-family: var(--wr-mono); font-size: 0.85rem !important; background: none !important; padding: 0 !important; overflow-wrap: anywhere; color: var(--wr-ink); }\n.wildo-api-ref__path-param { color: var(--wr-accent-ink); }\n.wildo-api-ref__facts { display: flex; flex-wrap: wrap; gap: 1px; margin: 1.1rem 0; background: var(--wr-line); border: 1px solid var(--wr-line); border-radius: 10px; overflow: hidden; }\n.wildo-api-ref__fact { flex: 1 1 11rem; background: var(--wr-bg); padding: 0.6rem 0.85rem; min-width: 0; }\n.wildo-api-ref__fact dt { font-size: 0.75rem; font-weight: 400; color: var(--wr-muted); margin: 0; }\n.wildo-api-ref__fact dd { margin: 0.2rem 0 0; font-size: 0.875rem; font-weight: 500; overflow-wrap: anywhere; }\n.wildo-api-ref__note { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.75rem 0.9rem; margin: 0 0 1rem; background: var(--wr-accent-soft); border-radius: 10px; font-size: 0.875rem; color: var(--wr-ink); }\n.wildo-api-ref__note ul { margin: 0; padding-left: 1.1rem; }\n.wildo-api-ref__inline-disclosure > summary { font-size: 0.8125rem; font-weight: 500; color: var(--wr-text); margin: 0 0 0.5rem; }\n.wildo-api-ref__subheading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem; font-size: 1.05rem; font-weight: 600; margin: 2rem 0 0.6rem; }\n.wildo-api-ref__subheading-meta { font-family: var(--wr-mono); font-size: 0.75rem; font-weight: 400; color: var(--wr-muted); }\n.wildo-api-ref__sheet-open { margin: 0.5rem 0 0; width: 100%; justify-content: center; height: 2.75rem; border: 0; background: var(--wr-code-bg); color: #ffffff; font-size: 0.9rem; font-weight: 600; border-radius: 12px; }\n.wildo-api-ref__sheet-open:hover { color: #ffffff; }\n\n/* Fields ------------------------------------------------------------------------------------------ */\n.wildo-api-ref__fields { list-style: none; margin: 0; padding: 0; }\n.wildo-api-ref__field { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 0.35rem 1.25rem; padding: 0.8rem 0; border-top: 1px solid var(--wr-line-soft); }\n.wildo-api-ref__fields > .wildo-api-ref__field:first-child { border-top-color: var(--wr-line); }\n.wildo-api-ref__field-head { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }\n.wildo-api-ref__field-name { font-family: var(--wr-mono); font-size: 0.875rem !important; font-weight: 600; background: none !important; padding: 0 !important; overflow-wrap: anywhere; }\n.wildo-api-ref__field-meta { font-size: 0.75rem; color: var(--wr-muted); }\n.wildo-api-ref__field-meta code { background: none; padding: 0; font-size: 0.75rem; color: var(--wr-muted); }\n.wildo-api-ref__required { color: var(--wr-required); font-weight: 600; }\n.wildo-api-ref__field-body { min-width: 0; font-size: 0.875rem; color: var(--wr-text); }\n.wildo-api-ref__field-body > :first-child { margin-top: 0; }\n.wildo-api-ref__field-body p { margin: 0 0 0.4rem; }\n.wildo-api-ref__field-body > :last-child { margin-bottom: 0; }\n.wildo-api-ref__children > summary { display: inline-flex; align-items: center; gap: 0.35rem; height: 1.75rem; padding: 0 0.7rem; margin: 0.25rem 0; border: 1px solid var(--wr-control); border-radius: 999px; font-size: 0.75rem; color: var(--wr-text); list-style: none; }\n.wildo-api-ref__children > summary::-webkit-details-marker { display: none; }\n.wildo-api-ref__children > summary::before { content: '+'; font-weight: 600; }\n.wildo-api-ref__children[open] > summary::before { content: '\u2212'; }\n.wildo-api-ref__children > .wildo-api-ref__nested { margin-top: 0.35rem; padding-left: 0.9rem; border-left: 2px solid var(--wr-line); }\n.wildo-api-ref__nested .wildo-api-ref__field { grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); padding: 0.6rem 0; }\n.wildo-api-ref__nested-label { font-size: 0.75rem; font-weight: 600; color: var(--wr-muted); margin: 0.5rem 0 0.25rem; }\n.wildo-api-ref__more { width: 100%; height: 2.5rem; margin-top: 0.25rem; border: 1px dashed var(--wr-control); border-radius: 9px; background: var(--wr-subtle); color: var(--wr-text); font: inherit; font-size: 0.8125rem; cursor: pointer; }\n.wildo-api-ref__enum { list-style: none; margin: 0.35rem 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }\n@media (max-width: 640px) {\n .wildo-api-ref__field, .wildo-api-ref__nested .wildo-api-ref__field { grid-template-columns: minmax(0, 1fr); }\n}\n\n/* Responses --------------------------------------------------------------------------------------- */\n.wildo-api-ref__status-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.75rem; }\n.wildo-api-ref__status-tab { display: inline-flex; align-items: center; gap: 0.45rem; height: 2rem; padding: 0 0.8rem; border: 1px solid var(--wr-control); border-radius: 999px; background: var(--wr-bg); color: var(--wr-text); font: inherit; font-size: 0.8125rem; font-family: var(--wr-mono); cursor: pointer; }\n.wildo-api-ref__status-tab[aria-selected='true'] { background: var(--wr-ink); border-color: var(--wr-ink); color: var(--wr-bg); }\n.wildo-api-ref__response { border: 1px solid var(--wr-line); border-radius: 10px; padding: 0.85rem 1rem; }\n.wildo-api-ref__response > p:first-child { margin: 0 0 0.5rem; }\n.wildo-api-ref__representations { list-style: none; margin: 0; padding: 0; }\n.wildo-api-ref__representations > li + li { margin-top: 0.75rem; }\n.wildo-api-ref__media { font-family: var(--wr-mono); font-size: 0.75rem; color: var(--wr-muted); }\n\n/* Code panel -------------------------------------------------------------------------------------- */\n.wildo-api-ref__samples { display: flex; flex-direction: column; gap: 1rem; color: var(--wr-code-text); }\n.wildo-api-ref__code-card { border: 1px solid var(--wr-code-line); border-radius: 12px; background: var(--wr-code-card); overflow: hidden; }\n.wildo-api-ref__code-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; padding: 0.4rem 0.5rem 0.4rem 0.75rem; border-bottom: 1px solid var(--wr-code-line); }\n.wildo-api-ref__code-title { font-size: 0.75rem; font-weight: 600; color: var(--wr-code-text); margin-right: 0.35rem; }\n.wildo-api-ref__code-tabs { display: flex; flex-wrap: wrap; gap: 2px; flex: 1; }\n.wildo-api-ref__code-tab { display: inline-flex; align-items: center; gap: 0.35rem; border: 0; background: transparent; color: var(--wr-code-muted); border-radius: 6px; padding: 0.3rem 0.55rem; font: inherit; font-size: 0.75rem; cursor: pointer; }\n.wildo-api-ref__code-tab:hover { color: var(--wr-code-text); }\n.wildo-api-ref__code-tab[aria-selected='true'] { background: var(--wr-code-selected); color: #ffffff; }\n.wildo-api-ref__code-server { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.75rem; border-bottom: 1px solid var(--wr-code-line); font-size: 0.75rem; color: var(--wr-code-muted); }\n.wildo-api-ref__code-server select { border: 1px solid #2e3440; border-radius: 6px; background: var(--wr-code-control); color: var(--wr-code-text); font: inherit; font-size: 0.75rem; padding: 0.15rem 0.4rem; max-width: 100%; }\n.wildo-api-ref__code-server code { background: none; color: var(--wr-code-text); padding: 0; overflow-wrap: anywhere; }\n.wildo-api-ref__code-card pre { margin: 0; padding: 0.9rem 1rem; background: transparent; color: var(--wr-code-text); font-family: var(--wr-mono); font-size: 0.78rem; line-height: 1.7; max-height: 28rem; overflow: auto; border-radius: 0; white-space: pre; }\n.wildo-api-ref__code-caption { margin: 0; padding: 0.5rem 0.9rem 0; font-size: 0.75rem; color: var(--wr-code-muted); }\n.wildo-api-ref__code-empty { margin: 0; padding: 0.9rem 1rem; font-size: 0.8rem; color: var(--wr-code-muted); }\n.wildo-api-ref__copy { display: inline-flex; align-items: center; gap: 0.35rem; height: 1.85rem; padding: 0 0.6rem; border: 1px solid var(--wr-control); border-radius: 7px; background: var(--wr-bg); color: var(--wr-text); font: inherit; font-size: 0.75rem; cursor: pointer; flex-shrink: 0; }\n.wildo-api-ref__copy:hover { color: var(--wr-ink); border-color: var(--wr-muted); }\n.wildo-api-ref__code-card .wildo-api-ref__copy { border-color: transparent; background: transparent; color: var(--wr-code-muted); }\n.wildo-api-ref__code-card .wildo-api-ref__copy:hover { color: #ffffff; background: var(--wr-code-selected); }\n.wildo-api-ref__tok--key { color: #8cc4ff; }\n.wildo-api-ref__tok--string { color: #b7e3a3; }\n.wildo-api-ref__tok--number, .wildo-api-ref__tok--literal { color: #f4c27a; }\n.wildo-api-ref__tok--keyword { color: #c7a6ff; }\n\n/* Bottom sheet (phones) --------------------------------------------------------------------------- */\n.wildo-api-ref__sheet { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%; max-height: 88vh; border: 0; border-radius: 18px 18px 0 0; background: var(--wr-code-bg); color: var(--wr-code-text); padding: 0.5rem 0.75rem 1.5rem; overflow: auto; }\n.wildo-api-ref__sheet::backdrop { background: rgba(15, 18, 23, 0.45); }\n.wildo-api-ref__sheet-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0 0.75rem 0.25rem; }\n.wildo-api-ref__sheet-head strong { flex: 1; font-size: 0.9rem; color: #ffffff; }\n.wildo-api-ref__sheet .wildo-api-ref__icon-button { color: var(--wr-code-text); }\n.wildo-api-ref__sheet .wildo-api-ref__icon-button:hover { background: var(--wr-code-selected); }\n\n/* Data models ------------------------------------------------------------------------------------- */\n.wildo-api-ref__models { padding: 1.5rem var(--wr-gutter) 3rem; border-top: 1px solid var(--wr-line); }\n.wildo-api-ref__models .wildo-api-ref__disclosure { max-width: 60rem; }\n";
|
|
28
|
+
//# sourceMappingURL=openapi-reference-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi-reference-styles.d.ts","sourceRoot":"","sources":["../../../src/runtime/openapi-reference-styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,oBAAoB,+64BAwQhC,CAAC"}
|