@contentful/experiences-visual-editor-react 3.6.1-dev-20250908T0924-5256b00.0 → 3.6.1-dev-20250909T1146-4eefde4.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/index.js +68 -2
- package/dist/index.js.map +1 -1
- package/dist/renderApp.js +68 -2
- package/dist/renderApp.js.map +1 -1
- package/package.json +4 -4
package/dist/renderApp.js
CHANGED
|
@@ -44356,8 +44356,20 @@ z.object({
|
|
|
44356
44356
|
componentSettings: localeWrapper$1(ComponentSettingsSchema$1),
|
|
44357
44357
|
});
|
|
44358
44358
|
|
|
44359
|
-
z
|
|
44359
|
+
z
|
|
44360
|
+
.object({
|
|
44360
44361
|
id: DefinitionPropertyKeySchema$1,
|
|
44362
|
+
name: z.string(),
|
|
44363
|
+
category: z.string().optional(),
|
|
44364
|
+
thumbnailUrl: z.string().optional(),
|
|
44365
|
+
thumbnailId: z.string().optional(),
|
|
44366
|
+
hyperlinkPattern: z.string().optional(),
|
|
44367
|
+
children: z.boolean().optional(),
|
|
44368
|
+
slots: z
|
|
44369
|
+
.record(DefinitionPropertyKeySchema$1, z.object({ displayName: z.string().optional() }))
|
|
44370
|
+
.optional(),
|
|
44371
|
+
builtInStyles: z.array(z.string()).optional(),
|
|
44372
|
+
tooltip: z.object({ imageUrl: z.string().optional(), description: z.string() }).optional(),
|
|
44361
44373
|
variables: z.record(DefinitionPropertyKeySchema$1, ComponentVariableSchema$1.extend({
|
|
44362
44374
|
defaultValue: PrimitiveValueSchema$1.optional(),
|
|
44363
44375
|
}).superRefine((val, ctx) => {
|
|
@@ -44463,6 +44475,27 @@ z.object({
|
|
|
44463
44475
|
break;
|
|
44464
44476
|
}
|
|
44465
44477
|
})),
|
|
44478
|
+
})
|
|
44479
|
+
.superRefine((val, ctx) => {
|
|
44480
|
+
if (val.children === true && (!!val.variables.children || !!val.slots?.children)) {
|
|
44481
|
+
ctx.addIssue({
|
|
44482
|
+
code: z.ZodIssueCode.custom,
|
|
44483
|
+
message: `Cannot activate 'children: true' and name a variable or slot 'children' at the same time`,
|
|
44484
|
+
fatal: false,
|
|
44485
|
+
});
|
|
44486
|
+
}
|
|
44487
|
+
// Ensure that slots and variables don't use the same names
|
|
44488
|
+
if (val.variables && val.slots) {
|
|
44489
|
+
Object.keys(val.variables).forEach((name) => {
|
|
44490
|
+
if (val.slots[name]) {
|
|
44491
|
+
ctx.addIssue({
|
|
44492
|
+
code: z.ZodIssueCode.custom,
|
|
44493
|
+
message: `Variable and slot cannot have the same name: ${name}`,
|
|
44494
|
+
fatal: false,
|
|
44495
|
+
});
|
|
44496
|
+
}
|
|
44497
|
+
});
|
|
44498
|
+
}
|
|
44466
44499
|
});
|
|
44467
44500
|
|
|
44468
44501
|
var CodeNames$1;
|
|
@@ -49103,8 +49136,20 @@ z.object({
|
|
|
49103
49136
|
componentSettings: localeWrapper(ComponentSettingsSchema),
|
|
49104
49137
|
});
|
|
49105
49138
|
|
|
49106
|
-
z
|
|
49139
|
+
z
|
|
49140
|
+
.object({
|
|
49107
49141
|
id: DefinitionPropertyKeySchema,
|
|
49142
|
+
name: z.string(),
|
|
49143
|
+
category: z.string().optional(),
|
|
49144
|
+
thumbnailUrl: z.string().optional(),
|
|
49145
|
+
thumbnailId: z.string().optional(),
|
|
49146
|
+
hyperlinkPattern: z.string().optional(),
|
|
49147
|
+
children: z.boolean().optional(),
|
|
49148
|
+
slots: z
|
|
49149
|
+
.record(DefinitionPropertyKeySchema, z.object({ displayName: z.string().optional() }))
|
|
49150
|
+
.optional(),
|
|
49151
|
+
builtInStyles: z.array(z.string()).optional(),
|
|
49152
|
+
tooltip: z.object({ imageUrl: z.string().optional(), description: z.string() }).optional(),
|
|
49108
49153
|
variables: z.record(DefinitionPropertyKeySchema, ComponentVariableSchema.extend({
|
|
49109
49154
|
defaultValue: PrimitiveValueSchema.optional(),
|
|
49110
49155
|
}).superRefine((val, ctx) => {
|
|
@@ -49210,6 +49255,27 @@ z.object({
|
|
|
49210
49255
|
break;
|
|
49211
49256
|
}
|
|
49212
49257
|
})),
|
|
49258
|
+
})
|
|
49259
|
+
.superRefine((val, ctx) => {
|
|
49260
|
+
if (val.children === true && (!!val.variables.children || !!val.slots?.children)) {
|
|
49261
|
+
ctx.addIssue({
|
|
49262
|
+
code: z.ZodIssueCode.custom,
|
|
49263
|
+
message: `Cannot activate 'children: true' and name a variable or slot 'children' at the same time`,
|
|
49264
|
+
fatal: false,
|
|
49265
|
+
});
|
|
49266
|
+
}
|
|
49267
|
+
// Ensure that slots and variables don't use the same names
|
|
49268
|
+
if (val.variables && val.slots) {
|
|
49269
|
+
Object.keys(val.variables).forEach((name) => {
|
|
49270
|
+
if (val.slots[name]) {
|
|
49271
|
+
ctx.addIssue({
|
|
49272
|
+
code: z.ZodIssueCode.custom,
|
|
49273
|
+
message: `Variable and slot cannot have the same name: ${name}`,
|
|
49274
|
+
fatal: false,
|
|
49275
|
+
});
|
|
49276
|
+
}
|
|
49277
|
+
});
|
|
49278
|
+
}
|
|
49213
49279
|
});
|
|
49214
49280
|
|
|
49215
49281
|
var CodeNames;
|