@girs/builder-1.0 1.0.0-3.2.4 → 1.0.0-3.2.6

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/builder-1.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Builder-1.0, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
8
+ GJS TypeScript type definitions for Builder-1.0, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.6.
9
9
 
10
10
 
11
11
  ## Install
@@ -81,6 +81,19 @@ Now you have also type support for this, too:
81
81
  const Builder = imports.gi.Builder;
82
82
  ```
83
83
 
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
+
84
97
  ### Bundle
85
98
 
86
99
  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).
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  declare module 'gi://Builder?version=1.0' {
4
3
  import Builder10 from '@girs/builder-1.0';
5
4
  export default Builder10;
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  import Builder10 from '@girs/builder-1.0';
4
3
 
5
4
  declare global {
package/builder-1.0.d.cts CHANGED
@@ -137,6 +137,7 @@ export interface Document {
137
137
 
138
138
  readonly modified: boolean
139
139
  readonly read_only: boolean
140
+ readonly readOnly: boolean
140
141
  readonly title: string | null
141
142
 
142
143
  // Owm methods of Builder-1.0.Builder.Document
@@ -726,6 +727,7 @@ export module Tree {
726
727
  root?: TreeNode | null
727
728
  selection?: TreeNode | null
728
729
  show_icons?: boolean | null
730
+ showIcons?: boolean | null
729
731
  }
730
732
 
731
733
  }
@@ -737,6 +739,7 @@ export interface Tree extends Atk.ImplementorIface, Gtk.Buildable, Gtk.Scrollabl
737
739
  root: TreeNode
738
740
  selection: TreeNode
739
741
  show_icons: boolean
742
+ showIcons: boolean
740
743
 
741
744
  // Own fields of Builder-1.0.Builder.Tree
742
745
 
@@ -1262,6 +1265,27 @@ export module TreeNode {
1262
1265
  * If the "text" property includes #GMarkup.
1263
1266
  */
1264
1267
  use_markup?: boolean | null
1268
+ /**
1269
+ * This property allows for more lazy loading of nodes.
1270
+ *
1271
+ * When a node becomes visible, we normally build it's children nodes
1272
+ * so that we know if we need an expansion arrow. However, that can
1273
+ * be expensive when rendering directories with lots of subdirectories.
1274
+ *
1275
+ * Using this, you can always show an arrow without building the children
1276
+ * and simply hide the arrow if there were in fact no children (upon
1277
+ * expansion).
1278
+ */
1279
+ childrenPossible?: boolean | null
1280
+ /**
1281
+ * An icon-name to display on the row.
1282
+ */
1283
+ iconName?: string | null
1284
+ useDimLabel?: boolean | null
1285
+ /**
1286
+ * If the "text" property includes #GMarkup.
1287
+ */
1288
+ useMarkup?: boolean | null
1265
1289
  }
1266
1290
 
1267
1291
  }
@@ -1282,10 +1306,26 @@ export interface TreeNode {
1282
1306
  * expansion).
1283
1307
  */
1284
1308
  children_possible: boolean
1309
+ /**
1310
+ * This property allows for more lazy loading of nodes.
1311
+ *
1312
+ * When a node becomes visible, we normally build it's children nodes
1313
+ * so that we know if we need an expansion arrow. However, that can
1314
+ * be expensive when rendering directories with lots of subdirectories.
1315
+ *
1316
+ * Using this, you can always show an arrow without building the children
1317
+ * and simply hide the arrow if there were in fact no children (upon
1318
+ * expansion).
1319
+ */
1320
+ childrenPossible: boolean
1285
1321
  /**
1286
1322
  * An icon-name to display on the row.
1287
1323
  */
1288
1324
  icon_name: string | null
1325
+ /**
1326
+ * An icon-name to display on the row.
1327
+ */
1328
+ iconName: string | null
1289
1329
  /**
1290
1330
  * An optional #GObject to associate with the node.
1291
1331
  */
@@ -1303,10 +1343,15 @@ export interface TreeNode {
1303
1343
  */
1304
1344
  tree: Tree
1305
1345
  use_dim_label: boolean
1346
+ useDimLabel: boolean
1306
1347
  /**
1307
1348
  * If the "text" property includes #GMarkup.
1308
1349
  */
1309
1350
  use_markup: boolean
1351
+ /**
1352
+ * If the "text" property includes #GMarkup.
1353
+ */
1354
+ useMarkup: boolean
1310
1355
 
1311
1356
  // Owm methods of Builder-1.0.Builder.TreeNode
1312
1357
 
@@ -1468,9 +1513,11 @@ export interface View extends Atk.ImplementorIface, Gtk.Buildable, Gtk.Orientabl
1468
1513
  // Own properties of Builder-1.0.Builder.View
1469
1514
 
1470
1515
  readonly can_split: boolean
1516
+ readonly canSplit: boolean
1471
1517
  readonly document: Document
1472
1518
  readonly modified: boolean
1473
1519
  readonly special_title: string | null
1520
+ readonly specialTitle: string | null
1474
1521
  readonly title: string | null
1475
1522
 
1476
1523
  // Own fields of Builder-1.0.Builder.View
@@ -2017,6 +2064,7 @@ export module ViewStack {
2017
2064
  // Own constructor properties of Builder-1.0.Builder.ViewStack
2018
2065
 
2019
2066
  active_view?: View | null
2067
+ activeView?: View | null
2020
2068
  }
2021
2069
 
2022
2070
  }
@@ -2026,6 +2074,7 @@ export interface ViewStack extends Atk.ImplementorIface, Gtk.Buildable {
2026
2074
  // Own properties of Builder-1.0.Builder.ViewStack
2027
2075
 
2028
2076
  active_view: View
2077
+ activeView: View
2029
2078
 
2030
2079
  // Owm methods of Builder-1.0.Builder.ViewStack
2031
2080
 
@@ -2294,6 +2343,7 @@ export interface Workbench extends Atk.ImplementorIface, Gio.ActionGroup, Gio.Ac
2294
2343
  // Own properties of Builder-1.0.Builder.Workbench
2295
2344
 
2296
2345
  readonly active_view: View
2346
+ readonly activeView: View
2297
2347
  readonly building: boolean
2298
2348
  /**
2299
2349
  * The "context" property is the #IdeContext that shall be worked upon in
package/builder-1.0.d.ts CHANGED
@@ -139,6 +139,7 @@ interface Document {
139
139
 
140
140
  readonly modified: boolean
141
141
  readonly read_only: boolean
142
+ readonly readOnly: boolean
142
143
  readonly title: string | null
143
144
 
144
145
  // Owm methods of Builder-1.0.Builder.Document
@@ -728,6 +729,7 @@ module Tree {
728
729
  root?: TreeNode | null
729
730
  selection?: TreeNode | null
730
731
  show_icons?: boolean | null
732
+ showIcons?: boolean | null
731
733
  }
732
734
 
733
735
  }
@@ -739,6 +741,7 @@ interface Tree extends Atk.ImplementorIface, Gtk.Buildable, Gtk.Scrollable {
739
741
  root: TreeNode
740
742
  selection: TreeNode
741
743
  show_icons: boolean
744
+ showIcons: boolean
742
745
 
743
746
  // Own fields of Builder-1.0.Builder.Tree
744
747
 
@@ -1264,6 +1267,27 @@ module TreeNode {
1264
1267
  * If the "text" property includes #GMarkup.
1265
1268
  */
1266
1269
  use_markup?: boolean | null
1270
+ /**
1271
+ * This property allows for more lazy loading of nodes.
1272
+ *
1273
+ * When a node becomes visible, we normally build it's children nodes
1274
+ * so that we know if we need an expansion arrow. However, that can
1275
+ * be expensive when rendering directories with lots of subdirectories.
1276
+ *
1277
+ * Using this, you can always show an arrow without building the children
1278
+ * and simply hide the arrow if there were in fact no children (upon
1279
+ * expansion).
1280
+ */
1281
+ childrenPossible?: boolean | null
1282
+ /**
1283
+ * An icon-name to display on the row.
1284
+ */
1285
+ iconName?: string | null
1286
+ useDimLabel?: boolean | null
1287
+ /**
1288
+ * If the "text" property includes #GMarkup.
1289
+ */
1290
+ useMarkup?: boolean | null
1267
1291
  }
1268
1292
 
1269
1293
  }
@@ -1284,10 +1308,26 @@ interface TreeNode {
1284
1308
  * expansion).
1285
1309
  */
1286
1310
  children_possible: boolean
1311
+ /**
1312
+ * This property allows for more lazy loading of nodes.
1313
+ *
1314
+ * When a node becomes visible, we normally build it's children nodes
1315
+ * so that we know if we need an expansion arrow. However, that can
1316
+ * be expensive when rendering directories with lots of subdirectories.
1317
+ *
1318
+ * Using this, you can always show an arrow without building the children
1319
+ * and simply hide the arrow if there were in fact no children (upon
1320
+ * expansion).
1321
+ */
1322
+ childrenPossible: boolean
1287
1323
  /**
1288
1324
  * An icon-name to display on the row.
1289
1325
  */
1290
1326
  icon_name: string | null
1327
+ /**
1328
+ * An icon-name to display on the row.
1329
+ */
1330
+ iconName: string | null
1291
1331
  /**
1292
1332
  * An optional #GObject to associate with the node.
1293
1333
  */
@@ -1305,10 +1345,15 @@ interface TreeNode {
1305
1345
  */
1306
1346
  tree: Tree
1307
1347
  use_dim_label: boolean
1348
+ useDimLabel: boolean
1308
1349
  /**
1309
1350
  * If the "text" property includes #GMarkup.
1310
1351
  */
1311
1352
  use_markup: boolean
1353
+ /**
1354
+ * If the "text" property includes #GMarkup.
1355
+ */
1356
+ useMarkup: boolean
1312
1357
 
1313
1358
  // Owm methods of Builder-1.0.Builder.TreeNode
1314
1359
 
@@ -1470,9 +1515,11 @@ interface View extends Atk.ImplementorIface, Gtk.Buildable, Gtk.Orientable {
1470
1515
  // Own properties of Builder-1.0.Builder.View
1471
1516
 
1472
1517
  readonly can_split: boolean
1518
+ readonly canSplit: boolean
1473
1519
  readonly document: Document
1474
1520
  readonly modified: boolean
1475
1521
  readonly special_title: string | null
1522
+ readonly specialTitle: string | null
1476
1523
  readonly title: string | null
1477
1524
 
1478
1525
  // Own fields of Builder-1.0.Builder.View
@@ -2019,6 +2066,7 @@ module ViewStack {
2019
2066
  // Own constructor properties of Builder-1.0.Builder.ViewStack
2020
2067
 
2021
2068
  active_view?: View | null
2069
+ activeView?: View | null
2022
2070
  }
2023
2071
 
2024
2072
  }
@@ -2028,6 +2076,7 @@ interface ViewStack extends Atk.ImplementorIface, Gtk.Buildable {
2028
2076
  // Own properties of Builder-1.0.Builder.ViewStack
2029
2077
 
2030
2078
  active_view: View
2079
+ activeView: View
2031
2080
 
2032
2081
  // Owm methods of Builder-1.0.Builder.ViewStack
2033
2082
 
@@ -2296,6 +2345,7 @@ interface Workbench extends Atk.ImplementorIface, Gio.ActionGroup, Gio.ActionMap
2296
2345
  // Own properties of Builder-1.0.Builder.Workbench
2297
2346
 
2298
2347
  readonly active_view: View
2348
+ readonly activeView: View
2299
2349
  readonly building: boolean
2300
2350
  /**
2301
2351
  * The "context" property is the #IdeContext that shall be worked upon in
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/builder-1.0",
3
- "version": "1.0.0-3.2.4",
3
+ "version": "1.0.0-3.2.6",
4
4
  "description": "GJS TypeScript type definitions for Builder-1.0, generated from library version 1.0.0",
5
5
  "type": "module",
6
6
  "module": "builder-1.0.js",
@@ -25,27 +25,27 @@
25
25
  "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit builder-1.0.d.cts"
26
26
  },
27
27
  "dependencies": {
28
- "@girs/atk-1.0": "^2.50.0-3.2.4",
29
- "@girs/cairo-1.0": "^1.0.0-3.2.4",
30
- "@girs/dazzle-1.0": "^3.44.0-3.2.4",
31
- "@girs/freetype2-2.0": "^2.0.0-3.2.4",
32
- "@girs/gdk-3.0": "^3.24.38-3.2.4",
33
- "@girs/gdkpixbuf-2.0": "^2.0.0-3.2.4",
34
- "@girs/gio-2.0": "^2.78.0-3.2.4",
35
- "@girs/girepository-2.0": "^1.78.1-3.2.4",
36
- "@girs/gjs": "^3.2.4",
37
- "@girs/glib-2.0": "^2.78.0-3.2.4",
38
- "@girs/gmodule-2.0": "^2.0.0-3.2.4",
39
- "@girs/gobject-2.0": "^2.78.0-3.2.4",
40
- "@girs/gtk-3.0": "^3.24.38-3.2.4",
41
- "@girs/gtksource-3.0": "^3.0.0-3.2.4",
42
- "@girs/harfbuzz-0.0": "^8.2.1-3.2.4",
43
- "@girs/ide-1.0": "^1.0.0-3.2.4",
44
- "@girs/json-1.0": "^1.7.1-3.2.4",
45
- "@girs/pango-1.0": "^1.51.0-3.2.4",
46
- "@girs/peas-1.0": "^1.0.0-3.2.4",
47
- "@girs/template-1.0": "^3.36.2-3.2.4",
48
- "@girs/xlib-2.0": "^2.0.0-3.2.4"
28
+ "@girs/atk-1.0": "^2.50.0-3.2.6",
29
+ "@girs/cairo-1.0": "^1.0.0-3.2.6",
30
+ "@girs/dazzle-1.0": "^3.44.0-3.2.6",
31
+ "@girs/freetype2-2.0": "^2.0.0-3.2.6",
32
+ "@girs/gdk-3.0": "^3.24.38-3.2.6",
33
+ "@girs/gdkpixbuf-2.0": "^2.0.0-3.2.6",
34
+ "@girs/gio-2.0": "^2.78.0-3.2.6",
35
+ "@girs/girepository-2.0": "^1.78.1-3.2.6",
36
+ "@girs/gjs": "^3.2.6",
37
+ "@girs/glib-2.0": "^2.78.0-3.2.6",
38
+ "@girs/gmodule-2.0": "^2.0.0-3.2.6",
39
+ "@girs/gobject-2.0": "^2.78.0-3.2.6",
40
+ "@girs/gtk-3.0": "^3.24.38-3.2.6",
41
+ "@girs/gtksource-3.0": "^3.0.0-3.2.6",
42
+ "@girs/harfbuzz-0.0": "^8.2.1-3.2.6",
43
+ "@girs/ide-1.0": "^1.0.0-3.2.6",
44
+ "@girs/json-1.0": "^1.7.1-3.2.6",
45
+ "@girs/pango-1.0": "^1.51.0-3.2.6",
46
+ "@girs/peas-1.0": "^1.0.0-3.2.6",
47
+ "@girs/template-1.0": "^3.36.2-3.2.6",
48
+ "@girs/xlib-2.0": "^2.0.0-3.2.6"
49
49
  },
50
50
  "devDependencies": {
51
51
  "typescript": "*"