@gjsify/app-settings 0.64.3-next.258 → 0.64.3-next.259

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.
Files changed (2) hide show
  1. package/README.md +10 -1
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -24,7 +24,16 @@ Key types: `b i u d s` and the arrays `ab ai au ad as` (ADR 0118). An array key
24
24
 
25
25
  ## Schema
26
26
 
27
- The schema is a `.gschema.xml`. Import it with the `?schema` specifier; the build step turns it into a module that calls `Settings.register`. On GJS, `register` is a no-op and the compiled schema is used.
27
+ The schema is a `.gschema.xml`. Import it once, before the first `new Gio.Settings`:
28
+
29
+ ```ts
30
+ import Gio from 'gi://Gio?version=2.0';
31
+ import './org.example.App.gschema.xml?schema';
32
+
33
+ const settings = new Gio.Settings({ schema_id: 'org.example.App', path: '/org/example/App/' });
34
+ ```
35
+
36
+ On the browser and NativeScript the build step turns the import into a module that calls `Settings.register` with the parsed schema, on the `Settings` the port's `Gio` barrel re-exports. On GJS the import is the file's path and the compiled schema is used. Type the specifier with `@gjsify/rolldown-plugin-gjsify/types`.
28
37
 
29
38
  Unsupported schema features (range, choices, enum, flags, child, override) are refused at build time.
30
39
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/app-settings",
3
- "version": "0.64.3-next.258",
3
+ "version": "0.64.3-next.259",
4
4
  "description": "Gio.Settings as a strict subset for the browser (localStorage) and NativeScript (ApplicationSettings); the native Gio.Settings on GJS",
5
5
  "type": "module",
6
6
  "module": "lib/esm/index.js",
@@ -50,11 +50,11 @@
50
50
  "browser"
51
51
  ],
52
52
  "dependencies": {
53
- "@gjsify/adwaita-core": "0.64.3-next.258"
53
+ "@gjsify/adwaita-core": "0.64.3-next.259"
54
54
  },
55
55
  "devDependencies": {
56
- "@gjsify/cli": "0.64.3-next.258",
57
- "@gjsify/unit": "0.64.3-next.258",
56
+ "@gjsify/cli": "0.64.3-next.259",
57
+ "@gjsify/unit": "0.64.3-next.259",
58
58
  "@types/node": "^25.9.2",
59
59
  "typescript": "^6.0.3"
60
60
  },
@@ -85,5 +85,5 @@
85
85
  "url": "https://github.com/gjsify/gjsify/issues"
86
86
  },
87
87
  "homepage": "https://github.com/gjsify/gjsify/tree/main/packages/web/app-settings#readme",
88
- "gitHead": "6d2fc430ffaa180a765c59d33c8fa1d5b410b364"
88
+ "gitHead": "84f8ece003be30456a8ace70115e480bf3220d47"
89
89
  }