@kumwe/studio-testkit 0.1.0-alpha.2
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/LICENSE +21 -0
- package/README.md +39 -0
- package/conformance/rich-text/blocks.structural.json +57 -0
- package/conformance/rich-text/document.multi-block.json +74 -0
- package/conformance/rich-text/embed.hard-break.json +24 -0
- package/conformance/rich-text/marks.nested.json +29 -0
- package/conformance/rich-text/offsets.astral.json +24 -0
- package/conformance/rich-text/paragraph.plain.json +20 -0
- package/conformance/rich-text/spans.adjacent.json +27 -0
- package/dist/host-testbed.d.ts +40 -0
- package/dist/host-testbed.d.ts.map +1 -0
- package/dist/host-testbed.js +390 -0
- package/dist/host-testbed.js.map +1 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +139 -0
- package/dist/index.js.map +1 -0
- package/fixtures/block.grid.example.json +76 -0
- package/fixtures/block.price.example.json +69 -0
- package/fixtures/blueprint.product.example.json +92 -0
- package/fixtures/command.move-node.example.json +18 -0
- package/fixtures/content-model.product.example.json +141 -0
- package/fixtures/entry.product.example.json +55 -0
- package/fixtures/host-capabilities.example.json +36 -0
- package/fixtures/host-error.conflict.example.json +23 -0
- package/fixtures/media-asset.example.json +29 -0
- package/fixtures/media-asset.processing.example.json +15 -0
- package/fixtures/media-reference.example.json +26 -0
- package/fixtures/media-upload-session.transferring.example.json +22 -0
- package/fixtures/pattern.example.json +49 -0
- package/fixtures/plugin.example.json +49 -0
- package/fixtures/preview.render.example.json +14 -0
- package/fixtures/provenance.example.json +38 -0
- package/fixtures/rich-text.example.json +48 -0
- package/fixtures/studio-config.example.json +139 -0
- package/fixtures/theme.example.json +123 -0
- package/fixtures/unresolved-contribution.example.json +23 -0
- package/invalid/blueprint.control-character-member.json +59 -0
- package/invalid/blueprint.forbidden-property-member.json +61 -0
- package/invalid/blueprint.invalid-node-id.json +57 -0
- package/invalid/blueprint.invalid-slot-name.json +59 -0
- package/invalid/blueprint.published-empty-roots.json +45 -0
- package/invalid/blueprint.unknown-member.json +58 -0
- package/invalid/command-vector.unknown-error-code.json +103 -0
- package/invalid/command.empty-batch.json +17 -0
- package/invalid/command.forbidden-id-map-member.json +20 -0
- package/invalid/command.negative-position.json +20 -0
- package/invalid/command.nested-batch.json +24 -0
- package/invalid/command.pattern-in-batch.json +40 -0
- package/invalid/command.reset-inherited-property-in-batch.json +24 -0
- package/invalid/command.unknown-member.json +23 -0
- package/invalid/command.wrong-contract-version.json +22 -0
- package/invalid/content-model.published-empty.json +22 -0
- package/invalid/entry.forbidden-value-member.json +23 -0
- package/invalid/entry.invalid-locale.json +59 -0
- package/invalid/host-capabilities.invalid-protocol-version.json +40 -0
- package/invalid/media-reference.missing-accessibility.json +25 -0
- package/invalid/media-upload-session.complete-without-asset.json +20 -0
- package/invalid/preview-message.invalid-digest.json +18 -0
- package/invalid/rich-text.embedded-html.json +13 -0
- package/invalid/rich-text.unknown-mark.json +19 -0
- package/invalid/theme.unknown-member.json +128 -0
- package/package.json +48 -0
- package/vectors/command/apply-pattern.colliding-id.error.json +97 -0
- package/vectors/command/apply-pattern.incomplete-id-map.error.json +111 -0
- package/vectors/command/apply-pattern.two-roots.json +259 -0
- package/vectors/command/batch.atomic-failure.error.json +100 -0
- package/vectors/command/batch.insert-and-configure.json +197 -0
- package/vectors/command/duplicate-node.existing-id.error.json +88 -0
- package/vectors/command/duplicate-node.explicit-destination.json +183 -0
- package/vectors/command/duplicate-node.incomplete-id-map.error.json +91 -0
- package/vectors/command/duplicate-node.subtree.json +201 -0
- package/vectors/command/insert-node.duplicate-id.error.json +87 -0
- package/vectors/command/insert-node.inner-duplicate-id.error.json +115 -0
- package/vectors/command/insert-node.invalid-index.error.json +87 -0
- package/vectors/command/insert-node.root.json +162 -0
- package/vectors/command/insert-node.slot.json +167 -0
- package/vectors/command/move-node.into-self.error.json +95 -0
- package/vectors/command/move-node.reparent.json +196 -0
- package/vectors/command/move-node.within-roots.json +188 -0
- package/vectors/command/remove-binding.base.json +159 -0
- package/vectors/command/remove-binding.missing.error.json +75 -0
- package/vectors/command/remove-node.empties-slot.json +167 -0
- package/vectors/command/remove-node.missing.error.json +74 -0
- package/vectors/command/remove-node.nested.json +192 -0
- package/vectors/command/reorder-children.not-permutation.error.json +85 -0
- package/vectors/command/reorder-children.roots.json +182 -0
- package/vectors/command/reorder-children.slot.json +192 -0
- package/vectors/command/reset-inherited-property.missing.error.json +82 -0
- package/vectors/command/reset-inherited-property.single-viewport.json +151 -0
- package/vectors/command/reset-inherited-property.two-viewports.json +168 -0
- package/vectors/command/restore-node.inner-duplicate-id.error.json +115 -0
- package/vectors/command/restore-node.subtree-into-slot.json +195 -0
- package/vectors/command/set-binding.add.json +159 -0
- package/vectors/command/set-binding.replace.json +178 -0
- package/vectors/command/set-property.add.json +143 -0
- package/vectors/command/set-property.replace.json +146 -0
- package/vectors/command/set-property.viewport-add.json +148 -0
- package/vectors/command/unset-property.base.json +143 -0
- package/vectors/command/unset-property.missing.error.json +75 -0
- package/vectors/command/unset-property.viewport.json +154 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "command-vector",
|
|
4
|
+
"id": "vector.command-vector.duplicate-node.subtree",
|
|
5
|
+
"description": "Duplicating a subtree remaps every identifier through the supplied map and inserts the copy after the source by default.",
|
|
6
|
+
"initial": {
|
|
7
|
+
"contractVersion": "0.1-draft",
|
|
8
|
+
"dependencyLock": {
|
|
9
|
+
"blocks": [
|
|
10
|
+
{
|
|
11
|
+
"revision": "block-r1",
|
|
12
|
+
"type": "studio.vector/section",
|
|
13
|
+
"version": "1.0.0"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"revision": "block-r1",
|
|
17
|
+
"type": "studio.vector/text",
|
|
18
|
+
"version": "1.0.0"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"theme": {
|
|
22
|
+
"id": "studio.vector/theme",
|
|
23
|
+
"revision": "theme-r1",
|
|
24
|
+
"version": "1.0.0"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"id": "vector.blueprint",
|
|
28
|
+
"kind": "blueprint",
|
|
29
|
+
"label": {
|
|
30
|
+
"defaultMessage": "Vector Blueprint",
|
|
31
|
+
"key": "studio.vector/blueprint"
|
|
32
|
+
},
|
|
33
|
+
"model": {
|
|
34
|
+
"id": "studio.vector/model",
|
|
35
|
+
"revision": "model-r1",
|
|
36
|
+
"version": "1.0.0"
|
|
37
|
+
},
|
|
38
|
+
"owner": {
|
|
39
|
+
"id": "studio.vector/suite",
|
|
40
|
+
"version": "0.1.0-alpha.0"
|
|
41
|
+
},
|
|
42
|
+
"revision": "blueprint-r1",
|
|
43
|
+
"roots": [
|
|
44
|
+
{
|
|
45
|
+
"authoring": {
|
|
46
|
+
"mode": "structural"
|
|
47
|
+
},
|
|
48
|
+
"bindings": {},
|
|
49
|
+
"id": "section-a",
|
|
50
|
+
"properties": {},
|
|
51
|
+
"slots": {
|
|
52
|
+
"main": [
|
|
53
|
+
{
|
|
54
|
+
"authoring": {
|
|
55
|
+
"mode": "designer"
|
|
56
|
+
},
|
|
57
|
+
"bindings": {},
|
|
58
|
+
"id": "text-a",
|
|
59
|
+
"properties": {
|
|
60
|
+
"text": "Copy me"
|
|
61
|
+
},
|
|
62
|
+
"slots": {},
|
|
63
|
+
"type": "studio.vector/text",
|
|
64
|
+
"version": "1.0.0"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"type": "studio.vector/section",
|
|
69
|
+
"version": "1.0.0"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"status": "draft",
|
|
73
|
+
"version": "1.0.0"
|
|
74
|
+
},
|
|
75
|
+
"command": {
|
|
76
|
+
"artifactId": "vector.blueprint",
|
|
77
|
+
"baseStateVersion": 0,
|
|
78
|
+
"contractVersion": "0.1-draft",
|
|
79
|
+
"id": "vector.command.duplicate-node.subtree",
|
|
80
|
+
"kind": "command",
|
|
81
|
+
"payload": {
|
|
82
|
+
"idMap": {
|
|
83
|
+
"section-a": "section-a2",
|
|
84
|
+
"text-a": "text-a2"
|
|
85
|
+
},
|
|
86
|
+
"nodeId": "section-a"
|
|
87
|
+
},
|
|
88
|
+
"sessionGeneration": "session-r1",
|
|
89
|
+
"type": "studio.command/duplicate-node"
|
|
90
|
+
},
|
|
91
|
+
"expect": {
|
|
92
|
+
"document": {
|
|
93
|
+
"contractVersion": "0.1-draft",
|
|
94
|
+
"dependencyLock": {
|
|
95
|
+
"blocks": [
|
|
96
|
+
{
|
|
97
|
+
"revision": "block-r1",
|
|
98
|
+
"type": "studio.vector/section",
|
|
99
|
+
"version": "1.0.0"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"revision": "block-r1",
|
|
103
|
+
"type": "studio.vector/text",
|
|
104
|
+
"version": "1.0.0"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"theme": {
|
|
108
|
+
"id": "studio.vector/theme",
|
|
109
|
+
"revision": "theme-r1",
|
|
110
|
+
"version": "1.0.0"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"id": "vector.blueprint",
|
|
114
|
+
"kind": "blueprint",
|
|
115
|
+
"label": {
|
|
116
|
+
"defaultMessage": "Vector Blueprint",
|
|
117
|
+
"key": "studio.vector/blueprint"
|
|
118
|
+
},
|
|
119
|
+
"model": {
|
|
120
|
+
"id": "studio.vector/model",
|
|
121
|
+
"revision": "model-r1",
|
|
122
|
+
"version": "1.0.0"
|
|
123
|
+
},
|
|
124
|
+
"owner": {
|
|
125
|
+
"id": "studio.vector/suite",
|
|
126
|
+
"version": "0.1.0-alpha.0"
|
|
127
|
+
},
|
|
128
|
+
"revision": "blueprint-r1",
|
|
129
|
+
"roots": [
|
|
130
|
+
{
|
|
131
|
+
"authoring": {
|
|
132
|
+
"mode": "structural"
|
|
133
|
+
},
|
|
134
|
+
"bindings": {},
|
|
135
|
+
"id": "section-a",
|
|
136
|
+
"properties": {},
|
|
137
|
+
"slots": {
|
|
138
|
+
"main": [
|
|
139
|
+
{
|
|
140
|
+
"authoring": {
|
|
141
|
+
"mode": "designer"
|
|
142
|
+
},
|
|
143
|
+
"bindings": {},
|
|
144
|
+
"id": "text-a",
|
|
145
|
+
"properties": {
|
|
146
|
+
"text": "Copy me"
|
|
147
|
+
},
|
|
148
|
+
"slots": {},
|
|
149
|
+
"type": "studio.vector/text",
|
|
150
|
+
"version": "1.0.0"
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
"type": "studio.vector/section",
|
|
155
|
+
"version": "1.0.0"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"authoring": {
|
|
159
|
+
"mode": "structural"
|
|
160
|
+
},
|
|
161
|
+
"bindings": {},
|
|
162
|
+
"id": "section-a2",
|
|
163
|
+
"properties": {},
|
|
164
|
+
"slots": {
|
|
165
|
+
"main": [
|
|
166
|
+
{
|
|
167
|
+
"authoring": {
|
|
168
|
+
"mode": "designer"
|
|
169
|
+
},
|
|
170
|
+
"bindings": {},
|
|
171
|
+
"id": "text-a2",
|
|
172
|
+
"properties": {
|
|
173
|
+
"text": "Copy me"
|
|
174
|
+
},
|
|
175
|
+
"slots": {},
|
|
176
|
+
"type": "studio.vector/text",
|
|
177
|
+
"version": "1.0.0"
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
"type": "studio.vector/section",
|
|
182
|
+
"version": "1.0.0"
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
"status": "draft",
|
|
186
|
+
"version": "1.0.0"
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"inverse": {
|
|
190
|
+
"artifactId": "vector.blueprint",
|
|
191
|
+
"baseStateVersion": 1,
|
|
192
|
+
"contractVersion": "0.1-draft",
|
|
193
|
+
"id": "vector.inverse.duplicate-node.subtree",
|
|
194
|
+
"kind": "command",
|
|
195
|
+
"payload": {
|
|
196
|
+
"nodeId": "section-a2"
|
|
197
|
+
},
|
|
198
|
+
"sessionGeneration": "session-r1",
|
|
199
|
+
"type": "studio.command/remove-node"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "command-vector",
|
|
4
|
+
"id": "vector.command-vector.insert-node.duplicate-id.error",
|
|
5
|
+
"description": "Inserting a node whose identifier already exists anywhere in the document fails without changing state.",
|
|
6
|
+
"initial": {
|
|
7
|
+
"contractVersion": "0.1-draft",
|
|
8
|
+
"dependencyLock": {
|
|
9
|
+
"blocks": [
|
|
10
|
+
{
|
|
11
|
+
"revision": "block-r1",
|
|
12
|
+
"type": "studio.vector/section",
|
|
13
|
+
"version": "1.0.0"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"revision": "block-r1",
|
|
17
|
+
"type": "studio.vector/text",
|
|
18
|
+
"version": "1.0.0"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"theme": {
|
|
22
|
+
"id": "studio.vector/theme",
|
|
23
|
+
"revision": "theme-r1",
|
|
24
|
+
"version": "1.0.0"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"id": "vector.blueprint",
|
|
28
|
+
"kind": "blueprint",
|
|
29
|
+
"label": {
|
|
30
|
+
"defaultMessage": "Vector Blueprint",
|
|
31
|
+
"key": "studio.vector/blueprint"
|
|
32
|
+
},
|
|
33
|
+
"model": {
|
|
34
|
+
"id": "studio.vector/model",
|
|
35
|
+
"revision": "model-r1",
|
|
36
|
+
"version": "1.0.0"
|
|
37
|
+
},
|
|
38
|
+
"owner": {
|
|
39
|
+
"id": "studio.vector/suite",
|
|
40
|
+
"version": "0.1.0-alpha.0"
|
|
41
|
+
},
|
|
42
|
+
"revision": "blueprint-r1",
|
|
43
|
+
"roots": [
|
|
44
|
+
{
|
|
45
|
+
"authoring": {
|
|
46
|
+
"mode": "designer"
|
|
47
|
+
},
|
|
48
|
+
"bindings": {},
|
|
49
|
+
"id": "text-a",
|
|
50
|
+
"properties": {},
|
|
51
|
+
"slots": {},
|
|
52
|
+
"type": "studio.vector/text",
|
|
53
|
+
"version": "1.0.0"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"status": "draft",
|
|
57
|
+
"version": "1.0.0"
|
|
58
|
+
},
|
|
59
|
+
"command": {
|
|
60
|
+
"artifactId": "vector.blueprint",
|
|
61
|
+
"baseStateVersion": 0,
|
|
62
|
+
"contractVersion": "0.1-draft",
|
|
63
|
+
"id": "vector.command.insert-node.duplicate-id",
|
|
64
|
+
"kind": "command",
|
|
65
|
+
"payload": {
|
|
66
|
+
"destination": {
|
|
67
|
+
"position": 1
|
|
68
|
+
},
|
|
69
|
+
"node": {
|
|
70
|
+
"authoring": {
|
|
71
|
+
"mode": "designer"
|
|
72
|
+
},
|
|
73
|
+
"bindings": {},
|
|
74
|
+
"id": "text-a",
|
|
75
|
+
"properties": {},
|
|
76
|
+
"slots": {},
|
|
77
|
+
"type": "studio.vector/text",
|
|
78
|
+
"version": "1.0.0"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"sessionGeneration": "session-r1",
|
|
82
|
+
"type": "studio.command/insert-node"
|
|
83
|
+
},
|
|
84
|
+
"expect": {
|
|
85
|
+
"errorCode": "duplicate-node"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "command-vector",
|
|
4
|
+
"id": "vector.command-vector.insert-node.inner-duplicate-id.error",
|
|
5
|
+
"description": "Inserting a subtree fails when any descendant identifier already exists in the document, not only the inserted root.",
|
|
6
|
+
"initial": {
|
|
7
|
+
"contractVersion": "0.1-draft",
|
|
8
|
+
"dependencyLock": {
|
|
9
|
+
"blocks": [
|
|
10
|
+
{
|
|
11
|
+
"revision": "block-r1",
|
|
12
|
+
"type": "studio.vector/section",
|
|
13
|
+
"version": "1.0.0"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"revision": "block-r1",
|
|
17
|
+
"type": "studio.vector/text",
|
|
18
|
+
"version": "1.0.0"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"theme": {
|
|
22
|
+
"id": "studio.vector/theme",
|
|
23
|
+
"revision": "theme-r1",
|
|
24
|
+
"version": "1.0.0"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"id": "vector.blueprint",
|
|
28
|
+
"kind": "blueprint",
|
|
29
|
+
"label": {
|
|
30
|
+
"defaultMessage": "Vector Blueprint",
|
|
31
|
+
"key": "studio.vector/blueprint"
|
|
32
|
+
},
|
|
33
|
+
"model": {
|
|
34
|
+
"id": "studio.vector/model",
|
|
35
|
+
"revision": "model-r1",
|
|
36
|
+
"version": "1.0.0"
|
|
37
|
+
},
|
|
38
|
+
"owner": {
|
|
39
|
+
"id": "studio.vector/suite",
|
|
40
|
+
"version": "0.1.0-alpha.0"
|
|
41
|
+
},
|
|
42
|
+
"revision": "blueprint-r1",
|
|
43
|
+
"roots": [
|
|
44
|
+
{
|
|
45
|
+
"authoring": {
|
|
46
|
+
"mode": "structural"
|
|
47
|
+
},
|
|
48
|
+
"bindings": {},
|
|
49
|
+
"id": "section-a",
|
|
50
|
+
"properties": {},
|
|
51
|
+
"slots": {
|
|
52
|
+
"main": [
|
|
53
|
+
{
|
|
54
|
+
"authoring": {
|
|
55
|
+
"mode": "designer"
|
|
56
|
+
},
|
|
57
|
+
"bindings": {},
|
|
58
|
+
"id": "text-a",
|
|
59
|
+
"properties": {},
|
|
60
|
+
"slots": {},
|
|
61
|
+
"type": "studio.vector/text",
|
|
62
|
+
"version": "1.0.0"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"type": "studio.vector/section",
|
|
67
|
+
"version": "1.0.0"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"status": "draft",
|
|
71
|
+
"version": "1.0.0"
|
|
72
|
+
},
|
|
73
|
+
"command": {
|
|
74
|
+
"artifactId": "vector.blueprint",
|
|
75
|
+
"baseStateVersion": 0,
|
|
76
|
+
"contractVersion": "0.1-draft",
|
|
77
|
+
"id": "vector.command.insert-node.inner-duplicate-id",
|
|
78
|
+
"kind": "command",
|
|
79
|
+
"payload": {
|
|
80
|
+
"destination": {
|
|
81
|
+
"position": 1
|
|
82
|
+
},
|
|
83
|
+
"node": {
|
|
84
|
+
"authoring": {
|
|
85
|
+
"mode": "structural"
|
|
86
|
+
},
|
|
87
|
+
"bindings": {},
|
|
88
|
+
"id": "section-b",
|
|
89
|
+
"properties": {},
|
|
90
|
+
"slots": {
|
|
91
|
+
"main": [
|
|
92
|
+
{
|
|
93
|
+
"authoring": {
|
|
94
|
+
"mode": "designer"
|
|
95
|
+
},
|
|
96
|
+
"bindings": {},
|
|
97
|
+
"id": "text-a",
|
|
98
|
+
"properties": {},
|
|
99
|
+
"slots": {},
|
|
100
|
+
"type": "studio.vector/text",
|
|
101
|
+
"version": "1.0.0"
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
"type": "studio.vector/section",
|
|
106
|
+
"version": "1.0.0"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"sessionGeneration": "session-r1",
|
|
110
|
+
"type": "studio.command/insert-node"
|
|
111
|
+
},
|
|
112
|
+
"expect": {
|
|
113
|
+
"errorCode": "duplicate-node"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "command-vector",
|
|
4
|
+
"id": "vector.command-vector.insert-node.invalid-index.error",
|
|
5
|
+
"description": "An insertion position beyond the end of the target collection is rejected.",
|
|
6
|
+
"initial": {
|
|
7
|
+
"contractVersion": "0.1-draft",
|
|
8
|
+
"dependencyLock": {
|
|
9
|
+
"blocks": [
|
|
10
|
+
{
|
|
11
|
+
"revision": "block-r1",
|
|
12
|
+
"type": "studio.vector/section",
|
|
13
|
+
"version": "1.0.0"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"revision": "block-r1",
|
|
17
|
+
"type": "studio.vector/text",
|
|
18
|
+
"version": "1.0.0"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"theme": {
|
|
22
|
+
"id": "studio.vector/theme",
|
|
23
|
+
"revision": "theme-r1",
|
|
24
|
+
"version": "1.0.0"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"id": "vector.blueprint",
|
|
28
|
+
"kind": "blueprint",
|
|
29
|
+
"label": {
|
|
30
|
+
"defaultMessage": "Vector Blueprint",
|
|
31
|
+
"key": "studio.vector/blueprint"
|
|
32
|
+
},
|
|
33
|
+
"model": {
|
|
34
|
+
"id": "studio.vector/model",
|
|
35
|
+
"revision": "model-r1",
|
|
36
|
+
"version": "1.0.0"
|
|
37
|
+
},
|
|
38
|
+
"owner": {
|
|
39
|
+
"id": "studio.vector/suite",
|
|
40
|
+
"version": "0.1.0-alpha.0"
|
|
41
|
+
},
|
|
42
|
+
"revision": "blueprint-r1",
|
|
43
|
+
"roots": [
|
|
44
|
+
{
|
|
45
|
+
"authoring": {
|
|
46
|
+
"mode": "designer"
|
|
47
|
+
},
|
|
48
|
+
"bindings": {},
|
|
49
|
+
"id": "text-a",
|
|
50
|
+
"properties": {},
|
|
51
|
+
"slots": {},
|
|
52
|
+
"type": "studio.vector/text",
|
|
53
|
+
"version": "1.0.0"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"status": "draft",
|
|
57
|
+
"version": "1.0.0"
|
|
58
|
+
},
|
|
59
|
+
"command": {
|
|
60
|
+
"artifactId": "vector.blueprint",
|
|
61
|
+
"baseStateVersion": 0,
|
|
62
|
+
"contractVersion": "0.1-draft",
|
|
63
|
+
"id": "vector.command.insert-node.invalid-index",
|
|
64
|
+
"kind": "command",
|
|
65
|
+
"payload": {
|
|
66
|
+
"destination": {
|
|
67
|
+
"position": 5
|
|
68
|
+
},
|
|
69
|
+
"node": {
|
|
70
|
+
"authoring": {
|
|
71
|
+
"mode": "designer"
|
|
72
|
+
},
|
|
73
|
+
"bindings": {},
|
|
74
|
+
"id": "text-b",
|
|
75
|
+
"properties": {},
|
|
76
|
+
"slots": {},
|
|
77
|
+
"type": "studio.vector/text",
|
|
78
|
+
"version": "1.0.0"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"sessionGeneration": "session-r1",
|
|
82
|
+
"type": "studio.command/insert-node"
|
|
83
|
+
},
|
|
84
|
+
"expect": {
|
|
85
|
+
"errorCode": "invalid-index"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "command-vector",
|
|
4
|
+
"id": "vector.command-vector.insert-node.root",
|
|
5
|
+
"description": "Inserting a node at a root position appends it exactly there; the inverse removal restores the prior document.",
|
|
6
|
+
"initial": {
|
|
7
|
+
"contractVersion": "0.1-draft",
|
|
8
|
+
"dependencyLock": {
|
|
9
|
+
"blocks": [
|
|
10
|
+
{
|
|
11
|
+
"revision": "block-r1",
|
|
12
|
+
"type": "studio.vector/section",
|
|
13
|
+
"version": "1.0.0"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"revision": "block-r1",
|
|
17
|
+
"type": "studio.vector/text",
|
|
18
|
+
"version": "1.0.0"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"theme": {
|
|
22
|
+
"id": "studio.vector/theme",
|
|
23
|
+
"revision": "theme-r1",
|
|
24
|
+
"version": "1.0.0"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"id": "vector.blueprint",
|
|
28
|
+
"kind": "blueprint",
|
|
29
|
+
"label": {
|
|
30
|
+
"defaultMessage": "Vector Blueprint",
|
|
31
|
+
"key": "studio.vector/blueprint"
|
|
32
|
+
},
|
|
33
|
+
"model": {
|
|
34
|
+
"id": "studio.vector/model",
|
|
35
|
+
"revision": "model-r1",
|
|
36
|
+
"version": "1.0.0"
|
|
37
|
+
},
|
|
38
|
+
"owner": {
|
|
39
|
+
"id": "studio.vector/suite",
|
|
40
|
+
"version": "0.1.0-alpha.0"
|
|
41
|
+
},
|
|
42
|
+
"revision": "blueprint-r1",
|
|
43
|
+
"roots": [
|
|
44
|
+
{
|
|
45
|
+
"authoring": {
|
|
46
|
+
"mode": "designer"
|
|
47
|
+
},
|
|
48
|
+
"bindings": {},
|
|
49
|
+
"id": "text-a",
|
|
50
|
+
"properties": {},
|
|
51
|
+
"slots": {},
|
|
52
|
+
"type": "studio.vector/text",
|
|
53
|
+
"version": "1.0.0"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"status": "draft",
|
|
57
|
+
"version": "1.0.0"
|
|
58
|
+
},
|
|
59
|
+
"command": {
|
|
60
|
+
"artifactId": "vector.blueprint",
|
|
61
|
+
"baseStateVersion": 0,
|
|
62
|
+
"contractVersion": "0.1-draft",
|
|
63
|
+
"id": "vector.command.insert-node.root",
|
|
64
|
+
"kind": "command",
|
|
65
|
+
"payload": {
|
|
66
|
+
"destination": {
|
|
67
|
+
"position": 1
|
|
68
|
+
},
|
|
69
|
+
"node": {
|
|
70
|
+
"authoring": {
|
|
71
|
+
"mode": "designer"
|
|
72
|
+
},
|
|
73
|
+
"bindings": {},
|
|
74
|
+
"id": "text-b",
|
|
75
|
+
"properties": {},
|
|
76
|
+
"slots": {},
|
|
77
|
+
"type": "studio.vector/text",
|
|
78
|
+
"version": "1.0.0"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"sessionGeneration": "session-r1",
|
|
82
|
+
"type": "studio.command/insert-node"
|
|
83
|
+
},
|
|
84
|
+
"expect": {
|
|
85
|
+
"document": {
|
|
86
|
+
"contractVersion": "0.1-draft",
|
|
87
|
+
"dependencyLock": {
|
|
88
|
+
"blocks": [
|
|
89
|
+
{
|
|
90
|
+
"revision": "block-r1",
|
|
91
|
+
"type": "studio.vector/section",
|
|
92
|
+
"version": "1.0.0"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"revision": "block-r1",
|
|
96
|
+
"type": "studio.vector/text",
|
|
97
|
+
"version": "1.0.0"
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"theme": {
|
|
101
|
+
"id": "studio.vector/theme",
|
|
102
|
+
"revision": "theme-r1",
|
|
103
|
+
"version": "1.0.0"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"id": "vector.blueprint",
|
|
107
|
+
"kind": "blueprint",
|
|
108
|
+
"label": {
|
|
109
|
+
"defaultMessage": "Vector Blueprint",
|
|
110
|
+
"key": "studio.vector/blueprint"
|
|
111
|
+
},
|
|
112
|
+
"model": {
|
|
113
|
+
"id": "studio.vector/model",
|
|
114
|
+
"revision": "model-r1",
|
|
115
|
+
"version": "1.0.0"
|
|
116
|
+
},
|
|
117
|
+
"owner": {
|
|
118
|
+
"id": "studio.vector/suite",
|
|
119
|
+
"version": "0.1.0-alpha.0"
|
|
120
|
+
},
|
|
121
|
+
"revision": "blueprint-r1",
|
|
122
|
+
"roots": [
|
|
123
|
+
{
|
|
124
|
+
"authoring": {
|
|
125
|
+
"mode": "designer"
|
|
126
|
+
},
|
|
127
|
+
"bindings": {},
|
|
128
|
+
"id": "text-a",
|
|
129
|
+
"properties": {},
|
|
130
|
+
"slots": {},
|
|
131
|
+
"type": "studio.vector/text",
|
|
132
|
+
"version": "1.0.0"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"authoring": {
|
|
136
|
+
"mode": "designer"
|
|
137
|
+
},
|
|
138
|
+
"bindings": {},
|
|
139
|
+
"id": "text-b",
|
|
140
|
+
"properties": {},
|
|
141
|
+
"slots": {},
|
|
142
|
+
"type": "studio.vector/text",
|
|
143
|
+
"version": "1.0.0"
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
"status": "draft",
|
|
147
|
+
"version": "1.0.0"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"inverse": {
|
|
151
|
+
"artifactId": "vector.blueprint",
|
|
152
|
+
"baseStateVersion": 1,
|
|
153
|
+
"contractVersion": "0.1-draft",
|
|
154
|
+
"id": "vector.inverse.insert-node.root",
|
|
155
|
+
"kind": "command",
|
|
156
|
+
"payload": {
|
|
157
|
+
"nodeId": "text-b"
|
|
158
|
+
},
|
|
159
|
+
"sessionGeneration": "session-r1",
|
|
160
|
+
"type": "studio.command/remove-node"
|
|
161
|
+
}
|
|
162
|
+
}
|