@jarenjs/app 0.66.1 → 0.72.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
|
@@ -251,6 +251,7 @@ Every subpath a consumer can import, derived from the manifest by
|
|
|
251
251
|
| Import | Kind | Declarations |
|
|
252
252
|
|---|---|---|
|
|
253
253
|
| `@jarenjs/app` | JavaScript | declared |
|
|
254
|
+
| `@jarenjs/app/schemas/jaren-app.authoring.schema.json` | schema | — |
|
|
254
255
|
| `@jarenjs/app/schemas/jaren-app.draft-07.schema.json` | schema | — |
|
|
255
256
|
| `@jarenjs/app/schemas/jaren-app.schema.json` | schema | — |
|
|
256
257
|
| `@jarenjs/app/package.json` | metadata | — |
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jarenjs/app",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.72.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
7
7
|
"types": "./dist/types/index.d.ts",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"prepack": "npm run build:types"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@jarenjs/core": "^0.
|
|
54
|
-
"@jarenjs/json": "^0.
|
|
55
|
-
"@jarenjs/view": "^0.
|
|
53
|
+
"@jarenjs/core": "^0.72.0",
|
|
54
|
+
"@jarenjs/json": "^0.72.0",
|
|
55
|
+
"@jarenjs/view": "^0.72.0"
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jarenjs.dev/schemas/jaren-app/0.1/authoring",
|
|
4
|
+
"title": "Jaren app document 0.1 (authoring profile)",
|
|
5
|
+
"description": "Authoring profile of the canonical grammar: the document SHAPE only, with queryDocument, stylesheetDocument left open. Constrains decoding on small models, where the full grammar does not decode at all. It is deliberately WEAKER than the canonical schema - a document valid here may be nonsense - so the engine compiler is the gate that makes it safe, and generated documents must be compiled before use.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"$app": {
|
|
9
|
+
"description": "The app format version; absent implies 0.1.",
|
|
10
|
+
"const": "0.1"
|
|
11
|
+
},
|
|
12
|
+
"state": {
|
|
13
|
+
"description": "The initial state: any JSON value, treated as immutable by every boundary."
|
|
14
|
+
},
|
|
15
|
+
"view": {
|
|
16
|
+
"description": "The view: a JSLT stylesheet document (bare rule array or envelope form) whose evaluation against the state must produce a single vnode.",
|
|
17
|
+
"allOf": [
|
|
18
|
+
{
|
|
19
|
+
"$ref": "#/$defs/stylesheetDocument"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"actions": {
|
|
24
|
+
"description": "Named action documents: Jaren JSON Query documents evaluated with $ bound to the state and the externals $event and $payload.",
|
|
25
|
+
"type": "object",
|
|
26
|
+
"additionalProperties": {
|
|
27
|
+
"$ref": "#/$defs/queryDocument"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"subs": {
|
|
31
|
+
"description": "Subscription entries reconciled against the state after every transition.",
|
|
32
|
+
"type": "array",
|
|
33
|
+
"items": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"properties": {
|
|
36
|
+
"run": {
|
|
37
|
+
"description": "The registered subscription handler name.",
|
|
38
|
+
"type": "string",
|
|
39
|
+
"minLength": 1
|
|
40
|
+
},
|
|
41
|
+
"with": {
|
|
42
|
+
"description": "Handler props, passed verbatim (never evaluated). Mutually exclusive with \"withQuery\" and \"for\"."
|
|
43
|
+
},
|
|
44
|
+
"when": {
|
|
45
|
+
"description": "Liveness query, asserted by effective boolean value against the state; absent means always live.",
|
|
46
|
+
"allOf": [
|
|
47
|
+
{
|
|
48
|
+
"$ref": "#/$defs/queryDocument"
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"withQuery": {
|
|
53
|
+
"description": "Dynamic props: a query evaluated against the state per reconciliation; the subscription restarts when its resolved key changes. Under \"for\", \"$item\" is bound per instance. Mutually exclusive with \"with\".",
|
|
54
|
+
"allOf": [
|
|
55
|
+
{
|
|
56
|
+
"$ref": "#/$defs/queryDocument"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"key": {
|
|
61
|
+
"description": "Explicit restart key: a query whose resolved value keys the subscription (by value) instead of the resolved props. Requires \"withQuery\" or \"for\"; \"$item\" is bound per instance under \"for\".",
|
|
62
|
+
"allOf": [
|
|
63
|
+
{
|
|
64
|
+
"$ref": "#/$defs/queryDocument"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"for": {
|
|
69
|
+
"description": "Fan-out: a query whose result is the item set — one running instance per item key, reconciled per state change. \"with\" is not allowed beside it.",
|
|
70
|
+
"allOf": [
|
|
71
|
+
{
|
|
72
|
+
"$ref": "#/$defs/queryDocument"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"required": [
|
|
78
|
+
"run"
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"required": [
|
|
84
|
+
"view"
|
|
85
|
+
],
|
|
86
|
+
"$defs": {
|
|
87
|
+
"stylesheetDocument": {
|
|
88
|
+
"description": "A JSLT stylesheet; validate and compile locally."
|
|
89
|
+
},
|
|
90
|
+
"queryDocument": {
|
|
91
|
+
"description": "A Jaren query expression; validate against the full grammar and compile locally."
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"description": "The view: a JSLT stylesheet document (bare rule array or envelope form) whose evaluation against the state must produce a single vnode.",
|
|
17
17
|
"allOf": [
|
|
18
18
|
{
|
|
19
|
-
"$ref": "
|
|
19
|
+
"$ref": "#/definitions/stylesheetDocument"
|
|
20
20
|
}
|
|
21
21
|
]
|
|
22
22
|
},
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"description": "Named action documents: Jaren JSON Query documents evaluated with $ bound to the state and the externals $event and $payload.",
|
|
25
25
|
"type": "object",
|
|
26
26
|
"additionalProperties": {
|
|
27
|
-
"$ref": "
|
|
27
|
+
"$ref": "#/definitions/queryDocument"
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"subs": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"description": "Liveness query, asserted by effective boolean value against the state; absent means always live.",
|
|
46
46
|
"allOf": [
|
|
47
47
|
{
|
|
48
|
-
"$ref": "
|
|
48
|
+
"$ref": "#/definitions/queryDocument"
|
|
49
49
|
}
|
|
50
50
|
]
|
|
51
51
|
},
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"description": "Dynamic props: a query evaluated against the state per reconciliation; the subscription restarts when its resolved key changes. Under \"for\", \"$item\" is bound per instance. Mutually exclusive with \"with\".",
|
|
54
54
|
"allOf": [
|
|
55
55
|
{
|
|
56
|
-
"$ref": "
|
|
56
|
+
"$ref": "#/definitions/queryDocument"
|
|
57
57
|
}
|
|
58
58
|
]
|
|
59
59
|
},
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"description": "Explicit restart key: a query whose resolved value keys the subscription (by value) instead of the resolved props. Requires \"withQuery\" or \"for\"; \"$item\" is bound per instance under \"for\".",
|
|
62
62
|
"allOf": [
|
|
63
63
|
{
|
|
64
|
-
"$ref": "
|
|
64
|
+
"$ref": "#/definitions/queryDocument"
|
|
65
65
|
}
|
|
66
66
|
]
|
|
67
67
|
},
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"description": "Fan-out: a query whose result is the item set — one running instance per item key, reconciled per state change. \"with\" is not allowed beside it.",
|
|
70
70
|
"allOf": [
|
|
71
71
|
{
|
|
72
|
-
"$ref": "
|
|
72
|
+
"$ref": "#/definitions/queryDocument"
|
|
73
73
|
}
|
|
74
74
|
]
|
|
75
75
|
}
|
|
@@ -82,5 +82,13 @@
|
|
|
82
82
|
},
|
|
83
83
|
"required": [
|
|
84
84
|
"view"
|
|
85
|
-
]
|
|
85
|
+
],
|
|
86
|
+
"definitions": {
|
|
87
|
+
"stylesheetDocument": {
|
|
88
|
+
"$ref": "https://jarenjs.dev/schemas/jaren-jslt/0.1/draft-07"
|
|
89
|
+
},
|
|
90
|
+
"queryDocument": {
|
|
91
|
+
"$ref": "https://jarenjs.dev/schemas/jaren-query/0.1/draft-07"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
86
94
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://jarenjs.dev/schemas/jaren-app/0.1",
|
|
4
4
|
"title": "Jaren app document 0.1",
|
|
5
|
-
"description": "Structural grammar of a complete Jaren application document (see packages/app/docs/APP-FORMAT.md): initial state, a JSLT view stylesheet, named action documents and subscription entries. Composes the published Jaren query and JSLT grammars by reference
|
|
5
|
+
"description": "Structural grammar of a complete Jaren application document (see packages/app/docs/APP-FORMAT.md): initial state, a JSLT view stylesheet, named action documents and subscription entries. Composes the published Jaren query and JSLT grammars by reference — register those artifacts alongside this one. The view's OUTPUT vocabulary (vnodes) is published separately as the jaren-vnode schema in @jarenjs/view. This schema is structural validation only: the runtime remains authoritative for semantic rules it cannot express — the transition-object shape an action RETURNS ({state?, patch?, effects?}) is the action's runtime result, not its document form; unknown top-level members are ignored for forward compatibility (APP-FORMAT section 2).",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
8
|
"$app": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"description": "The view: a JSLT stylesheet document (bare rule array or envelope form) whose evaluation against the state must produce a single vnode.",
|
|
17
17
|
"allOf": [
|
|
18
18
|
{
|
|
19
|
-
"$ref": "
|
|
19
|
+
"$ref": "#/$defs/stylesheetDocument"
|
|
20
20
|
}
|
|
21
21
|
]
|
|
22
22
|
},
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"description": "Named action documents: Jaren JSON Query documents evaluated with $ bound to the state and the externals $event and $payload.",
|
|
25
25
|
"type": "object",
|
|
26
26
|
"additionalProperties": {
|
|
27
|
-
"$ref": "
|
|
27
|
+
"$ref": "#/$defs/queryDocument"
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"subs": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"description": "Liveness query, asserted by effective boolean value against the state; absent means always live.",
|
|
46
46
|
"allOf": [
|
|
47
47
|
{
|
|
48
|
-
"$ref": "
|
|
48
|
+
"$ref": "#/$defs/queryDocument"
|
|
49
49
|
}
|
|
50
50
|
]
|
|
51
51
|
},
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"description": "Dynamic props: a query evaluated against the state per reconciliation; the subscription restarts when its resolved key changes. Under \"for\", \"$item\" is bound per instance. Mutually exclusive with \"with\".",
|
|
54
54
|
"allOf": [
|
|
55
55
|
{
|
|
56
|
-
"$ref": "
|
|
56
|
+
"$ref": "#/$defs/queryDocument"
|
|
57
57
|
}
|
|
58
58
|
]
|
|
59
59
|
},
|
|
@@ -61,15 +61,15 @@
|
|
|
61
61
|
"description": "Explicit restart key: a query whose resolved value keys the subscription (by value) instead of the resolved props. Requires \"withQuery\" or \"for\"; \"$item\" is bound per instance under \"for\".",
|
|
62
62
|
"allOf": [
|
|
63
63
|
{
|
|
64
|
-
"$ref": "
|
|
64
|
+
"$ref": "#/$defs/queryDocument"
|
|
65
65
|
}
|
|
66
66
|
]
|
|
67
67
|
},
|
|
68
68
|
"for": {
|
|
69
|
-
"description": "Fan-out: a query whose result is the item set
|
|
69
|
+
"description": "Fan-out: a query whose result is the item set — one running instance per item key, reconciled per state change. \"with\" is not allowed beside it.",
|
|
70
70
|
"allOf": [
|
|
71
71
|
{
|
|
72
|
-
"$ref": "
|
|
72
|
+
"$ref": "#/$defs/queryDocument"
|
|
73
73
|
}
|
|
74
74
|
]
|
|
75
75
|
}
|
|
@@ -82,5 +82,13 @@
|
|
|
82
82
|
},
|
|
83
83
|
"required": [
|
|
84
84
|
"view"
|
|
85
|
-
]
|
|
85
|
+
],
|
|
86
|
+
"$defs": {
|
|
87
|
+
"stylesheetDocument": {
|
|
88
|
+
"$ref": "https://jarenjs.dev/schemas/jaren-jslt/0.1"
|
|
89
|
+
},
|
|
90
|
+
"queryDocument": {
|
|
91
|
+
"$ref": "https://jarenjs.dev/schemas/jaren-query/0.1"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
86
94
|
}
|