qgis-sdk 0.3.0 → 0.5.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
@@ -1,32 +1,57 @@
1
- # qgis-sdk (npm)
1
+ # @archont561/qgis-sdk
2
2
 
3
- **Unscoped alias of [`@archont561/qgis-sdk`](https://www.npmjs.com/package/@archont561/qgis-sdk).**
3
+ **The TypeScript SDK for QGIS plugin interfaces hosted in `QWebEngineView`:
4
+ one typed object over the plugin's own declarations.**
4
5
 
5
- Every entry point re-exports the scoped package at the exact same version:
6
- `qgis-sdk`, `qgis-sdk/bridge`, `qgis-sdk/host`, `qgis-sdk/react` and
7
- `qgis-sdk/testing`. There is no code of its own; pick whichever name reads
8
- better in your project. The Python package of the same name is on
9
- [PyPI](https://pypi.org/project/qgis-sdk/).
6
+ The page side of [`qgis-sdk`](https://pypi.org/project/qgis-sdk/). A page
7
+ builds `QgisSdk` from the schema `qgis-sdk bridge generate` renders from the
8
+ plugin's Python declarations and gets one typed method per action and
9
+ stream, the curated host namespaces (`layers`, `project`, `files`,
10
+ `algorithms`, ...), framework-free stores and React, Vue and Svelte
11
+ bindings over them, and a scripted harness for tests. Every exported error
12
+ begins with `QgisSdk` and carries a stable wire `code`.
13
+
14
+ > Status: `0.5.0`, experimental `0.x`. Published as
15
+ > `@archont561/qgis-sdk-bridge` through `0.2.0`; this name continues from
16
+ > `0.3.0`, and `qgis-sdk` on npm is its unscoped alias. `./host`, `./react`,
17
+ > `./vue`, `./svelte` and `./testing` are opt-in entry points.
10
18
 
11
19
  ## Installation
12
20
 
13
21
  ```sh
14
- bun add qgis-sdk
15
- npm install qgis-sdk
22
+ bun add @archont561/qgis-sdk # or its unscoped alias: bun add qgis-sdk
23
+ npm install @archont561/qgis-sdk # or: npm install qgis-sdk
16
24
  ```
17
25
 
26
+ `qgis-sdk` on npm re-exports every entry point of `@archont561/qgis-sdk`
27
+ at the same version; the two names share this README.
28
+
18
29
  ## Example
19
30
 
20
31
  ```ts
21
- import { BridgeClient } from "qgis-sdk/bridge";
22
- import { createHost } from "qgis-sdk/host";
32
+ import { QgisSdk, formStore } from "@archont561/qgis-sdk";
33
+ import schema from "./bridge.schema"; // qgis-sdk bridge generate
34
+
35
+ const qgis = QgisSdk.fromBridgeSchema(schema);
36
+ const buffered = await qgis.buffer({ layer_id, distance: 25 }); // typed by the schema
37
+ const layers = await qgis.host.layers.list({ limit: 20 }); // a granted host namespace
38
+
39
+ const form = formStore(qgis, "buffer"); // fields from the action's schema; drives <qgis-form>
23
40
  ```
24
41
 
42
+ The same stores back `useForm`/`useOperation` in `./react`, the Vue
43
+ composables and the Svelte stores; `./testing` scripts a host without QGIS.
44
+
25
45
  ## Documentation
26
46
 
27
47
  - [TypeScript package guide](https://github.com/Archont561/qgis-sdk/blob/main/backlog/docs/guides/doc-13%20-%20qgis-sdk-TypeScript-package-guide.md) -
28
- exports, the transport client, host namespaces, generated clients, streams,
29
- the React bindings and testing against a scripted host.
48
+ exports, `QgisSdk`, the transport client, host namespaces, streams, the
49
+ stores, the React, Vue and Svelte bindings, Processing from a page and
50
+ testing against a scripted host.
51
+ - [`@archont561/qgis-sdk-ui`](https://github.com/Archont561/qgis-sdk/tree/main/packages/qgis-sdk-ui) -
52
+ the web components on these stores.
53
+ - [Python package guide](https://github.com/Archont561/qgis-sdk/blob/main/backlog/docs/guides/doc-12%20-%20qgis-sdk-Python-package-guide.md) -
54
+ the host half of every surface above.
30
55
 
31
56
  ## License
32
57
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qgis-sdk",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Unscoped alias of @archont561/qgis-sdk, the TypeScript SDK for QGIS plugin interfaces hosted in QWebEngineView.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -27,6 +27,16 @@
27
27
  "import": "./react.js",
28
28
  "default": "./react.js"
29
29
  },
30
+ "./vue": {
31
+ "types": "./vue.d.ts",
32
+ "import": "./vue.js",
33
+ "default": "./vue.js"
34
+ },
35
+ "./svelte": {
36
+ "types": "./svelte.d.ts",
37
+ "import": "./svelte.js",
38
+ "default": "./svelte.js"
39
+ },
30
40
  "./testing": {
31
41
  "types": "./testing.d.ts",
32
42
  "import": "./testing.js",
@@ -51,14 +61,22 @@
51
61
  "test": "bun test"
52
62
  },
53
63
  "dependencies": {
54
- "@archont561/qgis-sdk": "0.3.0"
64
+ "@archont561/qgis-sdk": "0.5.0"
55
65
  },
56
66
  "peerDependencies": {
57
- "react": ">=18"
67
+ "react": ">=18",
68
+ "svelte": ">=5",
69
+ "vue": ">=3.4"
58
70
  },
59
71
  "peerDependenciesMeta": {
60
72
  "react": {
61
73
  "optional": true
74
+ },
75
+ "svelte": {
76
+ "optional": true
77
+ },
78
+ "vue": {
79
+ "optional": true
62
80
  }
63
81
  }
64
82
  }
package/svelte.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "@archont561/qgis-sdk/svelte";
package/svelte.js ADDED
@@ -0,0 +1 @@
1
+ export * from "@archont561/qgis-sdk/svelte";
package/vue.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "@archont561/qgis-sdk/vue";
package/vue.js ADDED
@@ -0,0 +1 @@
1
+ export * from "@archont561/qgis-sdk/vue";