@redocly/realm 0.134.0-next.1 → 0.134.0-next.3
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/CHANGELOG.md +36 -0
- package/dist/client/app/utils/getBlocksHeight.d.ts +5 -14
- package/dist/client/app/utils/getBlocksHeight.js +1 -1
- package/dist/client/app/utils/loadAndNavigate.js +1 -1
- package/dist/client/app/utils/syncScrollWithEditor.js +1 -1
- package/dist/client/providers/hooks.js +1 -1
- package/dist/client/templates/asyncapi-docs/helpers.d.ts +3 -13
- package/dist/compiled/svgo/svgo-node.js +55 -49
- package/dist/constants/common.d.ts +1 -0
- package/dist/constants/common.js +1 -1
- package/dist/markdoc/tags/index.d.ts +30 -0
- package/dist/markdoc/types.d.ts +2 -2
- package/dist/server/api-routes/run-api-routes-worker.js +1 -1
- package/dist/server/config/env-config.d.ts +6 -0
- package/dist/server/config/env-schema.d.ts +149 -2
- package/dist/server/config/env-schema.js +1 -1
- package/dist/server/config/env-schemas/feature-flags.d.ts +12 -0
- package/dist/server/config/env-schemas/feature-flags.js +1 -1
- package/dist/server/constants/feedback.d.ts +2 -0
- package/dist/server/constants/feedback.js +1 -1
- package/dist/server/node-bundle-entry.js +1 -1
- package/dist/server/persistence/cache/repositories/cache-repository.js +1 -1
- package/dist/server/persistence/file-hashes/repositories/file-hashes-repository.js +1 -1
- package/dist/server/persistence/kv/repositories/kv-repository.d.ts +1 -1
- package/dist/server/persistence/kv/repositories/kv-repository.js +2 -2
- package/dist/server/persistence/kv/services/kv-service.d.ts +3 -2
- package/dist/server/persistence/kv/services/kv-service.js +1 -1
- package/dist/server/plugins/catalog-entities/database/catalog-entities-service.d.ts +2 -1
- package/dist/server/plugins/catalog-entities/database/catalog-entities-service.js +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/catalog-entities-repository.d.ts +1 -4
- package/dist/server/plugins/catalog-entities/database/repositories/catalog-entities-repository.js +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/entities/entities-read-repository.js +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/entities/entities-write-repository.js +1 -1
- package/dist/server/plugins/entitlements/utils/get-billed-catalog-build-pages-count.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-link.js +1 -1
- package/dist/server/plugins/markdown/search/create-render-tag-fn.d.ts +4 -0
- package/dist/server/plugins/markdown/search/create-render-tag-fn.js +1 -0
- package/dist/server/plugins/markdown/search/get-ai-search-documents.js +7 -8
- package/dist/server/plugins/markdown/search/join-section-content.d.ts +3 -0
- package/dist/server/plugins/markdown/search/join-section-content.js +2 -0
- package/dist/server/plugins/markdown/search/nodes/heading-node.d.ts +1 -7
- package/dist/server/plugins/markdown/search/nodes/section-node.d.ts +2 -14
- package/dist/server/plugins/markdown/search/nodes/section-node.js +1 -1
- package/dist/server/plugins/markdown/search/nodes/tag-node.d.ts +1 -7
- package/dist/server/plugins/markdown/search/walk-sections.d.ts +3 -1
- package/dist/server/plugins/markdown/search/walk-sections.js +1 -1
- package/dist/server/plugins/openapi-docs/search/get-ai-search-documents.d.ts +2 -2
- package/dist/server/plugins/openapi-docs/search/get-ai-search-documents.js +30 -30
- package/dist/server/plugins/scorecards/database/repositories/scorecards-config-repository.d.ts +4 -0
- package/dist/server/plugins/scorecards/database/repositories/scorecards-config-repository.js +1 -1
- package/dist/server/plugins/scorecards/database/scorecards-config-service.d.ts +4 -4
- package/dist/server/plugins/scorecards/database/scorecards-config-service.js +1 -1
- package/dist/server/plugins/search/ai-indexer/prepare-semantic-documents.js +3 -1
- package/dist/server/providers/database/base-service.d.ts +25 -0
- package/dist/server/providers/database/base-service.js +1 -0
- package/dist/server/providers/database/database-preconnect-service.js +1 -1
- package/dist/server/providers/database/instance-cache-resolver.d.ts +19 -0
- package/dist/server/providers/database/instance-cache-resolver.js +1 -0
- package/dist/server/store.d.ts +2 -34
- package/dist/server/types/plugins/common.d.ts +5 -0
- package/dist/server/types/plugins/markdown.d.ts +3 -0
- package/dist/server/utils/is-api-download-link.d.ts +2 -0
- package/dist/server/utils/is-api-download-link.js +1 -0
- package/dist/server/utils/is-realm-or-reef.d.ts +2 -0
- package/dist/server/utils/is-realm-or-reef.js +1 -0
- package/dist/server/utils/llmstxt/agent-feedback-llms-footer.d.ts +3 -0
- package/dist/server/utils/llmstxt/agent-feedback-llms-footer.js +2 -0
- package/dist/server/utils/shared-data.js +1 -1
- package/dist/server/web-server/dev-server.js +1 -1
- package/dist/server/web-server/routes/auth.js +1 -1
- package/dist/server/web-server/routes/feedback.d.ts +16 -0
- package/dist/server/web-server/routes/feedback.js +1 -1
- package/dist/server/web-server/utils/feedback-ip.d.ts +2 -0
- package/dist/server/web-server/utils/feedback-ip.js +1 -0
- package/dist/server/web-server/utils/get-client-ip.d.ts +1 -0
- package/dist/server/web-server/utils/get-client-ip.js +1 -1
- package/dist/utils/auth/is-auth-route-path.js +1 -0
- package/package.json +7 -7
- package/dist/client/utils/auth/is-auth-route-path.js +0 -1
- package/dist/server/plugins/catalog-entities/utils/has-options-changed.d.ts +0 -2
- package/dist/server/plugins/catalog-entities/utils/has-options-changed.js +0 -1
- /package/dist/{client/utils → utils}/auth/is-auth-route-path.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @redocly/realm
|
|
2
2
|
|
|
3
|
+
## 0.134.0-next.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 98c2a8d099e: Fixed scroll synchronization between the editor and the Webview.
|
|
8
|
+
|
|
9
|
+
## 0.134.0-next.2
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 369752b7a65: Added `renderForLlms` to custom Markdoc tag schemas to control output for LLMs.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 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.
|
|
18
|
+
- 140606ccd0c: Fixed issue where the link checker incorrectly reported valid authentication links as broken.
|
|
19
|
+
- 43168a71e27: Fixed an issue where IP addresses associated with submitted feedback were inaccurate due to proxy or CDN chains.
|
|
20
|
+
- Updated dependencies [369752b7a65]
|
|
21
|
+
- Updated dependencies [45d17147cbc]
|
|
22
|
+
- Updated dependencies [082d73f2c3c]
|
|
23
|
+
- @redocly/theme@0.66.0-next.2
|
|
24
|
+
- @redocly/realm-asyncapi-sdk@0.12.0-next.2
|
|
25
|
+
- @redocly/openapi-docs@3.22.0-next.2
|
|
26
|
+
- @redocly/asyncapi-docs@1.11.0-next.2
|
|
27
|
+
- @redocly/graphql-docs@1.11.0-next.2
|
|
28
|
+
- @redocly/portal-plugin-mock-server@0.19.0-next.2
|
|
29
|
+
|
|
3
30
|
## 0.134.0-next.1
|
|
4
31
|
|
|
5
32
|
### Minor Changes
|
|
@@ -56,6 +83,15 @@
|
|
|
56
83
|
- @redocly/graphql-docs@1.11.0-next.0
|
|
57
84
|
- @redocly/openapi-docs@3.22.0-next.0
|
|
58
85
|
|
|
86
|
+
## 0.133.1
|
|
87
|
+
|
|
88
|
+
### Patch Changes
|
|
89
|
+
|
|
90
|
+
- e69c304a76: 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.
|
|
91
|
+
- Updated dependencies [3aa79f51c8]
|
|
92
|
+
- @redocly/realm-asyncapi-sdk@0.11.1
|
|
93
|
+
- @redocly/theme@0.65.0
|
|
94
|
+
|
|
59
95
|
## 0.133.0
|
|
60
96
|
|
|
61
97
|
### Minor Changes
|
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
type BlockHeight = {
|
|
1
|
+
export type BlockHeight = {
|
|
2
2
|
height: number;
|
|
3
3
|
offset: number;
|
|
4
4
|
};
|
|
5
5
|
/**
|
|
6
|
-
* Calculates the height of each block element within
|
|
7
|
-
* A block is defined as content between two heading elements or from start/end of
|
|
6
|
+
* Calculates the height of each block element within markdown content, accounting for margins between blocks.
|
|
7
|
+
* A block is defined as content between two heading elements or from start/end of the content root.
|
|
8
8
|
* @returns An array containing the heights and offsets of all block elements.
|
|
9
9
|
*/
|
|
10
10
|
export declare function getBlocksHeight(): BlockHeight[];
|
|
11
11
|
/**
|
|
12
|
-
* Calculates the offset top position of
|
|
13
|
-
*
|
|
14
|
-
* @param sequenceNumber - The sequence number of the block element (0-based index).
|
|
15
|
-
* @returns The offset top position of the block element with the specified sequenceNumber, adjusted for nav height.
|
|
16
|
-
* Returns 0 if the sequence number is invalid or no block is found.
|
|
17
|
-
*/
|
|
18
|
-
export declare function getBlockOffsetTop(sequenceNumber: number): number;
|
|
19
|
-
/**
|
|
20
|
-
* Calculates the offset top position of an article element, adjusted for navigation height.
|
|
21
|
-
* @returns The offset top position of the article relative to the viewport, accounting for fixed navigation.
|
|
12
|
+
* Calculates the offset top position of markdown content, adjusted for navigation height.
|
|
13
|
+
* @returns The offset top position of the content relative to the viewport, accounting for fixed navigation.
|
|
22
14
|
*/
|
|
23
15
|
export declare const getArticleOffsetTop: () => number;
|
|
24
16
|
/**
|
|
@@ -26,5 +18,4 @@ export declare const getArticleOffsetTop: () => number;
|
|
|
26
18
|
* @returns The height of the navigation element in pixels, or 0 if no nav element exists.
|
|
27
19
|
*/
|
|
28
20
|
export declare const getNavHeight: () => number;
|
|
29
|
-
export {};
|
|
30
21
|
//# sourceMappingURL=getBlocksHeight.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const g='main[data-component-name="Markdown/Markdown"]',h='[data-component-name="Markdoc/Heading/Heading"]';function a(){return document.querySelector(g)}function u(t){const e=Array.from(t.querySelectorAll(h));return e.length>0?e:Array.from(t.querySelectorAll("h1, h2, h3, h4, h5, h6"))}function l(){const t=a();if(!t)return[];const e=u(t);if(e.length===0)return[{offset:n(t),height:t.offsetHeight}];const o=[],f=n(t),s=n(e[0]);s>f&&o.push({offset:f,height:s-f});for(let r=0;r<e.length;r++){const c=n(e[r]),i=(r+1<e.length?n(e[r+1]):n(t)+t.offsetHeight)-c;i>0&&o.push({height:i,offset:c})}return o}const m=()=>{const t=a(),e=t?n(t):0,o=d();return e-o},d=()=>document.querySelector("nav")?.offsetHeight??0;function n(t){if(!t)return 0;const e=window.getComputedStyle(t),o=parseFloat(e.getPropertyValue("margin-top"))||0;return t.offsetTop-o}export{m as getArticleOffsetTop,l as getBlocksHeight,d as getNavHeight};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isLocalLink as f}from"../../../utils/path/is-local-link.js";import{isAuthRoutePath as m}from"
|
|
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{getBlocksHeight as s,getArticleOffsetTop as f,getNavHeight as
|
|
1
|
+
import{getBlocksHeight as s,getArticleOffsetTop as f,getNavHeight as u}from"./getBlocksHeight.js";function m(t,n=0){if(typeof t>"u"){window.scrollTo({top:0,behavior:"smooth"});return}const o=s(),e=u();if(!o[n])return;const{height:r,offset:c}=o[n],i=Math.round(c-e+r*(Math.round(t)/100));window.scrollTo({top:i,behavior:"instant"})}const p=t=>{const n=f(),o=u();if(t<n)return{percentScrolled:0,sequenceNumber:-1};const e=s(),r=h(t+o,e);if(r===-1||!e[r])return{percentScrolled:0,sequenceNumber:-1};const{height:c,offset:i}=e[r];return c<=0?{percentScrolled:0,sequenceNumber:-1}:{percentScrolled:l(Math.round((t+o-i)/c*100)),sequenceNumber:r}};function l(t){return Math.max(0,Math.min(100,t))}function h(t,n){const o=n.findIndex(({offset:e,height:r})=>t>=e&&t<e+r);if(o!==-1)return o;for(let e=n.length-1;e>=0;e--)if(t>=n[e].offset)return e;return-1}export{m as syncScrollWithEditor,p as syncScrollWithProject};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useEffect as c,useState as s}from"react";import{useNavigate as l}from"react-router-dom";import{isLocalLink as
|
|
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
|
|
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
|
-
|
|
10
|
+
renderForLlms?: import("@redocly/theme/markdoc/tags/types").RenderForLlmsFn;
|
|
11
|
+
} & {
|
|
22
12
|
dynamicComponentLib?: string;
|
|
23
13
|
});
|
|
24
14
|
};
|