@girs/cambalacheprivate-4.0 4.2.0 → 4.4.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.
package/README.md CHANGED
@@ -5,25 +5,25 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/cambalacheprivate-4.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for CambalachePrivate-4.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.2.0.
8
+ GJS TypeScript type definitions for CambalachePrivate-4.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.4.0.
9
9
 
10
10
  ## Install
11
11
 
12
- To use this type definitions, install them with NPM:
12
+ Install the type definitions with npm:
13
13
  ```bash
14
14
  npm install @girs/cambalacheprivate-4.0
15
15
  ```
16
16
 
17
17
  ## Usage
18
18
 
19
- You can import this package into your project like this:
19
+ Import it like any other module:
20
20
  ```ts
21
21
  import CambalachePrivate from '@girs/cambalacheprivate-4.0';
22
22
  ```
23
23
 
24
24
  ### Ambient Modules
25
25
 
26
- You can also use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) to import this module like you would do this in JavaScript.
26
+ [Ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) let you write the same import you would in plain JavaScript.
27
27
  For this you need to include `@girs/cambalacheprivate-4.0` or `@girs/cambalacheprivate-4.0/ambient` in your `tsconfig` or entry point Typescript file:
28
28
 
29
29
  `index.ts`:
@@ -42,7 +42,7 @@ import '@girs/cambalacheprivate-4.0'
42
42
  }
43
43
  ```
44
44
 
45
- Now you can import the ambient module with TypeScript support:
45
+ The ambient module now resolves with types:
46
46
 
47
47
  ```ts
48
48
  import CambalachePrivate from 'gi://CambalachePrivate?version=4.0';
@@ -50,7 +50,7 @@ import CambalachePrivate from 'gi://CambalachePrivate?version=4.0';
50
50
 
51
51
  ### Global import
52
52
 
53
- You can also import the module with Typescript support using the global `imports.gi` object of GJS.
53
+ GJS's global `imports.gi` works too, with types.
54
54
  For this you need to include `@girs/cambalacheprivate-4.0` or `@girs/cambalacheprivate-4.0/import` in your `tsconfig` or entry point Typescript file:
55
55
 
56
56
  `index.ts`:
@@ -69,7 +69,7 @@ import '@girs/cambalacheprivate-4.0'
69
69
  }
70
70
  ```
71
71
 
72
- Now you have also type support for this, too:
72
+ That form carries types as well:
73
73
 
74
74
  ```ts
75
75
  const CambalachePrivate = imports.gi.CambalachePrivate;
@@ -77,7 +77,7 @@ const CambalachePrivate = imports.gi.CambalachePrivate;
77
77
 
78
78
  ### Bundle
79
79
 
