qgis-sdk 0.4.0 → 0.6.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,53 @@
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
+ **Bring typed QGIS plugin actions to your web UI.**
4
4
 
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/).
5
+ Build a `QgisSdk` client from your Python plugin's generated schema, call
6
+ its actions and streams, and use granted host services. Framework-free stores
7
+ and React, Vue and Svelte bindings help build interfaces in `QWebEngineView`;
8
+ a scripted host lets you test them without QGIS.
9
+
10
+ > Status: `0.6.0`, experimental `0.x`. Published as
11
+ > `@archont561/qgis-sdk-bridge` through `0.2.0`; this name continues from
12
+ > `0.3.0`, and `qgis-sdk` on npm is its unscoped alias. `./host`, `./react`,
13
+ > `./vue`, `./svelte` and `./testing` are opt-in entry points.
10
14
 
11
15
  ## Installation
12
16
 
13
17
  ```sh
14
- bun add qgis-sdk
15
- npm install qgis-sdk
18
+ bun add @archont561/qgis-sdk # or its unscoped alias: bun add qgis-sdk
19
+ npm install @archont561/qgis-sdk # or: npm install qgis-sdk
16
20
  ```
17
21
 
22
+ `qgis-sdk` on npm re-exports every entry point of `@archont561/qgis-sdk`
23
+ at the same version; the two names share this README.
24
+
18
25
  ## Example
19
26
 
20
27
  ```ts
21
- import { BridgeClient } from "qgis-sdk/bridge";
22
- import { createHost } from "qgis-sdk/host";
28
+ import { QgisSdk, formStore } from "@archont561/qgis-sdk";
29
+ import schema from "./bridge.schema"; // qgis-sdk bridge generate
30
+
31
+ const qgis = QgisSdk.fromBridgeSchema(schema);
32
+ const buffered = await qgis.buffer({ layer_id, distance: 25 }); // typed by the schema
33
+ const layers = await qgis.host.layers.list({ limit: 20 }); // a granted host namespace
34
+
35
+ const form = formStore(qgis, "buffer"); // fields from the action's schema; drives <qgis-form>
23
36
  ```
24
37
 
38
+ The same stores back `useForm`/`useOperation` in `./react`, the Vue
39
+ composables and the Svelte stores; `./testing` scripts a host without QGIS.
40
+
25
41
  ## Documentation
26
42
 
27
- - [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.
43
+ - [TypeScript package guide](https://archont561.github.io/qgis-sdk/typescript/) -
44
+ exports, `QgisSdk`, the transport client, host namespaces, streams, the
45
+ stores, the React, Vue and Svelte bindings, Processing from a page and
46
+ testing against a scripted host.
47
+ - [`@archont561/qgis-sdk-ui`](https://github.com/Archont561/qgis-sdk/tree/main/packages/qgis-sdk-ui) -
48
+ the web components on these stores.
49
+ - [Python package guide](https://archont561.github.io/qgis-sdk/python/) -
50
+ the host half of every surface above.
30
51
 
31
52
  ## License
32
53
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "qgis-sdk",
3
- "version": "0.4.0",
4
- "description": "Unscoped alias of @archont561/qgis-sdk, the TypeScript SDK for QGIS plugin interfaces hosted in QWebEngineView.",
3
+ "version": "0.6.0",
4
+ "description": "Typed QGIS plugin actions for your web UI. Alias of @archont561/qgis-sdk.",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -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.4.0"
64
+ "@archont561/qgis-sdk": "0.6.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";