MeoNode UI
  • Getting Started
    • Overview
    • Installation
    • Usage
    • Styling
    • Theming
    • Rules & Patterns
    • Framework Integration
    • FAQ
    • Release Notes
  • Components

Release Notes - MeoNode UI

This document contains release notes for each version of MeoNode UI, including new features, enhancements, bug fixes, and important changes. Use it to track the evolution of the library and understand what’s new or different in each release.


MeoNode UI v1.1.1 – Style Prop Type Fix

Release Date: 2025-12-05

Fix

  • types: update HasCSSCompatibleStyleProp to use CSSProperties directly (4e23499)

Version Update

  • Current version: 1.1.1

Changelog & Commits


MeoNode UI v1.1.0 – Strict Types, Theme Features & Portal Optimizations

Release Date: 2025-12-05

Feat

  • types: enforce strict component props and improve type inference (047c0f8)
    • Redefined MergedProps and introduced ValidateComponentProps to strictly validate props passed to Node and createNode.
    • Added ExactProps generic constraint to prevent excess property passing, improving type safety.
    • Enhanced PropsOf to better infer props from React components, including forwardRef and Memo components.
  • theme: enable theme variable resolution in style keys (30ca1fd)
    • Updated ThemeUtil to resolve theme variables within style keys (e.g., media queries like @media (max-width: theme.breakpoint.lg)).

Refactor

  • portal: optimize portal implementation and fix types (9643682)
    • Refactored Portal HOC to use a cleaner, more efficient implementation for provider wrapping.
    • Improved type definitions for PortalLauncher and PortalProps to ensure correct prop inference.

Fix

  • util: correct function child detection and rendering logic (944cfbd)
    • Updated isFunctionChild type definition to correctly identify function children while excluding React components (Class, Memo, ForwardRef).
    • Updated functionRenderer type definition to properly handle function child execution.

Test

  • test: refactor tests to align with strict types and fix leaks (40c87c7)
    • Updated various tests (advanced-features, leak-repro, memoization) to comply with the new strict type requirements.
    • Added strict-component-props.test.ts and theme-key-resolution.test.ts to verify new features.

Chore

  • build: update build config and dependencies (a9367e0)
    • Updated package.json scripts and tsconfig.json for better build and test processes.

Version Update

  • Current version: 1.1.0

Changelog & Commits


MeoNode UI v1.0.1 – React Component Prop Handling Fix

Release Date: 2025-11-30

Fix

  • core: fix style prop extraction for React Components (19618b4)
    • Modified processRawNode to prevent style props from being extracted and flattened into HTML attributes when the node is a React Component.
    • This ensures components receive their style prop intact as an object, preventing invalid attribute errors.

Version Update

  • Current version: 1.0.1

Changelog & Commits


MeoNode UI v1.0.0 – Performance and Caching Enhancements

Release Date: 2025-11-28

Perf

  • cache: Remove props, CSS, and theme caching to improve performance and reduce overhead. (206361d), (d7baa16)

Fix

  • theme-provider: Allow setTheme to accept an updater function for more flexible state management. (be8d261)
  • core: Improve mount tracking for cached elements by ensuring MeoNodeUnmounter wraps all renderable nodes. (d0ca27e)
  • theme-provider: Remove incorrect @private JSDoc tag from ThemeProvider component. (816e398)

Test

  • performance: Add controlled input performance tests to simulate human typing and measure deps memoization effectiveness. (bba48b8)

Docs

  • readme: Update README.md to reflect the removal of automatic caching and emphasize deps-based memoization. (2600d9c)

Version Update

  • Current version: 1.0.0

Changelog & Commits


MeoNode UI v1.0.0-0 – Mount Tracking and Caching Overhaul

Release Date: 2025-11-27

Fix

  • core: Overhaul mount tracking, caching, and fix stableKey generation to prevent memory leaks (af1b707)
    • 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.
    • 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.
    • 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.
    • Added new test suites (leak-repro.test.ts, props-caching-leak.test.ts) to specifically target and verify the leak fixes.

Perf

  • cache: Improve props cache eviction strategy (ce2f561)
    • 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.

Feat

  • deps: Add react-router-dom and test polyfills (29dcf13)
    • Introduced react-router-dom as a new development dependency to enable integration testing with React Router.
    • Added whatwg-fetch and Node.js util polyfills to jest.setup.ts for compatibility in the Jest environment.

Test

  • react-router: Add integration tests for react-router-dom (8478623)
    • Introduced a new test suite to verify the proper functioning and caching behavior of MeoNode components when used within a React Router environment.
    • Includes tests for declarative and programmatic navigation, ensuring that component lifecycles and caching mechanisms interact correctly with React Router's dynamic rendering.

Chore

  • package: Rename publish:pre script to publish:prerelease and add publish:premajor script in package.json (a98ba69)

Version Update

  • Current version: 1.0.0-0

Changelog & Commits


MeoNode UI v0.4.14 – Performance and Caching Enhancements

Release Date: 2025-11-23

Perf

  • cache: enforce dependency-based caching with shouldCacheElement helper ( fab5525)
    • Introduces NodeUtil.shouldCacheElement() helper to centralize and enforce the opt-in caching strategy where only nodes with explicit dependencies are cached
    • Completes the memory optimization by closing loopholes where nodes without dependencies were still being cached based on stableKey alone
    • Replaces 4 inconsistent cache eligibility checks in BaseNode.render():
      • Cache lookup for parent nodes
      • Cache lookup for child nodes
      • Cache storage during rendering
      • MeoNodeUnmounter wrapping decision
    • Impact: Reduces memory usage, ensures mount tracking and cache operations stay in sync, improves code maintainability

Test

  • memoization: refine test to assert precise cache size after rendering components ( 8ded697)

Chore

  • type: remove src/types/env.d.ts as it is no longer needed (aab4299)

Version Update

  • Current version: 0.4.14

Changelog & Commits


MeoNode UI v0.4.13 – Props Handling and Leakage Fixes

Release Date: 2025-11-23

