@ankhorage/contracts 25.2.0 → 26.0.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/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/dist/appManifest/bindings.d.ts +3 -3
- package/dist/appManifest/bindings.d.ts.map +1 -1
- package/dist/appManifest/bindings.js +46 -65
- package/dist/appManifest/bindings.js.map +1 -1
- package/dist/appManifest/screens.js +2 -2
- package/dist/appManifest/screens.js.map +1 -1
- package/dist/bindings.d.ts +39 -64
- package/dist/bindings.d.ts.map +1 -1
- package/dist/bindings.js.map +1 -1
- package/dist/structure/generated.d.ts +2 -2
- package/dist/structure/generated.js +2 -2
- package/dist/structure/generated.js.map +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +2 -2
- package/src/appManifest/bindings.ts +46 -72
- package/src/appManifest/screens.ts +2 -2
- package/src/appManifest.test.ts +7 -8
- package/src/bindings.test.ts +86 -516
- package/src/bindings.ts +41 -88
- package/src/contracts.test.ts +10 -20
- package/src/structure/generated.ts +2 -2
- package/src/types.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @ankhorage/contracts
|
|
2
2
|
|
|
3
|
+
## 26.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 74eb129: Replace action and operation binding targets with portable capability invocations and unify readable values as recursive capability binding expressions.
|
|
8
|
+
|
|
3
9
|
## 25.2.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# @ankhorage/contracts
|
|
5
5
|
|
|
6
|
-
         
