@player-ui/types 0.4.0 → 0.4.1-next.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.
Files changed (36) hide show
  1. package/dist/index.d.ts +24 -3
  2. package/dist/xlr/Asset.json +40 -0
  3. package/dist/xlr/AssetBinding.json +23 -0
  4. package/dist/xlr/AssetSwitch.json +213 -0
  5. package/dist/xlr/AssetWrapper.json +34 -0
  6. package/dist/xlr/AssetWrapperOrSwitch.json +304 -0
  7. package/dist/xlr/Binding.json +7 -0
  8. package/dist/xlr/BindingRef.json +7 -0
  9. package/dist/xlr/DataModel.json +13 -0
  10. package/dist/xlr/DynamicSwitch.json +96 -0
  11. package/dist/xlr/Expression.json +21 -0
  12. package/dist/xlr/ExpressionObject.json +19 -0
  13. package/dist/xlr/ExpressionRef.json +7 -0
  14. package/dist/xlr/Flow.json +2278 -0
  15. package/dist/xlr/FlowResult.json +131 -0
  16. package/dist/xlr/Navigation.json +783 -0
  17. package/dist/xlr/NavigationBaseState.json +133 -0
  18. package/dist/xlr/NavigationFlow.json +746 -0
  19. package/dist/xlr/NavigationFlowActionState.json +120 -0
  20. package/dist/xlr/NavigationFlowEndState.json +110 -0
  21. package/dist/xlr/NavigationFlowExternalState.json +126 -0
  22. package/dist/xlr/NavigationFlowFlowState.json +125 -0
  23. package/dist/xlr/NavigationFlowState.json +627 -0
  24. package/dist/xlr/NavigationFlowTransition.json +12 -0
  25. package/dist/xlr/NavigationFlowTransitionableState.json +149 -0
  26. package/dist/xlr/NavigationFlowViewState.json +138 -0
  27. package/dist/xlr/StaticSwitch.json +96 -0
  28. package/dist/xlr/Switch.json +71 -0
  29. package/dist/xlr/SwitchCase.json +51 -0
  30. package/dist/xlr/Templatable.json +83 -0
  31. package/dist/xlr/Template.json +65 -0
  32. package/dist/xlr/View.json +185 -0
  33. package/dist/xlr/manifest.js +41 -0
  34. package/dist/xlr/manifest.json +46 -0
  35. package/package.json +9 -1
  36. package/src/index.ts +29 -4
