@contentful/experiences-core 1.31.1-dev-20250219T1207-190e914.0 → 1.31.1-dev-20250219T1303-e8b5a85.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 CHANGED
@@ -1244,8 +1244,33 @@ const ComponentVariableSchema = z.object({
1244
1244
  });
1245
1245
  const ComponentVariablesSchema = z.record(z.string().regex(/^[a-zA-Z0-9-_]{1,54}$/), // Here the key is <variableName>_<nanoidId> so we need to allow for a longer length
1246
1246
  ComponentVariableSchema);
1247
+ const THUMBNAIL_IDS = [
1248
+ 'columns',
1249
+ 'columnsPlusRight',
1250
+ 'imagesSquare',
1251
+ 'subtitles',
1252
+ 'rowsPlusBottom',
1253
+ 'userRectangle',
1254
+ 'textbox',
1255
+ 'monitorPlay',
1256
+ 'article',
1257
+ 'table',
1258
+ 'star',
1259
+ 'heartStraight',
1260
+ 'frameCorners',
1261
+ 'rows',
1262
+ 'dotsThreeOutline',
1263
+ 'listDashes',
1264
+ 'checkerBoard',
1265
+ 'gridFour',
1266
+ 'slideshow',
1267
+ 'diamondsFour',
1268
+ 'cards',
1269
+ 'textColumns',
1270
+ ];
1247
1271
  const ComponentSettingsSchema = z.object({
1248
1272
  variableDefinitions: ComponentVariablesSchema,
1273
+ thumbnailId: z.enum(THUMBNAIL_IDS).optional(),
1249
1274
  variableMappings: VariableMappingsSchema.optional(),
1250
1275
  patternPropertyDefinitions: PatternPropertyDefinitionsSchema.optional(),
1251
1276
  });
@@ -2413,11 +2438,11 @@ function getArrayValue(entryOrAsset, path, entityStore) {
2413
2438
  return result;
2414
2439
  }
2415
2440
 
2416
- const transformBoundContentValue = (variables, entityStore, binding, resolveDesignValue, variableName, variableDefinition, path) => {
2441
+ const transformBoundContentValue = (variables, entityStore, binding, resolveDesignValue, variableName, variableType, path) => {
2417
2442
  const entityOrAsset = entityStore.getEntryOrAsset(binding, path);
2418
2443
  if (!entityOrAsset)
2419
2444
  return;
2420
- switch (variableDefinition.type) {
2445
+ switch (variableType) {
2421
2446
  case 'Media':
2422
2447
  // If we bound a normal entry field to the media variable we just return the bound value
2423
2448
  if (entityOrAsset.sys.type === 'Entry') {