api-render-ui 1.0.4 → 1.0.6
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/Readme.md +16 -20
- package/dist/index.cjs +1051 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +1024 -0
- package/dist/index.js.map +1 -0
- package/example/animal.html +370 -0
- package/package.json +33 -10
- package/scripts/inline-styles.mjs +34 -0
- package/{api-render-ui.css → src/api-render-ui.css} +2 -1
- package/src/api-render-ui.ts +1001 -0
- package/src/index.ts +1 -0
- package/src/inlined-styles.ts +256 -0
- package/src/main.ts +10 -0
- package/tsconfig.json +18 -0
- package/tsup.config.ts +11 -0
- package/api-render-ui.js +0 -871
- package/test.html +0 -1263
package/Readme.md
CHANGED
|
@@ -15,27 +15,23 @@ api-render-ui is a UI library that pursues simple and efficient data rendering f
|
|
|
15
15
|
[![NPM Downloads][npm-downloads-image]][npm-downloads-url]
|
|
16
16
|
[![OpenSSF Scorecard Badge][ossf-scorecard-badge]][ossf-scorecard-visualizer]
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const openapiSpec = {...};
|
|
34
|
-
|
|
35
|
-
apiRenderer.render(openapiSpec);
|
|
36
|
-
</script>
|
|
37
|
-
</body>
|
|
18
|
+
### Usage in typescript project
|
|
19
|
+
- Please install first
|
|
20
|
+
```
|
|
21
|
+
npm install api-render-ui
|
|
22
|
+
```
|
|
23
|
+
- Your typescript code
|
|
24
|
+
```typescript
|
|
25
|
+
import { ApiRenderer } from "api-render-ui"
|
|
26
|
+
|
|
27
|
+
const apiRenderer = new ApiRenderer({
|
|
28
|
+
mountPoint: '#notebook', // 可以是选择器字符串
|
|
29
|
+
});
|
|
30
|
+
// 执行渲染
|
|
31
|
+
apiRenderer.render(openapiSpec);
|
|
38
32
|
```
|
|
33
|
+
### Usage in single html
|
|
34
|
+
Please refer to [example](example/animal.html)
|
|
39
35
|
|
|
40
36
|
## Installation
|
|
41
37
|
|