@redocly/redoc-reef 0.134.0-next.1 → 0.134.0-next.2

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 (51) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/client/app/utils/loadAndNavigate.js +1 -1
  3. package/dist/client/providers/hooks.js +1 -1
  4. package/dist/client/templates/asyncapi-docs/helpers.d.ts +3 -13
  5. package/dist/compiled/svgo/svgo-node.js +55 -49
  6. package/dist/constants/common.d.ts +1 -0
  7. package/dist/constants/common.js +1 -1
  8. package/dist/markdoc/tags/index.d.ts +30 -0
  9. package/dist/markdoc/types.d.ts +2 -2
  10. package/dist/server/api-routes/run-api-routes-worker.js +1 -1
  11. package/dist/server/config/env-config.d.ts +6 -0
  12. package/dist/server/config/env-schema.d.ts +149 -2
  13. package/dist/server/config/env-schema.js +1 -1
  14. package/dist/server/config/env-schemas/feature-flags.d.ts +12 -0
  15. package/dist/server/config/env-schemas/feature-flags.js +1 -1
  16. package/dist/server/constants/feedback.d.ts +2 -0
  17. package/dist/server/constants/feedback.js +1 -1
  18. package/dist/server/plugins/markdown/attribute-resolvers/resolve-link.js +1 -1
  19. package/dist/server/plugins/markdown/search/create-render-tag-fn.d.ts +4 -0
  20. package/dist/server/plugins/markdown/search/create-render-tag-fn.js +1 -0
  21. package/dist/server/plugins/markdown/search/get-ai-search-documents.js +7 -8
  22. package/dist/server/plugins/markdown/search/join-section-content.d.ts +3 -0
  23. package/dist/server/plugins/markdown/search/join-section-content.js +2 -0
  24. package/dist/server/plugins/markdown/search/nodes/heading-node.d.ts +1 -7
  25. package/dist/server/plugins/markdown/search/nodes/section-node.d.ts +2 -14
  26. package/dist/server/plugins/markdown/search/nodes/section-node.js +1 -1
  27. package/dist/server/plugins/markdown/search/nodes/tag-node.d.ts +1 -7
  28. package/dist/server/plugins/markdown/search/walk-sections.d.ts +3 -1
  29. package/dist/server/plugins/markdown/search/walk-sections.js +1 -1
  30. package/dist/server/plugins/openapi-docs/search/get-ai-search-documents.d.ts +2 -2
  31. package/dist/server/plugins/openapi-docs/search/get-ai-search-documents.js +30 -30
  32. package/dist/server/plugins/search/ai-indexer/prepare-semantic-documents.js +3 -1
  33. package/dist/server/store.d.ts +2 -34
  34. package/dist/server/types/plugins/common.d.ts +5 -0
  35. package/dist/server/types/plugins/markdown.d.ts +3 -0
  36. package/dist/server/utils/is-api-download-link.d.ts +2 -0
  37. package/dist/server/utils/is-api-download-link.js +1 -0
  38. package/dist/server/utils/llmstxt/agent-feedback-llms-footer.d.ts +3 -0
  39. package/dist/server/utils/llmstxt/agent-feedback-llms-footer.js +2 -0
  40. package/dist/server/utils/shared-data.js +1 -1
  41. package/dist/server/web-server/routes/auth.js +1 -1
  42. package/dist/server/web-server/routes/feedback.d.ts +16 -0
  43. package/dist/server/web-server/routes/feedback.js +1 -1
  44. package/dist/server/web-server/utils/feedback-ip.d.ts +2 -0
  45. package/dist/server/web-server/utils/feedback-ip.js +1 -0
  46. package/dist/server/web-server/utils/get-client-ip.d.ts +1 -0
  47. package/dist/server/web-server/utils/get-client-ip.js +1 -1
  48. package/dist/utils/auth/is-auth-route-path.js +1 -0
  49. package/package.json +7 -7
  50. package/dist/client/utils/auth/is-auth-route-path.js +0 -1
  51. /package/dist/{client/utils → utils}/auth/is-auth-route-path.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @redocly/redoc-reef
2
2
 
