Skip to content

Commit 160fca1

Browse files
authored
Update OpenAPI design (#2787)
1 parent e90c96f commit 160fca1

31 files changed

+1491
-480
lines changed

.changeset/purple-wombats-heal.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@gitbook/react-openapi': minor
3+
'gitbook': minor
4+
---
5+
6+
new OpenAPI blocks design

.changeset/swift-gorillas-juggle.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'gitbook': patch
3+
'@gitbook/react-openapi': patch
4+
---
5+
6+
Support deprecated and x-deprecated-sunset in OpenAPI spec

bun.lock

Lines changed: 264 additions & 9 deletions
Large diffs are not rendered by default.

packages/gitbook/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@sentry/nextjs": "8.35.0",
3030
"@sindresorhus/fnv1a": "^3.1.0",
3131
"@tailwindcss/container-queries": "^0.1.1",
32-
"@tailwindcss/typography": "^0.5.10",
32+
"@tailwindcss/typography": "^0.5.16",
3333
"@upstash/redis": "^1.27.1",
3434
"ajv": "^8.12.0",
3535
"assert-never": "^1.2.1",

packages/gitbook/src/components/DocumentView/OpenAPI/OpenAPI.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ async function OpenAPIBody(props: BlockProps<DocumentBlockOpenAPI>) {
5151
icons: {
5252
chevronDown: <Icon icon="chevron-down" />,
5353
chevronRight: <Icon icon="chevron-right" />,
54+
plus: <Icon icon="plus" />,
5455
},
5556
CodeBlock: PlainCodeBlock,
5657
defaultInteractiveOpened: context.mode === 'print',

packages/gitbook/src/components/DocumentView/OpenAPI/scalar.css

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -263,32 +263,23 @@
263263
}
264264
.scalar-activate {
265265
width: fit-content;
266-
margin: 0px 0.75rem 0.75rem auto;
267266
line-height: 24px;
268267
font-size: 0.75rem;
269268
cursor: pointer;
270269
font-size: 0.875rem;
271-
font-weight: 600;
272270
display: flex;
273271
align-items: center;
274272
gap: 6px;
275273
}
276274
.scalar-activate-button {
277-
display: flex;
278-
gap: 6px;
279-
align-items: center;
280-
color: var(--scalar-color-blue);
281-
appearance: none;
282-
outline: none;
283-
border: none;
284-
background: transparent;
285-
}
286-
.scalar-activate-button {
287-
padding: 0 0.5rem;
288-
}
289-
.scalar-activate:hover .scalar-activate-button {
290-
background: var(--scalar-background-3);
291-
border-radius: 3px;
275+
@apply flex gap-1.5 items-center;
276+
@apply bg-primary-solid text-contrast-primary-solid hover:bg-primary-solid-hover hover:text-contrast-primary-solid-hover contrast-more:ring-1 rounded-md straight-corners:rounded-none place-self-start;
277+
@apply ring-1 ring-tint hover:ring-tint-hover;
278+
@apply shadow-sm shadow-tint dark:shadow-tint-1 hover:shadow-md active:shadow-none;
279+
@apply contrast-more:ring-tint-12 contrast-more:hover:ring-2 contrast-more:hover:ring-tint-12;
280+
@apply hover:scale-105 active:scale-100 transition-all;
281+
@apply grow-0 shrink-0 truncate;
282+
@apply text-sm px-2.5 py-1;
292283
}
293284

294285
.scalar-app-loading {

0 commit comments

Comments
 (0)