@meonode/ui 0.3.6 → 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 CHANGED
@@ -5,6 +5,16 @@ 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
+
8
18
  ## [0.3.6] - 2025-09-27
9
19
 
10
20
  ### Changed
@@ -62,7 +72,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
62
72
  - **feat(theme):** use React Context for theme propagation
63
73
 
64
74
  **Before**:
65
- ```typescript
75
+ '''typescript
66
76
  import { Div } from '@meonode/ui';
67
77
 
68
78
  const App = () => {
@@ -73,10 +83,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
73
83
  children: 'Hello world!',
74
84
  });
75
85
  };
76
- ```
86
+ '''
77
87
 
78
88
  **After**:
79
- ```typescript
89
+ '''typescript
80
90
  import { Div, ThemeProvider } from '@meonode/ui';
81
91
 
82
92
  const App = () => {
@@ -99,7 +109,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
109
  ],
100
110
  });
101
111
  };
102
- ```
112
+ '''
103
113
 
104
114
  ## [0.2.21] - 2025-09-23
105
115
 
@@ -159,7 +169,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
159
169
 
160
170
  - **feat(portal)**: use `usePortal` hook to make the portal reactive to state changes
161
171
 
162
- ```typescript
172
+ '''typescript
163
173
  import { Button, Div, Node, Portal, type PortalProps } from '@meonode/ui';
164
174
  import { usePortal } from '@meonode/ui';
165
175
  import { useState } from 'react';
@@ -198,7 +208,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
198
208
  ],
199
209
  }).render();
200
210
  };
201
- ```
211
+ '''
202
212
 
203
213
  ## [0.2.17] - 2025-09-14
204
214
 
@@ -310,22 +320,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
310
320
  - **core**: add top-level `render` function for a cleaner and simpler API when mounting a Meonode instance to the DOM.
311
321
  This abstracts away the need to manually use `react-dom/client`.
312
322
  - **Before**:
313
- ```typescript
323
+ '''typescript
314
324
  import { createRoot } from 'react-dom/client';
315
325
  import { Div } from '@meonode/ui';
316
326
 
317
327
  const container = document.getElementById('root');
318
328
  const root = createRoot(container);
319
329
  root.render(Div({ children: 'Hello' }).render());
320
- ```
330
+ '''
321
331
  - **After**:
322
- ```typescript
332
+ '''typescript
323
333
  import { Div } from '@meonode/ui';
324
334
  import { render } from '@meonode/ui/client';
325
335
 
326
336
  const container = document.getElementById('root');
327
337
  render(Div({ children: 'Hello' }), container);
328
- ```
338
+ '''
329
339
  - **constants**: add `NO_STYLE_TAGS` array and `noStyleTagsSet` for quick lookup of tags that should not receive styles
330
340
 
331
341
  ### Enhanced
@@ -357,7 +367,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
357
367
  - Simplifies and unifies the typing system for node factories (`createNode`, `createChildrenFirstNode`).
358
368
  - Improves developer experience when working with prebuilt components:
359
369
  - Example:
360
- ```typescript
370
+ '''typescript
361
371
  import { Div, Input } from '@meonode/ui'
362
372
 
363
373
  // Add new props
@@ -367,7 +377,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
367
377
  Input<{ onChange: (e: { target: { value: string } }) => void }>({
368
378
  onChange: ({ target }) => console.log(target.value),
369
379
  })
370
- ```
380
+ '''
371
381
  Extending prebuilt components is now safer and more predictable, with generic props always taking precedence when keys
372
382
  overlap.
373
383
 
@@ -399,7 +409,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
399
409
  ### Added
400
410
 
401
411
  - **core**: Exposed the original element via the created Node for easier access and debugging.
402
- ```typescript
412
+ '''typescript
403
413
  import { createNode } from "@meonode/ui";
404
414
 
405
415
  // Create a Node wrapping a 'div' element
@@ -407,7 +417,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
407
417
 
408
418
  // Access the underlying element type
409
419
  console.log(MyComp.element); // 'div'
410
- ```
420
+ '''
411
421
 
412
422
  ## [0.2.3] - 2025-09-01
413
423
 
@@ -538,4 +548,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
538
548
  - This changelog covers the most recent development history available
539
549
  - The project focuses on building React UIs with type-safe fluency without JSX syntax
540
550
  - Recent development has emphasized Emotion integration, type safety improvements, and enhanced flexbox support
541
- - 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
- }): import("react").FunctionComponentElement<import("react").ProviderProps<import("@emotion/utils").EmotionCache | null>>;
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;AASlE,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,YAAY,CAAA;CAAE,yHAuB7E"}
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}),createElement(CacheProvider,{value:e},b)}
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()}