80
- Depending on your project configuration, it is recommended to use a bundler like [esbuild](https://esbuild.github.io/). You can find examples using different bundlers [here](https://github.com/gjsify/ts-for-gir/tree/main/examples).
80
+ Most projects want a bundler. [esbuild](https://esbuild.github.io/) is the smallest thing that works; the [examples directory](https://github.com/gjsify/ts-for-gir/tree/main/examples) has setups for several others.
81
81
 
82
82
  ## Other packages
83
83
 
@@ -341,6 +341,7 @@ export namespace CambalachePrivate {
341
341
  * Returns context information about what XML attribute
342
342
  * the parsing error occurred in.
343
343
  * @param error an error in the {@link Gtk.SvgError} domain
344
+ * @since 4.22
344
345
  */
345
346
  static error_get_attribute(error: GLib.Error): string | null;
346
347
 
@@ -348,6 +349,7 @@ export namespace CambalachePrivate {
348
349
  * Returns context information about what XML element
349
350
  * the parsing error occurred in.
350
351
  * @param error an error in the {@link Gtk.SvgError} domain
352
+ * @since 4.22
351
353
  */
352
354
  static error_get_element(error: GLib.Error): string | null;
353
355
 
@@ -355,6 +357,7 @@ export namespace CambalachePrivate {
355
357
  * Returns context information about the end position
356
358
  * in the document where the parsing error occurred.
357
359
  * @param error an error in the {@link Gtk.SvgError} domain
360
+ * @since 4.22
358
361
  */
359
362
  static error_get_end(error: GLib.Error): SvgLocation | null;
360
363
 
@@ -362,6 +365,7 @@ export namespace CambalachePrivate {
362
365
  * Returns context information about the start position
363
366
  * in the document where the parsing error occurred.
364
367
  * @param error an error in the {@link Gtk.SvgError} domain
368
+ * @since 4.22
365
369
  */
366
370
  static error_get_start(error: GLib.Error): SvgLocation | null;
367
371
 
@@ -376,18 +380,21 @@ export namespace CambalachePrivate {
376
380
  * the value N, the meaningful states of the SVG are
377
381
  * 0, 1, ..., N - 1 and `CMB_PRIVATE_SVG_STATE_EMPTY`.
378
382
  * @returns the number of states
383
+ * @since 4.22
379
384
  */
380
385
  get_n_states(): number;
381
386
 
382
387
  /**
383
388
  * Gets the current state of the paintable.
384
389
  * @returns the state
390
+ * @since 4.22
385
391
  */
386
392
  get_state(): number;
387
393
 
388
394
  /**
389
395
  * Gets the value of the weight property.
390
396
  * @returns the weight
397
+ * @since 4.22
391
398
  */
392
399
  get_weight(): number;
393
400
 
@@ -399,6 +406,7 @@ export namespace CambalachePrivate {
399
406
  *
400
407
  * This clears any previously loaded content.
401
408
  * @param bytes the data to load
409
+ * @since 4.22
402
410
  */
403
411
  load_from_bytes(bytes: GLib.Bytes | Uint8Array): void;
404
412
 
@@ -406,6 +414,7 @@ export namespace CambalachePrivate {
406
414
  * Stop any playing animations.
407
415
  *
408
416
  * Animations can be paused and started repeatedly.
417
+ * @since 4.22
409
418
  */
410
419
  pause(): void;
411
420
 
@@ -414,6 +423,7 @@ export namespace CambalachePrivate {
414
423
  *
415
424
  * Note that this is necessary for state changes as
416
425
  * well.
426
+ * @since 4.22
417
427
  */
418
428
  play(): void;
419
429
 
@@ -427,6 +437,7 @@ export namespace CambalachePrivate {
427
437
  * of parsing the SVG. It does not reflect the effect
428
438
  * of applying animations.
429
439
  * @returns the serialized contents
440
+ * @since 4.22
430
441
  */
431
442
  serialize(): GLib.Bytes;
432
443
 
@@ -436,6 +447,7 @@ export namespace CambalachePrivate {
436
447
  * Without a frame clock, GTK has to rely
437
448
  * on simple timeouts to run animations.
438
449
  * @param clock the frame clock
450
+ * @since 4.22
439
451
  */
440
452
  set_frame_clock(clock: Gdk.FrameClock): void;
441
453
 
@@ -448,6 +460,7 @@ export namespace CambalachePrivate {
448
460
  * Note that {@link Gtk.Svg.play} must have been
449
461
  * called for the SVG paintable to react to state changes.
450
462
  * @param state the state to set, as a value between 0 and 63, or `(unsigned int) -1`
463
+ * @since 4.22
451
464
  */
452
465
  set_state(state: number): void;
453
466
 
@@ -457,6 +470,7 @@ export namespace CambalachePrivate {
457
470
  * The default value of -1 means to use the font weight
458
471
  * from CSS.
459
472
  * @param weight the font weight, as a value between -1 and 1000
473
+ * @since 4.22
460
474
  */
461
475
  set_weight(weight: number): void;
462
476
 
@@ -464,6 +478,7 @@ export namespace CambalachePrivate {
464
478
  * Serializes the paintable, and saves the result to a file.
465
479
  * @param filename the file to save to
466
480
  * @returns true, unless an error occurred
481
+ * @since 4.22
467
482
  */
468
483
  write_to_file(filename: string): boolean;
469
484
 
@@ -693,6 +708,7 @@ export namespace CambalachePrivate {
693
708
  * @param width width to snapshot in
694
709
  * @param height height to snapshot in
695
710
  * @param colors a pointer to an array of colors
711
+ * @since 4.6
696
712
  */
697
713
  snapshot_symbolic(snapshot: Gdk.Snapshot, width: number, height: number, colors: Gdk.RGBA[]): void;
698
714
 
@@ -706,6 +722,7 @@ export namespace CambalachePrivate {
706
722
  * @param height height to snapshot in
707
723
  * @param colors a pointer to an array of colors
708
724
  * @param weight The font weight to use (from 1 to 1000, with default 400)
725
+ * @since 4.22
709
726
  */
710
727
  snapshot_with_weight(snapshot: Gdk.Snapshot, width: number, height: number, colors: Gdk.RGBA[], weight: number): void;
711
728
 
@@ -718,6 +735,7 @@ export namespace CambalachePrivate {
718
735
  * @param width width to snapshot in
719
736
  * @param height height to snapshot in
720
737
  * @param colors a pointer to an array of colors
738
+ * @since 4.6
721
739
  * @virtual
722
740
  */
723
741
  vfunc_snapshot_symbolic(snapshot: Gdk.Snapshot, width: number, height: number, colors: Gdk.RGBA[]): void;
@@ -732,6 +750,7 @@ export namespace CambalachePrivate {
732
750
  * @param height height to snapshot in
733
751
  * @param colors a pointer to an array of colors
734
752
  * @param weight The font weight to use (from 1 to 1000, with default 400)
753
+ * @since 4.22
735
754
  * @virtual
736
755
  */
737
756
  vfunc_snapshot_with_weight(snapshot: Gdk.Snapshot, width: number, height: number, colors: Gdk.RGBA[], weight: number): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/cambalacheprivate-4.0",
3
- "version": "4.2.0",
3
+ "version": "4.4.0",
4
4
  "description": "GJS TypeScript type definitions for CambalachePrivate-4.0",
5
5
  "type": "module",
6
6
  "module": "cambalacheprivate-4.0.js",
@@ -31,21 +31,21 @@
31
31
  "test": "tsc --project tsconfig.json"
32
32
  },
33
33
  "dependencies": {
34
- "@girs/gjs": "^4.2.0",
35
- "@girs/gtk-4.0": "^4.2.0",
36
- "@girs/gsk-4.0": "^4.2.0",
37
- "@girs/graphene-1.0": "^4.2.0",
38
- "@girs/gobject-2.0": "^4.2.0",
39
- "@girs/glib-2.0": "^4.2.0",
40
- "@girs/gdk-4.0": "^4.2.0",
41
- "@girs/cairo-1.0": "^4.2.0",
42
- "@girs/pangocairo-1.0": "^4.2.0",
43
- "@girs/pango-1.0": "^4.2.0",
44
- "@girs/harfbuzz-0.0": "^4.2.0",
45
- "@girs/freetype2-2.0": "^4.2.0",
46
- "@girs/gio-2.0": "^4.2.0",
47
- "@girs/gmodule-2.0": "^4.2.0",
48
- "@girs/gdkpixbuf-2.0": "^4.2.0" },
34
+ "@girs/gjs": "^4.4.0",
35
+ "@girs/gtk-4.0": "^4.4.0",
36
+ "@girs/gsk-4.0": "^4.4.0",
37
+ "@girs/graphene-1.0": "^4.4.0",
38
+ "@girs/gobject-2.0": "^4.4.0",
39
+ "@girs/glib-2.0": "^4.4.0",
40
+ "@girs/gdk-4.0": "^4.4.0",
41
+ "@girs/cairo-1.0": "^4.4.0",
42
+ "@girs/pangocairo-1.0": "^4.4.0",
43
+ "@girs/pango-1.0": "^4.4.0",
44
+ "@girs/harfbuzz-0.0": "^4.4.0",
45
+ "@girs/freetype2-2.0": "^4.4.0",
46
+ "@girs/gio-2.0": "^4.4.0",
47
+ "@girs/gmodule-2.0": "^4.4.0",
48
+ "@girs/gdkpixbuf-2.0": "^4.4.0" },
49
49
  "devDependencies": {
50
50
  "typescript": "*"
51
51
  },