@@ -0,0 +1,149 @@
1
+ {
2
+ "source": "core/types/src/index.ts",
3
+ "name": "NavigationFlowTransitionableState",
4
+ "type": "object",
5
+ "properties": {
6
+ "_comment": {
7
+ "required": false,
8
+ "node": {
9
+ "type": "string",
10
+ "title": "CommentBase._comment",
11
+ "description": "Add comments that will not be processing, but are useful for code explanation"
12
+ }
13
+ },
14
+ "state_type": {
15
+ "required": true,
16
+ "node": {
17
+ "type": "ref",
18
+ "ref": "T",
19
+ "title": "NavigationBaseState.state_type",
20
+ "description": "A property to determine the type of state this is"
21
+ }
22
+ },
23
+ "onStart": {
24
+ "required": false,
25
+ "node": {
26
+ "type": "or",
27
+ "or": [
28
+ {
29
+ "type": "ref",
30
+ "ref": "Expression",
31
+ "title": "NavigationBaseState.onStart"
32
+ },
33
+ {
34
+ "source": "core/types/src/index.ts",
35
+ "name": "ExpressionObject",
36
+ "type": "object",
37
+ "properties": {
38
+ "exp": {
39
+ "required": false,
40
+ "node": {
41
+ "type": "ref",
42
+ "ref": "Expression",
43
+ "title": "ExpressionObject.exp",
44
+ "description": "The expression to run"
45
+ }
46
+ }
47
+ },
48
+ "additionalProperties": false,
49
+ "title": "ExpressionObject",
50
+ "description": "An object with an expression in it"
51
+ }
52
+ ],
53
+ "title": "NavigationBaseState.onStart",
54
+ "description": "An optional expression to run when this view renders"
55
+ }
56
+ },
57
+ "onEnd": {
58
+ "required": false,
59
+ "node": {
60
+ "type": "or",
61
+ "or": [
62
+ {
63
+ "type": "ref",
64
+ "ref": "Expression",
65
+ "title": "NavigationBaseState.onEnd"
66
+ },
67
+ {
68
+ "source": "core/types/src/index.ts",
69
+ "name": "ExpressionObject",
70
+ "type": "object",
71
+ "properties": {
72
+ "exp": {
73
+ "required": false,
74
+ "node": {
75
+ "type": "ref",
76
+ "ref": "Expression",
77
+ "title": "ExpressionObject.exp",
78
+ "description": "The expression to run"
79
+ }
80
+ }
81
+ },
82
+ "additionalProperties": false,
83
+ "title": "ExpressionObject",
84
+ "description": "An object with an expression in it"
85
+ }
86
+ ],
87
+ "title": "NavigationBaseState.onEnd",
88
+ "description": "An optional expression to run before view transition"
89
+ }
90
+ },
91
+ "exp": {
92
+ "required": false,
93
+ "node": {
94
+ "type": "conditional",
95
+ "check": {
96
+ "left": {
97
+ "type": "ref",
98
+ "ref": "T"
99
+ },
100
+ "right": {
101
+ "type": "string",
102
+ "const": "ACTION"
103
+ }
104
+ },
105
+ "value": {
106
+ "true": {
107
+ "type": "ref",
108
+ "ref": "Expression"
109
+ },
110
+ "false": {
111
+ "type": "never"
112
+ }
113
+ },
114
+ "title": "NavigationBaseState.exp",
115
+ "description": "TS gets really confused with both the ActionState and the onStart state both declaring the `exp` property\nSo this explicity says there should never be an exp prop on a state node that's not of type 'ACTION'"
116
+ }
117
+ },
118
+ "transitions": {
119
+ "required": true,
120
+ "node": {
121
+ "source": "core/types/src/index.ts",
122
+ "name": "NavigationFlowTransition",
123
+ "type": "record",
124
+ "keyType": {
125
+ "type": "string"
126
+ },
127
+ "valueType": {
128
+ "type": "string"
129
+ },
130
+ "title": "NavigationFlowTransitionableState.transitions",
131
+ "description": "A mapping of transition-name to FlowState name"
132
+ }
133
+ }
134
+ },
135
+ "additionalProperties": false,
136
+ "title": "NavigationFlowTransitionableState",
137
+ "description": "A generic state that can transition to another state",
138
+ "genericTokens": [
139
+ {
140
+ "symbol": "T",
141
+ "constraints": {
142
+ "type": "string"
143
+ },
144
+ "default": {
145
+ "type": "any"
146
+ }
147
+ }
148
+ ]
149
+ }
@@ -0,0 +1,138 @@
1
+ {
2
+ "source": "core/types/src/index.ts",
3
+ "name": "NavigationFlowViewState",
4
+ "type": "object",
5
+ "properties": {
6
+ "_comment": {
7
+ "required": false,
8
+ "node": {
9
+ "type": "string",
10
+ "title": "CommentBase._comment",
11
+ "description": "Add comments that will not be processing, but are useful for code explanation"
12
+ }
13
+ },
14
+ "state_type": {
15
+ "required": true,
16
+ "node": {
17
+ "type": "string",
18
+ "const": "VIEW",
19
+ "title": "NavigationBaseState.state_type",
20
+ "description": "A property to determine the type of state this is"
21
+ }
22
+ },
23
+ "onStart": {
24
+ "required": false,
25
+ "node": {
26
+ "type": "or",
27
+ "or": [
28
+ {
29
+ "type": "ref",
30
+ "ref": "Expression",
31
+ "title": "NavigationBaseState.onStart"
32
+ },
33
+ {
34
+ "source": "core/types/src/index.ts",
35
+ "name": "ExpressionObject",
36
+ "type": "object",
37
+ "properties": {
38
+ "exp": {
39
+ "required": false,
40
+ "node": {
41
+ "type": "ref",
42
+ "ref": "Expression",
43
+ "title": "ExpressionObject.exp",
44
+ "description": "The expression to run"
45
+ }
46
+ }
47
+ },
48
+ "additionalProperties": false,
49
+ "title": "ExpressionObject",
50
+ "description": "An object with an expression in it"
51
+ }
52
+ ],
53
+ "title": "NavigationBaseState.onStart",
54
+ "description": "An optional expression to run when this view renders"
55
+ }
56
+ },
57
+ "onEnd": {
58
+ "required": false,
59
+ "node": {
60
+ "type": "or",
61
+ "or": [
62
+ {
63
+ "type": "ref",
64
+ "ref": "Expression",
65
+ "title": "NavigationBaseState.onEnd"
66
+ },
67
+ {
68
+ "source": "core/types/src/index.ts",
69
+ "name": "ExpressionObject",
70
+ "type": "object",
71
+ "properties": {
72
+ "exp": {
73
+ "required": false,
74
+ "node": {
75
+ "type": "ref",
76
+ "ref": "Expression",
77
+ "title": "ExpressionObject.exp",
78
+ "description": "The expression to run"
79
+ }
80
+ }
81
+ },
82
+ "additionalProperties": false,
83
+ "title": "ExpressionObject",
84
+ "description": "An object with an expression in it"
85
+ }
86
+ ],
87
+ "title": "NavigationBaseState.onEnd",
88
+ "description": "An optional expression to run before view transition"
89
+ }
90
+ },
91
+ "exp": {
92
+ "required": false,
93
+ "node": {
94
+ "title": "NavigationBaseState.exp",
95
+ "type": "never"
96
+ }
97
+ },
98
+ "transitions": {
99
+ "required": true,
100
+ "node": {
101
+ "source": "core/types/src/index.ts",
102
+ "name": "NavigationFlowTransition",
103
+ "type": "record",
104
+ "keyType": {
105
+ "type": "string"
106
+ },
107
+ "valueType": {
108
+ "type": "string"
109
+ },
110
+ "title": "NavigationFlowTransitionableState.transitions",
111
+ "description": "A mapping of transition-name to FlowState name"
112
+ }
113
+ },
114
+ "ref": {
115
+ "required": true,
116
+ "node": {
117
+ "type": "string",
118
+ "title": "NavigationFlowViewState.ref",
119
+ "description": "An id corresponding to a view from the 'views' array"
120
+ }
121
+ },
122
+ "attributes": {
123
+ "required": false,
124
+ "node": {
125
+ "type": "object",
126
+ "properties": {},
127
+ "additionalProperties": {
128
+ "type": "any"
129
+ },
130
+ "title": "NavigationFlowViewState.attributes",
131
+ "description": "View meta-properties"
132
+ }
133
+ }
134
+ },
135
+ "additionalProperties": false,
136
+ "title": "NavigationFlowViewState",
137
+ "description": "A state representing a view"
138
+ }
@@ -0,0 +1,96 @@
1
+ {
2
+ "source": "core/types/src/index.ts",
3
+ "name": "StaticSwitch",
4
+ "type": "object",
5
+ "properties": {
6
+ "staticSwitch": {
7
+ "required": true,
8
+ "node": {
9
+ "source": "core/types/src/index.ts",
10
+ "name": "Switch",
11
+ "type": "array",
12
+ "elementType": {
13
+ "source": "core/types/src/index.ts",
14
+ "name": "SwitchCase",
15
+ "type": "object",
16
+ "properties": {
17
+ "asset": {
18
+ "required": true,
19
+ "node": {
20
+ "type": "ref",
21
+ "ref": "T",
22
+ "title": "SwitchCase.asset",
23
+ "description": "The Asset to use if this case is applicable"
24
+ }
25
+ },
26
+ "case": {
27
+ "required": true,
28
+ "node": {
29
+ "type": "or",
30
+ "or": [
31
+ {
32
+ "type": "ref",
33
+ "ref": "Expression",
34
+ "title": "SwitchCase.case"
35
+ },
36
+ {
37
+ "type": "boolean",
38
+ "const": true
39
+ }
40
+ ],
41
+ "title": "SwitchCase.case",
42
+ "description": "An expression to execute to determine if this case applies"
43
+ }
44
+ }
45
+ },
46
+ "additionalProperties": false,
47
+ "title": "SwitchCase",
48
+ "description": "A single case statement to use in a switch",
49
+ "genericTokens": [
50
+ {
51
+ "symbol": "T",
52
+ "constraints": {
53
+ "type": "ref",
54
+ "ref": "Asset"
55
+ },
56
+ "default": {
57
+ "type": "ref",
58
+ "ref": "Asset"
59
+ }
60
+ }
61
+ ]
62
+ },
63
+ "title": "StaticSwitch.staticSwitch",
64
+ "description": "A static switch only evaluates the applicable base on first render of the view",
65
+ "genericTokens": [
66
+ {
67
+ "symbol": "T",
68
+ "constraints": {
69
+ "type": "ref",
70
+ "ref": "Asset"
71
+ },
72
+ "default": {
73
+ "type": "ref",
74
+ "ref": "Asset"
75
+ }
76
+ }
77
+ ]
78
+ }
79
+ }
80
+ },
81
+ "additionalProperties": false,
82
+ "title": "StaticSwitch",
83
+ "genericTokens": [
84
+ {
85
+ "symbol": "T",
86
+ "constraints": {
87
+ "type": "ref",
88
+ "ref": "Asset"
89
+ },
90
+ "default": {
91
+ "type": "ref",
92
+ "ref": "Asset"
93
+ }
94
+ }
95
+ ]
96
+ }
@@ -0,0 +1,71 @@
1
+ {
2
+ "source": "core/types/src/index.ts",
3
+ "name": "Switch",
4
+ "type": "array",
5
+ "elementType": {
6
+ "source": "core/types/src/index.ts",
7
+ "name": "SwitchCase",
8
+ "type": "object",
9
+ "properties": {
10
+ "asset": {
11
+ "required": true,
12
+ "node": {
13
+ "type": "ref",
14
+ "ref": "T",
15
+ "title": "SwitchCase.asset",
16
+ "description": "The Asset to use if this case is applicable"
17
+ }
18
+ },
19
+ "case": {
20
+ "required": true,
21
+ "node": {
22
+ "type": "or",
23
+ "or": [
24
+ {
25
+ "type": "ref",
26
+ "ref": "Expression",
27
+ "title": "SwitchCase.case"
28
+ },
29
+ {
30
+ "type": "boolean",
31
+ "const": true
32
+ }
33
+ ],
34
+ "title": "SwitchCase.case",
35
+ "description": "An expression to execute to determine if this case applies"
36
+ }
37
+ }
38
+ },
39
+ "additionalProperties": false,
40
+ "title": "SwitchCase",
41
+ "description": "A single case statement to use in a switch",
42
+ "genericTokens": [
43
+ {
44
+ "symbol": "T",
45
+ "constraints": {
46
+ "type": "ref",
47
+ "ref": "Asset"
48
+ },
49
+ "default": {
50
+ "type": "ref",
51
+ "ref": "Asset"
52
+ }
53
+ }
54
+ ]
55
+ },
56
+ "title": "Switch",
57
+ "description": "A switch can replace an asset with the applicable case on first render",
58
+ "genericTokens": [
59
+ {
60
+ "symbol": "T",
61
+ "constraints": {
62
+ "type": "ref",
63
+ "ref": "Asset"
64
+ },
65
+ "default": {
66
+ "type": "ref",
67
+ "ref": "Asset"
68
+ }
69
+ }
70
+ ]
71
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "source": "core/types/src/index.ts",
3
+ "name": "SwitchCase",
4
+ "type": "object",
5
+ "properties": {
6
+ "asset": {
7
+ "required": true,
8
+ "node": {
9
+ "type": "ref",
10
+ "ref": "T",
11
+ "title": "SwitchCase.asset",
12
+ "description": "The Asset to use if this case is applicable"
13
+ }
14
+ },
15
+ "case": {
16
+ "required": true,
17
+ "node": {
18
+ "type": "or",
19
+ "or": [
20
+ {
21
+ "type": "ref",
22
+ "ref": "Expression",
23
+ "title": "SwitchCase.case"
24
+ },
25
+ {
26
+ "type": "boolean",
27
+ "const": true
28
+ }
29
+ ],
30
+ "title": "SwitchCase.case",
31
+ "description": "An expression to execute to determine if this case applies"
32
+ }
33
+ }
34
+ },
35
+ "additionalProperties": false,
36
+ "title": "SwitchCase",
37
+ "description": "A single case statement to use in a switch",
38
+ "genericTokens": [
39
+ {
40
+ "symbol": "T",
41
+ "constraints": {
42
+ "type": "ref",
43
+ "ref": "Asset"
44
+ },
45
+ "default": {
46
+ "type": "ref",
47
+ "ref": "Asset"
48
+ }
49
+ }
50
+ ]
51
+ }
@@ -0,0 +1,83 @@
1
+ {
2
+ "source": "core/types/src/index.ts",
3
+ "name": "Templatable",
4
+ "type": "object",
5
+ "properties": {
6
+ "template": {
7
+ "required": false,
8
+ "node": {
9
+ "type": "array",
10
+ "elementType": {
11
+ "source": "core/types/src/index.ts",
12
+ "name": "Template",
13
+ "type": "object",
14
+ "properties": {
15
+ "data": {
16
+ "required": true,
17
+ "node": {
18
+ "type": "ref",
19
+ "ref": "Binding",
20
+ "title": "Template.data",
21
+ "description": "A pointer to the data-model containing an array of elements to map over"
22
+ }
23
+ },
24
+ "value": {
25
+ "required": true,
26
+ "node": {
27
+ "type": "ref",
28
+ "ref": "ValueType",
29
+ "title": "Template.value",
30
+ "description": "The template to iterate over using each value in the supplied template data.\nAny reference to _index_ is replaced with the current iteration index."
31
+ }
32
+ },
33
+ "dynamic": {
34
+ "required": false,
35
+ "node": {
36
+ "type": "boolean",
37
+ "title": "Template.dynamic",
38
+ "description": "should the template be recomputed when data changes"
39
+ }
40
+ },
41
+ "output": {
42
+ "required": true,
43
+ "node": {
44
+ "type": "ref",
45
+ "ref": "Key",
46
+ "title": "Template.output",
47
+ "description": "A property on the parent object to store the new map under.\nIf it already exists, values are appended to the end."
48
+ }
49
+ }
50
+ },
51
+ "additionalProperties": false,
52
+ "title": "Template",
53
+ "description": "A template describes a mapping from a data array -> array of objects",
54
+ "genericTokens": [
55
+ {
56
+ "symbol": "ValueType",
57
+ "constraints": {
58
+ "type": "any"
59
+ },
60
+ "default": {
61
+ "type": "unknown"
62
+ }
63
+ },
64
+ {
65
+ "symbol": "Key",
66
+ "constraints": {
67
+ "type": "string"
68
+ },
69
+ "default": {
70
+ "type": "string"
71
+ }
72
+ }
73
+ ]
74
+ },
75
+ "title": "Templatable.template",
76
+ "description": "A list of templates to process for this node"
77
+ }
78
+ }
79
+ },
80
+ "additionalProperties": false,
81
+ "title": "Templatable",
82
+ "description": "Any object that contains 1 or more templates"
83
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "source": "core/types/src/index.ts",
3
+ "name": "Template",
4
+ "type": "object",
5
+ "properties": {
6
+ "data": {
7
+ "required": true,
8
+ "node": {
9
+ "type": "ref",
10
+ "ref": "Binding",
11
+ "title": "Template.data",
12
+ "description": "A pointer to the data-model containing an array of elements to map over"
13
+ }
14
+ },
15
+ "value": {
16
+ "required": true,
17
+ "node": {
18
+ "type": "ref",
19
+ "ref": "ValueType",
20
+ "title": "Template.value",
21
+ "description": "The template to iterate over using each value in the supplied template data.\nAny reference to _index_ is replaced with the current iteration index."
22
+ }
23
+ },
24
+ "dynamic": {
25
+ "required": false,
26
+ "node": {
27
+ "type": "boolean",
28
+ "title": "Template.dynamic",
29
+ "description": "should the template be recomputed when data changes"
30
+ }
31
+ },
32
+ "output": {
33
+ "required": true,
34
+ "node": {
35
+ "type": "ref",
36
+ "ref": "Key",
37
+ "title": "Template.output",
38
+ "description": "A property on the parent object to store the new map under.\nIf it already exists, values are appended to the end."
39
+ }
40
+ }
41
+ },
42
+ "additionalProperties": false,
43
+ "title": "Template",
44
+ "description": "A template describes a mapping from a data array -> array of objects",
45
+ "genericTokens": [
46
+ {
47
+ "symbol": "ValueType",
48
+ "constraints": {
49
+ "type": "any"
50
+ },
51
+ "default": {
52
+ "type": "unknown"
53
+ }
54
+ },
55
+ {
56
+ "symbol": "Key",
57
+ "constraints": {
58
+ "type": "string"
59
+ },
60
+ "default": {
61
+ "type": "string"
62
+ }
63
+ }
64
+ ]
65
+ }