@redocly/redoc-revel 0.139.0-next.2 → 0.139.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @redocly/redoc-revel
2
2
 
3
+ ## 0.139.0-next.3
4
+
5
+ ### Patch Changes
6
+
7
+ - b07968f01e6: Fixed an issue in OpenAPI docs where the samples panel displayed a variant dropdown that had no effect on schemas with an `example` and a nested `oneOf` or `anyOf`.
8
+ - e3bbc9190a3: Updated `@redocly/openapi-core` to version `2.63.0`.
9
+ - 4e08c72bec8: Fixed an issue where Reunite project analytics displayed the number of result categories instead of the number of results for each search query.
10
+ - Updated dependencies [b07968f01e6]
11
+ - Updated dependencies [e3bbc9190a3]
12
+ - @redocly/api-docs@0.4.0-next.3
13
+ - @redocly/portal-plugin-mock-server@0.24.0-next.0
14
+
3
15
  ## 0.139.0-next.2
4
16
 
5
17
  ### Minor Changes
@@ -1 +1 @@
1
- import{useCallback as D,useEffect as k,useMemo as L,useState as S,useRef as A}from"react";import{SEARCH_DEBOUNCE_TIME_MS as U}from"@redocly/theme/core/constants";import{getBaseDataAttributes as B,withPathPrefix as v}from"@redocly/theme/core/utils";import{ServerRoutes as H}from"../../../constants/api";import{SEARCH_GROUP_FACET_FIELD as T,SEARCH_PRODUCT_FIELD as J,SEARCH_VERSION_FIELD as K}from"../../../constants/common";import{debounce as $}from"../../../utils/time/debounce.js";import{useSearchSession as z}from"@redocly/theme/core/contexts";import{useGlobalData as j,useI18nConfig as x}from"../hooks";import{usePageVersions as W}from"../../providers/page-data/hooks";import{useFacets as X}from"./useFacets";import{telemetry as Y}from"../telemetry/index.js";const Z=(n,u,r,i,R,s,F,l,o,d)=>{const{searchSessionId:C}=z(),{currentLocale:E}=x(),f=A(""),p=A(null),h=A(async(e,a)=>{try{F(null);const t=await fetch(v(H.SEARCH),a);if(!t.ok)throw new Error(t.statusText||`Search failed (${t.status})`);if(y(e)){const c=await t.json();i(c.facets),r(c.documents),R(c.groupCounts??{}),p.current=null,e.trim().length>1&&Y.sendSearchQueryMessage([{...B("searchQuery","search"),query:e,resultCount:Object.keys(c.documents).length.toString(),searchSessionId:C,...o&&{product:o}}]),s(!1)}}catch(t){if(!y(e))return;p.current={query:e,requestParams:a},r({}),s(!1),F(t instanceof Error?t.message:"An unknown error occurred")}}),y=e=>f.current===e,m=L(()=>$(async(e,a,t,c)=>{if(!e.trim().length&&!a.length){r({}),i({}),R({}),s(!1),F(null),p.current=null;return}const g={method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,filter:G(a,c,l),locale:t})};await h.current(e,g)},U),[l?.version,l?.folderId,o]);return k(()=>{d||(s(!0),m(n,u,E,o),f.current=n)},[d,u,E,o,n,m,s]),{retrySearch:D(async()=>{const e=p.current;e&&(s(!0),f.current=e.query,await h.current(e.query,e.requestParams))},[s])}},V=(n,u,r,i,R,s,F,l,o,d)=>{const{currentLocale:C}=x();k(()=>{E(r,n,u,C,i,R,o,d)},[i,o,d?.version,d?.folderId]);const E=D(async(f,p,h,y,m,b,e,a)=>{if(m){const{groupKey:t}=m;l(!0);const g={method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:p,filter:(()=>{const I=b.find(O=>O.field===T);let _=h;return I&&(h.find(q=>q.field===I.field)||(_=[...h,{field:I.field,values:[t]}])),G(_,e,a)})(),loadMore:m,locale:y})},w=await(await fetch(v(H.SEARCH),g)).json(),M=f[t]||[],N=w.documents[t]??[],Q={...f,[t]:[...M,...N]};s(Q),w.groupCounts&&F(I=>({...I,...w.groupCounts})),l(!1)}},[]);return{}};function fe(){const{searchFeatures:n}=j();return{askAi:n?.ai?.enabled}}function me(n,u){const{searchFeatures:r}=j(),[i,R]=S(""),[s,F]=S([]),[l,o]=S({}),[d,C]=S({}),[E,f]=S({}),[p,h]=S(),[y,m]=S(!1),[b,e]=S(null),{facets:a}=X(d),{versions:t=[]}=W()||{},c=t.find(P=>P?.active),{retrySearch:g}=Z(i,s,o,C,f,m,e,c,n,u);return V(i,s,l,p,a,o,f,m,n,c),{query:i,setQuery:R,filter:s,setFilter:F,items:l,isSearchLoading:y,searchError:b,facets:a,groupCounts:E,groupField:T,setLoadMore:h,retrySearch:g,advancedSearch:r?.advanced?.enabled,askAi:r?.ai?.enabled}}function G(n,u,r){return[...n,...u?[{field:J,values:[u]}]:[],...r?[{field:K,values:[...r.default?["default"]:[r.folderId,r.version]]}]:[]]}export{me as useSearch,fe as useSearchFeatures};
1
+ import{useCallback as v,useEffect as D,useMemo as L,useState as S,useRef as A}from"react";import{SEARCH_DEBOUNCE_TIME_MS as U}from"@redocly/theme/core/constants";import{getBaseDataAttributes as B,withPathPrefix as H}from"@redocly/theme/core/utils";import{ServerRoutes as T}from"../../../constants/api";import{SEARCH_GROUP_FACET_FIELD as j,SEARCH_PRODUCT_FIELD as J,SEARCH_VERSION_FIELD as K}from"../../../constants/common";import{debounce as $}from"../../../utils/time/debounce.js";import{useSearchSession as z}from"@redocly/theme/core/contexts";import{useGlobalData as k,useI18nConfig as x}from"../hooks";import{usePageVersions as W}from"../../providers/page-data/hooks";import{useFacets as X}from"./useFacets";import{telemetry as Y}from"../telemetry/index.js";const Z=(n,u,r,l,R,s,F,i,o,d)=>{const{searchSessionId:g}=z(),{currentLocale:E}=x(),f=A(""),p=A(null),h=A(async(e,a)=>{try{F(null);const t=await fetch(H(T.SEARCH),a);if(!t.ok)throw new Error(t.statusText||`Search failed (${t.status})`);if(C(e)){const c=await t.json();l(c.facets),r(c.documents),R(c.groupCounts??{}),p.current=null,e.trim().length>1&&Y.sendSearchQueryMessage([{...B("searchQuery","search"),query:e,resultCount:Object.values(c.documents).flat().length.toString(),searchSessionId:g,...o&&{product:o}}]),s(!1)}}catch(t){if(!C(e))return;p.current={query:e,requestParams:a},r({}),s(!1),F(t instanceof Error?t.message:"An unknown error occurred")}}),C=e=>f.current===e,m=L(()=>$(async(e,a,t,c)=>{if(!e.trim().length&&!a.length){r({}),l({}),R({}),s(!1),F(null),p.current=null;return}const y={method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,filter:G(a,c,i),locale:t})};await h.current(e,y)},U),[i?.version,i?.folderId,o]);return D(()=>{d||(s(!0),m(n,u,E,o),f.current=n)},[d,u,E,o,n,m,s]),{retrySearch:v(async()=>{const e=p.current;e&&(s(!0),f.current=e.query,await h.current(e.query,e.requestParams))},[s])}},V=(n,u,r,l,R,s,F,i,o,d)=>{const{currentLocale:g}=x();D(()=>{E(r,n,u,g,l,R,o,d)},[l,o,d?.version,d?.folderId]);const E=v(async(f,p,h,C,m,b,e,a)=>{if(m){const{groupKey:t}=m;i(!0);const y={method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:p,filter:(()=>{const I=b.find(O=>O.field===j);let _=h;return I&&(h.find(q=>q.field===I.field)||(_=[...h,{field:I.field,values:[t]}])),G(_,e,a)})(),loadMore:m,locale:C})},w=await(await fetch(H(T.SEARCH),y)).json(),M=f[t]||[],N=w.documents[t]??[],Q={...f,[t]:[...M,...N]};s(Q),w.groupCounts&&F(I=>({...I,...w.groupCounts})),i(!1)}},[]);return{}};function fe(){const{searchFeatures:n}=k();return{askAi:n?.ai?.enabled}}function me(n,u){const{searchFeatures:r}=k(),[l,R]=S(""),[s,F]=S([]),[i,o]=S({}),[d,g]=S({}),[E,f]=S({}),[p,h]=S(),[C,m]=S(!1),[b,e]=S(null),{facets:a}=X(d),{versions:t=[]}=W()||{},c=t.find(P=>P?.active),{retrySearch:y}=Z(l,s,o,g,f,m,e,c,n,u);return V(l,s,i,p,a,o,f,m,n,c),{query:l,setQuery:R,filter:s,setFilter:F,items:i,isSearchLoading:C,searchError:b,facets:a,groupCounts:E,groupField:j,setLoadMore:h,retrySearch:y,advancedSearch:r?.advanced?.enabled,askAi:r?.ai?.enabled}}function G(n,u,r){return[...n,...u?[{field:J,values:[u]}]:[],...r?[{field:K,values:[...r.default?["default"]:[r.folderId,r.version]]}]:[]]}export{me as useSearch,fe as useSearchFeatures};
@@ -15,7 +15,7 @@ export declare const featureFlagsSchema: z.ZodObject<{
15
15
  REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL: z.ZodOptional<z.ZodString>;
16
16
  /** (Optional) API endpoint for the agent feedback endpoint;**/
17
17
  REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT: z.ZodOptional<z.ZodString>;
18
- /** Experimental: enables the GraphQL request body in Try It and embedded Replay. */
18
+ /** Experimental: enables the GraphQL request body in Try It and embedded Replay, and shows Try it on GraphQL operation pages. */
19
19
  REDOCLY_EXP_REPLAY_GRAPHQL_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
20
20
  }, "strip", z.ZodTypeAny, {
21
21
  NEW_CATALOG_ENABLED?: boolean | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/redoc-revel",
3
- "version": "0.139.0-next.2",
3
+ "version": "0.139.0-next.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "bin": {
@@ -33,11 +33,11 @@
33
33
  "@opentelemetry/sdk-trace-web": "2.8.0",
34
34
  "@opentelemetry/semantic-conventions": "1.40.0",
35
35
  "@redocly/ajv": "8.18.0",
36
- "@redocly/api-docs": "0.4.0-next.2",
36
+ "@redocly/api-docs": "0.4.0-next.3",
37
37
  "@redocly/config": "0.65.0",
38
- "@redocly/openapi-core": "2.62.1",
38
+ "@redocly/openapi-core": "2.63.0",
39
39
  "@redocly/portal-legacy-ui": "0.19.0",
40
- "@redocly/portal-plugin-mock-server": "0.23.0",
40
+ "@redocly/portal-plugin-mock-server": "0.24.0-next.0",
41
41
  "@redocly/realm-asyncapi-sdk": "0.16.0",
42
42
  "@redocly/theme": "0.71.0-next.0",
43
43
  "@shikijs/transformers": "3.21.0",