@gtkx/react 0.14.0 → 0.15.0

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 (52) hide show
  1. package/README.md +27 -27
  2. package/dist/generated/jsx.d.ts +235 -228
  3. package/dist/host-config.js +2 -2
  4. package/dist/jsx.d.ts +111 -2
  5. package/dist/jsx.js +79 -0
  6. package/dist/nodes/adjustment.d.ts +48 -0
  7. package/dist/nodes/adjustment.js +70 -0
  8. package/dist/nodes/calendar.js +3 -16
  9. package/dist/nodes/column-view-column.d.ts +1 -0
  10. package/dist/nodes/column-view-column.js +4 -0
  11. package/dist/nodes/column-view.js +6 -6
  12. package/dist/nodes/drawing-area.d.ts +1 -0
  13. package/dist/nodes/drawing-area.js +19 -0
  14. package/dist/nodes/expander-row.js +1 -0
  15. package/dist/nodes/index.d.ts +8 -0
  16. package/dist/nodes/index.js +8 -0
  17. package/dist/nodes/internal/constants.js +3 -0
  18. package/dist/nodes/internal/list-item-renderer.d.ts +1 -0
  19. package/dist/nodes/internal/list-item-renderer.js +5 -0
  20. package/dist/nodes/internal/predicates.d.ts +4 -0
  21. package/dist/nodes/internal/predicates.js +3 -0
  22. package/dist/nodes/internal/signal-store.d.ts +1 -0
  23. package/dist/nodes/internal/signal-store.js +7 -0
  24. package/dist/nodes/internal/tree-list-item-renderer.d.ts +1 -0
  25. package/dist/nodes/internal/tree-list-item-renderer.js +8 -0
  26. package/dist/nodes/level-bar.js +3 -16
  27. package/dist/nodes/list-view.js +6 -2
  28. package/dist/nodes/navigation-page.js +32 -23
  29. package/dist/nodes/notebook-page-tab.d.ts +1 -0
  30. package/dist/nodes/notebook-page-tab.js +15 -9
  31. package/dist/nodes/notebook-page.js +9 -6
  32. package/dist/nodes/scale.js +3 -16
  33. package/dist/nodes/scrolled-window.js +3 -2
  34. package/dist/nodes/shortcut-controller.d.ts +37 -0
  35. package/dist/nodes/shortcut-controller.js +74 -0
  36. package/dist/nodes/shortcut.d.ts +38 -0
  37. package/dist/nodes/shortcut.js +46 -0
  38. package/dist/nodes/source-buffer.d.ts +73 -0
  39. package/dist/nodes/source-buffer.js +149 -0
  40. package/dist/nodes/source-view.d.ts +1 -0
  41. package/dist/nodes/source-view.js +42 -0
  42. package/dist/nodes/stack-page.js +15 -9
  43. package/dist/nodes/text-buffer.d.ts +43 -0
  44. package/dist/nodes/text-buffer.js +81 -0
  45. package/dist/nodes/text-view.d.ts +1 -0
  46. package/dist/nodes/text-view.js +45 -0
  47. package/dist/nodes/tree-list-view.js +6 -2
  48. package/dist/nodes/widget.d.ts +4 -0
  49. package/dist/nodes/widget.js +85 -10
  50. package/dist/nodes/window.js +7 -5
  51. package/dist/types.d.ts +26 -0
  52. package/package.json +3 -3
package/README.md CHANGED
@@ -31,36 +31,36 @@ npm run dev
31
31
 
32
32
  ```tsx
33
33
  import {
34
- GtkApplicationWindow,
35
- GtkBox,
36
- GtkButton,
37
- GtkLabel,
38
- quit,
39
- render,
34
+ GtkApplicationWindow,
35
+ GtkBox,
36
+ GtkButton,
37
+ GtkLabel,
38
+ quit,
39
+ render,
40
40
  } from "@gtkx/react";
41
41
  import * as Gtk from "@gtkx/ffi/gtk";
42
42
  import { useState } from "react";
43
43
 
44
44
  const App = () => {
45
- const [count, setCount] = useState(0);
46
-
47
- return (
48
- <GtkApplicationWindow
49
- title="Counter"
50
- defaultWidth={300}
51
- defaultHeight={200}
52
- onClose={quit}
53
- >
54
- <GtkBox
55
- orientation={Gtk.Orientation.VERTICAL}
56
- spacing={20}
57
- valign={Gtk.Align.CENTER}
58
- >
59
- <GtkLabel label={`Count: ${count}`} cssClasses={["title-1"]} />
60
- <GtkButton label="Increment" onClicked={() => setCount((c) => c + 1)} />
61
- </GtkBox>
62
- </GtkApplicationWindow>
63
- );
45
+ const [count, setCount] = useState(0);
46
+
47
+ return (
48
+ <GtkApplicationWindow
49
+ title="Counter"
50
+ defaultWidth={300}
51
+ defaultHeight={200}
52
+ onClose={quit}
53
+ >
54
+ <GtkBox
55
+ orientation={Gtk.Orientation.VERTICAL}
56
+ spacing={20}
57
+ valign={Gtk.Align.CENTER}
58
+ >
59
+ <GtkLabel label={`Count: ${count}`} cssClasses={["title-1"]} />
60
+ <GtkButton label="Increment" onClicked={() => setCount((c) => c + 1)} />
61
+ </GtkBox>
62
+ </GtkApplicationWindow>
63
+ );
64
64
  };
65
65
 
66
66
  render(<App />, "com.example.counter");
@@ -80,11 +80,11 @@ render(<App />, "com.example.counter");
80
80
 
81
81
  Explore complete applications in the [`examples/`](./examples) directory:
82
82
 
83
- - **[browser](./examples/browser)** — Simple browser using WebKitWebView
84
83
  - **[gtk-demo](./examples/gtk-demo)** — Full replica of the official GTK demo app
85
84
  - **[hello-world](./examples/hello-world)** — Minimal application showing a counter
86
85
  - **[todo](./examples/todo)** — Full-featured todo application with Adwaita styling and testing
87
- - **[x-showcase](./examples/x-showcase)** — Showcase of all x.* virtual components
86
+ - **[x-showcase](./examples/x-showcase)** — Showcase of all x.\* virtual components
87
+ - **[browser](./examples/browser)** — Simple browser using WebKitWebView
88
88
  - **[deploying](./examples/deploying)** — Example of packaging and distributing a GTKX app
89
89
 
90
90
  ## Documentation