@dusted/anqst 1.0.1 → 1.5.1
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 +15 -0
- package/dist/src/app.js +32 -9
- package/dist/src/base93.js +52 -0
- package/dist/src/boundary-codec-analysis.js +468 -0
- package/dist/src/boundary-codec-leaves.js +602 -0
- package/dist/src/boundary-codec-model.js +77 -0
- package/dist/src/boundary-codec-plan.js +522 -0
- package/dist/src/boundary-codec-render.js +1738 -0
- package/dist/src/boundary-codecs.js +174 -0
- package/dist/src/emit.js +1274 -150
- package/dist/src/program.js +1 -1
- package/package.json +2 -2
- package/spec/AnQst-Spec-DSL.d.ts +12 -6
package/dist/src/program.js
CHANGED
|
@@ -81,7 +81,7 @@ function readTsConfigFrom(specPath) {
|
|
|
81
81
|
function createTscProgramContext(specPath) {
|
|
82
82
|
const absoluteSpecPath = node_path_1.default.resolve(specPath);
|
|
83
83
|
const tsConfig = readTsConfigFrom(absoluteSpecPath);
|
|
84
|
-
const rootNames =
|
|
84
|
+
const rootNames = [absoluteSpecPath];
|
|
85
85
|
const options = tsConfig?.options ?? {
|
|
86
86
|
target: typescript_1.default.ScriptTarget.ES2022,
|
|
87
87
|
module: typescript_1.default.ModuleKind.CommonJS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dusted/anqst",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "Opinionated backend generator for webapps.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nodejs",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"build": "node scripts/build-with-stamp.js",
|
|
48
48
|
"build:test": "npm run clean && tsc -p tsconfig.json && npm run chmod:bin",
|
|
49
49
|
"prepare": "npm run build",
|
|
50
|
-
"test": "npm run build:test && node --test dist/test
|
|
50
|
+
"test": "npm run build:test && node --test dist/test/*.test.js",
|
|
51
51
|
"start": "node dist/src/bin/anqst.js"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
package/spec/AnQst-Spec-DSL.d.ts
CHANGED
|
@@ -165,12 +165,15 @@ export namespace AnQst {
|
|
|
165
165
|
* - External: A Qt widget initiates a QDrag carrying QMimeData.
|
|
166
166
|
* - Parent: AnQstWebHostBase intercepts the drop via event filter on the
|
|
167
167
|
* embedded QWebEngineView's rendering surface.
|
|
168
|
-
* - Parent: QMimeData for the accepted format is deserialized
|
|
169
|
-
*
|
|
168
|
+
* - Parent: QMimeData for the accepted format is deserialized from a JSON
|
|
169
|
+
* array of normalized AnQst wire items and forwarded through the bridge.
|
|
170
170
|
* - Widget: Service updates signal `PropertyName` with the deserialized
|
|
171
171
|
* payload and drop coordinates. Angular components react via effect() / template binding.
|
|
172
172
|
* - MIME type is convention-derived: `application/anqst-dragdropevent_<ServiceName>-<TypeName>`.
|
|
173
|
-
* - The source QWidget must serialize the
|
|
173
|
+
* - The source QWidget must serialize the generated AnQst wire payload as a
|
|
174
|
+
* JSON array under the same MIME type. Generated Qt widgets expose helper
|
|
175
|
+
* functions for this and source widgets should use them instead of
|
|
176
|
+
* hand-written JSON mapping.
|
|
174
177
|
* - Multiple DropTarget members per service are allowed (each accepting a different type).
|
|
175
178
|
* @example
|
|
176
179
|
* // AnQst spec:
|
|
@@ -193,8 +196,9 @@ export namespace AnQst {
|
|
|
193
196
|
* - External: A Qt widget initiates a QDrag carrying QMimeData.
|
|
194
197
|
* - Parent: AnQstWebHostBase intercepts drag-move events via event filter on the
|
|
195
198
|
* embedded QWebEngineView's rendering surface. Events are throttled (trailing edge).
|
|
196
|
-
* - Parent: Payload is deserialized once on DragEnter
|
|
197
|
-
*
|
|
199
|
+
* - Parent: Payload is deserialized once on DragEnter from a JSON array of
|
|
200
|
+
* normalized AnQst wire items; subsequent DragMove events forward only
|
|
201
|
+
* the updated position.
|
|
198
202
|
* - Widget: Service updates signal `PropertyName` with the payload and current
|
|
199
203
|
* coordinates. Signal becomes null on DragLeave.
|
|
200
204
|
* - Shares the same MIME type convention as DropTarget: `application/anqst-dragdropevent_<ServiceName>-<TypeName>`.
|
|
@@ -303,6 +307,9 @@ export namespace AnQst {
|
|
|
303
307
|
Promise = "Passing Promises across the boundary is not allowed",
|
|
304
308
|
Callable = "Passing Callable objects across the boundary is not allowed",
|
|
305
309
|
any = "Passing 'any' type across the boundary is not allowed",
|
|
310
|
+
symbol = "Passing 'symbol' type across the boundary is not allowed",
|
|
311
|
+
unknown = "Passing 'unknown' type across the boundary is not allowed",
|
|
312
|
+
never = "Passing 'never' type across the boundary is not allowed",
|
|
306
313
|
}
|
|
307
314
|
|
|
308
315
|
/**
|
|
@@ -325,4 +332,3 @@ export namespace AnQst {
|
|
|
325
332
|
}
|
|
326
333
|
|
|
327
334
|
}
|
|
328
|
-
|