@zpress/ui 0.2.0 → 0.2.2
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/LICENSE +1 -1
- package/README.md +44 -0
- package/dist/index.d.ts +27 -0
- package/package.json +26 -10
package/LICENSE
CHANGED
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/joggrdocs/zpress/main/assets/banner.svg" alt="zpress" width="90%" />
|
|
3
|
+
<p><strong>Rspress plugin, theme components, and styles for zpress.</strong></p>
|
|
4
|
+
|
|
5
|
+
<a href="https://github.com/joggrdocs/zpress/actions/workflows/ci.yml"><img src="https://github.com/joggrdocs/zpress/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI" /></a>
|
|
6
|
+
<a href="https://www.npmjs.com/package/@zpress/ui"><img src="https://img.shields.io/npm/v/@zpress/ui" alt="npm version" /></a>
|
|
7
|
+
<a href="https://github.com/joggrdocs/zpress/blob/main/LICENSE"><img src="https://img.shields.io/github/license/joggrdocs/zpress" alt="License" /></a>
|
|
8
|
+
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @zpress/ui
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Exports
|
|
18
|
+
|
|
19
|
+
| Path | Description |
|
|
20
|
+
| ------------------ | --------------------------------- |
|
|
21
|
+
| `@zpress/ui` | Rspress plugin and config builder |
|
|
22
|
+
| `@zpress/ui/theme` | Theme components (React) |
|
|
23
|
+
| `@zpress/ui/icons` | Icon components |
|
|
24
|
+
|
|
25
|
+
## API
|
|
26
|
+
|
|
27
|
+
| Export | Description |
|
|
28
|
+
| --------------------- | ------------------------------------------ |
|
|
29
|
+
| `createRspressConfig` | Build an Rspress config from zpress config |
|
|
30
|
+
| `zpressPlugin` | Rspress plugin for zpress integration |
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
import { createRspressConfig, zpressPlugin } from '@zpress/ui'
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Raw Source Exports
|
|
39
|
+
|
|
40
|
+
The `./theme` and `./icons` exports ship raw `.tsx`/`.ts` source files (not compiled output). This is intentional — Rspress theme components must be bundled by the consuming Rspress build pipeline to work correctly with its module resolution and hot-reload system.
|
|
41
|
+
|
|
42
|
+
## License
|
|
43
|
+
|
|
44
|
+
[MIT](https://github.com/joggrdocs/zpress/blob/main/LICENSE) - Joggr, Inc.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Paths } from '@zpress/core';
|
|
2
|
+
import type { RspressPlugin } from '@rspress/core';
|
|
3
|
+
import type { UserConfig } from '@rspress/core';
|
|
4
|
+
import type { ZpressConfig } from '@zpress/core';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Translate zpress config + sync engine output into a complete
|
|
8
|
+
* Rspress configuration object.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createRspressConfig(options: CreateRspressConfigOptions): UserConfig;
|
|
11
|
+
|
|
12
|
+
declare interface CreateRspressConfigOptions {
|
|
13
|
+
readonly config: ZpressConfig;
|
|
14
|
+
readonly paths: Paths;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Rspress plugin that registers zpress theme components and styles.
|
|
19
|
+
*
|
|
20
|
+
* Global styles are loaded via the theme entry (theme/index.tsx)
|
|
21
|
+
* CSS import — not through the plugin globalStyles property.
|
|
22
|
+
* Custom UI components are registered here as globalUIComponents so
|
|
23
|
+
* Rspress renders them on every page.
|
|
24
|
+
*/
|
|
25
|
+
export declare function zpressPlugin(): RspressPlugin;
|
|
26
|
+
|
|
27
|
+
export { }
|
package/package.json
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zpress/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
|
+
"description": "Rspress plugin, theme components, and styles for zpress",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"rspress",
|
|
8
|
+
"theme",
|
|
9
|
+
"ui",
|
|
10
|
+
"zpress"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://github.com/joggrdocs/zpress/tree/main/packages/ui#readme",
|
|
13
|
+
"bugs": "https://github.com/joggrdocs/zpress/issues",
|
|
4
14
|
"license": "MIT",
|
|
5
15
|
"repository": {
|
|
6
16
|
"type": "git",
|
|
@@ -14,7 +24,7 @@
|
|
|
14
24
|
"type": "module",
|
|
15
25
|
"exports": {
|
|
16
26
|
".": {
|
|
17
|
-
"types": "./
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
18
28
|
"import": "./dist/index.mjs"
|
|
19
29
|
},
|
|
20
30
|
"./theme": {
|
|
@@ -27,32 +37,38 @@
|
|
|
27
37
|
}
|
|
28
38
|
},
|
|
29
39
|
"publishConfig": {
|
|
30
|
-
"access": "public"
|
|
40
|
+
"access": "public",
|
|
41
|
+
"provenance": true
|
|
31
42
|
},
|
|
32
43
|
"dependencies": {
|
|
33
44
|
"@iconify-json/catppuccin": "^1.2.17",
|
|
34
45
|
"@iconify-json/devicon": "^1.2.59",
|
|
46
|
+
"@iconify-json/logos": "^1.2.10",
|
|
47
|
+
"@iconify-json/material-icon-theme": "^1.2.55",
|
|
35
48
|
"@iconify-json/mdi": "^1.2.3",
|
|
36
49
|
"@iconify-json/pixelarticons": "^1.2.4",
|
|
37
50
|
"@iconify-json/simple-icons": "^1.2.73",
|
|
38
51
|
"@iconify-json/skill-icons": "^1.2.4",
|
|
52
|
+
"@iconify-json/vscode-icons": "^1.2.45",
|
|
39
53
|
"@iconify/react": "^6.0.2",
|
|
40
|
-
"@rspress/core": "2.0.5",
|
|
41
|
-
"react": "^19.2.4",
|
|
42
|
-
"react-dom": "^19.2.4",
|
|
43
54
|
"ts-pattern": "^5.9.0",
|
|
44
|
-
"@zpress/core": "0.2.
|
|
55
|
+
"@zpress/core": "0.2.1"
|
|
45
56
|
},
|
|
46
57
|
"devDependencies": {
|
|
47
|
-
"@iconify-json/logos": "^1.2.10",
|
|
48
|
-
"@iconify-json/material-icon-theme": "^1.2.55",
|
|
49
|
-
"@iconify-json/vscode-icons": "^1.2.45",
|
|
50
58
|
"@rslib/core": "^0.20.0",
|
|
59
|
+
"@rspress/core": "^2.0.5",
|
|
51
60
|
"@types/react": "^19.2.14",
|
|
52
61
|
"@types/react-dom": "^19.2.3",
|
|
53
62
|
"geist": "^1.7.0",
|
|
63
|
+
"react": "^19.2.4",
|
|
64
|
+
"react-dom": "^19.2.4",
|
|
54
65
|
"typescript": "^5.9.3"
|
|
55
66
|
},
|
|
67
|
+
"peerDependencies": {
|
|
68
|
+
"@rspress/core": "^2.0.5",
|
|
69
|
+
"react": "^19.2.4",
|
|
70
|
+
"react-dom": "^19.2.4"
|
|
71
|
+
},
|
|
56
72
|
"engines": {
|
|
57
73
|
"node": ">=24.0.0"
|
|
58
74
|
},
|