@meonode/ui 0.2.21 → 0.3.1
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/CHANGELOG.md +61 -1
- package/README.md +40 -26
- package/dist/components/styled-renderer.client.d.ts +838 -3
- package/dist/components/styled-renderer.client.d.ts.map +1 -1
- package/dist/components/styled-renderer.client.js +9 -1
- package/dist/components/theme-provider.client.d.ts +25 -0
- package/dist/components/theme-provider.client.d.ts.map +1 -0
- package/dist/components/theme-provider.client.js +10 -0
- package/dist/core.node.d.ts +24 -90
- package/dist/core.node.d.ts.map +1 -1
- package/dist/core.node.js +53 -112
- package/dist/helper/node.helper.d.ts +1 -11
- package/dist/helper/node.helper.d.ts.map +1 -1
- package/dist/helper/node.helper.js +2 -22
- package/dist/helper/theme.helper.d.ts +2 -66
- package/dist/helper/theme.helper.d.ts.map +1 -1
- package/dist/helper/theme.helper.js +2 -7
- package/dist/hoc/component.hoc.d.ts +5 -8
- package/dist/hoc/component.hoc.d.ts.map +1 -1
- package/dist/hoc/component.hoc.js +7 -8
- package/dist/hoc/portal.hoc.d.ts +44 -44
- package/dist/hoc/portal.hoc.d.ts.map +1 -1
- package/dist/hoc/portal.hoc.js +53 -53
- package/dist/hook/index.d.ts +1 -0
- package/dist/hook/index.d.ts.map +1 -1
- package/dist/hook/index.js +1 -1
- package/dist/hook/useTheme.d.ts +8 -0
- package/dist/hook/useTheme.d.ts.map +1 -0
- package/dist/hook/useTheme.js +8 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +1 -1
- package/dist/node.type.d.ts +30 -28
- package/dist/node.type.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,9 +2,69 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
-
The format is based on [Keep a Changelog](https://
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.3.1] - 2025-09-26
|
|
9
|
+
|
|
10
|
+
### Docs
|
|
11
|
+
|
|
12
|
+
- **docs(readme):** update readme with new theme system
|
|
13
|
+
|
|
14
|
+
## [0.3.0] - 2025-09-26
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- **feat(theme):** use React Context for theme propagation
|
|
19
|
+
|
|
20
|
+
### Refactor
|
|
21
|
+
|
|
22
|
+
- **refactor(core):** remove unused _childrenHash property from Node class
|
|
23
|
+
|
|
24
|
+
### Example
|
|
25
|
+
|
|
26
|
+
- **feat(theme):** use React Context for theme propagation
|
|
27
|
+
|
|
28
|
+
**Before**:
|
|
29
|
+
```typescript
|
|
30
|
+
import { Div } from '@meonode/ui';
|
|
31
|
+
|
|
32
|
+
const App = () => {
|
|
33
|
+
return Div({
|
|
34
|
+
theme: {
|
|
35
|
+
// theme object
|
|
36
|
+
},
|
|
37
|
+
children: 'Hello world!',
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**After**:
|
|
43
|
+
```typescript
|
|
44
|
+
import { Div, ThemeProvider } from '@meonode/ui';
|
|
45
|
+
|
|
46
|
+
const App = () => {
|
|
47
|
+
return ThemeProvider({
|
|
48
|
+
theme: {
|
|
49
|
+
mode: 'light', // or 'dark' or any custom mode
|
|
50
|
+
system: {
|
|
51
|
+
base: {
|
|
52
|
+
default: '#ffffff',
|
|
53
|
+
content: '#000000',
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
children: [
|
|
58
|
+
Div({
|
|
59
|
+
backgroundColor: 'theme.base',
|
|
60
|
+
color: 'theme.content',
|
|
61
|
+
children: 'Hello world!',
|
|
62
|
+
}),
|
|
63
|
+
],
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
```
|
|
67
|
+
|
|
8
68
|
## [0.2.21] - 2025-09-23
|
|
9
69
|
|
|
10
70
|
### Refactor
|
package/README.md
CHANGED
|
@@ -15,38 +15,51 @@ npm install @meonode/ui react
|
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
```typescript
|
|
18
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
Component,
|
|
20
|
+
ThemeProvider,
|
|
21
|
+
Div,
|
|
22
|
+
Center,
|
|
23
|
+
Column,
|
|
24
|
+
H1,
|
|
25
|
+
Button,
|
|
26
|
+
} from "@meonode/ui";
|
|
19
27
|
|
|
20
28
|
const theme = {
|
|
21
|
-
|
|
22
|
-
|
|
29
|
+
mode: "light",
|
|
30
|
+
system: {
|
|
31
|
+
primary: { default: '#FF6B6B', content: '#4A0000' },
|
|
32
|
+
base: { default: '#F8F8F8', content: '#333333' },
|
|
33
|
+
}
|
|
23
34
|
};
|
|
24
35
|
|
|
25
36
|
const App = Component(() =>
|
|
26
|
-
|
|
37
|
+
ThemeProvider({
|
|
27
38
|
theme,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
39
|
+
children: Div({
|
|
40
|
+
backgroundColor: "theme.base.default",
|
|
41
|
+
children: Center({
|
|
42
|
+
padding: 40,
|
|
43
|
+
children: Column({
|
|
44
|
+
gap: 24,
|
|
45
|
+
textAlign: "center",
|
|
46
|
+
children: [
|
|
47
|
+
H1("Welcome to MeoNode", {
|
|
48
|
+
fontSize: "3rem",
|
|
49
|
+
color: "theme.primary.default",
|
|
50
|
+
}),
|
|
51
|
+
Button("Get Started", {
|
|
52
|
+
backgroundColor: "theme.primary.default",
|
|
53
|
+
color: "theme.primary.content",
|
|
54
|
+
padding: "12px 24px",
|
|
55
|
+
borderRadius: 8,
|
|
56
|
+
cursor: "pointer",
|
|
57
|
+
onClick: () => alert("Hello MeoNode!"),
|
|
58
|
+
}),
|
|
59
|
+
],
|
|
60
|
+
}),
|
|
61
|
+
}),
|
|
62
|
+
}),
|
|
50
63
|
})
|
|
51
64
|
);
|
|
52
65
|
```
|
|
@@ -54,6 +67,7 @@ const App = Component(() =>
|
|
|
54
67
|
## Key Features
|
|
55
68
|
|
|
56
69
|
- **Function-based components** - No JSX required, pure TypeScript functions
|
|
70
|
+
- **Built-in Theming System** - Use `ThemeProvider` to propagate theme through your app.
|
|
57
71
|
- **Theme-aware styling** - Direct CSS props with automatic theme resolution
|
|
58
72
|
- **Advanced CSS support** - Pseudo-classes, media queries, animations via `css` prop
|
|
59
73
|
- **Portal system** - Context-aware modals and overlays
|