@wildo-ai/saas-technical-doc 1.1.4 → 1.1.6
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-administration-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-administration-documentation.js.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 +37 -0
- package/dist/esm/companion/application-documentation/application-connection-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-connection-documentation.js +46 -5
- package/dist/esm/companion/application-documentation/application-connection-documentation.js.map +1 -1
- package/dist/esm/companion/application-documentation/application-documentation-chapters.d.ts +101 -0
- package/dist/esm/companion/application-documentation/application-documentation-chapters.d.ts.map +1 -0
- package/dist/esm/companion/application-documentation/application-documentation-chapters.js +205 -0
- package/dist/esm/companion/application-documentation/application-documentation-chapters.js.map +1 -0
- package/dist/esm/companion/application-documentation/application-domain-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-domain-documentation.js.map +1 -1
- package/dist/esm/companion/application-documentation/application-integration-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-integration-documentation.js.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-role-documentation.js.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/application-organization-unit-resource-documentation.js +3 -0
- package/dist/esm/companion/application-documentation/application-organization-unit-resource-documentation.js.map +1 -1
- package/dist/esm/companion/application-documentation/docs-api-origin-substitution.d.ts +34 -0
- package/dist/esm/companion/application-documentation/docs-api-origin-substitution.d.ts.map +1 -0
- package/dist/esm/companion/application-documentation/docs-api-origin-substitution.js +45 -0
- package/dist/esm/companion/application-documentation/docs-api-origin-substitution.js.map +1 -0
- package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.d.ts +24 -10
- package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.js +25 -15
- package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.js.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 +11 -3
- package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.js +9 -2
- package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.js.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.js +10 -4
- package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.js.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 +2 -0
- package/dist/esm/companion/index.d.ts.map +1 -1
- package/dist/esm/companion/index.js +2 -0
- package/dist/esm/companion/index.js.map +1 -1
- package/dist/esm/companion/manual-controller-route-projection.d.ts.map +1 -1
- package/dist/esm/companion/manual-controller-route-projection.js.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 +8 -4
- package/dist/esm/companion/openapi-generator.d.ts.map +1 -1
- package/dist/esm/companion/openapi-generator.js +323 -33
- package/dist/esm/companion/openapi-generator.js.map +1 -1
- package/dist/esm/companion/operation-projection.schemas.d.ts +57 -1
- package/dist/esm/companion/operation-projection.schemas.d.ts.map +1 -1
- package/dist/esm/companion/operation-projection.schemas.js +29 -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/publish-result.types.js.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-docusaurus-renderer.js +8 -0
- package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.js.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-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-render-model.js +26 -10
- package/dist/esm/companion/rendering/technical-documentation-render-model.js.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.js.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-capture-execution-port.js.map +1 -1
- package/dist/esm/companion/technical-documentation-diagram-definitions.d.ts.map +1 -1
- package/dist/esm/companion/technical-documentation-diagram-definitions.js.map +1 -1
- package/dist/esm/companion/technical-documentation-diagram-materializer.d.ts.map +1 -1
- package/dist/esm/companion/technical-documentation-diagram-materializer.js.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/config/wildo-tech-doc-config.schemas.js.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 +27 -24
- package/dist/esm/content/application-consumer-documentation-content.techdoc.d.ts.map +1 -1
- package/dist/esm/content/application-consumer-documentation-content.techdoc.js +205 -82
- 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 +2 -2
- package/dist/esm/runtime/DocsAuthContext.d.ts.map +1 -1
- package/dist/esm/runtime/DocsAuthContext.js +8 -4
- package/dist/esm/runtime/DocsAuthContext.js.map +1 -1
- package/dist/esm/runtime/DocsFrontendProviders.d.ts +30 -0
- package/dist/esm/runtime/DocsFrontendProviders.d.ts.map +1 -0
- package/dist/esm/runtime/DocsFrontendProviders.js +39 -0
- package/dist/esm/runtime/DocsFrontendProviders.js.map +1 -0
- 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 +1 -2
- package/dist/esm/runtime/frontend-provider-registry.techdoc.d.ts.map +1 -1
- package/dist/esm/runtime/frontend-provider-registry.techdoc.js.map +1 -1
- package/dist/esm/runtime/index.d.ts +8 -0
- package/dist/esm/runtime/index.d.ts.map +1 -1
- package/dist/esm/runtime/index.js +8 -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 +30 -0
- package/dist/esm/runtime/openapi-reference-model.d.ts.map +1 -1
- package/dist/esm/runtime/openapi-reference-model.js +85 -11
- 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 +1 -0
- package/dist/esm/runtime/use-docs-frontend-provider-registry.d.ts.map +1 -1
- package/dist/esm/runtime/use-docs-frontend-provider-registry.js +10 -2
- package/dist/esm/runtime/use-docs-frontend-provider-registry.js.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 +37 -0
- package/dist/esm/runtime/use-docs-provider-scripts.d.ts.map +1 -0
- package/dist/esm/runtime/use-docs-provider-scripts.js +47 -0
- package/dist/esm/runtime/use-docs-provider-scripts.js.map +1 -0
- package/dist/esm/runtime/use-docs-provider-sdks.d.ts.map +1 -1
- package/dist/esm/runtime/use-docs-provider-sdks.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +8 -24
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment, createContext, useContext } from 'react';
|
|
3
|
+
import { isDocumentationListItem, splitMessagePlaceholders } from './documentation-site-translator.js';
|
|
4
|
+
/*
|
|
5
|
+
* The view's own plumbing for its words — deliberately NOT exported from the runtime (#1992 review): a
|
|
6
|
+
* site builds its words with `createApiReferenceWords` and passes them to a view; it never reads them
|
|
7
|
+
* back out of a context, and a hook it could import would only throw outside a view.
|
|
8
|
+
*/
|
|
9
|
+
const ApiReferenceWordsContext = createContext(null);
|
|
10
|
+
/** Provides the words to every part of one reference surface. */
|
|
11
|
+
export const ApiReferenceWordsProvider = ApiReferenceWordsContext.Provider;
|
|
12
|
+
/** The words the enclosing reference view was given. Every view requires them, so this never answers empty. */
|
|
13
|
+
export function useReferenceWords() {
|
|
14
|
+
const words = useContext(ApiReferenceWordsContext);
|
|
15
|
+
if (words === null)
|
|
16
|
+
throw new Error('An API reference part rendered outside a view that was given its words (#1992).');
|
|
17
|
+
return words;
|
|
18
|
+
}
|
|
19
|
+
/** A sentence with each `{name}` replaced by the element given for it; a placeholder with none stays as written. */
|
|
20
|
+
export function renderSentence(sentence, elements) {
|
|
21
|
+
// Own elements only, so `{constructor}` stays visibly unfilled instead of resolving to an inherited member.
|
|
22
|
+
return _jsx(_Fragment, { children: splitMessagePlaceholders(sentence).map((segment, index) => (index % 2 === 1
|
|
23
|
+
? _jsx(Fragment, { children: Object.hasOwn(elements, segment) ? elements[segment] : `{${segment}}` }, index)
|
|
24
|
+
: segment.length > 0 ? _jsx(Fragment, { children: segment }, index) : null)) });
|
|
25
|
+
}
|
|
26
|
+
/** `items` laid out in the reader's locale's list pattern (see `ApiReferenceWords.listLayout`). */
|
|
27
|
+
export function renderList(words, items, kind) {
|
|
28
|
+
return _jsx(_Fragment, { children: words.listLayout(items.length, kind).map((part, index) => _jsx(Fragment, { children: isDocumentationListItem(part) ? items[part.item] : part.separator }, index)) });
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=openapi-reference-words-context.js.map
|
|
@@ -0,0 +1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UAAU,UAAU,CAAC,KAAwB,EAAE,KAA2B,EAAE,IAA2B;IAC3G,OAAO,4BAAG,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,KAAC,QAAQ,cAAc,uBAAuB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,IAAzE,KAAK,CAAgF,CAAC,GAAI,CAAC;AAChL,CAAC","sourcesContent":["import { Fragment, createContext, useContext, type ReactNode } from 'react';\n\nimport { isDocumentationListItem, splitMessagePlaceholders, type DocumentationListKind } from './documentation-site-translator';\nimport type { ApiReferenceSentence, ApiReferenceWords } from './openapi-reference-words';\n\n/*\n * The view's own plumbing for its words — deliberately NOT exported from the runtime (#1992 review): a\n * site builds its words with `createApiReferenceWords` and passes them to a view; it never reads them\n * back out of a context, and a hook it could import would only throw outside a view.\n */\n\nconst ApiReferenceWordsContext = createContext<ApiReferenceWords | null>(null);\n\n/** Provides the words to every part of one reference surface. */\nexport const ApiReferenceWordsProvider = ApiReferenceWordsContext.Provider;\n\n/** The words the enclosing reference view was given. Every view requires them, so this never answers empty. */\nexport function useReferenceWords(): ApiReferenceWords {\n const words = useContext(ApiReferenceWordsContext);\n if (words === null) throw new Error('An API reference part rendered outside a view that was given its words (#1992).');\n return words;\n}\n\n/** A sentence with each `{name}` replaced by the element given for it; a placeholder with none stays as written. */\nexport function renderSentence(sentence: ApiReferenceSentence, elements: Readonly<Record<string, ReactNode>>): ReactNode {\n // Own elements only, so `{constructor}` stays visibly unfilled instead of resolving to an inherited member.\n return <>{splitMessagePlaceholders(sentence).map((segment, index) => (index % 2 === 1\n ? <Fragment key={index}>{Object.hasOwn(elements, segment) ? elements[segment] : `{${segment}}`}</Fragment>\n : segment.length > 0 ? <Fragment key={index}>{segment}</Fragment> : null))}</>;\n}\n\n/** `items` laid out in the reader's locale's list pattern (see `ApiReferenceWords.listLayout`). */\nexport function renderList(words: ApiReferenceWords, items: readonly ReactNode[], kind: DocumentationListKind): ReactNode {\n return <>{words.listLayout(items.length, kind).map((part, index) => <Fragment key={index}>{isDocumentationListItem(part) ? items[part.item] : part.separator}</Fragment>)}</>;\n}\n"]}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { DocumentationListKind, type DocumentationListPart, type DocumentationSiteTranslator } from './documentation-site-translator';
|
|
2
|
+
/**
|
|
3
|
+
* A message whose `{name}` placeholders the VIEW fills with the document's own elements — a role's
|
|
4
|
+
* label in bold, a field name in code — so the sentence's word order is the locale's while its values
|
|
5
|
+
* keep their formatting. Rendered by `renderSentence` in the view.
|
|
6
|
+
*/
|
|
7
|
+
export type ApiReferenceSentence = string;
|
|
8
|
+
/**
|
|
9
|
+
* Every word the API reference shows a reader (#1992).
|
|
10
|
+
*
|
|
11
|
+
* The documentation runtime has no label pack of its own, and the reference used to carry its chrome as
|
|
12
|
+
* English written into the components — "Filter resources", "Required role", "Any one of", "Copy". The
|
|
13
|
+
* site now passes them in, worded with Docusaurus `translate({ id })` from its `i18n/<locale>/code.json`
|
|
14
|
+
* (the scaffold's `src/components/documentation-site-words.ts`), as the site's search page words itself
|
|
15
|
+
* (#1964) and as `DocsProviderComponent` takes its states. The type is the contract: a site that omits a
|
|
16
|
+
* word does not compile, and a word its locale lacks shows its id rather than English.
|
|
17
|
+
*
|
|
18
|
+
* How the view builds text out of these, so no sentence is assembled from fragments:
|
|
19
|
+
* - a sentence that places string values is a FUNCTION returning the finished text (plural form chosen
|
|
20
|
+
* first, values placed after);
|
|
21
|
+
* - a sentence that places the document's formatted elements is an {@link ApiReferenceSentence}, filled
|
|
22
|
+
* by the view (`{roles}`, `{field}`, `{type}`, `{parameters}`, `{heading}`, `{address}`);
|
|
23
|
+
* - a list is laid out by {@link ApiReferenceWords.listLayout}, the locale's own list pattern.
|
|
24
|
+
* What the view still writes itself is typographic, not words: the ` · ` between facts and the ` — `
|
|
25
|
+
* between an element and its description, a label word followed by its value (`Format:` then the
|
|
26
|
+
* format), and the `field = value` notation of the errors table.
|
|
27
|
+
*
|
|
28
|
+
* Values that are the document's own (a resource label, a path, a status code, a role key) are passed
|
|
29
|
+
* in as they are.
|
|
30
|
+
*
|
|
31
|
+
* What is NOT here, deliberately: the document's content (labels, descriptions, summaries — authored in
|
|
32
|
+
* the application's specifications), wire identifiers shown as code (`error.type`, a media type), and
|
|
33
|
+
* the names of the three sample languages (cURL, JavaScript, Python), which are product names.
|
|
34
|
+
*/
|
|
35
|
+
export interface ApiReferenceWords {
|
|
36
|
+
readonly openNavigation: string;
|
|
37
|
+
readonly closeNavigation: string;
|
|
38
|
+
readonly apiNavigation: string;
|
|
39
|
+
readonly apiSections: string;
|
|
40
|
+
readonly filterResources: string;
|
|
41
|
+
readonly resourcesNavigation: string;
|
|
42
|
+
readonly overview: string;
|
|
43
|
+
readonly otherResources: string;
|
|
44
|
+
readonly noResourceMatches: (query: string) => string;
|
|
45
|
+
readonly operationsSwitcher: (operationCount: number) => string;
|
|
46
|
+
readonly resourceOperations: (resourceLabel: string) => string;
|
|
47
|
+
readonly filterOperations: (operationCount: number) => string;
|
|
48
|
+
readonly resourceCount: (count: number) => string;
|
|
49
|
+
readonly operationCount: (count: number) => string;
|
|
50
|
+
readonly matchingResources: (count: number) => string;
|
|
51
|
+
readonly apiResources: string;
|
|
52
|
+
readonly referenceSize: string;
|
|
53
|
+
readonly referenceSizeSummary: (operationCount: number, resourceCount: number) => string;
|
|
54
|
+
readonly searchReference: string;
|
|
55
|
+
readonly searchPlaceholder: string;
|
|
56
|
+
readonly clearSearch: string;
|
|
57
|
+
readonly browseResources: (count: number) => string;
|
|
58
|
+
readonly noSearchMatches: string;
|
|
59
|
+
readonly contractEyebrow: string;
|
|
60
|
+
readonly indexLead: string;
|
|
61
|
+
readonly allResources: string;
|
|
62
|
+
readonly resourceNotInDocument: (resourceName: string) => string;
|
|
63
|
+
readonly breadcrumb: string;
|
|
64
|
+
readonly selectResourcePrompt: string;
|
|
65
|
+
readonly apiOverview: string;
|
|
66
|
+
readonly apiConventions: string;
|
|
67
|
+
readonly connectionDetails: string;
|
|
68
|
+
readonly baseUrls: string;
|
|
69
|
+
readonly authenticationMechanisms: string;
|
|
70
|
+
readonly schemeType: string;
|
|
71
|
+
readonly schemeScheme: string;
|
|
72
|
+
readonly schemeFormat: string;
|
|
73
|
+
readonly schemeLocation: string;
|
|
74
|
+
readonly schemeName: string;
|
|
75
|
+
readonly resourceCardMeta: (familyCount: number, variantCount: number) => string;
|
|
76
|
+
readonly lifecycle: string;
|
|
77
|
+
readonly resourceObject: (resourceLabel: string) => string;
|
|
78
|
+
readonly dataRelationships: (count: number) => string;
|
|
79
|
+
/** `{related}` (the related resource, bold) reached through `{field}` (the foreign key, code). */
|
|
80
|
+
readonly relationshipVia: ApiReferenceSentence;
|
|
81
|
+
readonly relationshipSummary: (values: {
|
|
82
|
+
readonly nature: string;
|
|
83
|
+
readonly cardinality: string;
|
|
84
|
+
readonly relatedCardinality: string;
|
|
85
|
+
readonly lifecycleModel: string;
|
|
86
|
+
}) => string;
|
|
87
|
+
readonly parentDeletePolicy: (policy: string) => string;
|
|
88
|
+
readonly parentDeleteDoesNotCascade: string;
|
|
89
|
+
readonly parentDeleteCascade: (values: {
|
|
90
|
+
readonly strategy: string;
|
|
91
|
+
readonly mode: string;
|
|
92
|
+
readonly maxDepth: number;
|
|
93
|
+
}) => string;
|
|
94
|
+
readonly familyVariants: (familyLabel: string) => string;
|
|
95
|
+
readonly copyPathOf: (operationSummary: string) => string;
|
|
96
|
+
readonly access: string;
|
|
97
|
+
readonly requiredRole: string;
|
|
98
|
+
/** `{roles}`: the accepted roles, laid out as a disjunction. */
|
|
99
|
+
readonly requiredRoles: ApiReferenceSentence;
|
|
100
|
+
/** `{label}` (bold) then `{key}` (code): one accepted role. */
|
|
101
|
+
readonly roleWithKey: ApiReferenceSentence;
|
|
102
|
+
readonly authentication: string;
|
|
103
|
+
readonly idempotent: string;
|
|
104
|
+
readonly yes: string;
|
|
105
|
+
readonly no: string;
|
|
106
|
+
readonly roleAuthorityDetails: string;
|
|
107
|
+
readonly boundary: string;
|
|
108
|
+
readonly alsoReachableAt: string;
|
|
109
|
+
/** `{heading}` (the "also reachable at" word, bold) introducing the alias routes. */
|
|
110
|
+
readonly aliasNote: ApiReferenceSentence;
|
|
111
|
+
/** `{address}` (method and path, code) and the `{parameters}` it adds, a conjunction. */
|
|
112
|
+
readonly aliasWithParameters: ApiReferenceSentence;
|
|
113
|
+
readonly requestBody: string;
|
|
114
|
+
readonly required: string;
|
|
115
|
+
readonly optional: string;
|
|
116
|
+
readonly responses: string;
|
|
117
|
+
readonly noResponseContract: string;
|
|
118
|
+
readonly errors: string;
|
|
119
|
+
readonly copy: string;
|
|
120
|
+
readonly copied: string;
|
|
121
|
+
readonly samplesFor: (operationSummary: string) => string;
|
|
122
|
+
readonly requestSample: string;
|
|
123
|
+
readonly request: string;
|
|
124
|
+
readonly language: string;
|
|
125
|
+
readonly copyRequestSample: string;
|
|
126
|
+
readonly server: string;
|
|
127
|
+
readonly responseExample: string;
|
|
128
|
+
readonly response: string;
|
|
129
|
+
readonly responseStatus: string;
|
|
130
|
+
readonly copyResponseExample: string;
|
|
131
|
+
readonly noExampleForStatus: (requestedStatus: string, shownStatus: string) => string;
|
|
132
|
+
readonly noResponseExample: string;
|
|
133
|
+
readonly requestAndResponse: string;
|
|
134
|
+
readonly requestAndResponseFor: (operationSummary: string) => string;
|
|
135
|
+
readonly close: string;
|
|
136
|
+
readonly errorStatus: string;
|
|
137
|
+
readonly errorWhen: string;
|
|
138
|
+
readonly errorBranchOn: string;
|
|
139
|
+
readonly pathParameters: string;
|
|
140
|
+
readonly queryParameters: string;
|
|
141
|
+
readonly headerParameters: string;
|
|
142
|
+
readonly cookieParameters: string;
|
|
143
|
+
readonly otherParameters: string;
|
|
144
|
+
readonly documentedResponses: string;
|
|
145
|
+
readonly noStructuredRepresentation: string;
|
|
146
|
+
readonly bodyFields: string;
|
|
147
|
+
readonly anyValue: string;
|
|
148
|
+
readonly noValue: string;
|
|
149
|
+
readonly unnamedSchema: string;
|
|
150
|
+
readonly format: string;
|
|
151
|
+
readonly defaultValue: string;
|
|
152
|
+
readonly constantValue: string;
|
|
153
|
+
readonly allowedValues: string;
|
|
154
|
+
readonly properties: string;
|
|
155
|
+
/**
|
|
156
|
+
* The button revealing a long list's remaining fields, naming them — or, with `moreRemain`, only the first
|
|
157
|
+
* few, which the message words as a sample ("including a, b and c") rather than as the whole list.
|
|
158
|
+
*/
|
|
159
|
+
readonly showMoreFields: (hiddenCount: number, fieldNames: readonly string[], moreRemain: boolean) => string;
|
|
160
|
+
readonly requiredFieldMarker: (fieldName: string) => string;
|
|
161
|
+
/** `{type}`: what an array's items are. */
|
|
162
|
+
readonly arrayItemsOf: ApiReferenceSentence;
|
|
163
|
+
readonly model: string;
|
|
164
|
+
readonly additionalProperties: string;
|
|
165
|
+
readonly allowed: string;
|
|
166
|
+
readonly notAllowed: string;
|
|
167
|
+
readonly childFieldsOf: (fieldName: string) => string;
|
|
168
|
+
readonly compositionOption: (position: number) => string;
|
|
169
|
+
/** A composition branch named by the value its discriminating property takes in it. */
|
|
170
|
+
readonly discriminatorValue: (field: string, value: string) => string;
|
|
171
|
+
readonly oneOf: string;
|
|
172
|
+
readonly anyOf: string;
|
|
173
|
+
readonly allOf: string;
|
|
174
|
+
readonly compositionShapes: (compositionLabel: string, shapeCount: number) => string;
|
|
175
|
+
readonly reusableDataModels: (count: number) => string;
|
|
176
|
+
readonly selectModelPrompt: string;
|
|
177
|
+
readonly schemaType: string;
|
|
178
|
+
readonly examples: (count: number) => string;
|
|
179
|
+
readonly externalExample: string;
|
|
180
|
+
readonly noInlineExample: string;
|
|
181
|
+
/** Where each of `itemCount` items goes, and what the reader's locale puts between them. */
|
|
182
|
+
readonly listLayout: (itemCount: number, kind: DocumentationListKind) => readonly DocumentationListPart[];
|
|
183
|
+
}
|
|
184
|
+
/** The prefix every API reference word's id carries in the site's `code.json`. */
|
|
185
|
+
export declare const API_REFERENCE_WORD_ID_PREFIX = "docs.apiReference.";
|
|
186
|
+
/**
|
|
187
|
+
* Words that are only ever PART of another word — counts a sentence places — and so are not members of
|
|
188
|
+
* {@link ApiReferenceWords}. Every other id is `docs.apiReference.<member>`.
|
|
189
|
+
*/
|
|
190
|
+
export declare enum ApiReferenceComponentWordId {
|
|
191
|
+
/** `{count} operation families`, placed in a resource card's line. */
|
|
192
|
+
OPERATION_FAMILY_COUNT = "operationFamilyCount",
|
|
193
|
+
/** `{count} variants`, placed in a resource card's line. */
|
|
194
|
+
VARIANT_COUNT = "variantCount",
|
|
195
|
+
/** The "show more fields" button when more fields follow the ones it names. */
|
|
196
|
+
SHOW_MORE_FIELDS_TRUNCATED = "showMoreFieldsTruncated"
|
|
197
|
+
}
|
|
198
|
+
/** Every id the API reference reads from the site's `code.json`, without its prefix. */
|
|
199
|
+
export type ApiReferenceWordId = keyof ApiReferenceWords | ApiReferenceComponentWordId;
|
|
200
|
+
/**
|
|
201
|
+
* The API reference's words, looked up through the site's translator (#1992). Each member reads the
|
|
202
|
+
* id `docs.apiReference.<member>`; a counted one is a `|`-separated plural message with `{count}`.
|
|
203
|
+
*/
|
|
204
|
+
export declare function createApiReferenceWords({ locale, translate, selectPlural }: DocumentationSiteTranslator): ApiReferenceWords;
|
|
205
|
+
//# sourceMappingURL=openapi-reference-words.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi-reference-words.d.ts","sourceRoot":"","sources":["../../../../src/runtime/openapi-reference-words.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EAIrB,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EACjC,MAAM,iCAAiC,CAAC;AAEzC;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAE1C;;;;;;;;;;;;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AsB,yBAAyB;IAC/C,4DAA4D;IAC5D,aAAa,iBAAiB;IAC9B,+EAA+E;IAC/E,0BAA0B,4BAA4B;CACvD;AAED,wFAAwF;AACxF,MAAM,MAAM,kBAAkB,GAAG,MAAM,iBAAiB,GAAG,2BAA2B,CAAC;AAEvF;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,2BAA2B,GAAG,iBAAiB,CAkJ3H"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { DocumentationListKind, documentationListLayout, fillMessage, isDocumentationListItem, } from './documentation-site-translator.js';
|
|
2
|
+
/** The prefix every API reference word's id carries in the site's `code.json`. */
|
|
3
|
+
export const API_REFERENCE_WORD_ID_PREFIX = 'docs.apiReference.';
|
|
4
|
+
/**
|
|
5
|
+
* Words that are only ever PART of another word — counts a sentence places — and so are not members of
|
|
6
|
+
* {@link ApiReferenceWords}. Every other id is `docs.apiReference.<member>`.
|
|
7
|
+
*/
|
|
8
|
+
export var ApiReferenceComponentWordId;
|
|
9
|
+
(function (ApiReferenceComponentWordId) {
|
|
10
|
+
/** `{count} operation families`, placed in a resource card's line. */
|
|
11
|
+
ApiReferenceComponentWordId["OPERATION_FAMILY_COUNT"] = "operationFamilyCount";
|
|
12
|
+
/** `{count} variants`, placed in a resource card's line. */
|
|
13
|
+
ApiReferenceComponentWordId["VARIANT_COUNT"] = "variantCount";
|
|
14
|
+
/** The "show more fields" button when more fields follow the ones it names. */
|
|
15
|
+
ApiReferenceComponentWordId["SHOW_MORE_FIELDS_TRUNCATED"] = "showMoreFieldsTruncated";
|
|
16
|
+
})(ApiReferenceComponentWordId || (ApiReferenceComponentWordId = {}));
|
|
17
|
+
/**
|
|
18
|
+
* The API reference's words, looked up through the site's translator (#1992). Each member reads the
|
|
19
|
+
* id `docs.apiReference.<member>`; a counted one is a `|`-separated plural message with `{count}`.
|
|
20
|
+
*/
|
|
21
|
+
export function createApiReferenceWords({ locale, translate, selectPlural }) {
|
|
22
|
+
const message = (id) => translate(`${API_REFERENCE_WORD_ID_PREFIX}${id}`);
|
|
23
|
+
const word = (id, values = {}) => fillMessage(message(id), values);
|
|
24
|
+
// The plural form is chosen on the message as written, then the values are placed.
|
|
25
|
+
const counted = (id, count, values = {}) => fillMessage(selectPlural(count, message(id)), { count: String(count), ...values });
|
|
26
|
+
const listOf = (items, kind) => documentationListLayout(locale, items.length, kind).map((part) => (isDocumentationListItem(part) ? items[part.item] : part.separator)).join('');
|
|
27
|
+
return {
|
|
28
|
+
openNavigation: word('openNavigation'),
|
|
29
|
+
closeNavigation: word('closeNavigation'),
|
|
30
|
+
apiNavigation: word('apiNavigation'),
|
|
31
|
+
apiSections: word('apiSections'),
|
|
32
|
+
filterResources: word('filterResources'),
|
|
33
|
+
resourcesNavigation: word('resourcesNavigation'),
|
|
34
|
+
overview: word('overview'),
|
|
35
|
+
otherResources: word('otherResources'),
|
|
36
|
+
noResourceMatches: (query) => word('noResourceMatches', { query }),
|
|
37
|
+
operationsSwitcher: (operationCount) => counted('operationsSwitcher', operationCount),
|
|
38
|
+
resourceOperations: (resourceLabel) => word('resourceOperations', { resource: resourceLabel }),
|
|
39
|
+
filterOperations: (operationCount) => counted('filterOperations', operationCount),
|
|
40
|
+
resourceCount: (count) => counted('resourceCount', count),
|
|
41
|
+
operationCount: (count) => counted('operationCount', count),
|
|
42
|
+
matchingResources: (count) => counted('matchingResources', count),
|
|
43
|
+
apiResources: word('apiResources'),
|
|
44
|
+
referenceSize: word('referenceSize'),
|
|
45
|
+
referenceSizeSummary: (operationCount, resourceCount) => word('referenceSizeSummary', {
|
|
46
|
+
operations: counted('operationCount', operationCount),
|
|
47
|
+
resources: counted('resourceCount', resourceCount),
|
|
48
|
+
}),
|
|
49
|
+
searchReference: word('searchReference'),
|
|
50
|
+
searchPlaceholder: word('searchPlaceholder'),
|
|
51
|
+
clearSearch: word('clearSearch'),
|
|
52
|
+
browseResources: (count) => counted('browseResources', count),
|
|
53
|
+
noSearchMatches: word('noSearchMatches'),
|
|
54
|
+
contractEyebrow: word('contractEyebrow'),
|
|
55
|
+
indexLead: word('indexLead'),
|
|
56
|
+
allResources: word('allResources'),
|
|
57
|
+
resourceNotInDocument: (resourceName) => word('resourceNotInDocument', { resource: resourceName }),
|
|
58
|
+
breadcrumb: word('breadcrumb'),
|
|
59
|
+
selectResourcePrompt: word('selectResourcePrompt'),
|
|
60
|
+
apiOverview: word('apiOverview'),
|
|
61
|
+
apiConventions: word('apiConventions'),
|
|
62
|
+
connectionDetails: word('connectionDetails'),
|
|
63
|
+
baseUrls: word('baseUrls'),
|
|
64
|
+
authenticationMechanisms: word('authenticationMechanisms'),
|
|
65
|
+
schemeType: word('schemeType'),
|
|
66
|
+
schemeScheme: word('schemeScheme'),
|
|
67
|
+
schemeFormat: word('schemeFormat'),
|
|
68
|
+
schemeLocation: word('schemeLocation'),
|
|
69
|
+
schemeName: word('schemeName'),
|
|
70
|
+
resourceCardMeta: (familyCount, variantCount) => word('resourceCardMeta', {
|
|
71
|
+
families: counted(ApiReferenceComponentWordId.OPERATION_FAMILY_COUNT, familyCount),
|
|
72
|
+
variants: counted(ApiReferenceComponentWordId.VARIANT_COUNT, variantCount),
|
|
73
|
+
}),
|
|
74
|
+
lifecycle: word('lifecycle'),
|
|
75
|
+
resourceObject: (resourceLabel) => word('resourceObject', { resource: resourceLabel }),
|
|
76
|
+
dataRelationships: (count) => counted('dataRelationships', count),
|
|
77
|
+
relationshipVia: message('relationshipVia'),
|
|
78
|
+
relationshipSummary: ({ nature, cardinality, relatedCardinality, lifecycleModel }) => word('relationshipSummary', { nature, cardinality, relatedCardinality, lifecycleModel }),
|
|
79
|
+
parentDeletePolicy: (policy) => word('parentDeletePolicy', { policy }),
|
|
80
|
+
parentDeleteDoesNotCascade: word('parentDeleteDoesNotCascade'),
|
|
81
|
+
parentDeleteCascade: ({ strategy, mode, maxDepth }) => word('parentDeleteCascade', { strategy, mode, maxDepth: String(maxDepth) }),
|
|
82
|
+
familyVariants: (familyLabel) => word('familyVariants', { family: familyLabel }),
|
|
83
|
+
copyPathOf: (operationSummary) => word('copyPathOf', { operation: operationSummary }),
|
|
84
|
+
access: word('access'),
|
|
85
|
+
requiredRole: word('requiredRole'),
|
|
86
|
+
requiredRoles: message('requiredRoles'),
|
|
87
|
+
roleWithKey: message('roleWithKey'),
|
|
88
|
+
authentication: word('authentication'),
|
|
89
|
+
idempotent: word('idempotent'),
|
|
90
|
+
yes: word('yes'),
|
|
91
|
+
no: word('no'),
|
|
92
|
+
roleAuthorityDetails: word('roleAuthorityDetails'),
|
|
93
|
+
boundary: word('boundary'),
|
|
94
|
+
alsoReachableAt: word('alsoReachableAt'),
|
|
95
|
+
aliasNote: message('aliasNote'),
|
|
96
|
+
aliasWithParameters: message('aliasWithParameters'),
|
|
97
|
+
requestBody: word('requestBody'),
|
|
98
|
+
required: word('required'),
|
|
99
|
+
optional: word('optional'),
|
|
100
|
+
responses: word('responses'),
|
|
101
|
+
noResponseContract: word('noResponseContract'),
|
|
102
|
+
errors: word('errors'),
|
|
103
|
+
copy: word('copy'),
|
|
104
|
+
copied: word('copied'),
|
|
105
|
+
samplesFor: (operationSummary) => word('samplesFor', { operation: operationSummary }),
|
|
106
|
+
requestSample: word('requestSample'),
|
|
107
|
+
request: word('request'),
|
|
108
|
+
language: word('language'),
|
|
109
|
+
copyRequestSample: word('copyRequestSample'),
|
|
110
|
+
server: word('server'),
|
|
111
|
+
responseExample: word('responseExample'),
|
|
112
|
+
response: word('response'),
|
|
113
|
+
responseStatus: word('responseStatus'),
|
|
114
|
+
copyResponseExample: word('copyResponseExample'),
|
|
115
|
+
noExampleForStatus: (requestedStatus, shownStatus) => word('noExampleForStatus', { requested: requestedStatus, shown: shownStatus }),
|
|
116
|
+
noResponseExample: word('noResponseExample'),
|
|
117
|
+
requestAndResponse: word('requestAndResponse'),
|
|
118
|
+
requestAndResponseFor: (operationSummary) => word('requestAndResponseFor', { operation: operationSummary }),
|
|
119
|
+
close: word('close'),
|
|
120
|
+
errorStatus: word('errorStatus'),
|
|
121
|
+
errorWhen: word('errorWhen'),
|
|
122
|
+
errorBranchOn: word('errorBranchOn'),
|
|
123
|
+
pathParameters: word('pathParameters'),
|
|
124
|
+
queryParameters: word('queryParameters'),
|
|
125
|
+
headerParameters: word('headerParameters'),
|
|
126
|
+
cookieParameters: word('cookieParameters'),
|
|
127
|
+
otherParameters: word('otherParameters'),
|
|
128
|
+
documentedResponses: word('documentedResponses'),
|
|
129
|
+
noStructuredRepresentation: word('noStructuredRepresentation'),
|
|
130
|
+
bodyFields: word('bodyFields'),
|
|
131
|
+
anyValue: word('anyValue'),
|
|
132
|
+
noValue: word('noValue'),
|
|
133
|
+
unnamedSchema: word('unnamedSchema'),
|
|
134
|
+
format: word('format'),
|
|
135
|
+
defaultValue: word('defaultValue'),
|
|
136
|
+
constantValue: word('constantValue'),
|
|
137
|
+
allowedValues: word('allowedValues'),
|
|
138
|
+
properties: word('properties'),
|
|
139
|
+
showMoreFields: (hiddenCount, fieldNames, moreRemain) => counted(moreRemain ? ApiReferenceComponentWordId.SHOW_MORE_FIELDS_TRUNCATED : 'showMoreFields', hiddenCount, { fields: listOf(fieldNames, DocumentationListKind.CONJUNCTION) }),
|
|
140
|
+
requiredFieldMarker: (fieldName) => word('requiredFieldMarker', { field: fieldName }),
|
|
141
|
+
arrayItemsOf: message('arrayItemsOf'),
|
|
142
|
+
model: word('model'),
|
|
143
|
+
additionalProperties: word('additionalProperties'),
|
|
144
|
+
allowed: word('allowed'),
|
|
145
|
+
notAllowed: word('notAllowed'),
|
|
146
|
+
childFieldsOf: (fieldName) => word('childFieldsOf', { field: fieldName }),
|
|
147
|
+
compositionOption: (position) => word('compositionOption', { position: String(position) }),
|
|
148
|
+
discriminatorValue: (field, value) => word('discriminatorValue', { field, value }),
|
|
149
|
+
oneOf: word('oneOf'),
|
|
150
|
+
anyOf: word('anyOf'),
|
|
151
|
+
allOf: word('allOf'),
|
|
152
|
+
compositionShapes: (compositionLabel, shapeCount) => counted('compositionShapes', shapeCount, { composition: compositionLabel }),
|
|
153
|
+
reusableDataModels: (count) => counted('reusableDataModels', count),
|
|
154
|
+
selectModelPrompt: word('selectModelPrompt'),
|
|
155
|
+
schemaType: word('schemaType'),
|
|
156
|
+
examples: (count) => counted('examples', count),
|
|
157
|
+
externalExample: word('externalExample'),
|
|
158
|
+
noInlineExample: word('noInlineExample'),
|
|
159
|
+
listLayout: (itemCount, kind) => documentationListLayout(locale, itemCount, kind),
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
//# sourceMappingURL=openapi-reference-words.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi-reference-words.js","sourceRoot":"","sources":["../../../../src/runtime/openapi-reference-words.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,WAAW,EACX,uBAAuB,GAGxB,MAAM,iCAAiC,CAAC;AAwMzC,kFAAkF;AAClF,MAAM,CAAC,MAAM,4BAA4B,GAAG,oBAAoB,CAAC;AAEjE;;;GAGG;AACH,MAAM,CAAN,IAAY,2BAOX;AAPD,WAAY,2BAA2B;IACrC,sEAAsE;IACtE,8EAA+C,CAAA;IAC/C,4DAA4D;IAC5D,6DAA8B,CAAA;IAC9B,+EAA+E;IAC/E,qFAAsD,CAAA;AACxD,CAAC,EAPW,2BAA2B,KAA3B,2BAA2B,QAOtC;AAKD;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAA+B;IACtG,MAAM,OAAO,GAAG,CAAC,EAAsB,EAAU,EAAE,CAAC,SAAS,CAAC,GAAG,4BAA4B,GAAG,EAAE,EAAE,CAAC,CAAC;IACtG,MAAM,IAAI,GAAG,CAAC,EAAsB,EAAE,SAA2C,EAAE,EAAU,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;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KAClF,CAAC;AACJ,CAAC","sourcesContent":["import {\n DocumentationListKind,\n documentationListLayout,\n fillMessage,\n isDocumentationListItem,\n type DocumentationListPart,\n type DocumentationSiteTranslator,\n} from './documentation-site-translator';\n\n/**\n * A message whose `{name}` placeholders the VIEW fills with the document's own elements — a role's\n * label in bold, a field name in code — so the sentence's word order is the locale's while its values\n * keep their formatting. Rendered by `renderSentence` in the view.\n */\nexport type ApiReferenceSentence = string;\n\n/**\n * Every word the API reference shows a reader (#1992).\n *\n * The documentation runtime has no label pack of its own, and the reference used to carry its chrome as\n * English written into the components — \"Filter resources\", \"Required role\", \"Any one of\", \"Copy\". The\n * site now passes them in, worded with Docusaurus `translate({ id })` from its `i18n/<locale>/code.json`\n * (the scaffold's `src/components/documentation-site-words.ts`), as the site's search page words itself\n * (#1964) and as `DocsProviderComponent` takes its states. The type is the contract: a site that omits a\n * word does not compile, and a word its locale lacks shows its id rather than English.\n *\n * How the view builds text out of these, so no sentence is assembled from fragments:\n * - a sentence that places string values is a FUNCTION returning the finished text (plural form chosen\n * first, values placed after);\n * - a sentence that places the document's formatted elements is an {@link ApiReferenceSentence}, filled\n * by the view (`{roles}`, `{field}`, `{type}`, `{parameters}`, `{heading}`, `{address}`);\n * - a list is laid out by {@link ApiReferenceWords.listLayout}, the locale's own list pattern.\n * What the view still writes itself is typographic, not words: the ` · ` between facts and the ` — `\n * between an element and its description, a label word followed by its value (`Format:` then the\n * format), and the `field = value` notation of the errors table.\n *\n * Values that are the document's own (a resource label, a path, a status code, a role key) are passed\n * in as they are.\n *\n * What is NOT here, deliberately: the document's content (labels, descriptions, summaries — authored in\n * the application's specifications), wire identifiers shown as code (`error.type`, a media type), and\n * the names of the three sample languages (cURL, JavaScript, Python), which are product names.\n */\nexport interface ApiReferenceWords {\n /* The shell: rail, drawer and sub-bar. */\n readonly openNavigation: string;\n readonly closeNavigation: string;\n readonly apiNavigation: string;\n readonly apiSections: string;\n readonly filterResources: string;\n readonly resourcesNavigation: string;\n readonly overview: string;\n readonly otherResources: string;\n readonly noResourceMatches: (query: string) => string;\n readonly operationsSwitcher: (operationCount: number) => string;\n readonly resourceOperations: (resourceLabel: string) => string;\n readonly filterOperations: (operationCount: number) => string;\n\n /* Counts, shared by the rail, the index and the search status. */\n readonly resourceCount: (count: number) => string;\n readonly operationCount: (count: number) => string;\n readonly matchingResources: (count: number) => string;\n\n /* The index: overview, connection, search, category grid. */\n readonly apiResources: string;\n readonly referenceSize: string;\n readonly referenceSizeSummary: (operationCount: number, resourceCount: number) => string;\n readonly searchReference: string;\n readonly searchPlaceholder: string;\n readonly clearSearch: string;\n readonly browseResources: (count: number) => string;\n readonly noSearchMatches: string;\n readonly contractEyebrow: string;\n readonly indexLead: string;\n readonly allResources: string;\n readonly resourceNotInDocument: (resourceName: string) => string;\n readonly breadcrumb: string;\n readonly selectResourcePrompt: string;\n readonly apiOverview: string;\n readonly apiConventions: string;\n readonly connectionDetails: string;\n readonly baseUrls: string;\n readonly authenticationMechanisms: string;\n readonly schemeType: string;\n readonly schemeScheme: string;\n readonly schemeFormat: string;\n readonly schemeLocation: string;\n readonly schemeName: string;\n readonly resourceCardMeta: (familyCount: number, variantCount: number) => string;\n\n /* A resource's introduction. */\n readonly lifecycle: string;\n readonly resourceObject: (resourceLabel: string) => string;\n readonly dataRelationships: (count: number) => string;\n /** `{related}` (the related resource, bold) reached through `{field}` (the foreign key, code). */\n readonly relationshipVia: ApiReferenceSentence;\n readonly relationshipSummary: (values: {\n readonly nature: string;\n readonly cardinality: string;\n readonly relatedCardinality: string;\n readonly lifecycleModel: string;\n }) => string;\n readonly parentDeletePolicy: (policy: string) => string;\n readonly parentDeleteDoesNotCascade: string;\n readonly parentDeleteCascade: (values: { readonly strategy: string; readonly mode: string; readonly maxDepth: number }) => string;\n\n /* An operation. */\n readonly familyVariants: (familyLabel: string) => string;\n readonly copyPathOf: (operationSummary: string) => string;\n readonly access: string;\n readonly requiredRole: string;\n /** `{roles}`: the accepted roles, laid out as a disjunction. */\n readonly requiredRoles: ApiReferenceSentence;\n /** `{label}` (bold) then `{key}` (code): one accepted role. */\n readonly roleWithKey: ApiReferenceSentence;\n readonly authentication: string;\n readonly idempotent: string;\n readonly yes: string;\n readonly no: string;\n readonly roleAuthorityDetails: string;\n readonly boundary: string;\n readonly alsoReachableAt: string;\n /** `{heading}` (the \"also reachable at\" word, bold) introducing the alias routes. */\n readonly aliasNote: ApiReferenceSentence;\n /** `{address}` (method and path, code) and the `{parameters}` it adds, a conjunction. */\n readonly aliasWithParameters: ApiReferenceSentence;\n readonly requestBody: string;\n readonly required: string;\n readonly optional: string;\n readonly responses: string;\n readonly noResponseContract: string;\n readonly errors: string;\n readonly copy: string;\n readonly copied: string;\n\n /* Samples. */\n readonly samplesFor: (operationSummary: string) => string;\n readonly requestSample: string;\n readonly request: string;\n readonly language: string;\n readonly copyRequestSample: string;\n readonly server: string;\n readonly responseExample: string;\n readonly response: string;\n readonly responseStatus: string;\n readonly copyResponseExample: string;\n readonly noExampleForStatus: (requestedStatus: string, shownStatus: string) => string;\n readonly noResponseExample: string;\n readonly requestAndResponse: string;\n readonly requestAndResponseFor: (operationSummary: string) => string;\n readonly close: string;\n\n /* Errors table. */\n readonly errorStatus: string;\n readonly errorWhen: string;\n readonly errorBranchOn: string;\n\n /* Parameters and bodies. */\n readonly pathParameters: string;\n readonly queryParameters: string;\n readonly headerParameters: string;\n readonly cookieParameters: string;\n readonly otherParameters: string;\n readonly documentedResponses: string;\n readonly noStructuredRepresentation: string;\n readonly bodyFields: string;\n\n /* Schemas. */\n readonly anyValue: string;\n readonly noValue: string;\n readonly unnamedSchema: string;\n readonly format: string;\n readonly defaultValue: string;\n readonly constantValue: string;\n readonly allowedValues: string;\n readonly properties: string;\n /**\n * The button revealing a long list's remaining fields, naming them — or, with `moreRemain`, only the first\n * few, which the message words as a sample (\"including a, b and c\") rather than as the whole list.\n */\n readonly showMoreFields: (hiddenCount: number, fieldNames: readonly string[], moreRemain: boolean) => string;\n readonly requiredFieldMarker: (fieldName: string) => string;\n /** `{type}`: what an array's items are. */\n readonly arrayItemsOf: ApiReferenceSentence;\n readonly model: string;\n readonly additionalProperties: string;\n readonly allowed: string;\n readonly notAllowed: string;\n readonly childFieldsOf: (fieldName: string) => string;\n readonly compositionOption: (position: number) => string;\n /** A composition branch named by the value its discriminating property takes in it. */\n readonly discriminatorValue: (field: string, value: string) => string;\n readonly oneOf: string;\n readonly anyOf: string;\n readonly allOf: string;\n readonly compositionShapes: (compositionLabel: string, shapeCount: number) => string;\n readonly reusableDataModels: (count: number) => string;\n readonly selectModelPrompt: string;\n readonly schemaType: string;\n readonly examples: (count: number) => string;\n readonly externalExample: string;\n readonly noInlineExample: string;\n\n /** Where each of `itemCount` items goes, and what the reader's locale puts between them. */\n readonly listLayout: (itemCount: number, kind: DocumentationListKind) => readonly DocumentationListPart[];\n}\n\n/** The prefix every API reference word's id carries in the site's `code.json`. */\nexport const API_REFERENCE_WORD_ID_PREFIX = 'docs.apiReference.';\n\n/**\n * Words that are only ever PART of another word — counts a sentence places — and so are not members of\n * {@link ApiReferenceWords}. Every other id is `docs.apiReference.<member>`.\n */\nexport enum ApiReferenceComponentWordId {\n /** `{count} operation families`, placed in a resource card's line. */\n OPERATION_FAMILY_COUNT = 'operationFamilyCount',\n /** `{count} variants`, placed in a resource card's line. */\n VARIANT_COUNT = 'variantCount',\n /** The \"show more fields\" button when more fields follow the ones it names. */\n SHOW_MORE_FIELDS_TRUNCATED = 'showMoreFieldsTruncated',\n}\n\n/** Every id the API reference reads from the site's `code.json`, without its prefix. */\nexport type ApiReferenceWordId = keyof ApiReferenceWords | ApiReferenceComponentWordId;\n\n/**\n * The API reference's words, looked up through the site's translator (#1992). Each member reads the\n * id `docs.apiReference.<member>`; a counted one is a `|`-separated plural message with `{count}`.\n */\nexport function createApiReferenceWords({ locale, translate, selectPlural }: DocumentationSiteTranslator): ApiReferenceWords {\n const message = (id: ApiReferenceWordId): string => translate(`${API_REFERENCE_WORD_ID_PREFIX}${id}`);\n const word = (id: ApiReferenceWordId, values: Readonly<Record<string, string>> = {}): string => fillMessage(message(id), values);\n // The plural form is chosen on the message as written, then the values are placed.\n const counted = (id: ApiReferenceWordId, count: number, values: Readonly<Record<string, string>> = {}): string =>\n fillMessage(selectPlural(count, message(id)), { count: String(count), ...values });\n const listOf = (items: readonly string[], kind: DocumentationListKind): string =>\n documentationListLayout(locale, items.length, kind).map((part) => (isDocumentationListItem(part) ? items[part.item] : part.separator)).join('');\n return {\n openNavigation: word('openNavigation'),\n closeNavigation: word('closeNavigation'),\n apiNavigation: word('apiNavigation'),\n apiSections: word('apiSections'),\n filterResources: word('filterResources'),\n resourcesNavigation: word('resourcesNavigation'),\n overview: word('overview'),\n otherResources: word('otherResources'),\n noResourceMatches: (query) => word('noResourceMatches', { query }),\n operationsSwitcher: (operationCount) => counted('operationsSwitcher', operationCount),\n resourceOperations: (resourceLabel) => word('resourceOperations', { resource: resourceLabel }),\n filterOperations: (operationCount) => counted('filterOperations', operationCount),\n resourceCount: (count) => counted('resourceCount', count),\n operationCount: (count) => counted('operationCount', count),\n matchingResources: (count) => counted('matchingResources', count),\n apiResources: word('apiResources'),\n referenceSize: word('referenceSize'),\n referenceSizeSummary: (operationCount, resourceCount) => word('referenceSizeSummary', {\n operations: counted('operationCount', operationCount),\n resources: counted('resourceCount', resourceCount),\n }),\n searchReference: word('searchReference'),\n searchPlaceholder: word('searchPlaceholder'),\n clearSearch: word('clearSearch'),\n browseResources: (count) => counted('browseResources', count),\n noSearchMatches: word('noSearchMatches'),\n contractEyebrow: word('contractEyebrow'),\n indexLead: word('indexLead'),\n allResources: word('allResources'),\n resourceNotInDocument: (resourceName) => word('resourceNotInDocument', { resource: resourceName }),\n breadcrumb: word('breadcrumb'),\n selectResourcePrompt: word('selectResourcePrompt'),\n apiOverview: word('apiOverview'),\n apiConventions: word('apiConventions'),\n connectionDetails: word('connectionDetails'),\n baseUrls: word('baseUrls'),\n authenticationMechanisms: word('authenticationMechanisms'),\n schemeType: word('schemeType'),\n schemeScheme: word('schemeScheme'),\n schemeFormat: word('schemeFormat'),\n schemeLocation: word('schemeLocation'),\n schemeName: word('schemeName'),\n resourceCardMeta: (familyCount, variantCount) => word('resourceCardMeta', {\n families: counted(ApiReferenceComponentWordId.OPERATION_FAMILY_COUNT, familyCount),\n variants: counted(ApiReferenceComponentWordId.VARIANT_COUNT, variantCount),\n }),\n lifecycle: word('lifecycle'),\n resourceObject: (resourceLabel) => word('resourceObject', { resource: resourceLabel }),\n dataRelationships: (count) => counted('dataRelationships', count),\n relationshipVia: message('relationshipVia'),\n relationshipSummary: ({ nature, cardinality, relatedCardinality, lifecycleModel }) => word('relationshipSummary', { nature, cardinality, relatedCardinality, lifecycleModel }),\n parentDeletePolicy: (policy) => word('parentDeletePolicy', { policy }),\n parentDeleteDoesNotCascade: word('parentDeleteDoesNotCascade'),\n parentDeleteCascade: ({ strategy, mode, maxDepth }) => word('parentDeleteCascade', { strategy, mode, maxDepth: String(maxDepth) }),\n familyVariants: (familyLabel) => word('familyVariants', { family: familyLabel }),\n copyPathOf: (operationSummary) => word('copyPathOf', { operation: operationSummary }),\n access: word('access'),\n requiredRole: word('requiredRole'),\n requiredRoles: message('requiredRoles'),\n roleWithKey: message('roleWithKey'),\n authentication: word('authentication'),\n idempotent: word('idempotent'),\n yes: word('yes'),\n no: word('no'),\n roleAuthorityDetails: word('roleAuthorityDetails'),\n boundary: word('boundary'),\n alsoReachableAt: word('alsoReachableAt'),\n aliasNote: message('aliasNote'),\n aliasWithParameters: message('aliasWithParameters'),\n requestBody: word('requestBody'),\n required: word('required'),\n optional: word('optional'),\n responses: word('responses'),\n noResponseContract: word('noResponseContract'),\n errors: word('errors'),\n copy: word('copy'),\n copied: word('copied'),\n samplesFor: (operationSummary) => word('samplesFor', { operation: operationSummary }),\n requestSample: word('requestSample'),\n request: word('request'),\n language: word('language'),\n copyRequestSample: word('copyRequestSample'),\n server: word('server'),\n responseExample: word('responseExample'),\n response: word('response'),\n responseStatus: word('responseStatus'),\n copyResponseExample: word('copyResponseExample'),\n noExampleForStatus: (requestedStatus, shownStatus) => word('noExampleForStatus', { requested: requestedStatus, shown: shownStatus }),\n noResponseExample: word('noResponseExample'),\n requestAndResponse: word('requestAndResponse'),\n requestAndResponseFor: (operationSummary) => word('requestAndResponseFor', { operation: operationSummary }),\n close: word('close'),\n errorStatus: word('errorStatus'),\n errorWhen: word('errorWhen'),\n errorBranchOn: word('errorBranchOn'),\n pathParameters: word('pathParameters'),\n queryParameters: word('queryParameters'),\n headerParameters: word('headerParameters'),\n cookieParameters: word('cookieParameters'),\n otherParameters: word('otherParameters'),\n documentedResponses: word('documentedResponses'),\n noStructuredRepresentation: word('noStructuredRepresentation'),\n bodyFields: word('bodyFields'),\n anyValue: word('anyValue'),\n noValue: word('noValue'),\n unnamedSchema: word('unnamedSchema'),\n format: word('format'),\n defaultValue: word('defaultValue'),\n constantValue: word('constantValue'),\n allowedValues: word('allowedValues'),\n properties: word('properties'),\n showMoreFields: (hiddenCount, fieldNames, moreRemain) => counted(\n moreRemain ? ApiReferenceComponentWordId.SHOW_MORE_FIELDS_TRUNCATED : 'showMoreFields',\n hiddenCount,\n { fields: listOf(fieldNames, DocumentationListKind.CONJUNCTION) },\n ),\n requiredFieldMarker: (fieldName) => word('requiredFieldMarker', { field: fieldName }),\n arrayItemsOf: message('arrayItemsOf'),\n model: word('model'),\n additionalProperties: word('additionalProperties'),\n allowed: word('allowed'),\n notAllowed: word('notAllowed'),\n childFieldsOf: (fieldName) => word('childFieldsOf', { field: fieldName }),\n compositionOption: (position) => word('compositionOption', { position: String(position) }),\n discriminatorValue: (field, value) => word('discriminatorValue', { field, value }),\n oneOf: word('oneOf'),\n anyOf: word('anyOf'),\n allOf: word('allOf'),\n compositionShapes: (compositionLabel, shapeCount) => counted('compositionShapes', shapeCount, { composition: compositionLabel }),\n reusableDataModels: (count) => counted('reusableDataModels', count),\n selectModelPrompt: word('selectModelPrompt'),\n schemaType: word('schemaType'),\n examples: (count) => counted('examples', count),\n externalExample: word('externalExample'),\n noInlineExample: word('noInlineExample'),\n listLayout: (itemCount, kind) => documentationListLayout(locale, itemCount, kind),\n };\n}\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The documentation site's provider-component registry (#1703): the SAME registry the application and
|
|
3
|
+
* the website build, from the SAME `components` declaration, over the docs site's live provider
|
|
4
|
+
* modules.
|
|
5
|
+
*
|
|
6
|
+
* The techdoc facet type accepted `components` and nothing here read it. The registry is
|
|
7
|
+
* `createProviderComponentRegistry` from `@wildo-ai/external-connectors-public/techdoc` — keyed
|
|
8
|
+
* `capability:providerRef`, consent-gated, script-before-component and browser-only — and this file
|
|
9
|
+
* only feeds it the documentation site's inputs: the hydrated techdoc provider registry, and the loaders
|
|
10
|
+
* the site contributes for components an engine provider module declares but cannot import (passed to
|
|
11
|
+
* `DocsFrontendProviders` as `providerComponentLoaders`).
|
|
12
|
+
*
|
|
13
|
+
* Nothing is loaded here. Docusaurus prerenders every page at build time, and a component loads only
|
|
14
|
+
* when a `DocsProviderComponent` asks for it from an effect, which never runs during that prerender.
|
|
15
|
+
*/
|
|
16
|
+
import type { ComponentType } from 'react';
|
|
17
|
+
import { type ProviderComponentDiagnostic, type ProviderComponentLoaderContribution, type ProviderComponentRegistry } from '@wildo-ai/external-connectors-public/techdoc';
|
|
18
|
+
import type { FrontendTechdocProviderRegistry } from './frontend-provider-registry.techdoc';
|
|
19
|
+
/** A component type the documentation site's registry hands back once loaded. */
|
|
20
|
+
export type DocsProviderComponentType = ComponentType<never>;
|
|
21
|
+
/** The documentation site's provider-component registry: the shared registry, holding React components. */
|
|
22
|
+
export type DocsProviderComponentRegistry = ProviderComponentRegistry<DocsProviderComponentType>;
|
|
23
|
+
export interface CreateDocsProviderComponentRegistryInput {
|
|
24
|
+
readonly providerRegistry: FrontendTechdocProviderRegistry | undefined;
|
|
25
|
+
readonly providerComponentLoaders?: Iterable<ProviderComponentLoaderContribution>;
|
|
26
|
+
/** Defaults to `console.warn`: the docs runtime has no logger, and a component that cannot be offered must not be silent. */
|
|
27
|
+
readonly onDiagnostic?: (diagnostic: ProviderComponentDiagnostic) => void;
|
|
28
|
+
}
|
|
29
|
+
/** Builds the documentation site's provider-component registry from its live provider modules. */
|
|
30
|
+
export declare function createDocsProviderComponentRegistry(input: CreateDocsProviderComponentRegistryInput): DocsProviderComponentRegistry;
|
|
31
|
+
//# sourceMappingURL=provider-component-registry.techdoc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-component-registry.techdoc.d.ts","sourceRoot":"","sources":["../../../../src/runtime/provider-component-registry.techdoc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAIL,KAAK,2BAA2B,EAChC,KAAK,mCAAmC,EACxC,KAAK,yBAAyB,EAC/B,MAAM,8CAA8C,CAAC;AAEtD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAE5F,iFAAiF;AACjF,MAAM,MAAM,yBAAyB,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;AAE7D,2GAA2G;AAC3G,MAAM,MAAM,6BAA6B,GAAG,yBAAyB,CAAC,yBAAyB,CAAC,CAAC;AAEjG,MAAM,WAAW,wCAAwC;IACvD,QAAQ,CAAC,gBAAgB,EAAE,+BAA+B,GAAG,SAAS,CAAC;IACvE,QAAQ,CAAC,wBAAwB,CAAC,EAAE,QAAQ,CAAC,mCAAmC,CAAC,CAAC;IAClF,6HAA6H;IAC7H,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,2BAA2B,KAAK,IAAI,CAAC;CAC3E;AAWD,kGAAkG;AAClG,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,wCAAwC,GAC9C,6BAA6B,CAO/B"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The documentation site's provider-component registry (#1703): the SAME registry the application and
|
|
3
|
+
* the website build, from the SAME `components` declaration, over the docs site's live provider
|
|
4
|
+
* modules.
|
|
5
|
+
*
|
|
6
|
+
* The techdoc facet type accepted `components` and nothing here read it. The registry is
|
|
7
|
+
* `createProviderComponentRegistry` from `@wildo-ai/external-connectors-public/techdoc` — keyed
|
|
8
|
+
* `capability:providerRef`, consent-gated, script-before-component and browser-only — and this file
|
|
9
|
+
* only feeds it the documentation site's inputs: the hydrated techdoc provider registry, and the loaders
|
|
10
|
+
* the site contributes for components an engine provider module declares but cannot import (passed to
|
|
11
|
+
* `DocsFrontendProviders` as `providerComponentLoaders`).
|
|
12
|
+
*
|
|
13
|
+
* Nothing is loaded here. Docusaurus prerenders every page at build time, and a component loads only
|
|
14
|
+
* when a `DocsProviderComponent` asks for it from an effect, which never runs during that prerender.
|
|
15
|
+
*/
|
|
16
|
+
import { collectProviderComponentRegistrations, createProviderComponentRegistry, indexProviderComponentLoaderContributions, } from '@wildo-ai/external-connectors-public/techdoc';
|
|
17
|
+
function warnProviderComponentDiagnostic(diagnostic) {
|
|
18
|
+
// Reported in the BROWSER only. The registry is built during the server render or prerender too, once per
|
|
19
|
+
// page, and a declaration nothing can load would otherwise fill the build log with one warning per page
|
|
20
|
+
// for a fact the first page already stated. The browser is where somebody can see and act on it.
|
|
21
|
+
if (typeof document === 'undefined')
|
|
22
|
+
return;
|
|
23
|
+
// eslint-disable-next-line no-console
|
|
24
|
+
console.warn(`[wildo-provider-component] ${diagnostic.kind}: ${diagnostic.message}`);
|
|
25
|
+
}
|
|
26
|
+
/** Builds the documentation site's provider-component registry from its live provider modules. */
|
|
27
|
+
export function createDocsProviderComponentRegistry(input) {
|
|
28
|
+
const onDiagnostic = input.onDiagnostic ?? warnProviderComponentDiagnostic;
|
|
29
|
+
const registrations = collectProviderComponentRegistrations(input.providerRegistry?.modules.values() ?? [], {
|
|
30
|
+
contributedLoaders: indexProviderComponentLoaderContributions(input.providerComponentLoaders),
|
|
31
|
+
onDiagnostic,
|
|
32
|
+
});
|
|
33
|
+
return createProviderComponentRegistry({ registrations, onDiagnostic });
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=provider-component-registry.techdoc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-component-registry.techdoc.js","sourceRoot":"","sources":["../../../../src/runtime/provider-component-registry.techdoc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,qCAAqC,EACrC,+BAA+B,EAC/B,yCAAyC,GAI1C,MAAM,8CAA8C,CAAC;AAiBtD,SAAS,+BAA+B,CAAC,UAAuC;IAC9E,0GAA0G;IAC1G,wGAAwG;IACxG,iGAAiG;IACjG,IAAI,OAAO,QAAQ,KAAK,WAAW;QAAE,OAAO;IAC5C,sCAAsC;IACtC,OAAO,CAAC,IAAI,CAAC,8BAA8B,UAAU,CAAC,IAAI,KAAK,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC;AACvF,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,mCAAmC,CACjD,KAA+C;IAE/C,MAAM,YAAY,GAAG,KAAK,CAAC,YAAY,IAAI,+BAA+B,CAAC;IAC3E,MAAM,aAAa,GAAG,qCAAqC,CAAC,KAAK,CAAC,gBAAgB,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;QAC1G,kBAAkB,EAAE,yCAAyC,CAAC,KAAK,CAAC,wBAAwB,CAAC;QAC7F,YAAY;KACb,CAAC,CAAC;IACH,OAAO,+BAA+B,CAA4B,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC,CAAC;AACrG,CAAC","sourcesContent":["/**\n * The documentation site's provider-component registry (#1703): the SAME registry the application and\n * the website build, from the SAME `components` declaration, over the docs site's live provider\n * modules.\n *\n * The techdoc facet type accepted `components` and nothing here read it. The registry is\n * `createProviderComponentRegistry` from `@wildo-ai/external-connectors-public/techdoc` — keyed\n * `capability:providerRef`, consent-gated, script-before-component and browser-only — and this file\n * only feeds it the documentation site's inputs: the hydrated techdoc provider registry, and the loaders\n * the site contributes for components an engine provider module declares but cannot import (passed to\n * `DocsFrontendProviders` as `providerComponentLoaders`).\n *\n * Nothing is loaded here. Docusaurus prerenders every page at build time, and a component loads only\n * when a `DocsProviderComponent` asks for it from an effect, which never runs during that prerender.\n */\n\nimport type { ComponentType } from 'react';\nimport {\n collectProviderComponentRegistrations,\n createProviderComponentRegistry,\n indexProviderComponentLoaderContributions,\n type ProviderComponentDiagnostic,\n type ProviderComponentLoaderContribution,\n type ProviderComponentRegistry,\n} from '@wildo-ai/external-connectors-public/techdoc';\n\nimport type { FrontendTechdocProviderRegistry } from './frontend-provider-registry.techdoc';\n\n/** A component type the documentation site's registry hands back once loaded. */\nexport type DocsProviderComponentType = ComponentType<never>;\n\n/** The documentation site's provider-component registry: the shared registry, holding React components. */\nexport type DocsProviderComponentRegistry = ProviderComponentRegistry<DocsProviderComponentType>;\n\nexport interface CreateDocsProviderComponentRegistryInput {\n readonly providerRegistry: FrontendTechdocProviderRegistry | undefined;\n readonly providerComponentLoaders?: Iterable<ProviderComponentLoaderContribution>;\n /** Defaults to `console.warn`: the docs runtime has no logger, and a component that cannot be offered must not be silent. */\n readonly onDiagnostic?: (diagnostic: ProviderComponentDiagnostic) => void;\n}\n\nfunction warnProviderComponentDiagnostic(diagnostic: ProviderComponentDiagnostic): void {\n // Reported in the BROWSER only. The registry is built during the server render or prerender too, once per\n // page, and a declaration nothing can load would otherwise fill the build log with one warning per page\n // for a fact the first page already stated. The browser is where somebody can see and act on it.\n if (typeof document === 'undefined') return;\n // eslint-disable-next-line no-console\n console.warn(`[wildo-provider-component] ${diagnostic.kind}: ${diagnostic.message}`);\n}\n\n/** Builds the documentation site's provider-component registry from its live provider modules. */\nexport function createDocsProviderComponentRegistry(\n input: CreateDocsProviderComponentRegistryInput,\n): DocsProviderComponentRegistry {\n const onDiagnostic = input.onDiagnostic ?? warnProviderComponentDiagnostic;\n const registrations = collectProviderComponentRegistrations(input.providerRegistry?.modules.values() ?? [], {\n contributedLoaders: indexProviderComponentLoaderContributions(input.providerComponentLoaders),\n onDiagnostic,\n });\n return createProviderComponentRegistry<DocsProviderComponentType>({ registrations, onDiagnostic });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-docs-auth-session.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"use-docs-auth-session.d.ts","sourceRoot":"","sources":["../../../../src/runtime/use-docs-auth-session.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,kBAAkB,IAAI,oBAAoB,CASzD"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { FrontendTechdocProviderRegistry } from './frontend-provider-registry.techdoc';
|
|
2
|
+
/** Works for standalone public docs and for existing auth-provider-only mounts. */
|
|
2
3
|
export declare function useDocsFrontendProviderRegistry(): FrontendTechdocProviderRegistry;
|
|
3
4
|
//# sourceMappingURL=use-docs-frontend-provider-registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-docs-frontend-provider-registry.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"use-docs-frontend-provider-registry.d.ts","sourceRoot":"","sources":["../../../../src/runtime/use-docs-frontend-provider-registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAI5F,mFAAmF;AACnF,wBAAgB,+BAA+B,IAAI,+BAA+B,CAMjF"}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import { DocsFrontendProvidersContext } from './DocsFrontendProviders.js';
|
|
3
|
+
import { DocsAuthContext } from './DocsAuthContext.js';
|
|
4
|
+
/** Works for standalone public docs and for existing auth-provider-only mounts. */
|
|
2
5
|
export function useDocsFrontendProviderRegistry() {
|
|
3
|
-
|
|
6
|
+
const providers = useContext(DocsFrontendProvidersContext);
|
|
7
|
+
const auth = useContext(DocsAuthContext);
|
|
8
|
+
const registry = providers ?? auth?.frontendProviderRegistry;
|
|
9
|
+
if (registry === undefined)
|
|
10
|
+
throw new Error('useDocsFrontendProviderRegistry requires DocsFrontendProviders or DocsAuthProvider.');
|
|
11
|
+
return registry;
|
|
4
12
|
}
|
|
5
13
|
//# sourceMappingURL=use-docs-frontend-provider-registry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-docs-frontend-provider-registry.js","sourceRoot":"","sources":["../../../../src/runtime/use-docs-frontend-provider-registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-docs-frontend-provider-registry.js","sourceRoot":"","sources":["../../../../src/runtime/use-docs-frontend-provider-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,mFAAmF;AACnF,MAAM,UAAU,+BAA+B;IAC7C,MAAM,SAAS,GAAG,UAAU,CAAC,4BAA4B,CAAC,CAAC;IAC3D,MAAM,IAAI,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;IACzC,MAAM,QAAQ,GAAG,SAAS,IAAI,IAAI,EAAE,wBAAwB,CAAC;IAC7D,IAAI,QAAQ,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,qFAAqF,CAAC,CAAC;IACnI,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["import { useContext } from 'react';\nimport type { FrontendTechdocProviderRegistry } from './frontend-provider-registry.techdoc';\nimport { DocsFrontendProvidersContext } from './DocsFrontendProviders';\nimport { DocsAuthContext } from './DocsAuthContext';\n\n/** Works for standalone public docs and for existing auth-provider-only mounts. */\nexport function useDocsFrontendProviderRegistry(): FrontendTechdocProviderRegistry {\n const providers = useContext(DocsFrontendProvidersContext);\n const auth = useContext(DocsAuthContext);\n const registry = providers ?? auth?.frontendProviderRegistry;\n if (registry === undefined) throw new Error('useDocsFrontendProviderRegistry requires DocsFrontendProviders or DocsAuthProvider.');\n return registry;\n}\n"]}
|