@gtkx/react 0.1.22 → 0.1.23
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/README.md +1 -1
- package/dist/codegen/jsx-generator.js +13 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -478,6 +478,7 @@ ${widgetPropsContent}
|
|
|
478
478
|
isListWidget(widget.name) ||
|
|
479
479
|
isDropDownWidget(widget.name) ||
|
|
480
480
|
isGridWidget(widget.name);
|
|
481
|
+
const docComment = widget.doc ? formatDoc(widget.doc).trimEnd() : "";
|
|
481
482
|
if (hasMeaningfulSlots) {
|
|
482
483
|
const valueMembers = [
|
|
483
484
|
`Root: "${widgetName}.Root" as const`,
|
|
@@ -486,10 +487,20 @@ ${widgetPropsContent}
|
|
|
486
487
|
...(isDropDownWidget(widget.name) ? [`Item: "${widgetName}.Item" as const`] : []),
|
|
487
488
|
...(isGridWidget(widget.name) ? [`Child: "${widgetName}.Child" as const`] : []),
|
|
488
489
|
];
|
|
489
|
-
|
|
490
|
+
if (docComment) {
|
|
491
|
+
lines.push(`${docComment}\nexport const ${widgetName} = {\n\t${valueMembers.join(",\n\t")},\n};`);
|
|
492
|
+
}
|
|
493
|
+
else {
|
|
494
|
+
lines.push(`export const ${widgetName} = {\n\t${valueMembers.join(",\n\t")},\n};`);
|
|
495
|
+
}
|
|
490
496
|
}
|
|
491
497
|
else {
|
|
492
|
-
|
|
498
|
+
if (docComment) {
|
|
499
|
+
lines.push(`${docComment}\nexport const ${widgetName} = "${widgetName}" as const;`);
|
|
500
|
+
}
|
|
501
|
+
else {
|
|
502
|
+
lines.push(`export const ${widgetName} = "${widgetName}" as const;`);
|
|
503
|
+
}
|
|
493
504
|
}
|
|
494
505
|
}
|
|
495
506
|
return `${lines.join("\n")}\n`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gtkx/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.23",
|
|
4
4
|
"description": "Build GTK4 desktop applications with React and TypeScript",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gtk",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"react-reconciler": "0.33.0",
|
|
43
|
-
"@gtkx/ffi": "0.1.
|
|
43
|
+
"@gtkx/ffi": "0.1.23"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@gtkx/gir": "0.1.
|
|
46
|
+
"@gtkx/gir": "0.1.23"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"react": "^19"
|