@contentful/experiences-visual-editor-react 3.6.1-dev-20250904T1450-0286e47.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 +69 -3
- package/dist/index.js.map +1 -1
- package/dist/renderApp.js +69 -3
- package/dist/renderApp.js.map +1 -1
- package/package.json +4 -10
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;
|
|
@@ -48672,7 +48705,7 @@ function getSchemaWithNodeType(nodeType) {
|
|
|
48672
48705
|
|
|
48673
48706
|
} (dist));
|
|
48674
48707
|
|
|
48675
|
-
var css_248z$8 = "
|
|
48708
|
+
var css_248z$8 = ":root{--cf-color-white:#fff;--cf-color-black:#000;--cf-color-gray100:#f7f9fa;--cf-color-gray400:#aec1cc;--cf-color-gray400-rgb:174,193,204;--cf-spacing-0:0rem;--cf-spacing-1:0.125rem;--cf-spacing-2:0.25rem;--cf-spacing-3:0.375rem;--cf-spacing-4:0.5rem;--cf-spacing-5:0.625rem;--cf-spacing-6:0.75rem;--cf-spacing-7:0.875rem;--cf-spacing-8:1rem;--cf-spacing-9:1.25rem;--cf-spacing-10:1.5rem;--cf-spacing-11:1.75rem;--cf-spacing-12:2rem;--cf-spacing-13:2.25rem;--cf-text-xs:0.75rem;--cf-text-sm:0.875rem;--cf-text-base:1rem;--cf-text-lg:1.125rem;--cf-text-xl:1.25rem;--cf-text-2xl:1.5rem;--cf-text-3xl:2rem;--cf-text-4xl:2.75rem;--cf-font-light:300;--cf-font-normal:400;--cf-font-medium:500;--cf-font-semibold:600;--cf-font-bold:700;--cf-font-extra-bold:800;--cf-font-black:900;--cf-border-radius-none:0px;--cf-border-radius-sm:0.125rem;--cf-border-radius:0.25rem;--cf-border-radius-md:0.375rem;--cf-border-radius-lg:0.5rem;--cf-border-radius-xl:0.75rem;--cf-border-radius-2xl:1rem;--cf-border-radius-3xl:1.5rem;--cf-border-radius-full:9999px;--cf-max-width-full:100%;--cf-button-bg:var(--cf-color-black);--cf-button-color:var(--cf-color-white);--cf-text-color:var(--cf-color-black)}*{box-sizing:border-box}";
|
|
48676
48709
|
styleInject(css_248z$8);
|
|
48677
48710
|
|
|
48678
48711
|
/** @deprecated will be removed when dropping backward compatibility for old DND */
|
|
@@ -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;
|