qgis-sdk 0.4.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 +38 -13
- package/package.json +21 -3
- package/svelte.d.ts +1 -0
- package/svelte.js +1 -0
- package/vue.d.ts +1 -0
- package/vue.js +1 -0
package/README.md
CHANGED
|
@@ -1,32 +1,57 @@
|
|
|
1
|
-
# qgis-sdk
|
|
1
|
+
# @archont561/qgis-sdk
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**The TypeScript SDK for QGIS plugin interfaces hosted in `QWebEngineView`:
|
|
4
|
+
one typed object over the plugin's own declarations.**
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
`
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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 {
|
|
22
|
-
import
|
|
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,
|
|
29
|
-
the React
|
|
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
|
+
"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.
|
|
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";
|