Fix

  • props: improve prop handling and prevent leakage ( 73cc696)
    • This commit refactors prop handling within the MeoNode ecosystem to ensure that internal processing props are not leaked to the DOM.
    • Key changes:
      • The MeoNodeUnmounter is updated to correctly isolate and pass through props intended for the underlying DOM element, improving compatibility with libraries like MUI.
      • Internal props such as node, css, and disableEmotion are now explicitly prevented from being rendered as HTML attributes.
      • Added comprehensive tests to verify that standard HTML attributes are passed through while internal props are successfully filtered out.
    • This improves the robustness and predictability of component rendering.

Test

  • props: add tests for prop handling and leakage ( a508e10)
    • Added new tests to verify that component props are correctly passed as HTML attributes, handle createNode and Node() correctly, and crucially, that internal MeoNode props are not leaked to the DOM.

Chore

  • core: remove unnecessary type assertion from finalChildren assignment ( 827b3ef)

Version Update

  • Current version: 0.4.13

Changelog & Commits


MeoNode UI v0.4.12 – Build System Migration to Rollup

Release Date: 2025-11-21

Feat

  • build: migrate from Babel to Rollup with ESM and CJS support ( 70326a1)
    • Replace Babel build system with Rollup configuration to prevent output legacy javascript code
    • Add support for both ESM and CJS output formats
    • Update package.json exports to point to new build outputs
    • Add Rollup plugins for TypeScript, commonjs, minification, and preserve directives
    • Remove Babel-related dependencies and configuration files
    • Update tsconfig.json to use 'preserve' module setting and bundler resolution
    • Configure build to output to separate ESM and CJS directories

Version Update

  • Current version: 0.4.12

Changelog & Commits


MeoNode UI v0.4.11 – Unmounter Enhancements, Performance Tests & Dependency Upgrades

Release Date: 2025-11-21

Fix

  • core: enhance MeoNodeUnmounter cleanup logic and support additional props cloning ( 02c17f7)
    • Refactor MeoNodeUnmounter to use useEffectEvent for stable cleanup on unmount
    • Cleanup removes node from BaseNode.elementCache, untracks mount via MountTrackerUtil, unregisters from BaseNode.cacheCleanupRegistry, and clears lastSignature to prevent memory leaks
    • Support cloning and forwarding additional props to valid React children elements

Refactor

  • node.util: enhance documentation for utility methods and improve clarity ( ee42c24)
  • theme: reorder ThemeResolverCache methods for clarity ( cb842c8)
    • Moved _generateCacheKey and _evict methods below the main logic in ThemeResolverCache for better readability and organization
    • Removed duplicate declaration of _instance property
    • Kept functionality unchanged, improving code structure and maintainability

Test

  • perf: add memory leak detection test for navigation cycles and improve formatMemory function ( ba139fc)
    • Added a new performance test to detect memory leaks during repeated navigation cycles between pages
    • The test measures heap memory usage before, during, and after navigation, ensuring memory growth stays within acceptable limits
    • Enhanced the formatMemory utility to correctly handle negative byte values and added JSDoc comments for clarity
    • Removed an obsolete shallowly equal props performance test to streamline the test suite
  • unmounter: add regression test for MeoNodeUnmounter to forward implicit props in MUI RadioGroup integration ( 2ecaabd)
    • Added a test to ensure MeoNodeUnmounter correctly forwards props injected via React.cloneElement, addressing issues with libraries like MUI where RadioGroup injects 'checked' and 'onChange' into Radio components
    • This prevents swallowing of props and verifies proper behavior of controlled radio inputs
    • Also updated an existing cache size assertion to allow equality, reflecting improved mount tracking
  • perf: update react-createelement comparison tests with 5000 nested nodes and fix typings ( b345ec0)
    • Changed rerender to use React.cloneElement for proper typing
    • Updated NUM_NODES constant to 5000 for nested structure tests
    • Removed redundant comments about node count reduction to prevent stack overflow

Chore

  • deps: upgrade devDependencies and update test scripts ( 2ea128e)
    • add new devDependencies: @emotion/is-prop-valid@1.4.0, @emotion/styled@11.14.1, @mui/material@7.3.5, and related packages
    • update yarn to version 4.11.0
    • update test scripts to increase max-old-space-size to 8192 and include react-createelement-comparison.test.ts in test and perf runs
    • update various package resolutions in yarn.lock to align with new versions and dependencies
  • babel: add "builtIns": false to minify plugin configuration ( e16cdfb)
  • yarn: update yarnPath to version 4.11.0 (ecb6c68)

Docs

  • CONTRIBUTING: improve formatting and readability of contribution guidelines ( a7462ed)

Version Update

  • Current version: 0.4.11

Changelog & Commits


MeoNode UI v0.4.10 – Performance & Unmounter Fixes

Release Date: 2025-11-20

Fixes

  • unmounter: prevent redundant FinalizationRegistry callbacks ( 59f5adf)
    • Explicitly unregister node from cacheCleanupRegistry on unmount
    • Prevents double cleanup when node is both unmounted and GC'd
    • Improves cleanup efficiency and reduces unnecessary registry callbacks

Perf

  • util: optimize prop processing and child handling ( be26488)

    • Conditional sort: only sort keys if length > 1 (eliminates unnecessary sorts)
    • Replace for...in with Object.keys() iteration for better performance and safety
    • Add fast path for single child processing (non-array or 1-element array)
    • Avoid unnecessary array operations for common single-child case
    • Performance impact:
      • Reduced CPU overhead for small prop objects
      • Faster iteration with Object.keys() vs for...in
      • Eliminates array map() call for single child components
  • core: add exception safety and optimize render method ( 5aad000)

    • Wrap render logic in try-finally to ensure renderContext is always released
    • Null out workStack slots before releasing to help GC
    • Pre-allocate finalChildren array to avoid resizing during iteration
    • Replace non-null assertion with explicit error handling for better debugging
    • Add object pooling for workStack and renderedElements (reduces GC pressure)
    • Pool capped at 50 contexts with 2048-item limit to prevent memory issues
    • Exception safety ensures cleanup even if rendering throws

