@meonode/ui 0.3.5 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -15
- package/dist/components/registry.client.d.ts +1 -1
- package/dist/components/registry.client.d.ts.map +1 -1
- package/dist/components/registry.client.js +1 -1
- package/dist/components/styled-renderer.client.d.ts +3 -830
- package/dist/components/styled-renderer.client.d.ts.map +1 -1
- package/dist/components/styled-renderer.client.js +1 -0
- package/dist/components/theme-provider.client.d.ts +1 -7
- package/dist/components/theme-provider.client.d.ts.map +1 -1
- package/dist/components/theme-provider.client.js +2 -4
- package/dist/components/theme-provider.d.ts +8 -0
- package/dist/components/theme-provider.d.ts.map +1 -0
- package/dist/components/theme-provider.js +3 -0
- package/dist/core.node.d.ts.map +1 -1
- package/dist/core.node.js +7 -7
- package/dist/hook/useTheme.d.ts +1 -1
- package/dist/hook/useTheme.d.ts.map +1 -1
- package/dist/main.d.ts +6 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +6 -1
- package/dist/nextjs-registry/index.d.ts +3 -4
- package/dist/nextjs-registry/index.d.ts.map +1 -1
- package/dist/nextjs-registry/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,33 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.3.7] - 2025-09-27
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **rsc:** make client components RSC compatible
|
|
13
|
+
|
|
14
|
+
### Refactor
|
|
15
|
+
|
|
16
|
+
- **node:** isolate css prop for StyledRenderer
|
|
17
|
+
|
|
18
|
+
## [0.3.6] - 2025-09-27
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- **changelog:** update missing changelog entries
|
|
23
|
+
|
|
24
|
+
## [0.3.5] - 2025-09-27
|
|
25
|
+
|
|
26
|
+
### Refactor
|
|
27
|
+
|
|
28
|
+
- **refactor:** remove automatic key generation and use spread children in createElement
|
|
29
|
+
- Remove _generateKey method and all automatic key generation logic
|
|
30
|
+
- Simplify _processRawNode by removing nodeIndex parameter and complex case handling
|
|
31
|
+
- Update render() to spread array children as individual arguments to createElement
|
|
32
|
+
- Only preserve explicit non-null keys from original React elements
|
|
33
|
+
- Fix component remounting issues when children content changes (e.g., during typing)
|
|
34
|
+
|
|
8
35
|
## [0.3.4] - 2025-09-26
|
|
9
36
|
|
|
10
37
|
### Fixed
|
|
@@ -45,7 +72,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
45
72
|
- **feat(theme):** use React Context for theme propagation
|
|
46
73
|
|
|
47
74
|
**Before**:
|
|
48
|
-
|
|
75
|
+
'''typescript
|
|
49
76
|
import { Div } from '@meonode/ui';
|
|
50
77
|
|
|
51
78
|
const App = () => {
|
|
@@ -56,10 +83,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
56
83
|
children: 'Hello world!',
|
|
57
84
|
});
|
|
58
85
|
};
|
|
59
|
-
|
|
86
|
+
'''
|
|
60
87
|
|
|
61
88
|
**After**:
|
|
62
|
-
|
|
89
|
+
'''typescript
|
|
63
90
|
import { Div, ThemeProvider } from '@meonode/ui';
|
|
64
91
|
|
|
65
92
|
const App = () => {
|
|
@@ -82,7 +109,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
82
109
|
],
|
|
83
110
|
});
|
|
84
111
|
};
|
|
85
|
-
|
|
112
|
+
'''
|
|
86
113
|
|
|
87
114
|
## [0.2.21] - 2025-09-23
|
|
88
115
|
|
|
@@ -142,7 +169,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
142
169
|
|
|
143
170
|
- **feat(portal)**: use `usePortal` hook to make the portal reactive to state changes
|
|
144
171
|
|
|
145
|
-
|
|
172
|
+
'''typescript
|
|
146
173
|
import { Button, Div, Node, Portal, type PortalProps } from '@meonode/ui';
|
|
147
174
|
import { usePortal } from '@meonode/ui';
|
|
148
175
|
import { useState } from 'react';
|
|
@@ -181,7 +208,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
181
208
|
],
|
|
182
209
|
}).render();
|
|
183
210
|
};
|
|
184
|
-
|
|
211
|
+
'''
|
|
185
212
|
|
|
186
213
|
## [0.2.17] - 2025-09-14
|
|
187
214
|
|
|
@@ -293,22 +320,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
293
320
|
- **core**: add top-level `render` function for a cleaner and simpler API when mounting a Meonode instance to the DOM.
|
|
294
321
|
This abstracts away the need to manually use `react-dom/client`.
|
|
295
322
|
- **Before**:
|
|
296
|
-
|
|
323
|
+
'''typescript
|
|
297
324
|
import { createRoot } from 'react-dom/client';
|
|
298
325
|
import { Div } from '@meonode/ui';
|
|
299
326
|
|
|
300
327
|
const container = document.getElementById('root');
|
|
301
328
|
const root = createRoot(container);
|
|
302
329
|
root.render(Div({ children: 'Hello' }).render());
|
|
303
|
-
|
|
330
|
+
'''
|
|
304
331
|
- **After**:
|
|
305
|
-
|
|
332
|
+
'''typescript
|
|
306
333
|
import { Div } from '@meonode/ui';
|
|
307
334
|
import { render } from '@meonode/ui/client';
|
|
308
335
|
|
|
309
336
|
const container = document.getElementById('root');
|
|
310
337
|
render(Div({ children: 'Hello' }), container);
|
|
311
|
-
|
|
338
|
+
'''
|
|
312
339
|
- **constants**: add `NO_STYLE_TAGS` array and `noStyleTagsSet` for quick lookup of tags that should not receive styles
|
|
313
340
|
|
|
314
341
|
### Enhanced
|
|
@@ -340,7 +367,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
340
367
|
- Simplifies and unifies the typing system for node factories (`createNode`, `createChildrenFirstNode`).
|
|
341
368
|
- Improves developer experience when working with prebuilt components:
|
|
342
369
|
- Example:
|
|
343
|
-
|
|
370
|
+
'''typescript
|
|
344
371
|
import { Div, Input } from '@meonode/ui'
|
|
345
372
|
|
|
346
373
|
// Add new props
|
|
@@ -350,7 +377,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
350
377
|
Input<{ onChange: (e: { target: { value: string } }) => void }>({
|
|
351
378
|
onChange: ({ target }) => console.log(target.value),
|
|
352
379
|
})
|
|
353
|
-
|
|
380
|
+
'''
|
|
354
381
|
Extending prebuilt components is now safer and more predictable, with generic props always taking precedence when keys
|
|
355
382
|
overlap.
|
|
356
383
|
|
|
@@ -382,7 +409,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
382
409
|
### Added
|
|
383
410
|
|
|
384
411
|
- **core**: Exposed the original element via the created Node for easier access and debugging.
|
|
385
|
-
|
|
412
|
+
'''typescript
|
|
386
413
|
import { createNode } from "@meonode/ui";
|
|
387
414
|
|
|
388
415
|
// Create a Node wrapping a 'div' element
|
|
@@ -390,7 +417,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
390
417
|
|
|
391
418
|
// Access the underlying element type
|
|
392
419
|
console.log(MyComp.element); // 'div'
|
|
393
|
-
|
|
420
|
+
'''
|
|
394
421
|
|
|
395
422
|
## [0.2.3] - 2025-09-01
|
|
396
423
|
|
|
@@ -521,4 +548,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
521
548
|
- This changelog covers the most recent development history available
|
|
522
549
|
- The project focuses on building React UIs with type-safe fluency without JSX syntax
|
|
523
550
|
- Recent development has emphasized Emotion integration, type safety improvements, and enhanced flexbox support
|
|
524
|
-
- For a complete history, view all commits on GitHub: [View all commits](https://github.com/l7aromeo/meonode-ui/commits)
|
|
551
|
+
- For a complete history, view all commits on GitHub: [View all commits](https://github.com/l7aromeo/meonode-ui/commits)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactElement } from 'react';
|
|
2
2
|
export default function StyleRegistry({ children }: {
|
|
3
3
|
children: ReactElement;
|
|
4
|
-
}):
|
|
4
|
+
}): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
5
5
|
//# sourceMappingURL=registry.client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.client.d.ts","sourceRoot":"","sources":["../../src/components/registry.client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,YAAY,EAAY,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"registry.client.d.ts","sourceRoot":"","sources":["../../src/components/registry.client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,YAAY,EAAY,MAAM,OAAO,CAAA;AAUlE,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,YAAY,CAAA;CAAE,8EAuB7E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";function _slicedToArray(a,b){return _arrayWithHoles(a)||_iterableToArrayLimit(a,b)||_unsupportedIterableToArray(a,b)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(b,c){if(b){if("string"==typeof b)return _arrayLikeToArray(b,c);var a={}.toString.call(b).slice(8,-1);return"Object"===a&&b.constructor&&(a=b.constructor.name),"Map"===a||"Set"===a?Array.from(b):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(b,c):void 0}}function _arrayLikeToArray(b,c){(null==c||c>b.length)&&(c=b.length);for(var d=0,f=Array(c);d<c;d++)f[d]=b[d];return f}function _iterableToArrayLimit(b,c){var d=null==b?null:"undefined"!=typeof Symbol&&b[Symbol.iterator]||b["@@iterator"];if(null!=d){var g,h,j,k,l=[],a=!0,m=!1;try{if(j=(d=d.call(b)).next,0===c){if(Object(d)!==d)return;a=!1}else for(;!(a=(g=j.call(d)).done)&&(l.push(g.value),l.length!==c);a=!0);}catch(a){m=!0,h=a}finally{try{if(!a&&null!=d["return"]&&(k=d["return"](),Object(k)!==k))return}finally{if(m)throw h}}return l}}function _arrayWithHoles(a){if(Array.isArray(a))return a}import{createElement,useState}from"react";import{useServerInsertedHTML}from"next/navigation";import{CacheProvider}from"@emotion/react";import createCache from"@emotion/cache";function createEmotionCache(){return createCache({key:"meonode-css"})}export default function StyleRegistry(a){var b=a.children,c=useState(function(){var a=createEmotionCache();return a.compat=!0,a}),d=_slicedToArray(c,1),e=d[0];return useServerInsertedHTML(function(){var a=Object.keys(e.inserted).sort(),b=a.map(function(a){return e.inserted[a]}).join(""),c=a.join(" ");return b?createElement("style",{"data-emotion":"".concat(e.key," ").concat(c),dangerouslySetInnerHTML:{__html:b}}):null}),
|
|
1
|
+
"use client";function _slicedToArray(a,b){return _arrayWithHoles(a)||_iterableToArrayLimit(a,b)||_unsupportedIterableToArray(a,b)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(b,c){if(b){if("string"==typeof b)return _arrayLikeToArray(b,c);var a={}.toString.call(b).slice(8,-1);return"Object"===a&&b.constructor&&(a=b.constructor.name),"Map"===a||"Set"===a?Array.from(b):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(b,c):void 0}}function _arrayLikeToArray(b,c){(null==c||c>b.length)&&(c=b.length);for(var d=0,f=Array(c);d<c;d++)f[d]=b[d];return f}function _iterableToArrayLimit(b,c){var d=null==b?null:"undefined"!=typeof Symbol&&b[Symbol.iterator]||b["@@iterator"];if(null!=d){var g,h,j,k,l=[],a=!0,m=!1;try{if(j=(d=d.call(b)).next,0===c){if(Object(d)!==d)return;a=!1}else for(;!(a=(g=j.call(d)).done)&&(l.push(g.value),l.length!==c);a=!0);}catch(a){m=!0,h=a}finally{try{if(!a&&null!=d["return"]&&(k=d["return"](),Object(k)!==k))return}finally{if(m)throw h}}return l}}function _arrayWithHoles(a){if(Array.isArray(a))return a}import{createElement,useState}from"react";import{useServerInsertedHTML}from"next/navigation";import{CacheProvider}from"@emotion/react";import createCache from"@emotion/cache";import{Node}from"../core.node.js";function createEmotionCache(){return createCache({key:"meonode-css"})}export default function StyleRegistry(a){var b=a.children,c=useState(function(){var a=createEmotionCache();return a.compat=!0,a}),d=_slicedToArray(c,1),e=d[0];return useServerInsertedHTML(function(){var a=Object.keys(e.inserted).sort(),b=a.map(function(a){return e.inserted[a]}).join(""),c=a.join(" ");return b?createElement("style",{"data-emotion":"".concat(e.key," ").concat(c),dangerouslySetInnerHTML:{__html:b}}):null}),Node(CacheProvider,{value:e,children:b}).render()}
|