feat(web): wasm justified layout (#19150)

* wasm justified layout

* fix tests

* redundant layout generation

* raw position
This commit is contained in:
Mert
2025-06-17 10:20:14 -04:00
committed by GitHub
parent 8038ae1e7a
commit bc062da11b
13 changed files with 106 additions and 145 deletions

View File

@@ -190,8 +190,10 @@ export const toTimelineAsset = (unknownAsset: AssetResponseDto | TimelineAsset):
};
};
export const isTimelineAsset = (unknownAsset: AssetResponseDto | TimelineAsset): unknownAsset is TimelineAsset =>
(unknownAsset as TimelineAsset).ratio !== undefined;
export const isTimelineAsset = (asset: AssetResponseDto | TimelineAsset): asset is TimelineAsset => 'ratio' in asset;
export const isTimelineAssets = (assets: AssetResponseDto[] | TimelineAsset[]): assets is TimelineAsset[] =>
assets.length === 0 || 'ratio' in assets[0];
export const plainDateTimeCompare = (ascending: boolean, a: TimelinePlainDateTime, b: TimelinePlainDateTime) => {
const [aDateTime, bDateTime] = ascending ? [a, b] : [b, a];