Test

  • perf: add React comparison tests with memory tracking ( bc66d54)

    • Add comprehensive performance comparison between React.createElement and MeoNode
    • Test both flat (10k nodes) and nested (5k nodes) structures
    • Include memory usage measurements (initial + after 100 updates)
    • Reduce nested nodes from 10k to 5k to prevent stack overflow with StyledRenderer
    • Add table output with time and memory columns for clear comparison
    • Add GC availability warning for accurate measurements
    • Provides detailed performance and memory behavior insights during re-renders
    • Avoids stack overflow in deeply nested test scenarios
  • performance: enhance performance metrics report formatting and adjust thresholds ( 6f3abe4)

    • Improve table formatting for performance metrics
    • Adjust test thresholds based on optimization results
    • Enhanced reporting for better visibility into performance characteristics

MeoNode UI v0.4.9 – Performance, Build & Test Overhaul

Release Date: 2025-11-19

Feat

  • build: add support for @tests alias and include tests folder in build and test configs ( 4dfd165)

Perf

  • core: optimize rendering, caching, and memory management ( 4f599be)
    • Reworks the core rendering loop to use a more efficient, manually-managed work stack with exponential growth, reducing reallocations and improving performance for deep and wide node trees.
    • Optimizes stable key generation by removing expensive shallow equality checks in favor of strict reference equality, significantly speeding up prop processing for cached components.
    • Implements a high-performance MinHeap-based LRU cache eviction strategy for prop processing, replacing a slower sort-based method. This ensures that the most relevant props are kept in the cache with minimal overhead.
    • Introduces CSS object hashing to accelerate prop signature generation, avoiding costly serialization of large style objects.
    • Fixes several memory leaks by ensuring proper cleanup of node properties (lastSignature, lastPropsObj) and unregistering nodes from the cache cleanup registry upon eviction.
    • Decouples element cache deletion from mount tracking to prevent race conditions and ensure reliable cleanup during component unmounting.

Refactor

  • build: rename constants directory from constants to constant and update imports accordingly ( 9531947)

Test

  • perf: overhaul performance test suite ( e3bd6ac)
    • Introduces a new, structured performance reporting system using cli-table3 for clear, grouped metrics.
    • Refactors the entire performance test suite into logical groups: Layout Rendering, Memory Management, and Prop Processing.
    • Adds comprehensive memory leak detection tests for heavy state changes and repeated mount/unmount cycles, using forced garbage collection for more accurate heap analysis.
    • Extracts the large, complex CSS object into a dedicated test constant for better separation of concerns.
    • Updates memoization tests to align with the new, weighted LRU cache eviction scoring.

Chore

  • deps: update dependencies including typescript-eslint to 8.47.0 and add cli-table3 0.6.5 ( 6064555)

Version Update

  • Current version: 0.4.9

Changelog & Commits


MeoNode UI v0.4.8 – Iterative Rendering, Stronger Types & Performance Testing

Release Date: 2025-11-18

Feat

  • client: add generic type parameter to render function for stronger type safety ( 90a770e)
  • core: improve BaseNode rendering with iterative traversal and memory optimizations ( 1d5330a)
    • Introduce WorkItem interface to represent nodes in the iterative work stack during BaseNode rendering.
    • Replace recursive render traversal with an iterative depth-first approach using a preallocated workStack array for better performance and reduced call stack usage.
    • Implement dynamic resizing of workStack array to handle arbitrary tree sizes efficiently.
    • Update BaseNode’s internal caching fields (lastPropsRef and lastSignature) to be public and consistently used for stable key generation.
    • Modify MeoNodeUnmounter component to accept BaseNode instance and clear its lastPropsRef and lastSignature on unmount to prevent memory leaks.
    • Refine type annotations across node utilities and factory functions for stronger type safety ( Record<string, unknown> instead of any).
    • Optimize critical prop extraction logic by replacing Set and startsWith checks with faster inline charCode comparisons.
    • Clean up and clarify utility methods related to prop signature creation, shallow equality, and portal management.
    • Improve node.util.ts by adjusting caching strategies, prop categorization, and React element handling for better robustness and maintainability.

Fixes

  • navigation-cache-manager: add proper typing and global window declaration for cleanup flag ( 6180d40)

Refactor

  • improve typings and type safety in theme util and styled renderer ( dbe1f33)
    • Added explicit TypeScript types (e.g., CssProp, Record<string, unknown>) for variables and function signatures in styled-renderer.client.ts and theme.util.ts.
    • Updated cache maps to use more precise generic types for better type inference and safety.
    • Enhanced resolveObjWithTheme and related theme resolution logic with stronger typing and nullish coalescing.
    • Improved error handling for invalid theme path values.
    • Applied copy-on-write pattern with properly typed arrays and objects during theme resolution.
    • Strengthened type guards, e.g., isPlainObject type predicate.
    • Minor fixes to variable declarations with explicit types for clarity and consistency.

Chore

  • babel: update preset-env targets and expand plugin exclusions ( f38cd24)
    • Set preset-env targets to support ES modules
    • Enable bugfixes option
    • Add multiple plugins to exclude list for better optimization
    • Clean up formatting of root, alias, extensions, and exclude fields

Test

  • performance: add comprehensive performance tests and metrics reporting ( c3d7a81)
    • Add detailed performance tests measuring render times for realistic layouts, 10,000 flat nodes, and 10,000 deeply nested nodes.
    • Introduce a heavy state changes test to detect memory leaks and ensure responsiveness under frequent updates.
    • Collect and log performance metrics including median render times and memory usage for analysis.
    • Add tests for stableKey generation performance with identical, shallowly equal, unique, large, and complex CSS props.
    • Enhance test suite with CSS styling for better visualization and interaction during tests.
    • Improve cleanup and reporting to avoid resource leaks and provide clearer performance insights.

Version Update

  • Current version: 0.4.8

Changelog & Commits


MeoNode UI v0.4.7 – Optimized Navigation Caching & Stable Key Handling

