@redocly/revel-reef 0.128.0-next.10 → 0.128.0-next.11
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 +13 -0
- package/dist/cli/prepare/analytics/collectors/get-config-stats-usage.js +1 -1
- package/dist/client/TestProvider.js +1 -1
- package/dist/client/app/search/useAiSearch.d.ts +1 -1
- package/dist/client/app/search/useAiSearch.js +1 -1
- package/dist/client/app/search/useSearch.d.ts +1 -1
- package/dist/client/app/search/useSearch.js +1 -1
- package/dist/client/providers/theme/ThemeDataProvider.js +1 -1
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @redocly/revel-reef
|
|
2
2
|
|
|
3
|
+
## 0.128.0-next.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6c86ae4655: Updated `@redocly/openapi-core` to version `2.12.3`.
|
|
8
|
+
- Updated dependencies [190f5656a7]
|
|
9
|
+
- Updated dependencies [6c86ae4655]
|
|
10
|
+
- @redocly/realm-asyncapi-sdk@0.6.0-next.2
|
|
11
|
+
- @redocly/openapi-docs@3.16.0-next.11
|
|
12
|
+
- @redocly/theme@0.60.0-next.7
|
|
13
|
+
- @redocly/asyncapi-docs@1.5.0-next.11
|
|
14
|
+
- @redocly/portal-plugin-mock-server@0.13.0-next.11
|
|
15
|
+
|
|
3
16
|
## 0.128.0-next.10
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{loadConfig as r}from"@redocly/openapi-core";import a from"node:path";import{access as
|
|
1
|
+
import{loadConfig as r}from"@redocly/openapi-core";import a from"node:path";import{access as i}from"node:fs/promises";import{CONFIG_FILE_NAME as e}from"../../../../constants/common.js";import{getPortalConfigStats as c}from"../../../telemetry/get-portal-config-stats.js";const C=async({context:t})=>{const o=a.join(t.fs.cwd,e),n=await f(o);return{version:"2",name:"buildContext",value:c(n)}};async function f(t){try{await i(t)}catch{return{}}const o=await r({configPath:t});return o.document?.parsed||o.resolvedConfig}export{C as getConfigStatsUsage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"react";import{BrowserRouter as o}from"react-router-dom";import{ThemeDataContext as n,SearchSessionProvider as i}from"@redocly/theme/core/contexts";import u from"@redocly/theme/core/templates/Markdown";import{useBreadcrumbs as m,useBanner as d,useCatalogClassic as l,useCurrentProduct as c,useGlobalData as p,useI18n as g,useI18nConfig as h,useL10n as f,useL10nConfig as b,usePageData as T,usePageSharedData as C,usePageVersions as k,usePreloadHistory as v,useProducts as w,useUserMenu as P,useSubmitFeedback as S,useTranslate as D,useSidebarSiblingsData as y,usePageProps as $,useUserTeams as E,useMarkdownText as I,useCodeHighlight as L,useLoadAndNavigate as x,useCatalog as H,useCatalogSort as M,useCatalogSearch as F,useFetchCatalogEntities as A,useFetchCatalogEntitiesRelations as B,useTelemetry as r,useMcpData as R}from"./app/hooks";import{Link as G}from"./app/Link";import{useFacetQuery as O,useSearch as U,useAiSearch as N}from"./app/search";import{useSidebarItems as Q}from"./app/Sidebar/useSidebarItems";import{PageDataContext as V}from"./providers/page-data/PageDataContext";const s={Template:({pageProps:a,children:t})=>e.createElement(u,{pageProps:{...a,metadata:{...a.metadata,markdoc:{tagList:[]}}}},t),templateId:"markdown",isPublic:!0,props:{seo:{title:"Test"},ast:{$$mdtype:"Tag",name:"div",children:[{$$mdtype:"Tag",name:"Heading",attributes:{id:"github-flavored-markdown",level:1},children:["GitHub-flavored markdown"]},{$$mdtype:"Tag",name:"p",attributes:{},children:["These exercises assume you have",{$$mdtype:"Tag",name:"a",attributes:{href:"https://docs.redoc.ly/"},children:["basic markdown knowledge"]},"."]},{$$mdtype:"Tag",name:"Heading",attributes:{id:"create-a-new-plain-markdown-page",level:2},children:["Create a new plain markdown page"]}]},lastModified:new Date("2022-01-01").toISOString()},slug:"",userData:{isAuthenticated:!1,name:"test name",picture:""},sidebar:null,sharedData:{},sharedDataIds:{}},j={useBreadcrumbs:m,useBanner:d,useCatalog:H,useCatalogSort:M,useCatalogSearch:F,useFetchCatalogEntities:A,useFetchCatalogEntitiesRelations:B,useCatalogClassic:l,useCurrentProduct:c,useGlobalData:p,useSearch:U,useAiSearch:N,useFacetQuery:O,useI18n:g,useI18nConfig:h,useL10n:f,useL10nConfig:b,usePageData:T,usePageSharedData:C,usePageVersions:k,usePreloadHistory:v,useProducts:w,useUserMenu:P,useSidebarItems:Q,useSidebarSiblingsData:y,useSubmitFeedback:S,useTranslate:D,useUserTeams:E,usePageProps:$,useMarkdownText:I,useCodeHighlight:L,useLoadAndNavigate:x,useTelemetry:r,useOtelTelemetry:r,useMcpData:R},q={LinkComponent:G},z={hooks:j,components:q,config:{}};function te({children:a,customPageData:t}){return e.createElement(o,null,e.createElement(i,null,e.createElement(V.Provider,{value:{...s,...t,props:{...s.props,...t?.props}}},e.createElement(n.Provider,{value:z},a))))}export{te as TestProvider};
|
|
@@ -3,7 +3,7 @@ import { AiSearchError } from '@redocly/theme/core/constants';
|
|
|
3
3
|
type AiSearchOptions = {
|
|
4
4
|
filter?: SearchFilterItem[];
|
|
5
5
|
};
|
|
6
|
-
export declare function useAiSearch(options?: AiSearchOptions
|
|
6
|
+
export declare function useAiSearch(options?: AiSearchOptions): {
|
|
7
7
|
askQuestion: (question: string, history?: AiSearchConversationItem[]) => Promise<void>;
|
|
8
8
|
isGeneratingResponse: boolean;
|
|
9
9
|
response: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCallback as w,useState as o}from"react";import{AiSearchError as c}from"@redocly/theme/core/constants";import{withPathPrefix as K}from"@redocly/theme/core/utils";import{ServerRoutes as L}from"../../../constants/common";import{useI18nConfig as
|
|
1
|
+
import{useCallback as w,useState as o}from"react";import{AiSearchError as c}from"@redocly/theme/core/constants";import{withPathPrefix as K}from"@redocly/theme/core/utils";import{ServerRoutes as L}from"../../../constants/common";import{useSearchSession as U}from"@redocly/theme/core/contexts";import{useI18nConfig as _,useCurrentProduct as j,usePageVersions as B}from"../hooks";import{telemetry as W}from"../telemetry/index.js";function re(k){const{searchSessionId:x}=U(),[E,m]=o(),[b,g]=o([]),[M,P]=o(""),[O,i]=o([]),[Q,n]=o(!1),[v,e]=o(null),[I,l]=o(null),{currentLocale:F}=_(),J=j(),{versions:N=[]}=B()||{},h=N.find(t=>t?.active),S=w(()=>{m(""),g([]),n(!1),e(null)},[m,g,e]),G=w(()=>{S(),i([])},[S,i]);return{askQuestion:async(t,H)=>{if(!t)return;I&&I.abort();const A=new AbortController;l(A),S(),n(!0),P(t);let u="";fetch(K(L.ASK_AI),{method:"POST",body:JSON.stringify({text:t,history:H||[],locale:F,product:J?.name,filter:k?.filter,version:h&&{folder:h.folderId,label:h.label}}),signal:A.signal}).then(r=>{if(!r.ok){n(!1),r.status===401?e(c.Unauthorized):r.status===403?e(c.Forbidden):e(c.HttpRequestFailed);return}let f="";const y=r.body;if(!y)return;const T=y.getReader(),C=()=>{T.read().then(({value:d,done:V})=>{if(V){n(!1),l(null),f||e(c.EmptyResponse),t.trim().length>0&&u&&W.sendSearchAIQueryMessage({question:t,answer:f,resources:JSON.stringify(b),searchSessionId:x,messageId:u});return}const z=new TextDecoder().decode(d),D=/data: (.*)/g;let p;for(;(p=D.exec(z))!==null;){if(!p[1])continue;const a=JSON.parse(p[1]);if(a.messageId)u=a.messageId,i(s=>{if(s.length===0)return s;const R=s[s.length-1];return R.role==="assistant"&&!R.messageId?[...s.slice(0,-1),{...R,messageId:u}]:s});else if(a.answer)f+=a.answer,m(f);else if(a.sources){const s=Math.floor(Math.random()*3)+4;g(a.sources.slice(0,s))}}C()}).catch(d=>{d.name!=="AbortError"&&(console.error(d),n(!1),l(null),e(c.ErrorProcessingResponse))})};C()}).catch(r=>{r.name!=="AbortError"&&(console.error(r),n(!1),l(null),e(c.HttpRequestFailed))})},isGeneratingResponse:Q,response:E,resources:b,question:M,error:v,clearConversation:G,conversation:O,setConversation:i}}export{re as useAiSearch};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SearchItemData, SearchFilterItem, SearchFacet } from '@redocly/theme/core/types';
|
|
2
|
-
export declare function useSearch(product?: string, disableAutoSearch?: boolean
|
|
2
|
+
export declare function useSearch(product?: string, disableAutoSearch?: boolean): {
|
|
3
3
|
query: string;
|
|
4
4
|
setQuery: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
5
5
|
filter: SearchFilterItem[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCallback as
|
|
1
|
+
import{useCallback as I,useEffect as y,useState as F,useRef as T}from"react";import{SEARCH_DEBOUNCE_TIME_MS as G}from"@redocly/theme/core/constants";import{withPathPrefix as _}from"@redocly/theme/core/utils";import{SEARCH_GROUP_FACET_FIELD as b,SEARCH_PRODUCT_FIELD as N,SEARCH_VERSION_FIELD as k,ServerRoutes as O}from"../../../constants/common";import{debounce as M}from"../../../utils/time/debounce.js";import{useSearchSession as Q}from"@redocly/theme/core/contexts";import{useGlobalData as U,useI18nConfig as P}from"../hooks";import{usePageVersions as x}from"../../providers/page-data/hooks";import{useFacets as J}from"./useFacets";import{telemetry as B}from"../telemetry/index.js";const K=(s,n,e,r,a,c,i,f)=>{const{searchSessionId:d}=Q(),{currentLocale:m}=P(),l=T(""),p=I(M(async(t,h,u,S)=>{if(!t.trim().length&&!h.length){e({}),r({}),a(!1);return}const R={method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:t,filter:A(h,S,c),locale:u})};try{const o=await fetch(_(O.SEARCH),R);if(l.current===t){const E=await o.json();r(E.facets),e(E.documents),t.trim().length>1&&B.sendSearchQueryMessage({query:t,resultCount:Object.keys(E.documents).length.toString(),searchSessionId:d})}a(!1)}catch(o){e({}),console.log(o)}},G),[c?.version,c?.folderId,i]);return y(()=>{f||(a(!0),p(s,n,m,i),l.current=s)},[f,n,m,i,s,p,a]),{}},z=(s,n,e,r,a,c,i,f)=>{const{currentLocale:d}=P();y(()=>{m(e,s,n,d,r,a,f)},[r,f]);const m=I(async(l,p,t,h,u,S,R)=>{if(u){const{groupKey:o}=u;i(!0);const v={method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:p,filter:(()=>{const g=S.find(C=>C.field===b);return g&&!t.find(L=>L.field===g?.field)?[...t,{field:g.field,values:[o]}]:A(t,R)})(),loadMore:u,locale:h})},D=await(await fetch(_(O.SEARCH),v)).json(),H=l[o]||[],j=D.documents[o],w={...l,[o]:[...H,...j]};c(w),i(!1)}},[]);return{}};function ne(s,n){const{searchFeatures:e}=U(),[r,a]=F(""),[c,i]=F([]),[f,d]=F({}),[m,l]=F({}),[p,t]=F(),[h,u]=F(!1),{facets:S}=J(m),{versions:R=[]}=x()||{},o=R.find(E=>E?.active);return K(r,c,d,l,u,o,s,n),z(r,c,f,p,S,d,u,s),{query:r,setQuery:a,filter:c,setFilter:i,items:f,isSearchLoading:h,facets:S,groupField:b,setLoadMore:t,advancedSearch:e?.advanced?.enabled,askAi:e?.ai?.enabled}}function A(s,n,e){return[...s,...n?[{field:N,values:[n]}]:[],...e?[{field:k,values:[...e.default?["default"]:[e.folderId,e.version]]}]:[]]}export{ne as useSearch};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"react";import{ThemeDataContext as m,SearchSessionProvider as l}from"@redocly/theme/core/contexts";import{useBreadcrumbs as d,useBanner as g,useCatalogClassic as p,useCurrentProduct as f,useGlobalData as o,useI18n as b,useI18nConfig as C,useL10n as S,useL10nConfig as h,usePageData as r,usePageSharedData as P,usePageVersions as T,usePreloadHistory as D,useProducts as k,useUserMenu as v,useSubmitFeedback as F,useTranslate as L,useSidebarSiblingsData as M,usePageProps as E,useUserTeams as O,useMarkdownText as R,useCodeHighlight as w,useLoadAndNavigate as x,useCatalog as y,useCatalogSort as A,useCatalogSearch as I,useFetchCatalogEntities as j,useFetchCatalogEntitiesRelations as B,useTelemetry as s,useMcpData as H}from"../../app/hooks";import{Link as N}from"../../app/Link";import{useFacetQuery as U,useSearch as _,useAiSearch as G}from"../../app/search";import{useSidebarItems as Q}from"../../app/Sidebar/useSidebarItems";import{deepMerge as V}from"../../../utils/object/deep-merge";import{allowlistObject as W}from"../../../utils/object/allowlist-object";const q=["title","description","seo","sidebar","excludeFromSearch","template","redirects","rbac","metadata","slug","codeSnippet","breadcrumbs","markdown","seo","navbar","footer","colorMode","feedback","navigation","banner"],z={useBreadcrumbs:d,useBanner:g,useCatalog:y,useCatalogSort:A,useCatalogSearch:I,useFetchCatalogEntities:j,useFetchCatalogEntitiesRelations:B,useCatalogClassic:p,useCurrentProduct:f,useGlobalData:o,useSearch:_,useAiSearch:G,useFacetQuery:U,useI18n:b,useI18nConfig:C,useL10n:S,useL10nConfig:h,usePageData:r,usePageSharedData:P,usePageVersions:T,usePreloadHistory:D,useProducts:k,useUserMenu:v,useSidebarItems:Q,useSidebarSiblingsData:M,useSubmitFeedback:F,useTranslate:L,useUserTeams:O,usePageProps:E,useMarkdownText:R,useCodeHighlight:w,useLoadAndNavigate:x,useTelemetry:s,useOtelTelemetry:s,useMcpData:H},J={LinkComponent:N};function oe({children:n}){const{props:t}=r()||{},a=o()||{},u=e.useMemo(()=>{const c=W(t?.frontmatter||{},q);return V(a,c)},[a,t?.frontmatter]),i={hooks:z,components:J,config:u};return e.createElement(l,null,e.createElement(m.Provider,{value:i},n))}export{oe as ThemeDataProvider};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/revel-reef",
|
|
3
|
-
"version": "0.128.0-next.
|
|
3
|
+
"version": "0.128.0-next.11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@opentelemetry/sdk-trace-web": "2.0.1",
|
|
33
33
|
"@opentelemetry/semantic-conventions": "1.34.0",
|
|
34
34
|
"@redocly/ajv": "8.17.1",
|
|
35
|
-
"@redocly/openapi-core": "2.12.
|
|
35
|
+
"@redocly/openapi-core": "2.12.3",
|
|
36
36
|
"@shikijs/transformers": "^1.22.2",
|
|
37
37
|
"@tanstack/react-query": "5.62.3",
|
|
38
38
|
"@tanstack/react-table": "8.21.3",
|
|
@@ -70,10 +70,10 @@
|
|
|
70
70
|
"os-browserify": "0.3.0",
|
|
71
71
|
"path-browserify": "1.0.1",
|
|
72
72
|
"picomatch": "2.3.1",
|
|
73
|
-
"react": "^19.1
|
|
73
|
+
"react": "^19.2.1",
|
|
74
74
|
"react-calendar": "5.1.0",
|
|
75
75
|
"react-date-picker": "11.0.0",
|
|
76
|
-
"react-dom": "^19.1
|
|
76
|
+
"react-dom": "^19.2.1",
|
|
77
77
|
"react-router-dom": "^6.21.1",
|
|
78
78
|
"react-select": "5.10.1",
|
|
79
79
|
"reactjs-popup": "2.0.6",
|
|
@@ -92,18 +92,18 @@
|
|
|
92
92
|
"xml-crypto": "6.0.1",
|
|
93
93
|
"xpath": "0.0.34",
|
|
94
94
|
"yaml-ast-parser": "0.0.43",
|
|
95
|
-
"@redocly/asyncapi-docs": "1.5.0-next.
|
|
96
|
-
"@redocly/config": "0.
|
|
95
|
+
"@redocly/asyncapi-docs": "1.5.0-next.11",
|
|
96
|
+
"@redocly/config": "0.41.0",
|
|
97
97
|
"@redocly/graphql-docs": "1.5.0-next.1",
|
|
98
|
-
"@redocly/openapi-docs": "3.16.0-next.
|
|
98
|
+
"@redocly/openapi-docs": "3.16.0-next.11",
|
|
99
99
|
"@redocly/portal-legacy-ui": "0.11.0-next.0",
|
|
100
|
-
"@redocly/portal-plugin-mock-server": "0.13.0-next.
|
|
101
|
-
"@redocly/realm-asyncapi-sdk": "0.6.0-next.
|
|
100
|
+
"@redocly/portal-plugin-mock-server": "0.13.0-next.11",
|
|
101
|
+
"@redocly/realm-asyncapi-sdk": "0.6.0-next.2",
|
|
102
102
|
"@redocly/theme": "0.60.0-next.7"
|
|
103
103
|
},
|
|
104
104
|
"peerDependencies": {
|
|
105
|
-
"react": "^19.1
|
|
106
|
-
"react-dom": "^19.1
|
|
105
|
+
"react": "^19.2.1",
|
|
106
|
+
"react-dom": "^19.2.1"
|
|
107
107
|
},
|
|
108
108
|
"nx": {
|
|
109
109
|
"implicitDependencies": [
|