@meonode/ui 1.2.0 → 1.3.0-beta.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/dist/cjs/core.node.cjs +1 -1
- package/dist/cjs/util/node.util.cjs +1 -1
- package/dist/esm/components/html.node.d.ts +262 -262
- package/dist/esm/components/portal-host.client.d.ts +1 -15
- package/dist/esm/components/portal-host.client.d.ts.map +1 -1
- package/dist/esm/components/portal-host.d.ts +1 -1
- package/dist/esm/components/portal-provider.d.ts +1 -1
- package/dist/esm/components/react.node.d.ts +3 -3
- package/dist/esm/components/style-registry.client.d.ts.map +1 -1
- package/dist/esm/components/styled-renderer.client.d.ts +1 -1
- package/dist/esm/components/styled-renderer.client.d.ts.map +1 -1
- package/dist/esm/components/theme-provider.d.ts +1 -1
- package/dist/esm/constant/common.const.d.ts +1 -1
- package/dist/esm/core.node.d.ts.map +1 -1
- package/dist/esm/core.node.js +1 -1
- package/dist/esm/helper/common.helper.d.ts +1 -1
- package/dist/esm/helper/common.helper.d.ts.map +1 -1
- package/dist/esm/helper/react-is.helper.d.ts +1 -1
- package/dist/esm/helper/react-is.helper.d.ts.map +1 -1
- package/dist/esm/hook/usePortal.d.ts +2 -2
- package/dist/esm/hook/usePortal.d.ts.map +1 -1
- package/dist/esm/nextjs-registry/index.d.ts +1 -1
- package/dist/esm/util/mount-tracker.util.d.ts.map +1 -1
- package/dist/esm/util/navigation-cache-manager.util.d.ts.map +1 -1
- package/dist/esm/util/node.util.d.ts +13 -2
- package/dist/esm/util/node.util.d.ts.map +1 -1
- package/dist/esm/util/node.util.js +1 -1
- package/dist/esm/util/theme.util.d.ts +2 -2
- package/dist/esm/util/theme.util.d.ts.map +1 -1
- package/package.json +25 -19
- package/CHANGELOG.md +0 -1378
package/CHANGELOG.md
DELETED
|
@@ -1,1378 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
## [1.2.0] - 2026-02-15
|
|
6
|
-
|
|
7
|
-
### Feat
|
|
8
|
-
|
|
9
|
-
- **portal**: implement stack-based portal system with PortalProvider and PortalHost ([`7196f6f`](https://github.com/l7aromeo/meonode-ui/commit/7196f6f))
|
|
10
|
-
- Introduced `PortalProvider` and `PortalHost` for managed overlay stacks.
|
|
11
|
-
- **helper**: add data-channel helper for efficient portal updates ([`6508c0a`](https://github.com/l7aromeo/meonode-ui/commit/6508c0a))
|
|
12
|
-
- Added `createDataChannel` for high-performance, subscription-based state updates between components.
|
|
13
|
-
- **hook**: add usePortal and useDataChannel hooks ([`b2f7d19`](https://github.com/l7aromeo/meonode-ui/commit/b2f7d19))
|
|
14
|
-
- Added reactive hooks to interact with the new portal system and data channels.
|
|
15
|
-
|
|
16
|
-
### Refactor
|
|
17
|
-
|
|
18
|
-
- **portal**: remove legacy portal system and update core ([`91ced63`](https://github.com/l7aromeo/meonode-ui/commit/91ced63))
|
|
19
|
-
- **BREAKING CHANGE**: Removed legacy `portal.hoc.ts` and associated logic in favor of the new stack-based architecture.
|
|
20
|
-
- Updated `BaseNode` and `NodeUtil` for better portal integration.
|
|
21
|
-
|
|
22
|
-
### Test
|
|
23
|
-
|
|
24
|
-
- **portal**: add tests for new portal system ([`92cd3c0`](https://github.com/l7aromeo/meonode-ui/commit/92cd3c0))
|
|
25
|
-
- Added integration tests for stack management and data synchronization.
|
|
26
|
-
|
|
27
|
-
### Docs
|
|
28
|
-
|
|
29
|
-
- **portal**: update README with new portal system examples ([`3f7a314`](https://github.com/l7aromeo/meonode-ui/commit/3f7a314))
|
|
30
|
-
|
|
31
|
-
## [1.2.0-0] - 2026-02-15
|
|
32
|
-
|
|
33
|
-
### Feat
|
|
34
|
-
|
|
35
|
-
- **portal**: implement stack-based portal system with PortalProvider and PortalHost ([`7196f6f`](https://github.com/l7aromeo/meonode-ui/commit/7196f6f))
|
|
36
|
-
- Introduced `PortalProvider` and `PortalHost` for managed overlay stacks.
|
|
37
|
-
- **helper**: add data-channel helper for efficient portal updates ([`6508c0a`](https://github.com/l7aromeo/meonode-ui/commit/6508c0a))
|
|
38
|
-
- Added `createDataChannel` for high-performance, subscription-based state updates between components.
|
|
39
|
-
- **hook**: add usePortal and useDataChannel hooks ([`b2f7d19`](https://github.com/l7aromeo/meonode-ui/commit/b2f7d19))
|
|
40
|
-
- Added reactive hooks to interact with the new portal system and data channels.
|
|
41
|
-
|
|
42
|
-
### Refactor
|
|
43
|
-
|
|
44
|
-
- **portal**: remove legacy portal system and update core ([`91ced63`](https://github.com/l7aromeo/meonode-ui/commit/91ced63))
|
|
45
|
-
- **BREAKING CHANGE**: Removed legacy `portal.hoc.ts` and associated logic in favor of the new stack-based architecture.
|
|
46
|
-
- Updated `BaseNode` and `NodeUtil` for better portal integration.
|
|
47
|
-
|
|
48
|
-
### Test
|
|
49
|
-
|
|
50
|
-
- **portal**: add tests for new portal system ([`92cd3c0`](https://github.com/l7aromeo/meonode-ui/commit/92cd3c0))
|
|
51
|
-
- Added integration tests for stack management and data synchronization.
|
|
52
|
-
|
|
53
|
-
### Docs
|
|
54
|
-
|
|
55
|
-
- **portal**: update README with new portal system examples ([`3f7a314`](https://github.com/l7aromeo/meonode-ui/commit/3f7a314))
|
|
56
|
-
|
|
57
|
-
## [1.1.4] - 2026-02-15
|
|
58
|
-
|
|
59
|
-
### Fix
|
|
60
|
-
|
|
61
|
-
- **nextjs**: prevent duplicate style tags and content in StyleRegistry ([`91bec99`](https://github.com/l7aromeo/meonode-ui/commit/91bec99))
|
|
62
|
-
- Renamed `registry.client.ts` to `style-registry.client.ts` and implemented tracking of inserted IDs during SSR to avoid duplicate CSS injection in Next.js streaming.
|
|
63
|
-
|
|
64
|
-
### Test
|
|
65
|
-
|
|
66
|
-
- **emotion**: add style tag generation monitoring test ([`0576f0c`](https://github.com/l7aromeo/meonode-ui/commit/0576f0c))
|
|
67
|
-
- Added tests to verify that nested `Div` structures efficiently batch styles into a single style tag and that state changes correctly append new rules.
|
|
68
|
-
|
|
69
|
-
## [1.1.3] - 2026-02-15
|
|
70
|
-
|
|
71
|
-
### Feat
|
|
72
|
-
|
|
73
|
-
- **hook**: remove deprecated `usePortal` hook and related portal update logic ([`eb40bd1`](https://github.com/l7aromeo/meonode-ui/commit/eb40bd1))
|
|
74
|
-
- Deleted the unstable `usePortal` hook and removed the `update` method from `NodePortal` and `Portal` HOC to streamline the API.
|
|
75
|
-
|
|
76
|
-
### Refactor
|
|
77
|
-
|
|
78
|
-
- **core**: optimize core logic, instance ID generation, and utility helpers ([`27fdd1b`](https://github.com/l7aromeo/meonode-ui/commit/27fdd1b))
|
|
79
|
-
- Switched `instanceId` to use a static counter for deterministic IDs.
|
|
80
|
-
- Optimized the iterative render loop by reducing array allocations and improving capacity checks.
|
|
81
|
-
- Refactored `NodeUtil.isNodeInstance` to use `instanceof BaseNode` for better performance.
|
|
82
|
-
- Improved `getGlobalState` to use a shared internal scope.
|
|
83
|
-
- Enhanced `NodeUtil` with a weak map cache for function prop hashes.
|
|
84
|
-
|
|
85
|
-
### Build
|
|
86
|
-
|
|
87
|
-
- **rollup**: update configuration to use `.cjs` extension for CommonJS output ([`7f6a130`](https://github.com/l7aromeo/meonode-ui/commit/7f6a130))
|
|
88
|
-
- Updated `rollup.config.ts` and `package.json` to use `.cjs` for CJS bundles to ensure compatibility in ESM-first environments.
|
|
89
|
-
|
|
90
|
-
### Chore
|
|
91
|
-
|
|
92
|
-
- **deps**: update dependencies to latest versions ([`f95591e`](https://github.com/l7aromeo/meonode-ui/commit/f95591e))
|
|
93
|
-
- Updated various devDependencies including `typescript-eslint`, `next`, `react`, and `rollup`.
|
|
94
|
-
- **git**: update `.gitignore` to include AI-related directories ([`0607574`](https://github.com/l7aromeo/meonode-ui/commit/0607574))
|
|
95
|
-
- Added `.claude` to the ignore list.
|
|
96
|
-
|
|
97
|
-
## [1.1.2] - 2025-12-22
|
|
98
|
-
|
|
99
|
-
### Fix
|
|
100
|
-
|
|
101
|
-
- **types**: fix `ThemedCSSObject` to support nested selectors and theme functions in deeply nested objects ([`f938be5`](https://github.com/l7aromeo/meonode-ui/commit/f938be5ca17cb5af076e567cfb7df8a7df97cf0d))
|
|
102
|
-
- Updated `ThemedCSSObject` to use an intersection type with an index signature, allowing arbitrary string keys (like pseudo-selectors and media queries) to correctly resolve theme functions.
|
|
103
|
-
|
|
104
|
-
### Chore
|
|
105
|
-
|
|
106
|
-
- **deps**: update dependencies to latest versions ([`51925b1`](https://github.com/l7aromeo/meonode-ui/commit/51925b152ac8406f16ce627adc61ba4c3f442fc7))
|
|
107
|
-
- Updated `next` to `^16.1.0`, `react-router-dom` to `^7.11.0`, `rollup` to `^4.54.0`, `@testing-library/react` to `^16.3.1` and `@typescript/native-preview` to `^7.0.0`.
|
|
108
|
-
|
|
109
|
-
## [1.1.1] - 2025-12-05
|
|
110
|
-
|
|
111
|
-
### Fix
|
|
112
|
-
- **types**: update HasCSSCompatibleStyleProp to use CSSProperties directly ([`4e23499`](https://github.com/l7aromeo/meonode-ui/commit/4e234990147baba72064a2f7b4ff03fedfe23a98))
|
|
113
|
-
|
|
114
|
-
## [1.1.0] - 2025-12-05
|
|
115
|
-
|
|
116
|
-
### Feat
|
|
117
|
-
|
|
118
|
-
- **types**: enforce strict component props and improve type inference ([`047c0f8`](https://github.com/l7aromeo/meonode-ui/commit/047c0f8))
|
|
119
|
-
- Redefined `MergedProps` and introduced `ValidateComponentProps` to strictly validate props passed to `Node` and `createNode`.
|
|
120
|
-
- Added `ExactProps` generic constraint to prevent excess property passing, improving type safety.
|
|
121
|
-
- Enhanced `PropsOf` to better infer props from React components, including `forwardRef` and `Memo` components.
|
|
122
|
-
- **theme**: enable theme variable resolution in style keys ([`30ca1fd`](https://github.com/l7aromeo/meonode-ui/commit/30ca1fd))
|
|
123
|
-
- Updated `ThemeUtil` to resolve theme variables within style keys (e.g., media queries like `@media (max-width: theme.breakpoint.lg)`).
|
|
124
|
-
|
|
125
|
-
### Refactor
|
|
126
|
-
|
|
127
|
-
- **portal**: optimize portal implementation and fix types ([`9643682`](https://github.com/l7aromeo/meonode-ui/commit/9643682))
|
|
128
|
-
- Refactored `Portal` HOC to use a cleaner, more efficient implementation for provider wrapping.
|
|
129
|
-
- Improved type definitions for `PortalLauncher` and `PortalProps` to ensure correct prop inference.
|
|
130
|
-
|
|
131
|
-
### Fix
|
|
132
|
-
|
|
133
|
-
- **util**: correct function child detection and rendering logic ([`944cfbd`](https://github.com/l7aromeo/meonode-ui/commit/944cfbd))
|
|
134
|
-
- Updated `isFunctionChild` type definition to correctly identify function children while excluding React components (Class, Memo, ForwardRef).
|
|
135
|
-
- Updated `functionRenderer` type definition to properly handle function child execution.
|
|
136
|
-
|
|
137
|
-
### Test
|
|
138
|
-
|
|
139
|
-
- **test**: refactor tests to align with strict types and fix leaks ([`40c87c7`](https://github.com/l7aromeo/meonode-ui/commit/40c87c7))
|
|
140
|
-
- Updated various tests (`advanced-features`, `leak-repro`, `memoization`) to comply with the new strict type requirements.
|
|
141
|
-
- Added `strict-component-props.test.ts` and `theme-key-resolution.test.ts` to verify new features.
|
|
142
|
-
|
|
143
|
-
### Chore
|
|
144
|
-
|
|
145
|
-
- **build**: update build config and dependencies ([`a9367e0`](https://github.com/l7aromeo/meonode-ui/commit/a9367e0))
|
|
146
|
-
- Updated `package.json` scripts and `tsconfig.json` for better build and test processes.
|
|
147
|
-
|
|
148
|
-
## [1.0.1] - 2025-11-30
|
|
149
|
-
|
|
150
|
-
### Fix
|
|
151
|
-
|
|
152
|
-
- **core**: fix style prop extraction for React Components ([`19618b4`](https://github.com/l7aromeo/meonode-ui/commit/19618b4))
|
|
153
|
-
- Modified `processRawNode` to prevent `style` props from being extracted and flattened into HTML attributes when the node is a React Component.
|
|
154
|
-
- This ensures components receive their `style` prop intact as an object, preventing invalid attribute errors.
|
|
155
|
-
|
|
156
|
-
## [1.0.0] - 2025-11-28
|
|
157
|
-
|
|
158
|
-
### Perf
|
|
159
|
-
|
|
160
|
-
- **cache**: Remove props, CSS, and theme caching to improve performance and reduce overhead. ([`206361d`](https://github.com/l7aromeo/meonode-ui/commit/206361d)), ([`d7baa16`](https://github.com/l7aromeo/meonode-ui/commit/d7baa16))
|
|
161
|
-
|
|
162
|
-
### Fix
|
|
163
|
-
|
|
164
|
-
- **theme-provider**: Allow `setTheme` to accept an updater function for more flexible state management. ([`be8d261`](https://github.com/l7aromeo/meonode-ui/commit/be8d261))
|
|
165
|
-
- **core**: Improve mount tracking for cached elements by ensuring `MeoNodeUnmounter` wraps all renderable nodes. ([`d0ca27e`](https://github.com/l7aromeo/meonode-ui/commit/d0ca27e))
|
|
166
|
-
- **theme-provider**: Remove incorrect `@private` JSDoc tag from `ThemeProvider` component. ([`816e398`](https://github.com/l7aromeo/meonode-ui/commit/816e398))
|
|
167
|
-
|
|
168
|
-
### Test
|
|
169
|
-
|
|
170
|
-
- **performance**: Add controlled input performance tests to simulate human typing and measure `deps` memoization effectiveness. ([`bba48b8`](https://github.com/l7aromeo/meonode-ui/commit/bba48b8))
|
|
171
|
-
|
|
172
|
-
### Docs
|
|
173
|
-
|
|
174
|
-
- **readme**: Update `README.md` to reflect the removal of automatic caching and emphasize `deps`-based memoization. ([`2600d9c`](https://github.com/l7aromeo/meonode-ui/commit/2600d9c))
|
|
175
|
-
|
|
176
|
-
## [1.0.0-0] - 2025-11-27
|
|
177
|
-
|
|
178
|
-
### Fix
|
|
179
|
-
|
|
180
|
-
- **core**: Overhaul mount tracking, caching, and fix stableKey generation to prevent memory leaks ([`af1b707`](https://github.com/l7aromeo/meonode-ui/commit/af1b707187b66cdbf9fe88f791aee30cfc7d2835))
|
|
181
|
-
- Replaced the simple `Set` in `MountTrackerUtil` with a reference-counting system (`Map`) to ensure a node is only considered unmounted when all its instances are gone.
|
|
182
|
-
- The root element of a render cycle is now wrapped with a `MeoNodeUnmounter` component before being cached to guarantee that the unmount logic is always present, even for cached elements.
|
|
183
|
-
- Improved `stableKey` generation in `NodeUtil.createPropSignature` to correctly differentiate function props by hashing their string representation, preventing cache collisions for components with different `onClick` or similar handlers.
|
|
184
|
-
- Added new test suites (`leak-repro.test.ts`, `props-caching-leak.test.ts`) to specifically target and verify the leak fixes.
|
|
185
|
-
|
|
186
|
-
### Perf
|
|
187
|
-
|
|
188
|
-
- **cache**: Improve props cache eviction strategy ([`ce2f561`](https://github.com/l7aromeo/meonode-ui/commit/ce2f5616b21d68873dff0f1c4466bf9a2a40ce4d))
|
|
189
|
-
- Adjusted the `propProcessingCache` eviction logic in `NodeUtil` to be more aggressive, removing enough items to get back to the `CACHE_SIZE_LIMIT` plus an additional buffer batch, preventing unbounded growth under high load.
|
|
190
|
-
|
|
191
|
-
### Feat
|
|
192
|
-
|
|
193
|
-
- **deps**: Add react-router-dom and test polyfills ([`29dcf13`](https://github.com/l7aromeo/meonode-ui/commit/29dcf137b5ebcba0e09e5acf13aadac6a0a0f513))
|
|
194
|
-
- Introduced `react-router-dom` as a new development dependency to enable integration testing with React Router.
|
|
195
|
-
- Added `whatwg-fetch` and Node.js `util` polyfills to `jest.setup.ts` for compatibility in the Jest environment.
|
|
196
|
-
|
|
197
|
-
### Test
|
|
198
|
-
|
|
199
|
-
- **react-router**: Add integration tests for react-router-dom ([`8478623`](https://github.com/l7aromeo/meonode-ui/commit/8478623add6bc66b9805a3ec9c0661f4df223f63))
|
|
200
|
-
- Introduced a new test suite to verify the proper functioning and caching behavior of MeoNode components when used within a React Router environment.
|
|
201
|
-
- Includes tests for declarative and programmatic navigation, ensuring that component lifecycles and caching mechanisms interact correctly with React Router's dynamic rendering.
|
|
202
|
-
|
|
203
|
-
### Chore
|
|
204
|
-
- **package**: Rename publish:pre script to publish:prerelease and add publish:premajor script in package.json ([`a98ba69`](https://github.com/l7aromeo/meonode-ui/commit/a98ba697a6e024126256a0e2517c839bbecd8058))
|
|
205
|
-
|
|
206
|
-
## [0.4.14] - 2025-11-23
|
|
207
|
-
|
|
208
|
-
### Perf
|
|
209
|
-
|
|
210
|
-
- **cache**: enforce dependency-based caching with shouldCacheElement helper ([
|
|
211
|
-
`fab5525`](https://github.com/l7aromeo/meonode-ui/commit/fab55253093fbd2958ad84bcc98b1f0d1a07349c))
|
|
212
|
-
- Introduces NodeUtil.shouldCacheElement() helper to centralize and enforce the opt-in caching strategy where only
|
|
213
|
-
nodes with explicit dependencies are cached
|
|
214
|
-
- Completes the memory optimization by closing loopholes where nodes without dependencies were still being cached
|
|
215
|
-
based on stableKey alone
|
|
216
|
-
- Replaces 4 inconsistent cache eligibility checks in BaseNode.render():
|
|
217
|
-
- Cache lookup for parent nodes
|
|
218
|
-
- Cache lookup for child nodes
|
|
219
|
-
- Cache storage during rendering
|
|
220
|
-
- MeoNodeUnmounter wrapping decision
|
|
221
|
-
- Impact: Reduces memory usage, ensures mount tracking and cache operations stay in sync, improves code
|
|
222
|
-
maintainability
|
|
223
|
-
|
|
224
|
-
### Test
|
|
225
|
-
|
|
226
|
-
- **memoization**: refine test to assert precise cache size after rendering components ([
|
|
227
|
-
`8ded697`](https://github.com/l7aromeo/meonode-ui/commit/8ded6974cc1565c384abe1a3ca54e1f7bc8a9619))
|
|
228
|
-
|
|
229
|
-
### Chore
|
|
230
|
-
|
|
231
|
-
- **type**: remove src/types/env.d.ts as it is no longer needed ([aab4299](https://github.com/l7aromeo/meonode-ui/commit/aab429944bf12269d5e6116d3460ff354a42f673))
|
|
232
|
-
|
|
233
|
-
## [0.4.13] - 2025-11-23
|
|
234
|
-
|
|
235
|
-
### Fix
|
|
236
|
-
|
|
237
|
-
- **props**: improve prop handling and prevent leakage ([
|
|
238
|
-
`73cc696`](https://github.com/l7aromeo/meonode-ui/commit/73cc696b3df8c1bd2ddef789de58febc6cd2f1c5))
|
|
239
|
-
- This commit refactors prop handling within the MeoNode ecosystem to ensure that internal processing props are not
|
|
240
|
-
leaked to the DOM.
|
|
241
|
-
- Key changes:
|
|
242
|
-
- The `MeoNodeUnmounter` is updated to correctly isolate and pass through props intended for the underlying DOM
|
|
243
|
-
element, improving compatibility with libraries like MUI.
|
|
244
|
-
- Internal props such as `node`, `css`, and `disableEmotion` are now explicitly prevented from being rendered as
|
|
245
|
-
HTML attributes.
|
|
246
|
-
- Added comprehensive tests to verify that standard HTML attributes are passed through while internal props are
|
|
247
|
-
successfully filtered out.
|
|
248
|
-
- This improves the robustness and predictability of component rendering.
|
|
249
|
-
|
|
250
|
-
### Test
|
|
251
|
-
|
|
252
|
-
- **props**: add tests for prop handling and leakage ([
|
|
253
|
-
`a508e10`](https://github.com/l7aromeo/meonode-ui/commit/a508e107539d9ce84e8d99b63a0af329b28f3249))
|
|
254
|
-
- Added new tests to verify that component props are correctly passed as HTML attributes, handle createNode and
|
|
255
|
-
Node() correctly, and crucially, that internal MeoNode props are not leaked to the DOM.
|
|
256
|
-
|
|
257
|
-
### Chore
|
|
258
|
-
|
|
259
|
-
- **core**: remove unnecessary type assertion from finalChildren assignment ([
|
|
260
|
-
`827b3ef`](https://github.com/l7aromeo/meonode-ui/commit/827b3ef4490bca08d58ef5fe1fd885aadbbb1524))
|
|
261
|
-
|
|
262
|
-
## [0.4.12] - 2025-11-21
|
|
263
|
-
|
|
264
|
-
### Feat
|
|
265
|
-
|
|
266
|
-
- **build**: migrate from Babel to Rollup with ESM and CJS support ([
|
|
267
|
-
`70326a1`](https://github.com/l7aromeo/meonode-ui/commit/70326a107259c095d571b838dda15ffbf845af1d))
|
|
268
|
-
- Replace Babel build system with Rollup configuration to prevent output legacy javascript code
|
|
269
|
-
- Add support for both ESM and CJS output formats
|
|
270
|
-
- Update package.json exports to point to new build outputs
|
|
271
|
-
- Add Rollup plugins for TypeScript, commonjs, minification, and preserve directives
|
|
272
|
-
- Remove Babel-related dependencies and configuration files
|
|
273
|
-
- Update tsconfig.json to use 'preserve' module setting and bundler resolution
|
|
274
|
-
- Configure build to output to separate ESM and CJS directories
|
|
275
|
-
|
|
276
|
-
## [0.4.11] - 2025-11-21
|
|
277
|
-
|
|
278
|
-
### Fix
|
|
279
|
-
|
|
280
|
-
- **core**: enhance MeoNodeUnmounter cleanup logic and support additional props cloning ([
|
|
281
|
-
`02c17f7`](https://github.com/l7aromeo/meonode-ui/commit/02c17f7))
|
|
282
|
-
- Refactor MeoNodeUnmounter to use useEffectEvent for stable cleanup on unmount
|
|
283
|
-
- Cleanup removes node from BaseNode.elementCache, untracks mount via MountTrackerUtil, unregisters from
|
|
284
|
-
BaseNode.cacheCleanupRegistry, and clears lastSignature to prevent memory leaks
|
|
285
|
-
- Support cloning and forwarding additional props to valid React children elements
|
|
286
|
-
|
|
287
|
-
### Refactor
|
|
288
|
-
|
|
289
|
-
- **node.util**: enhance documentation for utility methods and improve clarity ([
|
|
290
|
-
`ee42c24`](https://github.com/l7aromeo/meonode-ui/commit/ee42c24))
|
|
291
|
-
- **theme**: reorder ThemeResolverCache methods for clarity ([
|
|
292
|
-
`cb842c8`](https://github.com/l7aromeo/meonode-ui/commit/cb842c8))
|
|
293
|
-
- Moved `_generateCacheKey` and `_evict` methods below the main logic in `ThemeResolverCache` for better readability
|
|
294
|
-
and organization
|
|
295
|
-
- Removed duplicate declaration of `_instance` property
|
|
296
|
-
- Kept functionality unchanged, improving code structure and maintainability
|
|
297
|
-
|
|
298
|
-
### Test
|
|
299
|
-
|
|
300
|
-
- **perf**: add memory leak detection test for navigation cycles and improve formatMemory function ([
|
|
301
|
-
`ba139fc`](https://github.com/l7aromeo/meonode-ui/commit/ba139fc))
|
|
302
|
-
- Added a new performance test to detect memory leaks during repeated navigation cycles between pages
|
|
303
|
-
- The test measures heap memory usage before, during, and after navigation, ensuring memory growth stays within
|
|
304
|
-
acceptable limits
|
|
305
|
-
- Enhanced the formatMemory utility to correctly handle negative byte values and added JSDoc comments for clarity
|
|
306
|
-
- Removed an obsolete shallowly equal props performance test to streamline the test suite
|
|
307
|
-
- **unmounter**: add regression test for MeoNodeUnmounter to forward implicit props in MUI RadioGroup integration ([
|
|
308
|
-
`2ecaabd`](https://github.com/l7aromeo/meonode-ui/commit/2ecaabd))
|
|
309
|
-
- Added a test to ensure MeoNodeUnmounter correctly forwards props injected via React.cloneElement, addressing
|
|
310
|
-
issues with libraries like MUI where RadioGroup injects 'checked' and 'onChange' into Radio components
|
|
311
|
-
- This prevents swallowing of props and verifies proper behavior of controlled radio inputs
|
|
312
|
-
- Also updated an existing cache size assertion to allow equality, reflecting improved mount tracking
|
|
313
|
-
- **perf**: update react-createelement comparison tests with 5000 nested nodes and fix typings ([
|
|
314
|
-
`b345ec0`](https://github.com/l7aromeo/meonode-ui/commit/b345ec0))
|
|
315
|
-
- Changed rerender to use React.cloneElement<any> for proper typing
|
|
316
|
-
- Updated NUM_NODES constant to 5000 for nested structure tests
|
|
317
|
-
- Removed redundant comments about node count reduction to prevent stack overflow
|
|
318
|
-
|
|
319
|
-
### Chore
|
|
320
|
-
|
|
321
|
-
- **deps**: upgrade devDependencies and update test scripts ([
|
|
322
|
-
`2ea128e`](https://github.com/l7aromeo/meonode-ui/commit/2ea128e))
|
|
323
|
-
- add new devDependencies: @emotion/is-prop-valid@1.4.0, @emotion/styled@11.14.1, @mui/material@7.3.5, and related
|
|
324
|
-
packages
|
|
325
|
-
- update yarn to version 4.11.0
|
|
326
|
-
- update test scripts to increase max-old-space-size to 8192 and include react-createelement-comparison.test.ts in
|
|
327
|
-
test and perf runs
|
|
328
|
-
- update various package resolutions in yarn.lock to align with new versions and dependencies
|
|
329
|
-
- **babel**: add "builtIns": false to minify plugin configuration ([
|
|
330
|
-
`e16cdfb`](https://github.com/l7aromeo/meonode-ui/commit/e16cdfb))
|
|
331
|
-
- **yarn**: update yarnPath to version 4.11.0 ([`ecb6c68`](https://github.com/l7aromeo/meonode-ui/commit/ecb6c68))
|
|
332
|
-
|
|
333
|
-
### Docs
|
|
334
|
-
|
|
335
|
-
- **CONTRIBUTING**: improve formatting and readability of contribution guidelines ([
|
|
336
|
-
`a7462ed`](https://github.com/l7aromeo/meonode-ui/commit/a7462ed))
|
|
337
|
-
|
|
338
|
-
## [0.4.10] - 2025-11-20
|
|
339
|
-
|
|
340
|
-
### Fix
|
|
341
|
-
|
|
342
|
-
- **unmounter**: prevent redundant FinalizationRegistry callbacks ([
|
|
343
|
-
`59f5adf`](https://github.com/l7aromeo/meonode-ui/commit/59f5adf2f553aa49a88d1b44366b004d829ca107))
|
|
344
|
-
- Explicitly unregister node from cacheCleanupRegistry on unmount
|
|
345
|
-
- Prevents double cleanup when node is both unmounted and GC'd
|
|
346
|
-
- Improves cleanup efficiency and reduces unnecessary registry callbacks
|
|
347
|
-
|
|
348
|
-
### Perf
|
|
349
|
-
|
|
350
|
-
- **util**: optimize prop processing and child handling ([
|
|
351
|
-
`be26488`](https://github.com/l7aromeo/meonode-ui/commit/be26488e304629dd13851dfcaa7fedf43ad8b5c3))
|
|
352
|
-
- Conditional sort: only sort keys if length > 1 (eliminates unnecessary sorts)
|
|
353
|
-
- Replace for...in with Object.keys() iteration for better performance and safety
|
|
354
|
-
- Add fast path for single child processing (non-array or 1-element array)
|
|
355
|
-
- Avoid unnecessary array operations for common single-child case
|
|
356
|
-
- Performance impact:
|
|
357
|
-
- Reduced CPU overhead for small prop objects
|
|
358
|
-
- Faster iteration with Object.keys() vs for...in
|
|
359
|
-
- Eliminates array map() call for single child components
|
|
360
|
-
|
|
361
|
-
- **core**: add exception safety and optimize render method ([
|
|
362
|
-
`5aad000`](https://github.com/l7aromeo/meonode-ui/commit/5aad000335ff29f078a9d40192d5a70fe9b61d12))
|
|
363
|
-
- Wrap render logic in try-finally to ensure renderContext is always released
|
|
364
|
-
- Null out workStack slots before releasing to help GC
|
|
365
|
-
- Pre-allocate finalChildren array to avoid resizing during iteration
|
|
366
|
-
- Replace non-null assertion with explicit error handling for better debugging
|
|
367
|
-
- Add object pooling for workStack and renderedElements (reduces GC pressure)
|
|
368
|
-
- Pool capped at 50 contexts with 2048-item limit to prevent memory issues
|
|
369
|
-
- Exception safety ensures cleanup even if rendering throws
|
|
370
|
-
|
|
371
|
-
### Test
|
|
372
|
-
|
|
373
|
-
- **perf**: add React comparison tests with memory tracking ([
|
|
374
|
-
`bc66d54`](https://github.com/l7aromeo/meonode-ui/commit/bc66d540c4ffa4ad083322dbdbc201f652ea5314))
|
|
375
|
-
- Add comprehensive performance comparison between React.createElement and MeoNode
|
|
376
|
-
- Test both flat (10k nodes) and nested (5k nodes) structures
|
|
377
|
-
- Include memory usage measurements (initial + after 100 updates)
|
|
378
|
-
- Reduce nested nodes from 10k to 5k to prevent stack overflow with StyledRenderer
|
|
379
|
-
- Add table output with time and memory columns for clear comparison
|
|
380
|
-
- Add GC availability warning for accurate measurements
|
|
381
|
-
- Provides detailed performance and memory behavior insights during re-renders
|
|
382
|
-
- Avoids stack overflow in deeply nested test scenarios
|
|
383
|
-
|
|
384
|
-
- **performance**: enhance performance metrics report formatting and adjust thresholds ([
|
|
385
|
-
`6f3abe4`](https://github.com/l7aromeo/meonode-ui/commit/6f3abe4442938aa6cd414341fdf2aba25a9ece58))
|
|
386
|
-
- Improve table formatting for performance metrics
|
|
387
|
-
- Adjust test thresholds based on optimization results
|
|
388
|
-
- Enhanced reporting for better visibility into performance characteristics
|
|
389
|
-
|
|
390
|
-
## [0.4.9] - 2025-11-19
|
|
391
|
-
|
|
392
|
-
### Feat
|
|
393
|
-
|
|
394
|
-
- **build**: add support for @tests alias and include tests folder in build and test configs ([
|
|
395
|
-
`4dfd165`](https://github.com/l7aromeo/meonode-ui/commit/4dfd165fa52f93fe63ac7338344b91dfa5622c4b))
|
|
396
|
-
|
|
397
|
-
### Perf
|
|
398
|
-
|
|
399
|
-
- **core**: optimize rendering, caching, and memory management ([
|
|
400
|
-
`4f599be`](https://github.com/l7aromeo/meonode-ui/commit/4f599be44458fef208a30849545606b060c4ec6b))
|
|
401
|
-
- Reworks the core rendering loop to use a more efficient, manually-managed work stack with exponential growth,
|
|
402
|
-
reducing reallocations and improving performance for deep and wide node trees.
|
|
403
|
-
- Optimizes stable key generation by removing expensive shallow equality checks in favor of strict reference
|
|
404
|
-
equality, significantly speeding up prop processing for cached components.
|
|
405
|
-
- Implements a high-performance MinHeap-based LRU cache eviction strategy for prop processing, replacing a slower
|
|
406
|
-
sort-based method. This ensures that the most relevant props are kept in the cache with minimal overhead.
|
|
407
|
-
- Introduces CSS object hashing to accelerate prop signature generation, avoiding costly serialization of large
|
|
408
|
-
style objects.
|
|
409
|
-
- Fixes several memory leaks by ensuring proper cleanup of node properties (lastSignature, lastPropsObj) and
|
|
410
|
-
unregistering nodes from the cache cleanup registry upon eviction.
|
|
411
|
-
- Decouples element cache deletion from mount tracking to prevent race conditions and ensure reliable cleanup during
|
|
412
|
-
component unmounting.
|
|
413
|
-
|
|
414
|
-
### Refactor
|
|
415
|
-
|
|
416
|
-
- **build**: rename constants directory from constants to constant and update imports accordingly ([
|
|
417
|
-
`9531947`](https://github.com/l7aromeo/meonode-ui/commit/9531947af9b304c11c0865e8deafa1a633220753))
|
|
418
|
-
|
|
419
|
-
### Test
|
|
420
|
-
|
|
421
|
-
- **perf**: overhaul performance test suite ([
|
|
422
|
-
`e3bd6ac`](https://github.com/l7aromeo/meonode-ui/commit/e3bd6ac6ceca474f935da644ff0c23b2f1de7692))
|
|
423
|
-
- Introduces a new, structured performance reporting system using cli-table3 for clear, grouped metrics.
|
|
424
|
-
- Refactors the entire performance test suite into logical groups: Layout Rendering, Memory Management, and Prop
|
|
425
|
-
Processing.
|
|
426
|
-
- Adds comprehensive memory leak detection tests for heavy state changes and repeated mount/unmount cycles, using
|
|
427
|
-
forced garbage collection for more accurate heap analysis.
|
|
428
|
-
- Extracts the large, complex CSS object into a dedicated test constant for better separation of concerns.
|
|
429
|
-
- Updates memoization tests to align with the new, weighted LRU cache eviction scoring.
|
|
430
|
-
|
|
431
|
-
### Chore
|
|
432
|
-
|
|
433
|
-
- **deps**: update dependencies including typescript-eslint to 8.47.0 and add cli-table3 0.6.5 ([
|
|
434
|
-
`6064555`](https://github.com/l7aromeo/meonode-ui/commit/6064555f0108ed47f9b31e98c4758f7449a67ff2))
|
|
435
|
-
|
|
436
|
-
## [0.4.8] - 2025-11-18
|
|
437
|
-
|
|
438
|
-
### Feat
|
|
439
|
-
|
|
440
|
-
- **client**: add generic type parameter to render function for stronger type safety ([
|
|
441
|
-
`90a770e`](https://github.com/l7aromeo/meonode-ui/commit/90a770e))
|
|
442
|
-
- **core**: improve BaseNode rendering with iterative traversal and memory optimizations ([
|
|
443
|
-
`1d5330a`](https://github.com/l7aromeo/meonode-ui/commit/1d5330a))
|
|
444
|
-
- Introduce WorkItem interface to represent nodes in the iterative work stack during BaseNode rendering.
|
|
445
|
-
- Replace recursive render traversal with an iterative depth-first approach using a preallocated workStack array for
|
|
446
|
-
better performance and reduced call stack usage.
|
|
447
|
-
- Implement dynamic resizing of workStack array to handle arbitrary tree sizes efficiently.
|
|
448
|
-
- Update BaseNode’s internal caching fields (`lastPropsRef` and `lastSignature`) to be public and consistently used
|
|
449
|
-
for stable key generation.
|
|
450
|
-
- Modify MeoNodeUnmounter component to accept BaseNode instance and clear its `lastPropsRef` and `lastSignature` on
|
|
451
|
-
unmount to prevent memory leaks.
|
|
452
|
-
- Refine type annotations across node utilities and factory functions for stronger type safety (
|
|
453
|
-
`Record<string, unknown>` instead of `any`).
|
|
454
|
-
- Optimize critical prop extraction logic by replacing Set and startsWith checks with faster inline charCode
|
|
455
|
-
comparisons.
|
|
456
|
-
- Clean up and clarify utility methods related to prop signature creation, shallow equality, and portal management.
|
|
457
|
-
- Improve node.util.ts by adjusting caching strategies, prop categorization, and React element handling for better
|
|
458
|
-
robustness and maintainability.
|
|
459
|
-
|
|
460
|
-
### Fixes
|
|
461
|
-
|
|
462
|
-
- **navigation-cache-manager**: add proper typing and global window declaration for cleanup flag ([
|
|
463
|
-
`6180d40`](https://github.com/l7aromeo/meonode-ui/commit/6180d40))
|
|
464
|
-
|
|
465
|
-
### Refactor
|
|
466
|
-
|
|
467
|
-
- improve typings and type safety in theme util and styled renderer ([
|
|
468
|
-
`dbe1f33`](https://github.com/l7aromeo/meonode-ui/commit/dbe1f33))
|
|
469
|
-
- Added explicit TypeScript types (e.g., CssProp, Record<string, unknown>) for variables and function signatures in
|
|
470
|
-
`styled-renderer.client.ts` and `theme.util.ts`.
|
|
471
|
-
- Updated cache maps to use more precise generic types for better type inference and safety.
|
|
472
|
-
- Enhanced `resolveObjWithTheme` and related theme resolution logic with stronger typing and nullish coalescing.
|
|
473
|
-
- Improved error handling for invalid theme path values.
|
|
474
|
-
- Applied copy-on-write pattern with properly typed arrays and objects during theme resolution.
|
|
475
|
-
- Strengthened type guards, e.g., `isPlainObject` type predicate.
|
|
476
|
-
- Minor fixes to variable declarations with explicit types for clarity and consistency.
|
|
477
|
-
|
|
478
|
-
### Chore
|
|
479
|
-
|
|
480
|
-
- **babel**: update preset-env targets and expand plugin exclusions ([
|
|
481
|
-
`f38cd24`](https://github.com/l7aromeo/meonode-ui/commit/f38cd24))
|
|
482
|
-
- Set preset-env targets to support ES modules
|
|
483
|
-
- Enable bugfixes option
|
|
484
|
-
- Add multiple plugins to exclude list for better optimization
|
|
485
|
-
- Clean up formatting of root, alias, extensions, and exclude fields
|
|
486
|
-
|
|
487
|
-
### Test
|
|
488
|
-
|
|
489
|
-
- **performance**: add comprehensive performance tests and metrics reporting ([
|
|
490
|
-
`c3d7a81`](https://github.com/l7aromeo/meonode-ui/commit/c3d7a81))
|
|
491
|
-
- Add detailed performance tests measuring render times for realistic layouts, 10,000 flat nodes, and 10,000 deeply
|
|
492
|
-
nested nodes.
|
|
493
|
-
- Introduce a heavy state changes test to detect memory leaks and ensure responsiveness under frequent updates.
|
|
494
|
-
- Collect and log performance metrics including median render times and memory usage for analysis.
|
|
495
|
-
- Add tests for stableKey generation performance with identical, shallowly equal, unique, large, and complex CSS
|
|
496
|
-
props.
|
|
497
|
-
- Enhance test suite with CSS styling for better visualization and interaction during tests.
|
|
498
|
-
- Improve cleanup and reporting to avoid resource leaks and provide clearer performance insights.
|
|
499
|
-
|
|
500
|
-
## [0.4.7] - 2025-11-17
|
|
501
|
-
|
|
502
|
-
### Fixes
|
|
503
|
-
|
|
504
|
-
- **core/cache:** optimize navigation cache debounce timing and enhance stableKey handling ([
|
|
505
|
-
`fff6f207`](https://github.com/l7aromeo/meonode-ui/commit/fff6f2070a06cc5ad461a2f992b111fb957fae6f))
|
|
506
|
-
- Adjust navigation cleanup debounce duration dynamically based on cache size for better performance.
|
|
507
|
-
- Change stableKey and _lastSignature to be optional to better represent their possible undefined state.
|
|
508
|
-
- Refactor _getStableKey to return undefined on server instead of empty string.
|
|
509
|
-
- Optimize critical props extraction by introducing NodeUtil.extractCriticalProps helper.
|
|
510
|
-
- Improve client-side caching logic to avoid lookups when stableKey is absent.
|
|
511
|
-
- Remove unused imports and redundant code in node.util.ts; improve shallowEqual implementation.
|
|
512
|
-
- Update createPropSignature to return undefined on server and use getElementTypeName directly.
|
|
513
|
-
- Add detailed comments and refine hashString combining FNV-1a and djb2 hashes for robustness.
|
|
514
|
-
|
|
515
|
-
## [0.4.6] - 2025-11-17
|
|
516
|
-
|
|
517
|
-
### Fixes
|
|
518
|
-
|
|
519
|
-
- **core/cache:** enhance memoization & caching system to prevent memory leaks and ensure safe lifecycle management ([
|
|
520
|
-
`253d7d00`](https://github.com/l7aromeo/meonode-ui/commit/253d7d006121dc588a51580d5120c7123a5f8777))
|
|
521
|
-
This introduces a robust, three-layered cleanup strategy to ensure cache integrity:
|
|
522
|
-
1. An immediate, lifecycle-driven cleanup via the new `MeoNodeUnmounter` component.
|
|
523
|
-
2. A debounced, event-driven cleanup for SPA navigations via `NavigationCacheManagerUtil`.
|
|
524
|
-
3. A final, GC-driven safety net using the `FinalizationRegistry` API.
|
|
525
|
-
|
|
526
|
-
### Refactor
|
|
527
|
-
|
|
528
|
-
- **core:** migrate core logic from `src/helper/` to a new `src/util/` directory for better separation of concerns.
|
|
529
|
-
- **core:** extract internal utility functions from `core.node.ts` into `node.util.ts`.
|
|
530
|
-
- **core:** make internal caches on `BaseNode` public to support the new externalized management architecture.
|
|
531
|
-
|
|
532
|
-
### Chore
|
|
533
|
-
|
|
534
|
-
- **tooling:** enable TypeScript's `strict: true` mode and update codebase to be fully compliant.
|
|
535
|
-
- **tooling:** add CommonJS (`require`) exports to `package.json` for improved module compatibility.
|
|
536
|
-
- **tooling:** add `NODE_OPTIONS='--expose-gc'` to the test script to allow for explicit garbage collection during
|
|
537
|
-
tests.
|
|
538
|
-
- **tests:** refine test suite by standardizing `afterEach` hooks and updating memoization tests to directly validate
|
|
539
|
-
internal caching.
|
|
540
|
-
|
|
541
|
-
## [0.4.5] - 2025-11-15
|
|
542
|
-
|
|
543
|
-
### Feat
|
|
544
|
-
|
|
545
|
-
- **cache**: implement robust cache management and theme caching ([
|
|
546
|
-
`9ed749f6`](https://github.com/l7aromeo/meonode-ui/commit/9ed749f6d877fdc8b6a736788add13225b07dd63))
|
|
547
|
-
Refactor NavigationCacheManager for robustness, add memory monitoring and auto-cleanup.
|
|
548
|
-
Implement LRU eviction for ThemeResolverCache and integrate with BaseNode cache clearing.
|
|
549
|
-
|
|
550
|
-
### Refactor
|
|
551
|
-
|
|
552
|
-
- **test**: split node.test.ts into smaller, more focused test files ([
|
|
553
|
-
`930f998e`](https://github.com/l7aromeo/meonode-ui/commit/930f998e5f91faef3ff42fcafc6b02fc23f422ff))
|
|
554
|
-
This commit refactors the test suite by splitting the monolithic `node.test.ts`
|
|
555
|
-
file into several smaller, more focused test files, each covering a specific
|
|
556
|
-
aspect of the BaseNode functionality.
|
|
557
|
-
|
|
558
|
-
Specifically, `memoization.test.ts` was created to house tests related to
|
|
559
|
-
dependency tracking and memoization in real-world scenarios. During this
|
|
560
|
-
refactoring, a `console.error` related to duplicate keys in a memoization
|
|
561
|
-
test was identified and suppressed to prevent noisy test output while
|
|
562
|
-
preserving the test's original intent of verifying cache collision prevention.
|
|
563
|
-
|
|
564
|
-
### Fix
|
|
565
|
-
|
|
566
|
-
- **core**: pass disableEmotion flag to _renderProcessedNode for improved processing ([
|
|
567
|
-
`b68e3d4`](https://github.com/l7aromeo/meonode-ui/commit/b68e3d49a732ee590805a0298f733b800a9b172d))
|
|
568
|
-
|
|
569
|
-
### Chore
|
|
570
|
-
|
|
571
|
-
- **test**: adjust performance test cleanup by removing cache clearing from afterEach ([
|
|
572
|
-
`f72cea5e`](https://github.com/l7aromeo/meonode-ui/commit/f72cea5ef983fdaba012a7d446b58c7da06f5e1a))
|
|
573
|
-
|
|
574
|
-
## [0.4.4] - 2025-11-15
|
|
575
|
-
|
|
576
|
-
### Perf
|
|
577
|
-
|
|
578
|
-
- **core**: implement intelligent caching and memory management ([
|
|
579
|
-
`0e5671b`](https://github.com/l7aromeo/meonode-ui/commit/0e5671b36189c964d66676ef633f3ccdbd9004e2))
|
|
580
|
-
Introduces a sophisticated caching and memory management system to prevent memory leaks and improve performance in
|
|
581
|
-
Single Page Applications (SPAs).
|
|
582
|
-
|
|
583
|
-
This new system intelligently tracks mounted components and automatically cleans up caches of unmounted components
|
|
584
|
-
during navigation events.
|
|
585
|
-
|
|
586
|
-
Key features and improvements include:
|
|
587
|
-
|
|
588
|
-
- **Navigation-aware Cache Eviction:** A new `NavigationCacheManager` listens for browser navigation events (
|
|
589
|
-
popstate, pushState, etc.) and triggers a safe cleanup of the element cache. This prevents the cache from growing
|
|
590
|
-
indefinitely with stale entries from previous pages.
|
|
591
|
-
|
|
592
|
-
- **Mount Tracking:** A `MountTracker` class now keeps a record of all mounted `BaseNode` instances. This allows the
|
|
593
|
-
cache eviction logic to accurately determine which components are safe to remove from the cache.
|
|
594
|
-
|
|
595
|
-
- **Advanced Eviction Policies:** The `SafeCacheManager` implements several eviction policies, including evicting
|
|
596
|
-
unmounted components, old unmounted components, and an emergency eviction policy for high memory pressure
|
|
597
|
-
scenarios.
|
|
598
|
-
|
|
599
|
-
- **Memory-Safe Portal System:** The portal implementation has been refactored to use a `WeakMap`. This ensures that
|
|
600
|
-
portal-related DOM elements and React roots are automatically garbage collected when the corresponding `BaseNode`
|
|
601
|
-
instance is no longer in use, preventing a common source of memory leaks.
|
|
602
|
-
|
|
603
|
-
- **Improved Cache Entry Metadata:** The element cache entries now store additional metadata, such as creation
|
|
604
|
-
timestamp, access count, and a `WeakRef` to the node instance, enabling more intelligent eviction decisions.
|
|
605
|
-
|
|
606
|
-
- **Enhanced Stability:** Component identifiers for caching are now generated using a `WeakMap`, providing more
|
|
607
|
-
stable and reliable keys than relying on component names, which can be affected by minification.
|
|
608
|
-
|
|
609
|
-
- **Comprehensive Test Coverage:** Added a suite of new integration tests to validate the caching and memory
|
|
610
|
-
management system. These tests cover key scenarios including cache collision, rapid navigation, React 18 Strict
|
|
611
|
-
Mode compatibility, large prop object fingerprinting, and LRU eviction logic.
|
|
612
|
-
|
|
613
|
-
### Fix
|
|
614
|
-
|
|
615
|
-
- **core**: simplify property assignment in common helper ([
|
|
616
|
-
`312af57`](https://github.com/l7aromeo/meonode-ui/commit/312af574712202a25bdd62fab94441a937f159f2))
|
|
617
|
-
|
|
618
|
-
### Refactor
|
|
619
|
-
|
|
620
|
-
- **core**: add ElementCacheEntry interface for memoization and update css prop type ([
|
|
621
|
-
`6a8381c`](https://github.com/l7aromeo/meonode-ui/commit/6a8381c4c85cb22df4ba398637401d420461e413))
|
|
622
|
-
|
|
623
|
-
## [0.4.3] - 2025-11-14
|
|
624
|
-
|
|
625
|
-
### Docs
|
|
626
|
-
|
|
627
|
-
- **core**: add detailed comments to rendering methods ([
|
|
628
|
-
`731c83e`](https://github.com/l7aromeo/meonode-ui/commit/731c83e))
|
|
629
|
-
|
|
630
|
-
### Fix
|
|
631
|
-
|
|
632
|
-
- **core**: adjust isStyledComponent logic to improve style handling ([
|
|
633
|
-
`ff7a59e`](https://github.com/l7aromeo/meonode-ui/commit/ff7a59e))
|
|
634
|
-
|
|
635
|
-
### Refactor
|
|
636
|
-
|
|
637
|
-
- **core**: simplify _processProps by removing style prop handling ([
|
|
638
|
-
`b3570b4`](https://github.com/l7aromeo/meonode-ui/commit/b3570b4))
|
|
639
|
-
|
|
640
|
-
## [0.4.2] - 2025-11-14
|
|
641
|
-
|
|
642
|
-
### Fix
|
|
643
|
-
|
|
644
|
-
- **core**: remove deps property from props since it should not be passed to element attribute ([
|
|
645
|
-
`6b01cbe`](https://github.com/l7aromeo/meonode-ui/commit/6b01cbe))
|
|
646
|
-
|
|
647
|
-
## [0.4.1] - 2025-11-14
|
|
648
|
-
|
|
649
|
-
### Test
|
|
650
|
-
|
|
651
|
-
- **node**: enhance dependency and memoization tests with real-world scenarios ([
|
|
652
|
-
`d7452fa`](https://github.com/l7aromeo/meonode-ui/commit/d7452fae9b3ef22a82dc83210851849d82de479f))
|
|
653
|
-
|
|
654
|
-
### Fix
|
|
655
|
-
|
|
656
|
-
- **core**: enhance error handling and improve style property detection ([
|
|
657
|
-
`ca79c27`](https://github.com/l7aromeo/meonode-ui/commit/ca79c277cdfea5b62b54779ec2492518681639d1))
|
|
658
|
-
|
|
659
|
-
### Chore
|
|
660
|
-
|
|
661
|
-
- **deps**: update dependencies in package.json for improved stability and performance ([
|
|
662
|
-
`eba2108`](https://github.com/l7aromeo/meonode-ui/commit/eba21080c953b1c6b6c1bbb6a401257845116f09))
|
|
663
|
-
|
|
664
|
-
### Perf
|
|
665
|
-
|
|
666
|
-
- **core**: Optimize prop processing and caching with new signature generation ([
|
|
667
|
-
`8cf0319`](https://github.com/l7aromeo/meonode-ui/commit/8cf0319fd99c3c8496b6e63207cb378b6c521ae2))
|
|
668
|
-
|
|
669
|
-
### Refactor
|
|
670
|
-
|
|
671
|
-
- **types**: move node.type.ts to types directory and update imports ([
|
|
672
|
-
`ccf769a`](https://github.com/l7aromeo/meonode-ui/commit/ccf769a2670e4546bfa776034a4fa8925ca2d27d))
|
|
673
|
-
|
|
674
|
-
## [0.4.0] - 2025-11-13
|
|
675
|
-
|
|
676
|
-
### Feature
|
|
677
|
-
|
|
678
|
-
- **core**: Implemented an advanced memoization and caching system to optimize rendering performance. This includes:
|
|
679
|
-
- **Dependency-Based Memoization**: Nodes can now be created with a dependency array, similar to React's `useMemo`,
|
|
680
|
-
to prevent unnecessary re-renders of the node and its entire subtree if dependencies have not changed. ([
|
|
681
|
-
`3b0a110`](https://github.com/l7aromeo/meonode-ui/commit/3b0a110eb3db25862476d020182be9f0dba663e4))
|
|
682
|
-
- **Enhanced Prop Caching**: The prop signature generation is now more robust, and the cache uses an advanced LRU
|
|
683
|
-
eviction strategy to remain efficient. ([
|
|
684
|
-
`3b0a110`](https://github.com/l7aromeo/meonode-ui/commit/3b0a110eb3db25862476d020182be9f0dba663e4))
|
|
685
|
-
- **API Updates**: The `Node`, `createNode`, `createChildrenFirstNode`, and `Component` HOCs have been updated to
|
|
686
|
-
accept an optional `deps` array to enable memoization. ([
|
|
687
|
-
`3b0a110`](https://github.com/l7aromeo/meonode-ui/commit/3b0a110eb3db25862476d020182be9f0dba663e4))
|
|
688
|
-
|
|
689
|
-
### Test
|
|
690
|
-
|
|
691
|
-
- **core**: Added a comprehensive suite of tests for the new memoization and caching system, covering dependency-based
|
|
692
|
-
memoization, reactive and non-reactive children, complex state updates, and memoization of Higher-Order Components (
|
|
693
|
-
HOCs). ([`6bcd1b1`](https://github.com/l7aromeo/meonode-ui/commit/6bcd1b1bc6b2450c3d4296cb4af326f61cfee401))
|
|
694
|
-
|
|
695
|
-
## [0.3.18] - 2025-11-12
|
|
696
|
-
|
|
697
|
-
### Fixed
|
|
698
|
-
|
|
699
|
-
- **core**: refine prop caching to handle dynamic props correctly ([
|
|
700
|
-
`4c0641e`](https://github.com/l7aromeo/meonode-ui/commit/4c0641e892f934551f100629cac72fc3f4649ab0))
|
|
701
|
-
|
|
702
|
-
## [0.3.17] - 2025-11-12
|
|
703
|
-
|
|
704
|
-
### Perf
|
|
705
|
-
|
|
706
|
-
- **core**: implement iterative renderer and prop caching ([
|
|
707
|
-
`8a3a264`](https://github.com/l7aromeo/meonode-ui/commit/8a3a264be68bd041b6340636f5f7ee2b0caa63ff))
|
|
708
|
-
- **helper**: refactor theme resolution logic for improved performance and cache correctness ([
|
|
709
|
-
`9614cb8`](https://github.com/l7aromeo/meonode-ui/commit/9614cb8d2aeae0d9bd2f9cf3edd51c022cd93273))
|
|
710
|
-
|
|
711
|
-
### Chore
|
|
712
|
-
|
|
713
|
-
- fix typo in JSDoc comment for useTheme hook ([
|
|
714
|
-
`de0ddd9`](https://github.com/l7aromeo/meonode-ui/commit/de0ddd9a6308f4a76b6ad843a6139d42bd3fcf53))
|
|
715
|
-
- add deprecation notice to usePortal hook for future removal ([
|
|
716
|
-
`f8a2923`](https://github.com/l7aromeo/meonode-ui/commit/f8a29230cad3962addb8cf28ed3538e6de236181))
|
|
717
|
-
- update PortalProps type definition to provide a default type parameter ([
|
|
718
|
-
`de73ba5`](https://github.com/l7aromeo/meonode-ui/commit/de73ba5b9d9dd51637b24b0309d681309d9338ae))
|
|
719
|
-
- update isNodeInstance type guard to use BaseNode instead of NodeInstance ([
|
|
720
|
-
`2c69d05`](https://github.com/l7aromeo/meonode-ui/commit/2c69d05b3d1593a976e439ca7404696b781e5012))
|
|
721
|
-
- rename jest.config.mjs to jest.config.ts and update configuration for TypeScript support ([
|
|
722
|
-
`a3213eb`](https://github.com/l7aromeo/meonode-ui/commit/a3213eb5b91a55364cb4f5362005bc2a46934de5))
|
|
723
|
-
- **scripts**: increase stack size for jest test and fix build commands ([
|
|
724
|
-
`e046cdf`](https://github.com/l7aromeo/meonode-ui/commit/e046cdf397e2cf418e09e149a9e0cf1e48f3d926))
|
|
725
|
-
- update tsconfig.json to exclude dist and node_modules directories ([
|
|
726
|
-
`eeb9577`](https://github.com/l7aromeo/meonode-ui/commit/eeb957722ab7a26cbe59047c068f9955b082502e))
|
|
727
|
-
- update tsconfig.json with enhanced compiler options and path mappings for better development experience ([
|
|
728
|
-
`89bc1a4`](https://github.com/l7aromeo/meonode-ui/commit/89bc1a42c23f015acfed1bcb860ebb6a4c684fc1))
|
|
729
|
-
|
|
730
|
-
## [0.3.16] - 2025-11-05
|
|
731
|
-
|
|
732
|
-
### Added
|
|
733
|
-
|
|
734
|
-
- **tests**: add tests for Fragment, Suspense, and Activity components to verify styling prop handling ([
|
|
735
|
-
`2af386f`](https://github.com/l7aromeo/meonode-ui/commit/2af386f))
|
|
736
|
-
- **core**: enhance NodeProps type to conditionally include built-in React components ([
|
|
737
|
-
`3b8a4cb`](https://github.com/l7aromeo/meonode-ui/commit/3b8a4cb))
|
|
738
|
-
- **react**: add REACT_ACTIVITY_TYPE to react-is helper ([
|
|
739
|
-
`e91e48f`](https://github.com/l7aromeo/meonode-ui/commit/e91e48f))
|
|
740
|
-
- **core**: export NO_STYLE_TAGS type for better type inference ([
|
|
741
|
-
`a6db6e8`](https://github.com/l7aromeo/meonode-ui/commit/a6db6e8))
|
|
742
|
-
- **react**: add Fragment component to create a container without extra DOM elements ([
|
|
743
|
-
`d5e376a`](https://github.com/l7aromeo/meonode-ui/commit/d5e376a))
|
|
744
|
-
|
|
745
|
-
## [0.3.15] - 2025-11-04
|
|
746
|
-
|
|
747
|
-
### Added
|
|
748
|
-
|
|
749
|
-
- **core**: add disableEmotion prop to disable emotion styling and propagate to children ([
|
|
750
|
-
`377a9e9`](https://github.com/l7aromeo/meonode-ui/commit/377a9e9d4844ba7869155e686c9b31f0f9ce2329))
|
|
751
|
-
- **react**: enhance isContextProvider and isReactClassComponent checks ([
|
|
752
|
-
`e8839e4`](https://github.com/l7aromeo/meonode-ui/commit/e8839e4c231bdd66686f7b43d9889a18cd9fc791))
|
|
753
|
-
|
|
754
|
-
## [0.3.14] - 2025-10-30
|
|
755
|
-
|
|
756
|
-
### Added
|
|
757
|
-
|
|
758
|
-
- **core**: Add handling for Suspense and Activity components ([
|
|
759
|
-
`0f9fcb1`](https://github.com/l7aromeo/meonode-ui/commit/0f9fcb171fdce28b5a880e69e2d591543e3af817))
|
|
760
|
-
|
|
761
|
-
## [0.3.13] - 2025-10-30
|
|
762
|
-
|
|
763
|
-
### Fixed
|
|
764
|
-
|
|
765
|
-
- **theme.helper**: process theme strings returned from functions ([
|
|
766
|
-
`286fd89`](https://github.com/l7aromeo/meonode-ui/commit/286fd89e28cc10b467a208be4cdf1b7508d0be8c))
|
|
767
|
-
|
|
768
|
-
## [0.3.12] - 2025-10-23
|
|
769
|
-
|
|
770
|
-
### Added
|
|
771
|
-
|
|
772
|
-
- **react**: add Suspense component and JSDoc for Activity and Suspense ([
|
|
773
|
-
`c1760fd`](https://github.com/l7aromeo/meonode-ui/commit/c1760fd))
|
|
774
|
-
|
|
775
|
-
## [0.3.11] - 2025-10-19
|
|
776
|
-
|
|
777
|
-
### Added
|
|
778
|
-
|
|
779
|
-
- **components**: add react activity node and export it in main ([
|
|
780
|
-
`aadbc2d`](https://github.com/l7aromeo/meonode-ui/commit/aadbc2d08a928f1ba88bd4572b45eed8cb100a87))
|
|
781
|
-
- **theme.helper**: update resolveObjWithTheme to improve object type checking ([
|
|
782
|
-
`da1ce4c`](https://github.com/l7aromeo/meonode-ui/commit/da1ce4cd53ccbe2d2a562a49730151434177dc59))
|
|
783
|
-
|
|
784
|
-
### Changed
|
|
785
|
-
|
|
786
|
-
- **chore**: update dependencies in package.json and yarn.lock ([
|
|
787
|
-
`0c0ced6`](https://github.com/l7aromeo/meonode-ui/commit/0c0ced68662bb701634d49dc79da86e4ddce5392))
|
|
788
|
-
- **chore**: remove \'use strict\' directive from multiple files ([
|
|
789
|
-
`17d79dc`](https://github.com/l7aromeo/meonode-ui/commit/17d79dcb105a8c2062695071c3f587f6db9a5711))
|
|
790
|
-
|
|
791
|
-
### Docs
|
|
792
|
-
|
|
793
|
-
- **docs**: update Node.js version requirement in CONTRIBUTING.md ([
|
|
794
|
-
`4c577c3`](https://github.com/l7aromeo/meonode-ui/commit/4c577c3e23294bdc188cda5b14375af1cb967888))
|
|
795
|
-
|
|
796
|
-
### Test
|
|
797
|
-
|
|
798
|
-
- **node**: add test case for preserving Node instances passed through props and theme resolution ([
|
|
799
|
-
`f4d1344`](https://github.com/l7aromeo/meonode-ui/commit/f4d1344355f2a4631ccdf04998bcf618d4ce1dc6))
|
|
800
|
-
|
|
801
|
-
## [0.3.10] - 2025-10-09
|
|
802
|
-
|
|
803
|
-
### Fixed
|
|
804
|
-
|
|
805
|
-
- **core**: Re-hydrate BaseNode instances that lose class identity during React lifecycle.
|
|
806
|
-
|
|
807
|
-
### Changed
|
|
808
|
-
|
|
809
|
-
- **deps**: update dependencies to latest versions in package.json
|
|
810
|
-
|
|
811
|
-
## [0.3.9] - 2025-09-30
|
|
812
|
-
|
|
813
|
-
### Fixed
|
|
814
|
-
|
|
815
|
-
- **html.node**: update `Root` node default minHeight and minWidth to use dynamic viewport units
|
|
816
|
-
|
|
817
|
-
## [0.3.8] - 2025-09-29
|
|
818
|
-
|
|
819
|
-
### Added
|
|
820
|
-
|
|
821
|
-
- **styling**: Enabled theme-aware functions for css props, allowing for more dynamic styling (e.g.,
|
|
822
|
-
`color: theme => theme.system.colors.primary`).
|
|
823
|
-
|
|
824
|
-
### Refactor
|
|
825
|
-
|
|
826
|
-
- **core**: Refactored the style resolution logic (`resolveObjWithTheme` and `StyledRenderer`) to selectively process
|
|
827
|
-
the `css` prop. This enables the new theme-function feature while ensuring that other props (like `children`) are not
|
|
828
|
-
processed, maintaining compatibility with Next.js Server Components.
|
|
829
|
-
|
|
830
|
-
## [0.3.7] - 2025-09-27
|
|
831
|
-
|
|
832
|
-
### Added
|
|
833
|
-
|
|
834
|
-
- **rsc:** make client components RSC compatible
|
|
835
|
-
|
|
836
|
-
### Refactor
|
|
837
|
-
|
|
838
|
-
- **node:** isolate css prop for StyledRenderer
|
|
839
|
-
|
|
840
|
-
## [0.3.6] - 2025-09-27
|
|
841
|
-
|
|
842
|
-
### Changed
|
|
843
|
-
|
|
844
|
-
- **changelog:** update missing changelog entries
|
|
845
|
-
|
|
846
|
-
## [0.3.5] - 2025-09-27
|
|
847
|
-
|
|
848
|
-
### Refactor
|
|
849
|
-
|
|
850
|
-
- **refactor:** remove automatic key generation and use spread children in createElement
|
|
851
|
-
- Remove _generateKey method and all automatic key generation logic
|
|
852
|
-
- Simplify _processRawNode by removing nodeIndex parameter and complex case handling
|
|
853
|
-
- Update render() to spread array children as individual arguments to createElement
|
|
854
|
-
- Only preserve explicit non-null keys from original React elements
|
|
855
|
-
- Fix component remounting issues when children content changes (e.g., during typing)
|
|
856
|
-
|
|
857
|
-
## [0.3.4] - 2025-09-26
|
|
858
|
-
|
|
859
|
-
### Fixed
|
|
860
|
-
|
|
861
|
-
- **fix:** add cookie path to prevent duplicate theme cookie
|
|
862
|
-
|
|
863
|
-
## [0.3.3] - 2025-09-26
|
|
864
|
-
|
|
865
|
-
### Fixed
|
|
866
|
-
|
|
867
|
-
- **fix:** enhance element type validation to allow `createPortal` to be a children
|
|
868
|
-
|
|
869
|
-
## [0.3.2] - 2025-09-26
|
|
870
|
-
|
|
871
|
-
### Fixed
|
|
872
|
-
|
|
873
|
-
- **fix**: update import paths for Node component to improve module structure
|
|
874
|
-
- **fix(theme-provider):** update type imports and enhance function return type for better clarity
|
|
875
|
-
|
|
876
|
-
## [0.3.1] - 2025-09-26
|
|
877
|
-
|
|
878
|
-
### Docs
|
|
879
|
-
|
|
880
|
-
- **docs(readme):** update readme with new theme system
|
|
881
|
-
|
|
882
|
-
## [0.3.0] - 2025-09-26
|
|
883
|
-
|
|
884
|
-
### Added
|
|
885
|
-
|
|
886
|
-
- **feat(theme):** use React Context for theme propagation
|
|
887
|
-
|
|
888
|
-
### Refactor
|
|
889
|
-
|
|
890
|
-
- **refactor(core):** remove unused _childrenHash property from Node class
|
|
891
|
-
|
|
892
|
-
### Example
|
|
893
|
-
|
|
894
|
-
- **feat(theme):** use React Context for theme propagation
|
|
895
|
-
|
|
896
|
-
**Before**:
|
|
897
|
-
```typescript
|
|
898
|
-
import { Div } from '@meonode/ui';
|
|
899
|
-
|
|
900
|
-
const App = () => {
|
|
901
|
-
return Div({
|
|
902
|
-
theme: {
|
|
903
|
-
// theme object
|
|
904
|
-
},
|
|
905
|
-
children: 'Hello world!',
|
|
906
|
-
});
|
|
907
|
-
};
|
|
908
|
-
```
|
|
909
|
-
|
|
910
|
-
**After**:
|
|
911
|
-
```typescript
|
|
912
|
-
import { Div, ThemeProvider } from '@meonode/ui';
|
|
913
|
-
|
|
914
|
-
const App = () => {
|
|
915
|
-
return ThemeProvider({
|
|
916
|
-
theme: {
|
|
917
|
-
mode: 'light', // or 'dark' or any custom mode
|
|
918
|
-
system: {
|
|
919
|
-
base: {
|
|
920
|
-
default: '#ffffff',
|
|
921
|
-
content: '#000000',
|
|
922
|
-
}
|
|
923
|
-
}
|
|
924
|
-
},
|
|
925
|
-
children: [
|
|
926
|
-
Div({
|
|
927
|
-
backgroundColor: 'theme.base',
|
|
928
|
-
color: 'theme.content',
|
|
929
|
-
children: 'Hello world!',
|
|
930
|
-
}),
|
|
931
|
-
],
|
|
932
|
-
});
|
|
933
|
-
};
|
|
934
|
-
```
|
|
935
|
-
|
|
936
|
-
## [0.2.21] - 2025-09-23
|
|
937
|
-
|
|
938
|
-
### Refactor
|
|
939
|
-
|
|
940
|
-
- **refactor(core):** make node processing logic static and robust
|
|
941
|
-
|
|
942
|
-
### Added
|
|
943
|
-
|
|
944
|
-
- **feat:** update NodeFunction type to improve dynamic node content generation and update FunctionRendererProps
|
|
945
|
-
interface to use NodeFunction
|
|
946
|
-
|
|
947
|
-
### Fixed
|
|
948
|
-
|
|
949
|
-
- **fix(component.hoc.ts):** enhance node instance check in Renderer for improved stability
|
|
950
|
-
- **fix(node.type.ts):** remove unused processRawNode property from Node type
|
|
951
|
-
|
|
952
|
-
### Changed
|
|
953
|
-
|
|
954
|
-
- **package:** update dependencies to latest versions
|
|
955
|
-
|
|
956
|
-
## [0.2.20] - 2025-09-22
|
|
957
|
-
|
|
958
|
-
### Refactor
|
|
959
|
-
|
|
960
|
-
- **refactor(obj.helper)**: streamline serialization logic and improve performance
|
|
961
|
-
|
|
962
|
-
### Fixed
|
|
963
|
-
|
|
964
|
-
- **fix(eslint)**: enforce no-unsafe-function-type rule for better type safety
|
|
965
|
-
- **fix(node.helper.ts)**: update nodeSignature function to accept Children type and improve circular reference handling
|
|
966
|
-
|
|
967
|
-
## [0.2.19] - 2025-09-21
|
|
968
|
-
|
|
969
|
-
### Refactor
|
|
970
|
-
|
|
971
|
-
- **refactor(core)**: simplify PortalLauncher type definition for improved readability
|
|
972
|
-
- **refactor(core)**: enhance usePortal by improving component creation and cleanup logic
|
|
973
|
-
- **refactor(core)**: remove redundant re-render logic in portal rendering
|
|
974
|
-
|
|
975
|
-
### Test
|
|
976
|
-
|
|
977
|
-
- **test**: add unit tests for dynamic portal creation and management
|
|
978
|
-
- **test**: remove dynamic portal test case on node.test.ts
|
|
979
|
-
|
|
980
|
-
### Changed
|
|
981
|
-
|
|
982
|
-
- **chore**: update Yarn version to 4.10.2 and configure yarnPath in .yarnrc.yml
|
|
983
|
-
|
|
984
|
-
## [0.2.18] - 2025-09-19
|
|
985
|
-
|
|
986
|
-
### Added
|
|
987
|
-
|
|
988
|
-
- **feat(core)**: support function children and enhance rendering logic
|
|
989
|
-
- **feat(core)**: enhance portal with update method and NodePortal type
|
|
990
|
-
- **feat(hook)**: introduce usePortal hook for reactive portals
|
|
991
|
-
|
|
992
|
-
### Example
|
|
993
|
-
|
|
994
|
-
- **feat(portal)**: use `usePortal` hook to make the portal reactive to state changes
|
|
995
|
-
|
|
996
|
-
```typescript
|
|
997
|
-
import { Button, Div, Node, Portal, type PortalProps } from '@meonode/ui';
|
|
998
|
-
import { usePortal } from '@meonode/ui';
|
|
999
|
-
import { useState } from 'react';
|
|
1000
|
-
|
|
1001
|
-
const MyPortal = () => {
|
|
1002
|
-
const [state, setState] = useState<number>(0);
|
|
1003
|
-
const { setPortal, createComponent } = usePortal([state]);
|
|
1004
|
-
|
|
1005
|
-
const PortalContent = createComponent(({ portal, text }: { text: string } & PortalProps<any>) => {
|
|
1006
|
-
return Div({
|
|
1007
|
-
children: [
|
|
1008
|
-
'This is portal content!',
|
|
1009
|
-
state === 1 ? text : 'Initial text value',
|
|
1010
|
-
Button(`Update Portal (${state + 1})`, {
|
|
1011
|
-
onClick: () => {
|
|
1012
|
-
setState((s: number) => s + 1);
|
|
1013
|
-
},
|
|
1014
|
-
}),
|
|
1015
|
-
Button('Close Portal', {
|
|
1016
|
-
onClick: () => {
|
|
1017
|
-
portal?.unmount();
|
|
1018
|
-
},
|
|
1019
|
-
}),
|
|
1020
|
-
],
|
|
1021
|
-
}).render();
|
|
1022
|
-
});
|
|
1023
|
-
|
|
1024
|
-
return Div({
|
|
1025
|
-
children: [
|
|
1026
|
-
Button('Open Portal', {
|
|
1027
|
-
onClick: () => {
|
|
1028
|
-
const portal = Portal<{ text: string }>(PortalContent)({ text: `Text prop still passed after update` });
|
|
1029
|
-
setPortal(portal);
|
|
1030
|
-
},
|
|
1031
|
-
}),
|
|
1032
|
-
],
|
|
1033
|
-
}).render();
|
|
1034
|
-
};
|
|
1035
|
-
```
|
|
1036
|
-
|
|
1037
|
-
## [0.2.17] - 2025-09-14
|
|
1038
|
-
|
|
1039
|
-
### Added
|
|
1040
|
-
|
|
1041
|
-
- **feat(common.helper)**: add omit and omitUndefined utility functions to create object copies without specified keys
|
|
1042
|
-
or undefined values
|
|
1043
|
-
- **feat**: integrate omit and omitUndefined functions to manage finalProps for standard HTML tags and custom components
|
|
1044
|
-
|
|
1045
|
-
### Refactor
|
|
1046
|
-
|
|
1047
|
-
- **refactor**: remove unnecessary type assertions for children in core.node.ts
|
|
1048
|
-
- **refactor(core.node.ts)**: streamline element creation logic
|
|
1049
|
-
|
|
1050
|
-
### Test
|
|
1051
|
-
|
|
1052
|
-
- **test**: add test case for rendering Div node using Component HOC
|
|
1053
|
-
- **feat(test)**: replace Div components with Container for consistency in performance tests
|
|
1054
|
-
- **test(node.test.ts)**: add test for rendering an empty prop Div node
|
|
1055
|
-
|
|
1056
|
-
### Removed
|
|
1057
|
-
|
|
1058
|
-
- **types**: removed redundant `key` prop from `FinalNodeProps` and default `key` from `NodeProps` types for cleaner
|
|
1059
|
-
type definitions
|
|
1060
|
-
|
|
1061
|
-
## [0.2.16] - 2025-09-13
|
|
1062
|
-
|
|
1063
|
-
### Added
|
|
1064
|
-
|
|
1065
|
-
- **feat(core)**: introduce static _isServer property to optimize server-side checks in caching methods
|
|
1066
|
-
- **feat(core)**: remove passedKey from _functionRenderer and simplify function-as-child wrapper; augment toPortal
|
|
1067
|
-
unmount to clean portal container
|
|
1068
|
-
|
|
1069
|
-
### Refactor
|
|
1070
|
-
|
|
1071
|
-
- **feat**: refactor children prop type to use `Children` type for better clarity and consistency across the codebase
|
|
1072
|
-
|
|
1073
|
-
## [0.2.15] - 2025-09-12
|
|
1074
|
-
|
|
1075
|
-
### Added
|
|
1076
|
-
|
|
1077
|
-
- **feat(cache)**: implement hybrid caching strategy for processed children using WeakMap and Map to improve performance
|
|
1078
|
-
and memory management
|
|
1079
|
-
- **feat(helper)**: implement nodeSignature for stable signatures and improve createStableHash with bounded traversal
|
|
1080
|
-
- **feat(helper)**: enhance ObjHelper.stringify method for deterministic serialization with sorted keys and special type
|
|
1081
|
-
handling
|
|
1082
|
-
|
|
1083
|
-
### Refactor
|
|
1084
|
-
|
|
1085
|
-
- **refactor**: improve type definitions and error handling in rendering methods
|
|
1086
|
-
|
|
1087
|
-
### Test
|
|
1088
|
-
|
|
1089
|
-
- **test(tests)**: add performance tests for rendering a single-page layout in React
|
|
1090
|
-
- **test**: add cleanup after each test and verify component display names for debugging
|
|
1091
|
-
|
|
1092
|
-
## [0.2.14] - 2025-09-12
|
|
1093
|
-
|
|
1094
|
-
### Added
|
|
1095
|
-
|
|
1096
|
-
- **feat**: Add `Container` alias for `Div` to simplify general-purpose container usage.
|
|
1097
|
-
- **feat**: Add caching for processed children to optimize performance in `BaseNode` class.
|
|
1098
|
-
|
|
1099
|
-
### Removed
|
|
1100
|
-
|
|
1101
|
-
- **feat**: Remove `shallowEqual` utility function from `common.helper.ts`.
|
|
1102
|
-
|
|
1103
|
-
### Fixed
|
|
1104
|
-
|
|
1105
|
-
- **feat**: Improve performance by optimizing existing key checks and handling null values in rendering functions.
|
|
1106
|
-
|
|
1107
|
-
## [0.2.13] - 2025-09-11
|
|
1108
|
-
|
|
1109
|
-
### Added
|
|
1110
|
-
|
|
1111
|
-
- **feat**: Add pre-commit hook for linting and testing, update package.json scripts.
|
|
1112
|
-
- **feat**: Add Jest configuration and setup for testing with TypeScript.
|
|
1113
|
-
- **test**: Add comprehensive tests for BaseNode core functionality.
|
|
1114
|
-
|
|
1115
|
-
### Fixed
|
|
1116
|
-
|
|
1117
|
-
- **core**: Remove stylable elements from NO_STYLE_TAGS to ensure only non-visual/metadata tags are excluded from CSS
|
|
1118
|
-
styling.
|
|
1119
|
-
|
|
1120
|
-
## [0.2.12] - 2025-09-11
|
|
1121
|
-
|
|
1122
|
-
### Fixed
|
|
1123
|
-
|
|
1124
|
-
- **core.node**: Removed the child processing cache to fix a critical bug that caused infinite page loads in server-side
|
|
1125
|
-
rendering environments.
|
|
1126
|
-
- **helper**: Corrected the element type retrieval logic within the hashing function used for child node processing.
|
|
1127
|
-
|
|
1128
|
-
## [0.2.11] - 2025-09-11
|
|
1129
|
-
|
|
1130
|
-
### Enhanced
|
|
1131
|
-
|
|
1132
|
-
- **core.node**: Significantly improved JSDoc documentation for the `BaseNode` class, providing better clarity on prop
|
|
1133
|
-
processing, child handling, and rendering logic.
|
|
1134
|
-
- **core.node**: Overhauled the child processing and caching mechanism to improve server-side performance and resolve a
|
|
1135
|
-
memory leak. This includes a move from object stringification to a more performant hashing strategy for cache keys and
|
|
1136
|
-
the introduction of a cache management policy.
|
|
1137
|
-
|
|
1138
|
-
### Fixed
|
|
1139
|
-
|
|
1140
|
-
- **helper**: Corrected an issue in flexbox style processing where an unnecessary string check was performed.
|
|
1141
|
-
- **core.node**: Updated a function placeholder to adhere to the unused parameter naming convention.
|
|
1142
|
-
|
|
1143
|
-
## [0.2.10] - 2025-09-10
|
|
1144
|
-
|
|
1145
|
-
### Added
|
|
1146
|
-
|
|
1147
|
-
- **core**: add top-level `render` function for a cleaner and simpler API when mounting a Meonode instance to the DOM.
|
|
1148
|
-
This abstracts away the need to manually use `react-dom/client`.
|
|
1149
|
-
- **Before**:
|
|
1150
|
-
```typescript
|
|
1151
|
-
import { createRoot } from 'react-dom/client';
|
|
1152
|
-
import { Div } from '@meonode/ui';
|
|
1153
|
-
|
|
1154
|
-
const container = document.getElementById('root');
|
|
1155
|
-
const root = createRoot(container);
|
|
1156
|
-
root.render(Div({ children: 'Hello' }).render());
|
|
1157
|
-
```
|
|
1158
|
-
- **After**:
|
|
1159
|
-
```typescript
|
|
1160
|
-
import { Div } from '@meonode/ui';
|
|
1161
|
-
import { render } from '@meonode/ui/client';
|
|
1162
|
-
|
|
1163
|
-
const container = document.getElementById('root');
|
|
1164
|
-
render(Div({ children: 'Hello' }), container);
|
|
1165
|
-
```
|
|
1166
|
-
- **constants**: add `NO_STYLE_TAGS` array and `noStyleTagsSet` for quick lookup of tags that should not receive styles
|
|
1167
|
-
|
|
1168
|
-
### Enhanced
|
|
1169
|
-
|
|
1170
|
-
- **core**: enhance `StyledRenderer` integration to check for no-style tags
|
|
1171
|
-
|
|
1172
|
-
### Changed
|
|
1173
|
-
|
|
1174
|
-
- **helper**: update CSS property set to use constants and add no-style tag check
|
|
1175
|
-
- **package**: update dependencies to latest versions
|
|
1176
|
-
- **directory**: rename `data` directory to `constants` for clarity
|
|
1177
|
-
- **file**: rename `cssProperties.ts` to `cssProperties.const.ts` to reflect its purpose
|
|
1178
|
-
|
|
1179
|
-
## [0.2.9] - 2025-09-05
|
|
1180
|
-
|
|
1181
|
-
### Fixed
|
|
1182
|
-
|
|
1183
|
-
- **core.types**: corrected `MergedProps` definition to restore proper TypeScript inference and props autocomplete
|
|
1184
|
-
- Fixes regression from v0.2.8 where `createNode` and `createChildrenFirstNode` lost autocomplete for props due to
|
|
1185
|
-
incorrect `MergedProps` typing
|
|
1186
|
-
|
|
1187
|
-
## [0.2.8] - 2025-09-05
|
|
1188
|
-
|
|
1189
|
-
### Changed
|
|
1190
|
-
|
|
1191
|
-
- **core.node**: refactor props handling to use a single utility type:
|
|
1192
|
-
- `MergedProps<E, AdditionalProps>` — merges `NodeProps<E>` with custom props, giving precedence to overlapping keys
|
|
1193
|
-
from `AdditionalProps`.
|
|
1194
|
-
- Simplifies and unifies the typing system for node factories (`createNode`, `createChildrenFirstNode`).
|
|
1195
|
-
- Improves developer experience when working with prebuilt components:
|
|
1196
|
-
- Example:
|
|
1197
|
-
```typescript
|
|
1198
|
-
import { Div, Input } from '@meonode/ui'
|
|
1199
|
-
|
|
1200
|
-
// Add new props
|
|
1201
|
-
Div<{ field: string }>({ field: 'Hello' })
|
|
1202
|
-
|
|
1203
|
-
// Override existing React props
|
|
1204
|
-
Input<{ onChange: (e: { target: { value: string } }) => void }>({
|
|
1205
|
-
onChange: ({ target }) => console.log(target.value),
|
|
1206
|
-
})
|
|
1207
|
-
```
|
|
1208
|
-
Extending prebuilt components is now safer and more predictable, with generic props always taking precedence when keys
|
|
1209
|
-
overlap.
|
|
1210
|
-
|
|
1211
|
-
- **helpers**: reorganize helper files and update import paths
|
|
1212
|
-
|
|
1213
|
-
### Fixed
|
|
1214
|
-
|
|
1215
|
-
- **styled-renderer**: make `children` prop optional in `StyledRendererProps`
|
|
1216
|
-
|
|
1217
|
-
## [0.2.7] - 2025-09-04
|
|
1218
|
-
|
|
1219
|
-
### Changed
|
|
1220
|
-
|
|
1221
|
-
- **core.node**: rename `childIndex` to `nodeIndex` and update key generation logic
|
|
1222
|
-
|
|
1223
|
-
## [0.2.6] - 2025-09-04
|
|
1224
|
-
|
|
1225
|
-
- **deps**: update TypeScript ESLint, native-preview, and jsdoc to latest versions
|
|
1226
|
-
- **core.node**: improve generateIndexedKeyIfNeeded to accept object parameters and enhance key uniqueness with children
|
|
1227
|
-
count
|
|
1228
|
-
- **imports**: update import paths to include file extensions for compatibility
|
|
1229
|
-
|
|
1230
|
-
## [0.2.5] - 2025-09-03
|
|
1231
|
-
|
|
1232
|
-
- **imports**: Update import paths to include file extensions for compatibility.
|
|
1233
|
-
|
|
1234
|
-
## [0.2.4] - 2025-09-02
|
|
1235
|
-
|
|
1236
|
-
### Added
|
|
1237
|
-
|
|
1238
|
-
- **core**: Exposed the original element via the created Node for easier access and debugging.
|
|
1239
|
-
```typescript
|
|
1240
|
-
import { createNode } from "@meonode/ui";
|
|
1241
|
-
|
|
1242
|
-
// Create a Node wrapping a 'div' element
|
|
1243
|
-
const MyComp = createNode('div');
|
|
1244
|
-
|
|
1245
|
-
// Access the underlying element type
|
|
1246
|
-
console.log(MyComp.element); // 'div'
|
|
1247
|
-
```
|
|
1248
|
-
|
|
1249
|
-
## [0.2.3] - 2025-09-01
|
|
1250
|
-
|
|
1251
|
-
### Fixed
|
|
1252
|
-
|
|
1253
|
-
- **types**: Remove forbidden css import to resolve RSC error
|
|
1254
|
-
|
|
1255
|
-
### Changed
|
|
1256
|
-
|
|
1257
|
-
- **package**: Bump version to 0.2.3
|
|
1258
|
-
|
|
1259
|
-
## [0.2.2] - 2025-09-01
|
|
1260
|
-
|
|
1261
|
-
### Added
|
|
1262
|
-
|
|
1263
|
-
- **core**: Include nativeProps in props extraction for improved component flexibility
|
|
1264
|
-
|
|
1265
|
-
### Enhanced
|
|
1266
|
-
|
|
1267
|
-
- **types**: Enhance StyledRendererProps and FinalNodeProps for improved type safety
|
|
1268
|
-
|
|
1269
|
-
### Changed
|
|
1270
|
-
|
|
1271
|
-
- **package**: Bump version to 0.2.2
|
|
1272
|
-
|
|
1273
|
-
## [0.2.1] - 2025-09-01
|
|
1274
|
-
|
|
1275
|
-
### Changed
|
|
1276
|
-
|
|
1277
|
-
- **types**: Update CSS type from CSSObject to CSSInterpolation for better compatibility
|
|
1278
|
-
- **package**: Bump version to 0.2.1
|
|
1279
|
-
|
|
1280
|
-
## [0.2.0] - 2025-08-31
|
|
1281
|
-
|
|
1282
|
-
### Added
|
|
1283
|
-
|
|
1284
|
-
- **docs**: Add badges for NPM version, license, and bundle size to README
|
|
1285
|
-
|
|
1286
|
-
### Enhanced
|
|
1287
|
-
|
|
1288
|
-
- **docs**: Update installation instructions and enhance clarity in core concepts
|
|
1289
|
-
- **docs**: Enhance documentation with new examples and improved clarity
|
|
1290
|
-
|
|
1291
|
-
### Removed
|
|
1292
|
-
|
|
1293
|
-
- **package**: Remove deprecated hook entry from package.json
|
|
1294
|
-
|
|
1295
|
-
### Fixed
|
|
1296
|
-
|
|
1297
|
-
- **core.node**: Add suppressHydrationWarning to propsForCreateElement
|
|
1298
|
-
|
|
1299
|
-
### Changed
|
|
1300
|
-
|
|
1301
|
-
- **package**: Bump version to 0.2.0
|
|
1302
|
-
|
|
1303
|
-
## [0.1.121] - 2025-08-30
|
|
1304
|
-
|
|
1305
|
-
### Changed
|
|
1306
|
-
|
|
1307
|
-
- **core.node**: Simplify style resolution and improve prop handling
|
|
1308
|
-
- **StyledRenderer**: Remove unused style prop and simplify component
|
|
1309
|
-
- **package**: Bump version to 0.1.121
|
|
1310
|
-
|
|
1311
|
-
## [0.1.120] - 2025-08-30
|
|
1312
|
-
|
|
1313
|
-
### Added
|
|
1314
|
-
|
|
1315
|
-
- **styles**: Add Emotion support and Next.js style registry integration
|
|
1316
|
-
- Add @emotion/react and @emotion/cache dependencies
|
|
1317
|
-
- Add StyledRenderer and StyleRegistry components for Emotion
|
|
1318
|
-
- Integrate StyledRenderer into BaseNode for style prop rendering
|
|
1319
|
-
- Add nextjs-registry export for Next.js style registry
|
|
1320
|
-
|
|
1321
|
-
### Enhanced
|
|
1322
|
-
|
|
1323
|
-
- **core**: Enhance style handling with StyledRenderer for Emotion support
|
|
1324
|
-
|
|
1325
|
-
### Fixed
|
|
1326
|
-
|
|
1327
|
-
- **deps**: Update peerDependencies for Emotion and React to use version constraints
|
|
1328
|
-
- **deps**: Update @types/react and @types/react-dom to latest versions
|
|
1329
|
-
|
|
1330
|
-
### Changed
|
|
1331
|
-
|
|
1332
|
-
- **package**: Update peerDependencies for @emotion/cache
|
|
1333
|
-
- **package**: Bump version to 0.1.120
|
|
1334
|
-
|
|
1335
|
-
## [0.1.118] - 2025-08-30
|
|
1336
|
-
|
|
1337
|
-
### Fixed
|
|
1338
|
-
|
|
1339
|
-
- **deps**: Update peerDependencies for Emotion and React to use version constraints
|
|
1340
|
-
|
|
1341
|
-
### Changed
|
|
1342
|
-
|
|
1343
|
-
- **package**: Bump version to 0.1.118
|
|
1344
|
-
|
|
1345
|
-
## [0.1.117] - 2025-08-30
|
|
1346
|
-
|
|
1347
|
-
### Added
|
|
1348
|
-
|
|
1349
|
-
- **flexbox**: Improve default style resolution and add flex shorthand parser
|
|
1350
|
-
- Add parseFlexShorthand to extract flex-grow, shrink, and basis
|
|
1351
|
-
- Enhance resolveDefaultStyle to respect explicit flex/flexShrink values
|
|
1352
|
-
- Improve handling of minHeight, minWidth, and flexShrink for flex items
|
|
1353
|
-
|
|
1354
|
-
### Enhanced
|
|
1355
|
-
|
|
1356
|
-
- **core**: Refine type of finalChildren for improved type safety
|
|
1357
|
-
- **docs**: Update documentation for clarity on flexbox scrolling fixes
|
|
1358
|
-
|
|
1359
|
-
### Changed
|
|
1360
|
-
|
|
1361
|
-
- **core**: Move comments position for better readability
|
|
1362
|
-
- **imports**: Remove .js extensions from internal imports
|
|
1363
|
-
- **package**: Bump version to 0.1.117
|
|
1364
|
-
|
|
1365
|
-
## [0.1.116] - 2025-08-27
|
|
1366
|
-
|
|
1367
|
-
### Changed
|
|
1368
|
-
|
|
1369
|
-
- **package**: Bump version to 0.1.116
|
|
1370
|
-
|
|
1371
|
-
---
|
|
1372
|
-
|
|
1373
|
-
## Notes
|
|
1374
|
-
|
|
1375
|
-
- This changelog covers the most recent development history available
|
|
1376
|
-
- The project focuses on building React UIs with type-safe fluency without JSX syntax
|
|
1377
|
-
- Recent development has emphasized Emotion integration, type safety improvements, and enhanced flexbox support
|
|
1378
|
-
- For a complete history, view all commits on GitHub: [View all commits](https://github.com/l7aromeo/meonode-ui/commits)
|