Release Date: 2025-11-17

Fixes

  • core/cache: Optimize navigation cache debounce timing and enhance stableKey handling. ( fff6f207)
    • Dynamically adjust navigation cleanup debounce duration based on cache size to improve performance in large SPAs.
    • Make stableKey and _lastSignature optional to correctly represent their potentially undefined state.
    • Refactor _getStableKey to return undefined on server instead of an empty string.
    • Optimize critical props extraction using the new NodeUtil.extractCriticalProps helper.
    • Improve client-side caching logic to skip unnecessary lookups when stableKey is absent.
    • Remove unused imports and redundant code in node.util.ts, and enhance shallowEqual implementation.
    • Update createPropSignature to return undefined on server and use getElementTypeName directly.
    • Add detailed comments and refine hashString implementation by combining FNV-1a and djb2 hashes for more robust key hashing.

Version Update

  • Current version: 0.4.7

Changelog & Commits


MeoNode UI v0.4.6 – Enhanced Caching & Memoization with Safe Lifecycle Management

Release Date: 2025-11-17

Fixes

  • core/cache: Enhance memoization & caching system to prevent memory leaks and ensure safe lifecycle management. ( 253d7d00) Introduces a robust, three-layered cleanup strategy to ensure cache integrity:
    1. Lifecycle-driven Cleanup: MeoNodeUnmounter component ensures that caches of unmounted nodes are immediately cleaned when components are removed.
    2. Event-driven SPA Cleanup: NavigationCacheManagerUtil triggers debounced cache clearing during SPA navigations (pushState/popstate), preventing stale entries.
    3. GC-driven Safety Net: Uses FinalizationRegistry to automatically clean cache entries for objects that are garbage collected, providing an additional layer of memory safety.

Refactor

  • core: Migrate core logic from src/helper/ to a new src/util/ directory for better separation of concerns.
  • core: Extract internal utility functions from core.node.ts into node.util.ts for modularity and reusability.
  • core: Make internal caches on BaseNode public to support externalized cache management and monitoring.

Chore

  • tooling: Enable TypeScript's strict: true mode and update the codebase to comply fully with strict type checks.
  • tooling: Add CommonJS (require) exports in package.json for improved module compatibility in different environments.
  • tooling: Update test scripts to include NODE_OPTIONS='--expose-gc', allowing explicit garbage collection during tests for more accurate memory testing.
  • tests: Refine test suite by standardizing afterEach hooks and updating memoization tests to directly validate internal cache behavior.

Version Update

  • Current version: 0.4.6

Changelog & Commits


MeoNode UI v0.4.5 – Advanced Cache Management & Test Suite Restructure

Release Date: 2025-11-15

Features

  • cache: Implemented a robust multi-layer cache management system with dedicated theme caching.
    This update introduces a more defensive and introspective caching architecture:
    • Refactored NavigationCacheManager to improve stability under frequent invalidation cycles.
    • Added memory monitoring hooks to track cache pressure and trigger automated cleanup when thresholds are exceeded.
    • Introduced LRU (Least Recently Used) eviction in ThemeResolverCache, ensuring stale theme resolution paths are removed predictably.
    • Integrated LRU behaviors with the broader BaseNode cache lifecycle, enabling synchronized clearing across all caching layers.
      (9ed749f6)

Refactor

  • test: Split the previously monolithic node.test.ts into multiple focused, domain-specific test files.
    This reorganization increases maintainability, readability, and clarity across the test suite:
    • Introduced memoization.test.ts to isolate tests related to dependency tracking, subtree memoization, and cache-collision handling.
    • Cleaned up noisy logs by suppressing a repetitive console.error triggered during a duplicate-key memoization test.
      The suppression preserves test intent while preventing unnecessary noise in CI output.
    • Tests are now organized by functional concerns, improving long-term scalability of the suite.
      (930f998e)

Fixes

  • core: Ensured the disableEmotion flag is properly forwarded to _renderProcessedNode, allowing consistent handling within the rendering pipeline.
    This resolves inconsistencies in node processing when Emotion styling is disabled.
    (b68e3d4)

Chore

  • test: Adjusted performance test cleanup logic by removing automatic cache clearing within afterEach.
    This change ensures performance tests run under realistic caching behavior instead of artificially reset conditions.
    (f72cea5e)

Version Update

  • Current version: 0.4.5

Changelog & Commits


MeoNode UI v0.4.4 – Intelligent Caching & Memory-Safe Rendering

Release Date: 2025-11-15

Perf

  • core: Implemented intelligent caching and memory management ( 0e5671b)

A sophisticated caching and memory-safety layer has been introduced to prevent memory leaks and improve SPA performance. The system now tracks mounted components, cleans up unmounted ones, and maintains a stable, efficient cache across navigation events.

Highlights:

  • Navigation-aware Cache Eviction: NavigationCacheManager listens for browser navigation events (popstate, pushState, etc.) and automatically purges stale cache entries from previous pages.
  • Mount Tracking: A new MountTracker maps all active BaseNode instances, enabling precise eviction of unused cached elements.
  • Advanced Eviction Policies: SafeCacheManager can evict unmounted components, older inactive entries, and even perform emergency cleanup during memory pressure.
  • Memory-Safe Portal System: Portal implementation now uses WeakMap, ensuring DOM roots and portal nodes are garbage-collectable once unused.
  • Improved Cache Metadata: Cache entries now track timestamps, access counts, and a WeakRef to the node instance for smarter eviction.
  • Stable Cache Keys: Component identifiers now rely on WeakMap instead of component names, ensuring stability even under minification.
  • Comprehensive Integration Tests: Added tests covering cache collision, rapid navigation flows, Strict Mode compatibility, large-prop hashing, and LRU behavior.

Fix

  • core: Simplified property assignment logic in common helpers ( 312af57)

Refactor

  • core: Added ElementCacheEntry interface for memoization and improved css prop typings ( 6a8381c)

Version Update

  • Current version: 0.4.4

Changelog & Commits


