@redocly/openapi-docs 3.18.0-next.7 → 3.18.0-next.8

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.
@@ -1,4 +1,4 @@
1
- import{jsx as r}from"react/jsx-runtime";import{memo as S}from"react";import{useAtomValue as g}from"jotai";import{useLocation as I}from"react-router-dom";import{ArraySchema as b}from"./ArraySchema.js";import{ObjectSchema as p}from"./ObjectSchema.js";import{OneOfSchema as C}from"./OneOfSchema.js";import{RecursiveSchema as s}from"./RecursiveSchema.js";import{operationStore as j}from"../../jotai/operation.js";import{FieldDetails as A}from"../PropertyDetails/index.js";import{pathIncludesLink as L}from"../../utils/index.js";import{styled as P}from"../../styled-components.js";function k({schema:e,onDiscriminatorChange:u,onOneOfChange:n,...i}){const{activeOneOf:d}=g(j(e?.operationPointer||"")),h=I();if(!e)return null;const{type:t,oneOf:o,discriminatorProp:f,isCircular:O}=e;if(O)return r(s,{schema:e});if(f!==void 0){if(!o||!o.length)return console.warn(`Looks like you are using discriminator wrong: you don't have any definition inherited from the ${e.title}`),null;const m=o.findIndex((N,y)=>L(h,`d=${y}`)),l=m===-1?0:m,x=d[e.pointer]!==void 0?d[e.pointer]:l,a=o[x];return a?.isCircular?r(s,{schema:a}):r(p,{...i,schema:a,discriminator:{fieldName:f,parentSchema:e,activeOneOfIdx:l,onChange:u},onOneOfChange:n})}if(o!==void 0&&o.length>1)return r(C,{...i,schema:e,onChange:n});const c=Array.isArray(t)?t:[t];if(c.includes("object")){if(e.fields?.length)return r(p,{...i,schema:e,onOneOfChange:n})}else if(c.includes("array"))return r(b,{...i,schema:e,onOneOfChange:n});const v={schema:e,name:"",description:i.oneOfLevel?"":e.description,required:!1,deprecated:!1};return r(w,{children:r(A,{field:v,fieldParentsName:i.fieldParentsName})})}const H=S(k),w=P.div`
1
+ import{jsx as r}from"react/jsx-runtime";import{memo as S}from"react";import{useAtomValue as g}from"jotai";import{useLocation as I}from"react-router-dom";import{ArraySchema as b}from"./ArraySchema.js";import{ObjectSchema as p}from"./ObjectSchema.js";import{OneOfSchema as C}from"./OneOfSchema.js";import{RecursiveSchema as s}from"./RecursiveSchema.js";import{operationStore as j}from"../../jotai/operation.js";import{FieldDetails as A}from"../PropertyDetails/index.js";import{pathIncludesLink as L}from"../../utils/index.js";import{styled as P}from"../../styled-components.js";function k({schema:e,onDiscriminatorChange:u,onOneOfChange:n,...i}){const{activeOneOf:d}=g(j(e?.operationPointer||"")),h=I();if(!e)return null;const{type:t,oneOf:o,discriminatorProp:f,isCircular:O}=e;if(O)return r(s,{schema:e});if(f!==void 0){if(!o||!o.length)return console.warn(`Looks like you are using discriminator wrong: you don't have any definition inherited from the ${e.title}`),null;const m=o.findIndex((N,y)=>L(h,`d=${y}`)),l=m===-1?0:m,x=d[e.pointer]!==void 0?d[e.pointer]:l,a=o[x];return a?.isCircular?r(s,{schema:a}):r(p,{...i,schema:a,discriminator:{fieldName:f,parentSchema:e,activeOneOfIdx:l,onChange:u},onOneOfChange:n})}if(o!==void 0&&o.length>=1)return r(C,{...i,schema:e,onChange:n});const c=Array.isArray(t)?t:[t];if(c.includes("object")){if(e.fields?.length)return r(p,{...i,schema:e,onOneOfChange:n})}else if(c.includes("array"))return r(b,{...i,schema:e,onOneOfChange:n});const v={schema:e,name:"",description:i.oneOfLevel?"":e.description,required:!1,deprecated:!1};return r(w,{children:r(A,{field:v,fieldParentsName:i.fieldParentsName})})}const H=S(k),w=P.div`
2
2
  width: 100%;
3
3
  padding: var(--spacing-xxs) 0;
4
4
  border-bottom: 1px solid var(--border-color-primary);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/openapi-docs",
3
- "version": "3.18.0-next.7",
3
+ "version": "3.18.0-next.8",
4
4
  "description": "Redocly OpenAPI Docs",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@markdoc/markdoc": "0.5.2",
24
- "@redocly/openapi-core": "0.0.0-snapshot.1769511679",
24
+ "@redocly/openapi-core": "2.15.1",
25
25
  "deepmerge": "^4.2.2",
26
26
  "dompurify": "3.2.7",
27
27
  "fast-deep-equal": "^3.1.3",
@@ -39,7 +39,7 @@
39
39
  "util": "~0.12.5",
40
40
  "web-vitals": "3.3.1",
41
41
  "@redocly/config": "0.41.4",
42
- "@redocly/replay": "0.21.0-next.7"
42
+ "@redocly/replay": "0.21.0-next.8"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@shikijs/transformers": "3.21.0",
@@ -83,8 +83,7 @@
83
83
  "prepare:community-source-only": "pnpm run prepare:community-source --ignore /src/* private-readme.md",
84
84
  "prepare:community-dependencies": "pnpx tsx scripts/prepare-community-dependencies.ts",
85
85
  "apply:community-source": "pnpx tsx scripts/apply-changes-from-community-source.ts",
86
- "test": "pnpm run prepare:community-source && pnpm run test:redoc && vitest run",
87
- "test:redoc": "cd redoc && npm install ../../theme ../../redocly-config --no-save && npm run lint && npm run unit",
86
+ "test": "vitest run",
88
87
  "unit": "vitest run",
89
88
  "unit:update": "vitest run -u",
90
89
  "unit:watch": "vitest",