@meonode/ui 0.0.1-alpha.12 → 0.0.1-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.node.d.ts.map +1 -1
- package/dist/core.node.js +2 -3
- package/package.json +4 -2
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":"AACA,OAAO,EAAkF,SAAS,EAAE,MAAM,OAAO,CAAA;AACjH,OAAO,EACL,gBAAgB,EAIhB,WAAW,EACX,SAAS,EAIV,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"core.node.d.ts","sourceRoot":"","sources":["../src/core.node.ts"],"names":[],"mappings":"AACA,OAAO,EAAkF,SAAS,EAAE,MAAM,OAAO,CAAA;AACjH,OAAO,EACL,gBAAgB,EAIhB,WAAW,EACX,SAAS,EAIV,MAAM,mBAAmB,CAAA;AA+R1B;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,WAAW,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,GAAE,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAM,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAS9G;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,gBAAgB,CAAC,GAAG,CAAC,GAAG,SAAS,IACzG,OAAO,CAAC,wZAOjB"}
|
package/dist/core.node.js
CHANGED
|
@@ -50,7 +50,7 @@ return e}/**
|
|
|
50
50
|
* @param childIndex Optional index of the child if it's part of an array.
|
|
51
51
|
* @returns The processed child.
|
|
52
52
|
*/},{key:"_processRawChild",value:function _processRawChild(a,b,c// Index for generating stable keys for array children
|
|
53
|
-
){var d=getComponentType(a),e=function generateIndexedKeyIfNeeded(a,b){if(b!==void 0&&null!==b)return b;if(void 0!==c){var d=getElementTypeName(a);return"".concat(d,"
|
|
53
|
+
){var d=getComponentType(a),e=function generateIndexedKeyIfNeeded(a,b){if(b!==void 0&&null!==b)return b;if(void 0!==c){var d=getElementTypeName(a);return"".concat(d,"-").concat(c)}// No explicit key, and not an array child, so BaseNode constructor will handle.
|
|
54
54
|
};// Helper to generate an indexed key if no explicit key is present and an index is available.
|
|
55
55
|
// Case 1: Child is already a BaseNode instance
|
|
56
56
|
if(a instanceof BaseNode||"object"===_typeof(a)&&null!==a&&!0===a._isBaseNode){var f=a,g=f.initialRawProps||{},h=g.nodeTheme,i=e(f.element,g.key);// Prefer child's own theme
|
|
@@ -62,9 +62,8 @@ var j=e(this._functionRenderer,void 0);return new BaseNode(this._functionRendere
|
|
|
62
62
|
if(isValidElement(a)){// Extract props from the JSX element
|
|
63
63
|
var k=a.props,l=(null===k||void 0===k?void 0:k.nodeTheme)||b,m=e(a.type,a.key);// Prefer nodeTheme from child's props, fallback to parent theme
|
|
64
64
|
// Generate a stable key based on element type and index if needed
|
|
65
|
-
// Remove original key since we'll be using the generated/existing key
|
|
66
65
|
// Create new BaseNode with props from JSX element
|
|
67
|
-
return
|
|
66
|
+
return new BaseNode(a.type,_objectSpread(_objectSpread({},k),{},{nodeTheme:l,key:m}))}// Case 5: Child is an ElementType (string tag, class component, Memo/ForwardRef)
|
|
68
67
|
if(isReactClassComponent(a)||"object"===d&&(isMemo(a)||isForwardRef(a))){// ElementTypes don't have an intrinsic key from the rawChild itself.
|
|
69
68
|
var n=e(a,void 0);return new BaseNode(a,{nodeTheme:b,key:n})}// Case 6: Fallback for other ReactNode types (e.g., Fragments, Portals if not caught by isValidElement)
|
|
70
69
|
// These are returned as-is. If they are elements within an array, React expects them to have keys.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meonode/ui",
|
|
3
3
|
"description": "`@meonode/ui` is a lightweight yet powerful utility for the programmatic creation and manipulation of React elements. It offers an enhanced, structured way to define components, manage props (separating CSS from DOM attributes), handle theming, and compose children *before* they are rendered by React. This provides greater control and flexibility, especially for dynamic UIs and design systems.",
|
|
4
|
-
"version": "0.0.1-alpha.
|
|
4
|
+
"version": "0.0.1-alpha.13",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/main.js",
|
|
7
7
|
"types": "./dist/main.d.ts",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"README.md"
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
|
+
"watch:build": "nodemon --watch src --ext ts,js,json --exec \"yarn build\"",
|
|
22
23
|
"lint": "eslint --fix",
|
|
23
24
|
"build": "rm -rf ./dist && babel src --out-dir dist --extensions \".ts,.js\" && tsc && tsc-alias && copyfiles -u 1 \"src/**/*.json\" dist",
|
|
24
25
|
"publish:pre": "./prepublish.sh && yarn version -i prerelease && yarn npm publish --tag next",
|
|
@@ -43,6 +44,7 @@
|
|
|
43
44
|
"eslint-plugin-jsdoc": "^50.6.17",
|
|
44
45
|
"eslint-plugin-prettier": "^5.4.0",
|
|
45
46
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
47
|
+
"nodemon": "^3.1.10",
|
|
46
48
|
"prettier": "^3.5.3",
|
|
47
49
|
"tsc-alias": "^1.8.16",
|
|
48
50
|
"typescript": "^5.8.3",
|
|
@@ -64,5 +66,5 @@
|
|
|
64
66
|
"access": "public"
|
|
65
67
|
},
|
|
66
68
|
"license": "MIT",
|
|
67
|
-
"stableVersion": "0.0.1-alpha.
|
|
69
|
+
"stableVersion": "0.0.1-alpha.12"
|
|
68
70
|
}
|