@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.
Files changed (101) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +39 -0
  3. package/conformance/rich-text/blocks.structural.json +57 -0
  4. package/conformance/rich-text/document.multi-block.json +74 -0
  5. package/conformance/rich-text/embed.hard-break.json +24 -0
  6. package/conformance/rich-text/marks.nested.json +29 -0
  7. package/conformance/rich-text/offsets.astral.json +24 -0
  8. package/conformance/rich-text/paragraph.plain.json +20 -0
  9. package/conformance/rich-text/spans.adjacent.json +27 -0
  10. package/dist/host-testbed.d.ts +40 -0
  11. package/dist/host-testbed.d.ts.map +1 -0
  12. package/dist/host-testbed.js +390 -0
  13. package/dist/host-testbed.js.map +1 -0
  14. package/dist/index.d.ts +29 -0
  15. package/dist/index.d.ts.map +1 -0
  16. package/dist/index.js +139 -0
  17. package/dist/index.js.map +1 -0
  18. package/fixtures/block.grid.example.json +76 -0
  19. package/fixtures/block.price.example.json +69 -0
  20. package/fixtures/blueprint.product.example.json +92 -0
  21. package/fixtures/command.move-node.example.json +18 -0
  22. package/fixtures/content-model.product.example.json +141 -0
  23. package/fixtures/entry.product.example.json +55 -0
  24. package/fixtures/host-capabilities.example.json +36 -0
  25. package/fixtures/host-error.conflict.example.json +23 -0
  26. package/fixtures/media-asset.example.json +29 -0
  27. package/fixtures/media-asset.processing.example.json +15 -0
  28. package/fixtures/media-reference.example.json +26 -0
  29. package/fixtures/media-upload-session.transferring.example.json +22 -0
  30. package/fixtures/pattern.example.json +49 -0
  31. package/fixtures/plugin.example.json +49 -0
  32. package/fixtures/preview.render.example.json +14 -0
  33. package/fixtures/provenance.example.json +38 -0
  34. package/fixtures/rich-text.example.json +48 -0
  35. package/fixtures/studio-config.example.json +139 -0
  36. package/fixtures/theme.example.json +123 -0
  37. package/fixtures/unresolved-contribution.example.json +23 -0
  38. package/invalid/blueprint.control-character-member.json +59 -0
  39. package/invalid/blueprint.forbidden-property-member.json +61 -0
  40. package/invalid/blueprint.invalid-node-id.json +57 -0
  41. package/invalid/blueprint.invalid-slot-name.json +59 -0
  42. package/invalid/blueprint.published-empty-roots.json +45 -0
  43. package/invalid/blueprint.unknown-member.json +58 -0
  44. package/invalid/command-vector.unknown-error-code.json +103 -0
  45. package/invalid/command.empty-batch.json +17 -0
  46. package/invalid/command.forbidden-id-map-member.json +20 -0
  47. package/invalid/command.negative-position.json +20 -0
  48. package/invalid/command.nested-batch.json +24 -0
  49. package/invalid/command.pattern-in-batch.json +40 -0
  50. package/invalid/command.reset-inherited-property-in-batch.json +24 -0
  51. package/invalid/command.unknown-member.json +23 -0
  52. package/invalid/command.wrong-contract-version.json +22 -0
  53. package/invalid/content-model.published-empty.json +22 -0
  54. package/invalid/entry.forbidden-value-member.json +23 -0
  55. package/invalid/entry.invalid-locale.json +59 -0
  56. package/invalid/host-capabilities.invalid-protocol-version.json +40 -0
  57. package/invalid/media-reference.missing-accessibility.json +25 -0
  58. package/invalid/media-upload-session.complete-without-asset.json +20 -0
  59. package/invalid/preview-message.invalid-digest.json +18 -0
  60. package/invalid/rich-text.embedded-html.json +13 -0
  61. package/invalid/rich-text.unknown-mark.json +19 -0
  62. package/invalid/theme.unknown-member.json +128 -0
  63. package/package.json +48 -0
  64. package/vectors/command/apply-pattern.colliding-id.error.json +97 -0
  65. package/vectors/command/apply-pattern.incomplete-id-map.error.json +111 -0
  66. package/vectors/command/apply-pattern.two-roots.json +259 -0
  67. package/vectors/command/batch.atomic-failure.error.json +100 -0
  68. package/vectors/command/batch.insert-and-configure.json +197 -0
  69. package/vectors/command/duplicate-node.existing-id.error.json +88 -0
  70. package/vectors/command/duplicate-node.explicit-destination.json +183 -0
  71. package/vectors/command/duplicate-node.incomplete-id-map.error.json +91 -0
  72. package/vectors/command/duplicate-node.subtree.json +201 -0
  73. package/vectors/command/insert-node.duplicate-id.error.json +87 -0
  74. package/vectors/command/insert-node.inner-duplicate-id.error.json +115 -0
  75. package/vectors/command/insert-node.invalid-index.error.json +87 -0
  76. package/vectors/command/insert-node.root.json +162 -0
  77. package/vectors/command/insert-node.slot.json +167 -0
  78. package/vectors/command/move-node.into-self.error.json +95 -0
  79. package/vectors/command/move-node.reparent.json +196 -0
  80. package/vectors/command/move-node.within-roots.json +188 -0
  81. package/vectors/command/remove-binding.base.json +159 -0
  82. package/vectors/command/remove-binding.missing.error.json +75 -0
  83. package/vectors/command/remove-node.empties-slot.json +167 -0
  84. package/vectors/command/remove-node.missing.error.json +74 -0
  85. package/vectors/command/remove-node.nested.json +192 -0
  86. package/vectors/command/reorder-children.not-permutation.error.json +85 -0
  87. package/vectors/command/reorder-children.roots.json +182 -0
  88. package/vectors/command/reorder-children.slot.json +192 -0
  89. package/vectors/command/reset-inherited-property.missing.error.json +82 -0
  90. package/vectors/command/reset-inherited-property.single-viewport.json +151 -0
  91. package/vectors/command/reset-inherited-property.two-viewports.json +168 -0
  92. package/vectors/command/restore-node.inner-duplicate-id.error.json +115 -0
  93. package/vectors/command/restore-node.subtree-into-slot.json +195 -0
  94. package/vectors/command/set-binding.add.json +159 -0
  95. package/vectors/command/set-binding.replace.json +178 -0
  96. package/vectors/command/set-property.add.json +143 -0
  97. package/vectors/command/set-property.replace.json +146 -0
  98. package/vectors/command/set-property.viewport-add.json +148 -0
  99. package/vectors/command/unset-property.base.json +143 -0
  100. package/vectors/command/unset-property.missing.error.json +75 -0
  101. package/vectors/command/unset-property.viewport.json +154 -0