|
|
7
7
|
|
|
8
8
|
Serializable app, capability, binding, theme, auth, and secret-store contracts for Ankhorage.
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*** Validate every component binding in the authored registry. */
|
|
2
2
|
export declare function isComponentDataBindingRegistry(value: unknown): boolean;
|
|
3
|
-
/*** Validate
|
|
4
|
-
export declare function
|
|
5
|
-
/*** Validate a screen
|
|
3
|
+
/*** Validate a readable capability reference or a recursive binding expression. */
|
|
4
|
+
export declare function isBindingExpression(value: unknown): boolean;
|
|
5
|
+
/*** Validate a screen loader as one portable capability invocation. */
|
|
6
6
|
export declare function isScreenDataLoaderDefinition(value: unknown): boolean;
|
|
7
7
|
//# sourceMappingURL=bindings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../../src/appManifest/bindings.ts"],"names":[],"mappings":"AAKA,kEAAkE;AAClE,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAQtE;AAED,
|
|
1
|
+
{"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../../src/appManifest/bindings.ts"],"names":[],"mappings":"AAKA,kEAAkE;AAClE,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAQtE;AAED,mFAAmF;AACnF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE3D;AAED,uEAAuE;AACvE,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEpE"}
|
|
@@ -6,24 +6,13 @@ export function isComponentDataBindingRegistry(value) {
|
|
|
6
6
|
return (isRecord(value) &&
|
|
7
7
|
Object.entries(value).every(([componentId, binding]) => isComponentDataBinding(binding) && isRecord(binding) && binding.componentId === componentId));
|
|
8
8
|
}
|
|
9
|
-
/*** Validate
|
|
10
|
-
export function
|
|
11
|
-
return (
|
|
12
|
-
typeof value.kind === 'string' &&
|
|
13
|
-
['context', 'event', 'literal', 'operation', 'state'].includes(value.kind) &&
|
|
14
|
-
(value.kind === 'literal'
|
|
15
|
-
? isManifestValue(value.value)
|
|
16
|
-
: value.kind === 'operation'
|
|
17
|
-
? isBindingOperationRef(value.operation) && isOptionalString(value.path)
|
|
18
|
-
: typeof value.path === 'string'));
|
|
9
|
+
/*** Validate a readable capability reference or a recursive binding expression. */
|
|
10
|
+
export function isBindingExpression(value) {
|
|
11
|
+
return isBindingCapabilityReference(value) || isBindingExpressionNode(value);
|
|
19
12
|
}
|
|
20
|
-
/*** Validate a screen
|
|
13
|
+
/*** Validate a screen loader as one portable capability invocation. */
|
|
21
14
|
export function isScreenDataLoaderDefinition(value) {
|
|
22
|
-
return (
|
|
23
|
-
value.kind === 'operation' &&
|
|
24
|
-
isOptionalString(value.id) &&
|
|
25
|
-
isBindingOperationRef(value.operation) &&
|
|
26
|
-
(value.input === undefined || isBindingInputMap(value.input)));
|
|
15
|
+
return isBindingInvocation(value);
|
|
27
16
|
}
|
|
28
17
|
/*** Validate component identity and its property and event bindings. */
|
|
29
18
|
function isComponentDataBinding(value) {
|
|
@@ -36,78 +25,70 @@ function isComponentDataBinding(value) {
|
|
|
36
25
|
(isRecord(value.events) &&
|
|
37
26
|
Object.values(value.events).every((bindings) => Array.isArray(bindings) && bindings.every(isEventBinding)))));
|
|
38
27
|
}
|
|
39
|
-
/*** Validate a property
|
|
28
|
+
/*** Validate a property expression and its lifecycle-specific render behavior. */
|
|
40
29
|
function isPropBinding(value) {
|
|
41
30
|
return (isRecord(value) &&
|
|
42
|
-
|
|
43
|
-
(value.fallback === undefined || isBindingFallback(value.fallback)) &&
|
|
31
|
+
isBindingExpression(value.value) &&
|
|
44
32
|
(value.loading === undefined || isBindingLifecycleBehavior(value.loading)) &&
|
|
45
33
|
(value.error === undefined || isBindingLifecycleBehavior(value.error)) &&
|
|
46
|
-
(value.empty === undefined || isBindingLifecycleBehavior(value.empty))
|
|
47
|
-
isOptionalBindingTransforms(value.transforms));
|
|
34
|
+
(value.empty === undefined || isBindingLifecycleBehavior(value.empty)));
|
|
48
35
|
}
|
|
49
|
-
/*** Validate an event binding and its
|
|
36
|
+
/*** Validate an event binding and its one canonical invocation target. */
|
|
50
37
|
function isEventBinding(value) {
|
|
51
38
|
return (isRecord(value) &&
|
|
52
|
-
|
|
53
|
-
(value.input === undefined || isBindingInputMap(value.input)) &&
|
|
39
|
+
isBindingInvocation(value.target) &&
|
|
54
40
|
(value.when === undefined || isBindingCondition(value.when)));
|
|
55
41
|
}
|
|
56
|
-
/*** Validate
|
|
57
|
-
function
|
|
58
|
-
return (
|
|
59
|
-
(
|
|
60
|
-
(value.kind === 'operation' && isBindingOperationRef(value.operation))));
|
|
42
|
+
/*** Validate a serializable capability invocation and optional result slot. */
|
|
43
|
+
function isBindingInvocation(value) {
|
|
44
|
+
return (isBindingCapabilityReference(value) &&
|
|
45
|
+
(value.input === undefined || isBindingInputMap(value.input)));
|
|
61
46
|
}
|
|
62
|
-
/*** Validate a
|
|
63
|
-
function
|
|
47
|
+
/*** Validate a capability identity with optional output path or cached-result slot. */
|
|
48
|
+
function isBindingCapabilityReference(value) {
|
|
64
49
|
return (isRecord(value) &&
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
(value.
|
|
50
|
+
typeof value.capability === 'string' &&
|
|
51
|
+
value.capability.includes('.') &&
|
|
52
|
+
isOptionalString(value.path) &&
|
|
53
|
+
isOptionalString(value.result));
|
|
68
54
|
}
|
|
69
|
-
/*** Validate
|
|
70
|
-
function
|
|
55
|
+
/*** Validate array, fallback, literal, object and transform expression forms. */
|
|
56
|
+
function isBindingExpressionNode(value) {
|
|
71
57
|
return (isRecord(value) &&
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
58
|
+
((value.kind === 'array' &&
|
|
59
|
+
Array.isArray(value.items) &&
|
|
60
|
+
value.items.every(isBindingExpression)) ||
|
|
61
|
+
(value.kind === 'fallback' &&
|
|
62
|
+
isBindingExpression(value.value) &&
|
|
63
|
+
isBindingExpression(value.fallback)) ||
|
|
64
|
+
(value.kind === 'literal' && isManifestValue(value.value)) ||
|
|
65
|
+
(value.kind === 'object' && isBindingInputMap(value.fields)) ||
|
|
66
|
+
(value.kind === 'transform' &&
|
|
67
|
+
isBindingExpression(value.value) &&
|
|
68
|
+
isBindingTransforms(value.transforms))));
|
|
75
69
|
}
|
|
76
|
-
/*** Validate
|
|
77
|
-
function
|
|
70
|
+
/*** Validate a condition expressed through the same recursive binding vocabulary. */
|
|
71
|
+
function isBindingCondition(value) {
|
|
78
72
|
return (isRecord(value) &&
|
|
79
|
-
(value.
|
|
80
|
-
|
|
73
|
+
isBindingExpression(value.source) &&
|
|
74
|
+
['eq', 'exists', 'neq', 'notExists'].includes(String(value.operator)) &&
|
|
75
|
+
(value.value === undefined || isBindingExpression(value.value)));
|
|
81
76
|
}
|
|
82
|
-
/*** Validate
|
|
77
|
+
/*** Validate a lifecycle state and its optional bound display expression. */
|
|
83
78
|
function isBindingLifecycleBehavior(value) {
|
|
84
79
|
return (isRecord(value) &&
|
|
85
80
|
typeof value.state === 'string' &&
|
|
86
81
|
['empty', 'error', 'loading'].includes(value.state) &&
|
|
87
|
-
(value.
|
|
82
|
+
(value.value === undefined || isBindingExpression(value.value)) &&
|
|
88
83
|
isOptionalString(value.message));
|
|
89
84
|
}
|
|
90
|
-
/*** Validate
|
|
91
|
-
function isOptionalBindingTransforms(value) {
|
|
92
|
-
return (value === undefined ||
|
|
93
|
-
(Array.isArray(value) &&
|
|
94
|
-
value.every((transform) => ['lowercase', 'trim', 'uppercase'].includes(String(transform)))));
|
|
95
|
-
}
|
|
96
|
-
/*** Validate every value in an operation input mapping. */
|
|
85
|
+
/*** Validate every recursively authored invocation input expression. */
|
|
97
86
|
function isBindingInputMap(value) {
|
|
98
|
-
return isRecord(value) && Object.values(value).every(
|
|
87
|
+
return isRecord(value) && Object.values(value).every(isBindingExpression);
|
|
99
88
|
}
|
|
100
|
-
/*** Validate
|
|
101
|
-
function
|
|
102
|
-
return (
|
|
103
|
-
|
|
104
|
-
((value.kind === 'array' &&
|
|
105
|
-
Array.isArray(value.items) &&
|
|
106
|
-
value.items.every(isBindingInputValue)) ||
|
|
107
|
-
(value.kind === 'literal' && isManifestValue(value.value)) ||
|
|
108
|
-
(value.kind === 'object' && isBindingInputMap(value.fields)) ||
|
|
109
|
-
(value.kind === 'source' &&
|
|
110
|
-
isBindingValueSource(value.source) &&
|
|
111
|
-
isOptionalBindingTransforms(value.transforms))));
|
|
89
|
+
/*** Validate ordered expression transforms. */
|
|
90
|
+
function isBindingTransforms(value) {
|
|
91
|
+
return (Array.isArray(value) &&
|
|
92
|
+
value.every((transform) => ['lowercase', 'trim', 'uppercase'].includes(String(transform))));
|
|
112
93
|
}
|
|
113
94
|
//# sourceMappingURL=bindings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindings.js","sourceRoot":"","sources":["../../src/appManifest/bindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,kEAAkE;AAClE,MAAM,UAAU,8BAA8B,CAAC,KAAc;IAC3D,OAAO,CACL,QAAQ,CAAC,KAAK,CAAC;QACf,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CACzB,CAAC,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE,EAAE,CACzB,sBAAsB,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,WAAW,KAAK,WAAW,CAC9F,CACF,CAAC;AACJ,CAAC;AAED,mEAAmE;AACnE,MAAM,UAAU,oBAAoB,CAAC,KAAc;IACjD,OAAO,CACL,QAAQ,CAAC,KAAK,CAAC;QACf,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;QAC9B,CAAC,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,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,oBAAoB,CAAC,KAAK,CAAC,MAAM,CAAC;gBAClC,2BAA2B,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CACpD,CAAC;AACJ,CAAC","sourcesContent":["import { isRecord } from '@ankhorage/utility/object';\nimport { isOptionalString } from '@ankhorage/utility/string';\n\nimport { isManifestValue } from './isManifestValue';\n\n/*** Validate every component binding in the authored registry. */\nexport function isComponentDataBindingRegistry(value: unknown): boolean {\n return (\n isRecord(value) &&\n Object.entries(value).every(\n ([componentId, binding]) =>\n isComponentDataBinding(binding) && isRecord(binding) && binding.componentId === componentId,\n )\n );\n}\n\n/*** Validate literal, operation and path-based binding sources. */\nexport function isBindingValueSource(value: unknown): boolean {\n return (\n isRecord(value) &&\n typeof value.kind === 'string' &&\n ['context', 'event', 'literal', 'operation', 'state'].includes(value.kind) &&\n (value.kind === 'literal'\n ? isManifestValue(value.value)\n : value.kind === 'operation'\n ? isBindingOperationRef(value.operation) && isOptionalString(value.path)\n : typeof value.path === 'string')\n );\n}\n\n/*** Validate a screen operation loader and its optional input mapping. */\nexport function isScreenDataLoaderDefinition(value: unknown): boolean {\n return (\n isRecord(value) &&\n value.kind === 'operation' &&\n isOptionalString(value.id) &&\n isBindingOperationRef(value.operation) &&\n (value.input === undefined || isBindingInputMap(value.input))\n );\n}\n\n/*** Validate component identity and its property and event bindings. */\nfunction isComponentDataBinding(value: unknown): boolean {\n return (\n isRecord(value) &&\n typeof value.componentId === 'string' &&\n isOptionalString(value.componentType) &&\n (value.props === undefined ||\n (isRecord(value.props) && Object.values(value.props).every(isPropBinding))) &&\n (value.events === undefined ||\n (isRecord(value.events) &&\n Object.values(value.events).every(\n (bindings) => Array.isArray(bindings) && bindings.every(isEventBinding),\n )))\n );\n}\n\n/*** Validate a property binding with optional transforms and fallback behavior. */\nfunction isPropBinding(value: unknown): boolean {\n return (\n isRecord(value) &&\n isBindingValueSource(value.source) &&\n (value.fallback === undefined || isBindingFallback(value.fallback)) &&\n (value.loading === undefined || isBindingLifecycleBehavior(value.loading)) &&\n (value.error === undefined || isBindingLifecycleBehavior(value.error)) &&\n (value.empty === undefined || isBindingLifecycleBehavior(value.empty)) &&\n isOptionalBindingTransforms(value.transforms)\n );\n}\n\n/*** Validate an event binding and its declared target. */\nfunction isEventBinding(value: unknown): boolean {\n return (\n isRecord(value) &&\n isEventBindingTarget(value.target) &&\n (value.input === undefined || isBindingInputMap(value.input)) &&\n (value.when === undefined || isBindingCondition(value.when))\n );\n}\n\n/*** Validate the selected operation or action event target. */\nfunction isEventBindingTarget(value: unknown): boolean {\n return (\n isRecord(value) &&\n ((value.kind === 'action' && typeof value.type === 'string') ||\n (value.kind === 'operation' && isBindingOperationRef(value.operation)))\n );\n}\n\n/*** Validate a binding condition and its source value. */\nfunction isBindingCondition(value: unknown): boolean {\n return (\n isRecord(value) &&\n isBindingValueSource(value.source) &&\n ['eq', 'exists', 'neq', 'notExists'].includes(String(value.operator)) &&\n (value.value === undefined || isManifestValue(value.value))\n );\n}\n\n/*** Validate API and operation identities with an optional endpoint reference. */\nfunction isBindingOperationRef(value: unknown): boolean {\n return (\n isRecord(value) &&\n typeof value.apiId === 'string' &&\n typeof value.operationId === 'string' &&\n isOptionalString(value.endpointId)\n );\n}\n\n/*** Validate authored binding fallback values. */\nfunction isBindingFallback(value: unknown): boolean {\n return (\n isRecord(value) &&\n (value.value === undefined || isManifestValue(value.value)) &&\n (value.source === undefined || isBindingValueSource(value.source))\n );\n}\n\n/*** Validate loading, empty and error binding behavior. */\nfunction isBindingLifecycleBehavior(value: unknown): boolean {\n return (\n isRecord(value) &&\n typeof value.state === 'string' &&\n ['empty', 'error', 'loading'].includes(value.state) &&\n (value.fallback === undefined || isBindingFallback(value.fallback)) &&\n isOptionalString(value.message)\n );\n}\n\n/*** Validate optional ordered binding transformations. */\nfunction isOptionalBindingTransforms(value: unknown): boolean {\n return (\n value === undefined ||\n (Array.isArray(value) &&\n value.every((transform) => ['lowercase', 'trim', 'uppercase'].includes(String(transform))))\n );\n}\n\n/*** Validate every value in an operation input mapping. */\nfunction isBindingInputMap(value: unknown): boolean {\n return isRecord(value) && Object.values(value).every(isBindingInputValue);\n}\n\n/*** Validate recursive array, object, literal and source operation inputs. */\nfunction isBindingInputValue(value: unknown): boolean {\n return (\n isRecord(value) &&\n typeof value.kind === 'string' &&\n ((value.kind === 'array' &&\n Array.isArray(value.items) &&\n value.items.every(isBindingInputValue)) ||\n (value.kind === 'literal' && isManifestValue(value.value)) ||\n (value.kind === 'object' && isBindingInputMap(value.fields)) ||\n (value.kind === 'source' &&\n isBindingValueSource(value.source) &&\n isOptionalBindingTransforms(value.transforms)))\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"bindings.js","sourceRoot":"","sources":["../../src/appManifest/bindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,kEAAkE;AAClE,MAAM,UAAU,8BAA8B,CAAC,KAAc;IAC3D,OAAO,CACL,QAAQ,CAAC,KAAK,CAAC;QACf,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CACzB,CAAC,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE,EAAE,CACzB,sBAAsB,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,WAAW,KAAK,WAAW,CAC9F,CACF,CAAC;AACJ,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,mBAAmB,CAAC,KAAc;IAChD,OAAO,4BAA4B,CAAC,KAAK,CAAC,IAAI,uBAAuB,CAAC,KAAK,CAAC,CAAC;AAC/E,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,4BAA4B,CAAC,KAAc;IACzD,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC;AAED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S,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAC3F,CAAC;AACJ,CAAC","sourcesContent":["import { isRecord } from '@ankhorage/utility/object';\nimport { isOptionalString } from '@ankhorage/utility/string';\n\nimport { isManifestValue } from './isManifestValue';\n\n/*** Validate every component binding in the authored registry. */\nexport function isComponentDataBindingRegistry(value: unknown): boolean {\n return (\n isRecord(value) &&\n Object.entries(value).every(\n ([componentId, binding]) =>\n isComponentDataBinding(binding) && isRecord(binding) && binding.componentId === componentId,\n )\n );\n}\n\n/*** Validate a readable capability reference or a recursive binding expression. */\nexport function isBindingExpression(value: unknown): boolean {\n return isBindingCapabilityReference(value) || isBindingExpressionNode(value);\n}\n\n/*** Validate a screen loader as one portable capability invocation. */\nexport function isScreenDataLoaderDefinition(value: unknown): boolean {\n return isBindingInvocation(value);\n}\n\n/*** Validate component identity and its property and event bindings. */\nfunction isComponentDataBinding(value: unknown): boolean {\n return (\n isRecord(value) &&\n typeof value.componentId === 'string' &&\n isOptionalString(value.componentType) &&\n (value.props === undefined ||\n (isRecord(value.props) && Object.values(value.props).every(isPropBinding))) &&\n (value.events === undefined ||\n (isRecord(value.events) &&\n Object.values(value.events).every(\n (bindings) => Array.isArray(bindings) && bindings.every(isEventBinding),\n )))\n );\n}\n\n/*** Validate a property expression and its lifecycle-specific render behavior. */\nfunction isPropBinding(value: unknown): boolean {\n return (\n isRecord(value) &&\n isBindingExpression(value.value) &&\n (value.loading === undefined || isBindingLifecycleBehavior(value.loading)) &&\n (value.error === undefined || isBindingLifecycleBehavior(value.error)) &&\n (value.empty === undefined || isBindingLifecycleBehavior(value.empty))\n );\n}\n\n/*** Validate an event binding and its one canonical invocation target. */\nfunction isEventBinding(value: unknown): boolean {\n return (\n isRecord(value) &&\n isBindingInvocation(value.target) &&\n (value.when === undefined || isBindingCondition(value.when))\n );\n}\n\n/*** Validate a serializable capability invocation and optional result slot. */\nfunction isBindingInvocation(value: unknown): boolean {\n return (\n isBindingCapabilityReference(value) &&\n (value.input === undefined || isBindingInputMap(value.input))\n );\n}\n\n/*** Validate a capability identity with optional output path or cached-result slot. */\nfunction isBindingCapabilityReference(value: unknown): value is Record<string, unknown> {\n return (\n isRecord(value) &&\n typeof value.capability === 'string' &&\n value.capability.includes('.') &&\n isOptionalString(value.path) &&\n isOptionalString(value.result)\n );\n}\n\n/*** Validate array, fallback, literal, object and transform expression forms. */\nfunction isBindingExpressionNode(value: unknown): boolean {\n return (\n isRecord(value) &&\n ((value.kind === 'array' &&\n Array.isArray(value.items) &&\n value.items.every(isBindingExpression)) ||\n (value.kind === 'fallback' &&\n isBindingExpression(value.value) &&\n isBindingExpression(value.fallback)) ||\n (value.kind === 'literal' && isManifestValue(value.value)) ||\n (value.kind === 'object' && isBindingInputMap(value.fields)) ||\n (value.kind === 'transform' &&\n isBindingExpression(value.value) &&\n isBindingTransforms(value.transforms)))\n );\n}\n\n/*** Validate a condition expressed through the same recursive binding vocabulary. */\nfunction isBindingCondition(value: unknown): boolean {\n return (\n isRecord(value) &&\n isBindingExpression(value.source) &&\n ['eq', 'exists', 'neq', 'notExists'].includes(String(value.operator)) &&\n (value.value === undefined || isBindingExpression(value.value))\n );\n}\n\n/*** Validate a lifecycle state and its optional bound display expression. */\nfunction isBindingLifecycleBehavior(value: unknown): boolean {\n return (\n isRecord(value) &&\n typeof value.state === 'string' &&\n ['empty', 'error', 'loading'].includes(value.state) &&\n (value.value === undefined || isBindingExpression(value.value)) &&\n isOptionalString(value.message)\n );\n}\n\n/*** Validate every recursively authored invocation input expression. */\nfunction isBindingInputMap(value: unknown): boolean {\n return isRecord(value) && Object.values(value).every(isBindingExpression);\n}\n\n/*** Validate ordered expression transforms. */\nfunction isBindingTransforms(value: unknown): boolean {\n return (\n Array.isArray(value) &&\n value.every((transform) => ['lowercase', 'trim', 'uppercase'].includes(String(transform)))\n );\n}\n"]}
|
|
@@ -5,7 +5,7 @@ import { isSerializableSet } from '../collections';
|
|
|
5
5
|
import { isMediaAssetReference } from '../media';
|
|
6
6
|
import { ANKHORAGE_CAPABILITY_NAMES, ANKHORAGE_PERMISSION_NAMES } from '../requirements';
|
|
7
7
|
import { APP_CATEGORIES } from '../types';
|
|
8
|
-
import {
|
|
8
|
+
import { isBindingExpression, isScreenDataLoaderDefinition } from './bindings';
|
|
9
9
|
export { isAppNavigatorManifest } from './navigator';
|
|
10
10
|
const APP_CATEGORY_SET = new Set(APP_CATEGORIES);
|
|
11
11
|
const COLOR_HARMONY_SET = new Set(COLOR_HARMONIES);
|
|
@@ -70,7 +70,7 @@ function isUiNode(value) {
|
|
|
70
70
|
/*** Validate repeat source and item binding configuration. */
|
|
71
71
|
function isUiNodeRepeatSpec(value) {
|
|
72
72
|
return (isRecord(value) &&
|
|
73
|
-
|
|
73
|
+
isBindingExpression(value.source) &&
|
|
74
74
|
isOptionalString(value.itemAlias) &&
|
|
75
75
|
isOptionalString(value.keyPath) &&
|
|
76
76
|
(value.empty === undefined || (Array.isArray(value.empty) && value.empty.every(isUiNode))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screens.js","sourceRoot":"","sources":["../../src/appManifest/screens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AACzF,OAAO,EAAE,cAAc,EAAsB,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC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KAAc,EAAE,YAAiC;IACzE,OAAO,iBAAiB,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;AAChG,CAAC","sourcesContent":["import { COLOR_HARMONIES } from '@ankhorage/color-theory';\nimport { isRecord } from '@ankhorage/utility/object';\nimport { isOptionalString } from '@ankhorage/utility/string';\n\nimport { isSerializableSet } from '../collections';\nimport { isMediaAssetReference } from '../media';\nimport { ANKHORAGE_CAPABILITY_NAMES, ANKHORAGE_PERMISSION_NAMES } from '../requirements';\nimport { APP_CATEGORIES, type ThemeRegistry } from '../types';\nimport { isBindingValueSource, isScreenDataLoaderDefinition } from './bindings';\n\nexport { isAppNavigatorManifest } from './navigator';\n\nconst APP_CATEGORY_SET = new Set<string>(APP_CATEGORIES);\nconst COLOR_HARMONY_SET = new Set<string>(COLOR_HARMONIES);\nconst SPLASH_SCREEN_RESIZE_MODE_SET = new Set<string>(['contain', 'cover', 'native']);\nconst PERMISSION_NAME_SET = new Set<string>(ANKHORAGE_PERMISSION_NAMES);\nconst CAPABILITY_NAME_SET = new Set<string>(ANKHORAGE_CAPABILITY_NAMES);\n\n/*** Validate application identity and optional authored metadata. */\nexport function isManifestMetadata(value: unknown): boolean {\n return (\n isRecord(value) &&\n typeof value.name === 'string' &&\n typeof value.slug === 'string' &&\n typeof value.version === 'string' &&\n typeof value.category === 'string' &&\n APP_CATEGORY_SET.has(value.category) &&\n typeof value.themeId === 'string' &&\n isOptionalString(value.created) &&\n isOptionalString(value.updated)\n );\n}\n\n/*** Validate theme identity and its required light and dark modes. */\nfunction isThemeConfig(value: unknown): boolean {\n return (\n isRecord(value) &&\n typeof value.id === 'string' &&\n typeof value.name === 'string' &&\n isThemeModeConfig(value.light) &&\n isThemeModeConfig(value.dark)\n );\n}\n\n/*** Validate themes in the authored theme registry and require registry keys to match theme identity. */\nexport function isThemeRegistry(value: unknown): value is ThemeRegistry {\n return (\n isRecord(value) &&\n Object.entries(value).every(\n ([registryKey, theme]) => isThemeConfig(theme) && isRecord(theme) && registryKey === theme.id,\n )\n );\n}\n\n/*** Validate screens in the authored screen registry. */\nexport function isScreenRegistry(value: unknown): boolean {\n return (\n isRecord(value) &&\n Object.entries(value).every(\n ([registryKey, screen]) =>\n isScreenSpec(screen) && isRecord(screen) && registryKey === screen.id,\n )\n );\n}\n\n/*** Validate optional light and dark splash-screen configuration. */\nexport function isSplashScreenSpec(value: unknown): boolean {\n return (\n isSplashScreenModeSpec(value) &&\n isRecord(value) &&\n (value.dark === undefined || isSplashScreenModeSpec(value.dark))\n );\n}\n\n/*** Validate the primary color and supported color harmony of a theme mode. */\nfunction isThemeModeConfig(value: unknown): boolean {\n return (\n isRecord(value) &&\n typeof value.primaryColor === 'string' &&\n typeof value.harmony === 'string' &&\n COLOR_HARMONY_SET.has(value.harmony)\n );\n}\n\n/*** Validate an authored component node and its nested children. */\nfunction isUiNode(value: unknown): boolean {\n return (\n isRecord(value) &&\n typeof value.id === 'string' &&\n typeof value.type === 'string' &&\n isOptionalString(value.alias) &&\n (value.props === undefined || isRecord(value.props)) &&\n (value.style === undefined || isRecord(value.style)) &&\n (value.repeat === undefined || isUiNodeRepeatSpec(value.repeat)) &&\n (value.children === undefined ||\n (Array.isArray(value.children) && value.children.every(isUiNode)))\n );\n}\n\n/*** Validate repeat source and item binding configuration. */\nfunction isUiNodeRepeatSpec(value: unknown): boolean {\n return (\n isRecord(value) &&\n isBindingValueSource(value.source) &&\n isOptionalString(value.itemAlias) &&\n isOptionalString(value.keyPath) &&\n (value.empty === undefined || (Array.isArray(value.empty) && value.empty.every(isUiNode)))\n );\n}\n\n/*** Validate screen identity, root component and optional requirements. */\nfunction isScreenSpec(value: unknown): boolean {\n return (\n isRecord(value) &&\n typeof value.id === 'string' &&\n typeof value.name === 'string' &&\n isOptionalString(value.title) &&\n isOptionalString(value.description) &&\n (value.dataLoaders === undefined ||\n (Array.isArray(value.dataLoaders) &&\n value.dataLoaders.every(isScreenDataLoaderDefinition))) &&\n (value.requires === undefined || isScreenRequirements(value.requires)) &&\n isUiNode(value.root)\n );\n}\n\n/*** Validate one splash-screen appearance configuration. */\nfunction isSplashScreenModeSpec(value: unknown): boolean {\n return (\n isRecord(value) &&\n (value.image === undefined || isMediaAssetReference(value.image)) &&\n (value.imageWidth === undefined || typeof value.imageWidth === 'number') &&\n (value.resizeMode === undefined ||\n (typeof value.resizeMode === 'string' &&\n SPLASH_SCREEN_RESIZE_MODE_SET.has(value.resizeMode))) &&\n isOptionalString(value.backgroundColor)\n );\n}\n\n/*** Validate screen capability and permission requirements. */\nfunction isScreenRequirements(value: unknown): boolean {\n return (\n isRecord(value) &&\n (value.permissions === undefined || isRequirementSet(value.permissions, PERMISSION_NAME_SET)) &&\n (value.capabilities === undefined || isRequirementSet(value.capabilities, CAPABILITY_NAME_SET))\n );\n}\n\n/*** Validate unordered requirement membership against the supported capability or permission names. */\nfunction isRequirementSet(value: unknown, allowedNames: ReadonlySet<string>): boolean {\n return isSerializableSet(value) && Object.keys(value).every((name) => allowedNames.has(name));\n}\n"]}
|
|
1
|
+
{"version":3,"file":"screens.js","sourceRoot":"","sources":["../../src/appManifest/screens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AACzF,OAAO,EAAE,cAAc,EAAsB,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,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AuG;AACvG,SAAS,gBAAgB,CAAC,KAAc,EAAE,YAAiC;IACzE,OAAO,iBAAiB,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;AAChG,CAAC","sourcesContent":["import { COLOR_HARMONIES } from '@ankhorage/color-theory';\nimport { isRecord } from '@ankhorage/utility/object';\nimport { isOptionalString } from '@ankhorage/utility/string';\n\nimport { isSerializableSet } from '../collections';\nimport { isMediaAssetReference } from '../media';\nimport { ANKHORAGE_CAPABILITY_NAMES, ANKHORAGE_PERMISSION_NAMES } from '../requirements';\nimport { APP_CATEGORIES, type ThemeRegistry } from '../types';\nimport { isBindingExpression, isScreenDataLoaderDefinition } from './bindings';\n\nexport { isAppNavigatorManifest } from './navigator';\n\nconst APP_CATEGORY_SET = new Set<string>(APP_CATEGORIES);\nconst COLOR_HARMONY_SET = new Set<string>(COLOR_HARMONIES);\nconst SPLASH_SCREEN_RESIZE_MODE_SET = new Set<string>(['contain', 'cover', 'native']);\nconst PERMISSION_NAME_SET = new Set<string>(ANKHORAGE_PERMISSION_NAMES);\nconst CAPABILITY_NAME_SET = new Set<string>(ANKHORAGE_CAPABILITY_NAMES);\n\n/*** Validate application identity and optional authored metadata. */\nexport function isManifestMetadata(value: unknown): boolean {\n return (\n isRecord(value) &&\n typeof value.name === 'string' &&\n typeof value.slug === 'string' &&\n typeof value.version === 'string' &&\n typeof value.category === 'string' &&\n APP_CATEGORY_SET.has(value.category) &&\n typeof value.themeId === 'string' &&\n isOptionalString(value.created) &&\n isOptionalString(value.updated)\n );\n}\n\n/*** Validate theme identity and its required light and dark modes. */\nfunction isThemeConfig(value: unknown): boolean {\n return (\n isRecord(value) &&\n typeof value.id === 'string' &&\n typeof value.name === 'string' &&\n isThemeModeConfig(value.light) &&\n isThemeModeConfig(value.dark)\n );\n}\n\n/*** Validate themes in the authored theme registry and require registry keys to match theme identity. */\nexport function isThemeRegistry(value: unknown): value is ThemeRegistry {\n return (\n isRecord(value) &&\n Object.entries(value).every(\n ([registryKey, theme]) => isThemeConfig(theme) && isRecord(theme) && registryKey === theme.id,\n )\n );\n}\n\n/*** Validate screens in the authored screen registry. */\nexport function isScreenRegistry(value: unknown): boolean {\n return (\n isRecord(value) &&\n Object.entries(value).every(\n ([registryKey, screen]) =>\n isScreenSpec(screen) && isRecord(screen) && registryKey === screen.id,\n )\n );\n}\n\n/*** Validate optional light and dark splash-screen configuration. */\nexport function isSplashScreenSpec(value: unknown): boolean {\n return (\n isSplashScreenModeSpec(value) &&\n isRecord(value) &&\n (value.dark === undefined || isSplashScreenModeSpec(value.dark))\n );\n}\n\n/*** Validate the primary color and supported color harmony of a theme mode. */\nfunction isThemeModeConfig(value: unknown): boolean {\n return (\n isRecord(value) &&\n typeof value.primaryColor === 'string' &&\n typeof value.harmony === 'string' &&\n COLOR_HARMONY_SET.has(value.harmony)\n );\n}\n\n/*** Validate an authored component node and its nested children. */\nfunction isUiNode(value: unknown): boolean {\n return (\n isRecord(value) &&\n typeof value.id === 'string' &&\n typeof value.type === 'string' &&\n isOptionalString(value.alias) &&\n (value.props === undefined || isRecord(value.props)) &&\n (value.style === undefined || isRecord(value.style)) &&\n (value.repeat === undefined || isUiNodeRepeatSpec(value.repeat)) &&\n (value.children === undefined ||\n (Array.isArray(value.children) && value.children.every(isUiNode)))\n );\n}\n\n/*** Validate repeat source and item binding configuration. */\nfunction isUiNodeRepeatSpec(value: unknown): boolean {\n return (\n isRecord(value) &&\n isBindingExpression(value.source) &&\n isOptionalString(value.itemAlias) &&\n isOptionalString(value.keyPath) &&\n (value.empty === undefined || (Array.isArray(value.empty) && value.empty.every(isUiNode)))\n );\n}\n\n/*** Validate screen identity, root component and optional requirements. */\nfunction isScreenSpec(value: unknown): boolean {\n return (\n isRecord(value) &&\n typeof value.id === 'string' &&\n typeof value.name === 'string' &&\n isOptionalString(value.title) &&\n isOptionalString(value.description) &&\n (value.dataLoaders === undefined ||\n (Array.isArray(value.dataLoaders) &&\n value.dataLoaders.every(isScreenDataLoaderDefinition))) &&\n (value.requires === undefined || isScreenRequirements(value.requires)) &&\n isUiNode(value.root)\n );\n}\n\n/*** Validate one splash-screen appearance configuration. */\nfunction isSplashScreenModeSpec(value: unknown): boolean {\n return (\n isRecord(value) &&\n (value.image === undefined || isMediaAssetReference(value.image)) &&\n (value.imageWidth === undefined || typeof value.imageWidth === 'number') &&\n (value.resizeMode === undefined ||\n (typeof value.resizeMode === 'string' &&\n SPLASH_SCREEN_RESIZE_MODE_SET.has(value.resizeMode))) &&\n isOptionalString(value.backgroundColor)\n );\n}\n\n/*** Validate screen capability and permission requirements. */\nfunction isScreenRequirements(value: unknown): boolean {\n return (\n isRecord(value) &&\n (value.permissions === undefined || isRequirementSet(value.permissions, PERMISSION_NAME_SET)) &&\n (value.capabilities === undefined || isRequirementSet(value.capabilities, CAPABILITY_NAME_SET))\n );\n}\n\n/*** Validate unordered requirement membership against the supported capability or permission names. */\nfunction isRequirementSet(value: unknown, allowedNames: ReadonlySet<string>): boolean {\n return isSerializableSet(value) && Object.keys(value).every((name) => allowedNames.has(name));\n}\n"]}
|
package/dist/bindings.d.ts
CHANGED
|
@@ -1,93 +1,68 @@
|
|
|
1
|
+
import type { Capability } from './capability';
|
|
1
2
|
import type { EntityRegistry, ValueMap } from './collections';
|
|
2
|
-
import type { ApiId, EndpointId, OperationId } from './data';
|
|
3
3
|
import type { SerializableValue } from './serializable';
|
|
4
4
|
export type ComponentInstanceId = string;
|
|
5
5
|
export type ComponentTypeId = string;
|
|
6
6
|
export type BindingValue = SerializableValue;
|
|
7
7
|
export type BindingDataPath = string;
|
|
8
8
|
export type BindingValueTransform = 'lowercase' | 'trim' | 'uppercase';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
9
|
+
/** A portable reference to a readable capability value or a cached invocation result. */
|
|
10
|
+
export interface BindingCapabilityReference {
|
|
11
|
+
readonly capability: Capability['id'];
|
|
12
|
+
readonly path?: BindingDataPath;
|
|
13
|
+
readonly result?: string;
|
|
14
|
+
}
|
|
15
|
+
/** A portable request to invoke a capability and optionally retain its result in a local slot. */
|
|
16
|
+
export interface BindingInvocation {
|
|
17
|
+
readonly capability: Capability['id'];
|
|
18
|
+
readonly input?: BindingInputMap;
|
|
19
|
+
readonly result?: string;
|
|
13
20
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
readonly
|
|
21
|
+
/** A recursive, serializable value expression used by bindings and invocation inputs. */
|
|
22
|
+
export type BindingExpression = BindingCapabilityReference | {
|
|
23
|
+
readonly kind: 'array';
|
|
24
|
+
readonly items: readonly BindingExpression[];
|
|
17
25
|
} | {
|
|
18
|
-
readonly kind: '
|
|
19
|
-
readonly
|
|
26
|
+
readonly kind: 'fallback';
|
|
27
|
+
readonly value: BindingExpression;
|
|
28
|
+
readonly fallback: BindingExpression;
|
|
20
29
|
} | {
|
|
21
30
|
readonly kind: 'literal';
|
|
22
31
|
readonly value: BindingValue;
|
|
23
32
|
} | {
|
|
24
|
-
readonly kind: '
|
|
25
|
-
readonly
|
|
26
|
-
readonly path?: BindingDataPath;
|
|
33
|
+
readonly kind: 'object';
|
|
34
|
+
readonly fields: ValueMap<string, BindingExpression>;
|
|
27
35
|
} | {
|
|
28
|
-
readonly kind: '
|
|
29
|
-
readonly
|
|
36
|
+
readonly kind: 'transform';
|
|
37
|
+
readonly value: BindingExpression;
|
|
38
|
+
readonly transforms: readonly BindingValueTransform[];
|
|
30
39
|
};
|
|
31
|
-
export
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
export interface
|
|
36
|
-
readonly
|
|
37
|
-
readonly
|
|
40
|
+
export type BindingInputValue = BindingExpression;
|
|
41
|
+
export type BindingInputMap = ValueMap<string, BindingInputValue>;
|
|
42
|
+
export type BindingConditionOperator = 'eq' | 'exists' | 'neq' | 'notExists';
|
|
43
|
+
/** A condition evaluated from portable binding expressions. */
|
|
44
|
+
export interface BindingCondition {
|
|
45
|
+
readonly source: BindingExpression;
|
|
46
|
+
readonly operator: BindingConditionOperator;
|
|
47
|
+
readonly value?: BindingExpression;
|
|
38
48
|
}
|
|
39
|
-
|
|
49
|
+
/** A lifecycle-specific expression rendered when a bound value reaches one state. */
|
|
40
50
|
export interface BindingLifecycleBehavior {
|
|
41
51
|
readonly state: BindingLifecycleState;
|
|
42
|
-
readonly
|
|
52
|
+
readonly value?: BindingExpression;
|
|
43
53
|
readonly message?: string;
|
|
44
54
|
}
|
|
55
|
+
export type BindingLifecycleState = 'empty' | 'error' | 'loading';
|
|
45
56
|
export interface PropBinding {
|
|
46
|
-
readonly
|
|
47
|
-
readonly fallback?: BindingFallback;
|
|
57
|
+
readonly value: BindingExpression;
|
|
48
58
|
readonly loading?: BindingLifecycleBehavior;
|
|
49
59
|
readonly error?: BindingLifecycleBehavior;
|
|
50
60
|
readonly empty?: BindingLifecycleBehavior;
|
|
51
|
-
readonly transforms?: readonly BindingValueTransform[];
|
|
52
61
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
readonly items: readonly BindingInputValue[];
|
|
56
|
-
} | {
|
|
57
|
-
readonly kind: 'literal';
|
|
58
|
-
readonly value: BindingValue;
|
|
59
|
-
} | {
|
|
60
|
-
readonly kind: 'object';
|
|
61
|
-
readonly fields: ValueMap<string, BindingInputValue>;
|
|
62
|
-
} | {
|
|
63
|
-
readonly kind: 'source';
|
|
64
|
-
readonly source: BindingValueSource;
|
|
65
|
-
readonly transforms?: readonly BindingValueTransform[];
|
|
66
|
-
};
|
|
67
|
-
export type BindingInputMap = ValueMap<string, BindingInputValue>;
|
|
68
|
-
export interface OperationScreenDataLoaderDefinition {
|
|
69
|
-
readonly kind: 'operation';
|
|
70
|
-
readonly id?: string;
|
|
71
|
-
readonly operation: BindingOperationRef;
|
|
72
|
-
readonly input?: BindingInputMap;
|
|
73
|
-
}
|
|
74
|
-
export type ScreenDataLoaderDefinition = OperationScreenDataLoaderDefinition;
|
|
75
|
-
export type BindingConditionOperator = 'eq' | 'exists' | 'neq' | 'notExists';
|
|
76
|
-
export interface BindingCondition {
|
|
77
|
-
readonly source: BindingValueSource;
|
|
78
|
-
readonly operator: BindingConditionOperator;
|
|
79
|
-
readonly value?: BindingValue;
|
|
80
|
-
}
|
|
81
|
-
export type EventBindingTarget = {
|
|
82
|
-
readonly kind: 'action';
|
|
83
|
-
readonly type: string;
|
|
84
|
-
} | {
|
|
85
|
-
readonly kind: 'operation';
|
|
86
|
-
readonly operation: BindingOperationRef;
|
|
87
|
-
};
|
|
62
|
+
/** A screen loader is one capability invocation, optionally storing its result by slot name. */
|
|
63
|
+
export type ScreenDataLoaderDefinition = BindingInvocation;
|
|
88
64
|
export interface EventBinding {
|
|
89
|
-
readonly target:
|
|
90
|
-
readonly input?: BindingInputMap;
|
|
65
|
+
readonly target: BindingInvocation;
|
|
91
66
|
readonly when?: BindingCondition;
|
|
92
67
|
}
|
|
93
68
|
export interface ComponentDataBinding {
|
package/dist/bindings.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../src/bindings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../src/bindings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;AACzC,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AACrC,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAC;AAC7C,MAAM,MAAM,eAAe,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AAQ,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC/C,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC,CAAC;CAC7D;AAED,MAAM,MAAM,4BAA4B,GAAG,cAAc,CACvD,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,CACd,CAAC"}
|
package/dist/bindings.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindings.js","sourceRoot":"","sources":["../src/bindings.ts"],"names":[],"mappings":"","sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"bindings.js","sourceRoot":"","sources":["../src/bindings.ts"],"names":[],"mappings":"","sourcesContent":["import type { Capability } from './capability';\nimport type { EntityRegistry, ValueMap } from './collections';\nimport type { SerializableValue } from './serializable';\n\nexport type ComponentInstanceId = string;\nexport type ComponentTypeId = string;\nexport type BindingValue = SerializableValue;\nexport type BindingDataPath = string;\nexport type BindingValueTransform = 'lowercase' | 'trim' | 'uppercase';\n\n/** A portable reference to a readable capability value or a cached invocation result. */\nexport interface BindingCapabilityReference {\n readonly capability: Capability['id'];\n readonly path?: BindingDataPath;\n readonly result?: string;\n}\n\n/** A portable request to invoke a capability and optionally retain its result in a local slot. */\nexport interface BindingInvocation {\n readonly capability: Capability['id'];\n readonly input?: BindingInputMap;\n readonly result?: string;\n}\n\n/** A recursive, serializable value expression used by bindings and invocation inputs. */\nexport type BindingExpression =\n | BindingCapabilityReference\n | { readonly kind: 'array'; readonly items: readonly BindingExpression[] }\n | {\n readonly kind: 'fallback';\n readonly value: BindingExpression;\n readonly fallback: BindingExpression;\n }\n | { readonly kind: 'literal'; readonly value: BindingValue }\n | { readonly kind: 'object'; readonly fields: ValueMap<string, BindingExpression> }\n | {\n readonly kind: 'transform';\n readonly value: BindingExpression;\n readonly transforms: readonly BindingValueTransform[];\n };\n\nexport type BindingInputValue = BindingExpression;\nexport type BindingInputMap = ValueMap<string, BindingInputValue>;\nexport type BindingConditionOperator = 'eq' | 'exists' | 'neq' | 'notExists';\n\n/** A condition evaluated from portable binding expressions. */\nexport interface BindingCondition {\n readonly source: BindingExpression;\n readonly operator: BindingConditionOperator;\n readonly value?: BindingExpression;\n}\n\n/** A lifecycle-specific expression rendered when a bound value reaches one state. */\nexport interface BindingLifecycleBehavior {\n readonly state: BindingLifecycleState;\n readonly value?: BindingExpression;\n readonly message?: string;\n}\n\nexport type BindingLifecycleState = 'empty' | 'error' | 'loading';\n\nexport interface PropBinding {\n readonly value: BindingExpression;\n readonly loading?: BindingLifecycleBehavior;\n readonly error?: BindingLifecycleBehavior;\n readonly empty?: BindingLifecycleBehavior;\n}\n\n/** A screen loader is one capability invocation, optionally storing its result by slot name. */\nexport type ScreenDataLoaderDefinition = BindingInvocation;\n\nexport interface EventBinding {\n readonly target: BindingInvocation;\n readonly when?: BindingCondition;\n}\n\nexport interface ComponentDataBinding {\n readonly componentId: ComponentInstanceId;\n readonly componentType?: ComponentTypeId;\n readonly props?: ValueMap<string, PropBinding>;\n readonly events?: ValueMap<string, readonly EventBinding[]>;\n}\n\nexport type ComponentDataBindingRegistry = EntityRegistry<\n ComponentInstanceId,\n ComponentDataBinding,\n 'componentId'\n>;\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare const STRUCTURE_DESCRIPTOR_COMPILER_VERSION = "6.0.3";
|
|
2
|
-
export declare const STRUCTURE_DESCRIPTOR_FINGERPRINT = "sha256:
|
|
2
|
+
export declare const STRUCTURE_DESCRIPTOR_FINGERPRINT = "sha256:535fb077e79daec8b09c756ed220bd7cb29bdf62d53559e3032ca246dd3f5bd3";
|
|
3
3
|
export declare const STRUCTURE_DESCRIPTOR: {
|
|
4
4
|
readonly protocolVersion: 1;
|
|
5
5
|
readonly packageName: "@ankhorage/contracts";
|
|
6
|
-
readonly packageVersion: "
|
|
6
|
+
readonly packageVersion: "26.0.0";
|
|
7
7
|
readonly roots: {
|
|
8
8
|
readonly "auth-flow": "AuthFlowConfig";
|
|
9
9
|
readonly "auth-profile": "AuthProfileSpec";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export const STRUCTURE_DESCRIPTOR_COMPILER_VERSION = '6.0.3';
|
|
2
|
-
export const STRUCTURE_DESCRIPTOR_FINGERPRINT = 'sha256:
|
|
2
|
+
export const STRUCTURE_DESCRIPTOR_FINGERPRINT = 'sha256:535fb077e79daec8b09c756ed220bd7cb29bdf62d53559e3032ca246dd3f5bd3';
|
|
3
3
|
export const STRUCTURE_DESCRIPTOR = {
|
|
4
4
|
"protocolVersion": 1,
|
|
5
5
|
"packageName": "@ankhorage/contracts",
|
|
6
|
-
"packageVersion": "
|
|
6
|
+
"packageVersion": "26.0.0",
|
|
7
7
|
"roots": {
|
|
8
8
|
"auth-flow": "AuthFlowConfig",
|
|
9
9
|
"auth-profile": "AuthProfileSpec",
|