gnim 1.6.4 → 1.6.5

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.
Binary file
@@ -3,6 +3,9 @@ import Gio from "gi://Gio?version=2.0"
3
3
  import { configue } from "../jsx/env.js"
4
4
  import { getType, onCleanup, Accessor, Fragment } from "../index.js"
5
5
 
6
+ import type Adw from "gi://Adw"
7
+ const adw = await import("gi://Adw").then((m) => m.default).catch(() => null)
8
+
6
9
  const dummyBuilder = new Gtk.Builder()
7
10
 
8
11
  const { intrinsicElements } = configue({
@@ -14,6 +17,14 @@ const { intrinsicElements } = configue({
14
17
  ]
15
18
  return keys
16
19
  }
20
+ if (adw && ctor === adw.ToggleGroup) {
21
+ const keys: Array<Extract<keyof Adw.ToggleGroup, string>> = [
22
+ "active",
23
+ "activeName",
24
+ "active_name",
25
+ ]
26
+ return keys
27
+ }
17
28
  },
18
29
  setCss(object, css) {
19
30
  if (!(object instanceof Gtk.Widget)) {
package/dist/jsx/jsx.ts CHANGED
@@ -167,11 +167,6 @@ export function append(parent: GObject.Object, child: GObject.Object) {
167
167
  return
168
168
  }
169
169
 
170
- if (appendChild in parent && typeof parent[appendChild] === "function") {
171
- parent[appendChild](child, getType(child))
172
- return
173
- }
174
-
175
170
  if (child instanceof Fragment) {
176
171
  for (const ch of child) {
177
172
  append(parent, ch)
@@ -199,12 +194,12 @@ export function append(parent: GObject.Object, child: GObject.Object) {
199
194
  return
200
195
  }
201
196
 
202
- if (child) {
203
- if (!(child instanceof GObject.Object)) {
204
- child = env.textNode(child)
205
- }
206
- env.appendChild(parent, child)
197
+ if (appendChild in parent && typeof parent[appendChild] === "function") {
198
+ parent[appendChild](child, getType(child))
199
+ return
207
200
  }
201
+
202
+ env.appendChild(parent, child)
208
203
  }
209
204
 
210
205
  /** @internal */
package/package.json CHANGED
@@ -1,75 +1,79 @@
1
1
  {
2
- "name": "gnim",
3
- "version": "1.6.4",
4
- "type": "module",
5
- "author": "Aylur",
6
- "license": "MIT",
7
- "repository": {
8
- "type": "git",
9
- "url": "https://github.com/Aylur/gnim.git"
10
- },
11
- "funding": {
12
- "type": "kofi",
13
- "url": "https://ko-fi.com/aylur"
14
- },
15
- "scripts": {
16
- "build": "./scripts/build.sh",
17
- "lint": "eslint . --fix",
18
- "docs:dev": "vitepress dev docs",
19
- "docs:build": "vitepress build docs",
20
- "docs:preview": "vitepress preview docs"
21
- },
22
- "devDependencies": {
23
- "@girs/adw-1": "latest",
24
- "@girs/clutter-16": "latest",
25
- "@girs/gtk-3.0": "latest",
26
- "@girs/soup-3.0": "latest",
27
- "@girs/st-16": "latest",
28
- "@girs/gnome-shell": "latest",
29
- "esbuild": "latest",
30
- "eslint": "latest",
31
- "typescript": "latest",
32
- "typescript-eslint": "latest",
33
- "vitepress": "latest"
34
- },
35
- "exports": {
36
- ".": "./dist/index.ts",
37
- "./dbus": "./dist/dbus.ts",
38
- "./fetch": "./dist/fetch.ts",
39
- "./gobject": "./dist/gobject.ts",
40
- "./resource": "./dist/resource/resource.ts",
41
- "./gnome/jsx-runtime": "./dist/gnome/jsx-runtime.ts",
42
- "./gtk3/jsx-runtime": "./dist/gtk3/jsx-runtime.ts",
43
- "./gtk4/jsx-runtime": "./dist/gtk4/jsx-runtime.ts"
44
- },
45
- "files": [
46
- "dist"
47
- ],
48
- "engines": {
49
- "gjs": ">=1.79.0"
50
- },
51
- "keywords": [
52
- "GJS",
53
- "Gnome",
54
- "GTK",
55
- "JSX"
56
- ],
57
- "prettier": {
58
- "semi": false,
59
- "tabWidth": 4,
60
- "quoteProps": "consistent",
61
- "trailingComma": "all",
62
- "printWidth": 100,
63
- "experimentalTernaries": false,
64
- "overrides": [
65
- {
66
- "files": "**/*.md",
67
- "options": {
68
- "tabWidth": 2,
69
- "printWidth": 80,
70
- "proseWrap": "always"
71
- }
72
- }
73
- ]
74
- }
75
- }
2
+ "name": "gnim",
3
+ "version": "1.6.5",
4
+ "type": "module",
5
+ "author": "Aylur",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/Aylur/gnim.git"
10
+ },
11
+ "funding": {
12
+ "type": "kofi",
13
+ "url": "https://ko-fi.com/aylur"
14
+ },
15
+ "devDependencies": {
16
+ "@eslint/js": "latest",
17
+ "@girs/adw-1": "latest",
18
+ "@girs/clutter-16": "latest",
19
+ "@girs/gtk-3.0": "latest",
20
+ "@girs/gtk-4.0": "latest",
21
+ "@girs/soup-3.0": "latest",
22
+ "@girs/shell-16": "latest",
23
+ "@girs/st-16": "latest",
24
+ "@girs/gnome-shell": "latest",
25
+ "@girs/gjs": "latest",
26
+ "esbuild": "latest",
27
+ "eslint": "latest",
28
+ "typescript": "latest",
29
+ "typescript-eslint": "latest",
30
+ "vitepress": "latest"
31
+ },
32
+ "exports": {
33
+ ".": "./dist/index.ts",
34
+ "./dbus": "./dist/dbus.ts",
35
+ "./fetch": "./dist/fetch.ts",
36
+ "./gobject": "./dist/gobject.ts",
37
+ "./resource": "./dist/resource/resource.ts",
38
+ "./gnome/jsx-runtime": "./dist/gnome/jsx-runtime.ts",
39
+ "./gtk3/jsx-runtime": "./dist/gtk3/jsx-runtime.ts",
40
+ "./gtk4/jsx-runtime": "./dist/gtk4/jsx-runtime.ts"
41
+ },
42
+ "files": [
43
+ "dist"
44
+ ],
45
+ "engines": {
46
+ "gjs": ">=1.79.0"
47
+ },
48
+ "keywords": [
49
+ "GJS",
50
+ "Gnome",
51
+ "GTK",
52
+ "JSX"
53
+ ],
54
+ "prettier": {
55
+ "semi": false,
56
+ "tabWidth": 4,
57
+ "quoteProps": "consistent",
58
+ "trailingComma": "all",
59
+ "printWidth": 100,
60
+ "experimentalTernaries": false,
61
+ "overrides": [
62
+ {
63
+ "files": "**/*.md",
64
+ "options": {
65
+ "tabWidth": 2,
66
+ "printWidth": 80,
67
+ "proseWrap": "always"
68
+ }
69
+ }
70
+ ]
71
+ },
72
+ "scripts": {
73
+ "build": "./scripts/build.sh",
74
+ "lint": "eslint . --fix",
75
+ "docs:dev": "vitepress dev docs",
76
+ "docs:build": "vitepress build docs",
77
+ "docs:preview": "vitepress preview docs"
78
+ }
79
+ }