@@ -0,0 +1,76 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "block-definition",
4
+ "type": "studio.core/grid",
5
+ "version": "1.0.0",
6
+ "revision": "grid-block-r1",
7
+ "owner": {
8
+ "id": "studio.core/blocks",
9
+ "version": "1.0.0"
10
+ },
11
+ "label": {
12
+ "key": "studio.blocks/grid",
13
+ "defaultMessage": "Grid"
14
+ },
15
+ "category": "studio.category/layout",
16
+ "icon": {
17
+ "kind": "symbol",
18
+ "value": "grid"
19
+ },
20
+ "propertySchema": {
21
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": ["columns", "collapse"],
25
+ "properties": {
26
+ "columns": {
27
+ "type": "integer",
28
+ "minimum": 1,
29
+ "maximum": 12
30
+ },
31
+ "collapse": {
32
+ "enum": ["preserve", "wrap", "stack"]
33
+ }
34
+ }
35
+ },
36
+ "slots": [
37
+ {
38
+ "id": "items",
39
+ "label": {
40
+ "key": "studio.blocks/grid-items",
41
+ "defaultMessage": "Items"
42
+ },
43
+ "minimum": 0,
44
+ "maximum": 100,
45
+ "ordered": true,
46
+ "accepts": {
47
+ "types": ["org.example.catalog/price"]
48
+ }
49
+ }
50
+ ],
51
+ "ports": [],
52
+ "editingModes": ["blueprint", "content"],
53
+ "themeControls": ["gap", "alignment", "surface"],
54
+ "rendererRequirements": [
55
+ {
56
+ "surface": "web",
57
+ "capability": "studio.renderer/grid",
58
+ "versions": "^1.0.0"
59
+ },
60
+ {
61
+ "surface": "preview",
62
+ "capability": "studio.renderer/grid",
63
+ "versions": "^1.0.0"
64
+ }
65
+ ],
66
+ "accessibility": {
67
+ "category": "structural",
68
+ "accessibleName": "not-applicable",
69
+ "keyboard": {
70
+ "key": "studio.blocks/grid-keyboard",
71
+ "defaultMessage": "Items follow the Blueprint reading order and can be moved through the outline."
72
+ },
73
+ "reducedMotion": "not-applicable",
74
+ "outputChecks": ["studio.check/reading-order"]
75
+ }
76
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "block-definition",
4
+ "type": "org.example.catalog/price",
5
+ "version": "1.0.0",
6
+ "revision": "price-block-r1",
7
+ "owner": {
8
+ "id": "org.example/catalog",
9
+ "version": "1.0.0"
10
+ },
11
+ "label": {
12
+ "key": "org.example.catalog/price-block",
13
+ "defaultMessage": "Product price"
14
+ },
15
+ "category": "org.example.catalog/product",
16
+ "icon": {
17
+ "kind": "asset",
18
+ "path": "icons/price.svg",
19
+ "integrity": "sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="
20
+ },
21
+ "propertySchema": {
22
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "properties": {
26
+ "showCurrency": {
27
+ "type": "boolean",
28
+ "default": true
29
+ }
30
+ }
31
+ },
32
+ "slots": [],
33
+ "ports": [
34
+ {
35
+ "id": "value",
36
+ "label": {
37
+ "key": "org.example.catalog/price-value",
38
+ "defaultMessage": "Price"
39
+ },
40
+ "valueType": "money",
41
+ "required": true,
42
+ "multiple": false
43
+ }
44
+ ],
45
+ "editingModes": ["blueprint", "content"],
46
+ "themeControls": ["emphasis", "alignment"],
47
+ "rendererRequirements": [
48
+ {
49
+ "surface": "web",
50
+ "capability": "org.example.renderer/price",
51
+ "versions": "^1.0.0"
52
+ },
53
+ {
54
+ "surface": "preview",
55
+ "capability": "org.example.renderer/price",
56
+ "versions": "^1.0.0"
57
+ }
58
+ ],
59
+ "accessibility": {
60
+ "category": "text",
61
+ "accessibleName": "derived",
62
+ "keyboard": {
63
+ "key": "org.example.catalog/price-keyboard",
64
+ "defaultMessage": "The price is edited through its bound field."
65
+ },
66
+ "reducedMotion": "not-applicable",
67
+ "outputChecks": ["org.example.check/price-readable"]
68
+ }
69
+ }
@@ -0,0 +1,92 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "blueprint",
4
+ "id": "org.example.blueprints/product-card",
5
+ "version": "1.0.0",
6
+ "revision": "product-card-r5",
7
+ "owner": {
8
+ "id": "org.example/catalog",
9
+ "version": "1.0.0"
10
+ },
11
+ "status": "published",
12
+ "label": {
13
+ "key": "org.example.catalog/product-card",
14
+ "defaultMessage": "Product card"
15
+ },
16
+ "model": {
17
+ "id": "org.example.models/product",
18
+ "version": "1.0.0",
19
+ "revision": "product-model-r1"
20
+ },
21
+ "dependencyLock": {
22
+ "theme": {
23
+ "id": "org.example.themes/commerce",
24
+ "version": "1.0.0",
25
+ "revision": "commerce-theme-r3"
26
+ },
27
+ "blocks": [
28
+ {
29
+ "type": "studio.core/grid",
30
+ "version": "1.0.0",
31
+ "revision": "grid-block-r1"
32
+ },
33
+ {
34
+ "type": "org.example.catalog/price",
35
+ "version": "1.0.0",
36
+ "revision": "price-block-r1"
37
+ }
38
+ ]
39
+ },
40
+ "roots": [
41
+ {
42
+ "id": "node-grid",
43
+ "type": "studio.core/grid",
44
+ "version": "1.0.0",
45
+ "properties": {
46
+ "columns": 1,
47
+ "collapse": "stack",
48
+ "recipe": "product-grid"
49
+ },
50
+ "bindings": {},
51
+ "slots": {
52
+ "items": [
53
+ {
54
+ "id": "node-price",
55
+ "type": "org.example.catalog/price",
56
+ "version": "1.0.0",
57
+ "properties": {
58
+ "showCurrency": true,
59
+ "emphasis": "price"
60
+ },
61
+ "bindings": {
62
+ "value": {
63
+ "source": {
64
+ "kind": "entry-field",
65
+ "fieldPath": ["price"]
66
+ },
67
+ "transforms": [],
68
+ "onNull": "error",
69
+ "onError": "error"
70
+ }
71
+ },
72
+ "slots": {},
73
+ "authoring": {
74
+ "mode": "content"
75
+ }
76
+ }
77
+ ]
78
+ },
79
+ "responsive": {
80
+ "columns": {
81
+ "compact": 1,
82
+ "medium": 2,
83
+ "expanded": 4
84
+ }
85
+ },
86
+ "authoring": {
87
+ "mode": "structural",
88
+ "allowedBlocks": ["org.example.catalog/price"]
89
+ }
90
+ }
91
+ ]
92
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "command",
4
+ "id": "command-01J5",
5
+ "type": "studio.command/move-node",
6
+ "artifactId": "org.example.blueprints/product-card",
7
+ "expectedRevision": "product-card-r5",
8
+ "sessionGeneration": "session-generation-1",
9
+ "baseStateVersion": 12,
10
+ "payload": {
11
+ "nodeId": "node-price",
12
+ "destination": {
13
+ "parentNodeId": "node-grid",
14
+ "slot": "items",
15
+ "position": 0
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,141 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "content-model",
4
+ "id": "org.example.models/product",
5
+ "version": "1.0.0",
6
+ "revision": "product-model-r1",
7
+ "owner": {
8
+ "id": "org.example/catalog",
9
+ "version": "1.0.0"
10
+ },
11
+ "status": "published",
12
+ "label": {
13
+ "key": "org.example.catalog/product-model",
14
+ "defaultMessage": "Product"
15
+ },
16
+ "fields": [
17
+ {
18
+ "id": "name",
19
+ "kind": "string",
20
+ "label": {
21
+ "key": "org.example.catalog/product-name",
22
+ "defaultMessage": "Name"
23
+ },
24
+ "required": true,
25
+ "localized": true,
26
+ "cardinality": "one",
27
+ "semanticRole": "studio.semantic/title",
28
+ "authoring": {
29
+ "control": "studio.control/single-line-text",
30
+ "group": "identity",
31
+ "order": 10,
32
+ "width": "full"
33
+ },
34
+ "constraints": {
35
+ "minLength": 1,
36
+ "maxLength": 200
37
+ }
38
+ },
39
+ {
40
+ "id": "price",
41
+ "kind": "money",
42
+ "label": {
43
+ "key": "org.example.catalog/product-price",
44
+ "defaultMessage": "Price"
45
+ },
46
+ "required": true,
47
+ "localized": false,
48
+ "cardinality": "one",
49
+ "semanticRole": "studio.semantic/price",
50
+ "constraints": {
51
+ "minimum": "0.00",
52
+ "scale": 2
53
+ }
54
+ },
55
+ {
56
+ "id": "featured",
57
+ "kind": "boolean",
58
+ "label": {
59
+ "key": "org.example.catalog/product-featured",
60
+ "defaultMessage": "Featured product"
61
+ },
62
+ "required": true,
63
+ "localized": false,
64
+ "cardinality": "one",
65
+ "defaultValue": false,
66
+ "authoring": {
67
+ "control": "studio.control/switch",
68
+ "group": "presentation",
69
+ "order": 40,
70
+ "width": "half"
71
+ }
72
+ },
73
+ {
74
+ "id": "category",
75
+ "kind": "resource",
76
+ "label": {
77
+ "key": "org.example.catalog/product-category",
78
+ "defaultMessage": "Category"
79
+ },
80
+ "required": false,
81
+ "localized": false,
82
+ "cardinality": "one",
83
+ "authoring": {
84
+ "control": "studio.control/resource-picker",
85
+ "group": "classification",
86
+ "order": 50,
87
+ "width": "full"
88
+ }
89
+ },
90
+ {
91
+ "id": "image",
92
+ "kind": "media",
93
+ "label": {
94
+ "key": "org.example.catalog/product-image",
95
+ "defaultMessage": "Product image"
96
+ },
97
+ "required": true,
98
+ "localized": false,
99
+ "cardinality": "one",
100
+ "semanticRole": "studio.semantic/primary-media",
101
+ "constraints": {
102
+ "allowedMediaKinds": ["image"]
103
+ }
104
+ },
105
+ {
106
+ "id": "description",
107
+ "kind": "rich-text",
108
+ "label": {
109
+ "key": "org.example.catalog/product-description",
110
+ "defaultMessage": "Description"
111
+ },
112
+ "required": false,
113
+ "localized": true,
114
+ "cardinality": "one"
115
+ }
116
+ ],
117
+ "relationships": [
118
+ {
119
+ "id": "category",
120
+ "kind": "many-to-one",
121
+ "label": {
122
+ "key": "org.example.catalog/product-category-relationship",
123
+ "defaultMessage": "Product category"
124
+ },
125
+ "sourceField": "category",
126
+ "targetModel": {
127
+ "id": "org.example.models/category",
128
+ "version": "1.0.0"
129
+ },
130
+ "targetField": "name",
131
+ "required": false,
132
+ "onDelete": "restrict",
133
+ "authoring": {
134
+ "control": "studio.control/resource-picker",
135
+ "allowCreate": false,
136
+ "displayField": "name",
137
+ "searchProvider": "org.example.catalog/category-search"
138
+ }
139
+ }
140
+ ]
141
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "entry",
4
+ "id": "products/trail-backpack",
5
+ "revision": "entry-r7",
6
+ "model": {
7
+ "id": "org.example.models/product",
8
+ "version": "1.0.0",
9
+ "revision": "product-model-r1"
10
+ },
11
+ "status": "draft",
12
+ "locale": "en-NA",
13
+ "workflowState": "org.example.catalog/draft",
14
+ "values": {
15
+ "name": "Trail Backpack",
16
+ "featured": false,
17
+ "category": {
18
+ "resourceType": "org.example.models/category",
19
+ "id": "categories/outdoor"
20
+ },
21
+ "price": {
22
+ "amount": "1499.00",
23
+ "currency": "NAD"
24
+ },
25
+ "image": {
26
+ "contractVersion": "0.1-draft",
27
+ "kind": "media-reference",
28
+ "assetId": "media/trail-backpack-front",
29
+ "assetRevision": "media-r4",
30
+ "usage": "org.example.catalog/product-hero",
31
+ "renditionIntent": {
32
+ "role": "hero",
33
+ "fit": "cover"
34
+ },
35
+ "accessibility": {
36
+ "mode": "informative",
37
+ "altText": "Green trail backpack shown from the front"
38
+ }
39
+ },
40
+ "description": {
41
+ "type": "doc",
42
+ "content": [
43
+ {
44
+ "type": "paragraph",
45
+ "content": [
46
+ {
47
+ "type": "text",
48
+ "text": "A durable pack for long days outdoors."
49
+ }
50
+ ]
51
+ }
52
+ ]
53
+ }
54
+ }
55
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "host-capabilities",
4
+ "host": {
5
+ "id": "org.kumwe/cms",
6
+ "version": "3.0.0-alpha.1",
7
+ "generation": "runtime-generation-42"
8
+ },
9
+ "protocolVersions": ["0.1.0-draft.1"],
10
+ "ports": [
11
+ {
12
+ "id": "studio.port/artifact",
13
+ "version": "1.0.0",
14
+ "operations": ["studio.operation/load", "studio.operation/save", "studio.operation/publish"]
15
+ },
16
+ {
17
+ "id": "studio.port/preview",
18
+ "version": "1.0.0",
19
+ "operations": ["studio.operation/render-preview", "studio.operation/cancel-preview"]
20
+ },
21
+ {
22
+ "id": "studio.port/media",
23
+ "version": "1.0.0",
24
+ "operations": ["studio.operation/search-media", "studio.operation/upload-media"]
25
+ }
26
+ ],
27
+ "capabilities": [
28
+ {
29
+ "id": "studio.host/server-rendered-preview",
30
+ "version": "1.0.0",
31
+ "configuration": {
32
+ "exact": true
33
+ }
34
+ }
35
+ ]
36
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "host-error",
4
+ "category": "conflict",
5
+ "correlationId": "requests/2f6c1f6d",
6
+ "message": {
7
+ "key": "studio.host/save-conflict",
8
+ "defaultMessage": "Another revision was accepted while you were editing."
9
+ },
10
+ "retryable": false,
11
+ "revision": "blueprint-r9",
12
+ "diagnostics": [
13
+ {
14
+ "code": "studio.host/expected-revision-mismatch",
15
+ "severity": "error",
16
+ "message": {
17
+ "key": "studio.host/expected-revision-mismatch",
18
+ "defaultMessage": "The save expected revision blueprint-r8."
19
+ },
20
+ "location": { "artifactId": "landing.blueprint" }
21
+ }
22
+ ]
23
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "media-asset",
4
+ "id": "media/trail-backpack-front",
5
+ "revision": "media-r4",
6
+ "state": "ready",
7
+ "mediaKind": "image",
8
+ "mediaType": "image/avif",
9
+ "byteSize": 483210,
10
+ "filename": "trail-backpack-front.avif",
11
+ "metadata": {
12
+ "width": 2400,
13
+ "height": 1800,
14
+ "altText": "Green trail backpack shown from the front",
15
+ "decorative": false,
16
+ "focalPoint": {
17
+ "x": 0.5,
18
+ "y": 0.46
19
+ }
20
+ },
21
+ "renditions": [
22
+ {
23
+ "id": "card",
24
+ "mediaType": "image/avif",
25
+ "width": 800,
26
+ "height": 600
27
+ }
28
+ ]
29
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "media-asset",
4
+ "id": "media/trail-backpack-side",
5
+ "revision": "media-r1",
6
+ "state": "processing",
7
+ "mediaKind": "image",
8
+ "mediaType": "image/jpeg",
9
+ "byteSize": 7831420,
10
+ "filename": "trail-backpack-side.jpg",
11
+ "metadata": {
12
+ "altText": "Green trail backpack shown from the side",
13
+ "decorative": false
14
+ }
15
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "media-reference",
4
+ "assetId": "media/trail-backpack-front",
5
+ "assetRevision": "media-r4",
6
+ "usage": "org.example.catalog/product-hero",
7
+ "renditionIntent": {
8
+ "role": "hero",
9
+ "fit": "cover",
10
+ "preferredMediaTypes": ["image/avif", "image/webp"]
11
+ },
12
+ "focalPoint": {
13
+ "x": 0.5,
14
+ "y": 0.46
15
+ },
16
+ "cropIntent": {
17
+ "mode": "aspect-ratio",
18
+ "width": 4,
19
+ "height": 3
20
+ },
21
+ "accessibility": {
22
+ "mode": "informative",
23
+ "altText": "Green trail backpack shown from the front",
24
+ "caption": "Trail Backpack in forest green"
25
+ }
26
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "media-upload-session",
4
+ "id": "uploads/2b6f0d31",
5
+ "request": {
6
+ "filename": "trail-backpack-side.jpg",
7
+ "mediaType": "image/jpeg",
8
+ "byteSize": 3145728,
9
+ "purpose": "org.example.catalog/product-gallery",
10
+ "checksum": "sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="
11
+ },
12
+ "plan": {
13
+ "maximumBytes": 10485760,
14
+ "chunkBytes": 1048576,
15
+ "resumable": true
16
+ },
17
+ "state": "transferring",
18
+ "progress": {
19
+ "transferredBytes": 2097152,
20
+ "totalBytes": 3145728
21
+ }
22
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "pattern",
4
+ "id": "patterns/hero-with-caption",
5
+ "version": "1.2.0",
6
+ "revision": "pattern-r3",
7
+ "owner": { "id": "org.example/patterns", "version": "1.2.0" },
8
+ "label": { "key": "org.example/hero-with-caption", "defaultMessage": "Hero with caption" },
9
+ "description": {
10
+ "key": "org.example/hero-with-caption-help",
11
+ "defaultMessage": "A hero section followed by a caption paragraph."
12
+ },
13
+ "blockDependencies": [
14
+ { "type": "studio.vector/section", "version": "1.0.0", "revision": "block-r1" },
15
+ { "type": "studio.vector/text", "version": "1.0.0", "revision": "block-r1" }
16
+ ],
17
+ "roots": [
18
+ {
19
+ "authoring": { "mode": "structural" },
20
+ "bindings": {},
21
+ "id": "section-p",
22
+ "properties": {},
23
+ "slots": {
24
+ "main": [
25
+ {
26
+ "authoring": { "mode": "designer" },
27
+ "bindings": {},
28
+ "id": "text-p",
29
+ "properties": { "text": "Hero" },
30
+ "slots": {},
31
+ "type": "studio.vector/text",
32
+ "version": "1.0.0"
33
+ }
34
+ ]
35
+ },
36
+ "type": "studio.vector/section",
37
+ "version": "1.0.0"
38
+ },
39
+ {
40
+ "authoring": { "mode": "designer" },
41
+ "bindings": {},
42
+ "id": "text-q",
43
+ "properties": { "text": "Caption" },
44
+ "slots": {},
45
+ "type": "studio.vector/text",
46
+ "version": "1.0.0"
47
+ }
48
+ ]
49
+ }