Is there an api for if a group is stacked horizontally or vertically?
All I could find is this paragraph on the group API:
Plain Groups (as well as some other node types, like SymbolInstances) can have dynamic layout features enabled such as padding and stack layouts. These are sometimes referred to as Content-Aware Groups or Stack containers, but ultimately these appear in the API as plain Group nodes. They do not carry the same edit-context restrictions as Masked Groups or other special node types.
Alternatively, could you tell that a group layout is stacked where all items have the same width or height?