this.gui 1.3.61 → 1.3.63

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 CHANGED
@@ -1,96 +1,68 @@
1
1
  # .GUI
2
2
 
3
- ###### A collection of components and building blocks enabling GUI generation.
3
+ A collection of components and building blocks enabling **.GUI** generation.
4
4
  <img src="https://res.cloudinary.com/dkwnxf6gm/image/upload/w_180/v1761276578/this.gui.npm.png" alt="This.GUI logo" width="180" />
5
5
 
6
- ### 🔗 Links
6
+ ### Links
7
+ - **.GUI Website:** https://neurons-me.github.io/GUI/
8
+ - **Storybook:** https://neurons-me.github.io/GUI/storybook-static/
7
9
 
8
- - **.GUI Website:** https://neurons-me.github.io/this.GUI/
9
- - **Storybook:** https://neurons-me.github.io/storybook-static/
10
- - **neurons.me:** https://neurons-me.github.io/
10
+ ## Quick Start (npx)
11
11
 
12
- **Install** via:
12
+ ##### Create a new app using this.GUI:
13
13
 
14
14
  ```bash
15
- npm install this.gui
15
+ npx this.gui AppName
16
16
  ```
17
17
 
18
- **Use** as an **exportable React library**:
18
+ ```bash
19
+ cd AppName
20
+ ```
19
21
 
20
- ```ts
21
- import { TopBar } from 'this.gui'
22
+ ```bash
23
+ npm install
22
24
  ```
23
25
 
24
- **.GUI** provides a rich collection of **atomic** and **composite** **components** ready to use:
25
-
26
- ```tsx
27
- import { Button, Card, Text } from 'this.gui';
28
- export function Example() {
29
- return (
30
- <Card>
31
- <Text size="lg" weight="bold">Welcome!</Text>
32
- <Button onClick={() => alert('Clicked!')}>Click me</Button>
33
- </Card>
34
- );
35
- }
26
+ ```bash
27
+ npm run dev
36
28
  ```
37
29
 
38
- ### Or
30
+ This generates a **minimal app** pre-wired with `this.gui`.
39
31
 
40
- ```ts
41
- import GUI from 'this.gui';
42
- ```
32
+ ### What you get
33
+ - `src/main.tsx` boots a React app
34
+ - `GuiProvider` is already mounted
35
+ - A simple `App.tsx` example using core atoms
43
36
 
44
- All components are theme-aware and automatically inherit styles and tokens from the `GuiProvider`
45
- <img src="https://res.cloudinary.com/dkwnxf6gm/image/upload/w_320/v1761281165/geometry_shapes-removebg-preview_anrdke.png" alt="Geometry shapes" width="320" />
46
-
47
- ## Initialization
48
- To initialize **This.GUI** in your project, wrap your application with the`GuiProvider` and optionally set a theme:
49
-
50
- ```tsx
51
- import { GuiProvider } from 'this.gui';
52
- import { Layout } from 'this.gui';
53
-
54
- function App() {
55
- return (
56
- <GuiProvider theme="dark">
57
- <Layout>
58
- <h1>Hello from This.GUI</h1>
59
- </Layout>
60
- </GuiProvider>
61
- );
62
- }
63
-
64
- export default App;
65
- ```
37
+ <img src="https://res.cloudinary.com/dkwnxf6gm/image/upload/w_320/v1761281165/geometry_shapes-removebg-preview_anrdke.png" alt="Geometry shapes" width="244" />
66
38
 
67
- This structure sets up the reactive theme system, context, and global styles
68
- needed by all This.GUI components.
39
+ ### Next steps
69
40
 
70
- ---
41
+ ###### Installing using npm:
71
42
 
72
- ## Declarative Rendering (Advanced)
73
- Under the hood **This.GUI** ships a resolver registry (`src/registry`) so teams
74
- can plug a JSON → React renderer into the design system. The npm package does
75
- **not** expose a ready-made `<RenderGUI />` helper yet; if you want declarative
76
- rendering you need to wire it yourself:
43
+ ```bash
44
+ npm install this.gui
45
+ ```
46
+
47
+ All components are theme-aware and automatically inherit styles and tokens from the `GuiProvider`
77
48
 
78
- ```tsx
79
- import { GuiRegistry } from 'this.gui/registry';
80
- import type { ResolveCtx } from 'this.gui/registry';
49
+ - Explore components in Storybook: https://neurons-me.github.io/GUI/storybook-static/
50
+ - Import atoms directly:
81
51
 
82
- function renderSpec(spec: { type: string; props?: any }, ctx?: ResolveCtx) {
83
- const entry = GuiRegistry[spec.type];
84
- if (!entry) throw new Error(`Unknown component type: ${spec.type}`);
85
- return entry.resolve(spec as any, ctx);
86
- }
52
+ ```ts
53
+ import { Button, Typography, Box } from "this.gui";
54
+ // or subpath (more explicit)
55
+ import { Button as AtomButton } from "this.gui/atoms";
87
56
  ```
88
57
 
89
- With that in place you can traverse a schema and render children as you prefer.
90
- Until an official renderer is published, consume the React components directly
91
- or build a thin wrapper like the example above.
58
+ ### Add the stylesheet
59
+ `this.gui` ships a compiled stylesheet. Import it once at your app entry:
60
+
61
+ ```ts
62
+ import "this.gui/style.css";
63
+ ```
92
64
 
93
- ---
65
+ > **Tip:** If you're using the UMD build in a plain HTML page, include `this.gui.css` from the `dist/` folder and load `this.gui.umd.js` via a `<script>` tag.
94
66
 
95
67
  ## 🪐 License
96
68
  MIT © [neurons.me](https://neurons.me)
@@ -3,7 +3,7 @@
3
3
  font-style: normal;
4
4
  font-weight: 100 700;
5
5
  font-display: block;
6
- src: url("/material-symbols-rounded.woff2") format("woff2");
6
+ src: url("./material-symbols-rounded.woff2") format("woff2");
7
7
  }
8
8
  .material-symbols-rounded {
9
9
  font-family: "Material Symbols Rounded";