MeoNode UI v0.4.3 – Code Quality & Style Handling Improvements

Release Date: 2025-11-14

Fixes

  • core: Adjusted isStyledComponent logic to improve style handling ( ff7a59e).

Refactor

  • core: Simplified _processProps by removing style prop handling ( b3570b4).

Documentation

  • core: Added detailed comments to rendering methods for better code maintainability ( 731c83e).

Version Update

  • Current version: 0.4.3

Changelog & Commits


MeoNode UI v0.4.2 – Dependency Property Fix

Release Date: 2025-11-14

Fixes

  • core: Removed deps property from props to prevent it from being passed to element attributes ( 6b01cbe).

Version Update

  • Current version: 0.4.2

Changelog & Commits


MeoNode UI v0.4.1 – Performance & Stability Improvements

Release Date: 2025-11-14

Performance

  • core: Optimized prop processing and caching with new signature generation for improved rendering efficiency ( 8cf0319).

Fixes

  • core: Enhanced error handling and improved style property detection for more robust runtime behavior ( ca79c27).

Tests

  • node: Enhanced dependency and memoization tests with real-world scenarios to ensure reliability in production use cases (d7452fa).

Refactor

  • types: Moved node.type.ts to types directory and updated imports for better code organization ( ccf769a).

Chore

  • deps: Updated dependencies in package.json for improved stability and performance ( eba2108).

Version Update

  • Current version: 0.4.1

Changelog & Commits


MeoNode UI v0.4.0 – Advanced Memoization & Caching System

Release Date: 2025-11-13

Features

  • core: Implemented an advanced memoization and caching system to optimize rendering performance ( 3b0a110):
    • Dependency-Based Memoization: Nodes can now be created with a dependency array, similar to React's useMemo, to prevent unnecessary re-renders of the node and its entire subtree if dependencies have not changed.
    • Enhanced Prop Caching: The prop signature generation is now more robust, and the cache uses an advanced LRU eviction strategy to remain efficient.
    • API Updates: The Node, createNode, createChildrenFirstNode, and Component HOCs have been updated to accept an optional deps array to enable memoization.

Example Usage

const App = () => {
  const [state, setState] = useState({ user: 'John', role: 'Admin' })

  const updateUser = () => setState(s => ({ ...s, user: 'Jane' }))
  const updateRole = () => setState(s => ({ ...s, role: 'Editor' }))

  return Div({
    children: [
      Div({ onClick: updateUser, children: 'Update User' }),
      Div({ onClick: updateRole, children: 'Update Role' }),
      // Static: never re-renders, regardless of state changes
      Div({ children: `Initial User: ${state.user}` }, []),
      // Dependent: re-renders only when `state.user` changes
      Div({ children: `User: ${state.user}; Role: ${state.role}` }, [state.user]),
    ],
  }).render()
}

With dependency-based memoization, only nodes whose dependencies change are re-rendered — enabling fine-grained reactivity and significant performance improvements in large trees.

Tests

  • core: Added a comprehensive suite of tests for the new memoization and caching system, covering dependency-based memoization, reactive and non-reactive children, complex state updates, and memoization of Higher-Order Components ( HOCs) (6bcd1b1).

Version Update

  • Current version: 0.4.0

Changelog & Commits


MeoNode UI v0.3.18 – Prop Caching Refinement for Dynamic Props

Release Date: 2025-11-12

Fixes

  • core: Refined prop caching mechanism to correctly handle dynamic props and prevent stale value reuse in iterative rendering ( 4c0641e).

Version Update

  • Current version: 0.3.18

Changelog & Commits


MeoNode UI v0.3.17 – Iterative Renderer, Prop Caching & TypeScript Configuration Improvements

Release Date: 2025-11-12

Performance

  • core: Implemented iterative renderer and prop caching to reduce re-renders and improve overall rendering efficiency (8a3a264).
  • helper: Refactored theme resolution logic for improved performance and more reliable cache correctness ( 9614cb8).

Chore & Maintenance

  • Fixed minor typo in useTheme JSDoc comment ( de0ddd9).
  • Added deprecation notice to usePortal hook (planned for removal in future release) ( f8a2923).
  • Updated PortalProps type definition to include a default generic type parameter ( de73ba5).
  • Updated isNodeInstance type guard to use BaseNode instead of NodeInstance for more accurate inference ( 2c69d05).
  • scripts: Increased Jest stack size and fixed build commands for better CI reliability ( e046cdf).
  • Renamed jest.config.mjsjest.config.ts to improve TypeScript testing integration ( a3213eb).
  • Updated tsconfig.json to:
    • Exclude dist and node_modules directories ( eeb9577).
    • Enhance compiler options and add path mappings for a smoother development experience ( 89bc1a4).

Version Update

  • Current version: 0.3.17

Changelog & Commits


MeoNode UI v0.3.16 – Built-in React Fragment, Type Enhancements & Extended Test Coverage

Release Date: 2025-11-05

What's New

  • React:

    • Added the built-in React Fragment component ( d5e376a).
    • Added REACT_ACTIVITY_TYPE constant to the react-is helper for consistent React element detection ( e91e48f).
  • Core:

    • Enhanced NodeProps type to conditionally include built-in React components, improving type safety and flexibility (3b8a4cb).
    • Exported NO_STYLE_TAGS type for better type inference when disabling emotion styling ( a6db6e8).
  • Testing:

    • Added comprehensive tests for Fragment, Suspense, and Activity components to validate style and render behavior (2af386f).

Version Update

  • Current version: 0.3.16

Changelog & Commits


MeoNode UI v0.3.15 – Emotion Styling Control & React Detection Enhancements

Release Date: 2025-11-04

What's New

  • Core: Introduced the new disableEmotion prop to allow developers to disable Emotion styling. This setting now propagates to all child nodes for fine-grained control over style rendering ( 377a9e9).
  • React Integration: Improved detection logic for isContextProvider and isReactClassComponent, ensuring more accurate differentiation of React components ( e8839e4).

Version Update

  • Current version is 0.3.15.

Changelog & Commits


