@umami/shiso 1.13.0 → 1.15.0
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/bin/shiso.mjs +0 -0
- package/dist/chunks/App.js +127 -124
- package/dist/chunks/architectureDiagram-5GKGNRK7.js +1 -1
- package/dist/chunks/chunk-GMAD6QVW.js +1 -1
- package/dist/chunks/cose-bilkent-JH36ORCC.js +1 -1
- package/dist/chunks/dist.js +1 -1
- package/dist/chunks/docs.js +206 -281
- package/dist/chunks/ganttDiagram-EL5Y4UJY.js +1 -1
- package/dist/chunks/src.js +1 -1
- package/dist/components.js +2 -2
- package/dist/entry-client.js +1 -1
- package/dist/entry-server.js +2 -2
- package/package.json +1 -1
- package/scripts/lib/openapi.mjs +42 -14
- package/src/components/OpenApiOperation.tsx +55 -64
- package/src/components/docs/Param.tsx +6 -0
- package/src/components/docs/PropertiesTable.tsx +68 -38
- package/src/components/docs/index.ts +2 -3
- package/src/components/docs/styles.ts +0 -8
- package/src/lib/openapi.ts +17 -1
- package/types/components.d.ts +5 -14
- package/src/components/docs/ParamField.tsx +0 -57
- package/src/components/docs/ResponseField.tsx +0 -48
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import { Badge } from './Badge';
|
|
3
|
-
import { styles } from './styles';
|
|
4
|
-
import { decodeHtmlEntities } from './utils';
|
|
5
|
-
|
|
6
|
-
type FieldValue = string | number | boolean | null | undefined;
|
|
7
|
-
|
|
8
|
-
export interface ResponseFieldProps {
|
|
9
|
-
name: string;
|
|
10
|
-
type?: FieldValue;
|
|
11
|
-
default?: FieldValue;
|
|
12
|
-
required?: boolean;
|
|
13
|
-
deprecated?: boolean;
|
|
14
|
-
children?: ReactNode;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export function ResponseField({ name, type, required, deprecated, children }: ResponseFieldProps) {
|
|
18
|
-
const normalizedType =
|
|
19
|
-
typeof type === 'string'
|
|
20
|
-
? decodeHtmlEntities(type)
|
|
21
|
-
: type === undefined || type === null
|
|
22
|
-
? undefined
|
|
23
|
-
: String(type);
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<div className={styles.field} data-slot="field-group-item">
|
|
27
|
-
<div className={styles.fieldHeader}>
|
|
28
|
-
<span className={styles.fieldName}>{name}</span>
|
|
29
|
-
{normalizedType ? (
|
|
30
|
-
<span className={styles.fieldType} data-slot="field-group-type">
|
|
31
|
-
{normalizedType}
|
|
32
|
-
</span>
|
|
33
|
-
) : null}
|
|
34
|
-
{required ? (
|
|
35
|
-
<Badge size="sm" tone="primary">
|
|
36
|
-
required
|
|
37
|
-
</Badge>
|
|
38
|
-
) : null}
|
|
39
|
-
{deprecated ? <Badge size="sm">deprecated</Badge> : null}
|
|
40
|
-
</div>
|
|
41
|
-
{children ? (
|
|
42
|
-
<div className={styles.fieldBody} data-slot="field-group-body">
|
|
43
|
-
{children}
|
|
44
|
-
</div>
|
|
45
|
-
) : null}
|
|
46
|
-
</div>
|
|
47
|
-
);
|
|
48
|
-
}
|