@meonode/ui 0.2.14 → 0.2.16
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 +102 -25
- package/dist/components/html.node.d.ts +41 -41
- package/dist/components/styled-renderer.client.js +1 -1
- package/dist/core.node.d.ts +51 -19
- package/dist/core.node.d.ts.map +1 -1
- package/dist/core.node.js +54 -26
- package/dist/helper/node.helper.d.ts +8 -19
- package/dist/helper/node.helper.d.ts.map +1 -1
- package/dist/helper/node.helper.js +18 -18
- package/dist/helper/obj.helper.d.ts +11 -0
- package/dist/helper/obj.helper.d.ts.map +1 -1
- package/dist/helper/obj.helper.js +19 -1
- package/dist/hoc/component.hoc.d.ts +3 -3
- package/dist/hoc/component.hoc.d.ts.map +1 -1
- package/dist/hoc/component.hoc.js +2 -2
- package/dist/node.type.d.ts +22 -15
- package/dist/node.type.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,71 +5,118 @@ All notable changes to this project will be documented in this file.
|
|
|
5
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.2.16] - 2025-09-13
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **feat(core)**: introduce static _isServer property to optimize server-side checks in caching methods
|
|
13
|
+
- **feat(core)**: remove passedKey from _functionRenderer and simplify function-as-child wrapper; augment toPortal unmount to clean portal container
|
|
14
|
+
|
|
15
|
+
### Refactor
|
|
16
|
+
|
|
17
|
+
- **feat**: refactor children prop type to use `Children` type for better clarity and consistency across the codebase
|
|
18
|
+
|
|
19
|
+
## [0.2.15] - 2025-09-12
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- **feat(cache)**: implement hybrid caching strategy for processed children using WeakMap and Map to improve performance
|
|
24
|
+
and memory management
|
|
25
|
+
- **feat(helper)**: implement nodeSignature for stable signatures and improve createStableHash with bounded traversal
|
|
26
|
+
- **feat(helper)**: enhance ObjHelper.stringify method for deterministic serialization with sorted keys and special type
|
|
27
|
+
handling
|
|
28
|
+
|
|
29
|
+
### Refactor
|
|
30
|
+
|
|
31
|
+
- **refactor**: improve type definitions and error handling in rendering methods
|
|
32
|
+
|
|
33
|
+
### Test
|
|
34
|
+
|
|
35
|
+
- **test(tests)**: add performance tests for rendering a single-page layout in React
|
|
36
|
+
- **test**: add cleanup after each test and verify component display names for debugging
|
|
37
|
+
|
|
8
38
|
## [0.2.14] - 2025-09-12
|
|
9
39
|
|
|
10
40
|
### Added
|
|
41
|
+
|
|
11
42
|
- **feat**: Add `Container` alias for `Div` to simplify general-purpose container usage.
|
|
12
43
|
- **feat**: Add caching for processed children to optimize performance in `BaseNode` class.
|
|
13
44
|
|
|
14
45
|
### Removed
|
|
46
|
+
|
|
15
47
|
- **feat**: Remove `shallowEqual` utility function from `common.helper.ts`.
|
|
16
48
|
|
|
17
49
|
### Fixed
|
|
50
|
+
|
|
18
51
|
- **feat**: Improve performance by optimizing existing key checks and handling null values in rendering functions.
|
|
19
52
|
|
|
20
53
|
## [0.2.13] - 2025-09-11
|
|
21
54
|
|
|
22
55
|
### Added
|
|
56
|
+
|
|
23
57
|
- **feat**: Add pre-commit hook for linting and testing, update package.json scripts.
|
|
24
58
|
- **feat**: Add Jest configuration and setup for testing with TypeScript.
|
|
25
59
|
- **test**: Add comprehensive tests for BaseNode core functionality.
|
|
26
60
|
|
|
27
61
|
### Fixed
|
|
28
|
-
|
|
62
|
+
|
|
63
|
+
- **core**: Remove stylable elements from NO_STYLE_TAGS to ensure only non-visual/metadata tags are excluded from CSS
|
|
64
|
+
styling.
|
|
29
65
|
|
|
30
66
|
## [0.2.12] - 2025-09-11
|
|
31
67
|
|
|
32
68
|
### Fixed
|
|
33
|
-
|
|
69
|
+
|
|
70
|
+
- **core.node**: Removed the child processing cache to fix a critical bug that caused infinite page loads in server-side
|
|
71
|
+
rendering environments.
|
|
34
72
|
- **helper**: Corrected the element type retrieval logic within the hashing function used for child node processing.
|
|
35
73
|
|
|
36
74
|
## [0.2.11] - 2025-09-11
|
|
37
75
|
|
|
38
76
|
### Enhanced
|
|
39
|
-
|
|
40
|
-
- **core.node**:
|
|
77
|
+
|
|
78
|
+
- **core.node**: Significantly improved JSDoc documentation for the `BaseNode` class, providing better clarity on prop
|
|
79
|
+
processing, child handling, and rendering logic.
|
|
80
|
+
- **core.node**: Overhauled the child processing and caching mechanism to improve server-side performance and resolve a
|
|
81
|
+
memory leak. This includes a move from object stringification to a more performant hashing strategy for cache keys and
|
|
82
|
+
the introduction of a cache management policy.
|
|
41
83
|
|
|
42
84
|
### Fixed
|
|
85
|
+
|
|
43
86
|
- **helper**: Corrected an issue in flexbox style processing where an unnecessary string check was performed.
|
|
44
87
|
- **core.node**: Updated a function placeholder to adhere to the unused parameter naming convention.
|
|
45
88
|
|
|
46
89
|
## [0.2.10] - 2025-09-10
|
|
47
90
|
|
|
48
91
|
### Added
|
|
49
|
-
- **core**: add top-level `render` function for a cleaner and simpler API when mounting a Meonode instance to the DOM. This abstracts away the need to manually use `react-dom/client`.
|
|
50
|
-
- **Before**:
|
|
51
|
-
```typescript
|
|
52
|
-
import { createRoot } from 'react-dom/client';
|
|
53
|
-
import { Div } from '@meonode/ui';
|
|
54
92
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
93
|
+
- **core**: add top-level `render` function for a cleaner and simpler API when mounting a Meonode instance to the DOM.
|
|
94
|
+
This abstracts away the need to manually use `react-dom/client`.
|
|
95
|
+
- **Before**:
|
|
96
|
+
```typescript
|
|
97
|
+
import { createRoot } from 'react-dom/client';
|
|
98
|
+
import { Div } from '@meonode/ui';
|
|
99
|
+
|
|
100
|
+
const container = document.getElementById('root');
|
|
101
|
+
const root = createRoot(container);
|
|
102
|
+
root.render(Div({ children: 'Hello' }).render());
|
|
103
|
+
```
|
|
104
|
+
- **After**:
|
|
105
|
+
```typescript
|
|
106
|
+
import { Div } from '@meonode/ui';
|
|
107
|
+
import { render } from '@meonode/ui/client';
|
|
108
|
+
|
|
109
|
+
const container = document.getElementById('root');
|
|
110
|
+
render(Div({ children: 'Hello' }), container);
|
|
111
|
+
```
|
|
67
112
|
- **constants**: add `NO_STYLE_TAGS` array and `noStyleTagsSet` for quick lookup of tags that should not receive styles
|
|
68
113
|
|
|
69
114
|
### Enhanced
|
|
115
|
+
|
|
70
116
|
- **core**: enhance `StyledRenderer` integration to check for no-style tags
|
|
71
117
|
|
|
72
118
|
### Changed
|
|
119
|
+
|
|
73
120
|
- **helper**: update CSS property set to use constants and add no-style tag check
|
|
74
121
|
- **package**: update dependencies to latest versions
|
|
75
122
|
- **directory**: rename `data` directory to `constants` for clarity
|
|
@@ -78,14 +125,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
78
125
|
## [0.2.9] - 2025-09-05
|
|
79
126
|
|
|
80
127
|
### Fixed
|
|
128
|
+
|
|
81
129
|
- **core.types**: corrected `MergedProps` definition to restore proper TypeScript inference and props autocomplete
|
|
82
|
-
- Fixes regression from v0.2.8 where `createNode` and `createChildrenFirstNode` lost autocomplete for props due to
|
|
130
|
+
- Fixes regression from v0.2.8 where `createNode` and `createChildrenFirstNode` lost autocomplete for props due to
|
|
131
|
+
incorrect `MergedProps` typing
|
|
83
132
|
|
|
84
133
|
## [0.2.8] - 2025-09-05
|
|
85
134
|
|
|
86
135
|
### Changed
|
|
136
|
+
|
|
87
137
|
- **core.node**: refactor props handling to use a single utility type:
|
|
88
|
-
- `MergedProps<E, AdditionalProps>` — merges `NodeProps<E>` with custom props, giving precedence to overlapping keys
|
|
138
|
+
- `MergedProps<E, AdditionalProps>` — merges `NodeProps<E>` with custom props, giving precedence to overlapping keys
|
|
139
|
+
from `AdditionalProps`.
|
|
89
140
|
- Simplifies and unifies the typing system for node factories (`createNode`, `createChildrenFirstNode`).
|
|
90
141
|
- Improves developer experience when working with prebuilt components:
|
|
91
142
|
- Example:
|
|
@@ -100,11 +151,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
100
151
|
onChange: ({ target }) => console.log(target.value),
|
|
101
152
|
})
|
|
102
153
|
```
|
|
103
|
-
Extending prebuilt components is now safer and more predictable, with generic props always taking precedence when keys
|
|
154
|
+
Extending prebuilt components is now safer and more predictable, with generic props always taking precedence when keys
|
|
155
|
+
overlap.
|
|
104
156
|
|
|
105
157
|
- **helpers**: reorganize helper files and update import paths
|
|
106
158
|
|
|
107
159
|
### Fixed
|
|
160
|
+
|
|
108
161
|
- **styled-renderer**: make `children` prop optional in `StyledRendererProps`
|
|
109
162
|
|
|
110
163
|
## [0.2.7] - 2025-09-04
|
|
@@ -116,7 +169,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
116
169
|
## [0.2.6] - 2025-09-04
|
|
117
170
|
|
|
118
171
|
- **deps**: update TypeScript ESLint, native-preview, and jsdoc to latest versions
|
|
119
|
-
- **core.node**: improve generateIndexedKeyIfNeeded to accept object parameters and enhance key uniqueness with children
|
|
172
|
+
- **core.node**: improve generateIndexedKeyIfNeeded to accept object parameters and enhance key uniqueness with children
|
|
173
|
+
count
|
|
120
174
|
- **imports**: update import paths to include file extensions for compatibility
|
|
121
175
|
|
|
122
176
|
## [0.2.5] - 2025-09-03
|
|
@@ -126,6 +180,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
126
180
|
## [0.2.4] - 2025-09-02
|
|
127
181
|
|
|
128
182
|
### Added
|
|
183
|
+
|
|
129
184
|
- **core**: Exposed the original element via the created Node for easier access and debugging.
|
|
130
185
|
```typescript
|
|
131
186
|
import { createNode } from "@meonode/ui";
|
|
@@ -140,49 +195,61 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
140
195
|
## [0.2.3] - 2025-09-01
|
|
141
196
|
|
|
142
197
|
### Fixed
|
|
198
|
+
|
|
143
199
|
- **types**: Remove forbidden css import to resolve RSC error
|
|
144
200
|
|
|
145
201
|
### Changed
|
|
202
|
+
|
|
146
203
|
- **package**: Bump version to 0.2.3
|
|
147
204
|
|
|
148
205
|
## [0.2.2] - 2025-09-01
|
|
149
206
|
|
|
150
207
|
### Added
|
|
208
|
+
|
|
151
209
|
- **core**: Include nativeProps in props extraction for improved component flexibility
|
|
152
210
|
|
|
153
211
|
### Enhanced
|
|
212
|
+
|
|
154
213
|
- **types**: Enhance StyledRendererProps and FinalNodeProps for improved type safety
|
|
155
214
|
|
|
156
215
|
### Changed
|
|
216
|
+
|
|
157
217
|
- **package**: Bump version to 0.2.2
|
|
158
218
|
|
|
159
219
|
## [0.2.1] - 2025-09-01
|
|
160
220
|
|
|
161
221
|
### Changed
|
|
222
|
+
|
|
162
223
|
- **types**: Update CSS type from CSSObject to CSSInterpolation for better compatibility
|
|
163
224
|
- **package**: Bump version to 0.2.1
|
|
164
225
|
|
|
165
226
|
## [0.2.0] - 2025-08-31
|
|
166
227
|
|
|
167
228
|
### Added
|
|
229
|
+
|
|
168
230
|
- **docs**: Add badges for NPM version, license, and bundle size to README
|
|
169
231
|
|
|
170
232
|
### Enhanced
|
|
233
|
+
|
|
171
234
|
- **docs**: Update installation instructions and enhance clarity in core concepts
|
|
172
235
|
- **docs**: Enhance documentation with new examples and improved clarity
|
|
173
236
|
|
|
174
237
|
### Removed
|
|
238
|
+
|
|
175
239
|
- **package**: Remove deprecated hook entry from package.json
|
|
176
240
|
|
|
177
241
|
### Fixed
|
|
242
|
+
|
|
178
243
|
- **core.node**: Add suppressHydrationWarning to propsForCreateElement
|
|
179
244
|
|
|
180
245
|
### Changed
|
|
246
|
+
|
|
181
247
|
- **package**: Bump version to 0.2.0
|
|
182
248
|
|
|
183
249
|
## [0.1.121] - 2025-08-30
|
|
184
250
|
|
|
185
251
|
### Changed
|
|
252
|
+
|
|
186
253
|
- **core.node**: Simplify style resolution and improve prop handling
|
|
187
254
|
- **StyledRenderer**: Remove unused style prop and simplify component
|
|
188
255
|
- **package**: Bump version to 0.1.121
|
|
@@ -190,6 +257,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
190
257
|
## [0.1.120] - 2025-08-30
|
|
191
258
|
|
|
192
259
|
### Added
|
|
260
|
+
|
|
193
261
|
- **styles**: Add Emotion support and Next.js style registry integration
|
|
194
262
|
- Add @emotion/react and @emotion/cache dependencies
|
|
195
263
|
- Add StyledRenderer and StyleRegistry components for Emotion
|
|
@@ -197,37 +265,45 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
197
265
|
- Add nextjs-registry export for Next.js style registry
|
|
198
266
|
|
|
199
267
|
### Enhanced
|
|
268
|
+
|
|
200
269
|
- **core**: Enhance style handling with StyledRenderer for Emotion support
|
|
201
270
|
|
|
202
271
|
### Fixed
|
|
272
|
+
|
|
203
273
|
- **deps**: Update peerDependencies for Emotion and React to use version constraints
|
|
204
274
|
- **deps**: Update @types/react and @types/react-dom to latest versions
|
|
205
275
|
|
|
206
276
|
### Changed
|
|
277
|
+
|
|
207
278
|
- **package**: Update peerDependencies for @emotion/cache
|
|
208
279
|
- **package**: Bump version to 0.1.120
|
|
209
280
|
|
|
210
281
|
## [0.1.118] - 2025-08-30
|
|
211
282
|
|
|
212
283
|
### Fixed
|
|
284
|
+
|
|
213
285
|
- **deps**: Update peerDependencies for Emotion and React to use version constraints
|
|
214
286
|
|
|
215
287
|
### Changed
|
|
288
|
+
|
|
216
289
|
- **package**: Bump version to 0.1.118
|
|
217
290
|
|
|
218
291
|
## [0.1.117] - 2025-08-30
|
|
219
292
|
|
|
220
293
|
### Added
|
|
294
|
+
|
|
221
295
|
- **flexbox**: Improve default style resolution and add flex shorthand parser
|
|
222
296
|
- Add parseFlexShorthand to extract flex-grow, shrink, and basis
|
|
223
297
|
- Enhance resolveDefaultStyle to respect explicit flex/flexShrink values
|
|
224
298
|
- Improve handling of minHeight, minWidth, and flexShrink for flex items
|
|
225
299
|
|
|
226
300
|
### Enhanced
|
|
301
|
+
|
|
227
302
|
- **core**: Refine type of finalChildren for improved type safety
|
|
228
303
|
- **docs**: Update documentation for clarity on flexbox scrolling fixes
|
|
229
304
|
|
|
230
305
|
### Changed
|
|
306
|
+
|
|
231
307
|
- **core**: Move comments position for better readability
|
|
232
308
|
- **imports**: Remove .js extensions from internal imports
|
|
233
309
|
- **package**: Bump version to 0.1.117
|
|
@@ -235,6 +311,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
235
311
|
## [0.1.116] - 2025-08-27
|
|
236
312
|
|
|
237
313
|
### Changed
|
|
314
|
+
|
|
238
315
|
- **package**: Bump version to 0.1.116
|
|
239
316
|
|
|
240
317
|
---
|