Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/routes/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default (app: Hono, registry: OpenAPIRegistry) => {
registry.registerPath({
method: 'get',
path: '/api',
summary: 'Getting the OpenAPI specification for the cdnjs API',
summary: 'Fetch the OpenAPI specification for the cdnjs API',
description: [
'The `/api` endpoint will return a JSON object with full OpenAPI specification for the cdnjs API.',
'',
Expand Down
2 changes: 1 addition & 1 deletion src/routes/whitelist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default (app: Hono, registry: OpenAPIRegistry) => {
registry.registerPath({
method: 'get',
path: '/whitelist',
summary: 'Fetch details about the cdnjs file extension whitelist',
summary: 'Fetch the cdnjs file extension whitelist',
description: [
'The `/whitelist` endpoint returns a JSON object containing a list of extensions permitted on the CDN as well as categories for those extensions.',
'',
Expand Down
20 changes: 10 additions & 10 deletions src/utils/jsx/islands/swagger.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { css } from '@emotion/css';
import { Iterable, List, Map } from 'immutable';
import { type ComponentType, type ReactNode, useState } from 'react';
import { type ComponentType, Fragment, type ReactNode, useState } from 'react';
import SwaggerUI from 'swagger-ui-react';
import swaggerStyles from 'swagger-ui-react/swagger-ui.css';

Expand Down Expand Up @@ -232,6 +232,9 @@ const styles = {
flex-shrink: 0;
}
`,
path: css`
text-wrap: nowrap;
`,
loader: css`
position: absolute;
inset: 0;
Expand Down Expand Up @@ -447,15 +450,12 @@ const plugin = (system: System) => ({
expanded={isShown}
>
<code>
{path?.split(/\//g).map((part, i) =>
i === 0 ? (
part
) : (
<>
<wbr key={`wbr-${i}`} />/{part}
</>
),
)}
{path?.split(/(?=\/)/g).map((part) => (
<Fragment key={part}>
<wbr />
<span className={styles.path}>{part}</span>
</Fragment>
))}
</code>
<span>{summary}</span>
</Summary>
Expand Down
2 changes: 2 additions & 0 deletions src/utils/jsx/navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const styles = {
navigation: css`
position: relative;
isolation: isolate;
z-index: 1;

&::before {
content: '';
Expand Down Expand Up @@ -93,6 +94,7 @@ const styles = {
right: 0;
background: ${theme.background.navigation};
border-top: ${theme.spacing(0.25)} solid ${theme.background.brand};
border-bottom: ${theme.spacing(0.25)} solid ${theme.background.footer};
display: flex;
flex-direction: column;
gap: ${theme.spacing(0.5)};
Expand Down