3
+ ## 0.134.0-next.2
4
+
5
+ ### Minor Changes
6
+
7
+ - 369752b7a65: Added `renderForLlms` to custom Markdoc tag schemas to control output for LLMs.
8
+
9
+ ### Patch Changes
10
+
11
+ - 901291dbd68: Fixed an issue where in rare cases, clicking on a link on a Markdown page, could trigger navigation twice, taking the user to the first link on the target page.
12
+ - 140606ccd0c: Fixed issue where the link checker incorrectly reported valid authentication links as broken.
13
+ - 43168a71e27: Fixed an issue where IP addresses associated with submitted feedback were inaccurate due to proxy or CDN chains.
14
+ - Updated dependencies [369752b7a65]
15
+ - Updated dependencies [45d17147cbc]
16
+ - Updated dependencies [082d73f2c3c]
17
+ - @redocly/theme@0.66.0-next.2
18
+ - @redocly/realm-asyncapi-sdk@0.12.0-next.2
19
+ - @redocly/openapi-docs@3.22.0-next.2
20
+ - @redocly/asyncapi-docs@1.11.0-next.2
21
+ - @redocly/graphql-docs@1.11.0-next.2
22
+ - @redocly/portal-plugin-mock-server@0.19.0-next.2
23
+
3
24
  ## 0.134.0-next.1
4
25
 
5
26
  ### Minor Changes