MeoNode UI v0.3.14 – Core Support for Suspense & Activity Components

Release Date: 2025-10-30

What's New

  • Core: Added internal handling for Suspense and Activity components ( 0f9fcb1).

Version Update

  • Current version is 0.3.14.

Changelog & Commits


MeoNode UI v0.3.13 – Theme Function Output Fix

Release Date: 2025-10-30

Fixes

  • Theme Helper: Fixed an issue where theme functions returning string values were not being processed correctly, ensuring consistent theme resolution across components ( 286fd89).

Version Update

  • Current version is 0.3.13.

Changelog & Commits


MeoNode UI v0.3.12 – Suspense Component

Release Date: 2025-10-23

What's New

  • React: Added the new Suspense component along with detailed JSDoc for both Activity and Suspense components to improve clarity and developer experience ( c1760fd).

Version Update

  • Current version is 0.3.12.

Changelog & Commits


MeoNode UI v0.3.11 – New Activity Node, Theme Helper Improvements & Dependency Updates

Release Date: 2025-10-19

What's New

  • Components: Added React Activity Node and exported it in the main module ( aadbc2d).
  • Theme Helper: Improved resolveObjWithTheme to provide more reliable object type checking ( da1ce4c).

Changes

  • Dependencies: Updated dependencies in package.json and yarn.lock ( 0c0ced6).
  • Code Style: Removed 'use strict' directive from multiple files ( 17d79dc).

Docs

  • Contributing: Updated Node.js version requirement in CONTRIBUTING.md ( 4c577c3).

Tests

  • Node Handling: Added test case to ensure Node instances passed through props are preserved and correctly resolved through theme processing ( f4d1344).

Version Update

  • Current version is 0.3.11.

Changelog & Commits


MeoNode UI v0.3.10 – BaseNode Re-hydration & Dependency Updates

Release Date: 2025-10-09

Fixes

  • Core: Re-hydrated BaseNode instances that lost their class identity during the React lifecycle, ensuring stable behavior across renders.

Changes

  • Dependencies: Updated all dependencies to their latest versions in package.json for improved compatibility and stability.

Version Update

  • Current version is 0.3.10.

Changelog & Commits


MeoNode UI v0.3.9 – Root Node Viewport Fix

Release Date: 2025-09-30

Fixes

  • HTML Node: Updated Root node default minHeight and minWidth to use dynamic viewport units, ensuring better responsiveness across devices.

Version Update

  • Current version is 0.3.9.

Changelog & Commits


MeoNode UI v0.3.8 – Theme-Aware Styling Functions

Release Date: 2025-09-29

What's New

  • Styling: Added support for theme-aware functions for css props.
    • Enables more dynamic styling, such as:
      padding: 'theme​.spacing.md',
      backgroundColor: theme => tinycolor(theme​.system.primary.default).setAlpha(0.8).toString(),
      css: {
        color: theme => theme​.system.primary.default,
      }
      

Refactors

  • Core:
    • Refactored style resolution logic (resolveObjWithTheme and StyledRenderer) to selectively process the css prop.
    • Ensures other props (like children) are not processed, maintaining compatibility with Next.js Server Components.

Version Update

  • Incremented version to 0.3.8.

Changelog & Commits


MeoNode UI v0.3.7 – RSC Compatibility and CSS Prop Isolation

Release Date: 2025-09-27

Features

  • RSC: Made client components like ThemeProvider and StyleRegistry compatible with React Server Components.

Refactors

  • Node: Isolated the css prop to be passed exclusively to the StyledRenderer, preventing it from being passed down to the underlying HTML element.

Version Update

  • Bumps version to 0.3.7.

Changelog & Commits


Release Window: 2025-09-26 → 2025-09-27

Fixes

  • Theme Cookie: Added cookie path to prevent duplicate theme cookie issues.
  • Component Stability: Fixed component remounting problems when children content changed dynamically (e.g., during typing).

Refactors

  • Core:
    • Removed automatic key generation (_generateKey) and all related logic.
    • Simplified _processRawNode by removing the nodeIndex parameter and complex case handling.
    • Updated render() to spread array children as individual arguments to createElement.
    • Preserved only explicit non-null keys from original React elements.

Changes

  • Changelog: Updated missing changelog entries to ensure version history is complete and consistent.

Version Update

  • Consolidated updates from v0.3.4 → v0.3.6. Current version is 0.3.6.

Changelog & Commits


MeoNode UI v0.3.3 – Theme System Overhaul

Release Date: 2025-09-26

⚠️ Breaking Changes

  • Theme System: Theme handling has been migrated to React Context.
    • The old theme prop on components (e.g., Div({ theme: { ... } })) is no longer supported.
    • You must now wrap your application (or subtree) with the ThemeProvider.

Example Migration

Before:

import { Div } from '@meonode/ui'

const App = () => {
  return Div({
    theme: {
      // theme object
    },
    children: 'Hello world!',
  })
}

After:

import { Div, ThemeProvider } from '@meonode/ui'

const App = () => {
  return ThemeProvider({
    theme: {
      mode: 'light', // or 'dark' or any custom mode
      system: {
        base: {
          default: '#ffffff',
          content: '#000000',
        },
      },
    },
    children: [
      Div({
        backgroundColor: 'theme​.base',
        color: 'theme​.content',
        children: 'Hello world!',
      }),
    ],
  })
}

What’s New (since v0.2.21)

v0.3.3

  • Fix: Enhanced element type validation to allow createPortal to be passed as children.

v0.3.2

  • Fix: Updated import paths for the Node component to improve module structure.
  • Fix (ThemeProvider): Updated type imports and refined function return types for clarity.

v0.3.1

  • Docs: Updated README with details on the new theme system.

v0.3.0

  • Feature: Introduced a new theme system using React Context for cleaner and more flexible theme propagation.
  • Refactor: Removed unused _childrenHash property from the Node class.

Version Update

  • Incremented version to 0.3.3.

Changelog & Commits


MeoNode UI v0.2.22 – Key & CSS Prop Refactor for Improved Rendering

