@girs/appstreamcompose-1.0 1.0.0-4.0.0 → 1.0.0-4.0.0-beta.3

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,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/appstreamcompose-1.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for AppStreamCompose-1.0, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0.
8
+ GJS TypeScript type definitions for AppStreamCompose-1.0, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.3.
9
9
 
10
10
 
11
11
  ## Install
@@ -22,11 +22,6 @@ You can import this package into your project like this:
22
22
  import AppStreamCompose from '@girs/appstreamcompose-1.0';
23
23
  ```
24
24
 
25
- Or if you prefer CommonJS, you can also use this:
26
- ```ts
27
- const AppStreamCompose = require('@girs/appstreamcompose-1.0');
28
- ```
29
-
30
25
  ### Ambient Modules
31
26
 
32
27
  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.
@@ -81,19 +76,6 @@ Now you have also type support for this, too:
81
76
  const AppStreamCompose = imports.gi.AppStreamCompose;
82
77
  ```
83
78
 
84
-
85
- ### ESM vs. CommonJS
86
-
87
- GJS supports two different import syntaxes. The new modern ESM syntax and the old global imports syntax.
88
-
89
- In TypeScript projects for GJS and GNOME Shell extensions, you have the flexibility to use `ESM` syntax and then decide the import syntax for your bundled file. If your bundler is configured to use `CommonJS`, it will convert to the GJS-specific global imports syntax, like `const moduleName = imports.gi[moduleName]`. This is different from the traditional `require` syntax seen in Node.js. The global imports syntax is chosen because it aligns with the CommonJS format supported by NPM, which is used for the generated type definitions and this package.
90
-
91
- On the other hand, if you configure your bundler to use ESM, it will retain the ESM import syntax. It's crucial to ensure that your bundler is set up to correctly translate and bundle these imports into either CommonJS or ESM format, depending on your project's requirements.
92
-
93
- This approach is particularly important due to the `@girs` types, which include both `*.cjs `files, using the GJS global imports syntax, and `*.js` files, which utilize the ESM syntax. By appropriately setting up your bundler, you can control which syntax—CommonJS or ESM—is used in your project. The choice of CommonJS in this context is also due to the similarity between the GJS-specific global imports and CommonJS syntax, allowing for easier management and bundling in these specific types of projects.
94
-
95
- Since GNOME Shell 45, you should only use ESM, even for GNOME Shell extensions. Before that, extensions had to use the global import syntax, unlike normal GJS applications, where ESM has been available for some time.
96
-
97
79
  ### Bundle
98
80
 
99
81
  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).
@@ -266,18 +266,6 @@ export namespace AppStreamCompose {
266
266
  * @param enabled
267
267
  */
268
268
  function globals_set_use_optipng(enabled: boolean): void;
269
- /**
270
- * Converts the text representation to an enumerated value.
271
- * @param state_str the string.
272
- * @returns a #AscIconState
273
- */
274
- function icon_state_from_string(state_str: string): IconState;
275
- /**
276
- * Converts the enumerated value to an text representation.
277
- * @param istate the #AscIconState.
278
- * @returns string version of @istate
279
- */
280
- function icon_state_to_string(istate: IconState): string;
281
269
  function image_error_quark(): GLib.Quark;
282
270
  /**
283
271
  * Returns the image format type based on the given file's filename.
@@ -322,7 +310,6 @@ export namespace AppStreamCompose {
322
310
  PROPAGATE_CUSTOM,
323
311
  PROPAGATE_ARTIFACTS,
324
312
  NO_FINAL_CHECK,
325
- NO_PARTIAL_URLS,
326
313
  }
327
314
  /**
328
315
  * The flags used for loading images.
@@ -509,7 +496,7 @@ export namespace AppStreamCompose {
509
496
  get_max_screenshot_size(): number;
510
497
  /**
511
498
  * Get the media base URL to be used for the generated data,
512
- * or %NULL if no media is cached.
499
+ * or %NULL if this feature is not used.
513
500
  */
514
501
  get_media_baseurl(): string;
515
502
  /**
@@ -621,8 +608,7 @@ export namespace AppStreamCompose {
621
608
  */
622
609
  set_max_screenshot_size(size_bytes: number): void;
623
610
  /**
624
- * Set the media base URL for the generated metadata. Can be %NULL if no media
625
- * should be cached and the original URLs should be kept.
611
+ * Set the media base URL for the generated metadata. Can be %NULL.
626
612
  * @param url the media base URL.
627
613
  */
628
614
  set_media_baseurl(url?: string | null): void;
@@ -771,11 +757,6 @@ export namespace AppStreamCompose {
771
757
 
772
758
  // Own methods of AppStreamCompose.IconPolicy
773
759
 
774
- /**
775
- * Loads the icon policy from a textual representation.
776
- * @param serialized_policy A policy string as returned by %asc_icon_policy_to_string
777
- */
778
- from_string(serialized_policy: string): boolean;
779
760
  /**
780
761
  * Sets a designated state for an icon of the given size.
781
762
  * @param icon_size the size of the icon to set policy for (e.g. 64 for 64x64px icons)
@@ -783,11 +764,6 @@ export namespace AppStreamCompose {
783
764
  * @param state the designated #AscIconState
784
765
  */
785
766
  set_policy(icon_size: number, icon_scale: number, state: IconState): void;
786
- /**
787
- * Converts the current icon policy into a textual representation.
788
- * @returns The icon policy serialized into a string. Free with g_free()
789
- */
790
- to_string(): string;
791
767
  }
792
768
 
793
769
  module Image {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/appstreamcompose-1.0",
3
- "version": "1.0.0-4.0.0",
3
+ "version": "1.0.0-4.0.0-beta.3",
4
4
  "description": "GJS TypeScript type definitions for AppStreamCompose-1.0, generated from library version 1.0.0",
5
5
  "type": "module",
6
6
  "module": "appstreamcompose-1.0.js",
@@ -26,13 +26,13 @@
26
26
  "test": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit appstreamcompose-1.0.d.ts"
27
27
  },
28
28
  "dependencies": {
29
- "@girs/appstream-1.0": "^1.0.0-4.0.0-beta.1",
30
- "@girs/gdkpixbuf-2.0": "^2.0.0-4.0.0-beta.1",
31
- "@girs/gio-2.0": "^2.77.0-4.0.0-beta.1",
32
- "@girs/gjs": "^4.0.0-beta.1",
33
- "@girs/glib-2.0": "^2.77.0-4.0.0-beta.1",
34
- "@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.1",
35
- "@girs/gobject-2.0": "^2.77.0-4.0.0-beta.1"
29
+ "@girs/appstream-1.0": "^0.16.1-4.0.0-beta.3",
30
+ "@girs/gdkpixbuf-2.0": "^2.0.0-4.0.0-beta.3",
31
+ "@girs/gio-2.0": "^2.80.0-4.0.0-beta.3",
32
+ "@girs/gjs": "^4.0.0-beta.3",
33
+ "@girs/glib-2.0": "^2.80.0-4.0.0-beta.3",
34
+ "@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.3",
35
+ "@girs/gobject-2.0": "^2.80.0-4.0.0-beta.3"
36
36
  },
37
37
  "devDependencies": {
38
38
  "typescript": "*"