@@ -1 +1 @@
1
- import{isLocalLink as f}from"../../../utils/path/is-local-link.js";import{isAuthRoutePath as m}from"../../utils/auth/is-auth-route-path.js";import{withLoadProgress as u}from"./withLoadProgress";import{scrollToAnchor as p}from"./scroll-to-anchor";let s;async function A({navigate:i,to:o,origin:a="browser",options:c}){o===""&&(o="/"),s=o;const{pathname:n,hash:d,search:t}=new URL(o,window.location.origin+window.location.pathname),r=decodeURIComponent(d),l=decodeURIComponent(window.location.hash);if(m(n)){window.location.href=o;return}const w=window.__LOADER,e=await u(w.tryLoad(n,void 0,t));if(e?.redirectTo){if(!f(e.redirectTo)){window.location.href=e.redirectTo;return}return A({navigate:i,to:e.redirectTo,origin:a,options:c})}if(e&&s===o){if((n!==window.location.pathname||t!==window.location.search||r!==l)&&i({pathname:n,search:t,hash:r},{...c,state:{origin:a},unstable_flushSync:!0}),e.props?.disableAutoScroll)return;requestAnimationFrame(()=>{if(r){const h=r.slice(1);p(h)}else window.scrollTo(0,0)})}}export{A as loadAndNavigate};
1
+ import{isLocalLink as f}from"../../../utils/path/is-local-link.js";import{isAuthRoutePath as m}from"../../../utils/auth/is-auth-route-path.js";import{withLoadProgress as u}from"./withLoadProgress";import{scrollToAnchor as p}from"./scroll-to-anchor";let s;async function A({navigate:i,to:o,origin:a="browser",options:c}){o===""&&(o="/"),s=o;const{pathname:n,hash:d,search:t}=new URL(o,window.location.origin+window.location.pathname),r=decodeURIComponent(d),l=decodeURIComponent(window.location.hash);if(m(n)){window.location.href=o;return}const w=window.__LOADER,e=await u(w.tryLoad(n,void 0,t));if(e?.redirectTo){if(!f(e.redirectTo)){window.location.href=e.redirectTo;return}return A({navigate:i,to:e.redirectTo,origin:a,options:c})}if(e&&s===o){if((n!==window.location.pathname||t!==window.location.search||r!==l)&&i({pathname:n,search:t,hash:r},{...c,state:{origin:a},unstable_flushSync:!0}),e.props?.disableAutoScroll)return;requestAnimationFrame(()=>{if(r){const h=r.slice(1);p(h)}else window.scrollTo(0,0)})}}export{A as loadAndNavigate};
@@ -1 +1 @@
1
- import{useEffect as c,useState as s}from"react";import{useNavigate as l}from"react-router-dom";import{isLocalLink as m}from"../../utils/path/is-local-link.js";import{isJsProtocolLink as a}from"../../utils/path/is-js-protocol-link.js";import{isAssetsLink as u}from"../../utils/path/is-assets-link.js";import{isHostnameOnDomain as f}from"../app/utils/isHostnameOnDomain.js";import{loadAndNavigate as d}from"../app/utils/loadAndNavigate.js";import{isForcedNavigationLinkClick as p}from"../utils/utils.js";export*from"./page-data/hooks.js";function E(){const e=l();c(()=>{const t=n=>{const i=n.target;if(i.tagName!=="A"||p(n,i.getAttribute("target")||""))return;const r=i.getAttribute("href");!m(r)||u(r)||a(r)||(n.preventDefault(),d({navigate:e,to:r||""}))};return document.addEventListener("click",t),()=>{document.removeEventListener("click",t)}},[e])}function b(){const[e,t]=s(null);return c(()=>{if(process.env.NODE_ENV==="development"&&typeof window<"u"&&!o("localhost")&&!o("127.0.0.1")&&!o("")&&!o("redocly-local.com")&&!o("editor.redocly.xyz")&&!o("apps.codespaces.githubusercontent.com")&&!o("blueharvest.cloud")&&!o("bhstage.cloud")&&!o("cloud.redocly.com")&&!o("cloud.eu.redocly.com")&&!o("cba.au.redocly.com"))return t("Development mode is only allowed in localhost")},[typeof window]),e}function o(e){return f(window.location.hostname,e)}export{E as useRouterForLocalLinks,b as useRunningEnvironmentCheck};
1
+ import{useEffect as c,useState as s}from"react";import{useNavigate as l}from"react-router-dom";import{isLocalLink as u}from"../../utils/path/is-local-link.js";import{isJsProtocolLink as a}from"../../utils/path/is-js-protocol-link.js";import{isAssetsLink as m}from"../../utils/path/is-assets-link.js";import{isHostnameOnDomain as f}from"../app/utils/isHostnameOnDomain.js";import{loadAndNavigate as d}from"../app/utils/loadAndNavigate.js";import{isForcedNavigationLinkClick as p}from"../utils/utils.js";export*from"./page-data/hooks.js";function E(){const o=l();c(()=>{const r=t=>{if(t.defaultPrevented)return;const i=t.target;if(i.tagName!=="A"||p(t,i.getAttribute("target")||""))return;const n=i.getAttribute("href");!u(n)||m(n)||a(n)||(t.preventDefault(),d({navigate:o,to:n||""}))};return document.addEventListener("click",r),()=>{document.removeEventListener("click",r)}},[o])}function b(){const[o,r]=s(null);return c(()=>{if(process.env.NODE_ENV==="development"&&typeof window<"u"&&!e("localhost")&&!e("127.0.0.1")&&!e("")&&!e("redocly-local.com")&&!e("editor.redocly.xyz")&&!e("apps.codespaces.githubusercontent.com")&&!e("blueharvest.cloud")&&!e("bhstage.cloud")&&!e("cloud.redocly.com")&&!e("cloud.eu.redocly.com")&&!e("cba.au.redocly.com"))return r("Development mode is only allowed in localhost")},[typeof window]),o}function e(o){return f(window.location.hostname,o)}export{E as useRouterForLocalLinks,b as useRunningEnvironmentCheck};
@@ -3,22 +3,12 @@ export declare function useCollectMarkdocOptions({ markdown }: PageProps): {
3
3
  partials: Record<string, import("@markdoc/markdoc").Node | import("@markdoc/markdoc").Node[]> | undefined;
4
4
  variables?: Record<string, any>;
5
5
  tags: {
6
- [x: string]: (import("@markdoc/markdoc").Schema<Readonly<Partial<{
7
- nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
8
- tags: Record<string, import("@markdoc/markdoc").Schema>;
9
- variables: Record<string, any>;
10
- functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
11
- partials: Record<string, any>;
12
- validation?: {
13
- parents?: import("@markdoc/markdoc").Node[];
14
- validateFunctions?: boolean;
15
- environment?: string;
16
- };
17
- }>>, string> & {
6
+ [x: string]: import("@redocly/theme/markdoc/tags/types").MarkdocTagSchema | (import("@markdoc/markdoc").Schema & {
18
7
  attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
19
8
  resolver?: string;
20
9
  }>;
21
- }) | (import("@markdoc/markdoc").Schema & {
10
+ renderForLlms?: import("@redocly/theme/markdoc/tags/types").RenderForLlmsFn;
11
+ } & {
22
12
  dynamicComponentLib?: string;
23
13
  });
24
14
  };