Release Window: 2025-09-29

Refactors

  • Core:
    • Removed manual key generation logic, relying instead on React’s reconciliation for array children.
    • Streamlined CSS prop handling within BaseNode and StyledRenderer for better integration with styling solutions.
    • Updated createElement calls to correctly spread children, supporting both single and multiple children.

Version Update

  • Updated version to 0.2.22.

Changelog & Commits


MeoNode UI v0.2.21 – Core Robustness & Type Improvements

Release Date: 2025-09-23

Refactors

  • Core: Made node processing logic static and more robust to improve reliability.

What's New

  • Types:
    • Updated NodeFunction type to better support dynamic node content generation.
    • Updated FunctionRendererProps interface to use NodeFunction for consistency.

Fixes

  • Component HOC: Enhanced node instance check in Renderer for improved stability.
  • Node Types: Removed unused processRawNode property from Node type.

Changes

  • Package: Updated dependencies to their latest versions.

Version Update

  • Incremented version to 0.2.21.

Changelog & Commits


MeoNode UI v0.2.20 – Serialization Optimization & Type Safety Fixes

Release Date: 2025-09-22

Refactors

  • ObjHelper: Streamlined serialization logic to improve performance and maintainability.

Fixes

  • ESLint: Enforced no-unsafe-function-type rule to strengthen type safety.
  • Node Helper: Updated nodeSignature function to accept the Children type and improved handling of circular references.

Version Update

  • Incremented version to 0.2.20.

Changelog & Commits


MeoNode UI v0.2.19 – Portal Refinements & Tooling Update

Release Date: 2025-09-21

Refactors

  • Core:
    • Simplified PortalLauncher type definition for improved readability.
    • Enhanced usePortal with better component creation and cleanup logic.
    • Removed redundant re-render logic in portal rendering for efficiency.

Tests

  • Added unit tests for dynamic portal creation and management.
  • Removed outdated dynamic portal test case in node.test.ts.

Changes

  • Updated Yarn to v4.10.2 and configured yarnPath in .yarnrc.yml.

Version Update

  • Incremented version to 0.2.19.

Changelog & Commits


MeoNode UI v0.2.18 – Portal Enhancements & Function Children Support

Release Date: 2025-09-19

What's New

  • Core:
    • Added support for function children with improved rendering logic.
    • Enhanced portal system with an update method and new NodePortal type.
  • Hooks: Introduced usePortal hook to enable reactive portal behavior tied to state changes.

Example

A simple example using usePortal to make a portal reactive to state updates:

import { Button, Div, Node, Portal, type PortalProps } from '@meonode/ui'
import { usePortal } from '@meonode/ui'
import { useState } from 'react'

const PortalContent = ({ portal }: PortalProps<{ text: string }>) => {
  return Div({
    children: [
      'This is portal content!',
      state >= 1 ? text : 'Initial text value',
      Button(`Update Portal (${state + 1})`, {
        onClick: () => setState((s: number) => s + 1),
      }),
      Button('Close Portal', {
        onClick: () => portal?.unmount(),
      }),
    ],
  }).render()
}

const MyPortal = () => {
  const [state, setState] = useState<number>(0)
  const { setPortal, createComponent } = usePortal([state])

  const PortalContentComp = createComponent(({ portal }: PortalProps<{ text: string }>) => PortalContent({ text: 'Hello there' }))

  return Div({
    children: [
      Button('Open Portal', {
        onClick: () => {
          const portal = Portal<{ text: string }>(PortalContent)()
          setPortal(portal)
        },
      }),
    ],
  }).render()
}

Version Update

  • Incremented version to 0.2.18.

Changelog & Commits


MeoNode UI v0.2.17 – Utility Enhancements & Core Streamlining

Release Date: 2025-09-14

What's New

  • Helpers: Added omit and omitUndefined utility functions to create object copies without specified keys or undefined values.
  • Integration: Applied these utilities to manage finalProps for both standard HTML tags and custom components.

Refactors

  • Removed unnecessary type assertions for children in core.node.ts.
  • Streamlined element creation logic in core.node.ts for cleaner and more efficient rendering.

Tests

  • Added a test case for rendering a Div node using the Component HOC.
  • Replaced Div components with Container for consistency in performance tests.
  • Added a test for rendering an empty-prop Div node in node.test.ts.

Version Update

  • Incremented version to 0.2.17.

Changelog & Commits


MeoNode UI v0.2.16 – Core Optimizations & Type Refinements

Release Date: 2025-09-13

What's New

  • Core:
    • Introduced a static _isServer property to optimize server-side checks in caching methods.
    • Removed passedKey from _functionRenderer and simplified the function-as-child wrapper.
    • Enhanced toPortal unmount behavior to properly clean up the portal container.

Refactors

  • Updated children prop to use the Children type, improving clarity and consistency across the codebase.

Version Update

  • Incremented version to 0.2.16.

Changelog & Commits


MeoNode UI v0.2.15 – Performance & Stability Improvements

Release Date: 2025-09-12

What's New

  • Cache: Implemented a hybrid caching strategy using WeakMap and Map for processed children, improving both performance and memory management.
  • Helper:
    • Added nodeSignature for stable node signatures.
    • Enhanced createStableHash with bounded traversal for safer, more predictable hashing.
    • Improved ObjHelper.stringify for deterministic serialization with sorted keys and special type handling.

Refactors

  • Improved type definitions and error handling in rendering methods to increase reliability and maintainability.

Version Update

  • Incremented version to 0.2.15.

Changelog & Commits


MeoNode UI v0.2.14 – Performance Optimizations & API Simplification

Release Date: 2025-09-12

What's New

  • Core (BaseNode): Added caching for processed children to improve rendering performance.
  • Components: Introduced Container as an alias for Div to simplify general-purpose container usage.

Removed

  • Utilities: Removed the shallowEqual helper from common.helper.ts as part of API cleanup.

Fixes

  • Rendering: Optimized existing key checks and improved handling of null values to boost performance and stability in rendering functions.

