@contentful/experiences-visual-editor-react 1.30.1 → 1.30.2-beta.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
@@ -928,6 +928,31 @@ const ComponentPropertyValueSchema$1 = z.discriminatedUnion('type', [
928
928
  HyperlinkValueSchema$1,
929
929
  ComponentValueSchema$1,
930
930
  ]);
931
+ // TODO: finalized schema structure before release
932
+ // https://contentful.atlassian.net/browse/LUMOS-523
933
+ const VariableMappingSchema$1 = z.object({
934
+ patternPropertyDefinitionId: propertyKeySchema$1,
935
+ type: z.literal('ContentTypeMapping'),
936
+ pathsByContentType: z.record(z.string(), z.object({ path: z.string() })),
937
+ });
938
+ const VariableMappingsSchema$1 = z.record(propertyKeySchema$1, VariableMappingSchema$1);
939
+ // TODO: finalized schema structure before release
940
+ // https://contentful.atlassian.net/browse/LUMOS-523
941
+ const PatternPropertyDefinitionSchema$1 = z.object({
942
+ defaultValue: z.object({
943
+ path: z.string(),
944
+ type: z.literal('BoundValue'),
945
+ }),
946
+ contentTypes: z.record(z.string(), z.any()),
947
+ });
948
+ const PatternPropertyDefinitionsSchema$1 = z.record(propertyKeySchema$1, PatternPropertyDefinitionSchema$1);
949
+ // TODO: finalized schema structure before release
950
+ // https://contentful.atlassian.net/browse/LUMOS-523
951
+ const PatternPropertySchema$1 = z.object({
952
+ type: z.literal('BoundValue'),
953
+ path: z.string(),
954
+ });
955
+ const PatternPropertysSchema$1 = z.record(propertyKeySchema$1, PatternPropertySchema$1);
931
956
  const BreakpointSchema$1 = z
932
957
  .object({
933
958
  id: propertyKeySchema$1,
@@ -950,6 +975,7 @@ const BaseComponentTreeNodeSchema$1 = z.object({
950
975
  displayName: z.string().optional(),
951
976
  slotId: z.string().optional(),
952
977
  variables: z.record(propertyKeySchema$1, ComponentPropertyValueSchema$1),
978
+ patternProperties: PatternPropertysSchema$1.optional(),
953
979
  });
954
980
  const ComponentTreeNodeSchema$1 = BaseComponentTreeNodeSchema$1.extend({
955
981
  children: z.lazy(() => ComponentTreeNodeSchema$1.array()),
@@ -981,6 +1007,8 @@ const ComponentVariablesSchema$1 = z.record(z.string().regex(/^[a-zA-Z0-9-_]{1,5
981
1007
  ComponentVariableSchema$1);
982
1008
  const ComponentSettingsSchema$1 = z.object({
983
1009
  variableDefinitions: ComponentVariablesSchema$1,
1010
+ variableMappings: VariableMappingsSchema$1.optional(),
1011
+ patternPropertyDefinitions: PatternPropertyDefinitionsSchema$1.optional(),
984
1012
  });
985
1013
  const UsedComponentsSchema$1 = z.array(z.object({
986
1014
  sys: z.object({
@@ -3305,6 +3333,31 @@ const ComponentPropertyValueSchema = z.discriminatedUnion('type', [
3305
3333
  HyperlinkValueSchema,
3306
3334
  ComponentValueSchema,
3307
3335
  ]);
3336
+ // TODO: finalized schema structure before release
3337
+ // https://contentful.atlassian.net/browse/LUMOS-523
3338
+ const VariableMappingSchema = z.object({
3339
+ patternPropertyDefinitionId: propertyKeySchema,
3340
+ type: z.literal('ContentTypeMapping'),
3341
+ pathsByContentType: z.record(z.string(), z.object({ path: z.string() })),
3342
+ });
3343
+ const VariableMappingsSchema = z.record(propertyKeySchema, VariableMappingSchema);
3344
+ // TODO: finalized schema structure before release
3345
+ // https://contentful.atlassian.net/browse/LUMOS-523
3346
+ const PatternPropertyDefinitionSchema = z.object({
3347
+ defaultValue: z.object({
3348
+ path: z.string(),
3349
+ type: z.literal('BoundValue'),
3350
+ }),
3351
+ contentTypes: z.record(z.string(), z.any()),
3352
+ });
3353
+ const PatternPropertyDefinitionsSchema = z.record(propertyKeySchema, PatternPropertyDefinitionSchema);
3354
+ // TODO: finalized schema structure before release
3355
+ // https://contentful.atlassian.net/browse/LUMOS-523
3356
+ const PatternPropertySchema = z.object({
3357
+ type: z.literal('BoundValue'),
3358
+ path: z.string(),
3359
+ });
3360
+ const PatternPropertysSchema = z.record(propertyKeySchema, PatternPropertySchema);
3308
3361
  const BreakpointSchema = z
3309
3362
  .object({
3310
3363
  id: propertyKeySchema,
@@ -3327,6 +3380,7 @@ const BaseComponentTreeNodeSchema = z.object({
3327
3380
  displayName: z.string().optional(),
3328
3381
  slotId: z.string().optional(),
3329
3382
  variables: z.record(propertyKeySchema, ComponentPropertyValueSchema),
3383
+ patternProperties: PatternPropertysSchema.optional(),
3330
3384
  });
3331
3385
  const ComponentTreeNodeSchema = BaseComponentTreeNodeSchema.extend({
3332
3386
  children: z.lazy(() => ComponentTreeNodeSchema.array()),
@@ -3358,6 +3412,8 @@ const ComponentVariablesSchema = z.record(z.string().regex(/^[a-zA-Z0-9-_]{1,54}
3358
3412
  ComponentVariableSchema);
3359
3413
  const ComponentSettingsSchema = z.object({
3360
3414
  variableDefinitions: ComponentVariablesSchema,
3415
+ variableMappings: VariableMappingsSchema.optional(),
3416
+ patternPropertyDefinitions: PatternPropertyDefinitionsSchema.optional(),
3361
3417
  });
3362
3418
  const UsedComponentsSchema = z.array(z.object({
3363
3419
  sys: z.object({