@gtkx/vitest 0.13.2 → 0.14.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 (2) hide show
  1. package/README.md +32 -31
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,18 +1,18 @@
1
1
  <p align="center">
2
- <img src="https://raw.githubusercontent.com/eugeniodepalo/gtkx/main/logo.svg" alt="GTKX" width="60" height="60">
2
+ <img src="https://raw.githubusercontent.com/eugeniodepalo/gtkx/main/logo.svg" alt="GTKX" width="60" height="60">
3
3
  </p>
4
4
 
5
5
  <h1 align="center">GTKX</h1>
6
6
 
7
7
  <p align="center">
8
- <strong>Build native GTK4 desktop applications with React and TypeScript.</strong>
8
+ <strong>Build native GTK4 desktop applications with React and TypeScript.</strong>
9
9
  </p>
10
10
 
11
11
  <p align="center">
12
- <a href="https://www.npmjs.com/package/@gtkx/react"><img src="https://img.shields.io/npm/v/@gtkx/react.svg" alt="npm version"></a>
13
- <a href="https://github.com/eugeniodepalo/gtkx/actions"><img src="https://img.shields.io/github/actions/workflow/status/eugeniodepalo/gtkx/ci.yml" alt="CI"></a>
14
- <a href="https://github.com/eugeniodepalo/gtkx/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MPL--2.0-blue.svg" alt="License"></a>
15
- <a href="https://github.com/eugeniodepalo/gtkx/discussions"><img src="https://img.shields.io/badge/discussions-GitHub-blue" alt="GitHub Discussions"></a>
12
+ <a href="https://www.npmjs.com/package/@gtkx/react"><img src="https://img.shields.io/npm/v/@gtkx/react.svg" alt="npm version"></a>
13
+ <a href="https://github.com/eugeniodepalo/gtkx/actions"><img src="https://img.shields.io/github/actions/workflow/status/eugeniodepalo/gtkx/ci.yml" alt="CI"></a>
14
+ <a href="https://github.com/eugeniodepalo/gtkx/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MPL--2.0-blue.svg" alt="License"></a>
15
+ <a href="https://github.com/eugeniodepalo/gtkx/discussions"><img src="https://img.shields.io/badge/discussions-GitHub-blue" alt="GitHub Discussions"></a>
16
16
  </p>
17
17
 
18
18
  ---
@@ -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,6 +80,7 @@ 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
83
84
  - **[gtk-demo](./examples/gtk-demo)** — Full replica of the official GTK demo app
84
85
  - **[hello-world](./examples/hello-world)** — Minimal application showing a counter
85
86
  - **[todo](./examples/todo)** — Full-featured todo application with Adwaita styling and testing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gtkx/vitest",
3
- "version": "0.13.2",
3
+ "version": "0.14.0",
4
4
  "description": "Vitest plugin for GTKX applications with Xvfb display isolation",
5
5
  "keywords": [
6
6
  "gtkx",
@@ -36,7 +36,7 @@
36
36
  "dist"
37
37
  ],
38
38
  "devDependencies": {
39
- "vitest": "^4.0.16"
39
+ "vitest": "^4.0.17"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "vitest": ">=4"