@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.
Files changed (205) hide show
  1. package/dist/esm/build/csp-emit.d.ts.map +1 -1
  2. package/dist/esm/build/load-materialized-frontend-providers.d.ts.map +1 -1
  3. package/dist/esm/companion/application-documentation/application-administration-documentation.d.ts.map +1 -1
  4. package/dist/esm/companion/application-documentation/application-administration-documentation.js.map +1 -1
  5. package/dist/esm/companion/application-documentation/application-authentication-documentation.d.ts.map +1 -1
  6. package/dist/esm/companion/application-documentation/application-connection-documentation.d.ts +37 -0
  7. package/dist/esm/companion/application-documentation/application-connection-documentation.d.ts.map +1 -1
  8. package/dist/esm/companion/application-documentation/application-connection-documentation.js +46 -5
  9. package/dist/esm/companion/application-documentation/application-connection-documentation.js.map +1 -1
  10. package/dist/esm/companion/application-documentation/application-documentation-chapters.d.ts +101 -0
  11. package/dist/esm/companion/application-documentation/application-documentation-chapters.d.ts.map +1 -0
  12. package/dist/esm/companion/application-documentation/application-documentation-chapters.js +205 -0
  13. package/dist/esm/companion/application-documentation/application-documentation-chapters.js.map +1 -0
  14. package/dist/esm/companion/application-documentation/application-domain-documentation.d.ts.map +1 -1
  15. package/dist/esm/companion/application-documentation/application-domain-documentation.js.map +1 -1
  16. package/dist/esm/companion/application-documentation/application-integration-documentation.d.ts.map +1 -1
  17. package/dist/esm/companion/application-documentation/application-integration-documentation.js.map +1 -1
  18. package/dist/esm/companion/application-documentation/application-organization-role-documentation.d.ts.map +1 -1
  19. package/dist/esm/companion/application-documentation/application-organization-role-documentation.js.map +1 -1
  20. package/dist/esm/companion/application-documentation/application-organization-unit-resource-documentation.d.ts.map +1 -1
  21. package/dist/esm/companion/application-documentation/application-organization-unit-resource-documentation.js +3 -0
  22. package/dist/esm/companion/application-documentation/application-organization-unit-resource-documentation.js.map +1 -1
  23. package/dist/esm/companion/application-documentation/docs-api-origin-substitution.d.ts +34 -0
  24. package/dist/esm/companion/application-documentation/docs-api-origin-substitution.d.ts.map +1 -0
  25. package/dist/esm/companion/application-documentation/docs-api-origin-substitution.js +45 -0
  26. package/dist/esm/companion/application-documentation/docs-api-origin-substitution.js.map +1 -0
  27. package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.d.ts +24 -10
  28. package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.d.ts.map +1 -1
  29. package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.js +25 -15
  30. package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.js.map +1 -1
  31. package/dist/esm/companion/application-documentation/technical-documentation-operational-evidence.d.ts.map +1 -1
  32. package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.d.ts +11 -3
  33. package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.d.ts.map +1 -1
  34. package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.js +9 -2
  35. package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.js.map +1 -1
  36. package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.d.ts.map +1 -1
  37. package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.js +10 -4
  38. package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.js.map +1 -1
  39. package/dist/esm/companion/content/application-consumer-documentation-content-loader.d.ts.map +1 -1
  40. package/dist/esm/companion/index.d.ts +2 -0
  41. package/dist/esm/companion/index.d.ts.map +1 -1
  42. package/dist/esm/companion/index.js +2 -0
  43. package/dist/esm/companion/index.js.map +1 -1
  44. package/dist/esm/companion/manual-controller-route-projection.d.ts.map +1 -1
  45. package/dist/esm/companion/manual-controller-route-projection.js.map +1 -1
  46. package/dist/esm/companion/openapi-example-derivation.d.ts +53 -0
  47. package/dist/esm/companion/openapi-example-derivation.d.ts.map +1 -0
  48. package/dist/esm/companion/openapi-example-derivation.js +229 -0
  49. package/dist/esm/companion/openapi-example-derivation.js.map +1 -0
  50. package/dist/esm/companion/openapi-generator.d.ts +8 -4
  51. package/dist/esm/companion/openapi-generator.d.ts.map +1 -1
  52. package/dist/esm/companion/openapi-generator.js +323 -33
  53. package/dist/esm/companion/openapi-generator.js.map +1 -1
  54. package/dist/esm/companion/operation-projection.schemas.d.ts +57 -1
  55. package/dist/esm/companion/operation-projection.schemas.d.ts.map +1 -1
  56. package/dist/esm/companion/operation-projection.schemas.js +29 -0
  57. package/dist/esm/companion/operation-projection.schemas.js.map +1 -1
  58. package/dist/esm/companion/publish-result.types.d.ts.map +1 -1
  59. package/dist/esm/companion/publish-result.types.js.map +1 -1
  60. package/dist/esm/companion/rendering/technical-documentation-authorized-bundle-reader.d.ts.map +1 -1
  61. package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.d.ts.map +1 -1
  62. package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.js +8 -0
  63. package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.js.map +1 -1
  64. package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.d.ts.map +1 -1
  65. package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.js +20 -0
  66. package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.js.map +1 -1
  67. package/dist/esm/companion/rendering/technical-documentation-openapi-renderer.d.ts +2 -0
  68. package/dist/esm/companion/rendering/technical-documentation-openapi-renderer.d.ts.map +1 -1
  69. package/dist/esm/companion/rendering/technical-documentation-openapi-renderer.js +48 -31
  70. package/dist/esm/companion/rendering/technical-documentation-openapi-renderer.js.map +1 -1
  71. package/dist/esm/companion/rendering/technical-documentation-render-model.d.ts.map +1 -1
  72. package/dist/esm/companion/rendering/technical-documentation-render-model.js +26 -10
  73. package/dist/esm/companion/rendering/technical-documentation-render-model.js.map +1 -1
  74. package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.d.ts.map +1 -1
  75. package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.js.map +1 -1
  76. package/dist/esm/companion/spec-to-operation-doc.d.ts +52 -10
  77. package/dist/esm/companion/spec-to-operation-doc.d.ts.map +1 -1
  78. package/dist/esm/companion/spec-to-operation-doc.js +125 -7
  79. package/dist/esm/companion/spec-to-operation-doc.js.map +1 -1
  80. package/dist/esm/companion/technical-documentation-asset-path.d.ts.map +1 -1
  81. package/dist/esm/companion/technical-documentation-capture-execution-port.d.ts.map +1 -1
  82. package/dist/esm/companion/technical-documentation-capture-execution-port.js.map +1 -1
  83. package/dist/esm/companion/technical-documentation-diagram-definitions.d.ts.map +1 -1
  84. package/dist/esm/companion/technical-documentation-diagram-definitions.js.map +1 -1
  85. package/dist/esm/companion/technical-documentation-diagram-materializer.d.ts.map +1 -1
  86. package/dist/esm/companion/technical-documentation-diagram-materializer.js.map +1 -1
  87. package/dist/esm/companion/technical-documentation-placeholder-materializer.d.ts.map +1 -1
  88. package/dist/esm/companion/zod-to-openapi.d.ts.map +1 -1
  89. package/dist/esm/companion-exports.d.ts.map +1 -1
  90. package/dist/esm/config/define-tech-doc-config.d.ts.map +1 -1
  91. package/dist/esm/config/index.d.ts.map +1 -1
  92. package/dist/esm/config/wildo-tech-doc-config.schemas.d.ts.map +1 -1
  93. package/dist/esm/config/wildo-tech-doc-config.schemas.js.map +1 -1
  94. package/dist/esm/content/application-consumer-documentation-content-manifest.schemas.d.ts.map +1 -1
  95. package/dist/esm/content/application-consumer-documentation-content.techdoc.d.ts +27 -24
  96. package/dist/esm/content/application-consumer-documentation-content.techdoc.d.ts.map +1 -1
  97. package/dist/esm/content/application-consumer-documentation-content.techdoc.js +205 -82
  98. package/dist/esm/content/application-consumer-documentation-content.techdoc.js.map +1 -1
  99. package/dist/esm/content.exports.d.ts.map +1 -1
  100. package/dist/esm/index.d.ts.map +1 -1
  101. package/dist/esm/openapi/api-reference-link-index.d.ts +3 -0
  102. package/dist/esm/openapi/api-reference-link-index.d.ts.map +1 -1
  103. package/dist/esm/openapi/api-reference-link-index.js +26 -15
  104. package/dist/esm/openapi/api-reference-link-index.js.map +1 -1
  105. package/dist/esm/openapi/api-reference-pages.d.ts +55 -0
  106. package/dist/esm/openapi/api-reference-pages.d.ts.map +1 -0
  107. package/dist/esm/openapi/api-reference-pages.js +229 -0
  108. package/dist/esm/openapi/api-reference-pages.js.map +1 -0
  109. package/dist/esm/openapi/api-reference-search.d.ts +53 -0
  110. package/dist/esm/openapi/api-reference-search.d.ts.map +1 -0
  111. package/dist/esm/openapi/api-reference-search.js +100 -0
  112. package/dist/esm/openapi/api-reference-search.js.map +1 -0
  113. package/dist/esm/openapi/api-reference-targets.d.ts +11 -0
  114. package/dist/esm/openapi/api-reference-targets.d.ts.map +1 -1
  115. package/dist/esm/openapi/api-reference-targets.js +8 -0
  116. package/dist/esm/openapi/api-reference-targets.js.map +1 -1
  117. package/dist/esm/openapi/index.d.ts +2 -0
  118. package/dist/esm/openapi/index.d.ts.map +1 -1
  119. package/dist/esm/openapi/index.js +2 -0
  120. package/dist/esm/openapi/index.js.map +1 -1
  121. package/dist/esm/openapi/openapi-generation-output.schemas.d.ts.map +1 -1
  122. package/dist/esm/openapi-reference-model.exports.d.ts +2 -0
  123. package/dist/esm/openapi-reference-model.exports.d.ts.map +1 -1
  124. package/dist/esm/openapi-reference-model.exports.js +2 -0
  125. package/dist/esm/openapi-reference-model.exports.js.map +1 -1
  126. package/dist/esm/runtime/AuthExchangePage.d.ts +45 -4
  127. package/dist/esm/runtime/AuthExchangePage.d.ts.map +1 -1
  128. package/dist/esm/runtime/AuthExchangePage.js +45 -12
  129. package/dist/esm/runtime/AuthExchangePage.js.map +1 -1
  130. package/dist/esm/runtime/DocsAuthContext.d.ts +2 -2
  131. package/dist/esm/runtime/DocsAuthContext.d.ts.map +1 -1
  132. package/dist/esm/runtime/DocsAuthContext.js +8 -4
  133. package/dist/esm/runtime/DocsAuthContext.js.map +1 -1
  134. package/dist/esm/runtime/DocsFrontendProviders.d.ts +30 -0
  135. package/dist/esm/runtime/DocsFrontendProviders.d.ts.map +1 -0
  136. package/dist/esm/runtime/DocsFrontendProviders.js +39 -0
  137. package/dist/esm/runtime/DocsFrontendProviders.js.map +1 -0
  138. package/dist/esm/runtime/DocsProviderComponent.d.ts +41 -0
  139. package/dist/esm/runtime/DocsProviderComponent.d.ts.map +1 -0
  140. package/dist/esm/runtime/DocsProviderComponent.js +17 -0
  141. package/dist/esm/runtime/DocsProviderComponent.js.map +1 -0
  142. package/dist/esm/runtime/decode-jwt-claims.d.ts.map +1 -1
  143. package/dist/esm/runtime/docs-auth-client.d.ts.map +1 -1
  144. package/dist/esm/runtime/docs-auth-session.schemas.d.ts.map +1 -1
  145. package/dist/esm/runtime/documentation-site-translator.d.ts +53 -0
  146. package/dist/esm/runtime/documentation-site-translator.d.ts.map +1 -0
  147. package/dist/esm/runtime/documentation-site-translator.js +51 -0
  148. package/dist/esm/runtime/documentation-site-translator.js.map +1 -0
  149. package/dist/esm/runtime/frontend-provider-registry.techdoc.d.ts +1 -2
  150. package/dist/esm/runtime/frontend-provider-registry.techdoc.d.ts.map +1 -1
  151. package/dist/esm/runtime/frontend-provider-registry.techdoc.js.map +1 -1
  152. package/dist/esm/runtime/index.d.ts +8 -0
  153. package/dist/esm/runtime/index.d.ts.map +1 -1
  154. package/dist/esm/runtime/index.js +8 -0
  155. package/dist/esm/runtime/index.js.map +1 -1
  156. package/dist/esm/runtime/openapi-reference-conservation.d.ts.map +1 -1
  157. package/dist/esm/runtime/openapi-reference-model.d.ts +30 -0
  158. package/dist/esm/runtime/openapi-reference-model.d.ts.map +1 -1
  159. package/dist/esm/runtime/openapi-reference-model.js +85 -11
  160. package/dist/esm/runtime/openapi-reference-model.js.map +1 -1
  161. package/dist/esm/runtime/openapi-reference-navigation.d.ts +50 -0
  162. package/dist/esm/runtime/openapi-reference-navigation.d.ts.map +1 -0
  163. package/dist/esm/runtime/openapi-reference-navigation.js +46 -0
  164. package/dist/esm/runtime/openapi-reference-navigation.js.map +1 -0
  165. package/dist/esm/runtime/openapi-reference-samples.d.ts +40 -0
  166. package/dist/esm/runtime/openapi-reference-samples.d.ts.map +1 -0
  167. package/dist/esm/runtime/openapi-reference-samples.js +169 -0
  168. package/dist/esm/runtime/openapi-reference-samples.js.map +1 -0
  169. package/dist/esm/runtime/openapi-reference-styles.d.ts +28 -0
  170. package/dist/esm/runtime/openapi-reference-styles.d.ts.map +1 -0
  171. package/dist/esm/runtime/openapi-reference-styles.js +292 -0
  172. package/dist/esm/runtime/openapi-reference-styles.js.map +1 -0
  173. package/dist/esm/runtime/openapi-reference-view.d.ts +40 -5
  174. package/dist/esm/runtime/openapi-reference-view.d.ts.map +1 -1
  175. package/dist/esm/runtime/openapi-reference-view.js +828 -82
  176. package/dist/esm/runtime/openapi-reference-view.js.map +1 -1
  177. package/dist/esm/runtime/openapi-reference-words-context.d.ts +12 -0
  178. package/dist/esm/runtime/openapi-reference-words-context.d.ts.map +1 -0
  179. package/dist/esm/runtime/openapi-reference-words-context.js +30 -0
  180. package/dist/esm/runtime/openapi-reference-words-context.js.map +1 -0
  181. package/dist/esm/runtime/openapi-reference-words.d.ts +205 -0
  182. package/dist/esm/runtime/openapi-reference-words.d.ts.map +1 -0
  183. package/dist/esm/runtime/openapi-reference-words.js +162 -0
  184. package/dist/esm/runtime/openapi-reference-words.js.map +1 -0
  185. package/dist/esm/runtime/provider-component-registry.techdoc.d.ts +31 -0
  186. package/dist/esm/runtime/provider-component-registry.techdoc.d.ts.map +1 -0
  187. package/dist/esm/runtime/provider-component-registry.techdoc.js +35 -0
  188. package/dist/esm/runtime/provider-component-registry.techdoc.js.map +1 -0
  189. package/dist/esm/runtime/use-docs-auth-session.d.ts.map +1 -1
  190. package/dist/esm/runtime/use-docs-frontend-provider-registry.d.ts +1 -0
  191. package/dist/esm/runtime/use-docs-frontend-provider-registry.d.ts.map +1 -1
  192. package/dist/esm/runtime/use-docs-frontend-provider-registry.js +10 -2
  193. package/dist/esm/runtime/use-docs-frontend-provider-registry.js.map +1 -1
  194. package/dist/esm/runtime/use-docs-provider-component.d.ts +29 -0
  195. package/dist/esm/runtime/use-docs-provider-component.d.ts.map +1 -0
  196. package/dist/esm/runtime/use-docs-provider-component.js +42 -0
  197. package/dist/esm/runtime/use-docs-provider-component.js.map +1 -0
  198. package/dist/esm/runtime/use-docs-provider-scripts.d.ts +37 -0
  199. package/dist/esm/runtime/use-docs-provider-scripts.d.ts.map +1 -0
  200. package/dist/esm/runtime/use-docs-provider-scripts.js +47 -0
  201. package/dist/esm/runtime/use-docs-provider-scripts.js.map +1 -0
  202. package/dist/esm/runtime/use-docs-provider-sdks.d.ts.map +1 -1
  203. package/dist/esm/runtime/use-docs-provider-sdks.js.map +1 -1
  204. package/dist/tsconfig.build.tsbuildinfo +1 -1
  205. package/package.json +8 -24
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Reading provider-contributed components on the documentation site (#1703) — the docs counterpart of
3
+ * the application's `useProviderComponentChoices` / `useProviderComponent`, over the same registry and
4
+ * the same status vocabulary (`ProviderComponentStatus`).
5
+ *
6
+ * **No one is asked for consent here, so the grant is always NONE.** The documentation site has no
7
+ * consent panel and no signed-in person's stored preference to read (a reader may be anonymous, and the
8
+ * auth provider is optional), so a component whose provider rests on a consent purpose never loads on
9
+ * this surface: it reports `CONSENT_REQUIRED` and downloads nothing. That is the same fail-closed default
10
+ * `useDocsProviderSdks` and `useDocsProviderScripts` apply to the provider's SDK and scripts, and it
11
+ * keeps the three halves of one provider — SDK, scripts, component — answering the same question the
12
+ * same way.
13
+ */
14
+ import { type ProviderComponentLoadState } from '@wildo-ai/external-connectors-public/techdoc';
15
+ import type { ProviderCapability } from '@wildo-ai/saas-models/public-runtime';
16
+ import type { DocsProviderComponentType } from './provider-component-registry.techdoc';
17
+ /** What `useDocsProviderComponent` returns: the shared load state, holding a React component. */
18
+ export type DocsProviderComponentState = ProviderComponentLoadState<DocsProviderComponentType>;
19
+ /**
20
+ * The providers that are BOTH live for this docs service and carry a component for this capability, in
21
+ * the order the service declared them. Empty outside `DocsFrontendProviders`.
22
+ */
23
+ export declare function useDocsProviderComponentChoices(capability: ProviderCapability): ReadonlyArray<string>;
24
+ /**
25
+ * Loads one provider's component for a capability. Pass `undefined` for the ref while nothing is chosen.
26
+ * The load runs in an effect, so it never runs during the Docusaurus prerender.
27
+ */
28
+ export declare function useDocsProviderComponent(capability: ProviderCapability, providerRef: string | undefined): DocsProviderComponentState;
29
+ //# sourceMappingURL=use-docs-provider-component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-docs-provider-component.d.ts","sourceRoot":"","sources":["../../../../src/runtime/use-docs-provider-component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAGL,KAAK,0BAA0B,EAChC,MAAM,8CAA8C,CAAC;AACtD,OAAO,KAAK,EAAkB,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAG/F,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAEvF,iGAAiG;AACjG,MAAM,MAAM,0BAA0B,GAAG,0BAA0B,CAAC,yBAAyB,CAAC,CAAC;AAK/F;;;GAGG;AACH,wBAAgB,+BAA+B,CAAC,UAAU,EAAE,kBAAkB,GAAG,aAAa,CAAC,MAAM,CAAC,CAErG;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,kBAAkB,EAC9B,WAAW,EAAE,MAAM,GAAG,SAAS,GAC9B,0BAA0B,CAgB5B"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Reading provider-contributed components on the documentation site (#1703) — the docs counterpart of
3
+ * the application's `useProviderComponentChoices` / `useProviderComponent`, over the same registry and
4
+ * the same status vocabulary (`ProviderComponentStatus`).
5
+ *
6
+ * **No one is asked for consent here, so the grant is always NONE.** The documentation site has no
7
+ * consent panel and no signed-in person's stored preference to read (a reader may be anonymous, and the
8
+ * auth provider is optional), so a component whose provider rests on a consent purpose never loads on
9
+ * this surface: it reports `CONSENT_REQUIRED` and downloads nothing. That is the same fail-closed default
10
+ * `useDocsProviderSdks` and `useDocsProviderScripts` apply to the provider's SDK and scripts, and it
11
+ * keeps the three halves of one provider — SDK, scripts, component — answering the same question the
12
+ * same way.
13
+ */
14
+ import { useContext, useEffect, useState } from 'react';
15
+ import { idleProviderComponentLoadState, startProviderComponentLoad, } from '@wildo-ai/external-connectors-public/techdoc';
16
+ import { DocsProviderComponentsContext } from './DocsFrontendProviders.js';
17
+ /** The documentation site grants no consent purpose: nobody is asked on this surface. */
18
+ const NO_GRANTED_PURPOSES = Object.freeze([]);
19
+ /**
20
+ * The providers that are BOTH live for this docs service and carry a component for this capability, in
21
+ * the order the service declared them. Empty outside `DocsFrontendProviders`.
22
+ */
23
+ export function useDocsProviderComponentChoices(capability) {
24
+ return useContext(DocsProviderComponentsContext)?.listProviders(capability) ?? [];
25
+ }
26
+ /**
27
+ * Loads one provider's component for a capability. Pass `undefined` for the ref while nothing is chosen.
28
+ * The load runs in an effect, so it never runs during the Docusaurus prerender.
29
+ */
30
+ export function useDocsProviderComponent(capability, providerRef) {
31
+ const registry = useContext(DocsProviderComponentsContext);
32
+ const [state, setState] = useState(() => idleProviderComponentLoadState());
33
+ useEffect(() => startProviderComponentLoad({
34
+ registry,
35
+ capability,
36
+ providerRef,
37
+ grantedConsentPurposes: NO_GRANTED_PURPOSES,
38
+ onState: setState,
39
+ }), [capability, providerRef, registry]);
40
+ return state;
41
+ }
42
+ //# sourceMappingURL=use-docs-provider-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-docs-provider-component.js","sourceRoot":"","sources":["../../../../src/runtime/use-docs-provider-component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,EACL,8BAA8B,EAC9B,0BAA0B,GAE3B,MAAM,8CAA8C,CAAC;AAGtD,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAMxE,yFAAyF;AACzF,MAAM,mBAAmB,GAA8B,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEzE;;;GAGG;AACH,MAAM,UAAU,+BAA+B,CAAC,UAA8B;IAC5E,OAAO,UAAU,CAAC,6BAA6B,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;AACpF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CACtC,UAA8B,EAC9B,WAA+B;IAE/B,MAAM,QAAQ,GAAG,UAAU,CAAC,6BAA6B,CAAC,CAAC;IAC3D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAA6B,GAAG,EAAE,CAAC,8BAA8B,EAA6B,CAAC,CAAC;IAElI,SAAS,CACP,GAAG,EAAE,CAAC,0BAA0B,CAAC;QAC/B,QAAQ;QACR,UAAU;QACV,WAAW;QACX,sBAAsB,EAAE,mBAAmB;QAC3C,OAAO,EAAE,QAAQ;KAClB,CAAC,EACF,CAAC,UAAU,EAAE,WAAW,EAAE,QAAQ,CAAC,CACpC,CAAC;IAEF,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["/**\n * Reading provider-contributed components on the documentation site (#1703) — the docs counterpart of\n * the application's `useProviderComponentChoices` / `useProviderComponent`, over the same registry and\n * the same status vocabulary (`ProviderComponentStatus`).\n *\n * **No one is asked for consent here, so the grant is always NONE.** The documentation site has no\n * consent panel and no signed-in person's stored preference to read (a reader may be anonymous, and the\n * auth provider is optional), so a component whose provider rests on a consent purpose never loads on\n * this surface: it reports `CONSENT_REQUIRED` and downloads nothing. That is the same fail-closed default\n * `useDocsProviderSdks` and `useDocsProviderScripts` apply to the provider's SDK and scripts, and it\n * keeps the three halves of one provider — SDK, scripts, component — answering the same question the\n * same way.\n */\n\nimport { useContext, useEffect, useState } from 'react';\nimport {\n idleProviderComponentLoadState,\n startProviderComponentLoad,\n type ProviderComponentLoadState,\n} from '@wildo-ai/external-connectors-public/techdoc';\nimport type { ConsentPurpose, ProviderCapability } from '@wildo-ai/saas-models/public-runtime';\n\nimport { DocsProviderComponentsContext } from './DocsFrontendProviders';\nimport type { DocsProviderComponentType } from './provider-component-registry.techdoc';\n\n/** What `useDocsProviderComponent` returns: the shared load state, holding a React component. */\nexport type DocsProviderComponentState = ProviderComponentLoadState<DocsProviderComponentType>;\n\n/** The documentation site grants no consent purpose: nobody is asked on this surface. */\nconst NO_GRANTED_PURPOSES: readonly ConsentPurpose[] = Object.freeze([]);\n\n/**\n * The providers that are BOTH live for this docs service and carry a component for this capability, in\n * the order the service declared them. Empty outside `DocsFrontendProviders`.\n */\nexport function useDocsProviderComponentChoices(capability: ProviderCapability): ReadonlyArray<string> {\n return useContext(DocsProviderComponentsContext)?.listProviders(capability) ?? [];\n}\n\n/**\n * Loads one provider's component for a capability. Pass `undefined` for the ref while nothing is chosen.\n * The load runs in an effect, so it never runs during the Docusaurus prerender.\n */\nexport function useDocsProviderComponent(\n capability: ProviderCapability,\n providerRef: string | undefined,\n): DocsProviderComponentState {\n const registry = useContext(DocsProviderComponentsContext);\n const [state, setState] = useState<DocsProviderComponentState>(() => idleProviderComponentLoadState<DocsProviderComponentType>());\n\n useEffect(\n () => startProviderComponentLoad({\n registry,\n capability,\n providerRef,\n grantedConsentPurposes: NO_GRANTED_PURPOSES,\n onState: setState,\n }),\n [capability, providerRef, registry],\n );\n\n return state;\n}\n"]}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Adds the third-party `<script>` tags every live docs provider declares.
3
+ *
4
+ * The techdoc's half of the DATA channel's executable surface (#332), beside
5
+ * `useDocsProviderSdks` for the npm half. Before this, a docs provider's
6
+ * declared `scripts` were read by nothing on this surface: only the website
7
+ * injected them, which is how a declared script became a label elsewhere.
8
+ * The injector itself is the ONE shared copy in
9
+ * `@wildo-ai/external-connectors-public/techdoc` — a second copy of a DOM
10
+ * mutation eventually disagrees about idempotence, and a vendor tag loaded
11
+ * twice initialises twice.
12
+ *
13
+ * Effect-only, and that is not a detail: Docusaurus server-renders every page
14
+ * at build time, where there is no `document` to inject into, and a vendor tag
15
+ * must not run inside the build.
16
+ *
17
+ * Deliberately no teardown, for the same reason as the website hook: a vendor
18
+ * tag installs a global and often starts work immediately. Removing the element
19
+ * undoes neither, so a cleanup that removed it would only make the next mount
20
+ * inject a SECOND copy of an already-running script. Idempotence by `src` is
21
+ * the real guard.
22
+ *
23
+ * It injects without awaiting, and only for providers with NO registered
24
+ * component: a provider that contributes a component has its scripts loaded and
25
+ * AWAITED by the provider-component registry when that component is first shown
26
+ * (#1703), so a component reading a vendor global finds it.
27
+ */
28
+ import type { FrontendTechdocProviderRegistry } from './frontend-provider-registry.techdoc';
29
+ import type { DocsProviderComponentRegistry } from './provider-component-registry.techdoc';
30
+ export declare function useDocsProviderScripts(registry: FrontendTechdocProviderRegistry | undefined,
31
+ /**
32
+ * The docs provider-component registry (#1703). A provider with a registered component loads its
33
+ * scripts WITH that component, when a page first shows it, rather than on every documentation page —
34
+ * the rule the application follows too. This hook injects the rest.
35
+ */
36
+ componentRegistry?: DocsProviderComponentRegistry): void;
37
+ //# sourceMappingURL=use-docs-provider-scripts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-docs-provider-scripts.d.ts","sourceRoot":"","sources":["../../../../src/runtime/use-docs-provider-scripts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAOH,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAC5F,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;AAE3F,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,+BAA+B,GAAG,SAAS;AACrD;;;;GAIG;AACH,iBAAiB,CAAC,EAAE,6BAA6B,GAChD,IAAI,CAUN"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Adds the third-party `<script>` tags every live docs provider declares.
3
+ *
4
+ * The techdoc's half of the DATA channel's executable surface (#332), beside
5
+ * `useDocsProviderSdks` for the npm half. Before this, a docs provider's
6
+ * declared `scripts` were read by nothing on this surface: only the website
7
+ * injected them, which is how a declared script became a label elsewhere.
8
+ * The injector itself is the ONE shared copy in
9
+ * `@wildo-ai/external-connectors-public/techdoc` — a second copy of a DOM
10
+ * mutation eventually disagrees about idempotence, and a vendor tag loaded
11
+ * twice initialises twice.
12
+ *
13
+ * Effect-only, and that is not a detail: Docusaurus server-renders every page
14
+ * at build time, where there is no `document` to inject into, and a vendor tag
15
+ * must not run inside the build.
16
+ *
17
+ * Deliberately no teardown, for the same reason as the website hook: a vendor
18
+ * tag installs a global and often starts work immediately. Removing the element
19
+ * undoes neither, so a cleanup that removed it would only make the next mount
20
+ * inject a SECOND copy of an already-running script. Idempotence by `src` is
21
+ * the real guard.
22
+ *
23
+ * It injects without awaiting, and only for providers with NO registered
24
+ * component: a provider that contributes a component has its scripts loaded and
25
+ * AWAITED by the provider-component registry when that component is first shown
26
+ * (#1703), so a component reading a vendor global finds it.
27
+ */
28
+ import { useEffect } from 'react';
29
+ import { collectProviderScriptsWithoutComponents, injectProviderScripts, } from '@wildo-ai/external-connectors-public/techdoc';
30
+ export function useDocsProviderScripts(registry,
31
+ /**
32
+ * The docs provider-component registry (#1703). A provider with a registered component loads its
33
+ * scripts WITH that component, when a page first shows it, rather than on every documentation page —
34
+ * the rule the application follows too. This hook injects the rest.
35
+ */
36
+ componentRegistry) {
37
+ useEffect(() => {
38
+ if (typeof document === 'undefined')
39
+ return;
40
+ const withComponents = [...(componentRegistry?.providersWithComponents() ?? [])].map((providerRef) => ({ providerRef }));
41
+ const scripts = collectProviderScriptsWithoutComponents(registry?.modules.values() ?? [], withComponents);
42
+ if (scripts.length === 0)
43
+ return;
44
+ injectProviderScripts(scripts, document);
45
+ }, [registry, componentRegistry]);
46
+ }
47
+ //# sourceMappingURL=use-docs-provider-scripts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-docs-provider-scripts.js","sourceRoot":"","sources":["../../../../src/runtime/use-docs-provider-scripts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EACL,uCAAuC,EACvC,qBAAqB,GACtB,MAAM,8CAA8C,CAAC;AAItD,MAAM,UAAU,sBAAsB,CACpC,QAAqD;AACrD;;;;GAIG;AACH,iBAAiD;IAEjD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO,QAAQ,KAAK,WAAW;YAAE,OAAO;QAE5C,MAAM,cAAc,GAAG,CAAC,GAAG,CAAC,iBAAiB,EAAE,uBAAuB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC;QACzH,MAAM,OAAO,GAAG,uCAAuC,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,cAAc,CAAC,CAAC;QAC1G,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO;QAEjC,qBAAqB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC3C,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC;AACpC,CAAC","sourcesContent":["/**\n * Adds the third-party `<script>` tags every live docs provider declares.\n *\n * The techdoc's half of the DATA channel's executable surface (#332), beside\n * `useDocsProviderSdks` for the npm half. Before this, a docs provider's\n * declared `scripts` were read by nothing on this surface: only the website\n * injected them, which is how a declared script became a label elsewhere.\n * The injector itself is the ONE shared copy in\n * `@wildo-ai/external-connectors-public/techdoc` — a second copy of a DOM\n * mutation eventually disagrees about idempotence, and a vendor tag loaded\n * twice initialises twice.\n *\n * Effect-only, and that is not a detail: Docusaurus server-renders every page\n * at build time, where there is no `document` to inject into, and a vendor tag\n * must not run inside the build.\n *\n * Deliberately no teardown, for the same reason as the website hook: a vendor\n * tag installs a global and often starts work immediately. Removing the element\n * undoes neither, so a cleanup that removed it would only make the next mount\n * inject a SECOND copy of an already-running script. Idempotence by `src` is\n * the real guard.\n *\n * It injects without awaiting, and only for providers with NO registered\n * component: a provider that contributes a component has its scripts loaded and\n * AWAITED by the provider-component registry when that component is first shown\n * (#1703), so a component reading a vendor global finds it.\n */\n\nimport { useEffect } from 'react';\nimport {\n collectProviderScriptsWithoutComponents,\n injectProviderScripts,\n} from '@wildo-ai/external-connectors-public/techdoc';\nimport type { FrontendTechdocProviderRegistry } from './frontend-provider-registry.techdoc';\nimport type { DocsProviderComponentRegistry } from './provider-component-registry.techdoc';\n\nexport function useDocsProviderScripts(\n registry: FrontendTechdocProviderRegistry | undefined,\n /**\n * The docs provider-component registry (#1703). A provider with a registered component loads its\n * scripts WITH that component, when a page first shows it, rather than on every documentation page —\n * the rule the application follows too. This hook injects the rest.\n */\n componentRegistry?: DocsProviderComponentRegistry,\n): void {\n useEffect(() => {\n if (typeof document === 'undefined') return;\n\n const withComponents = [...(componentRegistry?.providersWithComponents() ?? [])].map((providerRef) => ({ providerRef }));\n const scripts = collectProviderScriptsWithoutComponents(registry?.modules.values() ?? [], withComponents);\n if (scripts.length === 0) return;\n\n injectProviderScripts(scripts, document);\n }, [registry, componentRegistry]);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"use-docs-provider-sdks.d.ts","sourceRoot":"","sources":["../../../src/runtime/use-docs-provider-sdks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAQH,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAE5F,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,+BAA+B,GAAG,SAAS,GACpD,IAAI,CA2BN"}
1
+ {"version":3,"file":"use-docs-provider-sdks.d.ts","sourceRoot":"","sources":["../../../../src/runtime/use-docs-provider-sdks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAQH,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAE5F,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,+BAA+B,GAAG,SAAS,GACpD,IAAI,CA2BN"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-docs-provider-sdks.js","sourceRoot":"","sources":["../../../src/runtime/use-docs-provider-sdks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EACL,4BAA4B,GAE7B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAGvE,MAAM,UAAU,mBAAmB,CACjC,QAAqD;IAErD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,QAAQ,KAAK,SAAS;YAAE,OAAO;QAEnC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,SAAoD,CAAC;QAEzD,KAAK,4BAA4B,CAAC;YAChC,OAAO,EAAE,eAAe,CAAC,QAAQ;YACjC,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE;YAClC,YAAY,EAAE,CAAC,UAAU,EAAE,EAAE;gBAC3B,sCAAsC;gBACtC,OAAO,CAAC,IAAI,CAAC,wBAAwB,UAAU,CAAC,IAAI,KAAK,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC;YACjF,CAAC;SACF,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;YACjB,SAAS,GAAG,MAAM,CAAC;YACnB,0EAA0E;YAC1E,yEAAyE;YACzE,iDAAiD;YACjD,IAAI,SAAS;gBAAE,KAAK,MAAM,CAAC,aAAa,EAAE,CAAC;QAC7C,CAAC,CAAC,CAAC;QAEH,OAAO,GAAG,EAAE;YACV,SAAS,GAAG,IAAI,CAAC;YACjB,KAAK,SAAS,EAAE,aAAa,EAAE,CAAC;QAClC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;AACjB,CAAC","sourcesContent":["/**\n * Loads and starts the npm SDK of every live docs provider that declares one.\n *\n * The techdoc's half of the CODE channel (#332). Until this landed, the docs\n * runtime hydrated a provider registry that nothing read — the registry was\n * built, exposed through `useDocsFrontendProviderRegistry`, and no consumer did\n * anything with it.\n *\n * Effect-only, and that is not a detail: Docusaurus server-renders every page\n * at build time, so a vendor SDK started during the render would run inside the\n * build process — or throw, reaching for a `window` that is not there. The\n * runner refuses off-browser on its own; the effect keeps it from being asked\n * in the first place.\n *\n * Teardown is real where the vendor offers one. An analytics or\n * error-monitoring client that can be started and never stopped cannot honour a\n * consent withdrawal.\n */\n\nimport { useEffect } from 'react';\nimport {\n activateFrontendProviderSdks,\n type ActivatedFrontendProviderSdks,\n} from '@wildo-ai/external-connectors-public/techdoc';\nimport { AppFrontendType } from '@wildo-ai/saas-models/public-runtime';\nimport type { FrontendTechdocProviderRegistry } from './frontend-provider-registry.techdoc';\n\nexport function useDocsProviderSdks(\n registry: FrontendTechdocProviderRegistry | undefined,\n): void {\n useEffect(() => {\n if (registry === undefined) return;\n\n let unmounted = false;\n let activated: ActivatedFrontendProviderSdks | undefined;\n\n void activateFrontendProviderSdks({\n surface: AppFrontendType.TECH_DOC,\n modules: registry.modules.values(),\n onDiagnostic: (diagnostic) => {\n // eslint-disable-next-line no-console\n console.warn(`[wildo-provider-sdk] ${diagnostic.kind}: ${diagnostic.message}`);\n },\n }).then((result) => {\n activated = result;\n // Activation is asynchronous and unmount is not: if the surface went away\n // while a vendor bundle was still downloading, stop what we just started\n // rather than leaving a client nobody can reach.\n if (unmounted) void result.deactivateAll();\n });\n\n return () => {\n unmounted = true;\n void activated?.deactivateAll();\n };\n }, [registry]);\n}\n"]}
1
+ {"version":3,"file":"use-docs-provider-sdks.js","sourceRoot":"","sources":["../../../../src/runtime/use-docs-provider-sdks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EACL,4BAA4B,GAE7B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAGvE,MAAM,UAAU,mBAAmB,CACjC,QAAqD;IAErD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,QAAQ,KAAK,SAAS;YAAE,OAAO;QAEnC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,SAAoD,CAAC;QAEzD,KAAK,4BAA4B,CAAC;YAChC,OAAO,EAAE,eAAe,CAAC,QAAQ;YACjC,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE;YAClC,YAAY,EAAE,CAAC,UAAU,EAAE,EAAE;gBAC3B,sCAAsC;gBACtC,OAAO,CAAC,IAAI,CAAC,wBAAwB,UAAU,CAAC,IAAI,KAAK,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC;YACjF,CAAC;SACF,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;YACjB,SAAS,GAAG,MAAM,CAAC;YACnB,0EAA0E;YAC1E,yEAAyE;YACzE,iDAAiD;YACjD,IAAI,SAAS;gBAAE,KAAK,MAAM,CAAC,aAAa,EAAE,CAAC;QAC7C,CAAC,CAAC,CAAC;QAEH,OAAO,GAAG,EAAE;YACV,SAAS,GAAG,IAAI,CAAC;YACjB,KAAK,SAAS,EAAE,aAAa,EAAE,CAAC;QAClC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;AACjB,CAAC","sourcesContent":["/**\n * Loads and starts the npm SDK of every live docs provider that declares one.\n *\n * The techdoc's half of the CODE channel (#332). Until this landed, the docs\n * runtime hydrated a provider registry that nothing read — the registry was\n * built, exposed through `useDocsFrontendProviderRegistry`, and no consumer did\n * anything with it.\n *\n * Effect-only, and that is not a detail: Docusaurus server-renders every page\n * at build time, so a vendor SDK started during the render would run inside the\n * build process — or throw, reaching for a `window` that is not there. The\n * runner refuses off-browser on its own; the effect keeps it from being asked\n * in the first place.\n *\n * Teardown is real where the vendor offers one. An analytics or\n * error-monitoring client that can be started and never stopped cannot honour a\n * consent withdrawal.\n */\n\nimport { useEffect } from 'react';\nimport {\n activateFrontendProviderSdks,\n type ActivatedFrontendProviderSdks,\n} from '@wildo-ai/external-connectors-public/techdoc';\nimport { AppFrontendType } from '@wildo-ai/saas-models/public-runtime';\nimport type { FrontendTechdocProviderRegistry } from './frontend-provider-registry.techdoc';\n\nexport function useDocsProviderSdks(\n registry: FrontendTechdocProviderRegistry | undefined,\n): void {\n useEffect(() => {\n if (registry === undefined) return;\n\n let unmounted = false;\n let activated: ActivatedFrontendProviderSdks | undefined;\n\n void activateFrontendProviderSdks({\n surface: AppFrontendType.TECH_DOC,\n modules: registry.modules.values(),\n onDiagnostic: (diagnostic) => {\n // eslint-disable-next-line no-console\n console.warn(`[wildo-provider-sdk] ${diagnostic.kind}: ${diagnostic.message}`);\n },\n }).then((result) => {\n activated = result;\n // Activation is asynchronous and unmount is not: if the surface went away\n // while a vendor bundle was still downloading, stop what we just started\n // rather than leaving a client nobody can reach.\n if (unmounted) void result.deactivateAll();\n });\n\n return () => {\n unmounted = true;\n void activated?.deactivateAll();\n };\n }, [registry]);\n}\n"]}