gnim 1.2.6 → 1.2.7

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/dist/dbus.d.ts CHANGED
@@ -7,6 +7,7 @@
7
7
  import Gio from "gi://Gio";
8
8
  import GLib from "gi://GLib";
9
9
  import GObject from "gi://GObject";
10
+ import { type DeepInfer } from "./variant.js";
10
11
  import { register } from "./gobject.js";
11
12
  export declare const Variant: typeof GLib.Variant;
12
13
  export type Variant<T extends string> = GLib.Variant<T>;
@@ -63,7 +64,6 @@ type DBusType = string | {
63
64
  type: string;
64
65
  name: string;
65
66
  };
66
- type DeepInfer<T extends string> = ReturnType<GLib.Variant<T>["deepUnpack"]>;
67
67
  type InferVariantTypes<T extends Array<DBusType>> = {
68
68
  [K in keyof T]: T[K] extends string ? DeepInfer<T[K]> : T[K] extends {
69
69
  type: infer S;
package/dist/gobject.js CHANGED
@@ -203,7 +203,7 @@ function pspecFromGType(type, name, flags) {
203
203
  return ParamSpec.int64(name, "", "", flags, MININT64, MAXINT64, 0);
204
204
  case GObject.TYPE_UINT64:
205
205
  return ParamSpec.uint64(name, "", "", flags, 0, Number.MAX_SAFE_INTEGER, 0);
206
- case GObject.TYPE_FLOAT:
206
+ case GObject.type_from_name("gfloat"):
207
207
  return ParamSpec.float(name, "", "", flags, MINFLOAT, MAXFLOAT, 0);
208
208
  case GObject.TYPE_DOUBLE:
209
209
  return ParamSpec.double(name, "", "", flags, Number.MIN_VALUE, Number.MIN_VALUE, 0);
@@ -1,7 +1,7 @@
1
1
  import GObject from "gi://GObject";
2
2
  import Gio from "gi://Gio";
3
- import GLib from "gi://GLib";
4
3
  import { type Pascalify } from "../util.js";
4
+ import type { DeepInfer, RecursiveInfer } from "../variant.js";
5
5
  type SubscribeCallback = () => void;
6
6
  type DisposeFunction = () => void;
7
7
  type SubscribeFunction = (callback: SubscribeCallback) => DisposeFunction;
@@ -116,8 +116,6 @@ export declare function createConnection<T, O1 extends GObject.Object, S1 extend
116
116
  * @param producer The producer function which should return a cleanup function
117
117
  */
118
118
  export declare function createExternal<T>(init: T, producer: (set: Setter<T>) => DisposeFunction): Accessor<T>;
119
- type DeepInfer<T extends string> = ReturnType<GLib.Variant<T>["deepUnpack"]>;
120
- type RecursiveInfer<T extends string> = ReturnType<GLib.Variant<T>["recursiveUnpack"]>;
121
119
  /** @experimental */
122
120
  type Settings<T extends Record<string, string>> = {
123
121
  [K in keyof T as Uncapitalize<Pascalify<K>>]: Accessor<RecursiveInfer<T[K]>>;
package/dist/variant.d.ts CHANGED
@@ -72,6 +72,7 @@ type $ParseVariantValue<State extends string> = string extends State ? unknown :
72
72
  State
73
73
  ] : VariantTypeError<`$ParseVariantValue encountered an invalid variant string: ${State} (1)`> : VariantTypeError<`$ParseVariantValue encountered an invalid variant string: ${State} (2)`>;
74
74
  type $ParseVariant<T extends string> = $ParseShallowRootVariantValue<T> extends infer Result ? Result extends [infer Value, string] ? Value : Result extends VariantTypeError<any> ? Result : never : never;
75
- export type InferVariant<S extends string> = $ParseDeepVariant<S>;
76
- export type InferVariantRec<S extends string> = $ParseRecursiveVariant<S>;
75
+ export type Infer<S extends string> = $ParseVariant<S>;
76
+ export type DeepInfer<S extends string> = $ParseDeepVariant<S>;
77
+ export type RecursiveInfer<S extends string> = $ParseRecursiveVariant<S>;
77
78
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gnim",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "type": "module",
5
5
  "author": "Aylur",
6
6
  "license": "MIT",
Binary file