Version

  • Bumped version to 0.2.14.

Changelog & Commits


MeoNode UI v0.2.13 – Testing & Developer Workflow Enhancements

Release Date: 2025-09-11

What's New

  • Development: Added a pre-commit hook for automatic linting and testing, and updated package.json scripts for a smoother workflow.
  • Testing: Introduced Jest configuration with TypeScript support to standardize the testing environment.
  • Core (BaseNode): Added comprehensive unit tests to validate and safeguard core functionality.

Fixed

  • Core: Remove stylable elements from NO_STYLE_TAGS to ensure only non-visual/metadata tags are excluded from CSS styling.

Version

  • Incremented version to 0.2.13.

Changelog & Commits


MeoNode UI v0.2.12 – Critical RSC Bug Fixes

Release Date: 2025-09-11

What's Fixed

  • Core (BaseNode): Removed the child processing cache to resolve a critical bug that caused infinite page loads in server-side rendering (RSC) environments.
  • Helper: Corrected element type retrieval logic within the hashing function used for child node processing.

Version

  • Incremented version to 0.2.12.

Changelog & Commits


MeoNode UI v0.2.11 – Improved Documentation & Child Processing Overhaul

Release Date: 2025-09-11

What's Enhanced

  • Core (BaseNode):
    • Expanded and clarified JSDoc documentation, covering prop processing, child handling, and rendering logic.
    • Overhauled child processing and caching mechanism to boost server-side performance and fix a memory leak.
      • Replaced object stringification with a more efficient hashing strategy for cache keys.
      • Introduced a cache management policy for better memory handling.

What's Fixed

  • Helper: Fixed an unnecessary string check in flexbox style processing.
  • Core (BaseNode): Updated a function placeholder to follow the unused parameter naming convention.

Version

  • Incremented version to 0.2.11.

Changelog & Commits


MeoNode UI v0.2.10 – New render API & Constants Update

Release Date: 2025-09-10

What's Added

  • Core: Introduced a 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 call react-dom/client.

    • Before:

      import { createRoot } from 'react-dom/client'
      import { Div } from '@meonode/ui'
      
      const container = document.getElementById('root')
      const root = createRoot(container)
      root.render(Div({ children: 'Hello' }).render())
      
    • After:

      import { Div } from '@meonode/ui'
      import { render } from '@meonode/ui/client'
      
      const container = document.getElementById('root')
      render(Div({ children: 'Hello' }), container)
      
  • Constants: Added NO_STYLE_TAGS array and noStyleTagsSet for fast lookup of tags that should not receive styles.

What's Enhanced

  • Core: Improved StyledRenderer integration to check for no-style tags.

What's Changed

  • Helper: Updated CSS property set to rely on constants and respect no-style tags.
  • Package: Dependencies updated to latest versions.
  • Directory: Renamed dataconstants for clarity.
  • File: Renamed cssProperties.tscssProperties.const.ts to better reflect its purpose.

Version

  • Incremented version to 0.2.10.

Changelog & Commits


MeoNode UI v0.2.9 – Type Inference & Autocomplete Fix

Release Date: 05/09/2025

What's Fixed

  • Core (types): Corrected the MergedProps definition to restore accurate TypeScript inference and props autocomplete.
    • Resolved a regression from v0.2.8 where createNode and createChildrenFirstNode lost autocomplete support for props due to incorrect typing.

Version

  • Bumped version to 0.2.9.

Changelog & Commits


MeoNode UI v0.2.8 – Unified Props Handling with MergedProps

Release Date: 05/09/2025

What's Changed

  • Core (node): Refactored props handling to use a single utility type MergedProps<E, AdditionalProps>, simplifying and unifying typing for createNode and createChildrenFirstNode.

  • Improved developer experience for prebuilt components by allowing safer extension and overriding of props.

    • Example:

      import { createNode, Input } from '@meonode/ui'
      
      export const Div = createNode('div')
      
      // Add new props
      const custom = Div<{ field: string }>({ field: 'Hello' })
      
      // Override existing React props
      const withOverride = Input<{ onChange: (e: { target: { value: string } }) }>({
        onChange: ({ target }) => console.log(target.value),
      })
      
  • Helpers: Reorganized helper files and updated import paths.

Bug Fixes

  • Styled Renderer: Made children prop optional in StyledRendererProps.

Version

  • Bumped version to 0.2.8.

Changelog & Commits


MeoNode UI v0.2.7 – Node Index Renaming & Key Logic Update

Release Date: 04/09/2025

What's Changed

  • Core (node): Renamed childIndex to nodeIndex and refined key generation logic.

Bug Fixes

  • No bug fixes in this release.

Version

  • Bumped version to 0.2.7.

Changelog & Commits


MeoNode UI v0.2.6 – Dependency Updates & Key Generation Enhancements

Release Date: 04/09/2025

What’s Changed

  • Dependencies: Updated TypeScript ESLint, native-preview, and JSDoc to their latest versions.
  • Core (node): Improved generateIndexedKeyIfNeeded to support object parameters and enhance key uniqueness using children count.
  • Imports: Continued adjustments to import paths, ensuring file extensions are included for full compatibility with ES modules.

Bug Fixes

  • No bug fixes in this release.

Version

  • Bumped version to 0.2.6.

Changelog & Commits


MeoNode UI v0.2.5 Release Notes

Release Date: 03/09/2025

What's Changed

  • imports: Updated import paths to include file extensions, ensuring proper ESM (ECMAScript Module) compatibility across modern bundlers and runtimes.

Bug Fixes

  • Fixed issues with ES compatibility caused by missing file extensions in imports.

Version

  • Bumped version to 0.2.5.

Changelog & Commits


MeoNode UI v0.2.4 Release Notes

Release Date: 02/09/2025

Feature Updates

  • Exposed the original element via the created Node for easier access and debugging.
    • You can now access the underlying element type from a Node (e.g., MyComp.element).

Bug Fixes

  • No bug fixes in this release.

Version

  • Bumped version to 0.2.4.

Changelog & Commits

On this page