@meonode/ui 0.3.14 → 0.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -16
- package/dist/components/react.node.d.ts +20 -0
- package/dist/components/react.node.d.ts.map +1 -1
- package/dist/components/react.node.js +17 -1
- package/dist/constants/common.const.d.ts +1 -0
- package/dist/constants/common.const.d.ts.map +1 -1
- package/dist/core.node.d.ts.map +1 -1
- package/dist/core.node.js +20 -15
- package/dist/helper/react-is.helper.d.ts.map +1 -1
- package/dist/helper/react-is.helper.js +7 -5
- package/dist/node.type.d.ts +13 -2
- package/dist/node.type.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,21 @@ 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.16] - 2025-11-05
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **tests**: add tests for Fragment, Suspense, and Activity components to verify styling prop handling ([`2af386f`](https://github.com/l7aromeo/meonode-ui/commit/2af386f))
|
|
12
|
+
- **core**: enhance NodeProps type to conditionally include built-in React components ([`3b8a4cb`](https://github.com/l7aromeo/meonode-ui/commit/3b8a4cb))
|
|
13
|
+
- **react**: add REACT_ACTIVITY_TYPE to react-is helper ([`e91e48f`](https://github.com/l7aromeo/meonode-ui/commit/e91e48f))
|
|
14
|
+
- **core**: export NO_STYLE_TAGS type for better type inference ([`a6db6e8`](https://github.com/l7aromeo/meonode-ui/commit/a6db6e8))
|
|
15
|
+
- **react**: add Fragment component to create a container without extra DOM elements ([`d5e376a`](https://github.com/l7aromeo/meonode-ui/commit/d5e376a))
|
|
16
|
+
|
|
17
|
+
## [0.3.15] - 2025-11-04
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
- **core**: add disableEmotion prop to disable emotion styling and propagate to children ([`377a9e9`](https://github.com/l7aromeo/meonode-ui/commit/377a9e9d4844ba7869155e686c9b31f0f9ce2329))
|
|
21
|
+
- **react**: enhance isContextProvider and isReactClassComponent checks ([`e8839e4`](https://github.com/l7aromeo/meonode-ui/commit/e8839e4c231bdd66686f7b43d9889a18cd9fc791))
|
|
22
|
+
|
|
8
23
|
## [0.3.14] - 2025-10-30
|
|
9
24
|
|
|
10
25
|
### Added
|
|
@@ -29,7 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
29
44
|
|
|
30
45
|
### Changed
|
|
31
46
|
- **chore**: update dependencies in package.json and yarn.lock ([`0c0ced6`](https://github.com/l7aromeo/meonode-ui/commit/0c0ced68662bb701634d49dc79da86e4ddce5392))
|
|
32
|
-
- **chore**: remove 'use strict' directive from multiple files ([`17d79dc`](https://github.com/l7aromeo/meonode-ui/commit/17d79dcb105a8c2062695071c3f587f6db9a5711))
|
|
47
|
+
- **chore**: remove \'use strict\' directive from multiple files ([`17d79dc`](https://github.com/l7aromeo/meonode-ui/commit/17d79dcb105a8c2062695071c3f587f6db9a5711))
|
|
33
48
|
|
|
34
49
|
### Docs
|
|
35
50
|
- **docs**: update Node.js version requirement in CONTRIBUTING.md ([`4c577c3`](https://github.com/l7aromeo/meonode-ui/commit/4c577c3e23294bdc188cda5b14375af1cb967888))
|
|
@@ -130,7 +145,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
130
145
|
- **feat(theme):** use React Context for theme propagation
|
|
131
146
|
|
|
132
147
|
**Before**:
|
|
133
|
-
|
|
148
|
+
```typescript
|
|
134
149
|
import { Div } from '@meonode/ui';
|
|
135
150
|
|
|
136
151
|
const App = () => {
|
|
@@ -141,10 +156,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
141
156
|
children: 'Hello world!',
|
|
142
157
|
});
|
|
143
158
|
};
|
|
144
|
-
|
|
159
|
+
```
|
|
145
160
|
|
|
146
161
|
**After**:
|
|
147
|
-
|
|
162
|
+
```typescript
|
|
148
163
|
import { Div, ThemeProvider } from '@meonode/ui';
|
|
149
164
|
|
|
150
165
|
const App = () => {
|
|
@@ -167,7 +182,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
167
182
|
],
|
|
168
183
|
});
|
|
169
184
|
};
|
|
170
|
-
|
|
185
|
+
```
|
|
171
186
|
|
|
172
187
|
## [0.2.21] - 2025-09-23
|
|
173
188
|
|
|
@@ -227,7 +242,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
227
242
|
|
|
228
243
|
- **feat(portal)**: use `usePortal` hook to make the portal reactive to state changes
|
|
229
244
|
|
|
230
|
-
|
|
245
|
+
```typescript
|
|
231
246
|
import { Button, Div, Node, Portal, type PortalProps } from '@meonode/ui';
|
|
232
247
|
import { usePortal } from '@meonode/ui';
|
|
233
248
|
import { useState } from 'react';
|
|
@@ -266,7 +281,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
266
281
|
],
|
|
267
282
|
}).render();
|
|
268
283
|
};
|
|
269
|
-
|
|
284
|
+
```
|
|
270
285
|
|
|
271
286
|
## [0.2.17] - 2025-09-14
|
|
272
287
|
|
|
@@ -378,22 +393,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
378
393
|
- **core**: add top-level `render` function for a cleaner and simpler API when mounting a Meonode instance to the DOM.
|
|
379
394
|
This abstracts away the need to manually use `react-dom/client`.
|
|
380
395
|
- **Before**:
|
|
381
|
-
|
|
396
|
+
```typescript
|
|
382
397
|
import { createRoot } from 'react-dom/client';
|
|
383
398
|
import { Div } from '@meonode/ui';
|
|
384
399
|
|
|
385
400
|
const container = document.getElementById('root');
|
|
386
401
|
const root = createRoot(container);
|
|
387
402
|
root.render(Div({ children: 'Hello' }).render());
|
|
388
|
-
|
|
403
|
+
```
|
|
389
404
|
- **After**:
|
|
390
|
-
|
|
405
|
+
```typescript
|
|
391
406
|
import { Div } from '@meonode/ui';
|
|
392
407
|
import { render } from '@meonode/ui/client';
|
|
393
408
|
|
|
394
409
|
const container = document.getElementById('root');
|
|
395
410
|
render(Div({ children: 'Hello' }), container);
|
|
396
|
-
|
|
411
|
+
```
|
|
397
412
|
- **constants**: add `NO_STYLE_TAGS` array and `noStyleTagsSet` for quick lookup of tags that should not receive styles
|
|
398
413
|
|
|
399
414
|
### Enhanced
|
|
@@ -425,7 +440,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
425
440
|
- Simplifies and unifies the typing system for node factories (`createNode`, `createChildrenFirstNode`).
|
|
426
441
|
- Improves developer experience when working with prebuilt components:
|
|
427
442
|
- Example:
|
|
428
|
-
|
|
443
|
+
```typescript
|
|
429
444
|
import { Div, Input } from '@meonode/ui'
|
|
430
445
|
|
|
431
446
|
// Add new props
|
|
@@ -435,7 +450,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
435
450
|
Input<{ onChange: (e: { target: { value: string } }) => void }>({
|
|
436
451
|
onChange: ({ target }) => console.log(target.value),
|
|
437
452
|
})
|
|
438
|
-
|
|
453
|
+
```
|
|
439
454
|
Extending prebuilt components is now safer and more predictable, with generic props always taking precedence when keys
|
|
440
455
|
overlap.
|
|
441
456
|
|
|
@@ -467,7 +482,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
467
482
|
### Added
|
|
468
483
|
|
|
469
484
|
- **core**: Exposed the original element via the created Node for easier access and debugging.
|
|
470
|
-
|
|
485
|
+
```typescript
|
|
471
486
|
import { createNode } from "@meonode/ui";
|
|
472
487
|
|
|
473
488
|
// Create a Node wrapping a 'div' element
|
|
@@ -475,7 +490,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
475
490
|
|
|
476
491
|
// Access the underlying element type
|
|
477
492
|
console.log(MyComp.element); // 'div'
|
|
478
|
-
|
|
493
|
+
```
|
|
479
494
|
|
|
480
495
|
## [0.2.3] - 2025-09-01
|
|
481
496
|
|
|
@@ -606,4 +621,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
606
621
|
- This changelog covers the most recent development history available
|
|
607
622
|
- The project focuses on building React UIs with type-safe fluency without JSX syntax
|
|
608
623
|
- Recent development has emphasized Emotion integration, type safety improvements, and enhanced flexbox support
|
|
609
|
-
- For a complete history, view all commits on GitHub: [View all commits](https://github.com/l7aromeo/meonode-ui/commits)
|
|
624
|
+
- For a complete history, view all commits on GitHub: [View all commits](https://github.com/l7aromeo/meonode-ui/commits)
|
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A container that does not render any extra DOM element.
|
|
3
|
+
* @see {@link https://react.dev/reference/react/Fragment React Docs}
|
|
4
|
+
* @example
|
|
5
|
+
*
|
|
6
|
+
* ```typescript
|
|
7
|
+
* import { Fragment, Div, Span } from '@meonode/ui';
|
|
8
|
+
*
|
|
9
|
+
* Fragment({
|
|
10
|
+
* children: [
|
|
11
|
+
* Div('First Div'),
|
|
12
|
+
* Span('A Span inside Fragment'),
|
|
13
|
+
* Div('Second Div'),
|
|
14
|
+
* ],
|
|
15
|
+
* })
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare const Fragment: (<AdditionalProps extends Record<string, any> = Record<string, any>>(props?: import("../node.type").MergedProps<import("react").ExoticComponent<import("react").FragmentProps>, AdditionalProps> | undefined) => import("../node.type").NodeInstance<import("react").ExoticComponent<import("react").FragmentProps>>) & {
|
|
19
|
+
element: import("react").ExoticComponent<import("react").FragmentProps>;
|
|
20
|
+
};
|
|
1
21
|
/**
|
|
2
22
|
* Lets you hide and restore the UI and internal state of its children.
|
|
3
23
|
* @see {@link https://react.dev/reference/react/Activity React Docs}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.node.d.ts","sourceRoot":"","sources":["../../src/components/react.node.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ;;CAA2B,CAAA;AAEhD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ;;CAA2B,CAAA"}
|
|
1
|
+
{"version":3,"file":"react.node.d.ts","sourceRoot":"","sources":["../../src/components/react.node.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,QAAQ;;CAA2B,CAAA;AAEhD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ;;CAA2B,CAAA;AAEhD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ;;CAA2B,CAAA"}
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
import{Activity as BaseActivity,Suspense as BaseSuspense}from"react";import{createNode}from"../core.node.js";/**
|
|
1
|
+
import{Fragment as BaseFragment,Activity as BaseActivity,Suspense as BaseSuspense}from"react";import{createNode}from"../core.node.js";/**
|
|
2
|
+
* A container that does not render any extra DOM element.
|
|
3
|
+
* @see {@link https://react.dev/reference/react/Fragment React Docs}
|
|
4
|
+
* @example
|
|
5
|
+
*
|
|
6
|
+
* ```typescript
|
|
7
|
+
* import { Fragment, Div, Span } from '@meonode/ui';
|
|
8
|
+
*
|
|
9
|
+
* Fragment({
|
|
10
|
+
* children: [
|
|
11
|
+
* Div('First Div'),
|
|
12
|
+
* Span('A Span inside Fragment'),
|
|
13
|
+
* Div('Second Div'),
|
|
14
|
+
* ],
|
|
15
|
+
* })
|
|
16
|
+
* ```
|
|
17
|
+
*/export var Fragment=createNode(BaseFragment);/**
|
|
2
18
|
* Lets you hide and restore the UI and internal state of its children.
|
|
3
19
|
* @see {@link https://react.dev/reference/react/Activity React Docs}
|
|
4
20
|
* @example
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const NO_STYLE_TAGS: readonly ["html", "head", "meta", "link", "script", "style", "noscript", "template", "slot", "base", "param", "source", "track", "wbr", "embed", "object", "iframe", "frame", "frameset", "applet", "bgsound", "noembed", "noframes"];
|
|
2
2
|
export declare const noStyleTagsSet: Set<"applet" | "base" | "bgsound" | "embed" | "frame" | "frameset" | "head" | "html" | "iframe" | "link" | "meta" | "noembed" | "noframes" | "noscript" | "object" | "param" | "script" | "slot" | "source" | "style" | "template" | "track" | "wbr">;
|
|
3
|
+
export type NO_STYLE_TAGS = typeof NO_STYLE_TAGS;
|
|
3
4
|
//# sourceMappingURL=common.const.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.const.d.ts","sourceRoot":"","sources":["../../src/constants/common.const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,uOAwBhB,CAAA;AAEV,eAAO,MAAM,cAAc,uPAAyB,CAAA"}
|
|
1
|
+
{"version":3,"file":"common.const.d.ts","sourceRoot":"","sources":["../../src/constants/common.const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,uOAwBhB,CAAA;AAEV,eAAO,MAAM,cAAc,uPAAyB,CAAA;AACpD,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAA"}
|
package/dist/core.node.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.node.d.ts","sourceRoot":"","sources":["../src/core.node.ts"],"names":[],"mappings":"AAAA,OAAc,
|
|
1
|
+
{"version":3,"file":"core.node.d.ts","sourceRoot":"","sources":["../src/core.node.ts"],"names":[],"mappings":"AAAA,OAAc,EAKZ,KAAK,YAAY,EAOlB,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EAEd,gBAAgB,EAChB,WAAW,EAEX,eAAe,EAEf,YAAY,EACZ,UAAU,EACV,SAAS,EACT,OAAO,EACR,MAAM,mBAAmB,CAAA;AAO1B;;;;;;;GAOG;AACH,qBAAa,QAAQ,CAAC,CAAC,SAAS,e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AS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACjE,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,eAAe,CAAC,EAAE,UAAU,CAAC,KACrD,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG;IAAE,OAAO,EAAE,CAAC,CAAA;CAAE,GACtC,CAAC,CAAC,eAAe,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACjE,QAAQ,CAAC,EAAE,QAAQ,EACnB,KAAK,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,eAAe,CAAC,EAAE,UAAU,CAAC,KACtD,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG;IAAE,OAAO,EAAE,CAAC,CAAA;CAAE,CAQzC"}
|
package/dist/core.node.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded=["ref","key","children","css","props"],_excluded2=["style"],_excluded3=["style"],_excluded4=["children","key","css","nativeProps"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}function _objectWithoutProperties(a,b){if(null==a)return{};var c,d,e=_objectWithoutPropertiesLoose(a,b);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);for(d=0;d<f.length;d++)c=f[d],-1===b.indexOf(c)&&{}.propertyIsEnumerable.call(a,c)&&(e[c]=a[c])}return e}function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c={};for(var d in a)if({}.hasOwnProperty.call(a,d)){if(-1!==b.indexOf(d))continue;c[d]=a[d]}return c}function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}function _defineProperty(a,b,c){return(b=_toPropertyKey(b))in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function _toPropertyKey(a){var b=_toPrimitive(a,"string");return"symbol"==_typeof(b)?b:b+""}function _toPrimitive(a,b){if("object"!=_typeof(a)||!a)return a;var c=a[Symbol.toPrimitive];if(void 0!==c){var d=c.call(a,b||"default");if("object"!=_typeof(d))return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===b?String:Number)(a)}import React,{Activity,
|
|
1
|
+
var _excluded=["ref","key","children","css","props","disableEmotion"],_excluded2=["style"],_excluded3=["style"],_excluded4=["children","key","css","nativeProps","disableEmotion"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}function _objectWithoutProperties(a,b){if(null==a)return{};var c,d,e=_objectWithoutPropertiesLoose(a,b);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);for(d=0;d<f.length;d++)c=f[d],-1===b.indexOf(c)&&{}.propertyIsEnumerable.call(a,c)&&(e[c]=a[c])}return e}function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c={};for(var d in a)if({}.hasOwnProperty.call(a,d)){if(-1!==b.indexOf(d))continue;c[d]=a[d]}return c}function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}function _defineProperty(a,b,c){return(b=_toPropertyKey(b))in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function _toPropertyKey(a){var b=_toPrimitive(a,"string");return"symbol"==_typeof(b)?b:b+""}function _toPrimitive(a,b){if("object"!=_typeof(a)||!a)return a;var c=a[Symbol.toPrimitive];if(void 0!==c){var d=c.call(a,b||"default");if("object"!=_typeof(d))return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===b?String:Number)(a)}import React,{createElement,isValidElement,Activity,Fragment,Suspense}from"react";import{isNodeInstance}from"./helper/node.helper.js";import{isActivity,isForwardRef,isFragment,isMemo,isPortal,isReactClassComponent,isSuspense,isValidElementType}from"./helper/react-is.helper.js";import{createRoot}from"react-dom/client";import{getComponentType,getCSSProps,getDOMProps,getElementTypeName,hasNoStyleTag,omitUndefined}from"./helper/common.helper.js";import StyledRenderer from"./components/styled-renderer.client.js";/**
|
|
2
2
|
* Represents a node in a React component tree.
|
|
3
3
|
* This class wraps React elements and handles:
|
|
4
4
|
* - Props processing and normalization
|
|
@@ -13,30 +13,35 @@ var _excluded=["ref","key","children","css","props"],_excluded2=["style"],_exclu
|
|
|
13
13
|
* Lazily processes and retrieves the final, normalized props for the node.
|
|
14
14
|
*/get props(){return this._props||(this._props=this._processProps()),this._props}/**
|
|
15
15
|
* Processes raw props into a final, normalized form.
|
|
16
|
-
*/_processProps(){var a=this.rawProps,b=a.ref,c=a.key,d=a.children,e=a.css,f=a.props,g=void 0===f?{}:f,h=_objectWithoutProperties(a,_excluded),
|
|
16
|
+
*/_processProps(){var a=this.rawProps,b=a.ref,c=a.key,d=a.children,e=a.css,f=a.props,g=void 0===f?{}:f,h=a.disableEmotion,i=_objectWithoutProperties(a,_excluded),j=g,k=j.style,l=_objectWithoutProperties(j,_excluded2),m=getCSSProps(i),n=getDOMProps(i),o=this._processChildren(d,h);return omitUndefined(_objectSpread(_objectSpread({ref:b,key:c,css:_objectSpread(_objectSpread({},m),e),style:k},n),{},{disableEmotion:h,nativeProps:l,children:o}))}/**
|
|
17
17
|
* Recursively processes raw children, converting them into `BaseNode` instances as needed.
|
|
18
|
-
*/_processChildren(a){if(a){var
|
|
18
|
+
*/_processChildren(a,b){if(a){var c;return c="function"==typeof a?a:Array.isArray(a)?a.map(function(a){return BaseNode._processRawNode(a,b)}):BaseNode._processRawNode(a,b),c}}/**
|
|
19
19
|
* Renders a processed `NodeElement` into a `ReactNode`.
|
|
20
|
-
*/static _renderProcessedNode(a
|
|
20
|
+
*/static _renderProcessedNode(a){var b=a.processedElement,c=a.passedKey,d=a.disableEmotion,e={};if(void 0!==c&&(e.key=c),b instanceof BaseNode||isNodeInstance(b)){var f,g=null===(f=b.rawProps)||void 0===f?void 0:f.key;return b.rawProps.disableEmotion=d,g===c?b.render():new BaseNode(b.element,_objectSpread(_objectSpread({},b.rawProps),e)).render()}return isReactClassComponent(b)?new BaseNode(b,_objectSpread(_objectSpread({},e),{},{disableEmotion:d})).render():isNodeInstance(b)?(b.rawProps.disableEmotion=d,b.render()):b instanceof React.Component?b.render():"function"==typeof b?createElement(b,{key:c}):b}/**
|
|
21
21
|
* Checks if a node is a function child (render prop style).
|
|
22
22
|
*/static _isFunctionChild(a){if("function"!=typeof a)return!1;if(isReactClassComponent(a))return!1;if(isMemo(a))return!1;if(isForwardRef(a))return!1;try{return!(a.prototype&&"function"==typeof a.prototype.render)}catch(a){return!0}}/**
|
|
23
23
|
* Renders the output of a function-as-a-child.
|
|
24
|
-
*/static _functionRenderer(a){var b,c=a.render;try{b=c()}catch(a){b=null}if(null===b||b===void 0)return b;if(
|
|
24
|
+
*/static _functionRenderer(a){var b,c=a.render,d=a.disableEmotion;try{b=c()}catch(a){b=null}if(null===b||b===void 0)return b;if(b instanceof BaseNode||isNodeInstance(b))// If disableEmotion is true and the result doesn't have it, create a new node.
|
|
25
|
+
return d&&!b.rawProps.disableEmotion?new BaseNode(b.element,_objectSpread(_objectSpread({},b.rawProps),{},{disableEmotion:!0})).render():b.render();// Otherwise, just render the result.
|
|
26
|
+
if(Array.isArray(b))return b.map(function(a,b){var c=BaseNode._processRawNode(a,d);return BaseNode._renderProcessedNode({processedElement:c,passedKey:"".concat(getElementTypeName(a),"-").concat(b)})});if(b instanceof React.Component){var e=b.render(),f=BaseNode._processRawNode(e,d);return BaseNode._renderProcessedNode({processedElement:f,disableEmotion:d})}if("string"==typeof b||"number"==typeof b||"boolean"==typeof b)return b;var g=BaseNode._processRawNode(b,d);return g?BaseNode._renderProcessedNode({processedElement:g,disableEmotion:d}):b}/**
|
|
25
27
|
* Processes a single raw node, recursively converting it into a `BaseNode` or other renderable type.
|
|
26
|
-
*/static _processRawNode(a){// Primitives and null/undefined - return as-is
|
|
28
|
+
*/static _processRawNode(a,b){// Primitives and null/undefined - return as-is
|
|
27
29
|
if(null===a||a===void 0||"string"==typeof a||"number"==typeof a||"boolean"==typeof a)return a;// Already processed nodes - return as-is
|
|
28
|
-
if(a instanceof BaseNode||isNodeInstance(a))return a;// Function children (render props) - wrap in function renderer
|
|
29
|
-
if(BaseNode._isFunctionChild(a))return new BaseNode(BaseNode._functionRenderer,{render:a});// React elements - extract props and wrap in BaseNode
|
|
30
|
-
if(isValidElement(a)){var
|
|
31
|
-
if(isReactClassComponent(a)||isMemo(a)||isForwardRef(a))return new BaseNode(a,{});// React.Component instances - render and process recursively
|
|
32
|
-
if(a instanceof React.Component){var
|
|
30
|
+
if(a instanceof BaseNode||isNodeInstance(a))return b&&!a.rawProps.disableEmotion?new BaseNode(a.element,_objectSpread(_objectSpread({},a.rawProps),{},{disableEmotion:!0})):a;// Function children (render props) - wrap in function renderer
|
|
31
|
+
if(BaseNode._isFunctionChild(a))return new BaseNode(BaseNode._functionRenderer,{props:{render:a,disableEmotion:b}});// React elements - extract props and wrap in BaseNode
|
|
32
|
+
if(isValidElement(a)){var c=a.props,d=c.style,e=_objectWithoutProperties(c,_excluded3),f=_objectSpread(_objectSpread({},e),d||{});return new BaseNode(a.type,_objectSpread(_objectSpread(_objectSpread({},f),null!==a.key&&void 0!==a.key?{key:a.key}:{}),{},{disableEmotion:b}))}// Component types - wrap in BaseNode
|
|
33
|
+
if(isReactClassComponent(a)||isMemo(a)||isForwardRef(a))return new BaseNode(a,{disableEmotion:b});// React.Component instances - render and process recursively
|
|
34
|
+
if(a instanceof React.Component){var g=a.render();return BaseNode._processRawNode(g,b)}// Everything else - return as-is
|
|
33
35
|
return a}/**
|
|
34
36
|
* Renders the `BaseNode` into a `ReactElement`.
|
|
35
|
-
*/render(){var a=this;if(!isValidElementType(this.element)){var b=getComponentType(this.element);throw new Error("Invalid element type: ".concat(b," provided!"))}var c=this.props,d=c.children,e=c.key,f=c.css,g=c.nativeProps,h=_objectWithoutProperties(c,_excluded4),
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
*/render(){var a=this;if(!isValidElementType(this.element)){var b=getComponentType(this.element);throw new Error("Invalid element type: ".concat(b," provided!"))}var c=this.props,d=c.children,e=c.key,f=c.css,g=c.nativeProps,h=c.disableEmotion,i=_objectWithoutProperties(c,_excluded4),j=void 0;if(d!==void 0&&null!==d){if(!this._normalizedChildren)if(!Array.isArray(d))this._normalizedChildren=this._normalizeChild(d);else if(0<d.length){var k=d.map(function(b){return a._normalizeChild(b)});this._normalizedChildren=k.every(function(a){return null===a||void 0===a})?void 0:k}else this._normalizedChildren=void 0;j=this._normalizedChildren}// Fragment handling
|
|
38
|
+
if(this.element===Fragment||isFragment(this.element))return createElement(this.element,{key:e},...(Array.isArray(j)?j:[j]));// Common props for all createElement calls
|
|
39
|
+
var l=_objectSpread(_objectSpread({},i),{},{key:e},g),m=[function(a){return a===Suspense},function(a){return a===Activity},function(a){return isSuspense(a)},function(a){return isActivity(a)}].some(function(b){try{return b(a.element)}catch(a){return!1}}),n=this.element&&!hasNoStyleTag(this.element)&&f&&!h&&!m&&!isFragment(this.element)&&this.element!==Fragment&&!isSuspense(this.element)&&this.element!==Suspense&&!isActivity(this.element)&&this.element!==Activity;// Determine if the element is a non-styled React component
|
|
40
|
+
// Determine if the element is a styled component
|
|
41
|
+
/* Styled component handling */if(n){try{var o=getElementTypeName(this.element);StyledRenderer.displayName="Styled(".concat(o,")")}catch(a){// swallow: displayName is not critical
|
|
42
|
+
}return createElement(StyledRenderer,_objectSpread(_objectSpread({element:this.element},l),{},{css:f,suppressHydrationWarning:!0}),...(Array.isArray(j)?j:[j]))}/* End styled component handling */// Regular element handling
|
|
38
43
|
try{this.element.displayName=getElementTypeName(this.element)}catch(a){// swallow: displayName is not critical
|
|
39
|
-
}return createElement(this.element,
|
|
44
|
+
}return createElement(this.element,l,...(Array.isArray(j)?j:[j]))}/**
|
|
40
45
|
* Portal infrastructure setup
|
|
41
46
|
*/_ensurePortalInfrastructure(){if(BaseNode._isServer)return!1;if(this._portalDOMElement&&this._portalReactRoot&&this._portalDOMElement.isConnected)return!0;if(this._portalDOMElement&&!this._portalDOMElement.isConnected){if(this._portalReactRoot){try{this._portalReactRoot.unmount()}catch(a){// swallow
|
|
42
47
|
}this._portalReactRoot=null}this._portalDOMElement=null}if(this._portalDOMElement||(this._portalDOMElement=document.createElement("div"),document.body.appendChild(this._portalDOMElement)),!this._portalReactRoot){if(!this._portalDOMElement)return!1;var a=createRoot(this._portalDOMElement);this._portalReactRoot={render:a.render.bind(a),unmount:a.unmount.bind(a),update:function update(){}}}return!0}/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-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AAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,8DAQjC,CAAA"}
|
|
@@ -2,7 +2,7 @@ function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof
|
|
|
2
2
|
* Custom React Type Checker (TypeScript Version)
|
|
3
3
|
* Provides utilities for identifying and checking React component/element types.
|
|
4
4
|
* Inspired by react-is package but implemented in TypeScript with type safety.
|
|
5
|
-
|
|
5
|
+
*//**
|
|
6
6
|
* Symbol identifiers for React internal component types
|
|
7
7
|
* These are used to identify different kinds of React elements and components
|
|
8
8
|
*/export var REACT_ELEMENT_TYPE=Symbol["for"]("react.transitional.element");export var REACT_PORTAL_TYPE=Symbol["for"]("react.portal");export var REACT_FRAGMENT_TYPE=Symbol["for"]("react.fragment");export var REACT_STRICT_MODE_TYPE=Symbol["for"]("react.strict_mode");export var REACT_PROFILER_TYPE=Symbol["for"]("react.profiler");export var REACT_PROVIDER_TYPE=Symbol["for"]("react.provider");export var REACT_CONSUMER_TYPE=Symbol["for"]("react.consumer");export var REACT_CONTEXT_TYPE=Symbol["for"]("react.context");export var REACT_FORWARD_REF_TYPE=Symbol["for"]("react.forward_ref");export var REACT_SUSPENSE_TYPE=Symbol["for"]("react.suspense");export var REACT_SUSPENSE_LIST_TYPE=Symbol["for"]("react.suspense_list");export var REACT_MEMO_TYPE=Symbol["for"]("react.memo");export var REACT_LAZY_TYPE=Symbol["for"]("react.lazy");export var REACT_VIEW_TRANSITION_TYPE=Symbol["for"]("react.view_transition");export var REACT_CLIENT_REFERENCE=Symbol["for"]("react.client.reference");export var REACT_ACTIVITY_TYPE=Symbol["for"]("react.activity");/**
|
|
@@ -17,7 +17,7 @@ function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof
|
|
|
17
17
|
* to identify what kind of React element or component it represents.
|
|
18
18
|
* @param {unknown} object The object to check
|
|
19
19
|
* @returns {boolean} - The matching React type symbol or undefined if not a React object
|
|
20
|
-
*/export function typeOf(a){if("object"===_typeof(a)&&null!==a){var b=a.$$typeof;switch(b){case REACT_ELEMENT_TYPE:{var c=a.type;switch(c){case REACT_FRAGMENT_TYPE:case REACT_PROFILER_TYPE:case REACT_STRICT_MODE_TYPE:case REACT_SUSPENSE_TYPE:case REACT_SUSPENSE_LIST_TYPE:case REACT_VIEW_TRANSITION_TYPE:return c;default:{var d=null===c||void 0===c?void 0:c.$$typeof;return d===REACT_CONTEXT_TYPE||d===REACT_FORWARD_REF_TYPE||d===REACT_LAZY_TYPE||d===REACT_MEMO_TYPE||d===REACT_CONSUMER_TYPE?d:b}}}case REACT_PORTAL_TYPE:return b}}}/**
|
|
20
|
+
*/export function typeOf(a){if("object"===_typeof(a)&&null!==a){var b=a.$$typeof;switch(b){case REACT_ELEMENT_TYPE:{var c=a.type;switch(c){case REACT_FRAGMENT_TYPE:case REACT_PROFILER_TYPE:case REACT_STRICT_MODE_TYPE:case REACT_SUSPENSE_TYPE:case REACT_SUSPENSE_LIST_TYPE:case REACT_VIEW_TRANSITION_TYPE:return c;default:{var d=null===c||void 0===c?void 0:c.$$typeof;return d===REACT_CONTEXT_TYPE||d===REACT_FORWARD_REF_TYPE||d===REACT_LAZY_TYPE||d===REACT_MEMO_TYPE||d===REACT_PROVIDER_TYPE||d===REACT_CONSUMER_TYPE?d:b}}}case REACT_PORTAL_TYPE:return b}}}/**
|
|
21
21
|
* Checks if an object is a React Context Consumer
|
|
22
22
|
* @param {unknown} object Object to check
|
|
23
23
|
* @returns {boolean} - True if object is a Context.Consumer
|
|
@@ -25,7 +25,7 @@ function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof
|
|
|
25
25
|
* Checks if an object is a React Context Provider
|
|
26
26
|
* @param {unknown} object Object to check
|
|
27
27
|
* @returns {boolean} - True if object is a Context.Provider
|
|
28
|
-
*/export var isContextProvider=function isContextProvider(a){return typeOf(a)===
|
|
28
|
+
*/export var isContextProvider=function isContextProvider(a){return typeOf(a)===REACT_PROVIDER_TYPE};/**
|
|
29
29
|
* Checks if an object is a valid React element
|
|
30
30
|
* @param {unknown} object Object to check
|
|
31
31
|
* @returns {boolean} - True if object is a React element
|
|
@@ -77,7 +77,7 @@ function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof
|
|
|
77
77
|
* Set of known valid React special element types.
|
|
78
78
|
* Used for quick validation of element types in isValidElementType().
|
|
79
79
|
* Includes Fragment, Profiler, StrictMode, Suspense and SuspenseList.
|
|
80
|
-
*/var knownValidSymbols=new Set([REACT_FRAGMENT_TYPE,REACT_PROFILER_TYPE,REACT_STRICT_MODE_TYPE,REACT_SUSPENSE_TYPE,REACT_SUSPENSE_LIST_TYPE,REACT_VIEW_TRANSITION_TYPE]);/**
|
|
80
|
+
*/var knownValidSymbols=new Set([REACT_FRAGMENT_TYPE,REACT_PROFILER_TYPE,REACT_STRICT_MODE_TYPE,REACT_SUSPENSE_TYPE,REACT_SUSPENSE_LIST_TYPE,REACT_VIEW_TRANSITION_TYPE,REACT_ACTIVITY_TYPE]);/**
|
|
81
81
|
* Checks if a type is a valid React element type that can be rendered.
|
|
82
82
|
* This includes strings (for DOM elements), functions (for components),
|
|
83
83
|
* and various React-specific types like Fragment, Context, etc.
|
|
@@ -89,4 +89,6 @@ function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof
|
|
|
89
89
|
* that React adds to all class components.
|
|
90
90
|
* @param {unknown} component Component to check
|
|
91
91
|
* @returns {boolean} - True if component is a React class component
|
|
92
|
-
*/export var isReactClassComponent=function isReactClassComponent(a){if("function"!=typeof a)return!1
|
|
92
|
+
*/export var isReactClassComponent=function isReactClassComponent(a){if("function"!=typeof a)return!1;// Check for `isReactComponent` flag which is set on class components.
|
|
93
|
+
// Also handles components created with React.createClass.
|
|
94
|
+
var b=a.prototype;return!!(b&&b.isReactComponent)};
|
package/dist/node.type.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { type CSSProperties, type ReactNode, type JSX, type ElementType, type ComponentType, type JSXElementConstructor, type Component, type ExoticComponent, type ReactElement } from 'react';
|
|
1
|
+
import React, { type CSSProperties, type ReactNode, type JSX, type ElementType, type ComponentType, type JSXElementConstructor, type Component, type ExoticComponent, type ReactElement, type FragmentProps, type SuspenseProps, type ActivityProps } from 'react';
|
|
2
2
|
import type { NO_STYLE_TAGS } from './constants/common.const.js';
|
|
3
3
|
import type { ComponentNodeProps } from './hoc/component.hoc.js';
|
|
4
4
|
import type { CSSObject, CSSInterpolation } from '@emotion/serialize';
|
|
@@ -10,6 +10,11 @@ export type HasRequiredProps<T> = RequiredKeys<T> extends never ? false : true;
|
|
|
10
10
|
export interface ReactAttributes {
|
|
11
11
|
key?: string;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Type guard to check if a given element is a built-in React component (Fragment, Suspense, Activity).
|
|
15
|
+
* @template E - The element type to check
|
|
16
|
+
*/
|
|
17
|
+
export type IsReactBuiltInComponent<E> = E extends ExoticComponent<FragmentProps> ? true : E extends ExoticComponent<SuspenseProps> ? true : E extends ExoticComponent<ActivityProps> ? true : false;
|
|
13
18
|
/**
|
|
14
19
|
* Excludes array types from ReactNode, ensuring a single, non-array React element or primitive.
|
|
15
20
|
*/
|
|
@@ -91,6 +96,7 @@ export type FinalNodeProps = ReactAttributes & Partial<{
|
|
|
91
96
|
ref: any | React.Ref<unknown> | undefined;
|
|
92
97
|
style: any;
|
|
93
98
|
css: any;
|
|
99
|
+
disableEmotion: boolean;
|
|
94
100
|
children: Children;
|
|
95
101
|
}>;
|
|
96
102
|
/**
|
|
@@ -139,11 +145,15 @@ export type HasNoStyleProp<E extends NodeElement> = E extends NoStyleTags ? true
|
|
|
139
145
|
* - Maintains React's key prop for reconciliation
|
|
140
146
|
* @template E - The element type these props apply to
|
|
141
147
|
*/
|
|
142
|
-
export type NodeProps<E extends NodeElement> = Omit<PropsOf<E>, keyof CSSProperties | 'children' | 'style' | 'props' | 'key'> & ReactAttributes & (HasCSSCompatibleStyleProp<PropsOf<E>> extends true ? ThemedCSSProperties : object) & (HasNoStyleProp<E> extends false ? Partial<{
|
|
148
|
+
export type NodeProps<E extends NodeElement> = IsReactBuiltInComponent<E> extends false ? Omit<PropsOf<E>, keyof CSSProperties | 'children' | 'style' | 'props' | 'key'> & ReactAttributes & (HasCSSCompatibleStyleProp<PropsOf<E>> extends true ? ThemedCSSProperties : object) & (HasNoStyleProp<E> extends false ? Partial<{
|
|
143
149
|
css: CssProp;
|
|
144
150
|
}> : object) & Partial<{
|
|
151
|
+
disableEmotion: boolean;
|
|
145
152
|
props: Partial<Omit<PropsOf<E>, 'children'>>;
|
|
146
153
|
children: Children;
|
|
154
|
+
}> : PropsOf<E> & ReactAttributes & Partial<{
|
|
155
|
+
disableEmotion: boolean;
|
|
156
|
+
children: Children;
|
|
147
157
|
}>;
|
|
148
158
|
/**
|
|
149
159
|
* Function type for dynamic node content generation.
|
|
@@ -162,6 +172,7 @@ export type NodeFunction<E extends ReactNode | NodeInstance = ReactNode | NodeIn
|
|
|
162
172
|
export interface FunctionRendererProps<E extends ReactNode | NodeInstance> {
|
|
163
173
|
/** Function that returns the child content to render */
|
|
164
174
|
render: NodeFunction<E>;
|
|
175
|
+
disableEmotion?: boolean;
|
|
165
176
|
}
|
|
166
177
|
export type ComponentNode = (NodeInstance<any> | ReactNode) | (() => NodeInstance<any> | ReactNode);
|
|
167
178
|
/**
|
package/dist/node.type.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.type.d.ts","sourceRoot":"","sources":["../src/node.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,GAAG,EACR,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,YAAY,EAClB,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,KAA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AQ,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,CAAA;CAAE,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,KAC5E,UAAU,CAAA;AAEf;;;;;GAKG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,WAAW,EAAE,eAAe,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,eAAe,EAAE,MAAM,eAAe,CAAC,GACvJ,eAAe,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meonode/ui",
|
|
3
3
|
"description": "A structured approach to component composition, direct CSS-first prop styling, built-in theming, smart prop handling (including raw property pass-through), and dynamic children.",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.16",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/main.js",
|
|
7
7
|
"types": "./dist/main.d.ts",
|