@contentful/experience-design-system-types 2.41.1-dev-build-ac8ef6b7.0 → 2.41.1-dev-build-3a724687.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/dist/package.json +1 -1
- package/dist/src/cdf/schema.d.ts +14 -0
- package/dist/src/cdf/schema.js +4 -1
- package/package.json +1 -1
package/dist/package.json
CHANGED
package/dist/src/cdf/schema.d.ts
CHANGED
|
@@ -84,6 +84,7 @@ export declare const cdfJsonSchema: {
|
|
|
84
84
|
};
|
|
85
85
|
readonly '$token.kind': {
|
|
86
86
|
readonly type: "string";
|
|
87
|
+
readonly minLength: 1;
|
|
87
88
|
};
|
|
88
89
|
readonly '$token.allowed': {
|
|
89
90
|
readonly type: "array";
|
|
@@ -92,6 +93,19 @@ export declare const cdfJsonSchema: {
|
|
|
92
93
|
};
|
|
93
94
|
};
|
|
94
95
|
};
|
|
96
|
+
readonly if: {
|
|
97
|
+
readonly type: "object";
|
|
98
|
+
readonly properties: {
|
|
99
|
+
readonly $type: {
|
|
100
|
+
readonly const: "token";
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
readonly required: readonly ["$type"];
|
|
104
|
+
};
|
|
105
|
+
readonly then: {
|
|
106
|
+
readonly type: "object";
|
|
107
|
+
readonly required: readonly ["$token.kind"];
|
|
108
|
+
};
|
|
95
109
|
readonly additionalProperties: false;
|
|
96
110
|
};
|
|
97
111
|
readonly slot: {
|
package/dist/src/cdf/schema.js
CHANGED
|
@@ -49,9 +49,12 @@ export const cdfJsonSchema = {
|
|
|
49
49
|
$required: { type: 'boolean' },
|
|
50
50
|
$default: {},
|
|
51
51
|
$values: { type: 'array', items: { type: 'string' } },
|
|
52
|
-
'$token.kind': { type: 'string' },
|
|
52
|
+
'$token.kind': { type: 'string', minLength: 1 },
|
|
53
53
|
'$token.allowed': { type: 'array', items: { type: 'string' } },
|
|
54
54
|
},
|
|
55
|
+
// The API rejects a token property that does not say which kind of token it takes.
|
|
56
|
+
if: { type: 'object', properties: { $type: { const: 'token' } }, required: ['$type'] },
|
|
57
|
+
then: { type: 'object', required: ['$token.kind'] },
|
|
55
58
|
additionalProperties: false,
|
|
56
59
|
},
|
|
57
60
|
slot: {
|