@gtkx/react 0.1.48 → 0.1.50

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.
Files changed (48) hide show
  1. package/README.md +7 -12
  2. package/dist/codegen/jsx-generator.d.ts +12 -2
  3. package/dist/codegen/jsx-generator.js +40 -42
  4. package/dist/container-interfaces.d.ts +51 -0
  5. package/dist/container-interfaces.js +5 -0
  6. package/dist/factory.d.ts +1 -1
  7. package/dist/factory.js +17 -3
  8. package/dist/generated/internal.d.ts +7 -0
  9. package/dist/generated/internal.js +7818 -0
  10. package/dist/generated/jsx.d.ts +31 -22
  11. package/dist/generated/jsx.js +0 -7817
  12. package/dist/node.d.ts +4 -4
  13. package/dist/node.js +8 -7
  14. package/dist/nodes/about-dialog.d.ts +9 -0
  15. package/dist/nodes/about-dialog.js +14 -0
  16. package/dist/nodes/action-bar.d.ts +9 -0
  17. package/dist/nodes/action-bar.js +15 -0
  18. package/dist/nodes/column-view.d.ts +5 -4
  19. package/dist/nodes/column-view.js +28 -29
  20. package/dist/nodes/dropdown.d.ts +7 -17
  21. package/dist/nodes/dropdown.js +17 -10
  22. package/dist/nodes/flow-box.d.ts +9 -0
  23. package/dist/nodes/flow-box.js +25 -0
  24. package/dist/nodes/grid.d.ts +6 -3
  25. package/dist/nodes/grid.js +28 -26
  26. package/dist/nodes/list-box.d.ts +9 -0
  27. package/dist/nodes/list-box.js +21 -0
  28. package/dist/nodes/list.d.ts +4 -3
  29. package/dist/nodes/list.js +8 -7
  30. package/dist/nodes/notebook.d.ts +7 -3
  31. package/dist/nodes/notebook.js +31 -14
  32. package/dist/nodes/overlay.d.ts +2 -1
  33. package/dist/nodes/root.d.ts +2 -3
  34. package/dist/nodes/root.js +3 -3
  35. package/dist/nodes/slot.d.ts +1 -2
  36. package/dist/nodes/slot.js +2 -2
  37. package/dist/nodes/text-view.d.ts +2 -7
  38. package/dist/nodes/text-view.js +10 -49
  39. package/dist/nodes/widget.d.ts +6 -5
  40. package/dist/nodes/widget.js +9 -149
  41. package/dist/nodes/window.d.ts +11 -0
  42. package/dist/nodes/window.js +37 -0
  43. package/dist/props.d.ts +5 -0
  44. package/dist/props.js +10 -0
  45. package/dist/reconciler.d.ts +4 -1
  46. package/dist/reconciler.js +8 -6
  47. package/dist/types.d.ts +4 -4
  48. package/package.json +3 -3
package/dist/types.d.ts CHANGED
@@ -32,7 +32,7 @@ export interface ListViewRenderProps<T = unknown> {
32
32
  * @param columnId - The ID of the column being sorted
33
33
  */
34
34
  export type ColumnSortFn<T, C extends string = string> = (a: T, b: T, columnId: C) => number;
35
- export interface ColumnViewColumnProps {
35
+ export interface ColumnViewColumnProps<T = unknown> {
36
36
  title?: string;
37
37
  expand?: boolean;
38
38
  resizable?: boolean;
@@ -43,13 +43,13 @@ export interface ColumnViewColumnProps {
43
43
  * Called with null during setup (for loading state) and with the actual item during bind.
44
44
  * Always annotate your callback parameter type to include null, e.g.: `(item: MyItem | null) => ...`
45
45
  */
46
- renderCell: (item: any) => ReactElement;
46
+ renderCell: (item: T | null) => ReactElement;
47
47
  }
48
- export interface ColumnViewRootProps<C extends string = string> {
48
+ export interface ColumnViewRootProps<T = unknown, C extends string = string> {
49
49
  sortColumn?: C | null;
50
50
  sortOrder?: SortType;
51
51
  onSortChange?: (column: C | null, order: SortType) => void;
52
- sortFn?: ColumnSortFn<any, C>;
52
+ sortFn?: ColumnSortFn<T, C>;
53
53
  }
54
54
  export interface NotebookPageProps extends SlotProps {
55
55
  label: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gtkx/react",
3
- "version": "0.1.48",
3
+ "version": "0.1.50",
4
4
  "description": "Build GTK4 desktop applications with React and TypeScript",
5
5
  "keywords": [
6
6
  "gtk",
@@ -36,10 +36,10 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "react-reconciler": "0.33.0",
39
- "@gtkx/ffi": "0.1.48"
39
+ "@gtkx/ffi": "0.1.50"
40
40
  },
41
41
  "devDependencies": {
42
- "@gtkx/gir": "0.1.48"
42
+ "@gtkx/gir": "0.1.50"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": "^19"