Snap for 13513381 from 8a3b8f96a92cbfb4efe55606ae47a199d45e80a2 to 25Q4-release Change-Id: I5964d30c41045dddf75b4381c00cad5e0079e769
diff --git a/METADATA b/METADATA index 6da72b1..6543adb 100644 --- a/METADATA +++ b/METADATA
@@ -1,16 +1,20 @@ -name: "automotive-design-compose-protos" -description: - "DesignCompose protobuf message repository " - "" +# This project was upgraded with external_updater. +# Usage: tools/external_updater/updater.sh update external/automotive-design-compose-protos +# For more info, check https://cs.android.com/android/platform/superproject/main/+/main:tools/external_updater/README.md +name: "automotive-design-compose-protos" +description: "DesignCompose protobuf message repository " third_party { + license_type: NOTICE + last_upgrade_date { + year: 2025 + month: 5 + day: 15 + } identifier { type: "Git" value: "https://github.com/google/automotive-design-compose-protos" + version: "c098dddfb2e5ca16dc4ad3c1c76d0e329c2437ef" primary_source: true - version: "v0.0.1" } - license_type: NOTICE - version: "v0.0.1" - last_upgrade_date { year: 2025 month: 5 day: 5 } }
diff --git a/definition/element/scalable.proto b/definition/element/scalable.proto new file mode 100644 index 0000000..53d61be --- /dev/null +++ b/definition/element/scalable.proto
@@ -0,0 +1,92 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package designcompose.definition.element; + +option java_multiple_files = true; +option java_package = "com.android.designcompose.definition.element"; +option optimize_for = LITE_RUNTIME; + +// An event that causes one or more variants to change +message Event { + string event_name = 1; + string event_tokens = 2; + string from_variant_id = 3; + string from_variant_name = 4; + string to_variant_id = 5; + string to_variant_name = 6; +} + +// A key frame that shows the given variant at the given frame +message Keyframe { + int32 frame = 1; + string variant_name = 2; +} + +// A key frame variant that blends two or more variants +message KeyframeVariant { + string name = 1; + repeated Keyframe keyframes = 2; +} + +// Data for the parent of a set of variants +message ScalableUIComponentSet { + string id = 1; + string name = 2; + string role = 3; + string default_variant_id = 4; + string default_variant_name = 5; + repeated Event events = 6; + repeated KeyframeVariant keyframe_variants = 7; + repeated string variant_ids = 8; +} + +// Represents a dimension in pixels or percentage +message ScalableDimension { + oneof Dimension { + float points = 1; + float percent = 2; + } +} + +// Bounds of a rectangle +message Bounds { + ScalableDimension left = 1; + ScalableDimension top = 2; + ScalableDimension right = 3; + ScalableDimension bottom = 4; + ScalableDimension width = 5; + ScalableDimension height = 6; +} + +// Data for a single variant of a component set +message ScalableUiVariant { + string id = 1; + string name = 2; + bool is_default = 3; + bool is_visible = 4; + Bounds bounds = 5; + float alpha = 6; + int32 layer = 7; +} + +// A generic data structure for scalable ui to represent a component set or variant +message ScalableUIData { + oneof data { + ScalableUIComponentSet set = 1; + ScalableUiVariant variant = 2; + } +}
diff --git a/definition/plugin/meter_data.proto b/definition/plugin/meter_data.proto index d577590..d80274e 100644 --- a/definition/plugin/meter_data.proto +++ b/definition/plugin/meter_data.proto
@@ -54,6 +54,7 @@ float end_y = 6; float start_x = 7; float start_y = 8; + bool draggable = 9; } // Represents data for a progress marker meter, including whether it's enabled, @@ -68,6 +69,7 @@ float end_x = 6; float start_y = 7; float end_y = 8; + bool draggable = 9; } // Schema for progress vector data that we write to serialized data
diff --git a/definition/view/node_style.proto b/definition/view/node_style.proto index 6199e28..cfe8acc 100644 --- a/definition/view/node_style.proto +++ b/definition/view/node_style.proto
@@ -20,6 +20,7 @@ import "definition/element/font.proto"; import "definition/element/geometry.proto"; import "definition/element/path.proto"; +import "definition/element/scalable.proto"; import "definition/element/shader.proto"; import "definition/element/variable.proto"; import "definition/interaction/pointer.proto"; @@ -45,10 +46,11 @@ // Contains all of the styleable parameters accepted by the Rect and Text // components. -// Next id = 44 +// Next id = 46 message NodeStyle { // Text properties - element.Background text_color = 1; + element.Background text_color = 1[deprecated = true]; + element.Background font_color = 45; element.NumOrVar font_size = 2; optional string font_family = 3; element.FontWeight font_weight = 4; @@ -80,7 +82,7 @@ repeated modifier.FilterOp filters = 21; repeated modifier.FilterOp backdrop_filters = 22; modifier.BlendMode blend_mode = 23; - + // Layout properties Display display_type = 24; layout.FlexWrap flex_wrap = 25; @@ -103,4 +105,6 @@ // Runtime shader from the shader plugin as background. // When shader is present, background will not be drawn. optional element.ShaderData shader_data = 43; + + optional element.ScalableUIData scalable_data = 44; }
diff --git a/definition/view/view.proto b/definition/view/view.proto index a9e05ff..19a1f83 100644 --- a/definition/view/view.proto +++ b/definition/view/view.proto
@@ -47,7 +47,7 @@ // used by the renderer when building a layout tree, or when mapping from an // integer to a View. // IMPORTANT: This is a u16, but proto doesn't do short types. Convert back to - // u16 after deserializing + // u16 after deserializing uint32 unique_id = 1; // id doesn't exist in vsw toolkit, but is useful for tracing from Figma node // to output