this.gui 1.2.12 → 1.2.14
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 +24 -12
- package/package.json +2 -2
- /package/bin/{cli.js → cli.cjs} +0 -0
package/README.md
CHANGED
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
#
|
|
1
|
+
# this.GUI
|
|
2
2
|
|
|
3
3
|
###### A collection of components and building blocks enabling GUI generation powered by AI.
|
|
4
|
-
|
|
5
|
-
<img src="https://res.cloudinary.com/dkwnxf6gm/image/upload/v1761276578/this.gui.npm.png" style="zoom:34%;" />
|
|
4
|
+
<img src="https://res.cloudinary.com/dkwnxf6gm/image/upload/v1761276578/this.gui.npm.png" alt="This.GUI logo" style="zoom:34%;" />
|
|
6
5
|
|
|
7
6
|
**Install** via:
|
|
7
|
+
|
|
8
8
|
```bash
|
|
9
9
|
npm install this.gui
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
or with **yarn:**
|
|
13
|
+
|
|
13
14
|
```bash
|
|
14
15
|
yarn add this.gui
|
|
15
16
|
```
|
|
16
17
|
|
|
17
18
|
**Use** as an **exportable React library**:
|
|
19
|
+
|
|
18
20
|
```ts
|
|
19
21
|
import { TopBar } from 'this.gui'
|
|
20
22
|
```
|
|
21
23
|
|
|
22
|
-
**.GUI** provides a rich collection of **atomic** and **composite** **components**
|
|
24
|
+
**.GUI** provides a rich collection of **atomic** and **composite** **components** ready to use:
|
|
25
|
+
|
|
23
26
|
```tsx
|
|
24
27
|
import { Button, Card, Text } from 'this.gui';
|
|
25
28
|
export function Example() {
|
|
@@ -32,18 +35,19 @@ export function Example() {
|
|
|
32
35
|
}
|
|
33
36
|
```
|
|
34
37
|
|
|
35
|
-
|
|
38
|
+
### Or
|
|
36
39
|
|
|
37
40
|
```ts
|
|
38
|
-
import GUI from 'this.gui'
|
|
41
|
+
import GUI from 'this.gui';
|
|
39
42
|
```
|
|
40
43
|
|
|
41
44
|
All components are theme-aware and automatically inherit styles and tokens from the `GuiProvider`
|
|
42
45
|
|
|
43
|
-
|
|
46
|
+

|
|
44
47
|
|
|
45
48
|
## Initialization
|
|
46
|
-
|
|
49
|
+
|
|
50
|
+
To initialize **This.GUI** in your project, wrap your application with the`GuiProvider` and optionally set a theme:
|
|
47
51
|
|
|
48
52
|
```tsx
|
|
49
53
|
import { GuiProvider } from 'this.gui';
|
|
@@ -62,12 +66,17 @@ function App() {
|
|
|
62
66
|
export default App;
|
|
63
67
|
```
|
|
64
68
|
|
|
65
|
-
This structure sets up the reactive theme system, context, and global styles
|
|
69
|
+
This structure sets up the reactive theme system, context, and global styles
|
|
70
|
+
needed by all This.GUI components.
|
|
66
71
|
|
|
67
72
|
---
|
|
68
73
|
|
|
69
74
|
## Declarative Rendering (Advanced)
|
|
70
|
-
|
|
75
|
+
|
|
76
|
+
Under the hood **This.GUI** ships a resolver registry (`src/registry`) so teams
|
|
77
|
+
can plug a JSON → React renderer into the design system. The npm package does
|
|
78
|
+
**not** expose a ready-made `<RenderGUI />` helper yet; if you want declarative
|
|
79
|
+
rendering you need to wire it yourself:
|
|
71
80
|
|
|
72
81
|
```tsx
|
|
73
82
|
import { GuiRegistry } from 'this.gui/registry';
|
|
@@ -80,9 +89,12 @@ function renderSpec(spec: { type: string; props?: any }, ctx?: ResolveCtx) {
|
|
|
80
89
|
}
|
|
81
90
|
```
|
|
82
91
|
|
|
83
|
-
With that in place you can traverse a schema and render children as you prefer.
|
|
92
|
+
With that in place you can traverse a schema and render children as you prefer.
|
|
93
|
+
Until an official renderer is published, consume the React components directly
|
|
94
|
+
or build a thin wrapper like the example above.
|
|
84
95
|
|
|
85
96
|
---
|
|
86
97
|
|
|
87
98
|
## 🪐 License
|
|
88
|
-
|
|
99
|
+
|
|
100
|
+
MIT © [neurons.me](https://neurons.me)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "this.gui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.14",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/this-gui.umd.js",
|
|
7
7
|
"module": "dist/this-gui.es.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"bin": {
|
|
17
|
-
"gui": "./dist/bin/cli.
|
|
17
|
+
"gui": "./dist/bin/cli.cjs"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"build": "vite build && node -e \"import('./vite.config.js').then(m => m.buildFinished())\"",
|
/package/bin/{cli.js → cli.cjs}
RENAMED
|
File without changes
|