From bc3fdd611907218a458ce9b845cc1815cc05f406 Mon Sep 17 00:00:00 2001 From: lingjhf Date: Fri, 9 Oct 2026 19:20:54 +0800 Subject: [PATCH 01/14] feat(ui): align desktop controls and inspector typography with Figma UI3 --- THIRD_PARTY_NOTICES.md | 2 + lib/features/timeline/timeline_panel.dart | 12 +- .../timeline/timeline_speed_editor.dart | 7 +- lib/l10n/app_de.arb | 26 +- lib/l10n/app_en.arb | 26 +- lib/l10n/app_es.arb | 26 +- lib/l10n/app_fr.arb | 26 +- lib/l10n/app_it.arb | 26 +- lib/l10n/app_ja.arb | 26 +- lib/l10n/app_ko.arb | 26 +- lib/l10n/app_localizations.dart | 102 +++++++ lib/l10n/app_localizations_de.dart | 54 ++++ lib/l10n/app_localizations_en.dart | 54 ++++ lib/l10n/app_localizations_es.dart | 54 ++++ lib/l10n/app_localizations_fr.dart | 54 ++++ lib/l10n/app_localizations_it.dart | 54 ++++ lib/l10n/app_localizations_ja.dart | 53 ++++ lib/l10n/app_localizations_ko.dart | 53 ++++ lib/l10n/app_localizations_pt.dart | 54 ++++ lib/l10n/app_localizations_ru.dart | 54 ++++ lib/l10n/app_localizations_zh.dart | 159 +++++++++++ lib/l10n/app_pt.arb | 26 +- lib/l10n/app_ru.arb | 26 +- lib/l10n/app_zh.arb | 26 +- lib/l10n/app_zh_Hans.arb | 26 +- lib/l10n/app_zh_Hant.arb | 26 +- .../cutdex_ui/assets/fonts/INTER_LICENSE.txt | 92 ++++++ .../cutdex_ui/assets/fonts/InterVariable.ttf | Bin 0 -> 879708 bytes .../cutdex_ui/lib/src/icons/app_icons.dart | 2 + .../cutdex_ui/lib/src/theme/app_theme.dart | 263 ++++++++++++++---- .../lib/src/widgets/app_combobox.dart | 37 ++- .../lib/src/widgets/app_command_toolbar.dart | 23 +- .../widgets/app_command_toolbar_previews.dart | 8 +- .../cutdex_ui/lib/src/widgets/app_menu.dart | 27 +- .../lib/src/widgets/app_property_group.dart | 150 ++++++++-- .../widgets/app_property_group_previews.dart | 131 ++++++--- .../cutdex_ui/lib/src/widgets/app_switch.dart | 4 +- .../lib/src/widgets/app_text_field.dart | 107 +++++-- .../widgets/app_toolbar_dropdown_button.dart | 4 +- .../lib/src/widgets/compact_panel_tabs.dart | 9 +- .../widgets/timeline_controls_previews.dart | 4 +- .../lib/src/widgets/workspace_panel.dart | 4 +- packages/cutdex_ui/pubspec.yaml | 4 + .../test/app_property_group_test.dart | 11 +- packages/cutdex_ui/test/app_theme_test.dart | 75 ++++- 45 files changed, 1806 insertions(+), 227 deletions(-) create mode 100644 packages/cutdex_ui/assets/fonts/INTER_LICENSE.txt create mode 100644 packages/cutdex_ui/assets/fonts/InterVariable.ttf diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index 9fc0733..1eed740 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -7,3 +7,5 @@ Flutter/Dart 依赖及解析版本记录在 `pubspec.yaml`、内部包的 `pubsp 应用发行包捆绑的媒体处理库、推理工具和模型遵循各自的许可与再分发要求。打包时保留随附的许可证和通知文件;不能用本仓库的 MIT 许可替代。 仓库中的测试不附带个人媒体或模型。新增第三方素材、字体或代码时,应一同记录来源和许可证,并保留要求的版权声明。 + +桌面属性栏使用 [Inter 4.1](https://github.com/rsms/inter/releases/tag/v4.1) 的可变字体,遵循 SIL Open Font License 1.1。原始字体与版权声明保存在 `packages/cutdex_ui/assets/fonts/InterVariable.ttf` 和 `INTER_LICENSE.txt` 中。 diff --git a/lib/features/timeline/timeline_panel.dart b/lib/features/timeline/timeline_panel.dart index 1fb0bfa..3361940 100644 --- a/lib/features/timeline/timeline_panel.dart +++ b/lib/features/timeline/timeline_panel.dart @@ -411,7 +411,7 @@ class _TimelineTabsBarState extends ConsumerState<_TimelineTabsBar> { controller: _scrollController, scrollDirection: Axis.horizontal, child: Padding( - padding: const EdgeInsets.symmetric(horizontal: AppSpacing.tiny), + padding: const EdgeInsets.symmetric(horizontal: AppSpacing.small), child: Row( children: [ for ( @@ -419,7 +419,7 @@ class _TimelineTabsBarState extends ConsumerState<_TimelineTabsBar> { index < widget.timelines.length; index++ ) ...[ - if (index > 0) const SizedBox(width: AppSpacing.hairline), + if (index > 0) const SizedBox(width: AppSpacing.tiny), _buildTab(context, widget.timelines[index]), ], ], @@ -497,7 +497,7 @@ class _TimelineTabsBarState extends ConsumerState<_TimelineTabsBar> { ), Padding( padding: EdgeInsetsDirectional.only( - end: desktop ? AppSpacing.tiny : 0, + end: desktop ? AppSpacing.small : 0, ), child: listButton, ), @@ -538,7 +538,7 @@ class _TimelineTabsBarState extends ConsumerState<_TimelineTabsBar> { ), ], child: Padding( - padding: const EdgeInsets.symmetric(vertical: 3), + padding: const EdgeInsets.symmetric(vertical: 4), child: Semantics( selected: selected, child: ConstrainedBox( @@ -934,7 +934,9 @@ class _TimelineEditorState extends State<_TimelineEditor> { ? AppDesktopMetrics.timelineToolbar : 32, child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 8), + padding: const EdgeInsets.symmetric( + horizontal: AppSpacing.medium, + ), child: AppCommandToolbar( groups: [ [ diff --git a/lib/features/timeline/timeline_speed_editor.dart b/lib/features/timeline/timeline_speed_editor.dart index 2f47387..5e1df92 100644 --- a/lib/features/timeline/timeline_speed_editor.dart +++ b/lib/features/timeline/timeline_speed_editor.dart @@ -148,12 +148,9 @@ class TimelineSpeedEditor extends StatelessWidget { } for (var index = 0; index < frame.length; index++) { - if (frame.kindAt(index) == TimelineViewportItemKind.transition) { - continue; - } - final identity = frame.identityAt(index); - final handle = controller.elementForIdentity(identity); + final handle = controller.elementForFrameItem(frame, index); if (handle == null) continue; + final identity = frame.identityAt(index); final bodyId = identity is LayoutBodyId ? identity : LayoutBodyId.element(handle); diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb index 74896a1..9f872b8 100644 --- a/lib/l10n/app_de.arb +++ b/lib/l10n/app_de.arb @@ -913,6 +913,8 @@ "mediaSortNameDescending": "Name: Z bis A", "mediaSelectedCount": "{count} ausgewählt", "navigationHome": "Startseite", + "workflow": "Arbeitsablauf", + "workflowDescription": "Organisiere und verwalte hier deine Bearbeitungsabläufe.", "mediaThumbnailSize": "Vorschaubildgröße", "mediaThumbnailSmall": "Kleine Vorschaubilder", "mediaThumbnailMedium": "Mittlere Vorschaubilder", @@ -931,5 +933,27 @@ "type": "String" } } - } + }, + "cornerRadius": "Eckenradius", + "shadow": "Schatten", + "addShadow": "Schatten hinzufügen", + "shadowLayer": "Schatten {number}", + "shadowBlur": "Unschärfe", + "shadowSpread": "Ausbreitung", + "shadowOpacity": "Deckkraft", + "moveShadowUp": "Nach oben", + "moveShadowDown": "Nach unten", + "updateShadowFailed": "Schatten konnte nicht aktualisiert werden", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "Einzelne Ecken", + "cornerTopLeft": "Radius oben links", + "cornerTopRight": "Radius oben rechts", + "cornerBottomRight": "Radius unten rechts", + "cornerBottomLeft": "Radius unten links" } diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index c3383d9..5e6b913 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -1373,6 +1373,8 @@ } }, "navigationHome": "Home", + "workflow": "Workflow", + "workflowDescription": "Organize and manage your editing workflows here.", "mediaThumbnailSize": "Thumbnail size", "mediaThumbnailSmall": "Small thumbnails", "mediaThumbnailMedium": "Medium thumbnails", @@ -1391,5 +1393,27 @@ "type": "String" } } - } + }, + "cornerRadius": "Corner radius", + "shadow": "Shadow", + "addShadow": "Add shadow", + "shadowLayer": "Shadow {number}", + "shadowBlur": "Blur", + "shadowSpread": "Spread", + "shadowOpacity": "Opacity", + "moveShadowUp": "Move up", + "moveShadowDown": "Move down", + "updateShadowFailed": "Could not update shadow", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "Independent corners", + "cornerTopLeft": "Top left radius", + "cornerTopRight": "Top right radius", + "cornerBottomRight": "Bottom right radius", + "cornerBottomLeft": "Bottom left radius" } diff --git a/lib/l10n/app_es.arb b/lib/l10n/app_es.arb index 69efc7f..d46550b 100644 --- a/lib/l10n/app_es.arb +++ b/lib/l10n/app_es.arb @@ -913,6 +913,8 @@ "mediaSortNameDescending": "Nombre: Z a A", "mediaSelectedCount": "{count} seleccionados", "navigationHome": "Inicio", + "workflow": "Flujo de trabajo", + "workflowDescription": "Organiza y gestiona aquí tus flujos de trabajo de edición.", "mediaThumbnailSize": "Tamaño de miniatura", "mediaThumbnailSmall": "Miniaturas pequeñas", "mediaThumbnailMedium": "Miniaturas medianas", @@ -931,5 +933,27 @@ "type": "String" } } - } + }, + "cornerRadius": "Radio de esquina", + "shadow": "Sombra", + "addShadow": "Añadir sombra", + "shadowLayer": "Sombra {number}", + "shadowBlur": "Desenfoque", + "shadowSpread": "Extensión", + "shadowOpacity": "Opacidad", + "moveShadowUp": "Subir", + "moveShadowDown": "Bajar", + "updateShadowFailed": "No se pudo actualizar la sombra", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "Esquinas independientes", + "cornerTopLeft": "Radio superior izquierdo", + "cornerTopRight": "Radio superior derecho", + "cornerBottomRight": "Radio inferior derecho", + "cornerBottomLeft": "Radio inferior izquierdo" } diff --git a/lib/l10n/app_fr.arb b/lib/l10n/app_fr.arb index fb747de..14cb96d 100644 --- a/lib/l10n/app_fr.arb +++ b/lib/l10n/app_fr.arb @@ -913,6 +913,8 @@ "mediaSortNameDescending": "Nom : Z à A", "mediaSelectedCount": "{count} sélectionnés", "navigationHome": "Accueil", + "workflow": "Flux de travail", + "workflowDescription": "Organisez et gérez vos flux de travail de montage ici.", "mediaThumbnailSize": "Taille des vignettes", "mediaThumbnailSmall": "Petites vignettes", "mediaThumbnailMedium": "Vignettes moyennes", @@ -931,5 +933,27 @@ "type": "String" } } - } + }, + "cornerRadius": "Rayon des coins", + "shadow": "Ombre", + "addShadow": "Ajouter une ombre", + "shadowLayer": "Ombre {number}", + "shadowBlur": "Flou", + "shadowSpread": "Expansion", + "shadowOpacity": "Opacité", + "moveShadowUp": "Monter", + "moveShadowDown": "Descendre", + "updateShadowFailed": "Impossible de modifier l’ombre", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "Coins indépendants", + "cornerTopLeft": "Rayon supérieur gauche", + "cornerTopRight": "Rayon supérieur droit", + "cornerBottomRight": "Rayon inférieur droit", + "cornerBottomLeft": "Rayon inférieur gauche" } diff --git a/lib/l10n/app_it.arb b/lib/l10n/app_it.arb index d35bb63..2f13853 100644 --- a/lib/l10n/app_it.arb +++ b/lib/l10n/app_it.arb @@ -913,6 +913,8 @@ "mediaSortNameDescending": "Nome: Z–A", "mediaSelectedCount": "{count} selezionati", "navigationHome": "Home", + "workflow": "Flusso di lavoro", + "workflowDescription": "Organizza e gestisci qui i tuoi flussi di lavoro di editing.", "mediaThumbnailSize": "Dimensione miniature", "mediaThumbnailSmall": "Miniature piccole", "mediaThumbnailMedium": "Miniature medie", @@ -931,5 +933,27 @@ "type": "String" } } - } + }, + "cornerRadius": "Raggio angoli", + "shadow": "Ombra", + "addShadow": "Aggiungi ombra", + "shadowLayer": "Ombra {number}", + "shadowBlur": "Sfocatura", + "shadowSpread": "Espansione", + "shadowOpacity": "Opacità", + "moveShadowUp": "Sposta su", + "moveShadowDown": "Sposta giù", + "updateShadowFailed": "Impossibile aggiornare l’ombra", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "Angoli indipendenti", + "cornerTopLeft": "Raggio in alto a sinistra", + "cornerTopRight": "Raggio in alto a destra", + "cornerBottomRight": "Raggio in basso a destra", + "cornerBottomLeft": "Raggio in basso a sinistra" } diff --git a/lib/l10n/app_ja.arb b/lib/l10n/app_ja.arb index bd1025c..032a6be 100644 --- a/lib/l10n/app_ja.arb +++ b/lib/l10n/app_ja.arb @@ -913,6 +913,8 @@ "mediaSortNameDescending": "名前の降順", "mediaSelectedCount": "{count} 個選択", "navigationHome": "ホーム", + "workflow": "ワークフロー", + "workflowDescription": "編集ワークフローをここで整理、管理できます。", "mediaThumbnailSize": "サムネイルサイズ", "mediaThumbnailSmall": "小さいサムネイル", "mediaThumbnailMedium": "中サイズのサムネイル", @@ -931,5 +933,27 @@ "type": "String" } } - } + }, + "cornerRadius": "角の半径", + "shadow": "シャドウ", + "addShadow": "シャドウを追加", + "shadowLayer": "シャドウ {number}", + "shadowBlur": "ぼかし", + "shadowSpread": "広がり", + "shadowOpacity": "不透明度", + "moveShadowUp": "上へ移動", + "moveShadowDown": "下へ移動", + "updateShadowFailed": "シャドウを更新できません", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "角を個別に設定", + "cornerTopLeft": "左上の半径", + "cornerTopRight": "右上の半径", + "cornerBottomRight": "右下の半径", + "cornerBottomLeft": "左下の半径" } diff --git a/lib/l10n/app_ko.arb b/lib/l10n/app_ko.arb index 19ad9cd..204c050 100644 --- a/lib/l10n/app_ko.arb +++ b/lib/l10n/app_ko.arb @@ -913,6 +913,8 @@ "mediaSortNameDescending": "이름 내림차순", "mediaSelectedCount": "{count}개 선택됨", "navigationHome": "홈", + "workflow": "워크플로", + "workflowDescription": "여기에서 편집 워크플로를 구성하고 관리하세요.", "mediaThumbnailSize": "썸네일 크기", "mediaThumbnailSmall": "작은 썸네일", "mediaThumbnailMedium": "중간 썸네일", @@ -931,5 +933,27 @@ "type": "String" } } - } + }, + "cornerRadius": "모서리 반경", + "shadow": "그림자", + "addShadow": "그림자 추가", + "shadowLayer": "그림자 {number}", + "shadowBlur": "흐림", + "shadowSpread": "확산", + "shadowOpacity": "불투명도", + "moveShadowUp": "위로 이동", + "moveShadowDown": "아래로 이동", + "updateShadowFailed": "그림자를 업데이트할 수 없습니다", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "모서리 개별 설정", + "cornerTopLeft": "왼쪽 위 반경", + "cornerTopRight": "오른쪽 위 반경", + "cornerBottomRight": "오른쪽 아래 반경", + "cornerBottomLeft": "왼쪽 아래 반경" } diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index cc648fd..a177016 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -4250,6 +4250,18 @@ abstract class AppLocalizations { /// **'Home'** String get navigationHome; + /// No description provided for @workflow. + /// + /// In en, this message translates to: + /// **'Workflow'** + String get workflow; + + /// No description provided for @workflowDescription. + /// + /// In en, this message translates to: + /// **'Organize and manage your editing workflows here.'** + String get workflowDescription; + /// No description provided for @mediaThumbnailSize. /// /// In en, this message translates to: @@ -4321,6 +4333,96 @@ abstract class AppLocalizations { /// In en, this message translates to: /// **'Imported audio is in My media.'** String get resourceImportedAudioHint; + + /// No description provided for @cornerRadius. + /// + /// In en, this message translates to: + /// **'Corner radius'** + String get cornerRadius; + + /// No description provided for @shadow. + /// + /// In en, this message translates to: + /// **'Shadow'** + String get shadow; + + /// No description provided for @addShadow. + /// + /// In en, this message translates to: + /// **'Add shadow'** + String get addShadow; + + /// No description provided for @shadowLayer. + /// + /// In en, this message translates to: + /// **'Shadow {number}'** + String shadowLayer(int number); + + /// No description provided for @shadowBlur. + /// + /// In en, this message translates to: + /// **'Blur'** + String get shadowBlur; + + /// No description provided for @shadowSpread. + /// + /// In en, this message translates to: + /// **'Spread'** + String get shadowSpread; + + /// No description provided for @shadowOpacity. + /// + /// In en, this message translates to: + /// **'Opacity'** + String get shadowOpacity; + + /// No description provided for @moveShadowUp. + /// + /// In en, this message translates to: + /// **'Move up'** + String get moveShadowUp; + + /// No description provided for @moveShadowDown. + /// + /// In en, this message translates to: + /// **'Move down'** + String get moveShadowDown; + + /// No description provided for @updateShadowFailed. + /// + /// In en, this message translates to: + /// **'Could not update shadow'** + String get updateShadowFailed; + + /// No description provided for @independentCorners. + /// + /// In en, this message translates to: + /// **'Independent corners'** + String get independentCorners; + + /// No description provided for @cornerTopLeft. + /// + /// In en, this message translates to: + /// **'Top left radius'** + String get cornerTopLeft; + + /// No description provided for @cornerTopRight. + /// + /// In en, this message translates to: + /// **'Top right radius'** + String get cornerTopRight; + + /// No description provided for @cornerBottomRight. + /// + /// In en, this message translates to: + /// **'Bottom right radius'** + String get cornerBottomRight; + + /// No description provided for @cornerBottomLeft. + /// + /// In en, this message translates to: + /// **'Bottom left radius'** + String get cornerBottomLeft; } class _AppLocalizationsDelegate diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart index c17442d..9d52ba0 100644 --- a/lib/l10n/app_localizations_de.dart +++ b/lib/l10n/app_localizations_de.dart @@ -2312,6 +2312,13 @@ class AppLocalizationsDe extends AppLocalizations { @override String get navigationHome => 'Startseite'; + @override + String get workflow => 'Arbeitsablauf'; + + @override + String get workflowDescription => + 'Organisiere und verwalte hier deine Bearbeitungsabläufe.'; + @override String get mediaThumbnailSize => 'Vorschaubildgröße'; @@ -2350,4 +2357,51 @@ class AppLocalizationsDe extends AppLocalizations { @override String get resourceImportedAudioHint => 'Importiertes Audio befindet sich in Meine Medien.'; + + @override + String get cornerRadius => 'Eckenradius'; + + @override + String get shadow => 'Schatten'; + + @override + String get addShadow => 'Schatten hinzufügen'; + + @override + String shadowLayer(int number) { + return 'Schatten $number'; + } + + @override + String get shadowBlur => 'Unschärfe'; + + @override + String get shadowSpread => 'Ausbreitung'; + + @override + String get shadowOpacity => 'Deckkraft'; + + @override + String get moveShadowUp => 'Nach oben'; + + @override + String get moveShadowDown => 'Nach unten'; + + @override + String get updateShadowFailed => 'Schatten konnte nicht aktualisiert werden'; + + @override + String get independentCorners => 'Einzelne Ecken'; + + @override + String get cornerTopLeft => 'Radius oben links'; + + @override + String get cornerTopRight => 'Radius oben rechts'; + + @override + String get cornerBottomRight => 'Radius unten rechts'; + + @override + String get cornerBottomLeft => 'Radius unten links'; } diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index 64502dc..a6a7a9e 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -2277,6 +2277,13 @@ class AppLocalizationsEn extends AppLocalizations { @override String get navigationHome => 'Home'; + @override + String get workflow => 'Workflow'; + + @override + String get workflowDescription => + 'Organize and manage your editing workflows here.'; + @override String get mediaThumbnailSize => 'Thumbnail size'; @@ -2314,4 +2321,51 @@ class AppLocalizationsEn extends AppLocalizations { @override String get resourceImportedAudioHint => 'Imported audio is in My media.'; + + @override + String get cornerRadius => 'Corner radius'; + + @override + String get shadow => 'Shadow'; + + @override + String get addShadow => 'Add shadow'; + + @override + String shadowLayer(int number) { + return 'Shadow $number'; + } + + @override + String get shadowBlur => 'Blur'; + + @override + String get shadowSpread => 'Spread'; + + @override + String get shadowOpacity => 'Opacity'; + + @override + String get moveShadowUp => 'Move up'; + + @override + String get moveShadowDown => 'Move down'; + + @override + String get updateShadowFailed => 'Could not update shadow'; + + @override + String get independentCorners => 'Independent corners'; + + @override + String get cornerTopLeft => 'Top left radius'; + + @override + String get cornerTopRight => 'Top right radius'; + + @override + String get cornerBottomRight => 'Bottom right radius'; + + @override + String get cornerBottomLeft => 'Bottom left radius'; } diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dart index 17505c1..d93a332 100644 --- a/lib/l10n/app_localizations_es.dart +++ b/lib/l10n/app_localizations_es.dart @@ -2311,6 +2311,13 @@ class AppLocalizationsEs extends AppLocalizations { @override String get navigationHome => 'Inicio'; + @override + String get workflow => 'Flujo de trabajo'; + + @override + String get workflowDescription => + 'Organiza y gestiona aquí tus flujos de trabajo de edición.'; + @override String get mediaThumbnailSize => 'Tamaño de miniatura'; @@ -2349,4 +2356,51 @@ class AppLocalizationsEs extends AppLocalizations { @override String get resourceImportedAudioHint => 'El audio importado está en Mis medios.'; + + @override + String get cornerRadius => 'Radio de esquina'; + + @override + String get shadow => 'Sombra'; + + @override + String get addShadow => 'Añadir sombra'; + + @override + String shadowLayer(int number) { + return 'Sombra $number'; + } + + @override + String get shadowBlur => 'Desenfoque'; + + @override + String get shadowSpread => 'Extensión'; + + @override + String get shadowOpacity => 'Opacidad'; + + @override + String get moveShadowUp => 'Subir'; + + @override + String get moveShadowDown => 'Bajar'; + + @override + String get updateShadowFailed => 'No se pudo actualizar la sombra'; + + @override + String get independentCorners => 'Esquinas independientes'; + + @override + String get cornerTopLeft => 'Radio superior izquierdo'; + + @override + String get cornerTopRight => 'Radio superior derecho'; + + @override + String get cornerBottomRight => 'Radio inferior derecho'; + + @override + String get cornerBottomLeft => 'Radio inferior izquierdo'; } diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart index e90e827..6ec6480 100644 --- a/lib/l10n/app_localizations_fr.dart +++ b/lib/l10n/app_localizations_fr.dart @@ -2314,6 +2314,13 @@ class AppLocalizationsFr extends AppLocalizations { @override String get navigationHome => 'Accueil'; + @override + String get workflow => 'Flux de travail'; + + @override + String get workflowDescription => + 'Organisez et gérez vos flux de travail de montage ici.'; + @override String get mediaThumbnailSize => 'Taille des vignettes'; @@ -2352,4 +2359,51 @@ class AppLocalizationsFr extends AppLocalizations { @override String get resourceImportedAudioHint => 'Les fichiers audio importés sont dans Mes médias.'; + + @override + String get cornerRadius => 'Rayon des coins'; + + @override + String get shadow => 'Ombre'; + + @override + String get addShadow => 'Ajouter une ombre'; + + @override + String shadowLayer(int number) { + return 'Ombre $number'; + } + + @override + String get shadowBlur => 'Flou'; + + @override + String get shadowSpread => 'Expansion'; + + @override + String get shadowOpacity => 'Opacité'; + + @override + String get moveShadowUp => 'Monter'; + + @override + String get moveShadowDown => 'Descendre'; + + @override + String get updateShadowFailed => 'Impossible de modifier l’ombre'; + + @override + String get independentCorners => 'Coins indépendants'; + + @override + String get cornerTopLeft => 'Rayon supérieur gauche'; + + @override + String get cornerTopRight => 'Rayon supérieur droit'; + + @override + String get cornerBottomRight => 'Rayon inférieur droit'; + + @override + String get cornerBottomLeft => 'Rayon inférieur gauche'; } diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dart index 93eb538..95f807f 100644 --- a/lib/l10n/app_localizations_it.dart +++ b/lib/l10n/app_localizations_it.dart @@ -2304,6 +2304,13 @@ class AppLocalizationsIt extends AppLocalizations { @override String get navigationHome => 'Home'; + @override + String get workflow => 'Flusso di lavoro'; + + @override + String get workflowDescription => + 'Organizza e gestisci qui i tuoi flussi di lavoro di editing.'; + @override String get mediaThumbnailSize => 'Dimensione miniature'; @@ -2342,4 +2349,51 @@ class AppLocalizationsIt extends AppLocalizations { @override String get resourceImportedAudioHint => 'L’audio importato si trova in I miei media.'; + + @override + String get cornerRadius => 'Raggio angoli'; + + @override + String get shadow => 'Ombra'; + + @override + String get addShadow => 'Aggiungi ombra'; + + @override + String shadowLayer(int number) { + return 'Ombra $number'; + } + + @override + String get shadowBlur => 'Sfocatura'; + + @override + String get shadowSpread => 'Espansione'; + + @override + String get shadowOpacity => 'Opacità'; + + @override + String get moveShadowUp => 'Sposta su'; + + @override + String get moveShadowDown => 'Sposta giù'; + + @override + String get updateShadowFailed => 'Impossibile aggiornare l’ombra'; + + @override + String get independentCorners => 'Angoli indipendenti'; + + @override + String get cornerTopLeft => 'Raggio in alto a sinistra'; + + @override + String get cornerTopRight => 'Raggio in alto a destra'; + + @override + String get cornerBottomRight => 'Raggio in basso a destra'; + + @override + String get cornerBottomLeft => 'Raggio in basso a sinistra'; } diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dart index d3343e6..fef74b5 100644 --- a/lib/l10n/app_localizations_ja.dart +++ b/lib/l10n/app_localizations_ja.dart @@ -2212,6 +2212,12 @@ class AppLocalizationsJa extends AppLocalizations { @override String get navigationHome => 'ホーム'; + @override + String get workflow => 'ワークフロー'; + + @override + String get workflowDescription => '編集ワークフローをここで整理、管理できます。'; + @override String get mediaThumbnailSize => 'サムネイルサイズ'; @@ -2249,4 +2255,51 @@ class AppLocalizationsJa extends AppLocalizations { @override String get resourceImportedAudioHint => '読み込んだ音声は「マイメディア」にあります。'; + + @override + String get cornerRadius => '角の半径'; + + @override + String get shadow => 'シャドウ'; + + @override + String get addShadow => 'シャドウを追加'; + + @override + String shadowLayer(int number) { + return 'シャドウ $number'; + } + + @override + String get shadowBlur => 'ぼかし'; + + @override + String get shadowSpread => '広がり'; + + @override + String get shadowOpacity => '不透明度'; + + @override + String get moveShadowUp => '上へ移動'; + + @override + String get moveShadowDown => '下へ移動'; + + @override + String get updateShadowFailed => 'シャドウを更新できません'; + + @override + String get independentCorners => '角を個別に設定'; + + @override + String get cornerTopLeft => '左上の半径'; + + @override + String get cornerTopRight => '右上の半径'; + + @override + String get cornerBottomRight => '右下の半径'; + + @override + String get cornerBottomLeft => '左下の半径'; } diff --git a/lib/l10n/app_localizations_ko.dart b/lib/l10n/app_localizations_ko.dart index 9f509f7..508acab 100644 --- a/lib/l10n/app_localizations_ko.dart +++ b/lib/l10n/app_localizations_ko.dart @@ -2212,6 +2212,12 @@ class AppLocalizationsKo extends AppLocalizations { @override String get navigationHome => '홈'; + @override + String get workflow => '워크플로'; + + @override + String get workflowDescription => '여기에서 편집 워크플로를 구성하고 관리하세요.'; + @override String get mediaThumbnailSize => '썸네일 크기'; @@ -2249,4 +2255,51 @@ class AppLocalizationsKo extends AppLocalizations { @override String get resourceImportedAudioHint => '가져온 오디오는 내 미디어에 있습니다.'; + + @override + String get cornerRadius => '모서리 반경'; + + @override + String get shadow => '그림자'; + + @override + String get addShadow => '그림자 추가'; + + @override + String shadowLayer(int number) { + return '그림자 $number'; + } + + @override + String get shadowBlur => '흐림'; + + @override + String get shadowSpread => '확산'; + + @override + String get shadowOpacity => '불투명도'; + + @override + String get moveShadowUp => '위로 이동'; + + @override + String get moveShadowDown => '아래로 이동'; + + @override + String get updateShadowFailed => '그림자를 업데이트할 수 없습니다'; + + @override + String get independentCorners => '모서리 개별 설정'; + + @override + String get cornerTopLeft => '왼쪽 위 반경'; + + @override + String get cornerTopRight => '오른쪽 위 반경'; + + @override + String get cornerBottomRight => '오른쪽 아래 반경'; + + @override + String get cornerBottomLeft => '왼쪽 아래 반경'; } diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dart index 085346d..da5572c 100644 --- a/lib/l10n/app_localizations_pt.dart +++ b/lib/l10n/app_localizations_pt.dart @@ -2304,6 +2304,13 @@ class AppLocalizationsPt extends AppLocalizations { @override String get navigationHome => 'Início'; + @override + String get workflow => 'Fluxo de trabalho'; + + @override + String get workflowDescription => + 'Organize e gerencie seus fluxos de trabalho de edição aqui.'; + @override String get mediaThumbnailSize => 'Tamanho das miniaturas'; @@ -2342,4 +2349,51 @@ class AppLocalizationsPt extends AppLocalizations { @override String get resourceImportedAudioHint => 'O áudio importado está em Minha mídia.'; + + @override + String get cornerRadius => 'Raio dos cantos'; + + @override + String get shadow => 'Sombra'; + + @override + String get addShadow => 'Adicionar sombra'; + + @override + String shadowLayer(int number) { + return 'Sombra $number'; + } + + @override + String get shadowBlur => 'Desfoque'; + + @override + String get shadowSpread => 'Expansão'; + + @override + String get shadowOpacity => 'Opacidade'; + + @override + String get moveShadowUp => 'Mover para cima'; + + @override + String get moveShadowDown => 'Mover para baixo'; + + @override + String get updateShadowFailed => 'Não foi possível atualizar a sombra'; + + @override + String get independentCorners => 'Cantos independentes'; + + @override + String get cornerTopLeft => 'Raio superior esquerdo'; + + @override + String get cornerTopRight => 'Raio superior direito'; + + @override + String get cornerBottomRight => 'Raio inferior direito'; + + @override + String get cornerBottomLeft => 'Raio inferior esquerdo'; } diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dart index c9955a6..913252a 100644 --- a/lib/l10n/app_localizations_ru.dart +++ b/lib/l10n/app_localizations_ru.dart @@ -2297,6 +2297,13 @@ class AppLocalizationsRu extends AppLocalizations { @override String get navigationHome => 'Главная'; + @override + String get workflow => 'Рабочий процесс'; + + @override + String get workflowDescription => + 'Здесь можно организовывать рабочие процессы монтажа.'; + @override String get mediaThumbnailSize => 'Размер миниатюр'; @@ -2335,4 +2342,51 @@ class AppLocalizationsRu extends AppLocalizations { @override String get resourceImportedAudioHint => 'Импортированное аудио находится в разделе «Мои медиа».'; + + @override + String get cornerRadius => 'Радиус углов'; + + @override + String get shadow => 'Тень'; + + @override + String get addShadow => 'Добавить тень'; + + @override + String shadowLayer(int number) { + return 'Тень $number'; + } + + @override + String get shadowBlur => 'Размытие'; + + @override + String get shadowSpread => 'Расширение'; + + @override + String get shadowOpacity => 'Непрозрачность'; + + @override + String get moveShadowUp => 'Вверх'; + + @override + String get moveShadowDown => 'Вниз'; + + @override + String get updateShadowFailed => 'Не удалось обновить тень'; + + @override + String get independentCorners => 'Отдельные углы'; + + @override + String get cornerTopLeft => 'Радиус слева сверху'; + + @override + String get cornerTopRight => 'Радиус справа сверху'; + + @override + String get cornerBottomRight => 'Радиус справа снизу'; + + @override + String get cornerBottomLeft => 'Радиус слева снизу'; } diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dart index 4321dc4..6b5ea49 100644 --- a/lib/l10n/app_localizations_zh.dart +++ b/lib/l10n/app_localizations_zh.dart @@ -2169,6 +2169,12 @@ class AppLocalizationsZh extends AppLocalizations { @override String get navigationHome => '首页'; + @override + String get workflow => '工作流'; + + @override + String get workflowDescription => '在这里编排和管理剪辑工作流。'; + @override String get mediaThumbnailSize => '缩略图大小'; @@ -2206,6 +2212,53 @@ class AppLocalizationsZh extends AppLocalizations { @override String get resourceImportedAudioHint => '导入的音频可在“我的素材”中找到。'; + + @override + String get cornerRadius => '圆角'; + + @override + String get shadow => '阴影'; + + @override + String get addShadow => '添加阴影'; + + @override + String shadowLayer(int number) { + return '阴影 $number'; + } + + @override + String get shadowBlur => '模糊'; + + @override + String get shadowSpread => '扩展'; + + @override + String get shadowOpacity => '不透明度'; + + @override + String get moveShadowUp => '上移'; + + @override + String get moveShadowDown => '下移'; + + @override + String get updateShadowFailed => '无法更新阴影'; + + @override + String get independentCorners => '独立圆角'; + + @override + String get cornerTopLeft => '左上圆角'; + + @override + String get cornerTopRight => '右上圆角'; + + @override + String get cornerBottomRight => '右下圆角'; + + @override + String get cornerBottomLeft => '左下圆角'; } /// The translations for Chinese, using the Han script (`zh_Hans`). @@ -4372,6 +4425,12 @@ class AppLocalizationsZhHans extends AppLocalizationsZh { @override String get navigationHome => '首页'; + @override + String get workflow => '工作流'; + + @override + String get workflowDescription => '在这里编排和管理剪辑工作流。'; + @override String get mediaThumbnailSize => '缩略图大小'; @@ -4409,6 +4468,53 @@ class AppLocalizationsZhHans extends AppLocalizationsZh { @override String get resourceImportedAudioHint => '导入的音频可在“我的素材”中找到。'; + + @override + String get cornerRadius => '圆角'; + + @override + String get shadow => '阴影'; + + @override + String get addShadow => '添加阴影'; + + @override + String shadowLayer(int number) { + return '阴影 $number'; + } + + @override + String get shadowBlur => '模糊'; + + @override + String get shadowSpread => '扩展'; + + @override + String get shadowOpacity => '不透明度'; + + @override + String get moveShadowUp => '上移'; + + @override + String get moveShadowDown => '下移'; + + @override + String get updateShadowFailed => '无法更新阴影'; + + @override + String get independentCorners => '独立圆角'; + + @override + String get cornerTopLeft => '左上圆角'; + + @override + String get cornerTopRight => '右上圆角'; + + @override + String get cornerBottomRight => '右下圆角'; + + @override + String get cornerBottomLeft => '左下圆角'; } /// The translations for Chinese, using the Han script (`zh_Hant`). @@ -6575,6 +6681,12 @@ class AppLocalizationsZhHant extends AppLocalizationsZh { @override String get navigationHome => '首頁'; + @override + String get workflow => '工作流程'; + + @override + String get workflowDescription => '在這裡編排和管理剪輯工作流程。'; + @override String get mediaThumbnailSize => '縮圖大小'; @@ -6612,4 +6724,51 @@ class AppLocalizationsZhHant extends AppLocalizationsZh { @override String get resourceImportedAudioHint => '匯入的音訊可在「我的素材」中找到。'; + + @override + String get cornerRadius => '圓角'; + + @override + String get shadow => '陰影'; + + @override + String get addShadow => '新增陰影'; + + @override + String shadowLayer(int number) { + return '陰影 $number'; + } + + @override + String get shadowBlur => '模糊'; + + @override + String get shadowSpread => '擴展'; + + @override + String get shadowOpacity => '不透明度'; + + @override + String get moveShadowUp => '上移'; + + @override + String get moveShadowDown => '下移'; + + @override + String get updateShadowFailed => '無法更新陰影'; + + @override + String get independentCorners => '獨立圓角'; + + @override + String get cornerTopLeft => '左上圓角'; + + @override + String get cornerTopRight => '右上圓角'; + + @override + String get cornerBottomRight => '右下圓角'; + + @override + String get cornerBottomLeft => '左下圓角'; } diff --git a/lib/l10n/app_pt.arb b/lib/l10n/app_pt.arb index 0bb8e72..15add09 100644 --- a/lib/l10n/app_pt.arb +++ b/lib/l10n/app_pt.arb @@ -913,6 +913,8 @@ "mediaSortNameDescending": "Nome: Z a A", "mediaSelectedCount": "{count} selecionados", "navigationHome": "Início", + "workflow": "Fluxo de trabalho", + "workflowDescription": "Organize e gerencie seus fluxos de trabalho de edição aqui.", "mediaThumbnailSize": "Tamanho das miniaturas", "mediaThumbnailSmall": "Miniaturas pequenas", "mediaThumbnailMedium": "Miniaturas médias", @@ -931,5 +933,27 @@ "type": "String" } } - } + }, + "cornerRadius": "Raio dos cantos", + "shadow": "Sombra", + "addShadow": "Adicionar sombra", + "shadowLayer": "Sombra {number}", + "shadowBlur": "Desfoque", + "shadowSpread": "Expansão", + "shadowOpacity": "Opacidade", + "moveShadowUp": "Mover para cima", + "moveShadowDown": "Mover para baixo", + "updateShadowFailed": "Não foi possível atualizar a sombra", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "Cantos independentes", + "cornerTopLeft": "Raio superior esquerdo", + "cornerTopRight": "Raio superior direito", + "cornerBottomRight": "Raio inferior direito", + "cornerBottomLeft": "Raio inferior esquerdo" } diff --git a/lib/l10n/app_ru.arb b/lib/l10n/app_ru.arb index 0c55c6c..6a07a7a 100644 --- a/lib/l10n/app_ru.arb +++ b/lib/l10n/app_ru.arb @@ -913,6 +913,8 @@ "mediaSortNameDescending": "Имя: Я–А", "mediaSelectedCount": "Выбрано: {count}", "navigationHome": "Главная", + "workflow": "Рабочий процесс", + "workflowDescription": "Здесь можно организовывать рабочие процессы монтажа.", "mediaThumbnailSize": "Размер миниатюр", "mediaThumbnailSmall": "Маленькие миниатюры", "mediaThumbnailMedium": "Средние миниатюры", @@ -931,5 +933,27 @@ "type": "String" } } - } + }, + "cornerRadius": "Радиус углов", + "shadow": "Тень", + "addShadow": "Добавить тень", + "shadowLayer": "Тень {number}", + "shadowBlur": "Размытие", + "shadowSpread": "Расширение", + "shadowOpacity": "Непрозрачность", + "moveShadowUp": "Вверх", + "moveShadowDown": "Вниз", + "updateShadowFailed": "Не удалось обновить тень", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "Отдельные углы", + "cornerTopLeft": "Радиус слева сверху", + "cornerTopRight": "Радиус справа сверху", + "cornerBottomRight": "Радиус справа снизу", + "cornerBottomLeft": "Радиус слева снизу" } diff --git a/lib/l10n/app_zh.arb b/lib/l10n/app_zh.arb index 3824894..b988e29 100644 --- a/lib/l10n/app_zh.arb +++ b/lib/l10n/app_zh.arb @@ -913,6 +913,8 @@ "mediaSortNameDescending": "名称降序", "mediaSelectedCount": "已选 {count} 个", "navigationHome": "首页", + "workflow": "工作流", + "workflowDescription": "在这里编排和管理剪辑工作流。", "mediaThumbnailSize": "缩略图大小", "mediaThumbnailSmall": "小缩略图", "mediaThumbnailMedium": "中缩略图", @@ -931,5 +933,27 @@ "type": "String" } } - } + }, + "cornerRadius": "圆角", + "shadow": "阴影", + "addShadow": "添加阴影", + "shadowLayer": "阴影 {number}", + "shadowBlur": "模糊", + "shadowSpread": "扩展", + "shadowOpacity": "不透明度", + "moveShadowUp": "上移", + "moveShadowDown": "下移", + "updateShadowFailed": "无法更新阴影", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "独立圆角", + "cornerTopLeft": "左上圆角", + "cornerTopRight": "右上圆角", + "cornerBottomRight": "右下圆角", + "cornerBottomLeft": "左下圆角" } diff --git a/lib/l10n/app_zh_Hans.arb b/lib/l10n/app_zh_Hans.arb index f0b243b..04521cf 100644 --- a/lib/l10n/app_zh_Hans.arb +++ b/lib/l10n/app_zh_Hans.arb @@ -913,6 +913,8 @@ "mediaSortNameDescending": "名称降序", "mediaSelectedCount": "已选 {count} 个", "navigationHome": "首页", + "workflow": "工作流", + "workflowDescription": "在这里编排和管理剪辑工作流。", "mediaThumbnailSize": "缩略图大小", "mediaThumbnailSmall": "小缩略图", "mediaThumbnailMedium": "中缩略图", @@ -931,5 +933,27 @@ "type": "String" } } - } + }, + "cornerRadius": "圆角", + "shadow": "阴影", + "addShadow": "添加阴影", + "shadowLayer": "阴影 {number}", + "shadowBlur": "模糊", + "shadowSpread": "扩展", + "shadowOpacity": "不透明度", + "moveShadowUp": "上移", + "moveShadowDown": "下移", + "updateShadowFailed": "无法更新阴影", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "独立圆角", + "cornerTopLeft": "左上圆角", + "cornerTopRight": "右上圆角", + "cornerBottomRight": "右下圆角", + "cornerBottomLeft": "左下圆角" } diff --git a/lib/l10n/app_zh_Hant.arb b/lib/l10n/app_zh_Hant.arb index 4adaa13..064ea76 100644 --- a/lib/l10n/app_zh_Hant.arb +++ b/lib/l10n/app_zh_Hant.arb @@ -913,6 +913,8 @@ "mediaSortNameDescending": "名稱降冪", "mediaSelectedCount": "已選 {count} 個", "navigationHome": "首頁", + "workflow": "工作流程", + "workflowDescription": "在這裡編排和管理剪輯工作流程。", "mediaThumbnailSize": "縮圖大小", "mediaThumbnailSmall": "小縮圖", "mediaThumbnailMedium": "中縮圖", @@ -931,5 +933,27 @@ "type": "String" } } - } + }, + "cornerRadius": "圓角", + "shadow": "陰影", + "addShadow": "新增陰影", + "shadowLayer": "陰影 {number}", + "shadowBlur": "模糊", + "shadowSpread": "擴展", + "shadowOpacity": "不透明度", + "moveShadowUp": "上移", + "moveShadowDown": "下移", + "updateShadowFailed": "無法更新陰影", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "獨立圓角", + "cornerTopLeft": "左上圓角", + "cornerTopRight": "右上圓角", + "cornerBottomRight": "右下圓角", + "cornerBottomLeft": "左下圓角" } diff --git a/packages/cutdex_ui/assets/fonts/INTER_LICENSE.txt b/packages/cutdex_ui/assets/fonts/INTER_LICENSE.txt new file mode 100644 index 0000000..9b2ca37 --- /dev/null +++ b/packages/cutdex_ui/assets/fonts/INTER_LICENSE.txt @@ -0,0 +1,92 @@ +Copyright (c) 2016 The Inter Project Authors (https://github.com/rsms/inter) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION AND CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/packages/cutdex_ui/assets/fonts/InterVariable.ttf b/packages/cutdex_ui/assets/fonts/InterVariable.ttf new file mode 100644 index 0000000000000000000000000000000000000000..4ab79e0102bbe0ffa1ed879b13e52ac8c6487833 GIT binary patch literal 879708 zcmd>`3A|5L+xOSB*S7ZI5JEW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9JVoGP7Cz61G8##vCC#v;dDA?ln+3ZkO#@vcznz0)dk^v91KJ9_jO!UnMc z(XgnXw4we=?nfUsG`CkY)K`|(^oB&|9XkojMo3s#!bs#~kBW>09w}B^h)_IVR@Q^8 z%?!XtzU%w)@19sPd*sOPcZJV+;%2ODK4hC9-;S^Xc7dDE&1cOJohBjV*s=5FP^PL+ zoidIYGbS|}=J6q;Ms*z%_1;+&IY>uAo&lUj*hkcWxHZg0K$;#h-!k%gZkoQtT4~9Cfym*4~cRqJml*j2%?^Iscdy z5FU@whR%Lj&?VM4l%77^qEodeih8WH+PZx1d=z>2>=AhD{F5e5o-}FEP@O~6Q_w(V zYXjk=AvRLi*;QFsTG``h?CccvU|@qGEQpG9VV2j~O3xfVai+ZHBJTRX@$uEGE? ioGbJ3oH;Td@7W{sG5FcT$11d$EL4MIBY(w4_x}JI{^pzj literal 0 HcmV?d00001 diff --git a/packages/cutdex_ui/lib/src/icons/app_icons.dart b/packages/cutdex_ui/lib/src/icons/app_icons.dart index 2152103..cc08fa7 100644 --- a/packages/cutdex_ui/lib/src/icons/app_icons.dart +++ b/packages/cutdex_ui/lib/src/icons/app_icons.dart @@ -63,6 +63,8 @@ abstract final class AppIcons { static const IconData unlock = PhosphorIconsRegular.lockOpen; static const IconData fullscreen = PhosphorIconsRegular.arrowsOut; static const IconData exitFullscreen = PhosphorIconsRegular.arrowsIn; + static const IconData independentCorners = PhosphorIconsRegular.cornersOut; + static const IconData cornerRadius = PhosphorIconsRegular.rectangle; static const IconData fitContent = PhosphorIconsRegular.cornersIn; static const IconData menu = PhosphorIconsRegular.list; static const IconData sidebar = PhosphorIconsRegular.sidebarSimple; diff --git a/packages/cutdex_ui/lib/src/theme/app_theme.dart b/packages/cutdex_ui/lib/src/theme/app_theme.dart index 7c20beb..2e7d190 100644 --- a/packages/cutdex_ui/lib/src/theme/app_theme.dart +++ b/packages/cutdex_ui/lib/src/theme/app_theme.dart @@ -174,8 +174,10 @@ abstract final class AppTheme { : null, textStyle: WidgetStatePropertyAll( theme.textTheme.labelLarge?.copyWith( - fontSize: desktop ? 13 : 12, - height: 1.3, + fontSize: desktop ? AppInspectorMetrics.fontSize : 12, + height: desktop + ? AppInspectorMetrics.lineHeight / AppInspectorMetrics.fontSize + : 1.3, fontWeight: desktop && selected ? FontWeight.w500 : FontWeight.w400, fontVariations: desktop ? [FontVariation('wght', selected ? 500 : 400)] @@ -188,14 +190,14 @@ abstract final class AppTheme { foregroundColor: WidgetStatePropertyAll( selected ? desktop - ? colors.primary + ? colors.onSurface : colors.onSurface : colors.onSurfaceVariant, ), backgroundColor: WidgetStatePropertyAll( selected ? desktop - ? colors.primary.withValues(alpha: .12) + ? colors.surfaceContainer : colors.onSurface.withValues(alpha: .05) : Colors.transparent, ), @@ -255,6 +257,9 @@ abstract final class AppTheme { static Color comboboxBackground(BuildContext context) { final theme = Theme.of(context); + if (isCompactInspector(context)) { + return theme.inputDecorationTheme.fillColor!; + } return theme.brightness == Brightness.dark ? theme.colorScheme.surfaceContainerHighest.withValues(alpha: .3) : Colors.transparent; @@ -374,34 +379,12 @@ abstract final class AppTheme { /// Desktop inspectors use a denser scale than dialogs and settings. static ThemeData propertiesPanelTheme(ThemeData theme) { final desktop = theme.extension() != null; + if (desktop) return _desktopPropertiesPanelTheme(theme); final colors = theme.colorScheme; - final panelText = desktop - ? theme.textTheme.copyWith( - bodyMedium: theme.textTheme.bodyMedium?.copyWith( - fontSize: 13, - height: 20 / 13, - leadingDistribution: TextLeadingDistribution.even, - ), - bodySmall: theme.textTheme.bodySmall?.copyWith( - fontSize: 12, - height: 16 / 12, - leadingDistribution: TextLeadingDistribution.even, - ), - ) - : theme.textTheme; - final actionSize = desktop - ? AppInspectorMetrics.action - : AppControlSize.propertyControl; + final panelText = theme.textTheme; + const actionSize = AppControlSize.propertyControl; ButtonStyle? buttonStyle(ButtonStyle? style) => style?.copyWith( textStyle: WidgetStatePropertyAll(panelText.labelLarge), - minimumSize: desktop - ? const WidgetStatePropertyAll(Size(0, AppInspectorMetrics.input)) - : style.minimumSize, - padding: desktop - ? const WidgetStatePropertyAll( - EdgeInsets.symmetric(horizontal: 8, vertical: 4), - ) - : style.padding, ); final panelColors = colors.copyWith(surface: colors.surfaceContainerLow); final composerBackground = theme @@ -415,19 +398,13 @@ abstract final class AppTheme { borderSide: BorderSide.none, ); return theme.copyWith( - extensions: [ - ...theme.extensions.values, - if (desktop) const InspectorControlDensity(), - ], canvasColor: colors.surfaceContainerLow, colorScheme: panelColors, textTheme: panelText, primaryTextTheme: panelText, inputDecorationTheme: theme.inputDecorationTheme.copyWith( - constraints: BoxConstraints( - minHeight: desktop - ? AppInspectorMetrics.input - : AppControlSize.propertyControl, + constraints: const BoxConstraints( + minHeight: AppControlSize.propertyControl, ), contentPadding: EdgeInsets.symmetric( horizontal: AppSpacing.controlHorizontal, @@ -468,14 +445,151 @@ abstract final class AppTheme { ); } + static ThemeData _desktopPropertiesPanelTheme(ThemeData theme) { + // UI3 – Figma's UI Kit, Templates / design.sidebar.right. + // The workspace owns the panel background and accents. + final dark = theme.brightness == Brightness.dark; + final background = theme.colorScheme.surfaceContainerLow; + final inputBackground = dark + ? const Color(0xFF383838) + : const Color(0xFFF5F5F5); + final ink = dark ? Colors.white : Colors.black.withValues(alpha: .9); + final secondaryInk = dark + ? Colors.white.withValues(alpha: .7) + : Colors.black.withValues(alpha: .5); + final divider = dark ? const Color(0xFF444444) : const Color(0xFFE6E6E6); + final colors = theme.colorScheme.copyWith( + surface: background, + surfaceContainer: inputBackground, + surfaceContainerHighest: inputBackground, + onSurface: ink, + onSurfaceVariant: secondaryInk, + outlineVariant: divider, + ); + final body = theme.textTheme.bodyMedium!.copyWith( + fontFamily: 'packages/cutdex_ui/Inter', + fontSize: AppInspectorMetrics.fontSize, + height: AppInspectorMetrics.lineHeight / AppInspectorMetrics.fontSize, + fontWeight: FontWeight.w400, + fontVariations: const [FontVariation('wght', 450)], + letterSpacing: AppInspectorMetrics.fontSize * .005, + color: ink, + leadingDistribution: TextLeadingDistribution.even, + ); + final strong = body.copyWith( + fontWeight: FontWeight.w600, + fontVariations: const [FontVariation('wght', 550)], + ); + final text = theme.textTheme.copyWith( + bodyLarge: body, + bodyMedium: body, + bodySmall: body.copyWith(color: secondaryInk), + labelLarge: body, + labelMedium: body, + labelSmall: body.copyWith(color: secondaryInk), + titleSmall: strong.copyWith( + fontSize: 13, + height: 22 / 13, + letterSpacing: -.0325, + ), + ); + const shape = RoundedRectangleBorder( + borderRadius: BorderRadius.all( + Radius.circular(AppInspectorMetrics.radius), + ), + ); + const inputShape = OutlineInputBorder( + borderRadius: BorderRadius.all( + Radius.circular(AppInspectorMetrics.radius), + ), + borderSide: BorderSide.none, + ); + ButtonStyle? button(ButtonStyle? style) => style?.copyWith( + textStyle: WidgetStatePropertyAll(body), + minimumSize: const WidgetStatePropertyAll( + Size(0, AppInspectorMetrics.input), + ), + padding: const WidgetStatePropertyAll( + EdgeInsets.symmetric(horizontal: 8), + ), + shape: const WidgetStatePropertyAll(shape), + tapTargetSize: MaterialTapTargetSize.shrinkWrap, + visualDensity: VisualDensity.standard, + ); + return theme.copyWith( + extensions: [...theme.extensions.values, const InspectorControlDensity()], + canvasColor: background, + colorScheme: colors, + textTheme: text, + primaryTextTheme: text, + dividerColor: divider, + dividerTheme: theme.dividerTheme.copyWith( + color: divider, + thickness: 1, + space: 1, + ), + iconTheme: theme.iconTheme.copyWith(color: secondaryInk, size: 16), + inputDecorationTheme: theme.inputDecorationTheme.copyWith( + constraints: const BoxConstraints(minHeight: AppInspectorMetrics.input), + contentPadding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4), + fillColor: inputBackground, + hintStyle: body.copyWith(color: secondaryInk), + border: inputShape, + enabledBorder: inputShape, + disabledBorder: inputShape, + focusedBorder: inputShape.copyWith( + borderSide: BorderSide(color: colors.primary), + ), + errorBorder: inputShape.copyWith( + borderSide: BorderSide(color: colors.error), + ), + focusedErrorBorder: inputShape.copyWith( + borderSide: BorderSide(color: colors.error), + ), + ), + iconButtonTheme: IconButtonThemeData( + style: theme.iconButtonTheme.style?.copyWith( + minimumSize: const WidgetStatePropertyAll( + Size.square(AppInspectorMetrics.action), + ), + maximumSize: const WidgetStatePropertyAll( + Size.square(AppInspectorMetrics.action), + ), + fixedSize: const WidgetStatePropertyAll( + Size.square(AppInspectorMetrics.action), + ), + shape: const WidgetStatePropertyAll(shape), + foregroundColor: WidgetStateProperty.resolveWith( + (states) => states.contains(WidgetState.disabled) + ? secondaryInk.withValues(alpha: .38) + : states.contains(WidgetState.selected) + ? colors.primary + : secondaryInk, + ), + ), + ), + textButtonTheme: TextButtonThemeData( + style: button(theme.textButtonTheme.style), + ), + filledButtonTheme: FilledButtonThemeData( + style: button(theme.filledButtonTheme.style), + ), + outlinedButtonTheme: OutlinedButtonThemeData( + style: button(theme.outlinedButtonTheme.style), + ), + ); + } + static bool isCompactInspector(BuildContext context) => Theme.of(context).extension() != null; static EdgeInsets propertySectionPadding(BuildContext context) => isDesktop(context) - ? const EdgeInsets.symmetric( - horizontal: AppInspectorMetrics.padding, - vertical: AppInspectorMetrics.groupGap / 2, + ? const EdgeInsets.fromLTRB( + AppInspectorMetrics.padding, + 0, + AppInspectorMetrics.trailingPadding, + AppInspectorMetrics.groupGap, ) : AppSpacing.panelSection; @@ -489,8 +603,12 @@ abstract final class AppTheme { static TextStyle propertyLabelStyle(BuildContext context) { final theme = Theme.of(context); return theme.textTheme.bodyMedium!.copyWith( - fontSize: isCompactInspector(context) ? 12 : null, - height: isCompactInspector(context) ? 16 / 12 : null, + fontSize: isCompactInspector(context) + ? AppInspectorMetrics.fontSize + : null, + height: isCompactInspector(context) + ? AppInspectorMetrics.lineHeight / AppInspectorMetrics.fontSize + : null, leadingDistribution: TextLeadingDistribution.even, color: theme.colorScheme.onSurfaceVariant, ); @@ -500,10 +618,12 @@ abstract final class AppTheme { Theme.of(context).textTheme.bodyMedium! .copyWith(fontSize: 13, height: 18 / 13); - /// Codex desktop's compact heading-sm: 13px, 1.4 line height, medium ink. + /// Inspector group titles share the UI3 input scale. static TextStyle propertySectionTitleStyle(BuildContext context) => Theme.of(context).textTheme.labelLarge!.copyWith( - height: 1.4, + height: isCompactInspector(context) + ? AppInspectorMetrics.lineHeight / AppInspectorMetrics.fontSize + : 1.4, color: Theme.of(context).colorScheme.onSurface, ); @@ -734,30 +854,44 @@ abstract final class AppTheme { }) { final colors = Theme.of(context).colorScheme; final ink = colors.onSurface; + final compact = isCompactInspector(context); + final height = compact + ? AppInspectorMetrics.input + : AppControlSize.headerButton; return ButtonStyle( - minimumSize: const WidgetStatePropertyAll( - Size(0, AppControlSize.headerButton), - ), - maximumSize: const WidgetStatePropertyAll( - Size(double.infinity, AppControlSize.headerButton), - ), + minimumSize: WidgetStatePropertyAll(Size(0, height)), + maximumSize: WidgetStatePropertyAll(Size(double.infinity, height)), tapTargetSize: MaterialTapTargetSize.shrinkWrap, - textStyle: WidgetStatePropertyAll(toolbarTextStyle(context)), + textStyle: WidgetStatePropertyAll( + compact + ? inputTextStyle(context).copyWith( + fontVariations: [FontVariation('wght', selected ? 550 : 450)], + ) + : toolbarTextStyle(context), + ), padding: const WidgetStatePropertyAll( EdgeInsets.symmetric(horizontal: AppSpacing.small), ), shape: WidgetStatePropertyAll( - RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + RoundedRectangleBorder( + borderRadius: BorderRadius.circular( + compact ? AppInspectorMetrics.radius : 8, + ), + ), ), foregroundColor: WidgetStatePropertyAll( selected ? ink + : compact + ? colors.onSurfaceVariant : Theme.of(context).brightness == Brightness.dark ? ink.withValues(alpha: .498) : colors.onSurfaceVariant, ), backgroundColor: WidgetStatePropertyAll( - selected ? ink.withValues(alpha: .05) : Colors.transparent, + selected + ? (compact ? colors.surfaceContainer : ink.withValues(alpha: .05)) + : Colors.transparent, ), overlayColor: WidgetStateProperty.resolveWith((states) { if (states.contains(WidgetState.hovered) || @@ -1746,16 +1880,16 @@ abstract final class AppDesktopMetrics { static const windowHeader = 44.0; static const panelHeader = 36.0; static const timelineTabs = 32.0; - static const timelineTabControl = 26.0; - static const timelineTabRadius = 7.0; - static const timelineToolbar = 36.0; + static const timelineTabControl = AppInspectorMetrics.input; + static const timelineTabRadius = AppInspectorMetrics.radius; + static const timelineToolbar = AppInspectorMetrics.row; static const timelineRuler = 28.0; - static const playbackBar = 36.0; + static const playbackBar = AppInspectorMetrics.row; static const iconButton = 28.0; static const button = 32.0; static const input = 36.0; static const sidebarRow = 32.0; - static const panelPadding = 12.0; + static const panelPadding = AppInspectorMetrics.padding; } /// Window project tabs have their own geometry, separate from timeline tabs. @@ -1770,11 +1904,18 @@ abstract final class AppProjectTabMetrics { /// Geometry for desktop parameter editing, independent of general inputs. abstract final class AppInspectorMetrics { - static const input = 28.0; + static const input = 24.0; static const action = 24.0; - static const rowGap = 4.0; + static const row = 32.0; + static const sectionHeader = 40.0; + static const rowPadding = 4.0; + static const rowGap = 8.0; static const groupGap = 12.0; - static const padding = 12.0; + static const padding = 16.0; + static const trailingPadding = 8.0; + static const radius = 5.0; + static const fontSize = 11.0; + static const lineHeight = 16.0; } class InspectorControlDensity extends ThemeExtension { diff --git a/packages/cutdex_ui/lib/src/widgets/app_combobox.dart b/packages/cutdex_ui/lib/src/widgets/app_combobox.dart index 5441471..4836780 100644 --- a/packages/cutdex_ui/lib/src/widgets/app_combobox.dart +++ b/packages/cutdex_ui/lib/src/widgets/app_combobox.dart @@ -124,6 +124,7 @@ class _AppComboboxState extends State> { builder: (context, constraints) { final theme = Theme.of(context); final colors = theme.colorScheme; + final compact = AppTheme.isCompactInspector(context); final inputStyle = AppTheme.inputTextStyle( context, style: AppTheme.isDesktop(context) @@ -181,21 +182,27 @@ class _AppComboboxState extends State> { AppDesktopMetrics.input : AppControlSize.input, ), - padding: const EdgeInsetsDirectional.only( - start: AppSpacing.compact, - end: AppSpacing.tiny, + padding: EdgeInsetsDirectional.only( + start: compact ? AppSpacing.small : AppSpacing.compact, + end: compact ? 0 : AppSpacing.tiny, ), decoration: BoxDecoration( color: AppTheme.comboboxBackground(context), - borderRadius: BorderRadius.circular(AppRadius.large), - border: Border.all(color: colors.outlineVariant), - boxShadow: [ - BoxShadow( - color: colors.shadow.withValues(alpha: .05), - offset: const Offset(0, 1), - blurRadius: 2, - ), - ], + borderRadius: BorderRadius.circular( + compact ? AppInspectorMetrics.radius : AppRadius.large, + ), + border: compact + ? null + : Border.all(color: colors.outlineVariant), + boxShadow: compact + ? [] + : [ + BoxShadow( + color: colors.shadow.withValues(alpha: .05), + offset: const Offset(0, 1), + blurRadius: 2, + ), + ], ), child: Row( children: [ @@ -257,9 +264,9 @@ class _AppComboboxState extends State> { icon: Icon( AppIcons.expandMore, size: 16, - color: colors.onSurfaceVariant.withValues( - alpha: .5, - ), + color: compact + ? colors.onSurfaceVariant + : colors.onSurfaceVariant.withValues(alpha: .5), ), ), ], diff --git a/packages/cutdex_ui/lib/src/widgets/app_command_toolbar.dart b/packages/cutdex_ui/lib/src/widgets/app_command_toolbar.dart index e720fdf..12767c6 100644 --- a/packages/cutdex_ui/lib/src/widgets/app_command_toolbar.dart +++ b/packages/cutdex_ui/lib/src/widgets/app_command_toolbar.dart @@ -32,19 +32,24 @@ class AppCommandToolbar extends StatelessWidget { final List trailing; final Widget? status; + static const _buttonSize = AppInspectorMetrics.input; + static const _commandSlot = 32.0; + Widget _button(AppToolbarCommand command) => IconButton( key: command.key, tooltip: command.label, onPressed: command.onPressed, icon: Icon(command.icon, semanticLabel: command.semanticLabel, size: 16), style: IconButton.styleFrom( - fixedSize: const Size.square(AppDesktopMetrics.iconButton), - minimumSize: const Size.square(AppDesktopMetrics.iconButton), - maximumSize: const Size.square(AppDesktopMetrics.iconButton), + fixedSize: const Size.square(_buttonSize), + minimumSize: const Size.square(_buttonSize), + maximumSize: const Size.square(_buttonSize), padding: EdgeInsets.zero, tapTargetSize: MaterialTapTargetSize.shrinkWrap, shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.all(Radius.circular(AppRadius.small)), + borderRadius: BorderRadius.all( + Radius.circular(AppInspectorMetrics.radius), + ), ), ), ); @@ -53,13 +58,15 @@ class AppCommandToolbar extends StatelessWidget { Widget build(BuildContext context) => LayoutBuilder( builder: (context, constraints) { final commands = groups.expand((group) => group).toList(); - final reserved = trailing.length * 32 + (status == null ? 0 : 24); + final reserved = + trailing.length * _commandSlot + (status == null ? 0 : 24); final groupSpace = (groups.length - 1).clamp(0, groups.length) * 16; final allFit = - constraints.maxWidth >= commands.length * 32 + groupSpace + reserved; + constraints.maxWidth >= + commands.length * _commandSlot + groupSpace + reserved; final visibleCount = allFit ? commands.length - : ((constraints.maxWidth - reserved - groupSpace - 36) / 32) + : ((constraints.maxWidth - reserved - groupSpace - 36) / _commandSlot) .floor() .clamp(0, commands.length); final hidden = commands.skip(visibleCount).toList(); @@ -75,7 +82,7 @@ class AppCommandToolbar extends StatelessWidget { for (final command in group) if (index++ < visibleCount) ...[ _button(command), - const SizedBox(width: 4), + const SizedBox(width: 8), ], ], if (hidden.isNotEmpty) diff --git a/packages/cutdex_ui/lib/src/widgets/app_command_toolbar_previews.dart b/packages/cutdex_ui/lib/src/widgets/app_command_toolbar_previews.dart index 73a6f8f..93bd9e0 100644 --- a/packages/cutdex_ui/lib/src/widgets/app_command_toolbar_previews.dart +++ b/packages/cutdex_ui/lib/src/widgets/app_command_toolbar_previews.dart @@ -9,7 +9,7 @@ import 'app_command_toolbar.dart'; @Preview( name: 'Timeline commands — light', group: 'Desktop workspace', - size: Size(480, 36), + size: Size(480, 32), ) Widget desktopTimelineToolbarLightPreview() => _toolbarPreview(Brightness.light); @@ -17,12 +17,12 @@ Widget desktopTimelineToolbarLightPreview() => @Preview( name: 'Timeline commands — dark', group: 'Desktop workspace', - size: Size(480, 36), + size: Size(480, 32), ) @Preview( name: 'Narrow timeline commands', group: 'Desktop workspace', - size: Size(180, 36), + size: Size(180, 32), ) Widget desktopTimelineToolbarPreview() => _toolbarPreview(Brightness.dark); @@ -36,7 +36,7 @@ Widget _toolbarPreview(Brightness brightness) => MaterialApp( Widget desktopTimelineCommands() => Material( child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 8), + padding: const EdgeInsets.symmetric(horizontal: AppSpacing.medium), child: AppCommandToolbar( groups: [ [ diff --git a/packages/cutdex_ui/lib/src/widgets/app_menu.dart b/packages/cutdex_ui/lib/src/widgets/app_menu.dart index 1647ceb..b63938f 100644 --- a/packages/cutdex_ui/lib/src/widgets/app_menu.dart +++ b/packages/cutdex_ui/lib/src/widgets/app_menu.dart @@ -453,6 +453,7 @@ class AppSelect extends StatelessWidget { builder: (context, constraints) { final theme = Theme.of(context); final colors = theme.colorScheme; + final compact = AppTheme.isCompactInspector(context); final current = options .where((option) => option.value == value) .firstOrNull; @@ -484,8 +485,10 @@ class AppSelect extends StatelessWidget { child: AnimatedContainer( duration: const Duration(milliseconds: 100), decoration: BoxDecoration( - borderRadius: BorderRadius.circular(AppRadius.large), - boxShadow: outlined + borderRadius: BorderRadius.circular( + compact ? AppInspectorMetrics.radius : AppRadius.large, + ), + boxShadow: outlined && !compact ? [ BoxShadow( color: colors.shadow.withValues(alpha: .05), @@ -526,7 +529,11 @@ class AppSelect extends StatelessWidget { ), tapTargetSize: MaterialTapTargetSize.shrinkWrap, shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(AppRadius.large), + borderRadius: BorderRadius.circular( + compact + ? AppInspectorMetrics.radius + : AppRadius.large, + ), ), side: outlined ? theme @@ -536,8 +543,12 @@ class AppSelect extends StatelessWidget { BorderSide(color: colors.outlineVariant) : null, padding: EdgeInsets.symmetric( - horizontal: outlined ? 12 : AppSpacing.tiny, - vertical: outlined ? AppSpacing.inputVertical : 0, + horizontal: outlined + ? (compact ? 8 : 12) + : AppSpacing.tiny, + vertical: outlined && !compact + ? AppSpacing.inputVertical + : 0, ), ), child: Row( @@ -557,9 +568,9 @@ class AppSelect extends StatelessWidget { Icon( AppIcons.expandMore, size: 16, - color: colors.onSurfaceVariant.withValues( - alpha: .5, - ), + color: compact + ? colors.onSurfaceVariant + : colors.onSurfaceVariant.withValues(alpha: .5), ), ], ), diff --git a/packages/cutdex_ui/lib/src/widgets/app_property_group.dart b/packages/cutdex_ui/lib/src/widgets/app_property_group.dart index 54d39ad..ad4bc70 100644 --- a/packages/cutdex_ui/lib/src/widgets/app_property_group.dart +++ b/packages/cutdex_ui/lib/src/widgets/app_property_group.dart @@ -2,6 +2,36 @@ import 'package:flutter/material.dart'; import '../theme/app_theme.dart'; +/// Shared inspector gutters, section spacing, and a full-width divider. +class AppPropertySection extends StatelessWidget { + const AppPropertySection({ + super.key, + required this.child, + this.bottomSpacing, + }); + + final Widget child; + final double? bottomSpacing; + + @override + Widget build(BuildContext context) { + final content = Padding( + padding: AppTheme.propertySectionPadding(context) + .copyWith(bottom: bottomSpacing), + child: child, + ); + if (!AppTheme.isCompactInspector(context)) return content; + return DecoratedBox( + decoration: BoxDecoration( + border: Border( + bottom: BorderSide(color: Theme.of(context).dividerColor), + ), + ), + child: content, + ); + } +} + /// An inspector property title, its actions, and the controls below it. class AppPropertyGroup extends StatelessWidget { const AppPropertyGroup({ @@ -10,43 +40,109 @@ class AppPropertyGroup extends StatelessWidget { required this.child, this.labelWidget, this.actions = const [], + this.padChild = true, }); final String label; final Widget? labelWidget; final List actions; + + /// Set to false when the child contains [AppPropertyRow] widgets. + final bool padChild; final Widget child; @override - Widget build(BuildContext context) => Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - ConstrainedBox( - constraints: BoxConstraints( - minHeight: AppTheme.isDesktop(context) - ? AppInspectorMetrics.action - : AppControlSize.propertyControl, - ), - child: Row( - children: [ - Expanded( - child: - labelWidget ?? - Text( - label, - style: AppTheme.propertySectionTitleStyle(context), - ), - ), - for (final action in actions) ...[ - SizedBox(width: AppTheme.propertyRowGap(context)), - action, + Widget build(BuildContext context) { + final compact = AppTheme.isCompactInspector(context); + return Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + ConstrainedBox( + constraints: BoxConstraints( + minHeight: compact + ? AppInspectorMetrics.sectionHeader + : AppControlSize.propertyControl, + ), + child: Row( + children: [ + Expanded( + child: + labelWidget ?? + Text( + label, + style: AppTheme.propertySectionTitleStyle(context), + ), + ), + for (final action in actions) ...[ + SizedBox( + width: compact + ? AppSpacing.tiny + : AppTheme.propertyRowGap(context), + ), + action, + ], ], - ], + ), ), + if (compact && padChild) + Padding( + padding: const EdgeInsets.symmetric( + vertical: AppInspectorMetrics.rowPadding, + ), + child: child, + ) + else if (compact) + child + else ...[ + SizedBox(height: AppTheme.propertyRowGap(context)), + child, + ], + ], + ); + } +} + +/// UI3 control cells share equal widths and a separate 24px action column. +class AppPropertyRow extends StatelessWidget { + const AppPropertyRow({ + super.key, + required this.children, + this.trailing, + this.reserveTrailing = true, + this.flexes, + }) : assert(children.length > 0), + assert(flexes == null || flexes.length == children.length); + + final List children; + final Widget? trailing; + final bool reserveTrailing; + final List? flexes; + + @override + Widget build(BuildContext context) => Padding( + padding: const EdgeInsets.symmetric( + vertical: AppInspectorMetrics.rowPadding, + ), + child: ConstrainedBox( + constraints: const BoxConstraints(minHeight: AppInspectorMetrics.input), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + for (var i = 0; i < children.length; i++) ...[ + if (i > 0) const SizedBox(width: AppInspectorMetrics.rowGap), + Expanded(flex: flexes?[i] ?? 1, child: children[i]), + ], + if (trailing != null || reserveTrailing) ...[ + const SizedBox(width: AppInspectorMetrics.rowGap), + SizedBox( + width: AppInspectorMetrics.action, + child: + trailing ?? const SizedBox(height: AppInspectorMetrics.input), + ), + ], + ], ), - SizedBox(height: AppTheme.propertyRowGap(context)), - child, - ], + ), ); } diff --git a/packages/cutdex_ui/lib/src/widgets/app_property_group_previews.dart b/packages/cutdex_ui/lib/src/widgets/app_property_group_previews.dart index 7c2bd66..835cce7 100644 --- a/packages/cutdex_ui/lib/src/widgets/app_property_group_previews.dart +++ b/packages/cutdex_ui/lib/src/widgets/app_property_group_previews.dart @@ -6,23 +6,24 @@ import '../theme/app_palette.dart'; import '../theme/app_theme.dart'; import 'app_property_group.dart'; import 'app_text_field.dart'; +import 'app_button_group.dart'; @Preview( name: 'Property groups — light', group: 'Desktop inspector', - size: Size(280, 240), + size: Size(240, 360), ) Widget propertyGroupsLightPreview() => _preview(Brightness.light); @Preview( name: 'Property groups — dark', group: 'Desktop inspector', - size: Size(280, 240), + size: Size(240, 360), ) @Preview( name: 'Narrow property groups', group: 'Desktop inspector', - size: Size(220, 240), + size: Size(220, 360), ) Widget propertyGroupsDarkPreview() => _preview(Brightness.dark); @@ -49,6 +50,7 @@ class _PropertyGroupsPreviewState extends State<_PropertyGroupsPreview> { TextEditingController(text: '100'), TextEditingController(text: '100'), TextEditingController(text: '0'), + TextEditingController(text: '0'), ]; bool _locked = true; final _keyed = {}; @@ -70,19 +72,17 @@ class _PropertyGroupsPreviewState extends State<_PropertyGroupsPreview> { }), ); - Widget _pair(String a, String b, int index, {String? unit}) => Row( + Widget _pair( + String a, + String b, + int index, { + String? unit, + Widget? trailing, + }) => AppPropertyRow( + trailing: trailing, children: [ - Expanded( - child: AppTextField(label: a, unit: unit, controller: _values[index]), - ), - const SizedBox(width: 4), - Expanded( - child: AppTextField( - label: b, - unit: unit, - controller: _values[index + 1], - ), - ), + AppTextField(label: a, unit: unit, controller: _values[index]), + AppTextField(label: b, unit: unit, controller: _values[index + 1]), ], ); @@ -93,41 +93,100 @@ class _PropertyGroupsPreviewState extends State<_PropertyGroupsPreview> { for (final group in [ AppPropertyGroup( label: '位置', - actions: [_keyframe(0)], - child: _pair('X', 'Y', 0), + padChild: false, + child: Column( + children: [ + AppPropertyRow( + children: [ + for (final (index, icons) in [ + ( + 0, + [ + AppIcons.alignLeft, + AppIcons.alignHorizontalCenter, + AppIcons.alignRight, + ], + ), + ( + 1, + [ + AppIcons.alignTop, + AppIcons.alignVerticalCenter, + AppIcons.alignBottom, + ], + ), + ]) + AppButtonGroup( + expanded: true, + label: 'Alignment', + children: [ + for (var i = 0; i < icons.length; i++) + IconButton( + icon: Icon(icons[i]), + onPressed: () => + _values[index].text = '${i * 100}', + ), + ], + ), + ], + ), + _pair('X', 'Y', 0, trailing: _keyframe(0)), + AppPropertyRow( + trailing: _keyframe(2), + children: [ + AppTextField( + label: '旋转', + leading: const SizedBox( + width: AppInspectorMetrics.action, + child: Center(child: Icon(AppIcons.angle, size: 14)), + ), + unit: '°', + controller: _values[4], + ), + const SizedBox.shrink(), + ], + ), + ], + ), ), AppPropertyGroup( label: '缩放', - actions: [ - IconButton( + actions: [_keyframe(1)], + padChild: false, + child: _pair( + 'W', + 'H', + 2, + unit: '%', + trailing: IconButton( tooltip: 'Lock aspect ratio', isSelected: _locked, icon: const Icon(AppIcons.unlock), selectedIcon: const Icon(AppIcons.lockFilled), onPressed: () => setState(() => _locked = !_locked), ), - _keyframe(1), - ], - child: _pair('W', 'H', 2, unit: '%'), + ), ), AppPropertyGroup( - label: '旋转', - actions: [_keyframe(2)], - child: AppTextField( - label: '旋转', - leading: const Padding( - padding: EdgeInsets.symmetric(horizontal: 8), - child: Icon(AppIcons.angle, size: 14), - ), - unit: '°', - controller: _values[4], + label: '圆角', + padChild: false, + child: AppPropertyRow( + trailing: _keyframe(3), + children: [ + AppTextField( + label: '圆角', + leading: const SizedBox( + width: AppInspectorMetrics.action, + child: Center(child: Icon(AppIcons.cornerRadius, size: 14)), + ), + controller: _values[5], + ), + const SizedBox.shrink(), + ], ), ), ]) - Padding( - padding: AppTheme.propertySectionPadding(context), - child: group, - ), + AppPropertySection(child: group), ], ), ); diff --git a/packages/cutdex_ui/lib/src/widgets/app_switch.dart b/packages/cutdex_ui/lib/src/widgets/app_switch.dart index f84f67b..8ac1174 100644 --- a/packages/cutdex_ui/lib/src/widgets/app_switch.dart +++ b/packages/cutdex_ui/lib/src/widgets/app_switch.dart @@ -40,7 +40,9 @@ class _AppSwitchState extends State { onFocusChange: (value) => setState(() => _focused = value), child: SizedBox( width: width, - height: 36, + height: AppTheme.isCompactInspector(context) + ? AppInspectorMetrics.input + : 36, child: Stack( alignment: Alignment.center, children: [ diff --git a/packages/cutdex_ui/lib/src/widgets/app_text_field.dart b/packages/cutdex_ui/lib/src/widgets/app_text_field.dart index eda4604..f237372 100644 --- a/packages/cutdex_ui/lib/src/widgets/app_text_field.dart +++ b/packages/cutdex_ui/lib/src/widgets/app_text_field.dart @@ -65,6 +65,7 @@ class _AppTextFieldState extends State { Widget build(BuildContext context) { final theme = Theme.of(context); final colors = theme.colorScheme; + final compact = AppTheme.isCompactInspector(context); final foreground = widget.enabled ? colors.onSurface : colors.onSurface.withValues(alpha: 0.38); @@ -72,9 +73,11 @@ class _AppTextFieldState extends State { final borderless = theme.inputDecorationTheme.enabledBorder?.borderSide == BorderSide.none; final style = AppTheme.inputTextStyle(context) - .copyWith(color: foreground, letterSpacing: 0); + .copyWith(color: foreground, letterSpacing: compact ? null : 0); OutlineInputBorder border(Color color) => OutlineInputBorder( - borderRadius: BorderRadius.circular(AppRadius.large), + borderRadius: BorderRadius.circular( + compact ? AppInspectorMetrics.radius : AppRadius.large, + ), borderSide: BorderSide(color: color), ); @@ -107,12 +110,20 @@ class _AppTextFieldState extends State { hintStyle: AppTheme.inputHintStyle(context, style: style), errorText: widget.errorText, errorMaxLines: 2, - contentPadding: - theme.inputDecorationTheme.contentPadding ?? - const EdgeInsets.symmetric( - horizontal: AppSpacing.controlHorizontal, - vertical: AppSpacing.inputVertical, - ), + contentPadding: compact && widget.maxLines == 1 + ? EdgeInsets.fromLTRB( + !labelAbove && (widget.leading != null || widget.label != null) + ? 0 + : 8, + 4, + widget.unit == null ? 8 : 0, + 4, + ) + : theme.inputDecorationTheme.contentPadding ?? + const EdgeInsets.symmetric( + horizontal: AppSpacing.controlHorizontal, + vertical: AppSpacing.inputVertical, + ), prefixIcon: labelAbove ? null : widget.leading ?? @@ -122,18 +133,26 @@ class _AppTextFieldState extends State { widthFactor: 1, heightFactor: 1, child: Padding( - padding: const EdgeInsets.symmetric( - horizontal: AppSpacing.small, + padding: EdgeInsets.symmetric( + horizontal: compact && widget.label!.length == 1 + ? 0 + : AppSpacing.small, ), child: ExcludeSemantics( - child: Text( - widget.label!, - style: AppTheme.propertyLabelStyle(context) - .copyWith( - color: widget.enabled - ? colors.onSurfaceVariant - : foreground, - ), + child: SizedBox( + width: compact && widget.label!.length == 1 + ? AppInspectorMetrics.action + : null, + child: Text( + widget.label!, + textAlign: TextAlign.center, + style: AppTheme.propertyLabelStyle(context) + .copyWith( + color: widget.enabled + ? colors.onSurfaceVariant + : foreground, + ), + ), ), ), ), @@ -148,8 +167,8 @@ class _AppTextFieldState extends State { widthFactor: 1, heightFactor: 1, child: Padding( - padding: const EdgeInsets.symmetric( - horizontal: AppSpacing.small, + padding: EdgeInsets.symmetric( + horizontal: compact ? 4 : AppSpacing.small, ), child: ExcludeSemantics( child: Text( @@ -163,8 +182,8 @@ class _AppTextFieldState extends State { ), ), ), - suffixIconConstraints: const BoxConstraints( - minWidth: AppControlSize.compact, + suffixIconConstraints: BoxConstraints( + minWidth: compact ? 16 : AppControlSize.compact, minHeight: AppControlSize.input, ), border: theme.inputDecorationTheme.border, @@ -201,12 +220,44 @@ class _AppTextFieldState extends State { child: Semantics( label: [widget.label, widget.unit].whereType().join(' '), child: labelAbove - ? AppPropertyGroup( - label: widget.label ?? '', - labelWidget: widget.leading, - actions: widget.labelActions, - child: input, - ) + ? compact + ? Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + ConstrainedBox( + constraints: const BoxConstraints( + minHeight: AppInspectorMetrics.lineHeight, + ), + child: Row( + children: [ + Expanded( + child: + widget.leading ?? + Text( + widget.label ?? '', + style: AppTheme.propertyLabelStyle( + context, + ), + ), + ), + for (final action in widget.labelActions) ...[ + const SizedBox(width: AppSpacing.tiny), + action, + ], + ], + ), + ), + const SizedBox(height: AppInspectorMetrics.rowPadding), + input, + ], + ) + : AppPropertyGroup( + label: widget.label ?? '', + labelWidget: widget.leading, + actions: widget.labelActions, + child: input, + ) : input, ), ); diff --git a/packages/cutdex_ui/lib/src/widgets/app_toolbar_dropdown_button.dart b/packages/cutdex_ui/lib/src/widgets/app_toolbar_dropdown_button.dart index 42c0924..2c8f25e 100644 --- a/packages/cutdex_ui/lib/src/widgets/app_toolbar_dropdown_button.dart +++ b/packages/cutdex_ui/lib/src/widgets/app_toolbar_dropdown_button.dart @@ -24,8 +24,8 @@ class AppToolbarDropdownButton extends StatelessWidget { key: buttonKey, focusNode: focusNode, onPressed: onPressed, - style: AppTheme.toolbarButtonStyle(context) - .merge(style) + style: (style ?? const ButtonStyle()) + .merge(AppTheme.toolbarButtonStyle(context)) .copyWith( backgroundColor: const WidgetStatePropertyAll(Colors.transparent), overlayColor: WidgetStateProperty.resolveWith((states) { diff --git a/packages/cutdex_ui/lib/src/widgets/compact_panel_tabs.dart b/packages/cutdex_ui/lib/src/widgets/compact_panel_tabs.dart index ea1a573..a0ffb4b 100644 --- a/packages/cutdex_ui/lib/src/widgets/compact_panel_tabs.dart +++ b/packages/cutdex_ui/lib/src/widgets/compact_panel_tabs.dart @@ -24,14 +24,19 @@ class CompactPanelTabs extends StatelessWidget { @override Widget build(BuildContext context) => SizedBox( - height: AppTheme.isDesktop(context) + height: AppTheme.isCompactInspector(context) + ? AppInspectorMetrics.sectionHeader + : AppTheme.isDesktop(context) ? AppDesktopMetrics.panelHeader : height, child: Padding( padding: AppTheme.isDesktop(context) && padding == const EdgeInsets.all(AppSpacing.gap) - ? const EdgeInsets.symmetric(horizontal: 8, vertical: 4) + ? EdgeInsets.symmetric( + horizontal: 8, + vertical: AppTheme.isCompactInspector(context) ? 8 : 4, + ) : padding, child: SingleChildScrollView( scrollDirection: Axis.horizontal, diff --git a/packages/cutdex_ui/lib/src/widgets/timeline_controls_previews.dart b/packages/cutdex_ui/lib/src/widgets/timeline_controls_previews.dart index be31e6f..8bef4ce 100644 --- a/packages/cutdex_ui/lib/src/widgets/timeline_controls_previews.dart +++ b/packages/cutdex_ui/lib/src/widgets/timeline_controls_previews.dart @@ -53,7 +53,7 @@ class _TimelineControlsPreviewState extends State<_TimelineControlsPreview> { child: SizedBox( height: AppDesktopMetrics.timelineTabs, child: Padding( - padding: const EdgeInsets.symmetric(horizontal: AppSpacing.tiny), + padding: const EdgeInsets.symmetric(horizontal: AppSpacing.small), child: Row( children: [ Expanded( @@ -117,7 +117,7 @@ class _TimelineControlsPreviewState extends State<_TimelineControlsPreview> { SizedBox( height: AppDesktopMetrics.timelineToolbar, child: Padding( - padding: const EdgeInsets.symmetric(horizontal: AppSpacing.small), + padding: const EdgeInsets.symmetric(horizontal: AppSpacing.medium), child: AppCommandToolbar( groups: [ [ diff --git a/packages/cutdex_ui/lib/src/widgets/workspace_panel.dart b/packages/cutdex_ui/lib/src/widgets/workspace_panel.dart index 2fa1185..01f2f67 100644 --- a/packages/cutdex_ui/lib/src/widgets/workspace_panel.dart +++ b/packages/cutdex_ui/lib/src/widgets/workspace_panel.dart @@ -53,7 +53,9 @@ class WorkspacePanel extends StatelessWidget { title, maxLines: 1, overflow: TextOverflow.ellipsis, - style: Theme.of(context).textTheme.labelLarge, + style: AppTheme.isCompactInspector(context) + ? Theme.of(context).textTheme.titleSmall + : Theme.of(context).textTheme.labelLarge, ), ), if (controls case final controls?) ...[ diff --git a/packages/cutdex_ui/pubspec.yaml b/packages/cutdex_ui/pubspec.yaml index 1618ff1..345efba 100644 --- a/packages/cutdex_ui/pubspec.yaml +++ b/packages/cutdex_ui/pubspec.yaml @@ -18,6 +18,9 @@ dev_dependencies: freezed: ^4.0.2 flutter: fonts: + - family: Inter + fonts: + - asset: assets/fonts/InterVariable.ttf - family: PhosphorRegular fonts: - asset: assets/fonts/PhosphorRegular.ttf @@ -25,4 +28,5 @@ flutter: fonts: - asset: assets/fonts/PhosphorFill.ttf assets: + - assets/fonts/INTER_LICENSE.txt - assets/fonts/PHOSPHOR_LICENSE.txt diff --git a/packages/cutdex_ui/test/app_property_group_test.dart b/packages/cutdex_ui/test/app_property_group_test.dart index af0f816..2ca2adc 100644 --- a/packages/cutdex_ui/test/app_property_group_test.dart +++ b/packages/cutdex_ui/test/app_property_group_test.dart @@ -19,8 +19,7 @@ void main() { home: Scaffold( body: SizedBox( width: 220, - child: Padding( - padding: const EdgeInsets.all(12), + child: AppPropertySection( child: AppPropertyGroup( label: 'Position', actions: [ @@ -38,7 +37,7 @@ void main() { errorText: 'Invalid value', ), ), - SizedBox(width: 4), + SizedBox(width: AppInspectorMetrics.rowGap), Expanded(child: AppTextField(label: 'Y')), ], ), @@ -51,8 +50,8 @@ void main() { await tester.pumpAndSettle(); final first = find.byType(TextField).first; final second = find.byType(TextField).last; - expect(tester.getRect(first).width, 96); - expect(tester.getRect(second).right, 208); + expect(tester.getRect(first).width, 94); + expect(tester.getRect(second).right, 212); expect(tester.getRect(first).top, tester.getRect(second).top); expect( tester.getRect(first).height, @@ -60,7 +59,7 @@ void main() { ); expect( tester.getRect(find.byType(IconButton)).bottom, - tester.getRect(first).top - 4, + tester.getRect(first).top - 12, ); expect( tester.widget(first).decoration!.prefixIcon, diff --git a/packages/cutdex_ui/test/app_theme_test.dart b/packages/cutdex_ui/test/app_theme_test.dart index 792ddcd..0c5a1fe 100644 --- a/packages/cutdex_ui/test/app_theme_test.dart +++ b/packages/cutdex_ui/test/app_theme_test.dart @@ -7,12 +7,79 @@ import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { + test( + 'desktop inspector keeps panel colors with UI3 typography and inputs', + () { + for (final palette in AppPalette.values) { + for (final brightness in Brightness.values) { + final base = AppTheme.desktopWorkspaceTheme( + AppTheme.forPalette(palette, brightness), + ); + final theme = AppTheme.propertiesPanelTheme(base); + final dark = brightness == Brightness.dark; + expect( + theme.colorScheme.surface, + base.colorScheme.surfaceContainerLow, + ); + expect(theme.canvasColor, base.colorScheme.surfaceContainerLow); + expect( + theme.colorScheme.surfaceContainerLow, + base.colorScheme.surfaceContainerLow, + ); + expect(theme.scaffoldBackgroundColor, base.scaffoldBackgroundColor); + expect( + theme.inputDecorationTheme.fillColor, + dark ? const Color(0xFF383838) : const Color(0xFFF5F5F5), + ); + expect( + theme.colorScheme.onSurface, + dark ? Colors.white : Colors.black.withValues(alpha: .9), + ); + expect( + theme.colorScheme.onSurfaceVariant, + dark + ? Colors.white.withValues(alpha: .7) + : Colors.black.withValues(alpha: .5), + ); + expect( + theme.dividerColor, + dark ? const Color(0xFF444444) : const Color(0xFFE6E6E6), + ); + expect(theme.colorScheme.primary, base.colorScheme.primary); + final text = theme.textTheme.bodyMedium!; + expect(text.fontFamily, 'packages/cutdex_ui/Inter'); + expect( + text.fontFamilyFallback, + base.textTheme.bodyMedium!.fontFamilyFallback, + ); + expect(text.fontSize, 11); + expect(text.height! * text.fontSize!, closeTo(16, .001)); + expect(text.fontVariations, const [ui.FontVariation('wght', 450)]); + expect(text.letterSpacing, closeTo(.055, .001)); + expect( + (theme.inputDecorationTheme.enabledBorder! as OutlineInputBorder) + .borderRadius, + BorderRadius.circular(5), + ); + expect( + theme.inputDecorationTheme.enabledBorder!.borderSide, + BorderSide.none, + ); + expect( + theme.inputDecorationTheme.focusedBorder!.borderSide.color, + base.colorScheme.primary, + ); + } + } + }, + ); + testWidgets('slider density follows inspector and desktop contexts', ( tester, ) async { final desktop = AppTheme.desktopWorkspaceTheme(AppTheme.penDark); for (final (theme, height) in [ - (AppTheme.propertiesPanelTheme(desktop), 28.0), + (AppTheme.propertiesPanelTheme(desktop), 24.0), (desktop, 36.0), ( AppTheme.propertiesPanelTheme(AppTheme.penDark), @@ -44,9 +111,9 @@ void main() { final desktop = AppTheme.desktopWorkspaceTheme(AppTheme.penDark); final inspector = AppTheme.propertiesPanelTheme(desktop); expect(desktop.inputDecorationTheme.constraints!.minHeight, 36); - expect(inspector.inputDecorationTheme.constraints!.minHeight, 28); - expect(inspector.textTheme.bodyMedium!.fontSize, 13); - expect(inspector.textTheme.bodySmall!.fontSize, 12); + expect(inspector.inputDecorationTheme.constraints!.minHeight, 24); + expect(inspector.textTheme.bodyMedium!.fontSize, 11); + expect(inspector.textTheme.bodySmall!.fontSize, 11); expect( inspector.iconButtonTheme.style!.fixedSize!.resolve({}), const Size.square(24), -- 2.54.0 From 02413383d85f3bd4140668f4efa3bedf103296a1 Mon Sep 17 00:00:00 2001 From: lingjhf Date: Fri, 9 Oct 2026 19:20:54 +0800 Subject: [PATCH 02/14] perf(settings): batch and deduplicate writes and persist panel dimensions --- .../settings/appearance_settings.dart | 8 +- .../settings/appearance_settings.g.dart | 4 +- lib/features/settings/language_settings.dart | 4 +- .../settings/language_settings.g.dart | 2 +- .../settings/timeline_ruler_settings.dart | 4 +- .../settings/timeline_ruler_settings.g.dart | 2 +- lib/integrations/mcp/mcp_settings.dart | 1 + lib/integrations/mcp/mcp_settings.g.dart | 2 +- lib/persistence/app_database.dart | 15 +- lib/persistence/app_database.g.dart | 78 ++++++- .../settings/agent_settings_repository.dart | 47 ++-- .../settings/view_settings_repositories.dart | 3 + .../view_settings_repositories.freezed.dart | 88 ++++++-- lib/workspace/timeline_view_state.dart | 37 ++- lib/workspace/view_settings.dart | 45 +++- lib/workspace/view_settings.g.dart | 4 +- test/app_database_test.dart | 179 ++++++++++++++- test/mcp_settings_test.dart | 43 ++++ test/palette_settings_test.dart | 3 + test/settings_save_order_test.dart | 49 ++++ test/timeline_ruler_settings_test.dart | 3 + test/timeline_view_state_test.dart | 210 ++++++++++++++++++ test/view_settings_test.dart | 121 +++++++++- 23 files changed, 869 insertions(+), 83 deletions(-) create mode 100644 test/timeline_view_state_test.dart diff --git a/lib/features/settings/appearance_settings.dart b/lib/features/settings/appearance_settings.dart index f6e2a2e..e7cf916 100644 --- a/lib/features/settings/appearance_settings.dart +++ b/lib/features/settings/appearance_settings.dart @@ -27,8 +27,8 @@ class AppearanceSettings extends _$AppearanceSettings { Future setMode(AppAppearance appearance) => _writes.run(() async { if (!ref.mounted) return; - await future; - if (!ref.mounted) return; + final current = await future; + if (!ref.mounted || current == appearance) return; await ref.read(appearanceSettingsRepositoryProvider).save(appearance); if (ref.mounted) state = AsyncData(appearance); }); @@ -44,8 +44,8 @@ class PaletteSettings extends _$PaletteSettings { Future setPalette(AppPalette palette) => _writes.run(() async { if (!ref.mounted) return; - await future; - if (!ref.mounted) return; + final current = await future; + if (!ref.mounted || current == palette) return; await ref.read(paletteSettingsRepositoryProvider).save(palette); if (ref.mounted) state = AsyncData(palette); }); diff --git a/lib/features/settings/appearance_settings.g.dart b/lib/features/settings/appearance_settings.g.dart index 0702913..2c95f95 100644 --- a/lib/features/settings/appearance_settings.g.dart +++ b/lib/features/settings/appearance_settings.g.dart @@ -34,7 +34,7 @@ final class AppearanceSettingsProvider } String _$appearanceSettingsHash() => - r'df889bcd3ec16a726ebc1bccd98b9e7033989a69'; + r'c540755d69e4441b38db07394df144a0fc3544da'; abstract class _$AppearanceSettings extends $AsyncNotifier { FutureOr build(); @@ -78,7 +78,7 @@ final class PaletteSettingsProvider PaletteSettings create() => PaletteSettings(); } -String _$paletteSettingsHash() => r'95eecd4a35c8de3afbf6c94b1e13f282acb0f4ff'; +String _$paletteSettingsHash() => r'8676c4ef0be0ce7132da7c53b9694da56e9c658d'; abstract class _$PaletteSettings extends $AsyncNotifier { FutureOr build(); diff --git a/lib/features/settings/language_settings.dart b/lib/features/settings/language_settings.dart index 3095fa4..863af9a 100644 --- a/lib/features/settings/language_settings.dart +++ b/lib/features/settings/language_settings.dart @@ -89,8 +89,8 @@ class LanguageSettings extends _$LanguageSettings { Future setLanguage(AppLanguage language) => _writes.run(() async { if (!ref.mounted) return; - await future; - if (!ref.mounted) return; + final current = await future; + if (!ref.mounted || current == language) return; await ref.read(languageSettingsRepositoryProvider).save(language); if (ref.mounted) state = AsyncData(language); }); diff --git a/lib/features/settings/language_settings.g.dart b/lib/features/settings/language_settings.g.dart index 99b677f..bfe72e3 100644 --- a/lib/features/settings/language_settings.g.dart +++ b/lib/features/settings/language_settings.g.dart @@ -33,7 +33,7 @@ final class LanguageSettingsProvider LanguageSettings create() => LanguageSettings(); } -String _$languageSettingsHash() => r'fcd5bb7f010ea5bb09f9743d9023cd1668214f43'; +String _$languageSettingsHash() => r'6a1989abb393d00e262506572b1dfdd5b09be6c4'; abstract class _$LanguageSettings extends $AsyncNotifier { FutureOr build(); diff --git a/lib/features/settings/timeline_ruler_settings.dart b/lib/features/settings/timeline_ruler_settings.dart index 88a0807..92ddcd2 100644 --- a/lib/features/settings/timeline_ruler_settings.dart +++ b/lib/features/settings/timeline_ruler_settings.dart @@ -19,8 +19,8 @@ class TimelineRulerSettings extends _$TimelineRulerSettings { Future setLayout(TimelineRulerTimecodeLayout layout) => _writes.run(() async { if (!ref.mounted) return; - await future; - if (!ref.mounted) return; + final current = await future; + if (!ref.mounted || current == layout) return; await ref.read(timelineRulerSettingsRepositoryProvider).save(layout); if (ref.mounted) state = AsyncData(layout); }); diff --git a/lib/features/settings/timeline_ruler_settings.g.dart b/lib/features/settings/timeline_ruler_settings.g.dart index af9b110..840618e 100644 --- a/lib/features/settings/timeline_ruler_settings.g.dart +++ b/lib/features/settings/timeline_ruler_settings.g.dart @@ -38,7 +38,7 @@ final class TimelineRulerSettingsProvider } String _$timelineRulerSettingsHash() => - r'26aef397f2aee8114b1d1229bb1c0b3f7a377f73'; + r'4917c2ec4b2aa715c9e0e2a45cd05adb66ae6089'; abstract class _$TimelineRulerSettings extends $AsyncNotifier { diff --git a/lib/integrations/mcp/mcp_settings.dart b/lib/integrations/mcp/mcp_settings.dart index f90639b..e8d7b31 100644 --- a/lib/integrations/mcp/mcp_settings.dart +++ b/lib/integrations/mcp/mcp_settings.dart @@ -44,6 +44,7 @@ class McpSettings extends _$McpSettings { port: port ?? current.port, ); _validate(next); + if (next == current) return; await _persist(next); if (ref.mounted) state = AsyncData(next); }); diff --git a/lib/integrations/mcp/mcp_settings.g.dart b/lib/integrations/mcp/mcp_settings.g.dart index 170a7ef..1fb85a2 100644 --- a/lib/integrations/mcp/mcp_settings.g.dart +++ b/lib/integrations/mcp/mcp_settings.g.dart @@ -33,7 +33,7 @@ final class McpSettingsProvider McpSettings create() => McpSettings(); } -String _$mcpSettingsHash() => r'122c5ad73d0eec5808c546eb66dde6c4b0f29a8a'; +String _$mcpSettingsHash() => r'44c7a3dec17e78b4a67c5de92b1f5ae708af7f84'; abstract class _$McpSettings extends $AsyncNotifier { FutureOr build(); diff --git a/lib/persistence/app_database.dart b/lib/persistence/app_database.dart index b3ec7e8..01125dc 100644 --- a/lib/persistence/app_database.dart +++ b/lib/persistence/app_database.dart @@ -127,6 +127,7 @@ class ProjectViewConfigurations extends Table { TextColumn get projectId => text()(); BoolColumn get propertiesOpen => boolean()(); RealColumn get timelineHeight => real().nullable()(); + RealColumn get mediaWidth => real().nullable()(); @override Set> get primaryKey => {projectId}; @@ -169,13 +170,13 @@ class AppDatabase extends _$AppDatabase { AppDatabase(super.executor); @override - int get schemaVersion => 4; + int get schemaVersion => 5; @override MigrationStrategy get migration => MigrationStrategy( onCreate: (migrator) => migrator.createAll(), onUpgrade: (migrator, from, _) async { - if (from != 2 && from != 3) { + if (from < 2 || from > 4) { throw StateError('Unsupported app database schema version: $from'); } if (from == 2) { @@ -184,9 +185,15 @@ class AppDatabase extends _$AppDatabase { appearanceConfigurations.palette, ); } + if (from < 4) { + await migrator.addColumn( + appearanceConfigurations, + appearanceConfigurations.timelineRulerLayout, + ); + } await migrator.addColumn( - appearanceConfigurations, - appearanceConfigurations.timelineRulerLayout, + projectViewConfigurations, + projectViewConfigurations.mediaWidth, ); }, beforeOpen: (_) async { diff --git a/lib/persistence/app_database.g.dart b/lib/persistence/app_database.g.dart index 50aaadb..d07754a 100644 --- a/lib/persistence/app_database.g.dart +++ b/lib/persistence/app_database.g.dart @@ -3535,11 +3535,23 @@ class $ProjectViewConfigurationsTable extends ProjectViewConfigurations type: DriftSqlType.double, requiredDuringInsert: false, ); + static const VerificationMeta _mediaWidthMeta = const VerificationMeta( + 'mediaWidth', + ); + @override + late final GeneratedColumn mediaWidth = GeneratedColumn( + 'media_width', + aliasedName, + true, + type: DriftSqlType.double, + requiredDuringInsert: false, + ); @override List get $columns => [ projectId, propertiesOpen, timelineHeight, + mediaWidth, ]; @override String get aliasedName => _alias ?? actualTableName; @@ -3581,6 +3593,12 @@ class $ProjectViewConfigurationsTable extends ProjectViewConfigurations ), ); } + if (data.containsKey('media_width')) { + context.handle( + _mediaWidthMeta, + mediaWidth.isAcceptableOrUnknown(data['media_width']!, _mediaWidthMeta), + ); + } return context; } @@ -3605,6 +3623,10 @@ class $ProjectViewConfigurationsTable extends ProjectViewConfigurations DriftSqlType.double, data['${effectivePrefix}timeline_height'], ), + mediaWidth: attachedDatabase.typeMapping.read( + DriftSqlType.double, + data['${effectivePrefix}media_width'], + ), ); } @@ -3619,10 +3641,12 @@ class ProjectViewConfiguration extends DataClass final String projectId; final bool propertiesOpen; final double? timelineHeight; + final double? mediaWidth; const ProjectViewConfiguration({ required this.projectId, required this.propertiesOpen, this.timelineHeight, + this.mediaWidth, }); @override Map toColumns(bool nullToAbsent) { @@ -3632,6 +3656,9 @@ class ProjectViewConfiguration extends DataClass if (!nullToAbsent || timelineHeight != null) { map['timeline_height'] = Variable(timelineHeight); } + if (!nullToAbsent || mediaWidth != null) { + map['media_width'] = Variable(mediaWidth); + } return map; } @@ -3642,6 +3669,9 @@ class ProjectViewConfiguration extends DataClass timelineHeight: timelineHeight == null && nullToAbsent ? const Value.absent() : Value(timelineHeight), + mediaWidth: mediaWidth == null && nullToAbsent + ? const Value.absent() + : Value(mediaWidth), ); } @@ -3654,6 +3684,7 @@ class ProjectViewConfiguration extends DataClass projectId: serializer.fromJson(json['projectId']), propertiesOpen: serializer.fromJson(json['propertiesOpen']), timelineHeight: serializer.fromJson(json['timelineHeight']), + mediaWidth: serializer.fromJson(json['mediaWidth']), ); } @override @@ -3663,6 +3694,7 @@ class ProjectViewConfiguration extends DataClass 'projectId': serializer.toJson(projectId), 'propertiesOpen': serializer.toJson(propertiesOpen), 'timelineHeight': serializer.toJson(timelineHeight), + 'mediaWidth': serializer.toJson(mediaWidth), }; } @@ -3670,12 +3702,14 @@ class ProjectViewConfiguration extends DataClass String? projectId, bool? propertiesOpen, Value timelineHeight = const Value.absent(), + Value mediaWidth = const Value.absent(), }) => ProjectViewConfiguration( projectId: projectId ?? this.projectId, propertiesOpen: propertiesOpen ?? this.propertiesOpen, timelineHeight: timelineHeight.present ? timelineHeight.value : this.timelineHeight, + mediaWidth: mediaWidth.present ? mediaWidth.value : this.mediaWidth, ); ProjectViewConfiguration copyWithCompanion( ProjectViewConfigurationsCompanion data, @@ -3688,6 +3722,9 @@ class ProjectViewConfiguration extends DataClass timelineHeight: data.timelineHeight.present ? data.timelineHeight.value : this.timelineHeight, + mediaWidth: data.mediaWidth.present + ? data.mediaWidth.value + : this.mediaWidth, ); } @@ -3696,20 +3733,23 @@ class ProjectViewConfiguration extends DataClass return (StringBuffer('ProjectViewConfiguration(') ..write('projectId: $projectId, ') ..write('propertiesOpen: $propertiesOpen, ') - ..write('timelineHeight: $timelineHeight') + ..write('timelineHeight: $timelineHeight, ') + ..write('mediaWidth: $mediaWidth') ..write(')')) .toString(); } @override - int get hashCode => Object.hash(projectId, propertiesOpen, timelineHeight); + int get hashCode => + Object.hash(projectId, propertiesOpen, timelineHeight, mediaWidth); @override bool operator ==(Object other) => identical(this, other) || (other is ProjectViewConfiguration && other.projectId == this.projectId && other.propertiesOpen == this.propertiesOpen && - other.timelineHeight == this.timelineHeight); + other.timelineHeight == this.timelineHeight && + other.mediaWidth == this.mediaWidth); } class ProjectViewConfigurationsCompanion @@ -3717,17 +3757,20 @@ class ProjectViewConfigurationsCompanion final Value projectId; final Value propertiesOpen; final Value timelineHeight; + final Value mediaWidth; final Value rowid; const ProjectViewConfigurationsCompanion({ this.projectId = const Value.absent(), this.propertiesOpen = const Value.absent(), this.timelineHeight = const Value.absent(), + this.mediaWidth = const Value.absent(), this.rowid = const Value.absent(), }); ProjectViewConfigurationsCompanion.insert({ required String projectId, required bool propertiesOpen, this.timelineHeight = const Value.absent(), + this.mediaWidth = const Value.absent(), this.rowid = const Value.absent(), }) : projectId = Value(projectId), propertiesOpen = Value(propertiesOpen); @@ -3735,12 +3778,14 @@ class ProjectViewConfigurationsCompanion Expression? projectId, Expression? propertiesOpen, Expression? timelineHeight, + Expression? mediaWidth, Expression? rowid, }) { return RawValuesInsertable({ if (projectId != null) 'project_id': projectId, if (propertiesOpen != null) 'properties_open': propertiesOpen, if (timelineHeight != null) 'timeline_height': timelineHeight, + if (mediaWidth != null) 'media_width': mediaWidth, if (rowid != null) 'rowid': rowid, }); } @@ -3749,12 +3794,14 @@ class ProjectViewConfigurationsCompanion Value? projectId, Value? propertiesOpen, Value? timelineHeight, + Value? mediaWidth, Value? rowid, }) { return ProjectViewConfigurationsCompanion( projectId: projectId ?? this.projectId, propertiesOpen: propertiesOpen ?? this.propertiesOpen, timelineHeight: timelineHeight ?? this.timelineHeight, + mediaWidth: mediaWidth ?? this.mediaWidth, rowid: rowid ?? this.rowid, ); } @@ -3771,6 +3818,9 @@ class ProjectViewConfigurationsCompanion if (timelineHeight.present) { map['timeline_height'] = Variable(timelineHeight.value); } + if (mediaWidth.present) { + map['media_width'] = Variable(mediaWidth.value); + } if (rowid.present) { map['rowid'] = Variable(rowid.value); } @@ -3783,6 +3833,7 @@ class ProjectViewConfigurationsCompanion ..write('projectId: $projectId, ') ..write('propertiesOpen: $propertiesOpen, ') ..write('timelineHeight: $timelineHeight, ') + ..write('mediaWidth: $mediaWidth, ') ..write('rowid: $rowid') ..write(')')) .toString(); @@ -6782,6 +6833,7 @@ typedef $$ProjectViewConfigurationsTableCreateCompanionBuilder = required String projectId, required bool propertiesOpen, Value timelineHeight, + Value mediaWidth, Value rowid, }); typedef $$ProjectViewConfigurationsTableUpdateCompanionBuilder = @@ -6789,6 +6841,7 @@ typedef $$ProjectViewConfigurationsTableUpdateCompanionBuilder = Value projectId, Value propertiesOpen, Value timelineHeight, + Value mediaWidth, Value rowid, }); @@ -6815,6 +6868,11 @@ class $$ProjectViewConfigurationsTableFilterComposer column: $table.timelineHeight, builder: (column) => ColumnFilters(column), ); + + ColumnFilters get mediaWidth => $composableBuilder( + column: $table.mediaWidth, + builder: (column) => ColumnFilters(column), + ); } class $$ProjectViewConfigurationsTableOrderingComposer @@ -6840,6 +6898,11 @@ class $$ProjectViewConfigurationsTableOrderingComposer column: $table.timelineHeight, builder: (column) => ColumnOrderings(column), ); + + ColumnOrderings get mediaWidth => $composableBuilder( + column: $table.mediaWidth, + builder: (column) => ColumnOrderings(column), + ); } class $$ProjectViewConfigurationsTableAnnotationComposer @@ -6863,6 +6926,11 @@ class $$ProjectViewConfigurationsTableAnnotationComposer column: $table.timelineHeight, builder: (column) => column, ); + + GeneratedColumn get mediaWidth => $composableBuilder( + column: $table.mediaWidth, + builder: (column) => column, + ); } class $$ProjectViewConfigurationsTableTableManager @@ -6914,11 +6982,13 @@ class $$ProjectViewConfigurationsTableTableManager Value projectId = const Value.absent(), Value propertiesOpen = const Value.absent(), Value timelineHeight = const Value.absent(), + Value mediaWidth = const Value.absent(), Value rowid = const Value.absent(), }) => ProjectViewConfigurationsCompanion( projectId: projectId, propertiesOpen: propertiesOpen, timelineHeight: timelineHeight, + mediaWidth: mediaWidth, rowid: rowid, ), createCompanionCallback: @@ -6926,11 +6996,13 @@ class $$ProjectViewConfigurationsTableTableManager required String projectId, required bool propertiesOpen, Value timelineHeight = const Value.absent(), + Value mediaWidth = const Value.absent(), Value rowid = const Value.absent(), }) => ProjectViewConfigurationsCompanion.insert( projectId: projectId, propertiesOpen: propertiesOpen, timelineHeight: timelineHeight, + mediaWidth: mediaWidth, rowid: rowid, ), withReferenceMapper: (p0) => p0 diff --git a/lib/persistence/settings/agent_settings_repository.dart b/lib/persistence/settings/agent_settings_repository.dart index f59749f..d55bd69 100644 --- a/lib/persistence/settings/agent_settings_repository.dart +++ b/lib/persistence/settings/agent_settings_repository.dart @@ -60,32 +60,29 @@ class DriftAgentSettingsRepository implements AgentSettingsRepository { _database.transaction(() async { await _database.delete(_database.agentModels).go(); await _database.delete(_database.agentProviders).go(); - for (final provider in settings.providers) { - await _database - .into(_database.agentProviders) - .insert( - AgentProvidersCompanion.insert( - id: provider.id, - enabled: Value(provider.enabled), - name: provider.name, - apiType: provider.apiType, - baseUrl: provider.baseUrl, - credentialId: Value(provider.credentialId), + await _database.batch((batch) { + batch.insertAll(_database.agentProviders, [ + for (final provider in settings.providers) + AgentProvidersCompanion.insert( + id: provider.id, + enabled: Value(provider.enabled), + name: provider.name, + apiType: provider.apiType, + baseUrl: provider.baseUrl, + credentialId: Value(provider.credentialId), + ), + ]); + batch.insertAll(_database.agentModels, [ + for (final provider in settings.providers) + for (final model in provider.models) + AgentModelsCompanion.insert( + providerId: provider.id, + modelId: model.id, + contextWindow: Value(model.contextWindow), + maxOutputTokens: Value(model.maxOutputTokens), ), - ); - for (final model in provider.models) { - await _database - .into(_database.agentModels) - .insert( - AgentModelsCompanion.insert( - providerId: provider.id, - modelId: model.id, - contextWindow: Value(model.contextWindow), - maxOutputTokens: Value(model.maxOutputTokens), - ), - ); - } - } + ]); + }); await _database .into(_database.agentConfigurations) .insertOnConflictUpdate( diff --git a/lib/persistence/settings/view_settings_repositories.dart b/lib/persistence/settings/view_settings_repositories.dart index d1bbb33..f73bf47 100644 --- a/lib/persistence/settings/view_settings_repositories.dart +++ b/lib/persistence/settings/view_settings_repositories.dart @@ -74,6 +74,7 @@ abstract class ProjectViewSettingsData with _$ProjectViewSettingsData { const factory ProjectViewSettingsData({ @Default(false) bool propertiesOpen, double? timelineHeight, + double? mediaWidth, }) = _ProjectViewSettingsData; } @@ -101,6 +102,7 @@ class DriftProjectViewSettingsRepository : ProjectViewSettingsData( propertiesOpen: row.propertiesOpen, timelineHeight: row.timelineHeight, + mediaWidth: row.mediaWidth, ); } @@ -113,6 +115,7 @@ class DriftProjectViewSettingsRepository projectId: projectId, propertiesOpen: settings.propertiesOpen, timelineHeight: Value(settings.timelineHeight), + mediaWidth: Value(settings.mediaWidth), ), ); } diff --git a/lib/persistence/settings/view_settings_repositories.freezed.dart b/lib/persistence/settings/view_settings_repositories.freezed.dart index 86998cb..d940fc9 100644 --- a/lib/persistence/settings/view_settings_repositories.freezed.dart +++ b/lib/persistence/settings/view_settings_repositories.freezed.dart @@ -464,6 +464,7 @@ class __$WorkspaceViewSettingsDataCopyWithImpl<$Res> mixin _$ProjectViewSettingsData { bool get propertiesOpen; double? get timelineHeight; + double? get mediaWidth; /// Create a copy of ProjectViewSettingsData /// with the given fields replaced by the non-null parameter values. @@ -484,19 +485,26 @@ mixin _$ProjectViewSettingsData { (identical(other.propertiesOpen, _this.propertiesOpen) || other.propertiesOpen == _this.propertiesOpen) && (identical(other.timelineHeight, _this.timelineHeight) || - other.timelineHeight == _this.timelineHeight)); + other.timelineHeight == _this.timelineHeight) && + (identical(other.mediaWidth, _this.mediaWidth) || + other.mediaWidth == _this.mediaWidth)); } @override int get hashCode { final _this = this as ProjectViewSettingsData; - return Object.hash(runtimeType, _this.propertiesOpen, _this.timelineHeight); + return Object.hash( + runtimeType, + _this.propertiesOpen, + _this.timelineHeight, + _this.mediaWidth, + ); } @override String toString() { final _this = this as ProjectViewSettingsData; - return 'ProjectViewSettingsData(propertiesOpen: ${_this.propertiesOpen}, timelineHeight: ${_this.timelineHeight})'; + return 'ProjectViewSettingsData(propertiesOpen: ${_this.propertiesOpen}, timelineHeight: ${_this.timelineHeight}, mediaWidth: ${_this.mediaWidth})'; } } @@ -507,7 +515,7 @@ abstract mixin class $ProjectViewSettingsDataCopyWith<$Res> { $Res Function(ProjectViewSettingsData) _then, ) = _$ProjectViewSettingsDataCopyWithImpl; @useResult - $Res call({bool propertiesOpen, double? timelineHeight}); + $Res call({bool propertiesOpen, double? timelineHeight, double? mediaWidth}); } /// @nodoc @@ -522,7 +530,11 @@ class _$ProjectViewSettingsDataCopyWithImpl<$Res> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({Object? propertiesOpen = null, Object? timelineHeight = freezed}) { + $Res call({ + Object? propertiesOpen = null, + Object? timelineHeight = freezed, + Object? mediaWidth = freezed, + }) { return _then( ProjectViewSettingsData( propertiesOpen: null == propertiesOpen @@ -533,6 +545,10 @@ class _$ProjectViewSettingsDataCopyWithImpl<$Res> ? _self.timelineHeight : timelineHeight // ignore: cast_nullable_to_non_nullable as double?, + mediaWidth: freezed == mediaWidth + ? _self.mediaWidth + : mediaWidth // ignore: cast_nullable_to_non_nullable + as double?, ), ); } @@ -631,13 +647,22 @@ extension ProjectViewSettingsDataPatterns on ProjectViewSettingsData { @optionalTypeArgs TResult maybeWhen( - TResult Function(bool propertiesOpen, double? timelineHeight)? $default, { + TResult Function( + bool propertiesOpen, + double? timelineHeight, + double? mediaWidth, + )? + $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _ProjectViewSettingsData() when $default != null: - return $default(_that.propertiesOpen, _that.timelineHeight); + return $default( + _that.propertiesOpen, + _that.timelineHeight, + _that.mediaWidth, + ); case _: return orElse(); } @@ -658,12 +683,21 @@ extension ProjectViewSettingsDataPatterns on ProjectViewSettingsData { @optionalTypeArgs TResult when( - TResult Function(bool propertiesOpen, double? timelineHeight) $default, + TResult Function( + bool propertiesOpen, + double? timelineHeight, + double? mediaWidth, + ) + $default, ) { final _that = this; switch (_that) { case _ProjectViewSettingsData(): - return $default(_that.propertiesOpen, _that.timelineHeight); + return $default( + _that.propertiesOpen, + _that.timelineHeight, + _that.mediaWidth, + ); case _: throw StateError('Unexpected subclass'); } @@ -683,12 +717,21 @@ extension ProjectViewSettingsDataPatterns on ProjectViewSettingsData { @optionalTypeArgs TResult? whenOrNull( - TResult? Function(bool propertiesOpen, double? timelineHeight)? $default, + TResult? Function( + bool propertiesOpen, + double? timelineHeight, + double? mediaWidth, + )? + $default, ) { final _that = this; switch (_that) { case _ProjectViewSettingsData() when $default != null: - return $default(_that.propertiesOpen, _that.timelineHeight); + return $default( + _that.propertiesOpen, + _that.timelineHeight, + _that.mediaWidth, + ); case _: return null; } @@ -701,6 +744,7 @@ class _ProjectViewSettingsData extends ProjectViewSettingsData { const _ProjectViewSettingsData({ this.propertiesOpen = false, this.timelineHeight, + this.mediaWidth, }) : super._(); @override @@ -708,6 +752,8 @@ class _ProjectViewSettingsData extends ProjectViewSettingsData { final bool propertiesOpen; @override final double? timelineHeight; + @override + final double? mediaWidth; /// Create a copy of ProjectViewSettingsData /// with the given fields replaced by the non-null parameter values. @@ -728,17 +774,19 @@ class _ProjectViewSettingsData extends ProjectViewSettingsData { (identical(other.propertiesOpen, propertiesOpen) || other.propertiesOpen == propertiesOpen) && (identical(other.timelineHeight, timelineHeight) || - other.timelineHeight == timelineHeight)); + other.timelineHeight == timelineHeight) && + (identical(other.mediaWidth, mediaWidth) || + other.mediaWidth == mediaWidth)); } @override int get hashCode { - return Object.hash(runtimeType, propertiesOpen, timelineHeight); + return Object.hash(runtimeType, propertiesOpen, timelineHeight, mediaWidth); } @override String toString() { - return 'ProjectViewSettingsData(propertiesOpen: $propertiesOpen, timelineHeight: $timelineHeight)'; + return 'ProjectViewSettingsData(propertiesOpen: $propertiesOpen, timelineHeight: $timelineHeight, mediaWidth: $mediaWidth)'; } } @@ -751,7 +799,7 @@ abstract mixin class _$ProjectViewSettingsDataCopyWith<$Res> ) = __$ProjectViewSettingsDataCopyWithImpl; @override @useResult - $Res call({bool propertiesOpen, double? timelineHeight}); + $Res call({bool propertiesOpen, double? timelineHeight, double? mediaWidth}); } /// @nodoc @@ -766,7 +814,11 @@ class __$ProjectViewSettingsDataCopyWithImpl<$Res> /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') - $Res call({Object? propertiesOpen = null, Object? timelineHeight = freezed}) { + $Res call({ + Object? propertiesOpen = null, + Object? timelineHeight = freezed, + Object? mediaWidth = freezed, + }) { return _then( _ProjectViewSettingsData( propertiesOpen: null == propertiesOpen @@ -777,6 +829,10 @@ class __$ProjectViewSettingsDataCopyWithImpl<$Res> ? _self.timelineHeight : timelineHeight // ignore: cast_nullable_to_non_nullable as double?, + mediaWidth: freezed == mediaWidth + ? _self.mediaWidth + : mediaWidth // ignore: cast_nullable_to_non_nullable + as double?, ), ); } diff --git a/lib/workspace/timeline_view_state.dart b/lib/workspace/timeline_view_state.dart index 0d5a5b1..e050f6a 100644 --- a/lib/workspace/timeline_view_state.dart +++ b/lib/workspace/timeline_view_state.dart @@ -95,6 +95,8 @@ final class TimelineViewStateBinding { session, repository, ); + binding._savedViews.addAll(saved.sequences); + binding._savedActiveSequenceId = saved.activeSequenceId; for (final sequenceId in sequenceIds) { final controller = session.view(sequenceId); void listener() => binding._schedule(sequenceId); @@ -133,6 +135,8 @@ final class TimelineViewStateBinding { final EditorTimelineSession session; final TimelineViewSettingsRepository repository; final Map _listeners = {}; + final Map _savedViews = {}; + SequenceId? _savedActiveSequenceId; SequenceId? _activeSequenceId; Timer? _timer; Future _tail = Future.value(); @@ -162,21 +166,36 @@ final class TimelineViewStateBinding { Future _save(SequenceId sequenceId) async { final controller = session.view(sequenceId); + final value = TimelineSequenceViewState( + playheadTick: controller.playheadTick, + camera: controller.camera, + ); + // Selection notifications and closing can repeat the last persisted view. + // A sequence switch must still update the repository's active sequence. + if (_savedActiveSequenceId == sequenceId && + _sameView(_savedViews[sequenceId], value)) { + return; + } try { - await repository.save( - projectId, - timelineId, - sequenceId, - TimelineSequenceViewState( - playheadTick: controller.playheadTick, - camera: controller.camera, - ), - ); + await repository.save(projectId, timelineId, sequenceId, value); + _savedViews[sequenceId] = value; + _savedActiveSequenceId = sequenceId; } catch (_) { // View state must never block editing or project persistence. } } + static bool _sameView( + TimelineSequenceViewState? saved, + TimelineSequenceViewState next, + ) => + saved != null && + saved.playheadTick == next.playheadTick && + saved.camera.baseTick == next.camera.baseTick && + saved.camera.fractionalTick == next.camera.fractionalTick && + saved.camera.pixelsPerTick == next.camera.pixelsPerTick && + saved.camera.verticalOffset == next.camera.verticalOffset; + Future close() async { if (_closed) return; _closed = true; diff --git a/lib/workspace/view_settings.dart b/lib/workspace/view_settings.dart index f1ba643..b5d2eef 100644 --- a/lib/workspace/view_settings.dart +++ b/lib/workspace/view_settings.dart @@ -12,11 +12,21 @@ part 'view_settings.g.dart'; @Riverpod(keepAlive: true) class WorkspaceViewSettings extends _$WorkspaceViewSettings { final _writes = SettingsWriteQueue(); + WorkspaceViewSettingsRepository? _savedRepository; + WorkspaceViewSettingsData? _savedValue; @override Future build() async { + _savedRepository = null; + _savedValue = null; + final repository = ref.watch(workspaceViewSettingsRepositoryProvider); try { - return await ref.watch(workspaceViewSettingsRepositoryProvider).load(); + final value = await repository.load(); + if (value.hasSavedState) { + _savedRepository = repository; + _savedValue = value; + } + return value; } catch (error, stackTrace) { AppDiagnostics.failure( 'settings', @@ -43,7 +53,14 @@ class WorkspaceViewSettings extends _$WorkspaceViewSettings { final value = state.requireValue.copyWith(activeProjectId: activeProjectId); state = AsyncData(value); final repository = ref.read(workspaceViewSettingsRepositoryProvider); - return _writes.run(() => repository.save(value)); + return _writes.run(() async { + if (identical(repository, _savedRepository) && value == _savedValue) { + return; + } + await repository.save(value); + _savedRepository = repository; + _savedValue = value; + }); } } @@ -51,13 +68,19 @@ class WorkspaceViewSettings extends _$WorkspaceViewSettings { @Riverpod(keepAlive: true) class ProjectViewSettings extends _$ProjectViewSettings { final _writes = SettingsWriteQueue(); + ProjectViewSettingsRepository? _savedRepository; + ProjectViewSettingsData? _savedValue; @override Future build(String projectId) async { + _savedRepository = null; + _savedValue = null; + final repository = ref.watch(projectViewSettingsRepositoryProvider); try { - return await ref - .watch(projectViewSettingsRepositoryProvider) - .load(projectId); + final value = await repository.load(projectId); + _savedRepository = repository; + _savedValue = value; + return value; } catch (error, stackTrace) { AppDiagnostics.failure('settings', 'loadProjectView', error, stackTrace); return const ProjectViewSettingsData(); @@ -70,9 +93,19 @@ class ProjectViewSettings extends _$ProjectViewSettings { void setTimelineHeight(double? height) => state = AsyncData(state.requireValue.copyWith(timelineHeight: height)); + void setMediaWidth(double? width) => + state = AsyncData(state.requireValue.copyWith(mediaWidth: width)); + Future save() { final value = state.requireValue; final repository = ref.read(projectViewSettingsRepositoryProvider); - return _writes.run(() => repository.save(projectId, value)); + return _writes.run(() async { + if (identical(repository, _savedRepository) && value == _savedValue) { + return; + } + await repository.save(projectId, value); + _savedRepository = repository; + _savedValue = value; + }); } } diff --git a/lib/workspace/view_settings.g.dart b/lib/workspace/view_settings.g.dart index 716cc3f..53c52e7 100644 --- a/lib/workspace/view_settings.g.dart +++ b/lib/workspace/view_settings.g.dart @@ -41,7 +41,7 @@ final class WorkspaceViewSettingsProvider } String _$workspaceViewSettingsHash() => - r'35836b74a1bbd2718e9a381d5623255ff507c63a'; + r'4b333ecfae5603a101b76117b44e008b389d0f27'; /// Persistent navigation preferences, shared by the application surface. @@ -119,7 +119,7 @@ final class ProjectViewSettingsProvider } String _$projectViewSettingsHash() => - r'c036088de9f39789b8604c48000a63a52517c966'; + r'e072707714bf53ba058f10482397572f50dfb75a'; /// Project preferences survive timeline switches and widget reconstruction. diff --git a/test/app_database_test.dart b/test/app_database_test.dart index 606e042..a65a924 100644 --- a/test/app_database_test.dart +++ b/test/app_database_test.dart @@ -15,6 +15,61 @@ import 'package:path/path.dart' as p; import 'package:sqlite3/sqlite3.dart'; void main() { + for (final version in [2, 3, 4]) { + test( + 'schema $version upgrades while preserving project preferences', + () async { + final directory = await Directory.systemTemp.createTemp( + 'app-view-schema-', + ); + addTearDown(() => directory.delete(recursive: true)); + final file = File(p.join(directory.path, 'app.sqlite')); + final current = AppDatabase(NativeDatabase(file)); + await DriftProjectViewSettingsRepository(current).save( + 'project', + const ProjectViewSettingsData( + propertiesOpen: true, + timelineHeight: 280, + ), + ); + await current.close(); + final old = sqlite3.open(file.path); + try { + old.execute( + 'ALTER TABLE project_view_configurations DROP COLUMN media_width', + ); + if (version < 4) { + old.execute( + 'ALTER TABLE appearance_configurations DROP COLUMN timeline_ruler_layout', + ); + } + if (version == 2) { + old.execute( + 'ALTER TABLE appearance_configurations DROP COLUMN palette', + ); + } + old.userVersion = version; + } finally { + old.close(); + } + final reopened = AppDatabase(NativeDatabase(file)); + addTearDown(reopened.close); + final repository = DriftProjectViewSettingsRepository(reopened); + final restored = await repository.load('project'); + expect(restored.propertiesOpen, isTrue); + expect(restored.timelineHeight, 280); + expect(restored.mediaWidth, isNull); + await repository.save('project', restored.copyWith(mediaWidth: 380)); + expect((await repository.load('project')).mediaWidth, 380); + expect( + (await reopened.customSelect('PRAGMA user_version').getSingle()) + .read('user_version'), + 5, + ); + }, + ); + } + test( 'old app settings schema is rejected without changing its data', () async { @@ -85,13 +140,117 @@ void main() { expect(loaded.providers.single.models.single.id, 'model'); }); + test( + 'batched agent settings replace providers and all their models', + () async { + final database = AppDatabase(NativeDatabase.memory()); + addTearDown(database.close); + final repository = DriftAgentSettingsRepository(database); + await repository.save( + AgentSettingsState( + enabled: true, + selectedProviderId: 'one', + selectedModelId: 'model-0', + revision: 1, + providers: [ + for (final id in ['one', 'two']) + AgentProviderSettings( + id: id, + name: id, + apiType: 'openAiChatCompletions', + baseUrl: 'https://example.com/v1', + credentialId: 'credential-$id', + models: [ + for (var index = 0; index < 50; index++) + AgentModelSettings( + id: 'model-$index', + contextWindow: 32000 + index, + maxOutputTokens: 4096, + ), + ], + ), + ], + ), + ); + final saved = await repository.load(); + expect(saved.providers, hasLength(2)); + for (final provider in saved.providers) { + expect(provider.models, hasLength(50)); + expect( + provider.models.singleWhere((m) => m.id == 'model-49').contextWindow, + 32049, + ); + expect(provider.credentialId, 'credential-${provider.id}'); + } + final replacement = saved.copyWith( + revision: 2, + selectedModelId: 'replacement', + providers: [ + saved.providers.first.copyWith( + models: const [AgentModelSettings(id: 'replacement')], + ), + ], + ); + await repository.save(replacement); + expect(await repository.load(), replacement); + await repository.save(const AgentSettingsState(revision: 3)); + expect(await repository.load(), const AgentSettingsState(revision: 3)); + expect(await database.select(database.agentModels).get(), isEmpty); + }, + ); + + test( + 'a failed agent model batch rolls back the whole configuration', + () async { + final database = AppDatabase(NativeDatabase.memory()); + addTearDown(database.close); + final repository = DriftAgentSettingsRepository(database); + const saved = AgentSettingsState( + enabled: true, + selectedProviderId: 'provider', + selectedModelId: 'model', + revision: 1, + providers: [ + AgentProviderSettings( + id: 'provider', + name: 'Provider', + apiType: 'openAiChatCompletions', + baseUrl: 'https://example.com/v1', + models: [AgentModelSettings(id: 'model')], + ), + ], + ); + await repository.save(saved); + final invalid = saved.copyWith( + enabled: false, + revision: 2, + providers: [ + saved.providers.single.copyWith( + models: const [ + AgentModelSettings(id: 'duplicate'), + AgentModelSettings(id: 'duplicate'), + ], + ), + ], + ); + await expectLater( + repository.save(invalid), + throwsA(isA()), + ); + expect(await repository.load(), saved); + final retry = saved.copyWith(enabled: false, revision: 2); + await repository.save(retry); + expect(await repository.load(), retry); + }, + ); + test('typed app repositories share one Drift database', () async { final database = AppDatabase(NativeDatabase.memory()); addTearDown(database.close); expect( (await database.customSelect('PRAGMA user_version').getSingle()) .read('user_version'), - 4, + 5, ); final appearance = DriftAppearanceSettingsRepository(database); @@ -194,11 +353,16 @@ void main() { final projectView = DriftProjectViewSettingsRepository(database); await projectView.save( 'two', - const ProjectViewSettingsData(propertiesOpen: true, timelineHeight: 280), + const ProjectViewSettingsData( + propertiesOpen: true, + timelineHeight: 280, + mediaWidth: 360, + ), ); final projectValue = await projectView.load('two'); expect(projectValue.propertiesOpen, isTrue); expect(projectValue.timelineHeight, 280); + expect(projectValue.mediaWidth, 360); final timelineView = DriftTimelineViewSettingsRepository(database); await timelineView.save( @@ -343,8 +507,10 @@ void main() { sidebarWidth: 300, ), ); - await DriftProjectViewSettingsRepository(first) - .save('project', const ProjectViewSettingsData(propertiesOpen: true)); + await DriftProjectViewSettingsRepository(first).save( + 'project', + const ProjectViewSettingsData(propertiesOpen: true, mediaWidth: 380), + ); await DriftTimelineViewSettingsRepository(first).save( 'project', 'timeline', @@ -392,6 +558,11 @@ void main() { .propertiesOpen, isTrue, ); + expect( + (await DriftProjectViewSettingsRepository(reopened).load('project')) + .mediaWidth, + 380, + ); final timeline = await DriftTimelineViewSettingsRepository(reopened) .load('project', 'timeline'); expect(timeline.activeSequenceId, SequenceId('sequence')); diff --git a/test/mcp_settings_test.dart b/test/mcp_settings_test.dart index f67f8d3..1b74e06 100644 --- a/test/mcp_settings_test.dart +++ b/test/mcp_settings_test.dart @@ -12,6 +12,39 @@ import 'package:flutter_test/flutter_test.dart'; import 'support/memory_app_settings.dart'; void main() { + test( + 'MCP persists its initial token once and skips unchanged updates', + () async { + final repository = _CountingMcpRepository(); + final container = ProviderContainer.test( + overrides: [ + mcpSettingsRepositoryProvider.overrideWithValue(repository), + ], + ); + final initial = await container.read(mcpSettingsProvider.future); + expect(repository.writes, hasLength(1)); + final controller = container.read(mcpSettingsProvider.notifier); + await controller.saveSettings( + enabled: initial.enabled, + port: initial.port, + ); + await Future.wait( + List.generate(5, (_) => controller.saveSettings(enabled: true)), + ); + expect(repository.writes, hasLength(2)); + expect(repository.value!.token, initial.token); + repository.failWrites = true; + await expectLater( + controller.saveSettings(enabled: false), + throwsStateError, + ); + repository.failWrites = false; + await controller.saveSettings(enabled: false); + expect(repository.writes, hasLength(4)); + expect(repository.value!.enabled, false); + }, + ); + test('overlapping MCP updates retain enablement and port', () async { final repository = MemoryMcpSettingsRepository(); final container = ProviderContainer( @@ -182,3 +215,13 @@ void main() { expect(find.text('已停用'), findsOneWidget); }); } + +class _CountingMcpRepository extends MemoryMcpSettingsRepository { + final writes = []; + + @override + Future save(McpSettingsValue configuration) { + writes.add(configuration); + return super.save(configuration); + } +} diff --git a/test/palette_settings_test.dart b/test/palette_settings_test.dart index 2c83ed3..47f97ef 100644 --- a/test/palette_settings_test.dart +++ b/test/palette_settings_test.dart @@ -80,6 +80,9 @@ void main() { await initial.close(); final old = sqlite3.open(file.path); try { + old.execute( + 'ALTER TABLE project_view_configurations DROP COLUMN media_width', + ); old.execute( 'ALTER TABLE appearance_configurations DROP COLUMN timeline_ruler_layout', ); diff --git a/test/settings_save_order_test.dart b/test/settings_save_order_test.dart index 7883055..81d82a4 100644 --- a/test/settings_save_order_test.dart +++ b/test/settings_save_order_test.dart @@ -90,6 +90,55 @@ void _testSettings({ required T Function(ProviderContainer) value, required Future Function(ProviderContainer, T) save, }) { + test('$name skips an unchanged loaded value', () async { + final store = _Store(initial); + final scope = container(store); + addTearDown(scope.dispose); + await load(scope); + await save(scope, initial); + expect(store.writes, isEmpty); + }); + + test('$name skips duplicate values queued during a write', () async { + final store = _Store(initial)..writeGate = Completer(); + final scope = container(store); + addTearDown(scope.dispose); + await load(scope); + final firstSave = save(scope, first); + await store.started.future; + final duplicates = List.generate(5, (_) => save(scope, first)); + store.writeGate!.complete(); + await Future.wait([firstSave, ...duplicates]); + expect(store.writes, [first]); + expect(value(scope), first); + }); + + test('$name preserves changes back to a previously saved value', () async { + final store = _Store(initial); + final scope = container(store); + addTearDown(scope.dispose); + await load(scope); + await Future.wait([ + save(scope, first), + save(scope, second), + save(scope, first), + ]); + expect(store.writes, [first, second, first]); + expect(store.value, first); + }); + + test('$name retries the same value after a failed write', () async { + final store = _Store(initial)..failWrites = true; + final scope = container(store); + addTearDown(scope.dispose); + await load(scope); + await expectLater(save(scope, first), throwsStateError); + store.failWrites = false; + await save(scope, first); + expect(store.writes, [first, first]); + expect(store.value, first); + }); + test('$name saves in order and publishes only committed values', () async { final store = _Store(initial)..writeGate = Completer(); final scope = container(store); diff --git a/test/timeline_ruler_settings_test.dart b/test/timeline_ruler_settings_test.dart index 59056d0..a6e6d33 100644 --- a/test/timeline_ruler_settings_test.dart +++ b/test/timeline_ruler_settings_test.dart @@ -99,6 +99,9 @@ void main() { await initial.close(); final old = sqlite3.open(file.path); try { + old.execute( + 'ALTER TABLE project_view_configurations DROP COLUMN media_width', + ); old.execute( 'ALTER TABLE appearance_configurations DROP COLUMN timeline_ruler_layout', ); diff --git a/test/timeline_view_state_test.dart b/test/timeline_view_state_test.dart new file mode 100644 index 0000000..4cc1ed1 --- /dev/null +++ b/test/timeline_view_state_test.dart @@ -0,0 +1,210 @@ +import 'package:cutdex/persistence/app_settings_repositories.dart'; +import 'package:cutdex/workspace/timeline_view_state.dart'; +import 'package:cutdex_sdk/timeline/layout.dart'; +import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'support/preview_fixture.dart'; + +void main() { + TestWidgetsFlutterBinding.ensureInitialized(); + + test('selection and close skip an already persisted timeline view', () async { + final fixture = await createPreviewFixture(Uri.file('/test.mp4')); + addTearDown(() async { + await fixture.workspace.close(); + await fixture.directory.delete(recursive: true); + }); + final session = fixture.timeline; + final id = session.activeSequenceId!; + final view = session.view(id); + final repository = _Repository() + ..value = TimelineViewState( + activeSequenceId: id, + sequences: { + id: TimelineSequenceViewState( + playheadTick: view.playheadTick, + camera: view.camera, + ), + }, + ); + final binding = await TimelineViewStateBinding.attach( + projectId: 'project', + timelineId: 'timeline', + session: session, + repository: repository, + ); + addTearDown(binding.close); + // A new camera object with the same fields is also an unchanged view. + final camera = view.camera; + view.restoreViewState( + playheadTick: view.playheadTick, + camera: TimelineCamera( + baseTick: camera.baseTick, + fractionalTick: camera.fractionalTick, + pixelsPerTick: camera.pixelsPerTick, + verticalOffset: camera.verticalOffset, + ), + ); + view.setSelection([ElementId('clip')]); + await Future.delayed(const Duration(milliseconds: 550)); + await binding.close(); + expect(repository.writes, isEmpty); + }); + + test('navigation is debounced and close skips the committed view', () async { + final fixture = await createPreviewFixture(Uri.file('/test.mp4')); + addTearDown(() async { + await fixture.workspace.close(); + await fixture.directory.delete(recursive: true); + }); + final session = fixture.timeline; + final id = session.activeSequenceId!; + final view = session.view(id); + final repository = _Repository(); + final binding = await TimelineViewStateBinding.attach( + projectId: 'project', + timelineId: 'timeline', + session: session, + repository: repository, + ); + addTearDown(binding.close); + for (var tick = 1; tick <= 20; tick++) { + view.seekTo(tick); + view.setCamera( + TimelineCamera( + baseTick: tick, + fractionalTick: .5, + pixelsPerTick: .25, + verticalOffset: tick.toDouble(), + ), + ); + } + expect(repository.writes, isEmpty); + await Future.delayed(const Duration(milliseconds: 550)); + expect(repository.writes, [id]); + expect(repository.value.sequences[id]!.playheadTick, 20); + expect( + repository.value.sequences[id]!.camera.baseTick, + view.camera.baseTick, + ); + view.setSelection([ElementId('clip')]); + await Future.delayed(const Duration(milliseconds: 550)); + await binding.close(); + expect(repository.writes, [id]); + }); + + test( + 'switching unchanged sequences still persists the active sequence', + () async { + final fixture = await createPreviewFixture(Uri.file('/test.mp4')); + addTearDown(() async { + await fixture.workspace.close(); + await fixture.directory.delete(recursive: true); + }); + final session = fixture.timeline; + final first = session.activeSequenceId!; + final second = SequenceId('empty'); + final repository = _Repository() + ..value = TimelineViewState( + activeSequenceId: first, + sequences: { + for (final id in [first, second]) + id: TimelineSequenceViewState( + playheadTick: session.view(id).playheadTick, + camera: session.view(id).camera, + ), + }, + ); + final binding = await TimelineViewStateBinding.attach( + projectId: 'project', + timelineId: 'timeline', + session: session, + repository: repository, + ); + addTearDown(binding.close); + session.selectSequence(second); + await Future.delayed(Duration.zero); + expect(repository.writes, [second]); + expect(repository.value.activeSequenceId, second); + session.selectSequence(first); + await binding.close(); + expect(repository.writes, [second, first]); + expect(repository.value.activeSequenceId, first); + }, + ); + + test( + 'close retries an unchanged snapshot after a failed timer save', + () async { + final fixture = await createPreviewFixture(Uri.file('/test.mp4')); + addTearDown(() async { + await fixture.workspace.close(); + await fixture.directory.delete(recursive: true); + }); + final session = fixture.timeline; + final id = session.activeSequenceId!; + final repository = _Repository()..failWrites = true; + final binding = await TimelineViewStateBinding.attach( + projectId: 'project', + timelineId: 'timeline', + session: session, + repository: repository, + ); + addTearDown(binding.close); + session.view(id).seekTo(20); + await Future.delayed(const Duration(milliseconds: 550)); + expect(repository.writes, [id]); + expect(repository.value.sequences, isEmpty); + repository.failWrites = false; + await binding.close(); + expect(repository.writes, [id, id]); + expect(repository.value.sequences[id]!.playheadTick, 20); + }, + ); + + test('a failed load does not suppress saving defaults', () async { + final fixture = await createPreviewFixture(Uri.file('/test.mp4')); + addTearDown(() async { + await fixture.workspace.close(); + await fixture.directory.delete(recursive: true); + }); + final repository = _Repository()..failLoads = true; + final binding = await TimelineViewStateBinding.attach( + projectId: 'project', + timelineId: 'timeline', + session: fixture.timeline, + repository: repository, + ); + await binding.close(); + expect(repository.writes, [fixture.timeline.activeSequenceId]); + }); +} + +class _Repository implements TimelineViewSettingsRepository { + TimelineViewState value = const TimelineViewState(); + final writes = []; + bool failLoads = false; + bool failWrites = false; + + @override + Future load(String projectId, String timelineId) async { + if (failLoads) throw StateError('load failed'); + return value; + } + + @override + Future save( + String projectId, + String timelineId, + SequenceId sequenceId, + TimelineSequenceViewState state, + ) async { + writes.add(sequenceId); + if (failWrites) throw StateError('save failed'); + value = value.copyWith( + activeSequenceId: sequenceId, + sequences: {...value.sequences, sequenceId: state}, + ); + } +} diff --git a/test/view_settings_test.dart b/test/view_settings_test.dart index c83ebed..2c314a6 100644 --- a/test/view_settings_test.dart +++ b/test/view_settings_test.dart @@ -9,10 +9,14 @@ class _WorkspaceRepository implements WorkspaceViewSettingsRepository { WorkspaceViewSettingsData value = const WorkspaceViewSettingsData(); final writes = []; Completer? gate; + bool failLoads = false; bool failWrites = false; @override - Future load() async => value; + Future load() async { + if (failLoads) throw StateError('unavailable'); + return value; + } @override Future save(WorkspaceViewSettingsData settings) async { @@ -27,6 +31,8 @@ class _ProjectRepository implements ProjectViewSettingsRepository { final values = {}; final writes = []; bool failLoads = false; + bool failWrites = false; + Completer? gate; @override Future load(String projectId) async { @@ -37,11 +43,122 @@ class _ProjectRepository implements ProjectViewSettingsRepository { @override Future save(String projectId, ProjectViewSettingsData settings) async { writes.add(projectId); + await gate?.future; + if (failWrites) throw StateError('write failed'); values[projectId] = settings; } } void main() { + test( + 'workspace duplicate requests wait for one committed snapshot', + () async { + final repository = _WorkspaceRepository()..gate = Completer(); + final container = ProviderContainer.test( + overrides: [ + workspaceViewSettingsRepositoryProvider.overrideWithValue(repository), + ], + ); + await container.read(workspaceViewSettingsProvider.future); + final controller = container.read(workspaceViewSettingsProvider.notifier); + final pending = List.generate( + 5, + (_) => controller.save(activeProjectId: 'project'), + ); + await Future.delayed(Duration.zero); + expect(repository.writes, hasLength(1)); + repository.gate!.complete(); + await Future.wait(pending); + await controller.save(activeProjectId: 'project'); + expect(repository.writes, hasLength(1)); + await controller.save(activeProjectId: 'other'); + await controller.save(activeProjectId: 'project'); + expect(repository.writes.map((value) => value.activeProjectId), [ + 'project', + 'other', + 'project', + ]); + }, + ); + + test('workspace skips a snapshot already loaded from storage', () async { + final repository = _WorkspaceRepository() + ..value = const WorkspaceViewSettingsData( + hasSavedState: true, + activeProjectId: 'project', + sidebarWidth: 320, + ); + final container = ProviderContainer.test( + overrides: [ + workspaceViewSettingsRepositoryProvider.overrideWithValue(repository), + ], + ); + await container.read(workspaceViewSettingsProvider.future); + final controller = container.read(workspaceViewSettingsProvider.notifier); + await controller.save(activeProjectId: 'project'); + expect(repository.writes, isEmpty); + controller.setSidebarWidth(340); + await controller.save(activeProjectId: 'project'); + expect(repository.value.sidebarWidth, 340); + }); + + test('workspace persists defaults when no state was loaded', () async { + for (final loadFails in [false, true]) { + final repository = _WorkspaceRepository()..failLoads = loadFails; + final container = ProviderContainer.test( + overrides: [ + workspaceViewSettingsRepositoryProvider.overrideWithValue(repository), + ], + ); + await container.read(workspaceViewSettingsProvider.future); + final controller = container.read(workspaceViewSettingsProvider.notifier); + await controller.save(activeProjectId: null); + await controller.save(activeProjectId: null); + expect(repository.writes, hasLength(1)); + } + }); + + test('project skips repeated pending and committed snapshots', () async { + final repository = _ProjectRepository()..gate = Completer(); + final container = ProviderContainer.test( + overrides: [ + projectViewSettingsRepositoryProvider.overrideWithValue(repository), + ], + ); + final provider = projectViewSettingsProvider('project'); + await container.read(provider.future); + final controller = container.read(provider.notifier); + await controller.save(); + expect(repository.writes, isEmpty); + controller.setMediaWidth(320); + final pending = List.generate(5, (_) => controller.save()); + await Future.delayed(Duration.zero); + expect(repository.writes, ['project']); + repository.gate!.complete(); + await Future.wait(pending); + await controller.save(); + expect(repository.writes, ['project']); + expect(repository.values['project']!.mediaWidth, 320); + }); + + test('project retries an identical snapshot after storage failure', () async { + final repository = _ProjectRepository()..failWrites = true; + final container = ProviderContainer.test( + overrides: [ + projectViewSettingsRepositoryProvider.overrideWithValue(repository), + ], + ); + final provider = projectViewSettingsProvider('project'); + await container.read(provider.future); + final controller = container.read(provider.notifier); + controller.setMediaWidth(320); + await expectLater(controller.save(), throwsStateError); + repository.failWrites = false; + await controller.save(); + expect(repository.writes, ['project', 'project']); + expect(repository.values['project']!.mediaWidth, 320); + }); + test( 'workspace saves remain ordered while a previous write is pending', () async { @@ -112,6 +229,7 @@ void main() { final first = container.read(firstProvider.notifier); first.setPropertiesOpen(true); first.setTimelineHeight(240); + first.setMediaWidth(360); await first.save(); subscription.close(); await container.pump(); @@ -126,6 +244,7 @@ void main() { ], ); expect((await restored.read(firstProvider.future)).timelineHeight, 240); + expect((await restored.read(firstProvider.future)).mediaWidth, 360); expect(repository.writes, ['first']); }, ); -- 2.54.0 From 1acfe4a0056168c528fbb6a82b90b74af9098e46 Mon Sep 17 00:00:00 2001 From: lingjhf Date: Fri, 9 Oct 2026 19:23:49 +0800 Subject: [PATCH 03/14] feat(workspace): add workflow navigation and resizable desktop panels --- .../workspace_resize_performance_test.dart | 264 ++++++++++++ .../adaptive/desktop_content_controller.dart | 2 +- lib/app/shells/desktop_window_frame.dart | 167 ++++---- lib/app/shells/desktop_workspace_shell.dart | 130 +++++- lib/features/editor/editor_page.dart | 44 +- .../editor/editor_panel_defaults.dart | 6 +- .../layouts/expanded_editor_layout.dart | 99 ++++- lib/features/projects/projects_page.dart | 99 ++++- lib/features/projects/workflow_page.dart | 50 +++ .../layout/workspace_layout_metrics.dart | 34 +- .../widgets/workspace_resize_handle.dart | 266 +++++++++++- test/adaptive_workspace_test.dart | 386 ++++++++++++++++- test/desktop_window_header_spacing_test.dart | 1 + test/desktop_workspace_cards_test.dart | 397 +++++++++++++++++- test/editor_panel_defaults_test.dart | 2 +- test/widget_test.dart | 11 +- test/workspace_resize_handle_test.dart | 327 ++++++++++----- 17 files changed, 2008 insertions(+), 277 deletions(-) create mode 100644 integration_test/workspace_resize_performance_test.dart create mode 100644 lib/features/projects/workflow_page.dart diff --git a/integration_test/workspace_resize_performance_test.dart b/integration_test/workspace_resize_performance_test.dart new file mode 100644 index 0000000..4d78c84 --- /dev/null +++ b/integration_test/workspace_resize_performance_test.dart @@ -0,0 +1,264 @@ +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; +import 'dart:math' as math; + +import 'package:cutdex/app/app.dart'; +import 'package:cutdex/integrations/agent/conversation_repository.dart'; +import 'package:cutdex/integrations/platform/device_experience.dart'; +import 'package:cutdex/persistence/app_database.dart'; +import 'package:cutdex/persistence/settings/view_settings_repositories.dart'; +import 'package:cutdex/workspace/projects.dart'; +import 'package:cutdex/workspace/view_settings.dart'; +import 'package:cutdex/workspace/workspace_mode.dart'; +import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:drift/native.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:integration_test/integration_test.dart'; + +import '../test/support/empty_conversation_repository.dart'; +import '../test/support/preview_fixture.dart'; + +/// Run with flutter drive --profile on macOS and test_driver/integration_test.dart. +/// Define CUTDEX_RESIZE_SOURCE (an image) and CUTDEX_RESIZE_REPORT (JSON output). +/// Widget-test timings are not comparable to these real-engine measurements. +void main() { + final binding = IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + binding.framePolicy = LiveTestWidgetsFlutterBindingFramePolicy.fullyLive; + const source = String.fromEnvironment('CUTDEX_RESIZE_SOURCE'); + const output = String.fromEnvironment('CUTDEX_RESIZE_REPORT'); + const rounds = int.fromEnvironment('CUTDEX_RESIZE_ROUNDS', defaultValue: 3); + const inputHz = 120; + const inputCount = 240; + const clipCount = 64; + const assetCount = 100; + + testWidgets('profile full desktop workspace split and junction dragging', ( + tester, + ) async { + expect(kProfileMode, isTrue, reason: 'Use flutter drive --profile'); + expect(Platform.isMacOS, isTrue); + expect(await File(source).exists(), isTrue); + final ids = List.generate(clipCount, (i) => ElementId('clip-$i')); + final fixture = await createPreviewFixture( + File(source).uri, + mediaType: 'image', + renderSize: {'width': 1280, 'height': 720}, + timelineOverride: TimelineDto( + id: SequenceId('one'), + name: 'Resize profiling', + format: TimelineFormat.fps30, + primaryStorylineId: StorylineId('primary'), + storylines: [StorylineDto(id: StorylineId('primary'), elementIds: ids)], + elements: [ + for (final (i, id) in ids.indexed) + ElementDto( + id: id, + name: 'Clip $i', + structure: ElementStructure.content, + payloadRef: PayloadRef('source'), + duration: RationalTime.seconds(2), + sourceRange: TimeRange( + start: RationalTime.zero, + duration: RationalTime.seconds(2), + ), + mediaRange: TimeRange( + start: RationalTime.zero, + duration: RationalTime.seconds(2), + ), + ), + ], + ), + ); + for (var i = 0; i < assetCount; i++) { + await fixture.workspace.project!.saveAsset( + AssetDocument( + id: i == 0 ? 'media' : 'media-$i', + name: 'Image $i', + storage: AssetStorage.external, + location: File(source).uri.toString(), + metadata: {'kind': 'image'}, + ), + ); + } + final projectPath = '${fixture.directory.path}/Preview.cutdex'; + await fixture.workspace.close(); + final database = AppDatabase( + NativeDatabase(File('${fixture.directory.path}/settings.sqlite')), + ); + final workspaceWrites = _CountWorkspaceWrites( + DriftWorkspaceViewSettingsRepository(database), + ); + final projectWrites = _CountProjectWrites( + DriftProjectViewSettingsRepository(database), + ); + final container = ProviderContainer( + overrides: [ + appDatabaseProvider.overrideWithValue(database), + deviceExperienceProvider.overrideWithValue(DeviceExperience.desktop), + workspaceViewSettingsRepositoryProvider.overrideWithValue( + workspaceWrites, + ), + projectViewSettingsRepositoryProvider.overrideWithValue(projectWrites), + conversationRepositoryProvider.overrideWith( + (ref) async => EmptyConversationRepository(), + ), + ], + ); + addTearDown(() async { + await tester.pumpWidget(const SizedBox.shrink()); + await container.read(projectsProvider.notifier).prepareToQuit(); + container.dispose(); + await database.close(); + await fixture.directory.delete(recursive: true); + }); + await container.read(workspaceViewSettingsProvider.future); + container + .read(workspaceViewSettingsProvider.notifier) + .setMode(WorkspaceMode.cut); + expect( + await container.read(projectsProvider.notifier).open(projectPath), + isTrue, + ); + // This is the normal app/router/editor, with only isolated storage and chat. + // ignore: riverpod_lint/provider_scope_placement + await tester.pumpWidget( + UncontrolledProviderScope(container: container, child: const CutdexApp()), + ); + await const MethodChannel('cutdex_native/window') + .invokeMethod('toggleMaximize'); + final readyClock = Stopwatch()..start(); + final junction = find.byKey(const Key('desktop-chat-timeline-junction')); + while (junction.evaluate().isEmpty) { + if (readyClock.elapsed.inSeconds > 60) { + throw TimeoutException('Desktop editor did not open'); + } + await tester.pump(); + await Future.delayed(const Duration(milliseconds: 16)); + } + await Future.delayed(const Duration(seconds: 3)); + final size = tester.view.physicalSize / tester.view.devicePixelRatio; + expect(size.width, greaterThan(1100)); + final results = { + 'mode': 'profile', + 'platform': Platform.operatingSystemVersion, + 'logicalSize': [size.width, size.height], + 'pixelRatio': tester.view.devicePixelRatio, + 'displayRefreshHz': tester.view.display.refreshRate, + 'inputHz': inputHz, + 'inputsPerDrag': inputCount, + 'clips': clipCount, + 'assets': assetCount, + 'scope': 'Full app, native still-image preview, file-backed SQLite; synthetic mouse input', + 'runs': >[], + }; + final report = File(output); + await report.parent.create(recursive: true); + Future save() => report.writeAsString( + const JsonEncoder.withIndent(' ').convert(results), + ); + await save(); + const scenarios = { + 'sidebar': ('project-sidebar-resize', Offset(55, 0)), + 'media': ('editor-media-resize', Offset(65, 0)), + 'timeline': ('editor-timeline-resize', Offset(0, 80)), + 'mediaJunction': ('editor-media-timeline-junction', Offset(65, 80)), + 'chatJunction': ('desktop-chat-timeline-junction', Offset(55, 80)), + }; + for (var round = 0; round < rounds; round++) { + for (final entry in scenarios.entries) { + final (key, amplitude) = entry.value; + final reportKey = '${entry.key}-$round'; + final start = tester.getCenter(find.byKey(Key(key))); + final mouse = await tester.createGesture(kind: PointerDeviceKind.mouse); + await mouse.addPointer(location: start); + await Future.delayed(const Duration(milliseconds: 250)); + final writesBefore = workspaceWrites.count; + final projectWritesBefore = projectWrites.count; + final dispatchTimes = []; + await binding.watchPerformance(() async { + await mouse.down(start); + final clock = Stopwatch()..start(); + for (var i = 1; i <= inputCount; i++) { + final dueUs = (i * 1000000 / inputHz).round(); + final waitUs = dueUs - clock.elapsedMicroseconds; + if (waitUs > 0) { + await Future.delayed(Duration(microseconds: waitUs)); + } + final dispatch = Stopwatch()..start(); + await mouse.moveTo( + start + amplitude * math.sin(2 * math.pi * i / inputCount), + ); + dispatchTimes.add(dispatch.elapsedMicroseconds); + } + await mouse.up(); + await mouse.removePointer(); + }, reportKey: reportKey); + // Allow queued persistence writes and batched engine timings to arrive. + await Future.delayed(const Duration(seconds: 1)); + final timings = Map.from( + binding.reportData![reportKey] as Map, + ); + final build = List.from(timings['frame_build_times'] as List); + final raster = List.from( + timings['frame_rasterizer_times'] as List, + ); + int overBudget(int budgetUs) => List.generate( + build.length, + (i) => i, + ).where((i) => build[i] > budgetUs || raster[i] > budgetUs).length; + final row = { + 'scenario': entry.key, + 'round': round, + 'workspaceWrites': workspaceWrites.count - writesBefore, + 'projectWrites': projectWrites.count - projectWritesBefore, + 'over16ms': overBudget(16667), + 'over8ms': overBudget(8333), + 'dispatchUs': dispatchTimes, + 'timings': timings, + }; + (results['runs'] as List).add(row); + await save(); + debugPrint( + 'RESIZE_PROFILE ${entry.key} $round frames=${build.length} ' + 'over16ms=${row['over16ms']} writes=${row['workspaceWrites']}', + ); + } + } + results['status'] = 'passed'; + await save(); + expect(tester.takeException(), isNull); + }, skip: !Platform.isMacOS || source.isEmpty || output.isEmpty); +} + +class _CountWorkspaceWrites implements WorkspaceViewSettingsRepository { + _CountWorkspaceWrites(this.delegate); + final WorkspaceViewSettingsRepository delegate; + int count = 0; + @override + Future load() => delegate.load(); + @override + Future save(WorkspaceViewSettingsData settings) { + count++; + return delegate.save(settings); + } +} + +class _CountProjectWrites implements ProjectViewSettingsRepository { + _CountProjectWrites(this.delegate); + final ProjectViewSettingsRepository delegate; + int count = 0; + @override + Future load(String id) => delegate.load(id); + @override + Future save(String id, ProjectViewSettingsData settings) { + count++; + return delegate.save(id, settings); + } +} diff --git a/lib/app/adaptive/desktop_content_controller.dart b/lib/app/adaptive/desktop_content_controller.dart index af9f518..00dfbb0 100644 --- a/lib/app/adaptive/desktop_content_controller.dart +++ b/lib/app/adaptive/desktop_content_controller.dart @@ -1,6 +1,6 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; -enum DesktopContent { workspace, library, resourceLibrary, settings } +enum DesktopContent { workspace, library, resourceLibrary, workflow, settings } typedef DesktopContentSelection = ({ DesktopContent surface, diff --git a/lib/app/shells/desktop_window_frame.dart b/lib/app/shells/desktop_window_frame.dart index 2d73cc3..8c843ce 100644 --- a/lib/app/shells/desktop_window_frame.dart +++ b/lib/app/shells/desktop_window_frame.dart @@ -17,9 +17,9 @@ class DesktopWindowFrame extends StatelessWidget { this.projectTabs, this.headerTrailing = const SizedBox.shrink(), this.settingsSelected = false, - this.resourceLibrarySelected = false, - this.onResourceLibraryPressed, + this.workflowSelected = false, required this.onHomePressed, + required this.onWorkflowPressed, required this.onSettingsPressed, required this.child, }); @@ -35,9 +35,9 @@ class DesktopWindowFrame extends StatelessWidget { final Widget? projectTabs; final Widget headerTrailing; final bool settingsSelected; - final bool resourceLibrarySelected; - final VoidCallback? onResourceLibraryPressed; + final bool workflowSelected; final VoidCallback onHomePressed; + final VoidCallback onWorkflowPressed; final VoidCallback onSettingsPressed; final Widget child; @@ -119,90 +119,109 @@ class DesktopWindowFrame extends StatelessWidget { Expanded( child: Row( children: [ - if (projectTabs == null) - SizedBox( - key: const Key('desktop-navigation-rail'), - width: railWidth, - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 10), - child: Column( - children: [ - for (final section in [0, 2]) - Padding( - padding: const EdgeInsets.only(bottom: 8), - child: IconButton.filledTonal( - key: ValueKey(switch (section) { - 0 => 'desktop-rail-home', - _ => 'desktop-rail-resources', - }), - tooltip: switch (section) { - 0 => context.l10n.navigationHome, - _ => context.l10n.navigationLibrary, - }, - isSelected: - !settingsSelected && - (section == 2 - ? resourceLibrarySelected - : !resourceLibrarySelected), - style: IconButton.styleFrom( - fixedSize: const Size.square(railButtonSize), - minimumSize: const Size.square(railButtonSize), - maximumSize: const Size.square(railButtonSize), - padding: EdgeInsets.zero, - iconSize: railIconSize, - tapTargetSize: MaterialTapTargetSize.shrinkWrap, - backgroundColor: - !settingsSelected && - (section == 2 - ? resourceLibrarySelected - : !resourceLibrarySelected) - ? null - : Colors.transparent, + SizedBox( + key: const Key('desktop-navigation-rail'), + width: railWidth, + child: LayoutBuilder( + builder: (context, constraints) => SingleChildScrollView( + child: ConstrainedBox( + constraints: BoxConstraints( + minHeight: constraints.maxHeight, + ), + child: IntrinsicHeight( + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 10), + child: Column( + children: [ + IconButton.filledTonal( + key: const ValueKey('desktop-rail-home'), + tooltip: context.l10n.navigationHome, + isSelected: + !settingsSelected && !workflowSelected, + style: IconButton.styleFrom( + fixedSize: const Size.square(railButtonSize), + minimumSize: const Size.square( + railButtonSize, + ), + maximumSize: const Size.square( + railButtonSize, + ), + padding: EdgeInsets.zero, + iconSize: railIconSize, + tapTargetSize: + MaterialTapTargetSize.shrinkWrap, + backgroundColor: + settingsSelected || workflowSelected + ? Colors.transparent + : null, + ), + onPressed: onHomePressed, + icon: const Icon(AppIcons.home), ), - onPressed: switch (section) { - 0 => onHomePressed, - _ => onResourceLibraryPressed, - }, - icon: Icon(switch (section) { - 0 => AppIcons.home, - _ => AppIcons.folder, - }), - ), + const SizedBox(height: 8), + IconButton.filledTonal( + key: const ValueKey('desktop-rail-workflow'), + tooltip: context.l10n.workflow, + isSelected: workflowSelected, + style: IconButton.styleFrom( + fixedSize: const Size.square(railButtonSize), + minimumSize: const Size.square( + railButtonSize, + ), + maximumSize: const Size.square( + railButtonSize, + ), + padding: EdgeInsets.zero, + iconSize: railIconSize, + tapTargetSize: + MaterialTapTargetSize.shrinkWrap, + backgroundColor: workflowSelected + ? null + : Colors.transparent, + ), + onPressed: onWorkflowPressed, + icon: const Icon(AppIcons.timeline), + ), + const Spacer(), + IconButton( + key: const Key('desktop-rail-settings'), + tooltip: context.l10n.settings, + isSelected: settingsSelected, + onPressed: onSettingsPressed, + style: IconButton.styleFrom( + fixedSize: const Size.square(railButtonSize), + minimumSize: const Size.square( + railButtonSize, + ), + maximumSize: const Size.square( + railButtonSize, + ), + padding: EdgeInsets.zero, + iconSize: railIconSize, + tapTargetSize: + MaterialTapTargetSize.shrinkWrap, + ), + icon: const Icon(AppIcons.settings), + ), + ], ), - const Spacer(), - IconButton( - key: const Key('project-settings-button'), - tooltip: context.l10n.settings, - isSelected: settingsSelected, - onPressed: onSettingsPressed, - style: IconButton.styleFrom( - fixedSize: const Size.square(railButtonSize), - minimumSize: const Size.square(railButtonSize), - maximumSize: const Size.square(railButtonSize), - padding: EdgeInsets.zero, - iconSize: railIconSize, - tapTargetSize: MaterialTapTargetSize.shrinkWrap, - ), - icon: const Icon(AppIcons.settings), ), - ], + ), ), ), ), + ), Expanded( child: Padding( - padding: EdgeInsets.only( - left: projectTabs == null ? 0 : contentInset, + padding: const EdgeInsets.only( + left: contentInset, right: contentInset, bottom: contentInset, ), child: SizedBox( key: const Key('desktop-content-container'), child: WindowHeaderPane( - offset: Offset( - projectTabs == null ? railWidth : contentInset, - headerHeight, - ), + offset: const Offset(railWidth + contentInset, headerHeight), child: LayoutBuilder( builder: (context, constraints) => constraints.maxWidth < 200 diff --git a/lib/app/shells/desktop_workspace_shell.dart b/lib/app/shells/desktop_workspace_shell.dart index 50aa7b5..44b8bf7 100644 --- a/lib/app/shells/desktop_workspace_shell.dart +++ b/lib/app/shells/desktop_workspace_shell.dart @@ -32,6 +32,11 @@ class DesktopWorkspaceShell extends StatefulWidget { required this.scaffoldKey, required this.navigationDrawer, this.projectTabsLayout = false, + this.timelineHeight, + this.onTimelineHeightChanged, + this.onJunctionResizeEnd, + this.onSidebarResizeEnd, + this.sidebarCanExpand = true, }); static const gutterWidth = WorkspaceLayoutMetrics.desktopSpacing; @@ -47,12 +52,53 @@ class DesktopWorkspaceShell extends StatefulWidget { final GlobalKey scaffoldKey; final Widget navigationDrawer; final bool projectTabsLayout; + final double? timelineHeight; + final ValueChanged? onTimelineHeightChanged; + final VoidCallback? onJunctionResizeEnd; + final VoidCallback? onSidebarResizeEnd; + final bool sidebarCanExpand; @override State createState() => _DesktopWorkspaceShellState(); } class _DesktopWorkspaceShellState extends State { + double? _sidebarRestoreWidth; + bool _sidebarJunctionDragging = false; + + void _startSidebarResize(double width, {bool junction = false}) { + _sidebarRestoreWidth = width; + if (junction) setState(() => _sidebarJunctionDragging = true); + } + + void _resizeSidebar(double requestedWidth, double maximum) { + if (!widget.sidebarCanExpand || widget.controller.agentFloating) return; + if (requestedWidth < WorkspaceLayoutMetrics.sidebarSnapThreshold) { + if (!widget.sidebarCollapsed) { + final restoreWidth = _sidebarRestoreWidth; + if (restoreWidth != null && widget.sidebarWidth != restoreWidth) { + widget.onSidebarWidthChanged(restoreWidth); + } + widget.onSidebarCollapsedChanged(true); + } + return; + } + if (widget.sidebarCollapsed) widget.onSidebarCollapsedChanged(false); + widget.onSidebarWidthChanged( + requestedWidth.clamp(WorkspaceLayoutMetrics.sidebarMinimumWidth, maximum), + ); + } + + void _finishSidebarResize() { + _sidebarRestoreWidth = null; + if (_sidebarJunctionDragging) { + setState(() => _sidebarJunctionDragging = false); + widget.onJunctionResizeEnd?.call(); + } else { + widget.onSidebarResizeEnd?.call(); + } + } + @override void initState() { super.initState(); @@ -64,6 +110,11 @@ class _DesktopWorkspaceShellState extends State { @override void didUpdateWidget(covariant DesktopWorkspaceShell oldWidget) { super.didUpdateWidget(oldWidget); + if (widget.controller.agentFloating || + !widget.sidebarCanExpand || + widget.onTimelineHeightChanged == null) { + _sidebarJunctionDragging = false; + } if (oldWidget.controller != widget.controller) { oldWidget.controller.removeListener(_changed); widget.controller.addListener(_changed); @@ -85,6 +136,9 @@ class _DesktopWorkspaceShellState extends State { required ValueChanged onResize, double direction = 1, VoidCallback? onEnd, + VoidCallback? onStart, + Set highlightTargets = const {}, + Offset highlightOffset = Offset.zero, }) => SizedBox( width: WorkspaceLayoutMetrics.desktopResizeHitExtent, height: double.infinity, @@ -95,11 +149,17 @@ class _DesktopWorkspaceShellState extends State { direction: direction, onResize: onResize, onEnd: onEnd, + onStart: onStart, + highlightTargets: highlightTargets, + highlightOffset: highlightOffset, ), ); @override - Widget build(BuildContext context) => widget.projectTabsLayout + Widget build(BuildContext context) => + WorkspaceResizeHighlightScope(child: _workspace(context)); + + Widget _workspace(BuildContext context) => widget.projectTabsLayout ? _projectWorkspace(context) : LayoutBuilder( builder: (context, constraints) { @@ -164,6 +224,7 @@ class _DesktopWorkspaceShellState extends State { return Scaffold( key: widget.scaffoldKey, + drawerEnableOpenDragGesture: false, backgroundColor: Colors.transparent, drawer: Drawer( width: 320, @@ -317,6 +378,12 @@ class _DesktopWorkspaceShellState extends State { .toDouble(); final floating = widget.controller.agentFloating; final collapsed = widget.sidebarCollapsed || floating; + double resolveTimelineHeight(double? height) => + WorkspaceLayoutMetrics.resolveTimelineHeight( + constraints.maxHeight, + height, + ); + final timelineHeight = resolveTimelineHeight(widget.timelineHeight); final geometry = DesktopWorkspaceGeometry( sidebarWidth: sidebarWidth, agentWidth: 0, @@ -324,6 +391,7 @@ class _DesktopWorkspaceShellState extends State { ); return Scaffold( key: widget.scaffoldKey, + drawerEnableOpenDragGesture: false, backgroundColor: Colors.transparent, drawer: Drawer( width: 320, @@ -356,20 +424,64 @@ class _DesktopWorkspaceShellState extends State { ), ], ), - if (!collapsed) + if (!floating && + widget.sidebarCanExpand && + WorkspaceLayoutPolicy.desktopNavigationFits(width)) Positioned( - left: sidebarWidth - WorkspaceLayoutMetrics.desktopResizeSlop, + left: collapsed + ? 0 + : sidebarWidth - WorkspaceLayoutMetrics.desktopResizeSlop, top: 0, bottom: 0, child: _gutter( name: 'project-sidebar', - initialWidth: sidebarWidth, - onResize: (value) => widget.onSidebarWidthChanged( - value.clamp( - WorkspaceLayoutMetrics.sidebarMinimumWidth, - maximum, - ), + highlightTargets: const {WorkspaceResizeBoundary.sidebar}, + highlightOffset: collapsed + ? const Offset( + -WorkspaceLayoutMetrics.desktopResizeHitExtent / 2, + 0, + ) + : Offset.zero, + initialWidth: collapsed ? 0 : sidebarWidth, + onStart: () => _startSidebarResize(sidebarWidth), + onResize: (value) => _resizeSidebar(value, maximum), + onEnd: _finishSidebarResize, + ), + ), + if (!floating && + widget.sidebarCanExpand && + WorkspaceLayoutPolicy.desktopNavigationFits(width) && + widget.onTimelineHeightChanged != null) + Positioned( + left: collapsed + ? 0 + : sidebarWidth - WorkspaceLayoutMetrics.desktopResizeSlop, + bottom: + timelineHeight - WorkspaceLayoutMetrics.desktopResizeSlop, + width: WorkspaceLayoutMetrics.desktopResizeHitExtent, + height: WorkspaceLayoutMetrics.desktopResizeHitExtent, + child: WorkspaceResizeHandle.junction( + key: const Key('desktop-chat-timeline-junction'), + highlightOffset: collapsed + ? const Offset( + -WorkspaceLayoutMetrics.desktopResizeHitExtent / 2, + 0, + ) + : Offset.zero, + highlightTargets: const { + WorkspaceResizeBoundary.sidebar, + WorkspaceResizeBoundary.timeline, + }, + initialWidth: collapsed ? 0 : sidebarWidth, + initialHeight: timelineHeight, + verticalDirection: -1, + onStart: () => + _startSidebarResize(sidebarWidth, junction: true), + onWidthChanged: (value) => _resizeSidebar(value, maximum), + onHeightChanged: (value) => widget.onTimelineHeightChanged!( + resolveTimelineHeight(value), ), + onEnd: _finishSidebarResize, ), ), if (floating) diff --git a/lib/features/editor/editor_page.dart b/lib/features/editor/editor_page.dart index 77480eb..1ef4633 100644 --- a/lib/features/editor/editor_page.dart +++ b/lib/features/editor/editor_page.dart @@ -80,7 +80,6 @@ class _EditorWorkspaceState extends ConsumerState { ProjectViewSettings get _viewController => ref.read(projectViewSettingsProvider(widget.projectId).notifier); bool get _propertiesOpen => _viewSettings.propertiesOpen; - double? get _timelineHeight => _viewSettings.timelineHeight; void _saveViewSettings() { if (widget.projectId.isEmpty || @@ -93,7 +92,8 @@ class _EditorWorkspaceState extends ConsumerState { @override Widget build(BuildContext context) { final viewSettings = ref.watch( - projectViewSettingsProvider(widget.projectId), + projectViewSettingsProvider(widget.projectId) + .select((value) => (value.hasValue, value.value?.propertiesOpen)), ); final preview = KeyedSubtree( key: _previewKey, @@ -205,10 +205,15 @@ class _EditorWorkspaceState extends ConsumerState { if (desktop) mediaButton, Expanded( child: desktop - ? _PreviewHeaderTitle( - projectId: widget.projectId, - timelineId: widget.timelineId, - pending: _timelinePending, + ? Padding( + padding: const EdgeInsets.symmetric( + horizontal: AppSpacing.small, + ), + child: _PreviewHeaderTitle( + projectId: widget.projectId, + timelineId: widget.timelineId, + pending: _timelinePending, + ), ) : widget.showProjectName ? Row( @@ -249,7 +254,7 @@ class _EditorWorkspaceState extends ConsumerState { ? context.l10n.collapseProperties : context.l10n.expandProperties, isSelected: propertiesOpen, - onPressed: !viewSettings.hasValue + onPressed: !viewSettings.$1 ? null : () { if (desktop) { @@ -285,23 +290,40 @@ class _EditorWorkspaceState extends ConsumerState { ), ), ); - Widget dockedEditing({required bool showTools}) => - ExpandedEditorLayout( + Widget dockedEditing({required bool showTools}) => Consumer( + builder: (context, ref, _) { + final dimensions = ref.watch( + projectViewSettingsProvider(widget.projectId).select( + (value) => + (value.value?.mediaWidth, value.value?.timelineHeight), + ), + ); + return ExpandedEditorLayout( preview: preview, header: header, properties: properties, media: media, showMedia: dockMedia, showProperties: showTools && dockProperties, - timelineHeight: _timelineHeight, + mediaWidth: dimensions.$1, + onMediaWidthChanged: (width) { + if (viewSettings.$1) { + _viewController.setMediaWidth(width); + } + }, + onMediaWidthChangeEnd: _saveViewSettings, + timelineHeight: dimensions.$2, onTimelineHeightChanged: (height) { - if (viewSettings.hasValue) { + if (viewSettings.$1) { _viewController.setTimelineHeight(height); } }, onTimelineHeightChangeEnd: _saveViewSettings, + onJunctionResizeEnd: _saveViewSettings, timeline: timeline, ); + }, + ); return Stack( fit: StackFit.expand, children: [ diff --git a/lib/features/editor/editor_panel_defaults.dart b/lib/features/editor/editor_panel_defaults.dart index 25ff3d0..d78f27c 100644 --- a/lib/features/editor/editor_panel_defaults.dart +++ b/lib/features/editor/editor_panel_defaults.dart @@ -32,7 +32,7 @@ class EditorTimelineDefaults extends StatelessWidget { : 26, child: Padding( padding: EdgeInsets.symmetric( - horizontal: AppTheme.isDesktop(context) ? AppSpacing.tiny : 0, + horizontal: AppTheme.isDesktop(context) ? AppSpacing.small : 0, ), child: Row( children: [ @@ -90,7 +90,9 @@ class EditorTimelineDefaults extends StatelessWidget { ), ) : Padding( - padding: const EdgeInsets.symmetric(horizontal: 8), + padding: const EdgeInsets.symmetric( + horizontal: AppSpacing.medium, + ), child: AppCommandToolbar( groups: [ [ diff --git a/lib/features/editor/layouts/expanded_editor_layout.dart b/lib/features/editor/layouts/expanded_editor_layout.dart index be1295f..7bb2c52 100644 --- a/lib/features/editor/layouts/expanded_editor_layout.dart +++ b/lib/features/editor/layouts/expanded_editor_layout.dart @@ -15,9 +15,13 @@ class ExpandedEditorLayout extends StatefulWidget { required this.media, required this.showMedia, required this.showProperties, + required this.mediaWidth, + required this.onMediaWidthChanged, + required this.onMediaWidthChangeEnd, required this.timelineHeight, required this.onTimelineHeightChanged, required this.onTimelineHeightChangeEnd, + required this.onJunctionResizeEnd, required this.timeline, }); @@ -27,9 +31,13 @@ class ExpandedEditorLayout extends StatefulWidget { final Widget media; final bool showMedia; final bool showProperties; + final double? mediaWidth; + final ValueChanged onMediaWidthChanged; + final VoidCallback onMediaWidthChangeEnd; final double? timelineHeight; final ValueChanged onTimelineHeightChanged; final VoidCallback onTimelineHeightChangeEnd; + final VoidCallback onJunctionResizeEnd; final Widget timeline; @override @@ -50,28 +58,35 @@ class _ExpandedEditorLayoutState extends State { WorkspaceCard(key: Key('editor-$name-card'), child: child); @override - Widget build(BuildContext context) => LayoutBuilder( + Widget build(BuildContext context) => + WorkspaceResizeHighlightScope(child: _layout()); + + Widget _layout() => LayoutBuilder( builder: (context, constraints) { - final maximum = math.max( - 0.0, - constraints.maxHeight - - gap - - WorkspaceLayoutMetrics.previewMinimumHeight, - ); - final minimum = math.min( - WorkspaceLayoutMetrics.timelineMinimumHeight, - maximum, - ); - final timelineHeight = - (widget.timelineHeight ?? - constraints.maxHeight * - WorkspaceLayoutMetrics.timelineDefaultHeightFraction) - .clamp(minimum, maximum) - .toDouble(); - const mediaWidth = WorkspaceLayoutMetrics.mediaPanelWidth; + double resolveTimelineHeight(double? height) => + WorkspaceLayoutMetrics.resolveTimelineHeight( + constraints.maxHeight, + height, + ); + final timelineHeight = resolveTimelineHeight(widget.timelineHeight); final propertiesWidth = widget.showProperties ? WorkspaceLayoutMetrics.propertiesPanelWidth : 0.0; + final mediaMaximumWidth = math.max( + 0.0, + constraints.maxWidth - + WorkspaceLayoutMetrics.previewMinimumWidth - + gap - + (widget.showProperties ? propertiesWidth + gap : 0), + ); + final mediaMinimumWidth = math.min( + WorkspaceLayoutMetrics.mediaPanelMinimumWidth, + mediaMaximumWidth, + ); + final mediaWidth = + (widget.mediaWidth ?? WorkspaceLayoutMetrics.mediaPanelWidth) + .clamp(mediaMinimumWidth, mediaMaximumWidth) + .toDouble(); return Stack( fit: StackFit.expand, children: [ @@ -130,6 +145,24 @@ class _ExpandedEditorLayoutState extends State { ), ], ), + if (widget.showMedia) + Positioned( + key: const Key('editor-media-divider'), + left: mediaWidth - WorkspaceLayoutMetrics.desktopResizeSlop, + top: 0, + bottom: timelineHeight + gap, + width: WorkspaceLayoutMetrics.desktopResizeHitExtent, + child: WorkspaceResizeHandle( + key: const Key('editor-media-resize'), + highlightTargets: const {WorkspaceResizeBoundary.media}, + axis: Axis.horizontal, + initialValue: mediaWidth, + onResize: (width) => widget.onMediaWidthChanged( + width.clamp(mediaMinimumWidth, mediaMaximumWidth).toDouble(), + ), + onEnd: widget.onMediaWidthChangeEnd, + ), + ), Positioned( key: const Key('editor-timeline-divider'), left: 0, @@ -138,15 +171,39 @@ class _ExpandedEditorLayoutState extends State { height: WorkspaceLayoutMetrics.desktopResizeHitExtent, child: WorkspaceResizeHandle( key: const Key('editor-timeline-resize'), + highlightTargets: const {WorkspaceResizeBoundary.timeline}, axis: Axis.vertical, initialValue: timelineHeight, direction: -1, - onResize: (height) => widget.onTimelineHeightChanged( - height.clamp(minimum, maximum).toDouble(), - ), + onResize: (height) => + widget.onTimelineHeightChanged(resolveTimelineHeight(height)), onEnd: widget.onTimelineHeightChangeEnd, ), ), + if (widget.showMedia) + Positioned( + left: mediaWidth - WorkspaceLayoutMetrics.desktopResizeSlop, + bottom: timelineHeight - WorkspaceLayoutMetrics.desktopResizeSlop, + width: WorkspaceLayoutMetrics.desktopResizeHitExtent, + height: WorkspaceLayoutMetrics.desktopResizeHitExtent, + child: WorkspaceResizeHandle.junction( + key: const Key('editor-media-timeline-junction'), + highlightTargets: const { + WorkspaceResizeBoundary.media, + WorkspaceResizeBoundary.timeline, + }, + initialWidth: mediaWidth, + initialHeight: timelineHeight, + verticalDirection: -1, + onWidthChanged: (width) => widget.onMediaWidthChanged( + width.clamp(mediaMinimumWidth, mediaMaximumWidth).toDouble(), + ), + onHeightChanged: (height) => widget.onTimelineHeightChanged( + resolveTimelineHeight(height), + ), + onEnd: widget.onJunctionResizeEnd, + ), + ), ], ); }, diff --git a/lib/features/projects/projects_page.dart b/lib/features/projects/projects_page.dart index ac45c68..360172d 100644 --- a/lib/features/projects/projects_page.dart +++ b/lib/features/projects/projects_page.dart @@ -45,6 +45,7 @@ import 'project_switch_region.dart'; import 'project_sidebar.dart'; import 'project_tabs_bar.dart'; import 'project_tabs_controller.dart'; +import 'workflow_page.dart'; import 'widgets/name_dialog.dart'; /// The single application surface: project navigation beside the editor. @@ -294,6 +295,19 @@ class _EditingPageState extends ConsumerState { ); final projects = ref.read(projectsProvider); final state = projects.value ?? const ProjectState(); + final editorProjectId = state.timeline == null + ? null + : state.activeProject?.id; + final editorViewSettings = desktop && editorProjectId != null + ? ref.watch( + projectViewSettingsProvider(editorProjectId).select( + (value) => ( + ready: value.hasValue, + timelineHeight: value.value?.timelineHeight, + ), + ), + ) + : null; return EditorWindowChrome( headerHeight: desktop ? DesktopWindowFrame.headerHeight : 48, builder: (context, integrated) => Scaffold( @@ -631,30 +645,33 @@ class _EditingPageState extends ConsumerState { ), ), ); + bool isActiveContent(DesktopContent surface) => + surface == DesktopContent.workspace + ? contentSelection.surface == + DesktopContent.workspace || + contentSelection.surface == + DesktopContent.library || + contentSelection.surface == + DesktopContent.resourceLibrary + : contentSelection.surface == surface; Widget contentSurface( DesktopContent surface, Widget child, ) => ExcludeFocus( - excluding: - (contentSelection.surface == - DesktopContent.settings) != - (surface == DesktopContent.settings), + excluding: !isActiveContent(surface), child: TickerMode( - enabled: - (contentSelection.surface == - DesktopContent.settings) == - (surface == DesktopContent.settings), + enabled: isActiveContent(surface), child: child, ), ); Widget desktopContents( Widget workspace, ) => IndexedStack( - index: - contentSelection.surface == - DesktopContent.settings - ? 1 - : 0, + index: switch (contentSelection.surface) { + DesktopContent.settings => 1, + DesktopContent.workflow => 2, + _ => 0, + }, children: [ contentSurface( DesktopContent.workspace, @@ -685,6 +702,10 @@ class _EditingPageState extends ConsumerState { ) : const SizedBox.shrink(), ), + contentSurface( + DesktopContent.workflow, + const WorkflowPage(), + ), ], ); return switch (experience) { @@ -773,17 +794,23 @@ class _EditingPageState extends ConsumerState { ], ), ), - resourceLibrarySelected: - contentSelection.surface == - DesktopContent.resourceLibrary, - onResourceLibraryPressed: () => selectSidebar( - DesktopContent.resourceLibrary, - ), settingsSelected: contentSelection.surface == DesktopContent.settings, - onHomePressed: () => - selectSidebar(DesktopContent.workspace), + workflowSelected: + contentSelection.surface == + DesktopContent.workflow, + onHomePressed: () { + selectSidebar(DesktopContent.workspace); + _setMode(WorkspaceMode.agent); + }, + onWorkflowPressed: () { + ref + .read(desktopContentProvider.notifier) + .select(DesktopContent.workflow); + _desktopScaffoldKey.currentState + ?.closeDrawer(); + }, onSettingsPressed: () => showSettingsPage(context), child: desktopContents( @@ -794,15 +821,43 @@ class _EditingPageState extends ConsumerState { navigationDrawer: navigation(drawer: true), mode: _mode, sidebarCollapsed: navigationCollapsed, + sidebarCanExpand: !navigationHiddenBySpace, sidebarWidth: _sidebarWidthOverride, + timelineHeight: + editorViewSettings?.timelineHeight, + onTimelineHeightChanged: + editorViewSettings?.ready == true && + !_switchingProject + ? (height) => ref + .read( + projectViewSettingsProvider( + editorProjectId!, + ).notifier, + ) + .setTimelineHeight(height) + : null, + onJunctionResizeEnd: () { + _saveViewState(); + if (editorViewSettings?.ready == true) { + unawaited( + ref + .read( + projectViewSettingsProvider( + editorProjectId!, + ).notifier, + ) + .save(), + ); + } + }, onSidebarCollapsedChanged: (value) { _sidebarCollapsed = value; _saveViewState(); }, onSidebarWidthChanged: (value) { _sidebarWidthOverride = value; - _saveViewState(); }, + onSidebarResizeEnd: _saveViewState, sidebarBuilder: (geometry, expand) => navigation( geometry: geometry, diff --git a/lib/features/projects/workflow_page.dart b/lib/features/projects/workflow_page.dart new file mode 100644 index 0000000..c5d8644 --- /dev/null +++ b/lib/features/projects/workflow_page.dart @@ -0,0 +1,50 @@ +import 'package:cutdex/l10n/l10n.dart'; +import 'package:cutdex/shared/layout/workspace_layout_metrics.dart'; +import 'package:cutdex_ui/icons.dart'; +import 'package:flutter/material.dart'; + +class WorkflowPage extends StatelessWidget { + const WorkflowPage({super.key}); + + @override + Widget build(BuildContext context) => ColoredBox( + color: Theme.of(context).colorScheme.surface, + child: Padding( + padding: const EdgeInsets.all(WorkspaceLayoutMetrics.desktopOuterSpacing), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Text( + context.l10n.workflow, + style: Theme.of(context).textTheme.titleLarge, + ), + Expanded( + child: Center( + child: ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 420), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Icon( + AppIcons.timeline, + size: 40, + color: Theme.of(context).colorScheme.primary, + ), + const SizedBox(height: 16), + Text( + context.l10n.workflowDescription, + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.bodyMedium?.copyWith( + color: Theme.of(context).colorScheme.onSurfaceVariant, + ), + ), + ], + ), + ), + ), + ), + ], + ), + ), + ); +} diff --git a/lib/shared/layout/workspace_layout_metrics.dart b/lib/shared/layout/workspace_layout_metrics.dart index 936905e..29b0aa8 100644 --- a/lib/shared/layout/workspace_layout_metrics.dart +++ b/lib/shared/layout/workspace_layout_metrics.dart @@ -1,12 +1,21 @@ +import 'dart:math' as math; + abstract final class WorkspaceLayoutMetrics { - static const desktopSpacing = 6.0; - static const desktopOuterSpacing = 6.0; - static const desktopResizeSlop = 2.0; - static const desktopResizeHitExtent = desktopSpacing + 2 * desktopResizeSlop; + // Keep the cards compact; their two facing borders add another 2 px. + static const desktopSpacing = 2.0; + static const desktopOuterSpacing = desktopSpacing; + // Resize targets overlap the panel edges without widening the visible gap. + static const desktopResizeHitExtent = 10.0; + // Cover the gutter and its facing borders without changing the hit target. + static const desktopResizeHighlightThickness = 4.0; + static const desktopResizeSlop = + (desktopResizeHitExtent - desktopSpacing) / 2; static const dualPaneMinimumWidth = 840.0; static const sidebarDefaultWidth = 240.0; static const sidebarMinimumWidth = 220.0; + // Like VS Code SplitView, snap closed halfway past the minimum width. + static const sidebarSnapThreshold = sidebarMinimumWidth / 2; static const sidebarWidthLimit = 320.0; static const contentMinimumWidth = 320.0; @@ -15,9 +24,24 @@ abstract final class WorkspaceLayoutMetrics { static const previewMinimumHeight = 180.0; static const mediaPanelWidth = 260.0; - static const propertiesPanelWidth = 260.0; + static const mediaPanelMinimumWidth = 220.0; + static const propertiesPanelWidth = 240.0; static const previewMinimumWidth = 320.0; + static double resolveTimelineHeight( + double availableHeight, + double? requestedHeight, + ) { + final maximum = math.max( + 0.0, + availableHeight - desktopSpacing - previewMinimumHeight, + ); + final minimum = math.min(timelineMinimumHeight, maximum); + return (requestedHeight ?? availableHeight * timelineDefaultHeightFraction) + .clamp(minimum, maximum) + .toDouble(); + } + static double sidebarMaximumWidth(double availableWidth) => (availableWidth - contentMinimumWidth) .clamp(sidebarMinimumWidth, sidebarWidthLimit) diff --git a/lib/shared/widgets/workspace_resize_handle.dart b/lib/shared/widgets/workspace_resize_handle.dart index e531d86..96de97e 100644 --- a/lib/shared/widgets/workspace_resize_handle.dart +++ b/lib/shared/widgets/workspace_resize_handle.dart @@ -1,5 +1,94 @@ +import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/scheduler.dart'; + +import '../layout/workspace_layout_metrics.dart'; + +enum WorkspaceResizeBoundary { sidebar, media, timeline } + +/// Shares feedback for boundaries that meet at a resize junction. +class WorkspaceResizeHighlightScope extends StatefulWidget { + const WorkspaceResizeHighlightScope({super.key, required this.child}); + + final Widget child; + + @override + State createState() => + _WorkspaceResizeHighlightScopeState(); +} + +class _WorkspaceResizeHighlightScopeState + extends State { + final _controller = _ResizeHighlightController(); + + @override + Widget build(BuildContext context) => _ResizeHighlightScope( + controller: + context + .dependOnInheritedWidgetOfExactType<_ResizeHighlightScope>() + ?.notifier ?? + _controller, + child: widget.child, + ); + + @override + void dispose() { + _controller.dispose(); + super.dispose(); + } +} + +class _ResizeHighlightScope + extends InheritedNotifier<_ResizeHighlightController> { + const _ResizeHighlightScope({ + required super.child, + required _ResizeHighlightController controller, + }) : super(notifier: controller); +} + +class _ResizeHighlightController extends ChangeNotifier { + final _sources = >{}; + bool _notificationPending = false; + bool _disposed = false; + + bool highlights(Set boundaries) => + _sources.values.any((active) => active.any(boundaries.contains)); + + void update( + Object source, + Set boundaries, + bool active, + ) { + if (_disposed) return; + final next = active && boundaries.isNotEmpty ? boundaries : null; + if (setEquals(_sources[source], next)) return; + if (next == null) { + _sources.remove(source); + } else { + _sources[source] = next; + } + // Handles can disappear while the layout is rebuilding (collapse/unmount). + // Notify surviving handles after that frame instead of during their build. + if (SchedulerBinding.instance.schedulerPhase == + SchedulerPhase.persistentCallbacks) { + if (_notificationPending) return; + _notificationPending = true; + WidgetsBinding.instance.addPostFrameCallback((_) { + _notificationPending = false; + if (!_disposed) notifyListeners(); + }); + } else { + notifyListeners(); + } + } + + @override + void dispose() { + _disposed = true; + super.dispose(); + } +} /// Keeps the resize cursor active across the window while a split is dragged. class WorkspaceResizeHandle extends StatefulWidget { @@ -11,7 +100,30 @@ class WorkspaceResizeHandle extends StatefulWidget { this.direction = 1, this.onStart, this.onEnd, - }); + this.highlightTargets = const {}, + this.highlightOffset = Offset.zero, + }) : _orthogonalInitialValue = null, + _onOrthogonalResize = null, + _orthogonalDirection = 1; + + const WorkspaceResizeHandle.junction({ + super.key, + required double initialWidth, + required double initialHeight, + required ValueChanged onWidthChanged, + required ValueChanged onHeightChanged, + double verticalDirection = 1, + this.onStart, + this.onEnd, + this.highlightTargets = const {}, + this.highlightOffset = Offset.zero, + }) : axis = Axis.horizontal, + initialValue = initialWidth, + onResize = onWidthChanged, + direction = 1, + _orthogonalInitialValue = initialHeight, + _onOrthogonalResize = onHeightChanged, + _orthogonalDirection = verticalDirection; final Axis axis; final double initialValue; @@ -19,6 +131,13 @@ class WorkspaceResizeHandle extends StatefulWidget { final VoidCallback? onStart; final ValueChanged onResize; final VoidCallback? onEnd; + final Set highlightTargets; + + /// Aligns feedback with an edge while keeping the full resize hit target. + final Offset highlightOffset; + final double? _orthogonalInitialValue; + final ValueChanged? _onOrthogonalResize; + final double _orthogonalDirection; @override State createState() => _WorkspaceResizeHandleState(); @@ -26,10 +145,56 @@ class WorkspaceResizeHandle extends StatefulWidget { class _WorkspaceResizeHandleState extends State { OverlayEntry? _cursorOverlay; - double? _startPosition; + Offset? _startPosition; double _startValue = 0; + double _orthogonalStartValue = 0; + bool _hovered = false; + final _highlightSource = Object(); + _ResizeHighlightController? _highlightController; - MouseCursor get _cursor => widget.axis == Axis.horizontal + bool get _locallyHighlighted => _hovered || _startPosition != null; + bool get _highlighted => + _locallyHighlighted || + !_isJunction && + (_highlightController?.highlights(widget.highlightTargets) ?? false); + + void _publishHighlight() => _highlightController?.update( + _highlightSource, + widget.highlightTargets, + _locallyHighlighted, + ); + + void _hover(bool value) { + if (_hovered == value) return; + setState(() => _hovered = value); + _publishHighlight(); + } + + @override + void didChangeDependencies() { + super.didChangeDependencies(); + final controller = context + .dependOnInheritedWidgetOfExactType<_ResizeHighlightScope>() + ?.notifier; + if (_highlightController == controller) return; + _highlightController?.update(_highlightSource, const {}, false); + _highlightController = controller; + _publishHighlight(); + } + + @override + void didUpdateWidget(covariant WorkspaceResizeHandle oldWidget) { + super.didUpdateWidget(oldWidget); + if (!setEquals(oldWidget.highlightTargets, widget.highlightTargets)) { + _publishHighlight(); + } + } + + bool get _isJunction => widget._onOrthogonalResize != null; + + MouseCursor get _cursor => _isJunction + ? SystemMouseCursors.grab + : widget.axis == Axis.horizontal ? SystemMouseCursors.resizeColumn : SystemMouseCursors.resizeRow; @@ -37,11 +202,13 @@ class _WorkspaceResizeHandleState extends State { widget.axis == Axis.horizontal ? position.dx : position.dy; void _start(DragStartDetails details) { - _startPosition = _coordinate(details.globalPosition); + setState(() => _startPosition = details.globalPosition); + _publishHighlight(); _startValue = widget.initialValue; + _orthogonalStartValue = widget._orthogonalInitialValue ?? 0; widget.onStart?.call(); _releaseCursor(); - final cursor = _cursor; + final cursor = _isJunction ? SystemMouseCursors.grabbing : _cursor; _cursorOverlay = OverlayEntry( builder: (_) => Positioned.fill( child: MouseRegion( @@ -60,7 +227,12 @@ class _WorkspaceResizeHandleState extends State { if (start == null) return; widget.onResize( _startValue + - widget.direction * (_coordinate(details.globalPosition) - start), + widget.direction * + (_coordinate(details.globalPosition) - _coordinate(start)), + ); + widget._onOrthogonalResize?.call( + _orthogonalStartValue + + widget._orthogonalDirection * (details.globalPosition.dy - start.dy), ); } @@ -71,13 +243,16 @@ class _WorkspaceResizeHandleState extends State { } void _finish() { - _startPosition = null; + if (_startPosition == null) return; + setState(() => _startPosition = null); + _publishHighlight(); _releaseCursor(); widget.onEnd?.call(); } @override void dispose() { + _highlightController?.update(_highlightSource, const {}, false); _releaseCursor(); super.dispose(); } @@ -85,20 +260,79 @@ class _WorkspaceResizeHandleState extends State { @override Widget build(BuildContext context) => MouseRegion( cursor: _cursor, + onEnter: (_) => _hover(true), + onExit: (_) => _hover(false), child: GestureDetector( behavior: HitTestBehavior.opaque, dragStartBehavior: DragStartBehavior.down, - onHorizontalDragStart: widget.axis == Axis.horizontal ? _start : null, - onHorizontalDragUpdate: widget.axis == Axis.horizontal ? _update : null, - onHorizontalDragEnd: widget.axis == Axis.horizontal + onHorizontalDragStart: !_isJunction && widget.axis == Axis.horizontal + ? _start + : null, + onHorizontalDragUpdate: !_isJunction && widget.axis == Axis.horizontal + ? _update + : null, + onHorizontalDragEnd: !_isJunction && widget.axis == Axis.horizontal ? (_) => _finish() : null, - onVerticalDragStart: widget.axis == Axis.vertical ? _start : null, - onVerticalDragUpdate: widget.axis == Axis.vertical ? _update : null, - onVerticalDragEnd: widget.axis == Axis.vertical ? (_) => _finish() : null, - onHorizontalDragCancel: widget.axis == Axis.horizontal ? _finish : null, - onVerticalDragCancel: widget.axis == Axis.vertical ? _finish : null, - child: const SizedBox.expand(), + onVerticalDragStart: !_isJunction && widget.axis == Axis.vertical + ? _start + : null, + onVerticalDragUpdate: !_isJunction && widget.axis == Axis.vertical + ? _update + : null, + onVerticalDragEnd: !_isJunction && widget.axis == Axis.vertical + ? (_) => _finish() + : null, + onHorizontalDragCancel: !_isJunction && widget.axis == Axis.horizontal + ? _finish + : null, + onVerticalDragCancel: !_isJunction && widget.axis == Axis.vertical + ? _finish + : null, + onPanStart: _isJunction ? _start : null, + onPanUpdate: _isJunction ? _update : null, + onPanEnd: _isJunction ? (_) => _finish() : null, + onPanCancel: _isJunction ? _finish : null, + child: IgnorePointer( + child: Transform.translate( + offset: widget.highlightOffset, + child: Center( + child: TweenAnimationBuilder( + tween: Tween(begin: 0, end: _highlighted ? 1 : 0), + duration: MediaQuery.disableAnimationsOf(context) + ? Duration.zero + : Duration(milliseconds: _highlighted ? 180 : 140), + curve: Curves.easeInOutCubic, + builder: (context, progress, child) => Opacity( + opacity: progress, + child: Transform.scale( + scaleX: _isJunction || widget.axis == Axis.horizontal + ? .5 + .5 * progress + : .98 + .02 * progress, + scaleY: _isJunction || widget.axis == Axis.vertical + ? .5 + .5 * progress + : .98 + .02 * progress, + child: child, + ), + ), + child: Container( + width: _isJunction || widget.axis == Axis.horizontal + ? WorkspaceLayoutMetrics.desktopResizeHighlightThickness + : double.infinity, + height: _isJunction || widget.axis == Axis.vertical + ? WorkspaceLayoutMetrics.desktopResizeHighlightThickness + : double.infinity, + decoration: BoxDecoration( + color: Theme.of(context).colorScheme.primary, + borderRadius: BorderRadius.circular( + WorkspaceLayoutMetrics.desktopResizeHighlightThickness / 2, + ), + ), + ), + ), + ), + ), + ), ), ); } diff --git a/test/adaptive_workspace_test.dart b/test/adaptive_workspace_test.dart index 9885e3b..c845ed9 100644 --- a/test/adaptive_workspace_test.dart +++ b/test/adaptive_workspace_test.dart @@ -61,8 +61,8 @@ Future floatOrDockChat(WidgetTester tester) async { void main() { test('space classes and two-pane decisions do not depend on workflow', () { - expect(WorkspaceLayoutPolicy.desktopNavigationFits(545), isFalse); - expect(WorkspaceLayoutPolicy.desktopNavigationFits(546), isTrue); + expect(WorkspaceLayoutPolicy.desktopNavigationFits(541), isFalse); + expect(WorkspaceLayoutPolicy.desktopNavigationFits(542), isTrue); expect(WorkspaceLayoutPolicy.showAgentBesideEditor(839), isFalse); expect(WorkspaceLayoutPolicy.showAgentBesideEditor(840), isTrue); }); @@ -178,7 +178,7 @@ void main() { expect(header.contains(tester.getCenter(projectTab)), isTrue); expect(find.byKey(const Key('sidebar-tab-chat')), findsNothing); expect(find.byKey(const Key('sidebar-tab-resources')), findsNothing); - expect(find.byKey(const Key('desktop-navigation-rail')), findsNothing); + expect(find.byKey(const Key('desktop-navigation-rail')), findsOneWidget); expect(find.byKey(const Key('media-project-button')), findsNothing); expect(find.byKey(const Key('media-panel-close')), findsNothing); final mediaHeader = find.byKey(const Key('media-panel-header')); @@ -202,12 +202,49 @@ void main() { find.byKey(const Key('editor-timeline-card')), ); final chatRect = tester.getRect(find.byKey(const Key('desktop-chat-card'))); - expect(media.left - chatRect.right, 6); - expect(preview.left - media.right, 6); + expect(media.left - chatRect.right, 2); + expect(preview.left - media.right, 2); + expect(timeline.top - media.bottom, 2); + final content = tester.getRect( + find.byKey(const Key('desktop-content-container')), + ); + expect(content.left, 46); + expect(content.right, 1198); + expect(content.bottom, 798); expect(media.top, preview.top); expect(timeline.left, media.left); expect(timeline.right, preview.right); final previewElement = tester.element(find.byType(EditorPreviewPanel)); + await tester.drag( + find.byKey(const Key('editor-media-resize')), + const Offset(60, 0), + ); + await tester.pumpAndSettle(); + expect( + tester.getSize(find.byKey(const Key('editor-media-card'))).width, + media.width + 60, + ); + await tester.drag( + find.byKey(const Key('editor-media-timeline-junction')), + const Offset(40, -30), + ); + await tester.pumpAndSettle(); + final resizedSettings = mounted.container + .read(projectViewSettingsProvider(mounted.projectId)) + .requireValue; + expect(resizedSettings.mediaWidth, media.width + 100); + expect(resizedSettings.timelineHeight, closeTo(timeline.height + 30, .01)); + expect( + tester.getSize(find.byKey(const Key('editor-timeline-card'))).height, + closeTo(timeline.height + 30, .01), + ); + expect( + mounted.container + .read(projectViewSettingsProvider(mounted.projectId)) + .requireValue + .mediaWidth, + media.width + 100, + ); await tester.tap(find.byKey(const Key('editor-media-button'))); await tester.pumpAndSettle(); expect(find.byType(MediaPanel), findsNothing); @@ -218,6 +255,10 @@ void main() { await tester.tap(find.byKey(const Key('editor-media-button'))); await tester.pumpAndSettle(); expect(find.byType(MediaPanel), findsOneWidget); + expect( + tester.getSize(find.byKey(const Key('editor-media-card'))).width, + media.width + 100, + ); expect(tester.element(find.byType(AgentChatPanel)), same(chat)); expect(tester.element(find.byType(EditorWorkspace)), same(editor)); expect( @@ -228,6 +269,319 @@ void main() { await mounted.close(); }); + testWidgets( + 'chat/timeline junction resizes both axes, persists and follows docking', + (tester) async { + final mounted = await mount(tester, const Size(1800, 800)); + final junction = find.byKey(const Key('desktop-chat-timeline-junction')); + Rect card(String name) => tester.getRect(find.byKey(Key(name))); + final chat = card('desktop-chat-card'); + final media = card('editor-media-card'); + final timeline = card('editor-timeline-card'); + final center = tester.getCenter(junction); + expect(center.dx, (chat.right + media.left) / 2); + expect(center.dy, (media.bottom + timeline.top) / 2); + final editorElement = tester.element(find.byType(EditorWorkspace)); + final mediaElement = tester.element(find.byType(MediaPanel)); + final input = find.descendant( + of: find.byType(AgentChatPanel), + matching: find.byType(TextField), + ); + await tester.enterText(input, 'Keep draft while resizing the junction'); + + await tester.drag(junction, const Offset(60, -50)); + await tester.pumpAndSettle(); + expect(card('desktop-chat-card').width, chat.width + 60); + expect( + card('editor-timeline-card').height, + closeTo(timeline.height + 50, .01), + ); + expect(card('editor-media-card').width, media.width); + expect( + mounted.container + .read(workspaceViewSettingsProvider) + .requireValue + .sidebarWidth, + chat.width + 60, + ); + expect( + mounted.container + .read(projectViewSettingsProvider(mounted.projectId)) + .requireValue + .timelineHeight, + closeTo(timeline.height + 50, .01), + ); + final savedWorkspace = await tester.runAsync( + mounted.container.read(workspaceViewSettingsRepositoryProvider).load, + ); + final savedProject = await tester.runAsync( + () => mounted.container + .read(projectViewSettingsRepositoryProvider) + .load(mounted.projectId), + ); + expect(savedWorkspace!.sidebarWidth, chat.width + 60); + expect(savedProject!.timelineHeight, closeTo(timeline.height + 50, .01)); + + await tester.drag(junction, const Offset(-40, 30)); + await tester.pumpAndSettle(); + expect(card('desktop-chat-card').width, chat.width + 20); + expect( + card('editor-timeline-card').height, + closeTo(timeline.height + 20, .01), + ); + await tester.drag(junction, const Offset(-100, -2000)); + await tester.pumpAndSettle(); + expect(card('desktop-chat-card').width, 220); + expect(card('editor-preview-card').height, 180); + await tester.drag(junction, const Offset(40, -60)); + await tester.pumpAndSettle(); + expect(card('desktop-chat-card').width, 260); + expect(card('editor-preview-card').height, 180); + await tester.drag(junction, const Offset(2000, 2000)); + await tester.pumpAndSettle(); + expect(card('desktop-chat-card').width, 320); + expect(card('editor-timeline-card').height, 220); + expect(tester.element(find.byType(EditorWorkspace)), same(editorElement)); + expect(tester.element(find.byType(MediaPanel)), same(mediaElement)); + expect( + tester.widget(input).controller!.text, + 'Keep draft while resizing the junction', + ); + + await tester.tap(find.byKey(const Key('project-sidebar-toggle'))); + await tester.pumpAndSettle(); + expect(junction, findsOneWidget); + await tester.tap(find.byKey(const Key('project-sidebar-toggle'))); + await tester.pumpAndSettle(); + expect(junction, findsOneWidget); + expect(card('desktop-chat-card').width, 320); + expect(card('editor-timeline-card').height, 220); + await floatOrDockChat(tester); + await tester.pumpAndSettle(); + expect(junction, findsNothing); + await floatOrDockChat(tester); + await tester.pumpAndSettle(); + expect(junction, findsOneWidget); + + // The same T remains between chat, preview and timeline with media hidden. + await tester.tap(find.byKey(const Key('editor-media-button'))); + await tester.pumpAndSettle(); + expect(junction, findsOneWidget); + await tester.drag(junction, const Offset(-40, -30)); + await tester.pumpAndSettle(); + expect(card('desktop-chat-card').width, 280); + expect(card('editor-timeline-card').height, 250); + tester.view.physicalSize = const Size(600, 360); + await tester.pumpAndSettle(); + final narrowCenter = tester.getCenter(junction); + expect( + narrowCenter.dy, + (card('editor-preview-card').bottom + + card('editor-timeline-card').top) / + 2, + ); + await tester.drag(junction, const Offset(2000, -2000)); + await tester.pumpAndSettle(); + expect(card('editor-preview-card').height, 180); + expect(card('desktop-editor-card').width, 320); + expect(tester.takeException(), isNull); + await mounted.close(); + }, + ); + + for (final junctionDrag in [false, true]) { + testWidgets( + '${junctionDrag ? 'junction' : 'sidebar'} persists resize only when the gesture ends', + (tester) async { + final mounted = await mount(tester, const Size(1800, 800)); + final repository = mounted.container.read( + workspaceViewSettingsRepositoryProvider, + ); + final savedBefore = (await tester.runAsync(repository.load))!; + final sidebar = find.byKey(const Key('desktop-chat-card')); + final initialWidth = tester.getSize(sidebar).width; + final handle = find.byKey( + Key( + junctionDrag + ? 'desktop-chat-timeline-junction' + : 'project-sidebar-resize', + ), + ); + final drag = await tester.startGesture( + tester.getCenter(handle), + kind: PointerDeviceKind.mouse, + ); + for (var i = 0; i < 5; i++) { + await drag.moveBy(Offset(10, junctionDrag ? -10 : 0)); + await tester.pumpAndSettle(); + } + expect(tester.getSize(sidebar).width, initialWidth + 50); + final savedDuring = (await tester.runAsync(repository.load))!; + expect(savedDuring.sidebarWidth, savedBefore.sidebarWidth); + // Cancellation also commits the last visible size. + if (junctionDrag) { + await drag.cancel(); + } else { + await drag.up(); + } + await tester.pumpAndSettle(); + final savedAfter = (await tester.runAsync(repository.load))!; + expect(savedAfter.sidebarWidth, initialWidth + 50); + await mounted.close(); + }, + ); + } + + for (final junctionDrag in [false, true]) { + testWidgets( + '${junctionDrag ? 'junction' : 'sidebar'} drag snaps closed and can drag back open', + (tester) async { + final mounted = await mount(tester, const Size(1800, 800)); + final sidebar = find.byKey(const Key('desktop-chat-card')); + final resize = find.byKey(const Key('project-sidebar-resize')); + final junction = find.byKey( + const Key('desktop-chat-timeline-junction'), + ); + final initialWidth = tester.getSize(sidebar).width; + final initialTimeline = tester + .getSize(find.byKey(const Key('editor-timeline-card'))) + .height; + final editor = tester.element(find.byType(EditorWorkspace)); + final input = find.descendant( + of: find.byType(AgentChatPanel), + matching: find.byType(TextField), + ); + await tester.enterText(input, 'Draft survives sidebar snapping'); + final start = tester.getCenter(junctionDrag ? junction : resize); + final drag = await tester.startGesture( + start, + kind: PointerDeviceKind.mouse, + ); + await drag.moveTo( + start + Offset(115 - initialWidth, junctionDrag ? -30 : 0), + ); + await tester.pumpAndSettle(); + expect(tester.getSize(sidebar).width, 220); + await drag.moveBy(Offset(-6, junctionDrag ? -20 : 0)); + await tester.pumpAndSettle(); + expect(sidebar, findsNothing); + expect(resize, findsOneWidget); + expect( + mounted.container + .read(workspaceViewSettingsProvider) + .requireValue + .sidebarCollapsed, + isTrue, + ); + // Crossing back over the threshold within the same gesture restores it. + await drag.moveBy(const Offset(16, 0)); + await tester.pumpAndSettle(); + expect(tester.getSize(sidebar).width, 220); + await drag.moveBy(Offset(-16, junctionDrag ? -20 : 0)); + await tester.pumpAndSettle(); + expect(sidebar, findsNothing); + if (junctionDrag) { + expect(junction, findsOneWidget); + expect( + tester + .getSize(find.byKey(const Key('editor-timeline-card'))) + .height, + closeTo(initialTimeline + 70, .01), + ); + await drag.cancel(); + } else { + await drag.up(); + } + await tester.pumpAndSettle(); + expect(junction, findsOneWidget); + final saved = await tester.runAsync( + mounted.container.read(workspaceViewSettingsRepositoryProvider).load, + ); + expect(saved!.sidebarCollapsed, isTrue); + expect(saved.sidebarWidth, initialWidth); + if (junctionDrag) { + final savedProject = await tester.runAsync( + () => mounted.container + .read(projectViewSettingsRepositoryProvider) + .load(mounted.projectId), + ); + expect( + savedProject!.timelineHeight, + closeTo(initialTimeline + 70, .01), + ); + } + + await tester.tap(find.byKey(const Key('project-sidebar-toggle'))); + await tester.pumpAndSettle(); + expect(tester.getSize(sidebar).width, initialWidth); + expect(tester.element(find.byType(EditorWorkspace)), same(editor)); + expect( + tester.widget(input).controller!.text, + 'Draft survives sidebar snapping', + ); + await tester.tap(find.byKey(const Key('project-sidebar-toggle'))); + await tester.pumpAndSettle(); + // A fresh edge or junction drag starts from the collapsed width of zero. + final edgeTimeline = tester + .getSize(find.byKey(const Key('editor-timeline-card'))) + .height; + expect(junction, findsOneWidget); + final edge = await tester.startGesture( + tester.getCenter(junctionDrag ? junction : resize), + kind: PointerDeviceKind.mouse, + ); + await edge.moveBy(Offset(109, junctionDrag ? -25 : 0)); + await tester.pumpAndSettle(); + expect(sidebar, findsNothing); + if (junctionDrag) { + expect( + tester + .getSize(find.byKey(const Key('editor-timeline-card'))) + .height, + closeTo(edgeTimeline + 25, .01), + ); + } + await edge.moveBy(const Offset(1, 0)); + await tester.pumpAndSettle(); + expect(tester.getSize(sidebar).width, 220); + await edge.moveBy(const Offset(140, 0)); + await tester.pumpAndSettle(); + expect(tester.getSize(sidebar).width, 250); + await edge.up(); + await tester.pumpAndSettle(); + expect( + mounted.container + .read(workspaceViewSettingsProvider) + .requireValue + .sidebarCollapsed, + isFalse, + ); + final reopened = await tester.runAsync( + mounted.container.read(workspaceViewSettingsRepositoryProvider).load, + ); + expect(reopened!.sidebarCollapsed, isFalse); + expect(reopened.sidebarWidth, 250); + if (junctionDrag) { + final reopenedProject = await tester.runAsync( + () => mounted.container + .read(projectViewSettingsRepositoryProvider) + .load(mounted.projectId), + ); + expect( + reopenedProject!.timelineHeight, + closeTo(edgeTimeline + 25, .01), + ); + } + expect( + tester.widget(input).controller!.text, + 'Draft survives sidebar snapping', + ); + expect(tester.takeException(), isNull); + await mounted.close(); + }, + ); + } + testWidgets('project tabs switch scoped drafts and preserve failed close', ( tester, ) async { @@ -504,9 +858,9 @@ void main() { ); expect(preview.top, properties.top); expect(preview.bottom, properties.bottom); - expect(properties.left - preview.right, 6); + expect(properties.left - preview.right, 2); expect(playback.bottom, preview.bottom - 1); - expect(playback.height, 36); + expect(playback.height, 32); expect( tester.getSize(find.byKey(const Key('timeline-tabs-bar'))).height, 32, @@ -527,7 +881,7 @@ void main() { ); expect( tester.getSize(find.byKey(const Key('timeline-toolbar'))).height, - 36, + 32, ); expect(tester.element(find.byType(EditorWorkspace)), same(editor)); expect(AppColors.of(Theme.of(editor)).family, palette); @@ -839,9 +1193,9 @@ void main() { contentRect.top, tester.getRect(find.byKey(const Key('desktop-window-header'))).bottom, ); - expect(contentRect.left, 6); - expect(contentRect.right, 1194); - expect(contentRect.bottom, 794); + expect(contentRect.left, 46); + expect(contentRect.right, 1198); + expect(contentRect.bottom, 798); expect( tester.getRect(find.byKey(const Key('window-minimize'))).left - tester @@ -1022,8 +1376,14 @@ void main() { expect(left.left - headerRect.left, AppSidebarMetrics.outerPadding); expect(headerRect.right - right.right, AppSidebarMetrics.outerPadding); expect(middle.center.dx, closeTo(headerRect.center.dx, 0.01)); - expect(middle.left, greaterThanOrEqualTo(left.right)); - expect(middle.right, lessThanOrEqualTo(right.left)); + expect( + middle.left - left.right, + greaterThanOrEqualTo(AppSpacing.small), + ); + expect( + right.left - middle.right, + greaterThanOrEqualTo(AppSpacing.small), + ); expect(left.center.dy, right.center.dy); expect(tester.widget(title).overflow, TextOverflow.ellipsis); expect(tester.takeException(), isNull); diff --git a/test/desktop_window_header_spacing_test.dart b/test/desktop_window_header_spacing_test.dart index 1770103..9ff4ea0 100644 --- a/test/desktop_window_header_spacing_test.dart +++ b/test/desktop_window_header_spacing_test.dart @@ -69,6 +69,7 @@ void main() { onRename: (_) {}, ), onHomePressed: () {}, + onWorkflowPressed: () {}, onSettingsPressed: () {}, child: const SizedBox.shrink(), ), diff --git a/test/desktop_workspace_cards_test.dart b/test/desktop_workspace_cards_test.dart index b07e7e1..b8936fe 100644 --- a/test/desktop_workspace_cards_test.dart +++ b/test/desktop_workspace_cards_test.dart @@ -1,12 +1,399 @@ +import 'dart:ui' as ui; + import 'package:cutdex/app/adaptive/desktop_workspace_controller.dart'; import 'package:cutdex/shared/layout/workspace_layout_metrics.dart'; import 'package:cutdex/app/shells/desktop_workspace_shell.dart'; import 'package:cutdex/workspace/workspace_mode.dart'; import 'package:cutdex/features/editor/layouts/expanded_editor_layout.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/gestures.dart'; +import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { + testWidgets( + 'junctions paint both connected boundaries during hover and drag', + (tester) async { + tester.view.physicalSize = const Size(1500, 800); + tester.view.devicePixelRatio = 1; + addTearDown(tester.view.resetPhysicalSize); + addTearDown(tester.view.resetDevicePixelRatio); + final controller = DesktopWorkspaceController(); + addTearDown(controller.dispose); + const accent = Color(0xFF0D99FF); + final repaintKey = GlobalKey(); + final scaffoldKey = GlobalKey(); + var sidebarWidth = 240.0; + var mediaWidth = 260.0; + var timelineHeight = 280.0; + var showMedia = true; + var sidebarCollapsed = false; + late StateSetter update; + await tester.pumpWidget( + MaterialApp( + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: accent) + .copyWith(primary: accent), + ), + home: RepaintBoundary( + key: repaintKey, + child: StatefulBuilder( + builder: (context, setState) { + update = setState; + return DesktopWorkspaceShell( + projectTabsLayout: true, + mode: WorkspaceMode.cut, + controller: controller, + sidebarCollapsed: sidebarCollapsed, + sidebarWidth: sidebarWidth, + onSidebarCollapsedChanged: (collapsed) => + setState(() => sidebarCollapsed = collapsed), + onSidebarWidthChanged: (width) => + setState(() => sidebarWidth = width), + timelineHeight: timelineHeight, + onTimelineHeightChanged: (height) => + setState(() => timelineHeight = height), + sidebarBuilder: (_, _) => const SizedBox.expand(), + agentBuilder: (_, _) => const SizedBox.expand(), + scaffoldKey: scaffoldKey, + navigationDrawer: const SizedBox.shrink(), + editor: ExpandedEditorLayout( + preview: const SizedBox.expand(), + header: const SizedBox(height: 40), + properties: const SizedBox.expand(), + media: const SizedBox.expand(), + showMedia: showMedia, + showProperties: false, + mediaWidth: mediaWidth, + onMediaWidthChanged: (width) => + setState(() => mediaWidth = width), + onMediaWidthChangeEnd: () {}, + timelineHeight: timelineHeight, + onTimelineHeightChanged: (height) => + setState(() => timelineHeight = height), + onTimelineHeightChangeEnd: () {}, + onJunctionResizeEnd: () {}, + timeline: const SizedBox.expand(), + ), + ); + }, + ), + ), + ), + ); + const boundaries = { + 'sidebar': 'project-sidebar-resize', + 'media': 'editor-media-resize', + 'timeline': 'editor-timeline-resize', + }; + Future expectPainted(Set active) async { + final render = + repaintKey.currentContext!.findRenderObject()! + as RenderRepaintBoundary; + final image = (await tester.runAsync(render.toImage))!; + final data = (await tester.runAsync( + () => image.toByteData(format: ui.ImageByteFormat.rawRgba), + ))!; + Color pixel(Offset global) { + final point = render.globalToLocal(global); + final offset = + (point.dy.floor() * image.width + point.dx.floor()) * 4; + return Color.fromARGB( + data.getUint8(offset + 3), + data.getUint8(offset), + data.getUint8(offset + 1), + data.getUint8(offset + 2), + ); + } + + for (final entry in boundaries.entries) { + final handle = find.byKey(Key(entry.value)); + if (handle.evaluate().isEmpty) continue; + final rect = tester.getRect(handle); + final paint = tester.getRect( + find.descendant(of: handle, matching: find.byType(DecoratedBox)), + ); + final color = pixel(paint.center); + expect( + color, + active.contains(entry.key) ? accent : isNot(accent), + reason: entry.key, + ); + if (active.contains(entry.key)) { + final vertical = entry.key != 'timeline'; + expect(vertical ? rect.width : rect.height, 10); + expect(vertical ? paint.width : paint.height, 4); + } + } + if (active.containsAll({'sidebar', 'timeline'})) { + final sidebar = tester.getRect( + find.byKey(const Key('project-sidebar-resize')), + ); + final timeline = tester.getRect( + find.byKey(const Key('editor-timeline-resize')), + ); + if (sidebarCollapsed) { + expect(sidebar.left, 0); + expect(sidebar.width, 10); + final verticalPaint = tester.getRect( + find.descendant( + of: find.byKey(const Key('project-sidebar-resize')), + matching: find.byType(DecoratedBox), + ), + ); + expect(verticalPaint.center.dx, timeline.left); + expect( + pixel(Offset(sidebar.center.dx, timeline.center.dy - 20)), + isNot(accent), + reason: 'Collapsed feedback sits at the edge, not the hit center', + ); + expect( + pixel(Offset(timeline.left, timeline.center.dy - 20)), + accent, + ); + } + if (showMedia) { + final media = tester.getRect( + find.byKey(const Key('editor-media-resize')), + ); + expect( + pixel(Offset(media.center.dx, timeline.center.dy)), + accent, + reason: 'The original media/preview/timeline T stays continuous', + ); + } + } + image.dispose(); + } + + final mouse = await tester.createGesture(kind: PointerDeviceKind.mouse); + await mouse.addPointer(location: const Offset(1400, 50)); + await tester.pumpAndSettle(); + await expectPainted({}); + await mouse.moveTo( + tester.getCenter(find.byKey(const Key('editor-media-resize'))), + ); + await tester.pumpAndSettle(); + await expectPainted({'media'}); + await mouse.moveTo( + tester.getCenter( + find.byKey(const Key('editor-media-timeline-junction')), + ), + ); + await tester.pumpAndSettle(); + await expectPainted({'media', 'timeline'}); + // Removing the junction leaves the pointer hovering over the timeline. + update(() => showMedia = false); + await tester.pumpAndSettle(); + await expectPainted({'timeline'}); + await mouse.moveTo(const Offset(1450, 50)); + await tester.pumpAndSettle(); + await expectPainted({}); + update(() => showMedia = true); + await tester.pumpAndSettle(); + final junction = find.byKey(const Key('desktop-chat-timeline-junction')); + await mouse.moveTo(tester.getCenter(junction)); + await tester.pumpAndSettle(); + await expectPainted({'sidebar', 'timeline'}); + await mouse.down(tester.getCenter(junction)); + await mouse.moveBy(const Offset(60, -40)); + await tester.pumpAndSettle(); + await mouse.moveTo(const Offset(1450, 50)); + await tester.pumpAndSettle(); + await expectPainted({'sidebar', 'timeline'}); + await mouse.up(); + await tester.pumpAndSettle(); + await expectPainted({}); + await mouse.moveTo(tester.getCenter(junction)); + await mouse.down(tester.getCenter(junction)); + await mouse.moveBy(const Offset(-300, 20)); + await tester.pumpAndSettle(); + expect(sidebarCollapsed, isTrue); + await expectPainted({'sidebar', 'timeline'}); + final node = tester.getRect( + find.descendant(of: junction, matching: find.byType(DecoratedBox)), + ); + expect(node.center.dx, 0); + expect(tester.getSize(junction).width, 10); + // Reverse the same drag: feedback returns to the expanded boundary. + await mouse.moveBy(const Offset(150, -20)); + await tester.pumpAndSettle(); + expect(sidebarCollapsed, isFalse); + await expectPainted({'sidebar', 'timeline'}); + final expandedNode = tester.getRect( + find.descendant(of: junction, matching: find.byType(DecoratedBox)), + ); + expect(expandedNode.center.dx, tester.getCenter(junction).dx); + await mouse.up(); + await tester.pumpAndSettle(); + await mouse.removePointer(); + expect(tester.takeException(), isNull); + }, + ); + + testWidgets( + 'media/timeline junction drags both splits and clamps each axis', + (tester) async { + tester.view.physicalSize = const Size(1100, 800); + tester.view.devicePixelRatio = 1; + addTearDown(tester.view.resetPhysicalSize); + addTearDown(tester.view.resetDevicePixelRatio); + var mediaWidth = 260.0; + var timelineHeight = 280.0; + var showMedia = true; + var saves = 0; + var singleAxisEnds = 0; + late StateSetter update; + await tester.pumpWidget( + MaterialApp( + home: StatefulBuilder( + builder: (context, setState) { + update = setState; + return ExpandedEditorLayout( + preview: const SizedBox.expand(), + header: const SizedBox(height: 40), + properties: const SizedBox.expand(), + media: const SizedBox.expand(), + showMedia: showMedia, + showProperties: true, + mediaWidth: mediaWidth, + onMediaWidthChanged: (value) => + setState(() => mediaWidth = value), + onMediaWidthChangeEnd: () => singleAxisEnds++, + timelineHeight: timelineHeight, + onTimelineHeightChanged: (value) => + setState(() => timelineHeight = value), + onTimelineHeightChangeEnd: () => singleAxisEnds++, + onJunctionResizeEnd: () => saves++, + timeline: const SizedBox.expand(), + ); + }, + ), + ), + ); + final junction = find.byKey(const Key('editor-media-timeline-junction')); + Rect card(String name) => + tester.getRect(find.byKey(Key('editor-$name-card'))); + final center = tester.getCenter(junction); + expect(center.dx, (card('media').right + card('preview').left) / 2); + expect(center.dy, (card('preview').bottom + card('timeline').top) / 2); + await tester.drag(junction, const Offset(80, -60)); + await tester.pumpAndSettle(); + expect(card('media').width, 340); + expect(card('timeline').height, 340); + expect(saves, 1); + expect(singleAxisEnds, 0); + await tester.drag(junction, const Offset(-40, 30)); + await tester.pumpAndSettle(); + expect(card('media').width, 300); + expect(card('timeline').height, 310); + expect(saves, 2); + await tester.drag(junction, const Offset(-2000, -2000)); + await tester.pumpAndSettle(); + expect(card('media').width, 220); + expect(card('preview').height, 180); + await tester.drag(junction, const Offset(80, -60)); + await tester.pumpAndSettle(); + expect(card('media').width, 300); + expect(card('preview').height, 180); + await tester.drag(junction, const Offset(2000, 2000)); + await tester.pumpAndSettle(); + expect(card('preview').width, 320); + expect(card('timeline').height, 220); + expect(saves, 5); + expect(singleAxisEnds, 0); + update(() => showMedia = false); + await tester.pump(); + expect(junction, findsNothing); + expect(tester.takeException(), isNull); + }, + ); + + testWidgets('media width drags, respects other panels and survives hiding', ( + tester, + ) async { + tester.view.physicalSize = const Size(1100, 800); + tester.view.devicePixelRatio = 1; + addTearDown(tester.view.resetPhysicalSize); + addTearDown(tester.view.resetDevicePixelRatio); + double? mediaWidth; + var showMedia = true; + var saves = 0; + late StateSetter update; + await tester.pumpWidget( + MaterialApp( + home: StatefulBuilder( + builder: (context, setState) { + update = setState; + return ExpandedEditorLayout( + preview: const SizedBox.expand(), + header: const SizedBox(height: 40), + properties: const SizedBox.expand(), + media: const SizedBox.expand(key: Key('test-media')), + showMedia: showMedia, + showProperties: true, + mediaWidth: mediaWidth, + onMediaWidthChanged: (value) => + setState(() => mediaWidth = value), + onMediaWidthChangeEnd: () => saves++, + timelineHeight: 220, + onTimelineHeightChanged: (_) {}, + onTimelineHeightChangeEnd: () {}, + onJunctionResizeEnd: () {}, + timeline: const SizedBox.expand(), + ); + }, + ), + ), + ); + Rect card(String name) => + tester.getRect(find.byKey(Key('editor-$name-card'))); + final resize = find.byKey(const Key('editor-media-resize')); + final mediaElement = tester.element(find.byKey(const Key('test-media'))); + expect(card('media').width, 260); + expect(tester.getSize(resize).width, 10); + expect(tester.getRect(resize).bottom, card('preview').bottom); + await tester.dragFrom( + tester.getCenter(resize) + const Offset(4, 0), + const Offset(80, 0), + ); + await tester.pumpAndSettle(); + expect(card('media').width, 340); + expect(saves, 1); + expect(card('preview').left - card('media').right, 2); + expect(card('properties').width, 240); + await tester.drag(resize, const Offset(2000, 0)); + await tester.pumpAndSettle(); + expect(card('preview').width, 320); + expect(card('media').width, 536); + await tester.drag(resize, const Offset(-2000, 0)); + await tester.pumpAndSettle(); + expect(card('media').width, 220); + expect(saves, 3); + update(() => mediaWidth = 400); + await tester.pump(); + tester.view.physicalSize = const Size(900, 800); + await tester.pumpAndSettle(); + expect(card('media').width, 336); + expect(card('preview').width, 320); + expect(mediaWidth, 400); + tester.view.physicalSize = const Size(1100, 800); + await tester.pumpAndSettle(); + expect(card('media').width, 400); + update(() => showMedia = false); + await tester.pump(); + expect(resize, findsNothing); + update(() => showMedia = true); + await tester.pump(); + expect(card('media').width, 400); + expect( + tester.element(find.byKey(const Key('test-media'))), + same(mediaElement), + ); + expect(saves, 3); + expect(tester.takeException(), isNull); + }); + testWidgets('inspector has an independent frame aligned with the preview', ( tester, ) async { @@ -28,9 +415,13 @@ void main() { media: const SizedBox(), showMedia: false, showProperties: showProperties, + mediaWidth: null, + onMediaWidthChanged: (_) {}, + onMediaWidthChangeEnd: () {}, timelineHeight: 200, onTimelineHeightChanged: (_) {}, onTimelineHeightChangeEnd: () {}, + onJunctionResizeEnd: () {}, timeline: const SizedBox(), ); }, @@ -65,7 +456,7 @@ void main() { ); expect(tester.takeException(), isNull); }); - testWidgets('preview and timeline cards resize through their 6 dp gap', ( + testWidgets('preview and timeline cards resize through their narrow gap', ( tester, ) async { tester.view.physicalSize = const Size(700, 800); @@ -84,10 +475,14 @@ void main() { media: const SizedBox(), showMedia: false, showProperties: false, + mediaWidth: null, + onMediaWidthChanged: (_) {}, + onMediaWidthChangeEnd: () {}, timelineHeight: timelineHeight, onTimelineHeightChanged: (value) => update(() => timelineHeight = value), onTimelineHeightChangeEnd: () => saves++, + onJunctionResizeEnd: () {}, timeline: const Column( children: [ Text('Toolbar'), diff --git a/test/editor_panel_defaults_test.dart b/test/editor_panel_defaults_test.dart index f283c31..063c08c 100644 --- a/test/editor_panel_defaults_test.dart +++ b/test/editor_panel_defaults_test.dart @@ -66,7 +66,7 @@ void main() { expect(find.byKey(const Key('timeline-toolbar')), findsOneWidget); expect( tester.getSize(find.byKey(const Key('timeline-add-button'))), - const Size.square(26), + const Size.square(24), ); for (final button in tester.widgetList( find.byType(IconButton), diff --git a/test/widget_test.dart b/test/widget_test.dart index b7f03ff..4615ecd 100644 --- a/test/widget_test.dart +++ b/test/widget_test.dart @@ -131,7 +131,7 @@ void main() { .top, ), ); - expect(settingsRect.left - navigationRect.right, 6); + expect(settingsRect.left - navigationRect.right, 2); expect(settingsRect.top, navigationRect.top); expect(settingsRect.bottom, navigationRect.bottom); expect(find.byKey(const Key('settings-sidebar-divider')), findsNothing); @@ -885,13 +885,13 @@ void main() { .textStyle! .resolve({})! .fontSize, - 13, + 11, ); final projectTabFinder = find.byKey( const ValueKey('timeline-tab-project'), ); final tabRect = tester.getRect(projectTabFinder); - expect(tabRect.height, 26); + expect(tabRect.height, 24); for (final key in ['timeline-add-button', 'timeline-list-button']) { final buttonRect = tester.getRect(find.byKey(Key(key))); expect(buttonRect.height, tabRect.height); @@ -901,7 +901,7 @@ void main() { expect( tester.getRect(find.byKey(const Key('timeline-tabs-bar'))).right - tester.getRect(find.byKey(const Key('timeline-list-button'))).right, - 4, + 8, ); expect( tester @@ -909,8 +909,7 @@ void main() { .style! .backgroundColor! .resolve({}), - Theme.of(tester.element(projectTabFinder)).colorScheme.primary - .withValues(alpha: .12), + Theme.of(tester.element(projectTabFinder)).colorScheme.surfaceContainer, ); expect(find.byKey(const ValueKey('timeline-tab-second')), findsOneWidget); final tabs = find.byKey(const Key('timeline-tabs-list')); diff --git a/test/workspace_resize_handle_test.dart b/test/workspace_resize_handle_test.dart index 1ed66fc..27d19d8 100644 --- a/test/workspace_resize_handle_test.dart +++ b/test/workspace_resize_handle_test.dart @@ -5,107 +5,244 @@ import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { - for (final axis in Axis.values) { - for (final finish in ['release', 'cancel', 'unmount']) { - testWidgets('$axis resize cursor stays locked until $finish', ( - tester, - ) async { - var showHandle = true; - var taps = 0; - var ends = 0; - var starts = 0; - var updates = 0; - late StateSetter update; - await tester.pumpWidget( - MaterialApp( - home: Scaffold( - body: StatefulBuilder( - builder: (context, setState) { - update = setState; - return Stack( - children: [ - Positioned( - left: 400, - top: 400, - width: 100, - height: 60, - child: MouseRegion( - cursor: SystemMouseCursors.click, - child: GestureDetector( - key: const Key('button'), - onTap: () => taps++, - child: const ColoredBox(color: Colors.blue), - ), - ), + for (final axis in [...Axis.values, null]) { + testWidgets('$axis feedback fades and expands with rounded ends', ( + tester, + ) async { + final handle = find.byKey(const Key('animated-handle')); + await tester.pumpWidget( + MaterialApp( + home: Scaffold( + body: Center( + child: SizedBox( + width: axis == Axis.vertical ? 200 : 10, + height: axis == Axis.horizontal ? 200 : 10, + child: axis == null + ? WorkspaceResizeHandle.junction( + key: const Key('animated-handle'), + initialWidth: 100, + initialHeight: 100, + onWidthChanged: (_) {}, + onHeightChanged: (_) {}, + ) + : WorkspaceResizeHandle( + key: const Key('animated-handle'), + axis: axis, + initialValue: 100, + onResize: (_) {}, ), - if (showHandle) - Positioned( - left: 100, - top: 100, - width: axis == Axis.horizontal ? 5 : 200, - height: axis == Axis.horizontal ? 200 : 5, - child: WorkspaceResizeHandle( - key: const Key('handle'), - axis: axis, - initialValue: 100, - onStart: () => starts++, - onResize: (_) { - expect(starts, 1); - updates++; - }, - onEnd: () => ends++, - ), - ), - ], - ); - }, ), ), ), - ); - final mouse = await tester.createGesture(kind: PointerDeviceKind.mouse); - final start = tester.getCenter(find.byKey(const Key('handle'))); - final button = tester.getCenter(find.byKey(const Key('button'))); - await mouse.addPointer(location: start); - await mouse.down(start); - await mouse.moveBy( - axis == Axis.horizontal ? const Offset(30, 0) : const Offset(0, 30), - ); - await tester.pump(); - await mouse.moveTo(button); - await tester.pump(); - expect(updates, greaterThan(0)); - expect(starts, 1); - expect( - RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), - axis == Axis.horizontal - ? SystemMouseCursors.resizeColumn - : SystemMouseCursors.resizeRow, - ); - // A second pointer still reaches the control through the cursor overlay. - await tester.tap(find.byKey(const Key('button'))); - expect(taps, 1); + ), + ); + final fade = find.descendant(of: handle, matching: find.byType(Opacity)); + final paint = find.descendant( + of: handle, + matching: find.byType(DecoratedBox), + ); + double opacity() => tester.widget(fade).opacity; + final hitSize = tester.getSize(handle); + final center = tester.getCenter(handle); + final mouse = await tester.createGesture(kind: PointerDeviceKind.mouse); + expect(opacity(), 0); + await mouse.addPointer(location: center); + await tester.pump(); + expect(opacity(), 0); + await tester.pump(const Duration(milliseconds: 60)); + expect(opacity(), inExclusiveRange(0, 1)); + final growing = tester.getRect(paint); + expect( + axis == Axis.vertical ? growing.height : growing.width, + inExclusiveRange(2, 4), + ); + expect(tester.getSize(handle), hitSize); + await tester.pumpAndSettle(); + expect(opacity(), 1); + final decoration = + tester.widget(paint).decoration as BoxDecoration; + expect(decoration.borderRadius, BorderRadius.circular(2)); + await mouse.moveTo(const Offset(10, 10)); + await tester.pump(); + await tester.pump(const Duration(milliseconds: 30)); + final fading = opacity(); + expect(fading, inExclusiveRange(0, 1)); + // Reentering mid-fade continues from its current appearance. + await mouse.moveTo(center); + await tester.pump(); + expect(opacity(), closeTo(fading, .001)); + await tester.pumpAndSettle(); + expect(opacity(), 1); + await mouse.moveTo(const Offset(10, 10)); + await tester.pumpAndSettle(); + expect(opacity(), 0); + await mouse.removePointer(); + expect(tester.takeException(), isNull); + }); + } - if (finish == 'unmount') { - update(() => showHandle = false); + for (final axis in [...Axis.values, null]) { + for (final finish in ['release', 'cancel', 'unmount']) { + testWidgets( + '$axis resize cursor stays locked until $finish', + (tester) async { + final expectedCursor = axis == null + ? SystemMouseCursors.grab + : axis == Axis.horizontal + ? SystemMouseCursors.resizeColumn + : SystemMouseCursors.resizeRow; + var showHandle = true; + var taps = 0; + var ends = 0; + var starts = 0; + var updates = 0; + late StateSetter update; + await tester.pumpWidget( + MaterialApp( + home: Scaffold( + body: StatefulBuilder( + builder: (context, setState) { + update = setState; + return Stack( + children: [ + Positioned( + left: 400, + top: 400, + width: 100, + height: 60, + child: MouseRegion( + cursor: SystemMouseCursors.click, + child: GestureDetector( + key: const Key('button'), + onTap: () => taps++, + child: const ColoredBox(color: Colors.blue), + ), + ), + ), + if (showHandle) + Positioned( + left: 100, + top: 100, + width: axis == null || axis == Axis.horizontal + ? 5 + : 200, + height: axis == null || axis == Axis.vertical + ? 5 + : 200, + child: axis == null + ? WorkspaceResizeHandle.junction( + key: const Key('handle'), + initialWidth: 100, + initialHeight: 100, + onStart: () => starts++, + onWidthChanged: (_) { + expect(starts, 1); + updates++; + }, + onHeightChanged: (_) { + expect(starts, 1); + updates++; + }, + onEnd: () => ends++, + ) + : WorkspaceResizeHandle( + key: const Key('handle'), + axis: axis, + initialValue: 100, + onStart: () => starts++, + onResize: (_) { + expect(starts, 1); + updates++; + }, + onEnd: () => ends++, + ), + ), + ], + ); + }, + ), + ), + ), + ); + final mouse = await tester.createGesture( + kind: PointerDeviceKind.mouse, + ); + final start = tester.getCenter(find.byKey(const Key('handle'))); + final button = tester.getCenter(find.byKey(const Key('button'))); + double highlightOpacity() => tester + .widget( + find.descendant( + of: find.byKey(const Key('handle')), + matching: find.byType(Opacity), + ), + ) + .opacity; + expect(highlightOpacity(), 0); + await mouse.addPointer(location: start); await tester.pumpAndSettle(); - await mouse.up(); - } else if (finish == 'cancel') { - await mouse.cancel(); - } else { - await mouse.up(); - } - await tester.pumpAndSettle(); - await mouse.moveTo(button + const Offset(1, 0)); - await tester.pump(); - expect( - RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), - SystemMouseCursors.click, - ); - expect(ends, finish == 'unmount' ? 0 : 1); - await mouse.removePointer(); - expect(tester.takeException(), isNull); - }); + expect(highlightOpacity(), 1); + expect( + RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), + expectedCursor, + ); + await mouse.down(start); + await mouse.moveBy( + axis == null + ? const Offset(30, 30) + : axis == Axis.horizontal + ? const Offset(30, 0) + : const Offset(0, 30), + ); + await tester.pump(); + await mouse.moveTo(button); + await tester.pump(); + expect(updates, greaterThan(0)); + expect(starts, 1); + expect(highlightOpacity(), 1); + expect( + RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), + axis == null ? SystemMouseCursors.grabbing : expectedCursor, + ); + // A second pointer still reaches the control through the cursor overlay. + await tester.tap(find.byKey(const Key('button'))); + expect(taps, 1); + + if (finish == 'unmount') { + update(() => showHandle = false); + await tester.pumpAndSettle(); + await mouse.up(); + } else if (finish == 'cancel') { + await mouse.cancel(); + } else { + await mouse.up(); + } + await tester.pumpAndSettle(); + await mouse.moveTo(button + const Offset(1, 0)); + await tester.pump(); + expect( + RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), + SystemMouseCursors.click, + ); + expect(ends, finish == 'unmount' ? 0 : 1); + if (finish != 'unmount') { + expect(highlightOpacity(), 0); + await mouse.moveTo(start); + await tester.pumpAndSettle(); + expect(highlightOpacity(), 1); + expect( + RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), + expectedCursor, + ); + } + await mouse.removePointer(); + expect(tester.takeException(), isNull); + }, + variant: const TargetPlatformVariant({ + TargetPlatform.macOS, + TargetPlatform.windows, + TargetPlatform.linux, + }), + ); } } } -- 2.54.0 From 107e93b95973582c7acd79411c7be0dc2fa54c16 Mon Sep 17 00:00:00 2001 From: lingjhf Date: Fri, 9 Oct 2026 19:23:49 +0800 Subject: [PATCH 04/14] refactor(media): compact browsing controls and isolate asset row updates --- .../media/desktop_media_asset_tile.dart | 84 ++----- lib/features/media/media_browser_body.dart | 209 +++++++++--------- .../media/media_browser_controller.dart | 6 +- lib/features/media/media_browser_layout.dart | 9 +- lib/features/media/media_browser_toolbar.dart | 124 ++++++++--- lib/features/media/resource_navigation.dart | 53 +++-- test/media_panel_test.dart | 57 +++-- test/resource_navigation_test.dart | 2 +- 8 files changed, 287 insertions(+), 257 deletions(-) diff --git a/lib/features/media/desktop_media_asset_tile.dart b/lib/features/media/desktop_media_asset_tile.dart index 9236a2a..2dc7774 100644 --- a/lib/features/media/desktop_media_asset_tile.dart +++ b/lib/features/media/desktop_media_asset_tile.dart @@ -24,12 +24,23 @@ class DesktopMediaAssetTile extends StatelessWidget { final MediaAvailability? availability; static TextStyle? _nameStyle(BuildContext context) => - Theme.of(context).textTheme.bodyMedium - ?.copyWith(fontSize: 13, height: 20 / 13); + Theme.of(context).textTheme.bodyMedium?.copyWith( + fontFamily: 'packages/cutdex_ui/Inter', + fontSize: AppInspectorMetrics.fontSize, + height: AppInspectorMetrics.lineHeight / AppInspectorMetrics.fontSize, + fontWeight: FontWeight.w500, + fontVariations: const [FontVariation('wght', 500)], + letterSpacing: AppInspectorMetrics.fontSize * .005, + ); static TextStyle? _metadataStyle(BuildContext context) => - Theme.of(context).textTheme.bodySmall - ?.copyWith(fontSize: 12, height: 16 / 12); + Theme.of(context).textTheme.bodySmall?.copyWith( + fontFamily: 'packages/cutdex_ui/Inter', + fontSize: AppInspectorMetrics.fontSize, + height: AppInspectorMetrics.lineHeight / AppInspectorMetrics.fontSize, + fontVariations: const [FontVariation('wght', 450)], + letterSpacing: AppInspectorMetrics.fontSize * .005, + ); /// Font fallback and fractional scaling can round a line above size × height. static double gridLabelHeight(BuildContext context) { @@ -106,7 +117,7 @@ class DesktopMediaAssetTile extends StatelessWidget { ); final cover = ClipRRect( key: ValueKey('desktop-media-cover-${asset.id}'), - borderRadius: BorderRadius.circular(4), + borderRadius: BorderRadius.circular(AppInspectorMetrics.radius), child: Stack( children: [ if (unavailable) @@ -215,66 +226,3 @@ class DesktopMediaAssetTile extends StatelessWidget { ); } } - -/// List labels follow the same column widths and breakpoints as asset rows. -class DesktopMediaListHeader extends StatelessWidget { - const DesktopMediaListHeader({super.key}); - - @override - Widget build(BuildContext context) => Padding( - padding: const EdgeInsets.symmetric( - horizontal: DesktopMediaMetrics.padding + DesktopMediaMetrics.tilePadding, - ), - child: LayoutBuilder( - builder: (context, constraints) { - final columns = DesktopMediaListColumns(constraints.maxWidth); - Widget label(String text, {bool end = false}) => Text( - text, - maxLines: 1, - overflow: TextOverflow.ellipsis, - textAlign: end ? TextAlign.end : TextAlign.start, - style: DesktopMediaAssetTile._metadataStyle(context) - ?.copyWith(color: Theme.of(context).colorScheme.onSurfaceVariant), - ); - return SizedBox( - height: (MediaQuery.textScalerOf(context).scale(16) + 8).clamp( - DesktopMediaMetrics.listHeader, - double.infinity, - ), - child: Row( - children: [ - Expanded( - child: Padding( - padding: const EdgeInsetsDirectional.only( - start: - DesktopMediaMetrics.listCover + DesktopMediaMetrics.gap, - ), - child: label(context.l10n.name), - ), - ), - if (columns.duration) - SizedBox( - width: DesktopMediaListColumns.durationWidth, - child: label(context.l10n.duration, end: true), - ), - if (columns.specification) ...[ - const SizedBox(width: DesktopMediaMetrics.gap), - SizedBox( - width: DesktopMediaListColumns.specificationWidth, - child: label(context.l10n.mediaSpecification), - ), - ], - if (columns.kind) ...[ - const SizedBox(width: DesktopMediaMetrics.gap), - SizedBox( - width: DesktopMediaListColumns.kindWidth, - child: label(context.l10n.mediaCategory), - ), - ], - ], - ), - ); - }, - ), - ); -} diff --git a/lib/features/media/media_browser_body.dart b/lib/features/media/media_browser_body.dart index 8c1713c..ea085e9 100644 --- a/lib/features/media/media_browser_body.dart +++ b/lib/features/media/media_browser_body.dart @@ -298,6 +298,95 @@ class _MediaBrowserBodyState extends ConsumerState _anchorOwner = null; _anchorAssets = const []; } + Widget item(BuildContext context, int index) { + final asset = assets[index]; + return Consumer( + builder: (context, ref, _) { + final availability = ref + .watch(mediaAvailabilityProvider(widget.projectId, asset)) + .asData + ?.value; + final unavailable = + availability != null && + availability != MediaAvailability.available; + return ListenableSelector<(bool, bool)>( + listenable: _browser, + select: () => (_selectedAssetId == asset.id, _checkingDrop), + builder: (context, presentation) => AppContextMenu( + key: ValueKey(('media-menu', asset.id)), + itemsBuilder: (_) { + final available = ref.read(projectsProvider).asData?.value; + final canEdit = + available?.activeProject?.id == widget.projectId && + available?.projectBusy == false && + !_checkingDrop; + final sequence = timeline?.activeSequenceId; + return [ + AppMenuItem( + label: context.l10n.addToTimeline, + icon: AppIcons.add, + onPressed: + canEdit && + !unavailable && + sequence != null && + available?.timeline?.id == timelineId + ? () => _action(() => _browser.insertAsset(asset)) + : null, + ), + AppMenuItem( + label: context.l10n.rename, + icon: AppIcons.rename, + onPressed: canEdit ? () => _rename(asset) : null, + ), + AppMenuItem( + label: defaultTargetPlatform == TargetPlatform.macOS + ? context.l10n.revealFinder + : context.l10n.revealFileManager, + icon: AppIcons.folderOpen, + onPressed: canEdit && _desktop + ? () => _action(() => _browser.reveal(asset)) + : null, + ), + const AppMenuSeparator(), + AppMenuItem( + label: context.l10n.removeMedia, + icon: AppIcons.delete, + destructive: true, + onPressed: canEdit ? () => _remove(asset) : null, + ), + ]; + }, + child: Listener( + onPointerDown: (event) { + if (event.buttons == 2) { + _selectedAssetId = asset.id; + } + }, + child: _SelectableAsset( + key: ValueKey(asset.id), + grid: _isGrid, + desktop: widget.desktop, + drag: MediaAssetDrag( + projectId: widget.projectId, + assetId: asset.id, + ), + name: asset.name, + draggable: + widget.draggable && + !workspace!.projectBusy && + !presentation.$2 && + !unavailable, + selected: presentation.$1, + onTap: () => _browser.selectAsset(asset), + child: _assetTile(asset, availability), + ), + ), + ), + ); + }, + ); + } + final content = assets.isEmpty ? Center( child: Padding( @@ -382,105 +471,6 @@ class _MediaBrowserBodyState extends ConsumerState height: constraints.maxHeight, ); } - Widget item(BuildContext context, int index) { - final asset = assets[index]; - return Consumer( - builder: (context, ref, _) { - final availability = ref - .watch( - mediaAvailabilityProvider(widget.projectId, asset), - ) - .asData - ?.value; - final unavailable = - availability != null && - availability != MediaAvailability.available; - return ListenableSelector<(bool, bool)>( - listenable: _browser, - select: () => - (_selectedAssetId == asset.id, _checkingDrop), - builder: (context, presentation) => AppContextMenu( - key: ValueKey(('media-menu', asset.id)), - itemsBuilder: (_) { - final available = ref - .read(projectsProvider) - .asData - ?.value; - final canEdit = - available?.activeProject?.id == - widget.projectId && - available?.projectBusy == false && - !_checkingDrop; - final sequence = timeline?.activeSequenceId; - return [ - AppMenuItem( - label: context.l10n.addToTimeline, - icon: AppIcons.add, - onPressed: - canEdit && - !unavailable && - sequence != null && - available?.timeline?.id == timelineId - ? () => _action( - () => _browser.insertAsset(asset), - ) - : null, - ), - AppMenuItem( - label: context.l10n.rename, - icon: AppIcons.rename, - onPressed: canEdit ? () => _rename(asset) : null, - ), - AppMenuItem( - label: - defaultTargetPlatform == TargetPlatform.macOS - ? context.l10n.revealFinder - : context.l10n.revealFileManager, - icon: AppIcons.folderOpen, - onPressed: canEdit && _desktop - ? () => _action(() => _browser.reveal(asset)) - : null, - ), - const AppMenuSeparator(), - AppMenuItem( - label: context.l10n.removeMedia, - icon: AppIcons.delete, - destructive: true, - onPressed: canEdit ? () => _remove(asset) : null, - ), - ]; - }, - child: Listener( - onPointerDown: (event) { - if (event.buttons == 2) { - _selectedAssetId = asset.id; - } - }, - child: _SelectableAsset( - key: ValueKey(asset.id), - grid: _isGrid, - desktop: widget.desktop, - drag: MediaAssetDrag( - projectId: widget.projectId, - assetId: asset.id, - ), - name: asset.name, - draggable: - widget.draggable && - !workspace!.projectBusy && - !presentation.$2 && - !unavailable, - selected: presentation.$1, - onTap: () => _browser.selectAsset(asset), - child: _assetTile(asset, availability), - ), - ), - ), - ); - }, - ); - } - Widget scrollView(ScrollController controller) => !_isGrid ? widget.desktop ? ListView.builder( @@ -509,9 +499,10 @@ class _MediaBrowserBodyState extends ConsumerState separatorBuilder: (_, _) => SizedBox(height: spacing), ) - : GridView.builder( + : GridView.custom( key: PageStorageKey(('media-grid', widget.projectId)), controller: controller, + semanticChildCount: assets.length, padding: EdgeInsets.all(padding), gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: columns, @@ -528,8 +519,10 @@ class _MediaBrowserBodyState extends ConsumerState labelHeight + 2, ), - itemCount: assets.length, - itemBuilder: item, + childrenDelegate: _MediaChildrenDelegate( + item, + childCount: assets.length, + ), ); if (widget.desktop) { return ScrollEdgeFade( @@ -546,8 +539,6 @@ class _MediaBrowserBodyState extends ConsumerState if (!widget.desktop) return content; return Column( children: [ - if (!_isGrid) - const DesktopMediaListHeader(key: Key('media-list-header')), Expanded(child: content), const Divider(height: 1), SizedBox( @@ -811,3 +802,13 @@ class _SelectableAsset extends StatelessWidget { ); } } + +// Constraint changes reflow existing cells without rebuilding menus and tiles. +// A new builder is created when assets, filters or the project change. +class _MediaChildrenDelegate extends SliverChildBuilderDelegate { + const _MediaChildrenDelegate(super.builder, {super.childCount}); + + @override + bool shouldRebuild(covariant _MediaChildrenDelegate oldDelegate) => + builder != oldDelegate.builder || childCount != oldDelegate.childCount; +} diff --git a/lib/features/media/media_browser_controller.dart b/lib/features/media/media_browser_controller.dart index 09031fe..0cc9955 100644 --- a/lib/features/media/media_browser_controller.dart +++ b/lib/features/media/media_browser_controller.dart @@ -30,9 +30,9 @@ enum MediaSort { importOrder, nameAscending, nameDescending } /// Desktop thumbnail density, independent of touch-page presentation. enum MediaGridSize { - small(120), - medium(160), - large(200); + small(96), + medium(120), + large(160); const MediaGridSize(this.targetWidth); final double targetWidth; diff --git a/lib/features/media/media_browser_layout.dart b/lib/features/media/media_browser_layout.dart index 9fde431..bddf9fb 100644 --- a/lib/features/media/media_browser_layout.dart +++ b/lib/features/media/media_browser_layout.dart @@ -2,15 +2,14 @@ import 'dart:math' as math; /// Shared desktop geometry for cards, rows, headers and browse anchoring. abstract final class DesktopMediaMetrics { - static const padding = 12.0; + static const padding = 16.0; static const gap = 8.0; - static const tilePadding = 5.0; + static const tilePadding = 8.0; static const listCover = 56.0; static const listRow = 48.0; - static const listHeader = 28.0; static int columns(double width, double targetWidth) => - math.max(1, ((width + gap) / (targetWidth + gap)).floor()); + math.max(1, ((width + gap) / (targetWidth + gap)).ceil()); static double gridExtent(double tileWidth, double labelHeight) => (tileWidth - tilePadding * 2) * 9 / 16 + @@ -19,7 +18,7 @@ abstract final class DesktopMediaMetrics { tilePadding * 2; } -/// Matching list-column visibility for a header and its asset rows. +/// List-column visibility within asset rows. final class DesktopMediaListColumns { const DesktopMediaListColumns(double width) : duration = width >= 240, diff --git a/lib/features/media/media_browser_toolbar.dart b/lib/features/media/media_browser_toolbar.dart index ea55d61..ca112b6 100644 --- a/lib/features/media/media_browser_toolbar.dart +++ b/lib/features/media/media_browser_toolbar.dart @@ -292,6 +292,34 @@ class _MediaBrowserToolbarState extends State { } Widget _desktopToolbar(BuildContext context, RecentProject? selected) { + final desktopButtonStyle = AppTheme.toolbarButtonStyle(context).copyWith( + textStyle: WidgetStatePropertyAll( + Theme.of(context).textTheme.bodyMedium!.copyWith( + fontFamily: 'packages/cutdex_ui/Inter', + fontSize: AppInspectorMetrics.fontSize, + height: AppInspectorMetrics.lineHeight / AppInspectorMetrics.fontSize, + fontWeight: FontWeight.w400, + fontVariations: const [FontVariation('wght', 450)], + letterSpacing: AppInspectorMetrics.fontSize * .005, + ), + ), + minimumSize: const WidgetStatePropertyAll( + Size(0, AppInspectorMetrics.input), + ), + maximumSize: const WidgetStatePropertyAll( + Size(double.infinity, AppInspectorMetrics.input), + ), + padding: const WidgetStatePropertyAll( + EdgeInsets.symmetric(horizontal: AppSpacing.small), + ), + shape: const WidgetStatePropertyAll( + RoundedRectangleBorder( + borderRadius: BorderRadius.all( + Radius.circular(AppInspectorMetrics.radius), + ), + ), + ), + ); Widget category() => Semantics( label: context.l10n.mediaCategory, child: AppDropdownMenu( @@ -309,6 +337,7 @@ class _MediaBrowserToolbarState extends State { buttonKey: const Key('media-category-button'), focusNode: focus, onPressed: toggle, + style: desktopButtonStyle, child: Row( children: [ Expanded( @@ -341,9 +370,14 @@ class _MediaBrowserToolbarState extends State { else SizedBox( key: const Key('media-project-row'), - height: 36, + height: AppInspectorMetrics.row, child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 4), + padding: const EdgeInsetsDirectional.fromSTEB( + AppInspectorMetrics.padding, + AppInspectorMetrics.rowPadding, + AppInspectorMetrics.trailingPadding, + AppInspectorMetrics.rowPadding, + ), child: LayoutBuilder( builder: (context, constraints) => Row( children: [ @@ -369,6 +403,7 @@ class _MediaBrowserToolbarState extends State { buttonKey: const Key('media-project-button'), focusNode: focusNode, onPressed: toggle, + style: desktopButtonStyle, child: Row( children: [ Expanded( @@ -385,7 +420,7 @@ class _MediaBrowserToolbarState extends State { ), ), ), - const SizedBox(width: 4), + const SizedBox(width: AppSpacing.small), ConstrainedBox( constraints: BoxConstraints( maxWidth: (constraints.maxWidth * .45).clamp( @@ -394,12 +429,12 @@ class _MediaBrowserToolbarState extends State { ), ), child: SizedBox( - height: 28, + height: AppInspectorMetrics.input, child: Tooltip( message: context.l10n.importMedia, child: TextButton( key: const Key('media-import-button'), - style: AppTheme.toolbarButtonStyle(context), + style: desktopButtonStyle, onPressed: canImport ? onImport : null, child: Text( context.l10n.importMedia, @@ -427,6 +462,14 @@ class _MediaBrowserToolbarState extends State { Widget Function() category, String Function(MediaSort) sortLabel, ) { + final searchText = Theme.of(context).textTheme.bodyMedium?.copyWith( + fontFamily: 'packages/cutdex_ui/Inter', + fontSize: AppInspectorMetrics.fontSize, + height: AppInspectorMetrics.lineHeight / AppInspectorMetrics.fontSize, + fontVariations: const [FontVariation('wght', 450)], + letterSpacing: AppInspectorMetrics.fontSize * .005, + ); + final colors = Theme.of(context).colorScheme; List sortItems() => [ for (final value in MediaSort.values) AppMenuItem( @@ -462,7 +505,7 @@ class _MediaBrowserToolbarState extends State { required IconData icon, required List items, }) => SizedBox.square( - dimension: 28, + dimension: AppInspectorMetrics.action, child: AppDropdownMenu( items: items, builder: (context, toggle, focus) => IconButton( @@ -477,9 +520,14 @@ class _MediaBrowserToolbarState extends State { ); return SizedBox( key: const Key('media-filter-row'), - height: 40, + height: AppInspectorMetrics.row, child: Padding( - padding: const EdgeInsets.fromLTRB(12, 4, 12, 4), + padding: const EdgeInsets.fromLTRB( + AppInspectorMetrics.padding, + AppInspectorMetrics.rowPadding, + AppInspectorMetrics.trailingPadding, + AppInspectorMetrics.rowPadding, + ), child: LayoutBuilder( builder: (context, constraints) { final wide = constraints.maxWidth >= 400; @@ -490,13 +538,10 @@ class _MediaBrowserToolbarState extends State { key: const Key('media-search'), controller: _search, enabled: widget.onQueryChanged != null, - style: AppTheme.inputTextStyle( - context, - style: AppTheme.toolbarTextStyle(context), - ), + style: AppTheme.inputTextStyle(context, style: searchText), cursorHeight: AppTheme.inputCursorHeight( context, - style: AppTheme.toolbarTextStyle(context), + style: searchText, ), textAlignVertical: TextAlignVertical.center, decoration: InputDecoration( @@ -505,36 +550,61 @@ class _MediaBrowserToolbarState extends State { ), hintStyle: AppTheme.inputHintStyle( context, - style: AppTheme.toolbarTextStyle(context), + style: searchText, ), + filled: true, + fillColor: colors.surfaceContainer, isDense: true, - constraints: const BoxConstraints(minHeight: 32), + constraints: const BoxConstraints( + minHeight: AppInspectorMetrics.input, + ), contentPadding: const EdgeInsets.symmetric( - horizontal: 8, - vertical: 4, + horizontal: AppSpacing.small, + ), + border: const OutlineInputBorder( + borderRadius: BorderRadius.all( + Radius.circular(AppInspectorMetrics.radius), + ), + borderSide: BorderSide.none, + ), + enabledBorder: const OutlineInputBorder( + borderRadius: BorderRadius.all( + Radius.circular(AppInspectorMetrics.radius), + ), + borderSide: BorderSide.none, + ), + focusedBorder: OutlineInputBorder( + borderRadius: const BorderRadius.all( + Radius.circular(AppInspectorMetrics.radius), + ), + borderSide: BorderSide(color: colors.primary), ), prefixIcon: constraints.maxWidth < 160 ? null : const Icon(AppIcons.search, size: 16), prefixIconConstraints: const BoxConstraints( - minWidth: 28, - minHeight: 28, + minWidth: AppInspectorMetrics.input, + minHeight: AppInspectorMetrics.input, ), ), onChanged: (value) => widget.onQueryChanged?.call(value), ), ), - const SizedBox(width: 4), + const SizedBox(width: AppSpacing.small), if (wide) ...[ - SizedBox(width: 88, height: 28, child: category()), - const SizedBox(width: 4), + SizedBox( + width: 88, + height: AppInspectorMetrics.input, + child: category(), + ), + const SizedBox(width: AppSpacing.small), menuButton( key: const Key('media-sort-button'), tooltip: context.l10n.sortMedia, icon: AppIcons.sort, items: sortItems(), ), - const SizedBox(width: 4), + const SizedBox(width: AppSpacing.small), menuButton( key: const Key('media-size-button'), tooltip: context.l10n.mediaThumbnailSize, @@ -564,9 +634,9 @@ class _MediaBrowserToolbarState extends State { ...sizeItems(), ], ), - const SizedBox(width: 4), + const SizedBox(width: AppSpacing.small), SizedBox.square( - dimension: 28, + dimension: AppInspectorMetrics.action, child: IconButton( key: const Key('media-layout-toggle'), onPressed: onToggleGrid, @@ -581,9 +651,9 @@ class _MediaBrowserToolbarState extends State { ), ), if (widget.projectScoped) ...[ - const SizedBox(width: 4), + const SizedBox(width: AppSpacing.small), SizedBox.square( - dimension: 28, + dimension: AppInspectorMetrics.action, child: IconButton( key: const Key('media-import-button'), onPressed: canImport ? () => onImport() : null, diff --git a/lib/features/media/resource_navigation.dart b/lib/features/media/resource_navigation.dart index c42163f..2e4cc3f 100644 --- a/lib/features/media/resource_navigation.dart +++ b/lib/features/media/resource_navigation.dart @@ -115,9 +115,13 @@ class _ResourceSectionTabsState extends State { final l10n = AppLocalizations.of(context)!; return SizedBox( key: const Key('resource-section-tabs'), - height: 36, + height: AppDesktopMetrics.timelineTabs, child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 5), + padding: const EdgeInsetsDirectional.only( + start: AppSpacing.small, + top: 4, + bottom: 4, + ), child: ScrollEdgeFade( controller: _scrollController, axis: Axis.horizontal, @@ -127,35 +131,30 @@ class _ResourceSectionTabsState extends State { key: const Key('resource-tabs-list'), controller: _scrollController, scrollDirection: Axis.horizontal, - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 4), - child: Row( - children: [ - for (final section in ResourceSection.values) ...[ - if (section != ResourceSection.values.first) - const SizedBox(width: 4), - KeyedSubtree( - key: widget.selected == section - ? _selectedTabKey - : null, - child: Semantics( - selected: widget.selected == section, - child: TextButton( - key: ValueKey('resource-tab-${section.name}'), - style: AppTheme.timelineTabStyle( - context, - selected: widget.selected == section, - ), - onPressed: widget.onSelected == null - ? null - : () => widget.onSelected!(section), - child: Text(section.label(l10n), maxLines: 1), + child: Row( + children: [ + for (final section in ResourceSection.values) ...[ + if (section != ResourceSection.values.first) + const SizedBox(width: AppSpacing.tiny), + KeyedSubtree( + key: widget.selected == section ? _selectedTabKey : null, + child: Semantics( + selected: widget.selected == section, + child: TextButton( + key: ValueKey('resource-tab-${section.name}'), + style: AppTheme.timelineTabStyle( + context, + selected: widget.selected == section, ), + onPressed: widget.onSelected == null + ? null + : () => widget.onSelected!(section), + child: Text(section.label(l10n), maxLines: 1), ), ), - ], + ), ], - ), + ], ), ), ), diff --git a/test/media_panel_test.dart b/test/media_panel_test.dart index 08ef0c8..43e0fed 100644 --- a/test/media_panel_test.dart +++ b/test/media_panel_test.dart @@ -679,13 +679,13 @@ void main() { final sortButton = tester.getRect( find.byKey(const Key('media-sort-button')), ); - expect(header.height, 76); - expect(importButton.height, 28); + expect(header.height, 64); + expect(importButton.height, 24); expect(importButton.top - header.top, 4); - expect(header.right - importButton.right, 12); - expect(header.right - layoutButton.right, 12); + expect(header.right - importButton.right, 8); + expect(header.right - layoutButton.right, 8); expect(sortButton.top, layoutButton.top); - expect(layoutButton.left - sortButton.right, 36); + expect(layoutButton.left - sortButton.right, 40); expect(find.byKey(const Key('media-category-button')), findsOneWidget); expect(find.byKey(const ValueKey('media-filter-image')), findsNothing); expect( @@ -793,7 +793,7 @@ void main() { (tester.widget(find.byType(GridView)).gridDelegate as SliverGridDelegateWithFixedCrossAxisCount) .crossAxisCount; - expect(columns(), 1); + expect(columns(), 2); expect( find.ancestor( of: find.byType(GridView), @@ -809,6 +809,18 @@ void main() { findsNothing, ); final first = find.text('very-long-asset-name-0.png'); + final firstTile = find.byKey( + const ValueKey('/originals/very-long-asset-name-0.png'), + ); + final tileWidget = tester.widget(firstTile); + await tester.binding.setSurfaceSize(const Size(520, 600)); + await tester.pumpAndSettle(); + expect(columns(), 4); + expect(tester.widget(firstTile), same(tileWidget)); + await tester.binding.setSurfaceSize(const Size(280, 600)); + await tester.pumpAndSettle(); + expect(columns(), 2); + expect(tester.widget(firstTile), same(tileWidget)); await tester.tap(first); await tester.tap(find.byTooltip('列表布局')); await tester.pumpAndSettle(); @@ -841,14 +853,15 @@ void main() { await tester.pumpAndSettle(); for (final (width, count) in [ (120.0, 1), - (180.0, 1), - (220.0, 1), - (280.0, 1), - (240.0, 1), - (360.0, 2), - (520.0, 3), - (560.0, 3), - (900.0, 5), + (180.0, 2), + (220.0, 2), + (260.0, 2), + (280.0, 2), + (240.0, 2), + (360.0, 3), + (520.0, 4), + (560.0, 5), + (900.0, 7), ]) { await tester.binding.setSurfaceSize(Size(width, 600)); await tester.pumpAndSettle(); @@ -862,7 +875,7 @@ void main() { padding.horizontal - delegate.crossAxisSpacing * (count - 1)) / count; - expect(tileWidth, greaterThanOrEqualTo(width < 184 ? width - 24 : 160)); + expect(tileWidth, lessThanOrEqualTo(120)); expect(tester.takeException(), isNull); } expect( @@ -894,11 +907,11 @@ void main() { (tester.widget(find.byType(GridView)).gridDelegate as SliverGridDelegateWithFixedCrossAxisCount) .crossAxisCount; - expect(columns(), 4); + expect(columns(), 6); for (final (size, count) in [ - (MediaGridSize.small, 5), - (MediaGridSize.large, 3), - (MediaGridSize.medium, 4), + (MediaGridSize.small, 7), + (MediaGridSize.large, 5), + (MediaGridSize.medium, 6), ]) { await tester.tap(find.byKey(const Key('media-size-button'))); await tester.pumpAndSettle(); @@ -923,7 +936,7 @@ void main() { final container = await mount(tester); expect( tester.getSize(find.byKey(const Key('media-panel-header'))).height, - 76, + 64, ); expect( tester.getSize(find.byKey(const Key('media-search'))).width, @@ -1044,9 +1057,9 @@ void main() { browser.gridSize = size; await tester.pump(); final firstOffset = position().pixels; - expect(firstOffset, lessThanOrEqualTo(position().maxScrollExtent)); + expect(firstOffset, lessThanOrEqualTo(position().maxScrollExtent + 1e-6)); await tester.pumpAndSettle(); - expect(position().pixels, firstOffset); + expect(position().pixels, closeTo(firstOffset, 1e-6)); expect( tester .getRect(find.byKey(ValueKey(anchor.assetId))) diff --git a/test/resource_navigation_test.dart b/test/resource_navigation_test.dart index 72fc6a1..087af32 100644 --- a/test/resource_navigation_test.dart +++ b/test/resource_navigation_test.dart @@ -75,7 +75,7 @@ void main() { tester .getSize(find.byKey(const Key('resource-section-tabs'))) .height, - 36, + 32, ); final header = tester.getRect( find.byKey(const Key('resource-section-tabs')), -- 2.54.0 From 77dbb1897f0534af8426c20ac7a6b56c1e1d355a Mon Sep 17 00:00:00 2001 From: lingjhf Date: Fri, 9 Oct 2026 19:23:49 +0800 Subject: [PATCH 05/14] fix(preview): keep source navigation and canvas interactions responsive --- lib/features/preview/preview_panel.dart | 73 +++++- test/preview_controller_test.dart | 302 ++++++++++++++++++++++++ test/preview_interaction_test.dart | 241 +++++++++++++++++-- test/timeline_session_test.dart | 91 +++++++ 4 files changed, 685 insertions(+), 22 deletions(-) diff --git a/lib/features/preview/preview_panel.dart b/lib/features/preview/preview_panel.dart index 8c82eb6..0cbda5b 100644 --- a/lib/features/preview/preview_panel.dart +++ b/lib/features/preview/preview_panel.dart @@ -621,6 +621,22 @@ class _PreviewToolbar extends StatelessWidget { final PreviewController? controller; final SourcePreviewController? source; + ButtonStyle? _compactButtonStyle(BuildContext context) => + AppTheme.isDesktop(context) + ? IconButton.styleFrom( + fixedSize: const Size.square(AppInspectorMetrics.action), + minimumSize: const Size.square(AppInspectorMetrics.action), + maximumSize: const Size.square(AppInspectorMetrics.action), + padding: EdgeInsets.zero, + tapTargetSize: MaterialTapTargetSize.shrinkWrap, + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.all( + Radius.circular(AppInspectorMetrics.radius), + ), + ), + ) + : null; + @override Widget build(BuildContext context) { if (PreviewFullscreenScope.of(context)?.fullscreen == true) { @@ -661,7 +677,7 @@ class _PreviewToolbar extends StatelessWidget { try { final time = CommandTime(tick, TimelineClock.ticksPerSecond); if (source case final source?) { - await source.control(SourcePreviewAction.seek, at: time); + await source.seekInteractive(tick); } else if (preview?.activeSequence() case final sequence?) { await preview!.controlPreview(sequence, PreviewAction.seek, at: time); } @@ -705,12 +721,25 @@ class _PreviewToolbar extends StatelessWidget { ); }, icon: Icon(direction < 0 ? AppIcons.previousFrame : AppIcons.nextFrame), + style: _compactButtonStyle(context), ), ); Widget _build(BuildContext context) { final preview = controller; final playing = source?.playing ?? preview?.playing ?? false; + final timeTextStyle = AppTheme.isDesktop(context) + ? Theme.of(context).textTheme.bodyMedium?.copyWith( + fontFamily: 'packages/cutdex_ui/Inter', + fontSize: AppInspectorMetrics.fontSize, + height: + AppInspectorMetrics.lineHeight / AppInspectorMetrics.fontSize, + fontVariations: const [FontVariation('wght', 450)], + letterSpacing: AppInspectorMetrics.fontSize * .005, + fontFeatures: [const FontFeature.tabularFigures()], + ) + : Theme.of(context).textTheme.bodySmall + ?.copyWith(fontFeatures: [const FontFeature.tabularFigures()]); final frameDuration = source?.frameDuration ?? preview?.frameDuration ?? @@ -762,7 +791,9 @@ class _PreviewToolbar extends StatelessWidget { ? AppDesktopMetrics.playbackBar : AppControlSize.panelHeader, child: Padding( - padding: const EdgeInsets.symmetric(horizontal: AppSpacing.compact), + padding: const EdgeInsets.symmetric( + horizontal: AppInspectorMetrics.padding, + ), child: LayoutBuilder( builder: (context, constraints) { final controls = Row( @@ -803,13 +834,14 @@ class _PreviewToolbar extends StatelessWidget { ), maxLines: 1, overflow: TextOverflow.ellipsis, - style: Theme.of(context).textTheme.bodySmall?.copyWith( - fontFeatures: [const FontFeature.tabularFigures()], - ), + style: timeTextStyle, ), ), ), - if (AppTheme.isDesktop(context)) _frameButton(context, -1), + if (AppTheme.isDesktop(context)) ...[ + const SizedBox(width: AppSpacing.small), + _frameButton(context, -1), + ], ListenableSelector( listenable: source ?? preview, select: () => ( @@ -826,10 +858,14 @@ class _PreviewToolbar extends StatelessWidget { ? preview.togglePlayback : null, icon: Icon(playing ? AppIcons.pause : AppIcons.play), + style: _compactButtonStyle(context), ); }, ), - if (AppTheme.isDesktop(context)) _frameButton(context, 1), + if (AppTheme.isDesktop(context)) ...[ + _frameButton(context, 1), + const SizedBox(width: AppSpacing.small), + ], Expanded( child: ListenableSelector( listenable: source ?? preview, @@ -854,8 +890,9 @@ class _PreviewToolbar extends StatelessWidget { tooltip: context.l10n.retryPreview, onPressed: preview.busy ? null : preview.retry, icon: const Icon(AppIcons.refresh), + style: _compactButtonStyle(context), ), - const SizedBox(width: AppSpacing.gap), + const SizedBox(width: AppSpacing.small), ], if (source == null && PreviewFullscreenScope.of(context)?.fullscreen != @@ -865,6 +902,25 @@ class _PreviewToolbar extends StatelessWidget { emptyLabel: context.l10n.noMatchingOptions, label: context.l10n.canvasRatio, outlined: false, + controlHeight: AppTheme.isDesktop(context) + ? AppInspectorMetrics.input + : null, + textStyle: AppTheme.isDesktop(context) + ? Theme.of( + context, + ).textTheme.bodyMedium?.copyWith( + fontFamily: 'packages/cutdex_ui/Inter', + fontSize: AppInspectorMetrics.fontSize, + height: + AppInspectorMetrics.lineHeight / + AppInspectorMetrics.fontSize, + fontVariations: const [ + FontVariation('wght', 450), + ], + letterSpacing: + AppInspectorMetrics.fontSize * .005, + ) + : null, value: preview?.canvas ?? ProjectCanvas.widescreen, onChanged: preview?.setCanvas, @@ -894,6 +950,7 @@ class _PreviewToolbar extends StatelessWidget { ? AppIcons.exitFullscreen : AppIcons.fullscreen, ), + style: _compactButtonStyle(context), ), ], ), diff --git a/test/preview_controller_test.dart b/test/preview_controller_test.dart index 5a3d7f6..4ee1387 100644 --- a/test/preview_controller_test.dart +++ b/test/preview_controller_test.dart @@ -16,6 +16,7 @@ import 'package:cutdex/features/properties/mask_properties.dart'; import 'package:cutdex/features/properties/property_number_input.dart'; import 'package:cutdex_ui/theme.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/foundation.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:cutdex_sdk/runtime.dart'; import 'package:cutdex_sdk/project.dart'; @@ -208,6 +209,177 @@ void main() { messenger.setMockMethodCallHandler(events, null); }); + testWidgets('alignment refreshes selection when the native scene settles', ( + tester, + ) async { + debugDefaultTargetPlatformOverride = TargetPlatform.linux; + addTearDown(() => debugDefaultTargetPlatformOverride = null); + final fixture = (await tester.runAsync( + () => createPreviewFixture(Uri.file('/align.mov')), + ))!; + final timeline = fixture.timeline; + final sequence = SequenceId('one'); + final clip = ElementId('clip'); + await tester.runAsync(() async { + timeline.commands.setTransform( + sequence: sequence, + clip: clip, + tick: 0, + change: (_) => const ClipTransform(x: .1, scale: .5, scaleY: .5), + ); + await timeline.flush(); + }); + final preview = PreviewController( + timeline: timeline, + activeSequence: () => timeline.activeSequenceId, + viewForSequence: timeline.view, + runtime: CutdexRuntime(), + ); + addTearDown( + () => tester.runAsync(() async { + await preview.close(); + await fixture.workspace.close(); + await fixture.directory.delete(recursive: true); + }), + ); + await tester.runAsync(() async { + await preview.initialize(); + await until(() => calls.any((c) => c.method == 'seek')); + }); + expect(tester.takeException(), isNull, reason: 'initialize'); + preview.selectVisual(clip); + await tester.pumpWidget( + ProviderScope( + overrides: [ + editorPreviewProvider( + 'project', + 'project', + ).overrideWith((ref) async => preview), + ], + child: MaterialApp( + localizationsDelegates: AppLocalizations.localizationsDelegates, + supportedLocales: AppLocalizations.supportedLocales, + locale: const Locale('zh'), + theme: EditorTheme.penLight, + home: const Scaffold( + body: EditorPreviewPanel( + projectId: 'project', + timelineId: 'project', + ), + ), + ), + ), + ); + await tester.pumpAndSettle(); + final selection = find.descendant( + of: find.byType(PreviewInteractionOverlay), + matching: find.byType(CustomPaint), + ); + final before = tester.widget(selection).painter!; + final cachedVisual = preview.visualsForSelection({clip}).single; + for (var i = 0; i < 100; i++) { + expect(preview.visualsForSelection({clip}).single, same(cachedVisual)); + expect(preview.visuals.single, same(cachedVisual)); + } + final canvasBefore = tester.widget( + find.byType(PreviewCanvas), + ); + final seeks = calls.where((c) => c.method == 'seek').length; + final patch = blockedPatch = Completer(); + await tester.runAsync(() async { + await timeline.alignClip( + sequence, + AlignClip( + clipId: 'clip', + at: CommandTime(0, 1), + alignment: CanvasAlignment.left, + ), + ); + await until(() => calls.any((c) => c.method == 'applyPatch')); + }); + expect(tester.takeException(), isNull, reason: 'align'); + await tester.pump(); + expect(preview.busy, isTrue); + expect( + tester.widget(selection).painter!.shouldRepaint(before), + isFalse, + ); + + patch.complete(); + await tester.runAsync(() => until(() => !preview.busy)); + expect(tester.takeException(), isNull, reason: 'native acknowledgement'); + await tester.pump(); + final aligned = tester.widget(selection).painter!; + expect(aligned.shouldRepaint(before), isTrue); + expect( + preview.visualsForSelection({clip}).single, + isNot(same(cachedVisual)), + ); + expect(preview.visuals.single.geometry.bounds.left, closeTo(0, 1e-6)); + expect( + tester.widget(find.byType(PreviewCanvas)), + same(canvasBefore), + ); + expect(preview.positionTick, 0); + expect(preview.selectedVisualIds, {clip}); + + blockedPatch = null; + await tester.runAsync(() async { + timeline.view(sequence).undo(); + await until(() => !preview.busy); + }); + expect(tester.takeException(), isNull, reason: 'undo'); + await tester.pump(); + expect( + tester.widget(selection).painter!.shouldRepaint(aligned), + isTrue, + ); + final undone = tester.widget(selection).painter!; + expect(preview.selectedVisualIds, isEmpty); + await tester.runAsync(() async { + timeline.view(sequence).redo(); + await until(() => !preview.busy); + }); + await tester.pump(); + expect(preview.visuals.single.geometry.bounds.left, closeTo(0, 1e-6)); + expect( + tester.widget(selection).painter!.shouldRepaint(undone), + isFalse, + ); + expect(preview.selectedVisualIds, isEmpty); + preview.selectVisual(clip); + await tester.pump(); + for (final transform in [ + const ClipTransform(x: .2, y: .1), + const ClipTransform(x: .2, y: .1, scale: .75, scaleY: .5), + const ClipTransform(x: .2, y: .1, scale: .75, scaleY: .5, rotation: 30), + ]) { + final previous = tester.widget(selection).painter!; + await tester.runAsync(() async { + timeline.commands.setTransform( + sequence: sequence, + clip: clip, + tick: 0, + change: (_) => transform, + ); + await until(() => !preview.busy); + }); + await tester.pump(); + expect( + tester.widget(selection).painter!.shouldRepaint(previous), + isTrue, + ); + } + expect(calls.where((c) => c.method == 'seek'), hasLength(seeks)); + expect( + calls.where((c) => c.method == 'beginInteractiveTransform'), + isEmpty, + ); + expect(tester.takeException(), isNull); + await tester.pumpWidget(const SizedBox()); + debugDefaultTargetPlatformOverride = null; + }); + test('alignment tools share geometry, preserve rotation and undo, and never seek', () async { final fixture = await createPreviewFixture(Uri.file('/align.mov')); final timeline = fixture.timeline; @@ -754,6 +926,136 @@ void main() { ); } + for (final animated in [false, true]) { + testWidgets('mask inspector follows playback with animated=$animated', ( + tester, + ) async { + final fixture = (await tester.runAsync( + () => createPreviewFixture(Uri.file('/mask-playback.mov')), + ))!; + final timeline = fixture.timeline; + final sequence = SequenceId('one'); + final clip = ElementId('clip'); + const maskId = 'playback-mask'; + await tester.runAsync(() async { + timeline.commands.addMask( + sequence: sequence, + clip: clip, + tick: 0, + maskId: maskId, + shape: ClipMaskShape.rectangle, + ); + timeline.commands.setMask( + sequence: sequence, + clip: clip, + tick: 0, + maskId: maskId, + value: const ClipMask(x: .25), + ); + if (animated) { + timeline.commands.editKeyframeChannel( + sequence: sequence, + clip: clip, + tick: 0, + parameterIds: ['mask.$maskId.center.x'], + ); + timeline.commands.setMask( + sequence: sequence, + clip: clip, + tick: TimelineClock.ticksPerSecond, + maskId: maskId, + value: const ClipMask(x: .75), + ); + } + await timeline.flush(); + }); + final preview = PreviewController( + timeline: timeline, + activeSequence: () => timeline.activeSequenceId, + viewForSequence: timeline.view, + runtime: CutdexRuntime(), + ); + addTearDown( + () => tester.runAsync(() async { + await preview.close(); + await fixture.workspace.close(); + await fixture.directory.delete(recursive: true); + }), + ); + await tester.runAsync(() async { + await preview.initialize(); + await until(() => calls.any((c) => c.method == 'seek')); + }); + await tester.pumpWidget( + ProviderScope( + overrides: [ + editorPreviewProvider( + 'project', + 'project', + ).overrideWith((ref) async => preview), + ], + child: MaterialApp( + localizationsDelegates: AppLocalizations.localizationsDelegates, + supportedLocales: AppLocalizations.supportedLocales, + locale: const Locale('zh'), + theme: EditorTheme.penLight, + home: Scaffold( + body: SingleChildScrollView( + child: MaskProperties( + projectId: 'project', + timelineId: 'project', + element: clip, + ), + ), + ), + ), + ), + ); + await tester.pumpAndSettle(); + final xField = find.byWidgetPredicate( + (widget) => widget is PropertyNumberInput && widget.label == 'X', + ); + expect(tester.widget(xField).value, 25); + Future advance(int seconds) async { + await tester.runAsync(() async { + emit({ + 'state': 'playing', + 'revision': revision, + 'position': MediaTime(seconds, 1).toMap(), + 'rate': 1.0, + }); + await until( + () => + preview.playing && + preview.positionTick == seconds * TimelineClock.ticksPerSecond, + ); + }); + await tester.pump(); + } + + await advance(0); + final before = tester.widget(xField); + var controlNotifications = 0; + preview.addListener(() => controlNotifications++); + await advance(1); + expect( + controlNotifications, + 0, + reason: 'Playback ticks only notify position listeners', + ); + expect(preview.maskFor(clip)!.x, animated ? .75 : .25); + expect( + tester.widget(xField).value, + animated ? 75 : 25, + ); + if (!animated) { + expect(tester.widget(xField), same(before)); + } + expect(tester.takeException(), isNull); + await tester.pumpWidget(const SizedBox()); + }); + } + testWidgets('mask inspector adds a shape and grouped keys at compact width', ( tester, ) async { diff --git a/test/preview_interaction_test.dart b/test/preview_interaction_test.dart index 16b1cef..64fb8fa 100644 --- a/test/preview_interaction_test.dart +++ b/test/preview_interaction_test.dart @@ -12,6 +12,195 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { + testWidgets('mask painting follows geometry and skips unchanged ticks', ( + tester, + ) async { + final preview = _MaskPreview(); + addTearDown(preview.dispose); + Widget host({ + double pixelRatio = 1, + Rect rect = const Rect.fromLTWH(0, 0, 500, 300), + }) => MaterialApp( + home: MediaQuery( + data: MediaQueryData(devicePixelRatio: pixelRatio), + child: MaskInteractionOverlay(controller: preview, canvasRect: rect), + ), + ); + await tester.pumpWidget(host()); + final paint = find.descendant( + of: find.byType(MaskInteractionOverlay), + matching: find.byType(CustomPaint), + ); + CustomPainter current() => tester.widget(paint).painter!; + var previous = current(); + for (var i = 0; i < 100; i++) { + preview.notifyListeners(); + await tester.pump(); + expect(current().shouldRepaint(previous), isFalse); + previous = current(); + } + for (final mask in [ + preview.mask.copyWith(x: .6), + preview.mask.copyWith(width: .7), + preview.mask.copyWith(rotation: 30), + preview.mask.copyWith(shape: ClipMaskShape.ellipse), + ]) { + preview.mask = mask; + preview.notifyListeners(); + await tester.pump(); + expect(current().shouldRepaint(previous), isTrue); + previous = current(); + } + preview.value = const ClipTransform(x: .1); + preview.notifyListeners(); + await tester.pump(); + expect(current().shouldRepaint(previous), isTrue); + previous = current(); + await tester.pumpWidget(host(pixelRatio: 2)); + expect(current().shouldRepaint(previous), isTrue); + previous = current(); + await tester.pumpWidget( + host(pixelRatio: 2, rect: const Rect.fromLTWH(20, 10, 250, 150)), + ); + expect(current().shouldRepaint(previous), isTrue); + previous = current(); + await tester.binding.handleSystemMessage({'type': 'fontsChange'}); + await tester.pump(); + expect(current().shouldRepaint(previous), isTrue); + await tester.pumpWidget(const SizedBox()); + }); + + testWidgets('empty selection skips geometry on playback ticks', ( + tester, + ) async { + final preview = _Preview(); + addTearDown(preview.dispose); + await tester.pumpWidget( + MaterialApp( + home: PreviewInteractionOverlay( + controller: preview, + canvasRect: const Rect.fromLTWH(0, 0, 500, 300), + ), + ), + ); + for (var i = 0; i < 100; i++) { + preview.notifyListeners(); + await tester.pump(); + } + expect(preview.visualQueries, 0); + preview.selectVisual(ElementId('upper')); + await tester.pump(); + expect(preview.visualQueries, greaterThan(0)); + await tester.pumpWidget(const SizedBox()); + }); + + testWidgets('selection and controller changes update the decoration', ( + tester, + ) async { + final first = _Preview(lowerOffset: const Offset(-100, 0)) + ..selectVisual(ElementId('upper')); + final second = _Preview(size: const Size(100, 100)) + ..selectVisual(ElementId('upper')); + addTearDown(first.dispose); + addTearDown(second.dispose); + Widget host(_Preview preview) => MaterialApp( + home: Scaffold( + body: SizedBox( + width: 600, + height: 400, + child: PreviewInteractionOverlay( + controller: preview, + canvasRect: const Rect.fromLTWH(40, 40, 500, 300), + ), + ), + ), + ); + final selection = find.descendant( + of: find.byType(PreviewInteractionOverlay), + matching: find.byType(CustomPaint), + ); + await tester.pumpWidget(host(first)); + final upper = tester.widget(selection).painter!; + first.selectVisual(ElementId('lower')); + await tester.pump(); + final lower = tester.widget(selection).painter!; + expect(lower.shouldRepaint(upper), isTrue); + first.selectVisual(null); + await tester.pump(); + expect( + tester.widget(selection).painter!.shouldRepaint(lower), + isTrue, + ); + + await tester.pumpWidget(host(second)); + final replacement = tester.widget(selection); + first.selectVisual(ElementId('upper')); + first.transforms.presentation.value++; + await tester.pump(); + expect(tester.widget(selection), same(replacement)); + second.value = const ClipTransform(x: .1); + second.notifyListeners(); + await tester.pump(); + expect( + tester + .widget(selection) + .painter! + .shouldRepaint(replacement.painter!), + isTrue, + ); + await tester.pumpWidget(const SizedBox()); + first.notifyListeners(); + second.notifyListeners(); + expect(tester.takeException(), isNull); + }); + + testWidgets('selection follows scene edits without a parent rebuild', ( + tester, + ) async { + tester.view.devicePixelRatio = 1; + addTearDown(tester.view.resetDevicePixelRatio); + final preview = _Preview()..selectVisual(ElementId('upper')); + addTearDown(preview.dispose); + await tester.pumpWidget( + MaterialApp( + home: Scaffold( + body: SizedBox( + width: 600, + height: 400, + child: PreviewInteractionOverlay( + controller: preview, + canvasRect: const Rect.fromLTWH(40, 40, 500, 300), + ), + ), + ), + ), + ); + final selection = find.descendant( + of: find.byType(PreviewInteractionOverlay), + matching: find.byType(CustomPaint), + ); + final before = tester.widget(selection).painter!; + preview.value = const ClipTransform(x: -.35); + preview.notifyListeners(); + await tester.pump(); + final after = tester.widget(selection).painter!; + expect(after.shouldRepaint(before), isTrue); + expect( + tester.renderObject(selection), + paints..rect(rect: const Rect.fromLTRB(36, 136, 44, 144)), + ); + preview.value = const ClipTransform(); + preview.notifyListeners(); + await tester.pump(); + expect( + tester.widget(selection).painter!.shouldRepaint(after), + isTrue, + ); + expect(preview.commits, 0); + expect(preview.pauses, 0); + await tester.pumpWidget(const SizedBox()); + }); + Future mount( WidgetTester tester, _Preview preview, { @@ -905,11 +1094,25 @@ void main() { }); } +class _MaskPreview extends _Preview { + @override + bool get canPlay => true; + ClipMask mask = const ClipMask(); + @override + ElementId? get maskEditingElement => ElementId('upper'); + @override + ClipMask? maskFor(ElementId id) => mask; +} + class _Preview extends ChangeNotifier implements PreviewController { + @override + Listenable get positionChanges => this; + @override bool aspectRatioLocked = true; - _Preview({this.size = const Size(300, 200)}); + _Preview({this.size = const Size(300, 200), this.lowerOffset = Offset.zero}); final Size size; + final Offset lowerOffset; @override final canvas = const ProjectCanvas(1000, 600); ClipTransform value = const ClipTransform(); @@ -960,20 +1163,30 @@ class _Preview extends ChangeNotifier implements PreviewController { bool transforming = false; @override Set selectedVisualIds = {}; + int visualQueries = 0; @override - List get visuals => transforms.project([ - for (final (id, lane) in [('lower', 0), ('upper', 1)]) - PreviewVisual( - layerId: id, - elementId: ElementId(id), - lane: lane, - transform: value, - geometry: PreviewGeometry( - center: const Offset(500, 300), - size: size, - ).changed(const ClipTransform(), value, const Size(1000, 600)), - ), - ], const Size(1000, 600)); + List visualsForSelection(Set elements) => + visuals.where((v) => elements.contains(v.elementId)).toList(); + @override + List get visuals { + visualQueries++; + return transforms.project([ + for (final (id, lane) in [('lower', 0), ('upper', 1)]) + PreviewVisual( + layerId: id, + elementId: ElementId(id), + lane: lane, + transform: value, + geometry: PreviewGeometry( + center: + const Offset(500, 300) + + (id == 'lower' ? lowerOffset : Offset.zero), + size: size, + ).changed(const ClipTransform(), value, const Size(1000, 600)), + ), + ], const Size(1000, 600)); + } + @override void selectVisual(ElementId? id) { selectedVisualIds = {?id}; diff --git a/test/timeline_session_test.dart b/test/timeline_session_test.dart index 569b63d..c911a29 100644 --- a/test/timeline_session_test.dart +++ b/test/timeline_session_test.dart @@ -17,6 +17,9 @@ import 'package:cutdex/features/timeline/timeline_asset_drop_target.dart'; import 'package:cutdex/features/media/media_asset_drag.dart'; import 'dart:io'; +import 'dart:ui' as ui; + +import 'package:flutter/rendering.dart'; import 'package:cutdex/workspace/timeline_provider.dart'; @@ -131,6 +134,94 @@ void main() { await root.delete(recursive: true); }); + for (final direction in [-1.0, 1.0]) { + testWidgets('single primary clip stays painted off axis $direction', ( + tester, + ) async { + await tester.pumpWidget( + ProviderScope( + overrides: [ + projectsProvider.overrideWith( + () => _ViewProjects(session, projectId), + ), + editorTimelineProvider( + projectId, + 'project', + ).overrideWith((ref) => session), + ], + child: MaterialApp( + localizationsDelegates: AppLocalizations.localizationsDelegates, + supportedLocales: AppLocalizations.supportedLocales, + locale: const Locale('zh'), + theme: EditorTheme.penDark, + home: Scaffold( + body: EditorTimelinePanel( + projectId: projectId, + timelineId: 'project', + ), + ), + ), + ), + ); + await tester.pumpAndSettle(); + final surface = find.byKey(const Key('editor-timeline-surface')); + final origin = tester.getTopLeft(surface); + final size = tester.getSize(surface); + final viewport = TimelineViewportRect( + width: size.width, + height: size.height, + ); + final controller = session.view(session.activeSequenceId!); + final base = controller.version; + final frame = controller.project(viewport); + final clipBounds = controller.presentationBoundsAt(frame, 0); + final start = Offset(clipBounds.left + 30, clipBounds.center.dy); + final gesture = await tester.startGesture( + origin + start, + kind: PointerDeviceKind.mouse, + ); + await gesture.moveTo(origin + start + Offset(0, 100 * direction)); + await tester.pump(); + expect(tester.takeException(), isNull); + expect(controller.isDragging, isTrue); + expect(controller.dragRejection, isNull); + expect(controller.dragGhost, isNotNull); + expect(controller.version, same(base)); + final ghostBounds = controller.dragGhostBounds( + controller.dragGhost!, + viewport, + ); + final boundary = tester.renderObject( + find.descendant(of: surface, matching: find.byType(RepaintBoundary)), + ); + await tester.runAsync(() async { + final image = await boundary.toImage(pixelRatio: 1); + try { + final bytes = (await image.toByteData( + format: ui.ImageByteFormat.rawRgba, + ))!; + final point = Offset(ghostBounds.left + 30, ghostBounds.bottom - 10); + final color = TimelineThemeData.of(tester.element(surface)) + .visualClipColor + .toARGB32(); + expect( + bytes.getUint32( + (point.dy.toInt() * image.width + point.dx.toInt()) * 4, + ), + ((color & 0xffffff) << 8) | (color >> 24), + ); + } finally { + image.dispose(); + } + }); + await gesture.cancel(); + expect(controller.version, same(base)); + expect(controller.canUndo, isFalse); + await tester.pumpWidget(const SizedBox()); + expect(tester.takeException(), isNull); + }); + } + for (final connected in [false, true]) { test('detach audio is independent and atomic (connected=$connected)', () async { final id = SequenceId('two'); -- 2.54.0 From 8d1f8db7e89a67495962a067f085f1d515da0a06 Mon Sep 17 00:00:00 2001 From: lingjhf Date: Fri, 9 Oct 2026 19:24:00 +0800 Subject: [PATCH 06/14] feat(inspector): add animated independent corners and layered shadow controls --- .../editor/layouts/bounded_editor_layout.dart | 13 +- lib/features/properties/animation_labels.dart | 1 + lib/features/properties/audio_properties.dart | 14 +- .../properties/caption_properties.dart | 82 +- .../color_interpretation_properties.dart | 8 +- lib/features/properties/mask_properties.dart | 155 ++- lib/features/properties/picture_edits.dart | 3 +- lib/features/properties/picture_edits.g.dart | 2 +- .../properties/picture_properties.dart | 338 ++++-- .../properties/project_properties.dart | 24 +- .../properties/project_property_row.dart | 16 +- .../project_property_row_previews.dart | 6 +- lib/features/properties/properties_panel.dart | 2 +- .../properties/property_number_input.dart | 33 +- .../properties/shadow_properties.dart | 1070 +++++++++++++++++ lib/features/properties/speed_properties.dart | 5 +- test/caption_edit_context_test.dart | 3 +- test/compact_inspector_test.dart | 103 +- test/picture_corner_radius_test.dart | 226 ++++ test/picture_shadow_test.dart | 485 ++++++++ test/project_properties_test.dart | 8 +- test/property_number_input_test.dart | 2 +- test/transcription_tools_test.dart | 4 +- 23 files changed, 2375 insertions(+), 228 deletions(-) create mode 100644 lib/features/properties/shadow_properties.dart create mode 100644 test/picture_corner_radius_test.dart create mode 100644 test/picture_shadow_test.dart diff --git a/lib/features/editor/layouts/bounded_editor_layout.dart b/lib/features/editor/layouts/bounded_editor_layout.dart index 6379653..1874502 100644 --- a/lib/features/editor/layouts/bounded_editor_layout.dart +++ b/lib/features/editor/layouts/bounded_editor_layout.dart @@ -4,6 +4,7 @@ import 'package:flutter/material.dart'; import '../../../integrations/platform/device_experience.dart'; import '../../../l10n/l10n.dart'; +import '../../../shared/layout/workspace_layout_metrics.dart'; import 'package:cutdex_ui/icons.dart'; import 'package:cutdex_ui/theme.dart'; @@ -61,6 +62,11 @@ class BoundedEditorLayout extends StatelessWidget { : context.l10n.expandProperties, maxLines: 1, overflow: TextOverflow.ellipsis, + style: desktop && tool == EditorTool.properties + ? AppTheme.propertiesPanelTheme(Theme.of(context)) + .textTheme + .titleSmall + : null, ), ), ], @@ -103,7 +109,12 @@ class BoundedEditorLayout extends StatelessWidget { right: 0, width: page ? constraints.maxWidth - : math.min(320, constraints.maxWidth), + : math.min( + desktop && tool == EditorTool.properties + ? WorkspaceLayoutMetrics.propertiesPanelWidth + : 320, + constraints.maxWidth, + ), child: Material( key: const Key('editor-tool-surface'), elevation: page ? 0 : 8, diff --git a/lib/features/properties/animation_labels.dart b/lib/features/properties/animation_labels.dart index 6354276..ef3db38 100644 --- a/lib/features/properties/animation_labels.dart +++ b/lib/features/properties/animation_labels.dart @@ -7,6 +7,7 @@ extension TransformChannelLabel on TransformChannel { TransformChannel.position => context.l10n.position, TransformChannel.rotation => context.l10n.rotation, TransformChannel.scale => context.l10n.scale, + TransformChannel.cornerRadius => context.l10n.cornerRadius, }; } diff --git a/lib/features/properties/audio_properties.dart b/lib/features/properties/audio_properties.dart index 2271ad9..d685dbe 100644 --- a/lib/features/properties/audio_properties.dart +++ b/lib/features/properties/audio_properties.dart @@ -169,8 +169,7 @@ class _AudioPropertiesState extends State { if (_text.text != text) _text.text = text; } if (ClipAudioGain.isDetached(record)) { - return Padding( - padding: AppTheme.propertySectionPadding(context), + return AppPropertySection( child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ @@ -343,15 +342,18 @@ class _AudioPropertiesState extends State { return Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - Padding( - padding: AppTheme.propertySectionPadding(context), + AppPropertySection( child: AppTheme.isDesktop(context) ? AppPropertyGroup( label: widget.hasAudio ? context.l10n.volume : context.l10n.unboundAudio, - actions: volumeActions, - child: volumeControls, + actions: volumeActions.skip(1).toList(), + padChild: false, + child: AppPropertyRow( + trailing: volumeActions.first, + children: [volumeControls], + ), ) : Column( crossAxisAlignment: CrossAxisAlignment.stretch, diff --git a/lib/features/properties/caption_properties.dart b/lib/features/properties/caption_properties.dart index 00fcb1c..6d6e768 100644 --- a/lib/features/properties/caption_properties.dart +++ b/lib/features/properties/caption_properties.dart @@ -196,8 +196,7 @@ class _CaptionPropertiesState extends State { : 28.0; return Column( children: [ - Padding( - padding: AppTheme.propertySectionPadding(context), + AppPropertySection( child: SizedBox( height: AppTheme.propertyInputHeight(context), child: Row( @@ -226,9 +225,13 @@ class _CaptionPropertiesState extends State { vertical: 0, ), prefixIcon: const Icon(AppIcons.search, size: 14), - prefixIconConstraints: const BoxConstraints( - minWidth: 28, - minHeight: 28, + prefixIconConstraints: BoxConstraints( + minWidth: AppTheme.isCompactInspector(context) + ? 24 + : 28, + minHeight: AppTheme.isCompactInspector(context) + ? 24 + : 28, ), ), onChanged: (value) => setState( @@ -448,7 +451,7 @@ class _CaptionPropertiesState extends State { Widget panel(Widget content) => WorkspacePanel( paintBackground: false, headerHeight: AppTheme.isDesktop(context) - ? AppDesktopMetrics.panelHeader + ? AppInspectorMetrics.sectionHeader : CompactPanelTabs.height, headerPadding: EdgeInsets.zero, showHeaderDivider: false, @@ -564,7 +567,9 @@ class _CaptionPropertiesState extends State { key: const ValueKey('caption-detail-scroll-fade'), builder: (controller) => ListView( controller: controller, - padding: const EdgeInsets.symmetric(vertical: AppSpacing.small), + padding: AppTheme.isDesktop(context) + ? EdgeInsets.zero + : const EdgeInsets.symmetric(vertical: AppSpacing.small), children: [ if (AppTheme.isDesktop(context)) @@ -775,16 +780,21 @@ class _CaptionPropertiesState extends State { }, ), ] + .where( + (item) => + !AppTheme.isDesktop(context) || + (item is! SizedBox && item is! Divider), + ) .map( (item) => item is SizedBox || identical(item, widget.transformProperties) ? item + : AppTheme.isDesktop(context) + ? AppPropertySection(child: item) : Padding( - padding: EdgeInsets.symmetric( - horizontal: AppTheme.isDesktop(context) - ? AppInspectorMetrics.padding - : AppSpacing.panelContentHorizontal, + padding: const EdgeInsets.symmetric( + horizontal: AppSpacing.panelContentHorizontal, ), child: item, ), @@ -804,11 +814,13 @@ class _CaptionTextInput extends StatefulWidget { required this.editContext, required this.onSubmit, this.label, + this.leading, this.maxLines = 1, }); final String value; final Object editContext; final String? label; + final Widget? leading; final int maxLines; final bool Function(String) onSubmit; @@ -870,6 +882,7 @@ class _CaptionTextInputState extends State<_CaptionTextInput> { controller: _controller, focusNode: _focus, label: widget.label, + leading: widget.leading, minLines: widget.maxLines, maxLines: widget.maxLines, textInputAction: TextInputAction.done, @@ -901,17 +914,39 @@ class _CaptionColorInput extends StatelessWidget { @override Widget build(BuildContext context) { final desktop = AppTheme.isDesktop(context); + final swatch = Container( + width: desktop ? 14 : 20, + height: desktop ? 14 : 20, + decoration: BoxDecoration( + color: Color(int.parse('FF${value.substring(1)}', radix: 16)), + border: Border.all( + color: desktop + ? Theme.of(context).colorScheme.outlineVariant + : Theme.of(context).colorScheme.outline, + ), + borderRadius: BorderRadius.circular(AppRadius.extraSmall), + ), + ); + if (desktop) { + return AppPropertyGroup( + label: label, + padChild: false, + child: AppPropertyRow( + reserveTrailing: false, + children: [ + _CaptionTextInput( + value: value, + editContext: editContext, + leading: SizedBox(width: 24, child: Center(child: swatch)), + onSubmit: onSubmit, + ), + ], + ), + ); + } final controls = Row( children: [ - Container( - width: 20, - height: 20, - decoration: BoxDecoration( - color: Color(int.parse('FF${value.substring(1)}', radix: 16)), - border: Border.all(color: Theme.of(context).colorScheme.outline), - borderRadius: BorderRadius.circular(AppRadius.extraSmall), - ), - ), + swatch, const SizedBox(width: AppSpacing.small), Expanded( child: _CaptionTextInput( @@ -923,11 +958,6 @@ class _CaptionColorInput extends StatelessWidget { ), ], ); - return desktop - ? AppPropertyGroup( - label: label, - child: Semantics(label: label, child: controls), - ) - : controls; + return controls; } } diff --git a/lib/features/properties/color_interpretation_properties.dart b/lib/features/properties/color_interpretation_properties.dart index bb49e88..12c9026 100644 --- a/lib/features/properties/color_interpretation_properties.dart +++ b/lib/features/properties/color_interpretation_properties.dart @@ -94,8 +94,8 @@ class ColorInterpretationProperties extends ConsumerWidget { ), ], ); - return Padding( - padding: AppTheme.propertySectionPadding(context), + return AppPropertySection( + bottomSpacing: AppTheme.isDesktop(context) ? 0 : null, child: AppTheme.isDesktop(context) ? ExpansionTile( key: PageStorageKey(( @@ -109,9 +109,9 @@ class ColorInterpretationProperties extends ConsumerWidget { ), tilePadding: EdgeInsets.zero, childrenPadding: const EdgeInsets.only( - top: AppInspectorMetrics.rowGap, + bottom: AppInspectorMetrics.groupGap, ), - minTileHeight: AppInspectorMetrics.input, + minTileHeight: AppInspectorMetrics.sectionHeader, dense: true, maintainState: true, initiallyExpanded: selected != null, diff --git a/lib/features/properties/mask_properties.dart b/lib/features/properties/mask_properties.dart index 1046689..9b13fb5 100644 --- a/lib/features/properties/mask_properties.dart +++ b/lib/features/properties/mask_properties.dart @@ -180,7 +180,7 @@ class _MaskPropertiesState extends ConsumerState { } }, child: ListenableSelector( - listenable: preview, + listenable: Listenable.merge([preview, preview.positionChanges]), select: () { final mask = preview.maskFor(widget.element); final animation = preview.maskAnimation(widget.element); @@ -264,10 +264,11 @@ class _MaskPropertiesState extends ConsumerState { }) => PropertyNumberInput( key: ValueKey((selectedId, label)), label: label, - inlineLabel: inlineLabel, - labelActions: AppTheme.isDesktop(context) && !inlineLabel - ? [key(label)] - : const [], + inlineLabel: inlineLabel || AppTheme.isDesktop(context), + prefix: AppTheme.isDesktop(context) && !inlineLabel ? '' : null, + prefixIcon: AppTheme.isDesktop(context) && wrapRotation + ? AppIcons.angle + : null, unit: unit, value: value, enabled: enabled, @@ -338,45 +339,65 @@ class _MaskPropertiesState extends ConsumerState { if (mounted) setState(() => _scrubField = null); }, ); - Widget axes(String label, Widget first, Widget second) => - LayoutBuilder( - builder: (context, constraints) { - final desktop = AppTheme.isDesktop(context); - final gap = AppTheme.propertyRowGap(context); - final pair = constraints.maxWidth < (desktop ? 180 : 240) - ? Column( - children: [ - first, - SizedBox(height: gap), - second, - ], - ) - : Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded(child: first), - SizedBox(width: gap), - Expanded(child: second), - ], - ); - return desktop - ? AppPropertyGroup( - label: label, - actions: [key(label)], - child: pair, - ) - : Row( - children: [ - Expanded(child: pair), - SizedBox(width: gap), - key(label), - ], - ); - }, + Widget axes( + String label, + Widget first, + Widget second, { + Widget? additional, + }) => LayoutBuilder( + builder: (context, constraints) { + final desktop = AppTheme.isDesktop(context); + final gap = AppTheme.propertyRowGap(context); + if (desktop) { + return AppPropertyGroup( + label: label, + padChild: false, + child: Column( + children: [ + AppPropertyRow( + trailing: key(label), + children: [first, second], + ), + ?additional, + ], + ), + ); + } + final pair = constraints.maxWidth < 240 + ? Column( + children: [ + first, + SizedBox(height: gap), + second, + ], + ) + : Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded(child: first), + SizedBox(width: gap), + Expanded(child: second), + ], + ); + return Row( + children: [ + Expanded(child: pair), + SizedBox(width: gap), + key(label), + ], ); + }, + ); Widget singleField(String label, Widget input) => AppTheme.isDesktop(context) - ? input + ? AppPropertyGroup( + label: label, + padChild: false, + child: AppPropertyRow( + trailing: key(label), + children: [input], + ), + ) : Row( children: [ Expanded(child: input), @@ -395,8 +416,7 @@ class _MaskPropertiesState extends ConsumerState { style: AppTheme.propertySectionTitleStyle(context), ), ); - Widget section(List children) => Padding( - padding: AppTheme.propertySectionPadding(context), + Widget section(List children) => AppPropertySection( child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: children, @@ -586,8 +606,11 @@ class _MaskPropertiesState extends ConsumerState { if (AppTheme.isDesktop(context)) AppPropertyGroup( label: context.l10n.type, - actions: [shapeReset()], - child: shapeSelector(), + padChild: false, + child: AppPropertyRow( + trailing: shapeReset(), + children: [shapeSelector()], + ), ) else Row( @@ -620,22 +643,40 @@ class _MaskPropertiesState extends ConsumerState { unit: '%', inlineLabel: true, ), + additional: AppTheme.isDesktop(context) + ? AppPropertyRow( + trailing: key(context.l10n.rotation), + children: [ + field( + context.l10n.rotation, + mask.rotation, + -180, + 180, + (v) => mask.copyWith(rotation: v), + unit: '°', + wrapRotation: true, + ), + const SizedBox.shrink(), + ], + ) + : null, ), ]), - section([ - singleField( - context.l10n.rotation, - field( + if (!AppTheme.isDesktop(context)) + section([ + singleField( context.l10n.rotation, - mask.rotation, - -180, - 180, - (v) => mask.copyWith(rotation: v), - unit: '°', - wrapRotation: true, + field( + context.l10n.rotation, + mask.rotation, + -180, + 180, + (v) => mask.copyWith(rotation: v), + unit: '°', + wrapRotation: true, + ), ), - ), - ]), + ]), section([ heading(context.l10n.size), axes( diff --git a/lib/features/properties/picture_edits.dart b/lib/features/properties/picture_edits.dart index 4502d1e..9b0e5e2 100644 --- a/lib/features/properties/picture_edits.dart +++ b/lib/features/properties/picture_edits.dart @@ -100,7 +100,8 @@ class PictureEdits extends _$PictureEdits { value.y == current.y && value.scale == current.scale && value.scaleY == current.scaleY && - value.rotation == current.rotation) { + value.rotation == current.rotation && + value.sameCorners(current)) { return true; } session.commands.setTransform( diff --git a/lib/features/properties/picture_edits.g.dart b/lib/features/properties/picture_edits.g.dart index 7e9755f..3bdb68d 100644 --- a/lib/features/properties/picture_edits.g.dart +++ b/lib/features/properties/picture_edits.g.dart @@ -58,7 +58,7 @@ final class PictureEditsProvider } } -String _$pictureEditsHash() => r'6385f3bd53094d57ed054681d142591e059e8b08'; +String _$pictureEditsHash() => r'5a8ab10fcac9638fb0d98e214744f190fa499434'; final class PictureEditsFamily extends $Family with diff --git a/lib/features/properties/picture_properties.dart b/lib/features/properties/picture_properties.dart index 9287b4c..17c8aa4 100644 --- a/lib/features/properties/picture_properties.dart +++ b/lib/features/properties/picture_properties.dart @@ -22,6 +22,7 @@ import '../../shared/state/operation_scope.dart'; import '../preview/preview_panel.dart'; import 'property_number_input.dart'; import 'picture_edits.dart'; +import 'shadow_properties.dart'; class PictureProperties extends ConsumerStatefulWidget { const PictureProperties({ @@ -57,6 +58,7 @@ class _PicturePropertiesState extends ConsumerState { late final _operations = OperationScope(_operationContext); late final _seeks = OperationScope(_operationContext); bool _locked = true; + bool? _independentCorners; bool _hasFocusedControl = false; PictureEditsProvider get _editProvider => pictureEditsProvider(widget.session, widget.sequence, widget.clip.id); @@ -87,6 +89,7 @@ class _PicturePropertiesState extends ConsumerState { oldWidget.clip.id, ); if (previousIdentity != _editIdentity) { + _independentCorners = null; final edit = _clearScrub(); if (edit != null) scheduleMicrotask(edit.cancel); } @@ -204,7 +207,8 @@ class _PicturePropertiesState extends ConsumerState { value.y == _scrubBase!.y && value.rotation == _scrubBase!.rotation && value.scale == _scrubBase!.scale && - value.scaleY == _scrubBase!.scaleY)) { + value.scaleY == _scrubBase!.scaleY && + value.sameCorners(_scrubBase!))) { _cancelScrub(); return; } @@ -267,6 +271,12 @@ class _PicturePropertiesState extends ConsumerState { value.scale, value.scaleY, value.rotation, + value.cornerRadius, + value.topLeftRadius, + value.topRightRadius, + value.bottomRightRadius, + value.bottomLeftRadius, + _independentCorners, _scrubValid, _scrubBase != null, _saving, @@ -359,36 +369,46 @@ class _PicturePropertiesState extends ConsumerState { final desktop = AppTheme.isDesktop(context); final gap = AppTheme.propertyRowGap(context); - Widget axes(TransformChannel channel, Widget first, Widget second) => - LayoutBuilder( - builder: (context, constraints) { - final pair = constraints.maxWidth < (desktop ? 180 : 240) - ? Column( - children: [ - first, - SizedBox(height: gap), - second, - ], - ) - : Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded(child: first), - SizedBox(width: gap), - Expanded(child: second), - ], - ); - return desktop - ? pair - : Row( - children: [ - Expanded(child: pair), - SizedBox(width: gap), - keyButton(channel), - ], - ); - }, + Widget axes( + TransformChannel channel, + Widget first, + Widget second, { + Widget? trailing, + }) => LayoutBuilder( + builder: (context, constraints) { + if (desktop) { + return AppPropertyRow( + trailing: channel == TransformChannel.position + ? keyButton(channel) + : trailing, + children: [first, second], + ); + } + final pair = constraints.maxWidth < 240 + ? Column( + children: [ + first, + SizedBox(height: gap), + second, + ], + ) + : Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded(child: first), + SizedBox(width: gap), + Expanded(child: second), + ], + ); + return Row( + children: [ + Expanded(child: pair), + SizedBox(width: gap), + keyButton(channel), + ], ); + }, + ); Widget keyTools(TransformChannel channel) { if (animation == null || !animation.animated(channel)) { @@ -488,17 +508,23 @@ class _PicturePropertiesState extends ConsumerState { bool inlineLabel = false, String? prefix, IconData? prefixIcon, + int prefixQuarterTurns = 0, + String? valueText, }) => PropertyNumberInput( key: ValueKey(id), label: label, inlineLabel: inlineLabel, prefix: prefix, prefixIcon: prefixIcon, + prefixQuarterTurns: prefixQuarterTurns, + valueText: valueText, unit: unit, value: value, enabled: !_saving, readOnly: _scrubBase != null || preview?.transforms.hasPending == true, - submit: (v) => _commit(preview, (current) => change(current, v)), + submit: (v) => v < min || v > max + ? Future.value(false) + : _commit(preview, (current) => change(current, v)), onScrubStart: () => _startScrub( preview, id, @@ -520,8 +546,7 @@ class _PicturePropertiesState extends ConsumerState { widget.session.view(widget.sequence).playheadTick, ), ); - Widget section(List children) => Padding( - padding: AppTheme.propertySectionPadding(context), + Widget section(List children) => AppPropertySection( child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: children, @@ -555,7 +580,10 @@ class _PicturePropertiesState extends ConsumerState { prefixIcon: desktop ? AppIcons.angle : null, ); final rotation = desktop - ? rotationInput + ? AppPropertyRow( + trailing: keyButton(TransformChannel.rotation), + children: [rotationInput, const SizedBox.shrink()], + ) : Row( children: [ Expanded(child: rotationInput), @@ -563,7 +591,7 @@ class _PicturePropertiesState extends ConsumerState { keyButton(TransformChannel.rotation), ], ); - final scale = axes( + Widget scaleControls({Widget? trailing}) => axes( TransformChannel.scale, number( 'picture-scale-x', @@ -595,6 +623,7 @@ class _PicturePropertiesState extends ConsumerState { : 10000, inlineLabel: true, ), + trailing: trailing, ); final lock = IconButton( key: const Key('picture-lock'), @@ -610,11 +639,10 @@ class _PicturePropertiesState extends ConsumerState { } : null, ); + final scale = scaleControls(); final alignmentControls = LayoutBuilder( - builder: (context, constraints) => Wrap( - spacing: AppSpacing.small, - runSpacing: AppSpacing.small, - children: [ + builder: (context, constraints) { + final groups = [ for (final group in [ [ ( @@ -648,7 +676,9 @@ class _PicturePropertiesState extends ConsumerState { ], ]) SizedBox( - width: constraints.maxWidth < 200 + width: desktop + ? null + : constraints.maxWidth < 200 ? constraints.maxWidth : (constraints.maxWidth - AppSpacing.small) / 2, child: AppButtonGroup( @@ -675,9 +705,89 @@ class _PicturePropertiesState extends ConsumerState { ], ), ), - ], - ), + ]; + if (desktop) return AppPropertyRow(children: groups); + return Wrap( + spacing: AppSpacing.small, + runSpacing: AppSpacing.small, + children: groups, + ); + }, ); + final radiusInput = number( + 'picture-corner-radius', + context.l10n.cornerRadius, + value.topLeftRadius, + (c, v) => c.copyWith(cornerRadius: v), + min: 0, + max: 1000000, + inlineLabel: desktop, + prefix: desktop ? '' : null, + prefixIcon: desktop ? AppIcons.cornerRadius : null, + valueText: value.hasMixedCorners ? '—' : null, + ); + final independent = _independentCorners ?? value.hasMixedCorners; + final cornerToggle = IconButton( + key: const ValueKey('picture-independent-corners'), + tooltip: context.l10n.independentCorners, + icon: const Icon(AppIcons.independentCorners), + isSelected: independent, + onPressed: + enabled && + _scrubBase == null && + preview?.transforms.hasPending != true + ? () => setState(() => _independentCorners = !independent) + : null, + ); + final cornerInputs = [ + number( + 'picture-corner-top-left', + context.l10n.cornerTopLeft, + value.topLeftRadius, + (c, v) => c.copyWith(topLeftRadius: v), + min: 0, + max: 1000000, + inlineLabel: true, + prefix: '', + prefixIcon: Icons.rounded_corner, + prefixQuarterTurns: 3, + ), + number( + 'picture-corner-top-right', + context.l10n.cornerTopRight, + value.topRightRadius, + (c, v) => c.copyWith(topRightRadius: v), + min: 0, + max: 1000000, + inlineLabel: true, + prefix: '', + prefixIcon: Icons.rounded_corner, + ), + number( + 'picture-corner-bottom-left', + context.l10n.cornerBottomLeft, + value.bottomLeftRadius, + (c, v) => c.copyWith(bottomLeftRadius: v), + min: 0, + max: 1000000, + inlineLabel: true, + prefix: '', + prefixIcon: Icons.rounded_corner, + prefixQuarterTurns: 2, + ), + number( + 'picture-corner-bottom-right', + context.l10n.cornerBottomRight, + value.bottomRightRadius, + (c, v) => c.copyWith(bottomRightRadius: v), + min: 0, + max: 1000000, + inlineLabel: true, + prefix: '', + prefixIcon: Icons.rounded_corner, + prefixQuarterTurns: 1, + ), + ]; final content = Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ @@ -690,46 +800,43 @@ class _PicturePropertiesState extends ConsumerState { ), ]), ], - if (!widget.animationView) + if (!widget.animationView && !desktop) section([ - if (desktop) - AppPropertyGroup( - label: context.l10n.alignment, - child: alignmentControls, - ) - else ...[ - Text( - context.l10n.alignment, - style: AppTheme.propertySectionTitleStyle(context), - ), - SizedBox(height: gap), - alignmentControls, - ], + Text( + context.l10n.alignment, + style: AppTheme.propertySectionTitleStyle(context), + ), + SizedBox(height: gap), + alignmentControls, ]), if (desktop) ...[ section([ AppPropertyGroup( label: context.l10n.position, - actions: [keyButton(TransformChannel.position)], - child: position, + padChild: false, + child: Column( + children: [ + if (!widget.animationView) alignmentControls, + position, + keyTools(TransformChannel.position), + rotation, + keyTools(TransformChannel.rotation), + ], + ), ), - keyTools(TransformChannel.position), ]), section([ AppPropertyGroup( label: context.l10n.scale, - actions: [lock, keyButton(TransformChannel.scale)], - child: scale, + actions: [keyButton(TransformChannel.scale)], + padChild: false, + child: Column( + children: [ + scaleControls(trailing: lock), + keyTools(TransformChannel.scale), + ], + ), ), - keyTools(TransformChannel.scale), - ]), - section([ - AppPropertyGroup( - label: context.l10n.rotation, - actions: [keyButton(TransformChannel.rotation)], - child: rotation, - ), - keyTools(TransformChannel.rotation), ]), ] else ...[ section([ @@ -759,6 +866,68 @@ class _PicturePropertiesState extends ConsumerState { keyTools(TransformChannel.scale), ]), ], + section([ + if (desktop) + AppPropertyGroup( + label: context.l10n.cornerRadius, + padChild: false, + child: Column( + children: [ + AppPropertyRow( + trailing: keyButton(TransformChannel.cornerRadius), + children: [ + radiusInput, + Align( + alignment: Alignment.centerRight, + child: cornerToggle, + ), + ], + ), + if (independent) ...[ + AppPropertyRow(children: cornerInputs.sublist(0, 2)), + AppPropertyRow(children: cornerInputs.sublist(2, 4)), + ], + keyTools(TransformChannel.cornerRadius), + ], + ), + ) + else ...[ + Row( + children: [ + Expanded(child: radiusInput), + SizedBox(width: gap), + cornerToggle, + keyButton(TransformChannel.cornerRadius), + ], + ), + if (independent) ...[ + SizedBox(height: gap), + Row( + children: [ + Expanded(child: cornerInputs[0]), + SizedBox(width: gap), + Expanded(child: cornerInputs[1]), + ], + ), + SizedBox(height: gap), + Row( + children: [ + Expanded(child: cornerInputs[2]), + SizedBox(width: gap), + Expanded(child: cornerInputs[3]), + ], + ), + ], + keyTools(TransformChannel.cornerRadius), + ], + ]), + ShadowProperties( + projectId: widget.projectId, + timelineId: widget.timelineId, + session: widget.session, + sequence: widget.sequence, + clip: widget.clip.id, + ), if (_error != null) section([ Text( @@ -824,7 +993,22 @@ class _KeyframeTimeline extends StatelessWidget { ], ), const SizedBox(height: AppSpacing.small), - for (final channel in TransformChannel.values) + for (final (id, label, times) in [ + for (final channel in TransformChannel.values) + (channel.name, channel.label(context), animation.keyTimes(channel)), + if (ClipShadowStack( + animation.record, + animation.localTick, + ).layers.isNotEmpty) + ( + 'shadow', + context.l10n.shadow, + ClipShadowStack( + animation.record, + animation.localTick, + ).keyOffsets.map((t) => animation.start + t).toList(), + ), + ]) SizedBox( height: 32, child: Row( @@ -832,7 +1016,7 @@ class _KeyframeTimeline extends StatelessWidget { SizedBox( width: 36, child: Text( - channel.label(context), + label, style: Theme.of(context).textTheme.bodySmall, ), ), @@ -851,7 +1035,7 @@ class _KeyframeTimeline extends StatelessWidget { ) * extent; return GestureDetector( - key: ValueKey('picture-key-track-${channel.name}'), + key: ValueKey('picture-key-track-$id'), behavior: HitTestBehavior.opaque, onTapDown: !enabled ? null @@ -883,18 +1067,16 @@ class _KeyframeTimeline extends StatelessWidget { width: 1, child: ColoredBox(color: colors.primary), ), - for (final tick in animation.keyTimes(channel)) + for (final tick in times) Positioned( left: x(tick) - AppControlSize.compact / 2, top: 4, width: AppControlSize.compact, height: AppControlSize.compact, child: IconButton( - key: ValueKey( - 'picture-key-marker-${channel.name}-$tick', - ), + key: ValueKey('picture-key-marker-$id-$tick'), tooltip: - '${channel.label(context)} ${((tick - animation.start) / TimelineClock.ticksPerSecond).toStringAsFixed(2)} s', + '$label ${((tick - animation.start) / TimelineClock.ticksPerSecond).toStringAsFixed(2)} s', padding: EdgeInsets.zero, onPressed: enabled ? () => onSeek(tick) diff --git a/lib/features/properties/project_properties.dart b/lib/features/properties/project_properties.dart index a648400..f070304 100644 --- a/lib/features/properties/project_properties.dart +++ b/lib/features/properties/project_properties.dart @@ -39,7 +39,9 @@ class ProjectProperties extends StatelessWidget { height: AppTheme.isDesktop(context) ? AppInspectorMetrics.input : null, child: TextButton( key: const ValueKey('project-settings-edit'), - style: AppTheme.isDesktop(context) + style: + AppTheme.isDesktop(context) && + !AppTheme.isCompactInspector(context) ? AppTheme.toolbarButtonStyle(context) : null, onPressed: () => showAppDialog( @@ -50,14 +52,17 @@ class ProjectProperties extends StatelessWidget { ), ), headerHeight: AppTheme.isDesktop(context) - ? AppDesktopMetrics.panelHeader + ? AppInspectorMetrics.sectionHeader : AppControlSize.panelToolbar, - headerPadding: EdgeInsets.symmetric( - horizontal: AppTheme.isDesktop(context) - ? AppInspectorMetrics.padding - : AppSpacing.panelContentHorizontal, - ), - showHeaderDivider: false, + headerPadding: AppTheme.isDesktop(context) + ? const EdgeInsets.only( + left: AppInspectorMetrics.padding, + right: AppInspectorMetrics.trailingPadding, + ) + : const EdgeInsets.symmetric( + horizontal: AppSpacing.panelContentHorizontal, + ), + showHeaderDivider: AppTheme.isCompactInspector(context), child: ScrollEdgeFadeBuilder( builder: (controller) => SingleChildScrollView( controller: controller, @@ -133,8 +138,7 @@ class _Info extends StatelessWidget { style: Theme.of(context).textTheme.bodyMedium, ), ); - return Padding( - padding: AppTheme.propertySectionPadding(context), + return AppPropertySection( child: Row( crossAxisAlignment: CrossAxisAlignment.start, spacing: AppSpacing.small, diff --git a/lib/features/properties/project_property_row.dart b/lib/features/properties/project_property_row.dart index 16bec49..0b406bc 100644 --- a/lib/features/properties/project_property_row.dart +++ b/lib/features/properties/project_property_row.dart @@ -14,9 +14,11 @@ class ProjectPropertyRow extends StatelessWidget { @override Widget build(BuildContext context) => Padding( - padding: const EdgeInsets.symmetric( - horizontal: AppInspectorMetrics.padding, - vertical: AppInspectorMetrics.rowGap, + padding: const EdgeInsets.fromLTRB( + AppInspectorMetrics.padding, + AppInspectorMetrics.rowPadding, + AppInspectorMetrics.trailingPadding, + AppInspectorMetrics.rowPadding, ), child: ConstrainedBox( constraints: const BoxConstraints(minHeight: AppInspectorMetrics.input), @@ -35,13 +37,11 @@ class ProjectPropertyRow extends StatelessWidget { label, maxLines: 3, overflow: TextOverflow.ellipsis, - style: AppTheme.toolbarTextStyle(context).copyWith( - color: Theme.of(context).colorScheme.onSurfaceVariant, - ), + style: AppTheme.propertyLabelStyle(context), ), ), ), - const SizedBox(width: AppInspectorMetrics.rowGap * 2), + const SizedBox(width: AppInspectorMetrics.rowGap), Expanded( flex: 3, child: Tooltip( @@ -51,7 +51,7 @@ class ProjectPropertyRow extends StatelessWidget { maxLines: 3, overflow: TextOverflow.ellipsis, textAlign: TextAlign.right, - style: AppTheme.toolbarTextStyle(context), + style: AppTheme.inputTextStyle(context), ), ), ), diff --git a/lib/features/properties/project_property_row_previews.dart b/lib/features/properties/project_property_row_previews.dart index ae76368..7531622 100644 --- a/lib/features/properties/project_property_row_previews.dart +++ b/lib/features/properties/project_property_row_previews.dart @@ -20,8 +20,10 @@ Widget lightProjectSummaryPreview() => _preview(Brightness.light); Widget _preview(Brightness brightness) => MaterialApp( debugShowCheckedModeBanner: false, - theme: AppTheme.desktopWorkspaceTheme( - AppTheme.forPalette(AppPalette.graphite, brightness), + theme: AppTheme.propertiesPanelTheme( + AppTheme.desktopWorkspaceTheme( + AppTheme.forPalette(AppPalette.graphite, brightness), + ), ), home: const Scaffold( body: SingleChildScrollView( diff --git a/lib/features/properties/properties_panel.dart b/lib/features/properties/properties_panel.dart index 9bbbec4..4e6188e 100644 --- a/lib/features/properties/properties_panel.dart +++ b/lib/features/properties/properties_panel.dart @@ -20,7 +20,7 @@ class EditorPropertiesPanel extends StatelessWidget { projectId: projectId, timelineId: timelineId, categoryHeaderHeight: AppTheme.isDesktop(context) - ? AppDesktopMetrics.panelHeader + ? AppInspectorMetrics.sectionHeader : CompactPanelTabs.height, categoryControls: (context, categories, selected, onSelected) => CompactPanelTabs( diff --git a/lib/features/properties/property_number_input.dart b/lib/features/properties/property_number_input.dart index 8154290..4055f25 100644 --- a/lib/features/properties/property_number_input.dart +++ b/lib/features/properties/property_number_input.dart @@ -19,6 +19,8 @@ class PropertyNumberInput extends StatefulWidget { this.inlineLabel = false, this.prefix, this.prefixIcon, + this.prefixQuarterTurns = 0, + this.valueText, this.labelActions = const [], this.decimalPlaces = 2, this.onScrubStart, @@ -33,6 +35,8 @@ class PropertyNumberInput extends StatefulWidget { final bool inlineLabel; final String? prefix; final IconData? prefixIcon; + final int prefixQuarterTurns; + final String? valueText; final List labelActions; final int decimalPlaces; final bool Function()? onScrubStart; @@ -50,11 +54,12 @@ class PropertyNumberInput extends StatefulWidget { } class _PropertyNumberInputState extends State { - late final _text = TextEditingController(text: _format(widget.value)); + late final _text = TextEditingController(text: _displayValue); final _focus = FocusNode(); bool _dirty = false; late final _operations = OperationScope(widget.editContext); String? _error; + String get _displayValue => widget.valueText ?? _format(widget.value); String _format(double value) { var text = value.toStringAsFixed(widget.decimalPlaces); if (text.contains('.')) text = text.replaceFirst(RegExp(r'\.?0+$'), ''); @@ -84,7 +89,7 @@ class _PropertyNumberInputState extends State { if (!mounted || !isCurrent()) return; setState(() { _error = accepted ? null : context.l10n.notApplied; - _text.text = _format(widget.value); + _text.text = _displayValue; }); } @@ -98,7 +103,7 @@ class _PropertyNumberInputState extends State { _dirty = false; _error = null; } - final text = _format(widget.value); + final text = _displayValue; // A no-op assignment still resets selection and asks EditableText to // reveal its caret, competing with the user's scroll on preview updates. if (!_dirty && _text.text != text) _text.text = text; @@ -115,8 +120,8 @@ class _PropertyNumberInputState extends State { @override Widget build(BuildContext context) { - final labelAbove = - AppTheme.isCompactInspector(context) && !widget.inlineLabel; + final compact = AppTheme.isCompactInspector(context); + final labelAbove = compact && !widget.inlineLabel; final label = widget.onScrubStart == null ? Text(widget.label ?? '', style: AppTheme.propertyLabelStyle(context)) : AppScrubLabel( @@ -126,7 +131,7 @@ class _PropertyNumberInputState extends State { ? AppTheme.propertySectionTitleStyle(context) : null, alignment: labelAbove ? Alignment.centerLeft : Alignment.center, - padding: labelAbove + padding: labelAbove || compact ? EdgeInsets.zero : const EdgeInsets.symmetric(horizontal: AppSpacing.small), enabled: widget.enabled && (!widget.readOnly || widget.scrubbing), @@ -134,7 +139,7 @@ class _PropertyNumberInputState extends State { _operations.invalidate(); _dirty = false; _error = null; - _text.text = _format(widget.value); + _text.text = _displayValue; return widget.onScrubStart!(); }, onUpdate: widget.onScrubUpdate, @@ -154,7 +159,17 @@ class _PropertyNumberInputState extends State { label: widget.label, labelAbove: labelAbove, labelActions: widget.labelActions, - leading: widget.onScrubStart == null ? null : label, + leading: widget.onScrubStart == null + ? null + : compact && !labelAbove + ? SizedBox( + width: AppInspectorMetrics.action, + child: RotatedBox( + quarterTurns: widget.prefixQuarterTurns, + child: label, + ), + ) + : label, unit: widget.unit, errorText: _error, onChanged: (_) { @@ -173,7 +188,7 @@ class _PropertyNumberInputState extends State { _operations.invalidate(); _dirty = false; _error = null; - _text.text = _format(widget.value); + _text.text = _displayValue; }); _focus.unfocus(); return KeyEventResult.handled; diff --git a/lib/features/properties/shadow_properties.dart b/lib/features/properties/shadow_properties.dart new file mode 100644 index 0000000..eae4ae7 --- /dev/null +++ b/lib/features/properties/shadow_properties.dart @@ -0,0 +1,1070 @@ +import 'dart:math' as math; + +import 'package:cutdex/l10n/l10n.dart'; +import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_sdk/preview.dart'; +import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_ui/icons.dart'; +import 'package:cutdex_ui/theme.dart'; +import 'package:cutdex_ui/widgets.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +import '../../workspace/timeline_session.dart'; +import '../../shared/state/operation_scope.dart'; +import '../preview/preview_panel.dart'; +import 'property_number_input.dart'; + +class ShadowProperties extends ConsumerStatefulWidget { + const ShadowProperties({ + super.key, + required this.projectId, + required this.timelineId, + required this.session, + required this.sequence, + required this.clip, + }); + final String projectId, timelineId; + final EditorTimelineSession session; + final SequenceId sequence; + final ElementId clip; + @override + ConsumerState createState() => _ShadowPropertiesState(); +} + +class _ShadowPropertiesState extends ConsumerState { + Object get _identity => ( + widget.session, + widget.sequence, + widget.clip, + widget.projectId, + widget.timelineId, + ); + late final _operations = OperationScope(_identity); + bool _saving = false; + String? _error; + @override + void didUpdateWidget(covariant ShadowProperties oldWidget) { + super.didUpdateWidget(oldWidget); + _operations.bind(_identity); + if (oldWidget.session != widget.session || + oldWidget.sequence != widget.sequence || + oldWidget.clip != widget.clip) { + _saving = false; + _error = null; + } + } + + @override + void dispose() { + _operations.dispose(); + super.dispose(); + } + + ({ClipShadowStack stack, int start})? _current() { + final view = widget.session.view(widget.sequence); + final query = view.version.kernelVersion.query(); + final handle = query.elementById(widget.clip); + if (handle == null) return null; + final start = query.absoluteStart(handle); + return ( + stack: ClipShadowStack(query.element(handle), view.playheadTick - start), + start: start, + ); + } + + Future _edit( + PreviewController? preview, + void Function(EditorCommandService commands, int tick) action, { + bool seek = false, + }) async { + if (_saving || + preview?.transforms.hasPending == true || + widget.session.activeSequenceId != widget.sequence) { + return false; + } + final guard = _operations.begin(); + final session = widget.session; + final sequence = widget.sequence; + final view = session.view(sequence); + final version = view.version.kernelVersion; + final tick = view.playheadTick; + setState(() { + _saving = true; + _error = null; + }); + try { + await preview?.pauseForCanvasInteraction(); + if (!mounted || + !guard() || + view.playheadTick != tick || + !identical(view.version.kernelVersion, version) || + session.activeSequenceId != sequence) { + return false; + } + if (seek) { + action(session.commands, tick); + } else { + session.runEdit( + 'editShadow', + sequence, + () => action(session.commands, tick), + context: { + 'clipIds': [widget.clip.value], + 'entryPoint': 'property', + 'playheadTick': tick, + }, + ); + } + return true; + } catch (_) { + if (mounted && guard()) { + setState(() => _error = context.l10n.updateShadowFailed); + } + return false; + } finally { + if (mounted && guard()) setState(() => _saving = false); + } + } + + @override + Widget build(BuildContext context) { + final preview = ref + .watch(editorPreviewProvider(widget.projectId, widget.timelineId)) + .asData + ?.value; + return ListenableBuilder( + listenable: widget.session.view(widget.sequence), + builder: (context, _) { + final current = _current(); + if (current == null) return const SizedBox.shrink(); + final stack = current.stack; + final layers = stack.layers; + final enabled = + !_saving && + stack.containsPlayhead && + preview?.transforms.hasPending != true; + Future edit(void Function(EditorCommandService, int) action) => + _edit(preview, action); + Future keys({ + KeyframeAction? action, + ParameterInterpolation? interpolation, + }) => edit( + (c, t) => c.editKeyframeChannel( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + parameterIds: stack.parameterIds, + action: action, + interpolation: interpolation, + ), + ); + Widget key = IconButton( + key: const ValueKey('shadow-key'), + tooltip: context.l10n.toggleKeyframe( + stack.keyed ? context.l10n.delete : context.l10n.addKeyframeAction, + context.l10n.shadow, + ), + isSelected: stack.keyed, + color: stack.animated ? Theme.of(context).colorScheme.primary : null, + icon: Transform.rotate( + angle: math.pi / 4, + child: Icon( + stack.keyed ? AppIcons.squareFilled : AppIcons.square, + size: 12, + ), + ), + onPressed: enabled && layers.isNotEmpty ? keys : null, + ); + Widget number( + ClipShadowLayer layer, + String field, + String? label, + double value, + ClipShadow Function(ClipShadow, double) change, { + double factor = 1, + String? unit, + bool inlineLabel = true, + }) { + final (minimum, maximum) = ClipShadow.range(field); + return PropertyNumberInput( + key: ValueKey('shadow-${layer.id}-$field'), + label: label, + inlineLabel: inlineLabel, + unit: unit, + value: value * factor, + enabled: enabled && layer.enabled, + readOnly: false, + scrubbing: false, + editContext: (_identity, layer.id), + onScrubUpdate: (_) {}, + onScrubEnd: () {}, + onScrubCancel: () {}, + submit: (v) => + !v.isFinite || v / factor < minimum || v / factor > maximum + ? Future.value(false) + : edit((c, t) { + final live = _current()!.stack.layers.firstWhere( + (l) => l.id == layer.id, + ); + c.setShadow( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + shadowId: layer.id, + value: change(live.shadow, v / factor), + ); + }), + ); + } + + final times = stack.keyOffsets.map((t) => t + current.start).toList(); + final tick = widget.session.view(widget.sequence).playheadTick; + final previous = times.where((t) => t < tick).lastOrNull; + final next = times.where((t) => t > tick).firstOrNull; + Widget seekButton(int? target, bool forward) => IconButton( + key: ValueKey('shadow-key-${forward ? 'next' : 'previous'}'), + tooltip: forward + ? context.l10n.nextKeyframe(context.l10n.shadow) + : context.l10n.previousKeyframe(context.l10n.shadow), + icon: Icon( + forward ? AppIcons.chevronRight : AppIcons.chevronLeft, + size: 16, + ), + onPressed: enabled && target != null + ? () => _edit( + preview, + (_, _) => widget.session.view(widget.sequence).seekTo(target), + seek: true, + ) + : null, + ); + return AppPropertySection( + bottomSpacing: layers.isEmpty ? 0 : null, + child: AppPropertyGroup( + label: context.l10n.shadow, + labelWidget: layers.isEmpty + ? Text( + context.l10n.shadow, + style: AppTheme.propertyLabelStyle(context), + ) + : null, + padChild: false, + actions: [ + key, + IconButton( + key: const ValueKey('shadow-add'), + tooltip: context.l10n.addShadow, + icon: const Icon(AppIcons.add, size: 16), + onPressed: enabled && layers.length < ClipShadowStack.maxLayers + ? () => edit( + (c, t) => c.addShadow( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + shadowId: c.newShadowId(), + ), + ) + : null, + ), + ], + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + if (stack.animated) + Row( + children: [ + Text( + context.l10n.keyframeCount(times.length), + style: Theme.of(context).textTheme.bodySmall, + ), + const Spacer(), + seekButton(previous, false), + seekButton(next, true), + AppDropdownMenu( + enabled: enabled, + builder: (context, toggle, focus) => IconButton( + focusNode: focus, + tooltip: context.l10n.keyframeSettings( + context.l10n.shadow, + ), + onPressed: toggle, + icon: const Icon(AppIcons.more, size: 16), + ), + items: [ + for (final (mode, label) in [ + ( + ParameterInterpolation.linear, + context.l10n.linear, + ), + (ParameterInterpolation.hold, context.l10n.hold), + ( + ParameterInterpolation.easeIn, + context.l10n.easeIn, + ), + ( + ParameterInterpolation.easeOut, + context.l10n.easeOut, + ), + ( + ParameterInterpolation.easeInOut, + context.l10n.easeInOut, + ), + ]) + AppMenuItem( + label: label, + onPressed: stack.keyed + ? () => keys( + action: KeyframeAction.set, + interpolation: mode, + ) + : null, + ), + AppMenuItem( + label: context.l10n.removeAllKeyframes, + onPressed: () => keys(action: KeyframeAction.clear), + ), + ], + ), + ], + ), + ReorderableListView( + shrinkWrap: true, + primary: false, + padding: EdgeInsets.zero, + physics: const NeverScrollableScrollPhysics(), + buildDefaultDragHandles: false, + onReorderItem: (oldIndex, newIndex) { + if (!enabled) return; + final ids = layers.map((l) => l.id).toList(); + ids.insert(newIndex, ids.removeAt(oldIndex)); + edit( + (c, t) => c.configureShadows( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + order: ids, + ), + ); + }, + proxyDecorator: (child, index, animation) => Material( + color: Theme.of(context).colorScheme.surfaceContainerLow, + child: child, + ), + children: [ + for (var i = 0; i < layers.length; i++) + Builder( + key: ValueKey((_identity, layers[i].id)), + builder: (context) { + final layer = layers[i]; + final s = layer.shadow; + final color = Color.from( + alpha: 1, + red: s.red, + green: s.green, + blue: s.blue, + ); + final hex = [s.red, s.green, s.blue] + .map( + (v) => (v * 255) + .round() + .toRadixString(16) + .padLeft(2, '0'), + ) + .join() + .toUpperCase(); + void reorder(int direction) { + final ids = layers.map((l) => l.id).toList(); + final other = i + direction; + final temp = ids[i]; + ids[i] = ids[other]; + ids[other] = temp; + edit( + (c, t) => c.configureShadows( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + order: ids, + ), + ); + } + + return _ShadowLayerRow( + key: ValueKey('shadow-layer-${layer.id}'), + id: layer.id, + index: i, + enabled: enabled, + visible: layer.enabled, + label: context.l10n.shadow, + tooltip: context.l10n.shadowLayer(i + 1), + onVisibility: () => edit( + (c, t) => c.configureShadows( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + shadowId: layer.id, + enabled: !layer.enabled, + ), + ), + onRemove: () => edit( + (c, t) => c.removeShadow( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + shadowId: layer.id, + ), + ), + menuItems: [ + AppMenuItem( + label: context.l10n.moveShadowUp, + onPressed: enabled && i > 0 + ? () => reorder(-1) + : null, + ), + AppMenuItem( + label: context.l10n.moveShadowDown, + onPressed: enabled && i < layers.length - 1 + ? () => reorder(1) + : null, + ), + ], + editor: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Text( + context.l10n.position, + style: AppTheme.propertyLabelStyle(context), + ), + AppPropertyRow( + reserveTrailing: false, + children: [ + number( + layer, + 'x', + 'X', + s.x, + (s, v) => s.copyWith(x: v), + ), + number( + layer, + 'y', + 'Y', + s.y, + (s, v) => s.copyWith(y: v), + ), + ], + ), + const SizedBox(height: 4), + AppPropertyRow( + reserveTrailing: false, + children: [ + number( + layer, + 'blur', + context.l10n.shadowBlur, + s.blur, + (s, v) => s.copyWith(blur: v), + inlineLabel: false, + ), + number( + layer, + 'spread', + context.l10n.shadowSpread, + s.spread, + (s, v) => s.copyWith(spread: v), + inlineLabel: false, + ), + ], + ), + const SizedBox( + height: AppInspectorMetrics.rowGap, + ), + Text( + context.l10n.color, + style: AppTheme.propertyLabelStyle(context), + ), + AppPropertyRow( + reserveTrailing: false, + flexes: const [2, 1], + children: [ + _ShadowColorInput( + key: ValueKey('shadow-${layer.id}-color'), + value: hex, + color: color, + enabled: enabled && layer.enabled, + editContext: (_identity, layer.id), + submit: (v) => edit((c, t) { + final live = _current()!.stack.layers + .firstWhere((l) => l.id == layer.id) + .shadow; + c.setShadow( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + shadowId: layer.id, + value: live.copyWith( + red: ((v >> 16) & 255) / 255, + green: ((v >> 8) & 255) / 255, + blue: (v & 255) / 255, + ), + ); + }), + ), + number( + layer, + 'opacity', + null, + s.opacity, + (s, v) => s.copyWith(opacity: v), + factor: 100, + unit: '%', + ), + ], + ), + ], + ), + ); + }, + ), + ], + ), + if (_error != null) + Text( + _error!, + style: TextStyle( + color: Theme.of(context).colorScheme.error, + ), + ), + ], + ), + ), + ); + }, + ); + } +} + +class _ShadowLayerRow extends StatefulWidget { + const _ShadowLayerRow({ + super.key, + required this.id, + required this.index, + required this.enabled, + required this.visible, + required this.label, + required this.tooltip, + required this.onVisibility, + required this.onRemove, + required this.menuItems, + required this.editor, + }); + final String id, label, tooltip; + final int index; + final bool enabled, visible; + final VoidCallback onVisibility, onRemove; + final List menuItems; + final Widget editor; + + @override + State<_ShadowLayerRow> createState() => _ShadowLayerRowState(); +} + +class _ShadowLayerRowState extends State<_ShadowLayerRow> { + final _menu = MenuController(); + final _focus = FocusNode(); + bool _hovered = false; + + @override + void dispose() { + _focus.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + final colors = theme.colorScheme; + return MenuAnchor( + controller: _menu, + childFocusNode: _focus, + clipBehavior: Clip.none, + // Place the editor beside the inspector, as in Figma's effects panel. + alignmentOffset: Offset( + -240 - 8 - AppTheme.propertySectionPadding(context).left, + 0, + ), + style: const MenuStyle( + alignment: AlignmentDirectional.topStart, + padding: WidgetStatePropertyAll(EdgeInsets.zero), + backgroundColor: WidgetStatePropertyAll(Colors.transparent), + surfaceTintColor: WidgetStatePropertyAll(Colors.transparent), + elevation: WidgetStatePropertyAll(0), + side: WidgetStatePropertyAll(BorderSide.none), + shape: WidgetStatePropertyAll( + RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(8)), + ), + ), + ), + onOpen: () => setState(() {}), + onClose: () => setState(() {}), + menuChildren: [ + SizedBox( + key: ValueKey('shadow-editor-${widget.id}'), + width: 240, + child: Material( + color: colors.surfaceContainerLow, + surfaceTintColor: Colors.transparent, + elevation: 8, + shadowColor: colors.shadow.withValues(alpha: .25), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + side: BorderSide(color: colors.outlineVariant), + ), + clipBehavior: Clip.antiAlias, + child: Focus( + autofocus: true, + onKeyEvent: (_, event) { + if (event is KeyDownEvent && + event.logicalKey == LogicalKeyboardKey.escape) { + _menu.close(); + return KeyEventResult.handled; + } + return KeyEventResult.ignored; + }, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox( + height: 40, + child: Padding( + padding: const EdgeInsets.only(left: 16, right: 8), + child: Row( + children: [ + Expanded( + child: Text( + widget.label, + style: AppTheme.propertySectionTitleStyle( + context, + ), + ), + ), + AppDropdownMenu( + builder: (context, toggle, focus) => IconButton( + focusNode: focus, + tooltip: widget.tooltip, + icon: const Icon(AppIcons.more, size: 16), + onPressed: toggle, + ), + items: widget.menuItems, + ), + IconButton( + key: ValueKey('shadow-editor-close-${widget.id}'), + tooltip: context.l10n.close, + icon: const Icon(AppIcons.close, size: 16), + onPressed: _menu.close, + ), + ], + ), + ), + ), + Divider(height: 1, color: theme.dividerColor), + Padding( + padding: const EdgeInsets.fromLTRB(16, 12, 16, 12), + child: widget.editor, + ), + ], + ), + ), + ), + ), + ], + builder: (context, controller, child) => MouseRegion( + onEnter: (_) => setState(() => _hovered = true), + onExit: (_) => setState(() => _hovered = false), + child: SizedBox( + height: AppInspectorMetrics.row, + child: Row( + children: [ + ReorderableDragStartListener( + key: ValueKey('shadow-drag-${widget.id}'), + index: widget.index, + enabled: widget.enabled, + child: MouseRegion( + cursor: widget.enabled + ? SystemMouseCursors.grab + : SystemMouseCursors.basic, + child: SizedBox( + width: 16, + child: Icon( + AppIcons.dragHandle, + size: 12, + color: _hovered + ? colors.onSurfaceVariant + : Colors.transparent, + ), + ), + ), + ), + Expanded( + child: TextButton( + key: ValueKey('shadow-settings-${widget.id}'), + focusNode: _focus, + style: TextButton.styleFrom( + padding: const EdgeInsets.symmetric(horizontal: 4), + minimumSize: const Size(0, 24), + maximumSize: const Size(double.infinity, 24), + backgroundColor: controller.isOpen + ? theme.inputDecorationTheme.fillColor + : null, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(5), + ), + foregroundColor: widget.visible + ? colors.onSurface + : colors.onSurfaceVariant, + textStyle: AppTheme.inputTextStyle(context), + ), + onPressed: () => controller.isOpen + ? controller.close() + : controller.open(), + child: Row( + children: [ + const Icon(PhosphorIconsRegular.sun, size: 16), + const SizedBox(width: 8), + Expanded( + child: Text( + widget.label, + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + ), + ], + ), + ), + ), + IconButton( + key: ValueKey('shadow-enabled-${widget.id}'), + tooltip: widget.visible + ? context.l10n.disable + : context.l10n.enable, + icon: Icon( + widget.visible + ? Icons.visibility_outlined + : Icons.visibility_off_outlined, + size: 16, + ), + onPressed: widget.enabled ? widget.onVisibility : null, + ), + IconButton( + key: ValueKey('shadow-remove-${widget.id}'), + tooltip: context.l10n.delete, + icon: const Icon(AppIcons.remove, size: 16), + onPressed: widget.enabled ? widget.onRemove : null, + ), + ], + ), + ), + ), + ); + } +} + +class _ShadowColorInput extends StatefulWidget { + const _ShadowColorInput({ + super.key, + required this.value, + required this.color, + required this.enabled, + required this.editContext, + required this.submit, + }); + final String value; + final Color color; + final bool enabled; + final Object editContext; + final Future Function(int) submit; + @override + State<_ShadowColorInput> createState() => _ShadowColorInputState(); +} + +class _ShadowColorInputState extends State<_ShadowColorInput> { + late final _text = TextEditingController(text: widget.value); + final _focus = FocusNode(); + bool _dirty = false; + String? _error; + late final _operations = OperationScope(widget.editContext); + @override + void initState() { + super.initState(); + _focus.addListener(_blur); + } + + void _blur() { + if (!_focus.hasFocus) _submit(); + } + + Future _submit() async { + if (!_dirty || !widget.enabled) return; + final value = _text.text.replaceFirst('#', ''); + if (!RegExp(r'^[A-Fa-f0-9]{6}$').hasMatch(value)) { + setState(() => _error = context.l10n.invalidNumber); + return; + } + _dirty = false; + final guard = _operations.begin(); + final ok = await widget.submit(int.parse(value, radix: 16)); + if (!mounted || !guard()) return; + setState(() { + _error = ok ? null : context.l10n.notApplied; + _text.text = widget.value; + }); + } + + @override + void didUpdateWidget(covariant _ShadowColorInput oldWidget) { + super.didUpdateWidget(oldWidget); + _operations.bind(widget.editContext); + if (oldWidget.editContext != widget.editContext || !widget.enabled) { + _dirty = false; + _error = null; + } + if (!_dirty && _text.text != widget.value) _text.text = widget.value; + } + + @override + void dispose() { + _operations.dispose(); + _focus.removeListener(_blur); + _focus.dispose(); + _text.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) => AppTextField( + controller: _text, + focusNode: _focus, + enabled: widget.enabled, + errorText: _error, + leading: AppPopover( + width: 240, + borderRadius: 8, + padding: const EdgeInsets.all(16), + backgroundColor: Theme.of(context).colorScheme.surfaceContainerLow, + builder: (context, toggle) => IconButton( + key: const ValueKey('shadow-color-swatch'), + tooltip: context.l10n.color, + onPressed: widget.enabled ? toggle : null, + padding: EdgeInsets.zero, + icon: Container( + width: 14, + height: 14, + decoration: BoxDecoration( + color: widget.color, + borderRadius: BorderRadius.circular(2), + border: Border.all( + color: Theme.of(context).colorScheme.outlineVariant, + ), + ), + ), + ), + child: _ShadowColorPicker( + color: widget.color, + enabled: widget.enabled, + submit: (color) => widget.submit(color.toARGB32() & 0xFFFFFF), + ), + ), + onChanged: (_) { + _operations.invalidate(); + _dirty = true; + if (_error != null) setState(() => _error = null); + }, + onEditingComplete: () {}, + onSubmitted: (_) => _submit(), + ); +} + +class _ShadowColorPicker extends StatefulWidget { + const _ShadowColorPicker({ + required this.color, + required this.enabled, + required this.submit, + }); + final Color color; + final bool enabled; + final Future Function(Color) submit; + + @override + State<_ShadowColorPicker> createState() => _ShadowColorPickerState(); +} + +class _ShadowColorPickerState extends State<_ShadowColorPicker> { + late HSVColor _color = HSVColor.fromColor(widget.color); + + @override + void didUpdateWidget(covariant _ShadowColorPicker oldWidget) { + super.didUpdateWidget(oldWidget); + if (widget.color != oldWidget.color) { + _color = HSVColor.fromColor(widget.color); + } + } + + Future _commit() async { + if (!widget.enabled) return; + await widget.submit(_color.toColor()); + if (mounted) setState(() => _color = HSVColor.fromColor(widget.color)); + } + + @override + Widget build(BuildContext context) => Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Text( + context.l10n.color, + style: AppTheme.propertySectionTitleStyle(context), + ), + const SizedBox(height: 12), + SizedBox( + height: 140, + child: LayoutBuilder( + builder: (context, constraints) { + final width = constraints.maxWidth; + const height = 140.0; + void update(Offset position) { + if (!widget.enabled) return; + setState( + () => _color = _color + .withSaturation((position.dx / width).clamp(0, 1)) + .withValue((1 - position.dy / height).clamp(0, 1)), + ); + } + + return Semantics( + label: context.l10n.color, + child: GestureDetector( + key: const ValueKey('shadow-color-plane'), + onTapDown: (details) => update(details.localPosition), + onTapUp: (_) => _commit(), + onPanStart: (details) => update(details.localPosition), + onPanUpdate: (details) => update(details.localPosition), + onPanEnd: (_) => _commit(), + child: ClipRRect( + borderRadius: BorderRadius.circular(5), + child: SizedBox( + height: height, + child: Stack( + children: [ + Positioned.fill( + child: ColoredBox( + color: HSVColor.fromAHSV( + 1, + _color.hue, + 1, + 1, + ).toColor(), + ), + ), + const Positioned.fill( + child: DecoratedBox( + decoration: BoxDecoration( + gradient: LinearGradient( + colors: [Colors.white, Color(0x00FFFFFF)], + ), + ), + ), + ), + const Positioned.fill( + child: DecoratedBox( + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + colors: [Colors.transparent, Colors.black], + ), + ), + ), + ), + Positioned( + left: (_color.saturation * width - 6).clamp( + 0, + width - 12, + ), + top: ((1 - _color.value) * height - 6).clamp( + 0, + height - 12, + ), + child: Container( + width: 12, + height: 12, + decoration: BoxDecoration( + shape: BoxShape.circle, + border: Border.all(color: Colors.white, width: 2), + boxShadow: const [ + BoxShadow(color: Colors.black54, blurRadius: 2), + ], + ), + ), + ), + ], + ), + ), + ), + ), + ); + }, + ), + ), + const SizedBox(height: 8), + SizedBox( + height: 24, + child: Stack( + alignment: Alignment.center, + children: [ + Container( + height: 12, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6), + gradient: const LinearGradient( + colors: [ + Color(0xFFFF0000), + Color(0xFFFFFF00), + Color(0xFF00FF00), + Color(0xFF00FFFF), + Color(0xFF0000FF), + Color(0xFFFF00FF), + Color(0xFFFF0000), + ], + ), + ), + ), + SliderTheme( + data: SliderTheme.of(context).copyWith( + padding: EdgeInsets.zero, + trackHeight: 12, + activeTrackColor: Colors.transparent, + inactiveTrackColor: Colors.transparent, + thumbColor: Colors.white, + thumbShape: const RoundSliderThumbShape(enabledThumbRadius: 6), + overlayShape: SliderComponentShape.noOverlay, + ), + child: Slider( + key: const ValueKey('shadow-color-hue'), + min: 0, + max: 360, + value: _color.hue, + onChanged: widget.enabled + ? (hue) => setState(() => _color = _color.withHue(hue)) + : null, + onChangeEnd: (_) => _commit(), + ), + ), + ], + ), + ), + ], + ); +} diff --git a/lib/features/properties/speed_properties.dart b/lib/features/properties/speed_properties.dart index 8ca0484..a5a30c1 100644 --- a/lib/features/properties/speed_properties.dart +++ b/lib/features/properties/speed_properties.dart @@ -204,15 +204,14 @@ class _SpeedPropertiesState extends State { _version == null || identical(_version, view.version.kernelVersion) ? _timeline ?? saved ?? 1 : saved ?? 1; - return Padding( - padding: AppTheme.propertySectionPadding(context), + return AppPropertySection( child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ ConstrainedBox( constraints: BoxConstraints( minHeight: AppTheme.isDesktop(context) - ? AppInspectorMetrics.action + ? AppInspectorMetrics.sectionHeader : AppControlSize.propertyControl, ), child: Row( diff --git a/test/caption_edit_context_test.dart b/test/caption_edit_context_test.dart index 24df7c6..922d8e0 100644 --- a/test/caption_edit_context_test.dart +++ b/test/caption_edit_context_test.dart @@ -4,6 +4,7 @@ import 'package:cutdex/l10n/app_localizations.dart'; import 'package:cutdex/workspace/timeline_session.dart'; import 'package:cutdex_sdk/editor.dart'; import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_ui/theme.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -145,7 +146,7 @@ Widget _host( localizationsDelegates: AppLocalizations.localizationsDelegates, supportedLocales: AppLocalizations.supportedLocales, theme: desktop - ? EditorTheme.desktop(EditorTheme.penDark) + ? AppTheme.propertiesPanelTheme(EditorTheme.desktop(EditorTheme.penDark)) : EditorTheme.penDark, home: Scaffold( body: CaptionProperties(session: session, sequence: _sequence, clipId: id), diff --git a/test/compact_inspector_test.dart b/test/compact_inspector_test.dart index 42b132b..f537bb5 100644 --- a/test/compact_inspector_test.dart +++ b/test/compact_inspector_test.dart @@ -1,4 +1,7 @@ import 'package:cutdex/app/editor_theme.dart'; +import 'package:cutdex/features/editor/layouts/bounded_editor_layout.dart'; +import 'package:cutdex/features/editor/editor_presentation_controller.dart'; +import 'package:cutdex/integrations/platform/device_experience.dart'; import 'package:cutdex/features/preview/preview_panel.dart'; import 'package:cutdex/features/properties/picture_properties.dart'; import 'package:cutdex/features/properties/audio_properties.dart'; @@ -15,6 +18,50 @@ import 'package:flutter_test/flutter_test.dart'; import 'support/preview_fixture.dart'; void main() { + testWidgets( + 'floating desktop inspector keeps the UI3 width in narrow windows', + (tester) async { + for (final width in [200.0, 320.0, 800.0]) { + await tester.pumpWidget( + MaterialApp( + localizationsDelegates: AppLocalizations.localizationsDelegates, + supportedLocales: AppLocalizations.supportedLocales, + locale: const Locale('en'), + theme: EditorTheme.desktop(EditorTheme.penDark), + home: Scaffold( + body: Align( + alignment: Alignment.topRight, + child: SizedBox( + width: width, + height: 400, + child: BoundedEditorLayout( + experience: DeviceExperience.desktop, + editing: const SizedBox.expand(), + tool: EditorTool.properties, + media: const SizedBox.expand(), + properties: const SizedBox.expand(), + onCloseTool: () {}, + ), + ), + ), + ), + ), + ); + await tester.pumpAndSettle(); + expect( + tester.getSize(find.byKey(const Key('editor-tool-surface'))).width, + width < 240 ? width : 240, + ); + final title = tester.widget( + find.byWidgetPredicate((w) => w is Text && w.style?.fontSize == 13), + ); + expect(title.style!.fontSize, 13); + expect(title.style!.height, 22 / 13); + expect(tester.takeException(), isNull); + } + }, + ); + testWidgets( 'audio and speed controls fit desktop group headers at narrow widths', (tester) async { @@ -74,10 +121,10 @@ void main() { of: find.byKey(const Key('audio-db')), matching: find.byType(TextField), ); - expect(tester.getSize(field).height, 28); + expect(tester.getSize(field).height, 24); expect( - tester.getRect(find.byKey(const Key('audio-key'))).bottom, - tester.getRect(field).top - 4, + tester.getRect(find.byKey(const Key('audio-key'))).center.dy, + tester.getRect(field).center.dy, ); expect(find.byType(AppPropertyGroup), findsNWidgets(2)); expect(tester.takeException(), isNull); @@ -120,6 +167,7 @@ void main() { for (final brightness in Brightness.values) { for (final (width, locale) in [ (220.0, 'de'), + (240.0, 'en'), (280.0, 'zh'), (360.0, 'en'), ]) { @@ -157,13 +205,34 @@ void main() { ); await tester.pumpAndSettle(); for (final name in ['x', 'y', 'scale-x', 'scale-y', 'rotation']) { - expect(tester.getSize(input(name)).height, 28); + expect(tester.getSize(input(name)).height, 24); } - expect(tester.getRect(input('x')).left, 12); - expect(tester.getRect(input('x')).width, (width - 28) / 2); + expect(tester.getRect(input('x')).left, 16); + expect(tester.getRect(input('x')).width, (width - 64) / 2); + expect(tester.getRect(input('rotation')).width, (width - 64) / 2); + expect(find.byType(AppPropertyGroup), findsNWidgets(4)); + expect( + tester.getRect(input('corner-radius')).width, + (width - 64) / 2, + ); + expect( + tester.getSize(find.byType(AppPropertySection).first).height, + 148, + ); + final align = find.byKey(const ValueKey('picture-align-left')); + final verticalAlign = find.byKey(const ValueKey('picture-align-top')); + expect( + tester.getCenter(align).dy, + tester.getCenter(verticalAlign).dy, + ); for (final name in ['x', 'y', 'scale-x', 'scale-y', 'rotation']) { final field = tester.widget(input(name)); expect(field.decoration!.prefixIcon, isNotNull); + final handle = find.descendant( + of: find.byKey(ValueKey('picture-$name')), + matching: find.byType(AppScrubLabel), + ); + expect(tester.getSize(handle).width, 24); } expect( find.descendant( @@ -194,12 +263,20 @@ void main() { ? 'scale-x' : 'rotation', ); - expect( - tester.getRect(action).bottom, - tester.getRect(field).top - 4, - ); + if (channel == 'scale') { + expect( + tester.getRect(action).bottom, + tester.getRect(field).top - 12, + ); + } else { + expect(tester.getCenter(action).dy, tester.getCenter(field).dy); + } } - expect(right, width - 12); + expect( + tester.getCenter(find.byKey(const Key('picture-lock'))).dy, + tester.getCenter(input('scale-x')).dy, + ); + expect(right, width - 8); expect( tester.getRect(input('x')).left, tester.getRect(input('rotation')).left, @@ -215,8 +292,8 @@ void main() { ); expect( tester.getRect(input('rotation')).top - - tester.getRect(input('scale-x')).bottom, - 40, + tester.getRect(input('x')).bottom, + 8, ); } expect( diff --git a/test/picture_corner_radius_test.dart b/test/picture_corner_radius_test.dart new file mode 100644 index 0000000..7fbaf54 --- /dev/null +++ b/test/picture_corner_radius_test.dart @@ -0,0 +1,226 @@ +import 'package:cutdex/app/editor_theme.dart'; +import 'package:cutdex/features/preview/preview_panel.dart'; +import 'package:cutdex/features/properties/picture_properties.dart'; +import 'package:cutdex/l10n/app_localizations.dart'; +import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_ui/theme.dart'; +import 'package:cutdex_ui/widgets.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'support/preview_fixture.dart'; + +void main() { + testWidgets('corner radius edits, scrubs, animates and survives undo', ( + tester, + ) async { + final f = (await tester.runAsync( + () => createPreviewFixture( + Uri.file('/test/video.mov'), + clipDuration: RationalTime.seconds(5), + ), + ))!; + addTearDown( + () => tester.runAsync(() async { + await f.workspace.close(); + await f.directory.delete(recursive: true); + }), + ); + final sequence = SequenceId('one'); + final view = f.timeline.view(sequence); + final project = f.workspace.project!.info.id; + ClipAnimation current() { + final query = view.version.kernelVersion.query(); + return ClipAnimation.at( + query, + query.elementById(ElementId('clip'))!, + view.playheadTick, + TimelineClock.ticksPerSecond ~/ 30, + ); + } + + await tester.pumpWidget( + ProviderScope( + overrides: [ + editorPreviewProvider(project, 'project').overrideWith((ref) => null), + ], + child: MaterialApp( + localizationsDelegates: AppLocalizations.localizationsDelegates, + supportedLocales: AppLocalizations.supportedLocales, + locale: const Locale('zh'), + theme: AppTheme.propertiesPanelTheme( + EditorTheme.desktop(EditorTheme.penDark), + ), + home: Scaffold( + body: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 240, + child: SingleChildScrollView( + child: PictureProperties( + projectId: project, + timelineId: 'project', + session: f.timeline, + sequence: sequence, + clip: current().record, + ), + ), + ), + ), + ), + ), + ), + ); + await tester.pumpAndSettle(); + final input = find.descendant( + of: find.byKey(const ValueKey('picture-corner-radius')), + matching: find.byType(TextField), + ); + Future settle() async { + await tester.pump(); + await tester.runAsync(f.timeline.flush); + await tester.pumpAndSettle(); + expect(tester.takeException(), isNull); + } + + Future enter(String value) async { + await tester.ensureVisible(input); + await tester.enterText(input, value); + await tester.testTextInput.receiveAction(TextInputAction.done); + await settle(); + } + + expect(current().value.cornerRadius, 0); + await enter('48'); + expect(current().value.cornerRadius, 48); + expect(current().value.scale, 1); + expect(current().animated(TransformChannel.cornerRadius), isFalse); + view.undo(); + await settle(); + expect(current().value.cornerRadius, 0); + view.redo(); + await settle(); + expect(current().value.cornerRadius, 48); + await enter('-1'); + expect(current().value.cornerRadius, 48); + await enter('48'); + final label = find.descendant( + of: find.byKey(const ValueKey('picture-corner-radius')), + matching: find.byType(AppScrubLabel), + ); + await tester.drag(label, const Offset(20, 0)); + await settle(); + expect(current().value.cornerRadius, greaterThan(48)); + view.undo(); + await settle(); + expect(current().value.cornerRadius, 48); + final key = find.byKey(const ValueKey('picture-key-cornerRadius')); + await tester.ensureVisible(key); + await tester.tap(key); + await settle(); + expect(current().keyed(TransformChannel.cornerRadius), isTrue); + view.seekTo(2 * TimelineClock.ticksPerSecond); + await settle(); + await enter('96'); + expect(current().keyed(TransformChannel.cornerRadius), isTrue); + view.seekTo(TimelineClock.ticksPerSecond); + await settle(); + expect(current().value.cornerRadius, 72); + expect(tester.widget(input).controller!.text, '72'); + expect(current().record.parameters?['canvas.cornerRadius']?.length, 2); + final toggle = find.byKey(const ValueKey('picture-independent-corners')); + final beforeToggle = view.version.kernelVersion; + await tester.tap(toggle); + await settle(); + expect(identical(view.version.kernelVersion, beforeToggle), isTrue); + final topLeft = find.descendant( + of: find.byKey(const ValueKey('picture-corner-top-left')), + matching: find.byType(TextField), + ); + final topRight = find.descendant( + of: find.byKey(const ValueKey('picture-corner-top-right')), + matching: find.byType(TextField), + ); + expect(tester.getSize(topLeft), const Size(88, 24)); + expect(tester.getTopLeft(topRight).dx - tester.getTopRight(topLeft).dx, 8); + expect(tester.widget(topLeft).controller!.text, '72'); + await tester.enterText(topLeft, '120'); + await tester.testTextInput.receiveAction(TextInputAction.done); + await settle(); + expect(current().value.cornerRadii, [120, 72, 72, 72]); + expect(current().keyed(TransformChannel.cornerRadius), isTrue); + expect(tester.widget(input).controller!.text, '—'); + view.undo(); + await settle(); + expect(current().value.cornerRadii, [72, 72, 72, 72]); + view.redo(); + await settle(); + expect(current().value.cornerRadii, [120, 72, 72, 72]); + // Collapsing mixed corners is a presentation change, not a timeline edit. + await tester.tap(toggle); + await settle(); + expect(topLeft, findsNothing); + expect(tester.widget(input).controller!.text, '—'); + view.seekTo(TimelineClock.ticksPerSecond ~/ 2); + await settle(); + expect(current().value.cornerRadii, [84, 60, 60, 60]); + view.seekTo(TimelineClock.ticksPerSecond); + await settle(); + await enter('0'); + expect(current().value.cornerRadii, [0, 0, 0, 0]); + view.undo(); + await settle(); + final compiled = const ExecutionCompiler().compile( + ExecutionInput( + timeline: f.timeline.persistence.timeline(sequence), + renderSize: RenderSize(64, 64), + media: { + PayloadRef('source'): ExecutionMediaBinding( + media: MediaReference( + id: 'media', + uri: Uri.file('/test/video.mov'), + ), + videoTrackSelection: TrackSelection.index(0), + ), + }, + parameterTargets: ClipTransform.targets, + ), + ); + final curves = compiled.plan.visualLayers.single.automation; + expect( + curves.firstWhere((c) => c.target == 'cornerRadius.topLeft').keys.length, + 3, + ); + final saved = await tester.runAsync( + () => f.workspace.project!.loadTimeline('project'), + ); + expect( + saved!.sequences.first.elements.first.parameters.map( + (p) => p.definition.id, + ), + containsAll(ClipTransform.cornerIds), + ); + await tester.pumpWidget(const SizedBox()); + }); + + test('corner radius rejects nonfinite and negative values', () { + expect(const ClipTransform().cornerRadius, 0); + expect(const ClipTransform(cornerRadius: -1).isValid, isFalse); + expect(const ClipTransform(cornerRadius: double.nan).isValid, isFalse); + expect(const ClipTransform(bottomRightRadius: -1).isValid, isFalse); + expect( + const ClipTransform(topLeftRadius: double.infinity).isValid, + isFalse, + ); + final mixed = const ClipTransform(cornerRadius: 12, topLeftRadius: 30); + expect(mixed.copyWith(x: .2).cornerRadii, [30, 12, 12, 12]); + expect(mixed.copyWith(cornerRadius: 5).cornerRadii, [5, 5, 5, 5]); + expect( + const ClipTransform(cornerRadius: 40).copyWith(scale: 2).cornerRadius, + 40, + ); + }); +} diff --git a/test/picture_shadow_test.dart b/test/picture_shadow_test.dart new file mode 100644 index 0000000..51f2687 --- /dev/null +++ b/test/picture_shadow_test.dart @@ -0,0 +1,485 @@ +import 'package:cutdex/app/editor_theme.dart'; +import 'package:cutdex/features/preview/preview_panel.dart'; +import 'package:cutdex/features/properties/shadow_properties.dart'; +import 'package:cutdex/features/properties/picture_properties.dart'; +import 'package:cutdex/l10n/app_localizations.dart'; +import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_sdk/timeline/engine.dart'; +import 'package:cutdex_ui/theme.dart'; +import 'package:cutdex_ui/widgets.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'support/preview_fixture.dart'; + +void main() { + testWidgets( + 'one shadow key captures all layers and structural edits preserve curves', + (tester) async { + final f = (await tester.runAsync( + () => createPreviewFixture( + Uri.file('/test/video.mov'), + clipDuration: RationalTime.seconds(5), + ), + ))!; + addTearDown( + () => tester.runAsync(() async { + await f.workspace.close(); + await f.directory.delete(recursive: true); + }), + ); + final seq = SequenceId('one'); + final clip = ElementId('clip'); + final view = f.timeline.view(seq); + final project = f.workspace.project!.info.id; + ClipShadowStack current() { + final q = view.version.kernelVersion.query(); + final h = q.elementById(clip)!; + return ClipShadowStack( + q.element(h), + view.playheadTick - q.absoluteStart(h), + ); + } + + await tester.pumpWidget( + ProviderScope( + overrides: [ + editorPreviewProvider( + project, + 'project', + ).overrideWith((ref) => null), + ], + child: MaterialApp( + localizationsDelegates: AppLocalizations.localizationsDelegates, + supportedLocales: AppLocalizations.supportedLocales, + locale: const Locale('zh'), + theme: AppTheme.propertiesPanelTheme( + EditorTheme.desktop(EditorTheme.penDark), + ), + home: Scaffold( + body: Align( + alignment: Alignment.topRight, + child: SizedBox( + width: 240, + child: SingleChildScrollView( + child: ShadowProperties( + projectId: project, + timelineId: 'project', + session: f.timeline, + sequence: seq, + clip: clip, + ), + ), + ), + ), + ), + ), + ), + ); + Future settle() async { + await tester.pump(); + await tester.runAsync(f.timeline.flush); + await tester.pumpAndSettle(); + expect(tester.takeException(), isNull); + } + + Future closeEditor() async { + final close = find.byWidgetPredicate( + (w) => + w is IconButton && + w.key is ValueKey && + (w.key! as ValueKey).value.startsWith( + 'shadow-editor-close-', + ), + ); + if (close.evaluate().isNotEmpty) { + await tester.tap(close); + await settle(); + } + } + + Future tap(Key key) async { + await closeEditor(); + final w = find.byKey(key); + await tester.ensureVisible(w); + await tester.tap(w); + await settle(); + } + + Future enter(String id, String field, String value) async { + if (find.byKey(ValueKey('shadow-editor-$id')).evaluate().isEmpty) { + await closeEditor(); + await tester.tap(find.byKey(ValueKey('shadow-settings-$id'))); + await settle(); + } + final input = find.descendant( + of: find.byKey(ValueKey('shadow-$id-$field')), + matching: find.byType(TextField), + ); + await tester.ensureVisible(input); + await tester.enterText(input, value); + await tester.testTextInput.receiveAction(TextInputAction.done); + await settle(); + } + + await settle(); + expect(current().layers, isEmpty); + expect(tester.getSize(find.byType(AppPropertySection)).height, 40); + await tap(const ValueKey('shadow-add')); + final a = current().layers.single.id; + await tap(const ValueKey('shadow-add')); + final b = current().layers.last.id; + expect(find.byType(TextField), findsNothing); + expect( + tester.getSize(find.byKey(ValueKey('shadow-layer-$a'))).height, + 32, + ); + await enter(a, 'x', '12'); + expect( + tester.getSize(find.byKey(ValueKey('shadow-editor-$a'))).width, + 240, + ); + expect( + tester.getRect(find.byKey(ValueKey('shadow-editor-$a'))).right, + lessThan(tester.getRect(find.byKey(ValueKey('shadow-layer-$a'))).left), + ); + final xField = find.descendant( + of: find.byKey(ValueKey('shadow-$a-x')), + matching: find.byType(TextField), + ); + expect(tester.getSize(xField), const Size(100, 24)); + expect( + tester.getSize(find.byKey(ValueKey('shadow-editor-$a'))).height, + 225, + ); + final yField = find.descendant( + of: find.byKey(ValueKey('shadow-$a-y')), + matching: find.byType(TextField), + ); + expect(tester.getRect(yField).left - tester.getRect(xField).right, 8); + final blurInput = find.descendant( + of: find.byKey(ValueKey('shadow-$a-blur')), + matching: find.byType(TextField), + ); + final blurLabel = find.descendant( + of: find.byKey(ValueKey('shadow-$a-blur')), + matching: find.text('模糊'), + ); + final colorLabel = find.descendant( + of: find.byKey(ValueKey('shadow-editor-$a')), + matching: find.text('颜色'), + ); + expect(tester.getSize(blurLabel).height, 16); + expect( + tester.getRect(blurInput).top - tester.getRect(blurLabel).bottom, + 4, + ); + expect(tester.getRect(blurLabel).top - tester.getRect(xField).bottom, 12); + expect( + tester.getRect(colorLabel).top - tester.getRect(blurInput).bottom, + 12, + ); + expect(tester.widget(blurLabel).style!.fontSize, 11); + expect( + tester.widget(blurLabel).style!.color, + Colors.white.withValues(alpha: .7), + ); + expect(tester.widget(xField).style!.fontSize, 11); + await tester.sendKeyEvent(LogicalKeyboardKey.escape); + await settle(); + await tester.sendKeyEvent(LogicalKeyboardKey.escape); + await settle(); + expect(find.byKey(ValueKey('shadow-editor-$a')), findsNothing); + await enter(b, 'blur', '20'); + expect(current().animated, isFalse); + expect(current().layers[0].shadow.x, 12); + expect(current().layers[1].shadow.blur, 20); + await enter(a, 'color', 'FF8800'); + expect(current().layers.first.shadow.red, 1); + expect( + tester.getSize(find.byKey(ValueKey('shadow-$a-color'))).width, + closeTo( + 2 * tester.getSize(find.byKey(ValueKey('shadow-$a-opacity'))).width, + .01, + ), + ); + await tester.tap(find.byKey(const ValueKey('shadow-color-swatch'))); + await settle(); + final plane = tester.getRect( + find.byKey(const ValueKey('shadow-color-plane')), + ); + await tester.tapAt(plane.topCenter + const Offset(0, 2)); + await settle(); + expect(current().layers.first.shadow.blue, greaterThan(.45)); + expect(find.byKey(const ValueKey('shadow-color-plane')), findsOneWidget); + view.undo(); + await settle(); + expect(current().layers.first.shadow.green, closeTo(136 / 255, .001)); + await tester.sendKeyEvent(LogicalKeyboardKey.escape); + await settle(); + expect(find.byKey(const ValueKey('shadow-color-plane')), findsNothing); + await enter(a, 'blur', '-1'); + expect(current().layers.first.shadow.blur, 8); + await tap(const ValueKey('shadow-key')); + expect(current().keyed, isTrue); + expect(current().parameterIds.length, 16); + expect( + current().parameterIds.every( + (id) => current().record.parameters?[id]?.length == 1, + ), + isTrue, + ); + view.seekTo(2 * TimelineClock.ticksPerSecond); + await settle(); + await enter(a, 'x', '32'); + await enter(b, 'blur', '40'); + expect( + current().parameterIds.every( + (id) => current().record.parameters?[id]?.length == 2, + ), + isTrue, + ); + view.seekTo(TimelineClock.ticksPerSecond); + await settle(); + expect(current().layers[0].shadow.x, 22); + expect(current().layers[1].shadow.blur, 30); + final blurField = find.descendant( + of: find.byKey(ValueKey('shadow-$b-blur')), + matching: find.byType(TextField), + ); + expect(tester.widget(blurField).controller!.text, '30'); + view.seekTo(0); + f.timeline.commands.editKeyframeChannel( + sequence: seq, + clip: clip, + tick: 0, + parameterIds: current().parameterIds, + action: KeyframeAction.set, + interpolation: ParameterInterpolation.hold, + ); + view.seekTo(TimelineClock.ticksPerSecond); + await settle(); + expect(current().layers.first.shadow.x, 12); + expect(current().layers.last.shadow.blur, 20); + view.undo(); + await settle(); + expect(current().layers.first.shadow.x, 22); + f.timeline.commands.editKeyframeChannel( + sequence: seq, + clip: clip, + tick: view.playheadTick, + parameterIds: current().parameterIds, + action: KeyframeAction.clear, + ); + await settle(); + expect(current().animated, isFalse); + expect(current().layers.first.shadow.x, 22); + view.undo(); + await settle(); + expect(current().animated, isTrue); + final before = current() + .record + .parameters?[ShadowParameterTarget(a, 'x').parameterId]; + await closeEditor(); + final dragWidget = find.byKey(ValueKey('shadow-drag-$a')); + expect( + tester.widget(dragWidget).enabled, + isTrue, + ); + final drag = tester.getCenter(dragWidget); + final gesture = await tester.startGesture(drag); + await tester.pump(); + await gesture.moveBy(const Offset(0, 12)); + await tester.pump(); + await gesture.moveBy(const Offset(0, 80)); + await tester.pump(const Duration(milliseconds: 300)); + await gesture.up(); + await settle(); + expect(current().layers.map((l) => l.id), [b, a]); + expect( + current().record.parameters?[ShadowParameterTarget(a, 'x').parameterId], + same(before), + ); + await tap(ValueKey('shadow-enabled-$b')); + expect(current().layers.first.enabled, isFalse); + await tap(ValueKey('shadow-remove-$a')); + expect(current().layers.length, 1); + expect( + current().record.parameters?[ShadowParameterTarget(a, 'x').parameterId], + isNull, + ); + view.undo(); + await settle(); + expect(current().layers.length, 2); + expect(current().layers.last.shadow.x, 22); + await tap(const ValueKey('shadow-add')); + final c = current().layers.last.id; + expect( + current() + .record + .parameters?[ShadowParameterTarget(c, 'x').parameterId] + ?.length, + 2, + ); + await tap(const ValueKey('shadow-add')); + expect(current().layers.length, 4); + expect( + tester + .widget(find.byKey(const ValueKey('shadow-add'))) + .onPressed, + isNull, + ); + expect( + () => f.timeline.commands.addShadow( + sequence: seq, + clip: clip, + tick: view.playheadTick, + shadowId: 'fifth', + ), + throwsA(isA()), + ); + await tester.tap(find.byKey(ValueKey('shadow-settings-$a'))); + await settle(); + await tester.tapAt(const Offset(50, 500)); + await settle(); + expect(find.byKey(ValueKey('shadow-editor-$a')), findsNothing); + await tester.tap(find.byKey(ValueKey('shadow-settings-$a'))); + await settle(); + f.timeline.commands.removeShadow( + sequence: seq, + clip: clip, + tick: view.playheadTick, + shadowId: a, + ); + await settle(); + expect(find.byKey(ValueKey('shadow-editor-$a')), findsNothing); + view.undo(); + await settle(); + expect(current().layers.length, 4); + final compiled = const ExecutionCompiler().compile( + ExecutionInput( + timeline: f.timeline.persistence.timeline(seq), + renderSize: RenderSize(64, 64), + media: { + PayloadRef('source'): ExecutionMediaBinding( + media: MediaReference( + id: 'media', + uri: Uri.file('/test/video.mov'), + ), + videoTrackSelection: TrackSelection.index(0), + ), + }, + parameterTargets: ClipTransform.targets, + ), + ); + expect( + compiled.plan.visualLayers.single.automation.map((a) => a.target), + contains(ShadowParameterTarget(a, 'x').parameterId), + ); + expect( + compiled.plan.visualLayers.single.automation + .firstWhere( + (c) => c.target == ShadowParameterTarget(a, 'x').parameterId, + ) + .keys + .length, + 2, + ); + // Existing persistence serializes all curves and feeds execution bindings unchanged. + final saved = await tester.runAsync( + () => f.workspace.project!.loadTimeline('project'), + ); + expect( + saved!.sequences.first.elements.first.parameters.map( + (p) => p.definition.id, + ), + contains(ShadowParameterTarget(a, 'x').parameterId), + ); + await tester.pumpWidget( + ProviderScope( + overrides: [ + editorPreviewProvider( + project, + 'project', + ).overrideWith((ref) => null), + ], + child: MaterialApp( + localizationsDelegates: AppLocalizations.localizationsDelegates, + supportedLocales: AppLocalizations.supportedLocales, + locale: const Locale('zh'), + theme: AppTheme.propertiesPanelTheme( + EditorTheme.desktop(EditorTheme.penDark), + ), + home: Scaffold( + body: SizedBox( + width: 240, + child: SingleChildScrollView( + child: PictureProperties( + projectId: project, + timelineId: 'project', + session: f.timeline, + sequence: seq, + clip: current().record, + animationView: true, + ), + ), + ), + ), + ), + ), + ); + await settle(); + expect( + find.byKey(const ValueKey('picture-key-marker-shadow-0')), + findsOneWidget, + ); + expect( + find.byKey( + const ValueKey( + 'picture-key-marker-shadow-${2 * TimelineClock.ticksPerSecond}', + ), + ), + findsOneWidget, + ); + await tester.pumpWidget(const SizedBox()); + }, + ); + + test( + 'shadow validation and retimed group keys use the existing source clock', + () { + expect(const ClipShadow(blur: -1).isValid, isFalse); + expect(const ClipShadow(opacity: 2).isValid, isFalse); + expect(const ClipShadow(x: double.nan).isValid, isFalse); + expect(RenderShadowTarget.parse('shadow.a.color.r')?.field, 'color.r'); + expect(isRenderVisualTarget('shadow.a.blur'), isTrue); + expect(isRenderVisualTarget('shadow.a.invalid'), isFalse); + expect(ShadowParameterTarget.parse('shadow.中文.x'), isNull); + for (final delta in [8, -8]) { + final record = ElementRecord( + id: ElementId('clip'), + structure: ElementStructure.content, + duration: 4 * TimelineClock.ticksPerSecond, + sourceStart: 10 * TimelineClock.ticksPerSecond, + sourceDuration: 8 * TimelineClock.ticksPerSecond, + enabled: true, + retime: RetimeMapRecord([ + RetimeSegmentRecord( + projectDuration: 4 * TimelineClock.ticksPerSecond, + sourceStart: 10 * TimelineClock.ticksPerSecond, + sourceDelta: delta * TimelineClock.ticksPerSecond, + ), + ]), + ); + expect( + ClipShadowStack(record, TimelineClock.ticksPerSecond).sourceTick, + (10 + delta ~/ 4) * TimelineClock.ticksPerSecond, + ); + } + }, + ); +} diff --git a/test/project_properties_test.dart b/test/project_properties_test.dart index bcc243d..5351624 100644 --- a/test/project_properties_test.dart +++ b/test/project_properties_test.dart @@ -58,7 +58,7 @@ void main() { tester .getSize(find.byKey(const ValueKey('project-settings-edit'))) .height, - 28, + 24, ); final rows = find.byWidgetPredicate( (widget) => widget.runtimeType.toString() == '_Info', @@ -86,7 +86,7 @@ void main() { ); expect( tester.getRect(value).right, - panelRight - AppInspectorMetrics.padding, + panelRight - AppInspectorMetrics.trailingPadding, reason: '$locale at $width: ${tester.widget(value).data}', ); } @@ -144,8 +144,8 @@ void main() { of: find.byWidget(row.widget), matching: find.byType(Text), ); - expect(tester.getRect(texts.first).left, 12); - expect(tester.getRect(texts.last).right, width - 12); + expect(tester.getRect(texts.first).left, 16); + expect(tester.getRect(texts.last).right, width - 8); expect( tester.getTopLeft(texts.first).dy, closeTo(tester.getTopLeft(texts.last).dy, .01), diff --git a/test/property_number_input_test.dart b/test/property_number_input_test.dart index 6ff9415..af91a88 100644 --- a/test/property_number_input_test.dart +++ b/test/property_number_input_test.dart @@ -54,7 +54,7 @@ void main() { ), ); await tester.pumpAndSettle(); - expect(tester.getSize(find.byType(TextField)).height, 28); + expect(tester.getSize(find.byType(TextField)).height, 24); expect( tester .getRect( diff --git a/test/transcription_tools_test.dart b/test/transcription_tools_test.dart index c6af298..0d686be 100644 --- a/test/transcription_tools_test.dart +++ b/test/transcription_tools_test.dart @@ -2023,7 +2023,7 @@ void main() { matching: find.byType(ListView), ), ); - expect(row.left - list.left, desktop ? 12 : 14); + expect(row.left - list.left, desktop ? 16 : 14); expect(number.left - row.left, 0); expect(content.left - number.right, 6); expect(number.right, lessThan(content.left)); @@ -2045,7 +2045,7 @@ void main() { final wrapBounds = tester.getRect( find.byKey(const ValueKey('caption-wrap-toggle')), ); - expect(searchBounds.height, 28); + expect(searchBounds.height, desktop ? 24 : 28); expect(wrapBounds.height, desktop ? 24 : 28); expect(searchBounds.center.dy, wrapBounds.center.dy); await tester.enterText(search, ' searchable '); -- 2.54.0 From 789af7a68e40ddfcede778973de6ad0ad1312f31 Mon Sep 17 00:00:00 2001 From: lingjhf Date: Sat, 10 Oct 2026 16:55:27 +0800 Subject: [PATCH 07/14] feat(inspector): edit animated effects, strokes and corner distortion Replace the shadow-only inspector with layered effect and stroke controls and per-corner distortion editors. Share color inputs, layer rows, keyframe controls and property edit boundaries; keep nested selection menus within their property popover and update localized labels. Add property editing, preview interaction and benchmark comparison coverage. Validation: Dart analysis reports no issues and 160 targeted application tests pass. The macOS development app was rebuilt and visually checked during native rendering validation. Exclude local dependency override changes from the committed lockfile. --- lib/features/preview/preview_panel.dart | 2 + lib/features/properties/animation_labels.dart | 4 + .../distortion_parameter_editor.dart | 211 ++++ .../properties/distortion_properties.dart | 196 +++ lib/features/properties/effect_labels.dart | 15 + lib/features/properties/effect_list.dart | 132 ++ .../properties/effect_parameter_editor.dart | 245 ++++ .../properties/effect_properties.dart | 172 +++ lib/features/properties/picture_edits.dart | 82 +- .../properties/picture_edits.freezed.dart | 312 ----- lib/features/properties/picture_edits.g.dart | 2 +- .../properties/picture_properties.dart | 56 +- .../properties/property_color_input.dart | 152 +++ .../properties/property_color_picker.dart | 214 ++++ .../properties/property_edit_boundary.dart | 89 ++ .../properties/property_edit_controller.dart | 84 ++ .../property_keyframe_controls.dart | 105 ++ .../properties/property_layer_row.dart | 288 +++++ .../properties/shadow_properties.dart | 1070 ----------------- lib/features/properties/stroke_list.dart | 136 +++ .../properties/stroke_parameter_editor.dart | 226 ++++ .../properties/stroke_properties.dart | 162 +++ lib/l10n/app_de.arb | 64 +- lib/l10n/app_en.arb | 76 +- lib/l10n/app_es.arb | 62 +- lib/l10n/app_fr.arb | 64 +- lib/l10n/app_it.arb | 62 +- lib/l10n/app_ja.arb | 64 +- lib/l10n/app_ko.arb | 64 +- lib/l10n/app_localizations.dart | 354 ++++++ lib/l10n/app_localizations_de.dart | 177 +++ lib/l10n/app_localizations_en.dart | 177 +++ lib/l10n/app_localizations_es.dart | 177 +++ lib/l10n/app_localizations_fr.dart | 177 +++ lib/l10n/app_localizations_it.dart | 177 +++ lib/l10n/app_localizations_ja.dart | 177 +++ lib/l10n/app_localizations_ko.dart | 177 +++ lib/l10n/app_localizations_pt.dart | 177 +++ lib/l10n/app_localizations_ru.dart | 177 +++ lib/l10n/app_localizations_zh.dart | 531 ++++++++ lib/l10n/app_pt.arb | 62 +- lib/l10n/app_ru.arb | 64 +- lib/l10n/app_zh.arb | 64 +- lib/l10n/app_zh_Hans.arb | 64 +- lib/l10n/app_zh_Hant.arb | 64 +- .../cutdex_ui/lib/src/widgets/app_menu.dart | 17 +- test/compact_inspector_test.dart | 3 +- test/picture_distortion_test.dart | 123 ++ test/picture_edits_test.dart | 139 +++ test/picture_effect_test.dart | 199 +++ test/picture_shadow_test.dart | 485 -------- test/picture_stroke_test.dart | 156 +++ test/preview_controller_test.dart | 227 +++- test/preview_interaction_test.dart | 57 + test/preview_panel_test.dart | 15 + test/property_color_input_test.dart | 79 ++ test/property_edit_controller_test.dart | 88 ++ .../compare_property_performance.py | 88 ++ 58 files changed, 6911 insertions(+), 1972 deletions(-) create mode 100644 lib/features/properties/distortion_parameter_editor.dart create mode 100644 lib/features/properties/distortion_properties.dart create mode 100644 lib/features/properties/effect_labels.dart create mode 100644 lib/features/properties/effect_list.dart create mode 100644 lib/features/properties/effect_parameter_editor.dart create mode 100644 lib/features/properties/effect_properties.dart create mode 100644 lib/features/properties/property_color_input.dart create mode 100644 lib/features/properties/property_color_picker.dart create mode 100644 lib/features/properties/property_edit_boundary.dart create mode 100644 lib/features/properties/property_edit_controller.dart create mode 100644 lib/features/properties/property_keyframe_controls.dart create mode 100644 lib/features/properties/property_layer_row.dart delete mode 100644 lib/features/properties/shadow_properties.dart create mode 100644 lib/features/properties/stroke_list.dart create mode 100644 lib/features/properties/stroke_parameter_editor.dart create mode 100644 lib/features/properties/stroke_properties.dart create mode 100644 test/picture_distortion_test.dart create mode 100644 test/picture_edits_test.dart create mode 100644 test/picture_effect_test.dart delete mode 100644 test/picture_shadow_test.dart create mode 100644 test/picture_stroke_test.dart create mode 100644 test/property_color_input_test.dart create mode 100644 test/property_edit_controller_test.dart create mode 100644 tool/diagnostics/compare_property_performance.py diff --git a/lib/features/preview/preview_panel.dart b/lib/features/preview/preview_panel.dart index 0cbda5b..4b332f0 100644 --- a/lib/features/preview/preview_panel.dart +++ b/lib/features/preview/preview_panel.dart @@ -228,6 +228,8 @@ class _EditorPreviewContent extends ConsumerWidget { select: () => ( activeController.positionTick, activeController.selectedVisualIds.isNotEmpty, + activeController.distortionEditingElement, + activeController.distortionPerspective, activeController.maskEditingElement, activeController.obscureEditingElement, ), diff --git a/lib/features/properties/animation_labels.dart b/lib/features/properties/animation_labels.dart index ef3db38..77463c1 100644 --- a/lib/features/properties/animation_labels.dart +++ b/lib/features/properties/animation_labels.dart @@ -8,6 +8,10 @@ extension TransformChannelLabel on TransformChannel { TransformChannel.rotation => context.l10n.rotation, TransformChannel.scale => context.l10n.scale, TransformChannel.cornerRadius => context.l10n.cornerRadius, + TransformChannel.distortTopLeft => context.l10n.distortionTopLeft, + TransformChannel.distortTopRight => context.l10n.distortionTopRight, + TransformChannel.distortBottomRight => context.l10n.distortionBottomRight, + TransformChannel.distortBottomLeft => context.l10n.distortionBottomLeft, }; } diff --git a/lib/features/properties/distortion_parameter_editor.dart b/lib/features/properties/distortion_parameter_editor.dart new file mode 100644 index 0000000..289cede --- /dev/null +++ b/lib/features/properties/distortion_parameter_editor.dart @@ -0,0 +1,211 @@ +import 'package:cutdex/l10n/l10n.dart'; +import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_sdk/timeline/engine.dart'; +import 'package:cutdex_ui/icons.dart'; +import 'package:cutdex_ui/theme.dart'; +import 'package:cutdex_ui/widgets.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/widget_previews.dart'; + +import 'property_keyframe_controls.dart'; +import 'property_number_input.dart'; + +/// Presentation of four position channels; editing and native lifetime live in the host. +class DistortionParameterEditor extends StatelessWidget { + const DistortionParameterEditor({ + super.key, + required this.value, + required this.extent, + required this.enabled, + required this.editing, + required this.perspective, + required this.keyframes, + required this.editContext, + required this.onSubmit, + required this.onReset, + required this.onPerspective, + this.onToggle, + this.error, + }); + final ClipDistortion value; + final Size extent; + final bool enabled, editing, perspective; + final PropertyKeyframeControls keyframes; + final Object editContext; + final Future Function(int corner, int axis, double value) onSubmit; + final VoidCallback? onToggle; + final VoidCallback onReset; + final ValueChanged onPerspective; + final String? error; + @override + Widget build(BuildContext context) { + final keys = keyframes, l = context.l10n; + final labels = [ + l.distortionTopLeft, + l.distortionTopRight, + l.distortionBottomRight, + l.distortionBottomLeft, + ]; + return AppPropertySection( + child: AppPropertyGroup( + label: l.distortion, + padChild: false, + actions: [ + keys.button( + context, + ClipDistortion.ids, + l.distortion, + 'distortion-key', + ), + keys.menu(context, ClipDistortion.ids, l.distortion, 'distortion'), + ], + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + AppPropertyRow( + children: [ + TextButton( + key: const ValueKey('distortion-edit'), + onPressed: enabled ? onToggle : null, + child: Text(editing ? l.finishDistortion : l.editDistortion), + ), + IconButton( + key: const ValueKey('distortion-reset'), + tooltip: l.resetDistortion, + icon: const Icon(AppIcons.reset, size: 16), + onPressed: enabled ? onReset : null, + ), + ], + ), + AppPropertyRow( + children: [ + AppSelect( + value: perspective, + label: l.distortion, + emptyLabel: l.freeDistortion, + options: [ + AppSelectOption(false, l.freeDistortion), + AppSelectOption(true, l.perspectiveDistortion), + ], + onChanged: enabled ? onPerspective : null, + ), + ], + ), + for (var i = 0; i < 4; i++) ...[ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: Row( + children: [ + Expanded( + child: Text( + labels[i], + style: Theme.of(context).textTheme.labelSmall, + ), + ), + keys.menu( + context, + ClipDistortion.ids.sublist(i * 2, i * 2 + 2), + labels[i], + 'distortion-${ClipDistortion.names[i]}', + ), + ], + ), + ), + AppPropertyRow( + trailing: keys.button( + context, + ClipDistortion.ids.sublist(i * 2, i * 2 + 2), + labels[i], + 'distortion-${ClipDistortion.names[i]}-key', + ), + children: [ + for (var axis = 0; axis < 2; axis++) + PropertyNumberInput( + key: ValueKey( + 'distortion-${ClipDistortion.names[i]}-${axis == 0 ? 'x' : 'y'}', + ), + label: axis == 0 ? 'X' : 'Y', + inlineLabel: true, + prefix: axis == 0 ? 'X' : 'Y', + value: + value.values[i * 2 + axis] * + (axis == 0 ? extent.width : extent.height), + enabled: enabled, + readOnly: false, + editContext: editContext, + submit: (v) => onSubmit(i, axis, v), + onScrubUpdate: (_) {}, + onScrubEnd: () {}, + onScrubCancel: () {}, + scrubbing: false, + ), + ], + ), + ], + if (error != null) + Padding(padding: const EdgeInsets.all(16), child: Text(error!)), + ], + ), + ), + ); + } +} + +@Preview(name: 'Distortion / desktop', size: Size(240, 400)) +Widget distortionEditorPreview() { + var value = const ClipDistortion(topLeft: (.05, .1)); + var perspective = false, editing = false; + final stack = ClipParameterAnimation( + ElementRecord( + id: ElementId('preview'), + structure: ElementStructure.content, + duration: 1, + sourceStart: 0, + sourceDuration: 1, + enabled: true, + ), + 0, + ); + return MaterialApp( + localizationsDelegates: AppLocalizations.localizationsDelegates, + supportedLocales: AppLocalizations.supportedLocales, + theme: AppTheme.propertiesPanelTheme( + AppTheme.desktopWorkspaceTheme(AppTheme.penDark), + ), + home: Scaffold( + body: StatefulBuilder( + builder: (context, update) => SingleChildScrollView( + child: DistortionParameterEditor( + value: value, + extent: const Size(300, 200), + enabled: true, + editing: editing, + perspective: perspective, + editContext: 'preview', + keyframes: PropertyKeyframeControls( + stack: stack, + enabled: true, + onEdit: (ids, {action, interpolation}) async => true, + onSeek: (_) async => true, + ), + onSubmit: (corner, axis, input) async { + final p = value.corners[corner]; + final next = value.withCorner( + corner, + axis == 0 ? input / 300 : p.$1, + axis == 1 ? input / 200 : p.$2, + ); + if (!next.isValid) return false; + update(() => value = next); + return true; + }, + onReset: () => update(() => value = const ClipDistortion()), + onToggle: () => update(() => editing = !editing), + onPerspective: (v) => update(() => perspective = v), + ), + ), + ), + ), + ); +} diff --git a/lib/features/properties/distortion_properties.dart b/lib/features/properties/distortion_properties.dart new file mode 100644 index 0000000..edb34b5 --- /dev/null +++ b/lib/features/properties/distortion_properties.dart @@ -0,0 +1,196 @@ +import 'dart:async'; + +import 'package:cutdex/l10n/l10n.dart'; +import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_sdk/preview.dart'; +import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +import '../../workspace/timeline_session.dart'; +import '../preview/preview_panel.dart'; +import 'property_edit_controller.dart'; +import 'property_keyframe_controls.dart'; +import 'distortion_parameter_editor.dart'; + +class DistortionProperties extends ConsumerStatefulWidget { + const DistortionProperties({ + super.key, + required this.projectId, + required this.timelineId, + required this.session, + required this.sequence, + required this.clip, + }); + final String projectId, timelineId; + final EditorTimelineSession session; + final SequenceId sequence; + final ElementId clip; + @override + ConsumerState createState() => + _DistortionPropertiesState(); +} + +class _DistortionPropertiesState extends ConsumerState { + PropertyEditController _create() => PropertyEditController( + session: widget.session, + sequence: widget.sequence, + clip: widget.clip, + projectId: widget.projectId, + timelineId: widget.timelineId, + operation: 'setTransform', + ); + late PropertyEditController _controller = _create(); + PreviewController? _preview; + bool _perspective = false; + void _release() { + final previous = _preview; + _preview = null; + if (previous != null) { + scheduleMicrotask(() => previous.releaseDistortionEditing(this)); + } + } + + @override + void didUpdateWidget(covariant DistortionProperties oldWidget) { + super.didUpdateWidget(oldWidget); + if (_controller.identity != + ( + widget.session, + widget.sequence, + widget.clip, + widget.projectId, + widget.timelineId, + )) { + _release(); + _controller.dispose(); + _controller = _create(); + } + } + + @override + void dispose() { + _release(); + _controller.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + final preview = ref + .watch(editorPreviewProvider(widget.projectId, widget.timelineId)) + .asData + ?.value; + if (!identical(_preview, preview)) { + _release(); + _preview = preview; + } + final view = widget.session.view(widget.sequence); + return ListenableBuilder( + listenable: Listenable.merge([ + _controller, + view, + if (preview != null) preview.transforms, + if (preview != null) preview.positionChanges, + ]), + builder: (context, _) { + final stack = _controller.animation; + if (stack == null) return const SizedBox.shrink(); + final visual = preview?.visualForProperties(widget.clip); + final value = preview?.transforms.hasPending == true && visual != null + ? visual.transform + : ClipTransform.fromRecord( + stack.record, + sourceTick: stack.sourceTick, + ); + final extent = + visual?.geometry.distortionSize ?? + Size(widget.session.canvas.width, widget.session.canvas.height); + final enabled = + !_controller.saving && + stack.containsPlayhead && + preview?.transforms.hasPending != true; + Future edit(void Function(EditorCommandService, int) action) => + _controller.run(preview, action); + final keys = PropertyKeyframeControls( + stack: stack, + enabled: enabled, + onEdit: (ids, {action, interpolation}) => edit( + (c, t) => c.editKeyframeChannel( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + parameterIds: ids, + action: action, + interpolation: interpolation, + ), + ), + onSeek: (offset) => _controller.run( + preview, + (_, t) => view.seekTo(t - stack.localTick + offset), + seek: true, + ), + ); + final editing = preview?.distortionEditingElement == widget.clip; + final l = context.l10n; + Future submit(int corner, int axis, double input) => edit( + (c, t) => c.setTransform( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + change: (current) { + final p = current.distortion.corners[corner]; + return current.copyWith( + distortion: current.distortion.withCorner( + corner, + axis == 0 ? input / extent.width : p.$1, + axis == 1 ? input / extent.height : p.$2, + ), + ); + }, + ), + ); + return DistortionParameterEditor( + value: value.distortion, + extent: extent, + enabled: enabled, + editing: editing, + perspective: _perspective, + keyframes: keys, + editContext: _controller.identity, + error: _controller.failed ? l.updateOperationFailed : null, + onSubmit: submit, + onToggle: preview == null + ? null + : () => _controller.run( + preview, + (_, t) => preview.setDistortionEditing( + editing ? null : widget.clip, + owner: this, + perspective: _perspective, + ), + seek: true, + ), + onReset: () => edit( + (c, t) => c.setTransform( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + change: (v) => v.copyWith(distortion: const ClipDistortion()), + ), + ), + onPerspective: (v) { + setState(() => _perspective = v); + if (editing) { + preview!.setDistortionEditing( + widget.clip, + owner: this, + perspective: v, + ); + } + }, + ); + }, + ); + } +} diff --git a/lib/features/properties/effect_labels.dart b/lib/features/properties/effect_labels.dart new file mode 100644 index 0000000..f1b3003 --- /dev/null +++ b/lib/features/properties/effect_labels.dart @@ -0,0 +1,15 @@ +import 'package:cutdex/l10n/l10n.dart'; +import 'package:cutdex_sdk/editor.dart'; +import 'package:flutter/widgets.dart'; + +extension EffectTypeLabel on ClipEffectType { + String label(BuildContext context) => switch (this) { + ClipEffectType.dropShadow => context.l10n.dropShadow, + ClipEffectType.innerShadow => context.l10n.innerShadow, + ClipEffectType.layerBlur => context.l10n.layerBlur, + ClipEffectType.backgroundBlur => context.l10n.backgroundBlur, + ClipEffectType.glass => context.l10n.glassEffect, + ClipEffectType.noise => context.l10n.noiseEffect, + ClipEffectType.texture => context.l10n.textureEffect, + }; +} diff --git a/lib/features/properties/effect_list.dart b/lib/features/properties/effect_list.dart new file mode 100644 index 0000000..01e91f0 --- /dev/null +++ b/lib/features/properties/effect_list.dart @@ -0,0 +1,132 @@ +import 'package:cutdex/l10n/l10n.dart'; +import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_ui/icons.dart'; +import 'package:cutdex_ui/widgets.dart'; +import 'package:flutter/material.dart'; + +import 'property_keyframe_controls.dart'; +import 'effect_labels.dart'; +import 'property_layer_row.dart'; + +class EffectList extends StatelessWidget { + const EffectList({ + super.key, + required this.stack, + required this.enabled, + required this.keyframes, + required this.onAdd, + required this.onReorder, + required this.onToggle, + required this.onRemove, + required this.editorBuilder, + this.error, + }); + final ClipEffectStack stack; + final bool enabled; + final PropertyKeyframeControls keyframes; + final void Function(ClipEffectType) onAdd; + final void Function(List) onReorder; + final void Function(ClipEffectLayer) onToggle, onRemove; + final Widget Function(ClipEffectLayer) editorBuilder; + final String? error; + + @override + Widget build(BuildContext context) { + final layers = stack.layers; + return AppPropertySection( + bottomSpacing: layers.isEmpty ? 0 : null, + child: AppPropertyGroup( + label: context.l10n.effects, + padChild: false, + actions: [ + keyframes.button( + context, + stack.parameterIds, + context.l10n.effects, + 'effects-key', + ), + AppDropdownMenu( + enabled: enabled, + builder: (context, toggle, focus) => IconButton( + key: const ValueKey('effect-add'), + focusNode: focus, + tooltip: context.l10n.addEffect, + onPressed: enabled ? toggle : null, + icon: const Icon(AppIcons.add, size: 16), + ), + items: [ + for (final type in ClipEffectType.values) + AppMenuItem( + label: type.label(context), + onPressed: enabled && stack.canAdd(type) + ? () => onAdd(type) + : null, + ), + ], + ), + ], + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + ReorderableListView( + shrinkWrap: true, + primary: false, + padding: EdgeInsets.zero, + physics: const NeverScrollableScrollPhysics(), + buildDefaultDragHandles: false, + onReorderItem: (from, to) { + if (!enabled) return; + final order = layers.map((l) => l.id).toList(); + order.insert(to, order.removeAt(from)); + onReorder(order); + }, + children: [ + for (var i = 0; i < layers.length; i++) + PropertyLayerRow( + key: ValueKey('effect-layer-${layers[i].id}'), + id: layers[i].id, + prefix: 'effect', + index: i, + enabled: enabled, + visible: layers[i].enabled, + label: layers[i].type.label(context), + tooltip: context.l10n.effects, + onVisibility: () => onToggle(layers[i]), + onRemove: () => onRemove(layers[i]), + menuItems: [ + for (final (delta, label) in [ + (-1, context.l10n.effectMoveUp), + (1, context.l10n.effectMoveDown), + ]) + AppMenuItem( + label: label, + closeAncestors: false, + onPressed: + !enabled || + i + delta < 0 || + i + delta >= layers.length + ? null + : () { + final order = layers + .map((l) => l.id) + .toList(); + order.insert(i + delta, order.removeAt(i)); + onReorder(order); + }, + ), + ], + editor: editorBuilder(layers[i]), + ), + ], + ), + if (error != null) + Text( + error!, + style: TextStyle(color: Theme.of(context).colorScheme.error), + ), + ], + ), + ), + ); + } +} diff --git a/lib/features/properties/effect_parameter_editor.dart b/lib/features/properties/effect_parameter_editor.dart new file mode 100644 index 0000000..432c4e6 --- /dev/null +++ b/lib/features/properties/effect_parameter_editor.dart @@ -0,0 +1,245 @@ +import 'package:cutdex/l10n/l10n.dart'; +import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_ui/theme.dart'; +import 'package:cutdex_ui/widgets.dart'; +import 'package:flutter/material.dart'; + +import 'property_keyframe_controls.dart'; +import 'effect_labels.dart'; +import 'property_color_input.dart'; +import 'property_number_input.dart'; + +class EffectParameterEditor extends StatelessWidget { + const EffectParameterEditor({ + super.key, + required this.layer, + required this.stack, + required this.enabled, + required this.editContext, + required this.keyframes, + required this.onChange, + required this.onTypeChange, + }); + final ClipEffectLayer layer; + final ClipEffectStack stack; + final bool enabled; + final Object editContext; + final PropertyKeyframeControls keyframes; + final Future Function(Map) onChange; + final void Function(ClipEffectType) onTypeChange; + + String _fieldLabel(BuildContext context, String field) => switch (field) { + 'x' => 'X', + 'y' => 'Y', + 'blur' => context.l10n.shadowBlur, + 'spread' => context.l10n.shadowSpread, + 'opacity' => context.l10n.shadowOpacity, + 'blurEnd' => context.l10n.effectBlurEnd, + 'start.x' => context.l10n.effectStartX, + 'start.y' => context.l10n.effectStartY, + 'end.x' => context.l10n.effectEndX, + 'end.y' => context.l10n.effectEndY, + 'lightAngle' => context.l10n.effectLightAngle, + 'lightIntensity' => context.l10n.effectLightIntensity, + 'refraction' => context.l10n.effectRefraction, + 'depth' => context.l10n.effectDepth, + 'dispersion' => context.l10n.effectDispersion, + 'frost' => context.l10n.effectFrost, + 'splay' => context.l10n.effectSplay, + 'size' => context.l10n.effectNoiseSize, + 'density' => context.l10n.effectDensity, + 'radius' => context.l10n.effectTextureRadius, + 'seed' => context.l10n.effectSeed, + _ => field, + }; + Widget _number(BuildContext context, String field) { + final label = _fieldLabel(context, field); + final structural = EffectParameterTarget.structural.contains(field); + final percentage = { + 'opacity', + 'density', + 'lightIntensity', + 'splay', + }.contains(field); + final factor = percentage ? 100.0 : 1.0; + final definition = EffectParameterTarget.definition(field); + return Padding( + padding: const EdgeInsets.only(bottom: 4), + child: Row( + children: [ + Expanded( + child: PropertyNumberInput( + key: ValueKey('effect-${layer.id}-$field'), + label: label, + value: layer.values[field]! * factor, + unit: percentage ? '%' : null, + enabled: enabled && layer.enabled, + readOnly: false, + scrubbing: false, + editContext: (editContext, layer.id, layer.type), + onScrubUpdate: (_) {}, + onScrubEnd: () {}, + onScrubCancel: () {}, + submit: (v) => !definition.accepts(v / factor) + ? Future.value(false) + : onChange({field: v / factor}), + ), + ), + if (!structural) ...[ + keyframes.button( + context, + [layer.target(field)], + label, + 'effect-${layer.id}-$field-key', + ), + keyframes.menu( + context, + [layer.target(field)], + label, + 'effect-${layer.id}-$field', + ), + ] else + const SizedBox(width: 48), + ], + ), + ); + } + + Widget _color(BuildContext context, String prefix, String label) { + final fields = ['${prefix}r', '${prefix}g', '${prefix}b']; + final values = fields.map((f) => layer.values[f]!).toList(); + final hex = values + .map((v) => (v * 255).round().toRadixString(16).padLeft(2, '0')) + .join() + .toUpperCase(); + final ids = fields.map(layer.target).toList(); + return Padding( + padding: const EdgeInsets.only(bottom: 4), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Text(label, style: AppTheme.propertyLabelStyle(context)), + Row( + children: [ + Expanded( + child: PropertyColorInput( + key: ValueKey('effect-${layer.id}-$prefix'), + value: hex, + color: Color.from( + alpha: 1, + red: values[0], + green: values[1], + blue: values[2], + ), + enabled: enabled && layer.enabled, + editContext: (editContext, layer.id, layer.type), + submit: (rgb) => onChange({ + fields[0]: ((rgb >> 16) & 255) / 255, + fields[1]: ((rgb >> 8) & 255) / 255, + fields[2]: (rgb & 255) / 255, + }), + ), + ), + keyframes.button( + context, + ids, + label, + 'effect-${layer.id}-$prefix-key', + ), + keyframes.menu(context, ids, label, 'effect-${layer.id}-$prefix'), + ], + ), + ], + ), + ); + } + + Widget _mode(BuildContext context, String field, List labels) => + Padding( + padding: const EdgeInsets.only(bottom: 8), + child: SizedBox( + height: 24, + child: AppSelect( + closeAncestors: false, + key: ValueKey('effect-${layer.id}-$field'), + value: layer.values[field]!.round(), + label: field == 'noiseMode' + ? context.l10n.effectNoiseMode + : context.l10n.shadowBlur, + emptyLabel: context.l10n.effects, + options: [ + for (var i = 0; i < labels.length; i++) + AppSelectOption(i, labels[i]), + ], + onChanged: enabled && layer.enabled + ? (v) => onChange({field: v.toDouble()}) + : null, + ), + ), + ); + @override + Widget build(BuildContext context) => Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + SizedBox( + height: 24, + child: AppSelect( + closeAncestors: false, + key: ValueKey('effect-${layer.id}-type'), + value: layer.type, + label: context.l10n.effects, + emptyLabel: context.l10n.effects, + options: [ + for (final type in ClipEffectType.values) + if (stack.canAdd(type, excludingId: layer.id)) + AppSelectOption(type, type.label(context)), + ], + onChanged: enabled ? onTypeChange : null, + ), + ), + const SizedBox(height: 8), + if (layer.values.containsKey('progressive')) + _mode(context, 'progressive', [ + context.l10n.effectUniform, + context.l10n.effectProgressive, + ]), + if (layer.values.containsKey('noiseMode')) + _mode(context, 'noiseMode', [ + context.l10n.effectMono, + context.l10n.effectDuo, + context.l10n.effectMulti, + ]), + for (final field in layer.values.keys) + if (!field.startsWith('color') && + !{'progressive', 'noiseMode', 'clipToShape'}.contains(field) && + !(layer.values['progressive'] == 0 && + { + 'blurEnd', + 'start.x', + 'start.y', + 'end.x', + 'end.y', + }.contains(field))) + _number(context, field), + if (layer.values.containsKey('color.r') && layer.values['noiseMode'] != 2) + _color(context, 'color.', context.l10n.color), + if (layer.values['noiseMode'] == 1) + _color(context, 'color2.', context.l10n.effectSecondColor), + if (layer.values.containsKey('clipToShape')) + CheckboxListTile( + key: ValueKey('effect-${layer.id}-clipToShape'), + dense: true, + contentPadding: EdgeInsets.zero, + title: Text( + context.l10n.effectClipToShape, + style: Theme.of(context).textTheme.bodyMedium, + ), + value: layer.values['clipToShape'] == 1, + onChanged: enabled && layer.enabled + ? (v) => onChange({'clipToShape': v == true ? 1 : 0}) + : null, + ), + ], + ); +} diff --git a/lib/features/properties/effect_properties.dart b/lib/features/properties/effect_properties.dart new file mode 100644 index 0000000..01d3302 --- /dev/null +++ b/lib/features/properties/effect_properties.dart @@ -0,0 +1,172 @@ +import 'package:cutdex/l10n/l10n.dart'; +import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +import '../../workspace/timeline_session.dart'; +import '../preview/preview_panel.dart'; +import 'property_edit_controller.dart'; +import 'property_keyframe_controls.dart'; +import 'effect_list.dart'; +import 'effect_parameter_editor.dart'; + +class EffectProperties extends ConsumerStatefulWidget { + const EffectProperties({ + super.key, + required this.projectId, + required this.timelineId, + required this.session, + required this.sequence, + required this.clip, + }); + final String projectId, timelineId; + final EditorTimelineSession session; + final SequenceId sequence; + final ElementId clip; + + @override + ConsumerState createState() => _EffectPropertiesState(); +} + +class _EffectPropertiesState extends ConsumerState { + Object get _identity => ( + widget.session, + widget.sequence, + widget.clip, + widget.projectId, + widget.timelineId, + ); + PropertyEditController _createController() => PropertyEditController( + session: widget.session, + sequence: widget.sequence, + clip: widget.clip, + projectId: widget.projectId, + timelineId: widget.timelineId, + operation: 'editEffect', + ); + late PropertyEditController _controller = _createController(); + + @override + void didUpdateWidget(covariant EffectProperties oldWidget) { + super.didUpdateWidget(oldWidget); + if (_controller.identity != _identity) { + _controller.dispose(); + _controller = _createController(); + } + } + + @override + void dispose() { + _controller.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + final preview = ref + .watch(editorPreviewProvider(widget.projectId, widget.timelineId)) + .asData + ?.value; + final controller = _controller; + final view = widget.session.view(widget.sequence); + return ListenableBuilder( + listenable: Listenable.merge([controller, view]), + builder: (context, _) { + final animation = controller.animation; + if (animation == null) return const SizedBox.shrink(); + final stack = ClipEffectStack(animation.record, animation.localTick); + final enabled = + !controller.saving && + stack.containsPlayhead && + preview?.transforms.hasPending != true; + Future edit(void Function(EditorCommandService, int) action) => + controller.run(preview, action); + final keyframes = PropertyKeyframeControls( + stack: stack, + enabled: enabled, + onEdit: (ids, {action, interpolation}) => edit( + (c, t) => c.editKeyframeChannel( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + parameterIds: ids, + action: action, + interpolation: interpolation, + ), + ), + onSeek: (offset) => controller.run( + preview, + (_, tick) => view.seekTo(tick - stack.localTick + offset), + seek: true, + ), + ); + return EffectList( + stack: stack, + enabled: enabled, + keyframes: keyframes, + error: controller.failed ? context.l10n.updateEffectFailed : null, + onAdd: (type) => edit( + (c, t) => c.addEffect( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + effectId: c.newEffectId(), + type: type, + ), + ), + onReorder: (order) => edit( + (c, t) => c.configureEffects( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + order: order, + ), + ), + onToggle: (layer) => edit( + (c, t) => c.configureEffects( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + effectId: layer.id, + enabled: !layer.enabled, + ), + ), + onRemove: (layer) => edit( + (c, t) => c.removeEffect( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + effectId: layer.id, + ), + ), + editorBuilder: (layer) => EffectParameterEditor( + layer: layer, + stack: stack, + enabled: enabled, + editContext: controller.identity, + keyframes: keyframes, + onChange: (values) => edit( + (c, t) => c.setEffect( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + effectId: layer.id, + values: values, + ), + ), + onTypeChange: (type) => edit( + (c, t) => c.changeEffectType( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + effectId: layer.id, + type: type, + ), + ), + ), + ); + }, + ); + } +} diff --git a/lib/features/properties/picture_edits.dart b/lib/features/properties/picture_edits.dart index 9b0e5e2..3e9c028 100644 --- a/lib/features/properties/picture_edits.dart +++ b/lib/features/properties/picture_edits.dart @@ -1,25 +1,19 @@ +import 'dart:async'; + import 'package:cutdex_sdk/editor.dart'; import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; import 'package:cutdex_sdk/timeline/model.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../workspace/timeline_session.dart'; +import 'property_edit_boundary.dart'; part 'picture_edits.g.dart'; part 'picture_edits.freezed.dart'; enum PictureEditFailure { keyframes, alignment, invalidTransform, transform } -@freezed -abstract class PictureEditTarget with _$PictureEditTarget { - const factory PictureEditTarget({ - required TimelineVersion version, - required int tick, - }) = _PictureEditTarget; -} - @freezed abstract class PictureEditException with _$PictureEditException @@ -31,35 +25,16 @@ abstract class PictureEditException @riverpod class PictureEdits extends _$PictureEdits { Future? _pending; + late PropertyEditBoundary _boundary; @override AsyncValue build( EditorTimelineSession session, SequenceId sequence, ElementId clip, - ) => const AsyncData(null); - - PictureEditTarget _capture() { - final view = session.view(sequence); - return PictureEditTarget( - version: view.version.kernelVersion, - tick: view.playheadTick, - ); - } - - bool _valid( - PictureEditTarget target, - bool Function() isCurrent, - PreviewController? preview, ) { - if (!ref.mounted || - !isCurrent() || - session.activeSequenceId != sequence || - preview?.transforms.hasPending == true) { - return false; - } - final view = session.view(sequence); - return target.tick == view.playheadTick && - identical(target.version, view.version.kernelVersion); + _boundary = PropertyEditBoundary(session, sequence, clip); + ref.onDispose(_boundary.dispose); + return const AsyncData(null); } ClipAnimation? animation() { @@ -86,10 +61,9 @@ class PictureEdits extends _$PictureEdits { if (state.isLoading || preview?.transforms.hasPending == true) { return Future.value(false); } - final target = _capture(); - final work = _run(PictureEditFailure.transform, () async { - await preview?.pauseForCanvasInteraction(); - if (!_valid(target, isCurrent, preview)) return false; + final work = _run(PictureEditFailure.transform, preview, isCurrent, ( + target, + ) { final current = animation()?.value; if (current == null) return false; final value = change(current); @@ -101,7 +75,8 @@ class PictureEdits extends _$PictureEdits { value.scale == current.scale && value.scaleY == current.scaleY && value.rotation == current.rotation && - value.sameCorners(current)) { + value.sameCorners(current) && + value.distortion.same(current.distortion)) { return true; } session.commands.setTransform( @@ -133,10 +108,7 @@ class PictureEdits extends _$PictureEdits { preview?.transforms.hasPending == true) { return; } - final target = _capture(); - await _run(PictureEditFailure.keyframes, () async { - await preview?.pauseForCanvasInteraction(); - if (!_valid(target, isCurrent, preview)) return false; + await _run(PictureEditFailure.keyframes, preview, isCurrent, (target) { session.commands.editKeyframeChannel( sequence: sequence, clip: clip, @@ -155,7 +127,6 @@ class PictureEdits extends _$PictureEdits { required bool Function() isCurrent, }) async { if (state.isLoading || preview.transforms.hasPending) return; - final target = _capture(); final current = animation(); if (current == null) return; final command = AlignClip( @@ -167,12 +138,13 @@ class PictureEdits extends _$PictureEdits { alignment: alignment, expectedVersion: session.version, ); - await _run(PictureEditFailure.alignment, () async { - await preview.pauseForCanvasInteraction(); + await _run(PictureEditFailure.alignment, preview, isCurrent, ( + target, + ) async { await session.alignClip( sequence, command, - isCancelled: () => !_valid(target, isCurrent, preview), + isCancelled: () => !target.isCurrent, ); return true; }); @@ -180,24 +152,22 @@ class PictureEdits extends _$PictureEdits { Future _run( PictureEditFailure failure, - Future Function() action, + PreviewController? preview, + bool Function() isCurrent, + FutureOr Function(PropertyEditContext) action, ) async { final lease = ref.keepAlive(); - state = const AsyncLoading(); try { - final applied = await session.runEditAsync( - switch (failure) { + final applied = await _boundary.run( + preview, + action, + isCurrent: () => ref.mounted && isCurrent(), + started: () => state = const AsyncLoading(), + operation: switch (failure) { PictureEditFailure.keyframes => 'editKeyframes', PictureEditFailure.alignment => 'alignClip', _ => 'setTransform', }, - sequence, - action, - context: { - 'clipIds': [clip.value], - 'entryPoint': 'property', - 'playheadTick': session.view(sequence).playheadTick, - }, ); if (ref.mounted) state = const AsyncData(null); return applied; diff --git a/lib/features/properties/picture_edits.freezed.dart b/lib/features/properties/picture_edits.freezed.dart index ed0b9de..17d2da6 100644 --- a/lib/features/properties/picture_edits.freezed.dart +++ b/lib/features/properties/picture_edits.freezed.dart @@ -12,318 +12,6 @@ part of 'picture_edits.dart'; // GENERATED CODE - DO NOT MODIFY BY HAND T _$identity(T value) => value; -/// @nodoc -mixin _$PictureEditTarget { - TimelineVersion get version; - int get tick; - - /// Create a copy of PictureEditTarget - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $PictureEditTargetCopyWith get copyWith => - _$PictureEditTargetCopyWithImpl( - this as PictureEditTarget, - _$identity, - ); - - @override - bool operator ==(Object other) { - final _this = this as PictureEditTarget; - return identical(this, other) || - (other.runtimeType == runtimeType && - other is PictureEditTarget && - (identical(other.version, _this.version) || - other.version == _this.version) && - (identical(other.tick, _this.tick) || other.tick == _this.tick)); - } - - @override - int get hashCode { - final _this = this as PictureEditTarget; - return Object.hash(runtimeType, _this.version, _this.tick); - } - - @override - String toString() { - final _this = this as PictureEditTarget; - return 'PictureEditTarget(version: ${_this.version}, tick: ${_this.tick})'; - } -} - -/// @nodoc -abstract mixin class $PictureEditTargetCopyWith<$Res> { - factory $PictureEditTargetCopyWith( - PictureEditTarget value, - $Res Function(PictureEditTarget) _then, - ) = _$PictureEditTargetCopyWithImpl; - @useResult - $Res call({TimelineVersion version, int tick}); -} - -/// @nodoc -class _$PictureEditTargetCopyWithImpl<$Res> - implements $PictureEditTargetCopyWith<$Res> { - _$PictureEditTargetCopyWithImpl(this._self, this._then); - - final PictureEditTarget _self; - final $Res Function(PictureEditTarget) _then; - - /// Create a copy of PictureEditTarget - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({Object? version = null, Object? tick = null}) { - return _then( - PictureEditTarget( - version: null == version - ? _self.version - : version // ignore: cast_nullable_to_non_nullable - as TimelineVersion, - tick: null == tick - ? _self.tick - : tick // ignore: cast_nullable_to_non_nullable - as int, - ), - ); - } -} - -/// Adds pattern-matching-related methods to [PictureEditTarget]. -extension PictureEditTargetPatterns on PictureEditTarget { - /// A variant of `map` that fallback to returning `orElse`. - /// - /// It is equivalent to doing: - /// ```dart - /// switch (sealedClass) { - /// case final Subclass value: - /// return ...; - /// case _: - /// return orElse(); - /// } - /// ``` - - @optionalTypeArgs - TResult maybeMap( - TResult Function(_PictureEditTarget value)? $default, { - required TResult orElse(), - }) { - final _that = this; - switch (_that) { - case _PictureEditTarget() when $default != null: - return $default(_that); - case _: - return orElse(); - } - } - - /// A `switch`-like method, using callbacks. - /// - /// Callbacks receives the raw object, upcasted. - /// It is equivalent to doing: - /// ```dart - /// switch (sealedClass) { - /// case final Subclass value: - /// return ...; - /// case final Subclass2 value: - /// return ...; - /// } - /// ``` - - @optionalTypeArgs - TResult map( - TResult Function(_PictureEditTarget value) $default, - ) { - final _that = this; - switch (_that) { - case _PictureEditTarget(): - return $default(_that); - case _: - throw StateError('Unexpected subclass'); - } - } - - /// A variant of `map` that fallback to returning `null`. - /// - /// It is equivalent to doing: - /// ```dart - /// switch (sealedClass) { - /// case final Subclass value: - /// return ...; - /// case _: - /// return null; - /// } - /// ``` - - @optionalTypeArgs - TResult? mapOrNull( - TResult? Function(_PictureEditTarget value)? $default, - ) { - final _that = this; - switch (_that) { - case _PictureEditTarget() when $default != null: - return $default(_that); - case _: - return null; - } - } - - /// A variant of `when` that fallback to an `orElse` callback. - /// - /// It is equivalent to doing: - /// ```dart - /// switch (sealedClass) { - /// case Subclass(:final field): - /// return ...; - /// case _: - /// return orElse(); - /// } - /// ``` - - @optionalTypeArgs - TResult maybeWhen( - TResult Function(TimelineVersion version, int tick)? $default, { - required TResult orElse(), - }) { - final _that = this; - switch (_that) { - case _PictureEditTarget() when $default != null: - return $default(_that.version, _that.tick); - case _: - return orElse(); - } - } - - /// A `switch`-like method, using callbacks. - /// - /// As opposed to `map`, this offers destructuring. - /// It is equivalent to doing: - /// ```dart - /// switch (sealedClass) { - /// case Subclass(:final field): - /// return ...; - /// case Subclass2(:final field2): - /// return ...; - /// } - /// ``` - - @optionalTypeArgs - TResult when( - TResult Function(TimelineVersion version, int tick) $default, - ) { - final _that = this; - switch (_that) { - case _PictureEditTarget(): - return $default(_that.version, _that.tick); - case _: - throw StateError('Unexpected subclass'); - } - } - - /// A variant of `when` that fallback to returning `null` - /// - /// It is equivalent to doing: - /// ```dart - /// switch (sealedClass) { - /// case Subclass(:final field): - /// return ...; - /// case _: - /// return null; - /// } - /// ``` - - @optionalTypeArgs - TResult? whenOrNull( - TResult? Function(TimelineVersion version, int tick)? $default, - ) { - final _that = this; - switch (_that) { - case _PictureEditTarget() when $default != null: - return $default(_that.version, _that.tick); - case _: - return null; - } - } -} - -/// @nodoc - -class _PictureEditTarget implements PictureEditTarget { - const _PictureEditTarget({required this.version, required this.tick}); - - @override - final TimelineVersion version; - @override - final int tick; - - /// Create a copy of PictureEditTarget - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$PictureEditTargetCopyWith<_PictureEditTarget> get copyWith => - __$PictureEditTargetCopyWithImpl<_PictureEditTarget>(this, _$identity); - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _PictureEditTarget && - (identical(other.version, version) || other.version == version) && - (identical(other.tick, tick) || other.tick == tick)); - } - - @override - int get hashCode { - return Object.hash(runtimeType, version, tick); - } - - @override - String toString() { - return 'PictureEditTarget(version: $version, tick: $tick)'; - } -} - -/// @nodoc -abstract mixin class _$PictureEditTargetCopyWith<$Res> - implements $PictureEditTargetCopyWith<$Res> { - factory _$PictureEditTargetCopyWith( - _PictureEditTarget value, - $Res Function(_PictureEditTarget) _then, - ) = __$PictureEditTargetCopyWithImpl; - @override - @useResult - $Res call({TimelineVersion version, int tick}); -} - -/// @nodoc -class __$PictureEditTargetCopyWithImpl<$Res> - implements _$PictureEditTargetCopyWith<$Res> { - __$PictureEditTargetCopyWithImpl(this._self, this._then); - - final _PictureEditTarget _self; - final $Res Function(_PictureEditTarget) _then; - - /// Create a copy of PictureEditTarget - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({Object? version = null, Object? tick = null}) { - return _then( - _PictureEditTarget( - version: null == version - ? _self.version - : version // ignore: cast_nullable_to_non_nullable - as TimelineVersion, - tick: null == tick - ? _self.tick - : tick // ignore: cast_nullable_to_non_nullable - as int, - ), - ); - } -} - /// @nodoc mixin _$PictureEditException { PictureEditFailure get failure; diff --git a/lib/features/properties/picture_edits.g.dart b/lib/features/properties/picture_edits.g.dart index 3bdb68d..723f3f7 100644 --- a/lib/features/properties/picture_edits.g.dart +++ b/lib/features/properties/picture_edits.g.dart @@ -58,7 +58,7 @@ final class PictureEditsProvider } } -String _$pictureEditsHash() => r'5a8ab10fcac9638fb0d98e214744f190fa499434'; +String _$pictureEditsHash() => r'b3166b6e97f6a711e6e92b67dfc44341a3fec4e2'; final class PictureEditsFamily extends $Family with diff --git a/lib/features/properties/picture_properties.dart b/lib/features/properties/picture_properties.dart index 17c8aa4..f669b3a 100644 --- a/lib/features/properties/picture_properties.dart +++ b/lib/features/properties/picture_properties.dart @@ -22,7 +22,10 @@ import '../../shared/state/operation_scope.dart'; import '../preview/preview_panel.dart'; import 'property_number_input.dart'; import 'picture_edits.dart'; -import 'shadow_properties.dart'; +import 'effect_properties.dart'; +import 'stroke_properties.dart'; +import 'distortion_properties.dart'; +import 'effect_labels.dart'; class PictureProperties extends ConsumerStatefulWidget { const PictureProperties({ @@ -208,7 +211,8 @@ class _PicturePropertiesState extends ConsumerState { value.rotation == _scrubBase!.rotation && value.scale == _scrubBase!.scale && value.scaleY == _scrubBase!.scaleY && - value.sameCorners(_scrubBase!))) { + value.sameCorners(_scrubBase!) && + value.distortion.same(_scrubBase!.distortion))) { _cancelScrub(); return; } @@ -271,6 +275,10 @@ class _PicturePropertiesState extends ConsumerState { value.scale, value.scaleY, value.rotation, + value.distortion.topLeft, + value.distortion.topRight, + value.distortion.bottomRight, + value.distortion.bottomLeft, value.cornerRadius, value.topLeftRadius, value.topRightRadius, @@ -866,6 +874,13 @@ class _PicturePropertiesState extends ConsumerState { keyTools(TransformChannel.scale), ]), ], + DistortionProperties( + projectId: widget.projectId, + timelineId: widget.timelineId, + session: widget.session, + sequence: widget.sequence, + clip: widget.clip.id, + ), section([ if (desktop) AppPropertyGroup( @@ -921,7 +936,14 @@ class _PicturePropertiesState extends ConsumerState { keyTools(TransformChannel.cornerRadius), ], ]), - ShadowProperties( + StrokeProperties( + projectId: widget.projectId, + timelineId: widget.timelineId, + session: widget.session, + sequence: widget.sequence, + clip: widget.clip.id, + ), + EffectProperties( projectId: widget.projectId, timelineId: widget.timelineId, session: widget.session, @@ -996,17 +1018,29 @@ class _KeyframeTimeline extends StatelessWidget { for (final (id, label, times) in [ for (final channel in TransformChannel.values) (channel.name, channel.label(context), animation.keyTimes(channel)), - if (ClipShadowStack( + for (final layer in ClipStrokeStack( animation.record, animation.localTick, - ).layers.isNotEmpty) + ).layers) ( - 'shadow', - context.l10n.shadow, - ClipShadowStack( - animation.record, - animation.localTick, - ).keyOffsets.map((t) => animation.start + t).toList(), + 'stroke-${layer.id}', + context.l10n.stroke, + ClipStrokeStack(animation.record, animation.localTick) + .keyOffsets(layer.parameterIds) + .map((t) => animation.start + t) + .toList(), + ), + for (final layer in ClipEffectStack( + animation.record, + animation.localTick, + ).layers) + ( + layer.id, + layer.type.label(context), + ClipEffectStack(animation.record, animation.localTick) + .keyOffsets(layer.parameterIds) + .map((t) => animation.start + t) + .toList(), ), ]) SizedBox( diff --git a/lib/features/properties/property_color_input.dart b/lib/features/properties/property_color_input.dart new file mode 100644 index 0000000..929ca4e --- /dev/null +++ b/lib/features/properties/property_color_input.dart @@ -0,0 +1,152 @@ +import 'package:cutdex/l10n/l10n.dart'; +import 'package:cutdex_ui/widgets.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/widget_previews.dart'; +import 'package:cutdex_ui/theme.dart'; + +import '../../shared/state/operation_scope.dart'; +import 'property_color_picker.dart'; + +class PropertyColorInput extends StatefulWidget { + const PropertyColorInput({ + super.key, + required this.value, + required this.color, + required this.enabled, + required this.editContext, + required this.submit, + }); + final String value; + final Color color; + final bool enabled; + final Object editContext; + final Future Function(int) submit; + @override + State createState() => _PropertyColorInputState(); +} + +class _PropertyColorInputState extends State { + late final _text = TextEditingController(text: widget.value); + final _focus = FocusNode(); + bool _dirty = false; + String? _error; + late final _operations = OperationScope(widget.editContext); + @override + void initState() { + super.initState(); + _focus.addListener(_blur); + } + + void _blur() { + if (!_focus.hasFocus) _submit(); + } + + Future _submit() async { + if (!_dirty || !widget.enabled) return; + final value = _text.text.replaceFirst('#', ''); + if (!RegExp(r'^[A-Fa-f0-9]{6}$').hasMatch(value)) { + setState(() => _error = context.l10n.invalidNumber); + return; + } + _dirty = false; + final guard = _operations.begin(); + final ok = await widget.submit(int.parse(value, radix: 16)); + if (!mounted || !guard()) return; + setState(() { + _error = ok ? null : context.l10n.notApplied; + _text.text = widget.value; + }); + } + + @override + void didUpdateWidget(covariant PropertyColorInput oldWidget) { + super.didUpdateWidget(oldWidget); + _operations.bind(widget.editContext); + if (oldWidget.editContext != widget.editContext || !widget.enabled) { + _dirty = false; + _error = null; + } + if (!_dirty && _text.text != widget.value) _text.text = widget.value; + } + + @override + void dispose() { + _operations.dispose(); + _focus.removeListener(_blur); + _focus.dispose(); + _text.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) => AppTextField( + controller: _text, + focusNode: _focus, + enabled: widget.enabled, + errorText: _error, + leading: AppPopover( + width: 240, + borderRadius: 8, + padding: const EdgeInsets.all(16), + backgroundColor: Theme.of(context).colorScheme.surfaceContainerLow, + builder: (context, toggle) => IconButton( + key: const ValueKey('effect-color-swatch'), + tooltip: context.l10n.color, + onPressed: widget.enabled ? toggle : null, + padding: EdgeInsets.zero, + icon: Container( + width: 14, + height: 14, + decoration: BoxDecoration( + color: widget.color, + borderRadius: BorderRadius.circular(2), + border: Border.all( + color: Theme.of(context).colorScheme.outlineVariant, + ), + ), + ), + ), + child: PropertyColorPicker( + color: widget.color, + enabled: widget.enabled, + submit: (color) => widget.submit(color.toARGB32() & 0xFFFFFF), + ), + ), + onChanged: (_) { + _operations.invalidate(); + _dirty = true; + if (_error != null) setState(() => _error = null); + }, + onEditingComplete: () {}, + onSubmitted: (_) => _submit(), + ); +} + +@Preview(name: 'Property color input', size: Size(240, 80)) +Widget propertyColorInputPreview() { + var rgb = 0x3366FF; + return MaterialApp( + localizationsDelegates: AppLocalizations.localizationsDelegates, + supportedLocales: AppLocalizations.supportedLocales, + theme: AppTheme.propertiesPanelTheme( + AppTheme.desktopWorkspaceTheme(AppTheme.penDark), + ), + home: Scaffold( + body: Padding( + padding: const EdgeInsets.all(16), + child: StatefulBuilder( + builder: (context, update) => PropertyColorInput( + value: rgb.toRadixString(16).padLeft(6, '0').toUpperCase(), + color: Color(0xFF000000 | rgb), + enabled: true, + editContext: 'preview', + submit: (value) async { + update(() => rgb = value); + return true; + }, + ), + ), + ), + ), + ); +} diff --git a/lib/features/properties/property_color_picker.dart b/lib/features/properties/property_color_picker.dart new file mode 100644 index 0000000..b4d111b --- /dev/null +++ b/lib/features/properties/property_color_picker.dart @@ -0,0 +1,214 @@ +import 'package:flutter/material.dart'; +import 'package:cutdex/l10n/l10n.dart'; +import 'package:cutdex_ui/theme.dart'; +import 'package:flutter/widget_previews.dart'; + +class PropertyColorPicker extends StatefulWidget { + const PropertyColorPicker({ + super.key, + required this.color, + required this.enabled, + required this.submit, + }); + final Color color; + final bool enabled; + final Future Function(Color) submit; + + @override + State createState() => _PropertyColorPickerState(); +} + +class _PropertyColorPickerState extends State { + late HSVColor _color = HSVColor.fromColor(widget.color); + + @override + void didUpdateWidget(covariant PropertyColorPicker oldWidget) { + super.didUpdateWidget(oldWidget); + if (widget.color != oldWidget.color) { + _color = HSVColor.fromColor(widget.color); + } + } + + Future _commit() async { + if (!widget.enabled) return; + await widget.submit(_color.toColor()); + if (mounted) setState(() => _color = HSVColor.fromColor(widget.color)); + } + + @override + Widget build(BuildContext context) => Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Text( + context.l10n.color, + style: AppTheme.propertySectionTitleStyle(context), + ), + const SizedBox(height: 12), + SizedBox( + height: 140, + child: LayoutBuilder( + builder: (context, constraints) { + final width = constraints.maxWidth; + const height = 140.0; + void update(Offset position) { + if (!widget.enabled) return; + setState( + () => _color = _color + .withSaturation((position.dx / width).clamp(0, 1)) + .withValue((1 - position.dy / height).clamp(0, 1)), + ); + } + + return Semantics( + label: context.l10n.color, + child: GestureDetector( + key: const ValueKey('effect-color-plane'), + onTapDown: (details) => update(details.localPosition), + onTapUp: (_) => _commit(), + onPanStart: (details) => update(details.localPosition), + onPanUpdate: (details) => update(details.localPosition), + onPanEnd: (_) => _commit(), + child: ClipRRect( + borderRadius: BorderRadius.circular(5), + child: SizedBox( + height: height, + child: Stack( + children: [ + Positioned.fill( + child: ColoredBox( + color: HSVColor.fromAHSV( + 1, + _color.hue, + 1, + 1, + ).toColor(), + ), + ), + const Positioned.fill( + child: DecoratedBox( + decoration: BoxDecoration( + gradient: LinearGradient( + colors: [Colors.white, Color(0x00FFFFFF)], + ), + ), + ), + ), + const Positioned.fill( + child: DecoratedBox( + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + colors: [Colors.transparent, Colors.black], + ), + ), + ), + ), + Positioned( + left: (_color.saturation * width - 6).clamp( + 0, + width - 12, + ), + top: ((1 - _color.value) * height - 6).clamp( + 0, + height - 12, + ), + child: Container( + width: 12, + height: 12, + decoration: BoxDecoration( + shape: BoxShape.circle, + border: Border.all(color: Colors.white, width: 2), + boxShadow: const [ + BoxShadow(color: Colors.black54, blurRadius: 2), + ], + ), + ), + ), + ], + ), + ), + ), + ), + ); + }, + ), + ), + const SizedBox(height: 8), + SizedBox( + height: 24, + child: Stack( + alignment: Alignment.center, + children: [ + Container( + height: 12, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6), + gradient: const LinearGradient( + colors: [ + Color(0xFFFF0000), + Color(0xFFFFFF00), + Color(0xFF00FF00), + Color(0xFF00FFFF), + Color(0xFF0000FF), + Color(0xFFFF00FF), + Color(0xFFFF0000), + ], + ), + ), + ), + SliderTheme( + data: SliderTheme.of(context).copyWith( + padding: EdgeInsets.zero, + trackHeight: 12, + activeTrackColor: Colors.transparent, + inactiveTrackColor: Colors.transparent, + thumbColor: Colors.white, + thumbShape: const RoundSliderThumbShape(enabledThumbRadius: 6), + overlayShape: SliderComponentShape.noOverlay, + ), + child: Slider( + key: const ValueKey('effect-color-hue'), + min: 0, + max: 360, + value: _color.hue, + onChanged: widget.enabled + ? (hue) => setState(() => _color = _color.withHue(hue)) + : null, + onChangeEnd: (_) => _commit(), + ), + ), + ], + ), + ), + ], + ); +} + +@Preview(name: 'Property color picker', size: Size(240, 240)) +Widget propertyColorPickerPreview() { + var color = const Color(0xFF3366FF); + return MaterialApp( + localizationsDelegates: AppLocalizations.localizationsDelegates, + supportedLocales: AppLocalizations.supportedLocales, + theme: AppTheme.propertiesPanelTheme( + AppTheme.desktopWorkspaceTheme(AppTheme.penDark), + ), + home: Scaffold( + body: Padding( + padding: const EdgeInsets.all(16), + child: StatefulBuilder( + builder: (context, update) => PropertyColorPicker( + color: color, + enabled: true, + submit: (value) async { + update(() => color = value); + return true; + }, + ), + ), + ), + ), + ); +} diff --git a/lib/features/properties/property_edit_boundary.dart b/lib/features/properties/property_edit_boundary.dart new file mode 100644 index 0000000..bb780b6 --- /dev/null +++ b/lib/features/properties/property_edit_boundary.dart @@ -0,0 +1,89 @@ +import 'dart:async'; + +import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_sdk/preview.dart'; +import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_sdk/timeline/engine.dart'; +import 'package:cutdex_sdk/timeline/model.dart'; + +import '../../workspace/timeline_session.dart'; + +/// Shared pause, stale-context checks and diagnostics for inspector edits. +class PropertyEditBoundary { + PropertyEditBoundary(this.session, this.sequence, this.clip); + + final EditorTimelineSession session; + final SequenceId sequence; + final ElementId clip; + bool _disposed = false; + bool _busy = false; + + void dispose() => _disposed = true; + + bool canRun(PreviewController? preview) => + !_disposed && + !_busy && + session.activeSequenceId == sequence && + preview?.transforms.hasPending != true; + + Future run( + PreviewController? preview, + FutureOr Function(PropertyEditContext) action, { + required String operation, + bool Function()? isCurrent, + bool seek = false, + void Function()? started, + }) async { + if (!canRun(preview) || isCurrent?.call() == false) return false; + final view = session.view(sequence); + final target = PropertyEditContext._( + tick: view.playheadTick, + version: view.version.kernelVersion, + current: () => + !_disposed && + isCurrent?.call() != false && + session.activeSequenceId == sequence && + preview?.transforms.hasPending != true, + view: view, + ); + _busy = true; + try { + started?.call(); + await preview?.pauseForCanvasInteraction(); + if (!target.isCurrent) return false; + if (seek) return await action(target); + return await session.runEditAsync( + operation, + sequence, + () async => action(target), + context: { + 'clipIds': [clip.value], + 'entryPoint': 'property', + 'playheadTick': target.tick, + }, + ); + } finally { + _busy = false; + } + } +} + +class PropertyEditContext { + PropertyEditContext._({ + required this.tick, + required this._version, + required this._current, + required this._view, + }); + + final int tick; + final TimelineVersion _version; + final bool Function() _current; + final TimelineViewController _view; + + /// Async operations check this again immediately before publication. + bool get isCurrent => + _current() && + _view.playheadTick == tick && + identical(_view.version.kernelVersion, _version); +} diff --git a/lib/features/properties/property_edit_controller.dart b/lib/features/properties/property_edit_controller.dart new file mode 100644 index 0000000..2699ee0 --- /dev/null +++ b/lib/features/properties/property_edit_controller.dart @@ -0,0 +1,84 @@ +import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_sdk/preview.dart'; +import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:flutter/foundation.dart'; + +import 'property_edit_boundary.dart'; +import '../../workspace/timeline_session.dart'; + +/// Owns the asynchronous edit boundary for one selected clip. +class PropertyEditController extends ChangeNotifier { + PropertyEditController({ + required this.session, + required this.sequence, + required this.clip, + required this.projectId, + required this.timelineId, + required this.operation, + }); + final EditorTimelineSession session; + final SequenceId sequence; + final ElementId clip; + final String projectId, timelineId, operation; + Object get identity => (session, sequence, clip, projectId, timelineId); + late final _boundary = PropertyEditBoundary(session, sequence, clip); + bool _disposed = false; + bool _saving = false; + bool _failed = false; + bool get saving => _saving; + bool get failed => _failed; + + @override + void dispose() { + _disposed = true; + _boundary.dispose(); + super.dispose(); + } + + ClipParameterAnimation? get animation { + final view = session.view(sequence); + final query = view.version.kernelVersion.query(); + final handle = query.elementById(clip); + return handle == null + ? null + : ClipParameterAnimation( + query.element(handle), + view.playheadTick - query.absoluteStart(handle), + ); + } + + Future run( + PreviewController? preview, + void Function(EditorCommandService, int) action, { + bool seek = false, + }) async { + if (_disposed || saving || !_boundary.canRun(preview)) return false; + try { + return await _boundary.run( + preview, + (target) { + action(session.commands, target.tick); + return true; + }, + operation: operation, + seek: seek, + started: () { + _saving = true; + _failed = false; + notifyListeners(); + }, + ); + } catch (_) { + if (!_disposed) { + _failed = true; + notifyListeners(); + } + return false; + } finally { + if (!_disposed) { + _saving = false; + notifyListeners(); + } + } + } +} diff --git a/lib/features/properties/property_keyframe_controls.dart b/lib/features/properties/property_keyframe_controls.dart new file mode 100644 index 0000000..d5d4c99 --- /dev/null +++ b/lib/features/properties/property_keyframe_controls.dart @@ -0,0 +1,105 @@ +import 'dart:math' as math; + +import 'package:cutdex/l10n/l10n.dart'; +import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_ui/icons.dart'; +import 'package:cutdex_ui/widgets.dart'; +import 'package:flutter/material.dart'; + +typedef PropertyKeyframeEdit = Future Function( + List ids, { + KeyframeAction? action, + ParameterInterpolation? interpolation, +}); + +/// Keyframe controls share channel state and intent callbacks across property fields. +class PropertyKeyframeControls { + const PropertyKeyframeControls({ + required this.stack, + required this.enabled, + required this.onEdit, + required this.onSeek, + }); + final ClipParameterAnimation stack; + final bool enabled; + final PropertyKeyframeEdit onEdit; + final Future Function(int localTick) onSeek; + + Widget button( + BuildContext context, + List ids, + String label, + String id, + ) => IconButton( + key: ValueKey(id), + tooltip: context.l10n.toggleKeyframe( + stack.keyed(ids) ? context.l10n.delete : context.l10n.addKeyframeAction, + label, + ), + isSelected: stack.keyed(ids), + color: stack.animated(ids) ? Theme.of(context).colorScheme.primary : null, + icon: Transform.rotate( + angle: math.pi / 4, + child: Icon( + stack.keyed(ids) ? AppIcons.squareFilled : AppIcons.square, + size: 12, + ), + ), + onPressed: enabled && ids.isNotEmpty ? () => onEdit(ids) : null, + ); + + Widget menu(BuildContext context, List ids, String label, String id) { + final offsets = stack.keyOffsets(ids); + final currentTick = stack.localTick; + final previous = offsets.where((t) => t < currentTick).lastOrNull; + final next = offsets.where((t) => t > currentTick).firstOrNull; + return AppDropdownMenu( + enabled: enabled, + builder: (context, toggle, focus) => IconButton( + key: ValueKey('$id-menu'), + focusNode: focus, + tooltip: context.l10n.keyframeSettings(label), + onPressed: enabled ? toggle : null, + icon: const Icon(AppIcons.more, size: 16), + ), + items: [ + AppMenuItem( + closeAncestors: false, + label: context.l10n.previousKeyframe(label), + onPressed: previous == null ? null : () => onSeek(previous), + ), + AppMenuItem( + closeAncestors: false, + label: context.l10n.nextKeyframe(label), + onPressed: next == null ? null : () => onSeek(next), + ), + for (final (mode, text) in [ + (ParameterInterpolation.linear, context.l10n.linear), + (ParameterInterpolation.hold, context.l10n.hold), + (ParameterInterpolation.easeIn, context.l10n.easeIn), + (ParameterInterpolation.easeOut, context.l10n.easeOut), + (ParameterInterpolation.easeInOut, context.l10n.easeInOut), + ]) + AppMenuItem( + closeAncestors: false, + label: text, + onPressed: stack.keyed(ids) + ? () => onEdit( + ids, + action: KeyframeAction.set, + interpolation: mode, + ) + : null, + ), + AppMenuItem( + closeAncestors: false, + label: context.l10n.removeAllKeyframes, + onPressed: stack.animated(ids) + ? () => onEdit(ids, action: KeyframeAction.clear) + : null, + ), + ], + ); + } +} diff --git a/lib/features/properties/property_layer_row.dart b/lib/features/properties/property_layer_row.dart new file mode 100644 index 0000000..065f674 --- /dev/null +++ b/lib/features/properties/property_layer_row.dart @@ -0,0 +1,288 @@ +import 'package:cutdex/l10n/l10n.dart'; +import 'package:cutdex_ui/icons.dart'; +import 'package:cutdex_ui/theme.dart'; +import 'package:cutdex_ui/widgets.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter/widget_previews.dart'; + +class PropertyLayerRow extends StatefulWidget { + const PropertyLayerRow({ + super.key, + required this.id, + required this.prefix, + required this.index, + required this.enabled, + required this.visible, + required this.label, + required this.tooltip, + required this.onVisibility, + required this.onRemove, + required this.menuItems, + required this.editor, + this.leading, + this.editorLabel, + }); + final String id, prefix, label, tooltip; + final int index; + final bool enabled, visible; + final VoidCallback onVisibility, onRemove; + final List menuItems; + final Widget editor; + final Widget? leading; + final String? editorLabel; + + @override + State createState() => _PropertyLayerRowState(); +} + +class _PropertyLayerRowState extends State { + final _menu = MenuController(); + final _focus = FocusNode(); + bool _hovered = false; + + @override + void dispose() { + _focus.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + final colors = theme.colorScheme; + return MenuAnchor( + controller: _menu, + childFocusNode: _focus, + clipBehavior: Clip.none, + // Place the editor beside the inspector, as in Figma's effects panel. + alignmentOffset: Offset( + -240 - 8 - AppTheme.propertySectionPadding(context).left, + 0, + ), + style: const MenuStyle( + alignment: AlignmentDirectional.topStart, + padding: WidgetStatePropertyAll(EdgeInsets.zero), + backgroundColor: WidgetStatePropertyAll(Colors.transparent), + surfaceTintColor: WidgetStatePropertyAll(Colors.transparent), + elevation: WidgetStatePropertyAll(0), + side: WidgetStatePropertyAll(BorderSide.none), + shape: WidgetStatePropertyAll( + RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(8)), + ), + ), + ), + onOpen: () => setState(() {}), + onClose: () => setState(() {}), + menuChildren: [ + SizedBox( + key: ValueKey('${widget.prefix}-editor-${widget.id}'), + width: 240, + child: Material( + color: colors.surfaceContainerLow, + surfaceTintColor: Colors.transparent, + elevation: 8, + shadowColor: colors.shadow.withValues(alpha: .25), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + side: BorderSide(color: colors.outlineVariant), + ), + clipBehavior: Clip.antiAlias, + child: Focus( + autofocus: true, + onKeyEvent: (_, event) { + if (event is KeyDownEvent && + event.logicalKey == LogicalKeyboardKey.escape) { + _menu.close(); + return KeyEventResult.handled; + } + return KeyEventResult.ignored; + }, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox( + height: 40, + child: Padding( + padding: const EdgeInsets.only(left: 16, right: 8), + child: Row( + children: [ + Expanded( + child: Text( + widget.editorLabel ?? widget.label, + style: AppTheme.propertySectionTitleStyle( + context, + ), + ), + ), + AppDropdownMenu( + builder: (context, toggle, focus) => IconButton( + focusNode: focus, + tooltip: widget.tooltip, + icon: const Icon(AppIcons.more, size: 16), + onPressed: toggle, + ), + items: widget.menuItems, + ), + IconButton( + key: ValueKey( + '${widget.prefix}-editor-close-${widget.id}', + ), + tooltip: context.l10n.close, + icon: const Icon(AppIcons.close, size: 16), + onPressed: _menu.close, + ), + ], + ), + ), + ), + Divider(height: 1, color: theme.dividerColor), + Padding( + padding: const EdgeInsets.fromLTRB(16, 12, 16, 12), + child: ConstrainedBox( + constraints: BoxConstraints( + maxHeight: (MediaQuery.sizeOf(context).height - 120) + .clamp(80, 600), + ), + child: SingleChildScrollView( + primary: false, + child: widget.editor, + ), + ), + ), + ], + ), + ), + ), + ), + ], + builder: (context, controller, child) => MouseRegion( + onEnter: (_) => setState(() => _hovered = true), + onExit: (_) => setState(() => _hovered = false), + child: SizedBox( + height: AppInspectorMetrics.row, + child: Row( + children: [ + ReorderableDragStartListener( + key: ValueKey('${widget.prefix}-drag-${widget.id}'), + index: widget.index, + enabled: widget.enabled, + child: MouseRegion( + cursor: widget.enabled + ? SystemMouseCursors.grab + : SystemMouseCursors.basic, + child: SizedBox( + width: 16, + child: Icon( + AppIcons.dragHandle, + size: 12, + color: _hovered + ? colors.onSurfaceVariant + : Colors.transparent, + ), + ), + ), + ), + Expanded( + child: TextButton( + key: ValueKey('${widget.prefix}-settings-${widget.id}'), + focusNode: _focus, + style: TextButton.styleFrom( + padding: const EdgeInsets.symmetric(horizontal: 4), + minimumSize: const Size(0, 24), + maximumSize: const Size(double.infinity, 24), + backgroundColor: controller.isOpen + ? theme.inputDecorationTheme.fillColor + : null, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(5), + ), + foregroundColor: widget.visible + ? colors.onSurface + : colors.onSurfaceVariant, + textStyle: AppTheme.inputTextStyle(context), + ), + onPressed: () => controller.isOpen + ? controller.close() + : controller.open(), + child: Row( + children: [ + widget.leading ?? + const Icon(PhosphorIconsRegular.sun, size: 16), + const SizedBox(width: 8), + Expanded( + child: Text( + widget.label, + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + ), + ], + ), + ), + ), + IconButton( + key: ValueKey('${widget.prefix}-enabled-${widget.id}'), + tooltip: widget.visible + ? context.l10n.disable + : context.l10n.enable, + icon: Icon( + widget.visible + ? Icons.visibility_outlined + : Icons.visibility_off_outlined, + size: 16, + ), + onPressed: widget.enabled ? widget.onVisibility : null, + ), + IconButton( + key: ValueKey('${widget.prefix}-remove-${widget.id}'), + tooltip: context.l10n.delete, + icon: const Icon(AppIcons.remove, size: 16), + onPressed: widget.enabled ? widget.onRemove : null, + ), + ], + ), + ), + ), + ); + } +} + +@Preview(name: 'Effect row / desktop', size: Size(560, 480)) +Widget effectRowPreview() => MaterialApp( + localizationsDelegates: AppLocalizations.localizationsDelegates, + supportedLocales: AppLocalizations.supportedLocales, + theme: AppTheme.propertiesPanelTheme( + AppTheme.desktopWorkspaceTheme(AppTheme.penDark), + ), + home: Scaffold( + body: Align( + alignment: Alignment.topRight, + child: SizedBox( + width: 240, + child: ReorderableListView( + shrinkWrap: true, + onReorderItem: (_, _) {}, + buildDefaultDragHandles: false, + children: [ + PropertyLayerRow( + key: const ValueKey('preview-effect'), + id: 'preview', + prefix: 'effect', + index: 0, + enabled: true, + visible: true, + label: 'Drop shadow', + tooltip: 'Effects', + onVisibility: () {}, + onRemove: () {}, + menuItems: const [], + editor: const Text('X 0 Y 4 Blur 8'), + ), + ], + ), + ), + ), + ), +); diff --git a/lib/features/properties/shadow_properties.dart b/lib/features/properties/shadow_properties.dart deleted file mode 100644 index eae4ae7..0000000 --- a/lib/features/properties/shadow_properties.dart +++ /dev/null @@ -1,1070 +0,0 @@ -import 'dart:math' as math; - -import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_ui/icons.dart'; -import 'package:cutdex_ui/theme.dart'; -import 'package:cutdex_ui/widgets.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; - -import '../../workspace/timeline_session.dart'; -import '../../shared/state/operation_scope.dart'; -import '../preview/preview_panel.dart'; -import 'property_number_input.dart'; - -class ShadowProperties extends ConsumerStatefulWidget { - const ShadowProperties({ - super.key, - required this.projectId, - required this.timelineId, - required this.session, - required this.sequence, - required this.clip, - }); - final String projectId, timelineId; - final EditorTimelineSession session; - final SequenceId sequence; - final ElementId clip; - @override - ConsumerState createState() => _ShadowPropertiesState(); -} - -class _ShadowPropertiesState extends ConsumerState { - Object get _identity => ( - widget.session, - widget.sequence, - widget.clip, - widget.projectId, - widget.timelineId, - ); - late final _operations = OperationScope(_identity); - bool _saving = false; - String? _error; - @override - void didUpdateWidget(covariant ShadowProperties oldWidget) { - super.didUpdateWidget(oldWidget); - _operations.bind(_identity); - if (oldWidget.session != widget.session || - oldWidget.sequence != widget.sequence || - oldWidget.clip != widget.clip) { - _saving = false; - _error = null; - } - } - - @override - void dispose() { - _operations.dispose(); - super.dispose(); - } - - ({ClipShadowStack stack, int start})? _current() { - final view = widget.session.view(widget.sequence); - final query = view.version.kernelVersion.query(); - final handle = query.elementById(widget.clip); - if (handle == null) return null; - final start = query.absoluteStart(handle); - return ( - stack: ClipShadowStack(query.element(handle), view.playheadTick - start), - start: start, - ); - } - - Future _edit( - PreviewController? preview, - void Function(EditorCommandService commands, int tick) action, { - bool seek = false, - }) async { - if (_saving || - preview?.transforms.hasPending == true || - widget.session.activeSequenceId != widget.sequence) { - return false; - } - final guard = _operations.begin(); - final session = widget.session; - final sequence = widget.sequence; - final view = session.view(sequence); - final version = view.version.kernelVersion; - final tick = view.playheadTick; - setState(() { - _saving = true; - _error = null; - }); - try { - await preview?.pauseForCanvasInteraction(); - if (!mounted || - !guard() || - view.playheadTick != tick || - !identical(view.version.kernelVersion, version) || - session.activeSequenceId != sequence) { - return false; - } - if (seek) { - action(session.commands, tick); - } else { - session.runEdit( - 'editShadow', - sequence, - () => action(session.commands, tick), - context: { - 'clipIds': [widget.clip.value], - 'entryPoint': 'property', - 'playheadTick': tick, - }, - ); - } - return true; - } catch (_) { - if (mounted && guard()) { - setState(() => _error = context.l10n.updateShadowFailed); - } - return false; - } finally { - if (mounted && guard()) setState(() => _saving = false); - } - } - - @override - Widget build(BuildContext context) { - final preview = ref - .watch(editorPreviewProvider(widget.projectId, widget.timelineId)) - .asData - ?.value; - return ListenableBuilder( - listenable: widget.session.view(widget.sequence), - builder: (context, _) { - final current = _current(); - if (current == null) return const SizedBox.shrink(); - final stack = current.stack; - final layers = stack.layers; - final enabled = - !_saving && - stack.containsPlayhead && - preview?.transforms.hasPending != true; - Future edit(void Function(EditorCommandService, int) action) => - _edit(preview, action); - Future keys({ - KeyframeAction? action, - ParameterInterpolation? interpolation, - }) => edit( - (c, t) => c.editKeyframeChannel( - sequence: widget.sequence, - clip: widget.clip, - tick: t, - parameterIds: stack.parameterIds, - action: action, - interpolation: interpolation, - ), - ); - Widget key = IconButton( - key: const ValueKey('shadow-key'), - tooltip: context.l10n.toggleKeyframe( - stack.keyed ? context.l10n.delete : context.l10n.addKeyframeAction, - context.l10n.shadow, - ), - isSelected: stack.keyed, - color: stack.animated ? Theme.of(context).colorScheme.primary : null, - icon: Transform.rotate( - angle: math.pi / 4, - child: Icon( - stack.keyed ? AppIcons.squareFilled : AppIcons.square, - size: 12, - ), - ), - onPressed: enabled && layers.isNotEmpty ? keys : null, - ); - Widget number( - ClipShadowLayer layer, - String field, - String? label, - double value, - ClipShadow Function(ClipShadow, double) change, { - double factor = 1, - String? unit, - bool inlineLabel = true, - }) { - final (minimum, maximum) = ClipShadow.range(field); - return PropertyNumberInput( - key: ValueKey('shadow-${layer.id}-$field'), - label: label, - inlineLabel: inlineLabel, - unit: unit, - value: value * factor, - enabled: enabled && layer.enabled, - readOnly: false, - scrubbing: false, - editContext: (_identity, layer.id), - onScrubUpdate: (_) {}, - onScrubEnd: () {}, - onScrubCancel: () {}, - submit: (v) => - !v.isFinite || v / factor < minimum || v / factor > maximum - ? Future.value(false) - : edit((c, t) { - final live = _current()!.stack.layers.firstWhere( - (l) => l.id == layer.id, - ); - c.setShadow( - sequence: widget.sequence, - clip: widget.clip, - tick: t, - shadowId: layer.id, - value: change(live.shadow, v / factor), - ); - }), - ); - } - - final times = stack.keyOffsets.map((t) => t + current.start).toList(); - final tick = widget.session.view(widget.sequence).playheadTick; - final previous = times.where((t) => t < tick).lastOrNull; - final next = times.where((t) => t > tick).firstOrNull; - Widget seekButton(int? target, bool forward) => IconButton( - key: ValueKey('shadow-key-${forward ? 'next' : 'previous'}'), - tooltip: forward - ? context.l10n.nextKeyframe(context.l10n.shadow) - : context.l10n.previousKeyframe(context.l10n.shadow), - icon: Icon( - forward ? AppIcons.chevronRight : AppIcons.chevronLeft, - size: 16, - ), - onPressed: enabled && target != null - ? () => _edit( - preview, - (_, _) => widget.session.view(widget.sequence).seekTo(target), - seek: true, - ) - : null, - ); - return AppPropertySection( - bottomSpacing: layers.isEmpty ? 0 : null, - child: AppPropertyGroup( - label: context.l10n.shadow, - labelWidget: layers.isEmpty - ? Text( - context.l10n.shadow, - style: AppTheme.propertyLabelStyle(context), - ) - : null, - padChild: false, - actions: [ - key, - IconButton( - key: const ValueKey('shadow-add'), - tooltip: context.l10n.addShadow, - icon: const Icon(AppIcons.add, size: 16), - onPressed: enabled && layers.length < ClipShadowStack.maxLayers - ? () => edit( - (c, t) => c.addShadow( - sequence: widget.sequence, - clip: widget.clip, - tick: t, - shadowId: c.newShadowId(), - ), - ) - : null, - ), - ], - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - if (stack.animated) - Row( - children: [ - Text( - context.l10n.keyframeCount(times.length), - style: Theme.of(context).textTheme.bodySmall, - ), - const Spacer(), - seekButton(previous, false), - seekButton(next, true), - AppDropdownMenu( - enabled: enabled, - builder: (context, toggle, focus) => IconButton( - focusNode: focus, - tooltip: context.l10n.keyframeSettings( - context.l10n.shadow, - ), - onPressed: toggle, - icon: const Icon(AppIcons.more, size: 16), - ), - items: [ - for (final (mode, label) in [ - ( - ParameterInterpolation.linear, - context.l10n.linear, - ), - (ParameterInterpolation.hold, context.l10n.hold), - ( - ParameterInterpolation.easeIn, - context.l10n.easeIn, - ), - ( - ParameterInterpolation.easeOut, - context.l10n.easeOut, - ), - ( - ParameterInterpolation.easeInOut, - context.l10n.easeInOut, - ), - ]) - AppMenuItem( - label: label, - onPressed: stack.keyed - ? () => keys( - action: KeyframeAction.set, - interpolation: mode, - ) - : null, - ), - AppMenuItem( - label: context.l10n.removeAllKeyframes, - onPressed: () => keys(action: KeyframeAction.clear), - ), - ], - ), - ], - ), - ReorderableListView( - shrinkWrap: true, - primary: false, - padding: EdgeInsets.zero, - physics: const NeverScrollableScrollPhysics(), - buildDefaultDragHandles: false, - onReorderItem: (oldIndex, newIndex) { - if (!enabled) return; - final ids = layers.map((l) => l.id).toList(); - ids.insert(newIndex, ids.removeAt(oldIndex)); - edit( - (c, t) => c.configureShadows( - sequence: widget.sequence, - clip: widget.clip, - tick: t, - order: ids, - ), - ); - }, - proxyDecorator: (child, index, animation) => Material( - color: Theme.of(context).colorScheme.surfaceContainerLow, - child: child, - ), - children: [ - for (var i = 0; i < layers.length; i++) - Builder( - key: ValueKey((_identity, layers[i].id)), - builder: (context) { - final layer = layers[i]; - final s = layer.shadow; - final color = Color.from( - alpha: 1, - red: s.red, - green: s.green, - blue: s.blue, - ); - final hex = [s.red, s.green, s.blue] - .map( - (v) => (v * 255) - .round() - .toRadixString(16) - .padLeft(2, '0'), - ) - .join() - .toUpperCase(); - void reorder(int direction) { - final ids = layers.map((l) => l.id).toList(); - final other = i + direction; - final temp = ids[i]; - ids[i] = ids[other]; - ids[other] = temp; - edit( - (c, t) => c.configureShadows( - sequence: widget.sequence, - clip: widget.clip, - tick: t, - order: ids, - ), - ); - } - - return _ShadowLayerRow( - key: ValueKey('shadow-layer-${layer.id}'), - id: layer.id, - index: i, - enabled: enabled, - visible: layer.enabled, - label: context.l10n.shadow, - tooltip: context.l10n.shadowLayer(i + 1), - onVisibility: () => edit( - (c, t) => c.configureShadows( - sequence: widget.sequence, - clip: widget.clip, - tick: t, - shadowId: layer.id, - enabled: !layer.enabled, - ), - ), - onRemove: () => edit( - (c, t) => c.removeShadow( - sequence: widget.sequence, - clip: widget.clip, - tick: t, - shadowId: layer.id, - ), - ), - menuItems: [ - AppMenuItem( - label: context.l10n.moveShadowUp, - onPressed: enabled && i > 0 - ? () => reorder(-1) - : null, - ), - AppMenuItem( - label: context.l10n.moveShadowDown, - onPressed: enabled && i < layers.length - 1 - ? () => reorder(1) - : null, - ), - ], - editor: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Text( - context.l10n.position, - style: AppTheme.propertyLabelStyle(context), - ), - AppPropertyRow( - reserveTrailing: false, - children: [ - number( - layer, - 'x', - 'X', - s.x, - (s, v) => s.copyWith(x: v), - ), - number( - layer, - 'y', - 'Y', - s.y, - (s, v) => s.copyWith(y: v), - ), - ], - ), - const SizedBox(height: 4), - AppPropertyRow( - reserveTrailing: false, - children: [ - number( - layer, - 'blur', - context.l10n.shadowBlur, - s.blur, - (s, v) => s.copyWith(blur: v), - inlineLabel: false, - ), - number( - layer, - 'spread', - context.l10n.shadowSpread, - s.spread, - (s, v) => s.copyWith(spread: v), - inlineLabel: false, - ), - ], - ), - const SizedBox( - height: AppInspectorMetrics.rowGap, - ), - Text( - context.l10n.color, - style: AppTheme.propertyLabelStyle(context), - ), - AppPropertyRow( - reserveTrailing: false, - flexes: const [2, 1], - children: [ - _ShadowColorInput( - key: ValueKey('shadow-${layer.id}-color'), - value: hex, - color: color, - enabled: enabled && layer.enabled, - editContext: (_identity, layer.id), - submit: (v) => edit((c, t) { - final live = _current()!.stack.layers - .firstWhere((l) => l.id == layer.id) - .shadow; - c.setShadow( - sequence: widget.sequence, - clip: widget.clip, - tick: t, - shadowId: layer.id, - value: live.copyWith( - red: ((v >> 16) & 255) / 255, - green: ((v >> 8) & 255) / 255, - blue: (v & 255) / 255, - ), - ); - }), - ), - number( - layer, - 'opacity', - null, - s.opacity, - (s, v) => s.copyWith(opacity: v), - factor: 100, - unit: '%', - ), - ], - ), - ], - ), - ); - }, - ), - ], - ), - if (_error != null) - Text( - _error!, - style: TextStyle( - color: Theme.of(context).colorScheme.error, - ), - ), - ], - ), - ), - ); - }, - ); - } -} - -class _ShadowLayerRow extends StatefulWidget { - const _ShadowLayerRow({ - super.key, - required this.id, - required this.index, - required this.enabled, - required this.visible, - required this.label, - required this.tooltip, - required this.onVisibility, - required this.onRemove, - required this.menuItems, - required this.editor, - }); - final String id, label, tooltip; - final int index; - final bool enabled, visible; - final VoidCallback onVisibility, onRemove; - final List menuItems; - final Widget editor; - - @override - State<_ShadowLayerRow> createState() => _ShadowLayerRowState(); -} - -class _ShadowLayerRowState extends State<_ShadowLayerRow> { - final _menu = MenuController(); - final _focus = FocusNode(); - bool _hovered = false; - - @override - void dispose() { - _focus.dispose(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - final theme = Theme.of(context); - final colors = theme.colorScheme; - return MenuAnchor( - controller: _menu, - childFocusNode: _focus, - clipBehavior: Clip.none, - // Place the editor beside the inspector, as in Figma's effects panel. - alignmentOffset: Offset( - -240 - 8 - AppTheme.propertySectionPadding(context).left, - 0, - ), - style: const MenuStyle( - alignment: AlignmentDirectional.topStart, - padding: WidgetStatePropertyAll(EdgeInsets.zero), - backgroundColor: WidgetStatePropertyAll(Colors.transparent), - surfaceTintColor: WidgetStatePropertyAll(Colors.transparent), - elevation: WidgetStatePropertyAll(0), - side: WidgetStatePropertyAll(BorderSide.none), - shape: WidgetStatePropertyAll( - RoundedRectangleBorder( - borderRadius: BorderRadius.all(Radius.circular(8)), - ), - ), - ), - onOpen: () => setState(() {}), - onClose: () => setState(() {}), - menuChildren: [ - SizedBox( - key: ValueKey('shadow-editor-${widget.id}'), - width: 240, - child: Material( - color: colors.surfaceContainerLow, - surfaceTintColor: Colors.transparent, - elevation: 8, - shadowColor: colors.shadow.withValues(alpha: .25), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8), - side: BorderSide(color: colors.outlineVariant), - ), - clipBehavior: Clip.antiAlias, - child: Focus( - autofocus: true, - onKeyEvent: (_, event) { - if (event is KeyDownEvent && - event.logicalKey == LogicalKeyboardKey.escape) { - _menu.close(); - return KeyEventResult.handled; - } - return KeyEventResult.ignored; - }, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - SizedBox( - height: 40, - child: Padding( - padding: const EdgeInsets.only(left: 16, right: 8), - child: Row( - children: [ - Expanded( - child: Text( - widget.label, - style: AppTheme.propertySectionTitleStyle( - context, - ), - ), - ), - AppDropdownMenu( - builder: (context, toggle, focus) => IconButton( - focusNode: focus, - tooltip: widget.tooltip, - icon: const Icon(AppIcons.more, size: 16), - onPressed: toggle, - ), - items: widget.menuItems, - ), - IconButton( - key: ValueKey('shadow-editor-close-${widget.id}'), - tooltip: context.l10n.close, - icon: const Icon(AppIcons.close, size: 16), - onPressed: _menu.close, - ), - ], - ), - ), - ), - Divider(height: 1, color: theme.dividerColor), - Padding( - padding: const EdgeInsets.fromLTRB(16, 12, 16, 12), - child: widget.editor, - ), - ], - ), - ), - ), - ), - ], - builder: (context, controller, child) => MouseRegion( - onEnter: (_) => setState(() => _hovered = true), - onExit: (_) => setState(() => _hovered = false), - child: SizedBox( - height: AppInspectorMetrics.row, - child: Row( - children: [ - ReorderableDragStartListener( - key: ValueKey('shadow-drag-${widget.id}'), - index: widget.index, - enabled: widget.enabled, - child: MouseRegion( - cursor: widget.enabled - ? SystemMouseCursors.grab - : SystemMouseCursors.basic, - child: SizedBox( - width: 16, - child: Icon( - AppIcons.dragHandle, - size: 12, - color: _hovered - ? colors.onSurfaceVariant - : Colors.transparent, - ), - ), - ), - ), - Expanded( - child: TextButton( - key: ValueKey('shadow-settings-${widget.id}'), - focusNode: _focus, - style: TextButton.styleFrom( - padding: const EdgeInsets.symmetric(horizontal: 4), - minimumSize: const Size(0, 24), - maximumSize: const Size(double.infinity, 24), - backgroundColor: controller.isOpen - ? theme.inputDecorationTheme.fillColor - : null, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(5), - ), - foregroundColor: widget.visible - ? colors.onSurface - : colors.onSurfaceVariant, - textStyle: AppTheme.inputTextStyle(context), - ), - onPressed: () => controller.isOpen - ? controller.close() - : controller.open(), - child: Row( - children: [ - const Icon(PhosphorIconsRegular.sun, size: 16), - const SizedBox(width: 8), - Expanded( - child: Text( - widget.label, - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - ), - ], - ), - ), - ), - IconButton( - key: ValueKey('shadow-enabled-${widget.id}'), - tooltip: widget.visible - ? context.l10n.disable - : context.l10n.enable, - icon: Icon( - widget.visible - ? Icons.visibility_outlined - : Icons.visibility_off_outlined, - size: 16, - ), - onPressed: widget.enabled ? widget.onVisibility : null, - ), - IconButton( - key: ValueKey('shadow-remove-${widget.id}'), - tooltip: context.l10n.delete, - icon: const Icon(AppIcons.remove, size: 16), - onPressed: widget.enabled ? widget.onRemove : null, - ), - ], - ), - ), - ), - ); - } -} - -class _ShadowColorInput extends StatefulWidget { - const _ShadowColorInput({ - super.key, - required this.value, - required this.color, - required this.enabled, - required this.editContext, - required this.submit, - }); - final String value; - final Color color; - final bool enabled; - final Object editContext; - final Future Function(int) submit; - @override - State<_ShadowColorInput> createState() => _ShadowColorInputState(); -} - -class _ShadowColorInputState extends State<_ShadowColorInput> { - late final _text = TextEditingController(text: widget.value); - final _focus = FocusNode(); - bool _dirty = false; - String? _error; - late final _operations = OperationScope(widget.editContext); - @override - void initState() { - super.initState(); - _focus.addListener(_blur); - } - - void _blur() { - if (!_focus.hasFocus) _submit(); - } - - Future _submit() async { - if (!_dirty || !widget.enabled) return; - final value = _text.text.replaceFirst('#', ''); - if (!RegExp(r'^[A-Fa-f0-9]{6}$').hasMatch(value)) { - setState(() => _error = context.l10n.invalidNumber); - return; - } - _dirty = false; - final guard = _operations.begin(); - final ok = await widget.submit(int.parse(value, radix: 16)); - if (!mounted || !guard()) return; - setState(() { - _error = ok ? null : context.l10n.notApplied; - _text.text = widget.value; - }); - } - - @override - void didUpdateWidget(covariant _ShadowColorInput oldWidget) { - super.didUpdateWidget(oldWidget); - _operations.bind(widget.editContext); - if (oldWidget.editContext != widget.editContext || !widget.enabled) { - _dirty = false; - _error = null; - } - if (!_dirty && _text.text != widget.value) _text.text = widget.value; - } - - @override - void dispose() { - _operations.dispose(); - _focus.removeListener(_blur); - _focus.dispose(); - _text.dispose(); - super.dispose(); - } - - @override - Widget build(BuildContext context) => AppTextField( - controller: _text, - focusNode: _focus, - enabled: widget.enabled, - errorText: _error, - leading: AppPopover( - width: 240, - borderRadius: 8, - padding: const EdgeInsets.all(16), - backgroundColor: Theme.of(context).colorScheme.surfaceContainerLow, - builder: (context, toggle) => IconButton( - key: const ValueKey('shadow-color-swatch'), - tooltip: context.l10n.color, - onPressed: widget.enabled ? toggle : null, - padding: EdgeInsets.zero, - icon: Container( - width: 14, - height: 14, - decoration: BoxDecoration( - color: widget.color, - borderRadius: BorderRadius.circular(2), - border: Border.all( - color: Theme.of(context).colorScheme.outlineVariant, - ), - ), - ), - ), - child: _ShadowColorPicker( - color: widget.color, - enabled: widget.enabled, - submit: (color) => widget.submit(color.toARGB32() & 0xFFFFFF), - ), - ), - onChanged: (_) { - _operations.invalidate(); - _dirty = true; - if (_error != null) setState(() => _error = null); - }, - onEditingComplete: () {}, - onSubmitted: (_) => _submit(), - ); -} - -class _ShadowColorPicker extends StatefulWidget { - const _ShadowColorPicker({ - required this.color, - required this.enabled, - required this.submit, - }); - final Color color; - final bool enabled; - final Future Function(Color) submit; - - @override - State<_ShadowColorPicker> createState() => _ShadowColorPickerState(); -} - -class _ShadowColorPickerState extends State<_ShadowColorPicker> { - late HSVColor _color = HSVColor.fromColor(widget.color); - - @override - void didUpdateWidget(covariant _ShadowColorPicker oldWidget) { - super.didUpdateWidget(oldWidget); - if (widget.color != oldWidget.color) { - _color = HSVColor.fromColor(widget.color); - } - } - - Future _commit() async { - if (!widget.enabled) return; - await widget.submit(_color.toColor()); - if (mounted) setState(() => _color = HSVColor.fromColor(widget.color)); - } - - @override - Widget build(BuildContext context) => Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Text( - context.l10n.color, - style: AppTheme.propertySectionTitleStyle(context), - ), - const SizedBox(height: 12), - SizedBox( - height: 140, - child: LayoutBuilder( - builder: (context, constraints) { - final width = constraints.maxWidth; - const height = 140.0; - void update(Offset position) { - if (!widget.enabled) return; - setState( - () => _color = _color - .withSaturation((position.dx / width).clamp(0, 1)) - .withValue((1 - position.dy / height).clamp(0, 1)), - ); - } - - return Semantics( - label: context.l10n.color, - child: GestureDetector( - key: const ValueKey('shadow-color-plane'), - onTapDown: (details) => update(details.localPosition), - onTapUp: (_) => _commit(), - onPanStart: (details) => update(details.localPosition), - onPanUpdate: (details) => update(details.localPosition), - onPanEnd: (_) => _commit(), - child: ClipRRect( - borderRadius: BorderRadius.circular(5), - child: SizedBox( - height: height, - child: Stack( - children: [ - Positioned.fill( - child: ColoredBox( - color: HSVColor.fromAHSV( - 1, - _color.hue, - 1, - 1, - ).toColor(), - ), - ), - const Positioned.fill( - child: DecoratedBox( - decoration: BoxDecoration( - gradient: LinearGradient( - colors: [Colors.white, Color(0x00FFFFFF)], - ), - ), - ), - ), - const Positioned.fill( - child: DecoratedBox( - decoration: BoxDecoration( - gradient: LinearGradient( - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - colors: [Colors.transparent, Colors.black], - ), - ), - ), - ), - Positioned( - left: (_color.saturation * width - 6).clamp( - 0, - width - 12, - ), - top: ((1 - _color.value) * height - 6).clamp( - 0, - height - 12, - ), - child: Container( - width: 12, - height: 12, - decoration: BoxDecoration( - shape: BoxShape.circle, - border: Border.all(color: Colors.white, width: 2), - boxShadow: const [ - BoxShadow(color: Colors.black54, blurRadius: 2), - ], - ), - ), - ), - ], - ), - ), - ), - ), - ); - }, - ), - ), - const SizedBox(height: 8), - SizedBox( - height: 24, - child: Stack( - alignment: Alignment.center, - children: [ - Container( - height: 12, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(6), - gradient: const LinearGradient( - colors: [ - Color(0xFFFF0000), - Color(0xFFFFFF00), - Color(0xFF00FF00), - Color(0xFF00FFFF), - Color(0xFF0000FF), - Color(0xFFFF00FF), - Color(0xFFFF0000), - ], - ), - ), - ), - SliderTheme( - data: SliderTheme.of(context).copyWith( - padding: EdgeInsets.zero, - trackHeight: 12, - activeTrackColor: Colors.transparent, - inactiveTrackColor: Colors.transparent, - thumbColor: Colors.white, - thumbShape: const RoundSliderThumbShape(enabledThumbRadius: 6), - overlayShape: SliderComponentShape.noOverlay, - ), - child: Slider( - key: const ValueKey('shadow-color-hue'), - min: 0, - max: 360, - value: _color.hue, - onChanged: widget.enabled - ? (hue) => setState(() => _color = _color.withHue(hue)) - : null, - onChangeEnd: (_) => _commit(), - ), - ), - ], - ), - ), - ], - ); -} diff --git a/lib/features/properties/stroke_list.dart b/lib/features/properties/stroke_list.dart new file mode 100644 index 0000000..4cf248a --- /dev/null +++ b/lib/features/properties/stroke_list.dart @@ -0,0 +1,136 @@ +import 'package:cutdex/l10n/l10n.dart'; +import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_ui/icons.dart'; +import 'package:cutdex_ui/widgets.dart'; +import 'package:flutter/material.dart'; + +import 'property_keyframe_controls.dart'; +import 'property_layer_row.dart'; + +class StrokeList extends StatelessWidget { + const StrokeList({ + super.key, + required this.stack, + required this.enabled, + required this.keyframes, + required this.onAdd, + required this.onReorder, + required this.onToggle, + required this.onRemove, + required this.editorBuilder, + this.error, + }); + final ClipStrokeStack stack; + final bool enabled; + final PropertyKeyframeControls keyframes; + final VoidCallback onAdd; + final void Function(List) onReorder; + final void Function(ClipStrokeLayer) onToggle, onRemove; + final Widget Function(ClipStrokeLayer) editorBuilder; + final String? error; + + @override + Widget build(BuildContext context) { + final layers = stack.layers; + return AppPropertySection( + bottomSpacing: layers.isEmpty ? 0 : null, + child: AppPropertyGroup( + label: context.l10n.strokes, + padChild: false, + actions: [ + keyframes.button( + context, + stack.parameterIds, + context.l10n.strokes, + 'strokes-key', + ), + IconButton( + key: const ValueKey('stroke-add'), + tooltip: context.l10n.addStroke, + onPressed: enabled && stack.canAdd ? onAdd : null, + icon: const Icon(AppIcons.add, size: 16), + ), + ], + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + ReorderableListView( + shrinkWrap: true, + primary: false, + padding: EdgeInsets.zero, + physics: const NeverScrollableScrollPhysics(), + buildDefaultDragHandles: false, + onReorderItem: (from, to) { + if (!enabled) return; + final order = layers.map((l) => l.id).toList(); + order.insert(to, order.removeAt(from)); + onReorder(order); + }, + children: [ + for (var i = 0; i < layers.length; i++) + PropertyLayerRow( + key: ValueKey('stroke-layer-${layers[i].id}'), + id: layers[i].id, + prefix: 'stroke', + index: i, + enabled: enabled, + visible: layers[i].enabled, + label: + '${layers[i].values['width']!.toStringAsFixed(layers[i].values['width']! % 1 == 0 ? 0 : 1)} · ${(layers[i].values['opacity']! * 100).round()}%', + editorLabel: context.l10n.stroke, + leading: Container( + width: 16, + height: 16, + decoration: BoxDecoration( + color: Color.from( + alpha: layers[i].values['opacity']!, + red: layers[i].values['color.r']!, + green: layers[i].values['color.g']!, + blue: layers[i].values['color.b']!, + ), + borderRadius: BorderRadius.circular(3), + border: Border.all( + color: Theme.of(context).colorScheme.outlineVariant, + ), + ), + ), + tooltip: context.l10n.strokes, + onVisibility: () => onToggle(layers[i]), + onRemove: () => onRemove(layers[i]), + menuItems: [ + for (final (delta, label) in [ + (-1, context.l10n.effectMoveUp), + (1, context.l10n.effectMoveDown), + ]) + AppMenuItem( + label: label, + closeAncestors: false, + onPressed: + !enabled || + i + delta < 0 || + i + delta >= layers.length + ? null + : () { + final order = layers + .map((l) => l.id) + .toList(); + order.insert(i + delta, order.removeAt(i)); + onReorder(order); + }, + ), + ], + editor: editorBuilder(layers[i]), + ), + ], + ), + if (error != null) + Text( + error!, + style: TextStyle(color: Theme.of(context).colorScheme.error), + ), + ], + ), + ), + ); + } +} diff --git a/lib/features/properties/stroke_parameter_editor.dart b/lib/features/properties/stroke_parameter_editor.dart new file mode 100644 index 0000000..3a080ca --- /dev/null +++ b/lib/features/properties/stroke_parameter_editor.dart @@ -0,0 +1,226 @@ +import 'package:cutdex/l10n/l10n.dart'; +import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_ui/theme.dart'; +import 'package:cutdex_ui/widgets.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/widget_previews.dart'; +import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_sdk/timeline/engine.dart'; + +import 'property_keyframe_controls.dart'; +import 'property_color_input.dart'; +import 'property_number_input.dart'; + +class StrokeParameterEditor extends StatelessWidget { + const StrokeParameterEditor({ + super.key, + required this.layer, + required this.stack, + required this.enabled, + required this.editContext, + required this.keyframes, + required this.onChange, + }); + final ClipStrokeLayer layer; + final ClipStrokeStack stack; + final bool enabled; + final Object editContext; + final PropertyKeyframeControls keyframes; + final Future Function(Map) onChange; + + String _fieldLabel(BuildContext context, String field) => switch (field) { + 'width' => context.l10n.strokeWidth, + 'opacity' => context.l10n.shadowOpacity, + 'dashLength' => context.l10n.strokeDashLength, + 'dashGap' => context.l10n.strokeDashGap, + _ => field, + }; + Widget _number(BuildContext context, String field) { + final label = _fieldLabel(context, field); + final structural = StrokeParameterTarget.structural.contains(field); + final percentage = { + 'opacity', + 'density', + 'lightIntensity', + 'splay', + }.contains(field); + final factor = percentage ? 100.0 : 1.0; + final definition = StrokeParameterTarget.definition(field); + return Padding( + padding: const EdgeInsets.only(bottom: 4), + child: Row( + children: [ + Expanded( + child: PropertyNumberInput( + key: ValueKey('stroke-${layer.id}-$field'), + label: label, + value: layer.values[field]! * factor, + unit: percentage ? '%' : null, + enabled: enabled && layer.enabled, + readOnly: false, + scrubbing: false, + editContext: (editContext, layer.id), + onScrubUpdate: (_) {}, + onScrubEnd: () {}, + onScrubCancel: () {}, + submit: (v) => !definition.accepts(v / factor) + ? Future.value(false) + : onChange({field: v / factor}), + ), + ), + if (!structural) ...[ + keyframes.button( + context, + [layer.target(field)], + label, + 'stroke-${layer.id}-$field-key', + ), + keyframes.menu( + context, + [layer.target(field)], + label, + 'stroke-${layer.id}-$field', + ), + ] else + const SizedBox(width: 48), + ], + ), + ); + } + + Widget _color(BuildContext context, String prefix, String label) { + final fields = ['${prefix}r', '${prefix}g', '${prefix}b']; + final values = fields.map((f) => layer.values[f]!).toList(); + final hex = values + .map((v) => (v * 255).round().toRadixString(16).padLeft(2, '0')) + .join() + .toUpperCase(); + final ids = fields.map(layer.target).toList(); + return Padding( + padding: const EdgeInsets.only(bottom: 4), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Text(label, style: AppTheme.propertyLabelStyle(context)), + Row( + children: [ + Expanded( + child: PropertyColorInput( + key: ValueKey('stroke-${layer.id}-$prefix'), + value: hex, + color: Color.from( + alpha: 1, + red: values[0], + green: values[1], + blue: values[2], + ), + enabled: enabled && layer.enabled, + editContext: (editContext, layer.id), + submit: (rgb) => onChange({ + fields[0]: ((rgb >> 16) & 255) / 255, + fields[1]: ((rgb >> 8) & 255) / 255, + fields[2]: (rgb & 255) / 255, + }), + ), + ), + keyframes.button( + context, + ids, + label, + 'stroke-${layer.id}-$prefix-key', + ), + keyframes.menu(context, ids, label, 'stroke-${layer.id}-$prefix'), + ], + ), + ], + ), + ); + } + + Widget _mode(BuildContext context, String field, List labels) => + Padding( + padding: const EdgeInsets.only(bottom: 8), + child: SizedBox( + height: 24, + child: AppSelect( + closeAncestors: false, + key: ValueKey('stroke-${layer.id}-$field'), + value: layer.values[field]!.round(), + label: field == 'alignment' + ? context.l10n.alignment + : context.l10n.strokeStyle, + emptyLabel: context.l10n.strokes, + options: [ + for (var i = 0; i < labels.length; i++) + AppSelectOption(i, labels[i]), + ], + onChanged: enabled && layer.enabled + ? (v) => onChange({field: v.toDouble()}) + : null, + ), + ), + ); + @override + Widget build(BuildContext context) => Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + _color(context, 'color.', context.l10n.color), + _number(context, 'opacity'), + _number(context, 'width'), + _mode(context, 'alignment', [ + context.l10n.strokeInside, + context.l10n.strokeCenter, + context.l10n.strokeOutside, + ]), + _mode(context, 'style', [ + context.l10n.strokeSolid, + context.l10n.strokeDashed, + ]), + if (layer.style == ClipStrokeStyle.dashed) ...[ + _number(context, 'dashLength'), + _number(context, 'dashGap'), + ], + ], + ); +} + +@Preview(name: 'Stroke editor / desktop', size: Size(240, 360)) +Widget strokeEditorPreview() { + final stack = ClipStrokeStack( + ElementRecord( + id: ElementId('preview'), + structure: ElementStructure.content, + duration: 1, + sourceStart: 0, + sourceDuration: 1, + enabled: true, + ), + 0, + ); + return MaterialApp( + localizationsDelegates: AppLocalizations.localizationsDelegates, + supportedLocales: AppLocalizations.supportedLocales, + theme: AppTheme.propertiesPanelTheme( + AppTheme.desktopWorkspaceTheme(AppTheme.penDark), + ), + home: Scaffold( + body: Padding( + padding: const EdgeInsets.all(16), + child: StrokeParameterEditor( + layer: const ClipStrokeLayer(id: 'preview', values: strokeDefaults), + stack: stack, + enabled: true, + editContext: 'preview', + keyframes: PropertyKeyframeControls( + stack: stack, + enabled: true, + onEdit: (ids, {action, interpolation}) async => true, + onSeek: (_) async => true, + ), + onChange: (_) async => true, + ), + ), + ), + ); +} diff --git a/lib/features/properties/stroke_properties.dart b/lib/features/properties/stroke_properties.dart new file mode 100644 index 0000000..23fccbf --- /dev/null +++ b/lib/features/properties/stroke_properties.dart @@ -0,0 +1,162 @@ +import 'package:cutdex/l10n/l10n.dart'; +import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +import '../../workspace/timeline_session.dart'; +import '../preview/preview_panel.dart'; +import 'property_edit_controller.dart'; +import 'property_keyframe_controls.dart'; +import 'stroke_list.dart'; +import 'stroke_parameter_editor.dart'; + +class StrokeProperties extends ConsumerStatefulWidget { + const StrokeProperties({ + super.key, + required this.projectId, + required this.timelineId, + required this.session, + required this.sequence, + required this.clip, + }); + final String projectId, timelineId; + final EditorTimelineSession session; + final SequenceId sequence; + final ElementId clip; + + @override + ConsumerState createState() => _StrokePropertiesState(); +} + +class _StrokePropertiesState extends ConsumerState { + Object get _identity => ( + widget.session, + widget.sequence, + widget.clip, + widget.projectId, + widget.timelineId, + ); + PropertyEditController _createController() => PropertyEditController( + session: widget.session, + sequence: widget.sequence, + clip: widget.clip, + projectId: widget.projectId, + timelineId: widget.timelineId, + operation: 'editStroke', + ); + late PropertyEditController _controller = _createController(); + + @override + void didUpdateWidget(covariant StrokeProperties oldWidget) { + super.didUpdateWidget(oldWidget); + if (_controller.identity != _identity) { + _controller.dispose(); + _controller = _createController(); + } + } + + @override + void dispose() { + _controller.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + final preview = ref + .watch(editorPreviewProvider(widget.projectId, widget.timelineId)) + .asData + ?.value; + final controller = _controller; + final view = widget.session.view(widget.sequence); + return ListenableBuilder( + listenable: Listenable.merge([controller, view]), + builder: (context, _) { + final animation = controller.animation; + if (animation == null) return const SizedBox.shrink(); + final stack = ClipStrokeStack(animation.record, animation.localTick); + final enabled = + !controller.saving && + stack.containsPlayhead && + preview?.transforms.hasPending != true; + Future edit(void Function(EditorCommandService, int) action) => + controller.run(preview, action); + final keyframes = PropertyKeyframeControls( + stack: stack, + enabled: enabled, + onEdit: (ids, {action, interpolation}) => edit( + (c, t) => c.editKeyframeChannel( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + parameterIds: ids, + action: action, + interpolation: interpolation, + ), + ), + onSeek: (offset) => controller.run( + preview, + (_, tick) => view.seekTo(tick - stack.localTick + offset), + seek: true, + ), + ); + return StrokeList( + stack: stack, + enabled: enabled, + keyframes: keyframes, + error: controller.failed ? context.l10n.updateStrokeFailed : null, + onAdd: () => edit( + (c, t) => c.addStroke( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + strokeId: c.newStrokeId(), + ), + ), + onReorder: (order) => edit( + (c, t) => c.configureStrokes( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + order: order, + ), + ), + onToggle: (layer) => edit( + (c, t) => c.configureStrokes( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + strokeId: layer.id, + enabled: !layer.enabled, + ), + ), + onRemove: (layer) => edit( + (c, t) => c.removeStroke( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + strokeId: layer.id, + ), + ), + editorBuilder: (layer) => StrokeParameterEditor( + layer: layer, + stack: stack, + enabled: enabled, + editContext: controller.identity, + keyframes: keyframes, + onChange: (values) => edit( + (c, t) => c.setStroke( + sequence: widget.sequence, + clip: widget.clip, + tick: t, + strokeId: layer.id, + values: values, + ), + ), + ), + ); + }, + ); + } +} diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb index 9f872b8..5a69f8d 100644 --- a/lib/l10n/app_de.arb +++ b/lib/l10n/app_de.arb @@ -12,9 +12,8 @@ "showFewerConversations": "Weniger anzeigen", "agentNewConversation": "Neue Unterhaltung", "agentUntitledConversation": "Neuer Chat", - "agentConversationActions": "Chat-Aktionen", - "agentElapsedTime": "Dauer {duration}", "agentConversationActions": "Unterhaltungsaktionen", + "agentElapsedTime": "Dauer {duration}", "agentMoveToTrash": "In den Papierkorb verschieben", "agentTrash": "Papierkorb", "agentRestore": "Wiederherstellen", @@ -955,5 +954,64 @@ "cornerTopLeft": "Radius oben links", "cornerTopRight": "Radius oben rechts", "cornerBottomRight": "Radius unten rechts", - "cornerBottomLeft": "Radius unten links" + "cornerBottomLeft": "Radius unten links", + "effects": "Effects", + "addEffect": "Add effect", + "dropShadow": "Drop shadow", + "innerShadow": "Inner shadow", + "layerBlur": "Layer blur", + "backgroundBlur": "Background blur", + "glassEffect": "Glass", + "noiseEffect": "Noise", + "textureEffect": "Texture", + "updateEffectFailed": "Could not update effect", + "effectBlurEnd": "End blur", + "effectProgressive": "Progressive", + "effectUniform": "Uniform", + "effectLightAngle": "Light angle", + "effectLightIntensity": "Light intensity", + "effectRefraction": "Refraction", + "effectDepth": "Depth", + "effectDispersion": "Dispersion", + "effectFrost": "Frost", + "effectSplay": "Splay", + "effectNoiseMode": "Noise colors", + "effectMono": "Mono", + "effectDuo": "Duo", + "effectMulti": "Multi", + "effectNoiseSize": "Size", + "effectDensity": "Density", + "effectSecondColor": "Second color", + "effectTextureRadius": "Radius", + "effectClipToShape": "Clip to shape", + "effectSeed": "Seed", + "effectStartX": "Start X", + "effectStartY": "Start Y", + "effectEndX": "End X", + "effectEndY": "End Y", + "effectMoveUp": "Move effect up", + "effectMoveDown": "Move effect down", + "strokes": "Konturen", + "stroke": "Kontur", + "addStroke": "Kontur hinzufügen", + "updateStrokeFailed": "Kontur konnte nicht aktualisiert werden", + "strokeWidth": "Stärke", + "strokeInside": "Innen", + "strokeCenter": "Zentriert", + "strokeOutside": "Außen", + "strokeStyle": "Stil", + "strokeSolid": "Durchgezogen", + "strokeDashed": "Gestrichelt", + "strokeDashLength": "Strichlänge", + "strokeDashGap": "Abstand", + "distortion": "Verzerrung", + "editDistortion": "Verzerrung bearbeiten", + "finishDistortion": "Verzerrung abschließen", + "resetDistortion": "Verzerrung zurücksetzen", + "freeDistortion": "Frei", + "perspectiveDistortion": "Perspektive", + "distortionTopLeft": "Oben links", + "distortionTopRight": "Oben rechts", + "distortionBottomRight": "Unten rechts", + "distortionBottomLeft": "Unten links" } diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index 5e6b913..a2206bf 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -36,8 +36,13 @@ "agentUntitledConversation": "New chat", "agentConversationActions": "Conversation actions", "agentElapsedTime": "Took {duration}", - "@agentElapsedTime": {"placeholders": {"duration": {"type": "String"}}}, - "agentConversationActions": "Conversation actions", + "@agentElapsedTime": { + "placeholders": { + "duration": { + "type": "String" + } + } + }, "agentMoveToTrash": "Move to Trash", "agentTrash": "Trash", "agentRestore": "Restore", @@ -783,7 +788,11 @@ "resumeDownload": "Resume", "downloadPaused": "Paused", "@subtitleResourcesDownloadSize": { - "placeholders": {"size": {"type": "String"}} + "placeholders": { + "size": { + "type": "String" + } + } }, "cancelResourceDownloadTitle": "Cancel download?", "cancelResourceDownloadMessage": "The download will stop. Progress on the current resource may be lost.", @@ -1415,5 +1424,64 @@ "cornerTopLeft": "Top left radius", "cornerTopRight": "Top right radius", "cornerBottomRight": "Bottom right radius", - "cornerBottomLeft": "Bottom left radius" + "cornerBottomLeft": "Bottom left radius", + "effects": "Effects", + "addEffect": "Add effect", + "dropShadow": "Drop shadow", + "innerShadow": "Inner shadow", + "layerBlur": "Layer blur", + "backgroundBlur": "Background blur", + "glassEffect": "Glass", + "noiseEffect": "Noise", + "textureEffect": "Texture", + "updateEffectFailed": "Could not update effect", + "effectBlurEnd": "End blur", + "effectProgressive": "Progressive", + "effectUniform": "Uniform", + "effectLightAngle": "Light angle", + "effectLightIntensity": "Light intensity", + "effectRefraction": "Refraction", + "effectDepth": "Depth", + "effectDispersion": "Dispersion", + "effectFrost": "Frost", + "effectSplay": "Splay", + "effectNoiseMode": "Noise colors", + "effectMono": "Mono", + "effectDuo": "Duo", + "effectMulti": "Multi", + "effectNoiseSize": "Size", + "effectDensity": "Density", + "effectSecondColor": "Second color", + "effectTextureRadius": "Radius", + "effectClipToShape": "Clip to shape", + "effectSeed": "Seed", + "effectStartX": "Start X", + "effectStartY": "Start Y", + "effectEndX": "End X", + "effectEndY": "End Y", + "effectMoveUp": "Move effect up", + "effectMoveDown": "Move effect down", + "strokes": "Strokes", + "stroke": "Stroke", + "addStroke": "Add stroke", + "updateStrokeFailed": "Could not update stroke", + "strokeWidth": "Weight", + "strokeInside": "Inside", + "strokeCenter": "Center", + "strokeOutside": "Outside", + "strokeStyle": "Style", + "strokeSolid": "Solid", + "strokeDashed": "Dashed", + "strokeDashLength": "Dash", + "strokeDashGap": "Gap", + "distortion": "Distortion", + "editDistortion": "Edit distortion", + "finishDistortion": "Finish distortion", + "resetDistortion": "Reset distortion", + "freeDistortion": "Free", + "perspectiveDistortion": "Perspective", + "distortionTopLeft": "Top left", + "distortionTopRight": "Top right", + "distortionBottomRight": "Bottom right", + "distortionBottomLeft": "Bottom left" } diff --git a/lib/l10n/app_es.arb b/lib/l10n/app_es.arb index d46550b..fd8e5a1 100644 --- a/lib/l10n/app_es.arb +++ b/lib/l10n/app_es.arb @@ -14,7 +14,6 @@ "agentUntitledConversation": "Nuevo chat", "agentConversationActions": "Acciones de conversación", "agentElapsedTime": "Duración {duration}", - "agentConversationActions": "Acciones de conversación", "agentMoveToTrash": "Mover a la papelera", "agentTrash": "Papelera", "agentRestore": "Restaurar", @@ -955,5 +954,64 @@ "cornerTopLeft": "Radio superior izquierdo", "cornerTopRight": "Radio superior derecho", "cornerBottomRight": "Radio inferior derecho", - "cornerBottomLeft": "Radio inferior izquierdo" + "cornerBottomLeft": "Radio inferior izquierdo", + "effects": "Effects", + "addEffect": "Add effect", + "dropShadow": "Drop shadow", + "innerShadow": "Inner shadow", + "layerBlur": "Layer blur", + "backgroundBlur": "Background blur", + "glassEffect": "Glass", + "noiseEffect": "Noise", + "textureEffect": "Texture", + "updateEffectFailed": "Could not update effect", + "effectBlurEnd": "End blur", + "effectProgressive": "Progressive", + "effectUniform": "Uniform", + "effectLightAngle": "Light angle", + "effectLightIntensity": "Light intensity", + "effectRefraction": "Refraction", + "effectDepth": "Depth", + "effectDispersion": "Dispersion", + "effectFrost": "Frost", + "effectSplay": "Splay", + "effectNoiseMode": "Noise colors", + "effectMono": "Mono", + "effectDuo": "Duo", + "effectMulti": "Multi", + "effectNoiseSize": "Size", + "effectDensity": "Density", + "effectSecondColor": "Second color", + "effectTextureRadius": "Radius", + "effectClipToShape": "Clip to shape", + "effectSeed": "Seed", + "effectStartX": "Start X", + "effectStartY": "Start Y", + "effectEndX": "End X", + "effectEndY": "End Y", + "effectMoveUp": "Move effect up", + "effectMoveDown": "Move effect down", + "strokes": "Trazos", + "stroke": "Trazo", + "addStroke": "Añadir trazo", + "updateStrokeFailed": "No se pudo actualizar el trazo", + "strokeWidth": "Grosor", + "strokeInside": "Interior", + "strokeCenter": "Centro", + "strokeOutside": "Exterior", + "strokeStyle": "Estilo", + "strokeSolid": "Continuo", + "strokeDashed": "Discontinuo", + "strokeDashLength": "Longitud", + "strokeDashGap": "Espacio", + "distortion": "Distorsión", + "editDistortion": "Editar distorsión", + "finishDistortion": "Terminar distorsión", + "resetDistortion": "Restablecer distorsión", + "freeDistortion": "Libre", + "perspectiveDistortion": "Perspectiva", + "distortionTopLeft": "Superior izquierda", + "distortionTopRight": "Superior derecha", + "distortionBottomRight": "Inferior derecha", + "distortionBottomLeft": "Inferior izquierda" } diff --git a/lib/l10n/app_fr.arb b/lib/l10n/app_fr.arb index 14cb96d..a422b4e 100644 --- a/lib/l10n/app_fr.arb +++ b/lib/l10n/app_fr.arb @@ -12,9 +12,8 @@ "showFewerConversations": "Afficher moins", "agentNewConversation": "Nouvelle conversation", "agentUntitledConversation": "Nouvelle conversation", - "agentConversationActions": "Actions de conversation", - "agentElapsedTime": "Durée {duration}", "agentConversationActions": "Actions de la conversation", + "agentElapsedTime": "Durée {duration}", "agentMoveToTrash": "Déplacer vers la corbeille", "agentTrash": "Corbeille", "agentRestore": "Restaurer", @@ -955,5 +954,64 @@ "cornerTopLeft": "Rayon supérieur gauche", "cornerTopRight": "Rayon supérieur droit", "cornerBottomRight": "Rayon inférieur droit", - "cornerBottomLeft": "Rayon inférieur gauche" + "cornerBottomLeft": "Rayon inférieur gauche", + "effects": "Effects", + "addEffect": "Add effect", + "dropShadow": "Drop shadow", + "innerShadow": "Inner shadow", + "layerBlur": "Layer blur", + "backgroundBlur": "Background blur", + "glassEffect": "Glass", + "noiseEffect": "Noise", + "textureEffect": "Texture", + "updateEffectFailed": "Could not update effect", + "effectBlurEnd": "End blur", + "effectProgressive": "Progressive", + "effectUniform": "Uniform", + "effectLightAngle": "Light angle", + "effectLightIntensity": "Light intensity", + "effectRefraction": "Refraction", + "effectDepth": "Depth", + "effectDispersion": "Dispersion", + "effectFrost": "Frost", + "effectSplay": "Splay", + "effectNoiseMode": "Noise colors", + "effectMono": "Mono", + "effectDuo": "Duo", + "effectMulti": "Multi", + "effectNoiseSize": "Size", + "effectDensity": "Density", + "effectSecondColor": "Second color", + "effectTextureRadius": "Radius", + "effectClipToShape": "Clip to shape", + "effectSeed": "Seed", + "effectStartX": "Start X", + "effectStartY": "Start Y", + "effectEndX": "End X", + "effectEndY": "End Y", + "effectMoveUp": "Move effect up", + "effectMoveDown": "Move effect down", + "strokes": "Contours", + "stroke": "Contour", + "addStroke": "Ajouter un contour", + "updateStrokeFailed": "Impossible de modifier le contour", + "strokeWidth": "Épaisseur", + "strokeInside": "Intérieur", + "strokeCenter": "Centre", + "strokeOutside": "Extérieur", + "strokeStyle": "Style", + "strokeSolid": "Continu", + "strokeDashed": "Pointillé", + "strokeDashLength": "Longueur", + "strokeDashGap": "Espacement", + "distortion": "Déformation", + "editDistortion": "Modifier la déformation", + "finishDistortion": "Terminer la déformation", + "resetDistortion": "Réinitialiser la déformation", + "freeDistortion": "Libre", + "perspectiveDistortion": "Perspective", + "distortionTopLeft": "Haut gauche", + "distortionTopRight": "Haut droit", + "distortionBottomRight": "Bas droit", + "distortionBottomLeft": "Bas gauche" } diff --git a/lib/l10n/app_it.arb b/lib/l10n/app_it.arb index 2f13853..9ca15a0 100644 --- a/lib/l10n/app_it.arb +++ b/lib/l10n/app_it.arb @@ -14,7 +14,6 @@ "agentUntitledConversation": "Nuova chat", "agentConversationActions": "Azioni della conversazione", "agentElapsedTime": "Durata {duration}", - "agentConversationActions": "Azioni della conversazione", "agentMoveToTrash": "Sposta nel cestino", "agentTrash": "Cestino", "agentRestore": "Ripristina", @@ -955,5 +954,64 @@ "cornerTopLeft": "Raggio in alto a sinistra", "cornerTopRight": "Raggio in alto a destra", "cornerBottomRight": "Raggio in basso a destra", - "cornerBottomLeft": "Raggio in basso a sinistra" + "cornerBottomLeft": "Raggio in basso a sinistra", + "effects": "Effects", + "addEffect": "Add effect", + "dropShadow": "Drop shadow", + "innerShadow": "Inner shadow", + "layerBlur": "Layer blur", + "backgroundBlur": "Background blur", + "glassEffect": "Glass", + "noiseEffect": "Noise", + "textureEffect": "Texture", + "updateEffectFailed": "Could not update effect", + "effectBlurEnd": "End blur", + "effectProgressive": "Progressive", + "effectUniform": "Uniform", + "effectLightAngle": "Light angle", + "effectLightIntensity": "Light intensity", + "effectRefraction": "Refraction", + "effectDepth": "Depth", + "effectDispersion": "Dispersion", + "effectFrost": "Frost", + "effectSplay": "Splay", + "effectNoiseMode": "Noise colors", + "effectMono": "Mono", + "effectDuo": "Duo", + "effectMulti": "Multi", + "effectNoiseSize": "Size", + "effectDensity": "Density", + "effectSecondColor": "Second color", + "effectTextureRadius": "Radius", + "effectClipToShape": "Clip to shape", + "effectSeed": "Seed", + "effectStartX": "Start X", + "effectStartY": "Start Y", + "effectEndX": "End X", + "effectEndY": "End Y", + "effectMoveUp": "Move effect up", + "effectMoveDown": "Move effect down", + "strokes": "Tratti", + "stroke": "Tratto", + "addStroke": "Aggiungi tratto", + "updateStrokeFailed": "Impossibile aggiornare il tratto", + "strokeWidth": "Spessore", + "strokeInside": "Interno", + "strokeCenter": "Centro", + "strokeOutside": "Esterno", + "strokeStyle": "Stile", + "strokeSolid": "Continuo", + "strokeDashed": "Tratteggiato", + "strokeDashLength": "Lunghezza", + "strokeDashGap": "Spazio", + "distortion": "Distorsione", + "editDistortion": "Modifica distorsione", + "finishDistortion": "Termina distorsione", + "resetDistortion": "Reimposta distorsione", + "freeDistortion": "Libera", + "perspectiveDistortion": "Prospettiva", + "distortionTopLeft": "In alto a sinistra", + "distortionTopRight": "In alto a destra", + "distortionBottomRight": "In basso a destra", + "distortionBottomLeft": "In basso a sinistra" } diff --git a/lib/l10n/app_ja.arb b/lib/l10n/app_ja.arb index 032a6be..c4033e6 100644 --- a/lib/l10n/app_ja.arb +++ b/lib/l10n/app_ja.arb @@ -12,9 +12,8 @@ "showFewerConversations": "表示を減らす", "agentNewConversation": "新しい会話", "agentUntitledConversation": "新しいチャット", - "agentConversationActions": "チャットの操作", - "agentElapsedTime": "所要時間 {duration}", "agentConversationActions": "会話の操作", + "agentElapsedTime": "所要時間 {duration}", "agentMoveToTrash": "ゴミ箱に移動", "agentTrash": "ゴミ箱", "agentRestore": "復元", @@ -955,5 +954,64 @@ "cornerTopLeft": "左上の半径", "cornerTopRight": "右上の半径", "cornerBottomRight": "右下の半径", - "cornerBottomLeft": "左下の半径" + "cornerBottomLeft": "左下の半径", + "effects": "Effects", + "addEffect": "Add effect", + "dropShadow": "Drop shadow", + "innerShadow": "Inner shadow", + "layerBlur": "Layer blur", + "backgroundBlur": "Background blur", + "glassEffect": "Glass", + "noiseEffect": "Noise", + "textureEffect": "Texture", + "updateEffectFailed": "Could not update effect", + "effectBlurEnd": "End blur", + "effectProgressive": "Progressive", + "effectUniform": "Uniform", + "effectLightAngle": "Light angle", + "effectLightIntensity": "Light intensity", + "effectRefraction": "Refraction", + "effectDepth": "Depth", + "effectDispersion": "Dispersion", + "effectFrost": "Frost", + "effectSplay": "Splay", + "effectNoiseMode": "Noise colors", + "effectMono": "Mono", + "effectDuo": "Duo", + "effectMulti": "Multi", + "effectNoiseSize": "Size", + "effectDensity": "Density", + "effectSecondColor": "Second color", + "effectTextureRadius": "Radius", + "effectClipToShape": "Clip to shape", + "effectSeed": "Seed", + "effectStartX": "Start X", + "effectStartY": "Start Y", + "effectEndX": "End X", + "effectEndY": "End Y", + "effectMoveUp": "Move effect up", + "effectMoveDown": "Move effect down", + "strokes": "線", + "stroke": "線", + "addStroke": "線を追加", + "updateStrokeFailed": "線を更新できませんでした", + "strokeWidth": "太さ", + "strokeInside": "内側", + "strokeCenter": "中央", + "strokeOutside": "外側", + "strokeStyle": "スタイル", + "strokeSolid": "実線", + "strokeDashed": "破線", + "strokeDashLength": "破線の長さ", + "strokeDashGap": "間隔", + "distortion": "変形", + "editDistortion": "変形を編集", + "finishDistortion": "変形を完了", + "resetDistortion": "変形をリセット", + "freeDistortion": "自由", + "perspectiveDistortion": "遠近連動", + "distortionTopLeft": "左上", + "distortionTopRight": "右上", + "distortionBottomRight": "右下", + "distortionBottomLeft": "左下" } diff --git a/lib/l10n/app_ko.arb b/lib/l10n/app_ko.arb index 204c050..3aca2d0 100644 --- a/lib/l10n/app_ko.arb +++ b/lib/l10n/app_ko.arb @@ -12,9 +12,8 @@ "showFewerConversations": "접기", "agentNewConversation": "새 대화", "agentUntitledConversation": "새 채팅", - "agentConversationActions": "채팅 작업", - "agentElapsedTime": "소요 시간 {duration}", "agentConversationActions": "대화 작업", + "agentElapsedTime": "소요 시간 {duration}", "agentMoveToTrash": "휴지통으로 이동", "agentTrash": "휴지통", "agentRestore": "복원", @@ -955,5 +954,64 @@ "cornerTopLeft": "왼쪽 위 반경", "cornerTopRight": "오른쪽 위 반경", "cornerBottomRight": "오른쪽 아래 반경", - "cornerBottomLeft": "왼쪽 아래 반경" + "cornerBottomLeft": "왼쪽 아래 반경", + "effects": "Effects", + "addEffect": "Add effect", + "dropShadow": "Drop shadow", + "innerShadow": "Inner shadow", + "layerBlur": "Layer blur", + "backgroundBlur": "Background blur", + "glassEffect": "Glass", + "noiseEffect": "Noise", + "textureEffect": "Texture", + "updateEffectFailed": "Could not update effect", + "effectBlurEnd": "End blur", + "effectProgressive": "Progressive", + "effectUniform": "Uniform", + "effectLightAngle": "Light angle", + "effectLightIntensity": "Light intensity", + "effectRefraction": "Refraction", + "effectDepth": "Depth", + "effectDispersion": "Dispersion", + "effectFrost": "Frost", + "effectSplay": "Splay", + "effectNoiseMode": "Noise colors", + "effectMono": "Mono", + "effectDuo": "Duo", + "effectMulti": "Multi", + "effectNoiseSize": "Size", + "effectDensity": "Density", + "effectSecondColor": "Second color", + "effectTextureRadius": "Radius", + "effectClipToShape": "Clip to shape", + "effectSeed": "Seed", + "effectStartX": "Start X", + "effectStartY": "Start Y", + "effectEndX": "End X", + "effectEndY": "End Y", + "effectMoveUp": "Move effect up", + "effectMoveDown": "Move effect down", + "strokes": "선", + "stroke": "선", + "addStroke": "선 추가", + "updateStrokeFailed": "선을 업데이트할 수 없습니다", + "strokeWidth": "두께", + "strokeInside": "안쪽", + "strokeCenter": "가운데", + "strokeOutside": "바깥쪽", + "strokeStyle": "스타일", + "strokeSolid": "실선", + "strokeDashed": "파선", + "strokeDashLength": "선 길이", + "strokeDashGap": "간격", + "distortion": "왜곡", + "editDistortion": "왜곡 편집", + "finishDistortion": "왜곡 완료", + "resetDistortion": "왜곡 초기화", + "freeDistortion": "자유", + "perspectiveDistortion": "원근 연동", + "distortionTopLeft": "왼쪽 위", + "distortionTopRight": "오른쪽 위", + "distortionBottomRight": "오른쪽 아래", + "distortionBottomLeft": "왼쪽 아래" } diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index a177016..0098d20 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -4423,6 +4423,360 @@ abstract class AppLocalizations { /// In en, this message translates to: /// **'Bottom left radius'** String get cornerBottomLeft; + + /// No description provided for @effects. + /// + /// In en, this message translates to: + /// **'Effects'** + String get effects; + + /// No description provided for @addEffect. + /// + /// In en, this message translates to: + /// **'Add effect'** + String get addEffect; + + /// No description provided for @dropShadow. + /// + /// In en, this message translates to: + /// **'Drop shadow'** + String get dropShadow; + + /// No description provided for @innerShadow. + /// + /// In en, this message translates to: + /// **'Inner shadow'** + String get innerShadow; + + /// No description provided for @layerBlur. + /// + /// In en, this message translates to: + /// **'Layer blur'** + String get layerBlur; + + /// No description provided for @backgroundBlur. + /// + /// In en, this message translates to: + /// **'Background blur'** + String get backgroundBlur; + + /// No description provided for @glassEffect. + /// + /// In en, this message translates to: + /// **'Glass'** + String get glassEffect; + + /// No description provided for @noiseEffect. + /// + /// In en, this message translates to: + /// **'Noise'** + String get noiseEffect; + + /// No description provided for @textureEffect. + /// + /// In en, this message translates to: + /// **'Texture'** + String get textureEffect; + + /// No description provided for @updateEffectFailed. + /// + /// In en, this message translates to: + /// **'Could not update effect'** + String get updateEffectFailed; + + /// No description provided for @effectBlurEnd. + /// + /// In en, this message translates to: + /// **'End blur'** + String get effectBlurEnd; + + /// No description provided for @effectProgressive. + /// + /// In en, this message translates to: + /// **'Progressive'** + String get effectProgressive; + + /// No description provided for @effectUniform. + /// + /// In en, this message translates to: + /// **'Uniform'** + String get effectUniform; + + /// No description provided for @effectLightAngle. + /// + /// In en, this message translates to: + /// **'Light angle'** + String get effectLightAngle; + + /// No description provided for @effectLightIntensity. + /// + /// In en, this message translates to: + /// **'Light intensity'** + String get effectLightIntensity; + + /// No description provided for @effectRefraction. + /// + /// In en, this message translates to: + /// **'Refraction'** + String get effectRefraction; + + /// No description provided for @effectDepth. + /// + /// In en, this message translates to: + /// **'Depth'** + String get effectDepth; + + /// No description provided for @effectDispersion. + /// + /// In en, this message translates to: + /// **'Dispersion'** + String get effectDispersion; + + /// No description provided for @effectFrost. + /// + /// In en, this message translates to: + /// **'Frost'** + String get effectFrost; + + /// No description provided for @effectSplay. + /// + /// In en, this message translates to: + /// **'Splay'** + String get effectSplay; + + /// No description provided for @effectNoiseMode. + /// + /// In en, this message translates to: + /// **'Noise colors'** + String get effectNoiseMode; + + /// No description provided for @effectMono. + /// + /// In en, this message translates to: + /// **'Mono'** + String get effectMono; + + /// No description provided for @effectDuo. + /// + /// In en, this message translates to: + /// **'Duo'** + String get effectDuo; + + /// No description provided for @effectMulti. + /// + /// In en, this message translates to: + /// **'Multi'** + String get effectMulti; + + /// No description provided for @effectNoiseSize. + /// + /// In en, this message translates to: + /// **'Size'** + String get effectNoiseSize; + + /// No description provided for @effectDensity. + /// + /// In en, this message translates to: + /// **'Density'** + String get effectDensity; + + /// No description provided for @effectSecondColor. + /// + /// In en, this message translates to: + /// **'Second color'** + String get effectSecondColor; + + /// No description provided for @effectTextureRadius. + /// + /// In en, this message translates to: + /// **'Radius'** + String get effectTextureRadius; + + /// No description provided for @effectClipToShape. + /// + /// In en, this message translates to: + /// **'Clip to shape'** + String get effectClipToShape; + + /// No description provided for @effectSeed. + /// + /// In en, this message translates to: + /// **'Seed'** + String get effectSeed; + + /// No description provided for @effectStartX. + /// + /// In en, this message translates to: + /// **'Start X'** + String get effectStartX; + + /// No description provided for @effectStartY. + /// + /// In en, this message translates to: + /// **'Start Y'** + String get effectStartY; + + /// No description provided for @effectEndX. + /// + /// In en, this message translates to: + /// **'End X'** + String get effectEndX; + + /// No description provided for @effectEndY. + /// + /// In en, this message translates to: + /// **'End Y'** + String get effectEndY; + + /// No description provided for @effectMoveUp. + /// + /// In en, this message translates to: + /// **'Move effect up'** + String get effectMoveUp; + + /// No description provided for @effectMoveDown. + /// + /// In en, this message translates to: + /// **'Move effect down'** + String get effectMoveDown; + + /// No description provided for @strokes. + /// + /// In en, this message translates to: + /// **'Strokes'** + String get strokes; + + /// No description provided for @stroke. + /// + /// In en, this message translates to: + /// **'Stroke'** + String get stroke; + + /// No description provided for @addStroke. + /// + /// In en, this message translates to: + /// **'Add stroke'** + String get addStroke; + + /// No description provided for @updateStrokeFailed. + /// + /// In en, this message translates to: + /// **'Could not update stroke'** + String get updateStrokeFailed; + + /// No description provided for @strokeWidth. + /// + /// In en, this message translates to: + /// **'Weight'** + String get strokeWidth; + + /// No description provided for @strokeInside. + /// + /// In en, this message translates to: + /// **'Inside'** + String get strokeInside; + + /// No description provided for @strokeCenter. + /// + /// In en, this message translates to: + /// **'Center'** + String get strokeCenter; + + /// No description provided for @strokeOutside. + /// + /// In en, this message translates to: + /// **'Outside'** + String get strokeOutside; + + /// No description provided for @strokeStyle. + /// + /// In en, this message translates to: + /// **'Style'** + String get strokeStyle; + + /// No description provided for @strokeSolid. + /// + /// In en, this message translates to: + /// **'Solid'** + String get strokeSolid; + + /// No description provided for @strokeDashed. + /// + /// In en, this message translates to: + /// **'Dashed'** + String get strokeDashed; + + /// No description provided for @strokeDashLength. + /// + /// In en, this message translates to: + /// **'Dash'** + String get strokeDashLength; + + /// No description provided for @strokeDashGap. + /// + /// In en, this message translates to: + /// **'Gap'** + String get strokeDashGap; + + /// No description provided for @distortion. + /// + /// In en, this message translates to: + /// **'Distortion'** + String get distortion; + + /// No description provided for @editDistortion. + /// + /// In en, this message translates to: + /// **'Edit distortion'** + String get editDistortion; + + /// No description provided for @finishDistortion. + /// + /// In en, this message translates to: + /// **'Finish distortion'** + String get finishDistortion; + + /// No description provided for @resetDistortion. + /// + /// In en, this message translates to: + /// **'Reset distortion'** + String get resetDistortion; + + /// No description provided for @freeDistortion. + /// + /// In en, this message translates to: + /// **'Free'** + String get freeDistortion; + + /// No description provided for @perspectiveDistortion. + /// + /// In en, this message translates to: + /// **'Perspective'** + String get perspectiveDistortion; + + /// No description provided for @distortionTopLeft. + /// + /// In en, this message translates to: + /// **'Top left'** + String get distortionTopLeft; + + /// No description provided for @distortionTopRight. + /// + /// In en, this message translates to: + /// **'Top right'** + String get distortionTopRight; + + /// No description provided for @distortionBottomRight. + /// + /// In en, this message translates to: + /// **'Bottom right'** + String get distortionBottomRight; + + /// No description provided for @distortionBottomLeft. + /// + /// In en, this message translates to: + /// **'Bottom left'** + String get distortionBottomLeft; } class _AppLocalizationsDelegate diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart index 9d52ba0..6b4c594 100644 --- a/lib/l10n/app_localizations_de.dart +++ b/lib/l10n/app_localizations_de.dart @@ -2404,4 +2404,181 @@ class AppLocalizationsDe extends AppLocalizations { @override String get cornerBottomLeft => 'Radius unten links'; + + @override + String get effects => 'Effects'; + + @override + String get addEffect => 'Add effect'; + + @override + String get dropShadow => 'Drop shadow'; + + @override + String get innerShadow => 'Inner shadow'; + + @override + String get layerBlur => 'Layer blur'; + + @override + String get backgroundBlur => 'Background blur'; + + @override + String get glassEffect => 'Glass'; + + @override + String get noiseEffect => 'Noise'; + + @override + String get textureEffect => 'Texture'; + + @override + String get updateEffectFailed => 'Could not update effect'; + + @override + String get effectBlurEnd => 'End blur'; + + @override + String get effectProgressive => 'Progressive'; + + @override + String get effectUniform => 'Uniform'; + + @override + String get effectLightAngle => 'Light angle'; + + @override + String get effectLightIntensity => 'Light intensity'; + + @override + String get effectRefraction => 'Refraction'; + + @override + String get effectDepth => 'Depth'; + + @override + String get effectDispersion => 'Dispersion'; + + @override + String get effectFrost => 'Frost'; + + @override + String get effectSplay => 'Splay'; + + @override + String get effectNoiseMode => 'Noise colors'; + + @override + String get effectMono => 'Mono'; + + @override + String get effectDuo => 'Duo'; + + @override + String get effectMulti => 'Multi'; + + @override + String get effectNoiseSize => 'Size'; + + @override + String get effectDensity => 'Density'; + + @override + String get effectSecondColor => 'Second color'; + + @override + String get effectTextureRadius => 'Radius'; + + @override + String get effectClipToShape => 'Clip to shape'; + + @override + String get effectSeed => 'Seed'; + + @override + String get effectStartX => 'Start X'; + + @override + String get effectStartY => 'Start Y'; + + @override + String get effectEndX => 'End X'; + + @override + String get effectEndY => 'End Y'; + + @override + String get effectMoveUp => 'Move effect up'; + + @override + String get effectMoveDown => 'Move effect down'; + + @override + String get strokes => 'Konturen'; + + @override + String get stroke => 'Kontur'; + + @override + String get addStroke => 'Kontur hinzufügen'; + + @override + String get updateStrokeFailed => 'Kontur konnte nicht aktualisiert werden'; + + @override + String get strokeWidth => 'Stärke'; + + @override + String get strokeInside => 'Innen'; + + @override + String get strokeCenter => 'Zentriert'; + + @override + String get strokeOutside => 'Außen'; + + @override + String get strokeStyle => 'Stil'; + + @override + String get strokeSolid => 'Durchgezogen'; + + @override + String get strokeDashed => 'Gestrichelt'; + + @override + String get strokeDashLength => 'Strichlänge'; + + @override + String get strokeDashGap => 'Abstand'; + + @override + String get distortion => 'Verzerrung'; + + @override + String get editDistortion => 'Verzerrung bearbeiten'; + + @override + String get finishDistortion => 'Verzerrung abschließen'; + + @override + String get resetDistortion => 'Verzerrung zurücksetzen'; + + @override + String get freeDistortion => 'Frei'; + + @override + String get perspectiveDistortion => 'Perspektive'; + + @override + String get distortionTopLeft => 'Oben links'; + + @override + String get distortionTopRight => 'Oben rechts'; + + @override + String get distortionBottomRight => 'Unten rechts'; + + @override + String get distortionBottomLeft => 'Unten links'; } diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index a6a7a9e..9c11d7c 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -2368,4 +2368,181 @@ class AppLocalizationsEn extends AppLocalizations { @override String get cornerBottomLeft => 'Bottom left radius'; + + @override + String get effects => 'Effects'; + + @override + String get addEffect => 'Add effect'; + + @override + String get dropShadow => 'Drop shadow'; + + @override + String get innerShadow => 'Inner shadow'; + + @override + String get layerBlur => 'Layer blur'; + + @override + String get backgroundBlur => 'Background blur'; + + @override + String get glassEffect => 'Glass'; + + @override + String get noiseEffect => 'Noise'; + + @override + String get textureEffect => 'Texture'; + + @override + String get updateEffectFailed => 'Could not update effect'; + + @override + String get effectBlurEnd => 'End blur'; + + @override + String get effectProgressive => 'Progressive'; + + @override + String get effectUniform => 'Uniform'; + + @override + String get effectLightAngle => 'Light angle'; + + @override + String get effectLightIntensity => 'Light intensity'; + + @override + String get effectRefraction => 'Refraction'; + + @override + String get effectDepth => 'Depth'; + + @override + String get effectDispersion => 'Dispersion'; + + @override + String get effectFrost => 'Frost'; + + @override + String get effectSplay => 'Splay'; + + @override + String get effectNoiseMode => 'Noise colors'; + + @override + String get effectMono => 'Mono'; + + @override + String get effectDuo => 'Duo'; + + @override + String get effectMulti => 'Multi'; + + @override + String get effectNoiseSize => 'Size'; + + @override + String get effectDensity => 'Density'; + + @override + String get effectSecondColor => 'Second color'; + + @override + String get effectTextureRadius => 'Radius'; + + @override + String get effectClipToShape => 'Clip to shape'; + + @override + String get effectSeed => 'Seed'; + + @override + String get effectStartX => 'Start X'; + + @override + String get effectStartY => 'Start Y'; + + @override + String get effectEndX => 'End X'; + + @override + String get effectEndY => 'End Y'; + + @override + String get effectMoveUp => 'Move effect up'; + + @override + String get effectMoveDown => 'Move effect down'; + + @override + String get strokes => 'Strokes'; + + @override + String get stroke => 'Stroke'; + + @override + String get addStroke => 'Add stroke'; + + @override + String get updateStrokeFailed => 'Could not update stroke'; + + @override + String get strokeWidth => 'Weight'; + + @override + String get strokeInside => 'Inside'; + + @override + String get strokeCenter => 'Center'; + + @override + String get strokeOutside => 'Outside'; + + @override + String get strokeStyle => 'Style'; + + @override + String get strokeSolid => 'Solid'; + + @override + String get strokeDashed => 'Dashed'; + + @override + String get strokeDashLength => 'Dash'; + + @override + String get strokeDashGap => 'Gap'; + + @override + String get distortion => 'Distortion'; + + @override + String get editDistortion => 'Edit distortion'; + + @override + String get finishDistortion => 'Finish distortion'; + + @override + String get resetDistortion => 'Reset distortion'; + + @override + String get freeDistortion => 'Free'; + + @override + String get perspectiveDistortion => 'Perspective'; + + @override + String get distortionTopLeft => 'Top left'; + + @override + String get distortionTopRight => 'Top right'; + + @override + String get distortionBottomRight => 'Bottom right'; + + @override + String get distortionBottomLeft => 'Bottom left'; } diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dart index d93a332..a6c7374 100644 --- a/lib/l10n/app_localizations_es.dart +++ b/lib/l10n/app_localizations_es.dart @@ -2403,4 +2403,181 @@ class AppLocalizationsEs extends AppLocalizations { @override String get cornerBottomLeft => 'Radio inferior izquierdo'; + + @override + String get effects => 'Effects'; + + @override + String get addEffect => 'Add effect'; + + @override + String get dropShadow => 'Drop shadow'; + + @override + String get innerShadow => 'Inner shadow'; + + @override + String get layerBlur => 'Layer blur'; + + @override + String get backgroundBlur => 'Background blur'; + + @override + String get glassEffect => 'Glass'; + + @override + String get noiseEffect => 'Noise'; + + @override + String get textureEffect => 'Texture'; + + @override + String get updateEffectFailed => 'Could not update effect'; + + @override + String get effectBlurEnd => 'End blur'; + + @override + String get effectProgressive => 'Progressive'; + + @override + String get effectUniform => 'Uniform'; + + @override + String get effectLightAngle => 'Light angle'; + + @override + String get effectLightIntensity => 'Light intensity'; + + @override + String get effectRefraction => 'Refraction'; + + @override + String get effectDepth => 'Depth'; + + @override + String get effectDispersion => 'Dispersion'; + + @override + String get effectFrost => 'Frost'; + + @override + String get effectSplay => 'Splay'; + + @override + String get effectNoiseMode => 'Noise colors'; + + @override + String get effectMono => 'Mono'; + + @override + String get effectDuo => 'Duo'; + + @override + String get effectMulti => 'Multi'; + + @override + String get effectNoiseSize => 'Size'; + + @override + String get effectDensity => 'Density'; + + @override + String get effectSecondColor => 'Second color'; + + @override + String get effectTextureRadius => 'Radius'; + + @override + String get effectClipToShape => 'Clip to shape'; + + @override + String get effectSeed => 'Seed'; + + @override + String get effectStartX => 'Start X'; + + @override + String get effectStartY => 'Start Y'; + + @override + String get effectEndX => 'End X'; + + @override + String get effectEndY => 'End Y'; + + @override + String get effectMoveUp => 'Move effect up'; + + @override + String get effectMoveDown => 'Move effect down'; + + @override + String get strokes => 'Trazos'; + + @override + String get stroke => 'Trazo'; + + @override + String get addStroke => 'Añadir trazo'; + + @override + String get updateStrokeFailed => 'No se pudo actualizar el trazo'; + + @override + String get strokeWidth => 'Grosor'; + + @override + String get strokeInside => 'Interior'; + + @override + String get strokeCenter => 'Centro'; + + @override + String get strokeOutside => 'Exterior'; + + @override + String get strokeStyle => 'Estilo'; + + @override + String get strokeSolid => 'Continuo'; + + @override + String get strokeDashed => 'Discontinuo'; + + @override + String get strokeDashLength => 'Longitud'; + + @override + String get strokeDashGap => 'Espacio'; + + @override + String get distortion => 'Distorsión'; + + @override + String get editDistortion => 'Editar distorsión'; + + @override + String get finishDistortion => 'Terminar distorsión'; + + @override + String get resetDistortion => 'Restablecer distorsión'; + + @override + String get freeDistortion => 'Libre'; + + @override + String get perspectiveDistortion => 'Perspectiva'; + + @override + String get distortionTopLeft => 'Superior izquierda'; + + @override + String get distortionTopRight => 'Superior derecha'; + + @override + String get distortionBottomRight => 'Inferior derecha'; + + @override + String get distortionBottomLeft => 'Inferior izquierda'; } diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart index 6ec6480..46ac799 100644 --- a/lib/l10n/app_localizations_fr.dart +++ b/lib/l10n/app_localizations_fr.dart @@ -2406,4 +2406,181 @@ class AppLocalizationsFr extends AppLocalizations { @override String get cornerBottomLeft => 'Rayon inférieur gauche'; + + @override + String get effects => 'Effects'; + + @override + String get addEffect => 'Add effect'; + + @override + String get dropShadow => 'Drop shadow'; + + @override + String get innerShadow => 'Inner shadow'; + + @override + String get layerBlur => 'Layer blur'; + + @override + String get backgroundBlur => 'Background blur'; + + @override + String get glassEffect => 'Glass'; + + @override + String get noiseEffect => 'Noise'; + + @override + String get textureEffect => 'Texture'; + + @override + String get updateEffectFailed => 'Could not update effect'; + + @override + String get effectBlurEnd => 'End blur'; + + @override + String get effectProgressive => 'Progressive'; + + @override + String get effectUniform => 'Uniform'; + + @override + String get effectLightAngle => 'Light angle'; + + @override + String get effectLightIntensity => 'Light intensity'; + + @override + String get effectRefraction => 'Refraction'; + + @override + String get effectDepth => 'Depth'; + + @override + String get effectDispersion => 'Dispersion'; + + @override + String get effectFrost => 'Frost'; + + @override + String get effectSplay => 'Splay'; + + @override + String get effectNoiseMode => 'Noise colors'; + + @override + String get effectMono => 'Mono'; + + @override + String get effectDuo => 'Duo'; + + @override + String get effectMulti => 'Multi'; + + @override + String get effectNoiseSize => 'Size'; + + @override + String get effectDensity => 'Density'; + + @override + String get effectSecondColor => 'Second color'; + + @override + String get effectTextureRadius => 'Radius'; + + @override + String get effectClipToShape => 'Clip to shape'; + + @override + String get effectSeed => 'Seed'; + + @override + String get effectStartX => 'Start X'; + + @override + String get effectStartY => 'Start Y'; + + @override + String get effectEndX => 'End X'; + + @override + String get effectEndY => 'End Y'; + + @override + String get effectMoveUp => 'Move effect up'; + + @override + String get effectMoveDown => 'Move effect down'; + + @override + String get strokes => 'Contours'; + + @override + String get stroke => 'Contour'; + + @override + String get addStroke => 'Ajouter un contour'; + + @override + String get updateStrokeFailed => 'Impossible de modifier le contour'; + + @override + String get strokeWidth => 'Épaisseur'; + + @override + String get strokeInside => 'Intérieur'; + + @override + String get strokeCenter => 'Centre'; + + @override + String get strokeOutside => 'Extérieur'; + + @override + String get strokeStyle => 'Style'; + + @override + String get strokeSolid => 'Continu'; + + @override + String get strokeDashed => 'Pointillé'; + + @override + String get strokeDashLength => 'Longueur'; + + @override + String get strokeDashGap => 'Espacement'; + + @override + String get distortion => 'Déformation'; + + @override + String get editDistortion => 'Modifier la déformation'; + + @override + String get finishDistortion => 'Terminer la déformation'; + + @override + String get resetDistortion => 'Réinitialiser la déformation'; + + @override + String get freeDistortion => 'Libre'; + + @override + String get perspectiveDistortion => 'Perspective'; + + @override + String get distortionTopLeft => 'Haut gauche'; + + @override + String get distortionTopRight => 'Haut droit'; + + @override + String get distortionBottomRight => 'Bas droit'; + + @override + String get distortionBottomLeft => 'Bas gauche'; } diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dart index 95f807f..9862d97 100644 --- a/lib/l10n/app_localizations_it.dart +++ b/lib/l10n/app_localizations_it.dart @@ -2396,4 +2396,181 @@ class AppLocalizationsIt extends AppLocalizations { @override String get cornerBottomLeft => 'Raggio in basso a sinistra'; + + @override + String get effects => 'Effects'; + + @override + String get addEffect => 'Add effect'; + + @override + String get dropShadow => 'Drop shadow'; + + @override + String get innerShadow => 'Inner shadow'; + + @override + String get layerBlur => 'Layer blur'; + + @override + String get backgroundBlur => 'Background blur'; + + @override + String get glassEffect => 'Glass'; + + @override + String get noiseEffect => 'Noise'; + + @override + String get textureEffect => 'Texture'; + + @override + String get updateEffectFailed => 'Could not update effect'; + + @override + String get effectBlurEnd => 'End blur'; + + @override + String get effectProgressive => 'Progressive'; + + @override + String get effectUniform => 'Uniform'; + + @override + String get effectLightAngle => 'Light angle'; + + @override + String get effectLightIntensity => 'Light intensity'; + + @override + String get effectRefraction => 'Refraction'; + + @override + String get effectDepth => 'Depth'; + + @override + String get effectDispersion => 'Dispersion'; + + @override + String get effectFrost => 'Frost'; + + @override + String get effectSplay => 'Splay'; + + @override + String get effectNoiseMode => 'Noise colors'; + + @override + String get effectMono => 'Mono'; + + @override + String get effectDuo => 'Duo'; + + @override + String get effectMulti => 'Multi'; + + @override + String get effectNoiseSize => 'Size'; + + @override + String get effectDensity => 'Density'; + + @override + String get effectSecondColor => 'Second color'; + + @override + String get effectTextureRadius => 'Radius'; + + @override + String get effectClipToShape => 'Clip to shape'; + + @override + String get effectSeed => 'Seed'; + + @override + String get effectStartX => 'Start X'; + + @override + String get effectStartY => 'Start Y'; + + @override + String get effectEndX => 'End X'; + + @override + String get effectEndY => 'End Y'; + + @override + String get effectMoveUp => 'Move effect up'; + + @override + String get effectMoveDown => 'Move effect down'; + + @override + String get strokes => 'Tratti'; + + @override + String get stroke => 'Tratto'; + + @override + String get addStroke => 'Aggiungi tratto'; + + @override + String get updateStrokeFailed => 'Impossibile aggiornare il tratto'; + + @override + String get strokeWidth => 'Spessore'; + + @override + String get strokeInside => 'Interno'; + + @override + String get strokeCenter => 'Centro'; + + @override + String get strokeOutside => 'Esterno'; + + @override + String get strokeStyle => 'Stile'; + + @override + String get strokeSolid => 'Continuo'; + + @override + String get strokeDashed => 'Tratteggiato'; + + @override + String get strokeDashLength => 'Lunghezza'; + + @override + String get strokeDashGap => 'Spazio'; + + @override + String get distortion => 'Distorsione'; + + @override + String get editDistortion => 'Modifica distorsione'; + + @override + String get finishDistortion => 'Termina distorsione'; + + @override + String get resetDistortion => 'Reimposta distorsione'; + + @override + String get freeDistortion => 'Libera'; + + @override + String get perspectiveDistortion => 'Prospettiva'; + + @override + String get distortionTopLeft => 'In alto a sinistra'; + + @override + String get distortionTopRight => 'In alto a destra'; + + @override + String get distortionBottomRight => 'In basso a destra'; + + @override + String get distortionBottomLeft => 'In basso a sinistra'; } diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dart index fef74b5..7d6607e 100644 --- a/lib/l10n/app_localizations_ja.dart +++ b/lib/l10n/app_localizations_ja.dart @@ -2302,4 +2302,181 @@ class AppLocalizationsJa extends AppLocalizations { @override String get cornerBottomLeft => '左下の半径'; + + @override + String get effects => 'Effects'; + + @override + String get addEffect => 'Add effect'; + + @override + String get dropShadow => 'Drop shadow'; + + @override + String get innerShadow => 'Inner shadow'; + + @override + String get layerBlur => 'Layer blur'; + + @override + String get backgroundBlur => 'Background blur'; + + @override + String get glassEffect => 'Glass'; + + @override + String get noiseEffect => 'Noise'; + + @override + String get textureEffect => 'Texture'; + + @override + String get updateEffectFailed => 'Could not update effect'; + + @override + String get effectBlurEnd => 'End blur'; + + @override + String get effectProgressive => 'Progressive'; + + @override + String get effectUniform => 'Uniform'; + + @override + String get effectLightAngle => 'Light angle'; + + @override + String get effectLightIntensity => 'Light intensity'; + + @override + String get effectRefraction => 'Refraction'; + + @override + String get effectDepth => 'Depth'; + + @override + String get effectDispersion => 'Dispersion'; + + @override + String get effectFrost => 'Frost'; + + @override + String get effectSplay => 'Splay'; + + @override + String get effectNoiseMode => 'Noise colors'; + + @override + String get effectMono => 'Mono'; + + @override + String get effectDuo => 'Duo'; + + @override + String get effectMulti => 'Multi'; + + @override + String get effectNoiseSize => 'Size'; + + @override + String get effectDensity => 'Density'; + + @override + String get effectSecondColor => 'Second color'; + + @override + String get effectTextureRadius => 'Radius'; + + @override + String get effectClipToShape => 'Clip to shape'; + + @override + String get effectSeed => 'Seed'; + + @override + String get effectStartX => 'Start X'; + + @override + String get effectStartY => 'Start Y'; + + @override + String get effectEndX => 'End X'; + + @override + String get effectEndY => 'End Y'; + + @override + String get effectMoveUp => 'Move effect up'; + + @override + String get effectMoveDown => 'Move effect down'; + + @override + String get strokes => '線'; + + @override + String get stroke => '線'; + + @override + String get addStroke => '線を追加'; + + @override + String get updateStrokeFailed => '線を更新できませんでした'; + + @override + String get strokeWidth => '太さ'; + + @override + String get strokeInside => '内側'; + + @override + String get strokeCenter => '中央'; + + @override + String get strokeOutside => '外側'; + + @override + String get strokeStyle => 'スタイル'; + + @override + String get strokeSolid => '実線'; + + @override + String get strokeDashed => '破線'; + + @override + String get strokeDashLength => '破線の長さ'; + + @override + String get strokeDashGap => '間隔'; + + @override + String get distortion => '変形'; + + @override + String get editDistortion => '変形を編集'; + + @override + String get finishDistortion => '変形を完了'; + + @override + String get resetDistortion => '変形をリセット'; + + @override + String get freeDistortion => '自由'; + + @override + String get perspectiveDistortion => '遠近連動'; + + @override + String get distortionTopLeft => '左上'; + + @override + String get distortionTopRight => '右上'; + + @override + String get distortionBottomRight => '右下'; + + @override + String get distortionBottomLeft => '左下'; } diff --git a/lib/l10n/app_localizations_ko.dart b/lib/l10n/app_localizations_ko.dart index 508acab..5799851 100644 --- a/lib/l10n/app_localizations_ko.dart +++ b/lib/l10n/app_localizations_ko.dart @@ -2302,4 +2302,181 @@ class AppLocalizationsKo extends AppLocalizations { @override String get cornerBottomLeft => '왼쪽 아래 반경'; + + @override + String get effects => 'Effects'; + + @override + String get addEffect => 'Add effect'; + + @override + String get dropShadow => 'Drop shadow'; + + @override + String get innerShadow => 'Inner shadow'; + + @override + String get layerBlur => 'Layer blur'; + + @override + String get backgroundBlur => 'Background blur'; + + @override + String get glassEffect => 'Glass'; + + @override + String get noiseEffect => 'Noise'; + + @override + String get textureEffect => 'Texture'; + + @override + String get updateEffectFailed => 'Could not update effect'; + + @override + String get effectBlurEnd => 'End blur'; + + @override + String get effectProgressive => 'Progressive'; + + @override + String get effectUniform => 'Uniform'; + + @override + String get effectLightAngle => 'Light angle'; + + @override + String get effectLightIntensity => 'Light intensity'; + + @override + String get effectRefraction => 'Refraction'; + + @override + String get effectDepth => 'Depth'; + + @override + String get effectDispersion => 'Dispersion'; + + @override + String get effectFrost => 'Frost'; + + @override + String get effectSplay => 'Splay'; + + @override + String get effectNoiseMode => 'Noise colors'; + + @override + String get effectMono => 'Mono'; + + @override + String get effectDuo => 'Duo'; + + @override + String get effectMulti => 'Multi'; + + @override + String get effectNoiseSize => 'Size'; + + @override + String get effectDensity => 'Density'; + + @override + String get effectSecondColor => 'Second color'; + + @override + String get effectTextureRadius => 'Radius'; + + @override + String get effectClipToShape => 'Clip to shape'; + + @override + String get effectSeed => 'Seed'; + + @override + String get effectStartX => 'Start X'; + + @override + String get effectStartY => 'Start Y'; + + @override + String get effectEndX => 'End X'; + + @override + String get effectEndY => 'End Y'; + + @override + String get effectMoveUp => 'Move effect up'; + + @override + String get effectMoveDown => 'Move effect down'; + + @override + String get strokes => '선'; + + @override + String get stroke => '선'; + + @override + String get addStroke => '선 추가'; + + @override + String get updateStrokeFailed => '선을 업데이트할 수 없습니다'; + + @override + String get strokeWidth => '두께'; + + @override + String get strokeInside => '안쪽'; + + @override + String get strokeCenter => '가운데'; + + @override + String get strokeOutside => '바깥쪽'; + + @override + String get strokeStyle => '스타일'; + + @override + String get strokeSolid => '실선'; + + @override + String get strokeDashed => '파선'; + + @override + String get strokeDashLength => '선 길이'; + + @override + String get strokeDashGap => '간격'; + + @override + String get distortion => '왜곡'; + + @override + String get editDistortion => '왜곡 편집'; + + @override + String get finishDistortion => '왜곡 완료'; + + @override + String get resetDistortion => '왜곡 초기화'; + + @override + String get freeDistortion => '자유'; + + @override + String get perspectiveDistortion => '원근 연동'; + + @override + String get distortionTopLeft => '왼쪽 위'; + + @override + String get distortionTopRight => '오른쪽 위'; + + @override + String get distortionBottomRight => '오른쪽 아래'; + + @override + String get distortionBottomLeft => '왼쪽 아래'; } diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dart index da5572c..0966505 100644 --- a/lib/l10n/app_localizations_pt.dart +++ b/lib/l10n/app_localizations_pt.dart @@ -2396,4 +2396,181 @@ class AppLocalizationsPt extends AppLocalizations { @override String get cornerBottomLeft => 'Raio inferior esquerdo'; + + @override + String get effects => 'Effects'; + + @override + String get addEffect => 'Add effect'; + + @override + String get dropShadow => 'Drop shadow'; + + @override + String get innerShadow => 'Inner shadow'; + + @override + String get layerBlur => 'Layer blur'; + + @override + String get backgroundBlur => 'Background blur'; + + @override + String get glassEffect => 'Glass'; + + @override + String get noiseEffect => 'Noise'; + + @override + String get textureEffect => 'Texture'; + + @override + String get updateEffectFailed => 'Could not update effect'; + + @override + String get effectBlurEnd => 'End blur'; + + @override + String get effectProgressive => 'Progressive'; + + @override + String get effectUniform => 'Uniform'; + + @override + String get effectLightAngle => 'Light angle'; + + @override + String get effectLightIntensity => 'Light intensity'; + + @override + String get effectRefraction => 'Refraction'; + + @override + String get effectDepth => 'Depth'; + + @override + String get effectDispersion => 'Dispersion'; + + @override + String get effectFrost => 'Frost'; + + @override + String get effectSplay => 'Splay'; + + @override + String get effectNoiseMode => 'Noise colors'; + + @override + String get effectMono => 'Mono'; + + @override + String get effectDuo => 'Duo'; + + @override + String get effectMulti => 'Multi'; + + @override + String get effectNoiseSize => 'Size'; + + @override + String get effectDensity => 'Density'; + + @override + String get effectSecondColor => 'Second color'; + + @override + String get effectTextureRadius => 'Radius'; + + @override + String get effectClipToShape => 'Clip to shape'; + + @override + String get effectSeed => 'Seed'; + + @override + String get effectStartX => 'Start X'; + + @override + String get effectStartY => 'Start Y'; + + @override + String get effectEndX => 'End X'; + + @override + String get effectEndY => 'End Y'; + + @override + String get effectMoveUp => 'Move effect up'; + + @override + String get effectMoveDown => 'Move effect down'; + + @override + String get strokes => 'Traços'; + + @override + String get stroke => 'Traço'; + + @override + String get addStroke => 'Adicionar traço'; + + @override + String get updateStrokeFailed => 'Não foi possível atualizar o traço'; + + @override + String get strokeWidth => 'Espessura'; + + @override + String get strokeInside => 'Interior'; + + @override + String get strokeCenter => 'Centro'; + + @override + String get strokeOutside => 'Exterior'; + + @override + String get strokeStyle => 'Estilo'; + + @override + String get strokeSolid => 'Contínuo'; + + @override + String get strokeDashed => 'Tracejado'; + + @override + String get strokeDashLength => 'Comprimento'; + + @override + String get strokeDashGap => 'Espaçamento'; + + @override + String get distortion => 'Distorção'; + + @override + String get editDistortion => 'Editar distorção'; + + @override + String get finishDistortion => 'Concluir distorção'; + + @override + String get resetDistortion => 'Redefinir distorção'; + + @override + String get freeDistortion => 'Livre'; + + @override + String get perspectiveDistortion => 'Perspectiva'; + + @override + String get distortionTopLeft => 'Superior esquerdo'; + + @override + String get distortionTopRight => 'Superior direito'; + + @override + String get distortionBottomRight => 'Inferior direito'; + + @override + String get distortionBottomLeft => 'Inferior esquerdo'; } diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dart index 913252a..bc78494 100644 --- a/lib/l10n/app_localizations_ru.dart +++ b/lib/l10n/app_localizations_ru.dart @@ -2389,4 +2389,181 @@ class AppLocalizationsRu extends AppLocalizations { @override String get cornerBottomLeft => 'Радиус слева снизу'; + + @override + String get effects => 'Effects'; + + @override + String get addEffect => 'Add effect'; + + @override + String get dropShadow => 'Drop shadow'; + + @override + String get innerShadow => 'Inner shadow'; + + @override + String get layerBlur => 'Layer blur'; + + @override + String get backgroundBlur => 'Background blur'; + + @override + String get glassEffect => 'Glass'; + + @override + String get noiseEffect => 'Noise'; + + @override + String get textureEffect => 'Texture'; + + @override + String get updateEffectFailed => 'Could not update effect'; + + @override + String get effectBlurEnd => 'End blur'; + + @override + String get effectProgressive => 'Progressive'; + + @override + String get effectUniform => 'Uniform'; + + @override + String get effectLightAngle => 'Light angle'; + + @override + String get effectLightIntensity => 'Light intensity'; + + @override + String get effectRefraction => 'Refraction'; + + @override + String get effectDepth => 'Depth'; + + @override + String get effectDispersion => 'Dispersion'; + + @override + String get effectFrost => 'Frost'; + + @override + String get effectSplay => 'Splay'; + + @override + String get effectNoiseMode => 'Noise colors'; + + @override + String get effectMono => 'Mono'; + + @override + String get effectDuo => 'Duo'; + + @override + String get effectMulti => 'Multi'; + + @override + String get effectNoiseSize => 'Size'; + + @override + String get effectDensity => 'Density'; + + @override + String get effectSecondColor => 'Second color'; + + @override + String get effectTextureRadius => 'Radius'; + + @override + String get effectClipToShape => 'Clip to shape'; + + @override + String get effectSeed => 'Seed'; + + @override + String get effectStartX => 'Start X'; + + @override + String get effectStartY => 'Start Y'; + + @override + String get effectEndX => 'End X'; + + @override + String get effectEndY => 'End Y'; + + @override + String get effectMoveUp => 'Move effect up'; + + @override + String get effectMoveDown => 'Move effect down'; + + @override + String get strokes => 'Обводки'; + + @override + String get stroke => 'Обводка'; + + @override + String get addStroke => 'Добавить обводку'; + + @override + String get updateStrokeFailed => 'Не удалось обновить обводку'; + + @override + String get strokeWidth => 'Толщина'; + + @override + String get strokeInside => 'Внутри'; + + @override + String get strokeCenter => 'По центру'; + + @override + String get strokeOutside => 'Снаружи'; + + @override + String get strokeStyle => 'Стиль'; + + @override + String get strokeSolid => 'Сплошная'; + + @override + String get strokeDashed => 'Пунктирная'; + + @override + String get strokeDashLength => 'Длина штриха'; + + @override + String get strokeDashGap => 'Интервал'; + + @override + String get distortion => 'Искажение'; + + @override + String get editDistortion => 'Изменить искажение'; + + @override + String get finishDistortion => 'Завершить искажение'; + + @override + String get resetDistortion => 'Сбросить искажение'; + + @override + String get freeDistortion => 'Свободно'; + + @override + String get perspectiveDistortion => 'Перспектива'; + + @override + String get distortionTopLeft => 'Верхний левый'; + + @override + String get distortionTopRight => 'Верхний правый'; + + @override + String get distortionBottomRight => 'Нижний правый'; + + @override + String get distortionBottomLeft => 'Нижний левый'; } diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dart index 6b5ea49..c446c29 100644 --- a/lib/l10n/app_localizations_zh.dart +++ b/lib/l10n/app_localizations_zh.dart @@ -2259,6 +2259,183 @@ class AppLocalizationsZh extends AppLocalizations { @override String get cornerBottomLeft => '左下圆角'; + + @override + String get effects => '效果'; + + @override + String get addEffect => '添加效果'; + + @override + String get dropShadow => '外阴影'; + + @override + String get innerShadow => '内阴影'; + + @override + String get layerBlur => '图层模糊'; + + @override + String get backgroundBlur => '背景模糊'; + + @override + String get glassEffect => '玻璃'; + + @override + String get noiseEffect => '噪点'; + + @override + String get textureEffect => '纹理'; + + @override + String get updateEffectFailed => '无法更新效果'; + + @override + String get effectBlurEnd => '结束模糊'; + + @override + String get effectProgressive => '渐进'; + + @override + String get effectUniform => '均匀'; + + @override + String get effectLightAngle => '光照角度'; + + @override + String get effectLightIntensity => '光照强度'; + + @override + String get effectRefraction => '折射'; + + @override + String get effectDepth => '深度'; + + @override + String get effectDispersion => '色散'; + + @override + String get effectFrost => '磨砂'; + + @override + String get effectSplay => '光照扩散'; + + @override + String get effectNoiseMode => '噪点颜色'; + + @override + String get effectMono => '单色'; + + @override + String get effectDuo => '双色'; + + @override + String get effectMulti => '多色'; + + @override + String get effectNoiseSize => '颗粒大小'; + + @override + String get effectDensity => '密度'; + + @override + String get effectSecondColor => '第二颜色'; + + @override + String get effectTextureRadius => '扰动半径'; + + @override + String get effectClipToShape => '裁剪到形状'; + + @override + String get effectSeed => '随机种子'; + + @override + String get effectStartX => '起点 X'; + + @override + String get effectStartY => '起点 Y'; + + @override + String get effectEndX => '终点 X'; + + @override + String get effectEndY => '终点 Y'; + + @override + String get effectMoveUp => '上移效果'; + + @override + String get effectMoveDown => '下移效果'; + + @override + String get strokes => '描边'; + + @override + String get stroke => '描边'; + + @override + String get addStroke => '添加描边'; + + @override + String get updateStrokeFailed => '无法更新描边'; + + @override + String get strokeWidth => '粗细'; + + @override + String get strokeInside => '内侧'; + + @override + String get strokeCenter => '居中'; + + @override + String get strokeOutside => '外侧'; + + @override + String get strokeStyle => '样式'; + + @override + String get strokeSolid => '实线'; + + @override + String get strokeDashed => '虚线'; + + @override + String get strokeDashLength => '线段长度'; + + @override + String get strokeDashGap => '间隔'; + + @override + String get distortion => '变形'; + + @override + String get editDistortion => '编辑变形'; + + @override + String get finishDistortion => '完成变形'; + + @override + String get resetDistortion => '重置变形'; + + @override + String get freeDistortion => '自由'; + + @override + String get perspectiveDistortion => '透视联动'; + + @override + String get distortionTopLeft => '左上角'; + + @override + String get distortionTopRight => '右上角'; + + @override + String get distortionBottomRight => '右下角'; + + @override + String get distortionBottomLeft => '左下角'; } /// The translations for Chinese, using the Han script (`zh_Hans`). @@ -4515,6 +4692,183 @@ class AppLocalizationsZhHans extends AppLocalizationsZh { @override String get cornerBottomLeft => '左下圆角'; + + @override + String get effects => '效果'; + + @override + String get addEffect => '添加效果'; + + @override + String get dropShadow => '外阴影'; + + @override + String get innerShadow => '内阴影'; + + @override + String get layerBlur => '图层模糊'; + + @override + String get backgroundBlur => '背景模糊'; + + @override + String get glassEffect => '玻璃'; + + @override + String get noiseEffect => '噪点'; + + @override + String get textureEffect => '纹理'; + + @override + String get updateEffectFailed => '无法更新效果'; + + @override + String get effectBlurEnd => '结束模糊'; + + @override + String get effectProgressive => '渐进'; + + @override + String get effectUniform => '均匀'; + + @override + String get effectLightAngle => '光照角度'; + + @override + String get effectLightIntensity => '光照强度'; + + @override + String get effectRefraction => '折射'; + + @override + String get effectDepth => '深度'; + + @override + String get effectDispersion => '色散'; + + @override + String get effectFrost => '磨砂'; + + @override + String get effectSplay => '光照扩散'; + + @override + String get effectNoiseMode => '噪点颜色'; + + @override + String get effectMono => '单色'; + + @override + String get effectDuo => '双色'; + + @override + String get effectMulti => '多色'; + + @override + String get effectNoiseSize => '颗粒大小'; + + @override + String get effectDensity => '密度'; + + @override + String get effectSecondColor => '第二颜色'; + + @override + String get effectTextureRadius => '扰动半径'; + + @override + String get effectClipToShape => '裁剪到形状'; + + @override + String get effectSeed => '随机种子'; + + @override + String get effectStartX => '起点 X'; + + @override + String get effectStartY => '起点 Y'; + + @override + String get effectEndX => '终点 X'; + + @override + String get effectEndY => '终点 Y'; + + @override + String get effectMoveUp => '上移效果'; + + @override + String get effectMoveDown => '下移效果'; + + @override + String get strokes => '描边'; + + @override + String get stroke => '描边'; + + @override + String get addStroke => '添加描边'; + + @override + String get updateStrokeFailed => '无法更新描边'; + + @override + String get strokeWidth => '粗细'; + + @override + String get strokeInside => '内侧'; + + @override + String get strokeCenter => '居中'; + + @override + String get strokeOutside => '外侧'; + + @override + String get strokeStyle => '样式'; + + @override + String get strokeSolid => '实线'; + + @override + String get strokeDashed => '虚线'; + + @override + String get strokeDashLength => '线段长度'; + + @override + String get strokeDashGap => '间隔'; + + @override + String get distortion => '变形'; + + @override + String get editDistortion => '编辑变形'; + + @override + String get finishDistortion => '完成变形'; + + @override + String get resetDistortion => '重置变形'; + + @override + String get freeDistortion => '自由'; + + @override + String get perspectiveDistortion => '透视联动'; + + @override + String get distortionTopLeft => '左上角'; + + @override + String get distortionTopRight => '右上角'; + + @override + String get distortionBottomRight => '右下角'; + + @override + String get distortionBottomLeft => '左下角'; } /// The translations for Chinese, using the Han script (`zh_Hant`). @@ -6771,4 +7125,181 @@ class AppLocalizationsZhHant extends AppLocalizationsZh { @override String get cornerBottomLeft => '左下圓角'; + + @override + String get effects => '效果'; + + @override + String get addEffect => '添加效果'; + + @override + String get dropShadow => '外阴影'; + + @override + String get innerShadow => '内阴影'; + + @override + String get layerBlur => '图层模糊'; + + @override + String get backgroundBlur => '背景模糊'; + + @override + String get glassEffect => '玻璃'; + + @override + String get noiseEffect => '噪点'; + + @override + String get textureEffect => '纹理'; + + @override + String get updateEffectFailed => '无法更新效果'; + + @override + String get effectBlurEnd => '结束模糊'; + + @override + String get effectProgressive => '渐进'; + + @override + String get effectUniform => '均匀'; + + @override + String get effectLightAngle => '光照角度'; + + @override + String get effectLightIntensity => '光照强度'; + + @override + String get effectRefraction => '折射'; + + @override + String get effectDepth => '深度'; + + @override + String get effectDispersion => '色散'; + + @override + String get effectFrost => '磨砂'; + + @override + String get effectSplay => '光照扩散'; + + @override + String get effectNoiseMode => '噪点颜色'; + + @override + String get effectMono => '单色'; + + @override + String get effectDuo => '双色'; + + @override + String get effectMulti => '多色'; + + @override + String get effectNoiseSize => '颗粒大小'; + + @override + String get effectDensity => '密度'; + + @override + String get effectSecondColor => '第二颜色'; + + @override + String get effectTextureRadius => '扰动半径'; + + @override + String get effectClipToShape => '裁剪到形状'; + + @override + String get effectSeed => '随机种子'; + + @override + String get effectStartX => '起点 X'; + + @override + String get effectStartY => '起点 Y'; + + @override + String get effectEndX => '终点 X'; + + @override + String get effectEndY => '终点 Y'; + + @override + String get effectMoveUp => '上移效果'; + + @override + String get effectMoveDown => '下移效果'; + + @override + String get strokes => '描邊'; + + @override + String get stroke => '描邊'; + + @override + String get addStroke => '新增描邊'; + + @override + String get updateStrokeFailed => '無法更新描邊'; + + @override + String get strokeWidth => '粗細'; + + @override + String get strokeInside => '內側'; + + @override + String get strokeCenter => '置中'; + + @override + String get strokeOutside => '外側'; + + @override + String get strokeStyle => '樣式'; + + @override + String get strokeSolid => '實線'; + + @override + String get strokeDashed => '虛線'; + + @override + String get strokeDashLength => '線段長度'; + + @override + String get strokeDashGap => '間隔'; + + @override + String get distortion => '變形'; + + @override + String get editDistortion => '編輯變形'; + + @override + String get finishDistortion => '完成變形'; + + @override + String get resetDistortion => '重設變形'; + + @override + String get freeDistortion => '自由'; + + @override + String get perspectiveDistortion => '透視連動'; + + @override + String get distortionTopLeft => '左上角'; + + @override + String get distortionTopRight => '右上角'; + + @override + String get distortionBottomRight => '右下角'; + + @override + String get distortionBottomLeft => '左下角'; } diff --git a/lib/l10n/app_pt.arb b/lib/l10n/app_pt.arb index 15add09..1311452 100644 --- a/lib/l10n/app_pt.arb +++ b/lib/l10n/app_pt.arb @@ -14,7 +14,6 @@ "agentUntitledConversation": "Nova conversa", "agentConversationActions": "Ações da conversa", "agentElapsedTime": "Duração {duration}", - "agentConversationActions": "Ações da conversa", "agentMoveToTrash": "Mover para a lixeira", "agentTrash": "Lixeira", "agentRestore": "Restaurar", @@ -955,5 +954,64 @@ "cornerTopLeft": "Raio superior esquerdo", "cornerTopRight": "Raio superior direito", "cornerBottomRight": "Raio inferior direito", - "cornerBottomLeft": "Raio inferior esquerdo" + "cornerBottomLeft": "Raio inferior esquerdo", + "effects": "Effects", + "addEffect": "Add effect", + "dropShadow": "Drop shadow", + "innerShadow": "Inner shadow", + "layerBlur": "Layer blur", + "backgroundBlur": "Background blur", + "glassEffect": "Glass", + "noiseEffect": "Noise", + "textureEffect": "Texture", + "updateEffectFailed": "Could not update effect", + "effectBlurEnd": "End blur", + "effectProgressive": "Progressive", + "effectUniform": "Uniform", + "effectLightAngle": "Light angle", + "effectLightIntensity": "Light intensity", + "effectRefraction": "Refraction", + "effectDepth": "Depth", + "effectDispersion": "Dispersion", + "effectFrost": "Frost", + "effectSplay": "Splay", + "effectNoiseMode": "Noise colors", + "effectMono": "Mono", + "effectDuo": "Duo", + "effectMulti": "Multi", + "effectNoiseSize": "Size", + "effectDensity": "Density", + "effectSecondColor": "Second color", + "effectTextureRadius": "Radius", + "effectClipToShape": "Clip to shape", + "effectSeed": "Seed", + "effectStartX": "Start X", + "effectStartY": "Start Y", + "effectEndX": "End X", + "effectEndY": "End Y", + "effectMoveUp": "Move effect up", + "effectMoveDown": "Move effect down", + "strokes": "Traços", + "stroke": "Traço", + "addStroke": "Adicionar traço", + "updateStrokeFailed": "Não foi possível atualizar o traço", + "strokeWidth": "Espessura", + "strokeInside": "Interior", + "strokeCenter": "Centro", + "strokeOutside": "Exterior", + "strokeStyle": "Estilo", + "strokeSolid": "Contínuo", + "strokeDashed": "Tracejado", + "strokeDashLength": "Comprimento", + "strokeDashGap": "Espaçamento", + "distortion": "Distorção", + "editDistortion": "Editar distorção", + "finishDistortion": "Concluir distorção", + "resetDistortion": "Redefinir distorção", + "freeDistortion": "Livre", + "perspectiveDistortion": "Perspectiva", + "distortionTopLeft": "Superior esquerdo", + "distortionTopRight": "Superior direito", + "distortionBottomRight": "Inferior direito", + "distortionBottomLeft": "Inferior esquerdo" } diff --git a/lib/l10n/app_ru.arb b/lib/l10n/app_ru.arb index 6a07a7a..471de30 100644 --- a/lib/l10n/app_ru.arb +++ b/lib/l10n/app_ru.arb @@ -12,9 +12,8 @@ "showFewerConversations": "Показать меньше", "agentNewConversation": "Новый диалог", "agentUntitledConversation": "Новый чат", - "agentConversationActions": "Действия с чатом", - "agentElapsedTime": "Время {duration}", "agentConversationActions": "Действия с диалогом", + "agentElapsedTime": "Время {duration}", "agentMoveToTrash": "Переместить в корзину", "agentTrash": "Корзина", "agentRestore": "Восстановить", @@ -955,5 +954,64 @@ "cornerTopLeft": "Радиус слева сверху", "cornerTopRight": "Радиус справа сверху", "cornerBottomRight": "Радиус справа снизу", - "cornerBottomLeft": "Радиус слева снизу" + "cornerBottomLeft": "Радиус слева снизу", + "effects": "Effects", + "addEffect": "Add effect", + "dropShadow": "Drop shadow", + "innerShadow": "Inner shadow", + "layerBlur": "Layer blur", + "backgroundBlur": "Background blur", + "glassEffect": "Glass", + "noiseEffect": "Noise", + "textureEffect": "Texture", + "updateEffectFailed": "Could not update effect", + "effectBlurEnd": "End blur", + "effectProgressive": "Progressive", + "effectUniform": "Uniform", + "effectLightAngle": "Light angle", + "effectLightIntensity": "Light intensity", + "effectRefraction": "Refraction", + "effectDepth": "Depth", + "effectDispersion": "Dispersion", + "effectFrost": "Frost", + "effectSplay": "Splay", + "effectNoiseMode": "Noise colors", + "effectMono": "Mono", + "effectDuo": "Duo", + "effectMulti": "Multi", + "effectNoiseSize": "Size", + "effectDensity": "Density", + "effectSecondColor": "Second color", + "effectTextureRadius": "Radius", + "effectClipToShape": "Clip to shape", + "effectSeed": "Seed", + "effectStartX": "Start X", + "effectStartY": "Start Y", + "effectEndX": "End X", + "effectEndY": "End Y", + "effectMoveUp": "Move effect up", + "effectMoveDown": "Move effect down", + "strokes": "Обводки", + "stroke": "Обводка", + "addStroke": "Добавить обводку", + "updateStrokeFailed": "Не удалось обновить обводку", + "strokeWidth": "Толщина", + "strokeInside": "Внутри", + "strokeCenter": "По центру", + "strokeOutside": "Снаружи", + "strokeStyle": "Стиль", + "strokeSolid": "Сплошная", + "strokeDashed": "Пунктирная", + "strokeDashLength": "Длина штриха", + "strokeDashGap": "Интервал", + "distortion": "Искажение", + "editDistortion": "Изменить искажение", + "finishDistortion": "Завершить искажение", + "resetDistortion": "Сбросить искажение", + "freeDistortion": "Свободно", + "perspectiveDistortion": "Перспектива", + "distortionTopLeft": "Верхний левый", + "distortionTopRight": "Верхний правый", + "distortionBottomRight": "Нижний правый", + "distortionBottomLeft": "Нижний левый" } diff --git a/lib/l10n/app_zh.arb b/lib/l10n/app_zh.arb index b988e29..7e5ff7c 100644 --- a/lib/l10n/app_zh.arb +++ b/lib/l10n/app_zh.arb @@ -27,9 +27,8 @@ "showFewerConversations": "收起显示", "agentNewConversation": "新建对话", "agentUntitledConversation": "新聊天", - "agentConversationActions": "聊天操作", - "agentElapsedTime": "用时 {duration}", "agentConversationActions": "对话操作", + "agentElapsedTime": "用时 {duration}", "agentMoveToTrash": "移至回收区", "agentTrash": "回收区", "agentRestore": "恢复", @@ -955,5 +954,64 @@ "cornerTopLeft": "左上圆角", "cornerTopRight": "右上圆角", "cornerBottomRight": "右下圆角", - "cornerBottomLeft": "左下圆角" + "cornerBottomLeft": "左下圆角", + "effects": "效果", + "addEffect": "添加效果", + "dropShadow": "外阴影", + "innerShadow": "内阴影", + "layerBlur": "图层模糊", + "backgroundBlur": "背景模糊", + "glassEffect": "玻璃", + "noiseEffect": "噪点", + "textureEffect": "纹理", + "updateEffectFailed": "无法更新效果", + "effectBlurEnd": "结束模糊", + "effectProgressive": "渐进", + "effectUniform": "均匀", + "effectLightAngle": "光照角度", + "effectLightIntensity": "光照强度", + "effectRefraction": "折射", + "effectDepth": "深度", + "effectDispersion": "色散", + "effectFrost": "磨砂", + "effectSplay": "光照扩散", + "effectNoiseMode": "噪点颜色", + "effectMono": "单色", + "effectDuo": "双色", + "effectMulti": "多色", + "effectNoiseSize": "颗粒大小", + "effectDensity": "密度", + "effectSecondColor": "第二颜色", + "effectTextureRadius": "扰动半径", + "effectClipToShape": "裁剪到形状", + "effectSeed": "随机种子", + "effectStartX": "起点 X", + "effectStartY": "起点 Y", + "effectEndX": "终点 X", + "effectEndY": "终点 Y", + "effectMoveUp": "上移效果", + "effectMoveDown": "下移效果", + "strokes": "描边", + "stroke": "描边", + "addStroke": "添加描边", + "updateStrokeFailed": "无法更新描边", + "strokeWidth": "粗细", + "strokeInside": "内侧", + "strokeCenter": "居中", + "strokeOutside": "外侧", + "strokeStyle": "样式", + "strokeSolid": "实线", + "strokeDashed": "虚线", + "strokeDashLength": "线段长度", + "strokeDashGap": "间隔", + "distortion": "变形", + "editDistortion": "编辑变形", + "finishDistortion": "完成变形", + "resetDistortion": "重置变形", + "freeDistortion": "自由", + "perspectiveDistortion": "透视联动", + "distortionTopLeft": "左上角", + "distortionTopRight": "右上角", + "distortionBottomRight": "右下角", + "distortionBottomLeft": "左下角" } diff --git a/lib/l10n/app_zh_Hans.arb b/lib/l10n/app_zh_Hans.arb index 04521cf..be47e1f 100644 --- a/lib/l10n/app_zh_Hans.arb +++ b/lib/l10n/app_zh_Hans.arb @@ -27,9 +27,8 @@ "showFewerConversations": "收起显示", "agentNewConversation": "新建对话", "agentUntitledConversation": "新聊天", - "agentConversationActions": "聊天操作", - "agentElapsedTime": "用时 {duration}", "agentConversationActions": "对话操作", + "agentElapsedTime": "用时 {duration}", "agentMoveToTrash": "移至回收区", "agentTrash": "回收区", "agentRestore": "恢复", @@ -955,5 +954,64 @@ "cornerTopLeft": "左上圆角", "cornerTopRight": "右上圆角", "cornerBottomRight": "右下圆角", - "cornerBottomLeft": "左下圆角" + "cornerBottomLeft": "左下圆角", + "effects": "效果", + "addEffect": "添加效果", + "dropShadow": "外阴影", + "innerShadow": "内阴影", + "layerBlur": "图层模糊", + "backgroundBlur": "背景模糊", + "glassEffect": "玻璃", + "noiseEffect": "噪点", + "textureEffect": "纹理", + "updateEffectFailed": "无法更新效果", + "effectBlurEnd": "结束模糊", + "effectProgressive": "渐进", + "effectUniform": "均匀", + "effectLightAngle": "光照角度", + "effectLightIntensity": "光照强度", + "effectRefraction": "折射", + "effectDepth": "深度", + "effectDispersion": "色散", + "effectFrost": "磨砂", + "effectSplay": "光照扩散", + "effectNoiseMode": "噪点颜色", + "effectMono": "单色", + "effectDuo": "双色", + "effectMulti": "多色", + "effectNoiseSize": "颗粒大小", + "effectDensity": "密度", + "effectSecondColor": "第二颜色", + "effectTextureRadius": "扰动半径", + "effectClipToShape": "裁剪到形状", + "effectSeed": "随机种子", + "effectStartX": "起点 X", + "effectStartY": "起点 Y", + "effectEndX": "终点 X", + "effectEndY": "终点 Y", + "effectMoveUp": "上移效果", + "effectMoveDown": "下移效果", + "strokes": "描边", + "stroke": "描边", + "addStroke": "添加描边", + "updateStrokeFailed": "无法更新描边", + "strokeWidth": "粗细", + "strokeInside": "内侧", + "strokeCenter": "居中", + "strokeOutside": "外侧", + "strokeStyle": "样式", + "strokeSolid": "实线", + "strokeDashed": "虚线", + "strokeDashLength": "线段长度", + "strokeDashGap": "间隔", + "distortion": "变形", + "editDistortion": "编辑变形", + "finishDistortion": "完成变形", + "resetDistortion": "重置变形", + "freeDistortion": "自由", + "perspectiveDistortion": "透视联动", + "distortionTopLeft": "左上角", + "distortionTopRight": "右上角", + "distortionBottomRight": "右下角", + "distortionBottomLeft": "左下角" } diff --git a/lib/l10n/app_zh_Hant.arb b/lib/l10n/app_zh_Hant.arb index 064ea76..5a4c65c 100644 --- a/lib/l10n/app_zh_Hant.arb +++ b/lib/l10n/app_zh_Hant.arb @@ -27,9 +27,8 @@ "showFewerConversations": "收起顯示", "agentNewConversation": "新增對話", "agentUntitledConversation": "新聊天", - "agentConversationActions": "聊天操作", - "agentElapsedTime": "耗時 {duration}", "agentConversationActions": "對話操作", + "agentElapsedTime": "耗時 {duration}", "agentMoveToTrash": "移至資源回收桶", "agentTrash": "資源回收桶", "agentRestore": "還原", @@ -955,5 +954,64 @@ "cornerTopLeft": "左上圓角", "cornerTopRight": "右上圓角", "cornerBottomRight": "右下圓角", - "cornerBottomLeft": "左下圓角" + "cornerBottomLeft": "左下圓角", + "effects": "效果", + "addEffect": "添加效果", + "dropShadow": "外阴影", + "innerShadow": "内阴影", + "layerBlur": "图层模糊", + "backgroundBlur": "背景模糊", + "glassEffect": "玻璃", + "noiseEffect": "噪点", + "textureEffect": "纹理", + "updateEffectFailed": "无法更新效果", + "effectBlurEnd": "结束模糊", + "effectProgressive": "渐进", + "effectUniform": "均匀", + "effectLightAngle": "光照角度", + "effectLightIntensity": "光照强度", + "effectRefraction": "折射", + "effectDepth": "深度", + "effectDispersion": "色散", + "effectFrost": "磨砂", + "effectSplay": "光照扩散", + "effectNoiseMode": "噪点颜色", + "effectMono": "单色", + "effectDuo": "双色", + "effectMulti": "多色", + "effectNoiseSize": "颗粒大小", + "effectDensity": "密度", + "effectSecondColor": "第二颜色", + "effectTextureRadius": "扰动半径", + "effectClipToShape": "裁剪到形状", + "effectSeed": "随机种子", + "effectStartX": "起点 X", + "effectStartY": "起点 Y", + "effectEndX": "终点 X", + "effectEndY": "终点 Y", + "effectMoveUp": "上移效果", + "effectMoveDown": "下移效果", + "strokes": "描邊", + "stroke": "描邊", + "addStroke": "新增描邊", + "updateStrokeFailed": "無法更新描邊", + "strokeWidth": "粗細", + "strokeInside": "內側", + "strokeCenter": "置中", + "strokeOutside": "外側", + "strokeStyle": "樣式", + "strokeSolid": "實線", + "strokeDashed": "虛線", + "strokeDashLength": "線段長度", + "strokeDashGap": "間隔", + "distortion": "變形", + "editDistortion": "編輯變形", + "finishDistortion": "完成變形", + "resetDistortion": "重設變形", + "freeDistortion": "自由", + "perspectiveDistortion": "透視連動", + "distortionTopLeft": "左上角", + "distortionTopRight": "右上角", + "distortionBottomRight": "右下角", + "distortionBottomLeft": "左下角" } diff --git a/packages/cutdex_ui/lib/src/widgets/app_menu.dart b/packages/cutdex_ui/lib/src/widgets/app_menu.dart index b63938f..5184b88 100644 --- a/packages/cutdex_ui/lib/src/widgets/app_menu.dart +++ b/packages/cutdex_ui/lib/src/widgets/app_menu.dart @@ -146,6 +146,7 @@ class AppMenuItem extends StatefulWidget { this.destructive = false, this.selectOption = false, this.requestFocusOnHover = true, + this.closeAncestors = true, }); final String label; final String? description; @@ -156,6 +157,9 @@ class AppMenuItem extends StatefulWidget { final bool selectOption; final bool requestFocusOnHover; + /// False closes this menu while retaining an enclosing property popover. + final bool closeAncestors; + @override State createState() => _AppMenuItemState(); } @@ -191,7 +195,15 @@ class _AppMenuItemState extends State { } _focusFromHover = hovered; }, - onPressed: widget.onPressed, + closeOnActivate: widget.closeAncestors, + onPressed: widget.onPressed == null + ? null + : () { + if (!widget.closeAncestors) { + MenuController.maybeOf(context)?.close(); + } + widget.onPressed!(); + }, style: widget.description != null ? AppMenuStyle.descriptionItem( context, @@ -427,6 +439,7 @@ class AppSelect extends StatelessWidget { this.searchable = false, this.controlHeight, this.textStyle, + this.closeAncestors = true, }) : assert(!searchable || searchHint != null); final T value; final List> options; @@ -438,6 +451,7 @@ class AppSelect extends StatelessWidget { final bool searchable; final double? controlHeight; final TextStyle? textStyle; + final bool closeAncestors; @override Widget build(BuildContext context) => searchable @@ -473,6 +487,7 @@ class AppSelect extends StatelessWidget { label: option.label, selected: option.value == value, selectOption: true, + closeAncestors: closeAncestors, onPressed: onChanged == null || !option.enabled ? null : () => onChanged!(option.value), diff --git a/test/compact_inspector_test.dart b/test/compact_inspector_test.dart index f537bb5..a04832d 100644 --- a/test/compact_inspector_test.dart +++ b/test/compact_inspector_test.dart @@ -210,7 +210,8 @@ void main() { expect(tester.getRect(input('x')).left, 16); expect(tester.getRect(input('x')).width, (width - 64) / 2); expect(tester.getRect(input('rotation')).width, (width - 64) / 2); - expect(find.byType(AppPropertyGroup), findsNWidgets(4)); + expect(find.byType(AppPropertyGroup), findsNWidgets(6)); + expect(find.byKey(const ValueKey('stroke-add')), findsOneWidget); expect( tester.getRect(input('corner-radius')).width, (width - 64) / 2, diff --git a/test/picture_distortion_test.dart b/test/picture_distortion_test.dart new file mode 100644 index 0000000..5c66542 --- /dev/null +++ b/test/picture_distortion_test.dart @@ -0,0 +1,123 @@ +import 'package:cutdex/app/editor_theme.dart'; +import 'package:cutdex/features/preview/preview_panel.dart'; +import 'package:cutdex/features/properties/distortion_properties.dart'; +import 'package:cutdex/l10n/app_localizations.dart'; +import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_sdk/timeline/engine.dart'; +import 'package:cutdex_ui/theme.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'support/preview_fixture.dart'; + +void main() { + testWidgets( + 'four corner fields use paired keys; reset preserves animation; no px', + (tester) async { + final f = (await tester.runAsync( + () => createPreviewFixture( + Uri.file('/test/video.mov'), + clipDuration: RationalTime.seconds(5), + ), + ))!; + addTearDown( + () => tester.runAsync(() async { + await f.workspace.close(); + await f.directory.delete(recursive: true); + }), + ); + final sequence = SequenceId('one'), + clip = ElementId('clip'), + project = f.workspace.project!.info.id; + final view = f.timeline.view(sequence); + ElementRecord record() { + final q = view.version.kernelVersion.query(); + return q.element(q.elementById(clip)!); + } + + await tester.pumpWidget( + ProviderScope( + overrides: [ + editorPreviewProvider( + project, + 'project', + ).overrideWith((ref) => null), + ], + child: MaterialApp( + localizationsDelegates: AppLocalizations.localizationsDelegates, + supportedLocales: AppLocalizations.supportedLocales, + locale: const Locale('zh'), + theme: AppTheme.propertiesPanelTheme( + EditorTheme.desktop(EditorTheme.penDark), + ), + home: Scaffold( + body: Align( + alignment: Alignment.topRight, + child: SizedBox( + width: 240, + child: SingleChildScrollView( + child: DistortionProperties( + projectId: project, + timelineId: 'project', + session: f.timeline, + sequence: sequence, + clip: clip, + ), + ), + ), + ), + ), + ), + ), + ); + Future settle() async { + await tester.pump(); + await tester.runAsync(f.timeline.flush); + await tester.pumpAndSettle(); + expect(tester.takeException(), isNull); + } + + await settle(); + expect(find.text('变形'), findsOneWidget); + expect(find.text('px'), findsNothing); + expect(find.text('X'), findsNWidgets(4)); + expect(find.text('Y'), findsNWidgets(4)); + expect(find.byType(TextField), findsNWidgets(8)); + final key = find.byKey(const ValueKey('distortion-topLeft-key')); + await tester.tap(key); + await settle(); + for (final id in ClipDistortion.ids.take(2)) { + expect(record().parameters![id]!.length, 1); + } + view.seekTo(TimelineClock.ticksPerSecond); + await settle(); + final input = find.descendant( + of: find.byKey(const ValueKey('distortion-topLeft-y')), + matching: find.byType(TextField), + ); + await tester.enterText(input, '20'); + await tester.testTextInput.receiveAction(TextInputAction.done); + await settle(); + for (final id in ClipDistortion.ids.take(2)) { + expect(record().parameters![id]!.length, 2); + } + final y = record().parameters![ClipDistortion.ids[1]]!; + expect(y.valueAt(TimelineClock.ticksPerSecond), greaterThan(0)); + for (final id in ClipDistortion.ids.skip(2)) { + expect(record().parameters?[id]?.length ?? 0, 0); + } + await tester.tap(find.byKey(const ValueKey('distortion-reset'))); + await settle(); + expect(record().parameters![ClipDistortion.ids[1]]!.length, 2); + expect( + record().parameters![ClipDistortion.ids[1]]!.valueAt( + TimelineClock.ticksPerSecond, + ), + 0, + ); + await tester.pumpWidget(const SizedBox()); + }, + ); +} diff --git a/test/picture_edits_test.dart b/test/picture_edits_test.dart new file mode 100644 index 0000000..f3e611a --- /dev/null +++ b/test/picture_edits_test.dart @@ -0,0 +1,139 @@ +import 'dart:async'; + +import 'package:cutdex/features/properties/picture_edits.dart'; +import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_sdk/preview.dart'; +import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'support/preview_fixture.dart'; + +void main() { + TestWidgetsFlutterBinding.ensureInitialized(); + for (final invalidation in [ + 'dispose', + 'seek', + 'version', + 'sequence', + 'selection', + ]) { + test( + 'picture edit cannot publish after $invalidation during pause', + () async { + final f = await createPreviewFixture(Uri.file('/test/video.mov')); + final preview = _PausedPreview( + timeline: f.timeline, + runtime: CutdexRuntime(), + activeSequence: () => f.timeline.activeSequenceId, + viewForSequence: f.timeline.view, + ); + final container = ProviderContainer(); + var disposed = false; + addTearDown(() async { + if (!disposed) container.dispose(); + await preview.close(); + await f.workspace.close(); + await f.directory.delete(recursive: true); + }); + final sequence = SequenceId('one'), clip = ElementId('clip'); + final provider = pictureEditsProvider(f.timeline, sequence, clip); + container.listen(provider, (_, _) {}); + final edits = container.read(provider.notifier); + var current = true; + var applied = 0; + final pending = edits.commit(preview, (value) { + applied++; + return value.copyWith(x: .25); + }, isCurrent: () => current); + expect(container.read(provider).isLoading, isTrue); + switch (invalidation) { + case 'dispose': + container.dispose(); + disposed = true; + case 'seek': + f.timeline.view(sequence).seekTo(1); + case 'version': + f.timeline.commands.addEffect( + sequence: sequence, + clip: clip, + tick: 0, + effectId: 'external', + type: ClipEffectType.dropShadow, + ); + case 'sequence': + f.timeline.selectSequence(SequenceId('empty')); + case 'selection': + current = false; + } + preview.paused.complete(); + expect(await pending, isFalse); + expect(applied, 0); + if (!disposed) expect(container.read(provider).hasError, isFalse); + }, + ); + } + + test( + 'picture keys wait for the input commit and record its new value', + () async { + final f = await createPreviewFixture(Uri.file('/test/video.mov')); + final preview = _PausedPreview( + timeline: f.timeline, + runtime: CutdexRuntime(), + activeSequence: () => f.timeline.activeSequenceId, + viewForSequence: f.timeline.view, + ); + final container = ProviderContainer(); + addTearDown(() async { + container.dispose(); + await preview.close(); + await f.workspace.close(); + await f.directory.delete(recursive: true); + }); + final provider = pictureEditsProvider( + f.timeline, + SequenceId('one'), + ElementId('clip'), + ); + container.listen(provider, (_, _) {}); + final edits = container.read(provider.notifier); + final commit = edits.commit( + preview, + (v) => v.copyWith(x: .25), + isCurrent: () => true, + ); + expect( + await edits.commit( + preview, + (v) => v.copyWith(x: .75), + isCurrent: () => true, + ), + isFalse, + ); + final keys = edits.editKeys( + preview, + TransformChannel.position, + isCurrent: () => true, + ); + preview.paused.complete(); + expect(await commit, isTrue); + await keys; + expect(edits.animation()!.value.x, .25); + expect(edits.animation()!.keyed(TransformChannel.position), isTrue); + }, + ); +} + +class _PausedPreview extends PreviewController { + _PausedPreview({ + required super.timeline, + required super.runtime, + required super.activeSequence, + required super.viewForSequence, + }); + final paused = Completer(); + @override + Future pauseForCanvasInteraction() => paused.future; +} diff --git a/test/picture_effect_test.dart b/test/picture_effect_test.dart new file mode 100644 index 0000000..ed7d6bd --- /dev/null +++ b/test/picture_effect_test.dart @@ -0,0 +1,199 @@ +import 'package:cutdex/app/editor_theme.dart'; +import 'package:cutdex/features/preview/preview_panel.dart'; +import 'package:cutdex/features/properties/effect_properties.dart'; +import 'package:cutdex/features/properties/effect_labels.dart'; +import 'package:cutdex/l10n/app_localizations.dart'; +import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_ui/theme.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'support/preview_fixture.dart'; + +void main() { + testWidgets( + 'blur input and keyframe control edit only the selected property', + (tester) async { + final f = (await tester.runAsync( + () => createPreviewFixture( + Uri.file('/test/video.mov'), + clipDuration: RationalTime.seconds(5), + ), + ))!; + addTearDown( + () => tester.runAsync(() async { + await f.workspace.close(); + await f.directory.delete(recursive: true); + }), + ); + final sequence = SequenceId('one'), clip = ElementId('clip'); + final view = f.timeline.view(sequence); + final commands = f.timeline.commands; + ClipEffectStack current() { + final query = view.version.kernelVersion.query(); + final handle = query.elementById(clip)!; + return ClipEffectStack( + query.element(handle), + view.playheadTick - query.absoluteStart(handle), + ); + } + + for (final id in ['a', 'b']) { + commands.addEffect( + sequence: sequence, + clip: clip, + tick: 0, + effectId: id, + type: ClipEffectType.dropShadow, + ); + } + final project = f.workspace.project!.info.id; + await tester.pumpWidget( + ProviderScope( + overrides: [ + editorPreviewProvider( + project, + 'project', + ).overrideWith((ref) => null), + ], + child: MaterialApp( + localizationsDelegates: AppLocalizations.localizationsDelegates, + supportedLocales: AppLocalizations.supportedLocales, + locale: const Locale('zh'), + theme: AppTheme.propertiesPanelTheme( + EditorTheme.desktop(EditorTheme.penDark), + ), + home: Scaffold( + body: Align( + alignment: Alignment.topRight, + child: SizedBox( + width: 240, + child: SingleChildScrollView( + child: EffectProperties( + projectId: project, + timelineId: 'project', + session: f.timeline, + sequence: sequence, + clip: clip, + ), + ), + ), + ), + ), + ), + ), + ); + Future settle() async { + await tester.pump(); + await tester.runAsync(f.timeline.flush); + await tester.pumpAndSettle(); + expect(tester.takeException(), isNull); + } + + await settle(); + await tester.tap(find.byKey(const ValueKey('effect-settings-a'))); + await settle(); + await tester.tap(find.byKey(const ValueKey('effect-a-blur-key'))); + await settle(); + final blurId = const EffectParameterTarget('a', 'blur').parameterId; + expect(current().record.parameters?[blurId]?.length, 1); + for (final id in current().parameterIds.where((id) => id != blurId)) { + expect(current().record.parameters?[id]?.length, 0); + } + view.seekTo(TimelineClock.ticksPerSecond); + await settle(); + final input = find.descendant( + of: find.byKey(const ValueKey('effect-a-blur')), + matching: find.byType(TextField), + ); + await tester.enterText(input, '20'); + await tester.testTextInput.receiveAction(TextInputAction.done); + await settle(); + expect(current().record.parameters?[blurId]?.length, 2); + expect(current().layers.first.values['blur'], 20); + for (final id in current().parameterIds.where((id) => id != blurId)) { + expect(current().record.parameters?[id]?.length, 0); + } + view.seekTo(TimelineClock.ticksPerSecond ~/ 2); + expect(current().layers.last.values['blur'], 8); + expect(current().layers.first.values['blur'], closeTo(14, .001)); + await settle(); + await tester.pumpWidget(const SizedBox()); + }, + ); + + for (final type in ClipEffectType.values) { + testWidgets('${type.name} exposes valid controls at 240 width', ( + tester, + ) async { + final f = (await tester.runAsync( + () => createPreviewFixture(Uri.file('/test/video.mov')), + ))!; + addTearDown( + () => tester.runAsync(() async { + await f.workspace.close(); + await f.directory.delete(recursive: true); + }), + ); + final sequence = SequenceId('one'), clip = ElementId('clip'); + f.timeline.commands.addEffect( + sequence: sequence, + clip: clip, + tick: 0, + effectId: 'test', + type: type, + ); + final project = f.workspace.project!.info.id; + await tester.pumpWidget( + ProviderScope( + overrides: [ + editorPreviewProvider( + project, + 'project', + ).overrideWith((ref) => null), + ], + child: MaterialApp( + localizationsDelegates: AppLocalizations.localizationsDelegates, + supportedLocales: AppLocalizations.supportedLocales, + locale: const Locale('zh'), + theme: AppTheme.propertiesPanelTheme( + EditorTheme.desktop(EditorTheme.penDark), + ), + home: Scaffold( + body: Align( + alignment: Alignment.topRight, + child: SizedBox( + width: 240, + child: SingleChildScrollView( + child: EffectProperties( + projectId: project, + timelineId: 'project', + session: f.timeline, + sequence: sequence, + clip: clip, + ), + ), + ), + ), + ), + ), + ), + ); + await tester.runAsync(f.timeline.flush); + await tester.pumpAndSettle(); + await tester.tap(find.byKey(const ValueKey('effect-settings-test'))); + await tester.runAsync(f.timeline.flush); + await tester.pumpAndSettle(); + expect(find.byKey(const ValueKey('effect-editor-test')), findsOneWidget); + expect( + find.text(type.label(tester.element(find.byType(EffectProperties)))), + findsWidgets, + ); + expect(tester.takeException(), isNull); + await tester.runAsync(f.timeline.flush); + await tester.pumpWidget(const SizedBox()); + }); + } +} diff --git a/test/picture_shadow_test.dart b/test/picture_shadow_test.dart deleted file mode 100644 index 51f2687..0000000 --- a/test/picture_shadow_test.dart +++ /dev/null @@ -1,485 +0,0 @@ -import 'package:cutdex/app/editor_theme.dart'; -import 'package:cutdex/features/preview/preview_panel.dart'; -import 'package:cutdex/features/properties/shadow_properties.dart'; -import 'package:cutdex/features/properties/picture_properties.dart'; -import 'package:cutdex/l10n/app_localizations.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_ui/theme.dart'; -import 'package:cutdex_ui/widgets.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:flutter_test/flutter_test.dart'; - -import 'support/preview_fixture.dart'; - -void main() { - testWidgets( - 'one shadow key captures all layers and structural edits preserve curves', - (tester) async { - final f = (await tester.runAsync( - () => createPreviewFixture( - Uri.file('/test/video.mov'), - clipDuration: RationalTime.seconds(5), - ), - ))!; - addTearDown( - () => tester.runAsync(() async { - await f.workspace.close(); - await f.directory.delete(recursive: true); - }), - ); - final seq = SequenceId('one'); - final clip = ElementId('clip'); - final view = f.timeline.view(seq); - final project = f.workspace.project!.info.id; - ClipShadowStack current() { - final q = view.version.kernelVersion.query(); - final h = q.elementById(clip)!; - return ClipShadowStack( - q.element(h), - view.playheadTick - q.absoluteStart(h), - ); - } - - await tester.pumpWidget( - ProviderScope( - overrides: [ - editorPreviewProvider( - project, - 'project', - ).overrideWith((ref) => null), - ], - child: MaterialApp( - localizationsDelegates: AppLocalizations.localizationsDelegates, - supportedLocales: AppLocalizations.supportedLocales, - locale: const Locale('zh'), - theme: AppTheme.propertiesPanelTheme( - EditorTheme.desktop(EditorTheme.penDark), - ), - home: Scaffold( - body: Align( - alignment: Alignment.topRight, - child: SizedBox( - width: 240, - child: SingleChildScrollView( - child: ShadowProperties( - projectId: project, - timelineId: 'project', - session: f.timeline, - sequence: seq, - clip: clip, - ), - ), - ), - ), - ), - ), - ), - ); - Future settle() async { - await tester.pump(); - await tester.runAsync(f.timeline.flush); - await tester.pumpAndSettle(); - expect(tester.takeException(), isNull); - } - - Future closeEditor() async { - final close = find.byWidgetPredicate( - (w) => - w is IconButton && - w.key is ValueKey && - (w.key! as ValueKey).value.startsWith( - 'shadow-editor-close-', - ), - ); - if (close.evaluate().isNotEmpty) { - await tester.tap(close); - await settle(); - } - } - - Future tap(Key key) async { - await closeEditor(); - final w = find.byKey(key); - await tester.ensureVisible(w); - await tester.tap(w); - await settle(); - } - - Future enter(String id, String field, String value) async { - if (find.byKey(ValueKey('shadow-editor-$id')).evaluate().isEmpty) { - await closeEditor(); - await tester.tap(find.byKey(ValueKey('shadow-settings-$id'))); - await settle(); - } - final input = find.descendant( - of: find.byKey(ValueKey('shadow-$id-$field')), - matching: find.byType(TextField), - ); - await tester.ensureVisible(input); - await tester.enterText(input, value); - await tester.testTextInput.receiveAction(TextInputAction.done); - await settle(); - } - - await settle(); - expect(current().layers, isEmpty); - expect(tester.getSize(find.byType(AppPropertySection)).height, 40); - await tap(const ValueKey('shadow-add')); - final a = current().layers.single.id; - await tap(const ValueKey('shadow-add')); - final b = current().layers.last.id; - expect(find.byType(TextField), findsNothing); - expect( - tester.getSize(find.byKey(ValueKey('shadow-layer-$a'))).height, - 32, - ); - await enter(a, 'x', '12'); - expect( - tester.getSize(find.byKey(ValueKey('shadow-editor-$a'))).width, - 240, - ); - expect( - tester.getRect(find.byKey(ValueKey('shadow-editor-$a'))).right, - lessThan(tester.getRect(find.byKey(ValueKey('shadow-layer-$a'))).left), - ); - final xField = find.descendant( - of: find.byKey(ValueKey('shadow-$a-x')), - matching: find.byType(TextField), - ); - expect(tester.getSize(xField), const Size(100, 24)); - expect( - tester.getSize(find.byKey(ValueKey('shadow-editor-$a'))).height, - 225, - ); - final yField = find.descendant( - of: find.byKey(ValueKey('shadow-$a-y')), - matching: find.byType(TextField), - ); - expect(tester.getRect(yField).left - tester.getRect(xField).right, 8); - final blurInput = find.descendant( - of: find.byKey(ValueKey('shadow-$a-blur')), - matching: find.byType(TextField), - ); - final blurLabel = find.descendant( - of: find.byKey(ValueKey('shadow-$a-blur')), - matching: find.text('模糊'), - ); - final colorLabel = find.descendant( - of: find.byKey(ValueKey('shadow-editor-$a')), - matching: find.text('颜色'), - ); - expect(tester.getSize(blurLabel).height, 16); - expect( - tester.getRect(blurInput).top - tester.getRect(blurLabel).bottom, - 4, - ); - expect(tester.getRect(blurLabel).top - tester.getRect(xField).bottom, 12); - expect( - tester.getRect(colorLabel).top - tester.getRect(blurInput).bottom, - 12, - ); - expect(tester.widget(blurLabel).style!.fontSize, 11); - expect( - tester.widget(blurLabel).style!.color, - Colors.white.withValues(alpha: .7), - ); - expect(tester.widget(xField).style!.fontSize, 11); - await tester.sendKeyEvent(LogicalKeyboardKey.escape); - await settle(); - await tester.sendKeyEvent(LogicalKeyboardKey.escape); - await settle(); - expect(find.byKey(ValueKey('shadow-editor-$a')), findsNothing); - await enter(b, 'blur', '20'); - expect(current().animated, isFalse); - expect(current().layers[0].shadow.x, 12); - expect(current().layers[1].shadow.blur, 20); - await enter(a, 'color', 'FF8800'); - expect(current().layers.first.shadow.red, 1); - expect( - tester.getSize(find.byKey(ValueKey('shadow-$a-color'))).width, - closeTo( - 2 * tester.getSize(find.byKey(ValueKey('shadow-$a-opacity'))).width, - .01, - ), - ); - await tester.tap(find.byKey(const ValueKey('shadow-color-swatch'))); - await settle(); - final plane = tester.getRect( - find.byKey(const ValueKey('shadow-color-plane')), - ); - await tester.tapAt(plane.topCenter + const Offset(0, 2)); - await settle(); - expect(current().layers.first.shadow.blue, greaterThan(.45)); - expect(find.byKey(const ValueKey('shadow-color-plane')), findsOneWidget); - view.undo(); - await settle(); - expect(current().layers.first.shadow.green, closeTo(136 / 255, .001)); - await tester.sendKeyEvent(LogicalKeyboardKey.escape); - await settle(); - expect(find.byKey(const ValueKey('shadow-color-plane')), findsNothing); - await enter(a, 'blur', '-1'); - expect(current().layers.first.shadow.blur, 8); - await tap(const ValueKey('shadow-key')); - expect(current().keyed, isTrue); - expect(current().parameterIds.length, 16); - expect( - current().parameterIds.every( - (id) => current().record.parameters?[id]?.length == 1, - ), - isTrue, - ); - view.seekTo(2 * TimelineClock.ticksPerSecond); - await settle(); - await enter(a, 'x', '32'); - await enter(b, 'blur', '40'); - expect( - current().parameterIds.every( - (id) => current().record.parameters?[id]?.length == 2, - ), - isTrue, - ); - view.seekTo(TimelineClock.ticksPerSecond); - await settle(); - expect(current().layers[0].shadow.x, 22); - expect(current().layers[1].shadow.blur, 30); - final blurField = find.descendant( - of: find.byKey(ValueKey('shadow-$b-blur')), - matching: find.byType(TextField), - ); - expect(tester.widget(blurField).controller!.text, '30'); - view.seekTo(0); - f.timeline.commands.editKeyframeChannel( - sequence: seq, - clip: clip, - tick: 0, - parameterIds: current().parameterIds, - action: KeyframeAction.set, - interpolation: ParameterInterpolation.hold, - ); - view.seekTo(TimelineClock.ticksPerSecond); - await settle(); - expect(current().layers.first.shadow.x, 12); - expect(current().layers.last.shadow.blur, 20); - view.undo(); - await settle(); - expect(current().layers.first.shadow.x, 22); - f.timeline.commands.editKeyframeChannel( - sequence: seq, - clip: clip, - tick: view.playheadTick, - parameterIds: current().parameterIds, - action: KeyframeAction.clear, - ); - await settle(); - expect(current().animated, isFalse); - expect(current().layers.first.shadow.x, 22); - view.undo(); - await settle(); - expect(current().animated, isTrue); - final before = current() - .record - .parameters?[ShadowParameterTarget(a, 'x').parameterId]; - await closeEditor(); - final dragWidget = find.byKey(ValueKey('shadow-drag-$a')); - expect( - tester.widget(dragWidget).enabled, - isTrue, - ); - final drag = tester.getCenter(dragWidget); - final gesture = await tester.startGesture(drag); - await tester.pump(); - await gesture.moveBy(const Offset(0, 12)); - await tester.pump(); - await gesture.moveBy(const Offset(0, 80)); - await tester.pump(const Duration(milliseconds: 300)); - await gesture.up(); - await settle(); - expect(current().layers.map((l) => l.id), [b, a]); - expect( - current().record.parameters?[ShadowParameterTarget(a, 'x').parameterId], - same(before), - ); - await tap(ValueKey('shadow-enabled-$b')); - expect(current().layers.first.enabled, isFalse); - await tap(ValueKey('shadow-remove-$a')); - expect(current().layers.length, 1); - expect( - current().record.parameters?[ShadowParameterTarget(a, 'x').parameterId], - isNull, - ); - view.undo(); - await settle(); - expect(current().layers.length, 2); - expect(current().layers.last.shadow.x, 22); - await tap(const ValueKey('shadow-add')); - final c = current().layers.last.id; - expect( - current() - .record - .parameters?[ShadowParameterTarget(c, 'x').parameterId] - ?.length, - 2, - ); - await tap(const ValueKey('shadow-add')); - expect(current().layers.length, 4); - expect( - tester - .widget(find.byKey(const ValueKey('shadow-add'))) - .onPressed, - isNull, - ); - expect( - () => f.timeline.commands.addShadow( - sequence: seq, - clip: clip, - tick: view.playheadTick, - shadowId: 'fifth', - ), - throwsA(isA()), - ); - await tester.tap(find.byKey(ValueKey('shadow-settings-$a'))); - await settle(); - await tester.tapAt(const Offset(50, 500)); - await settle(); - expect(find.byKey(ValueKey('shadow-editor-$a')), findsNothing); - await tester.tap(find.byKey(ValueKey('shadow-settings-$a'))); - await settle(); - f.timeline.commands.removeShadow( - sequence: seq, - clip: clip, - tick: view.playheadTick, - shadowId: a, - ); - await settle(); - expect(find.byKey(ValueKey('shadow-editor-$a')), findsNothing); - view.undo(); - await settle(); - expect(current().layers.length, 4); - final compiled = const ExecutionCompiler().compile( - ExecutionInput( - timeline: f.timeline.persistence.timeline(seq), - renderSize: RenderSize(64, 64), - media: { - PayloadRef('source'): ExecutionMediaBinding( - media: MediaReference( - id: 'media', - uri: Uri.file('/test/video.mov'), - ), - videoTrackSelection: TrackSelection.index(0), - ), - }, - parameterTargets: ClipTransform.targets, - ), - ); - expect( - compiled.plan.visualLayers.single.automation.map((a) => a.target), - contains(ShadowParameterTarget(a, 'x').parameterId), - ); - expect( - compiled.plan.visualLayers.single.automation - .firstWhere( - (c) => c.target == ShadowParameterTarget(a, 'x').parameterId, - ) - .keys - .length, - 2, - ); - // Existing persistence serializes all curves and feeds execution bindings unchanged. - final saved = await tester.runAsync( - () => f.workspace.project!.loadTimeline('project'), - ); - expect( - saved!.sequences.first.elements.first.parameters.map( - (p) => p.definition.id, - ), - contains(ShadowParameterTarget(a, 'x').parameterId), - ); - await tester.pumpWidget( - ProviderScope( - overrides: [ - editorPreviewProvider( - project, - 'project', - ).overrideWith((ref) => null), - ], - child: MaterialApp( - localizationsDelegates: AppLocalizations.localizationsDelegates, - supportedLocales: AppLocalizations.supportedLocales, - locale: const Locale('zh'), - theme: AppTheme.propertiesPanelTheme( - EditorTheme.desktop(EditorTheme.penDark), - ), - home: Scaffold( - body: SizedBox( - width: 240, - child: SingleChildScrollView( - child: PictureProperties( - projectId: project, - timelineId: 'project', - session: f.timeline, - sequence: seq, - clip: current().record, - animationView: true, - ), - ), - ), - ), - ), - ), - ); - await settle(); - expect( - find.byKey(const ValueKey('picture-key-marker-shadow-0')), - findsOneWidget, - ); - expect( - find.byKey( - const ValueKey( - 'picture-key-marker-shadow-${2 * TimelineClock.ticksPerSecond}', - ), - ), - findsOneWidget, - ); - await tester.pumpWidget(const SizedBox()); - }, - ); - - test( - 'shadow validation and retimed group keys use the existing source clock', - () { - expect(const ClipShadow(blur: -1).isValid, isFalse); - expect(const ClipShadow(opacity: 2).isValid, isFalse); - expect(const ClipShadow(x: double.nan).isValid, isFalse); - expect(RenderShadowTarget.parse('shadow.a.color.r')?.field, 'color.r'); - expect(isRenderVisualTarget('shadow.a.blur'), isTrue); - expect(isRenderVisualTarget('shadow.a.invalid'), isFalse); - expect(ShadowParameterTarget.parse('shadow.中文.x'), isNull); - for (final delta in [8, -8]) { - final record = ElementRecord( - id: ElementId('clip'), - structure: ElementStructure.content, - duration: 4 * TimelineClock.ticksPerSecond, - sourceStart: 10 * TimelineClock.ticksPerSecond, - sourceDuration: 8 * TimelineClock.ticksPerSecond, - enabled: true, - retime: RetimeMapRecord([ - RetimeSegmentRecord( - projectDuration: 4 * TimelineClock.ticksPerSecond, - sourceStart: 10 * TimelineClock.ticksPerSecond, - sourceDelta: delta * TimelineClock.ticksPerSecond, - ), - ]), - ); - expect( - ClipShadowStack(record, TimelineClock.ticksPerSecond).sourceTick, - (10 + delta ~/ 4) * TimelineClock.ticksPerSecond, - ); - } - }, - ); -} diff --git a/test/picture_stroke_test.dart b/test/picture_stroke_test.dart new file mode 100644 index 0000000..c37c0c7 --- /dev/null +++ b/test/picture_stroke_test.dart @@ -0,0 +1,156 @@ +import 'package:cutdex/app/editor_theme.dart'; +import 'package:cutdex/features/preview/preview_panel.dart'; +import 'package:cutdex/features/properties/stroke_properties.dart'; +import 'package:cutdex/l10n/app_localizations.dart'; +import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_ui/theme.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'support/preview_fixture.dart'; + +void main() { + testWidgets( + 'stroke weight input and keyframe control edit only the selected property', + (tester) async { + final f = (await tester.runAsync( + () => createPreviewFixture( + Uri.file('/test/video.mov'), + clipDuration: RationalTime.seconds(5), + ), + ))!; + addTearDown( + () => tester.runAsync(() async { + await f.workspace.close(); + await f.directory.delete(recursive: true); + }), + ); + final sequence = SequenceId('one'), clip = ElementId('clip'); + final view = f.timeline.view(sequence); + final commands = f.timeline.commands; + ClipStrokeStack current() { + final query = view.version.kernelVersion.query(); + final handle = query.elementById(clip)!; + return ClipStrokeStack( + query.element(handle), + view.playheadTick - query.absoluteStart(handle), + ); + } + + for (final id in ['a', 'b']) { + commands.addStroke( + sequence: sequence, + clip: clip, + tick: 0, + strokeId: id, + ); + } + final project = f.workspace.project!.info.id; + await tester.pumpWidget( + ProviderScope( + overrides: [ + editorPreviewProvider( + project, + 'project', + ).overrideWith((ref) => null), + ], + child: MaterialApp( + localizationsDelegates: AppLocalizations.localizationsDelegates, + supportedLocales: AppLocalizations.supportedLocales, + locale: const Locale('zh'), + theme: AppTheme.propertiesPanelTheme( + EditorTheme.desktop(EditorTheme.penDark), + ), + home: Scaffold( + body: Align( + alignment: Alignment.topRight, + child: SizedBox( + width: 240, + child: SingleChildScrollView( + child: StrokeProperties( + projectId: project, + timelineId: 'project', + session: f.timeline, + sequence: sequence, + clip: clip, + ), + ), + ), + ), + ), + ), + ), + ); + Future settle() async { + await tester.pump(); + await tester.runAsync(f.timeline.flush); + await tester.pumpAndSettle(); + expect(tester.takeException(), isNull); + } + + await settle(); + await tester.tap(find.byKey(const ValueKey('stroke-settings-a'))); + await settle(); + await tester.tap(find.byKey(const ValueKey('stroke-a-width-key'))); + await settle(); + final blurId = const StrokeParameterTarget('a', 'width').parameterId; + expect(current().record.parameters?[blurId]?.length, 1); + for (final id in current().parameterIds.where((id) => id != blurId)) { + expect(current().record.parameters?[id]?.length, 0); + } + view.seekTo(TimelineClock.ticksPerSecond); + await settle(); + final input = find.descendant( + of: find.byKey(const ValueKey('stroke-a-width')), + matching: find.byType(TextField), + ); + await tester.enterText(input, '20'); + await tester.testTextInput.receiveAction(TextInputAction.done); + await settle(); + expect(current().record.parameters?[blurId]?.length, 2); + expect(current().layers.first.values['width'], 20); + for (final id in current().parameterIds.where((id) => id != blurId)) { + expect(current().record.parameters?[id]?.length, 0); + } + view.seekTo(TimelineClock.ticksPerSecond ~/ 2); + expect(current().layers.last.values['width'], 1); + expect(current().layers.first.values['width'], closeTo(10.5, .001)); + await settle(); + // Structural selectors and dash fields update statically without keyframe controls. + await tester.tap(find.byKey(const ValueKey('stroke-a-alignment'))); + await settle(); + await tester.tap(find.text('外侧').last); + await settle(); + expect(current().layers.first.alignment, ClipStrokeAlignment.outside); + expect( + find.byKey(const ValueKey('stroke-a-alignment-key')), + findsNothing, + ); + await tester.tap(find.byKey(const ValueKey('stroke-a-style'))); + await settle(); + await tester.tap(find.text('虚线').last); + await settle(); + expect(find.byKey(const ValueKey('stroke-a-dashLength')), findsOneWidget); + expect( + find.byKey(const ValueKey('stroke-a-dashLength-key')), + findsNothing, + ); + expect(find.textContaining('px'), findsNothing); + await tester.tap(find.byKey(const ValueKey('stroke-editor-close-a'))); + await settle(); + await tester.tap(find.byKey(const ValueKey('stroke-enabled-a'))); + await settle(); + expect(current().layers.first.enabled, isFalse); + await tester.tap(find.byKey(const ValueKey('stroke-add'))); + await settle(); + expect(current().layers.length, 3); + await tester.tap(find.byKey(const ValueKey('stroke-remove-a'))); + await settle(); + expect(current().layers.map((l) => l.id), isNot(contains('a'))); + expect(current().record.parameters?[blurId], isNull); + await tester.pumpWidget(const SizedBox()); + }, + ); +} diff --git a/test/preview_controller_test.dart b/test/preview_controller_test.dart index 4ee1387..770cc6a 100644 --- a/test/preview_controller_test.dart +++ b/test/preview_controller_test.dart @@ -209,6 +209,199 @@ void main() { messenger.setMockMethodCallHandler(events, null); }); + test( + 'canvas tools share one owner and reject cleanup from an earlier tool', + () async { + final f = await createPreviewFixture(Uri.file('/test/video.mov')); + final preview = PreviewController( + timeline: f.timeline, + activeSequence: () => f.timeline.activeSequenceId, + viewForSequence: f.timeline.view, + runtime: CutdexRuntime(), + ); + addTearDown(() async { + await preview.close(); + await f.workspace.close(); + await f.directory.delete(recursive: true); + }); + await preview.initialize(); + final clip = ElementId('clip'); + final owner = Object(); + void enter(PreviewCanvasEditMode mode, Object owner) { + switch (mode) { + case PreviewCanvasEditMode.mask: + preview.setMaskEditing(clip, owner: owner); + case PreviewCanvasEditMode.obscure: + preview.setObscureEditing(clip, owner: owner); + case PreviewCanvasEditMode.distortion: + preview.setDistortionEditing(clip, owner: owner, perspective: true); + } + } + + void release(PreviewCanvasEditMode mode, Object owner) { + switch (mode) { + case PreviewCanvasEditMode.mask: + preview.releaseMaskEditing(owner); + case PreviewCanvasEditMode.obscure: + preview.releaseObscureEditing(owner); + case PreviewCanvasEditMode.distortion: + preview.releaseDistortionEditing(owner); + } + } + + for (final previous in PreviewCanvasEditMode.values) { + for (final next in PreviewCanvasEditMode.values) { + enter(previous, owner); + final replacement = Object(); + enter(next, replacement); + release(previous, owner); + expect(preview.canvasEditing!.mode, next); + expect(preview.canvasEditing!.owner, same(replacement)); + expect( + preview.maskEditingElement, + next == PreviewCanvasEditMode.mask ? clip : null, + ); + expect( + preview.obscureEditingElement, + next == PreviewCanvasEditMode.obscure ? clip : null, + ); + expect( + preview.distortionEditingElement, + next == PreviewCanvasEditMode.distortion ? clip : null, + ); + release(next, replacement); + expect(preview.canvasEditing, isNull); + expect(preview.distortionPerspective, isFalse); + } + } + // Even when one widget owns both tools, delayed cleanup is specific to its old mode. + enter(PreviewCanvasEditMode.mask, owner); + enter(PreviewCanvasEditMode.distortion, owner); + preview.releaseMaskEditing(owner); + preview.setMaskEditing(null); + expect(preview.canvasEditing!.mode, PreviewCanvasEditMode.distortion); + var notifications = 0; + preview.addListener(() => notifications++); + enter(PreviewCanvasEditMode.distortion, owner); + expect( + notifications, + 0, + reason: 'Re-entering the same mode must not cancel its gesture', + ); + preview.selectVisual(null); + expect(preview.canvasEditing, isNull); + enter(PreviewCanvasEditMode.obscure, owner); + f.timeline.selectSequence(SequenceId('empty')); + expect(preview.canvasEditing, isNull); + }, + ); + + test( + 'switching canvas tools invalidates a gesture that is still preparing', + () async { + final f = await createPreviewFixture(Uri.file('/test/video.mov')); + final preview = PreviewController( + timeline: f.timeline, + activeSequence: () => f.timeline.activeSequenceId, + viewForSequence: f.timeline.view, + runtime: CutdexRuntime(), + ); + addTearDown(() async { + await preview.close(); + await f.workspace.close(); + await f.directory.delete(recursive: true); + }); + await preview.initialize(); + final clip = ElementId('clip'); + preview.setMaskEditing(clip); + preview.addMask(ClipMaskShape.rectangle); + await until(() => !preview.busy); + preview.cancelTransform(); + blockedTransform = Completer(); + final before = f.timeline.view(SequenceId('one')).version.kernelVersion; + final pending = preview.beginMaskEdit(); + preview.updateMask(preview.maskFor(clip)!.copyWith(x: .75)); + preview.setDistortionEditing(clip); + blockedTransform!.complete(); + expect(await pending, isFalse); + preview.endMaskEdit(); + expect( + f.timeline.view(SequenceId('one')).version.kernelVersion, + same(before), + ); + expect(preview.maskFor(clip)!.x, .5); + expect(preview.canvasEditing!.mode, PreviewCanvasEditMode.distortion); + }, + ); + + test('distortion snapshots replace all eight coordinates and share one undo entry', () async { + final f = await createPreviewFixture(Uri.file('/test/video.mov')); + final preview = PreviewController( + timeline: f.timeline, + activeSequence: () => f.timeline.activeSequenceId, + viewForSequence: f.timeline.view, + runtime: CutdexRuntime(), + ); + addTearDown(() async { + await preview.close(); + await f.workspace.close(); + await f.directory.delete(recursive: true); + }); + await preview.initialize(); + final clip = ElementId('clip'), sequence = SequenceId('one'); + final owner = Object(); + preview.setDistortionEditing(clip, owner: owner); + preview.releaseDistortionEditing(Object()); + expect(preview.distortionEditingElement, clip); + final edit = preview.transforms.begin(preview.visuals.single)!; + await edit.prepared; + const pose = ClipDistortion(topLeft: (.1, .2)); + edit.update(edit.initial.transform.copyWith(distortion: pose)); + await until( + () => calls + .where((c) => c.method == 'updateInteractiveTransform') + .any( + (c) => + ((c.arguments as Map)['transforms'] as List) + .single['distortion'][0] == + .1, + ), + ); + final payload = + ((calls + .lastWhere( + (c) => c.method == 'updateInteractiveTransform', + ) + .arguments + as Map)['transforms'] + as List) + .single + as Map; + expect(payload['distortion'], pose.values); + expect(preview.visuals.single.transform.distortion.same(pose), isTrue); + await edit.end(); + final view = f.timeline.view(sequence); + final q = view.version.kernelVersion.query(); + expect( + ClipTransform.fromRecord(q.element(q.elementById(clip)!)).distortion + .same(pose), + isTrue, + ); + view.undo(); + await until(() => !preview.busy); + expect( + preview.visuals.single.transform.distortion.values, + List.filled(8, 0), + ); + preview.setMaskEditing(clip, owner: Object()); + expect(preview.distortionEditingElement, isNull); + preview.setDistortionEditing(clip, owner: owner, perspective: true); + expect(preview.maskEditingElement, isNull); + expect(preview.distortionPerspective, isTrue); + preview.releaseDistortionEditing(owner); + expect(preview.distortionEditingElement, isNull); + }); + testWidgets('alignment refreshes selection when the native scene settles', ( tester, ) async { @@ -1064,7 +1257,39 @@ void main() { await tester.binding.setSurfaceSize(const Size(320, 760)); addTearDown(() => tester.binding.setSurfaceSize(null)); final f = (await tester.runAsync( - () => createPreviewFixture(Uri.file('/test/video.mov')), + () => createPreviewFixture( + Uri.file('/test/video.mov'), + timelineOverride: TimelineDto( + id: SequenceId('one'), + name: 'One', + format: TimelineFormat.fps30, + primaryStorylineId: StorylineId('primary'), + storylines: [ + StorylineDto( + id: StorylineId('primary'), + elementIds: [ElementId('clip'), ElementId('other')], + ), + ], + elements: [ + for (final id in ['clip', 'other']) + ElementDto( + id: ElementId(id), + name: id, + structure: ElementStructure.content, + payloadRef: PayloadRef('source'), + duration: RationalTime.seconds(2), + sourceRange: TimeRange( + start: RationalTime.zero, + duration: RationalTime.seconds(2), + ), + mediaRange: TimeRange( + start: RationalTime.zero, + duration: RationalTime.seconds(2), + ), + ), + ], + ), + ), ))!; final preview = PreviewController( timeline: f.timeline, diff --git a/test/preview_interaction_test.dart b/test/preview_interaction_test.dart index 64fb8fa..5ceb33c 100644 --- a/test/preview_interaction_test.dart +++ b/test/preview_interaction_test.dart @@ -765,6 +765,48 @@ void main() { replacement.dispose(); }); + testWidgets( + 'distortion drag edits one paired corner; perspective links the edge; escape cancels', + (tester) async { + final preview = _Preview()..selectVisual(ElementId('upper')); + preview.setDistortionEditing(ElementId('upper')); + await mount(tester, preview); + final original = preview.visuals.last.geometry; + final corner = const Offset(40, 40) + original.corners[0] * .5; + var gesture = await tester.startGesture(corner); + await gesture.moveBy(const Offset(15, 10)); + await gesture.up(); + await tester.pumpAndSettle(); + expect(preview.value.distortion.topLeft.$1, closeTo(.1, 1e-6)); + expect(preview.value.distortion.topLeft.$2, closeTo(.1, 1e-6)); + expect(preview.value.scale, 1); + expect(preview.value.x, 0); + expect(preview.value.distortion.topRight, (0, 0)); + expect(preview.commits, 1); + final before = preview.value; + final moved = + const Offset(40, 40) + preview.visuals.last.geometry.corners[0] * .5; + gesture = await tester.startGesture(moved); + await gesture.moveBy(const Offset(15, 10)); + await tester.pump(); + await tester.sendKeyEvent(LogicalKeyboardKey.escape); + await gesture.up(); + await tester.pumpAndSettle(); + expect(preview.value, same(before)); + expect(preview.commits, 1); + preview.setDistortionEditing(ElementId('upper'), perspective: true); + gesture = await tester.startGesture(moved); + await gesture.moveBy(const Offset(15, 10)); + await gesture.up(); + await tester.pumpAndSettle(); + expect(preview.value.distortion.topLeft.$1, closeTo(.2, 1e-6)); + expect(preview.value.distortion.topRight.$1, closeTo(-.1, 1e-6)); + expect(preview.value.distortion.topRight.$2, closeTo(.1, 1e-6)); + await tester.pumpWidget(const SizedBox()); + preview.dispose(); + }, + ); + testWidgets( 'selection follows video rotation and its visible corners resize', (tester) async { @@ -1105,6 +1147,21 @@ class _MaskPreview extends _Preview { } class _Preview extends ChangeNotifier implements PreviewController { + @override + ElementId? distortionEditingElement; + @override + bool distortionPerspective = false; + @override + void setDistortionEditing( + ElementId? element, { + Object? owner, + bool perspective = false, + }) { + distortionEditingElement = element; + distortionPerspective = perspective; + notifyListeners(); + } + @override Listenable get positionChanges => this; diff --git a/test/preview_panel_test.dart b/test/preview_panel_test.dart index 960fe8d..20066a0 100644 --- a/test/preview_panel_test.dart +++ b/test/preview_panel_test.dart @@ -519,6 +519,21 @@ void main() { } class _Preview extends ChangeNotifier implements PreviewController { + @override + ElementId? distortionEditingElement; + @override + bool distortionPerspective = false; + @override + void setDistortionEditing( + ElementId? element, { + Object? owner, + bool perspective = false, + }) { + distortionEditingElement = element; + distortionPerspective = perspective; + notifyListeners(); + } + @override Listenable get positionChanges => this; diff --git a/test/property_color_input_test.dart b/test/property_color_input_test.dart new file mode 100644 index 0000000..5d5e627 --- /dev/null +++ b/test/property_color_input_test.dart @@ -0,0 +1,79 @@ +import 'dart:async'; + +import 'package:cutdex/features/properties/property_color_input.dart'; +import 'package:cutdex/l10n/app_localizations.dart'; +import 'package:cutdex_ui/theme.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +Widget input({ + required String value, + required Object context, + required Future Function(int) submit, +}) => MaterialApp( + localizationsDelegates: AppLocalizations.localizationsDelegates, + supportedLocales: AppLocalizations.supportedLocales, + locale: const Locale('zh'), + theme: AppTheme.propertiesPanelTheme( + AppTheme.desktopWorkspaceTheme(AppTheme.penDark), + ), + home: Scaffold( + body: SizedBox( + width: 180, + child: PropertyColorInput( + value: value, + color: Color(0xFF000000 | int.parse(value, radix: 16)), + enabled: true, + editContext: context, + submit: submit, + ), + ), + ), +); + +void main() { + testWidgets( + 'hex input rejects invalid text and submits the selected RGB value', + (tester) async { + int? submitted; + Future submit(int value) async { + submitted = value; + return true; + } + + await tester.pumpWidget( + input(value: '3366FF', context: 'a', submit: submit), + ); + await tester.enterText(find.byType(TextField), 'invalid'); + await tester.testTextInput.receiveAction(TextInputAction.done); + await tester.pump(); + expect(submitted, isNull); + await tester.enterText(find.byType(TextField), '#12aB34'); + await tester.testTextInput.receiveAction(TextInputAction.done); + await tester.pump(); + expect(submitted, 0x12AB34); + expect(tester.takeException(), isNull); + }, + ); + + testWidgets( + 'a pending color submission cannot overwrite a newly selected field', + (tester) async { + final pending = Completer(); + await tester.pumpWidget( + input(value: '3366FF', context: 'a', submit: (_) => pending.future), + ); + await tester.enterText(find.byType(TextField), '12AB34'); + await tester.testTextInput.receiveAction(TextInputAction.done); + await tester.pump(); + await tester.pumpWidget( + input(value: 'FF0000', context: 'b', submit: (_) async => true), + ); + pending.complete(false); + await tester.pump(); + final text = tester.widget(find.byType(TextField)); + expect(text.controller!.text, 'FF0000'); + expect(tester.takeException(), isNull); + }, + ); +} diff --git a/test/property_edit_controller_test.dart b/test/property_edit_controller_test.dart new file mode 100644 index 0000000..1fd6da7 --- /dev/null +++ b/test/property_edit_controller_test.dart @@ -0,0 +1,88 @@ +import 'package:cutdex/features/properties/property_edit_controller.dart'; +import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'support/preview_fixture.dart'; + +void main() { + TestWidgetsFlutterBinding.ensureInitialized(); + + for (final invalidation in ['dispose', 'seek', 'version', 'sequence']) { + test('pending effect edit is cancelled after $invalidation', () async { + final f = await createPreviewFixture(Uri.file('/test/video.mov')); + final sequence = SequenceId('one'), clip = ElementId('clip'); + final controller = PropertyEditController( + session: f.timeline, + sequence: sequence, + clip: clip, + projectId: f.workspace.project!.info.id, + timelineId: 'project', + operation: 'editEffect', + ); + var disposed = false; + addTearDown(() async { + if (!disposed) controller.dispose(); + await f.workspace.close(); + await f.directory.delete(recursive: true); + }); + var publications = 0; + final pending = controller.run(null, (_, _) => publications++); + expect(controller.saving, isTrue); + switch (invalidation) { + case 'dispose': + controller.dispose(); + disposed = true; + case 'seek': + f.timeline.view(sequence).seekTo(1); + case 'version': + f.timeline.commands.addEffect( + sequence: sequence, + clip: clip, + tick: 0, + effectId: 'external', + type: ClipEffectType.dropShadow, + ); + case 'sequence': + f.timeline.selectSequence(SequenceId('empty')); + } + expect(await pending, isFalse); + expect(publications, 0); + if (!disposed) { + expect(controller.saving, isFalse); + expect(controller.failed, isFalse); + } + }); + } + + test('effect edit excludes duplicate submissions and recovers after a command failure', () async { + final f = await createPreviewFixture(Uri.file('/test/video.mov')); + final controller = PropertyEditController( + session: f.timeline, + sequence: SequenceId('one'), + clip: ElementId('clip'), + projectId: f.workspace.project!.info.id, + timelineId: 'project', + operation: 'editEffect', + ); + addTearDown(() async { + controller.dispose(); + await f.workspace.close(); + await f.directory.delete(recursive: true); + }); + var publications = 0; + final first = controller.run(null, (_, _) => publications++); + expect(await controller.run(null, (_, _) => publications++), isFalse); + expect(await first, isTrue); + expect(publications, 1); + expect( + await controller.run(null, (_, _) => throw StateError('Rejected edit')), + isFalse, + ); + expect(controller.failed, isTrue); + expect(controller.saving, isFalse); + expect(await controller.run(null, (_, _) => publications++), isTrue); + expect(controller.failed, isFalse); + expect(publications, 2); + }); +} diff --git a/tool/diagnostics/compare_property_performance.py b/tool/diagnostics/compare_property_performance.py new file mode 100644 index 0000000..c40df16 --- /dev/null +++ b/tool/diagnostics/compare_property_performance.py @@ -0,0 +1,88 @@ +#!/usr/bin/env python3 +"""Compare repeated release-mode PropertyPerformanceTests logs; fail on regressions.""" + +import argparse +import json +import math +import re +import statistics +from pathlib import Path + +LINE = re.compile( + r"PROPERTY_BENCH (\w+) median_us=(\S+) p95_us=(\S+) checksum=(\S+)" +) + + +def read(paths): + runs = {} + for path in paths: + current = {} + for name, median, p95, checksum in LINE.findall(Path(path).read_text()): + values = tuple(float(value) for value in (median, p95, checksum)) + if (name in current or not all(math.isfinite(value) for value in values) + or values[0] < 0 or values[1] < values[0]): + raise ValueError(f"Invalid or duplicate measurement in {path}: {name}") + current[name] = values + if not current or (runs and current.keys() != runs.keys()): + raise ValueError(f"Missing benchmark scenarios in {path}") + for name, values in current.items(): + runs.setdefault(name, []).append(values) + return runs + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--before", nargs="+", required=True) + parser.add_argument("--after", nargs="+", required=True) + parser.add_argument("--output", type=Path) + parser.add_argument("--tolerance", type=float, default=0.15, + help="Allowed relative timing noise (default: 0.15)") + args = parser.parse_args() + if not 0 <= args.tolerance < 1: + parser.error("--tolerance must be in [0, 1)") + if len(args.before) < 3 or len(args.after) < 3: + parser.error("At least three independent runs are required on each side") + try: + before, after = read(args.before), read(args.after) + expected = {"render_plain", "render_effects", "sampling_empty", "sampling_normal", "sampling_dense"} + if before.keys() != expected or after.keys() != expected: + raise ValueError("Before/after scenarios do not match") + result = { + "method": "Median of independent run medians and run P95 values; times in microseconds", + "scope": "Scalar sampling and 640x360 native frozen-frame compositor, not display FPS", + "checksumScope": "Scalar outputs and rendered-frame work counters; pixel parity is tested separately", + "relativeNoiseTolerance": args.tolerance, + "beforeLogs": args.before, + "afterLogs": args.after, + "scenarios": {}, + } + passed = True + for name in before: + checksums = {row[2] for row in before[name] + after[name]} + scenario = {"checksumMatches": len(checksums) == 1, + "beforeRuns": len(before[name]), "afterRuns": len(after[name])} + passed &= scenario["checksumMatches"] + # Timer noise dominates empty, sub-microsecond sampling measurements. + absolute_noise = 0.1 if name.startswith("sampling_") else 100.0 + for index, metric in enumerate(["median", "p95"]): + old = statistics.median(row[index] for row in before[name]) + new = statistics.median(row[index] for row in after[name]) + limit = old * (1 + args.tolerance) + absolute_noise + scenario[metric] = {"beforeUs": old, "afterUs": new, + "changePercent": (new / old - 1) * 100 if old else None, + "limitUs": limit, "passed": new <= limit} + passed &= new <= limit + result["scenarios"][name] = scenario + result["passed"] = bool(passed) + encoded = json.dumps(result, indent=2) + "\n" + if args.output: + args.output.parent.mkdir(parents=True, exist_ok=True) + args.output.write_text(encoded) + print(encoded, end="") + return 0 if passed else 1 + except (OSError, ValueError) as error: + parser.exit(2, f"Invalid benchmark input: {error}\n") + + +if __name__ == "__main__": + raise SystemExit(main()) -- 2.54.0 From 4912aa1ab09b0db46cf7a65de344f1af24d58dc5 Mon Sep 17 00:00:00 2001 From: lingjhf Date: Sat, 10 Oct 2026 22:43:28 +0800 Subject: [PATCH 08/14] test: align property fixtures with scrollable inspector layout Host PictureProperties in the same scrolling layout used by the inspector, scope scrub labels and transform field assertions to the controls under test, and compare resolved temporary paths in tool tests on macOS. Validation: full application analysis, 1261 Flutter tests passed (9 skipped), generated-code verification, and 171 tool tests. --- test/timeline_session_test.dart | 97 +++++++++++++++----------- tool/tests/common_tools_test.py | 2 +- tool/tests/local_flutter_test.py | 9 +-- tool/windows/test_native_cache_unit.py | 2 +- 4 files changed, 63 insertions(+), 47 deletions(-) diff --git a/test/timeline_session_test.dart b/test/timeline_session_test.dart index c911a29..4612329 100644 --- a/test/timeline_session_test.dart +++ b/test/timeline_session_test.dart @@ -1186,13 +1186,15 @@ void main() { home: Scaffold( body: SizedBox( width: 225, - child: PictureProperties( - projectId: projectId, - timelineId: 'project', - session: session, - sequence: id, - clip: base.query().element( - base.query().elementById(ElementId('clip'))!, + child: SingleChildScrollView( + child: PictureProperties( + projectId: projectId, + timelineId: 'project', + session: session, + sequence: id, + clip: base.query().element( + base.query().elementById(ElementId('clip'))!, + ), ), ), ), @@ -1205,7 +1207,10 @@ void main() { await tester.tap(find.byKey(const Key('picture-lock'))); await tester.pumpAndSettle(); } - final label = find.text(labelText); + final label = find.descendant( + of: find.byKey(ValueKey(fieldKey)), + matching: find.text(labelText), + ); final gesture = await tester.startGesture( tester.getCenter(label), kind: PointerDeviceKind.mouse, @@ -1364,12 +1369,16 @@ void main() { home: Scaffold( body: SizedBox( width: 225, - child: PictureProperties( - projectId: projectId, - timelineId: 'project', - session: session, - sequence: id, - clip: base.query().element(base.query().elementById(clipId)!), + child: SingleChildScrollView( + child: PictureProperties( + projectId: projectId, + timelineId: 'project', + session: session, + sequence: id, + clip: base.query().element( + base.query().elementById(clipId)!, + ), + ), ), ), ), @@ -1377,15 +1386,23 @@ void main() { ), ); await tester.pumpAndSettle(); - String text(String key) => tester - .widget( - find.descendant( - of: find.byKey(ValueKey(key)), - matching: find.byType(TextField), - ), - ) - .controller! - .text; + TextField field(String key) => tester.widget( + find.descendant( + of: find.byKey(ValueKey(key)), + matching: find.byType(TextField), + ), + ); + String text(String key) => field(key).controller!.text; + Iterable transformFields() => [ + for (final key in [ + 'picture-x', + 'picture-y', + 'picture-scale-x', + 'picture-scale-y', + 'picture-rotation', + ]) + field(key), + ]; PreviewVisual visual(ClipTransform value) => PreviewVisual( layerId: 'video', elementId: clipId, @@ -1499,9 +1516,7 @@ void main() { ), ); await tester.pump(); - for (final field in tester.widgetList( - find.byType(TextField), - )) { + for (final field in transformFields()) { expect(field.enabled, isTrue); expect(field.readOnly, isTrue); expect(field.canRequestFocus, isFalse); @@ -1523,9 +1538,7 @@ void main() { } await edit.end(); await tester.pump(); - for (final field in tester.widgetList( - find.byType(TextField), - )) { + for (final field in transformFields()) { expect(field.enabled, isTrue); expect(field.readOnly, isFalse); expect(field.canRequestFocus, isTrue); @@ -1790,18 +1803,20 @@ void main() { home: Scaffold( body: SizedBox( width: 225, - child: ListenableBuilder( - listenable: view, - builder: (_, _) { - final query = view.version.kernelVersion.query(); - return PictureProperties( - projectId: projectId, - timelineId: 'project', - session: session, - sequence: id, - clip: query.element(query.elementById(clipId)!), - ); - }, + child: SingleChildScrollView( + child: ListenableBuilder( + listenable: view, + builder: (_, _) { + final query = view.version.kernelVersion.query(); + return PictureProperties( + projectId: projectId, + timelineId: 'project', + session: session, + sequence: id, + clip: query.element(query.elementById(clipId)!), + ); + }, + ), ), ), ), diff --git a/tool/tests/common_tools_test.py b/tool/tests/common_tools_test.py index f8a742c..bc0d16e 100644 --- a/tool/tests/common_tools_test.py +++ b/tool/tests/common_tools_test.py @@ -21,7 +21,7 @@ class CommonToolsTests(unittest.TestCase): result = run([sys.executable, '-c', code, *arguments], cwd=directory, env={'CUTDEX_TEST': 'child'}, capture_output=True, text=True) lines = result.stdout.splitlines() - self.assertEqual(Path(lines[0]), Path(directory)) + self.assertEqual(Path(lines[0]).resolve(), Path(directory).resolve()) self.assertEqual(lines[1], 'child') self.assertEqual(lines[2], repr(arguments)) diff --git a/tool/tests/local_flutter_test.py b/tool/tests/local_flutter_test.py index bdb11a3..7edf0cc 100644 --- a/tool/tests/local_flutter_test.py +++ b/tool/tests/local_flutter_test.py @@ -86,7 +86,7 @@ sys.exit(7 if 'fail' in sys.argv else 0) self.assertEqual(data['parent'], 'parent') self.assertEqual(data['android'], 'C:/My SDK/cutdex_android') self.assertEqual(data['input'], 'daemon-request') - self.assertEqual(Path(data['cwd']), self.root) + self.assertEqual(Path(data['cwd']).resolve(), self.root.resolve()) self.assertEqual(result.stderr.strip(), 'flutter-diagnostic') def test_ide_shim_uses_the_same_loader_and_preserves_arguments(self): @@ -168,7 +168,7 @@ sys.exit(7 if 'fail' in sys.argv else 0) text=True, encoding='utf-8', timeout=40) self.assertEqual(result.returncode, 0, result.stderr) data = json.loads(result.stdout) - self.assertEqual(Path(data['cwd']), source) + self.assertEqual(Path(data['cwd']).resolve(), source.resolve()) self.assertEqual(data['file'], 'main-project') self.assertEqual(data['args'], ['build', 'windows']) @@ -228,7 +228,8 @@ sys.exit(7 if 'fail' in sys.argv else 0) capture_output=True, text=True, encoding='utf-8', timeout=40) self.assertEqual(result.returncode, 0, result.stderr) data = json.loads(result.stdout) - self.assertEqual(Path(data['cwd']), self.root if cwd is None else cwd) + expected_cwd = self.root if cwd is None else cwd + self.assertEqual(Path(data['cwd']).resolve(), expected_cwd.resolve()) self.assertEqual(data['file'], 'selected-project') self.assertEqual(data['input'], 'request') self.assertEqual(data['args'], ['build', 'macos', '--release', '--flavor', 'production', @@ -262,7 +263,7 @@ sys.exit(7 if 'fail' in sys.argv else 0) result = subprocess.run([sys.executable, str(self.root / 'tool/project_tools.py'), 'dart', str(probe)], cwd=package, env=self.environment, capture_output=True, text=True, timeout=40) self.assertEqual(result.returncode, 0, result.stderr) - self.assertEqual(Path(result.stdout.strip()), package) + self.assertEqual(Path(result.stdout.strip()).resolve(), package.resolve()) if __name__ == '__main__': diff --git a/tool/windows/test_native_cache_unit.py b/tool/windows/test_native_cache_unit.py index 523f669..3005981 100644 --- a/tool/windows/test_native_cache_unit.py +++ b/tool/windows/test_native_cache_unit.py @@ -198,7 +198,7 @@ class NativeCacheTests(unittest.TestCase): with patch.object(cache, 'download_archive', side_effect=self.download): archive = cache.prepare(environment=environment) self.assertEqual(output.read_text(), f'EXISTING=value\nDESKUP_VELOPACK_ARCHIVE={archive.as_posix()}\n') - self.assertEqual(archive.parent, self.root / 'Cutdex/ci-tools/native') + self.assertEqual(archive.parent.resolve(), (self.root / 'Cutdex/ci-tools/native').resolve()) def test_failed_verification_cannot_export_an_archive(self): output = self.root / 'github-env' -- 2.54.0 From 7ebe0c8e2e9df524367bda5a8e6fa94ce76b7156 Mon Sep 17 00:00:00 2001 From: lingjhf Date: Sat, 10 Oct 2026 22:43:35 +0800 Subject: [PATCH 09/14] feat(inspector): separate input and output color controls Give video clips a dedicated color tab with immediate input interpretation, automatic detection, and reset controls. Clarify project output color space, source-stream scope, and unavailable metadata across localized UI text. Share unknown-source color defaults with the SDK and retain independent property tab scroll state. Include localized resources and control previews. Validation: full application analysis, 1261 Flutter tests passed (9 skipped), generated-code verification, and 171 tool tests. --- .../color_interpretation_controls.dart | 87 +++++++++++++++++++ ...olor_interpretation_controls_previews.dart | 79 +++++++++++++++++ .../color_interpretation_properties.dart | 83 +++--------------- .../properties/project_properties.dart | 4 +- .../properties/project_settings_dialog.dart | 6 +- .../properties/properties_content.dart | 29 +++---- .../properties_inspector_controller.dart | 1 + .../properties_presentation_state.dart | 2 + lib/l10n/app_de.arb | 6 +- lib/l10n/app_en.arb | 6 +- lib/l10n/app_es.arb | 6 +- lib/l10n/app_fr.arb | 6 +- lib/l10n/app_it.arb | 6 +- lib/l10n/app_ja.arb | 6 +- lib/l10n/app_ko.arb | 6 +- lib/l10n/app_localizations.dart | 24 +++-- lib/l10n/app_localizations_de.dart | 12 ++- lib/l10n/app_localizations_en.dart | 11 ++- lib/l10n/app_localizations_es.dart | 11 ++- lib/l10n/app_localizations_fr.dart | 12 ++- lib/l10n/app_localizations_it.dart | 12 ++- lib/l10n/app_localizations_ja.dart | 11 ++- lib/l10n/app_localizations_ko.dart | 11 ++- lib/l10n/app_localizations_pt.dart | 11 ++- lib/l10n/app_localizations_ru.dart | 12 ++- lib/l10n/app_localizations_zh.dart | 30 +++++-- lib/l10n/app_pt.arb | 6 +- lib/l10n/app_ru.arb | 6 +- lib/l10n/app_zh.arb | 6 +- lib/l10n/app_zh_Hans.arb | 6 +- lib/l10n/app_zh_Hant.arb | 6 +- lib/workspace/media_color_interpretation.dart | 4 +- test/media_color_interpretation_test.dart | 68 +++++++++++---- test/project_properties_test.dart | 4 +- test/properties_scroll_state_test.dart | 24 +++-- 35 files changed, 449 insertions(+), 171 deletions(-) create mode 100644 lib/features/properties/color_interpretation_controls.dart create mode 100644 lib/features/properties/color_interpretation_controls_previews.dart diff --git a/lib/features/properties/color_interpretation_controls.dart b/lib/features/properties/color_interpretation_controls.dart new file mode 100644 index 0000000..9248626 --- /dev/null +++ b/lib/features/properties/color_interpretation_controls.dart @@ -0,0 +1,87 @@ +import 'package:cutdex/l10n/l10n.dart'; +import 'package:cutdex_ui/icons.dart'; +import 'package:cutdex_ui/theme.dart'; +import 'package:cutdex_ui/widgets.dart'; +import 'package:flutter/material.dart'; + +class ColorInterpretationControls extends StatelessWidget { + const ColorInterpretationControls({ + super.key, + required this.value, + this.notice, + required this.options, + this.onChanged, + }); + + final String value; + final String? notice; + final List> options; + final ValueChanged? onChanged; + + @override + Widget build(BuildContext context) { + final secondary = Theme.of(context).colorScheme.onSurfaceVariant; + final desktop = AppTheme.isDesktop(context); + return AppPropertySection( + bottomSpacing: desktop ? AppSpacing.small : null, + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Row( + children: [ + Expanded( + flex: 4, + child: Tooltip( + message: context.l10n.mediaColorInterpretationScope, + child: Text( + context.l10n.mediaInputColorSpace, + style: AppTheme.propertySectionTitleStyle(context), + ), + ), + ), + Expanded( + flex: 6, + child: AppSelect( + key: const Key('media-color-menu'), + emptyLabel: context.l10n.noMatchingOptions, + outlined: false, + controlHeight: desktop ? AppInspectorMetrics.input : 32, + label: context.l10n.mediaInputColorSpace, + value: value, + onChanged: onChanged, + options: options, + ), + ), + IconButton( + key: const Key('media-color-reset'), + tooltip: context.l10n.resetMediaColorInterpretation, + icon: const Icon(AppIcons.reset, size: 16), + style: IconButton.styleFrom( + minimumSize: Size.square( + desktop ? AppInspectorMetrics.action : 40, + ), + padding: EdgeInsets.zero, + tapTargetSize: desktop + ? MaterialTapTargetSize.shrinkWrap + : MaterialTapTargetSize.padded, + ), + onPressed: value == 'auto' || onChanged == null + ? null + : () => onChanged!('auto'), + ), + ], + ), + if (notice != null) ...[ + const SizedBox(height: 2), + Text( + notice!, + key: const Key('media-color-status'), + style: Theme.of(context).textTheme.bodySmall + ?.copyWith(color: secondary), + ), + ], + ], + ), + ); + } +} diff --git a/lib/features/properties/color_interpretation_controls_previews.dart b/lib/features/properties/color_interpretation_controls_previews.dart new file mode 100644 index 0000000..fdc3ca1 --- /dev/null +++ b/lib/features/properties/color_interpretation_controls_previews.dart @@ -0,0 +1,79 @@ +import 'package:cutdex/l10n/app_localizations.dart'; +import 'package:cutdex_ui/theme.dart'; +import 'package:cutdex_ui/widgets.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/widget_previews.dart'; + +import 'color_interpretation_controls.dart'; + +@Preview( + name: 'Color — narrow automatic', + group: 'Properties', + size: Size(220, 220), +) +Widget narrowColorControlsPreview() => _host(desktop: true); + +@Preview( + name: 'Color — manual light', + group: 'Properties', + size: Size(280, 220), +) +Widget manualColorControlsPreview() => + _host(desktop: true, brightness: Brightness.light, value: 'rec2020HLG'); + +@Preview(name: 'Color — loading', group: 'Properties', size: Size(260, 220)) +Widget loadingColorControlsPreview() => _host(desktop: true, loading: true); + +@Preview(name: 'Color — mobile', group: 'Properties', size: Size(400, 260)) +Widget mobileColorControlsPreview() => _host(desktop: false); + +Widget _host({ + required bool desktop, + Brightness brightness = Brightness.dark, + String value = 'auto', + bool loading = false, +}) { + final theme = AppTheme.forPalette(AppPalette.graphite, brightness); + return MaterialApp( + debugShowCheckedModeBanner: false, + locale: const Locale('zh'), + localizationsDelegates: AppLocalizations.localizationsDelegates, + supportedLocales: AppLocalizations.supportedLocales, + theme: AppTheme.propertiesPanelTheme( + desktop ? AppTheme.desktopWorkspaceTheme(theme) : theme, + ), + home: Scaffold( + body: _ColorControlsPreview(initialValue: value, loading: loading), + ), + ); +} + +class _ColorControlsPreview extends StatefulWidget { + const _ColorControlsPreview({ + required this.initialValue, + required this.loading, + }); + final String initialValue; + final bool loading; + + @override + State<_ColorControlsPreview> createState() => _ColorControlsPreviewState(); +} + +class _ColorControlsPreviewState extends State<_ColorControlsPreview> { + late String _value = widget.initialValue; + + @override + Widget build(BuildContext context) => ColorInterpretationControls( + value: _value, + notice: widget.loading ? '色彩信息未读取' : null, + onChanged: widget.loading + ? null + : (value) => setState(() => _value = value), + options: [ + AppSelectOption('auto', widget.loading ? '自动' : '自动 · Rec.709'), + const AppSelectOption('rec709', 'Rec.709'), + const AppSelectOption('rec2020HLG', 'Rec.2020 HLG'), + ], + ); +} diff --git a/lib/features/properties/color_interpretation_properties.dart b/lib/features/properties/color_interpretation_properties.dart index 12c9026..00224f6 100644 --- a/lib/features/properties/color_interpretation_properties.dart +++ b/lib/features/properties/color_interpretation_properties.dart @@ -4,10 +4,10 @@ import 'package:cutdex_sdk/runtime.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:cutdex_ui/theme.dart'; import 'package:cutdex_ui/widgets.dart'; import '../../workspace/media_color_interpretation.dart'; +import 'color_interpretation_controls.dart'; import '../../shared/widgets/listenable_selector.dart'; import '../../workspace/timeline_session.dart'; import '../preview/preview_panel.dart'; @@ -40,20 +40,15 @@ class ColorInterpretationProperties extends ConsumerWidget { final detected = colors?.elementAtOrNull(trackIndex); final reported = colors != null && trackIndex >= 0 && trackIndex < colors.length; - final status = selected != null - ? context.l10n.manualColorSpace(selected.label(context.l10n)) - : detected != null - ? context.l10n.detectedColorSpace(detected.label(context.l10n)) - : reported + final notice = !reported + ? context.l10n.colorInfoNotLoaded + : selected == null && detected == null ? context.l10n.unknownColorSpace - : context.l10n.colorInfoNotLoaded; - final selector = AppSelect( - emptyLabel: context.l10n.noMatchingOptions, - key: const Key('media-color-menu'), - outlined: false, - label: context.l10n.mediaColorInterpretation, + : null; + return ColorInterpretationControls( value: selected?.name ?? 'auto', - onChanged: !reported + notice: notice, + onChanged: !reported || !session.acceptsEdits ? null : (value) => session.commands.setMediaColor( assetId, @@ -61,66 +56,16 @@ class ColorInterpretationProperties extends ConsumerWidget { value == 'auto' ? null : MediaColorSpace.values.byName(value), ), options: [ - AppSelectOption('auto', context.l10n.auto), + AppSelectOption( + 'auto', + detected == null + ? context.l10n.auto + : '${context.l10n.auto} · ${detected.label(context.l10n)}', + ), for (final color in RenderColorSpace.values) AppSelectOption(color.name, color.label(context.l10n)), ], ); - final controls = Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - spacing: AppSpacing.gap, - children: [ - if (AppTheme.isDesktop(context)) ...[ - AppPropertyGroup( - label: context.l10n.mediaColorSpace, - child: selector, - ), - ] else - Row( - children: [ - Expanded( - child: Text( - context.l10n.mediaColorSpace, - style: AppTheme.propertySectionTitleStyle(context), - ), - ), - Flexible(child: selector), - ], - ), - Text( - status, - key: const Key('media-color-status'), - style: Theme.of(context).textTheme.bodySmall, - ), - ], - ); - return AppPropertySection( - bottomSpacing: AppTheme.isDesktop(context) ? 0 : null, - child: AppTheme.isDesktop(context) - ? ExpansionTile( - key: PageStorageKey(( - 'media-color-section', - assetId, - trackIndex, - )), - title: Text( - context.l10n.mediaColorInterpretation, - style: AppTheme.propertySectionTitleStyle(context), - ), - tilePadding: EdgeInsets.zero, - childrenPadding: const EdgeInsets.only( - bottom: AppInspectorMetrics.groupGap, - ), - minTileHeight: AppInspectorMetrics.sectionHeader, - dense: true, - maintainState: true, - initiallyExpanded: selected != null, - shape: const Border(), - collapsedShape: const Border(), - children: [controls], - ) - : controls, - ); } return ListenableSelector( diff --git a/lib/features/properties/project_properties.dart b/lib/features/properties/project_properties.dart index f070304..29d196d 100644 --- a/lib/features/properties/project_properties.dart +++ b/lib/features/properties/project_properties.dart @@ -80,8 +80,8 @@ class ProjectProperties extends StatelessWidget { () => session.canvas.label(context), ), info( - context.l10n.projectColorSpace, - () => switch (session.projectColorSpace) { + context.l10n.projectOutputColorSpace, + () => switch (session.projectOutputColorSpace) { RenderColorSpace.rec2020HLG => 'HDR · Rec.2020 HLG', RenderColorSpace.rec2020PQ => 'HDR · Rec.2020 PQ', _ => 'SDR · Rec.709', diff --git a/lib/features/properties/project_settings_dialog.dart b/lib/features/properties/project_settings_dialog.dart index 6cea667..4a5e29c 100644 --- a/lib/features/properties/project_settings_dialog.dart +++ b/lib/features/properties/project_settings_dialog.dart @@ -56,7 +56,7 @@ class _ProjectSettingsDialogState extends State { .timeline(widget.session.activeSequenceId!) .format .frameDuration; - _color = widget.session.projectColorSpace; + _color = widget.session.projectOutputColorSpace; _preset = _sizes.entries .where((e) => e.value.$1 == canvas.width && e.value.$2 == canvas.height) .firstOrNull @@ -198,12 +198,12 @@ class _ProjectSettingsDialogState extends State { ), ), AppField( - label: l10n.projectColorSpace, + label: l10n.projectOutputColorSpace, child: AppSelect( emptyLabel: context.l10n.noMatchingOptions, key: const ValueKey('project-color-space'), value: _color, - label: l10n.projectColorSpace, + label: l10n.projectOutputColorSpace, options: const [ AppSelectOption(RenderColorSpace.rec709, 'SDR · Rec.709'), AppSelectOption( diff --git a/lib/features/properties/properties_content.dart b/lib/features/properties/properties_content.dart index 3769aea..4995777 100644 --- a/lib/features/properties/properties_content.dart +++ b/lib/features/properties/properties_content.dart @@ -146,26 +146,22 @@ class PropertiesContent extends ConsumerWidget { clip: clip, hasAudio: hasAudio, ), - picture: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - if (payload?.type == 'video' && binding?.videoTrackIndex != null) - ColorInterpretationProperties( + color: payload?.type == 'video' && binding?.videoTrackIndex != null + ? ColorInterpretationProperties( projectId: projectId, timelineId: timelineId, session: session, assetId: payload!.assetIds.single, trackIndex: binding!.videoTrackIndex!, - ), - PictureProperties( - key: ValueKey((sequence, clip.id)), - projectId: projectId, - timelineId: timelineId, - session: session, - sequence: sequence, - clip: clip, - ), - ], + ) + : const SizedBox.shrink(), + picture: PictureProperties( + key: ValueKey((sequence, clip.id)), + projectId: projectId, + timelineId: timelineId, + session: session, + sequence: sequence, + clip: clip, ), animation: PictureProperties( key: ValueKey((sequence, clip.id, 'animation')), @@ -189,6 +185,7 @@ class _ClipProperties extends StatefulWidget { required this.sequence, required this.clip, required this.picture, + required this.color, required this.mask, required this.audio, required this.speed, @@ -203,6 +200,7 @@ class _ClipProperties extends StatefulWidget { final SequenceId sequence; final ElementRecord clip; final Widget picture; + final Widget color; final Widget mask; final Widget audio; final Widget speed; @@ -266,6 +264,7 @@ class _ClipPropertiesState extends State<_ClipProperties> { children: [ ...switch (_selected) { PropertyCategory.picture => [widget.picture], + PropertyCategory.color => [widget.color], PropertyCategory.mask => [widget.mask], PropertyCategory.audio => [widget.audio], PropertyCategory.speed => [widget.speed], diff --git a/lib/features/properties/properties_inspector_controller.dart b/lib/features/properties/properties_inspector_controller.dart index 54ea935..b648b8c 100644 --- a/lib/features/properties/properties_inspector_controller.dart +++ b/lib/features/properties/properties_inspector_controller.dart @@ -125,6 +125,7 @@ List categoriesForClip(ElementRecord clip, String? type) { return switch (type) { 'video' => [ PropertyCategory.picture, + PropertyCategory.color, PropertyCategory.mask, PropertyCategory.audio, PropertyCategory.speed, diff --git a/lib/features/properties/properties_presentation_state.dart b/lib/features/properties/properties_presentation_state.dart index f598920..9a62799 100644 --- a/lib/features/properties/properties_presentation_state.dart +++ b/lib/features/properties/properties_presentation_state.dart @@ -14,6 +14,7 @@ final propertyCategoryProvider = enum PropertyCategory { picture, + color, mask, audio, speed, @@ -22,6 +23,7 @@ enum PropertyCategory { String label(BuildContext context) => switch (this) { picture => context.l10n.pictureProperties, + color => context.l10n.color, mask => context.l10n.mask, audio => context.l10n.audio, speed => context.l10n.speedChange, diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb index 5a69f8d..518dbbb 100644 --- a/lib/l10n/app_de.arb +++ b/lib/l10n/app_de.arb @@ -196,7 +196,9 @@ "invalidNumber": "Ungültiger Wert", "mediaUnavailable": "Medien nicht verfügbar", "mediaMissing": "Fehlende Medien", - "mediaColorSpace": "Medienfarbraum", + "mediaInputColorSpace": "Eingabefarbraum", + "resetMediaColorInterpretation": "Automatische Erkennung wiederherstellen", + "mediaColorInterpretationScope": "Gilt für alle Clips, die diesen Quellvideostream verwenden.", "mediaColorInterpretation": "Interpretation der Medienfarbe", "colorInfoNotLoaded": "Farbinformationen nicht geladen", "unknownColorSpace": "Unbekannter Farbraum. Anzeige als Rec.709.", @@ -613,7 +615,7 @@ "modify": "Modify", "projectSettings": "Project settings", "projectSettingsDescription": "Change project output settings while keeping clip timing and speed.", - "projectColorSpace": "Color space", + "projectOutputColorSpace": "Ausgabefarbraum", "projectWidth": "Width (px)", "projectHeight": "Height (px)", "projectResolutionInvalid": "Enter a whole number from 1 to 16384", diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index a2206bf..9d4af97 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -261,7 +261,9 @@ "invalidNumber": "Invalid value", "mediaUnavailable": "Media unavailable", "mediaMissing": "Missing media", - "mediaColorSpace": "Media color space", + "mediaInputColorSpace": "Input color space", + "resetMediaColorInterpretation": "Restore automatic detection", + "mediaColorInterpretationScope": "Applies to all clips using this source video stream.", "mediaColorInterpretation": "Media color interpretation", "colorInfoNotLoaded": "Color information not loaded", "unknownColorSpace": "Unknown color space. Displaying as Rec.709.", @@ -678,7 +680,7 @@ "modify": "Modify", "projectSettings": "Project settings", "projectSettingsDescription": "Change project output settings while keeping clip timing and speed.", - "projectColorSpace": "Color space", + "projectOutputColorSpace": "Output color space", "projectWidth": "Width (px)", "projectHeight": "Height (px)", "projectResolutionInvalid": "Enter a whole number from 1 to 16384", diff --git a/lib/l10n/app_es.arb b/lib/l10n/app_es.arb index fd8e5a1..eff469d 100644 --- a/lib/l10n/app_es.arb +++ b/lib/l10n/app_es.arb @@ -196,7 +196,9 @@ "invalidNumber": "Valor no válido", "mediaUnavailable": "Medios no disponibles", "mediaMissing": "Medios faltantes", - "mediaColorSpace": "Espacio de color de medios", + "mediaInputColorSpace": "Espacio de color de entrada", + "resetMediaColorInterpretation": "Restaurar detección automática", + "mediaColorInterpretationScope": "Se aplica a todos los clips que usan este flujo de video de origen.", "mediaColorInterpretation": "Interpretación del color de los medios.", "colorInfoNotLoaded": "Información de color no cargada", "unknownColorSpace": "Espacio de color desconocido. Mostrando como Rec.709.", @@ -613,7 +615,7 @@ "modify": "Modify", "projectSettings": "Project settings", "projectSettingsDescription": "Change project output settings while keeping clip timing and speed.", - "projectColorSpace": "Color space", + "projectOutputColorSpace": "Espacio de color de salida", "projectWidth": "Width (px)", "projectHeight": "Height (px)", "projectResolutionInvalid": "Enter a whole number from 1 to 16384", diff --git a/lib/l10n/app_fr.arb b/lib/l10n/app_fr.arb index a422b4e..9d7f5dd 100644 --- a/lib/l10n/app_fr.arb +++ b/lib/l10n/app_fr.arb @@ -196,7 +196,9 @@ "invalidNumber": "Valeur invalide", "mediaUnavailable": "Médias indisponibles", "mediaMissing": "Média manquant", - "mediaColorSpace": "Espace colorimétrique des médias", + "mediaInputColorSpace": "Espace colorimétrique d’entrée", + "resetMediaColorInterpretation": "Rétablir la détection automatique", + "mediaColorInterpretationScope": "S’applique à tous les plans utilisant ce flux vidéo source.", "mediaColorInterpretation": "Interprétation des couleurs des médias", "colorInfoNotLoaded": "Les informations de couleur ne sont pas chargées", "unknownColorSpace": "Espace colorimétrique inconnu. Affichage sous forme de Rec.709.", @@ -613,7 +615,7 @@ "modify": "Modify", "projectSettings": "Project settings", "projectSettingsDescription": "Change project output settings while keeping clip timing and speed.", - "projectColorSpace": "Color space", + "projectOutputColorSpace": "Espace colorimétrique de sortie", "projectWidth": "Width (px)", "projectHeight": "Height (px)", "projectResolutionInvalid": "Enter a whole number from 1 to 16384", diff --git a/lib/l10n/app_it.arb b/lib/l10n/app_it.arb index 9ca15a0..8f6731a 100644 --- a/lib/l10n/app_it.arb +++ b/lib/l10n/app_it.arb @@ -196,7 +196,9 @@ "invalidNumber": "Valore non valido", "mediaUnavailable": "Supporto non disponibile", "mediaMissing": "Media mancanti", - "mediaColorSpace": "Spazio colore multimediale", + "mediaInputColorSpace": "Spazio colore di ingresso", + "resetMediaColorInterpretation": "Ripristina rilevamento automatico", + "mediaColorInterpretationScope": "Si applica a tutte le clip che usano questo flusso video sorgente.", "mediaColorInterpretation": "Interpretazione del colore dei media", "colorInfoNotLoaded": "Informazioni sul colore non caricate", "unknownColorSpace": "Spazio colore sconosciuto. Visualizzato come Rec.709.", @@ -613,7 +615,7 @@ "modify": "Modify", "projectSettings": "Project settings", "projectSettingsDescription": "Change project output settings while keeping clip timing and speed.", - "projectColorSpace": "Color space", + "projectOutputColorSpace": "Spazio colore di uscita", "projectWidth": "Width (px)", "projectHeight": "Height (px)", "projectResolutionInvalid": "Enter a whole number from 1 to 16384", diff --git a/lib/l10n/app_ja.arb b/lib/l10n/app_ja.arb index c4033e6..335dfb4 100644 --- a/lib/l10n/app_ja.arb +++ b/lib/l10n/app_ja.arb @@ -196,7 +196,9 @@ "invalidNumber": "無効な値", "mediaUnavailable": "メディアが利用できません", "mediaMissing": "メディアが見つかりません", - "mediaColorSpace": "メディアの色空間", + "mediaInputColorSpace": "入力色空間", + "resetMediaColorInterpretation": "自動検出に戻す", + "mediaColorInterpretationScope": "この素材の映像ストリームを使用するすべてのクリップに適用されます。", "mediaColorInterpretation": "メディアの色の解釈", "colorInfoNotLoaded": "カラー情報が読み込まれていません", "unknownColorSpace": "不明な色空間。 Rec.709として表示されます。", @@ -613,7 +615,7 @@ "modify": "Modify", "projectSettings": "Project settings", "projectSettingsDescription": "Change project output settings while keeping clip timing and speed.", - "projectColorSpace": "Color space", + "projectOutputColorSpace": "出力色空間", "projectWidth": "Width (px)", "projectHeight": "Height (px)", "projectResolutionInvalid": "Enter a whole number from 1 to 16384", diff --git a/lib/l10n/app_ko.arb b/lib/l10n/app_ko.arb index 3aca2d0..6fc68f1 100644 --- a/lib/l10n/app_ko.arb +++ b/lib/l10n/app_ko.arb @@ -196,7 +196,9 @@ "invalidNumber": "잘못된 값", "mediaUnavailable": "미디어를 사용할 수 없음", "mediaMissing": "미디어 누락", - "mediaColorSpace": "미디어 색 공간", + "mediaInputColorSpace": "입력 색 공간", + "resetMediaColorInterpretation": "자동 감지 복원", + "mediaColorInterpretationScope": "이 소스 비디오 스트림을 사용하는 모든 클립에 적용됩니다.", "mediaColorInterpretation": "미디어 색상 해석", "colorInfoNotLoaded": "색상 정보가 로드되지 않았습니다.", "unknownColorSpace": "알 수 없는 색상 공간입니다. Rec.709로 표시됩니다.", @@ -613,7 +615,7 @@ "modify": "Modify", "projectSettings": "Project settings", "projectSettingsDescription": "Change project output settings while keeping clip timing and speed.", - "projectColorSpace": "Color space", + "projectOutputColorSpace": "출력 색 공간", "projectWidth": "Width (px)", "projectHeight": "Height (px)", "projectResolutionInvalid": "Enter a whole number from 1 to 16384", diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index 0098d20..87089ad 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -1466,11 +1466,23 @@ abstract class AppLocalizations { /// **'Missing media'** String get mediaMissing; - /// No description provided for @mediaColorSpace. + /// No description provided for @mediaInputColorSpace. /// /// In en, this message translates to: - /// **'Media color space'** - String get mediaColorSpace; + /// **'Input color space'** + String get mediaInputColorSpace; + + /// No description provided for @resetMediaColorInterpretation. + /// + /// In en, this message translates to: + /// **'Restore automatic detection'** + String get resetMediaColorInterpretation; + + /// No description provided for @mediaColorInterpretationScope. + /// + /// In en, this message translates to: + /// **'Applies to all clips using this source video stream.'** + String get mediaColorInterpretationScope; /// No description provided for @mediaColorInterpretation. /// @@ -2630,11 +2642,11 @@ abstract class AppLocalizations { /// **'Change project output settings while keeping clip timing and speed.'** String get projectSettingsDescription; - /// No description provided for @projectColorSpace. + /// No description provided for @projectOutputColorSpace. /// /// In en, this message translates to: - /// **'Color space'** - String get projectColorSpace; + /// **'Output color space'** + String get projectOutputColorSpace; /// No description provided for @projectWidth. /// diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart index 6b4c594..a8ffbf9 100644 --- a/lib/l10n/app_localizations_de.dart +++ b/lib/l10n/app_localizations_de.dart @@ -727,7 +727,15 @@ class AppLocalizationsDe extends AppLocalizations { String get mediaMissing => 'Fehlende Medien'; @override - String get mediaColorSpace => 'Medienfarbraum'; + String get mediaInputColorSpace => 'Eingabefarbraum'; + + @override + String get resetMediaColorInterpretation => + 'Automatische Erkennung wiederherstellen'; + + @override + String get mediaColorInterpretationScope => + 'Gilt für alle Clips, die diesen Quellvideostream verwenden.'; @override String get mediaColorInterpretation => 'Interpretation der Medienfarbe'; @@ -1437,7 +1445,7 @@ class AppLocalizationsDe extends AppLocalizations { 'Change project output settings while keeping clip timing and speed.'; @override - String get projectColorSpace => 'Color space'; + String get projectOutputColorSpace => 'Ausgabefarbraum'; @override String get projectWidth => 'Width (px)'; diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index 9c11d7c..33c4e00 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -720,7 +720,14 @@ class AppLocalizationsEn extends AppLocalizations { String get mediaMissing => 'Missing media'; @override - String get mediaColorSpace => 'Media color space'; + String get mediaInputColorSpace => 'Input color space'; + + @override + String get resetMediaColorInterpretation => 'Restore automatic detection'; + + @override + String get mediaColorInterpretationScope => + 'Applies to all clips using this source video stream.'; @override String get mediaColorInterpretation => 'Media color interpretation'; @@ -1410,7 +1417,7 @@ class AppLocalizationsEn extends AppLocalizations { 'Change project output settings while keeping clip timing and speed.'; @override - String get projectColorSpace => 'Color space'; + String get projectOutputColorSpace => 'Output color space'; @override String get projectWidth => 'Width (px)'; diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dart index a6c7374..fbf251c 100644 --- a/lib/l10n/app_localizations_es.dart +++ b/lib/l10n/app_localizations_es.dart @@ -727,7 +727,14 @@ class AppLocalizationsEs extends AppLocalizations { String get mediaMissing => 'Medios faltantes'; @override - String get mediaColorSpace => 'Espacio de color de medios'; + String get mediaInputColorSpace => 'Espacio de color de entrada'; + + @override + String get resetMediaColorInterpretation => 'Restaurar detección automática'; + + @override + String get mediaColorInterpretationScope => + 'Se aplica a todos los clips que usan este flujo de video de origen.'; @override String get mediaColorInterpretation => @@ -1436,7 +1443,7 @@ class AppLocalizationsEs extends AppLocalizations { 'Change project output settings while keeping clip timing and speed.'; @override - String get projectColorSpace => 'Color space'; + String get projectOutputColorSpace => 'Espacio de color de salida'; @override String get projectWidth => 'Width (px)'; diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart index 46ac799..5517e3d 100644 --- a/lib/l10n/app_localizations_fr.dart +++ b/lib/l10n/app_localizations_fr.dart @@ -724,7 +724,15 @@ class AppLocalizationsFr extends AppLocalizations { String get mediaMissing => 'Média manquant'; @override - String get mediaColorSpace => 'Espace colorimétrique des médias'; + String get mediaInputColorSpace => 'Espace colorimétrique d’entrée'; + + @override + String get resetMediaColorInterpretation => + 'Rétablir la détection automatique'; + + @override + String get mediaColorInterpretationScope => + 'S’applique à tous les plans utilisant ce flux vidéo source.'; @override String get mediaColorInterpretation => @@ -1434,7 +1442,7 @@ class AppLocalizationsFr extends AppLocalizations { 'Change project output settings while keeping clip timing and speed.'; @override - String get projectColorSpace => 'Color space'; + String get projectOutputColorSpace => 'Espace colorimétrique de sortie'; @override String get projectWidth => 'Width (px)'; diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dart index 9862d97..5180bae 100644 --- a/lib/l10n/app_localizations_it.dart +++ b/lib/l10n/app_localizations_it.dart @@ -724,7 +724,15 @@ class AppLocalizationsIt extends AppLocalizations { String get mediaMissing => 'Media mancanti'; @override - String get mediaColorSpace => 'Spazio colore multimediale'; + String get mediaInputColorSpace => 'Spazio colore di ingresso'; + + @override + String get resetMediaColorInterpretation => + 'Ripristina rilevamento automatico'; + + @override + String get mediaColorInterpretationScope => + 'Si applica a tutte le clip che usano questo flusso video sorgente.'; @override String get mediaColorInterpretation => 'Interpretazione del colore dei media'; @@ -1430,7 +1438,7 @@ class AppLocalizationsIt extends AppLocalizations { 'Change project output settings while keeping clip timing and speed.'; @override - String get projectColorSpace => 'Color space'; + String get projectOutputColorSpace => 'Spazio colore di uscita'; @override String get projectWidth => 'Width (px)'; diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dart index 7d6607e..0cd3dd1 100644 --- a/lib/l10n/app_localizations_ja.dart +++ b/lib/l10n/app_localizations_ja.dart @@ -701,7 +701,14 @@ class AppLocalizationsJa extends AppLocalizations { String get mediaMissing => 'メディアが見つかりません'; @override - String get mediaColorSpace => 'メディアの色空間'; + String get mediaInputColorSpace => '入力色空間'; + + @override + String get resetMediaColorInterpretation => '自動検出に戻す'; + + @override + String get mediaColorInterpretationScope => + 'この素材の映像ストリームを使用するすべてのクリップに適用されます。'; @override String get mediaColorInterpretation => 'メディアの色の解釈'; @@ -1368,7 +1375,7 @@ class AppLocalizationsJa extends AppLocalizations { 'Change project output settings while keeping clip timing and speed.'; @override - String get projectColorSpace => 'Color space'; + String get projectOutputColorSpace => '出力色空間'; @override String get projectWidth => 'Width (px)'; diff --git a/lib/l10n/app_localizations_ko.dart b/lib/l10n/app_localizations_ko.dart index 5799851..a31c5f1 100644 --- a/lib/l10n/app_localizations_ko.dart +++ b/lib/l10n/app_localizations_ko.dart @@ -702,7 +702,14 @@ class AppLocalizationsKo extends AppLocalizations { String get mediaMissing => '미디어 누락'; @override - String get mediaColorSpace => '미디어 색 공간'; + String get mediaInputColorSpace => '입력 색 공간'; + + @override + String get resetMediaColorInterpretation => '자동 감지 복원'; + + @override + String get mediaColorInterpretationScope => + '이 소스 비디오 스트림을 사용하는 모든 클립에 적용됩니다.'; @override String get mediaColorInterpretation => '미디어 색상 해석'; @@ -1367,7 +1374,7 @@ class AppLocalizationsKo extends AppLocalizations { 'Change project output settings while keeping clip timing and speed.'; @override - String get projectColorSpace => 'Color space'; + String get projectOutputColorSpace => '출력 색 공간'; @override String get projectWidth => 'Width (px)'; diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dart index 0966505..cfdb8c0 100644 --- a/lib/l10n/app_localizations_pt.dart +++ b/lib/l10n/app_localizations_pt.dart @@ -725,7 +725,14 @@ class AppLocalizationsPt extends AppLocalizations { String get mediaMissing => 'Mídia ausente'; @override - String get mediaColorSpace => 'Espaço de cores da mídia'; + String get mediaInputColorSpace => 'Espaço de cor de entrada'; + + @override + String get resetMediaColorInterpretation => 'Restaurar detecção automática'; + + @override + String get mediaColorInterpretationScope => + 'Aplica-se a todos os clipes que usam este fluxo de vídeo de origem.'; @override String get mediaColorInterpretation => 'Interpretação de cores da mídia'; @@ -1431,7 +1438,7 @@ class AppLocalizationsPt extends AppLocalizations { 'Change project output settings while keeping clip timing and speed.'; @override - String get projectColorSpace => 'Color space'; + String get projectOutputColorSpace => 'Espaço de cor de saída'; @override String get projectWidth => 'Width (px)'; diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dart index bc78494..f3eebcf 100644 --- a/lib/l10n/app_localizations_ru.dart +++ b/lib/l10n/app_localizations_ru.dart @@ -721,7 +721,15 @@ class AppLocalizationsRu extends AppLocalizations { String get mediaMissing => 'Медиа отсутствует'; @override - String get mediaColorSpace => 'Цветовое пространство мультимедиа'; + String get mediaInputColorSpace => 'Входное цветовое пространство'; + + @override + String get resetMediaColorInterpretation => + 'Восстановить автоматическое определение'; + + @override + String get mediaColorInterpretationScope => + 'Применяется ко всем клипам, использующим этот исходный видеопоток.'; @override String get mediaColorInterpretation => 'Интерпретация цвета медиа'; @@ -1426,7 +1434,7 @@ class AppLocalizationsRu extends AppLocalizations { 'Change project output settings while keeping clip timing and speed.'; @override - String get projectColorSpace => 'Color space'; + String get projectOutputColorSpace => 'Выходное цветовое пространство'; @override String get projectWidth => 'Width (px)'; diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dart index c446c29..9d38d91 100644 --- a/lib/l10n/app_localizations_zh.dart +++ b/lib/l10n/app_localizations_zh.dart @@ -695,7 +695,13 @@ class AppLocalizationsZh extends AppLocalizations { String get mediaMissing => '素材缺失'; @override - String get mediaColorSpace => '素材色彩空间'; + String get mediaInputColorSpace => '输入色彩空间'; + + @override + String get resetMediaColorInterpretation => '恢复自动识别'; + + @override + String get mediaColorInterpretationScope => '影响使用该素材视频流的所有片段。'; @override String get mediaColorInterpretation => '素材色彩解释'; @@ -1339,7 +1345,7 @@ class AppLocalizationsZh extends AppLocalizations { String get projectSettingsDescription => '修改项目输出规格,保留片段的实际时长和速度。'; @override - String get projectColorSpace => '色彩空间'; + String get projectOutputColorSpace => '输出色彩空间'; @override String get projectWidth => '宽度(px)'; @@ -3128,7 +3134,13 @@ class AppLocalizationsZhHans extends AppLocalizationsZh { String get mediaMissing => '素材缺失'; @override - String get mediaColorSpace => '素材色彩空间'; + String get mediaInputColorSpace => '输入色彩空间'; + + @override + String get resetMediaColorInterpretation => '恢复自动识别'; + + @override + String get mediaColorInterpretationScope => '影响使用该素材视频流的所有片段。'; @override String get mediaColorInterpretation => '素材色彩解释'; @@ -3772,7 +3784,7 @@ class AppLocalizationsZhHans extends AppLocalizationsZh { String get projectSettingsDescription => '修改项目输出规格,保留片段的实际时长和速度。'; @override - String get projectColorSpace => '色彩空间'; + String get projectOutputColorSpace => '输出色彩空间'; @override String get projectWidth => '宽度(px)'; @@ -5561,7 +5573,13 @@ class AppLocalizationsZhHant extends AppLocalizationsZh { String get mediaMissing => '素材缺失'; @override - String get mediaColorSpace => '素材色彩空間'; + String get mediaInputColorSpace => '輸入色彩空間'; + + @override + String get resetMediaColorInterpretation => '恢復自動辨識'; + + @override + String get mediaColorInterpretationScope => '影響使用此素材視訊串流的所有片段。'; @override String get mediaColorInterpretation => '素材色彩解釋'; @@ -6205,7 +6223,7 @@ class AppLocalizationsZhHant extends AppLocalizationsZh { String get projectSettingsDescription => '修改项目输出规格,保留片段的实际时长和速度。'; @override - String get projectColorSpace => '色彩空间'; + String get projectOutputColorSpace => '輸出色彩空間'; @override String get projectWidth => '宽度(px)'; diff --git a/lib/l10n/app_pt.arb b/lib/l10n/app_pt.arb index 1311452..49aa3d0 100644 --- a/lib/l10n/app_pt.arb +++ b/lib/l10n/app_pt.arb @@ -196,7 +196,9 @@ "invalidNumber": "Valor inválido", "mediaUnavailable": "Mídia indisponível", "mediaMissing": "Mídia ausente", - "mediaColorSpace": "Espaço de cores da mídia", + "mediaInputColorSpace": "Espaço de cor de entrada", + "resetMediaColorInterpretation": "Restaurar detecção automática", + "mediaColorInterpretationScope": "Aplica-se a todos os clipes que usam este fluxo de vídeo de origem.", "mediaColorInterpretation": "Interpretação de cores da mídia", "colorInfoNotLoaded": "Informações de cor não carregadas", "unknownColorSpace": "Espaço de cores desconhecido. Exibindo como Rec.709.", @@ -613,7 +615,7 @@ "modify": "Modify", "projectSettings": "Project settings", "projectSettingsDescription": "Change project output settings while keeping clip timing and speed.", - "projectColorSpace": "Color space", + "projectOutputColorSpace": "Espaço de cor de saída", "projectWidth": "Width (px)", "projectHeight": "Height (px)", "projectResolutionInvalid": "Enter a whole number from 1 to 16384", diff --git a/lib/l10n/app_ru.arb b/lib/l10n/app_ru.arb index 471de30..032a449 100644 --- a/lib/l10n/app_ru.arb +++ b/lib/l10n/app_ru.arb @@ -196,7 +196,9 @@ "invalidNumber": "Недопустимое значение", "mediaUnavailable": "Медиа недоступно", "mediaMissing": "Медиа отсутствует", - "mediaColorSpace": "Цветовое пространство мультимедиа", + "mediaInputColorSpace": "Входное цветовое пространство", + "resetMediaColorInterpretation": "Восстановить автоматическое определение", + "mediaColorInterpretationScope": "Применяется ко всем клипам, использующим этот исходный видеопоток.", "mediaColorInterpretation": "Интерпретация цвета медиа", "colorInfoNotLoaded": "Информация о цвете не загружена", "unknownColorSpace": "Неизвестное цветовое пространство. Отображается как Rec.709.", @@ -613,7 +615,7 @@ "modify": "Modify", "projectSettings": "Project settings", "projectSettingsDescription": "Change project output settings while keeping clip timing and speed.", - "projectColorSpace": "Color space", + "projectOutputColorSpace": "Выходное цветовое пространство", "projectWidth": "Width (px)", "projectHeight": "Height (px)", "projectResolutionInvalid": "Enter a whole number from 1 to 16384", diff --git a/lib/l10n/app_zh.arb b/lib/l10n/app_zh.arb index 7e5ff7c..1e99f62 100644 --- a/lib/l10n/app_zh.arb +++ b/lib/l10n/app_zh.arb @@ -225,7 +225,9 @@ "invalidNumber": "无效数值", "mediaUnavailable": "素材不可用", "mediaMissing": "素材缺失", - "mediaColorSpace": "素材色彩空间", + "mediaInputColorSpace": "输入色彩空间", + "resetMediaColorInterpretation": "恢复自动识别", + "mediaColorInterpretationScope": "影响使用该素材视频流的所有片段。", "mediaColorInterpretation": "素材色彩解释", "colorInfoNotLoaded": "色彩信息未读取", "unknownColorSpace": "色彩空间未知,暂按 Rec.709 显示", @@ -642,7 +644,7 @@ "modify": "修改", "projectSettings": "项目设置", "projectSettingsDescription": "修改项目输出规格,保留片段的实际时长和速度。", - "projectColorSpace": "色彩空间", + "projectOutputColorSpace": "输出色彩空间", "projectWidth": "宽度(px)", "projectHeight": "高度(px)", "projectResolutionInvalid": "请输入 1–16384 的整数", diff --git a/lib/l10n/app_zh_Hans.arb b/lib/l10n/app_zh_Hans.arb index be47e1f..6d75aaf 100644 --- a/lib/l10n/app_zh_Hans.arb +++ b/lib/l10n/app_zh_Hans.arb @@ -225,7 +225,9 @@ "invalidNumber": "无效数值", "mediaUnavailable": "素材不可用", "mediaMissing": "素材缺失", - "mediaColorSpace": "素材色彩空间", + "mediaInputColorSpace": "输入色彩空间", + "resetMediaColorInterpretation": "恢复自动识别", + "mediaColorInterpretationScope": "影响使用该素材视频流的所有片段。", "mediaColorInterpretation": "素材色彩解释", "colorInfoNotLoaded": "色彩信息未读取", "unknownColorSpace": "色彩空间未知,暂按 Rec.709 显示", @@ -642,7 +644,7 @@ "modify": "修改", "projectSettings": "项目设置", "projectSettingsDescription": "修改项目输出规格,保留片段的实际时长和速度。", - "projectColorSpace": "色彩空间", + "projectOutputColorSpace": "输出色彩空间", "projectWidth": "宽度(px)", "projectHeight": "高度(px)", "projectResolutionInvalid": "请输入 1–16384 的整数", diff --git a/lib/l10n/app_zh_Hant.arb b/lib/l10n/app_zh_Hant.arb index 5a4c65c..3001900 100644 --- a/lib/l10n/app_zh_Hant.arb +++ b/lib/l10n/app_zh_Hant.arb @@ -225,7 +225,9 @@ "invalidNumber": "無效數值", "mediaUnavailable": "素材不可用", "mediaMissing": "素材缺失", - "mediaColorSpace": "素材色彩空間", + "mediaInputColorSpace": "輸入色彩空間", + "resetMediaColorInterpretation": "恢復自動辨識", + "mediaColorInterpretationScope": "影響使用此素材視訊串流的所有片段。", "mediaColorInterpretation": "素材色彩解釋", "colorInfoNotLoaded": "色彩資訊未讀取", "unknownColorSpace": "色彩空間未知,暫按 Rec.709 顯示", @@ -642,7 +644,7 @@ "modify": "修改", "projectSettings": "项目设置", "projectSettingsDescription": "修改项目输出规格,保留片段的实际时长和速度。", - "projectColorSpace": "色彩空间", + "projectOutputColorSpace": "輸出色彩空間", "projectWidth": "宽度(px)", "projectHeight": "高度(px)", "projectResolutionInvalid": "请输入 1–16384 的整数", diff --git a/lib/workspace/media_color_interpretation.dart b/lib/workspace/media_color_interpretation.dart index 8f9878f..e6c51e4 100644 --- a/lib/workspace/media_color_interpretation.dart +++ b/lib/workspace/media_color_interpretation.dart @@ -20,4 +20,6 @@ RenderColorSpace? resolveMediaColor({ required bool metadataReported, }) => override ?? - (metadataReported && detected == null ? RenderColorSpace.rec709 : null); + (metadataReported && detected == null + ? RenderColorPolicy.defaultUnknownVideoColorSpace + : null); diff --git a/test/media_color_interpretation_test.dart b/test/media_color_interpretation_test.dart index 9a64458..a0bf087 100644 --- a/test/media_color_interpretation_test.dart +++ b/test/media_color_interpretation_test.dart @@ -8,6 +8,7 @@ import 'package:cutdex/workspace/timeline_session.dart'; import 'package:cutdex_sdk/runtime.dart'; import 'package:flutter/material.dart'; import 'package:cutdex_ui/theme.dart'; +import 'package:cutdex_ui/widgets.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -21,8 +22,10 @@ class _ColorPreview extends PreviewController { activeSequence: () => timeline.activeSequenceId, viewForSequence: timeline.view, ); + List? colors = [null]; + @override - List? videoColorSpaces(String assetId) => [null]; + List? videoColorSpaces(String assetId) => colors; } void main() { @@ -107,12 +110,17 @@ void main() { ), ); await tester.pumpAndSettle(); - if (desktop) { - expect(find.byKey(const Key('media-color-menu')), findsNothing); - await tester.tap(find.byType(ExpansionTile)); - await tester.pumpAndSettle(); - } + expect(find.byType(ExpansionTile), findsNothing); + expect( + tester + .widget( + find.byKey(const Key('media-color-reset')), + ) + .onPressed, + isNull, + ); expect(find.text('色彩空间未知,暂按 Rec.709 显示'), findsOneWidget); + expect(find.byTooltip('影响使用该素材视频流的所有片段。'), findsOneWidget); expect( f.timeline.settings.containsKey('mediaColorInterpretations'), isFalse, @@ -121,13 +129,8 @@ void main() { await tester.pumpAndSettle(); await tester.tap(find.text('线性 Rec.2020')); await tester.pumpAndSettle(); - if (desktop) { - await tester.tap(find.byType(ExpansionTile)); - await tester.pumpAndSettle(); - await tester.tap(find.byType(ExpansionTile)); - await tester.pumpAndSettle(); - } - expect(find.text('手动指定:线性 Rec.2020'), findsOneWidget); + expect(find.text('线性 Rec.2020'), findsOneWidget); + expect(find.byKey(const Key('media-color-status')), findsNothing); expect(tester.takeException(), isNull); { await f.timeline.flush(); @@ -143,12 +146,43 @@ void main() { ); expect(reopened.mediaColorInterpretation('media', 1), isNull); } - await tester.tap(find.byKey(const Key('media-color-menu'))); - await tester.pumpAndSettle(); - await tester.tap(find.text('自动')); - await tester.pumpAndSettle(); + if (desktop) { + await tester.tap(find.byKey(const Key('media-color-reset'))); + await tester.pumpAndSettle(); + } else { + await tester.tap(find.byKey(const Key('media-color-menu'))); + await tester.pumpAndSettle(); + await tester.tap(find.text('自动')); + await tester.pumpAndSettle(); + } expect(find.text('色彩空间未知,暂按 Rec.709 显示'), findsOneWidget); expect(f.timeline.mediaColorInterpretation('media', 0), isNull); + preview.colors = null; + preview.notifyListeners(); + await tester.pumpAndSettle(); + expect(find.text('色彩信息未读取'), findsOneWidget); + expect( + tester + .widget>( + find.byKey(const Key('media-color-menu')), + ) + .onChanged, + isNull, + ); + preview.colors = [RenderColorSpace.rec2020HLG]; + preview.notifyListeners(); + await tester.pumpAndSettle(); + expect(find.text('自动 · Rec.2020 HLG'), findsOneWidget); + expect(find.byKey(const Key('media-color-status')), findsNothing); + expect( + tester + .widget>( + find.byKey(const Key('media-color-menu')), + ) + .onChanged, + isNotNull, + ); + expect(tester.takeException(), isNull); }); }, diff --git a/test/project_properties_test.dart b/test/project_properties_test.dart index 5351624..a5dd8b3 100644 --- a/test/project_properties_test.dart +++ b/test/project_properties_test.dart @@ -306,7 +306,7 @@ void main() { expect(find.text('项目设置'), findsNothing); expect(find.text('3840 × 2160 px'), findsOneWidget); expect(find.text('29.97 fps'), findsOneWidget); - expect(f.timeline.projectColorSpace, RenderColorSpace.rec2020PQ); + expect(f.timeline.projectOutputColorSpace, RenderColorSpace.rec2020PQ); expect( f.timeline.view(SequenceId('one')).format.frameDuration, RationalTime(1001, 30000), @@ -316,7 +316,7 @@ void main() { await tester.pumpAndSettle(); expect(find.text('1080 × 1920 px'), findsOneWidget); expect(find.text('30 fps'), findsOneWidget); - expect(f.timeline.projectColorSpace, RenderColorSpace.rec709); + expect(f.timeline.projectOutputColorSpace, RenderColorSpace.rec709); await tester.tap(find.byKey(const ValueKey('project-settings-edit'))); await tester.pumpAndSettle(); await tester.enterText(find.byKey(const ValueKey('project-width')), '1280'); diff --git a/test/properties_scroll_state_test.dart b/test/properties_scroll_state_test.dart index 5faa4d3..7441e7e 100644 --- a/test/properties_scroll_state_test.dart +++ b/test/properties_scroll_state_test.dart @@ -12,7 +12,7 @@ import 'support/preview_fixture.dart'; void main() { testWidgets( - 'property categories restore scroll and expansion independently', + 'property categories restore scroll independently and keep color controls visible', (tester) async { final f = (await tester.runAsync( () => createPreviewFixture(Uri.file('/test/video.mov'), hasAudio: true), @@ -76,7 +76,7 @@ void main() { await tester.pumpAndSettle(); expect(tester.takeException(), isNull); expect(find.byKey(const Key('media-color-menu')), findsNothing); - await tester.tap(find.text('素材色彩解释')); + await tester.tap(find.byKey(const ValueKey('property-tab-color'))); await tester.pumpAndSettle(); expect(find.byKey(const Key('media-color-menu')), findsOneWidget); @@ -84,7 +84,7 @@ void main() { await tester.tap(find.byKey(const ValueKey('property-tab-audio'))); await tester.pumpAndSettle(); expect(tester.takeException(), isNull); - await tester.tap(find.byKey(const ValueKey('property-tab-picture'))); + await tester.tap(find.byKey(const ValueKey('property-tab-color'))); await tester.pumpAndSettle(); expect(tester.takeException(), isNull); } @@ -106,19 +106,27 @@ void main() { await switchBack(); expect(find.byKey(const Key('media-color-menu')), findsOneWidget); + await tester.tap(find.byKey(const ValueKey('property-tab-picture'))); + await tester.pumpAndSettle(); + expect(find.byKey(const Key('media-color-menu')), findsNothing); + expect(find.text('素材色彩解释'), findsNothing); position().jumpTo(55); await tester.pumpAndSettle(); expect(position().pixels, 55); - await switchBack(); - expect(position().pixels, 55); + await tester.tap(find.byKey(const ValueKey('property-tab-color'))); + await tester.pumpAndSettle(); + expect(position().pixels, 0); expect(find.byKey(const Key('media-color-menu')), findsOneWidget); + await tester.tap(find.byKey(const ValueKey('property-tab-picture'))); + await tester.pumpAndSettle(); + expect(position().pixels, 55); + await tester.tap(find.byKey(const ValueKey('property-tab-color'))); + await tester.pumpAndSettle(); position().jumpTo(0); await tester.pumpAndSettle(); - await tester.tap(find.text('素材色彩解释')); - await tester.pumpAndSettle(); await switchBack(); - expect(find.byKey(const Key('media-color-menu')), findsNothing); + expect(find.byKey(const Key('media-color-menu')), findsOneWidget); expect(position().pixels, 0); await tester.pumpWidget(const SizedBox()); }, -- 2.54.0 From 796a3852a2ca9e1477ccb28bd6c7823a48be09f5 Mon Sep 17 00:00:00 2001 From: lingjhf Date: Sun, 11 Oct 2026 15:29:44 +0800 Subject: [PATCH 10/14] test(android): inspect probe diagnostics without public transport API Use a test-owned MethodChannel with the explicit wire contract version to capture malformed native probe metadata. Preserve the diagnostic fallback after raw transport methods were removed from the public runtime facade. Validation: host static analysis passed. The Android device regression was not run on this macOS host. --- integration_test/android_real_media_test.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/integration_test/android_real_media_test.dart b/integration_test/android_real_media_test.dart index e9b5bb2..fea76be 100644 --- a/integration_test/android_real_media_test.dart +++ b/integration_test/android_real_media_test.dart @@ -22,6 +22,7 @@ import 'package:cutdex_sdk/timeline/engine.dart'; import 'package:cutdex_sdk/timeline/model.dart'; import 'package:drift/native.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; @@ -215,7 +216,12 @@ void main() { try { info = await runtime.probe(media); } catch (_) { - final raw = await runtime.invoke('probe', {'media': media.toMap()}); + // This diagnostic test deliberately inspects the native wire response. + final raw = await const MethodChannel('cutdex_runtime') + .invokeMethod('probe', { + 'contractVersion': 1, + 'media': media.toMap(), + }); result['rawProbeMetadata'] = raw; // Preserve the actual wire-contract failure in the device report. MediaInfo.fromMap(raw! as Map); -- 2.54.0 From 38ca180cf77c22937df0df7a7edbbad522ac08f5 Mon Sep 17 00:00:00 2001 From: lingjhf Date: Mon, 12 Oct 2026 03:20:29 +0800 Subject: [PATCH 11/14] refactor(core): own editor UI and pin verified native releases --- .env.example | 16 +- .gitea/BUILD_AND_RELEASE.md | 27 +- .gitea/CI_PERFORMANCE.md | 6 + .gitea/actions/prepare-flutter/action.yml | 3 + .gitea/workflows/ci.yml | 17 +- .gitignore | 3 + README.md | 2 +- analysis_options.yaml | 1 - android/settings.gradle.kts | 13 +- dependencies.json | 19 + docs/development.md | 37 +- docs/testing.md | 14 + integration_test/README.md | 3 +- ...oid_decoder_material_performance_test.dart | 14 +- .../android_document_import_test.dart | 4 +- .../android_navigation_performance_test.dart | 14 +- integration_test/android_real_media_test.dart | 9 +- integration_test/complex_preview_test.dart | 9 +- .../downloads_preview_cadence_test.dart | 4 +- integration_test/downloads_workflow_test.dart | 8 +- integration_test/edit_diagnostics_test.dart | 10 +- .../media_timebase_drop_test.dart | 11 +- integration_test/picture_keyframes_test.dart | 9 +- .../playback_app_acceptance_test.dart | 8 +- .../preview_drag_timing_test.dart | 6 +- integration_test/preview_startup_test.dart | 6 +- integration_test/preview_test.dart | 8 +- integration_test/processing_e2e_test.dart | 8 +- .../support/android_preview_measurement.dart | 2 +- .../support/real_media_export_checks.dart | 2 +- .../support/saved_edit_validation.dart | 6 +- .../timeline_thumbnail_timing_test.dart | 6 +- .../windows_audio_media_test.dart | 11 +- integration_test/windows_real_media_test.dart | 9 +- .../windows_seek_latency_test.dart | 8 +- .../workspace_resize_performance_test.dart | 4 +- lib/app/editor_theme.dart | 2 +- lib/app/shells/desktop_window_frame.dart | 5 +- lib/diagnostics/app_diagnostics.dart | 2 +- .../full_app_viewport_bench/diagnostics.dart | 12 +- .../full_app_viewport_bench/drag.dart | 6 +- .../full_app_viewport_bench/runner.dart | 12 +- lib/diagnostics/timeline_gesture_bench.dart | 4 +- lib/diagnostics/timeline_switch_bench.dart | 2 +- .../assistant/agent_attachment_card.dart | 2 +- lib/features/assistant/agent_chat_panel.dart | 2 +- .../assistant/agent_composer_controller.dart | 2 +- .../assistant/agent_conversation_service.dart | 2 +- .../assistant/agent_media_attachments.dart | 2 +- .../composer_suggestion_surface.dart | 2 +- .../assistant/composer_suggestions.dart | 2 +- lib/features/media/audio_asset_tile.dart | 6 +- .../media/background_removal_controller.dart | 2 +- .../media/background_tasks_dialog.dart | 2 +- .../media/desktop_media_asset_tile.dart | 2 +- lib/features/media/media_asset_cover.dart | 2 +- lib/features/media/media_asset_strip.dart | 2 +- lib/features/media/media_browser_body.dart | 2 +- .../media/media_browser_controller.dart | 2 +- lib/features/media/processing_targets.dart | 2 +- lib/features/media/subtitle_download.dart | 6 +- lib/features/media/subtitle_task_actions.dart | 4 +- lib/features/media/transcription_dialog.dart | 4 +- lib/features/media/visual_asset_tile.dart | 2 +- .../preview/fullscreen_playback_bar.dart | 2 +- lib/features/preview/preview_fullscreen.dart | 2 +- lib/features/preview/preview_messages.dart | 5 +- lib/features/preview/preview_panel.dart | 10 +- lib/features/properties/animation_labels.dart | 2 +- lib/features/properties/audio_properties.dart | 8 +- lib/features/properties/canvas_presets.dart | 2 +- .../properties/caption_properties.dart | 4 +- .../color_interpretation_properties.dart | 4 +- .../distortion_parameter_editor.dart | 6 +- .../properties/distortion_properties.dart | 6 +- lib/features/properties/effect_labels.dart | 2 +- lib/features/properties/effect_list.dart | 2 +- .../properties/effect_parameter_editor.dart | 2 +- .../properties/effect_properties.dart | 4 +- lib/features/properties/mask_properties.dart | 6 +- lib/features/properties/picture_edits.dart | 6 +- .../properties/picture_properties.dart | 8 +- .../properties/project_properties.dart | 6 +- .../properties/project_settings_dialog.dart | 6 +- .../properties/properties_content.dart | 4 +- .../properties_inspector_controller.dart | 6 +- .../properties/property_edit_boundary.dart | 10 +- .../properties/property_edit_controller.dart | 6 +- .../property_keyframe_controls.dart | 4 +- lib/features/properties/speed_properties.dart | 8 +- lib/features/properties/stroke_list.dart | 2 +- .../properties/stroke_parameter_editor.dart | 6 +- .../properties/stroke_properties.dart | 4 +- .../settings/timeline_ruler_settings.dart | 6 +- .../timeline/editor_timeline_viewport.dart | 2 +- .../timeline/timeline_asset_drop_target.dart | 2 +- .../timeline/timeline_drop_preparation.dart | 6 +- .../timeline_external_drop_target.dart | 10 +- lib/features/timeline/timeline_panel.dart | 12 +- .../timeline/timeline_ruler_previews.dart | 8 +- .../timeline/timeline_speed_editor.dart | 10 +- .../timeline/timeline_speed_layout.dart | 4 +- lib/integrations/agent/editor_acceptance.dart | 2 +- .../agent/editor_agent_tools.dart | 4 +- lib/integrations/app_failure_adapter.dart | 4 +- .../application_command_host.dart | 6 +- lib/integrations/editor_command_host.dart | 10 +- lib/integrations/editor_tool_access.dart | 6 +- lib/integrations/editor_tools.dart | 2 +- lib/integrations/mcp/local_mcp_bridge.dart | 2 +- .../mcp/mcp_endpoint_controller.dart | 2 +- lib/integrations/runtime/editor_export.dart | 4 +- .../runtime/export_publication.dart | 2 +- .../runtime/media_presentations.dart | 4 +- .../runtime/media_thumbnails.dart | 4 +- lib/integrations/runtime/media_waveforms.dart | 6 +- .../runtime/processing_configuration.dart | 2 +- .../runtime/timeline_thumbnails.dart | 8 +- .../runtime/timeline_waveforms.dart | 10 +- lib/integrations/tool_workspace_registry.dart | 4 +- .../timeline_ruler_settings_repository.dart | 3 +- .../settings/view_settings_repositories.dart | 4 +- .../processing_resource_download_dialog.dart | 1 - lib/workspace/background_task_state.dart | 2 +- lib/workspace/external_media_import.dart | 2 +- lib/workspace/media_availability.dart | 2 +- lib/workspace/media_binding.dart | 4 +- lib/workspace/media_color_interpretation.dart | 2 +- lib/workspace/media_import.dart | 2 +- lib/workspace/media_timeline_duration.dart | 4 +- .../persistence/project_workspace.dart | 8 +- lib/workspace/prepared_media_metadata.dart | 6 +- .../preview_controller_registry.dart | 4 +- lib/workspace/preview_target.dart | 10 +- lib/workspace/project_assets_changed.dart | 2 +- lib/workspace/project_state.dart | 2 +- lib/workspace/projects.dart | 8 +- lib/workspace/timeline_session.dart | 10 +- lib/workspace/timeline_view_state.dart | 2 +- macos/Flutter/GeneratedPluginRegistrant.swift | 2 +- packages/cutdex_preview/README.md | 41 + packages/cutdex_preview/analysis_options.yaml | 11 + .../cutdex_preview/lib/cutdex_preview.dart | 11 + packages/cutdex_preview/lib/src/cleanup.dart | 16 + .../lib/src/mask_interaction_overlay.dart | 353 +++ .../lib/src/preview_canvas.dart | 66 + .../lib/src/preview_canvas_editing.dart | 67 + .../lib/src/preview_controller.dart | 1779 +++++++++++++ .../lib/src/preview_geometry.dart | 460 ++++ .../lib/src/preview_interaction_overlay.dart | 465 ++++ .../lib/src/preview_obscure_edit.dart | 111 + .../lib/src/preview_policy.dart | 26 + .../lib/src/preview_transform_session.dart | 241 ++ .../lib/src/selection_decoration.dart | 234 ++ .../lib/src/source_preview_controller.dart | 599 +++++ packages/cutdex_preview/pubspec.yaml | 20 + .../test/editor_preview_test.dart | 590 +++++ .../test/preview_geometry_test.dart | 392 +++ .../test/preview_transform_session_test.dart | 196 ++ .../test/selection_decoration_test.dart | 66 + .../test/source_preview_test.dart | 601 +++++ packages/cutdex_timeline_ui/.gitignore | 31 + packages/cutdex_timeline_ui/.metadata | 10 + packages/cutdex_timeline_ui/ARCHITECTURE.md | 284 +++ .../cutdex_timeline_ui/ARCHITECTURE.zh-CN.md | 212 ++ packages/cutdex_timeline_ui/CHANGELOG.md | 58 + .../cutdex_timeline_ui/CHANGELOG.zh-CN.md | 44 + packages/cutdex_timeline_ui/LICENSE | 1 + packages/cutdex_timeline_ui/README.md | 295 +++ packages/cutdex_timeline_ui/README.zh-CN.md | 200 ++ .../cutdex_timeline_ui/analysis_options.yaml | 19 + .../cutdex_timeline_ui/example/.gitignore | 45 + packages/cutdex_timeline_ui/example/.metadata | 30 + packages/cutdex_timeline_ui/example/README.md | 83 + .../example/README.zh-CN.md | 69 + .../example/analysis_options.yaml | 5 + .../example/lib/demo_timeline.dart | 184 ++ .../cutdex_timeline_ui/example/lib/main.dart | 338 +++ .../example/macos/.gitignore | 7 + .../macos/Flutter/Flutter-Debug.xcconfig | 1 + .../macos/Flutter/Flutter-Release.xcconfig | 1 + .../Flutter/GeneratedPluginRegistrant.swift | 12 + .../macos/Runner.xcodeproj/project.pbxproj | 705 ++++++ .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/xcschemes/Runner.xcscheme | 99 + .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../example/macos/Runner/AppDelegate.swift | 13 + .../AppIcon.appiconset/Contents.json | 68 + .../AppIcon.appiconset/app_icon_1024.png | Bin 0 -> 102994 bytes .../AppIcon.appiconset/app_icon_128.png | Bin 0 -> 5680 bytes .../AppIcon.appiconset/app_icon_16.png | Bin 0 -> 520 bytes .../AppIcon.appiconset/app_icon_256.png | Bin 0 -> 14142 bytes .../AppIcon.appiconset/app_icon_32.png | Bin 0 -> 1066 bytes .../AppIcon.appiconset/app_icon_512.png | Bin 0 -> 36406 bytes .../AppIcon.appiconset/app_icon_64.png | Bin 0 -> 2218 bytes .../macos/Runner/Base.lproj/MainMenu.xib | 343 +++ .../macos/Runner/Configs/AppInfo.xcconfig | 14 + .../macos/Runner/Configs/Debug.xcconfig | 2 + .../macos/Runner/Configs/Release.xcconfig | 2 + .../macos/Runner/Configs/Warnings.xcconfig | 13 + .../macos/Runner/DebugProfile.entitlements | 12 + .../example/macos/Runner/Info.plist | 32 + .../macos/Runner/MainFlutterWindow.swift | 19 + .../example/macos/Runner/Release.entitlements | 8 + .../macos/RunnerTests/RunnerTests.swift | 12 + .../cutdex_timeline_ui/example/pubspec.yaml | 24 + .../example/test/commands_test.dart | 379 +++ .../example/test/drag_test.dart | 357 +++ .../example/test/edge_scroll_test.dart | 403 +++ .../example/test/group_drag_test.dart | 131 + .../example/test/mixed_group_drag_test.dart | 318 +++ .../example/test/navigation_test.dart | 381 +++ .../example/test/playback_test.dart | 100 + .../example/test/primary_drag_test.dart | 83 + .../example/test/primary_group_drag_test.dart | 157 ++ .../example/test/scrollbars_test.dart | 249 ++ .../example/test/selection_test.dart | 292 +++ .../test/support/timeline_geometry.dart | 84 + .../example/test/trim_test.dart | 333 +++ .../example/test/widget_test.dart | 80 + .../lib/cutdex_timeline_ui.dart | 13 + .../lib/src/timeline_camera_layout.dart | 98 + .../lib/src/timeline_clip_layout.dart | 92 + .../lib/src/timeline_edge_scroll.dart | 19 + .../lib/src/timeline_interaction_region.dart | 683 +++++ .../lib/src/timeline_keyframes.dart | 15 + .../lib/src/timeline_ruler.dart | 479 ++++ .../lib/src/timeline_ruler_scale.dart | 164 ++ .../lib/src/timeline_scrollbars.dart | 323 +++ .../lib/src/timeline_theme.dart | 501 ++++ .../lib/src/timeline_thumbnails.dart | 34 + .../lib/src/timeline_view.dart | 1159 +++++++++ .../lib/src/timeline_view_controller.dart | 2036 +++++++++++++++ .../lib/src/timeline_view_drag.dart | 533 ++++ .../lib/src/timeline_view_keyframe.dart | 174 ++ .../lib/src/timeline_view_trim.dart | 138 ++ .../lib/src/timeline_viewport.dart | 392 +++ .../lib/src/timeline_waveforms.dart | 91 + packages/cutdex_timeline_ui/pubspec.yaml | 21 + .../test/compound_scene_test.dart | 279 +++ .../test/media_trim_test.dart | 1123 +++++++++ .../test/timeline_camera_layout_test.dart | 248 ++ .../test/timeline_clip_layout_test.dart | 82 + .../test/timeline_drag_lifecycle_test.dart | 2201 +++++++++++++++++ .../test/timeline_keyframe_drag_test.dart | 304 +++ .../test/timeline_keyframe_position_test.dart | 151 ++ .../test/timeline_keyframes_test.dart | 154 ++ .../test/timeline_ruler_intervals_test.dart | 41 + .../test/timeline_thumbnails_test.dart | 675 +++++ .../test/timeline_timecode_ruler_test.dart | 533 ++++ .../timeline_trackpad_navigation_test.dart | 304 +++ .../test/timeline_view_test.dart | 1670 +++++++++++++ .../test/timeline_viewport_camera_test.dart | 286 +++ .../test/timeline_waveforms_test.dart | 343 +++ .../test/waveform_gain_test.dart | 109 + .../test/waveform_zoom_test.dart | 225 ++ pubspec.lock | 95 +- pubspec.yaml | 14 +- pubspec_overrides.yaml.example | 10 +- test/adaptive_workspace_test.dart | 8 +- test/agent_attachment_composer_test.dart | 2 +- test/agent_context_budget_test.dart | 4 +- test/agent_image_preview_test.dart | 4 +- test/agent_tool_recovery_test.dart | 4 +- test/app_database_test.dart | 4 +- test/app_failure_test.dart | 4 +- test/app_update_recovery_test.dart | 2 +- test/app_update_shutdown_test.dart | 4 +- test/application_tools_test.dart | 4 +- test/audio_beat_tools_test.dart | 8 +- test/audio_properties_test.dart | 9 +- test/caption_edit_context_test.dart | 4 +- test/clip_animation_test.dart | 4 +- test/clip_mask_test.dart | 4 +- test/compact_inspector_test.dart | 2 +- test/composer_reference_validator_test.dart | 2 +- test/composer_suggestions_test.dart | 2 +- test/diagnostic_settings_test.dart | 2 +- test/diagnostics/app_diagnostics_test.dart | 2 +- .../edit_operation_diagnostics_test.dart | 8 +- test/editor_acceptance_test.dart | 4 +- test/editor_commands_test.dart | 10 +- test/editor_panel_defaults_test.dart | 2 +- test/editor_theme_test.dart | 2 +- test/export_publication_test.dart | 2 +- .../agent_composer_controller_test.dart | 2 +- .../project_sidebar_lifecycle_test.dart | 2 +- .../timeline/timeline_drop_duration_test.dart | 6 +- .../timeline_drop_preparation_test.dart | 8 +- test/fullscreen_playback_bar_test.dart | 2 +- test/localized_surfaces_test.dart | 2 +- test/media_binding_test.dart | 6 +- test/media_color_interpretation_test.dart | 4 +- test/media_import_test.dart | 2 +- test/media_panel_test.dart | 4 +- test/palette_theme_test.dart | 2 +- test/picture_corner_radius_test.dart | 7 +- test/picture_distortion_test.dart | 6 +- test/picture_edits_test.dart | 8 +- test/picture_effect_test.dart | 4 +- test/picture_keyframes_test.dart | 4 +- test/picture_stroke_test.dart | 4 +- test/preview_controller_test.dart | 14 +- test/preview_interaction_test.dart | 6 +- test/preview_panel_test.dart | 10 +- test/project_entry_test.dart | 6 +- test/project_properties_test.dart | 6 +- test/project_property_binding_test.dart | 2 +- test/project_switch_presentation_test.dart | 2 +- test/project_workspace_test.dart | 4 +- test/properties_preview_updates_test.dart | 4 +- test/properties_scroll_state_test.dart | 2 +- test/property_consistency_test.dart | 8 +- test/property_edit_controller_test.dart | 4 +- test/property_operation_context_test.dart | 8 +- test/saved_edit_validation_test.dart | 6 +- test/source_preview_test.dart | 2 +- test/speed_properties_test.dart | 10 +- test/support/memory_app_settings.dart | 3 +- test/support/preview_fixture.dart | 4 +- test/timeline_ruler_previews_test.dart | 2 +- test/timeline_ruler_settings_widget_test.dart | 8 +- test/timeline_session_test.dart | 17 +- test/timeline_speed_layout_test.dart | 4 +- test/timeline_switch_presentation_test.dart | 2 +- test/timeline_thumbnails_test.dart | 6 +- test/timeline_view_state_test.dart | 4 +- test/timeline_waveforms_test.dart | 6 +- test/transcription_tools_test.dart | 14 +- test/widget_test.dart | 2 +- test/windows_media_import_test.dart | 2 +- .../workspace/external_media_import_test.dart | 2 +- .../media_timeline_duration_test.dart | 4 +- .../prepared_media_entry_points_test.dart | 8 +- .../prepared_media_metadata_test.dart | 6 +- .../preview_controller_registry_test.dart | 2 +- test/workspace/timeline_navigation_test.dart | 6 +- tool/README.md | 2 +- tool/check.py | 3 +- tool/check_package_boundaries.py | 30 +- tool/gitea/ci_scope.py | 5 +- tool/gitea/prepare_dependencies.py | 144 ++ tool/gitea/read_dependencies.py | 77 + tool/gitea/test_ci_scope.py | 13 +- tool/gitea/test_dependencies.py | 44 + tool/gitea/test_prepare_dependencies.py | 100 + tool/testing/app_frame_bench.dart | 12 +- tool/testing/release_smoke.dart | 8 +- tool/tests/local_flutter_test.py | 4 +- tool/tests/package_boundaries_test.py | 24 +- tool/windows/native_preview_bench.dart | 12 +- .../flutter/generated_plugin_registrant.cc | 6 +- windows/flutter/generated_plugins.cmake | 2 +- 354 files changed, 29841 insertions(+), 642 deletions(-) create mode 100644 dependencies.json create mode 100644 packages/cutdex_preview/README.md create mode 100644 packages/cutdex_preview/analysis_options.yaml create mode 100644 packages/cutdex_preview/lib/cutdex_preview.dart create mode 100644 packages/cutdex_preview/lib/src/cleanup.dart create mode 100644 packages/cutdex_preview/lib/src/mask_interaction_overlay.dart create mode 100644 packages/cutdex_preview/lib/src/preview_canvas.dart create mode 100644 packages/cutdex_preview/lib/src/preview_canvas_editing.dart create mode 100644 packages/cutdex_preview/lib/src/preview_controller.dart create mode 100644 packages/cutdex_preview/lib/src/preview_geometry.dart create mode 100644 packages/cutdex_preview/lib/src/preview_interaction_overlay.dart create mode 100644 packages/cutdex_preview/lib/src/preview_obscure_edit.dart create mode 100644 packages/cutdex_preview/lib/src/preview_policy.dart create mode 100644 packages/cutdex_preview/lib/src/preview_transform_session.dart create mode 100644 packages/cutdex_preview/lib/src/selection_decoration.dart create mode 100644 packages/cutdex_preview/lib/src/source_preview_controller.dart create mode 100644 packages/cutdex_preview/pubspec.yaml create mode 100644 packages/cutdex_preview/test/editor_preview_test.dart create mode 100644 packages/cutdex_preview/test/preview_geometry_test.dart create mode 100644 packages/cutdex_preview/test/preview_transform_session_test.dart create mode 100644 packages/cutdex_preview/test/selection_decoration_test.dart create mode 100644 packages/cutdex_preview/test/source_preview_test.dart create mode 100644 packages/cutdex_timeline_ui/.gitignore create mode 100644 packages/cutdex_timeline_ui/.metadata create mode 100644 packages/cutdex_timeline_ui/ARCHITECTURE.md create mode 100644 packages/cutdex_timeline_ui/ARCHITECTURE.zh-CN.md create mode 100644 packages/cutdex_timeline_ui/CHANGELOG.md create mode 100644 packages/cutdex_timeline_ui/CHANGELOG.zh-CN.md create mode 100644 packages/cutdex_timeline_ui/LICENSE create mode 100644 packages/cutdex_timeline_ui/README.md create mode 100644 packages/cutdex_timeline_ui/README.zh-CN.md create mode 100644 packages/cutdex_timeline_ui/analysis_options.yaml create mode 100644 packages/cutdex_timeline_ui/example/.gitignore create mode 100644 packages/cutdex_timeline_ui/example/.metadata create mode 100644 packages/cutdex_timeline_ui/example/README.md create mode 100644 packages/cutdex_timeline_ui/example/README.zh-CN.md create mode 100644 packages/cutdex_timeline_ui/example/analysis_options.yaml create mode 100644 packages/cutdex_timeline_ui/example/lib/demo_timeline.dart create mode 100644 packages/cutdex_timeline_ui/example/lib/main.dart create mode 100644 packages/cutdex_timeline_ui/example/macos/.gitignore create mode 100644 packages/cutdex_timeline_ui/example/macos/Flutter/Flutter-Debug.xcconfig create mode 100644 packages/cutdex_timeline_ui/example/macos/Flutter/Flutter-Release.xcconfig create mode 100644 packages/cutdex_timeline_ui/example/macos/Flutter/GeneratedPluginRegistrant.swift create mode 100644 packages/cutdex_timeline_ui/example/macos/Runner.xcodeproj/project.pbxproj create mode 100644 packages/cutdex_timeline_ui/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 packages/cutdex_timeline_ui/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme create mode 100644 packages/cutdex_timeline_ui/example/macos/Runner.xcworkspace/contents.xcworkspacedata create mode 100644 packages/cutdex_timeline_ui/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 packages/cutdex_timeline_ui/example/macos/Runner/AppDelegate.swift create mode 100644 packages/cutdex_timeline_ui/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 packages/cutdex_timeline_ui/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png create mode 100644 packages/cutdex_timeline_ui/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png create mode 100644 packages/cutdex_timeline_ui/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png create mode 100644 packages/cutdex_timeline_ui/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png create mode 100644 packages/cutdex_timeline_ui/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png create mode 100644 packages/cutdex_timeline_ui/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png create mode 100644 packages/cutdex_timeline_ui/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png create mode 100644 packages/cutdex_timeline_ui/example/macos/Runner/Base.lproj/MainMenu.xib create mode 100644 packages/cutdex_timeline_ui/example/macos/Runner/Configs/AppInfo.xcconfig create mode 100644 packages/cutdex_timeline_ui/example/macos/Runner/Configs/Debug.xcconfig create mode 100644 packages/cutdex_timeline_ui/example/macos/Runner/Configs/Release.xcconfig create mode 100644 packages/cutdex_timeline_ui/example/macos/Runner/Configs/Warnings.xcconfig create mode 100644 packages/cutdex_timeline_ui/example/macos/Runner/DebugProfile.entitlements create mode 100644 packages/cutdex_timeline_ui/example/macos/Runner/Info.plist create mode 100644 packages/cutdex_timeline_ui/example/macos/Runner/MainFlutterWindow.swift create mode 100644 packages/cutdex_timeline_ui/example/macos/Runner/Release.entitlements create mode 100644 packages/cutdex_timeline_ui/example/macos/RunnerTests/RunnerTests.swift create mode 100644 packages/cutdex_timeline_ui/example/pubspec.yaml create mode 100644 packages/cutdex_timeline_ui/example/test/commands_test.dart create mode 100644 packages/cutdex_timeline_ui/example/test/drag_test.dart create mode 100644 packages/cutdex_timeline_ui/example/test/edge_scroll_test.dart create mode 100644 packages/cutdex_timeline_ui/example/test/group_drag_test.dart create mode 100644 packages/cutdex_timeline_ui/example/test/mixed_group_drag_test.dart create mode 100644 packages/cutdex_timeline_ui/example/test/navigation_test.dart create mode 100644 packages/cutdex_timeline_ui/example/test/playback_test.dart create mode 100644 packages/cutdex_timeline_ui/example/test/primary_drag_test.dart create mode 100644 packages/cutdex_timeline_ui/example/test/primary_group_drag_test.dart create mode 100644 packages/cutdex_timeline_ui/example/test/scrollbars_test.dart create mode 100644 packages/cutdex_timeline_ui/example/test/selection_test.dart create mode 100644 packages/cutdex_timeline_ui/example/test/support/timeline_geometry.dart create mode 100644 packages/cutdex_timeline_ui/example/test/trim_test.dart create mode 100644 packages/cutdex_timeline_ui/example/test/widget_test.dart create mode 100644 packages/cutdex_timeline_ui/lib/cutdex_timeline_ui.dart create mode 100644 packages/cutdex_timeline_ui/lib/src/timeline_camera_layout.dart create mode 100644 packages/cutdex_timeline_ui/lib/src/timeline_clip_layout.dart create mode 100644 packages/cutdex_timeline_ui/lib/src/timeline_edge_scroll.dart create mode 100644 packages/cutdex_timeline_ui/lib/src/timeline_interaction_region.dart create mode 100644 packages/cutdex_timeline_ui/lib/src/timeline_keyframes.dart create mode 100644 packages/cutdex_timeline_ui/lib/src/timeline_ruler.dart create mode 100644 packages/cutdex_timeline_ui/lib/src/timeline_ruler_scale.dart create mode 100644 packages/cutdex_timeline_ui/lib/src/timeline_scrollbars.dart create mode 100644 packages/cutdex_timeline_ui/lib/src/timeline_theme.dart create mode 100644 packages/cutdex_timeline_ui/lib/src/timeline_thumbnails.dart create mode 100644 packages/cutdex_timeline_ui/lib/src/timeline_view.dart create mode 100644 packages/cutdex_timeline_ui/lib/src/timeline_view_controller.dart create mode 100644 packages/cutdex_timeline_ui/lib/src/timeline_view_drag.dart create mode 100644 packages/cutdex_timeline_ui/lib/src/timeline_view_keyframe.dart create mode 100644 packages/cutdex_timeline_ui/lib/src/timeline_view_trim.dart create mode 100644 packages/cutdex_timeline_ui/lib/src/timeline_viewport.dart create mode 100644 packages/cutdex_timeline_ui/lib/src/timeline_waveforms.dart create mode 100644 packages/cutdex_timeline_ui/pubspec.yaml create mode 100644 packages/cutdex_timeline_ui/test/compound_scene_test.dart create mode 100644 packages/cutdex_timeline_ui/test/media_trim_test.dart create mode 100644 packages/cutdex_timeline_ui/test/timeline_camera_layout_test.dart create mode 100644 packages/cutdex_timeline_ui/test/timeline_clip_layout_test.dart create mode 100644 packages/cutdex_timeline_ui/test/timeline_drag_lifecycle_test.dart create mode 100644 packages/cutdex_timeline_ui/test/timeline_keyframe_drag_test.dart create mode 100644 packages/cutdex_timeline_ui/test/timeline_keyframe_position_test.dart create mode 100644 packages/cutdex_timeline_ui/test/timeline_keyframes_test.dart create mode 100644 packages/cutdex_timeline_ui/test/timeline_ruler_intervals_test.dart create mode 100644 packages/cutdex_timeline_ui/test/timeline_thumbnails_test.dart create mode 100644 packages/cutdex_timeline_ui/test/timeline_timecode_ruler_test.dart create mode 100644 packages/cutdex_timeline_ui/test/timeline_trackpad_navigation_test.dart create mode 100644 packages/cutdex_timeline_ui/test/timeline_view_test.dart create mode 100644 packages/cutdex_timeline_ui/test/timeline_viewport_camera_test.dart create mode 100644 packages/cutdex_timeline_ui/test/timeline_waveforms_test.dart create mode 100644 packages/cutdex_timeline_ui/test/waveform_gain_test.dart create mode 100644 packages/cutdex_timeline_ui/test/waveform_zoom_test.dart create mode 100644 tool/gitea/prepare_dependencies.py create mode 100644 tool/gitea/read_dependencies.py create mode 100644 tool/gitea/test_dependencies.py create mode 100644 tool/gitea/test_prepare_dependencies.py diff --git a/.env.example b/.env.example index 9199f8f..0aa9873 100644 --- a/.env.example +++ b/.env.example @@ -3,18 +3,24 @@ # Values are literal: no shell commands, interpolation or escape expansion. # Use quotes for spaces; Windows paths may use / or literal backslashes. -# Windows native source development (requires Rust and FFMPEG_DIR). -# CUTDEX_WINDOWS_PATH=D:/workspace/cutdex_windows +# Default: consume exact platform releases from cutdex_native_flutter/native-dependencies.json. +# Explicit pinned releases: CUTDEX_NATIVE_BUILD_MODE=artifacts (clear source overrides). +# CUTDEX_NATIVE_BUILD_MODE=source + +# Optional Windows native source override. Rustup/LLVM must be installed; +# the plugin prepares the pinned Rust target and FFmpeg SDK automatically. +# CUTDEX_WINDOWS_PATH=D:/workspace/cutdex-windows # FFMPEG_DIR=D:/tools/ffmpeg -# Alternatively, use an extracted Windows native package. Choose only one path. +# Artifacts mode only: use an extracted Windows native package. # CUTDEX_WINDOWS_PACKAGE_PATH=D:/packages/cutdex-windows +# CUTDEX_WINDOWS_PACKAGE_SHA256= # macOS / iOS native source development. -# CUTDEX_APPLE_PATH=/Users/your-name/workspace/cutdex_apple +# CUTDEX_APPLE_PATH=/Users/your-name/workspace/CutdexApple # Android native source development (Gradle composite build). -# CUTDEX_ANDROID_PATH=D:/workspace/cutdex-project/cutdex_android +# CUTDEX_ANDROID_PATH=D:/workspace/cutdex-project/cutdex-android # Optional processing workers directory. # CUTDEX_PROCESSING_ROOT=D:/packages/cutdex-processing diff --git a/.gitea/BUILD_AND_RELEASE.md b/.gitea/BUILD_AND_RELEASE.md index ff3cc9d..2fda136 100644 --- a/.gitea/BUILD_AND_RELEASE.md +++ b/.gitea/BUILD_AND_RELEASE.md @@ -1,9 +1,28 @@ # Gitea Windows and Android builds The Windows x64 host runner needs the Flutter version pinned in `.fvmrc`, Python, Node, Visual Studio C++, -JDK 21 and Android SDK 36. The native cutdex_windows Release and cutdex_android -Maven packages must be published before building this app. The SDK Git dependency -is pinned to Gitea; the runner account needs SSH access to that private repository. +JDK 21 and Android SDK 36. `dependencies.json` fixes the Core release version, +source commit and source ZIP SHA256, together with its bundled native Flutter +version and commit. `.gitea/actions/prepare-flutter` downloads that published Core +archive and verifies its SHA256 and `RELEASE.json` before extracting a job-local +`.dependencies/cutdex_core`. The app and preview package both use its +`native_flutter` directory, so Pub resolves one integration source. +Core is hosted at `lingjhf/cutdex_core`; Flutter integration is hosted at +`cutdex-native/cutdex_native_flutter`. Local source development uses the ignored +`pubspec_overrides.yaml` sibling overrides. Release CI does not follow branches or +need platform repository checkout steps. + +Production Android/Windows CI defaults to `CUTDEX_NATIVE_BUILD_MODE=artifacts` and +consumes the exact platform versions and Windows archive digest recorded by the +Flutter integration. Set the repository variable to `source` only for development CI; +that mode lets the Flutter integration fetch the platform's locked SHA during the +build. Android uses its single Settings hook; Windows automatically prepares the +pinned Rust toolchain/target and verified FFmpeg SDK, then links and bundles DLLs. +Applications do not need platform checkout steps or `FFMPEG_DIR`. Source-mode +hosts need Git, Python 3.11+, Rustup/LLVM for Windows and NDK/CMake/MSYS2 for Android. +`CUTDEX_NATIVE_SOURCE_TOKEN` reads private Gitea platform source repositories; +`CUTDEX_NATIVE_SOURCE_SERVER_URL` selects the runner-reachable checkout server. +Platform publication and Flutter integration CI are owned by their independent repositories. Set CUTDEX_GITEA_TOKEN in repository Actions Secrets with repository read and package read access. It authenticates private Gitea native package downloads. @@ -11,7 +30,7 @@ The Android APK includes ARM64 and x86_64, uses the production flavor and curren uses the project's debug signing configuration. Configure formal signing before shipping a production signed Android release. The Windows ZIP includes the whole Flutter Release directory and passes the PE dependency audit. Processing workers -and optional models are separate; these four repositories contain no worker bundle. +and optional models are distributed separately; these workflows do not bundle them. CI and local checks share `tool/check.py` suites for analysis, app/package tests and repository/tool tests. Local tooling loads `.env.local` with the project FVM diff --git a/.gitea/CI_PERFORMANCE.md b/.gitea/CI_PERFORMANCE.md index 6c92ead..9309b1a 100644 --- a/.gitea/CI_PERFORMANCE.md +++ b/.gitea/CI_PERFORMANCE.md @@ -109,6 +109,12 @@ CI artifact ZIP download requests retain the loopback Host instead: Gitea return a signed redirect to the raw archive, and its Host must remain local for that second request to avoid the public tunnel. Release attachment links stay public. +Core source archives are cached by their pinned SHA256 under the runner user's +`.cache/cutdex/core`. Every use verifies the bytes and both dependency identities; +the archive is freshly extracted into each job's workspace. Native Flutter is +bundled with Core and reused from that one source directory. No application build +outputs or package configurations are shared between jobs. + Compare warm CI runs after the first cache fill. Measure checks, Android compile, Windows compile, packaging and artifact transfer separately. Total duration follows the slower platform branch, plus checks and final assembly; no fixed speedup is diff --git a/.gitea/actions/prepare-flutter/action.yml b/.gitea/actions/prepare-flutter/action.yml index 5c4440f..f37c006 100644 --- a/.gitea/actions/prepare-flutter/action.yml +++ b/.gitea/actions/prepare-flutter/action.yml @@ -7,6 +7,9 @@ inputs: runs: using: composite steps: + - name: Prepare verified Core source release + shell: pwsh + run: python tool/gitea/prepare_dependencies.py - name: Configure persistent build caches shell: pwsh run: ./tool/gitea/prepare-build-cache.ps1 diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 3edd9bb..9e4930d 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -14,7 +14,9 @@ concurrency: env: CI: 'true' PYTHONUTF8: '1' + CUTDEX_NATIVE_SOURCE_TOKEN: ${{ secrets.CUTDEX_NATIVE_SOURCE_TOKEN }} CUTDEX_GITEA_INTERNAL_URL: http://127.0.0.1:3000 + CUTDEX_NATIVE_SOURCE_SERVER_URL: http://127.0.0.1:3000 GIT_CONFIG_COUNT: '2' GIT_CONFIG_KEY_0: core.autocrlf GIT_CONFIG_VALUE_0: 'false' @@ -78,10 +80,13 @@ jobs: $file = 'android/gradle.properties' $properties = [IO.File]::ReadAllText($file).Replace('-Xmx8G', '-Xmx3G').Replace('MaxMetaspaceSize=4G', 'MaxMetaspaceSize=768m') [IO.File]::WriteAllText($file, $properties + "`norg.gradle.workers.max=4`norg.gradle.caching=true`n") + - uses: ./.dependencies/cutdex_core/native_flutter/.gitea/actions/setup-android + if: vars.CUTDEX_NATIVE_BUILD_MODE == 'source' - name: Build production Android APK env: GITEA_ACTOR: lingjhf run: | + $env:CUTDEX_NATIVE_BUILD_MODE = '${{ vars.CUTDEX_NATIVE_BUILD_MODE || 'artifacts' }}' Remove-Item Env:CUTDEX_ANDROID_PATH -ErrorAction SilentlyContinue python tool/build.py android if ($LASTEXITCODE -ne 0) { throw 'Android build failed.' } @@ -109,13 +114,23 @@ jobs: github-server-url: ${{ env.CUTDEX_GITEA_INTERNAL_URL }} - name: Prepare Flutter environment uses: ./.gitea/actions/prepare-flutter + - name: Clear inherited native build overrides + run: | + foreach ($key in @('CUTDEX_WINDOWS_PATH', 'CUTDEX_WINDOWS_PACKAGE_PATH', 'FFMPEG_DIR', 'LIBCLANG_PATH')) { + Remove-Item "Env:$key" -ErrorAction SilentlyContinue + "$key=" >> $env:GITHUB_ENV + } + - uses: ./.dependencies/cutdex_core/native_flutter/.gitea/actions/setup-windows + if: vars.CUTDEX_NATIVE_BUILD_MODE == 'source' + with: + libclang-path: ${{ vars.CUTDEX_LIBCLANG_PATH }} - name: Reuse verified Velopack native archive run: | python tool/windows/native_cache.py if ($LASTEXITCODE -ne 0) { throw 'Windows native archive cache preparation failed.' } - name: Build production Windows app run: | - Remove-Item Env:CUTDEX_WINDOWS_PATH, Env:CUTDEX_WINDOWS_PACKAGE_PATH -ErrorAction SilentlyContinue + $env:CUTDEX_NATIVE_BUILD_MODE = '${{ vars.CUTDEX_NATIVE_BUILD_MODE || 'artifacts' }}' python tool/build.py windows if ($LASTEXITCODE -ne 0) { throw 'Windows build failed.' } - name: Verify native SDK matches pinned packaging tools diff --git a/.gitignore b/.gitignore index 7d90a89..fea3319 100644 --- a/.gitignore +++ b/.gitignore @@ -105,3 +105,6 @@ pubspec_overrides.yaml # FVM Version Cache .fvm/ + +# Core and native source checkouts prepared by CI or local development. +.dependencies/ diff --git a/README.md b/README.md index ec7dcbf..239e073 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Cutdex 是一款视频剪辑应用。你可以在时间线上编辑视频、音 ## 下载与安装 -本仓库目前尚未发布可下载的安装包。 +可从 [Gitea Releases](https://git.orangraph.com/lingjhf/cutdex/releases) 下载 Windows x64 安装包或便携包,以及 Android ARM64/x86_64 APK。当前 Android APK 使用开发签名;macOS 和 iOS 暂未提供安装包。 ## 可以做什么 diff --git a/analysis_options.yaml b/analysis_options.yaml index 67c4f6d..c7aa56a 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -13,7 +13,6 @@ analyzer: - windows/** - macos/** - linux/** - - packages/*/example/** plugins: riverpod_lint: ^3.1.9 diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts index eed56c7..dd42cff 100644 --- a/android/settings.gradle.kts +++ b/android/settings.gradle.kts @@ -25,14 +25,5 @@ plugins { include(":app") -// Native source development is opt-in; default resolution uses Gitea Maven packages. -val nativeAndroidPath = providers.gradleProperty("cutdex.android.path") - .orElse(providers.environmentVariable("CUTDEX_ANDROID_PATH")) - .orNull -nativeAndroidPath?.takeIf { it.isNotBlank() }?.let { nativePath -> - includeBuild(nativePath) { - dependencySubstitution { - substitute(module("dev.cutdex:cutdex-android")).using(project(":cutdex-android")) - } - } -} +// Register native source dependencies before Gradle creates the projects. +apply(from = project(":cutdex_native_flutter").projectDir.resolve("native-settings.gradle")) diff --git a/dependencies.json b/dependencies.json new file mode 100644 index 0000000..dab3969 --- /dev/null +++ b/dependencies.json @@ -0,0 +1,19 @@ +{ + "schemaVersion": 1, + "core": { + "repository": "lingjhf/cutdex_core", + "version": "0.0.1", + "ref": "v0.0.1", + "revision": "a9c245ada56536f1642b39b1370c6ec2bb1a2a13", + "artifact": { + "file": "cutdex-core-0.0.1.zip", + "sha256": "9fbff6317b8e4876c423c73dc0da319fad6d96523c50878687dffdb88edde979" + } + }, + "nativeFlutter": { + "repository": "cutdex-native/cutdex_native_flutter", + "version": "0.0.1", + "ref": "v0.0.1", + "revision": "6349cd61676617eb1f739b37b7758a74b0a780cb" + } +} diff --git a/docs/development.md b/docs/development.md index 75a9190..0a1c1f1 100644 --- a/docs/development.md +++ b/docs/development.md @@ -12,21 +12,30 @@ 本地联调其他包时,可参考 `pubspec_overrides.yaml.example` 创建覆盖配置。覆盖文件只用于本机开发,不提交。 -## 运行应用 +应用直接依赖 `cutdex_core` 和 `cutdex_native_flutter`,预览协调与时间线 UI 位于应用内部包。 +正式构建由 `dependencies.json` 固定 Core 的发布版本、源码提交和 ZIP SHA256, +同时记录随 Core 分发的 Flutter 集成版本与提交。运行 +`python3 tool/gitea/prepare_dependencies.py` 后,验证的 Core 源码放到 +`.dependencies/cutdex_core`;应用及预览包共用其中的 `native_flutter`,避免重复解析两个原生集成来源。 +私有下载使用 `CUTDEX_GITEA_TOKEN`。缓存只复用校验过的 ZIP,每个 CI job 独立解压。 -本地路径与原生包认证统一放在应用根目录的 `.env.local`。复制 -[配置示例](../.env.example),按需取消注释并填写本机路径;文件已忽略,不提交、 -不作为应用资源打包。没有配置时,SDK 使用固定版本的已发布原生包。 +Core 远端为 `lingjhf/cutdex_core`,Flutter 集成远端为 `cutdex-native/cutdex_native_flutter`。 +本地源码联调使用 `pubspec_overrides.yaml.example` 指向同级 checkout,覆盖文件不提交。 +发布 ZIP 包含 `RELEASE.json`,应用同时校验 Core 和 Flutter 集成的版本、提交及平台依赖元数据。 + +原生实现位于独立的 `CutdexApple`、`cutdex-android`、`cutdex-windows` 仓库。 +它们的开发提交和确切发布版本由 Flutter 集成的 `native-dependencies.json` 固定。 +默认 `CUTDEX_NATIVE_BUILD_MODE=artifacts` 消费发布版本;开发设置 `source` 按完整 SHA 编译。 +本地联调显式设置 `CUTDEX_APPLE_PATH`、`CUTDEX_ANDROID_PATH` 或 `CUTDEX_WINDOWS_PATH`, +可以使用未提交修改。正式构建清除这些覆盖。 + +源码模式需要目标平台工具链;Android 通过共享 Settings 注册 composite build, +Windows 需要 Rust、FFmpeg SDK 与 libclang,Apple 通过 SwiftPM 消费独立源码包。 +发布模式使用确切 Apple Git 版本、Android Maven 版本和 Windows Release 版本及架构摘要。 +切换模式后清理宿主生成目录并重新解析依赖。认证和具体构建说明见独立 Flutter 集成 README。 -Windows 可用 `CUTDEX_WINDOWS_PATH` 联调本地源码(需要 Rust 和 `FFMPEG_DIR`), -或用 `CUTDEX_WINDOWS_PACKAGE_PATH` 指定已解压的离线包,两者只选其一。 -macOS/iOS 可用 `CUTDEX_APPLE_PATH` 指定本地源码。 -Android 可用 `CUTDEX_ANDROID_PATH` 指向 `cutdex_android` 工程根目录,Gradle 会用 -本地源码替换 Maven 原生依赖;未配置或留空时使用已发布包。 -已有 Gradle 属性 `cutdex.android.path` 优先于该环境变量,显式空属性会关闭本地替换。 `CUTDEX_PROCESSING_ROOT` 指定处理 worker 目录;Android 私有 Maven 认证可填写 -`GITEA_ACTOR` 和 `CUTDEX_GITEA_TOKEN`。这里的 `GITEA_ACTOR` 是令牌所属的认证 -账号,CI 中也按令牌账号设置,与触发工作流的用户无关。 +`GITEA_ACTOR` 和 `CUTDEX_GITEA_TOKEN`,账号应属于令牌的认证用户。 VS Code 的 Debug、Profile、Release 启动项与下述命令共用 `tool/flutter_local.dart` 加载规则。VS Code 的项目 SDK 设置由 `fvm use` 自动同步, @@ -77,7 +86,7 @@ python3 tool/build.py android --flavor development --split-per-abi | 设置、诊断与更新界面 | `lib/features/settings/` | | 桌面、平板与手机布局 | `lib/app/shells/` | -应用根目录是 Pub workspace。[cutdex_ui](../packages/cutdex_ui/README.md) 维护通用组件与基础主题,[cutdex_native](../packages/cutdex_native/README.md) 维护设备信息与桌面交互。应用集成入口在 `lib/integrations/`,共享布局与业务样式在 `lib/shared/`。 +应用根目录是 Pub workspace。`packages/cutdex_preview` 持有预览协调与画布交互,`packages/cutdex_timeline_ui` 持有时间线 UI 和示例;正式编辑计划由 core 统一编译与同步。[cutdex_ui](../packages/cutdex_ui/README.md) 维护通用组件与基础主题,[cutdex_native](../packages/cutdex_native/README.md) 维护设备信息与桌面交互。应用集成入口在 `lib/integrations/`,共享布局与业务样式在 `lib/shared/`。 修改剪辑操作时,检查预览、保存、撤销和重做;修改素材导入时,检查文件访问及项目重新打开后的可用性;修改后台任务时,检查完成、失败和取消后的界面状态。 @@ -103,7 +112,7 @@ python3 tool/build.py android --flavor development --split-per-abi 额外 Flutter 参数放在 `--` 后。仅构建 macOS 应用时使用此入口;完整 ZIP/DMG 打包、processing 嵌入、签名和公证使用 `build_macos_release.py`。 -环境文件合并时进程变量优先,包括空值。原生构建仍遵循所属 SDK 的覆盖规则: +环境文件合并时进程变量优先,包括空值。原生构建仍遵循 `cutdex_native_flutter` 的覆盖规则: Android Gradle 属性先于环境变量;Windows CMake 已缓存的非空路径先于环境变量, 修改后需 clean;processing 的非空 Dart define 先于进程环境,再使用随包默认路径。 `CUTDEX_GITEA_TOKEN` 用于依赖访问,Release 的 `GITEA_TOKEN` 用于发布和 CI 产物读取。 diff --git a/docs/testing.md b/docs/testing.md index 741493b..59dff75 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -49,3 +49,17 @@ fvm dart tool/flutter_local.dart test test/generated_code_test.dart test/localiz 普通测试中的可选真实模型回归使用环境变量:`CUTDEX_ACCEPTANCE_LIVE` 和 `CUTDEX_BEAT_LIVE` 指向对应测试的配置 JSON,`CUTDEX_ASR_FIXTURE` 指定语音素材。配置字段以测试读取代码为准,素材、模型及凭据放在仓库外。 记录实际运行的平台、输入、失败和跳过原因。缺少模型、设备或素材时明确跳过;失败先核对夹具与当前契约,不通过放宽断言或无条件跳过掩盖问题。 + +## 应用持有的编辑 UI + +迁入的预览协调和时间线 UI 与应用一起验证: + +```sh +flutter test --no-pub packages/cutdex_preview/test packages/cutdex_timeline_ui/test packages/cutdex_timeline_ui/example/test +``` + +这两个包及时间线示例的测试由 `tool/check.py --suite flutter` 自动纳入常规 CI;示例源码也纳入静态分析。示例从时间 `0` 开始,测试手势通过实际视口和片段布局计算位置,并验证命中目标。裁剪的逐帧预览需先 `pump` 再断言;选择、提交、撤销与重做仍验证明确的编辑结果和版本。 + +core 的编译、求值、同步和编辑业务测试在 core 仓库使用 Dart VM 运行;native Flutter 的平台适配测试仍在 native 仓库。 + +应用及 UI 包的生产源码不得持有 `cutdex_runtime` 通道;原生媒体通信通过 `cutdex_native_flutter` 的公共接口进入内部 transport。`tool/check_package_boundaries.py` 检查通道名称,测试可以保留 wire mock,应用自己的窗口与生命周期通道仍由应用管理。性能诊断使用已有原生会话的 `previewDiagnostics()`,应用只负责采样、计时校准与报告。 diff --git a/integration_test/README.md b/integration_test/README.md index 6f5802d..7c1bd79 100644 --- a/integration_test/README.md +++ b/integration_test/README.md @@ -56,8 +56,7 @@ fvm dart tool/flutter_local.dart drive --profile --flavor development -d DEVICE_ --dart-define=CUTDEX_TEST_REPORT=/data/user/0/com.example.cutdex.dev/files/cutdex-validation/results.json ``` -The pinned SDK uses the published Android 0.1.3 Maven artifacts. Use explicit SDK -and Android source overrides only when comparing unpublished changes. Calibration +The Flutter adapter uses the Android Maven version pinned in its `native-dependencies.json` by default. For unpublished changes, select `CUTDEX_NATIVE_BUILD_MODE=source` and set `CUTDEX_ANDROID_PATH` to the local native checkout. Calibration requires a `--debug` build; profile/production hosts do not register its channel. UI timing ends at the target workspace's post-frame callback. Native diagnostics record queued output diff --git a/integration_test/android_decoder_material_performance_test.dart b/integration_test/android_decoder_material_performance_test.dart index 25d24f7..167834a 100644 --- a/integration_test/android_decoder_material_performance_test.dart +++ b/integration_test/android_decoder_material_performance_test.dart @@ -11,13 +11,13 @@ import 'package:cutdex/persistence/app_database.dart'; import 'package:cutdex/workspace/project_state.dart'; import 'package:cutdex/workspace/projects.dart'; import 'package:cutdex/workspace/timeline_provider.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/layout.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:drift/native.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; diff --git a/integration_test/android_document_import_test.dart b/integration_test/android_document_import_test.dart index 18c8460..4d045ea 100644 --- a/integration_test/android_document_import_test.dart +++ b/integration_test/android_document_import_test.dart @@ -7,8 +7,8 @@ import 'package:cutdex/workspace/external_media_import.dart'; import 'package:cutdex/workspace/media_import.dart'; import 'package:cutdex/workspace/persistence/project_workspace.dart'; import 'package:cutdex/workspace/persistence/timeline_creation_names.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; diff --git a/integration_test/android_navigation_performance_test.dart b/integration_test/android_navigation_performance_test.dart index 7e02a82..5dc5844 100644 --- a/integration_test/android_navigation_performance_test.dart +++ b/integration_test/android_navigation_performance_test.dart @@ -11,13 +11,13 @@ import 'package:cutdex/persistence/app_database.dart'; import 'package:cutdex/workspace/project_state.dart'; import 'package:cutdex/workspace/projects.dart'; import 'package:cutdex/workspace/timeline_provider.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/layout.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:drift/native.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; diff --git a/integration_test/android_real_media_test.dart b/integration_test/android_real_media_test.dart index fea76be..fe00fcb 100644 --- a/integration_test/android_real_media_test.dart +++ b/integration_test/android_real_media_test.dart @@ -16,10 +16,11 @@ import 'package:cutdex/workspace/projects.dart'; import 'package:cutdex/workspace/preview_controller_registry.dart'; import 'package:cutdex/workspace/timeline_provider.dart'; import 'package:cutdex_native/cutdex_native.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/execution.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:drift/native.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; diff --git a/integration_test/complex_preview_test.dart b/integration_test/complex_preview_test.dart index 0a60d0c..a1e788b 100644 --- a/integration_test/complex_preview_test.dart +++ b/integration_test/complex_preview_test.dart @@ -8,10 +8,11 @@ import 'package:cutdex/workspace/timeline_provider.dart'; import 'dart:ui' as ui; import 'package:cutdex/features/preview/preview_panel.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/execution.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/integration_test/downloads_preview_cadence_test.dart b/integration_test/downloads_preview_cadence_test.dart index 6b949ca..06710d3 100644 --- a/integration_test/downloads_preview_cadence_test.dart +++ b/integration_test/downloads_preview_cadence_test.dart @@ -15,8 +15,8 @@ import 'package:cutdex/persistence/app_database.dart'; import 'package:cutdex/workspace/media_file_extensions.dart'; import 'package:cutdex/workspace/preview_target.dart'; import 'package:cutdex/workspace/projects.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:drift/native.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; diff --git a/integration_test/downloads_workflow_test.dart b/integration_test/downloads_workflow_test.dart index 3482e59..1ca2831 100644 --- a/integration_test/downloads_workflow_test.dart +++ b/integration_test/downloads_workflow_test.dart @@ -19,10 +19,10 @@ import 'package:cutdex/workspace/media_file_extensions.dart'; import 'package:cutdex/workspace/preview_target.dart'; import 'package:cutdex/workspace/projects.dart'; import 'package:cutdex/workspace/timeline_provider.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/layout.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:drift/native.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; diff --git a/integration_test/edit_diagnostics_test.dart b/integration_test/edit_diagnostics_test.dart index 3d4656f..ad3aa18 100644 --- a/integration_test/edit_diagnostics_test.dart +++ b/integration_test/edit_diagnostics_test.dart @@ -13,11 +13,11 @@ import 'package:cutdex/l10n/app_localizations.dart'; import 'package:cutdex/persistence/app_database.dart'; import 'package:cutdex/workspace/timeline_provider.dart'; import 'package:cutdex/workspace/timeline_session.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:drift/native.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; diff --git a/integration_test/media_timebase_drop_test.dart b/integration_test/media_timebase_drop_test.dart index 08d7b59..652ed70 100644 --- a/integration_test/media_timebase_drop_test.dart +++ b/integration_test/media_timebase_drop_test.dart @@ -6,11 +6,12 @@ import 'package:cutdex/workspace/persistence/project_workspace.dart'; import 'package:cutdex/workspace/project_state.dart'; import 'package:cutdex/workspace/projects.dart'; import 'package:cutdex/workspace/timeline_session.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_core/execution.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/integration_test/picture_keyframes_test.dart b/integration_test/picture_keyframes_test.dart index 2cd87ef..968fa83 100644 --- a/integration_test/picture_keyframes_test.dart +++ b/integration_test/picture_keyframes_test.dart @@ -4,12 +4,13 @@ import 'package:cutdex/l10n/app_localizations.dart'; import 'dart:io'; import 'dart:ui' as ui; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'package:cutdex/features/preview/preview_panel.dart'; import 'package:cutdex/features/properties/picture_properties.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_core/execution.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/integration_test/playback_app_acceptance_test.dart b/integration_test/playback_app_acceptance_test.dart index edaebe8..f33a469 100644 --- a/integration_test/playback_app_acceptance_test.dart +++ b/integration_test/playback_app_acceptance_test.dart @@ -7,10 +7,10 @@ import 'package:cutdex/features/preview/preview_panel.dart'; import 'package:cutdex/persistence/app_database.dart'; import 'package:cutdex/workspace/projects.dart'; import 'package:cutdex/workspace/timeline_provider.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:drift/native.dart'; import 'package:cutdex_ui/icons.dart'; import 'package:flutter/material.dart'; diff --git a/integration_test/preview_drag_timing_test.dart b/integration_test/preview_drag_timing_test.dart index 183604b..6bb36ac 100644 --- a/integration_test/preview_drag_timing_test.dart +++ b/integration_test/preview_drag_timing_test.dart @@ -8,11 +8,11 @@ import 'package:cutdex/workspace/timeline_provider.dart'; import 'dart:math' as math; -import 'package:cutdex_sdk/preview.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; import 'package:cutdex/features/preview/preview_panel.dart'; import 'package:cutdex/features/properties/properties_panel.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/integration_test/preview_startup_test.dart b/integration_test/preview_startup_test.dart index a74ffed..676ca25 100644 --- a/integration_test/preview_startup_test.dart +++ b/integration_test/preview_startup_test.dart @@ -3,9 +3,9 @@ import '../test/support/creation_names.dart'; import 'dart:io'; import 'package:cutdex/workspace/persistence/project_workspace.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; import '../test/support/processing_fixture.dart'; diff --git a/integration_test/preview_test.dart b/integration_test/preview_test.dart index 652c2fa..8dc998d 100644 --- a/integration_test/preview_test.dart +++ b/integration_test/preview_test.dart @@ -9,11 +9,11 @@ import 'dart:ui' as ui; import 'package:cutdex/features/preview/preview_panel.dart'; import 'package:cutdex/features/timeline/timeline_panel.dart'; -import 'package:cutdex_sdk/preview.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; import 'package:cutdex/integrations/runtime/timeline_thumbnails.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/integration_test/processing_e2e_test.dart b/integration_test/processing_e2e_test.dart index d55b142..aa55853 100644 --- a/integration_test/processing_e2e_test.dart +++ b/integration_test/processing_e2e_test.dart @@ -6,10 +6,10 @@ import 'dart:convert'; import 'package:cutdex/integrations/runtime/processing_configuration.dart'; import 'package:cutdex/workspace/persistence/project_workspace.dart'; import 'package:cutdex/workspace/timeline_session.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; diff --git a/integration_test/support/android_preview_measurement.dart b/integration_test/support/android_preview_measurement.dart index 63f6150..52acec9 100644 --- a/integration_test/support/android_preview_measurement.dart +++ b/integration_test/support/android_preview_measurement.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'dart:math' as math; -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/integration_test/support/real_media_export_checks.dart b/integration_test/support/real_media_export_checks.dart index b48a6c0..ad74932 100644 --- a/integration_test/support/real_media_export_checks.dart +++ b/integration_test/support/real_media_export_checks.dart @@ -1,7 +1,7 @@ import 'dart:math' as math; import 'dart:ui' as ui; -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; import 'package:flutter/painting.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/integration_test/support/saved_edit_validation.dart b/integration_test/support/saved_edit_validation.dart index 00db4e6..e3daf4e 100644 --- a/integration_test/support/saved_edit_validation.dart +++ b/integration_test/support/saved_edit_validation.dart @@ -1,8 +1,8 @@ import 'dart:io'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter_test/flutter_test.dart'; class SavedEditValidation { diff --git a/integration_test/timeline_thumbnail_timing_test.dart b/integration_test/timeline_thumbnail_timing_test.dart index e49f08a..eed49e5 100644 --- a/integration_test/timeline_thumbnail_timing_test.dart +++ b/integration_test/timeline_thumbnail_timing_test.dart @@ -4,9 +4,9 @@ import 'dart:convert'; import 'dart:io'; import 'package:cutdex/integrations/runtime/timeline_thumbnails.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/integration_test/windows_audio_media_test.dart b/integration_test/windows_audio_media_test.dart index f083a95..62706fd 100644 --- a/integration_test/windows_audio_media_test.dart +++ b/integration_test/windows_audio_media_test.dart @@ -17,11 +17,12 @@ import 'package:cutdex/workspace/media_import.dart'; import 'package:cutdex/workspace/preview_controller_registry.dart'; import 'package:cutdex/workspace/projects.dart'; import 'package:cutdex/workspace/timeline_provider.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_core/execution.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:drift/native.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/integration_test/windows_real_media_test.dart b/integration_test/windows_real_media_test.dart index 4d62b3e..cc33d1e 100644 --- a/integration_test/windows_real_media_test.dart +++ b/integration_test/windows_real_media_test.dart @@ -17,10 +17,11 @@ import 'package:cutdex/workspace/media_import.dart'; import 'package:cutdex/workspace/projects.dart'; import 'package:cutdex/workspace/preview_controller_registry.dart'; import 'package:cutdex/workspace/timeline_provider.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/execution.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:drift/native.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/integration_test/windows_seek_latency_test.dart b/integration_test/windows_seek_latency_test.dart index c525fe9..b5bd476 100644 --- a/integration_test/windows_seek_latency_test.dart +++ b/integration_test/windows_seek_latency_test.dart @@ -7,10 +7,10 @@ import 'dart:math' as math; import 'package:cutdex/features/preview/preview_panel.dart'; import 'package:cutdex/l10n/app_localizations.dart'; import 'package:cutdex/workspace/timeline_provider.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/integration_test/workspace_resize_performance_test.dart b/integration_test/workspace_resize_performance_test.dart index 4d78c84..c0cceac 100644 --- a/integration_test/workspace_resize_performance_test.dart +++ b/integration_test/workspace_resize_performance_test.dart @@ -11,8 +11,8 @@ import 'package:cutdex/persistence/settings/view_settings_repositories.dart'; import 'package:cutdex/workspace/projects.dart'; import 'package:cutdex/workspace/view_settings.dart'; import 'package:cutdex/workspace/workspace_mode.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:drift/native.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; diff --git a/lib/app/editor_theme.dart b/lib/app/editor_theme.dart index 076020e..06bf115 100644 --- a/lib/app/editor_theme.dart +++ b/lib/app/editor_theme.dart @@ -1,5 +1,5 @@ import 'package:cutdex_ui/theme.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:flutter/material.dart'; /// Connects the application palette to the SDK timeline presentation. diff --git a/lib/app/shells/desktop_window_frame.dart b/lib/app/shells/desktop_window_frame.dart index 8c843ce..d5ca13a 100644 --- a/lib/app/shells/desktop_window_frame.dart +++ b/lib/app/shells/desktop_window_frame.dart @@ -221,7 +221,10 @@ class DesktopWindowFrame extends StatelessWidget { child: SizedBox( key: const Key('desktop-content-container'), child: WindowHeaderPane( - offset: const Offset(railWidth + contentInset, headerHeight), + offset: const Offset( + railWidth + contentInset, + headerHeight, + ), child: LayoutBuilder( builder: (context, constraints) => constraints.maxWidth < 200 diff --git a/lib/diagnostics/app_diagnostics.dart b/lib/diagnostics/app_diagnostics.dart index 3fa2d72..4b1ed15 100644 --- a/lib/diagnostics/app_diagnostics.dart +++ b/lib/diagnostics/app_diagnostics.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'dart:io'; -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; import 'package:cutdex_native/cutdex_native.dart'; import 'package:flutter/foundation.dart'; import 'package:path/path.dart' as p; diff --git a/lib/diagnostics/full_app_viewport_bench/diagnostics.dart b/lib/diagnostics/full_app_viewport_bench/diagnostics.dart index 58c9f16..7570f38 100644 --- a/lib/diagnostics/full_app_viewport_bench/diagnostics.dart +++ b/lib/diagnostics/full_app_viewport_bench/diagnostics.dart @@ -2,24 +2,20 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; -import 'package:flutter/services.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; /// Native QPC clock calibration and bounded asynchronous diagnostics sampling. class BenchDiagnostics { - BenchDiagnostics(this.sessionId, this.clock); - final String sessionId; + BenchDiagnostics(this.session, this.clock); + final RuntimeSession session; final Stopwatch clock; - static const _channel = MethodChannel('cutdex_runtime'); double uncertaintyMs = double.infinity, _offset = 0; Timer? _timer; Future? _pending; Object? _sampleError; double now() => _offset + clock.elapsedMicroseconds / 1000; - Future> read() async => - (await _channel.invokeMapMethod('previewDiagnostics', { - 'sessionId': sessionId, - }))!; + Future> read() => session.previewDiagnostics(); Future calibrate() async { for (var i = 0; i < 20; i++) { diff --git a/lib/diagnostics/full_app_viewport_bench/drag.dart b/lib/diagnostics/full_app_viewport_bench/drag.dart index de8ef7a..70280d4 100644 --- a/lib/diagnostics/full_app_viewport_bench/drag.dart +++ b/lib/diagnostics/full_app_viewport_bench/drag.dart @@ -1,6 +1,6 @@ -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline/layout.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/rendering.dart'; diff --git a/lib/diagnostics/full_app_viewport_bench/runner.dart b/lib/diagnostics/full_app_viewport_bench/runner.dart index df504a5..97f2497 100644 --- a/lib/diagnostics/full_app_viewport_bench/runner.dart +++ b/lib/diagnostics/full_app_viewport_bench/runner.dart @@ -2,11 +2,11 @@ import 'dart:async'; import 'dart:io'; import 'package:cutdex/features/preview/preview_panel.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline/layout.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; @@ -84,7 +84,7 @@ Future runFullAppViewportBench(ViewportBenchConfig config) async { if (clipStart < 0 || clipEnd > viewport.width) { throw StateError('Clip outside viewport'); } - final native = diagnostics = BenchDiagnostics(preview.session!.id, clock); + final native = diagnostics = BenchDiagnostics(preview.session!, clock); await native.calibrate(); capture = await BenchCapture.start(config, output); final record = records = BenchRecords(output); diff --git a/lib/diagnostics/timeline_gesture_bench.dart b/lib/diagnostics/timeline_gesture_bench.dart index 342d7d0..01e32c6 100644 --- a/lib/diagnostics/timeline_gesture_bench.dart +++ b/lib/diagnostics/timeline_gesture_bench.dart @@ -2,8 +2,8 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; -import 'package:cutdex_sdk/timeline/layout.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; diff --git a/lib/diagnostics/timeline_switch_bench.dart b/lib/diagnostics/timeline_switch_bench.dart index 9a3bbc8..74f4be5 100644 --- a/lib/diagnostics/timeline_switch_bench.dart +++ b/lib/diagnostics/timeline_switch_bench.dart @@ -191,7 +191,7 @@ Future _run(String output) async { .cached((projectId, id)); if (preview?.session != null && uiMs != null && dataMs != null) { final diagnostic = await BenchDiagnostics( - preview!.session!.id, + preview!.session!, clock, ).read().timeout(const Duration(seconds: 2)); if ((diagnostic['sourceSubmitted'] as num?) != null && diff --git a/lib/features/assistant/agent_attachment_card.dart b/lib/features/assistant/agent_attachment_card.dart index 96e6649..5e9a0df 100644 --- a/lib/features/assistant/agent_attachment_card.dart +++ b/lib/features/assistant/agent_attachment_card.dart @@ -1,4 +1,4 @@ -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:flutter/material.dart'; import '../media/media_asset_cover.dart'; diff --git a/lib/features/assistant/agent_chat_panel.dart b/lib/features/assistant/agent_chat_panel.dart index ce1bf8f..d91999d 100644 --- a/lib/features/assistant/agent_chat_panel.dart +++ b/lib/features/assistant/agent_chat_panel.dart @@ -7,7 +7,7 @@ import '../../shared/theme/composer_style.dart'; import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import '../../integrations/platform/platform_capabilities.dart'; import 'agent_composer_controller.dart'; diff --git a/lib/features/assistant/agent_composer_controller.dart b/lib/features/assistant/agent_composer_controller.dart index ba37394..3230e54 100644 --- a/lib/features/assistant/agent_composer_controller.dart +++ b/lib/features/assistant/agent_composer_controller.dart @@ -1,4 +1,4 @@ -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:flutter/foundation.dart'; import '../../workspace/external_media_import.dart'; diff --git a/lib/features/assistant/agent_conversation_service.dart b/lib/features/assistant/agent_conversation_service.dart index 41e9547..d1af624 100644 --- a/lib/features/assistant/agent_conversation_service.dart +++ b/lib/features/assistant/agent_conversation_service.dart @@ -6,7 +6,7 @@ import 'dart:convert'; import 'package:cutdex_agent/cutdex_agent.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; import 'package:uuid/uuid.dart'; import '../../diagnostics/agent_request_diagnostics.dart'; diff --git a/lib/features/assistant/agent_media_attachments.dart b/lib/features/assistant/agent_media_attachments.dart index d13cf78..4ab981f 100644 --- a/lib/features/assistant/agent_media_attachments.dart +++ b/lib/features/assistant/agent_media_attachments.dart @@ -1,4 +1,4 @@ -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; part 'agent_media_attachments.freezed.dart'; diff --git a/lib/features/assistant/composer_suggestion_surface.dart b/lib/features/assistant/composer_suggestion_surface.dart index 506d51a..eb457df 100644 --- a/lib/features/assistant/composer_suggestion_surface.dart +++ b/lib/features/assistant/composer_suggestion_surface.dart @@ -1,5 +1,5 @@ import 'package:freezed_annotation/freezed_annotation.dart'; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; diff --git a/lib/features/assistant/composer_suggestions.dart b/lib/features/assistant/composer_suggestions.dart index a385d15..78a5eee 100644 --- a/lib/features/assistant/composer_suggestions.dart +++ b/lib/features/assistant/composer_suggestions.dart @@ -1,5 +1,5 @@ import 'package:freezed_annotation/freezed_annotation.dart'; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:cutdex_ui/icons.dart'; import 'package:flutter/material.dart'; diff --git a/lib/features/media/audio_asset_tile.dart b/lib/features/media/audio_asset_tile.dart index 71d1a32..83292b4 100644 --- a/lib/features/media/audio_asset_tile.dart +++ b/lib/features/media/audio_asset_tile.dart @@ -1,8 +1,8 @@ import 'dart:math' as math; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/lib/features/media/background_removal_controller.dart b/lib/features/media/background_removal_controller.dart index 4060ffe..c1b62f0 100644 --- a/lib/features/media/background_removal_controller.dart +++ b/lib/features/media/background_removal_controller.dart @@ -1,7 +1,7 @@ import 'package:cutdex/diagnostics/app_diagnostics.dart'; import 'package:cutdex/errors/app_failure.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; diff --git a/lib/features/media/background_tasks_dialog.dart b/lib/features/media/background_tasks_dialog.dart index 8fc2f87..28008bc 100644 --- a/lib/features/media/background_tasks_dialog.dart +++ b/lib/features/media/background_tasks_dialog.dart @@ -7,7 +7,7 @@ import 'subtitle_download.dart'; import 'subtitle_task_actions.dart'; import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'package:flutter/material.dart'; import '../../integrations/runtime/processing_resource_repository.dart'; diff --git a/lib/features/media/desktop_media_asset_tile.dart b/lib/features/media/desktop_media_asset_tile.dart index 2dc7774..c911764 100644 --- a/lib/features/media/desktop_media_asset_tile.dart +++ b/lib/features/media/desktop_media_asset_tile.dart @@ -1,4 +1,4 @@ -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:cutdex_ui/icons.dart'; import 'package:cutdex_ui/theme.dart'; import 'package:flutter/material.dart'; diff --git a/lib/features/media/media_asset_cover.dart b/lib/features/media/media_asset_cover.dart index a50daae..ae58cfc 100644 --- a/lib/features/media/media_asset_cover.dart +++ b/lib/features/media/media_asset_cover.dart @@ -1,4 +1,4 @@ -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/lib/features/media/media_asset_strip.dart b/lib/features/media/media_asset_strip.dart index 88da1e9..25dcc0e 100644 --- a/lib/features/media/media_asset_strip.dart +++ b/lib/features/media/media_asset_strip.dart @@ -1,6 +1,6 @@ import 'dart:math' as math; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/lib/features/media/media_browser_body.dart b/lib/features/media/media_browser_body.dart index ea085e9..bf089f6 100644 --- a/lib/features/media/media_browser_body.dart +++ b/lib/features/media/media_browser_body.dart @@ -6,7 +6,7 @@ import 'package:cutdex/errors/app_failure.dart'; import 'dart:math' as math; import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/lib/features/media/media_browser_controller.dart b/lib/features/media/media_browser_controller.dart index 0cc9955..7905fcf 100644 --- a/lib/features/media/media_browser_controller.dart +++ b/lib/features/media/media_browser_controller.dart @@ -1,4 +1,4 @@ -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:flutter/foundation.dart'; import '../../integrations/platform/file_picker.dart'; diff --git a/lib/features/media/processing_targets.dart b/lib/features/media/processing_targets.dart index f57aa71..ad18478 100644 --- a/lib/features/media/processing_targets.dart +++ b/lib/features/media/processing_targets.dart @@ -1,4 +1,4 @@ -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; part 'processing_targets.freezed.dart'; diff --git a/lib/features/media/subtitle_download.dart b/lib/features/media/subtitle_download.dart index f74648a..3016fda 100644 --- a/lib/features/media/subtitle_download.dart +++ b/lib/features/media/subtitle_download.dart @@ -1,9 +1,9 @@ import 'package:cutdex/diagnostics/app_diagnostics.dart'; import 'package:cutdex/errors/app_failure.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; diff --git a/lib/features/media/subtitle_task_actions.dart b/lib/features/media/subtitle_task_actions.dart index 2199d51..297ad99 100644 --- a/lib/features/media/subtitle_task_actions.dart +++ b/lib/features/media/subtitle_task_actions.dart @@ -1,5 +1,5 @@ -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; diff --git a/lib/features/media/transcription_dialog.dart b/lib/features/media/transcription_dialog.dart index 4b2adf7..92db34c 100644 --- a/lib/features/media/transcription_dialog.dart +++ b/lib/features/media/transcription_dialog.dart @@ -2,8 +2,8 @@ import '../../shared/widgets/listenable_selector.dart'; import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/runtime/processing_contracts.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_native_flutter/processing_contracts.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/lib/features/media/visual_asset_tile.dart b/lib/features/media/visual_asset_tile.dart index 49bc304..f336ec9 100644 --- a/lib/features/media/visual_asset_tile.dart +++ b/lib/features/media/visual_asset_tile.dart @@ -1,4 +1,4 @@ -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:flutter/material.dart'; import 'media_asset_cover.dart'; diff --git a/lib/features/preview/fullscreen_playback_bar.dart b/lib/features/preview/fullscreen_playback_bar.dart index 87a6960..ec14cfa 100644 --- a/lib/features/preview/fullscreen_playback_bar.dart +++ b/lib/features/preview/fullscreen_playback_bar.dart @@ -1,6 +1,6 @@ import 'dart:async'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import '../../l10n/l10n.dart'; diff --git a/lib/features/preview/preview_fullscreen.dart b/lib/features/preview/preview_fullscreen.dart index b814dea..6485d1c 100644 --- a/lib/features/preview/preview_fullscreen.dart +++ b/lib/features/preview/preview_fullscreen.dart @@ -6,7 +6,7 @@ import 'package:flutter/services.dart'; import 'package:cutdex_ui/theme.dart'; import 'package:cutdex_native/cutdex_native.dart'; -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; /// Moves the existing preview into the root overlay, retaining its native view. class PreviewFullscreenHost extends StatefulWidget { diff --git a/lib/features/preview/preview_messages.dart b/lib/features/preview/preview_messages.dart index 3c95f1e..ebf3f03 100644 --- a/lib/features/preview/preview_messages.dart +++ b/lib/features/preview/preview_messages.dart @@ -2,8 +2,9 @@ import 'package:cutdex/l10n/l10n.dart'; import '../../errors/app_failure.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/execution.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; String previewErrorMessage(Object e, AppLocalizations l10n) => switch (e) { AppException(:final failure) => l10n.failureMessage(failure), diff --git a/lib/features/preview/preview_panel.dart b/lib/features/preview/preview_panel.dart index 4b332f0..23952e1 100644 --- a/lib/features/preview/preview_panel.dart +++ b/lib/features/preview/preview_panel.dart @@ -6,11 +6,11 @@ import 'dart:async'; import 'package:cutdex/features/properties/canvas_presets.dart'; import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/lib/features/properties/animation_labels.dart b/lib/features/properties/animation_labels.dart index 77463c1..0f3782e 100644 --- a/lib/features/properties/animation_labels.dart +++ b/lib/features/properties/animation_labels.dart @@ -1,6 +1,6 @@ import 'package:flutter/widgets.dart'; import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; extension TransformChannelLabel on TransformChannel { String label(BuildContext context) => switch (this) { diff --git a/lib/features/properties/audio_properties.dart b/lib/features/properties/audio_properties.dart index d685dbe..b167921 100644 --- a/lib/features/properties/audio_properties.dart +++ b/lib/features/properties/audio_properties.dart @@ -2,8 +2,8 @@ import '../../shared/widgets/listenable_selector.dart'; import 'package:cutdex/l10n/l10n.dart'; import 'package:cutdex/features/properties/audio_gain_scale.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:cutdex_ui/icons.dart'; @@ -12,9 +12,9 @@ import 'package:cutdex_ui/theme.dart'; import '../../workspace/timeline_session.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; -export 'package:cutdex_sdk/editor.dart' show ClipAudioGain; +export 'package:cutdex_core/editor.dart' show ClipAudioGain; class AudioProperties extends StatefulWidget { const AudioProperties({ diff --git a/lib/features/properties/canvas_presets.dart b/lib/features/properties/canvas_presets.dart index f1b77e8..2c7104a 100644 --- a/lib/features/properties/canvas_presets.dart +++ b/lib/features/properties/canvas_presets.dart @@ -1,6 +1,6 @@ import 'package:flutter/widgets.dart'; import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; abstract final class ProjectCanvasPresets { static const values = { diff --git a/lib/features/properties/caption_properties.dart b/lib/features/properties/caption_properties.dart index 6d6e768..97dcbd7 100644 --- a/lib/features/properties/caption_properties.dart +++ b/lib/features/properties/caption_properties.dart @@ -3,8 +3,8 @@ import '../../shared/widgets/presentation_list.dart'; import 'package:cutdex/shared/widgets/error_notification_host.dart'; import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:cutdex_ui/icons.dart'; diff --git a/lib/features/properties/color_interpretation_properties.dart b/lib/features/properties/color_interpretation_properties.dart index 00224f6..b10041f 100644 --- a/lib/features/properties/color_interpretation_properties.dart +++ b/lib/features/properties/color_interpretation_properties.dart @@ -1,6 +1,6 @@ import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/lib/features/properties/distortion_parameter_editor.dart b/lib/features/properties/distortion_parameter_editor.dart index 289cede..dcbf4fb 100644 --- a/lib/features/properties/distortion_parameter_editor.dart +++ b/lib/features/properties/distortion_parameter_editor.dart @@ -1,7 +1,7 @@ import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_core/timeline/engine.dart'; import 'package:cutdex_ui/icons.dart'; import 'package:cutdex_ui/theme.dart'; import 'package:cutdex_ui/widgets.dart'; diff --git a/lib/features/properties/distortion_properties.dart b/lib/features/properties/distortion_properties.dart index edb34b5..92470ee 100644 --- a/lib/features/properties/distortion_properties.dart +++ b/lib/features/properties/distortion_properties.dart @@ -1,9 +1,9 @@ import 'dart:async'; import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/lib/features/properties/effect_labels.dart b/lib/features/properties/effect_labels.dart index f1b3003..48196f3 100644 --- a/lib/features/properties/effect_labels.dart +++ b/lib/features/properties/effect_labels.dart @@ -1,5 +1,5 @@ import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'package:flutter/widgets.dart'; extension EffectTypeLabel on ClipEffectType { diff --git a/lib/features/properties/effect_list.dart b/lib/features/properties/effect_list.dart index 01e91f0..8f4fe9b 100644 --- a/lib/features/properties/effect_list.dart +++ b/lib/features/properties/effect_list.dart @@ -1,5 +1,5 @@ import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'package:cutdex_ui/icons.dart'; import 'package:cutdex_ui/widgets.dart'; import 'package:flutter/material.dart'; diff --git a/lib/features/properties/effect_parameter_editor.dart b/lib/features/properties/effect_parameter_editor.dart index 432c4e6..3e44f22 100644 --- a/lib/features/properties/effect_parameter_editor.dart +++ b/lib/features/properties/effect_parameter_editor.dart @@ -1,5 +1,5 @@ import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'package:cutdex_ui/theme.dart'; import 'package:cutdex_ui/widgets.dart'; import 'package:flutter/material.dart'; diff --git a/lib/features/properties/effect_properties.dart b/lib/features/properties/effect_properties.dart index 01d3302..cfc7146 100644 --- a/lib/features/properties/effect_properties.dart +++ b/lib/features/properties/effect_properties.dart @@ -1,6 +1,6 @@ import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/lib/features/properties/mask_properties.dart b/lib/features/properties/mask_properties.dart index 9b13fb5..cf36b13 100644 --- a/lib/features/properties/mask_properties.dart +++ b/lib/features/properties/mask_properties.dart @@ -9,9 +9,9 @@ import 'package:cutdex/l10n/l10n.dart'; import 'dart:math' as math; import 'package:cutdex/features/properties/animation_labels.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/lib/features/properties/picture_edits.dart b/lib/features/properties/picture_edits.dart index 3e9c028..30af3e6 100644 --- a/lib/features/properties/picture_edits.dart +++ b/lib/features/properties/picture_edits.dart @@ -1,8 +1,8 @@ import 'dart:async'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; diff --git a/lib/features/properties/picture_properties.dart b/lib/features/properties/picture_properties.dart index f669b3a..705ef50 100644 --- a/lib/features/properties/picture_properties.dart +++ b/lib/features/properties/picture_properties.dart @@ -5,10 +5,10 @@ import 'package:cutdex/l10n/l10n.dart'; import 'dart:math' as math; import 'package:cutdex/features/properties/animation_labels.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/lib/features/properties/project_properties.dart b/lib/features/properties/project_properties.dart index 29d196d..4e34f84 100644 --- a/lib/features/properties/project_properties.dart +++ b/lib/features/properties/project_properties.dart @@ -1,7 +1,7 @@ import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/runtime/contracts.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; +import 'package:cutdex_native_flutter/contracts.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_core/timeline/engine.dart'; import 'package:flutter/material.dart'; import 'package:cutdex_ui/theme.dart'; diff --git a/lib/features/properties/project_settings_dialog.dart b/lib/features/properties/project_settings_dialog.dart index 4a5e29c..aca4b87 100644 --- a/lib/features/properties/project_settings_dialog.dart +++ b/lib/features/properties/project_settings_dialog.dart @@ -1,7 +1,7 @@ import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/runtime/contracts.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_native_flutter/contracts.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; diff --git a/lib/features/properties/properties_content.dart b/lib/features/properties/properties_content.dart index 4995777..fe16688 100644 --- a/lib/features/properties/properties_content.dart +++ b/lib/features/properties/properties_content.dart @@ -1,6 +1,6 @@ import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/lib/features/properties/properties_inspector_controller.dart b/lib/features/properties/properties_inspector_controller.dart index b648b8c..1d6e8c2 100644 --- a/lib/features/properties/properties_inspector_controller.dart +++ b/lib/features/properties/properties_inspector_controller.dart @@ -1,6 +1,6 @@ -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/layout.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/lib/features/properties/property_edit_boundary.dart b/lib/features/properties/property_edit_boundary.dart index bb780b6..77ba5cd 100644 --- a/lib/features/properties/property_edit_boundary.dart +++ b/lib/features/properties/property_edit_boundary.dart @@ -1,10 +1,10 @@ import 'dart:async'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/model.dart'; import '../../workspace/timeline_session.dart'; diff --git a/lib/features/properties/property_edit_controller.dart b/lib/features/properties/property_edit_controller.dart index 2699ee0..0fe79ae 100644 --- a/lib/features/properties/property_edit_controller.dart +++ b/lib/features/properties/property_edit_controller.dart @@ -1,6 +1,6 @@ -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/foundation.dart'; import 'property_edit_boundary.dart'; diff --git a/lib/features/properties/property_keyframe_controls.dart b/lib/features/properties/property_keyframe_controls.dart index d5d4c99..763f9ea 100644 --- a/lib/features/properties/property_keyframe_controls.dart +++ b/lib/features/properties/property_keyframe_controls.dart @@ -1,8 +1,8 @@ import 'dart:math' as math; import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:cutdex_ui/icons.dart'; import 'package:cutdex_ui/widgets.dart'; import 'package:flutter/material.dart'; diff --git a/lib/features/properties/speed_properties.dart b/lib/features/properties/speed_properties.dart index a5a30c1..7d8b1ca 100644 --- a/lib/features/properties/speed_properties.dart +++ b/lib/features/properties/speed_properties.dart @@ -4,10 +4,10 @@ import 'package:cutdex/shared/widgets/error_notification_host.dart'; import 'dart:math' as math; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/layout.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import '../../l10n/l10n.dart'; diff --git a/lib/features/properties/stroke_list.dart b/lib/features/properties/stroke_list.dart index 4cf248a..7138e57 100644 --- a/lib/features/properties/stroke_list.dart +++ b/lib/features/properties/stroke_list.dart @@ -1,5 +1,5 @@ import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'package:cutdex_ui/icons.dart'; import 'package:cutdex_ui/widgets.dart'; import 'package:flutter/material.dart'; diff --git a/lib/features/properties/stroke_parameter_editor.dart b/lib/features/properties/stroke_parameter_editor.dart index 3a080ca..eed40b7 100644 --- a/lib/features/properties/stroke_parameter_editor.dart +++ b/lib/features/properties/stroke_parameter_editor.dart @@ -1,11 +1,11 @@ import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'package:cutdex_ui/theme.dart'; import 'package:cutdex_ui/widgets.dart'; import 'package:flutter/material.dart'; import 'package:flutter/widget_previews.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_core/timeline/engine.dart'; import 'property_keyframe_controls.dart'; import 'property_color_input.dart'; diff --git a/lib/features/properties/stroke_properties.dart b/lib/features/properties/stroke_properties.dart index 23fccbf..a3e5462 100644 --- a/lib/features/properties/stroke_properties.dart +++ b/lib/features/properties/stroke_properties.dart @@ -1,6 +1,6 @@ import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/lib/features/settings/timeline_ruler_settings.dart b/lib/features/settings/timeline_ruler_settings.dart index 92ddcd2..e92ddf3 100644 --- a/lib/features/settings/timeline_ruler_settings.dart +++ b/lib/features/settings/timeline_ruler_settings.dart @@ -1,10 +1,12 @@ -import 'package:cutdex_sdk/timeline_ui.dart' show TimelineRulerTimecodeLayout; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart' + show TimelineRulerTimecodeLayout; import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../persistence/settings/timeline_ruler_settings_repository.dart'; import '../../settings/settings_write_queue.dart'; -export 'package:cutdex_sdk/timeline_ui.dart' show TimelineRulerTimecodeLayout; +export 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart' + show TimelineRulerTimecodeLayout; part 'timeline_ruler_settings.g.dart'; diff --git a/lib/features/timeline/editor_timeline_viewport.dart b/lib/features/timeline/editor_timeline_viewport.dart index f98a55e..c6f44f1 100644 --- a/lib/features/timeline/editor_timeline_viewport.dart +++ b/lib/features/timeline/editor_timeline_viewport.dart @@ -1,4 +1,4 @@ -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:cutdex_ui/theme.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/lib/features/timeline/timeline_asset_drop_target.dart b/lib/features/timeline/timeline_asset_drop_target.dart index 24fc52f..0f7130a 100644 --- a/lib/features/timeline/timeline_asset_drop_target.dart +++ b/lib/features/timeline/timeline_asset_drop_target.dart @@ -1,4 +1,4 @@ -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/lib/features/timeline/timeline_drop_preparation.dart b/lib/features/timeline/timeline_drop_preparation.dart index 4158708..9ed11e4 100644 --- a/lib/features/timeline/timeline_drop_preparation.dart +++ b/lib/features/timeline/timeline_drop_preparation.dart @@ -2,10 +2,10 @@ import 'package:cutdex/errors/app_failure.dart'; import 'dart:async'; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:flutter/foundation.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; diff --git a/lib/features/timeline/timeline_external_drop_target.dart b/lib/features/timeline/timeline_external_drop_target.dart index 990ed99..a3587f1 100644 --- a/lib/features/timeline/timeline_external_drop_target.dart +++ b/lib/features/timeline/timeline_external_drop_target.dart @@ -3,11 +3,11 @@ import 'package:cutdex/errors/app_failure.dart'; import 'dart:async'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/timeline/layout.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; diff --git a/lib/features/timeline/timeline_panel.dart b/lib/features/timeline/timeline_panel.dart index 3361940..07cc8d1 100644 --- a/lib/features/timeline/timeline_panel.dart +++ b/lib/features/timeline/timeline_panel.dart @@ -2,13 +2,13 @@ import '../../shared/widgets/presentation_list.dart'; import 'package:cutdex/shared/widgets/error_notification_host.dart'; import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/layout.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/project.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import '../../shared/widgets/listenable_selector.dart'; import '../../workspace/timeline_provider.dart'; diff --git a/lib/features/timeline/timeline_ruler_previews.dart b/lib/features/timeline/timeline_ruler_previews.dart index fe8bfdf..a8a3aa2 100644 --- a/lib/features/timeline/timeline_ruler_previews.dart +++ b/lib/features/timeline/timeline_ruler_previews.dart @@ -1,7 +1,7 @@ -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/layout.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:cutdex_ui/icons.dart'; import 'package:cutdex_ui/theme.dart'; import 'package:flutter/material.dart'; diff --git a/lib/features/timeline/timeline_speed_editor.dart b/lib/features/timeline/timeline_speed_editor.dart index 5e1df92..d6ab625 100644 --- a/lib/features/timeline/timeline_speed_editor.dart +++ b/lib/features/timeline/timeline_speed_editor.dart @@ -4,11 +4,11 @@ import 'package:cutdex/shared/widgets/error_notification_host.dart'; import 'dart:math' as math; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/layout.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:flutter/material.dart'; import '../../l10n/l10n.dart'; diff --git a/lib/features/timeline/timeline_speed_layout.dart b/lib/features/timeline/timeline_speed_layout.dart index 0873367..dcda7aa 100644 --- a/lib/features/timeline/timeline_speed_layout.dart +++ b/lib/features/timeline/timeline_speed_layout.dart @@ -1,8 +1,8 @@ import 'dart:math' as math; import 'dart:ui'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; /// Speed segments in the clip's local coordinates. Paint and hit targets use /// the same cells, including the minimum pixel width and clipping at low zoom. diff --git a/lib/integrations/agent/editor_acceptance.dart b/lib/integrations/agent/editor_acceptance.dart index df53233..0c55614 100644 --- a/lib/integrations/agent/editor_acceptance.dart +++ b/lib/integrations/agent/editor_acceptance.dart @@ -1,6 +1,6 @@ import 'dart:convert'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'package:cutdex_agent/cutdex_agent.dart'; /// Deterministic, read-only acceptance for explicitly declared editor outcomes. diff --git a/lib/integrations/agent/editor_agent_tools.dart b/lib/integrations/agent/editor_agent_tools.dart index 7170cac..54b0c99 100644 --- a/lib/integrations/agent/editor_agent_tools.dart +++ b/lib/integrations/agent/editor_agent_tools.dart @@ -1,9 +1,9 @@ -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'dart:convert'; import 'package:cutdex_agent/cutdex_agent.dart'; -import 'package:cutdex_sdk/tools.dart'; +import 'package:cutdex_core/tools.dart'; /// Protocol adaptation only. The dispatchers belong to the open project. List editorAgentTools( diff --git a/lib/integrations/app_failure_adapter.dart b/lib/integrations/app_failure_adapter.dart index 6d122ad..069bcfb 100644 --- a/lib/integrations/app_failure_adapter.dart +++ b/lib/integrations/app_failure_adapter.dart @@ -1,7 +1,7 @@ import 'dart:io'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/project.dart'; import '../errors/app_failure.dart'; diff --git a/lib/integrations/application_command_host.dart b/lib/integrations/application_command_host.dart index 4797e69..f4b9663 100644 --- a/lib/integrations/application_command_host.dart +++ b/lib/integrations/application_command_host.dart @@ -1,8 +1,8 @@ import 'dart:io'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/tools.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_core/tools.dart'; import '../workspace/project_state.dart'; import 'application_command_dependencies.dart'; diff --git a/lib/integrations/editor_command_host.dart b/lib/integrations/editor_command_host.dart index 8ee7720..570b323 100644 --- a/lib/integrations/editor_command_host.dart +++ b/lib/integrations/editor_command_host.dart @@ -1,10 +1,10 @@ import 'dart:async'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/layout.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/tools.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_core/tools.dart'; import '../workspace/timeline_session.dart'; diff --git a/lib/integrations/editor_tool_access.dart b/lib/integrations/editor_tool_access.dart index ad495f5..df0bb95 100644 --- a/lib/integrations/editor_tool_access.dart +++ b/lib/integrations/editor_tool_access.dart @@ -1,7 +1,7 @@ import 'package:cutdex_agent/cutdex_agent.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/mcp.dart'; -import 'package:cutdex_sdk/tools.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/mcp.dart'; +import 'package:cutdex_core/tools.dart'; import 'agent/editor_agent_tools.dart'; import 'tool_workspace_registry.dart'; diff --git a/lib/integrations/editor_tools.dart b/lib/integrations/editor_tools.dart index 4313688..473e412 100644 --- a/lib/integrations/editor_tools.dart +++ b/lib/integrations/editor_tools.dart @@ -3,7 +3,7 @@ import 'dart:async'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:cutdex_agent/cutdex_agent.dart'; -import 'package:cutdex_sdk/tools.dart'; +import 'package:cutdex_core/tools.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../workspace/projects.dart'; diff --git a/lib/integrations/mcp/local_mcp_bridge.dart b/lib/integrations/mcp/local_mcp_bridge.dart index 7159ed0..3e2281f 100644 --- a/lib/integrations/mcp/local_mcp_bridge.dart +++ b/lib/integrations/mcp/local_mcp_bridge.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; -import 'package:cutdex_sdk/mcp.dart'; +import 'package:cutdex_core/mcp.dart'; /// Private loopback transport for the stdio launcher. This is not an MCP HTTP /// endpoint. The first line authenticates; remaining bytes are MCP stdio frames. diff --git a/lib/integrations/mcp/mcp_endpoint_controller.dart b/lib/integrations/mcp/mcp_endpoint_controller.dart index 671874c..a411b62 100644 --- a/lib/integrations/mcp/mcp_endpoint_controller.dart +++ b/lib/integrations/mcp/mcp_endpoint_controller.dart @@ -1,6 +1,6 @@ import 'dart:async'; -import 'package:cutdex_sdk/mcp.dart'; +import 'package:cutdex_core/mcp.dart'; import 'local_mcp_bridge.dart'; diff --git a/lib/integrations/runtime/editor_export.dart b/lib/integrations/runtime/editor_export.dart index 6b89141..d02a7ac 100644 --- a/lib/integrations/runtime/editor_export.dart +++ b/lib/integrations/runtime/editor_export.dart @@ -5,8 +5,8 @@ import 'package:crypto/crypto.dart'; import 'export_publication.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; /// Native session and output-file adapter. Compilation belongs to editor. final class RuntimeEditorExport implements RecoverableEditorExportService { diff --git a/lib/integrations/runtime/export_publication.dart b/lib/integrations/runtime/export_publication.dart index 92f760d..79136f5 100644 --- a/lib/integrations/runtime/export_publication.dart +++ b/lib/integrations/runtime/export_publication.dart @@ -2,7 +2,7 @@ import 'dart:convert'; import 'dart:io'; import 'package:crypto/crypto.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'package:path/path.dart' as p; /// A completed staging file and its digest are durable before publication. diff --git a/lib/integrations/runtime/media_presentations.dart b/lib/integrations/runtime/media_presentations.dart index 2747f98..e981599 100644 --- a/lib/integrations/runtime/media_presentations.dart +++ b/lib/integrations/runtime/media_presentations.dart @@ -1,7 +1,7 @@ import 'dart:typed_data'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import 'media_thumbnails.dart'; diff --git a/lib/integrations/runtime/media_thumbnails.dart b/lib/integrations/runtime/media_thumbnails.dart index 51cb18d..893bdc3 100644 --- a/lib/integrations/runtime/media_thumbnails.dart +++ b/lib/integrations/runtime/media_thumbnails.dart @@ -1,8 +1,8 @@ import 'dart:io'; import 'dart:ui' as ui; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; import 'package:flutter/foundation.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; diff --git a/lib/integrations/runtime/media_waveforms.dart b/lib/integrations/runtime/media_waveforms.dart index aa9a10a..7796f73 100644 --- a/lib/integrations/runtime/media_waveforms.dart +++ b/lib/integrations/runtime/media_waveforms.dart @@ -1,6 +1,6 @@ -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../workspace/media_binding.dart'; diff --git a/lib/integrations/runtime/processing_configuration.dart b/lib/integrations/runtime/processing_configuration.dart index 618ec82..7390306 100644 --- a/lib/integrations/runtime/processing_configuration.dart +++ b/lib/integrations/runtime/processing_configuration.dart @@ -1,6 +1,6 @@ import 'dart:io'; -import 'package:cutdex_sdk/runtime/processing.dart'; +import 'package:cutdex_native_flutter/processing.dart'; import 'package:path/path.dart' as p; /// App deployment configuration for non-realtime native processing. diff --git a/lib/integrations/runtime/timeline_thumbnails.dart b/lib/integrations/runtime/timeline_thumbnails.dart index 53d27e5..5db6e1f 100644 --- a/lib/integrations/runtime/timeline_thumbnails.dart +++ b/lib/integrations/runtime/timeline_thumbnails.dart @@ -2,10 +2,10 @@ import 'dart:async'; import 'dart:math' as math; import 'dart:ui' as ui; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:flutter/foundation.dart'; typedef _MediaKey = ({Uri uri, TrackSelection? trackSelection, bool isImage}); diff --git a/lib/integrations/runtime/timeline_waveforms.dart b/lib/integrations/runtime/timeline_waveforms.dart index 18e2d54..7311337 100644 --- a/lib/integrations/runtime/timeline_waveforms.dart +++ b/lib/integrations/runtime/timeline_waveforms.dart @@ -1,11 +1,11 @@ import 'dart:async'; -import 'package:cutdex_sdk/editor.dart' show ClipAudioGain; +import 'package:cutdex_core/editor.dart' show ClipAudioGain; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:flutter/foundation.dart'; typedef _WaveformKey = ({String id, Uri uri, TrackSelection? trackSelection}); diff --git a/lib/integrations/tool_workspace_registry.dart b/lib/integrations/tool_workspace_registry.dart index c21ff48..9f40c05 100644 --- a/lib/integrations/tool_workspace_registry.dart +++ b/lib/integrations/tool_workspace_registry.dart @@ -1,8 +1,8 @@ import 'dart:async'; import 'dart:convert'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/tools.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/tools.dart'; import 'editor_command_host.dart'; diff --git a/lib/persistence/settings/timeline_ruler_settings_repository.dart b/lib/persistence/settings/timeline_ruler_settings_repository.dart index 54cb875..8dd9285 100644 --- a/lib/persistence/settings/timeline_ruler_settings_repository.dart +++ b/lib/persistence/settings/timeline_ruler_settings_repository.dart @@ -1,4 +1,5 @@ -import 'package:cutdex_sdk/timeline_ui.dart' show TimelineRulerTimecodeLayout; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart' + show TimelineRulerTimecodeLayout; import 'package:drift/drift.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; diff --git a/lib/persistence/settings/view_settings_repositories.dart b/lib/persistence/settings/view_settings_repositories.dart index f73bf47..f7ce6c6 100644 --- a/lib/persistence/settings/view_settings_repositories.dart +++ b/lib/persistence/settings/view_settings_repositories.dart @@ -1,5 +1,5 @@ -import 'package:cutdex_sdk/timeline/layout.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:drift/drift.dart' hide JsonKey; diff --git a/lib/shared/widgets/processing_resource_download_dialog.dart b/lib/shared/widgets/processing_resource_download_dialog.dart index fa61724..03d6830 100644 --- a/lib/shared/widgets/processing_resource_download_dialog.dart +++ b/lib/shared/widgets/processing_resource_download_dialog.dart @@ -4,7 +4,6 @@ import 'package:flutter/material.dart'; import 'package:cutdex_ui/theme.dart'; import 'package:cutdex_ui/widgets.dart'; - /// Shared layout for downloading a processing resource before a task starts. class ProcessingResourceDownloadDialog extends StatelessWidget { const ProcessingResourceDownloadDialog({ diff --git a/lib/workspace/background_task_state.dart b/lib/workspace/background_task_state.dart index 5d81c14..93cb2cb 100644 --- a/lib/workspace/background_task_state.dart +++ b/lib/workspace/background_task_state.dart @@ -1,4 +1,4 @@ -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; diff --git a/lib/workspace/external_media_import.dart b/lib/workspace/external_media_import.dart index 926b347..eee9c2b 100644 --- a/lib/workspace/external_media_import.dart +++ b/lib/workspace/external_media_import.dart @@ -1,6 +1,6 @@ import 'dart:io'; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; diff --git a/lib/workspace/media_availability.dart b/lib/workspace/media_availability.dart index 08893e5..4c77da7 100644 --- a/lib/workspace/media_availability.dart +++ b/lib/workspace/media_availability.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'dart:io'; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import 'projects.dart'; diff --git a/lib/workspace/media_binding.dart b/lib/workspace/media_binding.dart index a360882..3d01276 100644 --- a/lib/workspace/media_binding.dart +++ b/lib/workspace/media_binding.dart @@ -1,5 +1,5 @@ -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; /// Runs generation while the workspace retains the owning project and grants. typedef AssetMediaLoader = Future Function( diff --git a/lib/workspace/media_color_interpretation.dart b/lib/workspace/media_color_interpretation.dart index e6c51e4..e6703b6 100644 --- a/lib/workspace/media_color_interpretation.dart +++ b/lib/workspace/media_color_interpretation.dart @@ -1,4 +1,4 @@ -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; import '../l10n/app_localizations.dart'; diff --git a/lib/workspace/media_import.dart b/lib/workspace/media_import.dart index 12dd396..5e03b2f 100644 --- a/lib/workspace/media_import.dart +++ b/lib/workspace/media_import.dart @@ -1,4 +1,4 @@ -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:path/path.dart' as p; diff --git a/lib/workspace/media_timeline_duration.dart b/lib/workspace/media_timeline_duration.dart index 8ac3e5b..135a428 100644 --- a/lib/workspace/media_timeline_duration.dart +++ b/lib/workspace/media_timeline_duration.dart @@ -1,7 +1,7 @@ import 'package:cutdex/errors/app_failure.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; /// Convert source metadata once, without extending the range past its end. RationalTime mediaTimelineDuration(MediaTime duration) { diff --git a/lib/workspace/persistence/project_workspace.dart b/lib/workspace/persistence/project_workspace.dart index 7e474ac..9b0f87d 100644 --- a/lib/workspace/persistence/project_workspace.dart +++ b/lib/workspace/persistence/project_workspace.dart @@ -8,13 +8,13 @@ import '../../diagnostics/app_diagnostics.dart'; import 'timeline_creation_names.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:path/path.dart' as p; import 'package:uuid/uuid.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import '../project_assets_changed.dart'; import '../project_state.dart'; diff --git a/lib/workspace/prepared_media_metadata.dart b/lib/workspace/prepared_media_metadata.dart index f966fdf..b906450 100644 --- a/lib/workspace/prepared_media_metadata.dart +++ b/lib/workspace/prepared_media_metadata.dart @@ -1,8 +1,8 @@ import 'package:cutdex/errors/app_failure.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'media_timeline_duration.dart'; diff --git a/lib/workspace/preview_controller_registry.dart b/lib/workspace/preview_controller_registry.dart index 3fe38ea..faf9465 100644 --- a/lib/workspace/preview_controller_registry.dart +++ b/lib/workspace/preview_controller_registry.dart @@ -1,8 +1,8 @@ import 'dart:async'; -import 'package:cutdex_sdk/preview.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; import 'package:flutter/foundation.dart'; -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import 'preview_target.dart'; diff --git a/lib/workspace/preview_target.dart b/lib/workspace/preview_target.dart index 4721523..0e13e4e 100644 --- a/lib/workspace/preview_target.dart +++ b/lib/workspace/preview_target.dart @@ -1,10 +1,10 @@ import 'dart:async'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/foundation.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; diff --git a/lib/workspace/project_assets_changed.dart b/lib/workspace/project_assets_changed.dart index 3c9a833..3c0b380 100644 --- a/lib/workspace/project_assets_changed.dart +++ b/lib/workspace/project_assets_changed.dart @@ -1,4 +1,4 @@ -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; part 'project_assets_changed.freezed.dart'; diff --git a/lib/workspace/project_state.dart b/lib/workspace/project_state.dart index 0108298..b9e2f65 100644 --- a/lib/workspace/project_state.dart +++ b/lib/workspace/project_state.dart @@ -1,4 +1,4 @@ -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import '../errors/app_failure.dart'; diff --git a/lib/workspace/projects.dart b/lib/workspace/projects.dart index ef7d816..3e38910 100644 --- a/lib/workspace/projects.dart +++ b/lib/workspace/projects.dart @@ -9,9 +9,9 @@ import '../diagnostics/app_diagnostics.dart'; import 'package:flutter/services.dart'; import 'package:path/path.dart' as p; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../features/settings/language_settings.dart'; @@ -26,7 +26,7 @@ import 'timeline_view_state.dart'; import 'view_settings.dart'; import 'preview_controller_registry.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import '../integrations/runtime/processing_configuration.dart'; import 'persistence/project_workspace.dart'; diff --git a/lib/workspace/timeline_session.dart b/lib/workspace/timeline_session.dart index c2b73b5..3453aee 100644 --- a/lib/workspace/timeline_session.dart +++ b/lib/workspace/timeline_session.dart @@ -1,10 +1,10 @@ import 'package:cutdex/errors/app_failure.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/layout.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:flutter/foundation.dart'; import 'package:uuid/uuid.dart'; diff --git a/lib/workspace/timeline_view_state.dart b/lib/workspace/timeline_view_state.dart index e050f6a..e3fc7b8 100644 --- a/lib/workspace/timeline_view_state.dart +++ b/lib/workspace/timeline_view_state.dart @@ -1,6 +1,6 @@ import 'dart:async'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/timeline/model.dart'; import '../persistence/app_settings_repositories.dart'; import 'timeline_session.dart'; diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index fb0306d..b09ba51 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -6,7 +6,7 @@ import FlutterMacOS import Foundation import cutdex_native -import cutdex_runtime +import cutdex_native_flutter import deskup import filegate import flutter_secure_storage_darwin diff --git a/packages/cutdex_preview/README.md b/packages/cutdex_preview/README.md new file mode 100644 index 0000000..943495c --- /dev/null +++ b/packages/cutdex_preview/README.md @@ -0,0 +1,41 @@ +# cutdex_preview + +Application-owned Flutter preview controllers, canvas and transform/mask interactions. Core provides editing and execution semantics; this package binds the native session to Flutter and owns preview lifecycle. The package has no App, Riverpod, workspace, platform-grant or localization dependency. + +- `PreviewController` accepts an `EditorSession`, the active-sequence getter and the host's existing `TimelineViewController` resolver. When selection changes, the host notifies the editor session. +- It owns one runtime session and attaches that same target to editor-owned execution coordination. Playback and seek go directly to runtime. Authored transforms and masks commit through editor; timelines remain local. +- `SourcePreviewController` uses runtime directly. `PreviewMediaLoader` binds the source outside the package and retains its access until the callback finishes, including native session cleanup. No editor is needed for source playback. +- `PreviewCanvas`, `PreviewInteractionOverlay` and `MaskInteractionOverlay` provide reusable presentation. The App supplies padding, background, error feedback and toolbars. `PreviewPolicy` supplies viewing assumptions; project settings override timeline defaults. +- `PreviewPolicy.skimmingMode` uses runtime's `SkimmingMode` directly: `audible` by default, or `silent`. Both preview controllers pass this policy to the runtime without Boolean adapters. +- Errors remain original objects. Unavailable assets carry runtime error codes; `unavailableAtPlayhead` returns clip names for the host to format. + +```dart +final preview = PreviewController( + timeline: editor, + runtime: runtime, + activeSequence: () => selectedSequence, + viewForSequence: timelineViewFor, +); +await preview.initialize(); +// Mount RuntimePreview(session: preview.session!) inside PreviewCanvas. +// Detach widgets before closing and keep host timeline views alive until close. +await preview.close(); // releases preview; does not close editor +``` + +Concurrent `initialize` calls share one startup; initialization after close is rejected. Public runtime and playback state is read-only. The host reports preparation failures through `reportFailure`, without assigning controller fields. `PreviewController.close` releases its notifier too; after `SourcePreviewController.close`, dispose its notifier. Closing waits for pending startup, playback and native cleanup, even when a host callback or cleanup action fails; it reports the first failure after releasing other resources. Clearing the active sequence detaches the old view, cancels seek and pauses output. The host must close preview before releasing the project's media grants. + +Run `flutter test packages/cutdex_preview/test` from the application workspace. App tests retain inspector/MCP/preview integration coverage. + +PreviewController implements EditorPreviewService and registers a non-owning port on EditorSession during initialization, unregistering before close. Tools query or control this existing timeline preview by explicit sequence ID. Controls reject inactive sequences, preserve authored history and reuse native synchronization. Explicit pause is sent even before the native playing event arrives. Source preview remains independent. + +EditorAlignmentService resolves canvas alignment at explicit sequence time using the synchronized execution geometry. It rejects stale, missing or ambiguous geometry and active timelines; the editor owns the final version check and authored commit. CanvasAlignment is defined by editor and re-exported by preview. + +SourcePreviewController.control provides explicit play, pause and exact seek, serialized with UI playback and drained on close. The App PreviewTarget owns the selected controller and source navigation; both tools and the panel reuse it. Explicit pause reaches native playback even before a playing event arrives. + +Editor selection decorations are painted by Flutter over native video output. Material and mask selections share blue bounds, white corner squares and an output-pixel dimension label. Drag a corner square to resize; drag just outside any corner to rotate, with Shift snapping to 15 degrees. Transform bounds follow acknowledged native renders. Selection and style changes do not acquire a paused native frame or submit native decorations. + +Selection strokes use an integer physical-pixel width based on display density. Axis-aligned bounds and corner squares align their stroke boundaries to physical pixels. Rotated outlines use vertex opacity ramps across a physical-pixel fringe, preserving subpixel geometry while smoothing shallow diagonals. These adjustments affect painting only. + +Move and resize snapping uses 1% of the displayed canvas's shorter side, capped at six logical pixels. Release distance is 5/3 of the entry distance. Both distances are converted to output pixels before evaluating geometry. + +Canvas and property rotation drags share `normalizeRotationDegrees`, wrapping to [-180, 180) from the fixed gesture baseline so crossing the boundary or reversing direction remains continuous. diff --git a/packages/cutdex_preview/analysis_options.yaml b/packages/cutdex_preview/analysis_options.yaml new file mode 100644 index 0000000..910ba35 --- /dev/null +++ b/packages/cutdex_preview/analysis_options.yaml @@ -0,0 +1,11 @@ +analyzer: + exclude: + - build/** +include: package:flutter_lints/flutter.yaml + +linter: + rules: + unnecessary_lambdas: true + unnecessary_parenthesis: true + unnecessary_statements: true + prefer_const_constructors: true diff --git a/packages/cutdex_preview/lib/cutdex_preview.dart b/packages/cutdex_preview/lib/cutdex_preview.dart new file mode 100644 index 0000000..47fafea --- /dev/null +++ b/packages/cutdex_preview/lib/cutdex_preview.dart @@ -0,0 +1,11 @@ +/// Flutter preview resources and interactions for Cutdex. +library; + +export 'src/preview_controller.dart'; +export 'src/source_preview_controller.dart'; +export 'src/preview_transform_session.dart'; +export 'src/preview_geometry.dart'; +export 'src/preview_canvas.dart'; +export 'src/preview_interaction_overlay.dart'; +export 'src/mask_interaction_overlay.dart'; +export 'src/preview_policy.dart'; diff --git a/packages/cutdex_preview/lib/src/cleanup.dart b/packages/cutdex_preview/lib/src/cleanup.dart new file mode 100644 index 0000000..d3f630e --- /dev/null +++ b/packages/cutdex_preview/lib/src/cleanup.dart @@ -0,0 +1,16 @@ +import 'dart:async'; + +/// Release every owned resource, then report the first cleanup failure. +Future completeCleanup(List Function()> actions) async { + Object? failure; + StackTrace? trace; + for (final action in actions) { + try { + await action(); + } catch (error, stack) { + failure ??= error; + trace ??= stack; + } + } + if (failure != null) Error.throwWithStackTrace(failure, trace!); +} diff --git a/packages/cutdex_preview/lib/src/mask_interaction_overlay.dart b/packages/cutdex_preview/lib/src/mask_interaction_overlay.dart new file mode 100644 index 0000000..8ec580d --- /dev/null +++ b/packages/cutdex_preview/lib/src/mask_interaction_overlay.dart @@ -0,0 +1,353 @@ +import 'dart:async'; +import 'dart:math' as math; + +import 'package:cutdex_core/editor.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/gestures.dart'; +import 'package:flutter/services.dart'; + +import 'preview_controller.dart'; +import 'selection_decoration.dart'; +import 'preview_geometry.dart'; + +class MaskInteractionOverlay extends StatefulWidget { + const MaskInteractionOverlay({ + super.key, + required this.controller, + required this.canvasRect, + this.obscure = false, + }); + final PreviewController controller; + final Rect canvasRect; + final bool obscure; + @override + State createState() => _MaskInteractionOverlayState(); +} + +class _MaskInteractionOverlayState extends State { + final _focus = FocusNode(); + late final _label = SelectionLabel( + onChanged: () { + if (mounted) setState(() {}); + }, + ); + ClipMask? _base; + _MaskGeometry? _geometry; + Offset? _down; + int _handle = -1; + MouseCursor _cursor = SystemMouseCursors.basic; + int? _generation; + int get generation => widget.obscure + ? widget.controller.obscureEditGeneration + : widget.controller.maskEditGeneration; + void cancel() => widget.obscure + ? widget.controller.cancelObscureEdit() + : widget.controller.cancelMaskEdit(); + void _cancel() { + if (_base == null) return; + _base = null; + if (_generation == generation) { + cancel(); + } + } + + @override + void dispose() { + _label.dispose(); + final controller = widget.controller; + final generation = _generation; + final obscure = widget.obscure; + if (_base != null) { + scheduleMicrotask(() { + if (generation == + (obscure + ? controller.obscureEditGeneration + : controller.maskEditGeneration)) { + if (obscure) { + controller.cancelObscureEdit(); + } else { + controller.cancelMaskEdit(); + } + } + }); + } + _focus.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) => ListenableBuilder( + listenable: Listenable.merge([ + widget.controller, + widget.controller.positionChanges, + ]), + builder: (context, _) { + final c = widget.controller; + final id = widget.obscure + ? c.obscureEditingElement + : c.maskEditingElement; + final mask = id == null + ? null + : (widget.obscure ? c.obscureFor(id) : c.maskFor(id)); + final visual = id == null + ? null + : c.visualsForSelection({id}).firstOrNull; + if (mask == null || visual == null) { + return const SizedBox.shrink(); + } + final geometry = _MaskGeometry(visual, widget.canvasRect, c.canvas.width); + final points = geometry.handles(mask).take(4).toList(); + return Focus( + focusNode: _focus, + onFocusChange: (focused) { + if (!focused) _cancel(); + }, + onKeyEvent: (_, event) { + if (event is KeyDownEvent && + event.logicalKey == LogicalKeyboardKey.escape && + _base != null) { + _cancel(); + return KeyEventResult.handled; + } + return KeyEventResult.ignored; + }, + child: MouseRegion( + cursor: _cursor, + onHover: (event) { + final cursor = selectionCursor(points, event.localPosition); + if (cursor != _cursor) setState(() => _cursor = cursor); + }, + child: GestureDetector( + dragStartBehavior: DragStartBehavior.down, + key: widget.obscure ? const Key('obscure-interaction') : null, + behavior: HitTestBehavior.translucent, + onPanStart: c.canPlay + ? (details) { + final p = details.localPosition; + _handle = selectionResizeCorner(points, p); + if (_handle < 0 && + !widget.obscure && + selectionRotationCorner(points, p) >= 0) { + _handle = 4; + } + if (_handle < 0 && !geometry.path(mask).contains(p)) return; + _focus.requestFocus(); + _base = mask; + _geometry = geometry; + _down = p; + final preparing = widget.obscure + ? c.beginObscureEdit() + : c.beginMaskEdit(); + final started = _generation = generation; + unawaited( + preparing + .then((ready) { + if (!ready && started == generation) _cancel(); + return ready; + }) + .catchError((Object _) { + if (started == _generation && + started == generation) { + _cancel(); + } + return false; + }), + ); + } + : null, + onPanUpdate: (details) { + final base = _base; + final g = _geometry; + if (base == null || g == null || _generation != generation) { + return; + } + final p = g.local(details.localPosition); + final start = g.local(_down!); + ClipMask value; + if (_handle == 4) { + final a = math.atan2(p.dy - base.y, (p.dx - base.x) * g.aspect); + final b = math.atan2( + start.dy - base.y, + (start.dx - base.x) * g.aspect, + ); + var angle = base.rotation + (a - b) * 180 / math.pi; + if (HardwareKeyboard.instance.isShiftPressed) { + angle = (angle / 15).round() * 15.0; + } + value = base.copyWith( + rotation: normalizeRotationDegrees(angle), + ); + } else if (_handle >= 0) { + final angle = base.rotation * math.pi / 180; + final d = Offset((p.dx - base.x) * g.aspect, p.dy - base.y); + final x = d.dx * math.cos(angle) + d.dy * math.sin(angle); + final y = -d.dx * math.sin(angle) + d.dy * math.cos(angle); + value = base.copyWith( + width: (x.abs() * 2 / g.aspect).clamp( + ClipMask.minExtent, + widget.obscure + ? ClipObscureAnimation.maxExtent + : ClipMask.maxExtent, + ), + height: (y.abs() * 2).clamp( + ClipMask.minExtent, + widget.obscure + ? ClipObscureAnimation.maxExtent + : ClipMask.maxExtent, + ), + ); + } else { + value = base.copyWith( + x: (base.x + p.dx - start.dx).clamp( + ClipMask.minPosition, + ClipMask.maxPosition, + ), + y: (base.y + p.dy - start.dy).clamp( + ClipMask.minPosition, + ClipMask.maxPosition, + ), + ); + } + if (widget.obscure) { + c.updateObscure(value); + } else { + c.updateMask(value); + } + }, + onPanEnd: (_) { + if (_base != null) { + _base = null; + if (_generation == generation) { + if (widget.obscure) { + c.endObscureEdit(); + } else { + c.endMaskEdit(); + } + } + } + }, + onPanCancel: _cancel, + child: CustomPaint( + painter: _MaskPainter( + geometry, + mask, + MediaQuery.devicePixelRatioOf(context), + _label, + ), + size: Size.infinite, + ), + ), + ), + ); + }, + ); +} + +class _MaskGeometry { + _MaskGeometry(PreviewVisual visual, Rect canvas, double canvasWidth) { + final scale = canvas.width / canvasWidth; + outputScale = scale; + final corners = visual.geometry.corners; + origin = canvas.topLeft + corners[0] * scale; + xAxis = (corners[1] - corners[0]) * scale; + yAxis = (corners[3] - corners[0]) * scale; + aspect = + (visual.geometry.size.width / visual.transform.scale) / + (visual.geometry.size.height / visual.transform.scaleY); + } + late final Offset origin, xAxis, yAxis; + late final double aspect, outputScale; + Offset project(Offset p) => origin + xAxis * p.dx + yAxis * p.dy; + Offset local(Offset p) { + final d = p - origin; + final det = xAxis.dx * yAxis.dy - xAxis.dy * yAxis.dx; + if (det.abs() < 1e-9) return const Offset(.5, .5); + return Offset( + (d.dx * yAxis.dy - d.dy * yAxis.dx) / det, + (xAxis.dx * d.dy - xAxis.dy * d.dx) / det, + ); + } + + Offset point(ClipMask mask, double x, double y) { + final angle = mask.rotation * math.pi / 180; + final dx = x * mask.width * aspect, dy = y * mask.height; + return project( + Offset( + mask.x + (dx * math.cos(angle) - dy * math.sin(angle)) / aspect, + mask.y + dx * math.sin(angle) + dy * math.cos(angle), + ), + ); + } + + List handles(ClipMask mask) { + return [ + point(mask, -.5, -.5), + point(mask, .5, -.5), + point(mask, .5, .5), + point(mask, -.5, .5), + ]; + } + + Path path(ClipMask mask) { + final points = mask.shape == ClipMaskShape.ellipse + ? [ + for (var i = 0; i < 96; i++) + point( + mask, + math.cos(i * math.pi / 48) / 2, + math.sin(i * math.pi / 48) / 2, + ), + ] + : handles(mask).take(4).toList(); + return Path()..addPolygon(points, true); + } +} + +class _MaskPainter extends CustomPainter { + _MaskPainter(this.geometry, this.mask, this.devicePixelRatio, this.label) + : labelRevision = label.revision; + final int labelRevision; + final SelectionLabel label; + final _MaskGeometry geometry; + final ClipMask mask; + final double devicePixelRatio; + @override + void paint(Canvas canvas, Size size) { + final corners = geometry.handles(mask); + if (mask.shape == ClipMaskShape.ellipse) { + canvas.drawPath( + geometry.path(mask), + Paint() + ..color = selectionBlue + ..style = PaintingStyle.stroke + ..strokeWidth = 1, + ); + } + paintSelectionDecoration( + canvas, + corners, + devicePixelRatio: devicePixelRatio, + labelLayout: label, + dimensions: Size( + (corners[1] - corners[0]).distance / geometry.outputScale, + (corners[3] - corners[0]).distance / geometry.outputScale, + ), + ); + } + + @override + bool shouldRepaint(covariant _MaskPainter oldDelegate) => + labelRevision != oldDelegate.labelRevision || + devicePixelRatio != oldDelegate.devicePixelRatio || + geometry.origin != oldDelegate.geometry.origin || + geometry.xAxis != oldDelegate.geometry.xAxis || + geometry.yAxis != oldDelegate.geometry.yAxis || + geometry.aspect != oldDelegate.geometry.aspect || + geometry.outputScale != oldDelegate.geometry.outputScale || + mask.shape != oldDelegate.mask.shape || + mask.x != oldDelegate.mask.x || + mask.y != oldDelegate.mask.y || + mask.width != oldDelegate.mask.width || + mask.height != oldDelegate.mask.height || + mask.rotation != oldDelegate.mask.rotation; +} diff --git a/packages/cutdex_preview/lib/src/preview_canvas.dart b/packages/cutdex_preview/lib/src/preview_canvas.dart new file mode 100644 index 0000000..8f0347b --- /dev/null +++ b/packages/cutdex_preview/lib/src/preview_canvas.dart @@ -0,0 +1,66 @@ +import 'package:flutter/material.dart'; + +/// Fits the output canvas within the workspace; native rendering fits media +/// within this canvas using its own source geometry (including rotation). +class PreviewCanvas extends StatelessWidget { + const PreviewCanvas({ + super.key, + required this.aspectRatio, + required this.child, + this.overlayBuilder, + this.horizontalPadding = 16, + this.alignment = Alignment.topCenter, + this.backgroundColor = Colors.black, + }); + + final double aspectRatio; + final double horizontalPadding; + final Alignment alignment; + final Color backgroundColor; + final Widget child; + final Widget Function(Rect canvasRect)? overlayBuilder; + + @override + Widget build(BuildContext context) => RepaintBoundary( + child: ColoredBox( + key: const Key('preview-surface'), + color: Theme.of(context).colorScheme.surface, + child: LayoutBuilder( + builder: (context, constraints) { + final available = Size( + (constraints.maxWidth - horizontalPadding * 2).clamp( + 0, + double.infinity, + ), + constraints.maxHeight, + ); + final fitted = applyBoxFit( + BoxFit.contain, + Size(aspectRatio, 1), + available, + ).destination; + final rect = alignment.inscribe( + fitted, + Offset.zero & constraints.biggest, + ); + return Stack( + fit: StackFit.expand, + clipBehavior: Clip.hardEdge, + children: [ + Positioned.fromRect( + rect: rect, + child: ColoredBox( + key: const Key('preview-canvas'), + color: backgroundColor, + child: ClipRect(child: child), + ), + ), + if (overlayBuilder != null && rect.width > 0 && rect.height > 0) + Positioned.fill(child: overlayBuilder!(rect)), + ], + ); + }, + ), + ), + ); +} diff --git a/packages/cutdex_preview/lib/src/preview_canvas_editing.dart b/packages/cutdex_preview/lib/src/preview_canvas_editing.dart new file mode 100644 index 0000000..67d6e97 --- /dev/null +++ b/packages/cutdex_preview/lib/src/preview_canvas_editing.dart @@ -0,0 +1,67 @@ +part of 'preview_controller.dart'; + +enum PreviewCanvasEditMode { mask, obscure, distortion } + +/// A single canvas tool owns a clip until release, explicit selection change or removal. +@immutable +class PreviewCanvasEditing { + const PreviewCanvasEditing({ + required this.mode, + required this.element, + this.owner, + this.perspective = false, + }); + + final PreviewCanvasEditMode mode; + final ElementId element; + final Object? owner; + final bool perspective; +} + +extension on PreviewController { + ElementId? _editingElement(PreviewCanvasEditMode mode) => + _canvasEditing?.mode == mode ? _canvasEditing?.element : null; + + void _setCanvasEditing( + PreviewCanvasEditMode mode, + ElementId? element, { + Object? owner, + bool perspective = false, + }) { + if (_closed) return; + final current = _canvasEditing; + if (element == null) { + if (current?.mode != mode) return; + } else if (current?.mode == mode && + current?.element == element && + identical(current?.owner, owner) && + current?.perspective == perspective) { + return; + } + // Invalidate preparation and discard pending gestures before changing tools. + cancelTransform(); + _selectedMaskId = null; + _canvasEditing = element == null + ? null + : PreviewCanvasEditing( + mode: mode, + element: element, + owner: owner, + perspective: perspective, + ); + if (element != null) selectVisual(element); + _notify(); + } + + void _releaseCanvasEditing(PreviewCanvasEditMode mode, Object owner) { + if (_canvasEditing?.mode == mode && + identical(_canvasEditing?.owner, owner)) { + _setCanvasEditing(mode, null); + } + } + + void _clearCanvasEditing() { + _canvasEditing = null; + _selectedMaskId = null; + } +} diff --git a/packages/cutdex_preview/lib/src/preview_controller.dart b/packages/cutdex_preview/lib/src/preview_controller.dart new file mode 100644 index 0000000..8e204e0 --- /dev/null +++ b/packages/cutdex_preview/lib/src/preview_controller.dart @@ -0,0 +1,1779 @@ +import 'package:cutdex_core/execution.dart'; + +import 'dart:async'; +import 'dart:math' as math; + +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/painting.dart'; + +import 'cleanup.dart'; +import 'preview_geometry.dart'; +import 'preview_policy.dart'; +import 'preview_transform_session.dart'; + +part 'preview_obscure_edit.dart'; +part 'preview_canvas_editing.dart'; + +const _tracePreviewEnabled = bool.fromEnvironment('CUTDEX_PREVIEW_TRACE'); + +void _tracePreview(String stage, int tick) { + if (!_tracePreviewEnabled) return; + debugPrint( + 'CUTDEX_PREVIEW ${DateTime.now().millisecondsSinceEpoch} dart $stage $tick', + ); +} + +/// Owns preview resources; the editor coordinates the single execution writer. +class PreviewController extends ChangeNotifier + implements EditorPreviewService, EditorAlignmentService { + PreviewController({ + required this.timeline, + required this.runtime, + required this.activeSequence, + required this.viewForSequence, + this.policy = const PreviewPolicy(), + }); + final EditorSession timeline; + + /// Selection belongs to the host. Notify the editor when it changes. + final SequenceId? Function() activeSequence; + final TimelineViewController Function(SequenceId) viewForSequence; + final PreviewPolicy policy; + final CutdexRuntime runtime; + PreviewCanvasEditing? _canvasEditing; + PreviewCanvasEditing? get canvasEditing => _canvasEditing; + ClipMask? _pendingObscure; + TimelineVersion? _obscureBase; + int? _obscureTick; + int _obscureGeneration = 0; + ElementId? get distortionEditingElement => + _editingElement(PreviewCanvasEditMode.distortion); + bool get distortionPerspective => _canvasEditing?.perspective ?? false; + void setDistortionEditing( + ElementId? element, { + Object? owner, + bool perspective = false, + }) => _setCanvasEditing( + PreviewCanvasEditMode.distortion, + element, + owner: owner, + perspective: perspective, + ); + + void releaseDistortionEditing(Object owner) => + _releaseCanvasEditing(PreviewCanvasEditMode.distortion, owner); + + ElementId? get maskEditingElement => + _editingElement(PreviewCanvasEditMode.mask); + ClipMask? _pendingMask; + TimelineVersion? _maskBase; + int? _maskTick; + int _maskEpoch = 0; + int _maskEditGeneration = 0; + int get maskEditGeneration => _maskEditGeneration; + String? _selectedMaskId; + String? get selectedMaskId { + final id = maskEditingElement; + final layers = id == null + ? const [] + : maskStackFor(id)?.layers ?? const []; + return layers.any((e) => e.id == _selectedMaskId) + ? _selectedMaskId + : layers.firstOrNull?.id; + } + + void setMaskEditing(ElementId? element, {Object? owner}) => + _setCanvasEditing(PreviewCanvasEditMode.mask, element, owner: owner); + + void releaseMaskEditing(Object owner) => + _releaseCanvasEditing(PreviewCanvasEditMode.mask, owner); + + ClipMaskStack? maskStackFor(ElementId id) { + final query = + (_view?.keyframePreviewVersion ?? _view?.version.kernelVersion) + ?.query(); + final handle = query?.elementById(id); + if (query == null || handle == null) return null; + return ClipMaskStack( + query.element(handle), + positionTick - query.absoluteStart(handle), + ); + } + + ClipMaskAnimation? maskAnimation(ElementId id) { + final stack = maskStackFor(id); + if (stack == null) return null; + final maskId = id == maskEditingElement + ? selectedMaskId + : stack.layers.firstOrNull?.id; + if (maskId == null) return null; + return ClipMaskAnimation(stack.record, stack.localTick, maskId: maskId); + } + + Map _maskValuesFor(ElementId id) { + final stack = maskStackFor(id); + return { + ...?stack?.values, + if (id == maskEditingElement && + _pendingMask != null && + selectedMaskId != null) + for (final entry in _pendingMask!.values.entries) + RenderMaskTarget(selectedMaskId!, entry.key).parameterId: entry.value, + }; + } + + void selectMask(String id) { + if (maskEditingElement == null || + !maskStackFor(maskEditingElement!)!.layers.any((e) => e.id == id)) { + return; + } + cancelMaskEdit(); + _selectedMaskId = id; + _notify(); + } + + void addMask(ClipMaskShape shape) { + if (maskEditingElement == null || !canPlay) { + return; + } + cancelMaskEdit(); + final id = timeline.commands.newMaskId(); + _selectedMaskId = id; + _publishMaskEdit( + () => timeline.commands.addMask( + sequence: activeSequence()!, + clip: maskEditingElement!, + tick: positionTick, + maskId: id, + shape: shape, + ), + ); + _notify(); + } + + void removeMask(String id) { + if (maskEditingElement == null) return; + cancelMaskEdit(); + final stack = maskStackFor(maskEditingElement!)!; + final layers = stack.layers; + final index = layers.indexWhere((e) => e.id == id); + if (index < 0) return; + layers.removeAt(index); + _selectedMaskId = layers.isEmpty + ? null + : layers[index.clamp(0, layers.length - 1)].id; + _editMaskCommand(MaskAction.remove, maskId: id); + _notify(); + } + + void configureMask(String id, {bool? enabled, ClipMaskMode? mode}) { + if (maskEditingElement == null || + !maskStackFor(maskEditingElement!)!.layers.any((e) => e.id == id)) { + return; + } + cancelMaskEdit(); + _publishMaskEdit( + () => timeline.commands.applyEdit( + activeSequence()!, + EditMask( + clipId: maskEditingElement!.value, + at: CommandTime(positionTick, TimelineClock.ticksPerSecond), + action: MaskAction.set, + maskId: id, + enabled: enabled, + mode: mode == null ? null : MaskMode.values.byName(mode.name), + ), + ), + ); + _notify(); + } + + void reorderMasks(List ids) { + if (maskEditingElement == null) return; + cancelMaskEdit(); + _editMaskCommand(MaskAction.reorder, maskIds: ids); + _notify(); + } + + ClipMask? maskFor(ElementId id) => + id == maskEditingElement && _pendingMask != null + ? _pendingMask + : maskAnimation(id)?.value; + + Future beginMaskEdit() async { + final id = maskEditingElement; + if (id == null || selectedMaskId == null || !canPlay || _view == null) { + return false; + } + if (!_nativeVisuals.any((visual) => visual.elementId == id)) return false; + if (transforms.hasPending || _keyframePreviewing) cancelTransform(); + _maskBase = _view!.version.kernelVersion; + _maskEditGeneration++; + _maskTick = positionTick; + _pendingMask = maskAnimation(id)?.value; + return _prepareMaskContext(); + } + + Future _prepareMaskContext() async { + final epoch = _maskEpoch; + final contextReady = await transforms.ensureContext(); + if (!contextReady || _closed || epoch != _maskEpoch) { + if (!_closed && epoch == _maskEpoch) cancelTransform(); + return false; + } + _renderMask(); + return true; + } + + void updateMask(ClipMask value) { + if (_maskBase == null || !value.isValid) return; + _pendingMask = value; + _renderMask(); + _notify(); + } + + /// Discrete controls use the same frame and publication lifecycle as drags. + void applyMask(ClipMask value) { + if (!value.isValid) throw ArgumentError('Invalid mask'); + final preparation = beginMaskEdit(); + final epoch = _maskEpoch; + unawaited( + preparation.catchError((Object error, StackTrace stack) { + if (!_closed && epoch == _maskEpoch) { + cancelTransform(); + _fail(error, stack); + } + return false; + }), + ); + updateMask(value); + endMaskEdit(); + } + + void _renderMask() { + final id = maskEditingElement; + if (id == null || _transformHandle == null) return; + final visual = visualForProperties(id); + if (visual != null) _updateTransform(id, visual.transform, () {}); + } + + void _editMaskCommand( + MaskAction action, { + String? maskId, + List maskIds = const [], + }) { + final id = maskEditingElement; + if (id == null || _view == null) return; + _publishMaskEdit( + () => timeline.commands.applyEdit( + activeSequence()!, + EditMask( + clipId: id.value, + at: CommandTime(positionTick, TimelineClock.ticksPerSecond), + action: action, + maskId: maskId, + maskIds: maskIds, + ), + ), + ); + } + + void toggleMaskKeys(List channels) { + final id = maskEditingElement; + final maskId = selectedMaskId; + if (id == null || maskId == null) return; + _publishMaskEdit( + () => timeline.commands.editKeyframeChannel( + sequence: activeSequence()!, + clip: id, + tick: positionTick, + parameterIds: [ + for (final channel in channels) + RenderMaskTarget(maskId, channel).parameterId, + ], + ), + ); + } + + /// Keeps the native frame lifecycle around a shared business operation. + void _publishMaskEdit(void Function() edit) { + final id = maskEditingElement; + if (id == null || _view == null) return; + if (!_nativeTransforming && + canPlay && + _nativeVisuals.any((visual) => visual.elementId == id)) { + unawaited(_prepareMaskContext()); + } + if (_nativeTransforming) { + _publishInteractiveParameters(edit); + } else { + edit(); + } + _renderMask(); + } + + void endMaskEdit() { + final id = maskEditingElement; + final value = _pendingMask; + final base = _maskBase; + try { + if (id != null && + value != null && + identical(base, _view?.version.kernelVersion) && + _maskTick == positionTick) { + final maskId = selectedMaskId; + if (maskId != null) { + _publishMaskEdit( + () => timeline.commands.setMask( + sequence: activeSequence()!, + clip: id, + tick: positionTick, + maskId: maskId, + value: value, + ), + ); + } + } + } finally { + cancelMaskEdit(); + } + } + + /// Restore authored values while retaining the shared frozen frame. + void cancelMaskEdit() { + _maskEditGeneration++; + _maskBase = null; + _pendingMask = null; + _maskTick = null; + _renderMask(); + _notify(); + } + + bool _aspectRatioLocked = true; + bool get aspectRatioLocked => _aspectRatioLocked; + void setAspectRatioLocked(bool value) { + if (_aspectRatioLocked == value || transforms.hasPending) return; + _aspectRatioLocked = value; + notifyListeners(); + } + + RuntimeSession? _session; + RuntimeSession? get session => _session; + EditorExecution? _execution; + StreamSubscription? _events; + TimelineViewController? _view; + TimelineVersion? _version; + bool _keyframePreviewing = false; + int _keyframePreviewEpoch = 0; + ProjectCanvas? _compiledCanvas; + Map? _compiledSettings; + ProjectCanvas get canvas => timeline.canvas; + void setCanvas(ProjectCanvas value) { + _invalidateTransform(); + _deferredTransformSync = false; + timeline.commands.setCanvas(value); + } + + final _videoSizes = >{}; + final _videoTrackIds = >{}; + final _evaluator = ExecutionEvaluator(); + bool _supportsImageProbe = false; + final _unavailableAssets = {}; + + bool get hasUnavailableMedia => timeline.unavailableAssets.isNotEmpty; + + List get unavailableAtPlayhead { + final applied = _execution?.applied; + if (applied == null) return const []; + final tick = durationTick > 0 && positionTick >= durationTick + ? durationTick - 1 + : positionTick; + final seconds = tick / TimelineClock.ticksPerSecond; + final query = applied.input.version.query(); + final names = {}; + for (final occurrence in applied.unavailableMedia) { + final range = occurrence.timelineRange; + if (seconds < range.start.seconds || + seconds >= range.start.seconds + range.duration.seconds) { + continue; + } + final handle = query.elementById(occurrence.elementId); + if (handle != null) { + names.add(query.element(handle).name ?? occurrence.elementId.value); + } + } + return List.unmodifiable(names); + } + + final _transformInitial = {}; + RuntimeInteractiveTransform? _transformHandle; + Future? _transformPending; + Future? _transformCleanup; + Object? _transformFailure; + int _transformEpoch = 0; + TimelineVersion? _transformBase; + SequenceId? _transformSequence; + bool _deferredTransformSync = false; + bool get _nativeTransforming => _transformBase != null; + bool get transforming => + _nativeTransforming || + transforms.hasPending || + _maskBase != null || + _obscureBase != null; + bool _committingTransform = false; + late final PreviewTransformSession transforms = PreviewTransformSession( + canBegin: () => !_closed && canPlay, + select: selectVisual, + prepareNative: _beginTransform, + updateNative: _updateTransform, + commit: _commitTransform, + cancelNative: _cancelNativeTransform, + failed: _fail, + changed: _notify, + ); + + Set get selectedVisualIds { + final view = _view; + if (view == null) return const {}; + final query = view.version.kernelVersion.query(); + return { + for (final identity in view.selectedIdentities) + if (view.elementForIdentity(identity) case final handle?) + if (query.ownerOf(handle) != null) query.element(handle).id, + }; + } + + void selectVisual(ElementId? id) { + if (_canvasEditing != null && id != _canvasEditing!.element) { + _clearCanvasEditing(); + cancelTransform(); + } + final view = _view; + final sequence = activeSequence(); + if (view == null || sequence == null) return; + final query = view.version.kernelVersion.query(); + final handle = id == null ? null : query.elementById(id); + view.setSelection([ + if (handle != null) + if (timeline.captionComponentFor(sequence, handle) + case final component?) + component + else if (query.connectionForTarget(handle) != null) + LayoutBodyId.element(handle) + else + handle, + ]); + _notify(); + } + + Future _beginTransform() async { + if (_closed || !canPlay || _nativeTransforming || _view == null) { + return false; + } + final initial = _nativeVisuals; + if (initial.isEmpty) return false; + final epoch = ++_transformEpoch; + final revision = _execution!.state.executionRevision!; + _transformBase = _view!.version.kernelVersion; + _transformSequence = activeSequence(); + _transformInitial.addEntries(initial.map((v) => MapEntry(v.elementId, v))); + _transformFailure = null; + final cleanup = _transformCleanup; + final pending = _transformPending = () async { + await cleanup; + await _seekWorker; + if (_closed || epoch != _transformEpoch) return null; + await pauseForCanvasInteraction(); + if (_closed || epoch != _transformEpoch) return null; + final handle = await session!.beginInteractiveTransform( + revision: revision, + ); + if (_closed || epoch != _transformEpoch) { + await _sync; + await handle.close(); + return null; + } + return handle; + }(); + try { + final handle = await pending; + if (epoch != _transformEpoch || handle == null) return false; + _transformHandle = handle; + return true; + } catch (_) { + if (epoch == _transformEpoch) _cancelNativeTransform(); + rethrow; + } + } + + void _updateTransform( + ElementId id, + ClipTransform value, + VoidCallback onRendered, + ) { + if (!_nativeTransforming || _closed) return; + if (!value.isValid) { + throw ArgumentError('Invalid canvas transform'); + } + if (!identical(_transformBase, _view?.version.kernelVersion) || + _transformSequence != activeSequence()) { + cancelTransform(); + return; + } + final initial = _transformInitial[id]; + if (initial == null) throw StateError('Layer is not in the frozen frame'); + final handle = _transformHandle; + if (handle == null) return; + final epoch = _transformEpoch; + unawaited( + handle + .update( + layerId: initial.layerId, + x: value.x - initial.transform.x, + y: initial.transform.y - value.y, + scale: value.scale / initial.transform.scale, + scaleY: value.scaleY / initial.transform.scaleY, + rotation: value.rotation - initial.transform.rotation, + cornerRadius: value.cornerRadius, + cornerRadii: value.cornerRadii, + distortion: value.distortion.values, + mask: _maskValuesFor(id), + obscure: _obscureValuesFor(id), + onRendered: () { + if (!_closed && epoch == _transformEpoch) { + onRendered(); + } + }, + ) + .catchError((Object e, StackTrace stack) { + if (epoch == _transformEpoch) { + _transformFailure = e; + _fail(e, stack); + } + }), + ); + } + + void _commitTransform(ElementId element, ClipTransform value) { + if (_closed || + !_nativeTransforming || + !identical(_transformBase, _view?.version.kernelVersion) || + _transformSequence != activeSequence()) { + throw StateError('Transform context is no longer current'); + } + if (_transformFailure case final failure?) throw failure; + final sequence = _transformSequence!; + final frame = TimelineClock.standard.toTicks( + timeline.persistence.timeline(sequence).format.frameDuration, + ); + final tick = durationTick > 0 && positionTick >= durationTick + ? ((durationTick - 1) ~/ frame) * frame + : positionTick; + _publishInteractiveParameters(() { + timeline.commands.setTransform( + sequence: sequence, + clip: element, + tick: tick, + change: (_) => value, + ); + }); + _notify(); + } + + /// Keep the frozen frame across authored edits; synchronize on context exit. + void _publishInteractiveParameters(VoidCallback publish) { + _committingTransform = true; + try { + publish(); + _transformBase = _view!.version.kernelVersion; + _timelineChanged(); + } finally { + _committingTransform = false; + } + } + + void _resetTransform() { + _transformEpoch++; + _transformBase = null; + _transformSequence = null; + _transformInitial.clear(); + _transformHandle = null; + _transformPending = null; + _transformFailure = null; + } + + void cancelTransform() { + _invalidateTransform(); + if (_deferredTransformSync && !_closed) { + _deferredTransformSync = false; + _sync = _synchronize(); + } + } + + void _invalidateTransform() { + _obscureGeneration++; + _pendingObscure = null; + _obscureBase = null; + _obscureTick = null; + _maskEditGeneration++; + _maskEpoch++; + _pendingMask = null; + _maskBase = null; + _maskTick = null; + _keyframePreviewing = false; + _keyframePreviewEpoch++; + transforms.cancelAll(); + } + + void _cancelNativeTransform() { + if (!_nativeTransforming) return; + final pending = _transformPending; + final cleanup = _transformCleanup; + _resetTransform(); + _transformCleanup = () async { + await cleanup; + try { + // Defer one turn so the caller can install the authoritative sync. + await Future.value(); + await _sync; + await (await pending)?.close(); + } catch (_) { + /* Preparation already failed. */ + } + }(); + _notify(); + } + + List get visuals => + transforms.project(_nativeVisuals, Size(canvas.width, canvas.height)); + + List get _nativeVisuals { + return _visualsAt(); + } + + /// Visible selected occurrences, without evaluating unrelated layers. + List visualsForSelection(Set elements) { + if (elements.isEmpty) return const []; + final result = [ + for (final element in elements) + ..._visualsAt(element: element, clampToClip: false), + ]..sort((a, b) => a.lane.compareTo(b.lane)); + return transforms.project(result, Size(canvas.width, canvas.height)); + } + + CompiledExecution? _geometryExecution; + final _layersByElement = >{}; + (int, double, double)? _geometryFrame; + final _frameVisuals = <(String, bool), PreviewVisual?>{}; + final _textBounds = + <(String, double, double, double, double, double), Rect>{}; + + bool _observingFonts = false; + + void _fontsChanged() { + _textBounds.clear(); + _geometryFrame = null; + if (!_closed) _notify(); + } + + /// Resolve an offscreen clip at its nearest frame without seeking the player. + PreviewVisual? visualForProperties(ElementId element) { + final result = transforms.project( + _visualsAt(element: element), + Size(canvas.width, canvas.height), + ); + return result.isEmpty ? null : result.first; + } + + List _visualsAt({ + ElementId? element, + int? atTick, + bool clampToClip = true, + }) { + final applied = _execution?.applied; + if (applied == null || _view == null) return const []; + final query = applied.input.version.query(); + final frame = TimelineClock.standard.toTicks( + applied.input.timeline.format.frameDuration, + ); + final tick = + atTick ?? + (durationTick > 0 && positionTick >= durationTick + ? ((durationTick - 1) ~/ frame) * frame + : positionTick); + // Authored edits may precede native acknowledgement. Only the applied + // execution can invalidate the geometry used for the displayed frame. + if (!identical(_geometryExecution, applied)) { + _geometryExecution = applied; + _layersByElement.clear(); + for (final layer in applied.plan.visualLayers) { + final id = applied.visualElements[layer.id]; + if (id != null) { + (_layersByElement[id] ??= []).add(layer); + } + } + _geometryFrame = null; + } + final frameKey = (tick, canvas.width, canvas.height); + if (_geometryFrame != frameKey) { + _geometryFrame = frameKey; + _frameVisuals.clear(); + } + final time = tick / TimelineClock.ticksPerSecond; + final result = []; + final layers = element == null + ? applied.plan.visualLayers + : _layersByElement[element] ?? const []; + final clamped = element != null && atTick == null && clampToClip; + for (final layer in layers) { + final cacheKey = (layer.id, clamped); + if (_frameVisuals.containsKey(cacheKey)) { + final cached = _frameVisuals[cacheKey]; + if (cached != null) result.add(cached); + continue; + } + _frameVisuals[cacheKey] = null; + final id = applied.visualElements[layer.id]; + final sizes = _videoSizes[layer.mediaId]; + final local = !clamped + ? time - layer.timelineRange.start.seconds + : (time - layer.timelineRange.start.seconds).clamp( + 0.0, + math.max(0.0, layer.timelineRange.duration.seconds - 1e-9), + ); + if (id == null || + local < 0 || + local >= layer.timelineRange.duration.seconds || + layer.opacity == 0) { + continue; + } + int? selected; + if (sizes != null) { + try { + selected = layer.trackSelection.resolveIndex( + _videoTrackIds[layer.mediaId] ?? const [], + ); + } on ArgumentError { + continue; + } + } + final source = + layer.text?.canvas ?? + (sizes != null && selected != null && selected < sizes.length + ? RenderSize(sizes[selected].width, sizes[selected].height) + : null); + if (source == null) continue; + final handle = query.elementById(id); + if (handle == null) continue; + final record = query.element(handle); + double authored(String id, double fallback) { + if (record.parameters?[id] == null) return fallback; + final target = ClipTransform.targets[id]; + final curve = layer.automation + .where((a) => a.target == target) + .lastOrNull; + return curve == null + ? fallback + : _evaluator.valueAt(curve, local.toDouble()); + } + + final transform = ClipTransform( + x: authored('canvas.position.x', 0), + y: -authored('canvas.position.y', 0), + scale: authored('canvas.scale.x', 1), + scaleY: authored('canvas.scale.y', 1), + rotation: authored('canvas.rotation', 0), + distortion: ClipDistortion.fromValues([ + for (final id in ClipDistortion.ids) authored(id, 0), + ]).constrained(), + cornerRadius: authored('canvas.cornerRadius', 0), + topLeftRadius: authored( + 'canvas.cornerRadius.topLeft', + authored('canvas.cornerRadius', 0), + ), + topRightRadius: authored( + 'canvas.cornerRadius.topRight', + authored('canvas.cornerRadius', 0), + ), + bottomRightRadius: authored( + 'canvas.cornerRadius.bottomRight', + authored('canvas.cornerRadius', 0), + ), + bottomLeftRadius: authored( + 'canvas.cornerRadius.bottomLeft', + authored('canvas.cornerRadius', 0), + ), + ); + var geometry = _evaluator.visualAt( + layer, + seconds: layer.timelineRange.start.seconds + local, + source: source, + canvas: RenderSize(canvas.width, canvas.height), + ); + if (layer.text case final text?) { + geometry = _tightTextGeometry(geometry, text); + } + if (geometry.opacity <= 0.001) continue; + final visual = PreviewVisual( + layerId: layer.id, + elementId: id, + lane: layer.lane, + transform: transform, + geometry: PreviewGeometry.fromExecution(geometry), + ); + _frameVisuals[cacheKey] = visual; + result.add(visual); + } + result.sort((a, b) => a.lane.compareTo(b.lane)); + return result; + } + + ExecutionVisualGeometry _tightTextGeometry( + ExecutionVisualGeometry geometry, + RenderText text, + ) { + final key = ( + text.text, + text.fontSize, + text.canvas.width, + text.canvas.height, + text.padding, + text.strokeWidth, + ); + final cached = _textBounds[key]; + if (cached != null) { + return geometry.sourceRect( + left: cached.left, + top: cached.top, + width: cached.width, + height: cached.height, + ); + } + final inset = text.padding + text.strokeWidth / 2; + final layoutWidth = math.max(1.0, text.canvas.width - inset * 2); + final painter = TextPainter( + text: TextSpan( + text: text.text, + style: TextStyle(fontSize: text.fontSize), + ), + textDirection: TextDirection.ltr, + textAlign: TextAlign.center, + )..layout(maxWidth: layoutWidth); + final lines = painter.computeLineMetrics(); + final width = math.min( + text.canvas.width, + (lines.map((line) => line.width).fold(0.0, math.max) + inset * 2) + .ceilToDouble(), + ); + final height = math.min( + text.canvas.height, + (painter.height + inset * 2).ceilToDouble(), + ); + painter.dispose(); + // Keep only scalar bounds; no paragraph resources survive a measurement. + if (_textBounds.length >= 128) _textBounds.remove(_textBounds.keys.first); + _textBounds[key] = Rect.fromLTWH( + (text.canvas.width - width) / 2, + 0, + math.max(1, width), + math.max(1, height), + ); + return geometry.sourceRect( + left: (text.canvas.width - width) / 2, + top: 0, + width: math.max(1, width), + height: math.max(1, height), + ); + } + + bool _closed = false; + Future? _closing; + Future _sync = Future.value(); + Future? _seekWorker; + int? _pendingSeek; + bool _scrubbingIntent = false; + bool _nativeSkimming = false; + int _tick = 0; + int _durationTick = 0; + int _generation = 0; + bool _updatingPlayhead = false; + bool _restorePlayhead = true; + bool _supportsToneMapping = false; + final _mediaInfo = >{}; + final _videoColors = >{}; + List? videoColorSpaces(String assetId) => + _videoColors[assetId]; + bool _ready = false; + bool get ready => _ready; + bool _busy = true; + bool get busy => _busy; + bool _playing = false; + bool get playing => _playing; + Object? _error; + Object? get error => _error; + int get positionTick => _view?.playheadTick ?? 0; + int get durationTick => _durationTick; + RationalTime get frameDuration { + final sequence = activeSequence(); + return sequence == null + ? TimelineFormat.fps30.frameDuration + : timeline.persistence.timeline(sequence).format.frameDuration; + } + + bool get canPlay => + !_closed && ready && !busy && _error == null && durationTick > 0; + + @override + Future alignedTransform( + SequenceId sequence, + AlignClip command, + ) async { + await _sync; + if (_closed || + activeSequence() != sequence || + !ready || + busy || + error != null || + transforms.hasPending || + _execution?.applied == null) { + throw const CommandRejected( + 'previewNotReady', + 'Alignment requires a settled active preview', + ); + } + if (!identical( + _execution!.applied!.input.version, + timeline.persistence.timeline(sequence).current, + )) { + throw const CommandRejected( + 'staleVersion', + 'Preview geometry is out of date', + ); + } + final tick = TimelineClock.standard.toTicks( + RationalTime(command.at.numerator, command.at.denominator), + ); + final matches = _visualsAt( + element: ElementId(command.clipId), + atTick: tick, + ); + if (matches.length != 1) { + throw const CommandRejected( + 'unavailableGeometry', + 'Expected one visible clip occurrence at the requested time', + ); + } + return alignToCanvas( + matches.single, + Size(canvas.width, canvas.height), + command.alignment, + ); + } + + VoidCallback? _releasePreview; + @override + EditorPreviewState queryPreview(SequenceId sequence) { + if (_closed || activeSequence() != sequence) { + return const EditorPreviewState(available: false); + } + return EditorPreviewState( + available: session != null, + ready: ready, + busy: busy, + playing: playing, + failed: error != null, + hasUnavailableMedia: hasUnavailableMedia, + position: CommandTime(positionTick, TimelineClock.ticksPerSecond), + duration: CommandTime(durationTick, TimelineClock.ticksPerSecond), + presentedVideoFrameCount: session?.snapshot?.presentedVideoFrameCount, + droppedVideoFrameCount: session?.snapshot?.droppedVideoFrameCount, + maximumVideoFrameGapMs: session?.snapshot?.maximumVideoFrameGapMs, + maximumVideoFrameGapAfterFrame: + session?.snapshot?.maximumVideoFrameGapAfterFrame, + ); + } + + @override + Future controlPreview( + SequenceId sequence, + PreviewAction action, { + CommandTime? at, + }) async { + void checkSequence() { + if (_closed || activeSequence() != sequence || session == null) { + throw const CommandRejected( + 'previewUnavailable', + 'This sequence has no active preview', + ); + } + } + + checkSequence(); + if (action == PreviewAction.seek && at == null) { + throw const CommandRejected('invalidArguments', 'Seek requires a time'); + } + if (action != PreviewAction.seek && at != null) { + throw const CommandRejected( + 'invalidArguments', + 'This action does not accept a time', + ); + } + await _sync; + checkSequence(); + switch (action) { + case PreviewAction.play: + if (!canPlay) { + throw const CommandRejected( + 'previewNotReady', + 'Preview is not ready for playback', + ); + } + if (!playing) await togglePlayback(); + case PreviewAction.pause: + await _pausePlayback(force: true); + case PreviewAction.seek: + if (!ready || busy) { + throw const CommandRejected( + 'previewNotReady', + 'Preview is not ready for seeking', + ); + } + final tick = TimelineClock.standard.toTicks( + RationalTime(at!.numerator, at.denominator), + ); + if (tick > durationTick) { + throw const CommandRejected( + 'invalidTime', + 'Seek exceeds timeline duration', + ); + } + _view!.seekTo(tick); + _queueSeek(tick); + await _seekWorker; + case PreviewAction.retry: + if (busy) throw const CommandRejected('previewBusy', 'Preview is busy'); + await retry(); + } + // A UI switch during an asynchronous native operation must not be reported + // as confirmed state for the originally addressed sequence. + if (_closed || activeSequence() != sequence || error != null) { + throw StateError('Preview changed or failed during control'); + } + } + + /// Waits for the editor's queued preview work, including the final skim frame. + /// Does not issue another seek or replace an already displayed exact picture. + Future waitForPendingPreview() async { + await _sync; + while (_seekWorker != null) { + await _seekWorker; + } + } + + Future? _initializing; + Future initialize() { + if (_closed) return Future.error(StateError('Preview is closed')); + if (_initializing case final pending?) return pending; + final completion = Completer(); + _initializing = completion.future; + _initialize().then(completion.complete, onError: completion.completeError); + return completion.future; + } + + Future _initialize() async { + PaintingBinding.instance.systemFonts.addListener(_fontsChanged); + _observingFonts = true; + _releasePreview = timeline.registerPreview(this); + final capabilities = await runtime.capabilities(); + if (_closed) return; + _supportsImageProbe = + capabilities.query('media.imageProbe') == + CapabilityAvailability.available; + _supportsToneMapping = + capabilities.query('render.toneMapping') == + CapabilityAvailability.available; + if (!{ + CapabilityAvailability.available, + CapabilityAvailability.conditional, + }.contains(capabilities.query('playback.preview'))) { + throw const RuntimeException( + code: 'unsupported', + message: 'Native preview is unavailable', + ); + } + final created = await runtime.createSession(); + if (_closed) { + await created.close(); + return; + } + _session = created; + _execution = timeline.attachExecution( + target: created, + sequence: activeSequence, + defer: () => _committingTransform || _deferredTransformSync, + defaultToneMapping: policy.colorPolicy.toneMappingFor( + supportsToneMapping: _supportsToneMapping, + ), + probeMedia: _probeMedia, + supportsImageProbe: _supportsImageProbe, + unavailableAssets: () => _unavailableAssets.keys.toSet(), + unknownVideoColorSpace: policy.unknownVideoColorSpace, + ); + _events = created.events.listen(_onSnapshot, onError: _fail); + timeline.addListener(_timelineChanged); + _timelineChanged(); + await _sync; + } + + void _timelineChanged() { + if (_closed) return; + final id = activeSequence(); + if (id == null) { + _scrubbingIntent = false; + _pendingSeek = null; + final finishingSkim = _finishSkimming(); + _generation++; + _playbackIntent++; + _resumePending = false; + _view?.editingChanges.removeListener(_viewChanged); + _view = null; + _version = null; + _durationTick = 0; + _tick = 0; + _ready = false; + _busy = false; + _playing = false; + _error = null; + _deferredTransformSync = false; + _clearCanvasEditing(); + _invalidateTransform(); + // Stop the old output; editor invalidates its pending compilation. + _sync = + (finishingSkim == null + ? (session?.pause() ?? Future.value()) + : finishingSkim.then((_) => session?.pause())) + .catchError((Object error, StackTrace stack) { + if (!_closed && activeSequence() == null) _fail(error, stack); + }); + _notify(); + return; + } + final next = viewForSequence(id); + Future? finishingSkim; + if (!_committingTransform && + (transforming || transforms.hasContext || _keyframePreviewing) && + (!identical(_view, next) || + !identical(_version, next.version.kernelVersion) || + _compiledCanvas != canvas || + !identical(_compiledSettings, timeline.settings))) { + _invalidateTransform(); + _deferredTransformSync = false; + } + if (!identical(next, _view)) { + _clearCanvasEditing(); + _scrubbingIntent = false; + _pendingSeek = null; + finishingSkim = _finishSkimming(); + _view?.editingChanges.removeListener(_viewChanged); + _view = next; + _view!.editingChanges.addListener(_viewChanged); + _version = null; + _restorePlayhead = true; + _tick = next.playheadTick; + } + final effectiveVersion = next.version.kernelVersion; + if (identical(_version, effectiveVersion) && + _compiledCanvas == canvas && + identical(_compiledSettings, timeline.settings)) { + return; + } + _version = effectiveVersion; + _compiledCanvas = canvas; + _compiledSettings = timeline.settings; + if (_committingTransform) { + _deferredTransformSync = true; + return; + } + _durationTick = timeline.sequenceDurationTicks(id); + _sync = finishingSkim == null + ? _synchronize() + : finishingSkim.then((_) => _synchronize()); + } + + Future? _finishSkimming() { + if (!_nativeSkimming || session == null) return null; + _nativeSkimming = false; + final tick = _tick.clamp(0, durationTick - 1); + return session! + .endSkimming(MediaTime(tick, TimelineClock.ticksPerSecond)) + .onError((error, stack) { + if (error.code != 'cancelled') { + Error.throwWithStackTrace(error, stack); + } + }); + } + + Future _probeMedia(MediaReference media) async { + final pending = _mediaInfo.putIfAbsent( + media.uri, + () => runtime.probe(media), + ); + try { + final info = await pending; + if (_closed) return null; + _videoSizes[media.id] = [ + for (final size in info.videoDisplaySizes) + Size(size.width, size.height), + ]; + _videoTrackIds[media.id] = info.videoTrackIds; + _geometryFrame = null; + _videoColors[media.id] = info.videoColorSpaces; + return info; + } on RuntimeException catch (error) { + if (_closed) return null; + if (identical(_mediaInfo[media.uri], pending)) { + _mediaInfo.remove(media.uri); + } + if (!{ + 'resourceMissing', + 'malformedData', + 'invalidArgument', + 'failed', + }.contains(error.code)) { + rethrow; + } + _unavailableAssets[media.id] = error.code; + timeline.setUnavailableAssets(_unavailableAssets); + return null; + } + } + + Future _synchronize({ + int cancelledAttempts = 0, + int sourceFailureAttempts = 0, + }) async { + final generation = ++_generation; + _ready = false; + _busy = true; + _error = null; + _notify(); + try { + final result = await _execution!.synchronize(); + if (_closed || + generation != _generation || + result.disposition == ExecutionSyncDisposition.superseded) { + return; + } + _ready = true; + _error = null; + // Native observations can precede the method reply that confirms their + // revision. Reconcile the retained observation once that revision is known. + if (session?.snapshot case final snapshot?) _onSnapshot(snapshot); + // Plan updates preserve the native clock. Restore the editor position + // only when binding another sequence or recovering a failed operation. + if (ready && _restorePlayhead) { + _restorePlayhead = false; + if (durationTick > 0) _queueSeek(positionTick); + } + } catch (e, stack) { + if (generation == _generation && !_closed) { + if (e is RuntimeException && + e.code == 'cancelled' && + cancelledAttempts < 2) { + await _synchronize( + cancelledAttempts: cancelledAttempts + 1, + sourceFailureAttempts: sourceFailureAttempts, + ); + return; + } + final asset = e is RuntimeException ? e.details['mediaID'] : null; + final recoverableSourceFailure = + asset is String && + timeline.assetUris.containsKey(asset) && + e is RuntimeException && + e.details['sourceFailure'] == 'true' && + { + 'resourceMissing', + 'malformedData', + 'invalidArgument', + 'failed', + }.contains(e.code); + // A newly authorized external file can become readable between native + // source creation and the failed load reply. Retry the complete plan + // once before caching the asset as unavailable. + if (recoverableSourceFailure && sourceFailureAttempts < 1) { + await _synchronize(sourceFailureAttempts: sourceFailureAttempts + 1); + return; + } + if (asset is String && + timeline.assetUris.containsKey(asset) && + !_unavailableAssets.containsKey(asset) && + recoverableSourceFailure) { + _unavailableAssets[asset] = e.code; + timeline.setUnavailableAssets(_unavailableAssets); + await _synchronize(); + } else { + _fail(e, stack); + } + } + } finally { + if (generation == _generation) { + _busy = false; + _notify(); + } + } + } + + void _viewChanged() { + if (_closed || _updatingPlayhead) return; + _timelineChanged(); + final editing = _canvasEditing; + final selection = editing == null ? const {} : selectedVisualIds; + // History may clear timeline selection. The tool's owner retains its binding; + // explicit canvas deselection, selecting another clip or removal ends it. + if (editing != null && + (_view?.version.kernelVersion.query().elementById(editing.element) == + null || + (selection.isNotEmpty && !selection.contains(editing.element)))) { + _clearCanvasEditing(); + cancelTransform(); + } + final tick = positionTick; + final scrubbing = _view?.isScrubbing ?? false; + if (tick == _tick && scrubbing == _scrubbingIntent) { + _updateKeyframePreview(); + _notify(); + return; + } + if (transforming || _keyframePreviewing) cancelTransform(); + _tick = tick; + _scrubbingIntent = scrubbing; + if (durationTick > 0) { + _queueSeek(tick); + } + _updateKeyframePreview(); + _notify(); + } + + void _updateKeyframePreview() { + final view = _view; + if (view == null || !view.isDraggingKeyframe) { + if (_keyframePreviewing) { + cancelTransform(); + } + return; + } + if (!_keyframePreviewing) { + cancelTransform(); + _keyframePreviewing = true; + final epoch = ++_keyframePreviewEpoch; + unawaited(_prepareKeyframePreview(epoch)); + } + final version = view.keyframePreviewVersion; + final key = view.selectedKeyframe; + if (version == null || key == null) return; + final query = version.query(); + final record = query.element(key.element); + if (!_nativeVisuals.any((visual) => visual.elementId == record.id)) return; + final animation = ClipAnimation.at( + query, + key.element, + positionTick, + timeline.persistence + .timeline(activeSequence()!) + .format + .frameGrid + .quantumTicks, + ); + transforms.previewValues({record.id: animation.value}); + } + + Future _prepareKeyframePreview(int epoch) async { + try { + await _sync; + if (_closed || epoch != _keyframePreviewEpoch) return; + await pauseForCanvasInteraction(); + await _seekWorker; + if (_closed || epoch != _keyframePreviewEpoch) return; + await transforms.ensureContext(); + } catch (error, stack) { + if (!_closed && epoch == _keyframePreviewEpoch) _fail(error, stack); + } + } + + void _queueSeek(int tick) { + if (_closed) return; + _tracePreview('queue', tick); + _pendingSeek = tick.clamp(0, durationTick); + _seekWorker ??= Future.microtask(_drainSeek).whenComplete(() { + _seekWorker = null; + if (_pendingSeek != null && !_closed) { + _queueSeek(_pendingSeek!); + } + _notify(); + }); + } + + Future _drainSeek() async { + var cancelledAttempts = 0; + try { + while (_pendingSeek != null && !_closed) { + final currentSync = _sync; + await currentSync; + if (_closed) return; + if (!identical(currentSync, _sync)) continue; + if (!ready || error != null) { + _pendingSeek = null; + return; + } + final target = _pendingSeek; + _pendingSeek = null; + if (target == null || durationTick == 0) continue; + _tracePreview('worker-start', target); + final frameTick = TimelineClock.standard.toTicks( + timeline.persistence.timeline(activeSequence()!).format.frameDuration, + ); + // The edit cursor may sit at the end boundary; native decoders accept + // only [0, duration), so show the final frame for that position. + final tick = target >= durationTick + ? ((durationTick - 1) ~/ frameTick) * frameTick + : target; + final sequence = activeSequence(); + final wasScrubbing = _scrubbingIntent; + try { + if (_closed || sequence == null || activeSequence() != sequence) { + continue; + } + final time = MediaTime(tick, TimelineClock.ticksPerSecond); + if (_scrubbingIntent) { + if (!_nativeSkimming) { + _nativeSkimming = true; + await session!.beginSkimming(mode: policy.skimmingMode); + } + if (_closed || activeSequence() != sequence || !_scrubbingIntent) { + continue; + } + await session!.skim(time); + } else if (_nativeSkimming) { + try { + await session!.endSkimming(time); + } finally { + _nativeSkimming = false; + } + } else { + await session!.seek(time); + } + _tracePreview('native-return', target); + cancelledAttempts = 0; + } on RuntimeException catch (error) { + if (error.code != 'cancelled') rethrow; + if (_closed || sequence == null || activeSequence() != sequence) { + continue; + } + final superseded = + _pendingSeek != null || + positionTick != target || + _scrubbingIntent != wasScrubbing || + !identical(currentSync, _sync); + cancelledAttempts = superseded ? 0 : cancelledAttempts + 1; + if (cancelledAttempts > 2) rethrow; + _pendingSeek ??= positionTick; + } + } + } catch (e, stack) { + _pendingSeek = null; + _fail(e, stack); + } + } + + void _onSnapshot(RuntimeSnapshot snapshot) { + // Events and command acknowledgements arrive on separate channels. A late + // observation from a replaced plan must not alter the current session UI. + if (_closed || + _view == null || + activeSequence() == null || + snapshot.revision != _execution?.state.executionRevision) { + return; + } + final previousPlaying = _playing; + final previousTick = _tick; + _playing = + _canvasPause == null && + switch (snapshot.state) { + PlaybackState.playing || PlaybackState.waiting => true, + // Seeking temporarily stops the decoder while preserving playback intent. + PlaybackState.preparing || + PlaybackState.ready when _seekWorker != null => playing, + _ => false, + }; + if (snapshot.state == PlaybackState.failed) { + // Failed snapshots repeat until recovery. Keep the original command error, + // including its domain and native details, without reporting it again. + if (_error != null) return; + _failWithContext( + RuntimeException( + code: 'playbackFailed', + message: snapshot.message ?? 'Native preview failed', + ), + null, + { + ...?_execution?.diagnosticContextForRevision(snapshot.revision), + 'executionRevision': snapshot.revision, + }, + ); + return; + } + if (ready && + !busy && + !transforming && + _seekWorker == null && + _pendingSeek == null && + !_nativeSkimming && + _view != null) { + // Native clocks may use nanoseconds. The intermediate product exceeds + // int64 after ~6.54 seconds even though the resulting timeline tick fits. + final ticks = + BigInt.from(snapshot.position.numerator) * + BigInt.from(TimelineClock.ticksPerSecond) ~/ + BigInt.from(snapshot.position.denominator); + final end = durationTick; + _tick = ticks < BigInt.zero + ? 0 + : ticks > BigInt.from(end) + ? end + : ticks.toInt(); + _updatingPlayhead = true; + try { + _view!.seekTo(_tick); + if (_playing) _view!.followPlayback(); + } finally { + _updatingPlayhead = false; + } + } + if (_playing != previousPlaying) { + _notify(); + } else if (_tick != previousTick && !_closed) { + _positionChanges.notifyListeners(); + } + } + + Future? _playback; + Future togglePlayback() { + if (_playback case final pending?) return pending; + if (_closed || !canPlay) return Future.value(); + final completion = Completer(); + _playback = completion.future; + _togglePlayback().then( + (_) { + _playback = null; + completion.complete(); + }, + onError: (Object error, StackTrace stack) { + _playback = null; + completion.completeError(error, stack); + }, + ); + return completion.future; + } + + Future _togglePlayback() async { + if (!canPlay) return; + cancelTransform(); + final shouldPause = playing; + final intent = ++_playbackIntent; + _resumePending = !shouldPause; + _busy = true; + _notify(); + try { + await _sync; + await _transformCleanup; + await transforms.settled; + await _canvasPause; + await _seekWorker; + if (_closed || !ready || error != null || intent != _playbackIntent) { + return; + } + if (shouldPause) { + await session!.pause(); + } else { + // A normal resume retains the native frame and clock. Seeking again + // would flush the displayed image and can rewind to an older UI tick. + if (positionTick >= durationTick) { + await session!.seek(MediaTime(0, 1)); + } + if (_closed || !ready || error != null || intent != _playbackIntent) { + return; + } + await session!.play(); + } + // The command reply can precede the native state event. Publish its + // acknowledgement before clearing the resume guard, otherwise a rebuild + // can acquire a paused-frame edit while the native player is running. + if (!_closed && error == null && intent == _playbackIntent) { + _playing = !shouldPause; + } + } catch (e, stack) { + _fail(e, stack); + } finally { + _resumePending = false; + _busy = false; + _notify(); + } + } + + Future? _canvasPause; + int _playbackIntent = 0; + bool _resumePending = false; + + /// Pointer-down intent: pause now, without seeking, toggling, or creating an edit. + /// A following drag shares this acknowledgement before preparing its frozen frame. + Future pauseForCanvasInteraction() => _pausePlayback(); + + Future _pausePlayback({bool force = false}) { + // A pointer-down is also a pause intent while a resume is queued or its + // native acknowledgement has not yet updated `playing`. + _playbackIntent++; + if (_canvasPause case final pending?) return pending; + if (_closed || + _session == null || + (!force && !playing && !_resumePending)) { + return Future.value(); + } + final pause = session!.pause(); + _playing = false; + final pending = _canvasPause = pause + .catchError((Object error, StackTrace stack) { + _fail(error, stack); + throw error; + }) + .whenComplete(() { + _canvasPause = null; + _notify(); + }); + _notify(); + return pending; + } + + Future retry() async { + if (_closed || busy || _view == null) return; + _restorePlayhead = true; + _mediaInfo.clear(); + _unavailableAssets.clear(); + _execution?.invalidateMedia(); + timeline.setUnavailableAssets(_unavailableAssets); + _version = null; + _timelineChanged(); + await _sync; + } + + Future? _failurePause; + + void _fail(Object e, [StackTrace? stack]) => + _failWithContext(e, stack, _execution?.diagnosticContext); + + void _failWithContext( + Object e, + StackTrace? stack, + Map? context, + ) { + if (_closed) return; + reportDiagnostic( + runtime.diagnostics, + DiagnosticEvent( + component: 'preview', + operation: 'failure', + error: e, + stackTrace: stack, + context: { + ...?(context ?? _execution?.diagnosticContext), + 'timelineId': timeline.document.id, + 'nativeSessionId': session?.id, + 'executionRevision': + context?['executionRevision'] ?? + _execution?.state.executionRevision, + }, + ), + ); + if (runtime.diagnostics == null) debugPrint('Native preview failed: $e'); + _ready = false; + if (playing && session != null) { + _playing = false; + _failurePause = session!.pause().catchError((Object _) {}); + } + _error = e; + _invalidateTransform(); + _deferredTransformSync = false; + _notify(); + } + + void _notify() { + if (!_closed) { + notifyListeners(); + _positionChanges.notifyListeners(); + } + } + + final _positionChanges = ChangeNotifier(); + + /// Playback position updates that do not change the preview scene or controls. + Listenable get positionChanges => _positionChanges; + + Future close() { + if (_closing case final pending?) return pending; + final completion = Completer(); + _closing = completion.future; + _close().then(completion.complete, onError: completion.completeError); + return completion.future; + } + + Future _close() async { + _closed = true; + _releasePreview?.call(); + await completeCleanup([ + () { + _clearCanvasEditing(); + _invalidateTransform(); + _pendingSeek = null; + timeline.removeListener(_timelineChanged); + _view?.editingChanges.removeListener(_viewChanged); + }, + () async { + // Startup owns a pending native allocation until it settles. + try { + await _initializing; + } catch (_) { + /* Reported to initialize caller. */ + } + }, + () async => _events?.cancel(), + () async => _execution?.dispose(), + () async => _sync, + () async => _seekWorker, + () async => _transformCleanup, + () => transforms.settled, + () async => _playback, + () async => _canvasPause, + () async => _failurePause, + () async => session?.close(), + () => transforms.dispose(), + () { + _geometryExecution = null; + if (_observingFonts) { + PaintingBinding.instance.systemFonts.removeListener(_fontsChanged); + _observingFonts = false; + } + _layersByElement.clear(); + _frameVisuals.clear(); + _textBounds.clear(); + }, + _positionChanges.dispose, + () => super.dispose(), + ]); + } +} diff --git a/packages/cutdex_preview/lib/src/preview_geometry.dart b/packages/cutdex_preview/lib/src/preview_geometry.dart new file mode 100644 index 0000000..290af15 --- /dev/null +++ b/packages/cutdex_preview/lib/src/preview_geometry.dart @@ -0,0 +1,460 @@ +import 'dart:math' as math; +import 'dart:ui'; + +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/execution.dart'; +import 'package:cutdex_core/timeline/model.dart'; + +export 'package:cutdex_core/editor/commands.dart' show CanvasAlignment; + +/// Canonical angle for interactive rotation, in the range [-180, 180). +double normalizeRotationDegrees(double degrees) => (degrees + 180) % 360 - 180; + +ClipTransform alignToCanvas( + PreviewVisual visual, + Size canvas, + CanvasAlignment alignment, +) { + final bounds = visual.geometry.bounds; + final delta = switch (alignment) { + CanvasAlignment.left => Offset(-bounds.left, 0), + CanvasAlignment.horizontalCenter => Offset( + canvas.width / 2 - bounds.center.dx, + 0, + ), + CanvasAlignment.right => Offset(canvas.width - bounds.right, 0), + CanvasAlignment.top => Offset(0, -bounds.top), + CanvasAlignment.verticalCenter => Offset( + 0, + canvas.height / 2 - bounds.center.dy, + ), + CanvasAlignment.bottom => Offset(0, canvas.height - bounds.bottom), + }; + final local = visual.geometry.localDelta(delta); + return visual.transform.copyWith( + x: visual.transform.x + local.dx / canvas.width, + y: visual.transform.y + local.dy / canvas.height, + ); +} + +/// Geometry in output pixels, independent of widget size and device pixel ratio. +class PreviewGeometry { + const PreviewGeometry({ + required this.center, + required this.size, + this.rotation = 0, + this.distortion = const ClipDistortion(), + }) : _execution = null; + + factory PreviewGeometry.fromExecution(ExecutionVisualGeometry geometry) { + final points = geometry.corners; + final x = points[1] - points[0]; + final y = points[3] - points[0]; + return PreviewGeometry._( + Offset((points[0].x + points[2].x) / 2, (points[0].y + points[2].y) / 2), + Size(x.magnitude, y.magnitude), + math.atan2(x.y, x.x) * 180 / math.pi, + geometry, + ); + } + + const PreviewGeometry._( + this.center, + this.size, + this.rotation, + this._execution, + ) : distortion = const ClipDistortion(); + final ExecutionVisualGeometry? _execution; + final Offset center; + final Size size; + final double rotation; + final ClipDistortion distortion; + Offset rotate(Offset p) { + final a = rotation * math.pi / 180; + return Offset( + p.dx * math.cos(a) - p.dy * math.sin(a), + p.dx * math.sin(a) + p.dy * math.cos(a), + ); + } + + List get corners => _execution != null + ? [for (final p in _execution.corners) Offset(p.x, p.y)] + : [ + for (var i = 0; i < 4; i++) + center + + rotate( + Offset( + (i == 0 || i == 3 ? -.5 : .5) * size.width + + distortion.values[i * 2] * size.width, + (i < 2 ? -.5 : .5) * size.height + + distortion.values[i * 2 + 1] * size.height, + ), + ), + ]; + + Rect get bounds { + final points = corners; + return Rect.fromLTRB( + points.map((p) => p.dx).reduce(math.min), + points.map((p) => p.dy).reduce(math.min), + points.map((p) => p.dx).reduce(math.max), + points.map((p) => p.dy).reduce(math.max), + ); + } + + /// Handles follow the video's local corners through rotation. + List get selectionCorners => corners; + + Size get distortionSize { + final s = _execution?.distortionSize; + return s == null ? size : Size(s.x, s.y); + } + + Offset distortionDelta(Offset delta) { + final p = _execution?.distortionDelta(ExecutionPoint(delta.dx, delta.dy)); + if (p != null) return Offset(p.x, p.y); + final a = -rotation * math.pi / 180; + return Offset( + (delta.dx * math.cos(a) - delta.dy * math.sin(a)) / size.width, + (delta.dx * math.sin(a) + delta.dy * math.cos(a)) / size.height, + ); + } + + bool contains(Offset p) { + final points = corners; + final first = points[1] - points[0], second = points[2] - points[1]; + final sign = (first.dx * second.dy - first.dy * second.dx).sign; + if (sign == 0) return false; + for (var i = 0; i < 4; i++) { + final edge = points[(i + 1) % 4] - points[i], d = p - points[i]; + if (sign * (edge.dx * d.dy - edge.dy * d.dx) < -1e-9) return false; + } + return true; + } + + Offset localDelta(Offset delta) { + final mapped = _execution?.localDelta(ExecutionPoint(delta.dx, delta.dy)); + return mapped == null ? delta : Offset(mapped.x, mapped.y); + } + + PreviewGeometry changed(ClipTransform from, ClipTransform to, Size canvas) { + final execution = _execution; + if (execution != null) { + return PreviewGeometry.fromExecution( + execution.changed( + distortion: to.distortion, + x: to.x - from.x, + y: to.y - from.y, + scaleX: to.scale / from.scale, + scaleY: to.scaleY / from.scaleY, + rotation: to.rotation - from.rotation, + ), + ); + } + return PreviewGeometry( + center: + center + + Offset( + (to.x - from.x) * canvas.width, + (to.y - from.y) * canvas.height, + ), + size: Size( + size.width * to.scale / from.scale, + size.height * to.scaleY / from.scaleY, + ), + distortion: to.distortion, + rotation: rotation + to.rotation - from.rotation, + ); + } +} + +class PreviewVisual { + const PreviewVisual({ + required this.layerId, + required this.elementId, + required this.geometry, + required this.transform, + required this.lane, + }); + final String layerId; + final ElementId elementId; + final PreviewGeometry geometry; + final ClipTransform transform; + final int lane; +} + +class CanvasSnap { + const CanvasSnap._( + this.delta, + this.verticalGuides, + this.horizontalGuides, + this._x, + this._y, + this._canvas, + ); + final Offset delta; + final List verticalGuides; + final List horizontalGuides; + final _SnapMatch? _x; + final _SnapMatch? _y; + final Size _canvas; + + factory CanvasSnap.guides(PreviewGeometry geometry, Size canvas) { + final b = geometry.bounds; + return CanvasSnap._( + Offset.zero, + _alignedGuides([b.left, b.center.dx, b.right], canvas.width, 0), + _alignedGuides([b.top, b.center.dy, b.bottom], canvas.height, 0), + null, + null, + canvas, + ); + } +} + +enum _SnapAnchor { start, center, end } + +class _SnapMatch { + const _SnapMatch(this.anchor, this.target); + final _SnapAnchor anchor; + final _SnapAnchor target; + // Only break equal-distance ties; proximity still wins when acquiring a lock. + int get priority => anchor == target ? (anchor == .center ? 0 : 1) : 2; +} + +/// Evaluate unsnapped pointer geometry, never the last corrected position. +/// Keep the previous anchor/target pair until it exceeds the release threshold. +/// Display guides are all exact alignments AFTER correction, not snap candidates. +CanvasSnap snapToCanvas( + PreviewGeometry geometry, + Size canvas, + double threshold, { + CanvasSnap? previous, + double? releaseThreshold, +}) { + final release = releaseThreshold ?? threshold * 5 / 3; + if (!threshold.isFinite || + threshold <= 0 || + !release.isFinite || + release < threshold) { + throw ArgumentError( + 'Snap thresholds must be finite, positive, and release >= entry', + ); + } + if (previous?._canvas != canvas) previous = null; + final b = geometry.bounds; + final xs = [b.left, b.center.dx, b.right]; + final ys = [b.top, b.center.dy, b.bottom]; + final x = _snapAxis(xs, canvas.width, threshold, release, previous?._x); + final y = _snapAxis(ys, canvas.height, threshold, release, previous?._y); + return CanvasSnap._( + Offset(x.$1, y.$1), + _alignedGuides(xs, canvas.width, x.$1), + _alignedGuides(ys, canvas.height, y.$1), + x.$2, + y.$2, + canvas, + ); +} + +(double, _SnapMatch?) _snapAxis( + List anchors, + double extent, + double entry, + double release, + _SnapMatch? previous, +) { + final targets = [0.0, extent / 2, extent]; + double correction(_SnapMatch match) => + targets[match.target.index] - anchors[match.anchor.index]; + if (previous != null) { + final delta = correction(previous); + if (delta.abs() <= release) return (delta, previous); + } + _SnapMatch? best; + var delta = 0.0; + for (final target in _SnapAnchor.values) { + for (final anchor in _SnapAnchor.values) { + final candidate = _SnapMatch(anchor, target); + final next = correction(candidate); + if (next.abs() > entry) continue; + if (best == null || + next.abs() < delta.abs() - 1e-9 || + ((next.abs() - delta.abs()).abs() <= 1e-9 && + candidate.priority < best.priority)) { + best = candidate; + delta = next; + } + } + } + return (delta, best); +} + +List _alignedGuides( + List anchors, + double extent, + double delta, +) => List.unmodifiable([ + for (final target in [0.0, extent / 2, extent]) + if (anchors.any((anchor) => (anchor + delta - target).abs() <= 1e-6)) + target, +]); + +/// Scale about the opposite corner. Solve in the transformed edge basis so +/// unlocked resizing also works through rotated and nonuniformly scaled groups. +ClipTransform scaleFromCorner( + PreviewVisual visual, + int corner, + Offset pointer, + Size canvas, { + bool locked = true, +}) { + final points = visual.geometry.selectionCorners; + final fixed = points[(corner + 2) % 4]; + final diagonal = points[corner] - fixed; + final moved = pointer - fixed; + final factor = + ((moved.dx * diagonal.dx + moved.dy * diagonal.dy) / + diagonal.distanceSquared) + .clamp( + math.max( + .01 / visual.transform.scale, + .01 / visual.transform.scaleY, + ), + math.min( + 100 / visual.transform.scale, + 100 / visual.transform.scaleY, + ), + ) + .toDouble(); + var factorX = factor; + var factorY = factor; + if (!locked) { + final localDiagonal = visual.geometry.distortionDelta(diagonal); + final localMoved = visual.geometry.distortionDelta(moved); + if (localDiagonal.dx.abs() < 1e-12 || localDiagonal.dy.abs() < 1e-12) { + return visual.transform; + } + factorX = (localMoved.dx / localDiagonal.dx).clamp( + .01 / visual.transform.scale, + 100 / visual.transform.scale, + ); + factorY = (localMoved.dy / localDiagonal.dy).clamp( + .01 / visual.transform.scaleY, + 100 / visual.transform.scaleY, + ); + } + final scaled = visual.transform.copyWith( + scale: visual.transform.scale * factorX, + scaleY: visual.transform.scaleY * factorY, + ); + final delta = visual.geometry.localDelta( + fixed - + visual.geometry + .changed(visual.transform, scaled, canvas) + .corners[(corner + 2) % 4], + ); + return scaled.copyWith( + x: visual.transform.x + delta.dx / canvas.width, + y: visual.transform.y + delta.dy / canvas.height, + ); +} + +/// Resize snapping changes scale, never translates the fixed opposite corner. +(ClipTransform, CanvasSnap) snapScaleToCanvas( + PreviewVisual visual, + int corner, + Offset pointer, + Size canvas, + double threshold, { + required bool locked, + CanvasSnap? previous, +}) { + if (!locked) { + final snap = snapToCanvas( + PreviewGeometry(center: pointer, size: Size.zero), + canvas, + threshold, + previous: previous, + ); + return ( + scaleFromCorner( + visual, + corner, + pointer + snap.delta, + canvas, + locked: false, + ), + snap, + ); + } + final raw = scaleFromCorner(visual, corner, pointer, canvas); + final factor = raw.scale / visual.transform.scale; + final points = visual.geometry.corners; + final fixed = points[(corner + 2) % 4]; + final bounds = visual.geometry.bounds; + var bestDistance = double.infinity; + var bestFactor = factor; + _SnapMatch? bestX; + _SnapMatch? bestY; + var retained = false; + // Bounds are affine in a positive uniform scale about the fixed corner. + // Ignore stationary anchors, which must not mask a moving edge's snap. + for (final horizontal in [true, false]) { + final origin = horizontal ? fixed.dx : fixed.dy; + final anchors = horizontal + ? [bounds.left, bounds.center.dx, bounds.right] + : [bounds.top, bounds.center.dy, bounds.bottom]; + final extent = horizontal ? canvas.width : canvas.height; + final targets = [0.0, extent / 2, extent]; + final old = previous?._canvas == canvas + ? (horizontal ? previous?._x : previous?._y) + : null; + for (final anchor in _SnapAnchor.values) { + final slope = anchors[anchor.index] - origin; + if (slope.abs() < 1e-9) continue; + for (final target in _SnapAnchor.values) { + final keep = old?.anchor == anchor && old?.target == target; + final distance = (targets[target.index] - origin - slope * factor) + .abs(); + final candidate = (targets[target.index] - origin) / slope; + if (distance > threshold * (keep ? 5 / 3 : 1) || + candidate * visual.transform.scale < .01 || + candidate * visual.transform.scale > 100 || + candidate * visual.transform.scaleY < .01 || + candidate * visual.transform.scaleY > 100) { + continue; + } + if ((keep && !retained) || + (keep == retained && distance < bestDistance)) { + retained = keep; + bestDistance = distance; + bestFactor = candidate; + bestX = horizontal ? _SnapMatch(anchor, target) : null; + bestY = horizontal ? null : _SnapMatch(anchor, target); + } + } + } + } + final value = scaleFromCorner( + visual, + corner, + fixed + (points[corner] - fixed) * bestFactor, + canvas, + ); + final guides = CanvasSnap.guides( + visual.geometry.changed(visual.transform, value, canvas), + canvas, + ); + return ( + value, + CanvasSnap._( + Offset.zero, + guides.verticalGuides, + guides.horizontalGuides, + bestX, + bestY, + canvas, + ), + ); +} diff --git a/packages/cutdex_preview/lib/src/preview_interaction_overlay.dart b/packages/cutdex_preview/lib/src/preview_interaction_overlay.dart new file mode 100644 index 0000000..e95e072 --- /dev/null +++ b/packages/cutdex_preview/lib/src/preview_interaction_overlay.dart @@ -0,0 +1,465 @@ +import 'dart:async'; +import 'dart:math' as math; + +import 'package:cutdex_core/editor.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/foundation.dart' show listEquals; +import 'package:flutter/services.dart'; + +import 'preview_controller.dart'; +import 'selection_decoration.dart'; +import 'preview_geometry.dart'; +import 'preview_transform_session.dart'; + +class PreviewInteractionOverlay extends StatefulWidget { + const PreviewInteractionOverlay({ + super.key, + required this.controller, + required this.canvasRect, + this.onError, + }); + final PreviewController controller; + final Rect canvasRect; + final void Function(Object error)? onError; + @override + State createState() => + _PreviewInteractionOverlayState(); +} + +enum _Operation { move, scale, rotate, distort } + +class _Drag { + _Drag( + this.edit, + this.visual, + this.operation, + this.down, + this.corner, + this.inputOffset, + ) : value = visual.transform; + final PreviewTransformEdit edit; + final PreviewVisual visual; + final _Operation operation; + final Offset down; + final int corner; + final Offset inputOffset; + ClipTransform value; + CanvasSnap? snap; + Offset? pointer; +} + +class _PreviewInteractionOverlayState extends State { + final _focus = FocusNode(); + late final _label = SelectionLabel(onChanged: _rendered); + MouseCursor _cursor = SystemMouseCursors.basic; + _Drag? _drag; + Offset? _down; + _Drag? _pointerDrag; + final _edits = {}; + Size get _canvas => + Size(widget.controller.canvas.width, widget.controller.canvas.height); + @override + void initState() { + super.initState(); + // Scene synchronization can change geometry without moving the playhead + // or changing selection. Observe it directly even when the host filters + // those notifications to keep the surrounding canvas stable. + widget.controller.positionChanges.addListener(_rendered); + widget.controller.transforms.presentation.addListener(_rendered); + } + + void _rendered() { + if (mounted) setState(() {}); + } + + double get _scale => widget.canvasRect.width / _canvas.width; + // Use 1% of the displayed short side, capped at six logical pixels. + double get _snapThreshold => + math.min(6.0, widget.canvasRect.shortestSide * .01) / _scale; + Offset _output(Offset p) => (p - widget.canvasRect.topLeft) / _scale; + Offset _screen(Offset p) => widget.canvasRect.topLeft + p * _scale; + PreviewVisual? get _selected { + final ids = widget.controller.selectedVisualIds; + if (ids.isEmpty) return null; + return widget.controller.visualsForSelection(ids).lastOrNull; + } + + PreviewVisual? _hit(Offset point) => widget.canvasRect.contains(point) + ? widget.controller.visuals.reversed + .where((v) => _displayGeometry(v).contains(_output(point))) + .firstOrNull + : null; + PreviewGeometry _displayGeometry(PreviewVisual visual) => + visual.geometry.changed( + visual.transform, + widget.controller.transforms.displayedValueFor(visual.elementId) ?? + visual.transform, + _canvas, + ); + void _start(DragStartDetails details) { + _pointerDrag = null; + if (_drag != null) return; + final point = _down ?? details.localPosition; + var visual = _selected; + var operation = _Operation.move; + var corner = -1; + var inputOffset = Offset.zero; + if (visual != null) { + final displayed = _displayGeometry(visual); + final corners = displayed.selectionCorners.map(_screen).toList(); + corner = selectionResizeCorner(corners, point); + if (corner >= 0) { + operation = + widget.controller.distortionEditingElement == visual.elementId + ? _Operation.distort + : _Operation.scale; + inputOffset = + visual.geometry.selectionCorners[corner] - + displayed.selectionCorners[corner]; + } else if (widget.controller.distortionEditingElement == null && + selectionRotationCorner(corners, point) >= 0) { + operation = _Operation.rotate; + inputOffset = visual.geometry.center - displayed.center; + } else { + visual = _hit(point); + } + } else { + visual = _hit(point); + } + if (visual == null || _scale <= 0) return; + final edit = widget.controller.transforms.begin(visual); + if (edit == null) return; + _edits.add(edit); + // Hit the completed frame, but retain queued authored edits as the gesture + // baseline. A fixed offset prevents a pending frame from jumping a handle. + final drag = _Drag( + edit, + visual, + operation, + _output(point) + inputOffset, + corner, + inputOffset, + ); + _pointerDrag = drag; + setState(() => _drag = drag); + // Recognition can consume the only move event of a fast mouse drag. + _updateAt(details.localPosition); + unawaited( + edit.done.then((_) { + final owned = _edits.remove(edit); + if (!mounted || !owned) return; + if (identical(drag, _drag)) { + _pointerDrag = null; + setState(() => _drag = null); + } + if (edit.error != null) { + widget.onError?.call(edit.error!); + } + }), + ); + } + + void _update(DragUpdateDetails details) { + if (identical(_pointerDrag, _drag)) _updateAt(details.localPosition); + } + + void _updateAt(Offset position) { + final drag = _drag; + if (drag == null || drag.edit.cancelled) return; + drag.pointer = position; + final pointer = _output(position) + drag.inputOffset; + final original = drag.visual.transform; + ClipTransform next; + CanvasSnap? snap; + switch (drag.operation) { + case _Operation.move: + final delta = drag.visual.geometry.localDelta(pointer - drag.down); + next = original.copyWith( + x: original.x + delta.dx / _canvas.width, + y: original.y + delta.dy / _canvas.height, + ); + if (!HardwareKeyboard.instance.isAltPressed) { + snap = snapToCanvas( + drag.visual.geometry.changed(original, next, _canvas), + _canvas, + _snapThreshold, + previous: drag.snap, + ); + final correction = drag.visual.geometry.localDelta(snap.delta); + next = next.copyWith( + x: next.x + correction.dx / _canvas.width, + y: next.y + correction.dy / _canvas.height, + ); + } + case _Operation.scale: + if (HardwareKeyboard.instance.isAltPressed) { + next = scaleFromCorner( + drag.visual, + drag.corner, + pointer, + _canvas, + locked: widget.controller.aspectRatioLocked, + ); + } else { + (next, snap) = snapScaleToCanvas( + drag.visual, + drag.corner, + pointer, + _canvas, + _snapThreshold, + locked: widget.controller.aspectRatioLocked, + previous: drag.snap, + ); + } + case _Operation.distort: + final delta = drag.visual.geometry.distortionDelta(pointer - drag.down); + final offsets = original.distortion.corners; + final p = offsets[drag.corner]; + var pose = original.distortion.withCorner( + drag.corner, + p.$1 + delta.dx, + p.$2 + delta.dy, + ); + if (widget.controller.distortionPerspective) { + final linked = drag.corner ^ 1; + final q = offsets[linked]; + pose = pose.withCorner(linked, q.$1 - delta.dx, q.$2 + delta.dy); + } + next = original.copyWith( + distortion: pose.constrained(from: original.distortion), + ); + case _Operation.rotate: + final center = drag.visual.geometry.center; + final from = drag.visual.geometry.localDelta(drag.down - center); + final to = drag.visual.geometry.localDelta(pointer - center); + final delta = math.atan2(to.dy, to.dx) - math.atan2(from.dy, from.dx); + var angle = original.rotation + delta * 180 / math.pi; + if (HardwareKeyboard.instance.isShiftPressed) { + angle = (angle / 15).round() * 15.0; + } + next = original.copyWith(rotation: normalizeRotationDegrees(angle)); + } + setState(() { + drag.value = next; + drag.snap = snap; + }); + drag.edit.update(drag.value); + } + + void _end() { + final drag = _pointerDrag; + _pointerDrag = null; + if (drag == null) return; + unawaited(drag.edit.end()); + setState(() => _drag = null); + } + + void _cancel() { + final drag = _drag; + _pointerDrag = null; + drag?.edit.cancel(); + if (mounted) setState(() => _drag = null); + } + + @override + void didUpdateWidget(covariant PreviewInteractionOverlay oldWidget) { + super.didUpdateWidget(oldWidget); + if (oldWidget.controller != widget.controller) { + oldWidget.controller.positionChanges.removeListener(_rendered); + oldWidget.controller.transforms.presentation.removeListener(_rendered); + widget.controller.positionChanges.addListener(_rendered); + widget.controller.transforms.presentation.addListener(_rendered); + oldWidget.controller.cancelTransform(); + } + if (oldWidget.controller != widget.controller || + oldWidget.canvasRect != widget.canvasRect) { + for (final edit in _edits.toList()) { + edit.cancel(); + } + _edits.clear(); + _cancel(); + } else if (_drag?.edit.cancelled ?? false) { + _cancel(); + } + } + + @override + void dispose() { + _label.dispose(); + widget.controller.positionChanges.removeListener(_rendered); + widget.controller.transforms.presentation.removeListener(_rendered); + for (final edit in _edits) { + scheduleMicrotask(edit.cancel); + } + _edits.clear(); + _focus.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + final drag = _drag; + final visual = drag?.visual ?? _selected; + final geometry = visual == null ? null : _displayGeometry(visual); + return Focus( + focusNode: _focus, + onKeyEvent: (_, event) { + if (event.logicalKey == LogicalKeyboardKey.altLeft || + event.logicalKey == LogicalKeyboardKey.altRight) { + if (_drag?.pointer case final pointer?) _updateAt(pointer); + } + if (event is KeyDownEvent && + event.logicalKey == LogicalKeyboardKey.escape) { + if (_drag != null) { + _cancel(); + } else if (widget.controller.distortionEditingElement != null) { + widget.controller.setDistortionEditing(null); + } else { + widget.controller.selectVisual(null); + } + return KeyEventResult.handled; + } + return KeyEventResult.ignored; + }, + child: MouseRegion( + onHover: (event) { + final corners = geometry?.selectionCorners.map(_screen).toList(); + final cursor = corners == null + ? SystemMouseCursors.basic + : widget.controller.distortionEditingElement != null + ? selectionResizeCorner(corners, event.localPosition) >= 0 + ? SystemMouseCursors.precise + : SystemMouseCursors.move + : selectionCursor(corners, event.localPosition); + if (_cursor != cursor) setState(() => _cursor = cursor); + }, + onExit: (_) => setState(() => _cursor = SystemMouseCursors.basic), + cursor: drag != null ? SystemMouseCursors.grabbing : _cursor, + child: Listener( + behavior: HitTestBehavior.opaque, + onPointerDown: (_) => unawaited( + widget.controller.pauseForCanvasInteraction().catchError( + (Object _) {}, + ), + ), + child: GestureDetector( + key: const Key('preview-interaction'), + behavior: HitTestBehavior.opaque, + onPanDown: (d) { + _down = d.localPosition; + _focus.requestFocus(); + }, + onTapUp: (d) => widget.controller.selectVisual( + _hit(d.localPosition)?.elementId, + ), + onPanStart: _start, + onPanUpdate: _update, + onPanEnd: (_) => _end(), + onPanCancel: () { + if (_pointerDrag != null) _cancel(); + }, + child: CustomPaint( + painter: _SelectionPainter( + label: _label, + rect: widget.canvasRect, + scale: _scale, + devicePixelRatio: MediaQuery.devicePixelRatioOf(context), + geometry: geometry, + snap: + drag?.snap != null && + geometry != null && + !HardwareKeyboard.instance.isAltPressed + ? CanvasSnap.guides(geometry, _canvas) + : null, + rotating: drag?.operation == _Operation.rotate, + ), + ), + ), + ), + ), + ); + } +} + +class _SelectionPainter extends CustomPainter { + _SelectionPainter({ + required this.label, + required this.rect, + required this.scale, + required this.devicePixelRatio, + required this.geometry, + required this.snap, + required this.rotating, + }) : labelRevision = label.revision; + final int labelRevision; + final Rect rect; + final SelectionLabel label; + final double scale; + final double devicePixelRatio; + final PreviewGeometry? geometry; + final CanvasSnap? snap; + final bool rotating; + @override + void paint(Canvas canvas, Size size) { + canvas.save(); + canvas.clipRect(Offset.zero & size); + _paint(canvas); + canvas.restore(); + } + + void _paintGuides(Canvas canvas) { + final guide = Paint() + ..color = const Color(0xFFFF55C8) + ..strokeWidth = 1; + for (final x in snap?.verticalGuides ?? const []) { + final screenX = rect.left + x * scale; + canvas.drawLine( + Offset(screenX, rect.top), + Offset(screenX, rect.bottom), + guide, + ); + } + for (final y in snap?.horizontalGuides ?? const []) { + final screenY = rect.top + y * scale; + canvas.drawLine( + Offset(rect.left, screenY), + Offset(rect.right, screenY), + guide, + ); + } + } + + void _paint(Canvas canvas) { + final g = geometry; + if (g == null) return; + Offset screen(Offset p) => rect.topLeft + p * scale; + final points = g.selectionCorners.map(screen).toList(); + paintSelectionDecoration( + canvas, + points, + dimensions: g.size, + devicePixelRatio: devicePixelRatio, + rotation: rotating ? g.rotation : null, + labelLayout: label, + ); + _paintGuides(canvas); + } + + @override + bool shouldRepaint(covariant _SelectionPainter oldDelegate) { + if (geometry == null && oldDelegate.geometry == null) return false; + return rect != oldDelegate.rect || + labelRevision != oldDelegate.labelRevision || + scale != oldDelegate.scale || + devicePixelRatio != oldDelegate.devicePixelRatio || + rotating != oldDelegate.rotating || + geometry?.size != oldDelegate.geometry?.size || + geometry?.rotation != oldDelegate.geometry?.rotation || + !listEquals( + geometry?.selectionCorners, + oldDelegate.geometry?.selectionCorners, + ) || + !listEquals(snap?.verticalGuides, oldDelegate.snap?.verticalGuides) || + !listEquals(snap?.horizontalGuides, oldDelegate.snap?.horizontalGuides); + } +} diff --git a/packages/cutdex_preview/lib/src/preview_obscure_edit.dart b/packages/cutdex_preview/lib/src/preview_obscure_edit.dart new file mode 100644 index 0000000..1dea7f3 --- /dev/null +++ b/packages/cutdex_preview/lib/src/preview_obscure_edit.dart @@ -0,0 +1,111 @@ +part of 'preview_controller.dart'; + +/// Uses the same retained GPU frame and deferred publication as mask editing. +extension PreviewObscureEditing on PreviewController { + bool get obscureDragging => _obscureBase != null; + ElementId? get obscureEditingElement => + _editingElement(PreviewCanvasEditMode.obscure); + int get obscureEditGeneration => _obscureGeneration; + void setObscureEditing(ElementId? id, {Object? owner}) => + _setCanvasEditing(PreviewCanvasEditMode.obscure, id, owner: owner); + + void releaseObscureEditing(Object owner) => + _releaseCanvasEditing(PreviewCanvasEditMode.obscure, owner); + + ClipObscureAnimation? obscureAnimation(ElementId id) { + final stack = maskStackFor(id); + if (stack == null) return null; + final animation = ClipObscureAnimation(stack.record, stack.localTick); + return animation.exists ? animation : null; + } + + ClipMask? obscureFor(ElementId id) => + id == obscureEditingElement && _pendingObscure != null + ? _pendingObscure + : obscureAnimation(id)?.value; + Map _obscureValuesFor(ElementId id) => { + ...?obscureAnimation(id)?.values, + if (id == obscureEditingElement && _pendingObscure != null) + for (final f in ClipObscureAnimation.channels.expand((c) => c)) + 'obscure.$f': _pendingObscure!.values[f]!, + }; + Future beginObscureEdit() async { + final id = obscureEditingElement; + if (id == null || + !canPlay || + _view == null || + obscureAnimation(id)?.containsPlayhead != true || + !_nativeVisuals.any((v) => v.elementId == id)) { + return false; + } + if (transforms.hasPending || _keyframePreviewing) cancelTransform(); + final generation = ++_obscureGeneration; + _obscureBase = _view!.version.kernelVersion; + _obscureTick = positionTick; + _pendingObscure = obscureAnimation(id)!.value; + final bool ready; + try { + ready = await transforms.ensureContext(); + } catch (_) { + if (generation == _obscureGeneration) cancelObscureEdit(); + rethrow; + } + if (!ready || _closed || generation != _obscureGeneration) { + if (generation == _obscureGeneration) cancelObscureEdit(); + return false; + } + _renderObscure(); + return true; + } + + void _renderObscure() { + final id = obscureEditingElement; + if (id == null || _transformHandle == null) return; + final visual = visualForProperties(id); + if (visual != null) _updateTransform(id, visual.transform, () {}); + } + + void updateObscure(ClipMask next) { + if (_obscureBase == null || + !next.isValid || + next.width > 3 || + next.height > 3) { + return; + } + _pendingObscure = next; + _renderObscure(); + _notify(); + } + + void endObscureEdit() { + final id = obscureEditingElement, next = _pendingObscure; + try { + if (id != null && + next != null && + identical(_obscureBase, _view?.version.kernelVersion) && + _obscureTick == positionTick) { + final curves = obscureAnimation(id)!.edit(next); + if (curves.isNotEmpty) { + void edit() => + timeline.publishParameters(activeSequence()!, id, curves); + if (_nativeTransforming) { + _publishInteractiveParameters(edit); + } else { + edit(); + } + } + } + } finally { + cancelObscureEdit(); + } + } + + void cancelObscureEdit() { + _obscureGeneration++; + _obscureBase = null; + _obscureTick = null; + _pendingObscure = null; + _renderObscure(); + _notify(); + } +} diff --git a/packages/cutdex_preview/lib/src/preview_policy.dart b/packages/cutdex_preview/lib/src/preview_policy.dart new file mode 100644 index 0000000..820bbe8 --- /dev/null +++ b/packages/cutdex_preview/lib/src/preview_policy.dart @@ -0,0 +1,26 @@ +import 'package:cutdex_native_flutter/contracts.dart'; + +/// Viewing assumptions; authored project settings take precedence. +final class PreviewPolicy { + const PreviewPolicy({ + this.unknownVideoColorSpace = + RenderColorPolicy.defaultUnknownVideoColorSpace, + this.sourceHeadroom = RenderColorPolicy.defaultSourceHeadroom, + this.targetHeadroom = RenderColorPolicy.defaultTargetHeadroom, + this.skimmingMode = SkimmingMode.audible, + }); + final RenderColorSpace? unknownVideoColorSpace; + final double sourceHeadroom; + final double targetHeadroom; + + /// Selects silent or audible preview while dragging the playhead. + final SkimmingMode skimmingMode; + RenderColorPolicy get colorPolicy => RenderColorPolicy( + unknownVideoColorSpace: unknownVideoColorSpace, + sourceHeadroom: sourceHeadroom, + targetHeadroom: targetHeadroom, + ); + + RenderToneMapping get toneMapping => + colorPolicy.toneMappingFor(supportsToneMapping: true); +} diff --git a/packages/cutdex_preview/lib/src/preview_transform_session.dart b/packages/cutdex_preview/lib/src/preview_transform_session.dart new file mode 100644 index 0000000..b84c610 --- /dev/null +++ b/packages/cutdex_preview/lib/src/preview_transform_session.dart @@ -0,0 +1,241 @@ +import 'dart:async'; +import 'dart:ui'; + +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:flutter/foundation.dart'; + +import 'preview_geometry.dart'; + +/// A paused-frame editing context, independent of pointer and history lifetimes. +/// Preparation runs once; rendering follows latest values, never a FIFO of edits. +class PreviewTransformSession extends ChangeNotifier { + PreviewTransformSession({ + required this.canBegin, + required this.select, + required this.prepareNative, + required this.updateNative, + required this.commit, + required this.cancelNative, + required this.failed, + required this.changed, + }); + final bool Function() canBegin; + final void Function(ElementId) select; + final Future Function() prepareNative; + final void Function(ElementId, ClipTransform, VoidCallback onRendered) + updateNative; + final void Function(ElementId, ClipTransform) commit; + final void Function() cancelNative; + final void Function(Object) failed; + final void Function() changed; + final _values = {}; + final _displayed = {}; + final presentation = ValueNotifier(0); + final _committed = {}; + PreviewTransformEdit? _active; + Future? _preparing; + bool _ready = false; + int _epoch = 0; + + ClipTransform? valueFor(ElementId id) => _values[id]; + + /// Last native render submitted to its display layer, not a display timestamp. + ClipTransform? displayedValueFor(ElementId id) => _displayed[id]; + + void _changed() { + changed(); + notifyListeners(); + } + + bool get hasPending => _active != null; + bool get hasContext => _preparing != null; + + /// Render externally prepared parameter values without opening another edit. + /// The caller owns publication; native rendering keeps only the latest values. + void previewValues(Map values) { + for (final entry in values.entries) { + if (!entry.value.isValid) { + throw ArgumentError('Invalid preview transform'); + } + } + var changed = false; + for (final entry in values.entries) { + if (_values[entry.key] == entry.value) continue; + _values[entry.key] = entry.value; + _publish(entry.key, entry.value); + changed = true; + } + if (changed) _changed(); + } + + Future get settled async { + await _preparing; + } + + /// Selection alone can acquire the paused frame without opening history. + Future ensureContext() { + if (!canBegin()) return Future.value(false); + return _preparing ??= _prepare(_epoch); + } + + PreviewTransformEdit? begin(PreviewVisual visual) { + if (!canBegin() || _active != null) return null; + final edit = PreviewTransformEdit._(this, visual); + _displayed.putIfAbsent(visual.elementId, () => visual.transform); + _active = edit; + select(visual.elementId); + _preparing ??= _prepare(_epoch); + edit._prepared = _preparing!.then((ready) => ready && !edit.cancelled); + _changed(); + return edit; + } + + Future _prepare(int epoch) async { + try { + final ready = await prepareNative(); + if (epoch != _epoch) return false; + if (!ready) { + cancelAll(); + return false; + } + _ready = true; + // Gestures may have ended while preparing. Only their latest combined + // state matters to rendering; history has already recorded each release. + for (final entry in _values.entries.toList()) { + _publish(entry.key, entry.value); + } + return true; + } catch (error) { + if (epoch == _epoch) { + cancelAll(); + failed(error); + } + return false; + } + } + + List project(List visuals, Size canvas) => [ + for (final visual in visuals) + if (_values[visual.elementId] case final value?) + PreviewVisual( + layerId: visual.layerId, + elementId: visual.elementId, + lane: visual.lane, + transform: value, + geometry: visual.geometry.changed(visual.transform, value, canvas), + ) + else + visual, + ]; + + void _update(PreviewTransformEdit edit, ClipTransform value) { + if (!identical(_active, edit) || edit.released) return; + if (!value.isValid) { + throw ArgumentError('Invalid canvas transform'); + } + edit._value = value; + _values[edit.initial.elementId] = value; + _publish(edit.initial.elementId, value); + // High-frequency values only notify consumers of the transform itself. + // Selection geometry listens to acknowledged renders separately. + notifyListeners(); + } + + void _publish(ElementId id, ClipTransform value) { + if (!_ready) return; + try { + final epoch = _epoch; + updateNative(id, value, () { + if (epoch != _epoch || identical(_displayed[id], value)) return; + _displayed[id] = value; + presentation.value++; + }); + } catch (error) { + cancelAll(); + failed(error); + } + } + + void _end(PreviewTransformEdit edit) { + if (!identical(_active, edit)) return; + try { + commit(edit.initial.elementId, edit.value); + _committed[edit.initial.elementId] = edit.value; + _values[edit.initial.elementId] = edit.value; + _active = null; + edit._finish(); + _changed(); + } catch (error) { + edit._error = error; + _cancel(edit); + failed(error); + } + } + + void _cancel(PreviewTransformEdit edit) { + if (!identical(_active, edit)) return; + _active = null; + edit._cancelled = true; + edit._finish(); + final id = edit.initial.elementId; + final restored = _committed[id] ?? edit.initial.transform; + _values[id] = restored; + if (_committed.isEmpty) { + cancelAll(); + } else { + _publish(id, restored); + _changed(); + } + } + + /// Invalidates this frame context, not the already committed timeline history. + void cancelAll() { + _epoch++; + _active?._cancelled = true; + _active?._finish(); + _active = null; + _preparing = null; + _ready = false; + _values.clear(); + _displayed.clear(); + _committed.clear(); + cancelNative(); + _changed(); + } + + @override + void dispose() { + _epoch++; + presentation.dispose(); + super.dispose(); + } +} + +class PreviewTransformEdit { + PreviewTransformEdit._(this._session, this.initial) + : _value = initial.transform; + final PreviewTransformSession _session; + final PreviewVisual initial; + ClipTransform _value; + ClipTransform get value => _value; + late final Future _prepared; + final _done = Completer(); + bool _cancelled = false; + Object? _error; + Future get prepared => _prepared; + Future get done => _done.future; + bool get released => _done.isCompleted; + bool get cancelled => _cancelled; + Object? get error => _error; + void update(ClipTransform value) => _session._update(this, value); + Future end() { + _session._end(this); + return done; + } + + void cancel() => _session._cancel(this); + void _finish() { + if (!released) _done.complete(); + } +} diff --git a/packages/cutdex_preview/lib/src/selection_decoration.dart b/packages/cutdex_preview/lib/src/selection_decoration.dart new file mode 100644 index 0000000..37cdf5d --- /dev/null +++ b/packages/cutdex_preview/lib/src/selection_decoration.dart @@ -0,0 +1,234 @@ +import 'dart:math' as math; +import 'dart:ui' show Vertices; + +import 'package:flutter/material.dart'; + +const selectionBlue = Color(0xFF0099FF); + +/// One label layout owned and released by the overlay's widget state. +class SelectionLabel { + SelectionLabel({this.onChanged}) { + PaintingBinding.instance.systemFonts.addListener(_fontsChanged); + } + final VoidCallback? onChanged; + String? _label; + TextPainter? _painter; + int _revision = 0; + int get revision => _revision; + + void _fontsChanged() { + _revision++; + _painter?.dispose(); + _painter = null; + _label = null; + onChanged?.call(); + } + + TextPainter layout(String label) { + if (_label == label && _painter != null) return _painter!; + _painter?.dispose(); + _label = label; + return _painter = TextPainter( + text: TextSpan( + text: label, + style: const TextStyle(color: Colors.white, fontSize: 12), + ), + textDirection: TextDirection.ltr, + )..layout(); + } + + void dispose() { + PaintingBinding.instance.systemFonts.removeListener(_fontsChanged); + _painter?.dispose(); + _painter = null; + _label = null; + } +} + +/// Corner squares resize; the exterior sector around each corner rotates. +int selectionResizeCorner(List corners, Offset pointer) => + corners.indexWhere((p) => (p - pointer).distance <= 9); + +int selectionRotationCorner(List corners, Offset pointer) { + final path = Path()..addPolygon(corners, true); + if (path.contains(pointer)) return -1; + return corners.indexWhere((p) => (p - pointer).distance <= 26); +} + +MouseCursor selectionCursor(List corners, Offset pointer) { + final corner = selectionResizeCorner(corners, pointer); + if (corner >= 0) { + final diagonal = corners[corner] - corners[(corner + 2) % 4]; + final sector = + (math.atan2(diagonal.dy, diagonal.dx) / (math.pi / 4)).round() % 4; + return switch (sector) { + 0 => SystemMouseCursors.resizeLeftRight, + 1 => SystemMouseCursors.resizeUpLeftDownRight, + 2 => SystemMouseCursors.resizeUpDown, + _ => SystemMouseCursors.resizeUpRightDownLeft, + }; + } + if (selectionRotationCorner(corners, pointer) >= 0) { + return SystemMouseCursors.grab; + } + return SystemMouseCursors.basic; +} + +void paintSelectionDecoration( + Canvas canvas, + List corners, { + required Size dimensions, + required double devicePixelRatio, + double? rotation, + SelectionLabel? labelLayout, +}) { + final physicalStrokeWidth = math.max(1, (1.5 * devicePixelRatio).round()); + final outline = Paint() + ..color = selectionBlue + ..isAntiAlias = true + ..style = PaintingStyle.stroke + ..strokeWidth = physicalStrokeWidth / devicePixelRatio; + final angle = math.atan2( + (corners[1] - corners[0]).dy, + (corners[1] - corners[0]).dx, + ); + final axisAligned = + (angle - (angle / (math.pi / 2)).round() * math.pi / 2).abs() < 1e-9; + // Align stroke boundaries to physical pixels only for axis-aligned bounds. + // Rotated edges retain their exact subpixel coordinates for antialiasing. + double align(double coordinate) => + ((coordinate * devicePixelRatio - physicalStrokeWidth / 2).round() + + physicalStrokeWidth / 2) / + devicePixelRatio; + final paintedCorners = axisAligned + ? [for (final p in corners) Offset(align(p.dx), align(p.dy))] + : corners; + if (axisAligned) { + canvas.drawPath(Path()..addPolygon(paintedCorners, true), outline); + } else { + _paintSmoothOutline(canvas, corners, outline, devicePixelRatio); + } + final handleFill = Paint()..color = Colors.white; + for (final p in corners) { + canvas.save(); + final Rect box; + if (axisAligned) { + box = Rect.fromLTRB( + align(p.dx - 4), + align(p.dy - 4), + align(p.dx + 4), + align(p.dy + 4), + ); + } else { + canvas.translate(p.dx, p.dy); + canvas.rotate(angle); + box = const Rect.fromLTWH(-4, -4, 8, 8); + } + canvas.drawRect(box, handleFill); + if (axisAligned) { + canvas.drawRect(box, outline); + } else { + _paintSmoothOutline( + canvas, + [box.topLeft, box.topRight, box.bottomRight, box.bottomLeft], + outline, + devicePixelRatio, + ); + } + canvas.restore(); + } + final label = rotation == null + ? '${dimensions.width.round()} × ${dimensions.height.round()}' + : '${rotation.toStringAsFixed(1)}°'; + final layout = labelLayout ?? SelectionLabel(); + final text = layout.layout(label); + final quarterTurns = ((angle + math.pi / 4) / (math.pi / 2)).floor(); + final labelEdge = (2 - quarterTurns) % 4; + final edgeCenter = (corners[labelEdge] + corners[(labelEdge + 1) % 4]) / 2; + final oppositeCenter = + (corners[(labelEdge + 2) % 4] + corners[(labelEdge + 3) % 4]) / 2; + var outward = edgeCenter - oppositeCenter; + outward = outward / math.max(outward.distance, .001); + final center = edgeCenter + outward * (14 + text.height / 2); + canvas.save(); + canvas.translate(center.dx, center.dy); + canvas.rotate(angle - quarterTurns * math.pi / 2); + final rect = Rect.fromCenter( + center: Offset.zero, + width: text.width + 12, + height: text.height + 6, + ); + canvas.drawRRect( + RRect.fromRectAndRadius(rect, const Radius.circular(3)), + Paint()..color = selectionBlue, + ); + text.paint(canvas, rect.topLeft + const Offset(6, 3)); + canvas.restore(); + if (labelLayout == null) layout.dispose(); +} + +/// Explicit opacity ramps smooth shallow diagonals. +void _paintSmoothOutline( + Canvas canvas, + List corners, + Paint outline, + double devicePixelRatio, +) { + final halfWidth = outline.strokeWidth / 2; + final feather = math.min(outline.strokeWidth, 1.5 / devicePixelRatio); + final outer = halfWidth + feather / 2; + final core = halfWidth - feather / 2; + final center = (corners[0] + corners[2]) / 2; + final normals = []; + for (var i = 0; i < 4; i++) { + final edge = corners[(i + 1) % 4] - corners[i]; + if (edge.distance <= outer * 2) { + canvas.drawPath(Path()..addPolygon(corners, true), outline); + return; + } + var normal = Offset(edge.dy, -edge.dx) / edge.distance; + final outward = (corners[i] + corners[(i + 1) % 4]) / 2 - center; + if (normal.dx * outward.dx + normal.dy * outward.dy < 0) { + normal = -normal; + } + normals.add(normal); + } + final miters = []; + for (var i = 0; i < 4; i++) { + final a = normals[(i + 3) % 4]; + final b = normals[i]; + miters.add((a + b) / math.max(1 + a.dx * b.dx + a.dy * b.dy, .001)); + } + final positions = []; + final colors = []; + final transparent = outline.color.withValues(alpha: 0); + for (final (distance, color) in [ + (outer, transparent), + (core, outline.color), + (-core, outline.color), + (-outer, transparent), + ]) { + for (var i = 0; i < 4; i++) { + positions.add(corners[i] + miters[i] * distance); + colors.add(color); + } + } + final indices = []; + for (var ring = 0; ring < 3; ring++) { + for (var i = 0; i < 4; i++) { + final a = ring * 4 + i; + final b = ring * 4 + (i + 1) % 4; + final c = a + 4; + final d = b + 4; + indices.addAll([a, b, c, b, d, c]); + } + } + final vertices = Vertices( + VertexMode.triangles, + positions, + colors: colors, + indices: indices, + ); + canvas.drawVertices(vertices, BlendMode.dst, Paint()); + vertices.dispose(); +} diff --git a/packages/cutdex_preview/lib/src/source_preview_controller.dart b/packages/cutdex_preview/lib/src/source_preview_controller.dart new file mode 100644 index 0000000..a982c19 --- /dev/null +++ b/packages/cutdex_preview/lib/src/source_preview_controller.dart @@ -0,0 +1,599 @@ +import 'dart:async'; +import 'dart:io'; +import 'dart:ui' as ui; + +import 'package:cutdex_core/editor/commands.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:flutter/foundation.dart'; + +import 'cleanup.dart'; +import 'preview_policy.dart'; + +/// The host retains media access until the supplied action finishes. +typedef PreviewMediaLoader = Future Function( + Future Function(MediaReference media) action, +); + +/// Owns an independent source session and holds file access until it is closed. +class SourcePreviewController extends ChangeNotifier { + SourcePreviewController({ + required this.loadMedia, + required this.frameDuration, + required this.rememberPosition, + int positionTick = 0, + this.policy = const PreviewPolicy(), + CutdexRuntime? runtime, + // Keep the public constructor argument separate from private storage. + // ignore: prefer_initializing_formals + }) : _positionTick = positionTick, + runtime = runtime ?? CutdexRuntime(); + + final PreviewMediaLoader loadMedia; + final PreviewPolicy policy; + final RationalTime frameDuration; + final void Function(int) rememberPosition; + final CutdexRuntime runtime; + RuntimeSession? _session; + RuntimeSession? get session => _session; + Uint8List? _image; + Uint8List? get image => _image; + double _aspectRatio = 16 / 9; + double get aspectRatio => _aspectRatio; + int _positionTick; + int get positionTick => _positionTick; + int _durationTick = 0; + int get durationTick => _durationTick; + bool _busy = true; + bool get busy => _busy; + bool _playing = false; + bool get playing => _playing; + bool _audioOnly = false; + bool get audioOnly => _audioOnly; + Object? _error; + Object? get error => _error; + bool _closed = false; + StreamSubscription? _events; + final _release = Completer(); + Future? _lifetime; + bool get canPlay => !_closed && !busy && _error == null && session != null; + + Future? _opening; + Future? _closing; + Future initialize(Future beforeOpen) { + if (_closed) return Future.error(StateError('Source preview is closed')); + if (_opening case final pending?) return pending; + final completion = Completer(); + _opening = completion.future; + _initialize(beforeOpen) + .then(completion.complete, onError: completion.completeError); + return completion.future; + } + + Future _initialize(Future beforeOpen) async { + final ready = Completer(); + _lifetime = () async { + try { + await beforeOpen; + if (_closed) return; + await loadMedia((media) async { + try { + if (_closed) return; + if (media.isImage) { + final image = await _loadStillImage(media); + if (_closed) return; + _aspectRatio = image.aspectRatio; + _image = image.data; + } else { + final info = await runtime.probe(media); + if (_closed) return; + if (info.isProtected || + (info.videoTrackCount == 0 && info.audioTrackCount == 0)) { + throw const RuntimeException( + code: 'unpreviewableMedia', + message: 'Media has no previewable audio or video tracks', + ); + } + final size = + info.videoDisplaySizes.firstOrNull ?? RenderSize(1920, 1080); + _audioOnly = info.videoTrackCount == 0; + _aspectRatio = size.width / size.height; + _durationTick = + (info.duration.seconds * TimelineClock.ticksPerSecond) + .floor(); + _positionTick = positionTick.clamp(0, durationTick); + final created = await runtime.createSession(); + _session = created; + if (_closed) return; + _events = created.events.listen( + (snapshot) { + if (_closed) return; + if (!_scrubbing && + _scrubEnd == null && + _interactiveSeeks == 0) { + _positionTick = + (snapshot.position.seconds * + TimelineClock.ticksPerSecond) + .round() + .clamp(0, durationTick); + } + _playing = snapshot.state == PlaybackState.playing; + if (snapshot.state == PlaybackState.failed) { + _error = RuntimeException( + code: 'playbackFailed', + message: snapshot.message ?? 'Source preview failed', + ); + } + rememberPosition(positionTick); + notifyListeners(); + }, + onError: (Object failure) { + if (!_closed) { + _error = failure; + notifyListeners(); + } + }, + ); + final start = positionTick; + await created.load( + sourcePreviewPlan(media, info, frameDuration, policy: policy), + ); + if (_closed) return; + await created.seek( + MediaTime(start, TimelineClock.ticksPerSecond), + ); + _positionTick = start; + } + if (_closed) return; + _busy = false; + notifyListeners(); + ready.complete(); + await _release.future; + } finally { + await completeCleanup([ + () async => _playback, + () async => _scrubStart, + () async => _scrubEnd, + () async => _events?.cancel(), + () async => session?.close(), + ]); + } + }); + } catch (failure) { + if (_closed) rethrow; + if (!_closed) { + _busy = false; + _error = failure; + notifyListeners(); + } + } finally { + if (!ready.isCompleted) ready.complete(); + } + }(); + await ready.future; + } + + Future<({Uint8List data, double aspectRatio})> _loadStillImage( + MediaReference media, + ) async { + try { + final thumbnail = await runtime.thumbnail( + ThumbnailRequest(media: media, maximumWidth: 2048, maximumHeight: 2048), + ); + final codec = await ui.instantiateImageCodec(thumbnail.data); + try { + final frame = await codec.getNextFrame(); + try { + return ( + data: thumbnail.data, + aspectRatio: frame.image.width / frame.image.height, + ); + } finally { + frame.image.dispose(); + } + } finally { + codec.dispose(); + } + } catch (_) { + if (kIsWeb || media.uri.scheme != 'file') rethrow; + final bytes = await File.fromUri(media.uri).readAsBytes(); + final buffer = await ui.ImmutableBuffer.fromUint8List(bytes); + try { + final descriptor = await ui.ImageDescriptor.encoded(buffer); + try { + final scale = descriptor.width > descriptor.height + ? (2048 / descriptor.width).clamp(0.0, 1.0) + : (2048 / descriptor.height).clamp(0.0, 1.0); + final codec = await descriptor.instantiateCodec( + targetWidth: (descriptor.width * scale).round().clamp(1, 2048), + targetHeight: (descriptor.height * scale).round().clamp(1, 2048), + ); + try { + final frame = await codec.getNextFrame(); + try { + final encoded = await frame.image.toByteData( + format: ui.ImageByteFormat.png, + ); + if (encoded == null) throw StateError('Could not encode image'); + return ( + data: encoded.buffer.asUint8List(), + aspectRatio: descriptor.width / descriptor.height, + ); + } finally { + frame.image.dispose(); + } + } finally { + codec.dispose(); + } + } finally { + descriptor.dispose(); + } + } finally { + buffer.dispose(); + } + } + } + + /// A host preparation failure changes state through this boundary. + void reportFailure(Object failure, [StackTrace? stack]) { + if (_closed) return; + reportDiagnostic( + runtime.diagnostics, + DiagnosticEvent( + component: 'preview', + operation: 'sourceFailure', + error: failure, + stackTrace: stack, + context: {'nativeSessionId': session?.id}, + ), + ); + _error = failure; + _busy = false; + notifyListeners(); + } + + bool _scrubbing = false; + Future? _scrubStart; + Future? _scrubEnd; + + /// Uses the runtime's replaceable skim target, shared with timeline scrubbing. + void beginScrubbing() { + if (!canPlay || _scrubbing) return; + _interactiveSeek = null; + _scrubbing = true; + final native = session!; + final pendingEnd = _scrubEnd; + _scrubStart = () async { + await pendingEnd; + await _playback; + if (_closed) return; + await native.beginSkimming(mode: policy.skimmingMode); + }().catchError(_scrubFailed); + } + + void updateScrubbing(int tick) { + if (!_scrubbing || _closed) return; + final frameTick = TimelineClock.standard.toTicks(frameDuration); + final last = durationTick > 0 + ? ((durationTick - 1) ~/ frameTick) * frameTick + : 0; + _positionTick = tick.clamp(0, last); + final native = session!; + final start = _scrubStart; + final time = MediaTime(_positionTick, TimelineClock.ticksPerSecond); + unawaited( + () async { + await start; + if (_closed || _error != null) return; + await native.skim(time); + }().catchError(_scrubFailed), + ); + rememberPosition(_positionTick); + notifyListeners(); + } + + void endScrubbing() { + if (!_scrubbing) return; + _scrubbing = false; + final native = session!; + final start = _scrubStart; + _scrubStart = null; + final time = MediaTime(_positionTick, TimelineClock.ticksPerSecond); + final ending = () async { + await start; + if (_closed || _error != null) return; + await native.endSkimming(time); + }().catchError(_scrubFailed); + _scrubEnd = ending; + unawaited( + ending.whenComplete(() { + if (identical(_scrubEnd, ending)) _scrubEnd = null; + }), + ); + } + + void _scrubFailed(Object error) { + if (_closed || error is RuntimeException && error.code == 'cancelled') { + return; + } + reportFailure(error); + } + + Future? _playback; + _InteractiveSourceSeek? _interactiveSeek; + int _interactiveSeeks = 0; + + /// UI navigation keeps one native seek and one replaceable next target. + /// The returned future settles when this burst's final target has rendered. + Future seekInteractive(int requested) { + if (!canPlay) { + return Future.error( + const CommandRejected('sourceNotReady', 'Source preview is not ready'), + ); + } + final frame = TimelineClock.standard.toTicks(frameDuration); + final last = durationTick > 0 ? ((durationTick - 1) ~/ frame) * frame : 0; + final tick = requested.clamp(0, last); + if (_scrubbing) endScrubbing(); + var batch = _interactiveSeek; + if (batch == null) { + batch = _InteractiveSourceSeek(); + _interactiveSeek = batch; + _interactiveSeeks++; + final previous = _playback ?? Future.value(); + final scrubEnd = _scrubEnd; + final owned = batch; + final pending = previous + .then((_) async { + try { + await scrubEnd; + while (owned.tick != null) { + final target = owned.tick!; + owned.tick = null; + if (_closed || _error != null) { + throw StateError('Source closed or failed during navigation'); + } + await session!.seek( + MediaTime(target, TimelineClock.ticksPerSecond), + ); + if (_closed) { + throw StateError('Source closed during navigation'); + } + if (owned.tick == null && + _interactiveSeeks == 1 && + !_scrubbing && + _scrubEnd == null) { + _positionTick = target; + rememberPosition(target); + } + } + } catch (failure) { + if (!_closed) _error = failure; + rethrow; + } + }) + .whenComplete(() { + _interactiveSeeks--; + if (identical(_interactiveSeek, owned)) _interactiveSeek = null; + if (!_closed) notifyListeners(); + }); + owned.done = _trackPlayback(pending); + } + batch.tick = tick; + _positionTick = tick; + rememberPosition(tick); + notifyListeners(); + return batch.done; + } + + Future togglePlayback() { + if (_interactiveSeek != null) { + return control( + playing ? SourcePreviewAction.pause : SourcePreviewAction.play, + ); + } + if (_playback case final pending?) return pending; + if (!canPlay || _closed) return Future.value(); + final completion = Completer(); + _playback = completion.future; + _togglePlayback().then( + (_) { + _playback = null; + completion.complete(); + }, + onError: (Object error, StackTrace stack) { + _playback = null; + completion.completeError(error, stack); + }, + ); + return completion.future; + } + + Future _togglePlayback() async { + if (!canPlay || _closed) return; + _busy = true; + notifyListeners(); + try { + if (playing) { + await session!.pause(); + } else { + if (positionTick >= durationTick) await session!.seek(MediaTime(0, 1)); + if (!_closed) await session!.play(); + } + } catch (failure) { + if (!_closed) _error = failure; + } finally { + _busy = false; + if (!_closed) notifyListeners(); + } + } + + /// Explicit controls reuse this player and are drained before media access releases. + Future control(SourcePreviewAction action, {CommandTime? at}) { + // An exact command fences the interactive burst. Later UI targets enqueue + // after it instead of changing targets that precede the command. + _interactiveSeek = null; + final previous = _playback ?? Future.value(); + final pending = previous.then((_) async { + if (_closed || !canPlay) { + throw const CommandRejected( + 'sourceNotReady', + 'Source preview is not ready', + ); + } + if (action == SourcePreviewAction.seek && at == null || + action != SourcePreviewAction.seek && at != null || + !{ + SourcePreviewAction.play, + SourcePreviewAction.pause, + SourcePreviewAction.seek, + }.contains(action)) { + throw const CommandRejected( + 'invalidArguments', + 'Invalid source control', + ); + } + final tick = at == null + ? null + : TimelineClock.standard.toTicks( + RationalTime(at.numerator, at.denominator), + ); + if (tick != null && tick > durationTick) { + throw const CommandRejected( + 'invalidTime', + 'Seek exceeds source duration', + ); + } + _busy = true; + notifyListeners(); + try { + switch (action) { + case SourcePreviewAction.play: + if (positionTick >= durationTick) { + await session!.seek(MediaTime(0, 1)); + } + if (!_closed) await session!.play(); + case SourcePreviewAction.pause: + await session!.pause(); + _playing = false; + case SourcePreviewAction.seek: + await session!.seek(MediaTime(at!.numerator, at.denominator)); + if (!_closed) { + _positionTick = tick!; + rememberPosition(tick); + } + default: + throw StateError('Unreachable source action'); + } + } catch (failure) { + if (!_closed) _error = failure; + rethrow; + } finally { + _busy = false; + if (!_closed) notifyListeners(); + } + if (_closed) throw StateError('Source closed during control'); + }); + return _trackPlayback(pending); + } + + Future _trackPlayback(Future pending) { + _playback = pending; + unawaited( + pending.then( + (_) { + if (identical(_playback, pending)) _playback = null; + }, + onError: (Object _, StackTrace _) { + if (identical(_playback, pending)) _playback = null; + }, + ), + ); + return pending; + } + + Future close() { + if (_closing case final pending?) return pending; + final completion = Completer(); + _closing = completion.future; + _closed = true; + completeCleanup([ + () => rememberPosition(positionTick), + _release.complete, + () async => _lifetime, + ]).then(completion.complete, onError: completion.completeError); + return completion.future; + } +} + +class _InteractiveSourceSeek { + int? tick; + late final Future done; +} + +ExecutionPlan sourcePreviewPlan( + MediaReference media, + MediaInfo info, + RationalTime frame, { + PreviewPolicy policy = const PreviewPolicy(), +}) { + final range = MediaRange(start: MediaTime(0, 1), duration: info.duration); + final audio = info.audioTracks.firstOrNull; + MediaRange? audioRange; + if (audio != null) { + final assetEnd = RationalTime( + info.duration.numerator, + info.duration.denominator, + ); + final start = RationalTime(audio.start.numerator, audio.start.denominator); + final end = + start + + RationalTime(audio.duration.numerator, audio.duration.denominator); + final clippedStart = start.isNegative ? RationalTime.zero : start; + final clippedEnd = end.compareTo(assetEnd) > 0 ? assetEnd : end; + if (clippedEnd.compareTo(clippedStart) > 0) { + final duration = clippedEnd - clippedStart; + audioRange = MediaRange( + start: MediaTime(clippedStart.numerator, clippedStart.denominator), + duration: MediaTime(duration.numerator, duration.denominator), + ); + } + } + return ExecutionPlan( + duration: info.duration, + toneMapping: + { + RenderColorSpace.rec2020HLG, + RenderColorSpace.rec2020PQ, + RenderColorSpace.linearRec2020, + }.contains(info.videoColorSpaces.firstOrNull) + ? policy.toneMapping + : const RenderToneMapping.none(), + renderSize: info.videoDisplaySizes.firstOrNull ?? RenderSize(1920, 1080), + frameDuration: MediaTime(frame.numerator, frame.denominator), + media: [media], + visualLayers: [ + if (info.videoTrackCount > 0) + VisualLayer( + id: 'source-video', + mediaId: media.id, + sourceRange: range, + timelineRange: range, + inputColorSpace: + info.videoColorSpaces.firstOrNull ?? + (info.videoColorSpaces.isNotEmpty + ? policy.unknownVideoColorSpace + : null), + ), + ], + audioLayers: [ + if (audioRange != null) + AudioLayer( + id: 'source-audio', + mediaId: media.id, + sourceRange: audioRange, + timelineRange: audioRange, + ), + ], + ); +} diff --git a/packages/cutdex_preview/pubspec.yaml b/packages/cutdex_preview/pubspec.yaml new file mode 100644 index 0000000..4f79318 --- /dev/null +++ b/packages/cutdex_preview/pubspec.yaml @@ -0,0 +1,20 @@ +name: cutdex_preview +description: Native preview lifecycle, playback and Flutter canvas interactions. +version: 0.1.0 +publish_to: none +resolution: workspace +environment: + sdk: ^3.13.2 +dependencies: + cutdex_native_flutter: + path: ../../.dependencies/cutdex_core/native_flutter + cutdex_core: + path: ../../.dependencies/cutdex_core + flutter: + sdk: flutter + cutdex_timeline_ui: + path: ../cutdex_timeline_ui +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^6.0.0 diff --git a/packages/cutdex_preview/test/editor_preview_test.dart b/packages/cutdex_preview/test/editor_preview_test.dart new file mode 100644 index 0000000..aeafd90 --- /dev/null +++ b/packages/cutdex_preview/test/editor_preview_test.dart @@ -0,0 +1,590 @@ +import 'dart:async'; +import 'dart:io'; + +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + TestWidgetsFlutterBinding.ensureInitialized(); + + for (final scenario in [ + 'initialize', + 'concurrent initialize', + 'close during create', + 'clear active sequence', + 'single timeline seek', + 'rapid timeline seeks', + 'cancelled timeline seek', + 'superseded seek cancellations', + 'cancelled plan update', + 'recover plan update', + 'edit during recovery', + 'recovery fails', + 'recovery remains required', + 'native failure message', + 'native failure snapshots preserve command error', + 'playhead drag skims and settles', + 'cancelled drag release', + 'clear active sequence during drag', + 'cancelled skim during sequence clear', + 'close during play', + ]) { + test(scenario, () async { + const channel = MethodChannel('cutdex_runtime'); + const events = MethodChannel('cutdex_runtime/sessions/preview-sdk'); + final messenger = + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger; + final calls = []; + final creating = Completer(); + final nativePlay = Completer(); + final nativeSeek = Completer(); + final nativeRecovery = Completer(); + var seekCalls = 0; + var cancelNextSeek = false; + var failNextSeek = false; + var cancelNextEndSkimming = false; + var cancelNextPatch = false; + var recoveryRequired = false; + var nativeRevision = 0; + var advanceCancelledSeek = false; + var cancelledSeekCount = 0; + void Function(int)? advanceSeek; + messenger.setMockMethodCallHandler(channel, (call) async { + calls.add(call); + if (scenario == 'close during create' && + call.method == 'createSession') { + await creating.future; + } + if (scenario == 'close during play' && call.method == 'play') { + await nativePlay.future; + } + if (scenario == 'rapid timeline seeks' && + call.method == 'seek' && + ++seekCalls == 1) { + await nativeSeek.future; + } + if (call.method == 'seek' && failNextSeek) { + failNextSeek = false; + throw PlatformException( + code: 'failed', + message: 'Native video decoder returned no frame', + details: { + 'domain': 'render', + 'code': 'failed', + 'platformDetails': { + 'nativeDomain': 'CutdexMedia.CutdexMediaError', + 'nativeCode': 3, + }, + }, + ); + } + if (call.method == 'seek' && cancelNextSeek) { + cancelNextSeek = false; + throw PlatformException( + code: 'cancelled', + message: 'Seek superseded', + ); + } + if (call.method == 'seek' && advanceCancelledSeek) { + cancelledSeekCount++; + if (cancelledSeekCount <= 3) { + scheduleMicrotask( + () => advanceSeek?.call((cancelledSeekCount + 1) * 100), + ); + throw PlatformException( + code: 'cancelled', + message: 'Seek superseded', + ); + } + } + if (call.method == 'endSkimming' && cancelNextEndSkimming) { + cancelNextEndSkimming = false; + throw PlatformException( + code: 'cancelled', + message: 'Skim superseded', + ); + } + if (call.method == 'recover') { + if (scenario == 'edit during recovery') { + await nativeRecovery.future; + } + if (scenario == 'recovery fails') { + throw PlatformException( + code: 'invalidState', + message: 'Playback is still suspended', + details: {'domain': 'playback'}, + ); + } + recoveryRequired = scenario == 'recovery remains required'; + } + if (recoveryRequired && {'load', 'applyPatch'}.contains(call.method)) { + throw PlatformException( + code: 'invalidState', + message: + 'Recover playback before replacing its plan or configuration', + details: {'domain': 'playback'}, + ); + } + if (call.method == 'applyPatch' && cancelNextPatch) { + cancelNextPatch = false; + throw PlatformException( + code: 'cancelled', + message: 'Plan superseded', + ); + } + return switch (call.method) { + 'capabilities' => { + 'contractVersion': 1, + 'features': {'playback.preview': 'available'}, + }, + 'createSession' => {'sessionId': 'preview-sdk'}, + 'snapshot' => { + 'state': 'paused', + 'revision': '$nativeRevision', + 'position': {'numerator': '0', 'denominator': 1}, + 'rate': 0.0, + 'lifecycle': { + 'suspensions': [], + 'requiresRecovery': recoveryRequired, + 'requiresNativeRebuild': recoveryRequired, + 'version': '1', + }, + }, + 'load' => '${++nativeRevision}', + 'applyPatch' => + '${nativeRevision = int.parse((call.arguments as Map)['patch']['revision'] as String)}', + _ => null, + }; + }); + messenger.setMockMethodCallHandler(events, (call) async { + if (call.method == 'listen') { + scheduleMicrotask( + () => messenger.handlePlatformMessage( + events.name, + const StandardMethodCodec().encodeSuccessEnvelope({ + 'type': 'attached', + }), + (_) {}, + ), + ); + } + return null; + }); + addTearDown(() { + messenger.setMockMethodCallHandler(channel, null); + messenger.setMockMethodCallHandler(events, null); + }); + final directory = await Directory.systemTemp.createTemp('sdk-preview-'); + final library = await ProjectFile.create( + Directory('${directory.path}/test.cutdex'), + name: 'Preview', + ); + await library.saveAsset( + AssetDocument( + id: 'asset', + name: 'test.png', + storage: AssetStorage.external, + location: 'file:///test.png', + ), + ); + final sequence = SequenceId('one'); + SequenceId? selectedSequence = sequence; + final clip = ElementId('clip'); + await library.saveTimeline( + TimelineDocument( + id: 'project', + name: 'Preview', + defaultSequenceId: sequence, + payloads: [ + PayloadDocument(id: 'image', type: 'image', assetIds: ['asset']), + ], + sequences: [ + TimelineKernel.importDto( + TimelineDto( + id: sequence, + format: TimelineFormat.fps30, + primaryStorylineId: StorylineId('primary'), + storylines: [ + StorylineDto(id: StorylineId('primary'), elementIds: [clip]), + ], + elements: [ + ElementDto( + id: clip, + structure: ElementStructure.content, + duration: RationalTime.seconds(2), + sourceRange: TimeRange( + start: RationalTime.zero, + duration: RationalTime.seconds(2), + ), + payloadRef: PayloadRef('image'), + ), + ], + ), + ).exportDto(), + ], + ), + ); + final editor = EditorSession( + document: await library.loadTimeline('project'), + persistence: await library.openTimelineSaveSession('project'), + assetUris: {'asset': Uri.parse('file:///test.png')}, + ); + final view = TimelineViewController.editable( + engine: editor.layout(sequence), + geometry: TimelineViewportGeometry(primaryTop: 48, primaryHeight: 72), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 1), + createConnectionId: () => ConnectionId('new-connection'), + createElementId: () => ElementId('new-element'), + commitEdit: (T Function() action) => editor.commit(sequence, action), + ); + advanceSeek = view.seekTo; + final preview = PreviewController( + timeline: editor, + runtime: CutdexRuntime(), + activeSequence: () => selectedSequence, + viewForSequence: (_) => view, + ); + addTearDown(() async { + await preview.close(); + view.dispose(); + await editor.close(); + await library.close(); + await directory.delete(recursive: true); + }); + if (scenario == 'close during create') { + final opening = preview.initialize(); + while (!calls.any((c) => c.method == 'createSession')) { + await Future.delayed(const Duration(milliseconds: 1)); + } + var closed = false; + final closing = preview.close().then((_) => closed = true); + await Future.delayed(Duration.zero); + final closedBeforeNative = closed; + creating.complete(); + await opening; + await closing; + expect( + closedBeforeNative, + isFalse, + reason: 'close must retain native ownership through startup', + ); + expect(calls.where((c) => c.method == 'close'), hasLength(1)); + return; + } + if (scenario == 'concurrent initialize') { + await Future.wait([preview.initialize(), preview.initialize()]); + } else { + await preview.initialize(); + } + expect(preview.error, isNull); + expect(calls.where((c) => c.method == 'createSession'), hasLength(1)); + expect(calls.where((c) => c.method == 'load'), hasLength(1)); + if (scenario == 'native failure snapshots preserve command error') { + failNextSeek = true; + view.seekTo(100); + await Future.delayed(const Duration(milliseconds: 30)); + expect(preview.error.toString(), contains('render/failed')); + final originalError = preview.error; + var notifications = 0; + preview.addListener(() => notifications++); + for (var index = 0; index < 3; index++) { + messenger.handlePlatformMessage( + events.name, + const StandardMethodCodec().encodeSuccessEnvelope({ + 'state': 'failed', + 'revision': '1', + 'position': {'numerator': '0', 'denominator': 1}, + 'rate': 0.0, + 'message': 'Native video decoder returned no frame', + }), + (_) {}, + ); + await Future.delayed(Duration.zero); + } + expect(preview.error, same(originalError)); + expect(notifications, 0); + return; + } + if (scenario == 'native failure message') { + messenger.handlePlatformMessage( + events.name, + const StandardMethodCodec().encodeSuccessEnvelope({ + 'state': 'failed', + 'revision': '1', + 'position': {'numerator': '0', 'denominator': 1}, + 'rate': 0.0, + 'message': 'Decode failed: invalid data', + }), + (_) {}, + ); + await Future.delayed(const Duration(milliseconds: 20)); + expect( + preview.error.toString(), + contains('Decode failed: invalid data'), + ); + return; + } + if (scenario == 'single timeline seek') { + final before = calls.where((c) => c.method == 'seek').length; + view.seekTo(100); + await Future.delayed(const Duration(milliseconds: 160)); + final seeks = calls.where((c) => c.method == 'seek').toList(); + expect(seeks, hasLength(before + 1)); + expect((seeks.last.arguments as Map)['policy'], 'exact'); + expect((seeks.last.arguments as Map).containsKey('exact'), isFalse); + return; + } + if (scenario == 'rapid timeline seeks') { + view.seekTo(100); + while (seekCalls == 0) { + await Future.delayed(Duration.zero); + } + view.seekTo(200); + view.seekTo(300); + nativeSeek.complete(); + await Future.delayed(const Duration(milliseconds: 20)); + final seeks = calls.where((call) => call.method == 'seek').toList(); + expect(seeks, hasLength(2)); + expect((seeks.last.arguments as Map)['time'], { + 'numerator': '300', + 'denominator': TimelineClock.ticksPerSecond, + }); + return; + } + if (scenario == 'cancelled timeline seek') { + cancelNextSeek = true; + final before = calls.where((call) => call.method == 'seek').length; + view.seekTo(100); + await Future.delayed(const Duration(milliseconds: 30)); + expect(preview.error, isNull); + expect( + calls.where((call) => call.method == 'seek'), + hasLength(before + 2), + ); + return; + } + if (scenario == 'superseded seek cancellations') { + advanceCancelledSeek = true; + view.seekTo(100); + await Future.delayed(const Duration(milliseconds: 40)); + expect(preview.error, isNull); + expect(cancelledSeekCount, 4); + expect(view.playheadTick, 400); + return; + } + if ({ + 'recover plan update', + 'edit during recovery', + 'recovery fails', + 'recovery remains required', + }.contains(scenario)) { + // No failed snapshot: lifecycle events may leave playback paused and + // command replies may arrive before the event channel catches up. + recoveryRequired = true; + editor.commands.setTransform( + sequence: sequence, + clip: clip, + tick: 0, + change: (value) => value.copyWith(x: 25), + ); + if (scenario == 'edit during recovery') { + for ( + var attempt = 0; + attempt < 100 && !calls.any((call) => call.method == 'recover'); + attempt++ + ) { + await Future.delayed(const Duration(milliseconds: 1)); + } + final before = calls.length; + editor.commands.setTransform( + sequence: sequence, + clip: clip, + tick: 0, + change: (value) => value.copyWith(x: 50), + ); + await Future.delayed(const Duration(milliseconds: 20)); + final pendingPlanCalls = calls + .skip(before) + .where((call) => {'load', 'applyPatch'}.contains(call.method)) + .length; + nativeRecovery.complete(); + expect(pendingPlanCalls, 0); + } + await Future.delayed(const Duration(milliseconds: 80)); + expect(calls.where((call) => call.method == 'recover'), hasLength(1)); + expect(preview.busy, isFalse); + if (scenario == 'recover plan update' || + scenario == 'edit during recovery') { + expect(preview.error, isNull); + expect(preview.ready, isTrue); + final methods = calls.map((call) => call.method).toList(); + expect( + methods.indexOf('recover'), + greaterThan(methods.indexOf('applyPatch')), + ); + expect( + methods.lastIndexOf('applyPatch'), + greaterThan(methods.indexOf('recover')), + ); + } else { + expect(preview.ready, isFalse); + expect( + preview.error.toString(), + contains( + scenario == 'recovery fails' + ? 'Playback is still suspended' + : 'Playback recovery did not restore availability', + ), + ); + } + return; + } + if (scenario == 'cancelled plan update') { + cancelNextPatch = true; + editor.commands.setTransform( + sequence: sequence, + clip: clip, + tick: 0, + change: (value) => value.copyWith(x: 25), + ); + await Future.delayed(const Duration(milliseconds: 40)); + expect(preview.error, isNull); + expect(preview.ready, isTrue); + expect( + calls.where((call) => call.method == 'applyPatch'), + hasLength(1), + ); + expect(calls.where((call) => call.method == 'load'), hasLength(2)); + return; + } + if (scenario == 'playhead drag skims and settles') { + view.beginScrubbing(); + view.seekTo(100); + view.seekTo(200); + await Future.delayed(const Duration(milliseconds: 20)); + view.endScrubbing(); + for ( + var attempt = 0; + attempt < 100 && !calls.any((call) => call.method == 'endSkimming'); + attempt++ + ) { + await Future.delayed(const Duration(milliseconds: 1)); + } + expect( + calls.where((call) => call.method == 'beginSkimming'), + hasLength(1), + ); + expect( + (calls.singleWhere((call) => call.method == 'beginSkimming').arguments + as Map)['mode'], + 'audible', + ); + expect(calls.any((call) => call.method == 'skim'), isTrue); + expect( + calls.where((call) => call.method == 'endSkimming'), + hasLength(1), + ); + expect(calls.where((call) => call.method == 'seek'), isEmpty); + return; + } + if (scenario == 'cancelled drag release') { + cancelNextEndSkimming = true; + view.beginScrubbing(); + view.seekTo(100); + await Future.delayed(const Duration(milliseconds: 10)); + view.endScrubbing(); + await Future.delayed(const Duration(milliseconds: 30)); + expect(preview.error, isNull); + expect( + calls.where((call) => call.method == 'endSkimming'), + hasLength(1), + ); + expect(calls.where((call) => call.method == 'seek'), isNotEmpty); + return; + } + if (scenario == 'clear active sequence during drag' || + scenario == 'cancelled skim during sequence clear') { + view.beginScrubbing(); + view.seekTo(100); + for ( + var attempt = 0; + attempt < 100 && !calls.any((call) => call.method == 'skim'); + attempt++ + ) { + await Future.delayed(const Duration(milliseconds: 1)); + } + cancelNextEndSkimming = + scenario == 'cancelled skim during sequence clear'; + selectedSequence = null; + editor.notifyListeners(); + await Future.delayed(const Duration(milliseconds: 20)); + expect( + calls.where((call) => call.method == 'endSkimming'), + hasLength(1), + ); + expect(preview.error, isNull); + return; + } + if (scenario == 'close during play') { + final playing = preview.togglePlayback(); + while (!calls.any((c) => c.method == 'play')) { + await Future.delayed(Duration.zero); + } + final closing = preview.close(); + await Future.delayed(const Duration(milliseconds: 5)); + final closedDuringPlayback = calls.any((c) => c.method == 'close'); + nativePlay.complete(); + await Future.wait([playing, closing]); + expect(closedDuringPlayback, isFalse); + return; + } + if (scenario == 'clear active sequence') { + selectedSequence = null; + editor.notifyListeners(); + await Future.delayed(Duration.zero); + expect(preview.durationTick, 0); + expect(preview.ready, isFalse); + expect(preview.canPlay, isFalse); + expect(preview.visuals, isEmpty); + final seeks = calls.where((c) => c.method == 'seek').length; + view.seekTo(100); + await Future.delayed(const Duration(milliseconds: 60)); + expect(calls.where((c) => c.method == 'seek'), hasLength(seeks)); + return; + } + editor.commands.setTransform( + sequence: sequence, + clip: clip, + tick: 0, + change: (value) => value.copyWith(x: 25), + ); + for ( + var attempt = 0; + attempt < 100 && !calls.any((c) => c.method == 'applyPatch'); + attempt++ + ) { + await Future.delayed(const Duration(milliseconds: 5)); + } + expect(calls.where((c) => c.method == 'applyPatch'), hasLength(1)); + expect(calls.where((c) => c.method == 'createSession'), hasLength(1)); + expect(calls.where((c) => c.method == 'load'), hasLength(1)); + await preview.close(); + expect(calls.where((c) => c.method == 'close'), hasLength(1)); + expect(editor.acceptsEdits, isTrue); + final previous = editor.version; + editor.commands.setCanvas(const ProjectCanvas(800, 600)); + expect(editor.version, isNot(previous)); + // Closing preview neither disposes the host view nor its project session. + view.seekTo(10); + expect(view.playheadTick, 10); + }); + } +} diff --git a/packages/cutdex_preview/test/preview_geometry_test.dart b/packages/cutdex_preview/test/preview_geometry_test.dart new file mode 100644 index 0000000..6381585 --- /dev/null +++ b/packages/cutdex_preview/test/preview_geometry_test.dart @@ -0,0 +1,392 @@ +import 'package:cutdex_core/execution.dart'; + +import 'dart:ui'; + +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + test('grouped geometry hit testing, alignment and corner drags use output coordinates', () { + RenderAutomation scalar(String target, double value) => + RenderAutomation(target: target, defaultValue: value); + const canvas = Size(200, 100); + final evaluated = ExecutionEvaluator().visualAt( + VisualLayer( + id: 'clip', + mediaId: 'media', + sourceRange: MediaRange( + start: MediaTime(0, 1), + duration: MediaTime(10, 1), + ), + timelineRange: MediaRange( + start: MediaTime(0, 1), + duration: MediaTime(10, 1), + ), + groups: [ + RenderCompositingGroup( + id: 'outer', + automation: [scalar('scale.x', 2)], + ), + RenderCompositingGroup( + id: 'inner', + automation: [scalar('rotation', 37)], + ), + ], + ), + seconds: 0, + source: RenderSize(20, 10), + canvas: RenderSize(200, 100), + ); + final visual = PreviewVisual( + layerId: 'clip', + elementId: ElementId('clip'), + lane: 0, + transform: const ClipTransform(), + geometry: PreviewGeometry.fromExecution(evaluated), + ); + final geometry = visual.geometry; + expect(geometry.contains(geometry.center), isTrue); + expect( + geometry.contains(geometry.bounds.topLeft + const Offset(.1, .1)), + isFalse, + ); + for (var corner = 0; corner < 4; corner++) { + final points = geometry.corners; + final fixed = points[(corner + 2) % 4]; + final target = fixed + (points[corner] - fixed) * 1.5; + final value = scaleFromCorner(visual, corner, target, canvas); + final after = geometry.changed(visual.transform, value, canvas); + expect( + (after.corners[(corner + 2) % 4] - fixed).distance, + lessThan(1e-8), + ); + expect((after.corners[corner] - target).distance, lessThan(1e-8)); + final edgeX = + (points[1] - points[0]) * (corner == 0 || corner == 3 ? -1 : 1); + final edgeY = (points[3] - points[0]) * (corner < 2 ? -1 : 1); + final freeTarget = fixed + edgeX * 1.7 + edgeY * .8; + final free = scaleFromCorner( + visual, + corner, + freeTarget, + canvas, + locked: false, + ); + final resized = geometry.changed(visual.transform, free, canvas); + expect(free.scale, closeTo(1.7, 1e-9)); + expect(free.scaleY, closeTo(.8, 1e-9)); + expect((resized.corners[corner] - freeTarget).distance, lessThan(1e-8)); + expect( + (resized.corners[(corner + 2) % 4] - fixed).distance, + lessThan(1e-8), + ); + } + final aligned = alignToCanvas(visual, canvas, CanvasAlignment.left); + expect( + geometry.changed(visual.transform, aligned, canvas).bounds.left, + closeTo(0, 1e-9), + ); + }); + test('corner snapping preserves opposite anchor and scale lock', () { + const canvas = Size(1000, 600); + final visual = PreviewVisual( + layerId: 'clip', + elementId: ElementId('clip'), + lane: 0, + transform: const ClipTransform(), + geometry: const PreviewGeometry( + center: Offset(500, 300), + size: Size(300, 200), + ), + ); + final fixed = visual.geometry.corners[0]; + final target = fixed + const Offset(647, 431.3333333333333); + final (locked, snap) = snapScaleToCanvas( + visual, + 2, + target, + canvas, + 6, + locked: true, + ); + final after = visual.geometry.changed(visual.transform, locked, canvas); + expect(after.bounds.right, closeTo(1000, 1e-9)); + expect(locked.scale, closeTo(locked.scaleY, 1e-9)); + expect((after.corners[0] - fixed).distance, lessThan(1e-9)); + expect(snap.verticalGuides, contains(1000)); + final (free, _) = snapScaleToCanvas( + visual, + 2, + const Offset(997, 597), + canvas, + 6, + locked: false, + ); + final freeGeometry = visual.geometry.changed( + visual.transform, + free, + canvas, + ); + expect(freeGeometry.bounds.bottomRight, const Offset(1000, 600)); + expect(freeGeometry.corners[0], fixed); + expect(free.scale, isNot(closeTo(free.scaleY, 1e-6))); + }); + test( + 'independent scale survives corner drags and all rotated alignments', + () { + const canvas = Size(1920, 1080); + final visual = PreviewVisual( + layerId: 'video', + elementId: ElementId('clip'), + lane: 0, + transform: const ClipTransform(scale: 2, scaleY: .5, rotation: 37), + geometry: const PreviewGeometry( + center: Offset(700, 400), + size: Size(800, 150), + rotation: 37, + ), + ); + final points = visual.geometry.selectionCorners; + final value = scaleFromCorner( + visual, + 0, + points[2] + (points[0] - points[2]) * 2, + canvas, + ); + expect(value.scale, closeTo(4, 1e-9)); + expect(value.scaleY, closeTo(1, 1e-9)); + final changed = visual.geometry.changed(visual.transform, value, canvas); + expect(changed.size.aspectRatio, closeTo(800 / 150, 1e-9)); + for (final alignment in CanvasAlignment.values) { + final aligned = alignToCanvas(visual, canvas, alignment); + final bounds = visual.geometry + .changed(visual.transform, aligned, canvas) + .bounds; + final coordinate = switch (alignment) { + CanvasAlignment.left => bounds.left, + CanvasAlignment.horizontalCenter => + bounds.center.dx - canvas.width / 2, + CanvasAlignment.right => bounds.right - canvas.width, + CanvasAlignment.top => bounds.top, + CanvasAlignment.verticalCenter => + bounds.center.dy - canvas.height / 2, + CanvasAlignment.bottom => bounds.bottom - canvas.height, + }; + expect(coordinate, closeTo(0, 1e-9)); + expect(aligned.scaleY, .5); + expect(aligned.rotation, 37); + } + expect(const ClipTransform(scaleY: 0).isValid, isFalse); + expect(const ClipTransform(scaleY: double.nan).isValid, isFalse); + }, + ); + test('all four video corners scale around their opposite after rotation', () { + const canvas = Size(1920, 1080); + for (final angle in [0.0, 37.0, 90.0, -133.0]) { + final visual = PreviewVisual( + layerId: 'video', + elementId: ElementId('clip'), + lane: 0, + transform: ClipTransform(rotation: angle), + geometry: PreviewGeometry( + center: const Offset(960, 540), + size: const Size(600, 400), + rotation: angle, + ), + ); + for (var corner = 0; corner < 4; corner++) { + final points = visual.geometry.corners; + final fixed = points[(corner + 2) % 4]; + final pointer = fixed + (points[corner] - fixed) * 1.5; + final value = scaleFromCorner(visual, corner, pointer, canvas); + final after = visual.geometry.changed(visual.transform, value, canvas); + expect(value.scale, closeTo(1.5, 1e-9)); + final resized = after.corners; + expect((resized[(corner + 2) % 4] - fixed).distance, lessThan(1e-8)); + expect((resized[corner] - pointer).distance, lessThan(1e-8)); + expect(value.rotation, angle); + expect(after.size.aspectRatio, visual.geometry.size.aspectRatio); + } + } + }); + + test( + 'all six canvas guides snap within tolerance and reject distant points', + () { + const canvas = Size(1000, 600); + for (final x in [103.0, 503.0, 903.0]) { + final snap = snapToCanvas( + PreviewGeometry(center: Offset(x, 250), size: const Size(200, 100)), + canvas, + 6, + ); + expect(snap.verticalGuides, [ + x == 103 + ? 0 + : x == 503 + ? 500 + : 1000, + ]); + expect(snap.delta.dx, -3); + } + for (final y in [53.0, 303.0, 553.0]) { + final snap = snapToCanvas( + PreviewGeometry(center: Offset(340, y), size: const Size(200, 100)), + canvas, + 6, + ); + expect(snap.horizontalGuides, [ + y == 53 + ? 0 + : y == 303 + ? 300 + : 600, + ]); + expect(snap.delta.dy, -3); + } + final far = snapToCanvas( + const PreviewGeometry(center: Offset(340, 220), size: Size(200, 100)), + canvas, + 6, + ); + expect(far.verticalGuides, isEmpty); + expect(far.horizontalGuides, isEmpty); + }, + ); + + test( + 'a full canvas shows all six alignments without choosing just one guide', + () { + final snap = snapToCanvas( + const PreviewGeometry(center: Offset(503, 298), size: Size(1000, 600)), + const Size(1000, 600), + 6, + ); + expect(snap.delta, const Offset(-3, 2)); + expect(snap.verticalGuides, [0, 500, 1000]); + expect(snap.horizontalGuides, [0, 300, 600]); + }, + ); + + test( + 'nearby candidates do not steal the locked anchor within release distance', + () { + const canvas = Size(1000, 600); + // An almost full-width video has three competing matches near the middle. + PreviewGeometry at(double x) => + PreviewGeometry(center: Offset(x, 220), size: const Size(992, 100)); + var snap = snapToCanvas(at(496), canvas, 6); // Left edge at zero. + expect(snap.verticalGuides, [0]); + for (final x in [499.0, 503.0, 500.0, 505.9, 499.0]) { + snap = snapToCanvas(at(x), canvas, 6, previous: snap); + expect(x + snap.delta.dx, closeTo(496, 1e-9)); + expect(snap.verticalGuides, [0]); + } + // The old left-edge match exceeds 10px; the right-edge match can now win. + snap = snapToCanvas(at(506.1), canvas, 6, previous: snap); + expect(snap.delta.dx, closeTo(-2.1, 1e-9)); + expect(snap.verticalGuides, [1000]); + }, + ); + + test('entry and release are separate, use raw pointer geometry, and work on both axes', () { + const canvas = Size(1000, 600); + PreviewGeometry at(double x, double y) => + PreviewGeometry(center: Offset(x, y), size: const Size(200, 100)); + var snap = snapToCanvas(at(506, 306), canvas, 6); + expect(snap.delta, const Offset(-6, -6)); + snap = snapToCanvas(at(509, 311), canvas, 6, previous: snap); + expect(snap.delta, const Offset(-9, 0)); + expect(snap.verticalGuides, [500]); + expect(snap.horizontalGuides, isEmpty); + snap = snapToCanvas(at(511, 309), canvas, 6, previous: snap); + expect(snap.delta, Offset.zero); + snap = snapToCanvas(at(509, 306), canvas, 6, previous: snap); + expect(snap.delta, const Offset(0, -6)); // 9px cannot reacquire x. + }); + + test('a fresh gesture does not inherit a previous edge lock and ties prefer center', () { + const canvas = Size(1000, 600); + const geometry = PreviewGeometry( + center: Offset(502, 220), + size: Size(992, 100), + ); + final snap = snapToCanvas(geometry, canvas, 6); + expect(snap.delta.dx, -2); // Center and right edge are equally close. + expect(snap.verticalGuides, [500]); + }); + + test( + 'screen-scaled thresholds preserve entry and release after canvas resize', + () { + for (final scale in [.25, .5, 1.0, 2.0]) { + PreviewGeometry at(double screenDelta) => PreviewGeometry( + center: Offset(500 + screenDelta / scale, 220), + size: const Size(200, 100), + ); + var snap = snapToCanvas(at(5), const Size(1000, 600), 6 / scale); + snap = snapToCanvas( + at(9), + const Size(1000, 600), + 6 / scale, + previous: snap, + ); + expect(snap.delta.dx * scale, closeTo(-9, 1e-9)); + snap = snapToCanvas( + at(11), + const Size(1000, 600), + 6 / scale, + previous: snap, + ); + expect(snap.verticalGuides, isEmpty); + } + }, + ); + + test('guides describe corrected bounds, including rotation, not nearby candidates', () { + final snap = snapToCanvas( + const PreviewGeometry( + center: Offset(503, 303), + size: Size(600, 1000), + rotation: 90, + ), + const Size(1000, 600), + 6, + ); + expect(snap.verticalGuides, [0, 500, 1000]); + expect(snap.horizontalGuides, [0, 300, 600]); + final narrow = snapToCanvas( + const PreviewGeometry(center: Offset(501, 220), size: Size(4, 100)), + const Size(1000, 600), + 6, + ); + expect(narrow.verticalGuides, [ + 500, + ]); // Deduplicated, no almost-aligned extras. + }); + + test( + 'rotated hit testing uses the video rectangle, not its bounding box', + () { + const geometry = PreviewGeometry( + center: Offset(100, 100), + size: Size(100, 40), + rotation: 45, + ); + expect(geometry.contains(const Offset(100, 100)), isTrue); + expect( + geometry.contains(geometry.bounds.topLeft + const Offset(1, 1)), + isFalse, + ); + expect( + geometry.contains( + geometry.center + geometry.rotate(const Offset(40, 15)), + ), + isTrue, + ); + }, + ); +} diff --git a/packages/cutdex_preview/test/preview_transform_session_test.dart b/packages/cutdex_preview/test/preview_transform_session_test.dart new file mode 100644 index 0000000..acc705e --- /dev/null +++ b/packages/cutdex_preview/test/preview_transform_session_test.dart @@ -0,0 +1,196 @@ +import 'dart:async'; +import 'dart:ui'; + +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + test('late render completion cannot overwrite a replacement context or disposed session', () async { + final b = _Backend()..delayRendering = true; + final first = b.begin(); + await first.prepared; + first.update(const ClipTransform(x: .1)); + final late = b.rendered.single; + b.session.cancelAll(); + final next = b.begin(); + await next.prepared; + next.update(const ClipTransform(x: .2)); + late(); + expect(b.session.displayedValueFor(ElementId('clip'))!.x, 0); + b.rendered.last(); + expect(b.session.displayedValueFor(ElementId('clip'))!.x, .2); + b.session.cancelAll(); + b.session.dispose(); + expect(b.rendered.last, returnsNormally); + }); + + test('preparation happens once and renders latest state rather than released history', () async { + final b = _Backend()..gate = Completer(); + for (final x in [.1, .2, .3]) { + final edit = b.begin(); + edit.update(ClipTransform(x: x)); + await edit.end(); + } + expect(b.commits, [.1, .2, .3]); + expect(b.preparations, 1); + expect(b.updates, isEmpty); + b.gate!.complete(); + await b.session.settled; + expect(b.updates, [.3]); + expect(b.session.hasPending, isFalse); + expect(b.session.hasContext, isTrue); + b.session.cancelAll(); + }); + + test( + 'next drag renders immediately without closing or re-preparing the frame', + () async { + final b = _Backend(); + final first = b.begin(); + await first.prepared; + first.update(const ClipTransform(x: .1)); + await first.end(); + final second = b.begin(); + second.update(const ClipTransform(x: .2)); + expect(b.updates, [.1, .2]); + expect(b.preparations, 1); + expect(b.cancellations, 0); + second.cancel(); + expect(b.updates.last, .1); + expect(b.commits, [.1]); + expect(b.cancellations, 0); + b.session.cancelAll(); + }, + ); + + test( + 'completed edit callbacks cannot update or cancel a new pointer', + () async { + final b = _Backend(); + final first = b.begin(); + first.update(const ClipTransform(x: .1)); + final done = first.end(); + expect(first.end(), same(done)); + final second = b.begin(); + second.update(const ClipTransform(x: .2)); + first.cancel(); + first.update(const ClipTransform(x: 9)); + expect(second.cancelled, isFalse); + expect(b.visual().transform.x, .2); + await second.end(); + await b.session.settled; + expect(b.commits, [.1, .2]); + b.session.cancelAll(); + }, + ); + + test('cancelling preparation rejects its late result without touching replacement', () async { + final b = _Backend()..gate = Completer(); + final first = b.begin(); + first.cancel(); + final second = b.begin(); + second.update(const ClipTransform(x: .2)); + b.gate!.complete(); + expect(await first.prepared, isFalse); + expect(await second.prepared, isTrue); + expect(b.updates, [.2]); + expect(b.commits, isEmpty); + b.session.cancelAll(); + }); + + test('preparation failure reports preview error but never rolls back authored history', () async { + final b = _Backend() + ..gate = Completer() + ..failPrepare = true; + final first = b.begin(); + first.update(const ClipTransform(x: .1)); + await first.end(); + b.gate!.complete(); + expect(await first.prepared, isFalse); + expect(b.errors.single, isA()); + expect(b.commits, [.1]); + b.failPrepare = false; + final retry = b.begin(); + expect(await retry.prepared, isTrue); + retry.cancel(); + }); + + test('changes to another layer retain earlier layer overrides', () async { + final b = _Backend()..gate = Completer(); + final first = b.begin(); + first.update(const ClipTransform(x: .1)); + await first.end(); + final second = b.session.begin(b.visual('other'))!; + second.update(const ClipTransform(x: .2)); + b.gate!.complete(); + await second.prepared; + expect(b.layers, {'clip': .1, 'other': .2}); + second.cancel(); + expect(b.layers, {'clip': .1, 'other': 0.0}); + b.session.cancelAll(); + }); + + test('invalid input does not enter projected geometry', () async { + final b = _Backend(); + final edit = b.begin(); + for (final value in [ + const ClipTransform(x: double.nan), + const ClipTransform(scale: 0), + ]) { + expect(() => edit.update(value), throwsArgumentError); + expect(b.visual().transform.x, 0); + } + edit.cancel(); + await edit.prepared; + }); +} + +class _Backend { + bool delayRendering = false; + final rendered = []; + Completer? gate; + bool failPrepare = false; + int preparations = 0; + int cancellations = 0; + final commits = []; + final updates = []; + final layers = {}; + final errors = []; + late final session = PreviewTransformSession( + canBegin: () => true, + select: (_) {}, + prepareNative: () async { + preparations++; + await gate?.future; + if (failPrepare) throw StateError('prepare failed'); + return true; + }, + updateNative: (id, value, onRendered) { + updates.add(value.x); + layers[id.value] = value.x; + rendered.add(onRendered); + if (!delayRendering) onRendered(); + }, + commit: (_, value) => commits.add(value.x), + cancelNative: () { + cancellations++; + }, + failed: errors.add, + changed: () {}, + ); + PreviewVisual visual([String id = 'clip']) => session.project([ + PreviewVisual( + layerId: id, + elementId: ElementId(id), + lane: 0, + transform: const ClipTransform(), + geometry: const PreviewGeometry( + center: Offset(500, 300), + size: Size(300, 200), + ), + ), + ], const Size(1000, 600)).single; + PreviewTransformEdit begin() => session.begin(visual())!; +} diff --git a/packages/cutdex_preview/test/selection_decoration_test.dart b/packages/cutdex_preview/test/selection_decoration_test.dart new file mode 100644 index 0000000..c4c2b7c --- /dev/null +++ b/packages/cutdex_preview/test/selection_decoration_test.dart @@ -0,0 +1,66 @@ +import 'dart:math' as math; + +import 'package:cutdex_preview/src/selection_decoration.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + TestWidgetsFlutterBinding.ensureInitialized(); + test('font changes invalidate and release the cached label', () async { + var changes = 0; + final label = SelectionLabel(onChanged: () => changes++); + final first = label.layout('100 × 200'); + await TestWidgetsFlutterBinding.ensureInitialized().handleSystemMessage({ + 'type': 'fontsChange', + }); + expect(changes, 1); + expect(first.debugDisposed, isTrue); + expect(label.layout('100 × 200'), isNot(same(first))); + label.dispose(); + await TestWidgetsFlutterBinding.ensureInitialized().handleSystemMessage({ + 'type': 'fontsChange', + }); + expect(changes, 1); + }); + + test('label layout is reused and replaced paragraphs are released', () { + final label = SelectionLabel(); + final first = label.layout('100 × 200'); + expect(label.layout('100 × 200'), same(first)); + final second = label.layout('200 × 300'); + expect(second, isNot(same(first))); + expect(first.debugDisposed, isTrue); + label.dispose(); + expect(second.debugDisposed, isTrue); + }); + + for (final angle in [0.0, math.pi / 4, math.pi / 2]) { + test('corner sectors follow rotated bounds at $angle', () { + const center = Offset(200, 200); + Offset rotate(Offset p) => + center + + Offset( + p.dx * math.cos(angle) - p.dy * math.sin(angle), + p.dx * math.sin(angle) + p.dy * math.cos(angle), + ); + final corners = [ + const Offset(-75, -50), + const Offset(75, -50), + const Offset(75, 50), + const Offset(-75, 50), + ].map(rotate).toList(); + for (var i = 0; i < 4; i++) { + final direction = corners[i] - center; + final outward = corners[i] + direction / direction.distance * 16; + final inward = corners[i] - direction / direction.distance * 16; + expect(selectionResizeCorner(corners, corners[i]), i); + expect(selectionResizeCorner(corners, outward), -1); + expect(selectionRotationCorner(corners, outward), i); + expect(selectionRotationCorner(corners, inward), -1); + expect(selectionCursor(corners, outward), SystemMouseCursors.grab); + } + expect(selectionRotationCorner(corners, center), -1); + expect(selectionRotationCorner(corners, const Offset(500, 500)), -1); + }); + } +} diff --git a/packages/cutdex_preview/test/source_preview_test.dart b/packages/cutdex_preview/test/source_preview_test.dart new file mode 100644 index 0000000..2ea100d --- /dev/null +++ b/packages/cutdex_preview/test/source_preview_test.dart @@ -0,0 +1,601 @@ +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; + +import 'package:cutdex_core/editor/commands.dart'; + +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + TestWidgetsFlutterBinding.ensureInitialized(); + const channel = MethodChannel('cutdex_runtime'); + const events = MethodChannel('cutdex_runtime/sessions/source-test'); + final messenger = + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger; + final calls = []; + final asset = (id: 'source', location: 'file:///source.mov'); + final info = MediaInfo( + duration: MediaTime(10, 1), + videoTrackCount: 1, + videoTrackIds: [1], + audioTrackCount: 1, + audioTrackIds: [1], + isProtected: false, + videoDisplaySizes: [RenderSize(1080, 1920)], + audioTracks: [ + MediaTrackTiming(start: MediaTime(1, 1), duration: MediaTime(8, 1)), + ], + ); + Completer? blockedProbe; + Completer? blockedPlay; + Completer? blockedSkim; + Completer? blockedSeek; + setUp(() { + calls.clear(); + blockedProbe = null; + blockedPlay = null; + blockedSkim = null; + blockedSeek = null; + messenger.setMockMethodCallHandler(events, (call) async { + if (call.method == 'listen') { + scheduleMicrotask( + () => messenger.handlePlatformMessage( + events.name, + const StandardMethodCodec().encodeSuccessEnvelope({ + 'type': 'attached', + }), + (_) {}, + ), + ); + } + return null; + }); + messenger.setMockMethodCallHandler(channel, (call) async { + calls.add(call); + switch (call.method) { + case 'seek': + await blockedSeek?.future; + return null; + case 'skim': + await blockedSkim?.future; + return null; + case 'probe': + await blockedProbe?.future; + return { + 'duration': info.duration.toMap(), + 'videoTrackCount': 1, + 'videoTrackIds': [1], + 'audioTrackCount': 1, + 'audioTrackIds': [1], + 'isProtected': false, + 'videoDisplaySizes': [ + {'width': 1080.0, 'height': 1920.0}, + ], + 'audioTracks': [ + { + 'start': MediaTime(1, 1).toMap(), + 'duration': MediaTime(8, 1).toMap(), + }, + ], + }; + case 'play': + await blockedPlay?.future; + return null; + case 'createSession': + return {'sessionId': 'source-test'}; + case 'load': + return '1'; + case 'thumbnail': + throw PlatformException(code: 'unsupported'); + default: + return null; + } + }); + }); + tearDown(() { + messenger.setMockMethodCallHandler(channel, null); + messenger.setMockMethodCallHandler(events, null); + }); + + SourcePreviewController source() => SourcePreviewController( + frameDuration: RationalTime(1, 30), + rememberPosition: (_) {}, + loadMedia: (action) => + action(MediaReference(id: asset.id, uri: Uri.parse(asset.location))), + ); + Future waitForSeek() async { + for (var i = 0; i < 100; i++) { + if (calls.any((c) => c.method == 'seek')) return; + await Future.delayed(const Duration(milliseconds: 1)); + } + fail('Native seek did not start'); + } + + List seekTimes() => [ + for (final call in calls.where((c) => c.method == 'seek')) + MediaTime.fromMap((call.arguments as Map)['time']).seconds, + ]; + + test( + 'interactive source navigation merges 100 targets before pause', + () async { + final controller = source(); + await controller.initialize(Future.value()); + calls.clear(); + final block = blockedSeek = Completer(); + final first = controller.seekInteractive(TimelineClock.ticksPerSecond); + await waitForSeek(); + final requests = >[first]; + for (var i = 1; i <= 100; i++) { + requests.add( + controller.seekInteractive( + TimelineClock.ticksPerSecond + + i * TimelineClock.ticksPerSecond ~/ 30, + ), + ); + } + final pause = controller.control(SourcePreviewAction.pause); + expect(seekTimes(), [1]); + expect(controller.positionTick, TimelineClock.ticksPerSecond * 13 ~/ 3); + expect(calls.where((c) => c.method == 'pause'), isEmpty); + block.complete(); + blockedSeek = null; + await Future.wait([...requests, pause]); + expect(seekTimes(), [1, closeTo(13 / 3, 1e-6)]); + expect(calls.last.method, 'pause'); + expect(controller.error, isNull); + await controller.close(); + controller.dispose(); + }, + ); + + test('exact source commands fence replaceable UI navigation', () async { + final controller = source(); + await controller.initialize(Future.value()); + calls.clear(); + final block = blockedSeek = Completer(); + final first = controller.seekInteractive(TimelineClock.ticksPerSecond); + await waitForSeek(); + final latest = controller.seekInteractive(2 * TimelineClock.ticksPerSecond); + final exact = controller.control( + SourcePreviewAction.seek, + at: CommandTime(3, 1), + ); + final after = controller.seekInteractive(4 * TimelineClock.ticksPerSecond); + final afterLatest = controller.seekInteractive( + 5 * TimelineClock.ticksPerSecond, + ); + block.complete(); + blockedSeek = null; + await Future.wait([first, latest, exact, after, afterLatest]); + expect(seekTimes(), [1, 2, 3, 5]); + expect(controller.positionTick, 5 * TimelineClock.ticksPerSecond); + await controller.close(); + controller.dispose(); + }); + + test( + 'closing drains interactive navigation before releasing source', + () async { + final controller = source(); + await controller.initialize(Future.value()); + calls.clear(); + final block = blockedSeek = Completer(); + final seeking = controller.seekInteractive(TimelineClock.ticksPerSecond); + await waitForSeek(); + final seekFailure = expectLater(seeking, throwsStateError); + final closing = controller.close(); + final closeFailure = expectLater(closing, throwsStateError); + await Future.delayed(Duration.zero); + expect(calls.where((c) => c.method == 'close'), isEmpty); + block.complete(); + blockedSeek = null; + await Future.wait([seekFailure, closeFailure]); + expect(calls.where((c) => c.method == 'close'), hasLength(1)); + controller.dispose(); + }, + ); + + test('navigation and scrubbing settle in either handoff direction', () async { + final controller = source(); + await controller.initialize(Future.value()); + calls.clear(); + final block = blockedSeek = Completer(); + final navigating = controller.seekInteractive(TimelineClock.ticksPerSecond); + await waitForSeek(); + controller.beginScrubbing(); + controller.updateScrubbing(2 * TimelineClock.ticksPerSecond); + block.complete(); + blockedSeek = null; + await navigating; + expect(controller.positionTick, 2 * TimelineClock.ticksPerSecond); + // Navigation ends the scrub at its final target before the new exact frame. + await controller.seekInteractive(3 * TimelineClock.ticksPerSecond); + expect(controller.positionTick, 3 * TimelineClock.ticksPerSecond); + final end = calls.singleWhere((c) => c.method == 'endSkimming'); + expect(MediaTime.fromMap((end.arguments as Map)['time']).seconds, 2); + expect(calls.last.method, 'seek'); + expect(seekTimes(), [1, 3]); + expect(controller.error, isNull); + await controller.close(); + controller.dispose(); + }); + + test('local image preview survives native thumbnail failure', () async { + final directory = await Directory.systemTemp.createTemp('source-image-'); + final file = File('${directory.path}/image.png'); + await file.writeAsBytes( + base64Decode( + 'iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAEElEQVR4nGP4z8AARAwQCgAf7gP9i18U1AAAAABJRU5ErkJggg==', + ), + ); + final controller = SourcePreviewController( + frameDuration: RationalTime(1, 30), + rememberPosition: (_) {}, + loadMedia: (action) => + action(MediaReference(id: 'image', uri: file.uri, isImage: true)), + ); + try { + await controller.initialize(Future.value()); + expect(calls.where((call) => call.method == 'thumbnail'), hasLength(1)); + expect(controller.error, isNull); + expect(controller.busy, isFalse); + expect(controller.image, isNotNull); + expect(controller.aspectRatio, 1); + expect(controller.session, isNull); + } finally { + await controller.close(); + controller.dispose(); + await directory.delete(recursive: true); + } + }); + + for (final mode in SkimmingMode.values) { + test( + '${mode.name} source scrubbing previews latest target and settles once', + () async { + final controller = SourcePreviewController( + frameDuration: RationalTime(1, 30), + policy: PreviewPolicy(skimmingMode: mode), + rememberPosition: (_) {}, + loadMedia: (action) => action( + MediaReference(id: asset.id, uri: Uri.parse(asset.location)), + ), + ); + await controller.initialize(Future.value()); + calls.clear(); + blockedSkim = Completer(); + controller.beginScrubbing(); + controller.updateScrubbing(TimelineClock.ticksPerSecond); + for (var i = 0; i < 100 && !calls.any((c) => c.method == 'skim'); i++) { + await Future.delayed(const Duration(milliseconds: 1)); + } + expect(calls.where((c) => c.method == 'skim'), hasLength(1)); + controller.updateScrubbing(2 * TimelineClock.ticksPerSecond); + controller.updateScrubbing(3 * TimelineClock.ticksPerSecond); + await Future.delayed(Duration.zero); + blockedSkim!.complete(); + await Future.delayed(const Duration(milliseconds: 20)); + final skims = calls.where((c) => c.method == 'skim').toList(); + expect(skims, hasLength(2)); + expect( + MediaTime.fromMap((skims.last.arguments as Map)['time']).seconds, + 3, + ); + controller.endScrubbing(); + await Future.delayed(const Duration(milliseconds: 20)); + expect(calls.where((c) => c.method == 'beginSkimming'), hasLength(1)); + final begin = calls.singleWhere((c) => c.method == 'beginSkimming'); + expect((begin.arguments as Map)['mode'], mode.name); + expect((begin.arguments as Map).containsKey('audible'), isFalse); + final end = calls.singleWhere((c) => c.method == 'endSkimming'); + expect(MediaTime.fromMap((end.arguments as Map)['time']).seconds, 3); + expect(calls.where((c) => c.method == 'seek'), isEmpty); + expect(controller.error, isNull); + await controller.close(); + controller.dispose(); + }, + ); + } + + test( + 'explicit source controls pause before playback events and drain on close', + () async { + var retained = false; + final controller = SourcePreviewController( + frameDuration: RationalTime(1, 30), + rememberPosition: (_) {}, + loadMedia: (action) async { + retained = true; + try { + return await action( + MediaReference(id: asset.id, uri: Uri.parse(asset.location)), + ); + } finally { + retained = false; + } + }, + ); + await controller.initialize(Future.value()); + await controller.control(SourcePreviewAction.play); + await controller.control(SourcePreviewAction.pause); + expect(calls.where((c) => c.method == 'pause'), hasLength(1)); + await controller.control(SourcePreviewAction.seek, at: CommandTime(3, 2)); + expect(controller.positionTick, 3 * TimelineClock.ticksPerSecond ~/ 2); + await expectLater( + controller.control(SourcePreviewAction.seek, at: CommandTime(11, 1)), + throwsA(isA()), + ); + blockedPlay = Completer(); + final playing = controller.control(SourcePreviewAction.play); + final expected = expectLater(playing, throwsStateError); + for ( + var i = 0; + i < 100 && calls.where((c) => c.method == 'play').length < 2; + i++ + ) { + await Future.delayed(const Duration(milliseconds: 2)); + } + final closing = controller.close(); + final closed = closing.catchError((Object e) { + expect(e, isA()); + }); + expect(retained, true); + blockedPlay!.complete(); + await expected; + await closed; + expect(retained, false); + expect(calls.where((c) => c.method == 'close'), hasLength(1)); + controller.dispose(); + }, + ); + + test( + 'source opens paused at saved position and retains access until close', + () async { + var retained = false; + var remembered = 0; + final controller = SourcePreviewController( + frameDuration: RationalTime(1, 25), + positionTick: 2 * TimelineClock.ticksPerSecond, + rememberPosition: (tick) => remembered = tick, + loadMedia: (action) async { + retained = true; + try { + return await action( + MediaReference(id: asset.id, uri: Uri.parse(asset.location)), + ); + } finally { + retained = false; + } + }, + ); + await controller.initialize(Future.value()); + expect(retained, isTrue); + expect(controller.aspectRatio, 1080 / 1920); + expect(controller.durationTick, 10 * TimelineClock.ticksPerSecond); + expect(calls.where((c) => c.method == 'play'), isEmpty); + final seek = calls.singleWhere((c) => c.method == 'seek'); + expect(MediaTime.fromMap((seek.arguments as Map)['time']).seconds, 2); + await controller.togglePlayback(); + expect(calls.where((c) => c.method == 'play'), hasLength(1)); + await controller.close(); + expect(retained, isFalse); + expect(remembered, 2 * TimelineClock.ticksPerSecond); + expect(calls.where((c) => c.method == 'close'), hasLength(1)); + controller.dispose(); + }, + ); + + test( + 'switching away during probe never creates or plays a stale session', + () async { + blockedProbe = Completer(); + var released = false; + final controller = SourcePreviewController( + frameDuration: RationalTime(1, 30), + rememberPosition: (_) {}, + loadMedia: (action) async { + try { + return await action( + MediaReference(id: asset.id, uri: Uri.parse(asset.location)), + ); + } finally { + released = true; + } + }, + ); + final opening = controller.initialize(Future.value()); + for (var i = 0; i < 100 && !calls.any((c) => c.method == 'probe'); i++) { + await Future.delayed(const Duration(milliseconds: 1)); + } + expect(calls.any((c) => c.method == 'probe'), isTrue); + final closing = controller.close(); + blockedProbe!.complete(); + await opening; + await closing; + expect(released, isTrue); + expect( + calls.where((c) => c.method == 'createSession' || c.method == 'play'), + isEmpty, + ); + controller.dispose(); + }, + ); + + test('concurrent source startup retains only one loader', () async { + blockedProbe = Completer(); + var loads = 0; + final controller = SourcePreviewController( + frameDuration: RationalTime(1, 30), + rememberPosition: (_) {}, + loadMedia: (action) async { + loads++; + return action( + MediaReference(id: asset.id, uri: Uri.parse(asset.location)), + ); + }, + ); + final first = controller.initialize(Future.value()); + final second = controller.initialize(Future.value()); + while (loads == 0) { + await Future.delayed(Duration.zero); + } + final closing = controller.close(); + blockedProbe!.complete(); + await Future.wait([first, second, closing]); + controller.dispose(); + expect(loads, 1); + }); + + test('host position callback failure cannot leak source access', () async { + var retained = false; + final failure = StateError('host callback failed'); + final controller = SourcePreviewController( + frameDuration: RationalTime(1, 30), + rememberPosition: (_) => throw failure, + loadMedia: (action) async { + retained = true; + try { + return await action( + MediaReference(id: asset.id, uri: Uri.parse(asset.location)), + ); + } finally { + retained = false; + } + }, + ); + await controller.initialize(Future.value()); + await expectLater(controller.close(), throwsA(same(failure))); + expect(retained, isFalse); + expect(calls.where((c) => c.method == 'close'), hasLength(1)); + controller.dispose(); + }); + + test( + 'close retains source access until in-flight playback finishes', + () async { + blockedPlay = Completer(); + var retained = false; + final controller = SourcePreviewController( + frameDuration: RationalTime(1, 30), + rememberPosition: (_) {}, + loadMedia: (action) async { + retained = true; + try { + return await action( + MediaReference(id: asset.id, uri: Uri.parse(asset.location)), + ); + } finally { + retained = false; + } + }, + ); + await controller.initialize(Future.value()); + final playing = controller.togglePlayback(); + while (!calls.any((c) => c.method == 'play')) { + await Future.delayed(Duration.zero); + } + final closing = controller.close(); + await Future.delayed(const Duration(milliseconds: 5)); + final retainedDuringPlayback = retained; + final closedDuringPlayback = calls.any((c) => c.method == 'close'); + blockedPlay!.complete(); + await Future.wait([playing, closing]); + controller.dispose(); + expect(retainedDuringPlayback, isTrue); + expect(closedDuringPlayback, isFalse); + expect(retained, isFalse); + }, + ); + + test( + 'audio sample endpoints stay exact without rounding beyond the track', + () { + final audio = MediaInfo( + duration: MediaTime(10, 1), + videoTrackCount: 0, + videoTrackIds: [], + audioTrackCount: 1, + audioTrackIds: [1], + isProtected: false, + audioTracks: [ + MediaTrackTiming( + start: MediaTime(0, 1), + duration: MediaTime(479999, 48000), + ), + ], + ); + final plan = sourcePreviewPlan( + MediaReference(id: asset.id, uri: Uri.parse(asset.location)), + audio, + RationalTime(1, 30), + ); + expect(plan.audioLayers.single.sourceRange.duration.numerator, 479999); + expect(plan.audioLayers.single.sourceRange.duration.denominator, 48000); + }, + ); + + test( + 'reported unknown source color uses the timeline Rec.709 viewing fallback', + () { + final unknown = MediaInfo( + duration: info.duration, + videoTrackCount: 1, + videoTrackIds: [1], + audioTrackCount: 0, + audioTrackIds: [], + isProtected: false, + audioTracks: [], + videoColorSpaces: [null], + ); + final plan = sourcePreviewPlan( + MediaReference(id: asset.id, uri: Uri.parse(asset.location)), + unknown, + RationalTime(1, 30), + ); + expect(plan.visualLayers.single.inputColorSpace, RenderColorSpace.rec709); + expect(plan.toneMapping, const RenderToneMapping.none()); + }, + ); + + test('HDR source preview explicitly maps to SDR', () { + final hdr = MediaInfo( + duration: info.duration, + videoTrackCount: 1, + videoTrackIds: [1], + audioTrackCount: 0, + audioTrackIds: [], + isProtected: false, + audioTracks: [], + videoColorSpaces: [RenderColorSpace.rec2020HLG], + ); + final plan = sourcePreviewPlan( + MediaReference(id: asset.id, uri: Uri.parse(asset.location)), + hdr, + RationalTime(1, 30), + ); + expect(plan.toneMapping.sourceHeadroom, 4); + expect( + plan.visualLayers.single.inputColorSpace, + RenderColorSpace.rec2020HLG, + ); + }); + + test('source plan preserves native aspect and delayed audio alignment', () { + final plan = sourcePreviewPlan( + MediaReference(id: asset.id, uri: Uri.parse(asset.location)), + info, + RationalTime(1, 25), + ); + expect(plan.renderSize.width, 1080); + expect(plan.renderSize.height, 1920); + expect(plan.audioLayers.single.sourceRange.start.seconds, 1); + expect(plan.audioLayers.single.timelineRange.start.seconds, 1); + expect(plan.audioLayers.single.timelineRange.duration.seconds, 8); + }); +} diff --git a/packages/cutdex_timeline_ui/.gitignore b/packages/cutdex_timeline_ui/.gitignore new file mode 100644 index 0000000..dd5eb98 --- /dev/null +++ b/packages/cutdex_timeline_ui/.gitignore @@ -0,0 +1,31 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +.flutter-plugins-dependencies +/build/ +/coverage/ diff --git a/packages/cutdex_timeline_ui/.metadata b/packages/cutdex_timeline_ui/.metadata new file mode 100644 index 0000000..9738ff5 --- /dev/null +++ b/packages/cutdex_timeline_ui/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "058e0af2c2b57e369d905a03ac9748b0ebf543c6" + channel: "stable" + +project_type: package diff --git a/packages/cutdex_timeline_ui/ARCHITECTURE.md b/packages/cutdex_timeline_ui/ARCHITECTURE.md new file mode 100644 index 0000000..11a4070 --- /dev/null +++ b/packages/cutdex_timeline_ui/ARCHITECTURE.md @@ -0,0 +1,284 @@ +# Timeline UI Architecture + +[简体中文](ARCHITECTURE.zh-CN.md) + +## Authority boundary + +`TimelineScrollbars` is a Camera adapter, not a `ScrollController` or document +owner. Bounds are cached by Layout version, opened storyline and geometry. +Refreshing them reads O(P + S) partition/stack aggregates plus Kernel's storyline +span query; it never enumerates bodies. Camera-only updates use O(1) scrollbar +work. A drag freezes its range and grab offset, and is invalidated by external +camera changes, root/geometry changes, controller replacement or viewport resize. + +The dependency and authority flow is one-way: + +```text +TimelineView -> TimelineViewController -> TimelineViewportEngine + -> LayoutVersion + -> TimelineVersion +``` + +- Kernel owns time, topology, edit validity, transactions, and history. +- Layout owns physical lanes, avoidance, drop resolution, and geometry. +- UI owns camera state, paint appearance, focus, and pointer lifecycle. +- UI never writes DTOs, derives lanes, or repairs a rejected edit. + +`TimelineViewController` is a presentation controller, not a second timeline +state machine. Read-only views retain the supplied Layout root. Editable views +bind to `TimelineLayoutEngine` with a published definition component root, so +the engine retains the canonical projection across undo/redo. UI never keeps a +parallel projection history. All publication uses Layout's prepared edit APIs. + +## Viewport camera lifecycle + +The host session saves and restores each timeline's presentation state before +publishing that session to the view. `TimelineViewport` supplies the measured +dimensions and cached content bounds. `timeline_camera_layout.dart` resolves +an immutable camera result from those bounds and the previous camera; it has +no widget, persistence or notification side effects. Initialization, restored +views, resize, focus, pan and zoom share this calculation. + +`configureViewport` marks changed bounds for preparation. During layout, +`prepareViewport` applies the resolved camera silently before the ruler, +scrollbars and content paint. Only a fresh, uninitialized empty view receives +the twenty-second default scale; restored and cached views retain their scale. +Zero-sized layouts defer initialization. Unchanged bounds skip preparation. + +After layout, `reconcileViewport` publishes any pending change without moving +the already prepared camera again. Repeating preparation or reconciliation is +idempotent. The scheduled callback belongs to the captured controller and must +still match the mounted viewport; it cannot update a replacement controller. +Camera-only reconciliation does not invalidate inspected editing values or add +document history. Camera constraint calculation is constant work and has no ticker. + +## Connected-clip selection drag + +`TimelineInteractionRegion` adapts pointer, focus and Escape events. It records +the initial grab before Flutter's pan threshold, while `TimelineViewportDragAnchor` +resolves every update with the current camera. Input rounds to the nearest +runtime tick; frame/sample snapping is not implemented yet. + +- Same-side avoidance uses `TimelineLayoutPreview.connectedSelection` and + `LayoutRigidConnectionMove.previewResolved`. +- Crossing sides uses `LayoutConnectedSideMove`, including time translation. +- Entering the Primary band uses `LayoutPrimaryDropEdit` with a version-bound + `LayoutPrimaryDropTarget`. Pointer front/back halves choose before/after + (midpoint chooses after); outside the span clamps to begin/end. No split/gap IDs + or time-insertion commands are available on this drag/drop path. + UI supplies movement roots ordered by start time (same-time roots within a + stack retain semantic order). Roots are inserted back-to-back without a + container or inter-root gaps, preserving the grabbed member's pointer offset. + Selected descendants are carried, not inserted a second time. One private + Kernel transaction publishes the whole group. Overlap coverage uses the frontmost + serial body, matching paint order, and still selects only a member boundary. + Same-time roots on different sides have no implied serial order and remain + rejected in UI; the Layout API accepts a caller-supplied explicit order. +- Each valid frame renders the prepared canonical Layout version, hiding the + active body's landing projection. Its themed pointer ghost and connection + line remain visible; the line uses the prepared connection and the ghost edge. + Primary insertion has no connection line and outlines each serial landing with + the shared transparent, rounded reservation border, including incoming connected + clips. Leaving Primary removes those incoming reservations. Occupancy still drives avoidance and + exact commit. No separate UI collision solver or lane state exists. +- A release with unchanged camera/coordinates commits that exact prepared root. + A changed release is re-resolved first. Invalid drops retain the original + placement, omit ghosts and create no history. +- Escape, pointer cancellation, focus loss, app deactivation, controller + replacement and disposal discard private previews. External coordinated + history invalidates a stale drag; an unmatched Kernel root fails closed. +- Call `synchronize()` after host-side edits to notify the view. Editable + `applyLayout`/`replaceLayout` accept only the engine's published root. + +`LayoutMovementPlan` normalizes same-definition Primary, connected and mixed +selections into direct roots, independent accompanying roots, carried descendants +and a body-to-root map. `LayoutMovementBounds` supplies the shared zero-origin +constraint for both pointer projection and connected edit APIs. UI chooses the +explicit insertion order and rejects expanded components and ambiguous ordering; +it does not traverse connection ancestry or calculate a second movement limit. +Instance-context editing remains unsupported by this gesture path. + +## Explicit selection commands + +Explicit `cutSelectionAtPlayhead`/`deleteSelection` use version-bound +`LayoutBladeEdit.selectionAtTime`/`LayoutCascadeDeleteEdit.selection`. Selection +planning consumes Kernel local times, ownership intervals and anchor queries; +no lane, media mapping or ownership rule is implemented in UI. The controller +supplies fresh IDs for blade and publishes exactly one prepared result. +Blade adds right halves to selection; delete clears it. Unsupported mixed +selections (transition items, expanded components, foreign/stale handles or +instance contexts) reject as a whole. Non-intersecting selected clips are not +cut; endpoint-only cuts and empty selections create no history. A right half +requires an exact Primary anchor at the cut; the existing Kernel rule that the +left connection point remain inside the left half still applies. Invalid source, +transition or anchor constraints reject atomically, without repair or extension. +The controller's element-ID factory is never passed to the drag session. + +## Keyframe Editing + +Hosts enable `TimelineInteractionRegion.keyframes` alongside +`TimelineView.showKeyframes`. A marker click selects its merged channels and +seeks to its exact time. Horizontal dragging uses `LayoutKeyframeMove` for +frame snapping, clip limits, source mapping and collision validation. Vertical +pointer movement does not alter the key or clip. Values and interpolation are +preserved. Dragging clamps to the intersection of the moved channels' neighboring +key ranges, retaining at least one project frame of spacing. A range with no +available frame leaves the key in place. Direct edits outside these bounds are +rejected; dragging against a neighbor remains a valid preview. + +The same private preview drives the marker and, through +`TimelineViewController.keyframePreviewVersion`, the host's video renderer. +The playhead remains fixed during dragging. The host samples temporary values +at that time and renders them through its interactive frame context, coalescing +pending renders to the latest values. Only published edits update the playback +plan; pointer updates must not replace the playback session. +Release publishes one history entry; Escape, pointer cancellation, focus loss +and external history discard it. Delete applies to selected key channels, not +the enclosing clip. Held or repeated source visits remain selectable for seeking +but reject independent moves rather than changing other occurrences implicitly. + +## Edge Trimming + +`TimelineInteractionRegion` passes the theme's inner edge hit band to `beginDrag`. +The closest edge wins on narrow clips (midpoint: trailing). Content, gaps and +collapsed containers expose grips; instance-context/expanded components and +transition items do not. A multi-selection edge edits only the hit clip. +Move and trim are mutually exclusive private sessions under the same controller +lifecycle. `isDragging` covers either; `isTrimming` and `trimEdge` distinguish trim. + +Each pointer/Camera update resolves a duration from the immutable grab anchor and +base duration, at runtime-tick precision, then calls `LayoutIntervalEdit.previewTrim`. +This pure-Dart entry point constrains source availability and chooses the Kernel +leading/trailing or container-view trim. Serial trim ripples the suffix; connected +left trim keeps its right edge. When its start passes the original anchor, Layout +resolves a valid storyline anchor and reattaches before shortening in the same +private transaction. Kernel validates source, retime, transition and connection +constraints. Invalid outgoing anchors reject atomically; children are not deleted. +Layout handles changed intervals and avoidance. The painter displays only this +canonical preview and its connection lines, without a move ghost or projection. +Unchanged release commits exactly that prepared version. Invalid/no-motion release +creates no history. Camera navigation, edge scrolling, cancellation, focus loss +and external root invalidation share the move lifecycle. Frame/sample snapping, +roll/slip/slide gestures and transition resizing are not part of this basic trim. +Grip width/hit band and outline colors come from `TimelineThemeData`; put the +extension above both the input region and painter when customizing edge behavior. + +## Primary-to-connected drag + +`beginDrag` / `updateDrag` / `finishDrag` allow Primary reordering with connected +descendants, but ordinary dragging into or out of Primary requires each moved +root to have no outgoing connections. Container contents do not count as outer +connections. Both transfer commands enforce this using Kernel's direct anchor +index; UI cannot bypass the precondition. `LayoutPrimaryDetachEdit` +rejects the ownership conversion, not pointer movement: owners with connections +use the same free ghost and Primary reservation path as gaps. A valid Primary +drop moves that reservation; an off-axis release does not publish. +For an eligible unconnected source, `LayoutPrimaryDetachEdit` +composes Kernel link and placement primitives into one unpublished result. A→B→C +becomes A→C when B is detached; its old span is not replaced by a gap. Anchoring uses the +post-ripple rope, including any adjacent transition adjustment. Connection IDs +come from the host's `createConnectionId` factory and are reused during a gesture. + +The detached body receives pointer priority; passively translated suffix bodies +do not. Their canonical time index is updated before collision discovery. The same +prepared Kernel/Layout bundle supplies preview and drop. Returning to Primary +rebuilds the boundary reorder from the original version while carrying forward +the generated/extended gap in the same transaction. The source's own boundaries +are no-ops only when there is no pending gap edit. Cancel and invalid drop +leave history unchanged. Tail dragging clamps the accepted start to the current +tail T. Only when the clip's start reaches T does the same terminal gap extend +by the moved clip's duration. Moving within the gap, even with the clip's end +beyond T, does not extend it. +Layout retains the last raw/accepted start and gap extent in its preview; later +pointer deltas advance from that accepted start. Repeated frames cannot consume +the newly extended tail. Gap end is monotonic during connected dragging, including +backward movement. Existing terminal gaps retain their IDs across gestures. +Otherwise IDs come from the host element-ID factory. A sole Primary clip can +use T=0. For connected multi-selections, the rightmost movement root's start +triggers and clamps at T; every root receives the same translation. The gap +extends by max(root end) - max(root start), covering the group's remaining +time envelope without waiting for its leftmost root. Committing publishes the gap and +connections together; cancel publishes neither. Moving a connected clip away +does not delete its committed gap. Other missing-anchor cases remain rejected. Pointer +ghosts and connection lines remain visible; connected landing bodies remain hidden. + +Both membership directions share canonical projection and passive-ripple targeting. +Primary drop invokes only Kernel `splice` or `unlink` by index, never blade. Explicit +arbitrary-time insertion remains separate. Display-only Primary ghosts never enter +the Layout solver; pointer offsets remain independent of hidden snapped landings. + +## Rendering contract + +### Drag edge scrolling + +One vsync ticker runs only for an active single-pointer clip drag inside an edge +zone. Defaults: 48 logical pixels and maximum 600 logical pixels/second per axis; +zone width is capped at half the viewport dimension. For signed edge penetration +`p ∈ [-1,1]`, `v = vmax * p * |p|` and each frame applies +`ΔcameraPixels = v * min(Δseconds, 0.05)`. Corners combine axes. Zero extent/speed +disables scrolling. Idle, ruler, marquee and hand navigation never start it; +suspended frames do not produce catch-up jumps. + +Each tick calls existing controller `panBy` once, re-resolving the retained grab +and pointer with the current Camera. No history or second placement implementation +is added. Ghosts and connection lines use the same preview; release commits that +latest prepared root. Cancel retains the scrolled Camera but not the edit. Camera +bounds remain those of manual pan; scrolling does not bypass semantic validation. + +Leaving the edge/view, release, cancellation, focus/lifecycle loss, controller +replacement, external drag cancellation and a second touch stop the ticker. +Viewport resize cancels the old-coordinate gesture after layout; dispose releases +the ticker. Input work per frame is O(1), plus existing affected-region preview +and resident paint costs; no traversal of total N is introduced. + +The input region uses one ScaleGestureRecognizer for clip drag, touch pinch and +native trackpad navigation, with explicit press-time routing for ruler seek and +hand navigation. Pointer cancellation/focus loss discard edit state. All combined +pan/zoom transforms call `controller.navigate` and then the existing Layout +Camera APIs; the time under the old focal point moves to the new focal point. + +`TimelineRuler` paints a bounded number of adaptive elapsed-time ticks proportional +to viewport width. It never walks Kernel elements. Its playhead is presentation +state, has no undo history, and does not implement playback. The ruler is fixed +vertically while the clip surface can pan vertically. + +The painter requests one transient `TimelineViewportFrame` during paint and +consumes it immediately. The frame references a reusable buffer and must not be +retained across another projection. One canvas surface paints all resident +items; element count does not affect the widget-tree size. + +For `V` resident items: + +```text +widget build = O(1) +camera update without active drag = O(1) +resident cache hit = O(1) projection + O(V) paint +resident cache miss = Layout viewport query + O(V) projection/paint +hit test = O(V), reverse paint order +active drag update = Layout target/semantic preview cost + viewport paint +``` + +Media thumbnails, waveforms, text, selections, and drag overlays must extend +this bulk rendering pipeline or use bounded viewport overlays. They must not +introduce one persistent widget per project element. + +All painters and overlays consume `TimelineThemeData`. The widget layer +resolves the Flutter theme once per build and passes immutable visual tokens to +the painter; the resident-item loop performs no inherited-theme lookup. + +Opaque Primary payload classification reuses the host's exact +`LayoutMediaClassifier`. Connected audio/visual classification is read from +Layout's solved placement class; +structural gap/container state is read from the exact Kernel version. UI never +parses `PayloadRef` or recursively inspects a container. + +## Publication contract + +- `applyLayout(result)` is for an adjacent, atomically published Layout update. + The viewport cache survives only when Layout proves it is geometry-neutral. +- `replaceLayout(version)` explicitly invalidates the cache for opening another + scene, non-adjacent history movement, or a global rebuild. +- Camera changes re-resolve an active drag, otherwise only notify painting. + Neither path creates Kernel history. +- A compound clip opens by supplying its independent Storyline/Layout scene to + the controller; it is not expanded inside the parent timeline surface. diff --git a/packages/cutdex_timeline_ui/ARCHITECTURE.zh-CN.md b/packages/cutdex_timeline_ui/ARCHITECTURE.zh-CN.md new file mode 100644 index 0000000..0a3c5ca --- /dev/null +++ b/packages/cutdex_timeline_ui/ARCHITECTURE.zh-CN.md @@ -0,0 +1,212 @@ +# 时间线 UI 架构 + +[English](ARCHITECTURE.md) + +## 权威边界 + +`TimelineScrollbars` 只是 Camera 适配器,不持有独立的 `ScrollController` 或文档。 +范围按 Layout 版本、打开的故事线和几何配置缓存;更新时读取 O(P + S) 个分区/栈聚合, +另查询 Kernel 故事线 span,不遍历片段。仅 Camera 变化时,滚动条工作量为 O(1)。 +拖动固定范围和抓取偏移;外部 Camera 变化、根/几何变化、替换 controller 或视口尺寸 +变化都会使旧拖动失效。 + +依赖与权威数据流保持单向: + +```text +TimelineView -> TimelineViewController -> TimelineViewportEngine + -> LayoutVersion + -> TimelineVersion +``` + +- Kernel 负责时间、拓扑、编辑合法性、事务和历史。 +- Layout 负责物理 lane、避让、放置解析和几何。 +- UI 负责 Camera 状态、绘制外观、焦点和指针生命周期。 +- UI 不直接写 DTO、不自行推导 lane,也不修复被 Kernel 拒绝的编辑。 + +`TimelineViewController` 是表现层 controller,不是第二套时间线状态机。只读视图保留宿主 +提供的 Layout root;可编辑视图绑定已经发布 definition component root 的 +`TimelineLayoutEngine`,由引擎在撤销/重做时保留权威投影。UI 不另建投影历史,所有提交 +都经过 Layout 已准备好的编辑入口。 + +## 视口相机生命周期 + +宿主会话在发布到界面前保存、恢复每条时间线的表现状态。`TimelineViewport` 提供实际 +视口尺寸和缓存的内容边界。`timeline_camera_layout.dart` 根据这些不可变边界和原相机 +计算新的相机结果,不访问 Widget、持久化或通知系统。初始化、恢复视图、窗口调整、 +居中、平移和缩放共用这套计算。 + +`configureViewport` 将变化的边界标记为待准备。布局期间,`prepareViewport` 在标尺、 +滚动条和内容绘制前静默应用结果。只有尚未初始化的新空时间线使用默认二十秒比例, +恢复或缓存的视图保留原比例。零尺寸布局推迟初始化,边界未变化时跳过准备。 + +布局结束后,`reconcileViewport` 只发布待通知的变化,不再次移动已经准备好的相机。 +重复准备或发布不会产生额外变化。帧回调捕获其所属 controller,只有视口仍挂载且绑定 +同一个 controller 时才发布,不能操作替换后的 controller。仅相机变化不使属性编辑值 +失效,也不新增文档历史。相机边界计算为常数成本,不启动 ticker。 + +## 连接片段选区拖拽 + +`TimelineInteractionRegion` 转接指针、焦点和 Esc 事件。在 Flutter 判定拖拽阈值前记录 +按下位置,之后通过 `TimelineViewportDragAnchor` 使用当前相机重新解析每次输入。 +时间取最近的运行时 tick;本轮尚未接入帧/采样吸附。 + +- 同侧避让复用 `TimelineLayoutPreview.connectedSelection` 和 + `LayoutRigidConnectionMove.previewResolved`。 +- 跨上下侧复用 `LayoutConnectedSideMove`,时间平移和换侧一起处理。 +- 进入主故事线使用 `LayoutPrimaryDropEdit` 和绑定版本的 `LayoutPrimaryDropTarget`。 + 鼠标前/后半区决定插在目标前/后,中点归后半区;超出首尾则钳制到首尾边界。 + 拖拽没有切割/gap ID 工厂,不调用按时间插入命令。 + UI 按开始时间生成明确的移动根顺序,同一栈内同时间的根沿用语义顺序;各根紧接插入, + 不创建容器或根之间的 gap,并保留被抓片段在指针下的偏移。选中的后代随父级携带, + 不重复插入。整个组在一个私有 Kernel 事务内发布;重叠区按绘制顺序选择最前方串行片段,仍只解析成员边界。 + 不同侧、同一开始时间的根没有默认先后顺序,UI 仍拒绝隐式排列;Layout API 支持调用方明确指定顺序。 +- 每个有效预览帧绘制已经准备好的权威 Layout 版本,但隐藏活动片段的落点投影。 + 跟随指针的浮动片段及连接线保持可见,连接线读取权威预览的连接关系并连到浮动片段边缘; + 主故事线插入预览不画连接线,而是在各串行落点绘制统一的透明背景、圆角边框占位, + 包括从连接区域拖入的片段;再次离开主轴时移除这些新落点占位。占位仍驱动避让和精确提交。 + UI 不另建碰撞求解器或 lane 状态。 +- 放置时若相机/坐标未变,直接提交该预览的同一版本根;有变化则先重新解析。无效位置 + 保留原占位,不绘制浮动预览,不产生历史。 +- Esc、指针取消、焦点丢失、应用失活、替换 controller 和释放都会丢弃私有预览。外部协调 + 历史跳转会使旧拖拽失效;如果 Kernel 没有匹配的 Layout 根,则拒绝操作。 +- 宿主在外部编辑后调用 `synchronize()` 通知视图。可编辑模式的 `applyLayout` 和 + `replaceLayout` 仅接受引擎当前已发布的根。 + +`LayoutMovementPlan` 将同一 definition 内的主片段、连接片段及混合选区归一为直接移动根、 +独立随动根、携带后代和片段到移动根的映射。`LayoutMovementBounds` 为指针投影和连接 +编辑 API 提供共用的零点约束。UI 选择明确的插入顺序,拒绝展开组件及有歧义的排序, +不再遍历连接祖先或重复计算移动下限。当前手势路径仍不支持实例上下文编辑。 + +## 显式选区命令 + +显式 `cutSelectionAtPlayhead`/`deleteSelection` 使用绑定版本的 +`LayoutBladeEdit.selectionAtTime`/`LayoutCascadeDeleteEdit.selection`。选区计划只读取 +Kernel 局部时间、ownership 区间与锚点查询;UI 不实现 lane、媒体映射或归属规则。 +Controller 为切割提供新 ID,一次发布一个准备好的结果。切割后右半段加入选区,删除后 +清空选区。不支持的混合选区(转场项、展开组件、外部/失效 handle、实例上下文)整体拒绝。 +不与播放头内部相交的选中片段不切割;端点切割和空选区不产生历史。右半段必须在切割点 +找到精确的主片段锚点;Kernel 现有的“左半段连接点必须留在左半段内部”约束继续适用。 +源范围、转场或锚点不合法则原子拒绝,不隐式修复或延长时间线。Controller 的片段 ID 工厂 +不会传入拖拽会话。 + +## 关键帧编辑 + +宿主同时开启 `TimelineInteractionRegion.keyframes` 与 `TimelineView.showKeyframes`。 +点击菱形选中其合并通道并定位播放头;水平拖动由 `LayoutKeyframeMove` 统一处理帧吸附、 +片段范围、源时间映射与目标冲突,纵向移动不改变时间和值。拖动范围取所有被移动通道 +相邻关键帧范围的交集,与邻帧至少保留一个项目帧间隔。没有可用帧位置时保持原位, +拖到相邻边界仍是有效预览;直接提交越界位置会被拒绝。值和插值方式保持不变。 + +菱形与宿主视频渲染共用私有预览,视频通过 `keyframePreviewVersion` 读取临时版本。 +拖动期间播放头保持不动,宿主在该时刻采样临时参数,通过交互式帧上下文渲染; +待渲染请求合并为最新值。仅已发布的编辑更新播放计划,指针更新不替换播放会话。 +松手提交一条历史;Esc、指针取消、失焦和外部历史切换丢弃预览。Delete 只作用于选中 +关键帧,不删除片段。定格或重复源时间仍可选中定位,但拒绝独立移动。 + +## 边缘裁剪 + +`TimelineInteractionRegion` 将主题中的内侧边缘命中宽度传入 `beginDrag`。窄片段取最近 +边缘,中点归右边缘。内容、gap 和未展开容器显示手柄;实例上下文、展开组件和转场项 +不提供裁剪手柄。多选状态下拖一个边缘只裁剪命中的片段。 +移动和裁剪是互斥的私有会话,共用 controller 生命周期;`isDragging` 包含两者, +`isTrimming` 和 `trimEdge` 用于区分裁剪。 + +每次指针/Camera 更新从不可变抓取点及原时长求出目标时长,精确到运行时 tick,随后通过 +`LayoutIntervalEdit.previewTrim` 统一限制源范围并选择 Kernel 左/右裁剪或容器视图裁剪。 +串行裁剪磁性移动后缀;连接片段左裁剪保持右边缘。新起点越过原锚点后,由 Layout 查询 +合法的故事线锚点,在同一私有事务中先重新连接再裁剪。Kernel 校验源范围、变速、转场 +和连接点约束;子连接 anchor 失效时整体拒绝,不删除子片段。Layout 负责区间变化与避让,Painter 只显示权威预览 +及连接线,不添加移动浮影或落点投影。坐标未变时精确提交准备好的同一版本,无效或无 +位移松手不创建历史。Camera、边缘滚动、取消、失焦、外部根失效共用移动的生命周期。 +本次基础裁剪不包含帧/采样吸附、roll/slip/slide 手势或转场缩放。手柄宽度、命中宽度及 +边框颜色统一来自 `TimelineThemeData`;自定义命中行为时,在输入区域和 Painter 上方 +统一安装主题扩展。 + +## 主片段拖出成为连接片段 + +`beginDrag` / `updateDrag` / `finishDrag` 允许主轴内重排时携带连接后代,但普通拖入或拖出 +主轴要求每个移动根都没有对外连接片段。容器内部内容不算外部连接。两个转移命令统一读取 +Kernel 的直接锚点索引检查,UI 不能绕过此前置条件。 +此限制只针对归属转换,不禁止指针移动:带连接片段的主片段与 gap 共用自由拖影和主轴 +占位路径,合法主轴放置切换占位,离轴释放不提交。 +`LayoutPrimaryDetachEdit` 把 Kernel 的 link 和 placement 原语组合成一个未发布结果。 +从 A→B→C 拖出 B 后变成 A→C,不在 B 原位置补 gap。锚点根据闭合后的 rope 解析,包含相邻转场 +调整。连接 ID 由宿主的 `createConnectionId` 工厂提供,同一手势中复用。 + +被拖出的片段获得主动拖拽优先级,随主线前移的后缀片段不会获得这一优先级;其权威时间索引在 +碰撞查询前增量更新。预览与放置共用同一个已准备的 Kernel/Layout 根组合。拖回主线时, +从原始版本重建边界重排,同时在同一事务中保留手势已生成或扩展的 gap。 +只有不存在待提交的 gap 编辑时,片段自身前后边界才为空操作。取消和无效放置不写历史。 +尾部拖拽把实际开始位置限制在当前尾点 T;仅当片段起点到达 T 时,同一个尾部 gap 才增加 +一段片段时长。在 gap 内部移动时,即使片段终点已超过 T,也不触发延长。 +Layout 预览记录上次指针目标、实际开始位置和 gap 范围;后续使用指针增量继续移动,因此 +重复刷新不会自动消耗扩展后的尾点。连接拖拽中 gap 只增长,回拖也不自动缩短。 +已有尾部 gap 跨手势保持 ID;新 ID 来自宿主元素 ID 工厂。唯一主片段可以使用 T=0, +连接片段多选以最右侧移动根的起点触发并钳制到 T,所有根保持同一平移量。 +gap 增量为「所有根的最晚终点 − 最晚起点」,覆盖整组选区伸出尾点的时间范围, +不再等待最左侧根到达尾点。提交时 gap 与连接一起发布,取消不发布;后续移走连接片段 +不删除已提交的 gap。其他缺少锚点的情况仍拒绝。鼠标跟随片段与连接线可见,连接区域的落点投影不显示。 + +两种主线 membership 移动共用权威投影和被动 ripple 落点处理。主线拖拽只按索引调用 Kernel +`splice` 或 `unlink`,不调用 blade;显式任意时间插入仍是独立 API。仅用于显示的主片段 ghost +不进入 Layout solver,鼠标抓取偏移与吸附后的不可见落点分开处理。 + +## 渲染约束 + +### 拖拽边缘自动滚动 + +只有单鼠标/单指片段拖拽位于边缘区时,才运行一个显示帧 ticker。默认边缘宽 48 逻辑像素, +每轴最高 600 逻辑像素/秒;边缘宽度不超过该维度的一半。带符号深入比例为 `p ∈ [-1,1]` 时, +`v = vmax * p * |p|`,每帧 `ΔcameraPixels = v * min(Δseconds, 0.05)`;角落同时移动两轴。 +宽度或速度设零可禁用。空闲、标尺、框选、抓手导航不启动 ticker;停顿不补算成大幅跳跃。 + +每帧只调用一次现有 controller `panBy`,使用最新 Camera 重新解析保留的抓取点和鼠标位置, +不新增历史或放置实现。鼠标跟随片段、连接线共用该预览,松手提交最新已准备根。取消保留 +滚动后的 Camera,但不提交编辑。Camera 范围与手动平移一致,滚动不绕过语义合法性校验。 + +离开边缘/视口、松手、取消、失焦/失活、替换 controller、外部取消拖拽及第二根手指加入 +都会停止 ticker。视口尺寸变化后取消旧坐标下的手势,dispose 释放 ticker。每帧输入计算 +为 O(1),另加已有受影响区域预览和可见内容绘制成本,不遍历总元素 N。 + +输入区用一个 ScaleGestureRecognizer 处理片段拖拽、触屏双指和原生触控板导航,在按下时 +明确区分标尺定位和抓手平移。指针取消/失焦会丢弃编辑状态。组合平移和缩放统一调用 +`controller.navigate`,再调用 Layout 已有 Camera API,使旧焦点下的时间移动到新焦点。 + +`TimelineRuler` 仅绘制与 viewport 宽度成比例、有数量上界的自适应经过时间刻度,不遍历 +Kernel 元素。播放位置属于表现层状态,不进入撤销历史,也不实现播放。标尺垂直固定, +片段区域可以垂直平移。 + +Painter 在绘制期间请求一个临时 `TimelineViewportFrame` 并立即消费。该 frame 引用可复用 +buffer,不能跨下一次 projection 保留。一个 Canvas surface 绘制全部 resident 元素; +工程元素总数不会改变 Widget tree 大小。 + +对于 resident 元素数 `V`: + +```text +Widget build = O(1) +没有活动拖拽时的 Camera 更新 = O(1) +resident cache 命中 = O(1) projection + O(V) 绘制 +resident cache 未命中 = Layout viewport query + O(V) projection/绘制 +hit test = O(V),按绘制顺序反向扫描 +活动拖拽更新 = Layout 目标解析/语义预览成本 + viewport 绘制 +``` + +媒体缩略图、波形、文字、选择状态和拖拽 overlay 必须扩展这条批量渲染管线,或使用数量 +受 viewport 限制的 overlay;不能为工程中的每个元素创建持久 Widget。 + +所有 Painter 和 overlay 都消费 `TimelineThemeData`。Widget 层每次 build 只解析一次 +Flutter 主题,并把不可变视觉 token 传给 Painter;resident 元素循环不查询继承主题。 + +不透明 Primary payload 的分类复用宿主的同一个 `LayoutMediaClassifier`。connected 音频/视觉分类读取 +Layout 已求解的 placement class;结构 gap/container 状态读取精确 Kernel 版本。 +UI 不解析 `PayloadRef`,也不递归遍历 container。 + +## 发布约束 + +- `applyLayout(result)` 只用于相邻、原子发布的 Layout 更新。只有 Layout 能证明几何未变化 + 时才保留 viewport cache。 +- `replaceLayout(version)` 用于打开另一个场景、非相邻历史跳转或全局重建,并显式使 cache + 失效。 +- Camera 修改在拖拽中重新解析预览,其他时候只通知绘制;两者都不创建 Kernel 历史。 +- 打开复合片段时向 controller 提供其独立 Storyline/Layout scene,不在父时间线 surface + 内展开。 diff --git a/packages/cutdex_timeline_ui/CHANGELOG.md b/packages/cutdex_timeline_ui/CHANGELOG.md new file mode 100644 index 0000000..bc0f759 --- /dev/null +++ b/packages/cutdex_timeline_ui/CHANGELOG.md @@ -0,0 +1,58 @@ +# Changelog + +## Unreleased + +- Stabilize filmstrip source samples within each tile-count level, expose each + tile's source-time span and painted resolution to thumbnail providers, and + request two offscreen tiles on each side after visible demand. + +- Unify drag placement across Primary, connected clips and audio side changes. + Keep gaps and Primary clips with connections freely draggable but Primary-only + on drop; enabled state does not alter placement rules. +- Create and grow one persistent terminal gap at explicit tail crossings, + preserving multi-selection offsets, Primary return, cancellation and history. + Outline Primary reservations (including incoming connected clips), paint opaque + ghosts, and keep selection borders inside clips above neighboring fills. + +- Paint clip names in themed 18px headers with 2px horizontal padding and no + separate background fill, including pointer ghosts. Use ID fallback, ellipsis and clip-anchored positioning without + changing Layout geometry or adding per-clip widgets. + +- Constrain pointer trims with Kernel media limits instead of discarding an + overrun preview. Add mouse/touch original-speed and half-speed boundary tests; + demo video/audio declare finite ranges and titles explicitly allow extension. + +- Connect selected connected-clip group dragging, carried descendants and serial + Primary insertion to canonical Layout edits. Render each active ghost and its + connection without a connected landing projection. Reject transition-overlap targets + without killing the gesture; stabilize example status height while dragging. + +- Add themed mouse marquee selection against the current Layout frame, with + cancellation restoration and stale-root protection. Blank mouse drag selects; + Space/middle drag and touch/trackpad navigation retain pan behavior. + +- Keep the dragged clip's connection line visible at its pointer ghost, using + the prepared attachment. Landing bodies remain hidden; Primary insertion has no line. + +- Add themed horizontal/vertical Camera scrollbars, track paging and frozen + thumb-drag mapping. Read cached Layout aggregates instead of scanning clips. + +- Add a themed elapsed-time ruler and seekable playhead, cursor-anchored wheel + zoom, Shift-wheel pan, middle/Space drag pan and touch/native trackpad + pinch. Toolbar and gestures share one Camera transform; navigation never + publishes edits, and a second touch cancels an active clip drag. + +- Add single connected-clip dragging with canonical preview/drop, side crossing, + Primary insertion, coordinated undo/redo, themed ghost rendering with invisible landing occupancy, + camera-aware hit/grab mapping and lifecycle cancellation tests. Fix accepted + pointer cancellation being interpreted as a drop by Flutter's pan recognizer. + +- Add a runnable macOS example with a Kernel-backed scene, theme switching, + viewport navigation, selection, hover, and a camera-coordinate widget test. + +- Add the Flutter UI package, presentation-only viewport controller, and + single-painter resident timeline surface. +- Add one Flutter `ThemeExtension` shared by global and local timeline styles. +- Add themed bulk primitives for visual/audio clips, gaps, containers, + transitions, direct connection lines, hover and selection, plus + reverse-paint-order hit testing. diff --git a/packages/cutdex_timeline_ui/CHANGELOG.zh-CN.md b/packages/cutdex_timeline_ui/CHANGELOG.zh-CN.md new file mode 100644 index 0000000..ab2e437 --- /dev/null +++ b/packages/cutdex_timeline_ui/CHANGELOG.zh-CN.md @@ -0,0 +1,44 @@ +# 变更记录 + +## 未发布 + +- 统一主轴、连接片段及音频跨侧拖拽的放置规则。gap 和带连接片段的主片段可自由拖拽, + 但只能放置在主轴;启停状态不改变放置规则。 +- 起点明确到达尾点时创建或延长同一个持久 gap,保留多选相对位置、拖回主轴、取消与历史语义。 + 主轴占位(包括连接片段拖入)绘制空心边框,拖拽片段不透明;选中边框向内绘制且不被邻片填色遮挡。 + +- 片段及拖拽片段在 18px header 显示名称,水平 padding 为 2px,无独立背景色,统一由主题管理。 + 空名称回退 ID,长名称省略,名称固定在片段左端并随视口裁切;不改 Layout 几何,不新增逐片段 widget。 + +- 指针裁剪读取 Kernel 素材极限,越过素材边界时停在合法位置,不再丢弃整个预览。 + 新增鼠标/触屏原速与半速边界测试;示例视频/音频声明有限范围,标题明确允许延展。 + +- 接入连接片段多选拖拽、携带后代和按顺序紧接插入主故事线,复用权威 Layout 编辑。 + 分别绘制活动片段与连接线,不显示连接区域的落点投影。转场重叠区拒绝放置但不中断手势; + 固定示例状态区高度,避免拖拽时视口跳动。 + +- 新增统一主题的鼠标框选,命中当前 Layout 视口;支持取消恢复与过期根保护。 + 空白处鼠标拖动用于框选,空格/中键拖动及触屏/触控板仍用于平移。 + +- 拖拽片段的连接线保持可见,读取权威预览的连接关系并连接浮动片段;落点片段仍隐藏, + 主故事线插入预览不画连接线。 + +- 新增统一主题的横纵 Camera 滚动条、点击轨道翻页及拖动期间固定的滑块映射。 + 缓存读取 Layout 聚合,不扫描全部片段。 + +- 新增统一主题的经过时间标尺和可定位播放位置线、指针锚定滚轮缩放、Shift 滚轮平移、 + 中键/空格拖拽平移、触屏和原生触控板双指缩放。按钮与手势共用 Camera 变换, + 导航不提交编辑,第二根手指加入时取消活动片段拖拽。 + +- 新增单连接片段拖拽,包含权威预览/放置、跨上下侧、主故事线插入、协调撤销/重做、 + 主题控制的浮动预览与不可见落点占位、相机坐标映射和生命周期取消测试。修复 Flutter 已识别的 + 拖拽在指针取消时可能被误当作放置的问题。 + +- 新增可运行的 macOS 示例,包含由 Kernel 提供的场景、主题切换、视口导航、选择、 + 悬停以及验证相机坐标的组件测试。 + +- 新增 Flutter UI package、只持有表现层状态的 viewport controller,以及使用单个 + painter 的 resident 时间线 surface。 +- 新增全局和局部时间线样式共用的单一 Flutter `ThemeExtension`。 +- 新增统一主题驱动的视觉/音频片段、gap、container、transition、直接连接线、悬停和 + 选中批量绘制原语,以及按绘制顺序反向扫描的命中测试。 diff --git a/packages/cutdex_timeline_ui/LICENSE b/packages/cutdex_timeline_ui/LICENSE new file mode 100644 index 0000000..ba75c69 --- /dev/null +++ b/packages/cutdex_timeline_ui/LICENSE @@ -0,0 +1 @@ +TODO: Add your license here. diff --git a/packages/cutdex_timeline_ui/README.md b/packages/cutdex_timeline_ui/README.md new file mode 100644 index 0000000..63a431d --- /dev/null +++ b/packages/cutdex_timeline_ui/README.md @@ -0,0 +1,295 @@ +# Cutdex Timeline UI + +This is an application-owned internal package. Timeline semantics come from `cutdex_core`; Flutter views and interaction state remain here. Run its tests from the application workspace. + +[简体中文](README.zh-CN.md) + +Flutter presentation for the Cutdex timeline. The package renders immutable +Kernel/Layout publications without owning timeline semantics. + +## Timecode ruler layouts + +Choose full project timecode independently of its visual arrangement: + +```dart +TimelineViewport( + controller: controller, + rulerStyle: TimelineRulerStyle.timecode, + rulerTimecodeLayout: TimelineRulerTimecodeLayout.centered, + child: TimelineView(controller: controller), +) +``` + +`TimelineRulerTimecodeLayout.inline` (default) places labels to the right of +their major marks in the same band as subdivisions. `centered` centers labels +over their major marks, keeping that anchor at the viewport edges. +Both omit subdivisions in the text's horizontal span. `overlay` retains faint +marks behind the text and uses a glyph halo rather than a rectangular mask. +Edge labels clip progressively and remain visible until their text leaves the +viewport. All three share the adaptive frame-grid density, project timecode formatting, +camera and playhead interaction. Changing the layout only repaints the ruler. + +Standalone `TimelineRuler` accepts the same enum through `timecodeLayout`. +These parameters affect only `TimelineRulerStyle.timecode`; the default elapsed +ruler keeps its existing appearance. + +The initial `TimelineView` uses one `CustomPainter` and Layout's reusable +structure-of-arrays viewport frame. Its work is `O(V)`, where `V` is the +resident viewport population rather than the full project size. + +The bulk painter distinguishes visual content, audio content, structural gaps, +containers, and transitions. Hover and selection are presentation-only states +on `TimelineViewController`. `hitTest` scans the exact frame in reverse paint +order and returns a copied result without retaining Layout's transient buffer. + +Every clip body, including drag ghosts, paints its Kernel `name` in an internal +header (blank names fall back to the element ID). Long names use one-line +ellipsis; extremely narrow clips clip/omit unreadable text. Names stay anchored +to the clip's left edge plus header padding; horizontal panning clips text at +the viewport without repositioning it or changing its ellipsis. Transition boundaries are +not clip bodies and do not acquire a separate name header. +Headers have no separate background fill. +Hosts may supply `TimelineWaveforms` to render source audio envelopes beneath +the header. The painter requests visible sources and maps each screen interval +through Kernel source time, including trimming, retiming and reverse playback. +Waveform providers load asynchronously and notify the painter when ready; no +per-clip widget or project state is introduced. Without a provider, audio retains +its decorative accent line. With a provider, unavailable data is left blank. +For visual clips, `TimelineWaveforms.hasAudioFor` reports a bound audio source +without waiting for decoding. Clips with enough height reserve a 16 px audio +strip below the filmstrip, leaving at least 20 px for thumbnails. Source loading +does not resize these regions. Silent videos, images and clips whose audio +binding has been removed keep the full filmstrip; compact clips omit the strip. +Video and standalone audio share source-time and gain mapping. +`clipHeaderHeight` (18 px), `clipHeaderPadding` (2 px horizontally), +and `clipNameTextStyle` belong to the shared theme. Text honors +ambient direction, locale and scaling and is clipped inside existing geometry; +the header does not change lanes. One TextPainter is reused for visible labels +within a paint pass and disposed afterward; no per-clip widgets or document-wide +name cache are introduced. + +Gaps can be dragged but only dropped on the opened scene's Primary axis. An +off-axis pointer retains the original Primary reservation; a valid Primary +boundary preview replaces it with the new reservation. Dropping off-axis cancels +the edit. Gap reservations remain visible alongside the pointer ghost, unlike +ordinary clip landing bodies. Reordering uses the existing boundary splice and +never splits another clip or creates a connected gap. + +Primary clips with connected descendants share this Primary-only reservation +behavior: the whole group follows the pointer freely above or below the axis, +while the original Primary occupancy remains until a valid new Primary preview +replaces it. Off-axis release restores the original state without history. The +placement restriction never hides the pointer ghost or ends the gesture. + +An eligible audio-only Primary clip dragged above the axis keeps its pointer +ghost there, but releases below at the requested time, outside overlapping +incumbents. Primary detach uses the same outside-overlap resolver as connected +audio; it does not create an above-axis audio connection. + +All Primary sources, including clips without connections, show a pointer ghost +with an opaque default fill and an outline. Reservations are hollow outlined +rectangles; both outlines use the theme's selection outline color and width. +This ghost and serial reservation appear as soon as dragging moves within Primary, +even before crossing an insertion boundary. Unconnected clips still support a +legal off-axis detach; its prepared result closes the original Primary interval. + +Primary detach and cross-side dragging use the same latest-preview incumbent +geometry as same-side dragging. Displaced clips refill only after the pointer +crosses their current top threshold, not their pre-drag top. Previous previews +are read-only interaction history tied to the exact published base; every edit +is still prepared from that base and only the latest result can be committed. + +Below-axis audio can follow the pointer above Primary. Releasing there retains +the requested time interval and places it below, outside all overlapping +incumbents (lane 1 if none overlap). Only the ghost is above; canonical audio +ownership stays below. Primary-band drops retain their ordinary insertion rule. +Outside-viewport release remains invalid. This fallback currently requires an +all-audio below-side carried group; it does not silently migrate mixed groups. + +Cross-side targeting uses the pointer position, not whether the entire ghost +rectangle has cleared Primary. A ghost may straddle the axis during crossing; +the canonical solver still keeps the final connected body outside Primary. + +Ordinary drag into/out of Primary rejects roots with connected clips, including +when those children are also selected. Primary reordering still carries children; +internal compound contents are not external connections. Lift/overwrite commands +remain separate from drag transfer. See the [Apple drag-transfer rule](https://support.apple.com/guide/final-cut-pro/verc147f195/mac). + +Kernel payloads remain opaque. The host passes the same `LayoutMediaClassifier` +to `classifyContent` that it uses for Layout's media index. Primary content is +then classified without a second policy; connected media class comes directly +from Layout's resolved `LayoutPlacementClass`. + +See [the architecture contract](ARCHITECTURE.md). + +## Runnable example + +See the [macOS example](example/README.md) for a mixed timeline, theme switching, +pan, zoom, hover, selection, connected-clip group dragging and undo/redo. + +```sh +cd packages/cutdex_timeline_ui/example +flutter pub get +flutter run -d macos +``` + +Run these commands from the repository root. + +## Usage + +```dart +final controller = TimelineViewController( + version: layoutVersion, + storyline: primaryStoryline, + geometry: TimelineViewportGeometry(primaryTop: 80, primaryHeight: 48), + camera: TimelineCamera( + baseTick: 0, + pixelsPerTick: pixelsPerSecond / TimelineClock.ticksPerSecond, + ), +); + +TimelineView(controller: controller); +``` + +The application owns and disposes the controller. Publish adjacent Layout +results with `applyLayout`; use `replaceLayout` only for an explicit open, +history jump, or global rebuild. + +The optional `TimelineThumbnails` host receives each tile's desired source tick, +approximate source-span ticks, logical size, and device-pixel ratio. The painter +keeps tile centers stable for a fixed tile-count level, registers visible demand +before two tiles of bidirectional prefetch, and never paints prefetched tiles +outside the viewport. Hosts should quantize nearby source ticks onto a bounded +sampling pyramid and return a nearby cached frame while a finer level loads. + +For editing, construct `TimelineViewController.editable(engine: ..., geometry: ..., +camera: ..., createConnectionId: ..., createElementId: ...)` from an engine initialized with +`buildComponents`. The component root may have an empty `expanded` set. It +retains the canonical projection for coordinated history; no UI history is added. +Wrap `TimelineView` in `TimelineInteractionRegion(controller: controller, child: ...)`. +Use `controller.undo()` / `redo()` for coordinated history. See the example for +a complete setup and the architecture contract for supported drag sources. + +## Explicit editing commands + +`cutSelectionAtPlayhead()` cuts selected clip interiors at the definition-local +playhead; `deleteSelection()` deletes whole selected owners and their connected +descendants, closing Primary magnetically. Each command is one coordinated +Kernel/Layout history entry. A connected right half anchors to the Primary member +at the cut, resolved by Kernel. Host ID factories must return fresh IDs, including +after undo; `createElementId` is used only by explicit blade, never by dragging. +`canCutSelection`/`canDeleteSelection` expose selection eligibility; Kernel still +validates the command and `commandRejection` explains rejected edits. While the +timeline or ruler has focus: Ctrl/Cmd+B cuts, Delete/Backspace deletes, +Ctrl/Cmd+Z undoes, and Ctrl/Cmd+Shift+Z redoes. Active pointer edits ignore these +shortcuts. No implicit blade is added to drag/drop. + +## Ruler and navigation + +Wrap the interaction region and `TimelineView` in `TimelineViewport`. It provides +a ruler with the same effective width and horizontal origin. The ruler displays definition-local elapsed time (not +SMPTE/drop-frame timecode), with adaptive second/millisecond ticks. Click or drag +the ruler to move the presentation-only playhead. Negative seek clamps to zero; +seeking beyond the tail is allowed. No playback or media decoding is started. + +`TimelineInteractionRegion` supports: + +- Wheel/trackpad scrolling: two-axis pan; Shift+wheel: horizontal pan. +- Hold a dragged clip at an edge to auto-pan; corners pan both axes. Configure + `edgeScrollExtent` (48 px) and `edgeScrollMaxSpeed` (600 px/s) on the region; + zero disables it. Cancel stops without editing and retains the scrolled Camera. +- Ctrl/Cmd+wheel: zoom around the pointer, up to 32 px/frame. The minimum + scale fits the sequence duration plus 25%, rounded up to 10/30 minutes, + 1/2/4 hours, then doubled as needed. Connected clips count toward the duration. + Edits update the limits without applying a new zoom; `fitTimeline()` explicitly + shows the whole sequence with tail space. +- Middle-button drag or Space+primary-button drag: pan. A single touch on blank space also pans. +- Primary mouse drag on blank space: marquee-select intersecting visible items. + Release keeps the selection; Escape, cancellation or camera navigation restores + the previous selection. A changed document root cannot restore stale identities. + Drag a selected connected member to move the whole connected selection and + carried descendants. Into Primary, independent roots without connected children are inserted consecutively + in time order, with no automatic container; one undo restores the group. +- Touch pinch or native trackpad pan/zoom: one combined focal-point transform. + A second finger cancels any active clip edit before navigation; lifting one + finger does not resume that edit. + +Ruler navigation is horizontal only. Its click/drag changes the playhead, not +selection. Camera and playhead changes create no Kernel history. Ruler colors, +height, typography and playhead appearance use `TimelineThemeData`. + +## Scrollbars + +Use `TimelineViewport(controller: controller, child: ...)` around the clip surface +and `TimelineInteractionRegion`. The viewport owns the ruler and reserves space +for horizontal and vertical scrollbars, so painting and pointer hit testing use +the same unobscured content rectangle. Use `showRuler: false` for a surface-only +host. `TimelineScrollbars` is now a rendering component requiring explicit viewport +dimensions and bounds; it no longer configures the camera. Drag a thumb or click its track to page. Wheel, pinch, +toolbar and scrollbar navigation all use the same Camera; none creates history. +Content bounds include connected clips. Horizontal navigation starts at zero; +scrollbars appear only on overflowing axes. The navigation range includes half +a viewport beyond the content tail without extending the authored duration. +An initially empty viewport fits twenty seconds once. Subsequent zooms, resizes, +and deleting all clips preserve the chosen scale. Thumb +mapping stays fixed during a drag. Thickness and colors use theme tokens. + +The wrapper registers viewport and content bounds with the controller and applies +them after layout. Initial layout calls `focusPrimary()` to center the primary +lane by moving the whole viewport. Call `focusPrimary(resetHorizontal: true)` +for a reset-position command; omit the option to preserve horizontal position. +Resizing and editing reconcile content bounds without recentering the primary. +Custom hosts can use `configureViewport` and `reconcileViewport` for the same +behavior. Positioning does not edit the timeline or create history. + +The ruler draws nonnegative elapsed time, with labels beside top-aligned ticks. +Minor ticks beneath labels are omitted. `primaryLaneBackgroundColor` controls +the full-width primary lane background independently from the canvas. + +## Theme + +Basic edge trimming is available through `TimelineInteractionRegion`: drag the +inner left/right edge to adjust source in/out, with magnetic serial ripple and +Layout avoidance. It shares preview, cancellation, edge scrolling and history +with moves. `trimHandleWidth` (3 px) and `trimHitExtent` (6 px) are theme tokens; +zero hit extent disables edge gestures. Apply custom edge tokens above both +the input region and painter. See the architecture contract for constraints. + +Finite source limits come from Kernel's `constrainMediaTrimDuration`; dragging +beyond a known media edge stops at its exact rate-adjusted boundary. Supply full +`mediaRange` for video/audio, or explicitly set `sourceExtendable` for stills and +generators. Missing bounds do not imply unlimited media. Other edit constraints +still reject through Kernel. Media availability and trim rules are maintained by core in `packages/timeline/docs/model/MEDIA_AVAILABILITY.md`. + +Every timeline painter resolves the same `TimelineThemeData`. Install it once +through Flutter's extension mechanism, or pass the same type directly to one +`TimelineView` for a local override: + +```dart +ThemeData( + extensions: const [TimelineThemeData.dark()], +); + +TimelineView( + controller: controller, + theme: const TimelineThemeData.dark(), +); +``` + +The theme is resolved once during widget build, never once per painted item. + +`TimelineView.thumbnails` accepts an optional host-owned `TimelineThumbnails`. The painter declares visible frame demand through `beginFrame`, `aspectRatioFor`, resolution-aware `imageFor`, and `endFrame`, and repaints when that provider notifies. Providers receive the painted logical tile size plus device pixel ratio, then own resolution bucketing, asynchronous I/O, bounded decoded-image retention, and image disposal. Timeline UI has no runtime or file-access dependency. Filmstrip tiles follow the source display aspect ratio once the provider knows it and use Kernel source-time mapping beneath clip headers, including implicit and piecewise retiming; contextual nested occurrences currently retain their ordinary fill until an occurrence-specific source mapping is supplied. + +### Frame-budget subscriptions + +The controller's default `Listenable` includes every view update. Use +`contentChanges` for retained clip/ruler painters that do not draw the playhead, +and `editingChanges` for inspectors and native preview synchronization. The +latter includes selection, playhead, authored changes and keyframe previews; +camera/hover changes and private clip-placement/trim geometry stay within the +viewport. Committing or cancelling a gesture still notifies editing consumers. + +Pointer-driven ripple trim coalesces updates to the latest position per display +frame. Release synchronously resolves the final pointer before publication; +cancellation, view replacement and disposal discard queued callbacks. Clip +labels retain a bounded cache of shaped text across panning and rebuilds. diff --git a/packages/cutdex_timeline_ui/README.zh-CN.md b/packages/cutdex_timeline_ui/README.zh-CN.md new file mode 100644 index 0000000..db1cbd6 --- /dev/null +++ b/packages/cutdex_timeline_ui/README.zh-CN.md @@ -0,0 +1,200 @@ +# Cutdex Timeline UI + +本包由 Cutdex 应用仓库持有。时间线语义来自 `cutdex_core`,Flutter 视图与交互状态留在本包;从应用工作区运行测试。 + +基础边缘裁剪已接入 `TimelineInteractionRegion`:拖动片段内侧左/右边缘调整入出点, +串行片段磁性移动后缀,由 Layout 处理避让;复用移动的预览、取消、边缘滚动和历史。 +主题参数 `trimHandleWidth` 默认 3 px,`trimHitExtent` 默认 6 px;命中宽度为零关闭 +边缘手势。自定义时在输入区域和 Painter 上方统一安装主题。具体约束见架构文档。 + +素材裁剪极限统一读取 Kernel 的 `constrainMediaTrimDuration`;拖过已知素材边界时, +停在按当前速度精确换算后的合法位置。视频/音频提供完整 `mediaRange`,图片和生成内容 +明确设置 `sourceExtendable`。未知范围不等于无限素材,其他编辑约束仍由 Kernel 拒绝。 +素材可用范围与裁剪规则见 core 的 `packages/timeline/docs/model/MEDIA_AVAILABILITY.zh-CN.md`。 + +[English](README.md) + +Cutdex 时间线的 Flutter 表现层。本包渲染不可变的 Kernel/Layout 发布结果,不拥有时间线 +语义。 + +## 完整时间码的刻度排布 + +时间格式与视觉排布分别通过参数选择: + +```dart +TimelineViewport( + controller: controller, + rulerStyle: TimelineRulerStyle.timecode, + rulerTimecodeLayout: TimelineRulerTimecodeLayout.centered, + child: TimelineView(controller: controller), +) +``` + +`TimelineRulerTimecodeLayout` 包含三种排布: + +- `inline`:同带交错,时间码位于主刻度右侧,默认值。 +- `centered`:居中锚定,时间码中心始终对准主刻度,边缘也保持锚定。 +- `overlay`:淡刻度叠印,保留文字背后的淡刻度,仅在字形周围描边避让。 + +边缘时间码逐步裁切,文字完全移出可视范围后才隐藏。 +前两种会省略文字横向范围内的短刻度。三种排布共用向下刻度、自适应帧网格密度、 +工程时间码格式和播放头交互;切换排布只重绘刻度,不修改相机或时间线内容。 +单独使用 `TimelineRuler` 时,参数名为 `timecodeLayout`。 +该参数仅作用于 `TimelineRulerStyle.timecode`,默认的 elapsed 刻度保持原有外观。 + +首版 `TimelineView` 使用一个 `CustomPainter` 和 Layout 的可复用 SoA viewport frame。 +工作量为 `O(V)`,其中 `V` 是 resident viewport 中的元素数量,而不是工程总元素数。 + +批量 Painter 区分视觉内容、音频内容、结构 gap、container 和 transition。悬停与 +选中是 `TimelineViewController` 中的纯表现层状态。`hitTest` 按绘制顺序反向扫描 +精确 frame,返回复制后的结果,不保留 Layout 的临时 buffer。 + +每个片段(包括拖拽中的片段)在自身 header 绘制 Kernel 的 `name`,空名称回退到元素 ID。 +长名称单行省略,极窄片段裁切/省去无法辨认的文字;名称固定在片段左端加 header 内边距的位置, +横向平移只在视口边界裁切文字,不重新定位或改变省略位置。转场是边界记录,不额外添加片段名称 header。 +header 不绘制独立背景色。 +`clipHeaderHeight`(18 px)、`clipHeaderPadding`(水平 2 px)和 +`clipNameTextStyle` 统一由主题控制。文字使用环境方向、语言及文字缩放,并裁切在原有 +片段矩形内,不改变 lane。每次绘制复用一个 TextPainter 处理可见名称并及时释放, +不为每个片段创建 widget,也不建立全工程名称缓存。 + +gap 可以拖拽,但只能放置在当前场景的主轴。指针离轴时保留原来的主轴占位; +进入合法主轴边界后,由新位置的占位替代原占位。离轴释放取消编辑。 +与普通片段隐藏落点不同,gap 的占位与指针拖影同时显示。重排复用现有边界 splice, +不切割其他片段,也不创建连接 gap。 + +带连接后代的主轴片段与 gap 共用这套“只能放置在主轴”的占位逻辑:整个片段组可以 +自由跟随指针拖到上方或下方,原主轴占位保留,直到新的合法主轴预览替代它。 +离轴释放恢复原位,不产生历史。限制的是放置结果,不隐藏拖影,也不结束手势。 + +允许离轴的纯音频主片段拖到主轴上方时,拖影继续跟随指针;释放后保留目标时间, +放在下方时间重叠片段的外侧。主轴脱离复用连接音频的外侧避让求解器,不创建上方 +音频连接。 + +所有主轴拖拽源(包括没有连接片段的主片段)在主轴内开始拖动时,就显示跟随指针的 +不透明带边框拖影;占位只显示透明底的边框矩形。两者的边框统一使用主题的选中描边 +颜色和宽度。拖影和主轴占位立即显示,无须先跨越插入边界。 +没有连接片段的主片段仍支持合法离轴放置; +离轴预览会闭合原来的主轴区间。 + +主轴脱离、跨侧拖拽与同侧拖拽统一参考上一帧的实际避让位置。被避让片段在越过其 +最新 top 阈值后才回填,不再使用拖拽前的 top。旧预览只作为绑定同一已发布版本的 +只读交互历史;每次编辑仍从权威基线准备,最终只提交最新结果。 + +下方音频可跟随指针拖到主轴上方。在上方释放时保留目标时间区间,落在下方所有时间 +重叠片段的最外侧;没有重叠则落在 lane1。只有拖影在上方,权威音频归属仍在下方。 +主轴区域内释放仍按普通主轴插入处理;视口外释放仍无效。此回落规则目前要求携带组 +全部为下方音频,不隐式迁移混合类型片段组。 + +跨侧目标按鼠标点判定,不要求整个拖影矩形先离开主轴。跨越时拖影可以覆盖主轴, +但最终连接片段仍由权威求解器布局在主轴之外,不会因拖影尚未完全越界而闪回原位。 + +普通拖入/拖出主轴拒绝带有连接片段的移动根,即使同时选中了子片段也不例外。 +主轴内重排仍携带连接片段;复合片段内部内容不算外部连接。提取/覆盖命令与普通拖拽 +分别处理。依据 [Apple 拖入/拖出规则](https://support.apple.com/zh-cn/guide/final-cut-pro/verc147f195/mac)。 + +Kernel payload 保持不透明。宿主向 `classifyContent` 传入构建 Layout 媒体索引时使用的 +同一个 `LayoutMediaClassifier`,Primary 内容便不会出现第二套分类策略;connected +媒体类别直接使用 Layout 已解析的 `LayoutPlacementClass`。 + +参见[架构约束](ARCHITECTURE.zh-CN.md)。 + +## 可运行示例 + +[macOS 示例](example/README.zh-CN.md)包含混合时间线、主题切换、平移、缩放、悬停、选择、 +连接片段多选拖拽和撤销/重做。 +从仓库根目录运行: + +```sh +cd packages/cutdex_timeline_ui/example +flutter pub get +flutter run -d macos +``` + +## 使用方式 + +```dart +final controller = TimelineViewController( + version: layoutVersion, + storyline: primaryStoryline, + geometry: TimelineViewportGeometry(primaryTop: 80, primaryHeight: 48), + camera: TimelineCamera( + baseTick: 0, + pixelsPerTick: pixelsPerSecond / TimelineClock.ticksPerSecond, + ), +); + +TimelineView(controller: controller); +``` + +应用负责持有并释放 controller。相邻 Layout 发布使用 `applyLayout`;只有显式打开工程、 +历史跳转或全局重建时才使用 `replaceLayout`。 + +编辑模式使用 `TimelineViewController.editable(engine: ..., geometry: ..., +camera: ..., createConnectionId: ..., createElementId: ...)`。引擎先通过 `buildComponents` 初始化,`expanded` +可以为空;该根保留协调历史所需的权威投影,不额外建立 UI 历史。 +在 `TimelineView` 外包裹 `TimelineInteractionRegion(controller: controller, child: ...)`, +通过 `controller.undo()` / `redo()` 协调撤销/重做。完整初始化见示例,支持的拖拽范围见架构约束。 + +## 显式编辑命令 + +`cutSelectionAtPlayhead()` 在定义局部播放头处切割选中片段内部;`deleteSelection()` 删除 +选中完整片段及其连接后代,主线磁性闭合。每次命令只产生一条协调的 Kernel/Layout 历史。 +连接片段右半段由 Kernel 查询切割点所在的主片段并连接它。宿主 ID 工厂必须持续生成新 ID, +撤销后也不能重用;`createElementId` 仅供显式切割,拖拽不调用它。 +`canCutSelection`/`canDeleteSelection` 提供选区可用性,最终仍由 Kernel 校验,失败原因见 +`commandRejection`。时间线或标尺获得焦点时,Ctrl/Cmd+B 切割、Delete/Backspace 删除、 +Ctrl/Cmd+Z 撤销、Ctrl/Cmd+Shift+Z 重做。活动指针编辑期间忽略这些快捷键。 +拖拽放置仍不会隐式切割。 + +## 时间标尺和导航 + +把 `TimelineRuler(controller: controller)` 放在 `TimelineView` 上方,两者保持相同宽度 +和水平起点。标尺显示当前 definition 的经过时间(不是 SMPTE/drop-frame 时间码), +自动调整秒/毫秒刻度密度。点击或拖拽标尺移动表现层播放位置线:负时间钳制到零,允许超出 +末尾;不启动播放或媒体解码。 + +`TimelineInteractionRegion` 支持: + +- 滚轮/触控板滚动:双轴平移;Shift+滚轮:水平平移。 +- 拖动片段停在边缘时自动平移,角落同时移动两轴。区域参数 `edgeScrollExtent` 默认 + 48 像素,`edgeScrollMaxSpeed` 默认 600 像素/秒,任一设零可禁用。取消不修改工程,保留滚动后的 Camera。 +- Ctrl/Cmd+滚轮:以指针为中心缩放,最大放大至 32 像素/帧。最远缩放按当前序列 + 总时长(包含连接片段)加 25% 空间,取到 10/30 分钟、1/2/4 小时等档位,超过后倍增。 + 编辑只更新范围,不自动切换缩放;`fitTimeline()` 主动显示整个序列并保留尾部空间。 +- 中键拖拽或空格+左键拖拽:平移;触屏单指在空白处拖动也保留平移。 +- 空白处鼠标左键拖拽:框选与选框相交的可见元素。松开保留选择;Esc、取消或 Camera + 导航恢复原选择。文档根变化时不会恢复过期元素。拖动已选中的连接片段会移动整个连接 + 选区及携带后代;拖入主故事线时,独立根按时间顺序紧接插入,不自动创建容器,一次撤销恢复整组。 +- 触屏双指或原生触控板平移/捏合:一次组合焦点变换。第二根手指加入时先取消片段编辑, + 抬起一根手指后也不会恢复原编辑。 + +标尺区域只做水平导航,点击/拖动只改变播放位置,不改变选择。Camera 和播放位置变化不产生 +Kernel 历史。标尺颜色、高度、文字和播放位置线外观均由 `TimelineThemeData` 管理。 + +## 滚动条 + +在标尺下方,用 `TimelineScrollbars(controller: controller, child: ...)` 包住片段区域 +(放在 `TimelineInteractionRegion` 外侧),即可显示横纵滚动条。滚动条覆盖底边/右边, +不改变视口坐标。拖动滑块平移,点击轨道翻页;与滚轮、捏合、按钮共用 Camera,不产生历史。 +内容范围包含连接片段,另加 48 像素工作留白。允许平移到内容外,滚动范围会包含当前视口, +可以通过滚动条返回内容。拖动期间固定滑块映射;全部内容可见时,满长滑块不响应拖动。 +粗细及颜色由 `TimelineThemeData` 的滚动条主题项统一控制。 + +## 主题 + +所有时间线 Painter 都解析同一个 `TimelineThemeData`。可以通过 Flutter extension +机制全局安装,也可以把同一类型直接传给某个 `TimelineView` 进行局部覆盖: + +```dart +ThemeData( + extensions: const [TimelineThemeData.dark()], +); + +TimelineView( + controller: controller, + theme: const TimelineThemeData.dark(), +); +``` + +主题只在 Widget build 阶段解析一次,不会在每个片段绘制时重复解析。 diff --git a/packages/cutdex_timeline_ui/analysis_options.yaml b/packages/cutdex_timeline_ui/analysis_options.yaml new file mode 100644 index 0000000..6beb5e5 --- /dev/null +++ b/packages/cutdex_timeline_ui/analysis_options.yaml @@ -0,0 +1,19 @@ +include: package:flutter_lints/flutter.yaml + +analyzer: + exclude: + - build/** + language: + strict-casts: true + strict-inference: true + strict-raw-types: true + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options + +linter: + rules: + unnecessary_lambdas: true + unnecessary_parenthesis: true + unnecessary_statements: true + prefer_const_constructors: true diff --git a/packages/cutdex_timeline_ui/example/.gitignore b/packages/cutdex_timeline_ui/example/.gitignore new file mode 100644 index 0000000..3820a95 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/.gitignore @@ -0,0 +1,45 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.build/ +.buildlog/ +.history +.svn/ +.swiftpm/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ +/coverage/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/packages/cutdex_timeline_ui/example/.metadata b/packages/cutdex_timeline_ui/example/.metadata new file mode 100644 index 0000000..e753c84 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/.metadata @@ -0,0 +1,30 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "058e0af2c2b57e369d905a03ac9748b0ebf543c6" + channel: "stable" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 058e0af2c2b57e369d905a03ac9748b0ebf543c6 + base_revision: 058e0af2c2b57e369d905a03ac9748b0ebf543c6 + - platform: macos + create_revision: 058e0af2c2b57e369d905a03ac9748b0ebf543c6 + base_revision: 058e0af2c2b57e369d905a03ac9748b0ebf543c6 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/packages/cutdex_timeline_ui/example/README.md b/packages/cutdex_timeline_ui/example/README.md new file mode 100644 index 0000000..e3f67d6 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/README.md @@ -0,0 +1,83 @@ +# Timeline UI example + +[简体中文](README.zh-CN.md) + +Runnable macOS Flutter application using the local workspace packages. +Requires Flutter with macOS desktop support and Xcode; the example targets macOS 12 or later. + +From the repository root: + +```sh +cd packages/cutdex_timeline_ui/example +flutter pub get +flutter run -d macos +``` + +The generated 42-second, 24 fps scene includes six primary members (visual +clips, a gap, a compound clip, audio and a disabled clip), two overlapping +visual connections above, two overlapping audio connections below, and one +overlap transition. Compound contents remain inside their definition. + +The app-bar menu also opens a deterministic 3-hour, 24 fps synthetic scene with +365 Primary members and 316 connected clips, including repeated visual/audio +members and overlapping title/overlay/audio attachments. These are generated +timeline records, not real decoded media or a performance benchmark. Switching +scenes retains each document's Camera and history. End navigates to the current +tail; Reset restores the initial Camera at time zero. Horizontal navigation never +passes into negative time. Hold a clip at any edge to auto-scroll; +release uses the latest Camera, while Escape/cancel stops without committing. + +- Click a clip to select it and display its name; click blank space to clear. +- Move the mouse to highlight a clip. +- Drag a clip's inner left/right edge to trim; hover/selection reveals themed + grips. Serial clips ripple, connected left trim keeps the right edge, and + container trim preserves its internal definition. Edge scrolling and Undo/Redo + also work while trimming. Invalid trim releases leave the document unchanged. +- Use arrows to pan horizontally, or scroll in either axis. +- Zoom buttons retain a visible playhead; when it is offscreen, they use the viewport center. +- Click/drag the elapsed-time ruler to seek; the line shares the clip camera. +- Ctrl/Cmd+wheel retains a visible playhead (or the viewport center); Shift+wheel pans horizontally. +- Pan with Space+drag, middle-button drag or a trackpad. Mouse-drag blank space + to marquee-select; Escape cancels. Single-touch blank-space pan is preserved. +- Pinch with two fingers to zoom while retaining the visible playhead. Trackpad translation + pans when the gesture is not pinching; scale packets do not also shift the anchor. +- Toggle the theme in the title bar; Reset restores the camera and selection. +- Drag connected selections to preview avoidance, move them above/below Primary, + or insert it into Primary. Release publishes one coordinated edit. +- Escape and pointer cancellation discard the drop. Overshooting the viewport clamps + the target to its edge; horizontal overshoot keeps scrolling, and release commits + the latest preview. Audio dragged above Primary lands below it, outside incumbents. +- Undo/Redo restore the coordinated Kernel/Layout roots; Reset only resets the view. +- Blade/Delete toolbar buttons use the selected clips; with no selection, Blade cuts + only the Primary clip at the playhead and leaves connected clips unchanged. With + explicit selection, blade cuts only interiors + under the playhead, including mixed Primary/connected selections. A connected + right half anchors to the Primary at the cut. Delete cascades owned children + and closes Primary; no handoff or gap is synthesized. The focused timeline/ruler + also accepts Ctrl/Cmd+B, Delete/Backspace, Ctrl/Cmd+Z and Ctrl/Cmd+Shift+Z. + These commands are disabled during pointer editing and never add implicit cuts + to drag/drop. Rejections appear in the status line without a partial edit. + +This example demonstrates drawing and connected-selection editing APIs, including +carried descendants and consecutive group insertion into Primary. +Primary groups can reorder with carried connections; direct drag transfer out of +Primary requires roots without connected children. Valid lifts close the source +magnetically (A→B→C becomes A→C). Returning to Primary resolves a boundary reorder. Primary and connected drops use pointer halves and never cut target clips. +Playback advances only the presentation playhead. Advanced trim (roll/slip/slide), +decoded media playback, thumbnails and waveforms are not implemented here. The audio +accent is a visual marker, not a generated waveform. Colors come from one +`TimelineThemeData`; all clip coordinates come from Layout. + +`lib/demo_timeline.dart` builds DTOs, the Kernel and Layout, sharing one host +media classifier with `TimelineView`. `lib/main.dart` owns and disposes the +controller and uses `TimelineInteractionRegion` for pointer integration. All edits +publish through Layout; the example never directly mutates Kernel roots. + +```sh +flutter test +``` + +Widget tests calculate clip-body and trim-edge positions from the resident Layout frame, +verify the hit target, and assert exact authored results and undo/redo roots. Trim +preview assertions pump a frame to flush the pointer update. Application CI includes +these tests and static analysis. diff --git a/packages/cutdex_timeline_ui/example/README.zh-CN.md b/packages/cutdex_timeline_ui/example/README.zh-CN.md new file mode 100644 index 0000000..48f761f --- /dev/null +++ b/packages/cutdex_timeline_ui/example/README.zh-CN.md @@ -0,0 +1,69 @@ +# Timeline UI 示例 + +[English](README.md) + +标题栏菜单可切换到确定性生成的 3 小时、24 fps 合成场景,包含 365 个主线成员、316 个 +连接片段,以及重复的视觉/音频成员和重叠标题、叠加画面、音频连接。这是生成的时间线 +元数据,不是真实解码媒体,也不是性能基准。切换场景保留各自 Camera 和编辑历史。 +“末尾”定位当前尾部,“重置”恢复从时间 0 开始的初始 Camera,水平导航不会进入负时间。拖动片段停在任意边缘可自动滚动,松手 +使用最新 Camera 放置,Esc/取消会停止且不提交编辑。 + +使用本仓库各 package 的 macOS Flutter 可运行应用。需要安装支持 macOS 桌面的 +Flutter 和 Xcode;示例最低系统版本为 macOS 12。 + +从仓库根目录运行: + +```sh +cd packages/cutdex_timeline_ui/example +flutter pub get +flutter run -d macos +``` + +自动生成的 42 秒、24 fps 场景包含六个主故事线成员(视觉片段、gap、复合片段、 +音频和禁用片段)、上方两个时间相交的视觉连接片段、下方两个时间相交的音频连接片段, +以及一个重叠转场。复合片段内部内容保留在独立定义中。 + +- 点击片段选中并显示名称;点击空白清除选择。 +- 鼠标悬停高亮片段。 +- 方向按钮水平平移,也可以在两个轴上滚动。 +- 缩放按钮保持可见播放头的位置;播放头在视口外时围绕视口中心缩放。 +- 点击/拖动经过时间标尺定位播放位置;位置线与片段共用相机。 +- Ctrl/Cmd+滚轮保持可见播放头(或视口中心)的位置;Shift+滚轮水平平移。 +- 空格+拖拽、中键拖拽或触控板均可平移。空白处鼠标左键拖动改为框选,Esc 取消; + 触屏单指在空白处拖动仍可平移。 +- 双指捏合缩放保持可见播放头的位置。触控板未进入捏合时可平移;缩放包不额外移动锚点。 +- 标题栏切换主题;重置按钮恢复 Camera 并清空选择。 +- 拖拽连接片段选区预览避让、跨主故事线上下侧移动,或按时间顺序紧接插入主故事线; + 携带后代一起移动,松手只提交一次协调编辑。 +- Esc 和指针取消会丢弃预览。越过视口边缘时目标限制在边界,水平越界继续自动滚动, + 松手提交最新预览。音频拖到主故事线上方会落在下方并避开已有片段。 +- 撤销/重做恢复协调的 Kernel/Layout 根;重置按钮只恢复视图,不清空编辑历史。 +- 工具栏切割/删除作用于选中片段。没有选区时,切割只处理播放头所在的主片段,保持连接 + 片段不变;存在显式选区时只处理播放头穿过内部的选中片段,支持主片段和连接 + 片段混合选区;连接片段右半段连接切割点所在主片段。删除连带删除连接后代,主线磁性 + 闭合,不承接、不补 gap。时间线/标尺有焦点时还支持 Ctrl/Cmd+B、Delete/Backspace、 + Ctrl/Cmd+Z、Ctrl/Cmd+Shift+Z。活动指针编辑期间禁用命令;拖拽仍不会隐式切割。 + 命令被拒绝时状态栏显示原因,不会留下部分编辑。 + +示例展示绘制和连接片段多选编辑 API。主片段组重排可携带连接片段;直接拖出主线只接受没有连接子片段的根。有效的移出会使 +主线磁性闭合(A→B→C 变为 A→C);拖回主线解析边界重排。主片段与连接片段放入主线均按鼠标前后半区 +插在目标前/后,不切割目标片段。播放只推进呈现层的播放头。尚未接入高级裁剪 +(roll/slip/slide)、真实媒体解码播放、缩略图和波形。 +音频片段内的线是视觉标记,并非生成的波形。颜色统一来自 `TimelineThemeData`, +片段坐标统一来自 Layout。 + +拖动片段内侧左/右边缘可做基础裁剪,悬浮或选中时显示主题管理的手柄。串行片段磁性 +移动后缀,连接片段左裁剪保持右边缘,容器裁剪不修改内部定义。裁剪支持边缘自动滚动 +及撤销重做;无效裁剪松手保持文档不变。 + +`lib/demo_timeline.dart` 创建 DTO、Kernel 和 Layout,并与 `TimelineView` 共用宿主的 +媒体分类器。`lib/main.dart` 持有并释放 controller,通过 `TimelineInteractionRegion` +接入指针事件;所有编辑都经过 Layout 协调提交,示例不直接修改 Kernel 根。 + +```sh +flutter test +``` + +Widget 测试从当前 Layout 帧计算片段主体和裁剪边缘坐标,验证命中目标,再断言确切的 +编辑结果和撤销/重做根。裁剪预览断言先推进一帧以处理指针更新。应用 CI 纳入这些测试 +和示例源码的静态分析。 diff --git a/packages/cutdex_timeline_ui/example/analysis_options.yaml b/packages/cutdex_timeline_ui/example/analysis_options.yaml new file mode 100644 index 0000000..b284caa --- /dev/null +++ b/packages/cutdex_timeline_ui/example/analysis_options.yaml @@ -0,0 +1,5 @@ +analyzer: + exclude: + - build/** + - macos/** +include: ../analysis_options.yaml diff --git a/packages/cutdex_timeline_ui/example/lib/demo_timeline.dart b/packages/cutdex_timeline_ui/example/lib/demo_timeline.dart new file mode 100644 index 0000000..2d0844b --- /dev/null +++ b/packages/cutdex_timeline_ui/example/lib/demo_timeline.dart @@ -0,0 +1,184 @@ +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; + +/// The demo host owns this media catalog; payload references remain opaque to +/// the UI and Kernel. The same classifier also builds Layout's media index. +LayoutMediaLeafClass classifyDemoMedia(ElementRecord record) => + record.payloadRef == PayloadRef('demo-audio') + ? LayoutMediaLeafClass.audioOnly + : LayoutMediaLeafClass.nonAudio; + +TimelineCamera initialDemoCamera() => TimelineCamera( + baseTick: 0, + pixelsPerTick: 24 / TimelineClock.ticksPerSecond, +); + +/// Optional deterministic three-hour scene; synthetic metadata, not real media. +TimelineViewController createDemoController({bool longTimeline = false}) { + final tailCount = longTimeline ? 359 : 0; + final kernel = TimelineKernel.importDto( + TimelineDto( + id: SequenceId('demo'), + format: TimelineFormat.fps24, + primaryStorylineId: StorylineId('primary'), + storylines: [ + StorylineDto( + id: StorylineId('primary'), + elementIds: [ + for (final id in [ + 'opening', + 'street', + 'gap', + 'compound', + 'voice', + 'ending', + ]) + ElementId(id), + for (var i = 0; i < tailCount; i++) ElementId('long-$i'), + ], + ), + StorylineDto( + id: StorylineId('compound-content'), + elementIds: [ElementId('inside-a'), ElementId('inside-b')], + ), + ], + elements: [ + _clip('opening', 8), + _clip('street', 10), + _clip('gap', 3, structure: ElementStructure.gap), + _clip('compound', 8, structure: ElementStructure.container), + _clip('voice', 6, audio: true), + _clip('ending', 8, enabled: false), + _clip('inside-a', 4), + _clip('inside-b', 4), + _clip('title', 5, extendable: true), + _clip('overlay', 7), + _clip('music', 18, audio: true), + _clip('ambience', 14, audio: true), + // Base scene is 42 seconds: 358 * 30 + 18 brings it to exactly 3h. + for (var i = 0; i < tailCount; i++) ...[ + _clip('long-$i', i == tailCount - 1 ? 18 : 30, audio: i % 11 == 7), + if (i % 3 == 0) ...[ + _clip('long-title-$i', 8, extendable: true), + _clip('long-overlay-$i', 12), + ], + if (i % 5 == 0) _clip('long-audio-$i', 25, audio: true), + ], + ], + connections: [ + _connection('title', 'opening', 2, ConnectionSide.above), + _connection('overlay', 'opening', 4, ConnectionSide.above), + _connection('music', 'opening', 0, ConnectionSide.below), + _connection('ambience', 'street', 2, ConnectionSide.below), + for (var i = 0; i < tailCount; i++) ...[ + if (i % 3 == 0) ...[ + _connection('long-title-$i', 'long-$i', 2, ConnectionSide.above), + _connection('long-overlay-$i', 'long-$i', 4, ConnectionSide.above), + ], + if (i % 5 == 0) + _connection('long-audio-$i', 'long-$i', 0, ConnectionSide.below), + ], + ], + transitions: [ + TransitionDto( + id: TransitionId('dissolve'), + storylineId: StorylineId('primary'), + leftId: ElementId('opening'), + rightId: ElementId('street'), + duration: RationalTime.seconds(1), + timing: TransitionTiming.overlap, + ), + ], + ), + ); + final primary = kernel.current.query().primaryStoryline; + final media = TimelineLayoutMediaIndex.build( + version: kernel.current, + classify: classifyDemoMedia, + ); + const domain = LayoutDomainId('main'); + final projection = const TimelineLayoutSceneBuilder() + .projectDefinitionWithMedia( + media: media, + definition: primary, + geometry: (_, _, _) => (height: 44, domain: domain), + ); + final engine = TimelineLayoutEngine(kernel: kernel); + engine.buildComponents( + kernel: kernel, + components: TimelineLayoutComponents.build( + semantic: projection, + expanded: const [], + resolve: (_, _, _, _) => const [], + ), + policy: LayoutPolicy( + version: 1, + stacks: [ + for (final side in ConnectionSide.values) + LayoutStackPolicy( + stack: LayoutStackKey(scope: primary, side: side), + primaryBoundary: side == ConnectionSide.above ? 150 : 206, + domains: const [domain], + innerGap: 16, + bodyGap: 8, + ), + ], + ), + ); + var nextId = 0; + return TimelineViewController.editable( + engine: engine, + createConnectionId: () => ConnectionId('demo-link-${nextId++}'), + createElementId: () => ElementId('demo-blade-${nextId++}'), + geometry: TimelineViewportGeometry(primaryTop: 150, primaryHeight: 56), + camera: initialDemoCamera(), + ); +} + +ElementDto _clip( + String id, + int seconds, { + bool audio = false, + bool extendable = false, + bool enabled = true, + ElementStructure structure = ElementStructure.content, +}) => ElementDto( + id: ElementId(id), + name: id, + structure: structure, + sourceRange: TimeRange( + start: RationalTime.zero, + duration: RationalTime.seconds(seconds), + ), + duration: RationalTime.seconds(seconds), + sourceExtendable: extendable, + mediaRange: structure == ElementStructure.content && !extendable + ? TimeRange( + start: RationalTime.zero, + duration: RationalTime.seconds(seconds), + ) + : null, + enabled: enabled, + payloadRef: structure == ElementStructure.content + ? PayloadRef(audio ? 'demo-audio' : 'demo-visual') + : null, + containerStorylineId: structure == ElementStructure.container + ? StorylineId('compound-content') + : null, +); + +ConnectionDto _connection( + String target, + String anchor, + int seconds, + ConnectionSide side, +) => ConnectionDto( + id: ConnectionId(target), + anchorId: ElementId(anchor), + targetId: ElementId(target), + anchorTime: RationalTime.seconds(seconds), + targetTime: RationalTime.zero, + side: side, +); diff --git a/packages/cutdex_timeline_ui/example/lib/main.dart b/packages/cutdex_timeline_ui/example/lib/main.dart new file mode 100644 index 0000000..f2582c8 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/lib/main.dart @@ -0,0 +1,338 @@ +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/scheduler.dart'; + +import 'demo_timeline.dart'; + +void main() => runApp(const TimelineExampleApp()); + +class TimelineExampleApp extends StatefulWidget { + const TimelineExampleApp({super.key}); + + @override + State createState() => _TimelineExampleAppState(); +} + +class _TimelineExampleAppState extends State + with SingleTickerProviderStateMixin, WidgetsBindingObserver { + late final TimelineViewController _shortController = createDemoController(); + TimelineViewController? _longController; + bool _longScene = false; + TimelineViewController get _controller => _longScene + ? (_longController ??= createDemoController(longTimeline: true)) + : _shortController; + bool _light = false; + + late final Ticker _ticker; + Duration _elapsed = Duration.zero; + Duration _anchorElapsed = Duration.zero; + int _anchorTick = 0; + bool _updatingPlayhead = false; + + @override + void initState() { + super.initState(); + _ticker = createTicker(_advancePlayback); + _controller.addListener(_timelineChanged); + WidgetsBinding.instance.addObserver(this); + } + + int get _duration => _controller.version.kernelVersion.query().storylineSpan( + _controller.storyline, + ); + + void _pause() { + if (!_ticker.isActive) return; + _ticker.stop(); + setState(() {}); + } + + void _togglePlayback() { + if (_ticker.isActive) { + _pause(); + return; + } + if (_duration <= 0 || _controller.isDragging) return; + if (_controller.playheadTick >= _duration) _controller.seekTo(0); + _anchorTick = _controller.playheadTick; + _elapsed = _anchorElapsed = Duration.zero; + _ticker.start(); + setState(() {}); + } + + void _advancePlayback(Duration elapsed) { + _elapsed = elapsed; + final tick = + _anchorTick + + (elapsed - _anchorElapsed).inMicroseconds * + TimelineClock.ticksPerSecond ~/ + Duration.microsecondsPerSecond; + final end = _duration; + _updatingPlayhead = true; + try { + _controller.seekTo(tick.clamp(0, end)); + } finally { + _updatingPlayhead = false; + } + if (tick >= end) _pause(); + } + + void _timelineChanged() { + if (!_ticker.isActive || _updatingPlayhead) return; + // Seeking rebases the clock; editing gestures pause playback. + _anchorTick = _controller.playheadTick; + _anchorElapsed = _elapsed; + if (_controller.isDragging || _anchorTick >= _duration) _pause(); + } + + @override + void didChangeAppLifecycleState(AppLifecycleState state) { + if (state != AppLifecycleState.resumed) _pause(); + } + + @override + void dispose() { + WidgetsBinding.instance.removeObserver(this); + _controller.removeListener(_timelineChanged); + _ticker.dispose(); + _shortController.dispose(); + _longController?.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + const dark = TimelineThemeData.dark(); + final timelineTheme = _light + ? dark.copyWith( + backgroundColor: const Color(0xfff1f3f6), + gapColor: const Color(0xffdce1e8), + connectionLineColor: const Color(0xff505966), + selectionOutlineColor: const Color(0xff111827), + rulerBackgroundColor: const Color(0xffe2e6ec), + rulerTickColor: const Color(0xff505966), + scrollbarTrackColor: const Color(0xffe2e6ec), + scrollbarThumbColor: const Color(0xff707986), + rulerTextStyle: dark.rulerTextStyle.copyWith( + color: const Color(0xff374151), + ), + ) + : dark; + return MaterialApp( + debugShowCheckedModeBanner: false, + title: 'Cutdex Timeline Example', + theme: ThemeData( + brightness: _light ? Brightness.light : Brightness.dark, + colorSchemeSeed: const Color(0xff4e82d8), + extensions: [timelineTheme], + ), + home: Scaffold( + appBar: AppBar( + title: const Text('Timeline · 示例 / Example'), + actions: [ + PopupMenuButton( + tooltip: '切换场景 / Switch scene', + icon: const Icon(Icons.video_library_outlined), + initialValue: _longScene, + onSelected: (value) { + _pause(); + _controller.cancelDrag(); + _controller.removeListener(_timelineChanged); + setState(() => _longScene = value); + _controller.addListener(_timelineChanged); + }, + itemBuilder: (_) => const [ + PopupMenuItem(value: false, child: Text('短场景 / Short scene')), + PopupMenuItem(value: true, child: Text('3 小时 / 3 hours')), + ], + ), + IconButton( + tooltip: '切换主题 / Toggle theme', + onPressed: () => setState(() => _light = !_light), + icon: Icon(_light ? Icons.dark_mode : Icons.light_mode), + ), + ], + ), + body: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + const Padding( + padding: EdgeInsets.all(12), + child: Text( + '空白左键框选 · 标尺定位 · 滚动平移 · Ctrl/Cmd+滚轮缩放 · 空格拖动/中键平移\n' + 'Blank mouse drag to select · Ruler to seek · Scroll to pan · Ctrl/Cmd+wheel to zoom · Space/middle to pan', + ), + ), + Expanded( + child: LayoutBuilder( + builder: (context, constraints) => Column( + children: [ + Wrap( + alignment: WrapAlignment.center, + children: [ + IconButton( + key: const Key('playback-toggle'), + tooltip: _ticker.isActive + ? '暂停 / Pause' + : '播放 / Play', + onPressed: _togglePlayback, + icon: Icon( + _ticker.isActive ? Icons.pause : Icons.play_arrow, + ), + ), + IconButton( + tooltip: '向左 / Pan left', + onPressed: () => + _controller.panBy(horizontalPixels: -120), + icon: const Icon(Icons.arrow_back), + ), + IconButton( + tooltip: '向右 / Pan right', + onPressed: () => + _controller.panBy(horizontalPixels: 120), + icon: const Icon(Icons.arrow_forward), + ), + IconButton( + tooltip: '缩小 / Zoom out', + onPressed: () => + _zoom(constraints.maxWidth, 1 / 1.25), + icon: const Icon(Icons.zoom_out), + ), + IconButton( + tooltip: '放大 / Zoom in', + onPressed: () => _zoom(constraints.maxWidth, 1.25), + icon: const Icon(Icons.zoom_in), + ), + TextButton.icon( + onPressed: () { + _controller.cancelDrag(); + _pause(); + _controller.seekTo(0); + _controller.setCamera(initialDemoCamera()); + _controller.clearSelection(); + _controller.setHoveredIdentity(null); + }, + icon: const Icon(Icons.restart_alt), + label: const Text('重置 / Reset'), + ), + TextButton( + onPressed: () { + _controller.cancelDrag(); + final q = _controller.version.kernelVersion.query(); + _controller.setCamera( + TimelineCamera( + baseTick: q.storylineSpan( + _controller.storyline, + ), + pixelsPerTick: _controller.camera.pixelsPerTick, + verticalOffset: + _controller.camera.verticalOffset, + ).panBy( + horizontalPixels: -constraints.maxWidth * 0.75, + ), + ); + }, + child: const Text('末尾 / End'), + ), + ListenableBuilder( + listenable: _controller, + builder: (context, _) => Row( + mainAxisSize: MainAxisSize.min, + children: [ + IconButton( + tooltip: '切割 / Blade (Ctrl/Cmd+B)', + icon: const Icon(Icons.content_cut), + onPressed: _controller.canCutSelection + ? _controller.cutSelectionAtPlayhead + : null, + ), + IconButton( + tooltip: '删除 / Delete', + icon: const Icon(Icons.delete_outline), + onPressed: _controller.canDeleteSelection + ? _controller.deleteSelection + : null, + ), + IconButton( + tooltip: '撤销 / Undo', + icon: const Icon(Icons.undo), + onPressed: _controller.canUndo + ? _controller.undo + : null, + ), + IconButton( + tooltip: '重做 / Redo', + icon: const Icon(Icons.redo), + onPressed: _controller.canRedo + ? _controller.redo + : null, + ), + ], + ), + ), + ], + ), + Expanded( + child: TimelineViewport( + controller: _controller, + child: TimelineInteractionRegion( + controller: _controller, + child: TimelineView( + key: const Key('timeline-surface'), + controller: _controller, + classifyContent: classifyDemoMedia, + ), + ), + ), + ), + ], + ), + ), + ), + ListenableBuilder( + listenable: _controller, + builder: (context, _) => Padding( + padding: const EdgeInsets.all(12), + child: SizedBox( + height: 40, + child: Text( + '选中 / Selected: ${_selectionLabel()} · ' + '${(_controller.camera.pixelsPerTick * TimelineClock.ticksPerSecond).toStringAsFixed(1)} px/s\n' + '${_controller.commandRejection ?? _controller.dragRejection ?? (_controller.isDragging ? '预览中,靠边自动滚动 / Preview, hold at edge to scroll' : (_longScene ? '3 小时合成场景 / 3-hour synthetic scene' : '片段拖拽 / Clip drag'))}', + maxLines: 2, + overflow: TextOverflow.ellipsis, + ), + ), + ), + ), + ], + ), + ), + ); + } + + void _zoom(double width, double factor) { + _controller.zoomBy( + scale: factor, + viewport: TimelineViewportRect(width: width, height: 0), + ); + } + + String _selectionLabel() { + if (_controller.selectedIdentities.isEmpty) return '—'; + final identity = _controller.selectedIdentities.first; + final handle = switch (identity) { + ElementHandle value => value, + LayoutBodyId value => value.owner, + _ => null, + }; + if (handle == null) { + return identity is TransitionId ? identity.value : '$identity'; + } + final record = _controller.version.kernelVersion.query().element(handle); + return record.name ?? record.id.value; + } +} diff --git a/packages/cutdex_timeline_ui/example/macos/.gitignore b/packages/cutdex_timeline_ui/example/macos/.gitignore new file mode 100644 index 0000000..746adbb --- /dev/null +++ b/packages/cutdex_timeline_ui/example/macos/.gitignore @@ -0,0 +1,7 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/dgph +**/xcuserdata/ diff --git a/packages/cutdex_timeline_ui/example/macos/Flutter/Flutter-Debug.xcconfig b/packages/cutdex_timeline_ui/example/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 0000000..c2efd0b --- /dev/null +++ b/packages/cutdex_timeline_ui/example/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/packages/cutdex_timeline_ui/example/macos/Flutter/Flutter-Release.xcconfig b/packages/cutdex_timeline_ui/example/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 0000000..c2efd0b --- /dev/null +++ b/packages/cutdex_timeline_ui/example/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/packages/cutdex_timeline_ui/example/macos/Flutter/GeneratedPluginRegistrant.swift b/packages/cutdex_timeline_ui/example/macos/Flutter/GeneratedPluginRegistrant.swift new file mode 100644 index 0000000..301d93f --- /dev/null +++ b/packages/cutdex_timeline_ui/example/macos/Flutter/GeneratedPluginRegistrant.swift @@ -0,0 +1,12 @@ +// +// Generated file. Do not edit. +// + +import FlutterMacOS +import Foundation + +import cutdex_native_flutter + +func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + CutdexRuntimePlugin.register(with: registry.registrar(forPlugin: "CutdexRuntimePlugin")) +} diff --git a/packages/cutdex_timeline_ui/example/macos/Runner.xcodeproj/project.pbxproj b/packages/cutdex_timeline_ui/example/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..bc7e0d5 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,705 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXAggregateTarget section */ + 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; + buildPhases = ( + 33CC111E2044C6BF0003C045 /* ShellScript */, + ); + dependencies = ( + ); + name = "Flutter Assemble"; + productName = FLX; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; }; + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC10EC2044A3C60003C045; + remoteInfo = Runner; + }; + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC111A2044C6BA0003C045; + remoteInfo = FLX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 33CC110E2044A8840003C045 /* Bundle Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; + 33CC10ED2044A3C60003C045 /* timeline_ui_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "timeline_ui_example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 331C80D2294CF70F00263BE5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EA2044A3C60003C045 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C80D6294CF71000263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C80D7294CF71000263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 33BA886A226E78AF003329D5 /* Configs */ = { + isa = PBXGroup; + children = ( + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, + ); + path = Configs; + sourceTree = ""; + }; + 33CC10E42044A3C60003C045 = { + isa = PBXGroup; + children = ( + 33FAB671232836740065AC1E /* Runner */, + 33CEB47122A05771004F2AC0 /* Flutter */, + 331C80D6294CF71000263BE5 /* RunnerTests */, + 33CC10EE2044A3C60003C045 /* Products */, + D73912EC22F37F3D000D13A0 /* Frameworks */, + ); + sourceTree = ""; + }; + 33CC10EE2044A3C60003C045 /* Products */ = { + isa = PBXGroup; + children = ( + 33CC10ED2044A3C60003C045 /* timeline_ui_example.app */, + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 33CC11242044D66E0003C045 /* Resources */ = { + isa = PBXGroup; + children = ( + 33CC10F22044A3C60003C045 /* Assets.xcassets */, + 33CC10F42044A3C60003C045 /* MainMenu.xib */, + 33CC10F72044A3C60003C045 /* Info.plist */, + ); + name = Resources; + path = ..; + sourceTree = ""; + }; + 33CEB47122A05771004F2AC0 /* Flutter */ = { + isa = PBXGroup; + children = ( + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, + ); + path = Flutter; + sourceTree = ""; + }; + 33FAB671232836740065AC1E /* Runner */ = { + isa = PBXGroup; + children = ( + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, + 33E51914231749380026EE4D /* Release.entitlements */, + 33CC11242044D66E0003C045 /* Resources */, + 33BA886A226E78AF003329D5 /* Configs */, + ); + path = Runner; + sourceTree = ""; + }; + D73912EC22F37F3D000D13A0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C80D4294CF70F00263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C80D1294CF70F00263BE5 /* Sources */, + 331C80D2294CF70F00263BE5 /* Frameworks */, + 331C80D3294CF70F00263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C80DA294CF71000263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 33CC10EC2044A3C60003C045 /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 33CC10E92044A3C60003C045 /* Sources */, + 33CC10EA2044A3C60003C045 /* Frameworks */, + 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, + 3399D490228B24CF009A79C7 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + 33CC11202044C79F0003C045 /* PBXTargetDependency */, + ); + name = Runner; + productName = Runner; + productReference = 33CC10ED2044A3C60003C045 /* timeline_ui_example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C80D4294CF70F00263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 33CC10EC2044A3C60003C045; + }; + 33CC10EC2044A3C60003C045 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 1; + }; + }; + }; + 33CC111A2044C6BA0003C045 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Manual; + }; + }; + }; + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 33CC10E42044A3C60003C045; + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 33CC10EC2044A3C60003C045 /* Runner */, + 331C80D4294CF70F00263BE5 /* RunnerTests */, + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C80D3294CF70F00263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EB2044A3C60003C045 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3399D490228B24CF009A79C7 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; + }; + 33CC111E2044C6BF0003C045 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + Flutter/ephemeral/FlutterInputs.xcfilelist, + ); + inputPaths = ( + Flutter/ephemeral/tripwire, + ); + outputFileListPaths = ( + Flutter/ephemeral/FlutterOutputs.xcfilelist, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C80D1294CF70F00263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10E92044A3C60003C045 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C80DA294CF71000263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC10EC2044A3C60003C045 /* Runner */; + targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */; + }; + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 33CC10F52044A3C60003C045 /* Base */, + ); + name = MainMenu.xib; + path = Runner; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 331C80DB294CF71000263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = dev.cutdex.timelineUiExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/timeline_ui_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/timeline_ui_example"; + }; + name = Debug; + }; + 331C80DC294CF71000263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = dev.cutdex.timelineUiExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/timeline_ui_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/timeline_ui_example"; + }; + name = Release; + }; + 331C80DD294CF71000263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = dev.cutdex.timelineUiExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/timeline_ui_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/timeline_ui_example"; + }; + name = Profile; + }; + 338D0CE9231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 15.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Profile; + }; + 338D0CEA231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Profile; + }; + 338D0CEB231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Profile; + }; + 33CC10F92044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 15.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 33CC10FA2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 15.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 33CC10FC2044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 33CC10FD2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 33CC111C2044C6BA0003C045 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 33CC111D2044C6BA0003C045 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C80DB294CF71000263BE5 /* Debug */, + 331C80DC294CF71000263BE5 /* Release */, + 331C80DD294CF71000263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10F92044A3C60003C045 /* Debug */, + 33CC10FA2044A3C60003C045 /* Release */, + 338D0CE9231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10FC2044A3C60003C045 /* Debug */, + 33CC10FD2044A3C60003C045 /* Release */, + 338D0CEA231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC111C2044C6BA0003C045 /* Debug */, + 33CC111D2044C6BA0003C045 /* Release */, + 338D0CEB231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 33CC10E52044A3C60003C045 /* Project object */; +} diff --git a/packages/cutdex_timeline_ui/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/cutdex_timeline_ui/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/cutdex_timeline_ui/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/cutdex_timeline_ui/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..d9b8ab0 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/cutdex_timeline_ui/example/macos/Runner.xcworkspace/contents.xcworkspacedata b/packages/cutdex_timeline_ui/example/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/cutdex_timeline_ui/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/cutdex_timeline_ui/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/cutdex_timeline_ui/example/macos/Runner/AppDelegate.swift b/packages/cutdex_timeline_ui/example/macos/Runner/AppDelegate.swift new file mode 100644 index 0000000..b3c1761 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/macos/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import Cocoa +import FlutterMacOS + +@main +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } + + override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { + return true + } +} diff --git a/packages/cutdex_timeline_ui/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/cutdex_timeline_ui/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..a2ec33f --- /dev/null +++ b/packages/cutdex_timeline_ui/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_16.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_64.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_128.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_1024.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/cutdex_timeline_ui/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/packages/cutdex_timeline_ui/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 0000000000000000000000000000000000000000..82b6f9d9a33e198f5747104729e1fcef999772a5 GIT binary patch literal 102994 zcmeEugo5nb1G~3xi~y`}h6XHx5j$(L*3|5S2UfkG$|UCNI>}4f?MfqZ+HW-sRW5RKHEm z^unW*Xx{AH_X3Xdvb%C(Bh6POqg==@d9j=5*}oEny_IS;M3==J`P0R!eD6s~N<36C z*%-OGYqd0AdWClO!Z!}Y1@@RkfeiQ$Ib_ z&fk%T;K9h`{`cX3Hu#?({4WgtmkR!u3ICS~|NqH^fdNz>51-9)OF{|bRLy*RBv#&1 z3Oi_gk=Y5;>`KbHf~w!`u}!&O%ou*Jzf|Sf?J&*f*K8cftMOKswn6|nb1*|!;qSrlw= zr-@X;zGRKs&T$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V*(O5)y`jW!*wzF-l^K`Bxgap+0Ej z@c^nf{Ic`6I5#9bcE7fwiiP8JZ9dr3FsD~SBiW_`8{UgFt*{$@qj#E)90JYra>Zs3 z$sCTuzOye2GdTO;4@;wgJK@!ij-|c--insluCR}{#q=D6Xz#nL6;`rkc*UzLTR%Y{ zN2YK;Zcz4YY=+|(0_?E=#~3U@I1fIyRiBF zIeWj=id+b|L;kSMs>NMfeB^(={IdrC;NYJy_$L+olL`OdOqgH0OpSa?FTRhwb<|%A Pe7HEdAEg|=c=LY&YVNkY literal 0 HcmV?d00001 diff --git a/packages/cutdex_timeline_ui/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/packages/cutdex_timeline_ui/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 0000000000000000000000000000000000000000..13b35eba55c6dabc3aac36f33d859266c18fa0d0 GIT binary patch literal 5680 zcmaiYXH?Tqu=Xz`p-L#B_gI#0we$cm_HcmYFP$?wjD#BaCN4mzC5#`>w9y6=ThxrYZc0WPXprg zYjB`UsV}0=eUtY$(P6YW}npdd;%9pi?zS3k-nqCob zSX_AQEf|=wYT3r?f!*Yt)ar^;l3Sro{z(7deUBPd2~(SzZ-s@0r&~Km2S?8r##9-< z)2UOSVaHqq6}%sA9Ww;V2LG=PnNAh6mA2iWOuV7T_lRDR z&N8-eN=U)-T|;wo^Wv=34wtV0g}sAAe}`Ph@~!|<;z7*K8(qkX0}o=!(+N*UWrkEja*$_H6mhK1u{P!AC39} z|3+Z(mAOq#XRYS)TLoHv<)d%$$I@+x+2)V{@o~~J-!YUI-Q9%!Ldi4Op&Lw&B>jj* zwAgC#Y>gbIqv!d|J5f!$dbCXoq(l3GR(S>(rtZ~Z*agXMMKN!@mWT_vmCbSd3dUUm z4M&+gz?@^#RRGal%G3dDvj7C5QTb@9+!MG+>0dcjtZEB45c+qx*c?)d<%htn1o!#1 zpIGonh>P1LHu3s)fGFF-qS}AXjW|M*2Xjk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on.appiconset/app_icon_16.png b/packages/cutdex_timeline_ui/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png new file mode 100644 index 0000000000000000000000000000000000000000..0a3f5fa40fb3d1e0710331a48de5d256da3f275d GIT binary patch literal 520 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|Tv8)E(|mmy zw18|52FCVG1{RPKAeI7R1_tH@j10^`nh_+nfC(-uuz(rC1}QWNE&K#jR^;j87-Auq zoUlN^K{r-Q+XN;zI ze|?*NFmgt#V#GwrSWaz^2G&@SBmck6ZcIFMww~vE<1E?M2#KUn1CzsB6D2+0SuRV@ zV2kK5HvIGB{HX-hQzs0*AB%5$9RJ@a;)Ahq#p$GSP91^&hi#6sg*;a~dt}4AclK>h z_3MoPRQ{i;==;*1S-mY<(JFzhAxMI&<61&m$J0NDHdJ3tYx~j0%M-uN6Zl8~_0DOkGXc0001@sz3l12C6Xg{AT~( zm6w64BA|AX`Ve)YY-glyudNN>MAfkXz-T7`_`fEolM;0T0BA)(02-OaW z0*cW7Z~ec94o8&g0D$N>b!COu{=m}^%oXZ4?T8ZyPZuGGBPBA7pbQMoV5HYhiT?%! zcae~`(QAN4&}-=#2f5fkn!SWGWmSeCISBcS=1-U|MEoKq=k?_x3apK>9((R zuu$9X?^8?@(a{qMS%J8SJPq))v}Q-ZyDm6Gbie0m92=`YlwnQPQP1kGSm(N2UJ3P6 z^{p-u)SSCTW~c1rw;cM)-uL2{->wCn2{#%;AtCQ!m%AakVs1K#v@(*-6QavyY&v&*wO_rCJXJuq$c$7ZjsW+pJo-$L^@!7X04CvaOpPyfw|FKvu;e(&Iw>Tbg zL}#8e^?X%TReXTt>gsBByt0kSU20oQx*~P=4`&tcZ7N6t-6LiK{LxX*p6}9c<0Pu^ zLx1w_P4P2V>bX=`F%v$#{sUDdF|;rbI{p#ZW`00Bgh(eB(nOIhy8W9T>3aQ=k8Z9% zB+TusFABF~J?N~fAd}1Rme=@4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Tp_N zor=k`)t|ra^ySr-+(|R9mB(E=`MX#y(wSw)$!iymzB;^c*>%&^*7HxTnRga=soSZT zdDl+9s;r!v8hk6POtzBaig4pRp7eWF(<8gufvNHPu6xs-=e{;mnHzJyGKE+8L0j}; z@%8-e^UCL5HhMiR>sD3Rve&yVZ#{Q1*CO8c+qSr^Z#CN;)(X5>tGG5yUw3<+CfhaL z%bP;hZ?jvgJU67BWyiy74_)6r)_nSxttxn0`0?HE^5(uydHVgP+HE$V?Lv)Leti43 zWA|;f-RqX``95>)^P-fw!Vi{3KNsII-*5f){gdxqd%gVdB1sOBNe=nEW%;i~g_P8J w!5uhoe-Jcg1nPN%MiEAtgE$;km@@t6ukO)1^!cY^83Pb_y85}Sb4q9e0FIsP9{>OV literal 0 HcmV?d00001 diff --git a/packages/cutdex_timeline_ui/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/packages/cutdex_timeline_ui/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png new file mode 100644 index 0000000000000000000000000000000000000000..2f1632cfddf3d9dade342351e627a0a75609fb46 GIT binary patch literal 2218 zcmV;b2vzrqP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91K%fHv1ONa40RR91KmY&$07g+lumAuE6iGxuRCodHTWf3-RTMruyW6Fu zQYeUM04eX6D5c0FCjKKPrco1(K`<0SL=crI{PC3-^hZU0kQie$gh-5!7z6SH6Q0J% zqot*`H1q{R5fHFYS}dje@;kG=v$L0(yY0?wY2%*c?A&{2?!D*x?m71{of2gv!$5|C z3>qG_BW}7K_yUcT3A5C6QD<+{aq?x;MAUyAiJn#Jv8_zZtQ{P zTRzbL3U9!qVuZzS$xKU10KiW~Bgdcv1-!uAhQxf3a7q+dU6lj?yoO4Lq4TUN4}h{N z*fIM=SS8|C2$(T>w$`t@3Tka!(r!7W`x z-isCVgQD^mG-MJ;XtJuK3V{Vy72GQ83KRWsHU?e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Z2kVYr + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/cutdex_timeline_ui/example/macos/Runner/Configs/AppInfo.xcconfig b/packages/cutdex_timeline_ui/example/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 0000000..2bfe768 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// Application-level settings for the Runner target. +// +// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the +// future. If not, the values below would default to using the project name when this becomes a +// 'flutter create' template. + +// The application's name. By default this is also the title of the Flutter window. +PRODUCT_NAME = timeline_ui_example + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = dev.cutdex.timelineUiExample + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright © 2026 dev.cutdex. All rights reserved. diff --git a/packages/cutdex_timeline_ui/example/macos/Runner/Configs/Debug.xcconfig b/packages/cutdex_timeline_ui/example/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 0000000..36b0fd9 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/packages/cutdex_timeline_ui/example/macos/Runner/Configs/Release.xcconfig b/packages/cutdex_timeline_ui/example/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 0000000..dff4f49 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/packages/cutdex_timeline_ui/example/macos/Runner/Configs/Warnings.xcconfig b/packages/cutdex_timeline_ui/example/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 0000000..42bcbf4 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings +GCC_WARN_UNDECLARED_SELECTOR = YES +CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_PRAGMA_PACK = YES +CLANG_WARN_STRICT_PROTOTYPES = YES +CLANG_WARN_COMMA = YES +GCC_WARN_STRICT_SELECTOR_MATCH = YES +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +GCC_WARN_SHADOW = YES +CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/packages/cutdex_timeline_ui/example/macos/Runner/DebugProfile.entitlements b/packages/cutdex_timeline_ui/example/macos/Runner/DebugProfile.entitlements new file mode 100644 index 0000000..dddb8a3 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.network.server + + + diff --git a/packages/cutdex_timeline_ui/example/macos/Runner/Info.plist b/packages/cutdex_timeline_ui/example/macos/Runner/Info.plist new file mode 100644 index 0000000..4789daa --- /dev/null +++ b/packages/cutdex_timeline_ui/example/macos/Runner/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + $(PRODUCT_COPYRIGHT) + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/packages/cutdex_timeline_ui/example/macos/Runner/MainFlutterWindow.swift b/packages/cutdex_timeline_ui/example/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 0000000..823be79 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,19 @@ +import Cocoa +import FlutterMacOS + +class MainFlutterWindow: NSWindow { + override func awakeFromNib() { + let flutterViewController = FlutterViewController() + let windowFrame = self.frame + self.contentViewController = flutterViewController + self.setFrame(windowFrame, display: true) + + RegisterGeneratedPlugins(registry: flutterViewController) + + super.awakeFromNib() + title = "Cutdex Timeline Example" + minSize = NSSize(width: 600, height: 480) + setContentSize(NSSize(width: 1200, height: 760)) + center() + } +} diff --git a/packages/cutdex_timeline_ui/example/macos/Runner/Release.entitlements b/packages/cutdex_timeline_ui/example/macos/Runner/Release.entitlements new file mode 100644 index 0000000..852fa1a --- /dev/null +++ b/packages/cutdex_timeline_ui/example/macos/Runner/Release.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.app-sandbox + + + diff --git a/packages/cutdex_timeline_ui/example/macos/RunnerTests/RunnerTests.swift b/packages/cutdex_timeline_ui/example/macos/RunnerTests/RunnerTests.swift new file mode 100644 index 0000000..61f3bd1 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/macos/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Cocoa +import FlutterMacOS +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/packages/cutdex_timeline_ui/example/pubspec.yaml b/packages/cutdex_timeline_ui/example/pubspec.yaml new file mode 100644 index 0000000..36a9f89 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/pubspec.yaml @@ -0,0 +1,24 @@ +name: timeline_ui_example +description: Interactive Cutdex timeline painting and viewport example. +publish_to: none +version: 0.1.0 + +environment: + sdk: ^3.12.0 + +resolution: workspace + +dependencies: + cutdex_core: + path: ../../../.dependencies/cutdex_core + cutdex_timeline_ui: ^0.1.0 + flutter: + sdk: flutter + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^6.0.0 + +flutter: + uses-material-design: true diff --git a/packages/cutdex_timeline_ui/example/test/commands_test.dart b/packages/cutdex_timeline_ui/example/test/commands_test.dart new file mode 100644 index 0000000..001b026 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/test/commands_test.dart @@ -0,0 +1,379 @@ +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:timeline_ui_example/demo_timeline.dart'; +import 'package:timeline_ui_example/main.dart'; + +import 'support/timeline_geometry.dart'; + +const second = TimelineClock.ticksPerSecond; +final viewport = TimelineViewportRect(width: 640, height: 360); +Widget surface(TimelineViewController c) => MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 640, + height: 360, + child: TimelineInteractionRegion( + controller: c, + edgeScrollExtent: 0, + child: TimelineView(controller: c), + ), + ), + ), +); + +Future shortcut( + WidgetTester tester, + LogicalKeyboardKey modifier, + LogicalKeyboardKey key, { + bool shift = false, +}) async { + await tester.sendKeyDownEvent(modifier); + if (shift) await tester.sendKeyDownEvent(LogicalKeyboardKey.shiftLeft); + await tester.sendKeyEvent(key); + if (shift) await tester.sendKeyUpEvent(LogicalKeyboardKey.shiftLeft); + await tester.sendKeyUpEvent(modifier); + await tester.pump(); +} + +void main() { + test('playhead cuts an unselected clip on a three-hour timeline', () { + final c = createDemoController(longTimeline: true); + addTearDown(c.dispose); + final base = c.version; + c.seekTo(47 * second); + expect(c.selectedIdentities, isEmpty); + expect(c.canCutSelection, isTrue); + expect(c.cutSelectionAtPlayhead(), isTrue, reason: c.commandRejection); + final query = c.version.kernelVersion.query(); + expect( + query.element(query.elementById(ElementId('long-0'))!).duration, + 5 * second, + ); + expect(query.storylineSpan(c.storyline), 10800 * second); + c.undo(); + expect(c.version, same(base)); + c.clearSelection(); + c.seekTo(0); + expect(c.canCutSelection, isFalse); + }); + + test( + 'playhead without selection cuts only Primary and preserves connected clips', + () { + final c = createDemoController(); + addTearDown(c.dispose); + final before = c.version.kernelVersion.query(); + final opening = before.elementById(ElementId('opening'))!; + final title = before.elementById(ElementId('title'))!; + c.seekTo(5 * second); + + expect(c.selectedIdentities, isEmpty); + expect(c.cutSelectionAtPlayhead(), isTrue, reason: c.commandRejection); + + final after = c.version.kernelVersion.query(); + expect(after.element(opening).duration, 5 * second); + expect(after.element(title), before.element(title)); + expect(c.selectedIdentities, isEmpty); + }, + ); + + test( + 'three-hour mixed selection cuts and deletes through one history entry each', + () { + final c = createDemoController(longTimeline: true); + addTearDown(c.dispose); + final base = c.version; + final q = base.kernelVersion.query(); + final originals = { + q.elementById(ElementId('long-0'))!, + for (final id in ['long-title-0', 'long-overlay-0', 'long-audio-0']) + LayoutBodyId.element(q.elementById(ElementId(id))!), + }; + c.setSelection(originals); + c.seekTo(47 * second); + expect(c.cutSelectionAtPlayhead(), isTrue, reason: c.commandRejection); + final cut = c.version; + expect(c.selectedIdentities.length, 8); + expect( + cut.kernelVersion.query().storylineSpan(c.storyline), + 10800 * second, + ); + final stale = c.selectedIdentities.toSet(); + expect(c.deleteSelection(), isTrue, reason: c.commandRejection); + expect( + c.version.kernelVersion.query().storylineSpan(c.storyline), + 10770 * second, + ); + final deleted = c.version; + c.setSelection(stale); + expect(c.selectedIdentities, isEmpty); + c.seekTo(0); + expect(c.canCutSelection, isFalse); + expect(c.cutSelectionAtPlayhead(), isFalse); + expect(c.version, same(deleted)); + // Retired identities become an empty selection, so Blade uses Primary. + c.seekTo(47 * second); + expect(c.canCutSelection, isTrue); + expect(c.cutSelectionAtPlayhead(), isTrue); + final fallback = c.version.kernelVersion.query(); + final next = q.elementById(ElementId('long-1'))!; + expect(fallback.absoluteStart(next), 42 * second); + expect(fallback.element(next).duration, 5 * second); + expect(fallback.storylineSpan(c.storyline), 10770 * second); + expect(c.selectedIdentities, isEmpty); + c.undo(); + expect(c.version, same(deleted)); + c.undo(); + expect(c.version, same(cut)); + c.undo(); + expect(c.version, same(base)); + c.setSelection(stale.difference(originals)); + expect(c.selectedIdentities, isEmpty); + expect(c.canDeleteSelection, isFalse); + expect(c.deleteSelection(), isFalse); + c.setSelection(stale); + expect(c.selectedIdentities, originals); + expect(c.version, same(base)); + c.clearSelection(); + expect(c.canDeleteSelection, isFalse); + expect(c.deleteSelection(), isFalse); + }, + ); + test( + 'boundaries, outside playhead and unsupported mixed selections do not edit', + () { + final c = createDemoController(); + addTearDown(c.dispose); + final base = c.version; + final title = base.kernelVersion.query().elementById(ElementId('title'))!; + c.setSelection([LayoutBodyId.element(title)]); + for (final tick in [0, 2, 7, 10]) { + c.seekTo(tick * second); + expect(c.canCutSelection, isFalse); + expect(c.cutSelectionAtPlayhead(), isFalse); + } + c.setSelection([title, TransitionId('dissolve')]); + expect(c.canDeleteSelection, isFalse); + expect(c.deleteSelection(), isFalse); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + }, + ); + test( + 'multi-Primary and connected blade publishes together; both halves remain selected', + () { + final c = createDemoController(); + addTearDown(c.dispose); + final base = c.version; + final q = base.kernelVersion.query(); + c.setSelection([ + q.elementById(ElementId('opening'))!, + LayoutBodyId.element(q.elementById(ElementId('title'))!), + ]); + c.seekTo(5 * second); + expect(c.cutSelectionAtPlayhead(), isTrue, reason: c.commandRejection); + expect(c.selectedIdentities.length, 4); + expect( + c.version.kernelVersion.query().storylineSpan(c.storyline), + 42 * second, + ); + c.undo(); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + }, + ); + test( + 'delete all Primary members leaves an empty timeline, not a replacement gap', + () { + final c = createDemoController(); + addTearDown(c.dispose); + final base = c.version; + c.setSelection(base.kernelVersion.query().storylineElements(c.storyline)); + expect(c.deleteSelection(), isTrue, reason: c.commandRejection); + expect(c.version.kernelVersion.query().storylineLength(c.storyline), 0); + expect(c.version.scene.bodies, isEmpty); + expect(c.project(viewport).length, 0); + c.undo(); + expect(c.version, same(base)); + }, + ); + testWidgets( + 'move, trim, blade, delete and history restore every exact version', + (tester) async { + final c = createDemoController(); + addTearDown(c.dispose); + await tester.pumpWidget(surface(c)); + final versions = [c.version]; + final move = await tester.startGesture(clipPoint(tester, 'title')); + await move.moveBy(const Offset(24, 0)); + await move.up(); + versions.add(c.version); + final trim = await tester.startGesture( + clipPoint(tester, 'title', edge: TimelineTrimEdge.trailing), + ); + await trim.moveBy(const Offset(-24, 0)); + await trim.up(); + versions.add(c.version); + c.seekTo(5 * second); + expect(c.cutSelectionAtPlayhead(), isTrue, reason: c.commandRejection); + versions.add(c.version); + expect(c.deleteSelection(), isTrue); + versions.add(c.version); + expect(versions.toSet().length, 5); + for (final previous in versions.reversed.skip(1)) { + c.undo(); + expect(c.version, same(previous)); + } + for (final next in versions.skip(1)) { + c.redo(); + expect(c.version, same(next)); + } + expect(tester.takeException(), isNull); + }, + ); + for (final modifier in [ + LogicalKeyboardKey.metaLeft, + LogicalKeyboardKey.controlLeft, + ]) { + testWidgets('blade, delete, undo and redo shortcuts: $modifier', ( + tester, + ) async { + final c = createDemoController(); + addTearDown(c.dispose); + await tester.pumpWidget(surface(c)); + await tester.tapAt(clipPoint(tester, 'title')); + c.seekTo(4 * second); + final base = c.version; + await shortcut(tester, modifier, LogicalKeyboardKey.keyB); + final cut = c.version; + expect(cut, isNot(same(base))); + await tester.sendKeyEvent( + modifier == LogicalKeyboardKey.metaLeft + ? LogicalKeyboardKey.backspace + : LogicalKeyboardKey.delete, + ); + final deleted = c.version; + expect(deleted, isNot(same(cut))); + await shortcut(tester, modifier, LogicalKeyboardKey.keyZ); + expect(c.version, same(cut)); + await shortcut(tester, modifier, LogicalKeyboardKey.keyZ, shift: true); + expect(c.version, same(deleted)); + expect(tester.takeException(), isNull); + }); + } + testWidgets('command shortcuts cannot mutate a running trim', (tester) async { + final c = createDemoController(); + addTearDown(c.dispose); + await tester.pumpWidget(surface(c)); + c.seekTo(4 * second); + final base = c.version; + final trim = await tester.startGesture( + clipPoint(tester, 'title', edge: TimelineTrimEdge.trailing), + ); + await trim.moveBy(const Offset(-24, 0)); + await shortcut( + tester, + LogicalKeyboardKey.metaLeft, + LogicalKeyboardKey.keyB, + ); + await tester.sendKeyEvent(LogicalKeyboardKey.delete); + expect(c.deleteSelection(), isFalse); + expect(c.version, same(base)); + expect(c.isTrimming, isTrue); + await trim.cancel(); + expect(c.canUndo, isFalse); + }); + testWidgets( + 'example buttons share commands and enablement with selection/playhead', + (tester) async { + await tester.pumpWidget(const TimelineExampleApp()); + final view = find.byKey(const Key('timeline-surface')); + final c = tester.widget(view).controller; + final blade = find.byWidgetPredicate( + (w) => w is IconButton && w.tooltip == '切割 / Blade (Ctrl/Cmd+B)', + ); + final delete = find.byWidgetPredicate( + (w) => w is IconButton && w.tooltip == '删除 / Delete', + ); + expect(tester.widget(blade).onPressed, isNull); + await tester.tapAt(clipPoint(tester, 'title')); + c.seekTo(4 * second); + await tester.pump(); + expect(tester.widget(blade).onPressed, isNotNull); + final base = c.version; + await tester.tap(blade); + await tester.pump(); + final cut = c.version; + expect(cut, isNot(same(base))); + await tester.tap(delete); + await tester.pump(); + expect(c.version, isNot(same(cut))); + await tester.tap(find.byTooltip('撤销 / Undo')); + await tester.pump(); + expect(c.version, same(cut)); + expect(tester.takeException(), isNull); + }, + ); + test('connected blade anchors its right half to the Primary at the cut', () { + final c = createDemoController(); + addTearDown(c.dispose); + final base = c.version; + final q = base.kernelVersion.query(); + final overlay = q.elementById(ElementId('overlay'))!; + final street = q.elementById(ElementId('street'))!; + c.setSelection([LayoutBodyId.element(overlay)]); + c.seekTo(9 * TimelineClock.ticksPerSecond); + expect(c.cutSelectionAtPlayhead(), isTrue); + final after = c.version; + final aq = after.kernelVersion.query(); + final right = c.selectedIdentities + .whereType() + .singleWhere((id) => id.owner != overlay) + .owner; + expect(aq.absoluteStart(right), 9 * TimelineClock.ticksPerSecond); + expect(aq.connectionForTarget(right)!.anchor, street); + expect( + aq.connectionForTarget(overlay)!.anchor, + q.connectionForTarget(overlay)!.anchor, + ); + expect( + aq.element(overlay).duration + aq.element(right).duration, + q.element(overlay).duration, + ); + c.undo(); + expect(c.version, same(base)); + c.redo(); + expect(c.version, same(after)); + }); + + test( + 'mixed ancestor/descendant selection deletes in one cascade publication', + () { + final c = createDemoController(); + addTearDown(c.dispose); + final base = c.version; + final q = base.kernelVersion.query(); + c.setSelection([ + q.elementById(ElementId('opening'))!, + LayoutBodyId.element(q.elementById(ElementId('title'))!), + q.elementById(ElementId('gap'))!, + ]); + expect(c.deleteSelection(), isTrue); + final aq = c.version.kernelVersion.query(); + for (final id in ['opening', 'title', 'overlay', 'music', 'gap']) { + expect(aq.elementById(ElementId(id)), isNull); + } + expect(aq.elementById(ElementId('ambience')), isNotNull); + expect(aq.storylineSpan(c.storyline), 32 * TimelineClock.ticksPerSecond); + expect(c.selectedIdentities, isEmpty); + c.undo(); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + }, + ); +} diff --git a/packages/cutdex_timeline_ui/example/test/drag_test.dart b/packages/cutdex_timeline_ui/example/test/drag_test.dart new file mode 100644 index 0000000..f2c0436 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/test/drag_test.dart @@ -0,0 +1,357 @@ +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:timeline_ui_example/demo_timeline.dart'; +import 'package:timeline_ui_example/main.dart'; + +const second = TimelineClock.ticksPerSecond; +final viewport = TimelineViewportRect(width: 1200, height: 500); + +LayoutBodyId id(TimelineViewController c, String name) => LayoutBodyId.element( + c.version.kernelVersion.query().elementById(ElementId(name))!, +); + +Offset grab(TimelineViewController c, LayoutBodyId source) { + final body = c.version.scene.bodies[source]!; + return Offset( + c.camera.screenXForTick(body.start + second, viewport), + c.camera.screenYForWorld(c.version.placementOf(source).top + 10, viewport), + ); +} + +Offset target(TimelineViewController c, int start, int top) => Offset( + c.camera.screenXForTick(start + second, viewport), + c.camera.screenYForWorld(top + 10, viewport), +); + +void main() { + test( + 'drop over a transition chooses a member boundary without source fragments', + () { + final c = createDemoController(); + addTearDown(c.dispose); + final original = c.version; + final q = original.kernelVersion.query(); + final source = id(c, 'title'); + c.beginDrag(viewport: viewport, position: grab(c, source)); + // Opening [0,8) and street [7,17) overlap. Street is the frontmost body; + // this point is in its front half, hence insertion before street. + final pointer = Offset( + c.camera.screenXForTick(75 * second ~/ 10, viewport), + 178, + ); + expect(c.finishDrag(viewport: viewport, position: pointer), isTrue); + final pq = c.version.kernelVersion.query(); + expect( + pq.storylineElements(c.storyline).map((h) => pq.element(h).id.value), + ['opening', 'title', 'street', 'gap', 'compound', 'voice', 'ending'], + ); + expect(pq.absoluteStart(source.owner), 8 * second); + expect(pq.storylineSpan(c.storyline), 48 * second); + for (final h in q.storylineElements(c.storyline)) { + expect(pq.element(h).duration, q.element(h).duration); + expect(pq.element(h).sourceStart, q.element(h).sourceStart); + expect(pq.element(h).sourceDuration, q.element(h).sourceDuration); + } + c.undo(); + expect(c.version, same(original)); + }, + ); + test( + 'latest camera controls preview and exact single drop; undo/redo reuse roots', + () { + final c = createDemoController(); + addTearDown(c.dispose); + final source = id(c, 'title'); + final base = c.version; + c.panBy(horizontalPixels: 30, verticalPixels: 15); + c.zoomAt(screenX: 100, newPixelsPerTick: 32 / second, viewport: viewport); + expect( + c.beginDrag(viewport: viewport, position: grab(c, source)), + isTrue, + ); + final destination = target(c, 5 * second, 90); + c.updateDrag(viewport: viewport, position: destination); + final prepared = c.project(viewport).version; + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + expect( + prepared.kernelVersion.query().absoluteStart(source.owner), + 5 * second, + ); + expect(c.finishDrag(viewport: viewport, position: destination), isTrue); + expect(c.version, same(prepared)); + expect(c.isDragging, isFalse); + c.undo(); + expect(c.version, same(base)); + expect(c.canUndo, isFalse, reason: 'only one edit was committed'); + c.redo(); + expect(c.version, same(prepared)); + expect( + base.kernelVersion.query().absoluteStart(source.owner), + 2 * second, + ); + }, + ); + + test('camera pan during drag re-resolves the stationary screen pointer', () { + final c = createDemoController(); + addTearDown(c.dispose); + final source = id(c, 'title'); + final start = grab(c, source); + c.beginDrag(viewport: viewport, position: start); + final pointer = start + const Offset(24, 0); + c.updateDrag(viewport: viewport, position: pointer); + c.panBy(horizontalPixels: 48); + expect( + c + .project(viewport) + .version + .kernelVersion + .query() + .absoluteStart(source.owner), + 5 * second, + ); + c.finishDrag(viewport: viewport, position: pointer); + expect( + c.version.kernelVersion.query().absoluteStart(source.owner), + 5 * second, + ); + }); + + test( + 'lower dragged top displaces incumbent; lifting above latest top releases it', + () { + final c = createDemoController(); + addTearDown(c.dispose); + final a = id(c, 'title'); + final b = id(c, 'overlay'); + final base = c.version; + c.beginDrag(viewport: viewport, position: grab(c, b)); + c.updateDrag(viewport: viewport, position: target(c, 4 * second, 105)); + final displaced = c.project(viewport).version; + expect(displaced.placementOf(b).lane, 1); + expect(displaced.placementOf(a).lane, 2); + c.updateDrag( + viewport: viewport, + position: target(c, 4 * second, displaced.placementOf(a).top - 5), + ); + expect(c.project(viewport).version.placementOf(a).lane, 1); + c.cancelDrag(); + expect(c.version, same(base)); + expect(c.project(viewport).version, same(base)); + expect(c.canUndo, isFalse); + }, + ); + + test('capture into Primary chooses the back boundary without cutting', () { + final c = createDemoController(); + addTearDown(c.dispose); + final source = id(c, 'title'); + final base = c.version; + c.beginDrag(viewport: viewport, position: grab(c, source)); + final destination = target(c, 12 * second, 168); + c.updateDrag(viewport: viewport, position: destination); + expect(c.dragRejection, isNull); + expect(c.dragMode, LayoutPreviewMode.primaryInsert); + final prepared = c.project(viewport).version; + expect(prepared.scene.bodies[source], isNull); + expect(c.version, same(base)); + expect(c.finishDrag(viewport: viewport, position: destination), isTrue); + final query = c.version.kernelVersion.query(); + expect(query.connectionForTarget(source.owner), isNull); + expect(query.absoluteStart(source.owner), 17 * second); + expect( + query.storylineLength(c.storyline), + base.kernelVersion.query().storylineLength(c.storyline) + 1, + ); + expect(query.storylineSpan(c.storyline), 47 * second); + expect(c.selectedIdentities, {source.owner}); + c.undo(); + expect(c.version, same(base)); + c.redo(); + expect(c.version, same(prepared)); + }); + + test( + 'diagonal side crossing commits time, side and audio avoidance together', + () { + final c = createDemoController(); + addTearDown(c.dispose); + final source = id(c, 'title'); + final audio = id(c, 'music'); + c.beginDrag(viewport: viewport, position: grab(c, source)); + final destination = target(c, 5 * second, 222); + c.updateDrag(viewport: viewport, position: destination); + expect(c.dragRejection, isNull); + final prepared = c.project(viewport).version; + expect(prepared.placementOf(source).lane, 1); + expect(prepared.placementOf(audio).lane, greaterThan(1)); + c.finishDrag(viewport: viewport, position: destination); + expect(c.version, same(prepared)); + expect( + c.version.kernelVersion.query().absoluteStart(source.owner), + 5 * second, + ); + expect( + c.version.kernelVersion + .query() + .connectionOrderLocation(source.owner)! + .side, + ConnectionSide.below, + ); + }, + ); + + test('audio above Primary lands below; left overshoot commits at zero', () { + for (final outside in [false, true]) { + final c = createDemoController(); + final source = id(c, 'music'); + final base = c.version; + c.beginDrag(viewport: viewport, position: grab(c, source)); + final destination = outside + ? const Offset(-10, 80) + : target(c, second, 70); + c.updateDrag(viewport: viewport, position: destination); + expect(c.dragRejection, isNull); + expect(c.dragGhost, isNotNull); + final prepared = c.project(viewport).version; + final query = prepared.kernelVersion.query(); + expect( + query.connectionOrderLocation(source.owner)!.side, + ConnectionSide.below, + ); + expect(query.absoluteStart(source.owner), outside ? 0 : second); + expect( + query.element(source.owner).duration, + base.kernelVersion.query().element(source.owner).duration, + ); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + expect(c.finishDrag(viewport: viewport, position: destination), isTrue); + expect(c.version, same(prepared)); + c.undo(); + expect(c.version, same(base)); + c.dispose(); + } + }); + + test('no motion, cancellation and a second release never create history', () { + final c = createDemoController(); + addTearDown(c.dispose); + final source = id(c, 'title'); + final base = c.version; + final down = grab(c, source); + c.beginDrag(viewport: viewport, position: down); + expect(c.finishDrag(viewport: viewport, position: down), isFalse); + c.beginDrag(viewport: viewport, position: down); + c.updateDrag(viewport: viewport, position: down + const Offset(24, 0)); + c.cancelDrag(); + expect(c.finishDrag(viewport: viewport, position: down), isFalse); + expect(c.canUndo, isFalse); + expect(c.version, same(base)); + }); + + test('new drop after undo clears redo and old roots stay immutable', () { + final c = createDemoController(); + addTearDown(c.dispose); + final source = id(c, 'title'); + void drop(int seconds) { + c.beginDrag(viewport: viewport, position: grab(c, source)); + expect( + c.finishDrag( + viewport: viewport, + position: target(c, seconds * second, 90), + ), + isTrue, + ); + } + + drop(5); + final old = c.version; + c.undo(); + drop(6); + expect(c.canRedo, isFalse); + expect(old.kernelVersion.query().absoluteStart(source.owner), 5 * second); + expect( + c.version.kernelVersion.query().absoluteStart(source.owner), + 6 * second, + ); + }); + + testWidgets( + 'native pointer adapter previews, drops and supports history buttons', + (tester) async { + await tester.pumpWidget(const TimelineExampleApp()); + final finder = find.byKey(const Key('timeline-surface')); + final c = tester.widget(finder).controller; + final base = c.version; + final source = id(c, 'title'); + final origin = tester.getTopLeft(finder); + final gesture = await tester.startGesture( + origin + const Offset(100, 112), + kind: PointerDeviceKind.mouse, + ); + await gesture.moveBy(const Offset(48, 0)); + await tester.pump(); + expect(c.isDragging, isTrue); + expect(c.version, same(base)); + expect(c.dragGhost, isNotNull); + final prepared = c + .project( + TimelineViewportRect( + width: 800, + height: tester.getSize(finder).height, + ), + ) + .version; + await gesture.up(); + await tester.pump(); + expect(c.version, same(prepared)); + expect( + c.version.kernelVersion.query().absoluteStart(source.owner), + 4 * second, + ); + await tester.tap(find.byTooltip('撤销 / Undo')); + await tester.pump(); + expect(c.version, same(base)); + await tester.tap(find.byTooltip('重做 / Redo')); + await tester.pump(); + expect(c.version, same(prepared)); + expect(tester.takeException(), isNull); + }, + ); + + testWidgets('Escape and pointer cancellation discard prepared roots', ( + tester, + ) async { + await tester.pumpWidget(const TimelineExampleApp()); + final finder = find.byKey(const Key('timeline-surface')); + final c = tester.widget(finder).controller; + final base = c.version; + final origin = tester.getTopLeft(finder); + for (final escape in [true, false]) { + final gesture = await tester.startGesture( + origin + const Offset(100, 112), + ); + await gesture.moveBy(const Offset(48, 0)); + await tester.pump(); + expect(c.dragGhost, isNotNull); + if (escape) { + await tester.sendKeyEvent(LogicalKeyboardKey.escape); + await gesture.up(); + } else { + await gesture.cancel(); + } + await tester.pump(); + expect(c.isDragging, isFalse); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + } + expect(tester.takeException(), isNull); + }); +} diff --git a/packages/cutdex_timeline_ui/example/test/edge_scroll_test.dart b/packages/cutdex_timeline_ui/example/test/edge_scroll_test.dart new file mode 100644 index 0000000..1d0ee67 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/test/edge_scroll_test.dart @@ -0,0 +1,403 @@ +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:timeline_ui_example/demo_timeline.dart'; +import 'package:timeline_ui_example/main.dart'; + +import 'support/timeline_geometry.dart'; + +final viewport = TimelineViewportRect(width: 640, height: 360); +const down = Offset(100, 110); + +Widget surface( + TimelineViewController c, { + double width = 640, + double extent = 48, +}) => MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: width, + height: 360, + child: TimelineInteractionRegion( + controller: c, + edgeScrollExtent: extent, + child: TimelineView(controller: c), + ), + ), + ), +); + +Future frames(WidgetTester tester, [int count = 12]) async { + for (var i = 0; i < count; i++) { + await tester.pump(const Duration(milliseconds: 16)); + } +} + +void main() { + for (final milliseconds in [8, 16, 32]) { + testWidgets( + 'scroll distance is elapsed-time based at ${milliseconds}ms frames', + (tester) async { + final c = createDemoController(); + addTearDown(c.dispose); + await tester.pumpWidget(surface(c)); + final gesture = await tester.startGesture(down); + await gesture.moveTo(const Offset(632, 110)); + await tester.pump(); + final before = c.camera.screenXForTick(0, viewport); + for (var elapsed = 0; elapsed < 192; elapsed += milliseconds) { + await tester.pump(Duration(milliseconds: milliseconds)); + } + // 600 px/s * (40 / 48)^2 * 0.192 s = 80 px. + expect( + before - c.camera.screenXForTick(0, viewport), + closeTo(80, 0.001), + ); + await gesture.cancel(); + expect(c.canUndo, isFalse); + }, + ); + } + + testWidgets('a stalled frame cannot catch up with a giant camera jump', ( + tester, + ) async { + final c = createDemoController(); + addTearDown(c.dispose); + await tester.pumpWidget(surface(c)); + final gesture = await tester.startGesture(down); + await gesture.moveTo(const Offset(632, 110)); + await tester.pump(); + final before = c.camera.screenXForTick(0, viewport); + await tester.pump(const Duration(seconds: 5)); + expect( + before - c.camera.screenXForTick(0, viewport), + closeTo(600 * (40 / 48) * (40 / 48) * 0.05, 0.001), + ); + await gesture.cancel(); + }); + for (final point in [const Offset(8, 110), const Offset(400, 8)]) { + testWidgets('left/top edge scroll stops on returning to center: $point', ( + tester, + ) async { + final c = createDemoController(); + addTearDown(c.dispose); + await tester.pumpWidget(surface(c)); + c.panBy(horizontalPixels: 48, verticalPixels: 40); + await tester.pump(); + final gesture = await tester.startGesture( + clipPoint(tester, 'title'), + kind: PointerDeviceKind.mouse, + ); + await gesture.moveTo(point); + await tester.pump(); + final before = c.camera; + await frames(tester, 3); + if (point.dx == 8) { + expect(c.camera.baseTick, lessThan(before.baseTick)); + } else { + expect(c.camera.verticalOffset, lessThan(before.verticalOffset)); + } + await gesture.moveTo(const Offset(300, 110)); + final stopped = c.camera; + await frames(tester); + expect(c.camera, same(stopped)); + await gesture.cancel(); + expect(c.canUndo, isFalse); + expect(tester.takeException(), isNull); + }); + } + + testWidgets( + 'horizontal overshoot keeps scrolling and commits only on release', + (tester) async { + final c = createDemoController(); + addTearDown(c.dispose); + await tester.pumpWidget(surface(c)); + final original = c.version; + final gesture = await tester.startGesture(clipPoint(tester, 'title')); + await gesture.moveTo(const Offset(650, 110)); + await tester.pump(); + final before = c.camera; + await frames(tester, 3); + expect(c.camera.baseTick, greaterThan(before.baseTick)); + expect(c.dragRejection, isNull); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + final prepared = c.project(viewport).version; + expect(prepared, isNot(same(original))); + await gesture.up(); + await tester.pump(); + expect(c.version, same(prepared)); + final stopped = c.camera; + await frames(tester); + expect(c.camera, same(stopped)); + c.undo(); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + c.redo(); + expect(c.version, same(prepared)); + expect(tester.takeException(), isNull); + }, + ); + + testWidgets( + 'vertical overshoot stops scrolling; cancellation discards preview', + (tester) async { + final c = createDemoController(); + addTearDown(c.dispose); + await tester.pumpWidget(surface(c)); + final original = c.version; + final gesture = await tester.startGesture(clipPoint(tester, 'title')); + await gesture.moveTo(const Offset(632, 110)); + await tester.pump(); + await frames(tester, 3); + expect(c.project(viewport).version, isNot(same(original))); + await gesture.moveTo(const Offset(650, 370)); + final stopped = c.camera; + await frames(tester); + expect(c.camera, same(stopped)); + expect(c.version, same(original)); + await gesture.cancel(); + await tester.pump(); + expect(c.isDragging, isFalse); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + expect(tester.takeException(), isNull); + }, + ); + + for (final end in [ + 'cancel', + 'external', + 'resize', + 'replace', + 'unmount', + 'inactive', + 'second touch', + ]) { + testWidgets('edge ticker stops on $end without publishing a stale drag', ( + tester, + ) async { + final c = createDemoController(); + addTearDown(c.dispose); + await tester.pumpWidget(surface(c)); + final original = c.version; + final gesture = await tester.startGesture(down); + await gesture.moveTo(const Offset(632, 110)); + await tester.pump(); + await frames(tester, 3); + switch (end) { + case 'cancel': + await gesture.cancel(); + case 'external': + c.undo(); + case 'resize': + await tester.pumpWidget(surface(c, width: 620)); + case 'replace': + final other = createDemoController(); + addTearDown(other.dispose); + await tester.pumpWidget(surface(other)); + case 'unmount': + await tester.pumpWidget(const SizedBox()); + case 'inactive': + tester.binding.handleAppLifecycleStateChanged( + AppLifecycleState.inactive, + ); + tester.binding.handleAppLifecycleStateChanged( + AppLifecycleState.resumed, + ); + case 'second touch': + final second = await tester.startGesture( + const Offset(400, 240), + pointer: 2, + ); + await second.up(); + } + final stopped = c.camera; + await frames(tester); + expect(c.camera, same(stopped)); + if (end != 'cancel') await gesture.up(); + await tester.pump(); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + expect(tester.takeException(), isNull); + }); + } + + testWidgets( + 'zero edge extent disables auto scroll and idle has no ticker work', + (tester) async { + final c = createDemoController(); + addTearDown(c.dispose); + await tester.pumpWidget(surface(c, extent: 0)); + final original = c.camera; + await frames(tester); + expect(c.camera, same(original)); + final gesture = await tester.startGesture(down); + await gesture.moveTo(const Offset(632, 110)); + await tester.pump(); + await frames(tester); + expect(c.camera, same(original)); + await gesture.cancel(); + expect(tester.binding.transientCallbackCount, 0); + }, + ); + + testWidgets( + 'long-scene switch retains independent history and exposes the end', + (tester) async { + await tester.pumpWidget(const TimelineExampleApp()); + final view = find.byKey(const Key('timeline-surface')); + final short = tester.widget(view).controller; + Future select(String label) async { + await tester.tap(find.byTooltip('切换场景 / Switch scene')); + await tester.pumpAndSettle(); + await tester.tap(find.text(label)); + await tester.pumpAndSettle(); + } + + await select('3 小时 / 3 hours'); + final c = tester.widget(view).controller; + final q = c.version.kernelVersion.query(); + expect( + q.storylineSpan(c.storyline), + 10800 * TimelineClock.ticksPerSecond, + ); + expect(q.storylineLength(c.storyline), 365); + final original = c.version; + final origin = tester.getTopLeft(view); + final gesture = await tester.startGesture( + origin + down, + kind: PointerDeviceKind.mouse, + ); + await gesture.moveTo(origin + const Offset(140, 110)); + await gesture.up(); + await tester.pump(); + expect(c.canUndo, isTrue); + final edited = c.version; + await select('短场景 / Short scene'); + expect(tester.widget(view).controller, same(short)); + expect(short.canUndo, isFalse); + await select('3 小时 / 3 hours'); + expect(tester.widget(view).controller, same(c)); + expect(c.version, same(edited)); + c.undo(); + expect(c.version, same(original)); + await tester.tap(find.text('末尾 / End')); + await tester.pump(); + expect( + c.camera.baseTick, + greaterThan(10700 * TimelineClock.ticksPerSecond), + ); + expect(tester.takeException(), isNull); + }, + ); + + testWidgets( + 'Primary edge scroll drops at latest boundary without splitting', + (tester) async { + final c = createDemoController(longTimeline: true); + addTearDown(c.dispose); + await tester.pumpWidget(surface(c)); + final original = c.version; + final q = original.kernelVersion.query(); + final p = q.elementById(ElementId('opening'))!; + final gesture = await tester.startGesture(const Offset(100, 178)); + await gesture.moveTo(const Offset(632, 178)); + await tester.pump(); + await frames(tester); + expect(c.dragRejection, isNull); + final prepared = c.project(viewport).version; + final pq = prepared.kernelVersion.query(); + expect(pq.storylineLength(c.storyline), q.storylineLength(c.storyline)); + expect(pq.element(p).sourceDuration, q.element(p).sourceDuration); + expect(pq.element(p).duration, q.element(p).duration); + await gesture.up(); + expect(c.version, same(prepared)); + c.undo(); + expect(c.version, same(original)); + expect(tester.takeException(), isNull); + }, + ); + testWidgets( + 'held edge scroll keeps grab offset, commits latest preview and stops', + (tester) async { + final c = createDemoController(); + addTearDown(c.dispose); + await tester.pumpWidget(surface(c)); + final original = c.version; + final source = LayoutBodyId.element( + original.kernelVersion.query().elementById(ElementId('title'))!, + ); + final grabX = + down.dx - + c.camera.screenXForTick( + original.scene.bodies[source]!.start, + viewport, + ); + final gesture = await tester.startGesture( + down, + kind: PointerDeviceKind.mouse, + ); + const edge = Offset(632, 110); + await gesture.moveTo(edge); + await tester.pump(); + final before = c.camera; + await frames(tester); + expect(c.camera.baseTick, greaterThan(before.baseTick)); + expect(c.dragRejection, isNull); + expect( + c.camera.screenXForTick(c.dragGhost!.body.start, viewport) + grabX, + closeTo(edge.dx, 0.001), + ); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + final prepared = c.project(viewport).version; + await gesture.up(); + await tester.pump(); + expect(c.version, same(prepared)); + final stopped = c.camera; + await frames(tester); + expect(c.camera, same(stopped)); + c.undo(); + expect(c.version, same(original)); + c.redo(); + expect(c.version, same(prepared)); + expect(tester.takeException(), isNull); + }, + ); + + testWidgets( + 'corner scroll pans both axes and Escape stops without publishing', + (tester) async { + final c = createDemoController(); + addTearDown(c.dispose); + await tester.pumpWidget(surface(c)); + final original = c.version; + final gesture = await tester.startGesture( + down, + kind: PointerDeviceKind.mouse, + ); + await gesture.moveTo(const Offset(632, 352)); + await tester.pump(); + final before = c.camera; + await frames(tester); + expect(c.camera.baseTick, greaterThan(before.baseTick)); + expect(c.camera.verticalOffset, greaterThan(before.verticalOffset)); + await tester.sendKeyEvent(LogicalKeyboardKey.escape); + final stopped = c.camera; + await frames(tester); + expect(c.camera, same(stopped)); + await gesture.up(); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + expect(tester.takeException(), isNull); + }, + ); +} diff --git a/packages/cutdex_timeline_ui/example/test/group_drag_test.dart b/packages/cutdex_timeline_ui/example/test/group_drag_test.dart new file mode 100644 index 0000000..8416010 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/test/group_drag_test.dart @@ -0,0 +1,131 @@ +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:timeline_ui_example/main.dart'; + +import 'support/timeline_geometry.dart'; + +const second = TimelineClock.ticksPerSecond; +final surface = find.byKey(const Key('timeline-surface')); + +void main() { + for (final grabSecond in [false, true]) { + testWidgets( + 'marquee-selected overlap becomes consecutive Primary clips; grab B=$grabSecond', + (tester) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = tester.widget(surface).controller; + final origin = tester.getTopLeft(surface); + final size = tester.getSize(surface); + final viewport = TimelineViewportRect( + width: size.width, + height: size.height, + ); + final original = c.version; + final q = original.kernelVersion.query(); + final a = q.elementById(ElementId('title'))!, + b = q.elementById(ElementId('overlay'))!; + final rectangle = connectedMarquee(c, viewport); + final select = await tester.startGesture( + origin + rectangle.topLeft, + kind: PointerDeviceKind.mouse, + ); + await select.moveTo(origin + rectangle.bottomRight); + await select.up(); + await tester.pump(); + expect(c.selectedIdentities, { + LayoutBodyId.element(a), + LayoutBodyId.element(b), + }); + final down = + clipPoint(tester, grabSecond ? 'overlay' : 'title') - origin; + final primaryY = clipBody(c, viewport, 'street').center.dy; + final drop = Offset( + c.camera.screenXForTick(18 * second, viewport), + primaryY, + ); + final grabbed = grabSecond ? b : a; + final grabOffset = + down.dx - + c.camera.screenXForTick(q.absoluteStart(grabbed), viewport); + final expectedGrabStart = c.camera.tickAtScreenX( + drop.dx - grabOffset, + viewport, + rounding: TimelineTickRounding.nearest, + ); + final drag = await tester.startGesture( + origin + down, + kind: PointerDeviceKind.mouse, + ); + if (grabSecond) { + await drag.moveTo( + origin + + Offset( + c.camera.screenXForTick(14 * second, viewport), + primaryY, + ), + ); + await tester.pump(); + expect(c.dragMode, LayoutPreviewMode.primaryInsert); + expect(c.dragRejection, isNull); + expect(c.version, same(original)); + expect(tester.takeException(), isNull); + await drag.moveTo(origin + Offset(20, primaryY)); + await tester.pump(); + expect(c.dragMode, LayoutPreviewMode.primaryInsert); + expect( + c.project(viewport).version.kernelVersion.query().absoluteStart(a), + 0, + ); + } + await drag.moveTo(origin + drop); + await tester.pump(); + expect(c.dragRejection, isNull); + expect(c.dragMode, LayoutPreviewMode.primaryInsert); + expect(c.dragGhosts.length, 2); + final prepared = c.project(viewport).version; + final pq = prepared.kernelVersion.query(); + expect(pq.absoluteStart(b), pq.absoluteStart(a) + 5 * second); + expect(pq.absoluteStart(a), 17 * second); + expect( + c.dragGhostFor(LayoutBodyId.element(grabbed))!.body.start, + expectedGrabStart, + ); + expect( + pq.storylineLength(c.storyline), + q.storylineLength(c.storyline) + 2, + ); + for (final h in q.storylineElements(c.storyline)) { + expect(pq.element(h).duration, q.element(h).duration); + expect(pq.element(h).sourceStart, q.element(h).sourceStart); + expect(pq.element(h).sourceDuration, q.element(h).sourceDuration); + } + expect(pq.connectionForTarget(a), isNull); + expect(pq.connectionForTarget(b), isNull); + expect( + pq.storylineSpan(c.storyline), + q.storylineSpan(c.storyline) + 12 * second, + ); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + await drag.up(); + await tester.pump(); + expect(c.version, same(prepared)); + expect(c.selectedIdentities, {a, b}); + final order = pq.storylineElements(c.storyline).toList(); + expect(order[order.indexOf(a) + 1], b); + expect(pq.element(a).sourceStart, q.element(a).sourceStart); + expect(pq.element(a).sourceDuration, q.element(a).sourceDuration); + c.undo(); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + c.redo(); + expect(c.version, same(prepared)); + expect(tester.takeException(), isNull); + }, + ); + } +} diff --git a/packages/cutdex_timeline_ui/example/test/mixed_group_drag_test.dart b/packages/cutdex_timeline_ui/example/test/mixed_group_drag_test.dart new file mode 100644 index 0000000..ffef54b --- /dev/null +++ b/packages/cutdex_timeline_ui/example/test/mixed_group_drag_test.dart @@ -0,0 +1,318 @@ +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:timeline_ui_example/main.dart'; + +void main() { + for (final grabChild in [false, true]) { + for (final finishOnPrimary in [false, true]) { + testWidgets( + 'mixed group switches geometry; child=$grabChild primary=$finishOnPrimary', + (tester) async { + await tester.pumpWidget(const TimelineExampleApp()); + final surface = find.byKey(const Key('timeline-surface')); + final c = tester.widget(surface).controller; + final origin = tester.getTopLeft(surface); + final size = tester.getSize(surface); + final viewport = TimelineViewportRect( + width: size.width, + height: size.height, + ); + final original = c.version; + final q = original.kernelVersion.query(); + final a = q.elementById(ElementId('opening'))!; + final b = q.elementById(ElementId('street'))!; + final child = LayoutBodyId.element( + q.elementById(ElementId('title'))!, + ); + final bId = LayoutBodyId.element(b); + final selected = {b, child}; + c.setSelection(selected); + await tester.pump(); + final down = grabChild + ? const Offset(100, 110) + : const Offset(300, 178); + final drag = await tester.startGesture( + origin + down, + kind: PointerDeviceKind.mouse, + ); + for (var i = 0; i < 3; i++) { + await drag.moveTo(origin + const Offset(720, 178)); + await tester.pump(); + expect(c.dragRejection, isNull); + expect(c.dragMode, LayoutPreviewMode.primaryInsert); + final pq = c.project(viewport).version.kernelVersion.query(); + expect( + pq.storylineElements(c.storyline).map((h) => pq.element(h).name), + [ + 'opening', + 'gap', + 'compound', + 'title', + 'street', + 'voice', + 'ending', + ], + ); + expect(pq.connectionForTarget(child.owner), isNull); + expect( + pq.absoluteStart(b), + pq.absoluteStart(child.owner) + pq.element(child.owner).duration, + ); + expect(c.dragGhostFor(child)!.top, c.dragGhostFor(bId)!.top); + expect( + c.dragGhostFor(child)!.body.height, + c.geometry.primaryHeight, + ); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + + // Return B to its original time, with the pointer outside Primary. + final back = Offset(down.dx, grabChild ? down.dy : 110); + await drag.moveTo(origin + back); + await tester.pump(); + expect(c.dragRejection, isNull); + expect(c.project(viewport).version, same(original)); + final childGhost = c.dragGhostFor(child)!; + final bGhost = c.dragGhostFor(bId)!; + expect(bGhost.body.start, q.absoluteStart(b)); + expect(childGhost.body.start, q.absoluteStart(child.owner)); + expect( + childGhost.top - bGhost.top, + original.placementOf(child).top - c.geometry.primaryTop, + ); + expect( + childGhost.body.height, + original.scene.bodies[child]!.height, + ); + expect(q.connectionForTarget(child.owner)!.anchor, a); + if (grabChild) { + expect(bGhost.top, c.geometry.primaryTop); + expect(childGhost.top, original.placementOf(child).top); + } + expect(c.selectedIdentities, selected); + } + if (finishOnPrimary) { + await drag.moveTo(origin + const Offset(720, 178)); + await tester.pump(); + } + final prepared = c.project(viewport).version; + await drag.up(); + await tester.pump(); + expect(c.version, same(prepared)); + expect( + c.selectedIdentities, + finishOnPrimary ? {b, child.owner} : selected, + ); + if (finishOnPrimary) { + c.undo(); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + c.redo(); + expect(c.version, same(prepared)); + } else { + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + } + expect(tester.takeException(), isNull); + }, + ); + } + } + + testWidgets( + 'off-axis release preserves connected identity and relative time', + (tester) async { + await tester.pumpWidget(const TimelineExampleApp()); + final surface = find.byKey(const Key('timeline-surface')); + final c = tester.widget(surface).controller; + final origin = tester.getTopLeft(surface); + final size = tester.getSize(surface); + final viewport = TimelineViewportRect( + width: size.width, + height: size.height, + ); + final original = c.version; + final q = original.kernelVersion.query(); + final b = q.elementById(ElementId('street'))!; + final child = LayoutBodyId.element(q.elementById(ElementId('title'))!); + c.setSelection({b, child}); + await tester.pump(); + final drag = await tester.startGesture( + origin + const Offset(300, 178), + kind: PointerDeviceKind.mouse, + ); + await drag.moveTo(origin + const Offset(720, 178)); + await tester.pump(); + expect( + c + .project(viewport) + .version + .kernelVersion + .query() + .connectionForTarget(child.owner), + isNull, + ); + await drag.moveTo(origin + const Offset(600, 110)); + await tester.pump(); + expect(c.dragRejection, isNull); + final prepared = c.project(viewport).version; + final pq = prepared.kernelVersion.query(); + expect(prepared, isNot(same(original))); + expect( + pq.connectionForTarget(child.owner)!.id, + q.connectionForTarget(child.owner)!.id, + ); + expect( + pq.absoluteStart(child.owner) - pq.absoluteStart(b), + q.absoluteStart(child.owner) - q.absoluteStart(b), + ); + expect( + c.dragGhostFor(child)!.top - + c.dragGhostFor(LayoutBodyId.element(b))!.top, + original.placementOf(child).top - c.geometry.primaryTop, + ); + await drag.up(); + await tester.pump(); + expect(c.version, same(prepared)); + expect(c.selectedIdentities, {b, child}); + c.undo(); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + c.redo(); + expect(c.version, same(prepared)); + expect(tester.takeException(), isNull); + }, + ); + + for (final dropX in [20.0, 300.0]) { + testWidgets('mixed insertion includes child at boundary $dropX', ( + tester, + ) async { + await tester.pumpWidget(const TimelineExampleApp()); + final surface = find.byKey(const Key('timeline-surface')); + final c = tester.widget(surface).controller; + final origin = tester.getTopLeft(surface); + final size = tester.getSize(surface); + final viewport = TimelineViewportRect( + width: size.width, + height: size.height, + ); + final original = c.version; + final q = original.kernelVersion.query(); + final b = q.elementById(ElementId('street'))!; + final child = LayoutBodyId.element(q.elementById(ElementId('title'))!); + c.setSelection({b, child}); + await tester.pump(); + final drag = await tester.startGesture( + origin + const Offset(100, 110), + kind: PointerDeviceKind.mouse, + ); + await drag.moveTo(origin + Offset(dropX, 178)); + await tester.pump(); + expect(c.dragRejection, isNull); + final pq = c.project(viewport).version.kernelVersion.query(); + expect( + pq.storylineElements(c.storyline).map((h) => pq.element(h).name), + dropX == 20 + ? [ + 'title', + 'street', + 'opening', + 'gap', + 'compound', + 'voice', + 'ending', + ] + : [ + 'opening', + 'title', + 'street', + 'gap', + 'compound', + 'voice', + 'ending', + ], + ); + await drag.cancel(); + await tester.pump(); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + expect(tester.takeException(), isNull); + }); + } + for (final source in ['opening', 'title', 'overlay']) { + testWidgets( + 'Primary and children drag from $source without duplicate moves', + (tester) async { + await tester.pumpWidget(const TimelineExampleApp()); + final surface = find.byKey(const Key('timeline-surface')); + final c = tester.widget(surface).controller; + final origin = tester.getTopLeft(surface); + final size = tester.getSize(surface); + final viewport = TimelineViewportRect( + width: size.width, + height: size.height, + ); + final original = c.version; + final q = original.kernelVersion.query(); + final opening = q.elementById(ElementId('opening'))!; + final street = q.elementById(ElementId('street'))!; + final title = LayoutBodyId.element(q.elementById(ElementId('title'))!); + final overlay = LayoutBodyId.element( + q.elementById(ElementId('overlay'))!, + ); + final selected = {opening, street, title, overlay}; + c.setSelection(selected); + await tester.pump(); + final down = switch (source) { + 'opening' => const Offset(100, 178), + 'title' => const Offset(100, 110), + _ => const Offset(140, 60), + }; + final drag = await tester.startGesture( + origin + down, + kind: PointerDeviceKind.mouse, + ); + await drag.moveTo(origin + const Offset(720, 178)); + await tester.pump(); + expect(c.isDragging, isTrue); + expect(c.dragRejection, isNull); + expect(c.dragMode, LayoutPreviewMode.primaryInsert); + expect(c.selectedIdentities, selected); + expect(c.dragGhosts.length, 6); + final prepared = c.project(viewport).version; + final pq = prepared.kernelVersion.query(); + expect( + pq.storylineElements(c.storyline).map((h) => pq.element(h).name), + ['gap', 'compound', 'opening', 'street', 'voice', 'ending'], + ); + for (final child in [title, overlay]) { + expect( + pq.connectionForTarget(child.owner), + q.connectionForTarget(child.owner), + ); + expect( + pq.absoluteStart(child.owner) - pq.absoluteStart(opening), + q.absoluteStart(child.owner) - q.absoluteStart(opening), + ); + } + expect(pq.storylineSpan(c.storyline), q.storylineSpan(c.storyline)); + expect(c.version, same(original)); + await drag.up(); + await tester.pump(); + expect(c.version, same(prepared)); + expect(c.selectedIdentities, selected); + c.undo(); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + c.redo(); + expect(c.version, same(prepared)); + expect(tester.takeException(), isNull); + }, + ); + } +} diff --git a/packages/cutdex_timeline_ui/example/test/navigation_test.dart b/packages/cutdex_timeline_ui/example/test/navigation_test.dart new file mode 100644 index 0000000..a893b91 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/test/navigation_test.dart @@ -0,0 +1,381 @@ +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:timeline_ui_example/demo_timeline.dart'; +import 'package:timeline_ui_example/main.dart'; + +import 'support/timeline_geometry.dart'; + +const second = TimelineClock.ticksPerSecond; +final surface = find.byKey(const Key('timeline-surface')); + +TimelineViewController controller(WidgetTester tester) => + tester.widget(surface).controller; +TimelineViewportRect viewport(WidgetTester tester) => TimelineViewportRect( + width: tester.getSize(surface).width, + height: tester.getSize(surface).height, +); + +Future wheel(WidgetTester tester, Offset delta, {Offset? at}) async { + await tester.sendEventToBinding( + PointerScrollEvent( + position: at ?? tester.getTopLeft(surface) + const Offset(300, 100), + scrollDelta: delta, + ), + ); + await tester.pump(); +} + +void main() { + test('demo camera starts at zero', () { + expect(initialDemoCamera().baseTick, 0); + final c = createDemoController(); + addTearDown(c.dispose); + expect(c.camera.baseTick, 0); + }); + + testWidgets('left navigation stops at zero without editing the document', ( + tester, + ) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + final original = c.version; + await wheel(tester, const Offset(48, 0)); + expect(c.camera.baseTick, 2 * second); + await wheel(tester, const Offset(-240, 0)); + expect(c.camera.baseTick, 0); + expect(c.camera.screenXForTick(0, viewport(tester)), 0); + await wheel(tester, const Offset(-48, 0)); + expect(c.camera.baseTick, 0); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + }); + + test('overview bands include margin for short and long sequences', () { + expect(TimelineViewController.overviewSecondsFor(0), 600); + expect(TimelineViewController.overviewSecondsFor(8 * 60 * second), 600); + expect(TimelineViewController.overviewSecondsFor(90 * 60 * second), 7200); + expect(TimelineViewController.overviewSecondsFor(3 * 3600 * second), 14400); + expect( + TimelineViewController.overviewSecondsFor(10 * 3600 * second), + 57600, + ); + }); + for (final long in [false, true]) { + test('zoom endpoints and fit respect sequence duration: long=$long', () { + final c = createDemoController(longTimeline: long); + addTearDown(c.dispose); + final v = TimelineViewportRect(width: 800, height: 300); + c.configureViewport( + width: v.width, + height: v.height, + end: c.contentEndTick, + top: 0, + bottom: 300, + ); + c.reconcileViewport(); + c.zoomBy(scale: 1e-12, viewport: v); + expect( + c.camera.pixelsPerTick, + closeTo(800 / (c.maximumVisibleSeconds * second), 1e-12), + ); + expect(c.maximumVisibleSeconds, long ? 14400 : 600); + c.zoomAt(screenX: 100, newPixelsPerTick: 1e-20, viewport: v); + expect(c.camera.pixelsPerTick, c.minimumPixelsPerTick(v.width)); + c.zoomBy(scale: 1e12, viewport: v); + expect(c.camera.pixelsPerTick * c.frameTicks, closeTo(32, 1e-6)); + c.fitTimeline(); + expect(c.camera.baseTick, 0); + expect(c.camera.screenXForTick(c.contentEndTick, v), closeTo(640, 1e-6)); + final before = c.camera; + c.configureViewport( + width: 800, + height: 300, + end: c.contentEndTick + 100 * second, + top: 0, + bottom: 300, + ); + c.reconcileViewport(); + expect(c.camera.pixelsPerTick, before.pixelsPerTick); + expect(c.canUndo, isFalse); + }); + } + + testWidgets('space-click navigation leaves selection unchanged', ( + tester, + ) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + c.setSelection([]); + final before = c.selectedIdentities.toSet(); + await tester.sendKeyDownEvent(LogicalKeyboardKey.space); + await tester.tapAt(tester.getTopLeft(surface) + const Offset(100, 112)); + await tester.sendKeyUpEvent(LogicalKeyboardKey.space); + await tester.pump(); + expect(c.selectedIdentities, before); + expect(c.canUndo, isFalse); + }); + + testWidgets( + 'ruler seek shares the panned and zoomed camera without history', + (tester) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + final base = c.version; + c.panBy(horizontalPixels: 120, verticalPixels: 40); + c.navigate( + from: const Offset(300, 0), + to: const Offset(300, 0), + scale: 2, + viewport: viewport(tester), + ); + await tester.pump(); + final origin = tester.getTopLeft(find.byType(TimelineRuler)); + final camera = c.camera; + final raw = c.camera.tickAtScreenX( + 250, + viewport(tester), + rounding: TimelineTickRounding.nearest, + ); + final frame = TimelineFormat.fps24.frameGrid.quantumTicks; + final expected = (raw / frame).round() * frame; + final selected = c.version.kernelVersion.query().elementById( + ElementId('opening'), + )!; + c.setSelection([selected]); + await tester.tapAt(origin + const Offset(250, 16)); + await tester.pump(); + expect(c.playheadTick, expected); + expect(c.selectedIdentities, {selected}); + final drag = await tester.startGesture(origin + const Offset(250, 16)); + await drag.moveBy(const Offset(96, 0)); + await drag.up(); + await tester.pump(); + final draggedTick = c.camera.tickAtScreenX( + 346, + viewport(tester), + rounding: TimelineTickRounding.nearest, + ); + expect(c.playheadTick, (draggedTick / frame).round() * frame); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + expect(c.camera, same(camera)); + expect(tester.takeException(), isNull); + }, + ); + + testWidgets('wheel pans two axes; shift-wheel pans horizontally only', ( + tester, + ) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + final base = c.version; + final initialVertical = c.camera.verticalOffset; + await wheel(tester, const Offset(48, 30)); + expect(c.camera.baseTick, 2 * second); + expect(c.camera.verticalOffset, initialVertical + 30); + await tester.sendKeyDownEvent(LogicalKeyboardKey.shiftLeft); + await wheel(tester, const Offset(0, 24)); + await tester.sendKeyUpEvent(LogicalKeyboardKey.shiftLeft); + expect(c.camera.baseTick, 3 * second); + expect(c.camera.verticalOffset, initialVertical + 30); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + }); + + for (final key in [ + LogicalKeyboardKey.controlLeft, + LogicalKeyboardKey.metaLeft, + ]) { + testWidgets('modified wheel zoom retains the visible playhead: $key', ( + tester, + ) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + c.seekTo(5 * second); + final before = c.camera; + final v = viewport(tester); + final anchorX = before.screenXForTick(c.playheadTick, v); + final tick = before.tickAtScreenX( + anchorX, + v, + rounding: TimelineTickRounding.nearest, + ); + await tester.sendKeyDownEvent(key); + await wheel(tester, const Offset(0, -100)); + await tester.sendKeyUpEvent(key); + expect(c.camera.pixelsPerTick, greaterThan(before.pixelsPerTick)); + expect(c.camera.screenXForTick(tick, v), closeTo(anchorX, 1e-6)); + expect(c.canUndo, isFalse); + }); + } + + for (final middle in [true, false]) { + testWidgets('pan over a connected clip does not move it: middle=$middle', ( + tester, + ) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + final base = c.version; + c.panBy(horizontalPixels: 96); + await tester.pump(); + final initialVertical = c.camera.verticalOffset; + if (!middle) await tester.sendKeyDownEvent(LogicalKeyboardKey.space); + final gesture = await tester.startGesture( + clipPoint(tester, 'title'), + kind: PointerDeviceKind.mouse, + buttons: middle ? kMiddleMouseButton : kPrimaryButton, + ); + await gesture.moveBy(const Offset(48, 20)); + await gesture.up(); + if (!middle) await tester.sendKeyUpEvent(LogicalKeyboardKey.space); + await tester.pump(); + expect(c.camera.baseTick, 2 * second); + expect(c.camera.verticalOffset, initialVertical - 20); + expect(c.version, same(base)); + expect(c.isDragging, isFalse); + expect(c.canUndo, isFalse); + }); + } + + testWidgets( + 'native trackpad cumulative scale applies once and retains the playhead', + (tester) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + c.panBy(horizontalPixels: 240); + c.seekTo(20 * second); + final base = c.version; + final origin = tester.getTopLeft(surface); + final v = viewport(tester); + final anchor = c.playheadTick; + final anchorX = c.camera.screenXForTick(anchor, v); + final initialScale = c.camera.pixelsPerTick; + final initialVertical = c.camera.verticalOffset; + final trackpad = await tester.createGesture( + kind: PointerDeviceKind.trackpad, + ); + await trackpad.panZoomStart(origin + const Offset(300, 120)); + await trackpad.panZoomUpdate( + origin + const Offset(300, 120), + scale: 1.5, + pan: const Offset(40, 10), + ); + await trackpad.panZoomUpdate( + origin + const Offset(300, 120), + scale: 2, + pan: const Offset(60, 20), + ); + await trackpad.panZoomEnd(); + await tester.pump(); + expect(c.camera.pixelsPerTick, closeTo(initialScale * 2, 1e-15)); + expect(c.camera.screenXForTick(anchor, v), closeTo(anchorX, 1e-6)); + // The example content fits vertically, so panning retains its fitted bounds. + expect(c.camera.verticalOffset, initialVertical); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + expect(tester.takeException(), isNull); + }, + ); + + testWidgets( + 'second touch cancels clip preview and pinches without committing', + (tester) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + final base = c.version; + final origin = tester.getTopLeft(surface); + final one = await tester.startGesture( + origin + const Offset(100, 112), + pointer: 1, + ); + await one.moveBy(const Offset(40, 0)); + await tester.pump(); + expect(c.isDragging, isTrue); + final two = await tester.startGesture( + origin + const Offset(240, 112), + pointer: 2, + ); + await tester.pump(); + expect(c.isDragging, isFalse); + await one.moveTo(origin + const Offset(100, 112)); + await two.moveTo(origin + const Offset(300, 112)); + await tester.pump(); + expect(c.camera.pixelsPerTick, greaterThan(24 / second)); + await two.up(); + await one.moveBy(const Offset(20, 0)); + await one.up(); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + expect(tester.takeException(), isNull); + }, + ); + + testWidgets( + 'camera gestures followed by clip drop use current local coordinates', + (tester) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + await wheel(tester, const Offset(24, 10)); + await tester.sendKeyDownEvent(LogicalKeyboardKey.controlLeft); + await wheel( + tester, + const Offset(0, -60), + at: tester.getTopLeft(surface) + const Offset(100, 110), + ); + await tester.sendKeyUpEvent(LogicalKeyboardKey.controlLeft); + final v = viewport(tester); + final id = c.version.kernelVersion.query().elementById( + ElementId('title'), + )!; + final point = Offset( + c.camera.screenXForTick(3 * second, v), + c.camera.screenYForWorld(100, v), + ); + final g = await tester.startGesture(tester.getTopLeft(surface) + point); + final delta = 2 * second * c.camera.pixelsPerTick; + await g.moveBy(Offset(delta, 0)); + await g.up(); + await tester.pump(); + expect( + c.version.kernelVersion.query().absoluteStart(id), + closeTo(4 * second, 1), + ); + expect(c.canUndo, isTrue); + expect(tester.takeException(), isNull); + }, + ); + + test( + 'navigation is precise at large origins and zoom clamps around anchor', + () { + final c = createDemoController(); + addTearDown(c.dispose); + final v = TimelineViewportRect(width: 800, height: 300); + const origin = 9007199254740993; + c.setCamera(TimelineCamera(baseTick: origin, pixelsPerTick: 1)); + c.navigate( + from: const Offset(20, 10), + to: const Offset(40, 25), + viewport: v, + ); + expect(c.camera.baseTick, origin - 20); + expect(c.camera.verticalOffset, -15); + c.setCamera(initialDemoCamera()); + c.navigate( + from: const Offset(100, 0), + to: const Offset(100, 0), + scale: 1e10, + viewport: v, + ); + expect(c.camera.pixelsPerTick * c.frameTicks, closeTo(32, 1e-6)); + c.seekTo(-100); + expect(c.playheadTick, 0); + expect(c.canUndo, isFalse); + }, + ); +} diff --git a/packages/cutdex_timeline_ui/example/test/playback_test.dart b/packages/cutdex_timeline_ui/example/test/playback_test.dart new file mode 100644 index 0000000..cfe39ae --- /dev/null +++ b/packages/cutdex_timeline_ui/example/test/playback_test.dart @@ -0,0 +1,100 @@ +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:timeline_ui_example/main.dart'; + +void main() { + const second = TimelineClock.ticksPerSecond; + final toggle = find.byKey(const Key('playback-toggle')); + TimelineViewController controller(WidgetTester tester) => tester + .widget(find.byKey(const Key('timeline-surface'))) + .controller; + + testWidgets('play, pause and resume advance only presentation time', ( + tester, + ) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + final original = c.version; + c.seekTo(2 * second); + await tester.tap(toggle); + await tester.pump(); + await tester.pump(const Duration(seconds: 2)); + expect(c.playheadTick, 4 * second); + expect(find.byTooltip('暂停 / Pause'), findsOneWidget); + await tester.tap(toggle); + await tester.pump(const Duration(seconds: 3)); + expect(c.playheadTick, 4 * second); + expect(find.byTooltip('播放 / Play'), findsOneWidget); + await tester.tap(toggle); + await tester.pump(); + await tester.pump(const Duration(milliseconds: 500)); + expect(c.playheadTick, 4 * second + second ~/ 2); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + await tester.pumpWidget(const SizedBox()); + expect(tester.takeException(), isNull); + }); + + testWidgets('seek rebases playback; end pauses and play restarts', ( + tester, + ) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + final end = c.version.kernelVersion.query().storylineSpan(c.storyline); + await tester.tap(toggle); + await tester.pump(); + await tester.pump(const Duration(seconds: 1)); + c.seekTo(10 * second); + await tester.pump(const Duration(seconds: 1)); + expect(c.playheadTick, 11 * second); + c.seekTo(end - second ~/ 2); + await tester.pump(const Duration(seconds: 1)); + expect(c.playheadTick, end); + expect(find.byTooltip('播放 / Play'), findsOneWidget); + await tester.pump(const Duration(seconds: 2)); + expect(c.playheadTick, end); + await tester.tap(toggle); + await tester.pump(); + expect(c.playheadTick, 0); + await tester.pump(const Duration(seconds: 1)); + expect(c.playheadTick, second); + await tester.pumpWidget(const SizedBox()); + }); + + testWidgets('scene switch pauses the previous playhead', (tester) async { + await tester.pumpWidget(const TimelineExampleApp()); + final short = controller(tester); + await tester.tap(toggle); + await tester.pump(); + await tester.pump(const Duration(seconds: 1)); + await tester.tap(find.byTooltip('切换场景 / Switch scene')); + await tester.pump(); + await tester.pump(const Duration(milliseconds: 300)); + await tester.tap(find.text('3 小时 / 3 hours')); + await tester.pump(); + final stopped = short.playheadTick; + await tester.pumpAndSettle(); + expect(controller(tester), isNot(same(short))); + expect(find.byTooltip('播放 / Play'), findsOneWidget); + await tester.pump(const Duration(seconds: 2)); + expect(short.playheadTick, stopped); + expect(controller(tester).playheadTick, 0); + }); + + testWidgets('backgrounding pauses playback', (tester) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + await tester.tap(toggle); + await tester.pump(); + await tester.pump(const Duration(seconds: 1)); + tester.binding.handleAppLifecycleStateChanged(AppLifecycleState.inactive); + await tester.pump(const Duration(seconds: 2)); + expect(c.playheadTick, second); + expect(find.byTooltip('播放 / Play'), findsOneWidget); + tester.binding.handleAppLifecycleStateChanged(AppLifecycleState.resumed); + await tester.pump(const Duration(seconds: 1)); + expect(c.playheadTick, second); + }); +} diff --git a/packages/cutdex_timeline_ui/example/test/primary_drag_test.dart b/packages/cutdex_timeline_ui/example/test/primary_drag_test.dart new file mode 100644 index 0000000..e56335b --- /dev/null +++ b/packages/cutdex_timeline_ui/example/test/primary_drag_test.dart @@ -0,0 +1,83 @@ +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:timeline_ui_example/main.dart'; +import 'package:timeline_ui_example/demo_timeline.dart'; + +void main() { + for (final dx in [0.0, 24.0]) { + test('ending keeps its off-axis ghost with horizontal delta $dx', () { + final c = createDemoController(); + addTearDown(c.dispose); + final viewport = TimelineViewportRect(width: 2000, height: 400); + final base = c.version; + final q = base.kernelVersion.query(); + final ending = q.elementById(ElementId('ending'))!; + final x = c.camera.screenXForTick(q.absoluteStart(ending), viewport) + 50; + expect(c.beginDrag(viewport: viewport, position: Offset(x, 178)), isTrue); + c.updateDrag(viewport: viewport, position: Offset(x + dx, 90)); + expect(c.dragGhost, isNotNull, reason: c.dragRejection); + expect(c.dragGhost!.top, 62); + expect(c.version, same(base)); + c.cancelDrag(); + expect(c.canUndo, isFalse); + }); + } + for (final name in ['opening', 'street']) { + testWidgets( + 'detach $name rejects connected owners without changing transitions', + (tester) async { + await tester.pumpWidget(const TimelineExampleApp()); + final surface = find.byKey(const Key('timeline-surface')); + final c = tester.widget(surface).controller; + final origin = tester.getTopLeft(surface); + final size = tester.getSize(surface); + final viewport = TimelineViewportRect( + width: size.width, + height: size.height, + ); + final original = c.version; + final q = original.kernelVersion.query(); + final source = q.elementById(ElementId(name))!; + final carried = q.connectionsInElementSubtrees([ + source, + ], includeStoryline: (s) => s == c.storyline); + final x = name == 'opening' ? 100.0 : 300.0; + final gesture = await tester.startGesture( + origin + Offset(x, 178), + kind: PointerDeviceKind.mouse, + ); + await gesture.moveTo(origin + Offset(x + 30, 110)); + await tester.pump(); + expect(carried, isNotEmpty); + expect(c.dragRejection, contains('connected clips')); + expect(c.dragGhosts.length, 1 + carried.length); + final prepared = c.project(viewport).version; + final pq = prepared.kernelVersion.query(); + expect(pq.storylineLength(c.storyline), q.storylineLength(c.storyline)); + // A rejected drag must not remove the neighboring overlap transition. + expect(pq.storylineSpan(c.storyline), q.storylineSpan(c.storyline)); + for (final child in carried) { + expect( + pq.absoluteStart(child.target) - pq.absoluteStart(source), + q.absoluteStart(child.target) - q.absoluteStart(source), + ); + expect( + pq.connectionOrderLocation(child.target)!.side, + q.connectionOrderLocation(child.target)!.side, + ); + } + expect(c.version, same(original)); + await gesture.up(); + await tester.pump(); + expect(c.version, same(prepared)); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + expect(tester.takeException(), isNull); + }, + ); + } +} diff --git a/packages/cutdex_timeline_ui/example/test/primary_group_drag_test.dart b/packages/cutdex_timeline_ui/example/test/primary_group_drag_test.dart new file mode 100644 index 0000000..75cb178 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/test/primary_group_drag_test.dart @@ -0,0 +1,157 @@ +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:timeline_ui_example/main.dart'; +import 'package:timeline_ui_example/demo_timeline.dart'; + +void main() { + final surface = find.byKey(const Key('timeline-surface')); + + for (final dropX in [20.0, 470.0, 1020.0]) { + test('noncontiguous Primary group moves to boundary $dropX', () { + final c = createDemoController(); + addTearDown(c.dispose); + final viewport = TimelineViewportRect(width: 2000, height: 400); + final q = c.version.kernelVersion.query(); + final a = q.elementById(ElementId('street'))!; + final b = q.elementById(ElementId('voice'))!; + c.setSelection([b, a]); + expect( + c.beginDrag(viewport: viewport, position: const Offset(300, 178)), + isTrue, + ); + c.updateDrag(viewport: viewport, position: Offset(dropX, 178)); + expect(c.dragRejection, isNull); + expect(c.dragMode, LayoutPreviewMode.primaryInsert); + final pq = c.project(viewport).version.kernelVersion.query(); + expect( + pq.storylineElements(c.storyline).map((h) => pq.element(h).name), + dropX == 20 + ? ['street', 'voice', 'opening', 'gap', 'compound', 'ending'] + : dropX == 470 + ? ['opening', 'gap', 'street', 'voice', 'compound', 'ending'] + : ['opening', 'gap', 'compound', 'ending', 'street', 'voice'], + ); + c.cancelDrag(); + expect(c.canUndo, isFalse); + }); + } + for (final drop in [ + const Offset(100, 178), + const Offset(420, 178), + const Offset(500, 90), + ]) { + test( + 'Primary group no-op or rejected drop $drop leaves history unchanged', + () { + final c = createDemoController(); + addTearDown(c.dispose); + final viewport = TimelineViewportRect(width: 2000, height: 400); + final original = c.version; + final q = original.kernelVersion.query(); + final a = q.elementById(ElementId('opening'))!; + final b = q.elementById(ElementId('street'))!; + c.setSelection([a, b]); + expect( + c.beginDrag(viewport: viewport, position: const Offset(300, 178)), + isTrue, + ); + c.updateDrag(viewport: viewport, position: const Offset(720, 178)); + expect(c.dragMode, LayoutPreviewMode.primaryInsert); + c.updateDrag(viewport: viewport, position: drop); + expect(c.project(viewport).version, same(original)); + expect(c.dragGhosts.length, 6); + expect(c.finishDrag(viewport: viewport, position: drop), isFalse); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + expect(c.selectedIdentities, {a, b}); + }, + ); + } + for (final contiguous in [true, false]) { + for (final grabSecond in [false, true]) { + testWidgets( + 'Primary group reorder contiguous=$contiguous grabSecond=$grabSecond', + (tester) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = tester.widget(surface).controller; + final origin = tester.getTopLeft(surface); + final size = tester.getSize(surface); + final viewport = TimelineViewportRect( + width: size.width, + height: size.height, + ); + final original = c.version; + final q = original.kernelVersion.query(); + final a = q.elementById(ElementId('opening'))!; + final b = q.elementById( + ElementId(contiguous ? 'street' : 'compound'), + )!; + // Reverse selection order must not reverse timeline order. + c.setSelection([b, a]); + await tester.pump(); + final grabbed = grabSecond ? b : a; + final downX = + c.camera.screenXForTick(q.absoluteStart(grabbed), viewport) + 100; + final drag = await tester.startGesture( + origin + Offset(downX, 178), + kind: PointerDeviceKind.mouse, + ); + await drag.moveTo(origin + const Offset(720, 178)); + await tester.pump(); + expect(c.isDragging, isTrue); + expect(c.dragRejection, isNull); + expect(c.dragMode, LayoutPreviewMode.primaryInsert); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + final prepared = c.project(viewport).version; + final pq = prepared.kernelVersion.query(); + final names = pq + .storylineElements(c.storyline) + .map((h) => pq.element(h).name) + .toList(); + expect( + names, + contiguous + ? ['gap', 'compound', 'opening', 'street', 'voice', 'ending'] + : ['street', 'gap', 'opening', 'compound', 'voice', 'ending'], + ); + final carried = q.connectionsInElementSubtrees([ + a, + b, + ], includeStoryline: (s) => s == c.storyline).toList(); + expect(c.dragGhosts.length, 2 + carried.length); + for (final connection in carried) { + expect(pq.connectionForTarget(connection.target), connection); + expect( + pq.absoluteStart(connection.target) - + pq.absoluteStart(connection.anchor), + q.absoluteStart(connection.target) - + q.absoluteStart(connection.anchor), + ); + } + for (final h in q.storylineElements(c.storyline)) { + expect(pq.element(h).sourceStart, q.element(h).sourceStart); + expect(pq.element(h).duration, q.element(h).duration); + } + if (contiguous) { + expect(pq.storylineSpan(c.storyline), q.storylineSpan(c.storyline)); + } + await drag.up(); + await tester.pump(); + expect(c.version, same(prepared)); + expect(c.selectedIdentities, {a, b}); + c.undo(); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + c.redo(); + expect(c.version, same(prepared)); + expect(tester.takeException(), isNull); + }, + ); + } + } +} diff --git a/packages/cutdex_timeline_ui/example/test/scrollbars_test.dart b/packages/cutdex_timeline_ui/example/test/scrollbars_test.dart new file mode 100644 index 0000000..b95cda2 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/test/scrollbars_test.dart @@ -0,0 +1,249 @@ +import 'dart:math' as math; + +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:timeline_ui_example/demo_timeline.dart'; +import 'package:timeline_ui_example/main.dart'; + +Finder thumb(Axis axis) => find.byKey(ValueKey('timeline-${axis.name}-thumb')); +Finder bar(Axis axis) => + find.byKey(ValueKey('timeline-${axis.name}-scrollbar')); +final surface = find.byKey(const Key('timeline-surface')); +TimelineViewController controller(WidgetTester tester) => + tester.widget(surface).controller; + +void main() { + testWidgets('scrollbar navigation then clip drop uses the current camera', ( + tester, + ) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + final g = await tester.startGesture( + tester.getCenter(thumb(Axis.horizontal)), + ); + await g.moveBy(const Offset(30, 0)); + await g.up(); + await tester.pump(); + const second = TimelineClock.ticksPerSecond; + final v = TimelineViewportRect( + width: tester.getSize(surface).width, + height: tester.getSize(surface).height, + ); + final id = c.version.kernelVersion.query().elementById(ElementId('title'))!; + final point = Offset( + c.camera.screenXForTick(3 * second, v), + c.camera.screenYForWorld(100, v), + ); + final clip = await tester.startGesture(tester.getTopLeft(surface) + point); + await clip.moveBy(Offset(2 * second * c.camera.pixelsPerTick, 0)); + await clip.up(); + await tester.pump(); + expect( + c.version.kernelVersion.query().absoluteStart(id), + closeTo(4 * second, 1), + ); + expect(c.canUndo, isTrue); + expect(tester.takeException(), isNull); + }); + + for (final axis in Axis.values) { + testWidgets('$axis thumb drag pans only that axis and retains roots', ( + tester, + ) async { + final c = createDemoController(); + addTearDown(c.dispose); + await tester.pumpWidget( + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 400, + height: 120, + child: TimelineViewport( + controller: c, + showRuler: false, + child: const SizedBox.expand(), + ), + ), + ), + ), + ); + await tester.pumpAndSettle(); + // Begin at the start of both scroll ranges with guaranteed overflow. + c.panBy(horizontalPixels: -200, verticalPixels: -300); + await tester.pump(); + final before = c.camera; + final version = c.version; + final initial = tester.getRect(thumb(axis)); + final gesture = await tester.startGesture(initial.center); + final delta = axis == Axis.horizontal + ? const Offset(35, 0) + : const Offset(0, 35); + await gesture.moveBy(delta); + await tester.pump(); + final moved = tester.getRect(thumb(axis)); + expect(moved.width, closeTo(initial.width, 1e-6)); + expect(moved.height, closeTo(initial.height, 1e-6)); + expect((moved.topLeft - initial.topLeft).distance, closeTo(35, 1e-6)); + await gesture.up(); + await tester.pump(); + if (axis == Axis.horizontal) { + expect(c.camera.baseTick, greaterThan(before.baseTick)); + expect(c.camera.verticalOffset, before.verticalOffset); + } else { + expect(c.camera.verticalOffset, greaterThan(before.verticalOffset)); + expect(c.camera.baseTick, before.baseTick); + expect(c.camera.fractionalTick, before.fractionalTick); + } + expect(c.version, same(version)); + expect(c.canUndo, isFalse); + expect(c.selectedIdentities, isEmpty); + expect(tester.takeException(), isNull); + }); + } + + testWidgets('zoom resizes thumb, pan updates position, track click pages', ( + tester, + ) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + final width = tester.getSize(thumb(Axis.horizontal)).width; + c.navigate( + from: Offset.zero, + to: Offset.zero, + scale: 2, + viewport: TimelineViewportRect( + width: tester.getSize(surface).width, + height: 0, + ), + ); + await tester.pump(); + expect(tester.getSize(thumb(Axis.horizontal)).width, lessThan(width)); + final left = tester.getTopLeft(thumb(Axis.horizontal)).dx; + c.panBy(horizontalPixels: 100); + await tester.pump(); + expect(tester.getTopLeft(thumb(Axis.horizontal)).dx, greaterThan(left)); + final before = c.camera; + final track = tester.getRect(bar(Axis.horizontal)); + await tester.tapAt(Offset(track.right - 2, track.center.dy)); + await tester.pump(); + expect(c.camera.baseTick, greaterThan(before.baseTick)); + expect(c.canUndo, isFalse); + }); + + testWidgets('external zoom during thumb drag cannot restore stale camera', ( + tester, + ) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + final gesture = await tester.startGesture( + tester.getCenter(thumb(Axis.horizontal)), + ); + await gesture.moveBy(const Offset(25, 0)); + await tester.pump(); + c.navigate( + from: Offset.zero, + to: Offset.zero, + scale: 2, + viewport: TimelineViewportRect( + width: tester.getSize(surface).width, + height: 0, + ), + ); + await tester.pump(); + final zoomed = c.camera; + await gesture.moveBy(const Offset(25, 0)); + await gesture.up(); + expect(c.camera, same(zoomed)); + }); + + testWidgets('small and fitting viewports remain finite and do not scroll', ( + tester, + ) async { + final c = createDemoController(); + addTearDown(c.dispose); + c.setCamera( + TimelineCamera(baseTick: 0, pixelsPerTick: c.camera.pixelsPerTick / 100), + ); + await tester.pumpWidget( + MaterialApp( + home: TimelineViewport( + controller: c, + showRuler: false, + child: const SizedBox.expand(), + ), + ), + ); + expect(thumb(Axis.vertical), findsNothing); + await tester.pumpWidget( + MaterialApp( + home: Center( + child: SizedBox( + width: 8, + height: 8, + child: TimelineViewport( + showRuler: false, + controller: c, + child: const SizedBox.expand(), + ), + ), + ), + ), + ); + expect(tester.takeException(), isNull); + }); + + test( + 'scroll extent getters agree with body scans and projected placements', + () { + final c = createDemoController(); + addTearDown(c.dispose); + final v = c.version; + for (final entry in v.rangeIndexRoot.entries) { + final bodies = v.partitionBodies[entry.key]!.map( + (id) => v.scene.bodies[id]!, + ); + if (bodies.isEmpty) { + expect(entry.value.timeBounds, isNull); + } else { + expect(entry.value.timeBounds, ( + start: bodies.map((b) => b.start).reduce(math.min), + end: bodies.map((b) => b.end).reduce(math.max), + )); + } + } + for (final entry in v.domainRoot.entries) { + final placements = v.placements.values.where( + (p) => p.partition.stack == entry.key, + ); + for (final p in placements) { + final outer = entry.value.outerBoundary; + expect(outer <= p.top || outer >= p.top + p.height, isTrue); + } + } + }, + ); + + test('scrollbar theme tokens copy and interpolate', () { + const a = TimelineThemeData.dark(); + final b = a.copyWith( + scrollbarThickness: 20, + scrollbarThumbColor: Colors.red, + scrollbarTrackColor: Colors.blue, + ); + expect(b, isNot(a)); + expect(b.copyWith(), b); + expect(a.lerp(b, .5).scrollbarThickness, 16); + expect( + a.lerp(b, .5).scrollbarThumbColor, + Color.lerp(a.scrollbarThumbColor, Colors.red, .5), + ); + expect( + a.lerp(b, .5).scrollbarTrackColor, + Color.lerp(a.scrollbarTrackColor, Colors.blue, .5), + ); + }); +} diff --git a/packages/cutdex_timeline_ui/example/test/selection_test.dart b/packages/cutdex_timeline_ui/example/test/selection_test.dart new file mode 100644 index 0000000..1dff735 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/test/selection_test.dart @@ -0,0 +1,292 @@ +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:timeline_ui_example/main.dart'; + +import 'support/timeline_geometry.dart'; + +final surface = find.byKey(const Key('timeline-surface')); +final marquee = find.byKey(const ValueKey('timeline-marquee')); +TimelineViewController controller(WidgetTester tester) => + tester.widget(surface).controller; +Set connected(TimelineViewController c) => { + for (final name in ['title', 'overlay']) + LayoutBodyId.element( + c.version.kernelVersion.query().elementById(ElementId(name))!, + ), +}; + +void main() { + testWidgets('blank marquee selects without moving the playhead', ( + tester, + ) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + c.seekTo(TimelineClock.ticksPerSecond); + final origin = tester.getTopLeft(surface); + final rectangle = connectedMarquee(c, viewportFor(tester)); + final gesture = await tester.startGesture( + origin + rectangle.topLeft, + kind: PointerDeviceKind.mouse, + ); + await gesture.moveTo(origin + rectangle.bottomRight); + await tester.pump(); + expect(marquee, findsOneWidget); + expect(c.playheadTick, TimelineClock.ticksPerSecond); + await gesture.up(); + await tester.pump(); + expect(c.selectedIdentities, isNotEmpty); + expect(c.playheadTick, TimelineClock.ticksPerSecond); + expect(marquee, findsNothing); + }); + + testWidgets( + 'blank click seeks on release, clears selection and allows tail time', + (tester) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + final base = c.version; + c.setSelection(connected(c)); + c.seekTo(TimelineClock.ticksPerSecond); + c.panBy(horizontalPixels: 1800); + final size = tester.getSize(surface); + final viewport = TimelineViewportRect( + width: size.width, + height: size.height, + ); + await tester.pump(); + const point = Offset(253, 10); + final raw = c.camera.tickAtScreenX( + point.dx, + viewport, + rounding: TimelineTickRounding.nearest, + ); + final frame = TimelineFormat.fps24.frameGrid.quantumTicks; + final expected = (raw / frame).round() * frame; + final gesture = await tester.startGesture( + tester.getTopLeft(surface) + point, + kind: PointerDeviceKind.mouse, + ); + await tester.pump(); + expect(c.playheadTick, TimelineClock.ticksPerSecond); + expect(c.selectedIdentities, connected(c)); + await gesture.up(); + await tester.pump(); + expect(c.playheadTick, expected); + expect(c.playheadTick % frame, 0); + expect(c.selectedIdentities, isEmpty); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + }, + ); + + testWidgets( + 'clip click selects without seeking and cancelled blank click does not seek', + (tester) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + c.seekTo(TimelineClock.ticksPerSecond); + final origin = tester.getTopLeft(surface); + await tester.tapAt(origin + const Offset(100, 110)); + await tester.pump(); + expect(c.selectedIdentities, isNotEmpty); + expect(c.playheadTick, TimelineClock.ticksPerSecond); + final selected = c.selectedIdentities.toSet(); + final gesture = await tester.startGesture( + origin + const Offset(10, 10), + kind: PointerDeviceKind.mouse, + ); + await gesture.cancel(); + await tester.pump(); + expect(c.selectedIdentities, selected); + expect(c.playheadTick, TimelineClock.ticksPerSecond); + }, + ); + + testWidgets('history change during marquee cannot restore stale selection', ( + tester, + ) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + final size = tester.getSize(surface); + final v = TimelineViewportRect(width: size.width, height: size.height); + c.beginDrag(viewport: v, position: const Offset(100, 110)); + c.finishDrag(viewport: v, position: const Offset(140, 110)); + final origin = tester.getTopLeft(surface); + final rectangle = connectedMarquee(c, viewportFor(tester)); + final g = await tester.startGesture( + origin + rectangle.topLeft, + kind: PointerDeviceKind.mouse, + ); + await g.moveTo(origin + rectangle.bottomRight); + await tester.pump(); + c.undo(); + final restored = c.version; + await g.up(); + await tester.pump(); + expect(c.version, same(restored)); + expect(c.selectedIdentities, isEmpty); + expect(marquee, findsNothing); + expect(tester.takeException(), isNull); + }); + + testWidgets('disposing active marquee restores the old view selection', ( + tester, + ) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + final origin = tester.getTopLeft(surface); + final rectangle = connectedMarquee(c, viewportFor(tester)); + final g = await tester.startGesture( + origin + rectangle.topLeft, + kind: PointerDeviceKind.mouse, + ); + await g.moveTo(origin + rectangle.bottomRight); + await tester.pump(); + await tester.pumpWidget(const SizedBox()); + await g.up(); + expect(c.selectedIdentities, isEmpty); + expect(tester.takeException(), isNull); + }); + + for (final reverse in [false, true]) { + testWidgets( + 'blank mouse drag selects overlapping clips; reverse=$reverse', + (tester) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + final camera = c.camera; + final version = c.version; + final origin = tester.getTopLeft(surface); + final rectangle = connectedMarquee(c, viewportFor(tester)); + final g = await tester.startGesture( + origin + (reverse ? rectangle.bottomRight : rectangle.topLeft), + kind: PointerDeviceKind.mouse, + ); + await g.moveTo( + origin + (reverse ? rectangle.topLeft : rectangle.bottomRight), + ); + await tester.pump(); + expect(marquee, findsOneWidget); + expect(c.selectedIdentities, connected(c)); + await g.up(); + await tester.pump(); + expect(marquee, findsNothing); + expect(c.selectedIdentities, connected(c)); + expect(c.camera, same(camera)); + expect(c.version, same(version)); + expect(c.canUndo, isFalse); + expect(tester.takeException(), isNull); + }, + ); + } + + for (final cancel in ['escape', 'pointer', 'camera', 'inactive']) { + testWidgets('$cancel cancels marquee and restores previous selection', ( + tester, + ) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + final opening = c.version.kernelVersion.query().elementById( + ElementId('opening'), + )!; + c.setSelection([opening]); + final origin = tester.getTopLeft(surface); + final rectangle = connectedMarquee(c, viewportFor(tester)); + final g = await tester.startGesture( + origin + rectangle.topLeft, + kind: PointerDeviceKind.mouse, + ); + await g.moveTo(origin + rectangle.bottomRight); + await tester.pump(); + expect(c.selectedIdentities, connected(c)); + switch (cancel) { + case 'escape': + await tester.sendKeyEvent(LogicalKeyboardKey.escape); + case 'pointer': + await g.cancel(); + case 'camera': + c.panBy(horizontalPixels: 20); + case 'inactive': + tester.binding.handleAppLifecycleStateChanged( + AppLifecycleState.inactive, + ); + } + if (cancel != 'pointer') await g.up(); + if (cancel == 'inactive') { + tester.binding.handleAppLifecycleStateChanged( + AppLifecycleState.resumed, + ); + } + await tester.pump(); + expect(marquee, findsNothing); + expect(c.selectedIdentities, {opening}); + expect(c.canUndo, isFalse); + expect(tester.takeException(), isNull); + }); + } + + testWidgets('rectangle selection uses the panned and zoomed frame', ( + tester, + ) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + c.panBy(horizontalPixels: 15, verticalPixels: 10); + final size = tester.getSize(surface); + final v = TimelineViewportRect(width: size.width, height: size.height); + c.navigate(from: Offset.zero, to: Offset.zero, scale: 1.25, viewport: v); + await tester.pump(); + final origin = tester.getTopLeft(surface); + final rectangle = connectedMarquee(c, viewportFor(tester)); + final g = await tester.startGesture( + origin + rectangle.topLeft, + kind: PointerDeviceKind.mouse, + ); + await g.moveTo(origin + rectangle.bottomRight); + await g.up(); + await tester.pump(); + expect(c.selectedIdentities, connected(c)); + expect(c.hitTestRect(viewport: v, rectangle: Rect.zero), isEmpty); + expect( + c.hitTestRect( + viewport: v, + rectangle: const Rect.fromLTWH(-100, -100, 5, 5), + ), + isEmpty, + ); + expect(c.canUndo, isFalse); + }); + + testWidgets('group selection moves all selected connected clips together', ( + tester, + ) async { + await tester.pumpWidget(const TimelineExampleApp()); + final c = controller(tester); + c.setSelection(connected(c)); + final version = c.version; + final origin = tester.getTopLeft(surface); + final g = await tester.startGesture( + origin + const Offset(100, 110), + kind: PointerDeviceKind.mouse, + ); + await g.moveBy(const Offset(50, 0)); + await g.up(); + await tester.pump(); + expect(c.selectedIdentities, connected(c)); + expect(c.version, isNot(same(version))); + expect(c.isDragging, isFalse); + expect(c.dragRejection, isNull); + final q = c.version.kernelVersion.query(); + expect( + q.absoluteStart(q.elementById(ElementId('overlay'))!) - + q.absoluteStart(q.elementById(ElementId('title'))!), + 2 * TimelineClock.ticksPerSecond, + ); + c.undo(); + expect(c.version, same(version)); + }); +} diff --git a/packages/cutdex_timeline_ui/example/test/support/timeline_geometry.dart b/packages/cutdex_timeline_ui/example/test/support/timeline_geometry.dart new file mode 100644 index 0000000..a0202b6 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/test/support/timeline_geometry.dart @@ -0,0 +1,84 @@ +import 'dart:math' as math; + +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/widgets.dart'; +import 'package:flutter_test/flutter_test.dart'; + +final timelineView = find.byType(TimelineView); + +TimelineViewportRect viewportFor(WidgetTester tester) { + final size = tester.getSize(timelineView); + return TimelineViewportRect(width: size.width, height: size.height); +} + +Rect clipBody( + TimelineViewController controller, + TimelineViewportRect viewport, + String name, +) { + final owner = controller.version.kernelVersion.query().elementById( + ElementId(name), + )!; + final frame = controller.project(viewport); + final index = [ + for (var i = 0; i < frame.length; i++) + if (controller.elementForIdentity(frame.identityAt(i)) == owner && + frame.kindAt(i) != TimelineViewportItemKind.transition) + i, + ].single; + final layout = controller.clipLayout( + controller.presentationBoundsAt(frame, index), + owner: owner, + ); + return layout.toViewport(layout.body); +} + +Offset clipPoint(WidgetTester tester, String name, {TimelineTrimEdge? edge}) { + final controller = tester.widget(timelineView).controller; + final body = clipBody(controller, viewportFor(tester), name); + final local = Offset(switch (edge) { + TimelineTrimEdge.leading => body.left + 1, + TimelineTrimEdge.trailing => body.right - 1, + null => body.center.dx, + }, body.center.dy); + final hit = controller.hitTest( + viewport: viewportFor(tester), + position: local, + ); + expect( + controller.elementForIdentity(hit!.identity), + controller.version.kernelVersion.query().elementById(ElementId(name)), + ); + if (edge != null) { + expect( + controller.trimEdgeAt( + hit: hit, + position: local, + extent: TimelineThemeData.of( + tester.element(timelineView), + ).trimHitExtent, + ), + edge, + ); + } + return tester.getTopLeft(timelineView) + local; +} + +Rect connectedMarquee( + TimelineViewController controller, + TimelineViewportRect viewport, +) { + final bodies = clipBody( + controller, + viewport, + 'title', + ).expandToInclude(clipBody(controller, viewport, 'overlay')); + return Rect.fromLTRB( + math.max(0, bodies.left - 4), + math.max(0, bodies.top - 4), + math.min(viewport.width - 1, bodies.right + 4), + math.min(viewport.height - 1, bodies.bottom + 4), + ); +} diff --git a/packages/cutdex_timeline_ui/example/test/trim_test.dart b/packages/cutdex_timeline_ui/example/test/trim_test.dart new file mode 100644 index 0000000..dea1961 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/test/trim_test.dart @@ -0,0 +1,333 @@ +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:timeline_ui_example/demo_timeline.dart'; + +import 'support/timeline_geometry.dart'; + +const second = TimelineClock.ticksPerSecond; + +Widget surface( + TimelineViewController c, { + double width = 960, + double extent = 0, +}) => MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: width, + height: 360, + child: TimelineInteractionRegion( + controller: c, + edgeScrollExtent: extent, + child: TimelineView(controller: c), + ), + ), + ), +); + +void main() { + test('trim theme tokens copy, interpolate and affect equality', () { + const dark = TimelineThemeData.dark(); + final other = dark.copyWith(trimHandleWidth: 5, trimHitExtent: 10); + expect(other.copyWith(), other); + expect(dark == other, isFalse); + expect(dark.lerp(other, 0.5).trimHandleWidth, 3.5); + expect(dark.lerp(other, 0.5).trimHitExtent, 8); + }); + testWidgets('Primary leading audio trim keeps its serial edit point', ( + tester, + ) async { + final c = createDemoController(); + addTearDown(c.dispose); + c.setCamera( + TimelineCamera(baseTick: 24 * second, pixelsPerTick: 24 / second), + ); + await tester.pumpWidget(surface(c)); + final voice = c.version.kernelVersion.query().elementById( + ElementId('voice'), + )!; + final gesture = await tester.startGesture( + clipPoint(tester, 'voice', edge: TimelineTrimEdge.leading), + ); + await gesture.moveBy(const Offset(48, 0)); + await gesture.up(); + final q = c.version.kernelVersion.query(); + expect(q.positionOf(voice).position, 28 * second); + expect(q.element(voice).duration, 4 * second); + expect(q.element(voice).sourceStart, 2 * second); + expect(q.storylineSpan(c.storyline), 40 * second); + expect(tester.takeException(), isNull); + }); + for (final leading in [true, false]) { + testWidgets( + 'container ${leading ? "leading" : "trailing"} trim keeps definition', + (tester) async { + final c = createDemoController(); + addTearDown(c.dispose); + c.setCamera( + TimelineCamera(baseTick: 19 * second, pixelsPerTick: 24 / second), + ); + await tester.pumpWidget(surface(c)); + final h = c.version.kernelVersion.query().elementById( + ElementId('compound'), + )!; + final gesture = await tester.startGesture( + clipPoint( + tester, + 'compound', + edge: leading + ? TimelineTrimEdge.leading + : TimelineTrimEdge.trailing, + ), + ); + await gesture.moveBy(Offset(leading ? 48 : -48, 0)); + await gesture.up(); + final q = c.version.kernelVersion.query(); + expect(q.element(h).duration, 6 * second); + expect(q.element(h).sourceStart, (leading ? 2 : 0) * second); + expect(q.storylineSpan(q.element(h).containerStoryline!), 8 * second); + expect(q.storylineSpan(c.storyline), 40 * second); + expect(tester.takeException(), isNull); + }, + ); + } + for (final end in [ + 'escape', + 'cancel', + 'history', + 'resize', + 'unmount', + 'second pointer', + ]) { + testWidgets('trim cannot publish after $end', (tester) async { + final c = createDemoController(); + addTearDown(c.dispose); + await tester.pumpWidget(surface(c)); + final viewport = viewportFor(tester); + final base = c.version; + final down = clipPoint(tester, 'title', edge: TimelineTrimEdge.leading); + final gesture = await tester.startGesture(down); + await gesture.moveBy(const Offset(48, 0)); + await tester.pump(); + expect(c.isTrimming, isTrue); + expect(c.project(viewport).version, isNot(same(base))); + switch (end) { + case 'escape': + await tester.sendKeyEvent(LogicalKeyboardKey.escape); + case 'cancel': + await gesture.cancel(); + case 'history': + c.undo(); + case 'resize': + await tester.pumpWidget(surface(c, width: 700)); + case 'unmount': + await tester.pumpWidget(const SizedBox()); + case 'second pointer': + final second = await tester.startGesture( + const Offset(400, 200), + pointer: 2, + ); + await second.up(); + } + if (end != 'cancel') await gesture.up(); + await tester.pump(); + expect(c.isDragging, isFalse); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + expect(tester.takeException(), isNull); + }); + } + testWidgets( + 'invalid trim clears old preview and can recover in the same gesture', + (tester) async { + final c = createDemoController(); + addTearDown(c.dispose); + await tester.pumpWidget(surface(c)); + final viewport = viewportFor(tester); + final base = c.version; + final down = clipPoint(tester, 'title', edge: TimelineTrimEdge.leading); + final gesture = await tester.startGesture(down); + await gesture.moveTo(down + const Offset(48, 0)); + await tester.pump(); + expect(c.project(viewport).version, isNot(same(base))); + await gesture.moveTo(down + const Offset(168, 0)); + await tester.pump(); + expect(c.dragRejection, isNotNull); + expect(c.project(viewport).version, same(base)); + await gesture.moveTo(down + const Offset(24, 0)); + await tester.pump(); + expect(c.dragRejection, isNull); + final prepared = c.project(viewport).version; + await gesture.up(); + expect(c.version, same(prepared)); + expect( + c.version.kernelVersion + .query() + .element( + base.kernelVersion.query().elementById(ElementId('title'))!, + ) + .duration, + 4 * second, + ); + }, + ); + testWidgets('invalid release and returning to grab point create no history', ( + tester, + ) async { + final c = createDemoController(); + addTearDown(c.dispose); + await tester.pumpWidget(surface(c)); + final base = c.version; + for (final delta in [168.0, 0.0]) { + final down = clipPoint(tester, 'title', edge: TimelineTrimEdge.leading); + final gesture = await tester.startGesture(down); + await gesture.moveTo(down + const Offset(48, 0)); + await tester.pump(); + await gesture.moveTo(down + Offset(delta, 0)); + await gesture.up(); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + } + }); + testWidgets( + 'Camera pan while trimming re-resolves once and zoom retains pointer time', + (tester) async { + final c = createDemoController(); + addTearDown(c.dispose); + await tester.pumpWidget(surface(c)); + final viewport = viewportFor(tester); + final title = c.version.kernelVersion.query().elementById( + ElementId('title'), + )!; + final down = clipPoint(tester, 'title', edge: TimelineTrimEdge.trailing); + final gesture = await tester.startGesture(down); + await gesture.moveBy(const Offset(-48, 0)); + c.panBy(horizontalPixels: 24); + expect( + c + .project(viewport) + .version + .kernelVersion + .query() + .element(title) + .duration, + 4 * second, + ); + c.zoomAt( + screenX: down.dx - 48, + newPixelsPerTick: 48 / second, + viewport: viewport, + ); + final prepared = c.project(viewport).version; + expect( + prepared.kernelVersion.query().element(title).duration, + 4 * second, + ); + await gesture.up(); + expect(c.version, same(prepared)); + }, + ); + testWidgets( + 'long-scene edge auto-scroll trims to latest Camera and stops on release', + (tester) async { + final c = createDemoController(longTimeline: true); + addTearDown(c.dispose); + await tester.pumpWidget(surface(c, width: 640, extent: 48)); + final viewport = TimelineViewportRect(width: 640, height: 360); + final base = c.version; + final title = base.kernelVersion.query().elementById(ElementId('title'))!; + final down = clipPoint(tester, 'title', edge: TimelineTrimEdge.trailing); + final gesture = await tester.startGesture(down); + await gesture.moveTo(Offset(632, down.dy)); + await tester.pump(); + final before = c.camera; + for (var i = 0; i < 12; i++) { + await tester.pump(const Duration(milliseconds: 16)); + } + expect(c.camera.baseTick, greaterThan(before.baseTick)); + expect(c.dragRejection, isNull); + final prepared = c.project(viewport).version; + final q = prepared.kernelVersion.query(); + expect( + c.camera.screenXForTick( + q.absoluteStart(title) + q.element(title).duration, + viewport, + ), + closeTo(633, 0.001), + ); + await gesture.up(); + final camera = c.camera; + await tester.pump(const Duration(seconds: 1)); + expect(c.camera, same(camera)); + expect(c.version, same(prepared)); + c.undo(); + expect(c.version, same(base)); + expect(tester.takeException(), isNull); + }, + ); + for (final leading in [true, false]) { + testWidgets( + 'connected ${leading ? "left" : "right"} edge trims, not moves', + (tester) async { + final c = createDemoController(); + addTearDown(c.dispose); + await tester.pumpWidget(surface(c)); + final viewport = viewportFor(tester); + final base = c.version; + final title = base.kernelVersion.query().elementById( + ElementId('title'), + )!; + final down = clipPoint( + tester, + 'title', + edge: leading ? TimelineTrimEdge.leading : TimelineTrimEdge.trailing, + ); + final up = down + Offset(leading ? 48 : -48, 0); + final gesture = await tester.startGesture(down); + await gesture.moveTo(up); + await tester.pump(); + final preview = c.project(viewport).version; + final q = preview.kernelVersion.query(); + expect(q.element(title).duration, 3 * second); + expect(q.absoluteStart(title), (leading ? 4 : 2) * second); + expect(q.element(title).sourceStart, (leading ? 2 : 0) * second); + expect(c.dragGhosts, isEmpty); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + await gesture.up(); + await tester.pump(); + expect(c.version, same(preview)); + c.undo(); + expect(c.version, same(base)); + c.redo(); + expect(c.version, same(preview)); + expect(tester.takeException(), isNull); + }, + ); + } + + testWidgets('Primary trailing trim ripples the following serial members', ( + tester, + ) async { + final c = createDemoController(); + addTearDown(c.dispose); + await tester.pumpWidget(surface(c)); + final base = c.version.kernelVersion.query(); + final street = base.elementById(ElementId('street'))!; + final gap = base.elementById(ElementId('gap'))!; + final gesture = await tester.startGesture( + clipPoint(tester, 'street', edge: TimelineTrimEdge.trailing), + ); + await gesture.moveBy(const Offset(-48, 0)); + await gesture.up(); + final q = c.version.kernelVersion.query(); + expect(q.element(street).duration, 8 * second); + expect(q.positionOf(gap).position, 15 * second); + expect(q.storylineSpan(c.storyline), 40 * second); + expect(tester.takeException(), isNull); + }); +} diff --git a/packages/cutdex_timeline_ui/example/test/widget_test.dart b/packages/cutdex_timeline_ui/example/test/widget_test.dart new file mode 100644 index 0000000..5baa4b9 --- /dev/null +++ b/packages/cutdex_timeline_ui/example/test/widget_test.dart @@ -0,0 +1,80 @@ +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:timeline_ui_example/main.dart'; + +void main() { + testWidgets( + 'example selects in current camera coordinates and preserves roots', + (tester) async { + await tester.pumpWidget(const TimelineExampleApp()); + final finder = find.byKey(const Key('timeline-surface')); + final controller = tester.widget(finder).controller; + final original = controller.version; + final initialCamera = controller.camera; + final query = original.kernelVersion.query(); + final opening = query.elementById(ElementId('opening'))!; + final connected = query.elementById(ElementId('title'))!; + final frame = controller.project( + TimelineViewportRect(width: 1200, height: 400), + ); + expect(frame.length, 11); // Six primary, four connected, one transition. + expect(frame.signedLaneAt(frame.length - 1), isNegative); + + await tester.tap(find.byTooltip('向右 / Pan right')); + await tester.pump(); + expect(controller.camera.baseTick, greaterThan(initialCamera.baseTick)); + await tester.tap(find.byTooltip('放大 / Zoom in')); + await tester.pump(); + expect( + controller.camera.pixelsPerTick, + greaterThan(initialCamera.pixelsPerTick), + ); + + final origin = tester.getTopLeft(finder); + final size = tester.getSize(finder); + final viewport = TimelineViewportRect( + width: size.width, + height: size.height, + ); + final street = query.elementById(ElementId('street'))!; + final x = controller.camera.screenXForTick( + 13 * TimelineClock.ticksPerSecond, + viewport, + ); + await tester.tapAt(origin + Offset(x, 178)); + await tester.pump(); + expect(controller.selectedIdentities, {street}); + expect(find.textContaining('Selected: street'), findsOneWidget); + + await tester.tap(find.byTooltip('切换主题 / Toggle theme')); + await tester.pumpAndSettle(); + expect(controller.version, same(original)); + expect(Theme.of(tester.element(finder)).brightness, Brightness.light); + expect(controller.selectedIdentities, {street}); + + await tester.tap(find.text('重置 / Reset')); + await tester.pump(); + expect(controller.camera.baseTick, initialCamera.baseTick); + expect(controller.selectedIdentities, isEmpty); + final mouse = await tester.createGesture(kind: PointerDeviceKind.mouse); + await mouse.addPointer(location: Offset.zero); + await mouse.moveTo(origin + const Offset(100, 112)); + await tester.pump(); + expect(controller.hoveredIdentity, LayoutBodyId.element(connected)); + await mouse.removePointer(); + + await tester.tapAt(origin + const Offset(100, 178)); + await tester.pump(); + expect(controller.selectedIdentities, {opening}); + await tester.tapAt(origin + const Offset(10, 10)); + await tester.pump(); + expect(controller.selectedIdentities, isEmpty); + expect(controller.version, same(original)); + expect(tester.takeException(), isNull); + }, + ); +} diff --git a/packages/cutdex_timeline_ui/lib/cutdex_timeline_ui.dart b/packages/cutdex_timeline_ui/lib/cutdex_timeline_ui.dart new file mode 100644 index 0000000..9f42af8 --- /dev/null +++ b/packages/cutdex_timeline_ui/lib/cutdex_timeline_ui.dart @@ -0,0 +1,13 @@ +library; + +export 'src/timeline_theme.dart'; +export 'src/timeline_ruler.dart'; +export 'src/timeline_scrollbars.dart'; +export 'src/timeline_viewport.dart'; +export 'src/timeline_interaction_region.dart'; +export 'src/timeline_view.dart'; +export 'src/timeline_clip_layout.dart'; +export 'src/timeline_view_controller.dart'; + +export 'src/timeline_thumbnails.dart'; +export 'src/timeline_waveforms.dart'; diff --git a/packages/cutdex_timeline_ui/lib/src/timeline_camera_layout.dart b/packages/cutdex_timeline_ui/lib/src/timeline_camera_layout.dart new file mode 100644 index 0000000..e1aeab4 --- /dev/null +++ b/packages/cutdex_timeline_ui/lib/src/timeline_camera_layout.dart @@ -0,0 +1,98 @@ +import 'dart:math' as math; + +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; + +/// Immutable dimensions and content bounds of one viewport layout. +typedef TimelineCameraBounds = ({ + double width, + double height, + int end, + double top, + double bottom, +}); + +/// Placement requested by the viewport lifecycle or an explicit focus action. +enum TimelineCameraPlacement { + preserve, + initialize, + focusPrimary, + resetPrimary, +} + +/// Resolves viewport placement without changing state or notifying listeners. +/// +/// Initialization fits an empty timeline to twenty seconds. The controller +/// requests it only for the first valid layout of an uninitialized view. +/// Preserved views retain their scale, including restored empty timelines. +/// When content fits vertically, [restingVerticalOffset] keeps navigation from +/// moving the centered lane while allowing resize to constrain its position. +TimelineCamera resolveTimelineCamera({ + required TimelineCamera camera, + required TimelineCameraBounds? bounds, + required double primaryCenter, + required double restingVerticalOffset, + TimelineCameraPlacement placement = TimelineCameraPlacement.preserve, +}) { + if (bounds == null || bounds.width <= 0 || bounds.height <= 0) return camera; + final initializing = placement == TimelineCameraPlacement.initialize; + final scale = initializing && bounds.end == 0 + ? bounds.width / (20 * TimelineClock.ticksPerSecond) + : camera.pixelsPerTick; + final visible = bounds.width / scale; + final wholeVisible = visible.ceil(); + final end = timelineNavigationEnd( + contentEnd: bounds.end, + width: bounds.width, + pixelsPerTick: scale, + ); + final maxBase = math.max(0, end - wholeVisible); + final maxFraction = end >= wholeVisible ? wholeVisible - visible : 0.0; + final reset = + placement == TimelineCameraPlacement.resetPrimary || + initializing && bounds.end == 0; + final exceedsEnd = + camera.baseTick > maxBase || + (camera.baseTick == maxBase && camera.fractionalTick > maxFraction); + final overflows = bounds.bottom - bounds.top > bounds.height; + final verticalOffset = placement != TimelineCameraPlacement.preserve + ? primaryCenter - bounds.height / 2 + : overflows + ? camera.verticalOffset.clamp(bounds.top, bounds.bottom - bounds.height) + : restingVerticalOffset.clamp(bounds.bottom - bounds.height, bounds.top); + return TimelineCamera( + baseTick: reset + ? 0 + : exceedsEnd + ? maxBase + : camera.baseTick, + fractionalTick: reset + ? 0 + : exceedsEnd + ? maxFraction + : camera.fractionalTick, + pixelsPerTick: scale, + verticalOffset: verticalOffset, + ); +} + +/// Includes half a viewport beyond content without changing authored duration. +int timelineNavigationEnd({ + required int contentEnd, + required double width, + required double pixelsPerTick, +}) { + if (contentEnd == 0 || width <= 0) return contentEnd; + final padding = (width / pixelsPerTick / 2).ceil(); + return contentEnd + math.min(padding, 0x7fffffffffffffff - contentEnd); +} + +/// Restricts editing views to the nonnegative time domain. +TimelineCamera clampTimelineCameraOrigin(TimelineCamera camera) => + camera.baseTick < 0 + ? TimelineCamera( + baseTick: 0, + pixelsPerTick: camera.pixelsPerTick, + verticalOffset: camera.verticalOffset, + ) + : camera; diff --git a/packages/cutdex_timeline_ui/lib/src/timeline_clip_layout.dart b/packages/cutdex_timeline_ui/lib/src/timeline_clip_layout.dart new file mode 100644 index 0000000..4343803 --- /dev/null +++ b/packages/cutdex_timeline_ui/lib/src/timeline_clip_layout.dart @@ -0,0 +1,92 @@ +import 'dart:math' as math; +import 'dart:ui'; + +/// Clip regions in local coordinates, shared by painting and interaction. +/// [bounds] is the only viewport translation; header changes move every body +/// region together without changing the body's internal layout. +final class TimelineClipLayout { + TimelineClipLayout({ + required this.bounds, + double headerHeight = 0, + double nameHeight = 18, + bool audioOnly = false, + bool hasVideoAudio = false, + }) { + final width = math.max(0.0, bounds.width); + final height = math.max(0.0, bounds.height); + final reserved = headerHeight.clamp(0.0, height); + header = Rect.fromLTWH(0, 0, width, reserved); + body = Rect.fromLTWH(0, reserved, width, height - reserved); + bodyPaintBounds = insetBounds(body); + name = Rect.fromLTWH( + bodyPaintBounds.left, + body.top, + bodyPaintBounds.width, + nameHeight.clamp(0.0, body.height), + ); + final contentHeight = body.bottom - name.bottom; + final videoWaveformHeight = + hasVideoAudio && + contentHeight >= waveformStripHeight + minimumPreviewHeight + ? waveformStripHeight + : 0.0; + preview = Rect.fromLTRB( + bodyPaintBounds.left, + name.bottom, + bodyPaintBounds.right, + body.bottom - videoWaveformHeight, + ); + waveformBackground = audioOnly + ? Rect.fromLTRB( + bodyPaintBounds.left, + name.bottom, + bodyPaintBounds.right, + body.bottom, + ) + : Rect.fromLTWH( + bodyPaintBounds.left, + body.bottom - videoWaveformHeight, + bodyPaintBounds.width, + videoWaveformHeight, + ); + // Audio content keeps its full horizontal span; video uses an inset strip. + waveform = + waveformBackground.height <= 4 || + (!audioOnly && waveformBackground.width <= 4) + ? Rect.fromLTWH(waveformBackground.left, waveformBackground.top, 0, 0) + : audioOnly + ? Rect.fromLTRB( + waveformBackground.left, + waveformBackground.top + 2, + waveformBackground.right, + waveformBackground.bottom - 2, + ) + : waveformBackground.deflate(2); + } + + static const waveformStripHeight = 16.0; + static const minimumPreviewHeight = 20.0; + + final Rect bounds; + late final Rect header; + late final Rect body; + late final Rect bodyPaintBounds; + late final Rect name; + late final Rect preview; + late final Rect waveformBackground; + late final Rect waveform; + + Offset get keyframeCenter => body.center; + + Rect toViewport(Rect region) => region.shift(bounds.topLeft); + + static Rect insetBounds(Rect bounds) { + final inset = math.min(1.0, math.max(0.0, bounds.width) / 4); + return Rect.fromLTRB( + bounds.left + inset, + bounds.top, + bounds.right - inset, + bounds.bottom, + ); + } +} diff --git a/packages/cutdex_timeline_ui/lib/src/timeline_edge_scroll.dart b/packages/cutdex_timeline_ui/lib/src/timeline_edge_scroll.dart new file mode 100644 index 0000000..a9800d5 --- /dev/null +++ b/packages/cutdex_timeline_ui/lib/src/timeline_edge_scroll.dart @@ -0,0 +1,19 @@ +import 'dart:math' as math; + +/// Signed pixels per second while a pointer is near or beyond a viewport edge. +double timelineEdgeVelocity( + double position, + double size, { + required double extent, + required double maxSpeed, +}) { + final edge = math.min(extent, size / 2); + if (edge <= 0 || maxSpeed <= 0) return 0; + final penetration = position < edge + ? -(edge - position) / edge + : position > size - edge + ? (position - size + edge) / edge + : 0.0; + final limited = penetration.clamp(-1.0, 1.0); + return limited * limited.abs() * maxSpeed; +} diff --git a/packages/cutdex_timeline_ui/lib/src/timeline_interaction_region.dart b/packages/cutdex_timeline_ui/lib/src/timeline_interaction_region.dart new file mode 100644 index 0000000..30ccdaf --- /dev/null +++ b/packages/cutdex_timeline_ui/lib/src/timeline_interaction_region.dart @@ -0,0 +1,683 @@ +import 'dart:math' as math; + +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:flutter/gestures.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter/scheduler.dart'; +import 'package:flutter/widgets.dart'; + +import 'timeline_view_controller.dart'; +import 'timeline_theme.dart'; +import 'timeline_edge_scroll.dart'; + +enum _PointerMode { idle, clip, navigate, scrub, marquee, ignored } + +/// One input adapter for the ruler and clip surface. Gesture classification is +/// fixed at press (except a second finger, which cancels editing for navigation). +/// ScaleGestureRecognizer handles both touch and native trackpad pan/zoom. +final class TimelineInteractionRegion extends StatefulWidget { + const TimelineInteractionRegion({ + required this.controller, + required this.child, + this.ruler = false, + this.keyframes = false, + this.edgeScrollExtent = 48, + this.edgeScrollMaxSpeed = 600, + super.key, + }) : assert(edgeScrollExtent >= 0 && edgeScrollExtent < double.infinity), + assert(edgeScrollMaxSpeed >= 0 && edgeScrollMaxSpeed < double.infinity); + final TimelineViewController controller; + final Widget child; + final bool ruler; + final bool keyframes; + + /// Logical pixels inside each edge. Zero disables automatic scrolling. + final double edgeScrollExtent; + + /// Logical pixels per second per axis at the edge (quadratic ramp inward). + final double edgeScrollMaxSpeed; + + @override + State createState() => + _TimelineInteractionRegionState(); +} + +final class _TimelineInteractionRegionState + extends State + with WidgetsBindingObserver, SingleTickerProviderStateMixin { + late final Ticker _edgeTicker; + Duration _lastEdgeElapsed = Duration.zero; + final _focus = FocusNode(); + final _pointers = {}; + _PointerMode _mode = _PointerMode.idle; + Offset? _down; + Offset? _position; + Offset? _focal; + double _scale = 1; + bool _middle = false; + bool _hand = false; + bool _multi = false; + bool _pinching = false; + MouseCursor _cursor = SystemMouseCursors.basic; + TimelineViewportRect? _viewport; + ({ + Set before, + LayoutVersion version, + TimelineCamera camera, + TimelineViewportGeometry geometry, + })? + _marquee; + Rect? _selectionRect; + + void _controllerChanged() { + _syncEdgeScroll(); + final marquee = _marquee; + if (marquee == null) return; + final c = widget.controller; + final sameVersion = identical(marquee.version, c.version); + if (!sameVersion || + !identical(marquee.camera, c.camera) || + marquee.geometry != c.geometry) { + _endMarquee(restore: sameVersion); + _mode = _PointerMode.ignored; + } + } + + Offset get _edgeVelocity { + final incoming = widget.controller.incomingPointer; + final point = incoming?.position ?? _position; + final viewport = incoming?.viewport ?? _viewport; + final scrubbing = + widget.ruler && + _mode == _PointerMode.scrub && + !_multi && + _pointers.isNotEmpty && + widget.controller.isScrubbing; + if ((!scrubbing && widget.ruler) || + (!scrubbing && + incoming == null && + (_mode != _PointerMode.clip || _multi || _pointers.isEmpty)) || + (!scrubbing && !widget.controller.isDragging) || + point == null || + viewport == null || + (!scrubbing && (point.dy < 0 || point.dy >= viewport.height))) { + return Offset.zero; + } + return Offset( + timelineEdgeVelocity( + point.dx, + viewport.width, + extent: widget.edgeScrollExtent, + maxSpeed: widget.edgeScrollMaxSpeed, + ), + scrubbing || widget.controller.isDraggingKeyframe + ? 0 + : timelineEdgeVelocity( + point.dy, + viewport.height, + extent: widget.edgeScrollExtent, + maxSpeed: widget.edgeScrollMaxSpeed, + ), + ); + } + + void _syncEdgeScroll() { + if (_edgeVelocity == Offset.zero) { + _stopEdgeScroll(); + } else if (!_edgeTicker.isActive) { + _lastEdgeElapsed = Duration.zero; + _edgeTicker.start(); + } + } + + void _stopEdgeScroll() { + _edgeTicker.stop(); + _lastEdgeElapsed = Duration.zero; + } + + void _edgeTick(Duration elapsed) { + final velocity = _edgeVelocity; + if (velocity == Offset.zero) { + _stopEdgeScroll(); + return; + } + // Never catch up a suspended/background frame with one giant camera jump. + final seconds = ((elapsed - _lastEdgeElapsed).inMicroseconds / 1000000) + .clamp(0.0, 0.05); + _lastEdgeElapsed = elapsed; + if (seconds == 0) return; + try { + // setCamera re-resolves the retained pointer against the new Camera once. + // No separate drag offset, timeline mutation or layout solver lives here. + final before = widget.controller.camera; + widget.controller.panBy( + horizontalPixels: velocity.dx * seconds, + verticalPixels: velocity.dy * seconds, + ); + if (widget.ruler && _mode == _PointerMode.scrub && _position != null) { + _seek(_position!); + } + if (widget.controller.camera == before) _stopEdgeScroll(); + } catch (_) { + _cancel(); + rethrow; + } + } + + void _endMarquee({required bool restore, bool repaint = true}) { + final marquee = _marquee; + _marquee = null; + _selectionRect = null; + if (marquee == null) return; + if (restore && identical(marquee.version, widget.controller.version)) { + widget.controller.setSelection(marquee.before); + } + if (repaint && mounted) setState(() {}); + } + + void _updateMarquee(Offset point) { + if (_marquee == null || _down == null) return; + _controllerChanged(); + if (_marquee == null) return; + final rect = Rect.fromPoints( + _down!, + point, + ).intersect(Rect.fromLTWH(0, 0, _viewport!.width, _viewport!.height)); + setState(() => _selectionRect = rect); + widget.controller.setSelection( + widget.controller.hitTestRect(viewport: _viewport!, rectangle: rect), + ); + } + + @override + void initState() { + super.initState(); + _edgeTicker = createTicker(_edgeTick); + WidgetsBinding.instance.addObserver(this); + widget.controller.addListener(_controllerChanged); + } + + @override + void didUpdateWidget(TimelineInteractionRegion oldWidget) { + super.didUpdateWidget(oldWidget); + if (oldWidget.controller != widget.controller || + oldWidget.ruler != widget.ruler || + oldWidget.keyframes != widget.keyframes) { + oldWidget.controller.removeListener(_controllerChanged); + final before = _marquee; + _marquee = null; + _selectionRect = null; + if (before != null && + identical(before.version, oldWidget.controller.version)) { + oldWidget.controller.setSelection(before.before); + } + oldWidget.controller.cancelDrag(); + _reset(); + widget.controller.addListener(_controllerChanged); + } + _syncEdgeScroll(); + } + + int? _trimFrame; + Offset? _pendingTrimPosition; + + void _cancelTrimFrame() { + if (_trimFrame case final id?) { + SchedulerBinding.instance.cancelFrameCallbackWithId(id); + } + _trimFrame = null; + _pendingTrimPosition = null; + } + + void _queueTrim(Offset position) { + _pendingTrimPosition = position; + _trimFrame ??= SchedulerBinding.instance.scheduleFrameCallback((_) { + _trimFrame = null; + final latest = _pendingTrimPosition; + _pendingTrimPosition = null; + if (!mounted || + _mode != _PointerMode.clip || + !widget.controller.isTrimming || + latest == null) { + return; + } + widget.controller.updateDrag(viewport: _viewport!, position: latest); + }); + } + + void _reset() { + if (_mode == _PointerMode.scrub) widget.controller.endScrubbing(); + _cancelTrimFrame(); + _stopEdgeScroll(); + _mode = _PointerMode.idle; + _down = _position = _focal = null; + _pointers.clear(); + _middle = _multi = _hand = false; + _pinching = false; + _scale = 1; + } + + void _cancel() { + _endMarquee(restore: true); + widget.controller.cancelDrag(); + _reset(); + } + + @override + void didChangeAppLifecycleState(AppLifecycleState state) { + if (state != AppLifecycleState.resumed) _cancel(); + } + + @override + void dispose() { + if (_mode == _PointerMode.scrub) widget.controller.endScrubbing(); + _cancelTrimFrame(); + WidgetsBinding.instance.removeObserver(this); + widget.controller.removeListener(_controllerChanged); + _edgeTicker.dispose(); + _endMarquee(restore: true, repaint: false); + widget.controller.cancelDrag(); + _focus.dispose(); + super.dispose(); + } + + void _seek(Offset point) => widget.controller.seekAt( + screenX: point.dx.clamp(0.0, _viewport!.width), + viewport: _viewport!, + ); + + void _navigate( + Offset from, + Offset to, { + double scale = 1, + bool anchorToPlayhead = false, + }) { + widget.controller.navigate( + from: from, + to: widget.ruler ? Offset(to.dx, from.dy) : to, + scale: scale, + anchorToPlayhead: anchorToPlayhead, + viewport: _viewport!, + ); + widget.controller.setHoveredIdentity(null); + } + + void _downEvent(PointerDownEvent event) { + if (event.buttons == kSecondaryMouseButton && + !widget.ruler && + !widget.controller.isDragging) { + final hit = widget.controller.hitTest( + viewport: _viewport!, + position: event.localPosition, + ); + if (hit == null) { + widget.controller.clearSelection(); + } else if (!widget.controller.selectedIdentities.contains(hit.identity)) { + widget.controller.setSelection([hit.identity]); + } + return; + } + if (event.buttons != kPrimaryButton && + event.buttons != kMiddleMouseButton) { + return; + } + _pointers.add(event.pointer); + _focus.requestFocus(); + if (_pointers.length > 1) { + _endMarquee(restore: true); + widget.controller.cancelDrag(); + _mode = _PointerMode.navigate; + _multi = true; + _focal = null; + return; + } + _down = _position = event.localPosition; + _middle = event.buttons == kMiddleMouseButton; + final space = HardwareKeyboard.instance.logicalKeysPressed.contains( + LogicalKeyboardKey.space, + ); + _hand = _middle || space; + if (_hand) { + _mode = _PointerMode.navigate; + } else if (widget.ruler) { + _mode = _PointerMode.scrub; + } else { + final hit = widget.controller.hitTest( + viewport: _viewport!, + position: event.localPosition, + ); + _mode = hit != null + ? _PointerMode.clip + : event.kind == PointerDeviceKind.touch + ? _PointerMode.navigate + : _PointerMode.marquee; + } + } + + void _scaleStart(ScaleStartDetails details) { + if (_middle) return; + _scale = 1; + _pinching = false; + // Native trackpad gestures have no ordinary PointerDown and count as >=2. + if (details.pointerCount >= 2) { + _endMarquee(restore: true); + widget.controller.cancelDrag(); + _multi = true; + _mode = _PointerMode.navigate; + } + _focal = details.localFocalPoint; + if (_mode == _PointerMode.marquee && _down != null) { + final c = widget.controller; + _marquee = ( + before: c.selectedIdentities.toSet(), + version: c.version, + camera: c.camera, + geometry: c.geometry, + ); + c.setHoveredIdentity(null); + _updateMarquee(details.localFocalPoint); + } + if (_mode == _PointerMode.clip && _down != null) { + if (!widget.controller.beginDrag( + viewport: _viewport!, + position: _down!, + trimHitExtent: TimelineThemeData.of(context).trimHitExtent, + keyframes: widget.keyframes, + keyframeHeaderHeight: TimelineThemeData.of(context).clipHeaderHeight, + )) { + _mode = _PointerMode.ignored; + } + } + if (_mode == _PointerMode.navigate && !_multi && _down != null) { + _navigate(_down!, details.localFocalPoint); + } else if (_mode == _PointerMode.clip) { + widget.controller.updateDrag( + viewport: _viewport!, + position: details.localFocalPoint, + ); + } else if (_mode == _PointerMode.scrub) { + widget.controller.beginScrubbing(); + _seek(details.localFocalPoint); + } + _position = details.localFocalPoint; + _syncEdgeScroll(); + } + + void _scaleUpdate(ScaleUpdateDetails details) { + if (_middle || _mode == _PointerMode.idle) return; + final focal = details.localFocalPoint; + if (_mode == _PointerMode.navigate) { + // Windows DirectManipulation reports translation alongside pinch scale. + // Once scaling starts, retain zoom intent until the fingers lift, even + // when later packets keep the same scale but move their focal point. + _pinching |= (details.scale - 1).abs() > 0.000001; + _navigate( + _pinching ? focal : _focal ?? focal, + focal, + scale: details.scale / _scale, + anchorToPlayhead: true, + ); + } else if (_mode == _PointerMode.clip) { + // Ripple trim prepares a canonical layout. Multiple pointer packets in + // one display interval must not each rebuild that same private preview. + if (widget.controller.isTrimming) { + _queueTrim(focal); + } else { + widget.controller.updateDrag(viewport: _viewport!, position: focal); + } + } else if (_mode == _PointerMode.scrub) { + _seek(focal); + } else if (_mode == _PointerMode.marquee) { + _updateMarquee(focal); + } + _scale = details.scale; + _focal = _position = focal; + _syncEdgeScroll(); + } + + void _scaleEnd(ScaleEndDetails details) { + if (_middle || details.pointerCount > 0) return; + _stopEdgeScroll(); + if (_mode == _PointerMode.marquee) { + if (_position != null) _updateMarquee(_position!); + _endMarquee(restore: false); + } + if (_mode == _PointerMode.clip && _position != null) { + widget.controller.finishDrag(viewport: _viewport!, position: _position!); + } + _reset(); + } + + void _scroll(PointerSignalEvent event) { + if (event is! PointerScrollEvent) return; + final keys = HardwareKeyboard.instance; + final zoom = keys.isControlPressed || keys.isMetaPressed; + final horizontal = keys.isShiftPressed; + GestureBinding.instance.pointerSignalResolver.register(event, (_) { + if (zoom) { + final delta = event.scrollDelta.dy == 0 + ? event.scrollDelta.dx + : event.scrollDelta.dy; + _navigate( + event.localPosition, + event.localPosition, + scale: math.exp((-delta * 0.002).clamp(-20.0, 20.0)), + anchorToPlayhead: true, + ); + } else { + final delta = horizontal + ? Offset(event.scrollDelta.dx + event.scrollDelta.dy, 0) + : event.scrollDelta; + widget.controller.panBy( + horizontalPixels: delta.dx, + verticalPixels: widget.ruler ? 0 : delta.dy, + ); + widget.controller.setHoveredIdentity(null); + } + }); + } + + @override + Widget build(BuildContext context) => LayoutBuilder( + builder: (context, constraints) { + final previous = _viewport; + if (previous != null && + _mode == _PointerMode.clip && + (previous.width != constraints.maxWidth || + previous.height != constraints.maxHeight)) { + // End the old-coordinate gesture before using resized viewport bounds. + // Publication/notifications must not run during build. + _stopEdgeScroll(); + final owner = widget.controller; + WidgetsBinding.instance.addPostFrameCallback((_) { + if (mounted && identical(owner, widget.controller)) _cancel(); + }); + } + _viewport = TimelineViewportRect( + width: constraints.maxWidth, + height: constraints.maxHeight, + ); + return Focus( + focusNode: _focus, + onFocusChange: (focused) { + if (!focused) _cancel(); + }, + onKeyEvent: (_, event) { + if (event is KeyDownEvent && + event.logicalKey == LogicalKeyboardKey.escape) { + _cancel(); + return KeyEventResult.handled; + } + if (event is KeyDownEvent && + _mode == _PointerMode.idle && + _pointers.isEmpty && + !widget.controller.isDragging) { + final keys = HardwareKeyboard.instance; + final command = keys.isMetaPressed || keys.isControlPressed; + final key = event.logicalKey; + if (command && + !keys.isAltPressed && + !keys.isShiftPressed && + key == LogicalKeyboardKey.keyB) { + widget.controller.cutSelectionAtPlayhead(); + return KeyEventResult.handled; + } + if (!command && + !keys.isAltPressed && + !keys.isShiftPressed && + (key == LogicalKeyboardKey.delete || + key == LogicalKeyboardKey.backspace)) { + widget.controller.deleteSelection(); + return KeyEventResult.handled; + } + if (command && + !keys.isAltPressed && + key == LogicalKeyboardKey.keyZ) { + keys.isShiftPressed + ? widget.controller.redo() + : widget.controller.undo(); + return KeyEventResult.handled; + } + } + return KeyEventResult.ignored; + }, + child: MouseRegion( + cursor: widget.controller.isDraggingKeyframe + ? widget.controller.dragRejection == null + ? SystemMouseCursors.resizeLeftRight + : SystemMouseCursors.forbidden + : _cursor, + onHover: (event) { + if (!widget.ruler && !widget.controller.isDragging) { + final hit = widget.controller.hitTest( + viewport: _viewport!, + position: event.localPosition, + ); + widget.controller.setHoveredIdentity(hit?.identity); + final edge = widget.controller.trimEdgeAt( + hit: hit, + position: event.localPosition, + extent: TimelineThemeData.of(context).trimHitExtent, + ); + final onKey = + widget.keyframes && + widget.controller.hitTestKeyframe( + viewport: _viewport!, + position: event.localPosition, + headerHeight: TimelineThemeData.of( + context, + ).clipHeaderHeight, + ) != + null; + final cursor = edge == null && !onKey + ? SystemMouseCursors.basic + : SystemMouseCursors.resizeLeftRight; + if (_cursor != cursor) setState(() => _cursor = cursor); + } + }, + onExit: (_) { + widget.controller.setHoveredIdentity(null); + if (_cursor != SystemMouseCursors.basic) { + setState(() => _cursor = SystemMouseCursors.basic); + } + }, + child: Listener( + onPointerDown: _downEvent, + onPointerMove: (event) { + if (_middle && _pointers.contains(event.pointer)) { + _navigate(_position!, event.localPosition); + _position = event.localPosition; + } + }, + onPointerUp: (event) { + if (!_pointers.remove(event.pointer)) return; + _stopEdgeScroll(); + if (_middle) { + _reset(); + return; + } + if (!_multi) _position = event.localPosition; + }, + // Accepted scales may end even on cancellation: clear before publish. + onPointerCancel: (event) { + if (_pointers.contains(event.pointer)) _cancel(); + }, + onPointerSignal: _scroll, + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTapUp: (details) { + if (widget.ruler && _mode == _PointerMode.scrub) { + _seek(details.localPosition); + _reset(); + return; + } + if (widget.keyframes && + _mode == _PointerMode.clip && + !widget.ruler && + !_hand && + !_multi && + widget.controller.selectKeyframeAt( + viewport: _viewport!, + position: details.localPosition, + headerHeight: TimelineThemeData.of( + context, + ).clipHeaderHeight, + )) { + _reset(); + return; + } + if (!widget.ruler && + !_hand && + !_multi && + (_mode == _PointerMode.clip || + _mode == _PointerMode.marquee || + _mode == _PointerMode.navigate)) { + final hit = widget.controller.hitTest( + viewport: _viewport!, + position: details.localPosition, + ); + widget.controller.setSelection([ + if (hit != null) hit.identity, + ]); + if (hit == null) _seek(details.localPosition); + } + _reset(); + }, + onScaleStart: _scaleStart, + onScaleUpdate: _scaleUpdate, + onScaleEnd: _scaleEnd, + child: Stack( + fit: StackFit.expand, + children: [ + widget.child, + if (_selectionRect case final rect?) + Positioned.fromRect( + rect: rect, + child: IgnorePointer( + child: DecoratedBox( + key: const ValueKey('timeline-marquee'), + decoration: BoxDecoration( + color: TimelineThemeData.of( + context, + ).selectionOutlineColor.withValues(alpha: 0.12), + border: Border.all( + color: TimelineThemeData.of( + context, + ).selectionOutlineColor, + width: TimelineThemeData.of( + context, + ).selectionOutlineWidth, + ), + ), + ), + ), + ), + ], + ), + ), + ), + ), + ); + }, + ); +} diff --git a/packages/cutdex_timeline_ui/lib/src/timeline_keyframes.dart b/packages/cutdex_timeline_ui/lib/src/timeline_keyframes.dart new file mode 100644 index 0000000..2b271c7 --- /dev/null +++ b/packages/cutdex_timeline_ui/lib/src/timeline_keyframes.dart @@ -0,0 +1,15 @@ +import 'package:cutdex_core/timeline/engine.dart'; + +/// Adapt viewport pixel bounds to the shared clip-local keyframe query. +List timelineKeyframeOffsets( + ElementRecord element, { + required double start, + required double end, +}) { + final curves = []; + element.parameters?.forEach((_, curve) => curves.add(curve)); + if (curves.isEmpty || end <= start || element.duration <= 0) return const []; + return TimelineSourceClock( + element, + ).keyframeOffsets(curves, start: start.floor(), end: end.ceil()); +} diff --git a/packages/cutdex_timeline_ui/lib/src/timeline_ruler.dart b/packages/cutdex_timeline_ui/lib/src/timeline_ruler.dart new file mode 100644 index 0000000..831e225 --- /dev/null +++ b/packages/cutdex_timeline_ui/lib/src/timeline_ruler.dart @@ -0,0 +1,479 @@ +import 'dart:math' as math; + +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:flutter/widgets.dart'; + +import 'timeline_interaction_region.dart'; +import 'timeline_ruler_scale.dart'; +import 'timeline_theme.dart'; +import 'timeline_view_controller.dart'; + +enum TimelineRulerStyle { elapsed, timecode } + +/// The arrangement of full timecode labels and downward tick marks. +enum TimelineRulerTimecodeLayout { + /// Labels follow their major marks in the same band as subdivisions. + inline, + + /// Labels stay centered on major marks, including at the viewport edges. + centered, + + /// Faint marks continue behind labels with a halo around each glyph. + overlay, +} + +/// Elapsed-time or full project timecode ruler. +/// Shares its horizontal origin/width with TimelineView, independently of y pan. +final class TimelineRuler extends StatelessWidget { + const TimelineRuler({ + required this.controller, + this.theme, + this.showPlayhead = true, + this.style = TimelineRulerStyle.elapsed, + this.timecodeLayout = TimelineRulerTimecodeLayout.inline, + super.key, + }); + + /// Clock intervals keep minute/hour labels and subdivisions readable. + static int majorStepSecondsFor(double desiredSeconds) { + if (!desiredSeconds.isFinite || desiredSeconds < 0) { + throw ArgumentError.value(desiredSeconds, 'desiredSeconds'); + } + for (final seconds in const [ + 1, + 2, + 5, + 10, + 15, + 30, + 60, + 120, + 300, + 600, + 900, + 1800, + 3600, + 7200, + 10800, + 21600, + 43200, + 86400, + ]) { + if (desiredSeconds <= seconds) return seconds; + } + var seconds = 86400; + const maximumSeconds = 0x3fffffffffffffff ~/ TimelineClock.ticksPerSecond; + while (seconds < desiredSeconds && seconds < maximumSeconds) { + seconds = math.min(seconds * 2, maximumSeconds); + } + return seconds; + } + + /// Finer detail belongs to the frame ruler, not fractional-second marks. + static int minorDivisionsFor(int majorSeconds) => majorSeconds % 5 == 0 + ? 5 + : majorSeconds % 2 == 0 + ? 2 + : 1; + + final bool showPlayhead; + final TimelineRulerStyle style; + + /// The visual arrangement used when [style] is [TimelineRulerStyle.timecode]. + final TimelineRulerTimecodeLayout timecodeLayout; + final TimelineViewController controller; + final TimelineThemeData? theme; + + /// Keeps the label row readable when the host increases text size. + static double heightFor( + TimelineThemeData theme, + TextScaler textScaler, { + TimelineRulerStyle style = TimelineRulerStyle.elapsed, + }) => style == TimelineRulerStyle.timecode + ? math.max( + theme.rulerHeight, + textScaler.scale(theme.rulerTextStyle.fontSize ?? 12) * + (theme.rulerTextStyle.height ?? 1.2) + + 12, + ) + : theme.rulerHeight; + + @override + Widget build(BuildContext context) { + final resolved = theme ?? TimelineThemeData.of(context); + return SizedBox( + height: heightFor( + resolved, + MediaQuery.textScalerOf(context), + style: style, + ), + child: TimelineInteractionRegion( + controller: controller, + ruler: true, + child: RepaintBoundary( + child: CustomPaint( + painter: _RulerPainter( + controller, + resolved, + MediaQuery.textScalerOf(context), + showPlayhead, + style, + timecodeLayout, + ), + child: const SizedBox.expand(), + ), + ), + ), + ); + } +} + +final class _RulerPainter extends CustomPainter { + _RulerPainter( + this.controller, + this.theme, + this.textScaler, + this.showPlayhead, + this.style, + this.timecodeLayout, + ) : super(repaint: showPlayhead ? controller : controller.contentChanges); + final TimelineViewController controller; + final TimelineThemeData theme; + final TextScaler textScaler; + final bool showPlayhead; + final TimelineRulerStyle style; + final TimelineRulerTimecodeLayout timecodeLayout; + + @override + void paint(Canvas canvas, Size size) { + canvas.drawRect( + Offset.zero & size, + Paint()..color = theme.rulerBackgroundColor, + ); + if (size.width <= 0 || size.height <= 0) return; + if (style == TimelineRulerStyle.timecode) { + _paintTimecode(canvas, size); + return; + } + final camera = controller.camera; + final viewport = TimelineViewportRect( + width: size.width, + height: size.height, + ); + final label = TextPainter( + textDirection: TextDirection.ltr, + textScaler: textScaler, + text: TextSpan(text: '0000:00:00.000', style: theme.rulerTextStyle), + )..layout(); + final spacing = math.max(80.0, label.width + 16); + final desired = spacing / camera.pixelsPerTick; + final frameMode = camera.pixelsPerTick * controller.frameTicks >= 8; + final unit = TimelineClock.ticksPerSecond; + final seconds = TimelineRuler.majorStepSecondsFor(desired / unit); + final step = seconds * unit; + final firstVisibleTick = math.max(0, camera.baseTick); + const maxTick = 0x7fffffffffffffff; + // Keep the preceding label and subdivisions until the viewport clips them. + var tick = firstVisibleTick - firstVisibleTick % step; + final stroke = Paint() + ..color = theme.rulerTickColor + ..strokeWidth = 1; + canvas.save(); + canvas.clipRect(Offset.zero & size); + if (frameMode) { + _paintFrames(canvas, size, viewport, label, stroke); + } else { + // The loop is bounded by viewport width, not project length or element count. + final limit = (size.width / spacing).ceil() + 2; + for (var i = 0; i < limit; i++) { + final x = camera.screenXForTick(tick, viewport); + if (x >= size.width) break; + canvas.drawLine(Offset(x, 0), Offset(x, 6), stroke); + label.text = TextSpan( + text: _elapsed(tick), + style: theme.rulerTextStyle, + ); + label.layout(); + final labelLeft = x + 4; + label.paint(canvas, Offset(labelLeft, 0)); + final labelRight = labelLeft + label.width + 4; + // Minor marks are display subdivisions, not an alternative edit grid. + final divisions = TimelineRuler.minorDivisionsFor(seconds); + final minor = step ~/ divisions; + for (var j = 1; j < divisions; j++) { + final minorX = x + minor * j * camera.pixelsPerTick; + if (minorX > labelRight) { + canvas.drawLine(Offset(minorX, 0), Offset(minorX, 3), stroke); + } + } + if (tick > maxTick - step) break; + tick += step; + } + } + label.dispose(); + final x = camera.screenXForTick(controller.playheadTick, viewport); + final pointer = Path() + ..moveTo(x - 3.5, 0) + ..lineTo(x + 3.5, 0) + ..lineTo(x + 4.5, 1) + ..lineTo(x + 4.5, 7) + ..lineTo(x, 12) + ..lineTo(x - 4.5, 7) + ..lineTo(x - 4.5, 1) + ..close(); + if (showPlayhead) { + canvas.drawPath( + pointer, + Paint() + ..color = theme.playheadColor + ..style = PaintingStyle.stroke + ..strokeWidth = 1, + ); + } + canvas.restore(); + } + + void _paintTimecode(Canvas canvas, Size size) { + final camera = controller.camera; + final viewport = TimelineViewportRect( + width: size.width, + height: size.height, + ); + final timecode = TimelineRulerTimecode(controller.format); + final frame = timecode.frameTicks; + final pixelsPerFrame = camera.pixelsPerTick * frame; + final visibleFirst = math.max(0, camera.baseTick ~/ frame); + final visibleLast = visibleFirst + (size.width / pixelsPerFrame).ceil(); + final firstText = timecode.formatFrame(visibleFirst); + final lastText = timecode.formatFrame(visibleLast); + final sample = (firstText.length > lastText.length ? firstText : lastText) + .replaceAll(RegExp(r'\d'), '8'); + final label = TextPainter( + textDirection: TextDirection.ltr, + textScaler: textScaler, + text: TextSpan(text: sample, style: theme.rulerTextStyle), + )..layout(); + final scale = TimelineRulerScale.resolve( + pixelsPerFrame: pixelsPerFrame, + nominalFramesPerSecond: timecode.framesPerSecond, + labelSpacing: label.width + 24, + ); + final tickSpacing = scale.minorFrames * pixelsPerFrame; + final first = visibleFirst - visibleFirst % scale.minorFrames; + final count = (size.width / tickSpacing).ceil() + 2; + final centerY = size.height / 2; + final labels = <({int frame, Rect bounds})>[]; + final marks = <({double x, bool major, bool middle})>[]; + final stroke = Paint()..strokeWidth = 1; + final color = theme.rulerTickColor; + var labelRight = double.negativeInfinity; + // Resolve label bounds before painting so subdivisions can avoid them + // without erasing a rectangular section of the ruler. Include neighboring + // major marks: their text can remain visible after the mark leaves view. + final firstLabel = visibleFirst - visibleFirst % scale.majorFrames; + final labelCount = + (size.width / (scale.majorFrames * pixelsPerFrame)).ceil() + 2; + final maxFrame = 0x7fffffffffffffff ~/ frame; + for (var i = 0; i < labelCount; i++) { + if (i > (maxFrame - firstLabel) ~/ scale.majorFrames) break; + final index = firstLabel + i * scale.majorFrames; + final x = camera.screenXForTick(index * frame, viewport); + label.text = TextSpan( + text: timecode.formatFrame(index), + style: theme.rulerTextStyle, + ); + label.layout(); + if (label.height > size.height) continue; + final left = timecodeLayout == TimelineRulerTimecodeLayout.centered + ? x - label.width / 2 + : x + 7; + if (left + label.width <= 0 || + left >= size.width || + left < labelRight + 24) { + continue; + } + final bounds = Rect.fromLTWH( + left, + (size.height - label.height) / 2, + label.width, + label.height, + ); + labels.add((frame: index, bounds: bounds)); + labelRight = bounds.right; + } + // Subdivision work remains bounded by viewport width, independently of + // how far the preceding label's major mark lies outside the viewport. + for (var i = 0; i < count; i++) { + if (i > (maxFrame - first) ~/ scale.minorFrames) break; + final index = first + i * scale.minorFrames; + final x = camera.screenXForTick(index * frame, viewport); + if (x >= size.width) break; + marks.add(( + x: x, + major: index % scale.majorFrames == 0, + middle: scale.middleFrames != null && index % scale.middleFrames! == 0, + )); + } + canvas.save(); + canvas.clipRect(Offset.zero & size); + var labelCursor = 0; + for (final mark in marks) { + final x = mark.x; + // Both lists are ordered by x, keeping avoidance linear in viewport marks. + while (labelCursor < labels.length && + labels[labelCursor].bounds.right + 4 < x) { + labelCursor++; + } + if (timecodeLayout != TimelineRulerTimecodeLayout.overlay && + !mark.major && + labelCursor < labels.length && + x > labels[labelCursor].bounds.left - 4 && + x < labels[labelCursor].bounds.right + 4) { + continue; + } + var top = centerY - (mark.major ? 8 : 6); + var bottom = mark.major ? centerY + 7 : top + (mark.middle ? 10 : 7); + var alpha = mark.major ? 1.0 : (mark.middle ? .85 : .6); + switch (timecodeLayout) { + case TimelineRulerTimecodeLayout.inline: + break; + case TimelineRulerTimecodeLayout.centered: + if (mark.major) { + top = math.max(centerY + 6, centerY + label.height / 2 - 2); + bottom = size.height - 2; + } + case TimelineRulerTimecodeLayout.overlay: + top = centerY - 8; + bottom = mark.major + ? size.height - 3 + : centerY + (mark.middle ? 5 : 2); + alpha = mark.major ? .75 : .45; + } + stroke.color = color.withValues(alpha: color.a * alpha); + canvas.drawLine( + Offset(x, math.max(0.0, top)), + Offset(x, math.min(size.height, bottom)), + stroke, + ); + } + final halo = timecodeLayout == TimelineRulerTimecodeLayout.overlay + ? TextPainter(textDirection: TextDirection.ltr, textScaler: textScaler) + : null; + final haloStyle = theme.rulerTextStyle.copyWith( + foreground: Paint() + ..color = theme.rulerBackgroundColor + ..style = PaintingStyle.stroke + ..strokeWidth = 2.5 + ..strokeJoin = StrokeJoin.round, + ); + for (final entry in labels) { + final text = timecode.formatFrame(entry.frame); + if (halo != null) { + halo.text = TextSpan(text: text, style: haloStyle); + halo.layout(); + halo.paint(canvas, entry.bounds.topLeft); + } + label.text = TextSpan(text: text, style: theme.rulerTextStyle); + label.layout(); + label.paint(canvas, entry.bounds.topLeft); + } + halo?.dispose(); + label.dispose(); + if (showPlayhead) { + final x = camera.screenXForTick(controller.playheadTick, viewport); + canvas.drawPath( + Path() + ..moveTo(x - 3.5, 0) + ..lineTo(x + 3.5, 0) + ..lineTo(x + 4.5, 1) + ..lineTo(x + 4.5, 7) + ..lineTo(x, 12) + ..lineTo(x - 4.5, 7) + ..lineTo(x - 4.5, 1) + ..close(), + Paint() + ..color = theme.playheadColor + ..style = PaintingStyle.stroke + ..strokeWidth = 1, + ); + } + canvas.restore(); + } + + void _paintFrames( + Canvas canvas, + Size size, + TimelineViewportRect viewport, + TextPainter label, + Paint stroke, + ) { + final camera = controller.camera; + final frame = controller.frameTicks; + const second = TimelineClock.ticksPerSecond; + final pixelsPerFrame = camera.pixelsPerTick * frame; + final labelEvery = math.max(5, (64 / pixelsPerFrame / 5).ceil() * 5); + final visibleFirst = math.max(0, camera.baseTick ~/ frame); + final visibleSecond = visibleFirst * frame ~/ second; + final secondStart = (visibleSecond * second + frame - 1) ~/ frame; + final first = + secondStart + (visibleFirst - secondStart) ~/ labelEvery * labelEvery; + final count = + (size.width / pixelsPerFrame).ceil() + visibleFirst - first + 2; + var labelRight = double.negativeInfinity; + for (var i = 0; i < count; i++) { + final index = first + i; + final tick = index * frame; + if (tick > 0x7fffffffffffffff) break; + final x = camera.screenXForTick(tick, viewport); + if (x >= size.width) break; + final elapsedSecond = tick ~/ second; + // Non-integer frame rates keep the real frame grid. The first frame + // at or after each second carries that second's label. + final firstInSecond = (elapsedSecond * second + frame - 1) ~/ frame; + final offset = index - firstInSecond; + final wholeSecond = offset == 0; + canvas.drawLine( + Offset(x, wholeSecond ? 0 : size.height - 3), + Offset(x, wholeSecond ? 6 : size.height), + stroke, + ); + if (!wholeSecond && offset % labelEvery != 0) continue; + label.text = TextSpan( + text: wholeSecond ? _elapsed(elapsedSecond * second) : '${offset}f', + style: theme.rulerTextStyle, + ); + label.layout(); + final nextSecondFrame = + ((elapsedSecond + 1) * second + frame - 1) ~/ frame; + final nextSecondX = camera.screenXForTick( + nextSecondFrame * frame, + viewport, + ); + if (!wholeSecond && + (x + 4 < labelRight || x + label.width + 8 > nextSecondX)) { + continue; + } + label.paint(canvas, Offset(x + 4, 0)); + labelRight = x + label.width + 8; + } + } + + @override + bool shouldRepaint(_RulerPainter old) => + old.controller != controller || + old.showPlayhead != showPlayhead || + old.style != style || + old.timecodeLayout != timecodeLayout || + old.theme != theme || + old.textScaler != textScaler; +} + +String _elapsed(int tick) { + assert(tick >= 0); + final seconds = tick ~/ TimelineClock.ticksPerSecond; + final hours = (seconds ~/ 3600).toString().padLeft(2, '0'); + final minutes = (seconds ~/ 60 % 60).toString().padLeft(2, '0'); + final remainder = (seconds % 60).toString().padLeft(2, '0'); + return '$hours:$minutes:$remainder'; +} diff --git a/packages/cutdex_timeline_ui/lib/src/timeline_ruler_scale.dart b/packages/cutdex_timeline_ui/lib/src/timeline_ruler_scale.dart new file mode 100644 index 0000000..e808c18 --- /dev/null +++ b/packages/cutdex_timeline_ui/lib/src/timeline_ruler_scale.dart @@ -0,0 +1,164 @@ +import 'dart:math' as math; + +import 'package:cutdex_core/timeline/model.dart'; + +/// Display-only intervals on the project frame grid, anchored at frame zero. +final class TimelineRulerScale { + const TimelineRulerScale._({ + required this.majorFrames, + required this.minorFrames, + required this.middleFrames, + }); + + factory TimelineRulerScale.resolve({ + required double pixelsPerFrame, + required int nominalFramesPerSecond, + required double labelSpacing, + }) { + if (!pixelsPerFrame.isFinite || pixelsPerFrame <= 0) { + throw ArgumentError.value(pixelsPerFrame, 'pixelsPerFrame'); + } + if (nominalFramesPerSecond < 1) { + throw ArgumentError.value( + nominalFramesPerSecond, + 'nominalFramesPerSecond', + ); + } + if (!labelSpacing.isFinite || labelSpacing <= 0) { + throw ArgumentError.value(labelSpacing, 'labelSpacing'); + } + final fps = nominalFramesPerSecond; + final major = _stepFrames( + math.max(120, labelSpacing) / pixelsPerFrame, + fps, + ); + // Reveal every frame at 8 px; below that, aim for roughly 12 px per mark. + final minor = pixelsPerFrame >= 8 - 1e-9 + ? 1 + : _stepFrames(12 / pixelsPerFrame, fps, divides: major); + int? middle; + for (var multiplier = 2; multiplier < major ~/ minor; multiplier++) { + final candidate = minor * multiplier; + if (major % candidate == 0 && candidate * pixelsPerFrame >= 24) { + middle = candidate; + break; + } + } + return TimelineRulerScale._( + majorFrames: major, + minorFrames: minor, + middleFrames: middle, + ); + } + + final int majorFrames; + final int minorFrames; + final int? middleFrames; + + static int _stepFrames(double desired, int fps, {int? divides}) { + if (desired <= fps + 1e-9) { + for (var frames = 1; frames <= fps; frames++) { + // Rates divisible by five use familiar 1/2/5/10/15-frame groups. + if (fps % 5 == 0 && frames > 2 && frames % 5 != 0) continue; + if (frames + 1e-9 >= desired && + fps % frames == 0 && + (divides == null || divides % frames == 0)) { + return frames; + } + } + } + final desiredSeconds = desired / fps; + for (final seconds in clockStepsSeconds) { + final frames = seconds * fps; + if (seconds + 1e-9 >= desiredSeconds && + (divides == null || divides % frames == 0)) { + return frames; + } + } + if (divides != null) return divides; + var seconds = clockStepsSeconds.last; + final maximumSeconds = 0x7fffffffffffffff ~/ fps; + while (seconds < desiredSeconds && seconds < maximumSeconds) { + seconds = seconds > maximumSeconds ~/ 2 ? maximumSeconds : seconds * 2; + } + return seconds * fps; + } + + static const clockStepsSeconds = [ + 1, + 2, + 5, + 10, + 15, + 30, + 60, + 120, + 300, + 600, + 900, + 1800, + 3600, + 7200, + 10800, + 21600, + 43200, + 86400, + ]; +} + +/// Frame addresses for the project's nominal rate and timecode metadata. +/// NTSC drop-frame skips labels, never project frames or tick positions. +final class TimelineRulerTimecode { + TimelineRulerTimecode(TimelineFormat format) + : framesPerSecond = math.max( + 1, + (format.frameDuration.denominator / format.frameDuration.numerator) + .round(), + ), + frameTicks = format.frameGrid.quantumTicks, + startFrame = + TimelineClock.standard.toTicks(format.startTime) ~/ + format.frameGrid.quantumTicks, + _format = format; + + final int framesPerSecond; + final int frameTicks; + final int startFrame; + final TimelineFormat _format; + + bool get dropFrame => + _format.timecodeFormat == TimelineTimecodeFormat.dropFrame && + framesPerSecond % 30 == 0 && + _format.frameDuration == RationalTime(1001, framesPerSecond * 1000); + + String formatTick(int tick) => formatFrame(tick ~/ frameTicks); + + String formatFrame(int localFrame) { + var frames = localFrame + startFrame; + final negative = frames < 0; + frames = frames.abs(); + if (dropFrame) { + final skippedPerMinute = framesPerSecond ~/ 30 * 2; + final tenMinutes = framesPerSecond * 600 - skippedPerMinute * 9; + final remaining = frames % tenMinutes; + frames += skippedPerMinute * 9 * (frames ~/ tenMinutes); + if (remaining >= skippedPerMinute) { + frames += + skippedPerMinute * + ((remaining - skippedPerMinute) ~/ + (framesPerSecond * 60 - skippedPerMinute)); + } + } + final seconds = frames ~/ framesPerSecond; + final hours = (seconds ~/ 3600).toString().padLeft(2, '0'); + final minutes = (seconds ~/ 60 % 60).toString().padLeft(2, '0'); + final remainder = (seconds % 60).toString().padLeft(2, '0'); + final frameWidth = math.max(2, (framesPerSecond - 1).toString().length); + final frame = (frames % framesPerSecond).toString().padLeft( + frameWidth, + '0', + ); + final separator = dropFrame ? ';' : ':'; + return '${negative ? '-' : ''}$hours:$minutes:$remainder$separator$frame'; + } +} diff --git a/packages/cutdex_timeline_ui/lib/src/timeline_scrollbars.dart b/packages/cutdex_timeline_ui/lib/src/timeline_scrollbars.dart new file mode 100644 index 0000000..e41672b --- /dev/null +++ b/packages/cutdex_timeline_ui/lib/src/timeline_scrollbars.dart @@ -0,0 +1,323 @@ +import 'dart:async'; +import 'dart:math' as math; + +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:flutter/widgets.dart'; +import 'package:flutter/material.dart' show ScrollbarTheme; + +import 'timeline_theme.dart'; +import 'timeline_view_controller.dart'; + +/// Transparent overlay controls that never change the content viewport. +final class TimelineScrollbars extends StatelessWidget { + const TimelineScrollbars({ + required this.controller, + required this.viewport, + required this.horizontal, + required this.vertical, + required this.end, + required this.top, + required this.bottom, + required this.thickness, + required this.child, + super.key, + }); + + final TimelineViewController controller; + final TimelineViewportRect viewport; + final bool horizontal, vertical; + final int end; + final double top, bottom, thickness; + final Widget child; + + @override + Widget build(BuildContext context) { + final theme = TimelineThemeData.of(context); + return Stack( + fit: StackFit.expand, + children: [ + Positioned( + left: 0, + top: 0, + width: viewport.width, + height: viewport.height, + child: child, + ), + if (horizontal) + Positioned( + left: 0, + top: viewport.height - thickness, + width: math.max(0.0, viewport.width - (vertical ? thickness : 0)), + height: thickness, + child: _CameraScrollbar( + key: const ValueKey('timeline-horizontal-scrollbar'), + controller: controller, + axis: Axis.horizontal, + viewport: viewport, + minimum: controller.camera.screenXForTick(0, viewport), + maximum: controller.camera.screenXForTick(end, viewport), + theme: theme, + ), + ), + if (vertical) + Positioned( + left: viewport.width - thickness, + top: 0, + width: thickness, + height: math.max( + 0.0, + viewport.height - (horizontal ? thickness : 0), + ), + child: _CameraScrollbar( + key: const ValueKey('timeline-vertical-scrollbar'), + controller: controller, + axis: Axis.vertical, + viewport: viewport, + minimum: top - controller.camera.verticalOffset, + maximum: bottom - controller.camera.verticalOffset, + theme: theme, + ), + ), + ], + ); + } +} + +final class _CameraScrollbar extends StatefulWidget { + const _CameraScrollbar({ + super.key, + required this.controller, + required this.axis, + required this.viewport, + required this.minimum, + required this.maximum, + required this.theme, + }); + final TimelineViewController controller; + final Axis axis; + final TimelineViewportRect viewport; + final double minimum, maximum; + final TimelineThemeData theme; + + @override + State<_CameraScrollbar> createState() => _CameraScrollbarState(); +} + +final class _CameraScrollbarState extends State<_CameraScrollbar> { + ({ + TimelineCamera camera, + LayoutVersion version, + double pointer, + TimelineViewportGeometry geometry, + Object storyline, + double thumb, + double offset, + double travel, + double range, + })? + _drag; + bool _hovered = false; + bool _recentlyScrolled = false; + Timer? _fadeTimer; + late TimelineCamera _lastCamera; + + @override + void initState() { + super.initState(); + _lastCamera = widget.controller.camera; + } + + @override + void dispose() { + _fadeTimer?.cancel(); + super.dispose(); + } + + double _dragOffset = 0; + TimelineCamera? _expectedCamera; + double _coordinate(Offset point) => + widget.axis == Axis.horizontal ? point.dx : point.dy; + double get _viewportLength => widget.axis == Axis.horizontal + ? widget.viewport.width + : widget.viewport.height; + + @override + void didUpdateWidget(_CameraScrollbar oldWidget) { + super.didUpdateWidget(oldWidget); + final camera = widget.controller.camera; + if (!identical(camera, _lastCamera)) { + _lastCamera = camera; + _recentlyScrolled = true; + _fadeTimer?.cancel(); + _fadeTimer = Timer(const Duration(milliseconds: 900), () { + if (mounted) setState(() => _recentlyScrolled = false); + }); + } + if (widget.controller.isDragging) _drag = null; + if (oldWidget.controller != widget.controller || + oldWidget.axis != widget.axis || + oldWidget.viewport.width != widget.viewport.width || + oldWidget.viewport.height != widget.viewport.height || + (_drag != null && + (!identical(_drag!.version, widget.controller.version) || + _drag!.geometry != widget.controller.geometry || + _drag!.storyline != widget.controller.storyline || + !identical(_expectedCamera, widget.controller.camera) || + _drag!.camera.pixelsPerTick != + widget.controller.camera.pixelsPerTick))) { + _drag = null; + } + } + + void _pan(TimelineCamera camera, double delta) => widget.controller.setCamera( + camera.panBy( + horizontalPixels: widget.axis == Axis.horizontal ? delta : 0, + verticalPixels: widget.axis == Axis.vertical ? delta : 0, + ), + ); + + void _updateDrag(Offset position) { + final drag = _drag; + if (drag == null) return; + final c = widget.controller; + if (!identical(drag.version, c.version) || + !identical(_expectedCamera, c.camera) || + drag.geometry != c.geometry || + drag.storyline != c.storyline) { + setState(() => _drag = null); + return; + } + final next = (drag.offset + _coordinate(position) - drag.pointer).clamp( + 0.0, + drag.travel, + ); + _dragOffset = next; + _pan(drag.camera, (next - drag.offset) / drag.travel * drag.range); + _expectedCamera = c.camera; + } + + @override + Widget build(BuildContext context) => LayoutBuilder( + builder: (context, box) { + final length = widget.axis == Axis.horizontal + ? box.maxWidth + : box.maxHeight; + final low = math.min(0.0, widget.minimum); + final high = math.max(0.0, widget.maximum - _viewportLength); + final range = high - low; + final thumb = + _drag?.thumb ?? + (length <= 0 + ? 0.0 + : (length * _viewportLength / (_viewportLength + range)).clamp( + math.min(24.0, length), + length, + )); + final travel = math.max(0.0, length - thumb); + final offset = _drag != null + ? _dragOffset + : (range == 0 ? 0.0 : -low / range * travel); + void page(double direction) { + final delta = (direction * _viewportLength * 0.9).clamp(low, high); + _pan(widget.controller.camera, delta); + } + + return IgnorePointer( + ignoring: widget.controller.isDragging, + child: ExcludeSemantics( + excluding: widget.controller.isDragging, + child: MouseRegion( + onEnter: (_) => setState(() => _hovered = true), + onExit: (_) => setState(() => _hovered = false), + child: AnimatedOpacity( + duration: const Duration(milliseconds: 160), + opacity: widget.controller.isDragging + ? 0 + : _hovered || _recentlyScrolled || _drag != null + ? 1 + : 0.25, + child: Semantics( + label: widget.axis == Axis.horizontal + ? 'Timeline horizontal scroll' + : 'Timeline vertical scroll', + onIncrease: range == 0 ? null : () => page(1), + onDecrease: range == 0 ? null : () => page(-1), + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTapUp: (details) { + setState(() => _drag = null); + final point = _coordinate(details.localPosition); + if (point < offset) page(-1); + if (point > offset + thumb) page(1); + }, + // Down records the grab point before gesture slop is consumed. + onPanDown: (details) { + final point = _coordinate(details.localPosition); + if (range == 0 || + travel == 0 || + point < offset || + point > offset + thumb) { + return; + } + widget.controller.cancelDrag(); + _dragOffset = offset; + _expectedCamera = widget.controller.camera; + setState( + () => _drag = ( + camera: widget.controller.camera, + version: widget.controller.version, + geometry: widget.controller.geometry, + storyline: widget.controller.storyline, + thumb: thumb, + pointer: point, + offset: offset, + travel: travel, + range: range, + ), + ); + }, + onPanStart: (details) => _updateDrag(details.localPosition), + onPanUpdate: (details) => _updateDrag(details.localPosition), + onPanEnd: (_) => setState(() => _drag = null), + onPanCancel: () => setState(() => _drag = null), + child: Stack( + children: [ + Positioned( + left: widget.axis == Axis.horizontal + ? offset + : math.max(0.0, box.maxWidth - 8), + top: widget.axis == Axis.vertical + ? offset + : math.max(0.0, box.maxHeight - 8), + width: widget.axis == Axis.horizontal + ? thumb + : math.min(6.0, box.maxWidth), + height: widget.axis == Axis.vertical + ? thumb + : math.min(6.0, box.maxHeight), + child: DecoratedBox( + key: ValueKey('timeline-${widget.axis.name}-thumb'), + decoration: BoxDecoration( + color: + ScrollbarTheme.of(context).thumbColor?.resolve({ + if (_hovered) WidgetState.hovered, + if (_drag != null) WidgetState.dragged, + }) ?? + widget.theme.scrollbarThumbColor, + borderRadius: BorderRadius.circular( + widget.theme.scrollbarThickness / 2, + ), + ), + ), + ), + ], + ), + ), + ), + ), + ), + ), + ); + }, + ); +} diff --git a/packages/cutdex_timeline_ui/lib/src/timeline_theme.dart b/packages/cutdex_timeline_ui/lib/src/timeline_theme.dart new file mode 100644 index 0000000..4f83a42 --- /dev/null +++ b/packages/cutdex_timeline_ui/lib/src/timeline_theme.dart @@ -0,0 +1,501 @@ +import 'dart:ui' as ui; + +import 'package:flutter/material.dart'; + +/// Visual tokens shared by every timeline painter and viewport overlay. +/// +/// Install this extension in [ThemeData.extensions] for an application-wide +/// theme. Individual timeline surfaces may override it without introducing a +/// second styling model. +@immutable +final class TimelineThemeData extends ThemeExtension { + const TimelineThemeData({ + required this.backgroundColor, + this.primaryLaneBackgroundColor = const Color(0xff202328), + required this.visualClipColor, + required this.audioClipColor, + required this.audioAccentColor, + required this.gapColor, + required this.gapBorderColor, + required this.containerAccentColor, + required this.transitionColor, + required this.connectionLineColor, + required this.clipBorderColor, + required this.selectionOutlineColor, + this.keyframeColor = const Color(0xffa3a3a3), + this.keyframeBorderColor = const Color(0xff171717), + this.keyframeInvalidColor = const Color(0xffff6467), + required this.disabledOverlayColor, + required this.clipCornerRadius, + required this.clipBorderWidth, + required this.selectionOutlineWidth, + required this.audioAccentWidth, + required this.containerAccentWidth, + required this.transitionStrokeWidth, + required this.connectionLineWidth, + this.dragGhostOpacity = 1, + this.outsideSourceRangeOverlayColor = const Color(0x88000000), + this.trimHandleWidth = 2, + this.trimHitExtent = 6, + this.clipHeaderHeight = 18, + this.clipHeaderPadding = 2, + this.clipNameTextStyle = const TextStyle( + color: Color(0xffffffff), + fontSize: 11, + ), + this.rulerHeight = 32, + this.rulerBackgroundColor = const Color(0xff202328), + this.rulerTickColor = const Color(0xff7d8694), + this.rulerTextStyle = const TextStyle( + color: Color(0xffc8cdd5), + fontSize: 11, + ), + this.playheadColor = const Color(0xffef6558), + this.playheadWidth = 1, + this.scrollbarThickness = 12, + this.scrollbarTrackColor = const Color(0xff202328), + this.scrollbarThumbColor = const Color(0xff707986), + }) : assert(trimHandleWidth >= 0 && trimHandleWidth < double.infinity), + assert(trimHitExtent >= 0 && trimHitExtent < double.infinity), + assert(clipHeaderHeight > 0 && clipHeaderHeight < double.infinity), + assert(clipHeaderPadding >= 0 && clipHeaderPadding < double.infinity), + assert(clipCornerRadius >= 0), + assert(clipBorderWidth >= 0), + assert(selectionOutlineWidth >= 0), + assert(audioAccentWidth >= 0), + assert(containerAccentWidth >= 0), + assert(transitionStrokeWidth >= 0), + assert(connectionLineWidth >= 0), + assert(dragGhostOpacity >= 0 && dragGhostOpacity <= 1), + assert(rulerHeight > 0), + assert(playheadWidth >= 0), + assert(scrollbarThickness >= 4 && scrollbarThickness < double.infinity); + + const TimelineThemeData.dark() + : backgroundColor = const Color(0xff15171a), + primaryLaneBackgroundColor = const Color(0xff202328), + visualClipColor = const Color(0xff4e82d8), + audioClipColor = const Color(0xff3f9068), + audioAccentColor = const Color(0xff8dd7ae), + gapColor = const Color(0xff404040), + gapBorderColor = const Color(0xff656b75), + containerAccentColor = const Color(0xffb9d1fa), + transitionColor = const Color(0xccd0a84b), + connectionLineColor = const Color(0xff202b3f), + clipBorderColor = const Color(0x66000000), + selectionOutlineColor = const Color(0xffffffff), + keyframeColor = const Color(0xffa3a3a3), + keyframeBorderColor = const Color(0xff171717), + keyframeInvalidColor = const Color(0xffff6467), + disabledOverlayColor = const Color(0x66000000), + outsideSourceRangeOverlayColor = const Color(0x88000000), + clipCornerRadius = 3, + clipBorderWidth = 1, + selectionOutlineWidth = 2, + audioAccentWidth = 1, + containerAccentWidth = 2, + transitionStrokeWidth = 1, + connectionLineWidth = 3, + dragGhostOpacity = 1, + trimHandleWidth = 2, + trimHitExtent = 6, + clipHeaderHeight = 18, + clipHeaderPadding = 2, + clipNameTextStyle = const TextStyle( + color: Color(0xffffffff), + fontSize: 11, + ), + rulerHeight = 32, + rulerBackgroundColor = const Color(0xff202328), + rulerTickColor = const Color(0xff7d8694), + rulerTextStyle = const TextStyle(color: Color(0xffc8cdd5), fontSize: 11), + playheadColor = const Color(0xffef6558), + playheadWidth = 1, + scrollbarThickness = 12, + scrollbarTrackColor = const Color(0xff202328), + scrollbarThumbColor = const Color(0xff707986); + + final Color backgroundColor; + final Color primaryLaneBackgroundColor; + final Color visualClipColor; + final Color audioClipColor; + final Color audioAccentColor; + final Color gapColor; + final Color gapBorderColor; + final Color containerAccentColor; + final Color transitionColor; + final Color connectionLineColor; + final Color clipBorderColor; + final Color selectionOutlineColor; + final Color keyframeColor; + final Color keyframeBorderColor; + final Color keyframeInvalidColor; + final Color disabledOverlayColor; + + /// Dims content outside the opened compound's declared source envelope. + /// Selection and hit testing remain unchanged. + final Color outsideSourceRangeOverlayColor; + final double clipCornerRadius; + final double clipBorderWidth; + final double selectionOutlineWidth; + final double audioAccentWidth; + final double containerAccentWidth; + final double transitionStrokeWidth; + final double connectionLineWidth; + final double dragGhostOpacity; + + /// Stroke width of the open rounded edge shown during a trim gesture. + final double trimHandleWidth; + + /// Inner hit band in logical pixels; zero disables edge gestures. + final double trimHitExtent; + + /// Header lives inside the existing clip rectangle; it never changes lanes. + final double clipHeaderHeight; + final double clipHeaderPadding; + final TextStyle clipNameTextStyle; + final double rulerHeight; + final Color rulerBackgroundColor; + final Color rulerTickColor; + final TextStyle rulerTextStyle; + final Color playheadColor; + final double playheadWidth; + final double scrollbarThickness; + final Color scrollbarTrackColor; + final Color scrollbarThumbColor; + + /// Resolves the nearest Flutter theme, falling back to the built-in dark + /// timeline palette when the host application does not install one. + static TimelineThemeData of(BuildContext context) => + Theme.of(context).extension() ?? + const TimelineThemeData.dark(); + + @override + TimelineThemeData copyWith({ + Color? backgroundColor, + Color? primaryLaneBackgroundColor, + Color? visualClipColor, + Color? audioClipColor, + Color? audioAccentColor, + Color? gapColor, + Color? gapBorderColor, + Color? containerAccentColor, + Color? transitionColor, + Color? connectionLineColor, + Color? clipBorderColor, + Color? selectionOutlineColor, + Color? keyframeColor, + Color? keyframeBorderColor, + Color? keyframeInvalidColor, + Color? disabledOverlayColor, + Color? outsideSourceRangeOverlayColor, + double? clipCornerRadius, + double? clipBorderWidth, + double? selectionOutlineWidth, + double? audioAccentWidth, + double? containerAccentWidth, + double? transitionStrokeWidth, + double? connectionLineWidth, + double? dragGhostOpacity, + double? trimHandleWidth, + double? trimHitExtent, + double? clipHeaderHeight, + double? clipHeaderPadding, + TextStyle? clipNameTextStyle, + double? rulerHeight, + Color? rulerBackgroundColor, + Color? rulerTickColor, + TextStyle? rulerTextStyle, + Color? playheadColor, + double? playheadWidth, + double? scrollbarThickness, + Color? scrollbarTrackColor, + Color? scrollbarThumbColor, + }) => TimelineThemeData( + backgroundColor: backgroundColor ?? this.backgroundColor, + primaryLaneBackgroundColor: + primaryLaneBackgroundColor ?? this.primaryLaneBackgroundColor, + visualClipColor: visualClipColor ?? this.visualClipColor, + audioClipColor: audioClipColor ?? this.audioClipColor, + audioAccentColor: audioAccentColor ?? this.audioAccentColor, + gapColor: gapColor ?? this.gapColor, + gapBorderColor: gapBorderColor ?? this.gapBorderColor, + containerAccentColor: containerAccentColor ?? this.containerAccentColor, + transitionColor: transitionColor ?? this.transitionColor, + connectionLineColor: connectionLineColor ?? this.connectionLineColor, + clipBorderColor: clipBorderColor ?? this.clipBorderColor, + selectionOutlineColor: selectionOutlineColor ?? this.selectionOutlineColor, + keyframeColor: keyframeColor ?? this.keyframeColor, + keyframeBorderColor: keyframeBorderColor ?? this.keyframeBorderColor, + keyframeInvalidColor: keyframeInvalidColor ?? this.keyframeInvalidColor, + disabledOverlayColor: disabledOverlayColor ?? this.disabledOverlayColor, + outsideSourceRangeOverlayColor: + outsideSourceRangeOverlayColor ?? this.outsideSourceRangeOverlayColor, + clipCornerRadius: clipCornerRadius ?? this.clipCornerRadius, + clipBorderWidth: clipBorderWidth ?? this.clipBorderWidth, + selectionOutlineWidth: selectionOutlineWidth ?? this.selectionOutlineWidth, + audioAccentWidth: audioAccentWidth ?? this.audioAccentWidth, + containerAccentWidth: containerAccentWidth ?? this.containerAccentWidth, + transitionStrokeWidth: transitionStrokeWidth ?? this.transitionStrokeWidth, + connectionLineWidth: connectionLineWidth ?? this.connectionLineWidth, + dragGhostOpacity: dragGhostOpacity ?? this.dragGhostOpacity, + trimHandleWidth: trimHandleWidth ?? this.trimHandleWidth, + trimHitExtent: trimHitExtent ?? this.trimHitExtent, + clipHeaderHeight: clipHeaderHeight ?? this.clipHeaderHeight, + clipHeaderPadding: clipHeaderPadding ?? this.clipHeaderPadding, + clipNameTextStyle: clipNameTextStyle ?? this.clipNameTextStyle, + rulerHeight: rulerHeight ?? this.rulerHeight, + rulerBackgroundColor: rulerBackgroundColor ?? this.rulerBackgroundColor, + rulerTickColor: rulerTickColor ?? this.rulerTickColor, + rulerTextStyle: rulerTextStyle ?? this.rulerTextStyle, + playheadColor: playheadColor ?? this.playheadColor, + playheadWidth: playheadWidth ?? this.playheadWidth, + scrollbarThickness: scrollbarThickness ?? this.scrollbarThickness, + scrollbarTrackColor: scrollbarTrackColor ?? this.scrollbarTrackColor, + scrollbarThumbColor: scrollbarThumbColor ?? this.scrollbarThumbColor, + ); + + @override + TimelineThemeData lerp(covariant TimelineThemeData? other, double t) { + if (other == null) return this; + if (t == 0) return this; + if (t == 1) return other; + return TimelineThemeData( + clipHeaderHeight: ui.lerpDouble( + clipHeaderHeight, + other.clipHeaderHeight, + t, + )!, + clipHeaderPadding: ui.lerpDouble( + clipHeaderPadding, + other.clipHeaderPadding, + t, + )!, + clipNameTextStyle: TextStyle.lerp( + clipNameTextStyle, + other.clipNameTextStyle, + t, + )!, + outsideSourceRangeOverlayColor: Color.lerp( + outsideSourceRangeOverlayColor, + other.outsideSourceRangeOverlayColor, + t, + )!, + trimHandleWidth: ui.lerpDouble( + trimHandleWidth, + other.trimHandleWidth, + t, + )!, + trimHitExtent: ui.lerpDouble(trimHitExtent, other.trimHitExtent, t)!, + backgroundColor: Color.lerp(backgroundColor, other.backgroundColor, t)!, + primaryLaneBackgroundColor: Color.lerp( + primaryLaneBackgroundColor, + other.primaryLaneBackgroundColor, + t, + )!, + visualClipColor: Color.lerp(visualClipColor, other.visualClipColor, t)!, + audioClipColor: Color.lerp(audioClipColor, other.audioClipColor, t)!, + audioAccentColor: Color.lerp( + audioAccentColor, + other.audioAccentColor, + t, + )!, + gapColor: Color.lerp(gapColor, other.gapColor, t)!, + gapBorderColor: Color.lerp(gapBorderColor, other.gapBorderColor, t)!, + containerAccentColor: Color.lerp( + containerAccentColor, + other.containerAccentColor, + t, + )!, + transitionColor: Color.lerp(transitionColor, other.transitionColor, t)!, + connectionLineColor: Color.lerp( + connectionLineColor, + other.connectionLineColor, + t, + )!, + clipBorderColor: Color.lerp(clipBorderColor, other.clipBorderColor, t)!, + selectionOutlineColor: Color.lerp( + selectionOutlineColor, + other.selectionOutlineColor, + t, + )!, + keyframeColor: Color.lerp(keyframeColor, other.keyframeColor, t)!, + keyframeBorderColor: Color.lerp( + keyframeBorderColor, + other.keyframeBorderColor, + t, + )!, + keyframeInvalidColor: Color.lerp( + keyframeInvalidColor, + other.keyframeInvalidColor, + t, + )!, + disabledOverlayColor: Color.lerp( + disabledOverlayColor, + other.disabledOverlayColor, + t, + )!, + clipCornerRadius: ui.lerpDouble( + clipCornerRadius, + other.clipCornerRadius, + t, + )!, + clipBorderWidth: ui.lerpDouble( + clipBorderWidth, + other.clipBorderWidth, + t, + )!, + selectionOutlineWidth: ui.lerpDouble( + selectionOutlineWidth, + other.selectionOutlineWidth, + t, + )!, + audioAccentWidth: ui.lerpDouble( + audioAccentWidth, + other.audioAccentWidth, + t, + )!, + containerAccentWidth: ui.lerpDouble( + containerAccentWidth, + other.containerAccentWidth, + t, + )!, + transitionStrokeWidth: ui.lerpDouble( + transitionStrokeWidth, + other.transitionStrokeWidth, + t, + )!, + connectionLineWidth: ui.lerpDouble( + connectionLineWidth, + other.connectionLineWidth, + t, + )!, + dragGhostOpacity: ui.lerpDouble( + dragGhostOpacity, + other.dragGhostOpacity, + t, + )!, + rulerHeight: ui.lerpDouble(rulerHeight, other.rulerHeight, t)!, + rulerBackgroundColor: Color.lerp( + rulerBackgroundColor, + other.rulerBackgroundColor, + t, + )!, + rulerTickColor: Color.lerp(rulerTickColor, other.rulerTickColor, t)!, + rulerTextStyle: TextStyle.lerp(rulerTextStyle, other.rulerTextStyle, t)!, + playheadColor: Color.lerp(playheadColor, other.playheadColor, t)!, + playheadWidth: ui.lerpDouble(playheadWidth, other.playheadWidth, t)!, + scrollbarThickness: ui.lerpDouble( + scrollbarThickness, + other.scrollbarThickness, + t, + )!, + scrollbarTrackColor: Color.lerp( + scrollbarTrackColor, + other.scrollbarTrackColor, + t, + )!, + scrollbarThumbColor: Color.lerp( + scrollbarThumbColor, + other.scrollbarThumbColor, + t, + )!, + ); + } + + @override + bool operator ==(Object other) => + identical(this, other) || + other is TimelineThemeData && + backgroundColor == other.backgroundColor && + primaryLaneBackgroundColor == other.primaryLaneBackgroundColor && + visualClipColor == other.visualClipColor && + audioClipColor == other.audioClipColor && + audioAccentColor == other.audioAccentColor && + gapColor == other.gapColor && + gapBorderColor == other.gapBorderColor && + containerAccentColor == other.containerAccentColor && + transitionColor == other.transitionColor && + connectionLineColor == other.connectionLineColor && + clipBorderColor == other.clipBorderColor && + selectionOutlineColor == other.selectionOutlineColor && + keyframeColor == other.keyframeColor && + keyframeBorderColor == other.keyframeBorderColor && + keyframeInvalidColor == other.keyframeInvalidColor && + disabledOverlayColor == other.disabledOverlayColor && + outsideSourceRangeOverlayColor == + other.outsideSourceRangeOverlayColor && + clipCornerRadius == other.clipCornerRadius && + clipBorderWidth == other.clipBorderWidth && + selectionOutlineWidth == other.selectionOutlineWidth && + audioAccentWidth == other.audioAccentWidth && + containerAccentWidth == other.containerAccentWidth && + transitionStrokeWidth == other.transitionStrokeWidth && + connectionLineWidth == other.connectionLineWidth && + dragGhostOpacity == other.dragGhostOpacity && + trimHandleWidth == other.trimHandleWidth && + trimHitExtent == other.trimHitExtent && + clipHeaderHeight == other.clipHeaderHeight && + clipHeaderPadding == other.clipHeaderPadding && + clipNameTextStyle == other.clipNameTextStyle && + rulerHeight == other.rulerHeight && + rulerBackgroundColor == other.rulerBackgroundColor && + rulerTickColor == other.rulerTickColor && + rulerTextStyle == other.rulerTextStyle && + playheadColor == other.playheadColor && + playheadWidth == other.playheadWidth && + scrollbarThickness == other.scrollbarThickness && + scrollbarTrackColor == other.scrollbarTrackColor && + scrollbarThumbColor == other.scrollbarThumbColor; + + @override + int get hashCode => Object.hash( + clipHeaderHeight, + clipHeaderPadding, + clipNameTextStyle, + trimHandleWidth, + trimHitExtent, + scrollbarThickness, + scrollbarTrackColor, + scrollbarThumbColor, + Object.hash( + rulerHeight, + rulerBackgroundColor, + rulerTickColor, + rulerTextStyle, + playheadColor, + playheadWidth, + ), + Object.hash( + backgroundColor, + primaryLaneBackgroundColor, + visualClipColor, + audioClipColor, + audioAccentColor, + gapColor, + gapBorderColor, + containerAccentColor, + transitionColor, + connectionLineColor, + clipBorderColor, + ), + Object.hash( + Object.hash( + selectionOutlineColor, + keyframeColor, + keyframeBorderColor, + keyframeInvalidColor, + ), + disabledOverlayColor, + outsideSourceRangeOverlayColor, + clipCornerRadius, + clipBorderWidth, + selectionOutlineWidth, + audioAccentWidth, + containerAccentWidth, + transitionStrokeWidth, + connectionLineWidth, + dragGhostOpacity, + ), + ); +} diff --git a/packages/cutdex_timeline_ui/lib/src/timeline_thumbnails.dart b/packages/cutdex_timeline_ui/lib/src/timeline_thumbnails.dart new file mode 100644 index 0000000..96cc55b --- /dev/null +++ b/packages/cutdex_timeline_ui/lib/src/timeline_thumbnails.dart @@ -0,0 +1,34 @@ +import 'dart:ui' as ui; + +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:flutter/foundation.dart'; + +/// Host-owned decoded frames. Each instance serves one timeline surface. +/// +/// Painting only looks up images and declares demand. Implementations schedule +/// asynchronous work after painting, notify when frames are ready, bound memory, +/// and dispose their images. Source ticks come from the authoritative Kernel. +abstract class TimelineThumbnails implements Listenable { + void beginFrame(); + + /// The source display aspect ratio when known. Returning null keeps the + /// surface on a temporary 16:9 layout until media metadata is available. + double? aspectRatioFor(ElementRecord element); + + /// Returns the best decoded frame currently available and declares the + /// resolution needed by this paint. Implementations may return a lower + /// resolution or nearby-time fallback while asynchronously loading the + /// requested one. [sourceSpanTicks] is the approximate source-time coverage + /// of the complete tile and lets the host select a stable sampling pyramid + /// level. Cropping a tile at an edit boundary retains its center and span; + /// samples are bounded by the media asset rather than the edit window. + ui.Image? imageFor( + ElementRecord element, + int sourceTick, { + required int sourceSpanTicks, + required ui.Size logicalSize, + required double devicePixelRatio, + }); + + void endFrame(); +} diff --git a/packages/cutdex_timeline_ui/lib/src/timeline_view.dart b/packages/cutdex_timeline_ui/lib/src/timeline_view.dart new file mode 100644 index 0000000..eac902d --- /dev/null +++ b/packages/cutdex_timeline_ui/lib/src/timeline_view.dart @@ -0,0 +1,1159 @@ +import 'dart:math' as math; +import 'dart:ui' as ui; + +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:flutter/foundation.dart' show precisionErrorTolerance; +import 'package:flutter/widgets.dart'; + +import 'timeline_theme.dart'; +import 'timeline_clip_layout.dart'; +import 'timeline_viewport.dart'; +import 'timeline_keyframes.dart'; +import 'timeline_thumbnails.dart'; +import 'timeline_waveforms.dart'; +import 'timeline_view_controller.dart'; + +/// Safe default matching Layout's rule that unknown content is non-audio. +LayoutMediaLeafClass classifyTimelineContentAsNonAudio(ElementRecord _) => + LayoutMediaLeafClass.nonAudio; + +typedef TimelineClipHeaderPainter = + void Function( + Canvas canvas, + TimelineClipLayout layout, + ElementRecord clip, + double pixelsPerTick, + ); + +enum _TimelinePrimitiveKind { visual, audio, gap, container, transition } + +/// A viewport-only timeline surface backed by one bulk [CustomPainter]. +/// +/// No widget is created per clip. Painting consumes Layout's transient +/// structure-of-arrays frame directly and is therefore proportional to the +/// resident viewport population rather than the whole project. +final class TimelineView extends StatefulWidget { + const TimelineView({ + required this.controller, + this.theme, + this.thumbnails, + this.waveforms, + this.showKeyframes = false, + this.classifyContent = classifyTimelineContentAsNonAudio, + this.contentStatus, + this.contentTitle, + this.contentStatusChanges, + this.overlay, + this.paintClipHeader, + super.key, + }); + + final TimelineViewController controller; + final TimelineThumbnails? thumbnails; + final TimelineWaveforms? waveforms; + + /// Draw merged parameter-key markers inside each clip without adding hit targets. + final bool showKeyframes; + + /// Optional surface-local override of the nearest [TimelineThemeData]. + final TimelineThemeData? theme; + + /// The same pure, `O(1)` classifier used to build Layout's media index. + /// It is called only for opaque Primary content; connected content uses + /// Layout's already resolved [LayoutPlacementClass]. + final LayoutMediaClassifier classifyContent; + + /// Transient host diagnostics; never changes the authoritative clip name. + final String? Function(ElementRecord)? contentStatus; + final String? Function(ElementRecord)? contentTitle; + final Listenable? contentStatusChanges; + + /// Transparent hit targets for content painted by [paintClipHeader]. + final Widget? overlay; + + /// Paints each clip's reserved header with that clip, before its outlines. + final TimelineClipHeaderPainter? paintClipHeader; + + @override + State createState() => _TimelineViewState(); +} + +typedef _LabelKey = ({ + String text, + TextStyle style, + TextDirection direction, + TextScaler scaler, + Locale? locale, +}); + +final class _TimelineViewState extends State { + final _labels = <_LabelKey, TextPainter>{}; + + @override + void dispose() { + for (final label in _labels.values) { + label.dispose(); + } + super.dispose(); + } + + @override + Widget build(BuildContext context) { + final TimelineView( + :controller, + :theme, + :thumbnails, + :waveforms, + :showKeyframes, + :classifyContent, + :contentStatus, + :contentTitle, + :contentStatusChanges, + :overlay, + :paintClipHeader, + ) = widget; + final resolvedTheme = theme ?? TimelineThemeData.of(context); + final devicePixelRatio = + MediaQuery.maybeOf(context)?.devicePixelRatio ?? + View.of(context).devicePixelRatio; + final painter = _TimelinePainter( + labels: _labels, + controller: controller, + theme: resolvedTheme, + thumbnails: thumbnails, + waveforms: waveforms, + showKeyframes: showKeyframes, + showPlayhead: + context.findAncestorWidgetOfExactType() == null, + classifyContent: classifyContent, + contentStatus: contentStatus, + contentTitle: contentTitle, + contentStatusChanges: contentStatusChanges, + textDirection: Directionality.maybeOf(context) ?? TextDirection.ltr, + textScaler: MediaQuery.textScalerOf(context), + locale: Localizations.maybeLocaleOf(context), + devicePixelRatio: devicePixelRatio, + paintClipHeader: paintClipHeader, + ); + return RepaintBoundary( + child: SizedBox.expand( + child: CustomPaint(painter: painter, child: overlay), + ), + ); + } +} + +final class _TimelinePainter extends CustomPainter { + _TimelinePainter({ + required this.labels, + required this.controller, + required this.theme, + required this.classifyContent, + required this.contentStatus, + required this.contentTitle, + required this.contentStatusChanges, + required this.textDirection, + required this.textScaler, + required this.locale, + required this.thumbnails, + required this.waveforms, + required this.showKeyframes, + required this.showPlayhead, + required this.devicePixelRatio, + required this.paintClipHeader, + }) : super( + repaint: Listenable.merge([ + showPlayhead + ? Listenable.merge([ + controller.contentChanges, + controller.playheadChanges, + ]) + : controller.contentChanges, + thumbnails, + waveforms, + contentStatusChanges, + ]), + ); + + final Map<_LabelKey, TextPainter> labels; + final TimelineThumbnails? thumbnails; + final TimelineWaveforms? waveforms; + final bool showKeyframes; + final bool showPlayhead; + final TimelineClipHeaderPainter? paintClipHeader; + + final TimelineViewController controller; + final TimelineThemeData theme; + final LayoutMediaClassifier classifyContent; + final String? Function(ElementRecord)? contentStatus; + final String? Function(ElementRecord)? contentTitle; + final Listenable? contentStatusChanges; + final TextDirection textDirection; + final TextScaler textScaler; + final Locale? locale; + final double devicePixelRatio; + + @override + void paint(Canvas canvas, Size size) { + final bounds = Offset.zero & size; + canvas.drawRect(bounds, Paint()..color = theme.backgroundColor); + thumbnails?.beginFrame(); + waveforms?.beginFrame(); + if (size.width <= 0 || size.height <= 0) { + thumbnails?.endFrame(); + waveforms?.endFrame(); + return; + } + + final frame = controller.project( + TimelineViewportRect(width: size.width, height: size.height), + ); + final query = frame.version.kernelVersion.query(); + final sourceRange = controller.effectiveSourceRange; + final sourceBounds = sourceRange == null + ? null + : ( + left: frame.camera.screenXForTick( + sourceRange.start, + frame.viewport, + ), + right: frame.camera.screenXForTick(sourceRange.end, frame.viewport), + ); + final fill = Paint()..isAntiAlias = true; + final stroke = Paint() + ..isAntiAlias = true + ..style = PaintingStyle.stroke; + canvas.save(); + canvas.clipRect(bounds); + final primaryTop = frame.camera.screenYForWorld( + controller.geometry.primaryLaneTop.toDouble(), + frame.viewport, + ); + canvas.drawRect( + Rect.fromLTWH( + 0, + primaryTop, + size.width, + controller.geometry.primaryLaneHeight.toDouble(), + ), + Paint()..color = theme.primaryLaneBackgroundColor, + ); + _paintConnectionLines(canvas, frame, query, stroke); + final reservations = []; + final selectedOutlines = <({Rect bounds, TimelineTrimEdge? edge})>[]; + for (var index = 0; index < frame.length; index++) { + final presentationBounds = controller.presentationBoundsAt(frame, index); + final left = presentationBounds.left; + final top = presentationBounds.top; + final width = presentationBounds.width; + final height = presentationBounds.height; + if (width <= 0 || height <= 0) continue; + final identity = frame.identityAt(index); + if (controller.isExpandedComponentOwner(identity)) continue; + final rect = TimelineClipLayout.insetBounds( + Rect.fromLTWH(left, top, width, height), + ); + if (!rect.overlaps(bounds)) continue; + if (_isHiddenLanding(identity)) continue; + if (identity is ElementHandle && + controller.dragGhostFor(LayoutBodyId.element(identity)) != null && + controller.retainsPrimaryDragReservation) { + reservations.add(rect); + continue; + } + final itemKind = frame.kindAt(index); + final handle = controller.elementForFrameItem(frame, index); + ElementRecord? element; + final _TimelinePrimitiveKind primitive; + if (itemKind == TimelineViewportItemKind.transition) { + primitive = _TimelinePrimitiveKind.transition; + } else { + if (handle == null) { + throw StateError('clip viewport item has no element identity'); + } + element = query.element(handle); + primitive = switch (element.structure) { + ElementStructure.gap => _TimelinePrimitiveKind.gap, + ElementStructure.container => _TimelinePrimitiveKind.container, + ElementStructure.content => + itemKind == TimelineViewportItemKind.connected + ? frame + .version + .scene + .bodies[frame.bodyAt(index)]! + .placementClass == + LayoutPlacementClass.audioOnly + ? _TimelinePrimitiveKind.audio + : _TimelinePrimitiveKind.visual + : switch (classifyContent(element)) { + LayoutMediaLeafClass.audioOnly => + _TimelinePrimitiveKind.audio, + LayoutMediaLeafClass.nonAudio => + _TimelinePrimitiveKind.visual, + LayoutMediaLeafClass.gap => throw StateError( + 'content classifier returned structural gap', + ), + }, + }; + } + _paintItem( + canvas, + rect, + Rect.fromLTWH(left, top, width, height), + primitive, + element, + fill, + stroke, + sourceBounds, + bounds, + query, + handle, + ); + if (controller.isSelected(identity)) { + final trimEdge = controller.trimOutlineEdgeFor(identity); + if (trimEdge == null) { + selectedOutlines.add((bounds: rect, edge: null)); + } else { + final layout = controller.clipLayoutAt(frame, index); + selectedOutlines.add(( + bounds: layout.toViewport(layout.bodyPaintBounds), + edge: trimEdge, + )); + } + } + } + // Only visible overlays are retained; never reorder authoritative bodies. + for (final rect in reservations) { + _paintSelectionOutline(canvas, rect, stroke); + } + for (final outline in selectedOutlines) { + if (outline.edge case final edge?) { + _paintTrimOutline(canvas, outline.bounds, edge); + } else { + _paintSelectionOutline(canvas, outline.bounds, stroke); + } + } + for (final ghost in controller.dragGhosts) { + final body = ghost.body; + final ghostBounds = controller.dragGhostBounds(ghost, frame.viewport); + final rect = TimelineClipLayout.insetBounds(ghostBounds); + final element = query.element(body.id.owner); + final primitive = switch (element.structure) { + ElementStructure.gap => _TimelinePrimitiveKind.gap, + ElementStructure.container => _TimelinePrimitiveKind.container, + ElementStructure.content => + body.placementClass == LayoutPlacementClass.audioOnly + ? _TimelinePrimitiveKind.audio + : _TimelinePrimitiveKind.visual, + }; + if (rect.overlaps(bounds)) { + if (theme.dragGhostOpacity < 1) { + canvas.saveLayer( + rect.inflate(theme.selectionOutlineWidth), + Paint() + ..color = Color.fromRGBO(255, 255, 255, theme.dragGhostOpacity), + ); + } + _paintItem( + canvas, + rect, + ghostBounds, + primitive, + element, + fill, + stroke, + sourceBounds, + bounds, + query, + body.id.context == null ? body.id.owner : null, + ); + if (theme.dragGhostOpacity < 1) canvas.restore(); + _paintSelectionOutline(canvas, rect, stroke); + } + } + _paintPlayhead(canvas, frame, size); + canvas.restore(); + thumbnails?.endFrame(); + waveforms?.endFrame(); + } + + void _paintPlayhead(Canvas canvas, TimelineViewportFrame frame, Size size) { + if (showPlayhead && theme.playheadWidth > 0) { + final x = frame.camera.screenXForTick( + controller.playheadTick, + frame.viewport, + ); + canvas.drawLine( + Offset(x, 0), + Offset(x, size.height), + Paint() + ..color = theme.playheadColor + ..strokeWidth = theme.playheadWidth, + ); + } + } + + void _paintItem( + Canvas canvas, + Rect rect, + Rect timelineRect, + _TimelinePrimitiveKind primitive, + ElementRecord? element, + Paint fill, + Paint stroke, + ({double left, double right})? sourceBounds, + Rect viewportBounds, + TimelineQuery query, + ElementHandle? handle, + ) { + final layout = controller.clipLayout( + timelineRect, + owner: primitive == _TimelinePrimitiveKind.transition ? null : handle, + nameHeight: theme.clipHeaderHeight, + audioOnly: primitive == _TimelinePrimitiveKind.audio, + hasVideoAudio: + primitive == _TimelinePrimitiveKind.visual && + element != null && + (waveforms?.hasAudioFor(element) ?? false), + ); + if (!layout.header.isEmpty && element != null && paintClipHeader != null) { + canvas.save(); + canvas.clipRect(layout.toViewport(layout.header).intersect(rect)); + paintClipHeader!( + canvas, + layout, + element, + controller.camera.pixelsPerTick, + ); + canvas.restore(); + } + rect = layout.toViewport(layout.bodyPaintBounds); + final shape = _clipShape(rect); + final radius = shape.tlRadiusX; + fill.color = switch (primitive) { + _TimelinePrimitiveKind.visual || + _TimelinePrimitiveKind.container => theme.visualClipColor, + _TimelinePrimitiveKind.audio => theme.audioClipColor, + _TimelinePrimitiveKind.gap => theme.gapColor, + _TimelinePrimitiveKind.transition => theme.transitionColor, + }; + canvas.drawRRect(shape, fill); + + if (primitive == _TimelinePrimitiveKind.visual && + element != null && + handle != null) { + _paintThumbnails( + canvas, + shape, + viewportBounds, + element, + query, + handle, + strip: layout.toViewport(layout.preview), + ); + if (!layout.waveformBackground.isEmpty) { + final strip = layout.toViewport(layout.waveformBackground); + canvas.save(); + canvas.clipRRect(shape); + canvas.drawRect(strip, Paint()..color = theme.audioClipColor); + canvas.restore(); + _paintWaveform( + canvas, + shape, + viewportBounds, + element, + query, + handle, + strip: layout.toViewport(layout.waveform), + ); + } + } + if (primitive == _TimelinePrimitiveKind.audio && + element != null && + handle != null && + waveforms != null) { + _paintWaveform( + canvas, + shape, + viewportBounds, + element, + query, + handle, + strip: layout.toViewport(layout.waveform), + ); + } + if (element != null) { + _paintHeader( + canvas, + shape, + layout.toViewport(layout.name), + viewportBounds, + element, + ); + if (showKeyframes && primitive != _TimelinePrimitiveKind.gap) { + _paintKeyframes(canvas, layout, shape, viewportBounds, element, handle); + } + } + + if (element != null && !element.enabled) { + fill.color = theme.disabledOverlayColor; + canvas.drawRRect(shape, fill); + } + + stroke + ..color = primitive == _TimelinePrimitiveKind.gap + ? theme.gapBorderColor + : theme.clipBorderColor + ..strokeWidth = theme.clipBorderWidth; + _paintInsideBorder(canvas, shape, stroke); + + switch (primitive) { + case _TimelinePrimitiveKind.audio: + if (waveforms != null) break; + stroke + ..color = theme.audioAccentColor + ..strokeWidth = theme.audioAccentWidth; + if (stroke.strokeWidth > 0) { + final centerY = rect.top + rect.height * 0.65; + canvas.drawLine( + Offset(rect.left + radius, centerY), + Offset(rect.right - radius, centerY), + stroke, + ); + } + break; + case _TimelinePrimitiveKind.container: + stroke + ..color = theme.containerAccentColor + ..strokeWidth = theme.containerAccentWidth; + if (stroke.strokeWidth > 0) { + final inset = math.min(rect.width / 4, radius + 2); + canvas.drawLine( + Offset(rect.left + inset, rect.top + stroke.strokeWidth), + Offset(rect.right - inset, rect.top + stroke.strokeWidth), + stroke, + ); + } + break; + case _TimelinePrimitiveKind.transition: + stroke + ..color = theme.containerAccentColor + ..strokeWidth = theme.transitionStrokeWidth; + if (stroke.strokeWidth > 0) { + canvas.drawLine(rect.topLeft, rect.bottomRight, stroke); + canvas.drawLine(rect.bottomLeft, rect.topRight, stroke); + } + break; + case _TimelinePrimitiveKind.visual: + case _TimelinePrimitiveKind.gap: + break; + } + + if (sourceBounds != null) { + canvas.save(); + canvas.clipRRect(shape); + fill.color = theme.outsideSourceRangeOverlayColor; + final leftEnd = math.min(rect.right, sourceBounds.left); + final rightStart = math.max(rect.left, sourceBounds.right); + if (leftEnd > rect.left) { + canvas.drawRect( + Rect.fromLTRB(rect.left, rect.top, leftEnd, rect.bottom), + fill, + ); + } + if (rightStart < rect.right) { + canvas.drawRect( + Rect.fromLTRB(rightStart, rect.top, rect.right, rect.bottom), + fill, + ); + } + canvas.restore(); + } + } + + void _paintKeyframes( + Canvas canvas, + TimelineClipLayout layout, + RRect shape, + Rect viewport, + ElementRecord element, + ElementHandle? handle, + ) { + const radius = 6.0; + final rect = layout.toViewport(layout.body); + if (element.duration <= 0 || + rect.height < theme.clipHeaderHeight + 14 || + rect.width < 2) { + return; + } + final visible = rect.intersect(viewport); + final ticksPerPixel = element.duration / rect.width; + final keys = timelineKeyframeOffsets( + element, + start: (visible.left - rect.left - radius) * ticksPerPixel, + end: (visible.right - rect.left + radius) * ticksPerPixel, + ); + if (keys.isEmpty) return; + canvas.save(); + canvas.clipRRect(shape); + final y = layout.bounds.top + layout.keyframeCenter.dy; + final fill = Paint(); + final outline = Paint() + ..color = theme.keyframeBorderColor + ..style = PaintingStyle.stroke + ..strokeWidth = 1; + double? previousX; + for (final tick in keys) { + final x = rect.left + tick / ticksPerPixel; + final selected = + controller.selectedKeyframe == (element: handle, offset: tick); + fill.color = selected + ? controller.dragRejection != null && controller.isDraggingKeyframe + ? theme.keyframeInvalidColor + : theme.selectionOutlineColor + : theme.keyframeColor; + // Dense keys share a pixel at low zoom; retain their data but paint once. + if (previousX != null && x - previousX < 1) continue; + previousX = x; + final diamond = Path() + ..moveTo(x, y - radius) + ..lineTo(x + radius, y) + ..lineTo(x, y + radius) + ..lineTo(x - radius, y) + ..close(); + canvas.drawPath(diamond, fill); + canvas.drawPath(diamond, outline); + } + canvas.restore(); + } + + void _paintWaveform( + Canvas canvas, + RRect shape, + Rect viewport, + ElementRecord element, + TimelineQuery query, + ElementHandle handle, { + required Rect strip, + }) { + if (element.duration <= 0) return; + final clip = shape.outerRect; + final visible = strip.intersect(viewport); + if (strip.isEmpty || visible.isEmpty) return; + final waveform = waveforms!.waveformFor(element); + if (waveform == null) return; + // Undo only the paint inset so sample positions stay on the time ruler. + final inset = math.min(1.0, clip.width / 2); + final timeLeft = clip.left - inset; + final timeWidth = clip.width + inset * 2; + const step = 2.0; + int sourceAt(double x) { + final offset = ((x - timeLeft) / timeWidth * element.duration) + .floor() + .clamp(0, element.duration); + return query.sourceTimeAt(handle, _sampleOffset(element, offset)); + } + + // Keep the raster phase fixed to source time. Camera movement and clip + // dragging then translate existing columns instead of choosing new buckets. + // Affine trims move the clip edge and source start by the same phase, so the + // retained waveform remains stationary too. + final sourceStart = sourceAt(timeLeft); + final sourceEnd = sourceAt(timeLeft + timeWidth); + final sourcePerPixel = (sourceEnd - sourceStart) / timeWidth; + final sourcePhase = sourcePerPixel == 0 || !sourcePerPixel.isFinite + ? 0.0 + : (sourceStart / sourcePerPixel) % step; + final gridLeft = timeLeft - sourcePhase; + final first = ((visible.left - gridLeft) / step).floor(); + final last = ((visible.right - gridLeft) / step).ceil(); + final paint = Paint() + ..color = theme.audioAccentColor + ..strokeWidth = 1 + ..isAntiAlias = false; + final baseline = strip.bottom; + final overloadPaint = Paint() + ..color = const Color(0xFFEF4444) + ..strokeWidth = 1 + ..isAntiAlias = false; + canvas.save(); + canvas.clipRRect(shape); + canvas.clipRect(visible); + for (var i = first; i < last; i++) { + final x = gridLeft + i * step; + final envelope = waveform.envelope(sourceAt(x), sourceAt(x + step)); + final peak = + math.max(envelope.minimum.abs(), envelope.maximum.abs()) * + waveform.amplitudeScale; + final height = math.min(strip.height, math.max(1.0, peak * strip.height)); + canvas.drawLine( + Offset(x + step / 2, baseline - height), + Offset(x + step / 2, baseline), + paint, + ); + if (peak > 1) { + canvas.drawLine( + Offset(x + step / 2, strip.top), + Offset(x + step / 2, strip.top + 2), + overloadPaint, + ); + } + } + canvas.restore(); + } + + void _paintThumbnails( + Canvas canvas, + RRect shape, + Rect viewport, + ElementRecord element, + TimelineQuery query, + ElementHandle handle, { + required Rect strip, + }) { + final source = thumbnails; + if (source == null || element.duration <= 0) return; + final clip = shape.outerRect; + final visible = strip.intersect(viewport); + if (visible.isEmpty || strip.height <= 0) return; + final reportedAspect = source.aspectRatioFor(element); + final aspect = + reportedAspect != null && reportedAspect.isFinite && reportedAspect > 0 + ? reportedAspect.clamp(0.05, 20.0) + : 16 / 9; + final tileWidth = math.max(1.0, strip.height * aspect); + final pixelsPerTick = controller.camera.pixelsPerTick; + final projectSpan = tileWidth / pixelsPerTick; + // Painting insets must not change the source-to-screen scale. + final timeLeft = + clip.left - math.min(1.0, element.duration * pixelsPerTick / 4); + final prefetch = []; + canvas.save(); + canvas.clipRRect(shape); + canvas.clipRect(visible); + + void paintSection({ + required int projectStart, + required int duration, + required int sourceStart, + required int sourceDelta, + }) { + final sectionLeft = timeLeft + projectStart * pixelsPerTick; + final section = strip.intersect( + Rect.fromLTWH( + sectionLeft, + strip.top, + duration * pixelsPerTick, + strip.height, + ), + ); + final sectionVisible = section.intersect(visible); + if (sectionVisible.isEmpty || + sectionVisible.width <= precisionErrorTolerance) { + return; + } + // Each affine section shares a source-time grid with its trimmed/split + // fragments. Partial cells keep their original center and full span; + // only painting is clipped at the current edit or speed boundary. + final anchorTick = sourceDelta == 0 + ? query.localContext(handle).start + projectStart.toDouble() + : sourceStart * (duration / sourceDelta); + final gridLeft = sectionLeft - anchorTick * pixelsPerTick; + final signedSourceSpan = projectSpan * (sourceDelta / duration); + final sourceSpanTicks = math.max(1, signedSourceSpan.abs().ceil()); + final clipFirst = ((section.left - gridLeft) / tileWidth).floor(); + final clipLast = ((section.right - gridLeft) / tileWidth).ceil(); + final first = math.max( + clipFirst, + ((sectionVisible.left - gridLeft) / tileWidth).floor(), + ); + final last = math.min( + clipLast, + ((sectionVisible.right - gridLeft) / tileWidth).ceil(), + ); + const prefetchTiles = 2; + final demandFirst = math.max(clipFirst, first - prefetchTiles); + final demandLast = math.min(clipLast, last + prefetchTiles); + + ({Rect tile, ui.Image? image}) demandTile(int i) { + var sourceTick = sourceDelta == 0 + ? sourceStart + : ((i + 0.5) * signedSourceSpan).round(); + // The edit window crops cells; only real media bounds clamp samples. + if (element.mediaStart case final start?) { + sourceTick = sourceTick.clamp( + start, + start + element.mediaDuration! - 1, + ); + } else { + sourceTick = math.max(0, sourceTick); + } + final tile = Rect.fromLTWH( + gridLeft + i * tileWidth, + strip.top, + tileWidth, + strip.height, + ); + final image = source.imageFor( + element, + sourceTick, + sourceSpanTicks: sourceSpanTicks, + logicalSize: Size(tileWidth, strip.height), + devicePixelRatio: devicePixelRatio, + ); + return (tile: tile, image: image); + } + + canvas.save(); + canvas.clipRect(sectionVisible); + for (var i = first; i < last; i++) { + final (:tile, :image) = demandTile(i); + if (image == null) continue; + canvas.drawRect(tile, Paint()..color = const Color(0xFF000000)); + paintImage( + canvas: canvas, + rect: tile, + image: image, + fit: BoxFit.cover, + filterQuality: FilterQuality.low, + ); + } + canvas.restore(); + prefetch.add(() { + for (var i = demandFirst; i < first; i++) { + demandTile(i); + } + for (var i = last; i < demandLast; i++) { + demandTile(i); + } + }); + } + + if (element.retime case final map?) { + for (var index = 0; index < map.segments.length; index++) { + final segment = map.segments[index]; + paintSection( + projectStart: map.projectStartOfSegment(index), + duration: segment.projectDuration, + sourceStart: segment.sourceStart, + sourceDelta: segment.sourceDelta, + ); + } + } else { + paintSection( + projectStart: 0, + duration: element.duration, + sourceStart: element.sourceStart, + sourceDelta: element.sourceDuration, + ); + } + // Register every visible section before warming the two adjacent cells. + for (final demand in prefetch) { + demand(); + } + canvas.restore(); + } + + // Select an exactly representable project tick; Kernel alone maps it to + // source time. This supports affine speed changes and piecewise/reverse views. + int _sampleOffset(ElementRecord element, int offset) { + final map = element.retime; + if (map == null) { + final quantum = + element.duration ~/ element.duration.gcd(element.sourceDuration); + return offset ~/ quantum * quantum; + } + var start = 0; + for (final segment in map.segments) { + if (offset < start + segment.projectDuration) { + final quantum = + segment.projectDuration ~/ + segment.projectDuration.gcd(segment.sourceDelta); + return start + (offset - start) ~/ quantum * quantum; + } + start += segment.projectDuration; + } + return offset; + } + + void _paintHeader( + Canvas canvas, + RRect shape, + Rect header, + Rect viewport, + ElementRecord element, + ) { + if (!header.overlaps(viewport)) return; + final name = element.name?.trim(); + final explicitTitle = contentTitle?.call(element); + final title = + explicitTitle ?? + (name == null || name.isEmpty + ? element.structure == ElementStructure.gap + ? null + : element.id.value + : name); + if (title == null) return; + // Anchor and ellipsize against the clip, independent of viewport cropping. + final left = header.left + theme.clipHeaderPadding; + final right = header.right - theme.clipHeaderPadding; + canvas.save(); + canvas.clipRRect(shape); + canvas.clipRect(header); + if (right > left) { + final status = contentStatus?.call(element); + final key = ( + text: status == null ? title : '$status · $title', + style: theme.clipNameTextStyle, + direction: textDirection, + scaler: textScaler, + locale: locale, + ); + // Panning changes coordinates, not text layout. Keep shaped paragraphs + // across paints and rebuilds, with a strict viewport-owned LRU bound. + final label = + labels.remove(key) ?? + TextPainter( + text: TextSpan(text: key.text, style: key.style), + textDirection: textDirection, + textScaler: textScaler, + locale: locale, + maxLines: 1, + ellipsis: '…', + ); + label.layout(maxWidth: right - left); + labels[key] = label; + while (labels.length > 256) { + labels.remove(labels.keys.first)!.dispose(); + } + canvas.clipRect(Rect.fromLTRB(left, header.top, right, header.bottom)); + label.paint( + canvas, + Offset(left, header.top + (header.height - label.height) / 2), + ); + } + canvas.restore(); + } + + RRect _clipShape(Rect rect) => RRect.fromRectAndRadius( + rect, + Radius.circular( + math.min(theme.clipCornerRadius, math.min(rect.width, rect.height) / 2), + ), + ); + + void _paintSelectionOutline(Canvas canvas, Rect rect, Paint stroke) { + stroke + ..color = theme.selectionOutlineColor + ..strokeWidth = theme.selectionOutlineWidth; + _paintInsideBorder(canvas, _clipShape(rect), stroke); + } + + void _paintTrimOutline(Canvas canvas, Rect rect, TimelineTrimEdge edge) { + final width = math.min( + theme.trimHandleWidth, + math.min(rect.width, rect.height) / 2, + ); + if (width <= 0) return; + final shape = _clipShape(rect); + final outline = rect.deflate(width / 2); + final radius = math.max(0.0, shape.tlRadiusX - width / 2); + final arm = math.min(outline.width / 2, math.max(8.0, radius)); + final leading = edge == TimelineTrimEdge.leading; + final direction = leading ? -1 : 1; + final x = leading ? outline.left : outline.right; + final path = Path() + ..moveTo(x - direction * arm, outline.top) + ..lineTo(x - direction * radius, outline.top) + ..arcToPoint( + Offset(x, outline.top + radius), + radius: Radius.circular(radius), + clockwise: !leading, + ) + ..lineTo(x, outline.bottom - radius) + ..arcToPoint( + Offset(x - direction * radius, outline.bottom), + radius: Radius.circular(radius), + clockwise: !leading, + ) + ..lineTo(x - direction * arm, outline.bottom); + canvas.drawPath( + path, + Paint() + ..isAntiAlias = true + ..color = theme.selectionOutlineColor + ..style = PaintingStyle.stroke + ..strokeWidth = width + ..strokeCap = StrokeCap.round + ..strokeJoin = StrokeJoin.round, + ); + } + + void _paintInsideBorder(Canvas canvas, RRect shape, Paint paint) { + final width = paint.strokeWidth; + if (width <= 0 || shape.width <= 0 || shape.height <= 0) return; + final style = paint.style; + paint.style = PaintingStyle.fill; + if (width * 2 >= math.min(shape.width, shape.height)) { + // A narrow clip has no remaining interior, but must never bleed outward. + canvas.drawRRect(shape, paint); + } else { + final inner = RRect.fromRectAndRadius( + shape.outerRect.deflate(width), + Radius.circular(math.max(0, shape.tlRadiusX - width)), + ); + canvas.drawDRRect(shape, inner, paint); + } + paint.style = style; + } + + // Occupancy remains in Layout for avoidance and exact commit. A valid drag + // paints its pointer ghost and outlines any retained serial occupancy. + bool _isHiddenLanding(Object identity) => switch (identity) { + LayoutBodyId id => controller.dragGhostFor(id) != null, + ElementHandle handle => + controller.dragGhostFor(LayoutBodyId.element(handle)) != null && + !controller.retainsPrimaryDragReservation, + _ => false, + }; + + void _paintConnectionLines( + Canvas canvas, + TimelineViewportFrame frame, + TimelineQuery query, + Paint stroke, + ) { + if (theme.connectionLineWidth == 0) return; + stroke + ..color = theme.connectionLineColor + ..strokeWidth = theme.connectionLineWidth + ..style = PaintingStyle.stroke + ..strokeCap = StrokeCap.butt + ..strokeJoin = StrokeJoin.miter + ..isAntiAlias = false; + for (var index = 0; index < frame.length; index++) { + if (frame.kindAt(index) != TimelineViewportItemKind.connected) continue; + final bodyId = frame.bodyAt(index); + if (controller.isExpandedComponentOwner(bodyId)) continue; + if (_isHiddenLanding(bodyId)) continue; + final body = frame.version.scene.bodies[bodyId]; + if (body == null) continue; + final presented = controller.presentationBoundsAt(frame, index); + _paintConnectionLine( + canvas, + frame, + query, + stroke, + body, + presented.top, + targetLeft: presented.left, + ); + } + // The ghost may be visible even when its canonical landing is culled. + // Read its connection from the prepared Kernel root, never the old owner. + for (final ghost in controller.dragGhosts) { + _paintConnectionLine( + canvas, + frame, + query, + stroke, + ghost.body, + frame.camera.screenYForWorld(ghost.top.toDouble(), frame.viewport), + ); + } + } + + void _paintConnectionLine( + Canvas canvas, + TimelineViewportFrame frame, + TimelineQuery query, + Paint stroke, + LayoutBody body, + double targetTop, { + double? targetLeft, + }) { + final bodyId = body.id; + if (!bodyId.isSemantic || bodyId.context != null) return; + final connection = query.connectionForTarget(bodyId.owner); + // A Primary insertion preview has no connection ownership anymore. + if (connection == null) return; + // The connector is a visual attachment at the target clip's leading edge, + // independent of its source/target timing offset. + final x = + (targetLeft ?? + frame.camera.screenXForTick(body.start, frame.viewport)) + + stroke.strokeWidth / 2; + final targetBottom = targetTop + body.height; + + final anchorBodyId = LayoutBodyId.element(connection.anchor); + final anchorLocal = frame.version.placementRoot[anchorBodyId]; + final double anchorTop; + final double anchorBottom; + final anchorGhost = controller.dragGhostFor(anchorBodyId); + if (anchorGhost != null) { + anchorTop = frame.camera.screenYForWorld( + anchorGhost.top.toDouble(), + frame.viewport, + ); + anchorBottom = anchorTop + anchorGhost.body.height; + } else if (anchorLocal == null) { + anchorTop = frame.camera.screenYForWorld( + controller.geometry.primaryClipTopFor(connection.anchor).toDouble(), + frame.viewport, + ); + anchorBottom = frame.camera.screenYForWorld( + (controller.geometry.primaryClipTopFor(connection.anchor) + + controller.geometry.primaryClipHeightFor(connection.anchor)) + .toDouble(), + frame.viewport, + ); + } else { + final anchor = frame.version.placementOf(anchorBodyId); + anchorTop = frame.camera.screenYForWorld( + anchor.top.toDouble(), + frame.viewport, + ); + anchorBottom = frame.camera.screenYForWorld( + anchor.bottom.toDouble(), + frame.viewport, + ); + } + final targetCenter = (targetTop + targetBottom) / 2; + final anchorCenter = (anchorTop + anchorBottom) / 2; + final targetY = targetCenter < anchorCenter ? targetBottom : targetTop; + final anchorY = targetCenter < anchorCenter ? anchorTop : anchorBottom; + final showFullConnection = + controller.dragGhostFor(bodyId) != null || + controller.isSelected(bodyId) || + controller.isSelected(bodyId.owner); + final direction = (anchorY - targetY).sign; + final overlap = math.min((anchorY - targetY).abs() / 2, stroke.strokeWidth); + final anchorInsideY = anchorY + direction * overlap; + final startY = showFullConnection + ? targetY - direction * overlap + : anchorY + + (targetY - anchorY).sign * + math.min((targetY - anchorY).abs(), stroke.strokeWidth); + canvas.drawLine(Offset(x, startY), Offset(x, anchorInsideY), stroke); + } + + @override + bool shouldRepaint(_TimelinePainter oldDelegate) => + oldDelegate.controller != controller || + oldDelegate.theme != theme || + oldDelegate.thumbnails != thumbnails || + oldDelegate.waveforms != waveforms || + oldDelegate.showKeyframes != showKeyframes || + oldDelegate.showPlayhead != showPlayhead || + oldDelegate.paintClipHeader != paintClipHeader || + oldDelegate.classifyContent != classifyContent || + oldDelegate.contentStatus != contentStatus || + oldDelegate.contentTitle != contentTitle || + oldDelegate.contentStatusChanges != contentStatusChanges || + oldDelegate.textDirection != textDirection || + oldDelegate.textScaler != textScaler || + oldDelegate.locale != locale || + oldDelegate.devicePixelRatio != devicePixelRatio; +} diff --git a/packages/cutdex_timeline_ui/lib/src/timeline_view_controller.dart b/packages/cutdex_timeline_ui/lib/src/timeline_view_controller.dart new file mode 100644 index 0000000..c281415 --- /dev/null +++ b/packages/cutdex_timeline_ui/lib/src/timeline_view_controller.dart @@ -0,0 +1,2036 @@ +import 'dart:collection'; +import 'dart:math' as math; +import 'dart:ui'; + +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:flutter/foundation.dart'; + +import 'timeline_camera_layout.dart'; +import 'timeline_clip_layout.dart'; + +part 'timeline_view_drag.dart'; +part 'timeline_view_trim.dart'; +part 'timeline_view_keyframe.dart'; + +enum TimelineTrimEdge { leading, trailing } + +/// The host owns the final synchronous commit, including history navigation. +/// Pointer previews and selection changes do not enter this boundary. +typedef TimelineEditCommit = T Function(T Function() action); + +/// Host-owned observation around editing, including failures before publication. +/// The host must invoke [action] once and preserve its result and exception. +typedef TimelineEditOperation = + T Function( + String operation, + Map context, + T Function() action, + ); +typedef TimelineEditFailure = void Function(Object error, StackTrace stack); + +/// Resolves and commits editable appearance components without teaching the +/// generic timeline UI about their business meaning. +typedef TimelineComponentResolver = + ElementHandle? Function(LayoutBodyId identity, TimelineQuery query); +typedef TimelineComponentCommit = + void Function(LayoutBodyId identity, int absoluteStart, int duration); + +/// One immutable result from hit-testing the exact resident Layout frame. +final class TimelineHitResult { + const TimelineHitResult({ + required this.identity, + required this.kind, + required this.segment, + required this.signedLane, + required this.bounds, + }); + + final Object identity; + final TimelineViewportItemKind kind; + final int segment; + final int signedLane; + final Rect bounds; +} + +final class _TimelineComponentDrag { + _TimelineComponentDrag({ + required this.identity, + required this.originalStart, + required this.originalDuration, + required this.pointerTick, + required this.edge, + }) : start = originalStart, + duration = originalDuration; + + final LayoutBodyId identity; + final int originalStart, originalDuration, pointerTick; + final TimelineTrimEdge? edge; + int start, duration; +} + +/// Single-owner presentation state for one open timeline viewport. +/// +/// Kernel and Layout versions remain authoritative. This controller owns only +/// transient view state and never reconstructs timeline or lane semantics. +final class TimelineViewController extends ChangeNotifier { + /// Interactive definition view. Layout retains the canonical projection and + /// history; this controller never owns a parallel document or undo stack. + /// [onElementsSplit] reports original members and their new right IDs after + /// a successful cut, before listeners receive the updated view. Hosts can + /// propagate presentation state without guessing from payload or adjacency. + factory TimelineViewController.editable({ + required TimelineLayoutEngine engine, + required TimelineViewportGeometry geometry, + required TimelineCamera camera, + required ConnectionId Function() createConnectionId, + required ElementId Function() createElementId, + TimelineEditCommit? commitEdit, + TimelineEditOperation? editOperation, + TimelineEditFailure? onEditFailure, + bool Function()? canUndo, + bool Function()? canRedo, + VoidCallback? undo, + VoidCallback? redo, + TimelineComponentResolver? resolveComponent, + TimelineComponentCommit? commitComponent, + void Function(Map fragments)? onElementsSplit, + }) { + final version = engine.current; + final definition = engine.currentComponents?.semanticProjection.definition; + if (version == null || definition == null) { + throw ArgumentError( + 'editable view requires a published definition component root', + ); + } + return TimelineViewController( + version: version, + storyline: definition, + geometry: geometry, + camera: camera, + openedContainer: + engine.currentComponents!.semanticProjection.openedContainer, + format: engine.kernel.format, + ) + .._commitEdit = commitEdit + .._editOperation = editOperation + .._onEditFailure = onEditFailure + .._canUndo = canUndo + .._canRedo = canRedo + .._undo = undo + .._redo = redo + .._resolveComponent = resolveComponent + .._commitComponent = commitComponent + .._onElementsSplit = onElementsSplit + .._editing = ( + engine: engine, + createConnectionId: createConnectionId, + createElementId: createElementId, + ); + } + + factory TimelineViewController({ + required LayoutVersion version, + required StorylineHandle storyline, + required TimelineViewportGeometry geometry, + required TimelineCamera camera, + TimelineViewportEngine? viewportEngine, + TimelineViewportMetrics? metrics, + ElementHandle? openedContainer, + TimelineFormat? format, + }) => TimelineViewController._( + version, + storyline, + geometry, + clampTimelineCameraOrigin(camera), + viewportEngine ?? TimelineViewportEngine(), + metrics ?? TimelineViewportMetrics(), + openedContainer, + format ?? TimelineFormat.fps24, + ); + + TimelineViewController._( + this._version, + this._storyline, + this._geometry, + this._camera, + this._viewportEngine, + this.metrics, + this._openedContainer, + this._format, + ) { + _validateOpenedContainer(_version, _storyline); + } + + ElementHandle? _openedContainer; + + /// Timing supplied by the kernel for editable views; standalone views default to 24 fps. + final TimelineFormat _format; + TimelineFormat get format => _editing?.engine.kernel.format ?? _format; + TimelineEditCommit? _commitEdit; + TimelineEditOperation? _editOperation; + TimelineEditFailure? _onEditFailure; + + Map _editContext([Iterable? elements]) { + // Metadata must not turn an otherwise valid edit into an error. + final ids = []; + try { + final query = _version.kernelVersion.query(); + final handles = + elements ?? + [ + for (final identity in _selectedIdentities) + ?elementForIdentity(identity), + ]; + for (final handle in handles) { + ids.add(query.element(handle).id.value); + } + if (ids.isEmpty && + _selectedIdentities.isEmpty && + _selectedKeyframe == null && + _componentDrag == null) { + final anchor = query + .storylineAnchorPoint( + storyline: _storyline, + preferredTick: _playheadTick, + rangeStart: _playheadTick, + rangeEnd: _playheadTick, + ) + ?.anchor; + if (anchor != null) ids.add(query.element(anchor).id.value); + } + if (_selectedKeyframe case final key?) { + ids.add(query.element(key.element).id.value); + } + if (_componentDrag case final component?) { + final element = _resolveComponent?.call(component.identity, query); + if (element != null) ids.add(query.element(element).id.value); + } + } catch (_) { + // Stale handles are still handled by the editing path itself. + } + return { + 'entryPoint': 'timeline', + 'clipIds': ids.toSet().toList(), + 'playheadTick': _playheadTick, + 'ticksPerSecond': TimelineClock.ticksPerSecond, + }; + } + + T _runEdit( + String operation, + T Function() action, { + Iterable? elements, + }) => _editOperation == null + ? action() + : _editOperation!(operation, _editContext(elements), action); + + void _reportEditFailure(Object error, StackTrace stack) { + try { + _onEditFailure?.call(error, stack); + } catch (_) { + // Diagnostic delivery cannot change UI rejection handling. + } + } + + bool Function()? _canUndo, _canRedo; + VoidCallback? _undo, _redo; + TimelineComponentResolver? _resolveComponent; + TimelineComponentCommit? _commitComponent; + void Function(Map fragments)? _onElementsSplit; + T _commit(T Function() action) => + _commitEdit == null ? action() : _commitEdit!(action); + ElementHandle? get openedContainer => _openedContainer; + + /// Display-only envelope from the same Kernel root as the rendered preview. + ({int start, int end})? get effectiveSourceRange { + _synchronizeEditingRoot(); + return _validateOpenedContainer( + _trim?.displayVersion ?? + _drag?.displayVersion ?? + _layoutPreview ?? + _version, + _storyline, + ); + } + + ({int start, int end})? _validateOpenedContainer( + LayoutVersion version, + StorylineHandle storyline, + ) => _openedContainer == null + ? null + : TimelineLayoutSceneBuilder.openedContainerSourceRange( + version: version.kernelVersion, + container: _openedContainer!, + definition: storyline, + ); + + LayoutVersion _version; + StorylineHandle _storyline; + TimelineViewportGeometry _geometry; + TimelineCamera _camera; + final TimelineViewportEngine _viewportEngine; + LayoutVersion? _componentBandVersion; + final Map _componentBands = {}; + static const Set _emptySelection = {}; + final Set _selectedIdentities = {}; + + /// Diagnostics for viewport cache behavior. It is not timeline state. + final TimelineViewportMetrics metrics; + + /// Exact viewport identities selected by the presentation layer. + late final Set selectedIdentities = UnmodifiableSetView( + _selectedIdentities, + ); + + Object? _hoveredIdentity; + ({Object identity, TimelineTrimEdge edge})? _retainedTrimOutline; + _TimelineKeyframeDrag? _keyframe; + ({ElementHandle element, int offset})? _selectedKeyframe; + ({ElementHandle element, int offset})? get selectedKeyframe => + _keyframe == null + ? _selectedKeyframe + : (element: _keyframe!.move.element, offset: _keyframe!.displayOffset); + + TimelineKeyframeHit? hitTestKeyframe({ + required TimelineViewportRect viewport, + required Offset position, + double headerHeight = 18, + }) { + if (!isEditable) return null; + return _keyframeAt( + viewport: viewport, + position: position, + headerHeight: headerHeight, + ); + } + + bool selectKeyframeAt({ + required TimelineViewportRect viewport, + required Offset position, + double headerHeight = 18, + }) { + final hit = hitTestKeyframe( + viewport: viewport, + position: position, + headerHeight: headerHeight, + ); + if (hit == null) return false; + _selectKeyframe(hit); + notifyListeners(); + return true; + } + + void _selectKeyframe(TimelineKeyframeHit hit) { + _retainedTrimOutline = null; + _commandRejection = null; + _dragRejection = null; + _selectedIdentities + ..clear() + ..add(hit.identity); + _selectedKeyframe = (element: hit.element, offset: hit.offset); + _playheadTick = hit.start + hit.offset; + } + + final _contentChanges = ChangeNotifier(); + final _editingChanges = ChangeNotifier(); + final _playheadChanges = ChangeNotifier(); + + /// Selection, playhead, document and keyframe-preview changes. Camera-only + /// navigation and private placement/trim geometry do not change inspected + /// properties or the native preview scene; their final commit does. + Listenable get editingChanges => _editingChanges; + + void _notifyViewportChanged() { + _contentChanges.notifyListeners(); + super.notifyListeners(); + } + + /// Clip, camera and selection changes, excluding position-only playback ticks. + Listenable get contentChanges => _contentChanges; + + /// Position-only changes, separated from clip and viewport rebuilds during playback. + Listenable get playheadChanges => _playheadChanges; + + @override + void notifyListeners() { + _editingChanges.notifyListeners(); + _contentChanges.notifyListeners(); + _playheadChanges.notifyListeners(); + super.notifyListeners(); + } + + int _playheadTick = 0; + bool _isScrubbing = false; + + /// Presentation-only position in the opened definition, not playback state. + int get playheadTick => _playheadTick; + bool get isScrubbing => _isScrubbing; + + void beginScrubbing() { + if (_isScrubbing) return; + _isScrubbing = true; + _editingChanges.notifyListeners(); + } + + void endScrubbing() { + if (!_isScrubbing) return; + _isScrubbing = false; + _editingChanges.notifyListeners(); + } + + void seekTo(int tick) { + checkLayoutInt64(tick, 'playhead tick'); + final next = tick < 0 ? 0 : tick; + if (_playheadTick == next) return; + _playheadTick = next; + final hadRejection = _commandRejection != null; + _commandRejection = null; + if (hadRejection) { + notifyListeners(); + } else { + _editingChanges.notifyListeners(); + _playheadChanges.notifyListeners(); + super.notifyListeners(); + } + } + + /// Advance by visible pages when playback moves the playhead off screen. + /// The host calls this for native playback ticks, not for manual seeking. + void followPlayback() { + final bounds = _viewportBounds; + if (bounds == null || bounds.width <= 0 || isDragging || _isScrubbing) { + return; + } + final viewport = TimelineViewportRect( + width: bounds.width, + height: bounds.height, + ); + final x = _camera.screenXForTick(_playheadTick, viewport); + // A page shift can leave a subpixel negative x due to camera rounding. + if (x > -1e-6 && x < bounds.width) return; + final pages = (x / bounds.width).floor(); + setCamera(_camera.panBy(horizontalPixels: pages * bounds.width)); + } + + /// Restores presentation-only navigation without entering edit history. + /// The first viewport reconciliation clamps this state instead of replacing + /// it with the default centered view. + void restoreViewState({ + required int playheadTick, + required TimelineCamera camera, + }) { + checkLayoutInt64(playheadTick, 'playhead tick'); + _playheadTick = playheadTick < 0 ? 0 : playheadTick; + _camera = clampTimelineCameraOrigin(camera); + _viewportInitialized = true; + _viewportNeedsUpdate = true; + notifyListeners(); + } + + void seekAt({ + required double screenX, + required TimelineViewportRect viewport, + }) { + final tick = math.max( + 0, + _camera.tickAtScreenX( + screenX, + viewport, + rounding: TimelineTickRounding.nearest, + ), + ); + final frame = _editing?.engine.kernel.format.frameGrid.quantumTicks ?? 1; + final remainder = tick % frame; + seekTo(tick - remainder + (remainder >= (frame + 1) ~/ 2 ? frame : 0)); + } + + /// Shared by toolbar, wheel and pinch. Limits are display scale, not time facts. + /// Preserve the time under [from] while moving it to [to], in one notification. + void navigate({ + required Offset from, + required Offset to, + double scale = 1, + bool anchorToPlayhead = false, + required TimelineViewportRect viewport, + }) { + if (!scale.isFinite || scale <= 0) { + throw ArgumentError.value(scale, 'scale'); + } + final nextScale = scale == 1 + ? _camera.pixelsPerTick + : (_camera.pixelsPerTick * scale).clamp( + minimumPixelsPerTick(viewport.width), + maxPixelsPerTick, + ); + final next = _camera + .zoomAt( + screenX: anchorToPlayhead ? zoomAnchor(viewport) : from.dx, + newPixelsPerTick: nextScale, + viewport: viewport, + ) + .panBy( + horizontalPixels: from.dx - to.dx, + verticalPixels: from.dy - to.dy, + ); + setCamera(next); + } + + int get frameTicks => format.frameGrid.quantumTicks; + double get maxPixelsPerTick => 32 / frameTicks; + + LayoutVersion? _zoomBoundsVersion; + StorylineHandle? _zoomBoundsStoryline; + int _zoomContentEnd = 0; + int? _trimNavigationEnd; + + /// Includes connected clips and the currently displayed edit preview. + int get contentEndTick { + _synchronizeEditingRoot(); + final current = + _keyframe?.displayVersion ?? + _trim?.displayVersion ?? + _drag?.displayVersion ?? + _layoutPreview ?? + _incomingLayout ?? + _version; + if (identical(current, _zoomBoundsVersion) && + _storyline == _zoomBoundsStoryline) { + return _zoomContentEnd; + } + var end = current.kernelVersion.query().storylineSpan(_storyline); + for (final entry in current.rangeIndexRoot.entries) { + if (entry.key.stack.scope != _storyline) continue; + final range = entry.value.timeBounds; + if (range != null) end = math.max(end, range.end); + } + _zoomBoundsVersion = current; + _zoomBoundsStoryline = _storyline; + return _zoomContentEnd = end; + } + + /// Keep the navigation bound from retreating during a trim gesture. A + /// shrinking bound would pan the camera under a stationary trim pointer and + /// feed that camera movement back into the next trim preview. + int get navigationContentEndTick => + math.max(contentEndTick, _trimNavigationEnd ?? 0); + + int get maximumVisibleSeconds => overviewSecondsFor(contentEndTick); + + /// A 25% margin, rounded up to a readable overview duration. + static int overviewSecondsFor(int endTick) { + if (endTick < 0) throw ArgumentError.value(endTick, 'endTick'); + final target = endTick / TimelineClock.ticksPerSecond * 1.25; + for (final seconds in const [600, 1800, 3600, 7200, 14400]) { + if (target <= seconds) return seconds; + } + var seconds = 14400; + while (seconds < target) { + seconds *= 2; + } + return seconds; + } + + double minimumPixelsPerTick(double width) => math.min( + maxPixelsPerTick, + math.max(1.0, width) / + (maximumVisibleSeconds * TimelineClock.ticksPerSecond), + ); + + /// User-requested overview. Document edits never apply this automatically. + void fitTimeline() { + final bounds = _viewportBounds; + if (bounds == null || bounds.width <= 0) return; + final span = contentEndTick > 0 + ? contentEndTick * 1.25 + : 20 * TimelineClock.ticksPerSecond; + cancelDrag(); + setCamera( + TimelineCamera( + baseTick: 0, + pixelsPerTick: (bounds.width / span).clamp( + minimumPixelsPerTick(bounds.width), + maxPixelsPerTick, + ), + verticalOffset: _camera.verticalOffset, + ), + ); + } + + /// Keep a visible playhead in place; otherwise zoom into the visible center. + double zoomAnchor(TimelineViewportRect viewport) { + final x = _camera.screenXForTick(_playheadTick, viewport); + return x >= viewport.left && x <= viewport.left + viewport.width + ? x + : viewport.left + viewport.width / 2; + } + + /// Default zoom for controls without a pointer-selected time anchor. + void zoomBy({ + required double scale, + required TimelineViewportRect viewport, + }) => navigate( + from: Offset.zero, + to: Offset.zero, + scale: scale, + anchorToPlayhead: true, + viewport: viewport, + ); + + ({ + TimelineLayoutEngine engine, + ConnectionId Function() createConnectionId, + ElementId Function() createElementId, + })? + _editing; + _TimelineDrag? _drag; + _TimelineTrim? _trim; + _TimelineComponentDrag? _componentDrag; + String? _dragRejection; + String? _commandRejection; + String? get commandRejection => _commandRejection; + + LayoutVersion get version { + _synchronizeEditingRoot(); + return _version; + } + + LayoutVersion? _incomingLayout; + LayoutVersion? _layoutPreview; + LayoutGhost? _incomingGhost; + bool _incomingPrimary = false; + ({Offset position, TimelineViewportRect viewport})? _incomingPointer; + ({Offset position, TimelineViewportRect viewport})? get incomingPointer => + _incomingPointer; + + /// Incoming clips use the same painted ghost and serial reservation as moves. + void showIncomingClip( + LayoutVersion layout, { + required ElementHandle element, + required int start, + required int top, + required bool audioOnly, + required Offset position, + required TimelineViewportRect viewport, + }) { + final query = layout.kernelVersion.query(); + final id = LayoutBodyId.element(element); + final duration = query.element(element).duration; + final body = layout.scene.bodies[id]; + _incomingLayout = layout; + _incomingPointer = (position: position, viewport: viewport); + _incomingPrimary = query.connectionForTarget(element) == null; + _incomingGhost = LayoutGhost( + source: id, + body: + body?.copyWith(start: start, end: start + duration) ?? + LayoutBody( + id: id, + start: start, + end: start + duration, + height: _geometry.primaryClipHeightFor(element), + partition: LayoutPartition( + stack: layout.policy.stacks.keys.first, + domain: layout.policy.stacks.values.first.domains.first, + ), + placementClass: audioOnly + ? LayoutPlacementClass.audioOnly + : LayoutPlacementClass.visualLike, + ), + top: top, + ); + _notifyViewportChanged(); + } + + void clearIncomingClip() { + if (_incomingLayout == null) return; + _discardIncomingClip(); + _notifyViewportChanged(); + } + + /// Displays an immutable prepared layout without publishing it or history. + /// The owner of the prepared edit remains responsible for commit or cancel. + void showLayoutPreview(LayoutVersion preview) { + _synchronizeEditingRoot(); + _validateOpenedContainer(preview, _storyline); + if (identical(_layoutPreview, preview)) return; + _layoutPreview = preview; + _notifyViewportChanged(); + } + + void clearLayoutPreview() { + if (_layoutPreview == null) return; + _layoutPreview = null; + _notifyViewportChanged(); + } + + void _discardIncomingClip() { + _incomingLayout = null; + _incomingPointer = null; + _incomingGhost = null; + _incomingPrimary = false; + } + + StorylineHandle get storyline => _storyline; + TimelineViewportGeometry get geometry => _geometry; + TimelineCamera get camera => _camera; + Object? get hoveredIdentity => _hoveredIdentity; + bool get isEditable => _editing != null; + + /// True for an active clip move, edge trim or keyframe move. + bool get isDragging => + _incomingLayout != null || + _drag != null || + _trim != null || + _keyframe != null || + _componentDrag != null; + + bool get isDraggingKeyframe => _keyframe != null; + + /// Unpublished parameter preview for hosts rendering the edited frame. + TimelineVersion? get keyframePreviewVersion => + _keyframe?.displayVersion.kernelVersion; + bool get isTrimming => _trim != null || _componentDrag?.edge != null; + TimelineTrimEdge? get trimEdge => _trim?.edge ?? _componentDrag?.edge; + + /// The active or last released edge, retained until another clip interaction. + /// This is presentation state only; a retained outline is not a live trim. + TimelineTrimEdge? trimOutlineEdgeFor(Object identity) { + if (!isSelected(identity)) return null; + if (_trim case final trim?) { + return trim.identity == identity ? trim.edge : null; + } + if (_componentDrag case final component? when component.edge != null) { + return component.identity == identity ? component.edge : null; + } + final retained = _retainedTrimOutline; + return retained?.identity == identity ? retained?.edge : null; + } + + /// Removes a released trim hint when a host starts another clip interaction. + /// Selection, active trims, document history and editing notifications stay + /// unchanged; only the viewport's presentation needs to repaint. + void clearRetainedTrimOutline() { + if (_retainedTrimOutline == null) return; + _retainedTrimOutline = null; + _notifyViewportChanged(); + } + + String? get dragRejection => _dragRejection; + LayoutPreviewMode? get dragMode => _incomingLayout != null + ? (_incomingPrimary + ? LayoutPreviewMode.primaryInsert + : LayoutPreviewMode.connected) + : _keyframe?.mode ?? _trim?.mode ?? _drag?.mode; + LayoutGhost? get dragGhost => _incomingGhost ?? _drag?.ghost; + Iterable get dragGhosts => _incomingGhost != null + ? [_incomingGhost!] + : _drag?.ghostById.values ?? const []; + LayoutGhost? dragGhostFor(LayoutBodyId id) => + _incomingGhost?.source == id ? _incomingGhost : _drag?.ghostById[id]; + LayoutBodyId? get dragSource => _incomingGhost?.source ?? _drag?.sourceId; + + /// Resolves an identity against the published timeline. + /// + /// Selection and editing use this root. Elements created only by a private + /// preview are unavailable here; frame consumers use [elementForFrameItem]. + ElementHandle? elementForIdentity(Object identity) => + _elementForIdentity(identity, version.kernelVersion.query()); + + /// Resolves the element handle for the item at [index] in [frame]. + /// + /// Painting and layout use the frame's version, including unpublished preview + /// elements. Transitions have no element handle and return `null`. + ElementHandle? elementForFrameItem(TimelineViewportFrame frame, int index) => + frame.kindAt(index) == TimelineViewportItemKind.transition + ? null + : _elementForIdentity( + frame.identityAt(index), + frame.version.kernelVersion.query(), + ); + + ElementHandle? _elementForIdentity(Object identity, TimelineQuery query) { + final handle = switch (identity) { + ElementHandle handle => handle, + LayoutBodyId id when id.isSemantic => id.owner, + LayoutBodyId id => _resolveComponent?.call(id, query), + _ => null, + }; + // A pointer/host notification can arrive after undo or an adjacent layout + // publication has retired its handle. Such identities no longer select a + // live element, even when their arena slot has since been reused. + return handle != null && query.ownerOf(handle) != null ? handle : null; + } + + void _remapSelection(LayoutVersion previous, LayoutVersion next) { + final oldQuery = previous.kernelVersion.query(); + final query = next.kernelVersion.query(); + final selected = {}; + for (final identity in _selectedIdentities) { + final owner = switch (identity) { + ElementHandle handle => handle, + LayoutBodyId body => body.owner, + _ => null, + }; + if (owner == null) { + selected.add(identity); + continue; + } + if (oldQuery.ownerOf(owner) == null) continue; + final current = query.elementById(oldQuery.element(owner).id); + if (current == null) continue; + selected.add(switch (identity) { + LayoutBodyId body when body.isSemantic => LayoutBodyId.element( + current, + context: body.context, + ), + LayoutBodyId body when body.isReservation => LayoutBodyId.reservation( + owner: current, + ordinal: body.ordinal, + policyVersion: body.policyVersion, + context: body.context, + ), + LayoutBodyId body => LayoutBodyId.derived( + owner: current, + kind: body.kind, + ordinal: body.ordinal, + policyVersion: body.policyVersion, + context: body.context, + ), + _ => current, + }); + } + _selectedIdentities + ..clear() + ..addAll(selected); + } + + ({int start, int end})? componentPreview(LayoutBodyId identity) { + final drag = _componentDrag; + return drag?.identity == identity + ? (start: drag!.start, end: drag.start + drag.duration) + : null; + } + + /// Serial occupancy is outlined for Primary sources and incoming drops. + bool get retainsPrimaryDragReservation => + _incomingPrimary || + _drag?.primarySource != null || + _drag?.mode == LayoutPreviewMode.primaryInsert; + bool get canUndo => + _canUndo?.call() ?? _editing?.engine.kernel.canUndo ?? false; + bool get canRedo => + _canRedo?.call() ?? _editing?.engine.kernel.canRedo ?? false; + + /// Explicit host notification after an external authoritative edit/history move. + void synchronize() { + if (_synchronizeEditingRoot()) notifyListeners(); + } + + bool _synchronizeEditingRoot() { + final editing = _editing; + if (editing == null) return false; + final current = editing.engine.current; + if (current == null) { + _discardDrag(); + throw StateError('current Kernel root has no published Layout'); + } + if (identical(current, _version)) return false; + _validateOpenedContainer(current, _storyline); + _discardDrag(); + _layoutPreview = null; + _version = current; + _viewportEngine.invalidate(); + _clearInteractionState(); + return true; + } + + /// Publishes an adjacent Layout result and preserves the resident projection + /// only when Layout proves that its cached geometry is still valid. + /// Optional viewport dimensions are adopted before notifying observers, so + /// geometry refreshes cannot expose a stale root and clear the selection. + void applyLayout( + LayoutApplyResult result, { + TimelineViewportGeometry? geometry, + }) { + if (_editing case final editing?) { + if (!identical(editing.engine.current, result.version)) { + throw StateError( + 'editable view only accepts the authoritative Layout root', + ); + } + } + if (identical(result.version, _version) && + (geometry == null || geometry == _geometry)) { + return; + } + _validateOpenedContainer(result.version, _storyline); + _remapSelection(_version, result.version); + _discardDrag(); + _layoutPreview = null; + _viewportEngine.adoptLayoutUpdate(result, metrics: metrics); + _geometry = geometry ?? _geometry; + _version = result.version; + notifyListeners(); + } + + /// Replaces the visible root after an explicit open, history jump, or global + /// rebuild. Incremental publications should use [applyLayout]. + void replaceLayout(LayoutVersion version) { + if (_editing != null && !identical(_editing!.engine.current, version)) { + throw StateError( + 'editable view only accepts the authoritative Layout root', + ); + } + if (identical(version, _version)) return; + _validateOpenedContainer(version, _storyline); + _discardDrag(); + _layoutPreview = null; + _viewportEngine.invalidate(); + _version = version; + _clearInteractionState(); + notifyListeners(); + } + + void setStoryline(StorylineHandle storyline) { + if (storyline == _storyline) return; + if (_editing != null) { + throw StateError( + 'open another definition with its own editable controller', + ); + } + _discardDrag(); + _viewportEngine.invalidate(); + _storyline = storyline; + _openedContainer = null; + _clearInteractionState(); + notifyListeners(); + } + + void setGeometry(TimelineViewportGeometry geometry) { + if (geometry == _geometry) return; + _discardDrag(); + _geometry = geometry; + notifyListeners(); + } + + void setCamera(TimelineCamera camera) { + _applyCamera(_resolveCamera(clampTimelineCameraOrigin(camera))); + } + + void _applyCamera(TimelineCamera camera) { + if (_sameCamera(camera, _camera)) return; + _camera = camera; + _viewportChangePending = false; + _publishCameraChange(); + } + + void _publishCameraChange() { + if (_viewportDragCancelled) { + _viewportDragCancelled = false; + _editingChanges.notifyListeners(); + } + if (_keyframe case final key?) { + updateDrag(viewport: key.viewport, position: key.position); + return; + } + if (_trim case final trim?) { + updateDrag(viewport: trim.viewport, position: trim.position); + return; + } + if (_drag case final drag?) { + updateDrag(viewport: drag.viewport, position: drag.position); + return; + } + _notifyViewportChanged(); + } + + TimelineCameraBounds? _viewportBounds; + bool _viewportInitialized = false; + bool _viewportNeedsUpdate = false; + bool _viewportChangePending = false; + bool _viewportDragCancelled = false; + + /// Centers the primary lane by moving the whole viewport, without editing it. + /// Horizontal position is preserved unless [resetHorizontal] is requested. + void focusPrimary({bool resetHorizontal = false}) { + final bounds = _viewportBounds; + if (bounds == null || bounds.width <= 0 || bounds.height <= 0) return; + cancelDrag(); + _applyCamera( + _resolveCamera( + _camera, + placement: resetHorizontal + ? TimelineCameraPlacement.resetPrimary + : TimelineCameraPlacement.focusPrimary, + ), + ); + } + + /// Prepares the camera before painting without notifying during layout. + /// + /// The host calls [reconcileViewport] after layout to publish the change. + void prepareViewport() { + if (!_viewportNeedsUpdate) return; + final bounds = _viewportBounds; + if (bounds == null || bounds.width <= 0 || bounds.height <= 0) return; + _viewportNeedsUpdate = false; + final initializing = !_viewportInitialized; + if (!_viewportInitialized) { + _viewportInitialized = true; + if (isDragging) { + if (_keyframe case final key?) { + _playheadTick = key.move.start + key.move.offset; + } + _discardDrag(); + _dragRejection = null; + _viewportDragCancelled = true; + _viewportChangePending = true; + } + } + final camera = _resolveCamera( + _camera, + placement: initializing + ? TimelineCameraPlacement.initialize + : TimelineCameraPlacement.preserve, + ); + if (!_sameCamera(camera, _camera)) { + _camera = camera; + _viewportChangePending = true; + } + } + + /// Publishes prepared camera changes after layout without repositioning twice. + void reconcileViewport() { + prepareViewport(); + if (!_viewportChangePending) return; + _viewportChangePending = false; + _publishCameraChange(); + } + + /// Registers content bounds for camera preparation before painting. + void configureViewport({ + required double width, + required double height, + required int end, + required double top, + required double bottom, + }) { + final next = ( + width: width, + height: height, + end: end, + top: top, + bottom: bottom, + ); + if (_viewportBounds != next) { + _viewportBounds = next; + _viewportNeedsUpdate = true; + } + } + + TimelineCamera _resolveCamera( + TimelineCamera camera, { + TimelineCameraPlacement placement = TimelineCameraPlacement.preserve, + }) => resolveTimelineCamera( + camera: camera, + bounds: _viewportBounds, + primaryCenter: _geometry.primaryTop + _geometry.primaryHeight / 2, + restingVerticalOffset: _camera.verticalOffset, + placement: placement, + ); + + /// Navigation includes half a viewport beyond content; authored duration is unchanged. + int navigationEnd({ + required int contentEnd, + required double width, + required TimelineCamera camera, + }) => timelineNavigationEnd( + contentEnd: contentEnd, + width: width, + pixelsPerTick: camera.pixelsPerTick, + ); + + void panBy({double horizontalPixels = 0, double verticalPixels = 0}) { + if (horizontalPixels == 0 && verticalPixels == 0) return; + setCamera( + _camera.panBy( + horizontalPixels: horizontalPixels, + verticalPixels: verticalPixels, + ), + ); + } + + void zoomAt({ + required double screenX, + required double newPixelsPerTick, + required TimelineViewportRect viewport, + }) { + if (!newPixelsPerTick.isFinite || newPixelsPerTick <= 0) { + throw ArgumentError.value(newPixelsPerTick, 'newPixelsPerTick'); + } + setCamera( + _camera.zoomAt( + screenX: screenX, + newPixelsPerTick: newPixelsPerTick.clamp( + minimumPixelsPerTick(viewport.width), + maxPixelsPerTick, + ), + viewport: viewport, + ), + ); + } + + /// Returns a transient frame backed by the reusable Layout viewport buffer. + /// Consumers must use it immediately and must not retain its item storage. + TimelineViewportFrame project(TimelineViewportRect viewport) { + _synchronizeEditingRoot(); + return _viewportEngine.projectScene( + version: + _keyframe?.displayVersion ?? + _trim?.displayVersion ?? + _drag?.displayVersion ?? + _layoutPreview ?? + _incomingLayout ?? + _version, + storyline: _storyline, + geometry: _geometry, + viewport: viewport, + camera: _camera, + metrics: metrics, + ); + } + + /// Returns the rectangle presented for one resident item. Expanded semantic + /// containers cover the vertical band occupied by their derived components, + /// so components render and hit-test inside the container instead of beside + /// a one-pixel structural anchor. + Rect presentationBoundsAt(TimelineViewportFrame frame, int index) { + var bounds = Rect.fromLTWH( + frame.screenLeftAt(index), + frame.screenTopAt(index), + frame.screenWidthAt(index), + frame.screenHeightAt(index), + ); + final identity = frame.identityAt(index); + if (identity is LayoutBodyId) { + final preview = componentPreview(identity); + if (preview != null) { + bounds = Rect.fromLTWH( + frame.camera.screenXForTick(preview.start, frame.viewport), + bounds.top, + (preview.end - preview.start) * frame.camera.pixelsPerTick, + bounds.height, + ); + } + } + if (identity is! LayoutBodyId || !identity.isSemantic) return bounds; + final components = _editing?.engine.currentComponents; + if (components == null || !components.isExpanded(identity)) return bounds; + final version = + _keyframe?.displayVersion ?? + _trim?.displayVersion ?? + _drag?.displayVersion ?? + _layoutPreview ?? + _version; + if (!identical(_componentBandVersion, version)) { + _componentBandVersion = version; + _componentBands.clear(); + } + final cached = _componentBands[identity]; + if (cached != null) { + return _componentBandBounds(frame, bounds, cached); + } + int? top; + int? bottom; + for (final component in components.componentBodies(identity)) { + if (!version.scene.bodies.containsKey(component)) continue; + final placement = version.placementOf(component); + top = top == null ? placement.top : math.min(top, placement.top); + bottom = bottom == null + ? placement.bottom + : math.max(bottom, placement.bottom); + } + if (top == null || bottom == null) return bounds; + final band = (top: top, bottom: bottom); + _componentBands[identity] = band; + return _componentBandBounds(frame, bounds, band); + } + + /// Resolves local clip regions from the same bounds used for hit-testing. + TimelineClipLayout clipLayout( + Rect bounds, { + ElementHandle? owner, + double nameHeight = 18, + bool audioOnly = false, + bool hasVideoAudio = false, + }) => TimelineClipLayout( + bounds: bounds, + headerHeight: _geometry.headerHeightFor(owner).toDouble(), + nameHeight: nameHeight, + audioOnly: audioOnly, + hasVideoAudio: hasVideoAudio, + ); + + TimelineClipLayout clipLayoutAt(TimelineViewportFrame frame, int index) => + clipLayout( + presentationBoundsAt(frame, index), + owner: elementForFrameItem(frame, index), + ); + + /// Pointer-following bounds shared by clip paint and its interactive header. + Rect dragGhostBounds(LayoutGhost ghost, TimelineViewportRect viewport) { + final body = ghost.body; + return Rect.fromLTWH( + _camera.screenXForTick(body.start, viewport), + _camera.screenYForWorld(ghost.top.toDouble(), viewport), + (body.end - body.start) * _camera.pixelsPerTick, + body.height.toDouble(), + ); + } + + /// Expanded component owners are layout-only lane anchors. Their derived + /// components provide the visible and interactive timeline content. + bool isExpandedComponentOwner(Object identity) { + if (identity is! LayoutBodyId || !identity.isSemantic) return false; + return _editing?.engine.currentComponents?.isExpanded(identity) ?? false; + } + + Rect _componentBandBounds( + TimelineViewportFrame frame, + Rect horizontalBounds, + ({int top, int bottom}) band, + ) { + final screenTop = frame.camera.screenYForWorld( + band.top.toDouble(), + frame.viewport, + ); + final screenBottom = frame.camera.screenYForWorld( + band.bottom.toDouble(), + frame.viewport, + ); + return Rect.fromLTRB( + horizontalBounds.left, + screenTop, + horizontalBounds.right, + screenBottom, + ); + } + + bool beginDrag({ + required TimelineViewportRect viewport, + required Offset position, + double trimHitExtent = 0, + bool keyframes = false, + double keyframeHeaderHeight = 18, + }) { + _synchronizeEditingRoot(); + if (_editing == null || isDragging) return false; + _commandRejection = null; + if (keyframes) { + final key = hitTestKeyframe( + viewport: viewport, + position: position, + headerHeight: keyframeHeaderHeight, + ); + if (key != null) { + _selectKeyframe(key); + try { + _keyframe = _TimelineKeyframeDrag( + engine: _editing!.engine, + hit: key, + camera: _camera, + viewport: viewport, + position: position, + ); + _dragRejection = null; + } on LayoutStructuralError catch (error) { + _dragRejection = error.message; + } + notifyListeners(); + return _keyframe != null; + } + } + _selectedKeyframe = null; + final hit = hitTest(viewport: viewport, position: position); + final edge = trimEdgeAt( + hit: hit, + position: position, + extent: trimHitExtent, + ); + if (hit?.identity case final LayoutBodyId identity + when !identity.isSemantic && + _resolveComponent?.call(identity, _version.kernelVersion.query()) != + null) { + final body = _version.scene.bodies[identity]; + if (body == null || _commitComponent == null) return false; + _componentDrag = _TimelineComponentDrag( + identity: identity, + originalStart: body.start, + originalDuration: body.end - body.start, + pointerTick: _camera.tickAtScreenX( + position.dx, + viewport, + rounding: TimelineTickRounding.nearest, + ), + edge: edge, + ); + if (edge == null) _retainedTrimOutline = null; + _selectedIdentities + ..clear() + ..add(identity); + _hoveredIdentity = null; + _dragRejection = null; + notifyListeners(); + return true; + } + if (edge != null) { + _trim = _TimelineTrim( + engine: _editing!.engine, + identity: hit!.identity, + edge: edge, + createElementId: _editing!.createElementId, + camera: _camera, + viewport: viewport, + position: position, + ); + _trimNavigationEnd = contentEndTick; + _dragRejection = null; + _selectedIdentities + ..clear() + ..add(hit.identity); + _hoveredIdentity = null; + notifyListeners(); + return true; + } + if (hit == null || + (hit.kind != TimelineViewportItemKind.primary && + hit.kind != TimelineViewportItemKind.connected)) { + return false; + } + final identity = hit.identity; + final selected = _selectedIdentities.contains(identity) + ? _selectedIdentities.toList() + : [identity]; + if (selected.any((id) => id is! ElementHandle && id is! LayoutBodyId)) { + return false; + } + final editing = _editing!; + final components = editing.engine.currentComponents!; + final projection = components.semanticProjection; + final LayoutMovementPlan movement; + try { + movement = LayoutMovementPlan.build( + projection: projection, + storyline: _storyline, + selected: selected.map( + (id) => id is ElementHandle + ? LayoutBodyId.element(id) + : id as LayoutBodyId, + ), + ); + } on LayoutStructuralError catch (error) { + _dragRejection = error.toString(); + notifyListeners(); + return false; + } + if (movement.carried.any(components.isExpanded)) return false; + final sourceId = identity is ElementHandle + ? LayoutBodyId.element(identity) + : identity as LayoutBodyId; + final sourceRoot = movement.rootForBody[sourceId]!; + final primarySource = movement.primaryRoots.isEmpty + ? null + : (movement.primaryRoots.contains(sourceRoot) + ? sourceRoot + : movement.primaryRoots.first) + .owner; + _drag = _TimelineDrag( + engine: editing.engine, + components: components, + source: identity is LayoutBodyId + ? projection.scene.bodies[identity] + : null, + primarySource: primarySource, + movement: movement, + geometry: _geometry, + camera: _camera, + viewport: viewport, + position: position, + createConnectionId: editing.createConnectionId, + createElementId: editing.createElementId, + ); + _retainedTrimOutline = null; + _dragRejection = null; + _selectedIdentities + ..clear() + ..addAll(selected); + _hoveredIdentity = null; + notifyListeners(); + return true; + } + + void updateDrag({ + required TimelineViewportRect viewport, + required Offset position, + }) { + _synchronizeEditingRoot(); + if (_componentDrag case final component?) { + final tick = _camera.tickAtScreenX( + position.dx, + viewport, + rounding: TimelineTickRounding.nearest, + ); + final quantum = math.max(1, frameTicks); + final rawDelta = tick - component.pointerTick; + final delta = rawDelta ~/ quantum * quantum; + switch (component.edge) { + case TimelineTrimEdge.leading: + final constrained = delta.clamp( + -component.originalStart, + component.originalDuration - quantum, + ); + component + ..start = component.originalStart + constrained + ..duration = component.originalDuration - constrained; + case TimelineTrimEdge.trailing: + component.duration = math.max( + quantum, + component.originalDuration + delta, + ); + case null: + component.start = math.max(0, component.originalStart + delta); + } + _dragRejection = null; + _notifyViewportChanged(); + return; + } + if (_keyframe case final key?) { + key.update( + camera: _camera, + viewport: viewport, + position: position, + frameTicks: _editing!.engine.kernel.format.frameGrid.quantumTicks, + ); + _dragRejection = key.rejection; + notifyListeners(); + return; + } + if (_trim case final trim?) { + try { + trim.update(camera: _camera, viewport: viewport, position: position); + _trimNavigationEnd = math.max(_trimNavigationEnd ?? 0, contentEndTick); + _dragRejection = trim.rejection; + } catch (error, stack) { + _runEdit('trim', () => _reportEditFailure(error, stack)); + _discardDrag(); + notifyListeners(); + rethrow; + } + _notifyViewportChanged(); + return; + } + final drag = _drag; + if (drag == null) return; + try { + drag.update(camera: _camera, viewport: viewport, position: position); + _dragRejection = drag.rejection; + } catch (error, stack) { + _runEdit('move', () => _reportEditFailure(error, stack)); + _discardDrag(); + notifyListeners(); + rethrow; + } + _notifyViewportChanged(); + } + + /// Re-resolves with the latest camera and pointer before one atomic publish. + /// Invalid targets and no-motion gestures do not create history. + bool finishDrag({ + required TimelineViewportRect viewport, + required Offset position, + }) => _runEdit( + _keyframe != null + ? 'moveKeyframe' + : _trim != null || _componentDrag?.edge != null + ? 'trim' + : 'move', + () => _finishDrag(viewport: viewport, position: position), + ); + + bool _finishDrag({ + required TimelineViewportRect viewport, + required Offset position, + }) { + updateDrag(viewport: viewport, position: position); + if (_componentDrag case final component?) { + try { + if (component.start == component.originalStart && + component.duration == component.originalDuration) { + return false; + } + _commitComponent!( + component.identity, + component.start, + component.duration, + ); + return true; + } on Object catch (error, stack) { + _reportEditFailure(error, stack); + _commandRejection = error.toString(); + return false; + } finally { + if (component.edge case final edge?) { + _retainedTrimOutline = (identity: component.identity, edge: edge); + } + _discardDrag(); + notifyListeners(); + } + } + if (_keyframe case final key?) { + try { + final result = _commit(key.commit); + if (result == null) { + if (key.failure case final failure?) { + _reportEditFailure(failure.error, failure.stack); + } + _playheadTick = key.move.start + key.move.offset; + return false; + } + _version = result.version; + _viewportEngine.adoptLayoutUpdate(result, metrics: metrics); + _selectedKeyframe = ( + element: key.move.element, + offset: key.displayOffset, + ); + return true; + } finally { + _discardDrag(); + notifyListeners(); + } + } + if (_trim case final trim?) { + try { + final result = _commit(trim.commit); + if (result == null) { + if (trim.failure case final failure?) { + _reportEditFailure(failure.error, failure.stack); + } + return false; + } + _version = result.version; + _viewportEngine.adoptLayoutUpdate(result, metrics: metrics); + _selectedIdentities + ..clear() + ..add(trim.identity); + return true; + } finally { + _retainedTrimOutline = (identity: trim.identity, edge: trim.edge); + _discardDrag(); + notifyListeners(); + } + } + final drag = _drag; + if (drag == null) return false; + try { + final result = _commit(drag.commit); + _drag = null; + if (result == null) { + if (drag.failure case final failure?) { + _reportEditFailure(failure.error, failure.stack); + } + return false; + } + _version = result.version; + _viewportEngine.adoptLayoutUpdate(result, metrics: metrics); + _selectedIdentities + ..clear() + ..addAll( + drag.movement.selected.map( + (id) => + (drag.mode == LayoutPreviewMode.primaryInsert && + drag.primaryInsertionRoots.contains(id)) || + (drag.accompanyingRoots.isNotEmpty && + drag.orderedRoots.contains(id)) + ? id.owner + : id, + ), + ); + return true; + } finally { + _discardDrag(); + notifyListeners(); + } + } + + void cancelDrag() { + if (!isDragging) return; + if (_keyframe case final key?) { + _playheadTick = key.move.start + key.move.offset; + } + _discardDrag(); + _dragRejection = null; + notifyListeners(); + } + + void _discardDrag() { + _trimNavigationEnd = null; + _discardIncomingClip(); + _keyframe?.cancel(); + _keyframe = null; + _drag?.cancel(); + _drag = null; + _trim?.cancel(); + _trim = null; + _componentDrag = null; + } + + /// Only direct, collapsed elements of the opened definition expose handles. + /// A multi-selection edge edits that one clip, never implicitly group-trims. + bool canTrim(Object identity) { + final editing = _editing; + if (editing == null) return false; + if (identity case final LayoutBodyId id when !id.isSemantic) { + return _commitComponent != null && + _resolveComponent?.call(id, _version.kernelVersion.query()) != null; + } + if (_version.kernelVersion.query().storylineTimeDomain(_storyline) != + TimeDomain.serial) { + return false; + } + final id = switch (identity) { + ElementHandle h => LayoutBodyId.element(h), + LayoutBodyId id when id.isSemantic && id.context == null => id, + _ => null, + }; + return id != null && !editing.engine.currentComponents!.isExpanded(id); + } + + /// The nearest inner edge wins on a narrow clip; the midpoint is trailing. + /// Bounds come from the same resident frame as painting (not viewport edges). + /// Only the clip body owns trim targets; reserved headers and gaps do not. + TimelineTrimEdge? trimEdgeAt({ + required TimelineHitResult? hit, + required Offset position, + required double extent, + }) { + if (!extent.isFinite || extent < 0) { + throw ArgumentError.value(extent, 'extent'); + } + if (extent == 0 || + hit == null || + !canTrim(hit.identity) || + hit.kind == TimelineViewportItemKind.transition) { + return null; + } + final layout = clipLayout( + hit.bounds, + owner: elementForIdentity(hit.identity), + ); + if (!layout.toViewport(layout.body).contains(position)) return null; + final left = position.dx - hit.bounds.left; + final right = hit.bounds.right - position.dx; + if (left >= 0 && left < extent && left < right) { + return TimelineTrimEdge.leading; + } + if (right >= 0 && right < extent) return TimelineTrimEdge.trailing; + return null; + } + + void undo() => _moveHistory(undo: true); + void redo() => _moveHistory(undo: false); + + List? _commandSelection() { + _synchronizeEditingRoot(); + if (_editing == null || isDragging || _selectedIdentities.isEmpty) { + return null; + } + final q = _version.kernelVersion.query(); + final result = []; + for (final identity in _selectedIdentities) { + if (!canTrim(identity)) return null; + final h = elementForIdentity(identity); + if (h == null || + q.ownerOf(h) == null || + q.localContext(h).storyline != _storyline) { + return null; + } + result.add(h); + } + return result; + } + + bool get canDeleteSelection => _commandSelection() != null; + bool get canCutSelection { + return _cutElementsAtPlayhead() != null; + } + + List? _cutElementsAtPlayhead() { + _synchronizeEditingRoot(); + final q = _version.kernelVersion.query(); + if (_editing == null || + isDragging || + q.storylineTimeDomain(_storyline) != TimeDomain.serial) { + return null; + } + final result = []; + final seen = {}; + + // With no explicit target, the clip under the Primary playhead is the + // editing default. + if (_selectedIdentities.isEmpty) { + final primary = q + .storylineAnchorPoint( + storyline: _storyline, + preferredTick: _playheadTick, + rangeStart: _playheadTick, + rangeEnd: _playheadTick, + ) + ?.anchor; + if (primary != null && + q.element(primary).structure != ElementStructure.gap && + canTrim(primary)) { + final start = q.localContext(primary).start; + if (_playheadTick > start && + _playheadTick - start < q.element(primary).duration) { + result.add(primary); + } + } + return result.isEmpty ? null : result; + } + + // Any selection is explicit: cut only selected clips intersecting the + // playhead, without implicitly adding the Primary clip below them. + for (final identity in _selectedIdentities) { + final element = elementForIdentity(identity); + if (element == null || + !seen.add(element) || + q.ownerOf(element) == null || + q.element(element).structure == ElementStructure.gap || + !canTrim(identity)) { + continue; + } + final connection = q.connectionForTarget(element); + final local = q.localContext(element); + if (connection == null && local.storyline != _storyline) continue; + final start = connection == null ? local.start : q.absoluteStart(element); + if (_playheadTick > start && + _playheadTick - start < q.element(element).duration) { + result.add(element); + } + } + return result.isEmpty ? null : result; + } + + /// Explicit command only: dragging never calls this blade entry point. + bool cutSelectionAtPlayhead() => + _runEdit('split', () => _editSelection(cut: true)); + + /// Removes the selected clips' leading portions up to the playhead. + bool trimLeftAtPlayhead() => _runEdit( + 'trim', + () => _editSelection(cut: true, trim: LayoutTrimEdge.leading), + ); + + /// Removes the selected clips' trailing portions after the playhead. + bool trimRightAtPlayhead() => _runEdit( + 'trim', + () => _editSelection(cut: true, trim: LayoutTrimEdge.trailing), + ); + + /// Whole owners and their descendants; no implicit gap or anchor handoff. + bool deleteSelection() => _runEdit('delete', _deleteSelection); + + bool _deleteSelection() { + _synchronizeEditingRoot(); + final key = _selectedKeyframe; + if (key == null) return _editSelection(cut: false); + if (_editing == null || isDragging) return false; + try { + final move = LayoutKeyframeMove.capture( + projection: _editing!.engine.currentComponents!.semanticProjection, + element: key.element, + offset: key.offset, + ); + final result = _commit( + move.previewDelete(engine: _editing!.engine).commit, + ); + applyLayout(result); + _selectedKeyframe = null; + _commandRejection = null; + notifyListeners(); + return true; + } on LayoutStructuralError catch (error, stack) { + _reportEditFailure(error, stack); + _commandRejection = error.message; + notifyListeners(); + return false; + } + } + + bool _editSelection({required bool cut, LayoutTrimEdge? trim}) { + final elements = cut ? _cutElementsAtPlayhead() : _commandSelection(); + if (elements == null) return false; + return _runEdit( + trim == null ? (cut ? 'split' : 'delete') : 'trim', + () => _editElements(elements, cut: cut, trim: trim), + elements: elements, + ); + } + + bool _editElements( + List elements, { + required bool cut, + LayoutTrimEdge? trim, + }) { + final hadSelection = _selectedIdentities.isNotEmpty; + final editing = _editing!; + final projection = editing.engine.currentComponents!.semanticProjection; + LayoutConnectionEditPreview? preview; + _commandRejection = null; + try { + final created = []; + Map fragments = const {}; + if (trim != null) { + preview = const LayoutIntervalEdit().previewTrimAtTime( + kernel: editing.engine.kernel, + engine: editing.engine, + projection: projection, + storyline: _storyline, + elements: elements, + tick: _playheadTick, + edge: trim, + createElementId: editing.createElementId, + ); + } else if (cut) { + final blade = LayoutBladeEdit.selectionAtTime( + version: _version.kernelVersion, + storyline: _storyline, + elements: elements, + tick: _playheadTick, + createElementId: () { + final id = editing.createElementId(); + created.add(id); + return id; + }, + createConnectionId: editing.createConnectionId, + ); + fragments = blade.selectionFragments; + preview = blade.preview( + kernel: editing.engine.kernel, + engine: editing.engine, + projection: projection, + ); + } else { + preview = + LayoutCascadeDeleteEdit.selection( + version: _version.kernelVersion, + storyline: _storyline, + elements: elements, + ).preview( + kernel: editing.engine.kernel, + engine: editing.engine, + projection: projection, + ); + } + final result = _commit(preview.commit); + preview = null; + _remapSelection(_version, result.version); + _version = result.version; + _viewportEngine.adoptLayoutUpdate(result, metrics: metrics); + _hoveredIdentity = null; + _dragRejection = null; + if (fragments.isNotEmpty) _onElementsSplit?.call(fragments); + if (cut && hadSelection) { + final q = _version.kernelVersion.query(); + for (final id in created) { + final h = q.elementById(id)!; + _selectedIdentities.add( + q.connectionForTarget(h) == null ? h : LayoutBodyId.element(h), + ); + } + } else if (!cut) { + _selectedIdentities.clear(); + } + return true; + } on TimelineModelException catch (error, stack) { + _reportEditFailure(error, stack); + _commandRejection = error.toString(); + } on LayoutException catch (error, stack) { + _reportEditFailure(error, stack); + _commandRejection = error.toString(); + } on StateError catch (error, stack) { + _reportEditFailure(error, stack); + _commandRejection = error.toString(); + } on ArgumentError catch (error, stack) { + _reportEditFailure(error, stack); + _commandRejection = error.toString(); + } finally { + preview?.cancel(); + notifyListeners(); + } + return false; + } + + void _moveHistory({required bool undo}) => + _runEdit(undo ? 'undo' : 'redo', () => _moveHistoryImpl(undo: undo)); + + void _moveHistoryImpl({required bool undo}) { + _synchronizeEditingRoot(); + final editing = _editing; + if (editing == null) return; + _discardDrag(); + if (undo ? canUndo : canRedo) { + final external = undo ? _undo : _redo; + if (external != null) { + external(); + _synchronizeEditingRoot(); + } else { + final result = _commit( + undo ? editing.engine.undo : editing.engine.redo, + ); + _version = result.version; + _viewportEngine.adoptLayoutUpdate(result, metrics: metrics); + } + _clearInteractionState(); + } + _dragRejection = null; + _commandRejection = null; + notifyListeners(); + } + + @override + void dispose() { + _discardDrag(); + _contentChanges.dispose(); + _editingChanges.dispose(); + _playheadChanges.dispose(); + super.dispose(); + } + + /// Updates selection without creating Kernel or Layout history. + void setSelection(Iterable identities) { + _synchronizeEditingRoot(); + final hadKeyframe = _selectedKeyframe != null; + final hadTrimOutline = _retainedTrimOutline != null; + _selectedKeyframe = null; + _retainedTrimOutline = null; + final next = identities + .where( + (identity) => + (identity is! ElementHandle && identity is! LayoutBodyId || + elementForIdentity(identity) != null) && + !isExpandedComponentOwner(identity), + ) + .toSet(); + if (setEquals(_selectedIdentities, next) && + !hadKeyframe && + !hadTrimOutline) { + return; + } + _commandRejection = null; + _selectedIdentities + ..clear() + ..addAll(next); + notifyListeners(); + } + + void clearSelection() => setSelection(_emptySelection); + + void setHoveredIdentity(Object? identity) { + if (_hoveredIdentity == identity) return; + _hoveredIdentity = identity; + _notifyViewportChanged(); + } + + bool isSelected(Object identity) => _selectedIdentities.contains(identity); + + /// Screen-rectangle selection against the current resident Layout frame. + /// Half-open overlap selects visible items, deduplicating segmented identities. + Set hitTestRect({ + required TimelineViewportRect viewport, + required Rect rectangle, + }) { + if (!rectangle.isFinite) throw ArgumentError.value(rectangle, 'rectangle'); + final clipped = rectangle.intersect( + Rect.fromLTWH( + viewport.left, + viewport.top, + viewport.width, + viewport.height, + ), + ); + final result = {}; + if (clipped.isEmpty) return result; + final frame = project(viewport); + for (var index = 0; index < frame.length; index++) { + final identity = frame.identityAt(index); + if (isExpandedComponentOwner(identity)) continue; + final rect = presentationBoundsAt(frame, index); + if (!rect.isEmpty && rect.overlaps(clipped)) { + result.add(identity); + } + } + return result; + } + + /// Hit-tests in reverse paint order using the same transient projection that + /// painting consumes. Runtime is `O(V)` for `V` resident items and allocates + /// only the successful result. + TimelineHitResult? hitTest({ + required TimelineViewportRect viewport, + required Offset position, + }) { + if (!position.dx.isFinite || !position.dy.isFinite) { + throw ArgumentError.value(position, 'position', 'must be finite'); + } + if (position.dx < viewport.left || + position.dx >= viewport.right || + position.dy < viewport.top || + position.dy >= viewport.bottom) { + return null; + } + final frame = project(viewport); + for (var index = frame.length - 1; index >= 0; index--) { + final identity = frame.identityAt(index); + if (isExpandedComponentOwner(identity)) continue; + final bounds = presentationBoundsAt(frame, index); + final left = bounds.left; + final top = bounds.top; + final width = bounds.width; + final height = bounds.height; + if (width <= 0 || height <= 0) continue; + final right = left + width; + final bottom = top + height; + if (position.dx < left || + position.dx >= right || + position.dy < top || + position.dy >= bottom) { + continue; + } + return TimelineHitResult( + identity: identity, + kind: frame.kindAt(index), + segment: frame.segmentAt(index), + signedLane: frame.signedLaneAt(index), + bounds: bounds, + ); + } + return null; + } + + void _clearInteractionState() { + _selectedKeyframe = null; + _retainedTrimOutline = null; + _selectedIdentities.clear(); + _hoveredIdentity = null; + _commandRejection = null; + } +} + +bool _sameCamera(TimelineCamera left, TimelineCamera right) => + left.baseTick == right.baseTick && + left.fractionalTick == right.fractionalTick && + left.pixelsPerTick == right.pixelsPerTick && + left.verticalOffset == right.verticalOffset; diff --git a/packages/cutdex_timeline_ui/lib/src/timeline_view_drag.dart b/packages/cutdex_timeline_ui/lib/src/timeline_view_drag.dart new file mode 100644 index 0000000..65116aa --- /dev/null +++ b/packages/cutdex_timeline_ui/lib/src/timeline_view_drag.dart @@ -0,0 +1,533 @@ +part of 'timeline_view_controller.dart'; + +/// Only pointer bookkeeping and dispatch live here. The canonical Layout edit +/// preview supplies both the invisible occupancy and the exact commit result. +final class _TimelineDrag { + _TimelineDrag({ + required this.engine, + required this.components, + this.source, + this.primarySource, + required this.movement, + required this.geometry, + required TimelineCamera camera, + required this.viewport, + required this.position, + required this.createConnectionId, + required this.createElementId, + }) : base = engine.current!, + preview = TimelineLayoutPreview( + base: engine.current!, + policy: engine.current!.policy, + components: components, + ), + anchor = TimelineViewportDragAnchor.capture( + camera: camera, + viewport: viewport, + screenX: position.dx, + screenY: position.dy, + sourceStart: + source?.start ?? + engine.current!.kernelVersion + .query() + .positionOf(primarySource!) + .position, + sourceTop: source == null + ? geometry.primaryClipTopFor(primarySource!) + : engine.current!.placementOf(source.id).top, + ) { + // UI supplies an explicit chronological sequence; Layout never infers one. + orderedRoots = + List.of( + primarySource != null + ? movement.primaryRoots + : selection!.movementRoots, + )..sort((a, b) { + if (primarySource != null) { + final q = base.kernelVersion.query(); + return q + .positionOf(a.owner) + .index + .compareTo(q.positionOf(b.owner).index); + } + final byTime = base.scene.bodies[a]!.start.compareTo( + base.scene.bodies[b]!.start, + ); + return byTime != 0 + ? byTime + : base.orderRankRoot[a]!.compareTo(base.orderRankRoot[b]!); + }); + } + + final TimelineLayoutEngine engine; + final TimelineLayoutComponents components; + final LayoutVersion base; + final LayoutBody? source; + final ElementHandle? primarySource; + LayoutBodyId get sourceId => + source?.id ?? LayoutBodyId.element(primarySource!); + final TimelineViewportGeometry geometry; + final LayoutMovementPlan movement; + LayoutConnectionSelection? get selection => movement.connectionSelection; + List get accompanyingRoots => movement.accompanyingRoots; + List get carried => movement.carried; + int? get minimumTargetStart => + movement.bounds.minimumTargetStart(anchor.sourceStart); + late final List orderedRoots; + Map get rootForBody => movement.rootForBody; + late final List primaryInsertionRoots = + [...orderedRoots, ...accompanyingRoots]..sort((a, b) { + final q = base.kernelVersion.query(); + final time = q + .localContext(a.owner) + .start + .compareTo(q.localContext(b.owner).start); + if (time != 0) return time; + final order = [...orderedRoots, ...accompanyingRoots]; + return order.indexOf(a).compareTo(order.indexOf(b)); + }); + + bool get hasAmbiguousPrimaryOrder { + for (var i = 1; i < orderedRoots.length; i++) { + final a = base.scene.bodies[orderedRoots[i - 1]]!; + final b = base.scene.bodies[orderedRoots[i]]!; + if (a.start == b.start && a.partition.stack != b.partition.stack) { + return true; + } + } + return false; + } + + final TimelineLayoutPreview preview; + final TimelineViewportDragAnchor anchor; + final ConnectionId Function() createConnectionId; + final ElementId Function() createElementId; + ElementId? _gapId; + ConnectionId? _connectionId; + TimelineViewportRect viewport; + Offset position; + TimelineCamera? _lastCamera; + LayoutConnectionEditPreview? _connection; + LayoutConnectionEditPreview? _tailEdit; + final ghostById = {}; + LayoutGhost? get ghost => ghostById[sourceId]; + LayoutPreviewMode mode = LayoutPreviewMode.invalid; + String? rejection; + ({Object error, StackTrace stack})? failure; + LayoutVersion get displayVersion => _connection?.result.version ?? base; + bool get isPrimaryGap => + primarySource != null && + base.kernelVersion.query().element(primarySource!).structure == + ElementStructure.gap; + late final bool primaryOnly = + primarySource != null && + (orderedRoots.length > 1 || + accompanyingRoots.isNotEmpty || + isPrimaryGap || + base.kernelVersion.query().hasConnectedClips(primarySource!)); + + void _clearPrepared() { + if (_connection?.hasTailGap ?? false) _tailEdit = _connection; + _connection?.cancel(); + _connection = null; + ghostById.clear(); + rejection = null; + failure = null; + mode = LayoutPreviewMode.invalid; + } + + void update({ + required TimelineCamera camera, + required TimelineViewportRect viewport, + required Offset position, + }) { + final lastCamera = _lastCamera; + if (lastCamera != null && + _sameCamera(lastCamera, camera) && + this.position == position && + this.viewport.left == viewport.left && + this.viewport.top == viewport.top && + this.viewport.width == viewport.width && + this.viewport.height == viewport.height) { + return; + } + _lastCamera = camera; + this.viewport = viewport; + this.position = position; + final previousEdit = _connection ?? _tailEdit; + _clearPrepared(); + if (viewport.width <= 0 || viewport.height <= 0) { + preview.invalid(); + rejection = 'Outside timeline / 已离开时间线'; + return; + } + // Overshoot remains a valid drag on both axes. The interaction region pans + // the camera at the edge; resolving against the clamped pointer lets that + // camera movement keep advancing the target and makes an outside release + // commit the final preview instead of snapping back. + final targetX = position.dx + .clamp( + viewport.left, + math.max(viewport.left, viewport.right - 0.000001), + ) + .toDouble(); + final targetY = position.dy + .clamp(viewport.top, math.max(viewport.top, viewport.bottom - 0.000001)) + .toDouble(); + final pointerCoordinates = anchor.resolve( + camera: camera, + viewport: viewport, + screenX: targetX, + screenY: targetY, + timeRounding: TimelineTickRounding.nearest, + verticalRounding: TimelineTickRounding.nearest, + ); + final coordinates = anchor.resolve( + camera: camera, + viewport: viewport, + screenX: targetX, + screenY: targetY, + timeRounding: TimelineTickRounding.nearest, + verticalRounding: TimelineTickRounding.nearest, + minimumTargetStart: minimumTargetStart, + ); + if (pointerCoordinates.timeDelta == 0 && + coordinates.depthDelta == 0 && + _tailEdit == null && + accompanyingRoots.isEmpty) { + preview.cancel(); + return; + } + final targetPolicy = LayoutTargetPolicy( + primaryTop: geometry.primaryTop, + primaryBottom: geometry.primaryTop + geometry.primaryHeight, + ); + try { + if (targetPolicy.containsPrimary(coordinates.pointerY)) { + preview.cancel(); + if (primarySource == null && hasAmbiguousPrimaryOrder) { + throw const LayoutStructuralError( + 'same-time roots on different sides require an explicit serial order', + ); + } + final target = const TimelineLayoutTargetResolver() + .resolveOpenedPrimaryDropTarget( + projection: components.semanticProjection, + pointerTick: camera.tickAtScreenX( + targetX, + viewport, + rounding: TimelineTickRounding.nearest, + ), + ); + _connection = + LayoutPrimaryDropEdit( + target: target, + orderedRoots: orderedRoots.map((id) => id.owner), + accompanyingRoots: accompanyingRoots.map((id) => id.owner), + movementReference: primarySource, + serialInsertionOrder: accompanyingRoots.isEmpty + ? null + : primaryInsertionRoots.map((id) => id.owner), + ).preview( + kernel: engine.kernel, + engine: engine, + projection: components.semanticProjection, + primaryTop: geometry.primaryTop, + previousEdit: previousEdit, + ); + if (_connection == null) { + if (primarySource != null) _primaryGhosts(coordinates); + return; + } + mode = LayoutPreviewMode.primaryInsert; + _primaryGhosts(coordinates); + return; + } + if (primarySource != null && accompanyingRoots.isNotEmpty) { + preview.cancel(); + final q = base.kernelVersion.query(); + final referenceTick = checkedLayoutAdd( + q.localContext(primarySource!).start, + coordinates.timeDelta, + 'mixed reference tick', + ); + final target = const TimelineLayoutTargetResolver() + .resolveOpenedPrimaryDropTarget( + projection: components.semanticProjection, + pointerTick: checkedLayoutAdd( + referenceTick, + q.element(primarySource!).duration ~/ 2, + 'mixed boundary tick', + ), + ); + _connection = + LayoutPrimaryDropEdit( + target: target, + orderedRoots: orderedRoots.map((id) => id.owner), + accompanyingRoots: accompanyingRoots.map((id) => id.owner), + movementReference: primarySource, + ).preview( + kernel: engine.kernel, + engine: engine, + projection: components.semanticProjection, + primaryTop: geometry.primaryTop, + ); + mode = LayoutPreviewMode.connected; + _primaryGhosts(coordinates, originalGeometry: true); + return; + } + if (primarySource != null) { + if (primaryOnly) { + // Keep the original authoritative occupancy until another valid + // Primary preview replaces it. An off-axis release cannot publish. + preview.invalid(); + rejection = orderedRoots.length > 1 || accompanyingRoots.isNotEmpty + ? 'Primary groups can only be placed on Primary / 主轴多选只能放置在主轴' + : isPrimaryGap + ? 'Gaps can only be placed on Primary / gap 只能放置在主轴' + : 'Clips with connected clips can only be placed on Primary / ' + '带连接片段的主片段只能放置在主轴'; + _primaryGhosts(coordinates); + return; + } + _connection = const LayoutPrimaryDetachEdit().preview( + previousEdit: previousEdit, + kernel: engine.kernel, + engine: engine, + projection: components.semanticProjection, + source: primarySource!, + connectionId: _connectionId ??= createConnectionId(), + start: coordinates.primaryPosition, + side: coordinates.pointerY < targetPolicy.primaryTop + ? ConnectionSide.above + : ConnectionSide.below, + requestedTop: coordinates.requestedTop, + createGapId: () => _gapId ??= createElementId(), + ); + mode = LayoutPreviewMode.connected; + final prepared = displayVersion; + ghostById[sourceId] = LayoutGhost( + source: sourceId, + body: prepared.scene.bodies[sourceId]!, + top: coordinates.requestedTop, + ); + return; + } + final source = this.source!; + final selection = this.selection!; + _connection = const LayoutTailConnectionMove().previewIfNeeded( + originSide: source.partition.stack.side, + kernel: engine.kernel, + engine: engine, + selection: selection, + timeDelta: coordinates.timeDelta, + topDelta: coordinates.depthDelta, + destinationSide: coordinates.pointerY < targetPolicy.primaryTop + ? ConnectionSide.above + : ConnectionSide.below, + createGapId: () => _gapId ??= createElementId(), + previousEdit: previousEdit, + ); + if (_connection != null) { + preview.cancel(); + mode = LayoutPreviewMode.connected; + _primaryGhosts(coordinates, connectedGroup: true); + return; + } + { + final side = coordinates.pointerY < targetPolicy.primaryTop + ? ConnectionSide.above + : ConnectionSide.below; + final oldSide = source.partition.stack.side; + final audioAbove = + oldSide == ConnectionSide.below && + side == ConnectionSide.above && + source.placementClass == LayoutPlacementClass.audioOnly; + if (side == oldSide || audioAbove) { + final frame = preview.connectedSelection( + selection: selection, + timeDelta: coordinates.timeDelta, + depthDelta: oldSide == ConnectionSide.above + ? -coordinates.depthDelta + : coordinates.depthDelta, + reservationOrdinal: 0, + audioOutsideOverlaps: audioAbove, + ); + mode = frame.mode; + if (mode != LayoutPreviewMode.connected) { + rejection = 'Placement blocked / 放置位置无效'; + return; + } + _connection = const LayoutRigidConnectionMove().previewResolved( + kernel: engine.kernel, + engine: engine, + selection: selection, + target: frame.groupTarget!, + timeDelta: coordinates.timeDelta, + ); + for (final ghost in frame.ghosts) { + ghostById[ghost.source] = ghost; + } + } else { + preview.cancel(); + final oldPlacement = base.placementOf(source.id); + final oldBoundary = + base.policy.stacks[source.partition.stack]!.primaryBoundary; + final newStack = LayoutStackKey( + scope: source.partition.stack.scope, + side: side, + ); + final newBoundary = base.policy.stacks[newStack]!.primaryBoundary; + final oldInner = oldSide == ConnectionSide.above + ? oldBoundary - oldPlacement.bottom + : oldPlacement.top - oldBoundary; + final newInner = side == ConnectionSide.above + ? newBoundary - coordinates.requestedTop - source.height + : coordinates.requestedTop - newBoundary; + _connection = const LayoutConnectedSideMove().preview( + previousEdit: previousEdit, + kernel: engine.kernel, + engine: engine, + selection: selection, + destinationSide: side, + timeDelta: coordinates.timeDelta, + depthDelta: newInner - oldInner, + ); + mode = LayoutPreviewMode.connected; + } + } + if (ghostById.isEmpty) { + final prepared = displayVersion; + final query = prepared.kernelVersion.query(); + for (final id in carried) { + final original = base.scene.bodies[id]!; + final start = query.absoluteStart(id.owner); + final top = + coordinates.requestedTop + + prepared.placementOf(id).top - + prepared.placementOf(source.id).top; + ghostById[id] = LayoutGhost( + source: id, + body: original.copyWith( + start: start, + end: checkedLayoutAdd( + start, + original.end - original.start, + 'ghost end', + ), + ), + top: top, + ); + } + } + } on LayoutPolicyViolation catch (error, stack) { + _reject(error, stack); + // A rejected placement is not a rejected pointer movement. Keep Primary + // sources visible over their original reservation until a valid target. + if (primarySource != null) { + _primaryGhosts( + coordinates, + originalGeometry: accompanyingRoots.isNotEmpty, + ); + } + } on LayoutStructuralError catch (error, stack) { + _reject(error, stack); + } on TimelineModelException catch (error, stack) { + // A pointer may enter a boundary rejected by Kernel, such as transition + // overlap. Keep the gesture alive so it can return to a valid target. + _reject(error, stack); + } + } + + void _primaryGhosts( + TimelineViewportDragCoordinates coordinates, { + bool connectedGroup = false, + bool originalGeometry = false, + }) { + final q = (originalGeometry ? base : displayVersion).kernelVersion.query(); + final captureMixed = + !originalGeometry && + accompanyingRoots.isNotEmpty && + mode == LayoutPreviewMode.primaryInsert; + int oldTop(LayoutBodyId id) => + primarySource != null && orderedRoots.contains(id) + ? geometry.primaryClipTopFor(id.owner) + : base.placementOf(id).top; + final sourceRoot = rootForBody[sourceId]!; + final top = + coordinates.requestedTop - (oldTop(sourceId) - oldTop(sourceRoot)); + final shift = connectedGroup + ? 0 + : checkedLayoutSubtract( + coordinates.targetStart, + q.localContext(sourceId.owner).start, + 'pointer ghost shift', + ); + for (final id in carried) { + final original = base.scene.bodies[id]; + final start = checkedLayoutAdd( + q.localContext(id.owner).start, + shift, + 'pointer ghost start', + ); + final end = checkedLayoutAdd( + start, + q.element(id.owner).duration, + 'pointer ghost end', + ); + // Primary is not a connected scene body. This record is display-only; + // it is never supplied to a Layout solver or a Kernel edit. + final body = + (captureMixed && accompanyingRoots.contains(id) ? null : original) + ?.copyWith(start: start, end: end) ?? + LayoutBody( + id: id, + start: start, + end: end, + height: geometry.primaryClipHeightFor(id.owner), + partition: LayoutPartition( + stack: base.policy.stacks.keys.first, + domain: base.policy.stacks.values.first.domains.first, + ), + placementClass: + components.semanticProjection.media + ?.forElement(id.owner) + .placementClass ?? + LayoutPlacementClass.visualLike, + ); + ghostById[id] = LayoutGhost( + source: id, + body: body, + // Connected roots retain their group geometry. Only a serial landing + // aligns independent roots on Primary while retaining child offsets. + top: connectedGroup + ? coordinates.requestedTop + oldTop(id) - oldTop(sourceId) + : top + + oldTop(id) - + (captureMixed + ? oldTop(rootForBody[id]!) + : primarySource != null + ? oldTop(sourceRoot) + : oldTop(rootForBody[id]!)), + ); + } + } + + void _reject(Object error, StackTrace stack) { + _clearPrepared(); + failure = (error: error, stack: stack); + preview.invalid(); + rejection = error.toString(); + } + + LayoutApplyResult? commit() { + final result = _connection?.commit(); + _connection = null; + return result; + } + + void cancel() { + _clearPrepared(); + preview.cancel(); + } +} diff --git a/packages/cutdex_timeline_ui/lib/src/timeline_view_keyframe.dart b/packages/cutdex_timeline_ui/lib/src/timeline_view_keyframe.dart new file mode 100644 index 0000000..de673b0 --- /dev/null +++ b/packages/cutdex_timeline_ui/lib/src/timeline_view_keyframe.dart @@ -0,0 +1,174 @@ +part of 'timeline_view_controller.dart'; + +final class TimelineKeyframeHit { + const TimelineKeyframeHit({ + required this.identity, + required this.element, + required this.offset, + required this.start, + }); + final Object identity; + final ElementHandle element; + final int offset; + final int start; +} + +extension _KeyframeHitGeometry on TimelineViewController { + TimelineKeyframeHit? _keyframeAt({ + required TimelineViewportRect viewport, + required Offset position, + required double headerHeight, + }) { + final hit = hitTest(viewport: viewport, position: position); + if (hit == null || + !canTrim(hit.identity) || + hit.bounds.height < headerHeight + 14) { + return null; + } + final element = switch (hit.identity) { + ElementHandle id => id, + LayoutBodyId id when id.context == null && id.isSemantic => id.owner, + _ => null, + }; + if (element == null) return null; + final layout = clipLayout( + hit.bounds, + owner: element, + nameHeight: headerHeight, + ); + if (layout.body.height < headerHeight + 14) return null; + final markerY = layout.bounds.top + layout.keyframeCenter.dy; + final q = _version.kernelVersion.query(); + final record = q.element(element); + if (record.duration <= 0 || hit.bounds.width < 2) return null; + final curves = []; + record.parameters?.forEach((_, curve) => curves.add(curve)); + final ticksPerPixel = record.duration / hit.bounds.width; + final local = (position.dx - hit.bounds.left) * ticksPerPixel; + final offsets = TimelineSourceClock(record).keyframeOffsets( + curves, + start: (local - 10 * ticksPerPixel).floor(), + end: (local + 10 * ticksPerPixel).ceil() + 1, + ); + int? nearest; + var distance = double.infinity; + for (final offset in offsets) { + final x = hit.bounds.left + offset / ticksPerPixel; + final d = (position.dx - x).abs() + (position.dy - markerY).abs(); + if (d <= 10 && d < distance) { + nearest = offset; + distance = d; + } + } + return nearest == null + ? null + : TimelineKeyframeHit( + identity: hit.identity, + element: element, + offset: nearest, + start: q.localContext(element).start, + ); + } +} + +final class _TimelineKeyframeDrag { + _TimelineKeyframeDrag({ + required this.engine, + required TimelineKeyframeHit hit, + required TimelineCamera camera, + required this.viewport, + required this.position, + }) : base = engine.current!, + move = LayoutKeyframeMove.capture( + projection: engine.currentComponents!.semanticProjection, + element: hit.element, + offset: hit.offset, + ), + anchor = TimelineViewportDragAnchor.capture( + camera: camera, + viewport: viewport, + screenX: position.dx, + screenY: position.dy, + sourceStart: hit.start + hit.offset, + sourceTop: 0, + ), + displayOffset = hit.offset; + final TimelineLayoutEngine engine; + final LayoutVersion base; + final LayoutKeyframeMove move; + final TimelineViewportDragAnchor anchor; + TimelineViewportRect viewport; + Offset position; + LayoutConnectionEditPreview? _prepared; + int displayOffset; + String? rejection; + ({Object error, StackTrace stack})? failure; + TimelineCamera? _lastCamera; + LayoutPreviewMode get mode => rejection == null + ? LayoutPreviewMode.connected + : LayoutPreviewMode.invalid; + LayoutVersion get displayVersion => _prepared?.result.version ?? base; + + void update({ + required TimelineCamera camera, + required TimelineViewportRect viewport, + required Offset position, + required int frameTicks, + }) { + if (_lastCamera case final last?) { + if (_sameCamera(last, camera) && + this.position == position && + this.viewport.left == viewport.left && + this.viewport.top == viewport.top && + this.viewport.width == viewport.width && + this.viewport.height == viewport.height) { + return; + } + } + _lastCamera = camera; + this.viewport = viewport; + this.position = position; + cancel(); + rejection = null; + failure = null; + displayOffset = move.offset; + try { + final delta = anchor + .resolve( + camera: camera, + viewport: viewport, + screenX: position.dx, + screenY: position.dy, + timeRounding: TimelineTickRounding.nearest, + verticalRounding: TimelineTickRounding.nearest, + ) + .timeDelta; + if (delta == 0) return; + final target = move.constrainOffset( + checkedLayoutAdd(move.offset, delta, 'keyframe drag'), + frameTicks: frameTicks, + ); + _prepared = move.preview(engine: engine, targetOffset: target); + displayOffset = target; + } on LayoutException catch (error, stack) { + failure = (error: error, stack: stack); + rejection = error.toString(); + } on ArgumentError catch (error, stack) { + failure = (error: error, stack: stack); + rejection = error.toString(); + } + } + + LayoutApplyResult? commit() { + final prepared = _prepared; + if (prepared == null) return null; + final result = prepared.commit(); + _prepared = null; + return result; + } + + void cancel() { + _prepared?.cancel(); + _prepared = null; + } +} diff --git a/packages/cutdex_timeline_ui/lib/src/timeline_view_trim.dart b/packages/cutdex_timeline_ui/lib/src/timeline_view_trim.dart new file mode 100644 index 0000000..3d09230 --- /dev/null +++ b/packages/cutdex_timeline_ui/lib/src/timeline_view_trim.dart @@ -0,0 +1,138 @@ +part of 'timeline_view_controller.dart'; + +/// Pointer intent only: every frame is a fresh Kernel edit from the same base, +/// resolved and prepared by LayoutIntervalEdit. No mutable DTO or UI history. +final class _TimelineTrim { + _TimelineTrim({ + required this.engine, + required this.identity, + required this.edge, + required this.createElementId, + required TimelineCamera camera, + required this.viewport, + required this.position, + }) : base = engine.current!, + projection = engine.currentComponents!.semanticProjection, + anchor = TimelineViewportDragAnchor.capture( + camera: camera, + viewport: viewport, + screenX: position.dx, + screenY: position.dy, + sourceStart: 0, + sourceTop: 0, + ); + + final TimelineLayoutEngine engine; + final LayoutVersion base; + final TimelineLayoutSceneProjection projection; + final Object identity; + final TimelineTrimEdge edge; + final ElementId Function() createElementId; + final TimelineViewportDragAnchor anchor; + ElementHandle get element => switch (identity) { + ElementHandle h => h, + LayoutBodyId id => id.owner, + _ => throw StateError('trim requires an element'), + }; + TimelineViewportRect viewport; + Offset position; + TimelineCamera? _lastCamera; + LayoutConnectionEditPreview? _prepared; + String? rejection; + ({Object error, StackTrace stack})? failure; + LayoutPreviewMode get mode => rejection == null + ? LayoutPreviewMode.connected + : LayoutPreviewMode.invalid; + LayoutVersion get displayVersion => _prepared?.result.version ?? base; + + void update({ + required TimelineCamera camera, + required TimelineViewportRect viewport, + required Offset position, + }) { + if (_lastCamera case final last?) { + if (_sameCamera(last, camera) && + this.position == position && + this.viewport.left == viewport.left && + this.viewport.top == viewport.top && + this.viewport.width == viewport.width && + this.viewport.height == viewport.height) { + return; + } + } + _lastCamera = camera; + this.viewport = viewport; + this.position = position; + cancel(); + rejection = null; + failure = null; + if (viewport.width <= 0 || + viewport.height <= 0 || + position.dy < viewport.top || + position.dy >= viewport.bottom) { + rejection = 'Outside timeline / 已离开时间线'; + return; + } + // Keep an outside horizontal pointer pinned to the visible edge. Camera + // edge scrolling then advances that edge through the source without + // discarding the prepared trim on release. + final targetX = position.dx + .clamp(viewport.left, viewport.right - 0.000001) + .toDouble(); + try { + final delta = anchor + .resolve( + camera: camera, + viewport: viewport, + screenX: targetX, + screenY: position.dy, + timeRounding: TimelineTickRounding.nearest, + verticalRounding: TimelineTickRounding.nearest, + ) + .timeDelta; + if (delta == 0) return; + final record = base.kernelVersion.query().element(element); + final ticks = checkedLayoutAdd( + record.duration, + edge == TimelineTrimEdge.leading ? -delta : delta, + 'trim duration', + ); + _prepared = const LayoutIntervalEdit().previewTrim( + kernel: engine.kernel, + engine: engine, + projection: projection, + element: element, + edge: edge == TimelineTrimEdge.leading + ? LayoutTrimEdge.leading + : LayoutTrimEdge.trailing, + duration: ticks, + createElementId: createElementId, + ); + } on TimelineModelException catch (error, stack) { + failure = (error: error, stack: stack); + rejection = error.toString(); + } on LayoutPolicyViolation catch (error, stack) { + failure = (error: error, stack: stack); + rejection = error.toString(); + } on LayoutStructuralError catch (error, stack) { + failure = (error: error, stack: stack); + rejection = error.toString(); + } on ArgumentError catch (error, stack) { + failure = (error: error, stack: stack); + rejection = error.toString(); + } + } + + LayoutApplyResult? commit() { + final prepared = _prepared; + if (prepared == null) return null; + final result = prepared.commit(); + _prepared = null; + return result; + } + + void cancel() { + _prepared?.cancel(); + _prepared = null; + } +} diff --git a/packages/cutdex_timeline_ui/lib/src/timeline_viewport.dart b/packages/cutdex_timeline_ui/lib/src/timeline_viewport.dart new file mode 100644 index 0000000..b0aa69a --- /dev/null +++ b/packages/cutdex_timeline_ui/lib/src/timeline_viewport.dart @@ -0,0 +1,392 @@ +import 'dart:math' as math; + +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:flutter/scheduler.dart'; +import 'package:flutter/widgets.dart'; + +import 'timeline_edge_scroll.dart'; +import 'timeline_ruler.dart'; +import 'timeline_scrollbars.dart'; +import 'timeline_theme.dart'; +import 'timeline_view_controller.dart'; + +/// Owns effective viewport dimensions, content bounds and camera reconciliation. +final class TimelineViewport extends StatefulWidget { + const TimelineViewport({ + required this.controller, + required this.child, + this.showRuler = true, + this.rulerStyle = TimelineRulerStyle.elapsed, + this.rulerTimecodeLayout = TimelineRulerTimecodeLayout.inline, + this.leadingPadding = 0, + super.key, + }); + final TimelineViewController controller; + final Widget child; + final bool showRuler; + final TimelineRulerStyle rulerStyle; + + /// The label and mark arrangement for the full timecode ruler. + final TimelineRulerTimecodeLayout rulerTimecodeLayout; + + /// Layout space outside the time domain, available to the playhead handle. + final double leadingPadding; + + @override + State createState() => _TimelineViewportState(); +} + +final class _TimelineViewportState extends State + with SingleTickerProviderStateMixin { + LayoutVersion? _version; + Object? _storyline; + TimelineViewportGeometry? _geometry; + double _top = 0, _bottom = 0; + bool _hasConnectedContent = false; + TimelineViewController? _pendingReconcile; + double _playheadDragX = 0; + bool _playheadDragging = false; + TimelineViewportRect? _dragViewport; + late final Ticker _edgeTicker = createTicker(_edgeTick); + Duration _lastEdgeElapsed = Duration.zero; + + void _stopPlayheadDrag() { + _edgeTicker.stop(); + _lastEdgeElapsed = Duration.zero; + _dragViewport = null; + if (_playheadDragging) { + setState(() => _playheadDragging = false); + } + widget.controller.endScrubbing(); + } + + void _syncEdgeScroll() { + final viewport = _dragViewport; + if (!_playheadDragging || + viewport == null || + timelineEdgeVelocity( + _playheadDragX, + viewport.width, + extent: 48, + maxSpeed: 600, + ) == + 0) { + _edgeTicker.stop(); + _lastEdgeElapsed = Duration.zero; + } else if (!_edgeTicker.isActive) { + _lastEdgeElapsed = Duration.zero; + _edgeTicker.start(); + } + } + + void _edgeTick(Duration elapsed) { + final viewport = _dragViewport; + if (!_playheadDragging || viewport == null) { + _edgeTicker.stop(); + return; + } + final velocity = timelineEdgeVelocity( + _playheadDragX, + viewport.width, + extent: 48, + maxSpeed: 600, + ); + final seconds = ((elapsed - _lastEdgeElapsed).inMicroseconds / 1000000) + .clamp(0.0, 0.05); + _lastEdgeElapsed = elapsed; + if (velocity == 0 || seconds == 0) return; + final before = widget.controller.camera; + widget.controller.panBy(horizontalPixels: velocity * seconds); + widget.controller.seekAt( + screenX: _playheadDragX.clamp(0.0, viewport.width), + viewport: viewport, + ); + if (widget.controller.camera == before) _edgeTicker.stop(); + } + + @override + void didUpdateWidget(TimelineViewport oldWidget) { + super.didUpdateWidget(oldWidget); + if (oldWidget.controller != widget.controller) { + _edgeTicker.stop(); + _lastEdgeElapsed = Duration.zero; + _dragViewport = null; + _playheadDragging = false; + oldWidget.controller.endScrubbing(); + } + } + + @override + void dispose() { + _edgeTicker.dispose(); + widget.controller.endScrubbing(); + super.dispose(); + } + + void _readBounds() { + final c = widget.controller; + final version = c.version; + if (identical(version, _version) && + c.storyline == _storyline && + c.geometry == _geometry) { + return; + } + _version = version; + _storyline = c.storyline; + _geometry = c.geometry; + _hasConnectedContent = version.scene.bodies.isNotEmpty; + _top = math.min(c.geometry.primaryTop, c.geometry.transitionTop).toDouble(); + _bottom = math + .max( + c.geometry.primaryTop + c.geometry.primaryHeight, + c.geometry.transitionTop + c.geometry.transitionHeight, + ) + .toDouble(); + for (final entry in version.domainRoot.entries) { + if (entry.key.scope != c.storyline) continue; + final outer = entry.value.outerBoundary.toDouble(); + _top = math.min(_top, outer); + _bottom = math.max(_bottom, outer); + } + } + + @override + Widget build(BuildContext context) => LayoutBuilder( + builder: (context, box) { + final inset = widget.leadingPadding.clamp(0.0, box.maxWidth); + final contentWidth = box.maxWidth - inset; + final theme = TimelineThemeData.of(context); + final rulerHeight = widget.showRuler + ? math.min( + TimelineRuler.heightFor( + theme, + MediaQuery.textScalerOf(context), + style: widget.rulerStyle, + ), + box.maxHeight, + ) + : 0.0; + final availableHeight = math.max(0.0, box.maxHeight - rulerHeight); + final thickness = math.min( + math.max(16.0, theme.scrollbarThickness), + math.min(contentWidth, availableHeight), + ); + return ListenableBuilder( + listenable: Listenable.merge([ + widget.controller.contentChanges, + widget.controller.playheadChanges, + ]), + child: widget.child, + builder: (context, child) { + _readBounds(); + final c = widget.controller; + final end = c.navigationContentEndTick; + final primaryCenter = + c.geometry.primaryTop + c.geometry.primaryHeight / 2; + final restingVerticalPadding = _hasConnectedContent + ? c.geometry.primaryHeight.toDouble() + : 0.0; + final viewport = TimelineViewportRect( + width: contentWidth, + height: availableHeight, + ); + final scrollTop = math.min( + _top - restingVerticalPadding, + primaryCenter - viewport.height / 2, + ); + final scrollBottom = math.max( + _bottom + restingVerticalPadding, + primaryCenter + viewport.height / 2, + ); + c.configureViewport( + width: viewport.width, + height: viewport.height, + end: end, + top: scrollTop, + bottom: scrollBottom, + ); + c.prepareViewport(); + final horizontal = + end > 0 && + end * c.camera.pixelsPerTick > viewport.width / 2 + 0.001; + final vertical = scrollBottom - scrollTop > viewport.height + 0.001; + if (!identical(_pendingReconcile, c)) { + final controller = c; + _pendingReconcile = controller; + WidgetsBinding.instance.addPostFrameCallback((_) { + if (!identical(_pendingReconcile, controller)) return; + _pendingReconcile = null; + if (mounted && identical(widget.controller, controller)) { + controller.reconcileViewport(); + } + }); + } + final content = Column( + children: [ + if (widget.showRuler) + Align( + alignment: Alignment.centerLeft, + child: SizedBox( + width: viewport.width, + height: rulerHeight, + child: TimelineRuler( + controller: c, + showPlayhead: false, + style: widget.rulerStyle, + timecodeLayout: widget.rulerTimecodeLayout, + ), + ), + ), + Expanded( + child: TimelineScrollbars( + controller: c, + viewport: viewport, + horizontal: horizontal, + vertical: vertical, + end: c.navigationEnd( + contentEnd: end, + width: viewport.width, + camera: c.camera, + ), + top: scrollTop, + bottom: scrollBottom, + thickness: thickness, + child: child!, + ), + ), + ], + ); + final x = c.camera.screenXForTick(c.playheadTick, viewport); + return Stack( + fit: StackFit.expand, + children: [ + Padding( + padding: EdgeInsets.only(left: inset), + child: content, + ), + Positioned.fill( + child: IgnorePointer( + child: CustomPaint( + key: const ValueKey('timeline-playhead-overlay'), + painter: _PlayheadPainter( + c, + theme, + viewport, + inset, + rulerHeight, + ), + ), + ), + ), + if (widget.showRuler && + (x >= -1 && x <= viewport.width + 1 || _playheadDragging)) + Positioned( + left: inset + x.clamp(0.0, viewport.width) - 8, + top: 0, + width: 16, + height: rulerHeight, + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onHorizontalDragStart: (_) { + _playheadDragX = x; + _dragViewport = viewport; + setState(() => _playheadDragging = true); + c.beginScrubbing(); + }, + onHorizontalDragUpdate: (details) { + _playheadDragX += details.delta.dx; + c.seekAt( + screenX: _playheadDragX.clamp(0.0, viewport.width), + viewport: viewport, + ); + _syncEdgeScroll(); + }, + onHorizontalDragEnd: (_) => _stopPlayheadDrag(), + onHorizontalDragCancel: _stopPlayheadDrag, + ), + ), + ], + ); + }, + ); + }, + ); +} + +final class _PlayheadPainter extends CustomPainter { + _PlayheadPainter( + this.controller, + this.theme, + this.viewport, + this.inset, + this.rulerHeight, + ) : super( + repaint: Listenable.merge([ + controller.contentChanges, + controller.playheadChanges, + ]), + ); + final TimelineViewController controller; + final TimelineThemeData theme; + final TimelineViewportRect viewport; + final double inset, rulerHeight; + + @override + void paint(Canvas canvas, Size size) { + final localX = controller.camera.screenXForTick( + controller.playheadTick, + viewport, + ); + // Seeking snaps to timeline ticks. At an edge, rounding can put the + // projected position just beyond the viewport for alternating frames. + // Keep the dragged marker visible at that edge instead of dropping it. + if (!controller.isScrubbing && + (localX < -1 || localX > viewport.width + 1)) { + return; + } + final x = inset + localX.clamp(0.0, viewport.width); + final paint = Paint() + ..color = theme.playheadColor + ..style = PaintingStyle.stroke + ..strokeWidth = 1; + canvas.save(); + canvas.clipRect( + Rect.fromLTWH( + 0, + 0, + inset + viewport.width, + rulerHeight + viewport.height, + ), + ); + if (rulerHeight > 0) { + canvas.drawPath( + Path() + ..moveTo(x - 3.5, 0) + ..lineTo(x + 3.5, 0) + ..lineTo(x + 4.5, 1) + ..lineTo(x + 4.5, 7) + ..lineTo(x, 12) + ..lineTo(x - 4.5, 7) + ..lineTo(x - 4.5, 1) + ..close(), + paint, + ); + } + if (theme.playheadWidth > 0) { + canvas.drawLine( + Offset(x, rulerHeight > 0 ? 12 : 0), + Offset(x, rulerHeight + viewport.height), + paint..strokeWidth = theme.playheadWidth, + ); + } + canvas.restore(); + } + + @override + bool shouldRepaint(_PlayheadPainter old) => + old.controller != controller || + old.theme != theme || + old.viewport != viewport || + old.inset != inset || + old.rulerHeight != rulerHeight; +} diff --git a/packages/cutdex_timeline_ui/lib/src/timeline_waveforms.dart b/packages/cutdex_timeline_ui/lib/src/timeline_waveforms.dart new file mode 100644 index 0000000..e22d7b6 --- /dev/null +++ b/packages/cutdex_timeline_ui/lib/src/timeline_waveforms.dart @@ -0,0 +1,91 @@ +import 'dart:math' as math; + +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:flutter/foundation.dart'; + +/// Host-owned source envelopes, requested during paint and loaded afterwards. +abstract class TimelineWaveforms implements Listenable { + void beginFrame(); + + /// Whether the clip has a bound audio source, independent of envelope loading. + bool hasAudioFor(ElementRecord element); + TimelineWaveform? waveformFor(ElementRecord element); + void endFrame(); +} + +final class TimelineWaveformLevel { + const TimelineWaveformLevel({ + required this.samplesPerBucket, + required this.channels, + }); + final int samplesPerBucket; + + /// Immutable packed minimum, maximum, RMS triples per source channel. + final List> channels; +} + +final class TimelineWaveform { + const TimelineWaveform({ + required this.sampleRate, + this.sourceStartSeconds = 0, + required this.frameCount, + required this.levels, + this.amplitudeScale = 1, + }); + final double sampleRate; + final double sourceStartSeconds; + final int frameCount; + final List levels; + + /// Display gain only; source envelopes and cached levels remain unchanged. + final double amplitudeScale; + + /// Union of channel peaks, avoiding cancellation when channels are out of phase. + ({double minimum, double maximum}) envelope(int sourceStart, int sourceEnd) { + final first = + (math.min(sourceStart, sourceEnd) / TimelineClock.ticksPerSecond - + sourceStartSeconds) * + sampleRate; + final last = + (math.max(sourceStart, sourceEnd) / TimelineClock.ticksPerSecond - + sourceStartSeconds) * + sampleRate; + if (levels.isEmpty || + last <= 0 && first < 0 || + first >= frameCount || + frameCount == 0) { + return (minimum: 0, maximum: 0); + } + final start = first.clamp(0.0, frameCount.toDouble()); + final end = last.clamp(0.0, frameCount.toDouble()); + final base = levels.first.samplesPerBucket; + var cursor = (start / base).floor() * base; + final limit = math.max(cursor + base, (end / base).ceil() * base); + var minimum = 0.0; + var maximum = 0.0; + // Coarse buckets must be fully inside the requested base-bucket range. + // Decompose its edges at finer levels instead of importing adjacent peaks. + while (cursor < limit) { + var level = levels.first; + for (final candidate in levels.reversed) { + final span = candidate.samplesPerBucket; + if (span % base == 0 && cursor % span == 0 && cursor + span <= limit) { + level = candidate; + break; + } + } + final index = cursor ~/ level.samplesPerBucket * 3; + for (final channel in level.channels) { + if (index + 1 >= channel.length) continue; + minimum = math.min(minimum, channel[index]); + maximum = math.max(maximum, channel[index + 1]); + } + cursor += level.samplesPerBucket; + } + return ( + minimum: minimum.clamp(-1.0, 1.0), + maximum: maximum.clamp(-1.0, 1.0), + ); + } +} diff --git a/packages/cutdex_timeline_ui/pubspec.yaml b/packages/cutdex_timeline_ui/pubspec.yaml new file mode 100644 index 0000000..73256bb --- /dev/null +++ b/packages/cutdex_timeline_ui/pubspec.yaml @@ -0,0 +1,21 @@ +name: cutdex_timeline_ui +description: Viewport-rendered Flutter UI for the Cutdex timeline. +version: 0.1.0 +publish_to: none + +environment: + sdk: ^3.12.0 + flutter: ">=1.17.0" + +resolution: workspace + +dependencies: + cutdex_core: + path: ../../.dependencies/cutdex_core + flutter: + sdk: flutter + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^6.0.0 diff --git a/packages/cutdex_timeline_ui/test/compound_scene_test.dart b/packages/cutdex_timeline_ui/test/compound_scene_test.dart new file mode 100644 index 0000000..c8c47d5 --- /dev/null +++ b/packages/cutdex_timeline_ui/test/compound_scene_test.dart @@ -0,0 +1,279 @@ +import 'dart:ui' as ui; + +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; +import 'package:flutter_test/flutter_test.dart'; + +final viewport = TimelineViewportRect(width: 240, height: 100); + +void main() { + testWidgets( + 'opened compound paints full clips and dims outside source range', + (tester) async { + final f = Fixture(); + final c = f.controller; + addTearDown(c.dispose); + await tester.pumpWidget(surface(c)); + const normal = 0x4e82d8ff; + // Probe the body below the 18px name header, outside the name text. + final outside = await pixel(tester, 20, 58); + expect(outside, isNot(normal)); + expect( + outside, + isNot(0x15171aff), + reason: 'outside content is not removed', + ); + expect(await pixel(tester, 80, 58), normal); + expect(await pixel(tester, 160, 58), outside); + // The connected body crosses the same source boundary without being cut. + expect(await pixel(tester, 110, 28), normal); + expect(await pixel(tester, 160, 28), outside); + final hit = c.hitTest( + viewport: viewport, + position: const Offset(160, 50), + ); + expect(hit!.identity, f.child); + expect(hit.bounds.width, 200); + final original = f.kernel.current; + c.panBy(horizontalPixels: 20, verticalPixels: 5); + await tester.pump(); + expect(await pixel(tester, 60, 53), normal); + expect(await pixel(tester, 140, 53), outside); + expect(f.kernel.current, same(original)); + expect(tester.takeException(), isNull); + }, + ); + + testWidgets('theme controls dimming and outer edits follow joint history', ( + tester, + ) async { + final f = Fixture(); + final c = f.controller; + addTearDown(c.dispose); + final theme = const TimelineThemeData.dark().copyWith( + outsideSourceRangeOverlayColor: const Color(0xffff0000), + ); + await tester.pumpWidget(surface(c, theme: theme)); + expect(await pixel(tester, 160, 58), 0xff0000ff); + final preview = const LayoutIntervalEdit().preview( + kernel: f.kernel, + engine: f.engine, + projection: f.engine.currentComponents!.semanticProjection, + edit: (tx) => tx.setContainerView( + f.box, + TimeRange( + start: RationalTime.seconds(1), + duration: RationalTime.seconds(8), + ), + ), + ); + final original = c.version; + expect(c.effectiveSourceRange, (start: ticks(2), end: ticks(6))); + preview.commit(); + c.synchronize(); + await tester.pump(); + expect(c.effectiveSourceRange, (start: ticks(1), end: ticks(9))); + expect(await pixel(tester, 160, 58), 0x4e82d8ff); + c.undo(); + await tester.pump(); + expect(c.version, same(original)); + expect(await pixel(tester, 160, 58), 0xff0000ff); + c.redo(); + await tester.pump(); + expect(await pixel(tester, 160, 58), 0x4e82d8ff); + expect(f.kernel.current.query().element(f.child).duration, ticks(10)); + }); + + test( + 'readonly provenance rejects a different definition and stale origin', + () { + final f = Fixture(); + addTearDown(f.controller.dispose); + expect( + () => TimelineViewController( + version: f.engine.current!, + storyline: f.kernel.current.query().primaryStoryline, + openedContainer: f.box, + geometry: f.controller.geometry, + camera: f.controller.camera, + ), + throwsStateError, + ); + final tx = f.kernel.beginTransaction(); + tx.erase(storyline: f.kernel.current.query().primaryStoryline, start: 0); + final removed = tx.finishPreview(); + expect( + () => const TimelineLayoutSceneBuilder().updateProjection( + base: f.engine.currentComponents!.semanticProjection, + update: TimelineLayoutUpdate.between( + kernel: f.kernel, + previousVersion: f.kernel.current, + version: removed, + ), + ), + throwsStateError, + ); + expect(f.controller.effectiveSourceRange, ( + start: ticks(2), + end: ticks(6), + )); + }, + ); + + test('source-range theme token copies, interpolates and compares', () { + const a = TimelineThemeData.dark(); + final b = a.copyWith( + outsideSourceRangeOverlayColor: const Color(0xff00ff00), + ); + expect(a.copyWith(), a); + expect(a, isNot(b)); + expect( + a.lerp(b, 0.5).outsideSourceRangeOverlayColor, + Color.lerp( + a.outsideSourceRangeOverlayColor, + b.outsideSourceRangeOverlayColor, + 0.5, + ), + ); + }); +} + +int ticks(int seconds) => seconds * TimelineClock.ticksPerSecond; + +Widget surface(TimelineViewController controller, {TimelineThemeData? theme}) => + Directionality( + textDirection: TextDirection.ltr, + child: Center( + child: SizedBox( + width: 240, + height: 100, + child: TimelineView(controller: controller, theme: theme), + ), + ), + ); + +Future pixel(WidgetTester tester, int x, int y) async { + final boundary = tester.renderObject( + find.descendant( + of: find.byType(TimelineView), + matching: find.byType(RepaintBoundary), + ), + ); + return tester.runAsync(() async { + final image = await boundary.toImage(pixelRatio: 1); + final bytes = (await image.toByteData(format: ui.ImageByteFormat.rawRgba))!; + final value = bytes.getUint32((y * image.width + x) * 4); + image.dispose(); + return value; + }); +} + +final class Fixture { + Fixture() { + kernel = TimelineKernel.importDto( + TimelineDto( + id: SequenceId('scene'), + format: TimelineFormat.fps24, + primaryStorylineId: StorylineId('primary'), + storylines: [ + StorylineDto( + id: StorylineId('primary'), + elementIds: [ElementId('box')], + ), + StorylineDto( + id: StorylineId('inside'), + elementIds: [ElementId('child')], + ), + ], + elements: [ + ElementDto( + id: ElementId('box'), + structure: ElementStructure.container, + containerStorylineId: StorylineId('inside'), + containerViewMode: ContainerViewMode.fixedRange, + sourceRange: TimeRange( + start: RationalTime.seconds(2), + duration: RationalTime.seconds(4), + ), + duration: RationalTime.seconds(4), + ), + for (final (id, duration) in [('child', 10), ('connected', 4)]) + ElementDto( + id: ElementId(id), + structure: ElementStructure.content, + sourceRange: TimeRange( + start: RationalTime.zero, + duration: RationalTime.seconds(duration), + ), + duration: RationalTime.seconds(duration), + ), + ], + connections: [ + ConnectionDto( + id: ConnectionId('link'), + anchorId: ElementId('child'), + targetId: ElementId('connected'), + anchorTime: RationalTime.seconds(5), + targetTime: RationalTime.zero, + side: ConnectionSide.above, + ), + ], + ), + ); + final q = kernel.current.query(); + box = q.elementById(ElementId('box'))!; + child = q.elementById(ElementId('child'))!; + final inside = q.storylineById(StorylineId('inside'))!; + const domain = LayoutDomainId('main'); + final projection = const TimelineLayoutSceneBuilder() + .openContainerSceneWithMedia( + media: TimelineLayoutMediaIndex.build( + version: kernel.current, + classify: (_) => LayoutMediaLeafClass.nonAudio, + ), + container: box, + geometry: (_, _, _) => (height: 20, domain: domain), + ); + engine = TimelineLayoutEngine(kernel: kernel); + engine.buildComponents( + kernel: kernel, + components: TimelineLayoutComponents.build( + semantic: projection, + expanded: const [], + resolve: (_, _, _, _) => const [], + ), + policy: LayoutPolicy( + version: 1, + stacks: [ + for (final side in ConnectionSide.values) + LayoutStackPolicy( + stack: LayoutStackKey(scope: inside, side: side), + primaryBoundary: side == ConnectionSide.above ? 40 : 60, + innerGap: 10, + bodyGap: 10, + domains: const [domain], + ), + ], + ), + ); + var serial = 0; + controller = TimelineViewController.editable( + engine: engine, + geometry: TimelineViewportGeometry(primaryTop: 40, primaryHeight: 20), + camera: TimelineCamera( + baseTick: 0, + pixelsPerTick: 20 / TimelineClock.ticksPerSecond, + ), + createConnectionId: () => ConnectionId('new-link-${serial++}'), + createElementId: () => ElementId('new-clip-${serial++}'), + ); + } + late final TimelineKernel kernel; + late final TimelineLayoutEngine engine; + late final TimelineViewController controller; + late final ElementHandle box, child; +} diff --git a/packages/cutdex_timeline_ui/test/media_trim_test.dart b/packages/cutdex_timeline_ui/test/media_trim_test.dart new file mode 100644 index 0000000..f1ae176 --- /dev/null +++ b/packages/cutdex_timeline_ui/test/media_trim_test.dart @@ -0,0 +1,1123 @@ +import 'dart:ui' show PointerDeviceKind; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +const second = TimelineClock.ticksPerSecond; +final viewport = TimelineViewportRect(width: 800, height: 120); + +void main() { + test('trim hit targets exclude the reserved clip header and gap', () { + final c = fixture(1); + addTearDown(c.dispose); + final clip = c.version.kernelVersion.query().elementById( + ElementId('clip'), + )!; + c.setGeometry( + TimelineViewportGeometry( + primaryTop: 40, + primaryHeight: 40, + clipHeaderOwners: [clip], + clipHeaderHeight: 16, + ), + ); + for (final leading in [true, false]) { + final x = leading ? 201.0 : 299.0; + for (final y in [24.0, 27.0, 37.0, 38.0, 39.999, 40.0, 60.0, 79.999]) { + final position = Offset(x, y); + final hit = c.hitTest(viewport: viewport, position: position); + expect(hit?.identity, clip); + expect( + c.trimEdgeAt(hit: hit, position: position, extent: 6), + y < 40 + ? isNull + : leading + ? TimelineTrimEdge.leading + : TimelineTrimEdge.trailing, + reason: 'Only the clip body owns edge trim at $position', + ); + } + } + }); + + for (final leading in [true, false]) { + for (final headerHeight in [0, 16]) { + testWidgets( + 'trim paints only its active body edge: leading $leading, header $headerHeight', + (tester) async { + final c = fixture(1); + addTearDown(c.dispose); + final clip = c.version.kernelVersion.query().elementById( + ElementId('clip'), + )!; + c.setGeometry( + TimelineViewportGeometry( + primaryTop: 40, + primaryHeight: 40, + clipHeaderOwners: headerHeight == 0 ? const [] : [clip], + clipHeaderHeight: headerHeight, + ), + ); + c.setSelection([clip]); + final theme = const TimelineThemeData.dark().copyWith( + clipCornerRadius: 6, + ); + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 800, + height: 120, + child: TimelineInteractionRegion( + controller: c, + edgeScrollExtent: 0, + child: TimelineView(controller: c, theme: theme), + ), + ), + ), + ), + ); + _TrimOutlineCanvas paint() { + final canvas = _TrimOutlineCanvas(theme.selectionOutlineColor); + tester + .widget(find.byType(CustomPaint)) + .painter! + .paint(canvas, const Size(800, 120)); + return canvas; + } + + final selected = paint(); + expect(selected.closedOutlines, hasLength(1)); + expect(selected.closedOutlines.single.top, 40 - headerHeight); + expect(selected.edges, isEmpty); + final down = Offset(leading ? 201 : 299, 60); + expect( + c.beginDrag(viewport: viewport, position: down, trimHitExtent: 6), + isTrue, + ); + final target = down.translate(leading ? 10 : -10, 0); + c.updateDrag(viewport: viewport, position: target); + await tester.pump(); + final frame = c.project(viewport); + final index = List.generate( + frame.length, + (index) => index, + ).firstWhere((index) => frame.identityAt(index) == clip); + final layout = c.clipLayoutAt(frame, index); + final rect = layout.toViewport(layout.bodyPaintBounds); + final trimming = paint(); + expect(trimming.closedOutlines, isEmpty); + expect(trimming.edges, hasLength(1)); + final path = trimming.edges.single; + expect(path.computeMetrics().single.isClosed, isFalse); + final bounds = path.getBounds(); + // The 14 px speed bar plus its 2 px gap are outside the trim bracket. + expect(bounds.top - theme.trimHandleWidth / 2, closeTo(40, 0.001)); + expect( + bounds.top, + closeTo(rect.top + theme.trimHandleWidth / 2, 0.001), + ); + expect( + bounds.bottom, + closeTo(rect.bottom - theme.trimHandleWidth / 2, 0.001), + ); + if (leading) { + expect( + bounds.left, + closeTo(rect.left + theme.trimHandleWidth / 2, 0.001), + ); + expect(bounds.right, lessThan(rect.center.dx)); + } else { + expect( + bounds.right, + closeTo(rect.right - theme.trimHandleWidth / 2, 0.001), + ); + expect(bounds.left, greaterThan(rect.center.dx)); + } + expect(c.finishDrag(viewport: viewport, position: target), isTrue); + await tester.pump(); + final finished = paint(); + expect(c.isTrimming, isFalse); + expect(c.trimEdge, isNull); + expect(finished.closedOutlines, isEmpty); + expect(finished.edges, hasLength(1)); + expect(finished.edges.single.getBounds(), bounds); + c.setHoveredIdentity(clip); + await tester.pump(); + expect(paint().edges, hasLength(1)); + if (leading) { + // Clicking an already-selected clip must switch the outline too. + await tester.tapAt(rect.center); + } else { + expect( + c.beginDrag( + viewport: viewport, + position: rect.center, + trimHitExtent: 6, + ), + isTrue, + ); + expect(c.isTrimming, isFalse); + } + await tester.pump(); + expect(paint().edges, isEmpty); + expect(paint().closedOutlines, isNotEmpty); + c.cancelDrag(); + }, + ); + } + } + + test( + 'released edge persists without a timing edit and resets on selection', + () { + final c = fixture(1); + addTearDown(c.dispose); + final clip = c.version.kernelVersion.query().elementById( + ElementId('clip'), + )!; + final base = c.version; + expect( + c.beginDrag( + viewport: viewport, + position: const Offset(299, 60), + trimHitExtent: 6, + ), + isTrue, + ); + expect( + c.finishDrag(viewport: viewport, position: const Offset(299, 60)), + isFalse, + ); + expect(c.version, same(base)); + expect(c.isDragging, isFalse); + expect(c.trimOutlineEdgeFor(clip), TimelineTrimEdge.trailing); + expect( + c.beginDrag( + viewport: viewport, + position: const Offset(201, 60), + trimHitExtent: 6, + ), + isTrue, + ); + expect(c.trimOutlineEdgeFor(clip), TimelineTrimEdge.leading); + expect( + c.finishDrag(viewport: viewport, position: const Offset(201, 60)), + isFalse, + ); + expect(c.trimOutlineEdgeFor(clip), TimelineTrimEdge.leading); + c.clearSelection(); + expect(c.trimOutlineEdgeFor(clip), isNull); + c.setSelection([clip]); + expect(c.trimOutlineEdgeFor(clip), isNull); + expect( + c.beginDrag( + viewport: viewport, + position: const Offset(299, 60), + trimHitExtent: 6, + ), + isTrue, + ); + c.cancelDrag(); + expect(c.trimOutlineEdgeFor(clip), isNull); + }, + ); + + test('a host can clear a released trim hint without changing selection', () { + final c = fixture(1); + addTearDown(c.dispose); + final clip = c.version.kernelVersion.query().elementById( + ElementId('clip'), + )!; + const position = Offset(299, 60); + final base = c.version; + expect( + c.beginDrag(viewport: viewport, position: position, trimHitExtent: 6), + isTrue, + ); + expect(c.finishDrag(viewport: viewport, position: position), isFalse); + expect(c.trimOutlineEdgeFor(clip), TimelineTrimEdge.trailing); + var repaints = 0; + var edits = 0; + c.contentChanges.addListener(() => repaints++); + c.editingChanges.addListener(() => edits++); + c.clearRetainedTrimOutline(); + expect(c.trimOutlineEdgeFor(clip), isNull); + expect(c.selectedIdentities, [clip]); + expect(c.version, same(base)); + expect(c.isDragging, isFalse); + expect(repaints, 1); + expect(edits, 0); + c.clearRetainedTrimOutline(); + expect(repaints, 1); + expect( + c.beginDrag(viewport: viewport, position: position, trimHitExtent: 6), + isTrue, + ); + c.clearRetainedTrimOutline(); + expect(c.isTrimming, isTrue); + expect(c.trimOutlineEdgeFor(clip), TimelineTrimEdge.trailing); + c.cancelDrag(); + }); + + for (final (divisor, explicit) in [(1, false), (3, false), (3, true)]) { + for (final leading in [true, false]) { + for (final extend in [false, true]) { + test( + 'split clip trims both edges: speed 1/$divisor, explicit $explicit, leading $leading, extend $extend', + () { + final c = fixture(divisor, explicitRetime: explicit); + addTearDown(c.dispose); + c.seekTo((20 + 5 * divisor) * second); + expect(c.cutSelectionAtPlayhead(), isTrue); + final base = c.version; + final q = base.kernelVersion.query(); + final clip = q.elementAt(q.primaryStoryline, leading ? 2 : 1); + final record = q.element(clip); + final start = q.localContext(clip).start; + final x = c.camera.screenXForTick( + leading ? start : start + record.duration, + viewport, + ); + final down = Offset(x + (leading ? 1 : -1), 60); + expect( + c.beginDrag(viewport: viewport, position: down, trimHitExtent: 6), + isTrue, + ); + expect(c.isTrimming, isTrue); + // This tick cannot map exactly through a 1/3 speed section. + final delta = (second + 1) * (extend ? 1 : -1); + final target = down.translate( + (leading ? -delta : delta) * c.camera.pixelsPerTick, + 0, + ); + c.updateDrag(viewport: viewport, position: target); + expect(c.dragRejection, isNull); + final prepared = c.project(viewport).version; + expect( + prepared.kernelVersion.query().element(clip).duration, + record.duration + delta, + ); + expect(c.version, same(base)); + expect(c.finishDrag(viewport: viewport, position: target), isTrue); + c.undo(); + expect(c.version, same(base)); + c.redo(); + expect(c.version, same(prepared)); + }, + ); + } + } + } + + for (final leading in [true, false]) { + testWidgets( + 'trim past ${leading ? 'left' : 'right'} viewport edge keeps its preview and commits', + (tester) async { + final c = fixture(1); + addTearDown(c.dispose); + await tester.pumpWidget( + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 800, + height: 120, + child: TimelineInteractionRegion( + controller: c, + edgeScrollExtent: 0, + child: TimelineView(controller: c), + ), + ), + ), + ), + ); + final base = c.version; + final clip = base.kernelVersion.query().elementById(ElementId('clip'))!; + final gesture = await tester.startGesture( + Offset(leading ? 201 : 299, 60), + kind: PointerDeviceKind.mouse, + ); + await gesture.moveTo(Offset(leading ? 190 : 310, 60)); + await tester.pump(); + expect(c.isTrimming, isTrue); + await gesture.moveTo(Offset(leading ? -20 : 820, 60)); + await tester.pump(); + expect(c.dragRejection, isNull); + final prepared = c.project(viewport).version; + expect(prepared, isNot(same(base))); + expect( + prepared.kernelVersion.query().element(clip).duration, + (leading ? 15 : 25) * second, + ); + await gesture.up(); + expect(c.version, same(prepared)); + expect(tester.takeException(), isNull); + }, + ); + } + + for (final leading in [true, false]) { + testWidgets( + '${leading ? 'leading' : 'trailing'} trim keeps scrolling beyond the viewport', + (tester) async { + final c = fixture(1); + addTearDown(c.dispose); + await tester.pumpWidget( + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 800, + height: 120, + child: TimelineInteractionRegion( + controller: c, + child: TimelineView(controller: c), + ), + ), + ), + ), + ); + c.setCamera( + TimelineCamera( + baseTick: (leading ? 18 : 12) * second, + pixelsPerTick: (leading ? 100 : 40) / second, + ), + ); + await tester.pump(); + final clip = c.version.kernelVersion.query().elementById( + ElementId('clip'), + )!; + final gesture = await tester.startGesture( + Offset(leading ? 201 : 719, 60), + kind: PointerDeviceKind.mouse, + ); + await gesture.moveTo(Offset(leading ? -20 : 820, 60)); + await tester.pump(); + expect(c.isTrimming, isTrue); + final beforeCamera = c.camera.baseTick; + final beforeDuration = c + .project(viewport) + .version + .kernelVersion + .query() + .element(clip) + .duration; + await tester.pump(const Duration(milliseconds: 250)); + expect( + c.camera.baseTick, + leading ? lessThan(beforeCamera) : greaterThan(beforeCamera), + ); + expect(c.dragRejection, isNull); + final prepared = c.project(viewport).version; + expect( + prepared.kernelVersion.query().element(clip).duration, + greaterThan(beforeDuration), + ); + await gesture.up(); + expect(c.version, same(prepared)); + expect(tester.takeException(), isNull); + }, + ); + } + + for (final leading in [true, false]) { + testWidgets( + '${leading ? 'left' : 'right'} edge trim pans the composed timeline viewport', + (tester) async { + final c = fixture(1); + addTearDown(c.dispose); + await tester.pumpWidget( + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 800, + height: 160, + child: TimelineViewport( + controller: c, + leadingPadding: 16, + child: TimelineInteractionRegion( + controller: c, + child: TimelineView(controller: c), + ), + ), + ), + ), + ), + ); + await tester.pump(); + c.setCamera( + TimelineCamera( + baseTick: (leading ? 18 : 12) * second, + pixelsPerTick: (leading ? 100 : 40) / second, + ), + ); + await tester.pump(); + final initialEnd = c.contentEndTick; + final origin = tester.getTopLeft( + find.byType(TimelineInteractionRegion).last, + ); + final gesture = await tester.startGesture( + origin + Offset(leading ? 201 : 719, 60), + kind: PointerDeviceKind.mouse, + ); + await gesture.moveTo(origin + Offset(leading ? -20 : 810, 60)); + await tester.pump(); + expect(c.isTrimming, isTrue); + final before = c.camera.baseTick; + await tester.pump(const Duration(milliseconds: 250)); + expect( + c.camera.baseTick, + leading ? lessThan(before) : greaterThan(before), + ); + if (!leading) { + for (var frame = 0; frame < 40; frame++) { + await tester.pump(const Duration(milliseconds: 50)); + } + expect( + c.camera.baseTick, + greaterThan(21 * second), + reason: 'Trimming beyond the original end must extend navigation', + ); + } + expect(c.dragRejection, isNull); + final prepared = c.project(viewport).version; + if (!leading) { + expect(c.contentEndTick, greaterThan(initialEnd)); + } + await gesture.up(); + expect(c.isTrimming, isFalse); + expect(c.version, same(prepared)); + expect(tester.takeException(), isNull); + }, + ); + } + + testWidgets( + 'shortening the last clip does not move a stationary trim pointer', + (tester) async { + final c = fixture(1); + addTearDown(c.dispose); + await tester.pumpWidget( + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 800, + height: 160, + child: TimelineViewport( + controller: c, + leadingPadding: 16, + child: TimelineInteractionRegion( + controller: c, + child: TimelineView(controller: c), + ), + ), + ), + ), + ), + ); + await tester.pump(); + c.setCamera( + TimelineCamera(baseTick: 30 * second, pixelsPerTick: 40 / second), + ); + await tester.pump(); + final initialCamera = c.camera.baseTick; + final contentViewport = TimelineViewportRect(width: 784, height: 160); + final rightEdge = c.camera.screenXForTick(30 * second, contentViewport); + final origin = tester.getTopLeft( + find.byType(TimelineInteractionRegion).last, + ); + final gesture = await tester.startGesture( + origin + Offset(rightEdge - 1, 60), + kind: PointerDeviceKind.mouse, + ); + await gesture.moveBy(const Offset(-12, 0)); + await tester.pump(); + expect(c.isTrimming, isTrue); + final clip = c.version.kernelVersion.query().elementById( + ElementId('clip'), + )!; + final firstDuration = c + .project(contentViewport) + .version + .kernelVersion + .query() + .element(clip) + .duration; + expect(firstDuration, lessThan(10 * second)); + expect(c.navigationContentEndTick, 30 * second); + expect( + (10 * second - firstDuration) / second, + closeTo(12 / (c.camera.pixelsPerTick * second), 0.06), + ); + await tester.pump(const Duration(milliseconds: 250)); + final laterDuration = c + .project(contentViewport) + .version + .kernelVersion + .query() + .element(clip) + .duration; + expect(laterDuration, firstDuration); + expect(c.camera.baseTick, initialCamera); + await gesture.up(); + await tester.pump(); + expect( + c.version.kernelVersion.query().element(clip).duration, + firstDuration, + ); + expect(c.navigationContentEndTick, c.contentEndTick); + expect(c.navigationContentEndTick, lessThan(30 * second)); + expect(c.camera.baseTick, lessThan(initialCamera)); + expect(tester.takeException(), isNull); + }, + ); + + testWidgets( + 'trim coalesces pointer bursts and commits the final unpainted position', + (tester) async { + final c = connectedFixture(gap: false); + addTearDown(c.dispose); + await tester.pumpWidget( + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 800, + height: 120, + child: TimelineInteractionRegion( + controller: c, + edgeScrollExtent: 0, + child: TimelineView(controller: c), + ), + ), + ), + ), + ); + final gesture = await tester.startGesture( + const Offset(99, 105), + kind: PointerDeviceKind.mouse, + ); + await gesture.moveTo(const Offset(90, 105)); + await tester.pump(); + expect(c.isTrimming, isTrue); + var changes = 0; + c.addListener(() => changes++); + var inspected = 0; + c.editingChanges.addListener(() => inspected++); + for (var x = 89; x >= 75; x--) { + await gesture.moveTo(Offset(x.toDouble(), 105)); + } + expect( + changes, + 0, + reason: 'A burst must prepare at most one preview per display frame', + ); + await tester.pump(); + expect(changes, 1); + expect( + inspected, + 0, + reason: 'Private trim geometry does not change inspected properties', + ); + await gesture.moveTo(const Offset(70, 105)); + await gesture.up(); + await tester.pump(); + expect(c.isTrimming, isFalse); + expect( + inspected, + greaterThan(0), + reason: 'The commit must update inspected properties', + ); + final query = c.version.kernelVersion.query(); + expect( + query.element(query.elementById(ElementId('c'))!).duration, + 71 * second ~/ 10, + ); + final committed = c.version; + await tester.pump(); + expect( + c.version, + same(committed), + reason: 'No queued preview may run after publication', + ); + }, + ); + + testWidgets('trailing pointer trim hands a removed anchor to the next clip', ( + tester, + ) async { + final c = connectedFixture(gap: false, childAnchorSeconds: 4); + addTearDown(c.dispose); + await tester.pumpWidget( + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 800, + height: 120, + child: TimelineInteractionRegion( + controller: c, + edgeScrollExtent: 0, + child: TimelineView(controller: c), + ), + ), + ), + ), + ); + final base = c.version; + final a = base.kernelVersion.query().elementById(ElementId('a'))!; + final child = base.kernelVersion.query().elementById(ElementId('c'))!; + final frame = c.project(viewport); + final index = List.generate( + frame.length, + (i) => i, + ).firstWhere((i) => frame.identityAt(i) == a); + final bounds = c.presentationBoundsAt(frame, index); + final gesture = await tester.startGesture( + Offset(bounds.right - 1, bounds.center.dy), + kind: PointerDeviceKind.mouse, + ); + await gesture.moveBy(Offset(-3 * c.camera.pixelsPerTick * second, 0)); + await tester.pump(); + expect(c.isTrimming, isTrue); + expect(c.dragRejection, isNull); + final prepared = c.project(viewport).version; + final preview = prepared.kernelVersion.query(); + expect( + preview.element(preview.connectionForTarget(child)!.anchor).id, + ElementId('b'), + ); + expect(preview.absoluteStart(child), 4 * second); + expect(c.version, same(base)); + await gesture.up(); + expect(c.version, same(prepared)); + expect(tester.takeException(), isNull); + }); + + for (final leading in [true, false]) { + testWidgets( + 'waveform retained region is stable during ${leading ? 'leading' : 'trailing'} trim', + (tester) async { + final c = connectedFixture(gap: false); + final waveforms = _TrimWaveforms(); + addTearDown(c.dispose); + addTearDown(waveforms.dispose); + await tester.pumpWidget( + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 800, + height: 120, + child: TimelineInteractionRegion( + controller: c, + edgeScrollExtent: 0, + child: TimelineView(controller: c, waveforms: waveforms), + ), + ), + ), + ), + ); + List<(Offset, Offset)> retainedBars() { + final canvas = _TrimWaveCanvas(); + tester + .widget( + find.descendant( + of: find.byType(TimelineView), + matching: find.byType(CustomPaint), + ), + ) + .painter! + .paint(canvas, const Size(800, 120)); + return canvas.bars + .where((bar) => bar.$1.dx > 60 && bar.$1.dx < 80) + .toList(); + } + + final before = retainedBars(); + expect(before, isNotEmpty); + final base = c.version; + final start = leading ? 1.0 : 99.0; + final gesture = await tester.startGesture( + Offset(start, 105), + kind: PointerDeviceKind.mouse, + ); + for (final delta + in leading + ? [0.5, 1.0, 1.5, 2.5, 10.5, 51.5] + : [0.5, 1.0, 1.5, 2.5, 10.5]) { + await gesture.moveTo(Offset(start + (leading ? delta : -delta), 105)); + await tester.pump(); + expect(c.dragRejection, isNull); + expect( + retainedBars(), + before, + reason: 'retained waveform moved after $delta px trim', + ); + } + await gesture.cancel(); + await tester.pump(); + expect(c.version, same(base)); + expect(retainedBars(), before); + }, + ); + } + for (final gap in [false, true]) { + testWidgets( + 'connected leading trim crosses its anchor boundary, gap=$gap', + (tester) async { + final c = connectedFixture(gap: gap); + addTearDown(c.dispose); + await tester.pumpWidget( + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 800, + height: 120, + child: TimelineInteractionRegion( + controller: c, + edgeScrollExtent: 0, + child: TimelineView(controller: c), + ), + ), + ), + ), + ); + final base = c.version; + final clip = base.kernelVersion.query().elementById(ElementId('c'))!; + final gesture = await tester.startGesture( + const Offset(1, 105), + kind: PointerDeviceKind.mouse, + ); + for (final tenth in [39, 40, 41, 49, 50, 51, 60, 45, 60]) { + await gesture.moveTo(Offset(1 + tenth.toDouble(), 105)); + await tester.pump(); + expect(c.isTrimming, isTrue); + expect( + c.dragRejection, + isNull, + reason: 'leading edge at ${tenth / 10}s', + ); + final q = c.project(viewport).version.kernelVersion.query(); + expect(q.absoluteStart(clip), tenth * second ~/ 10); + expect(q.absoluteStart(clip) + q.element(clip).duration, 10 * second); + expect(q.element(clip).sourceStart, tenth * second ~/ 10); + expect(c.version, same(base)); + if (tenth > 50) { + expect( + q.element(q.connectionForTarget(clip)!.anchor).id, + ElementId('b'), + ); + } + } + final prepared = c.project(viewport).version; + await gesture.up(); + expect(c.version, same(prepared)); + c.undo(); + expect(c.version, same(base)); + c.redo(); + expect(c.version, same(prepared)); + c.undo(); + final cancelled = await tester.startGesture( + const Offset(1, 105), + kind: PointerDeviceKind.mouse, + ); + await cancelled.moveTo(const Offset(61, 105)); + await tester.pump(); + expect(c.project(viewport).version, isNot(same(base))); + await cancelled.cancel(); + await tester.pump(); + expect(c.version, same(base)); + expect(c.project(viewport).version, same(base)); + expect(tester.takeException(), isNull); + }, + ); + } + for (final kind in [PointerDeviceKind.mouse, PointerDeviceKind.touch]) { + for (final divisor in [1, 2]) { + for (final leading in [false, true]) { + testWidgets( + 'media edge clamps: $kind, speed 1/$divisor, leading $leading', + (tester) async { + final c = fixture(divisor); + addTearDown(c.dispose); + await tester.pumpWidget( + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 800, + height: 120, + child: TimelineInteractionRegion( + controller: c, + edgeScrollExtent: 0, + child: TimelineView(controller: c), + ), + ), + ), + ), + ); + final base = c.version; + final clip = base.kernelVersion.query().elementById( + ElementId('clip'), + )!; + final startX = leading ? 201.0 : 200 + 100.0 * divisor - 1; + final gesture = await tester.startGesture( + Offset(startX, 60), + kind: kind, + ); + await gesture.moveTo(Offset(leading ? 20 : 790, 60)); + await tester.pump(); + final prepared = c.project(viewport).version; + final duration = (leading ? 15 : 25) * divisor * second; + expect(c.dragRejection, isNull); + expect( + prepared.kernelVersion.query().element(clip).duration, + duration, + ); + expect(c.version, same(base)); + await gesture.up(); + expect(c.version, same(prepared)); + final q = c.version.kernelVersion.query(); + expect(q.element(clip).sourceStart, (leading ? 0 : 5) * second); + expect( + q.element(clip).sourceDuration, + (leading ? 15 : 25) * second, + ); + c.undo(); + expect(c.version, same(base)); + c.redo(); + expect(c.version, same(prepared)); + expect(tester.takeException(), isNull); + }, + ); + } + } + } +} + +class _TrimWaveforms extends ChangeNotifier implements TimelineWaveforms { + final waveform = TimelineWaveform( + sampleRate: 100, + frameCount: 1000, + levels: [ + TimelineWaveformLevel( + samplesPerBucket: 1, + channels: [ + [ + for (var i = 0; i < 1000; i++) ...[ + -((i ~/ 30 % 7 + 1) / 8), + (i ~/ 30 % 7 + 1) / 8, + 0.1, + ], + ], + ], + ), + ], + ); + @override + void beginFrame() {} + @override + bool hasAudioFor(ElementRecord element) => true; + @override + TimelineWaveform? waveformFor(ElementRecord element) => waveform; + @override + void endFrame() {} +} + +class _TrimOutlineCanvas extends TestRecordingCanvas { + _TrimOutlineCanvas(this.color); + final Color color; + final closedOutlines = []; + final edges = []; + + @override + void drawDRRect(RRect outer, RRect inner, Paint paint) { + if (paint.color.toARGB32() == color.toARGB32()) closedOutlines.add(outer); + super.drawDRRect(outer, inner, paint); + } + + @override + void drawPath(Path path, Paint paint) { + if (paint.color.toARGB32() == color.toARGB32() && + paint.style == PaintingStyle.stroke) { + edges.add(Path.from(path)); + } + super.drawPath(path, paint); + } +} + +class _TrimWaveCanvas extends TestRecordingCanvas { + final bars = <(Offset, Offset)>[]; + @override + void drawLine(Offset p1, Offset p2, Paint paint) { + if (paint.color.toARGB32() == + const TimelineThemeData.dark().audioAccentColor.toARGB32()) { + bars.add((p1, p2)); + } + super.drawLine(p1, p2, paint); + } +} + +TimelineViewController fixture(int divisor, {bool explicitRetime = false}) { + final kernel = TimelineKernel.importDto( + TimelineDto( + id: SequenceId('bounded'), + format: TimelineFormat.fps24, + primaryStorylineId: StorylineId('p'), + storylines: [ + StorylineDto( + id: StorylineId('p'), + elementIds: [ElementId('preroll'), ElementId('clip')], + ), + ], + elements: [ + ElementDto( + id: ElementId('preroll'), + structure: ElementStructure.gap, + sourceRange: TimeRange( + start: RationalTime.zero, + duration: RationalTime.seconds(20), + ), + duration: RationalTime.seconds(20), + ), + ElementDto( + id: ElementId('clip'), + structure: ElementStructure.content, + sourceRange: TimeRange( + start: RationalTime.seconds(5), + duration: RationalTime.seconds(10), + ), + mediaRange: TimeRange( + start: RationalTime.zero, + duration: RationalTime.seconds(30), + ), + duration: RationalTime.seconds(10 * divisor), + retimeSegments: explicitRetime + ? [ + RetimeSegmentDto( + projectDuration: RationalTime.seconds(10 * divisor), + sourceStart: RationalTime.seconds(5), + sourceDelta: RationalTime.seconds(10), + ), + ] + : const [], + ), + ], + ), + ); + return controllerFor(kernel); +} + +TimelineViewController connectedFixture({ + required bool gap, + int childAnchorSeconds = 0, +}) => controllerFor( + TimelineKernel.importDto( + TimelineDto( + id: SequenceId('connected-trim'), + format: TimelineFormat.fps24, + primaryStorylineId: StorylineId('p'), + storylines: [ + StorylineDto( + id: StorylineId('p'), + elementIds: [ + ElementId('a'), + if (gap) ElementId('gap'), + ElementId('b'), + ], + ), + ], + elements: [ + for (final (id, duration) in [ + ('a', gap ? 4 : 5), + if (gap) ('gap', 1), + ('b', 5), + ('c', 10), + ]) + ElementDto( + id: ElementId(id), + structure: id == 'gap' + ? ElementStructure.gap + : ElementStructure.content, + duration: RationalTime.seconds(duration), + sourceRange: TimeRange( + start: RationalTime.zero, + duration: RationalTime.seconds(duration), + ), + mediaRange: id == 'gap' + ? null + : TimeRange( + start: RationalTime.zero, + duration: RationalTime.seconds(20), + ), + ), + ], + connections: [ + ConnectionDto( + id: ConnectionId('audio-link'), + side: ConnectionSide.below, + anchorId: ElementId('a'), + targetId: ElementId('c'), + anchorTime: RationalTime.seconds(childAnchorSeconds), + targetTime: RationalTime.zero, + ), + ], + ), + ), +); + +TimelineViewController controllerFor(TimelineKernel kernel) { + final primary = kernel.current.query().primaryStoryline; + const domain = LayoutDomainId('main'); + final projection = const TimelineLayoutSceneBuilder() + .projectDefinitionWithMedia( + media: TimelineLayoutMediaIndex.build( + version: kernel.current, + classify: (element) => element.id == ElementId('c') + ? LayoutMediaLeafClass.audioOnly + : LayoutMediaLeafClass.nonAudio, + ), + definition: primary, + geometry: (_, _, _) => (height: 40, domain: domain), + ); + final engine = TimelineLayoutEngine(kernel: kernel); + engine.buildComponents( + kernel: kernel, + components: TimelineLayoutComponents.build( + semantic: projection, + expanded: const [], + resolve: (_, _, _, _) => const [], + ), + policy: LayoutPolicy( + version: 1, + stacks: [ + for (final side in ConnectionSide.values) + LayoutStackPolicy( + stack: LayoutStackKey(scope: primary, side: side), + primaryBoundary: side == ConnectionSide.above ? 40 : 80, + domains: const [domain], + innerGap: 10, + bodyGap: 10, + ), + ], + ), + ); + var id = 0; + return TimelineViewController.editable( + engine: engine, + geometry: TimelineViewportGeometry(primaryTop: 40, primaryHeight: 40), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 10 / second), + createConnectionId: () => ConnectionId('c-${id++}'), + createElementId: () => ElementId('e-${id++}'), + ); +} diff --git a/packages/cutdex_timeline_ui/test/timeline_camera_layout_test.dart b/packages/cutdex_timeline_ui/test/timeline_camera_layout_test.dart new file mode 100644 index 0000000..ea7491c --- /dev/null +++ b/packages/cutdex_timeline_ui/test/timeline_camera_layout_test.dart @@ -0,0 +1,248 @@ +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/src/timeline_camera_layout.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + const bounds = ( + width: 201.0, + height: 100.0, + end: 1000, + top: -200.0, + bottom: 400.0, + ); + TimelineCamera resolve( + TimelineCamera camera, { + TimelineCameraBounds? viewport = bounds, + TimelineCameraPlacement placement = TimelineCameraPlacement.preserve, + double? restingOffset, + }) => resolveTimelineCamera( + camera: camera, + bounds: viewport, + primaryCenter: 20, + restingVerticalOffset: restingOffset ?? camera.verticalOffset, + placement: placement, + ); + + test('new empty view fits twenty seconds and centers the primary lane', () { + final camera = TimelineCamera( + baseTick: 50, + pixelsPerTick: 1, + verticalOffset: 999, + ); + final empty = ( + width: 800.0, + height: 300.0, + end: 0, + top: -130.0, + bottom: 170.0, + ); + final result = resolve( + camera, + viewport: empty, + placement: TimelineCameraPlacement.initialize, + ); + expect(result.baseTick, 0); + expect(result.fractionalTick, 0); + expect(result.pixelsPerTick * TimelineClock.ticksPerSecond * 20, 800); + expect(result.verticalOffset, -130); + expect(camera.baseTick, 50); + expect(camera.pixelsPerTick, 1); + expect(camera.verticalOffset, 999); + expect(_state(resolve(result, viewport: empty)), _state(result)); + }); + + test( + 'restored empty view retains explicit zoom and only clamps position', + () { + final camera = TimelineCamera( + baseTick: 500, + pixelsPerTick: .25, + verticalOffset: 999, + ); + final empty = ( + width: 800.0, + height: 300.0, + end: 0, + top: -130.0, + bottom: 170.0, + ); + final result = resolve(camera, viewport: empty); + expect(result.baseTick, 0); + expect(result.pixelsPerTick, .25); + expect(result.verticalOffset, -130); + }, + ); + + test('right boundary includes the fractional tick without overscrolling', () { + final result = resolve( + TimelineCamera(baseTick: 900, pixelsPerTick: .8, verticalOffset: 0), + ); + final end = timelineNavigationEnd( + contentEnd: bounds.end, + width: bounds.width, + pixelsPerTick: result.pixelsPerTick, + ); + expect(result.baseTick, 874); + expect(result.fractionalTick, .75); + expect( + result.screenXForTick( + end, + TimelineViewportRect(width: bounds.width, height: bounds.height), + ), + bounds.width, + ); + expect(_state(resolve(result)), _state(result)); + }); + + test('valid restored fractional position remains unchanged', () { + final camera = TimelineCamera( + baseTick: 100, + fractionalTick: .5, + pixelsPerTick: .8, + verticalOffset: -40, + ); + expect(_state(resolve(camera)), _state(camera)); + }); + + test('vertical overflow clamps both edges without changing zoom', () { + for (final (offset, expected) in [(-999.0, -200.0), (999.0, 300.0)]) { + final result = resolve( + TimelineCamera( + baseTick: 100, + pixelsPerTick: .8, + verticalOffset: offset, + ), + ); + expect(result.verticalOffset, expected); + expect(result.pixelsPerTick, .8); + } + }); + + test( + 'fitting content retains the resting lane position during navigation', + () { + final fitting = ( + width: 800.0, + height: 300.0, + end: 1000, + top: -130.0, + bottom: 170.0, + ); + final result = resolve( + TimelineCamera(baseTick: 10, pixelsPerTick: .8, verticalOffset: 999), + viewport: fitting, + restingOffset: -130, + ); + expect(result.verticalOffset, -130); + }, + ); + + test('resize clamps navigation but preserves explicit scale', () { + final camera = resolve( + TimelineCamera(baseTick: 900, pixelsPerTick: .8, verticalOffset: 300), + ); + final resized = ( + width: 800.0, + height: 300.0, + end: 1000, + top: -200.0, + bottom: 400.0, + ); + final result = resolve(camera, viewport: resized); + expect(result.baseTick, 500); + expect(result.verticalOffset, 100); + expect(result.pixelsPerTick, camera.pixelsPerTick); + expect(_state(resolve(result, viewport: resized)), _state(result)); + }); + + test('focus preserves horizontal position and reset preserves scale', () { + final camera = TimelineCamera( + baseTick: 100, + fractionalTick: .5, + pixelsPerTick: .8, + verticalOffset: 200, + ); + final focused = resolve( + camera, + placement: TimelineCameraPlacement.focusPrimary, + ); + expect(focused.baseTick, 100); + expect(focused.fractionalTick, .5); + expect(focused.verticalOffset, -30); + final reset = resolve( + camera, + placement: TimelineCameraPlacement.resetPrimary, + ); + expect(reset.baseTick, 0); + expect(reset.fractionalTick, 0); + expect(reset.pixelsPerTick, .8); + expect(reset.verticalOffset, -30); + }); + + test('unmeasured viewports defer all placement decisions', () { + final camera = TimelineCamera( + baseTick: 100, + pixelsPerTick: .8, + verticalOffset: 200, + ); + for (final viewport in [ + null, + (width: 0.0, height: 100.0, end: 0, top: -200.0, bottom: 400.0), + (width: 201.0, height: 0.0, end: 0, top: -200.0, bottom: 400.0), + ]) { + expect( + resolve( + camera, + viewport: viewport, + placement: TimelineCameraPlacement.initialize, + ), + same(camera), + ); + } + }); + + test('navigation tail saturates at the int64 boundary', () { + const maximum = 0x7fffffffffffffff; + expect( + timelineNavigationEnd( + contentEnd: maximum - 5, + width: 800, + pixelsPerTick: .8, + ), + maximum, + ); + expect( + timelineNavigationEnd(contentEnd: 0, width: 800, pixelsPerTick: .8), + 0, + ); + }); + + test( + 'origin clamp preserves zoom and leaves valid fractional ticks intact', + () { + final negative = clampTimelineCameraOrigin( + TimelineCamera( + baseTick: -1, + fractionalTick: .5, + pixelsPerTick: .8, + verticalOffset: 30, + ), + ); + expect(_state(negative), (0, 0.0, .8, 30.0)); + final valid = TimelineCamera( + baseTick: 0, + fractionalTick: .5, + pixelsPerTick: .8, + ); + expect(clampTimelineCameraOrigin(valid), same(valid)); + }, + ); +} + +(int, double, double, double) _state(TimelineCamera camera) => ( + camera.baseTick, + camera.fractionalTick, + camera.pixelsPerTick, + camera.verticalOffset, +); diff --git a/packages/cutdex_timeline_ui/test/timeline_clip_layout_test.dart b/packages/cutdex_timeline_ui/test/timeline_clip_layout_test.dart new file mode 100644 index 0000000..847e55a --- /dev/null +++ b/packages/cutdex_timeline_ui/test/timeline_clip_layout_test.dart @@ -0,0 +1,82 @@ +import 'dart:ui'; + +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + test( + 'adding a header preserves all body regions at their viewport positions', + () { + for (final audioOnly in [false, true]) { + final before = TimelineClipLayout( + bounds: const Rect.fromLTWH(25, 64, 240, 76), + nameHeight: 16, + audioOnly: audioOnly, + hasVideoAudio: !audioOnly, + ); + final after = TimelineClipLayout( + bounds: const Rect.fromLTWH(25, 48, 240, 92), + headerHeight: 16, + nameHeight: 16, + audioOnly: audioOnly, + hasVideoAudio: !audioOnly, + ); + for (final pair in [ + (before.body, after.body), + (before.name, after.name), + (before.preview, after.preview), + (before.waveformBackground, after.waveformBackground), + (before.waveform, after.waveform), + ]) { + expect(before.toViewport(pair.$1), after.toViewport(pair.$2)); + } + expect( + before.bounds.topLeft + before.keyframeCenter, + after.bounds.topLeft + after.keyframeCenter, + ); + expect(after.header.bottom, after.body.top); + expect(after.name.bottom, after.preview.top); + if (!audioOnly) { + expect(after.preview.bottom, after.waveformBackground.top); + expect(after.preview.height, 44); + } + } + }, + ); + + test( + 'small clip regions stay inside the clip and omit an undersized waveform', + () { + for (final width in [0.0, 1.0, 3.0, 20.0]) { + for (final height in [0.0, 16.0, 20.0, 35.0]) { + for (final audioOnly in [false, true]) { + final layout = TimelineClipLayout( + bounds: Rect.fromLTWH(-80, 150, width, height), + headerHeight: 16, + nameHeight: 16, + audioOnly: audioOnly, + hasVideoAudio: !audioOnly, + ); + for (final region in [ + layout.header, + layout.body, + layout.bodyPaintBounds, + layout.name, + layout.preview, + layout.waveformBackground, + layout.waveform, + ]) { + expect(region.width, greaterThanOrEqualTo(0)); + expect(region.height, greaterThanOrEqualTo(0)); + expect(region.left, greaterThanOrEqualTo(0)); + expect(region.top, greaterThanOrEqualTo(0)); + expect(region.right, lessThanOrEqualTo(width)); + expect(region.bottom, lessThanOrEqualTo(height)); + } + expect(layout.waveform.isEmpty, isTrue); + } + } + } + }, + ); +} diff --git a/packages/cutdex_timeline_ui/test/timeline_drag_lifecycle_test.dart b/packages/cutdex_timeline_ui/test/timeline_drag_lifecycle_test.dart new file mode 100644 index 0000000..eb8daf0 --- /dev/null +++ b/packages/cutdex_timeline_ui/test/timeline_drag_lifecycle_test.dart @@ -0,0 +1,2201 @@ +import 'dart:ui' as ui; + +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; +import 'package:flutter_test/flutter_test.dart'; + +final viewport = TimelineViewportRect(width: 800, height: 400); +const down = Offset(100, 90); +const moved = Offset(160, 90); + +void main() { + test('captured trim preview failure is delivered once at final rejection', () { + final original = ArgumentError('injected trim preparation failure'); + final originalStack = StackTrace.fromString('ORIGINAL TRIM PREVIEW STACK'); + final failures = <({Object error, StackTrace stack})>[]; + final f = _Fixture( + createElementId: () => Error.throwWithStackTrace(original, originalStack), + onEditFailure: (error, stack) => + failures.add((error: error, stack: stack)), + ); + final c = f.controller; + addTearDown(c.dispose); + // Trimming the Primary tail past its connected clip needs a generated gap. + c.zoomAt( + screenX: 0, + newPixelsPerTick: 2 / TimelineClock.ticksPerSecond, + viewport: viewport, + ); + expect( + c.beginDrag( + viewport: viewport, + position: const Offset(199, 150), + trimHitExtent: 8, + ), + isTrue, + ); + c.updateDrag(viewport: viewport, position: const Offset(2, 150)); + expect(c.dragRejection, contains('injected trim preparation failure')); + expect(failures, isEmpty); + expect( + c.finishDrag(viewport: viewport, position: const Offset(2, 150)), + isFalse, + ); + expect(failures, hasLength(1)); + expect(failures.single.error, same(original)); + expect(failures.single.stack.toString(), 'ORIGINAL TRIM PREVIEW STACK'); + expect(c.isDragging, isFalse); + expect(f.kernel.canUndo, isFalse); + }); + + testWidgets( + 'incoming ghost uses shared edge scrolling and cancels without history', + (tester) async { + final f = _Fixture(); + final c = f.controller; + addTearDown(c.dispose); + await tester.pumpWidget(_surface(c)); + final before = f.kernel.current; + final clip = LayoutIncomingClip( + kernel: f.kernel, + engine: f.engine, + element: ElementDto( + id: ElementId('incoming'), + structure: ElementStructure.content, + duration: RationalTime.seconds(3), + sourceRange: TimeRange( + start: RationalTime.zero, + duration: RationalTime.seconds(3), + ), + ), + connectionId: ConnectionId('incoming-link'), + gapId: ElementId('incoming-gap'), + ); + final preview = clip.place( + start: 39 * TimelineClock.ticksPerSecond, + side: ConnectionSide.below, + requestedTop: 210, + ); + c.showIncomingClip( + preview.result.version, + element: clip.source, + audioOnly: false, + start: 39 * TimelineClock.ticksPerSecond, + top: 210, + position: const Offset(799, 222), + viewport: viewport, + ); + expect(c.dragGhost!.source.owner, clip.source); + expect(c.dragGhost!.top, 210); + expect(c.project(viewport).version, same(preview.result.version)); + final camera = c.camera.baseTick; + await tester.pump(); + await tester.pump(const Duration(milliseconds: 100)); + expect(c.camera.baseTick, greaterThan(camera)); + c.cancelDrag(); + preview.cancel(); + await tester.pump(); + final stopped = c.camera.baseTick; + await tester.pump(const Duration(milliseconds: 100)); + expect(c.camera.baseTick, stopped); + expect(c.dragGhost, isNull); + expect(c.project(viewport).version, same(f.engine.current)); + expect(f.kernel.current, same(before)); + expect(f.kernel.canUndo, isFalse); + expect(tester.takeException(), isNull); + await tester.pumpWidget(const SizedBox()); + }, + ); + + for (final side in ConnectionSide.values) { + testWidgets('incoming $side paints the full connection without selection', ( + tester, + ) async { + final f = _Fixture(); + final c = f.controller; + addTearDown(c.dispose); + await tester.pumpWidget(_surface(c)); + final clip = LayoutIncomingClip( + kernel: f.kernel, + engine: f.engine, + element: ElementDto( + id: ElementId('incoming'), + structure: ElementStructure.content, + duration: RationalTime.seconds(3), + sourceRange: TimeRange( + start: RationalTime.zero, + duration: RationalTime.seconds(3), + ), + ), + connectionId: ConnectionId('incoming-link'), + gapId: ElementId('incoming-gap'), + ); + final top = side == ConnectionSide.above ? 30 : 240; + final y = side == ConnectionSide.above ? 110 : 200; + final preview = clip.place( + start: 30 * TimelineClock.ticksPerSecond, + side: side, + requestedTop: top, + ); + c.showIncomingClip( + preview.result.version, + element: clip.source, + start: 30 * TimelineClock.ticksPerSecond, + top: top, + audioOnly: false, + position: Offset(600, top + 12.0), + viewport: viewport, + ); + expect(c.isSelected(clip.source), isFalse); + await tester.pump(); + await _expectPixel(tester, 600, y, const Color(0xff202b3f)); + c.clearIncomingClip(); + preview.cancel(); + await tester.pump(); + await _expectPixel(tester, 600, y, const Color(0xff15171a)); + expect(f.kernel.canUndo, isFalse); + await tester.pumpWidget(const SizedBox()); + }); + } + + for (final leading in [false, true]) { + for (final selection in ['default', 'connected', 'both']) { + test('playhead trim leading=$leading selection=$selection is atomic', () { + final f = _Fixture(); + final c = f.controller; + addTearDown(c.dispose); + final before = f.kernel.current; + final q = before.query(); + final primary = q.elementById(ElementId('p'))!; + final connected = q.elementById(ElementId('a'))!; + if (selection != 'default') { + c.setSelection([ + if (selection == 'both') primary, + LayoutBodyId.element(connected), + ]); + } + final selected = c.selectedIdentities.toSet(); + c.seekTo(5 * TimelineClock.ticksPerSecond); + expect(c.canCutSelection, isTrue); + expect( + leading ? c.trimLeftAtPlayhead() : c.trimRightAtPlayhead(), + isTrue, + reason: c.commandRejection, + ); + final after = f.kernel.current; + final result = after.query(); + final p = result.element(primary); + final a = result.element(connected); + final second = TimelineClock.ticksPerSecond; + expect( + p.duration, + (selection == 'connected' + ? 100 + : leading + ? 95 + : 5) * + second, + ); + expect( + p.sourceStart, + (selection != 'connected' && leading ? 5 : 0) * second, + ); + expect( + a.duration, + (selection == 'default' + ? 10 + : leading + ? 7 + : 3) * + second, + ); + expect( + a.sourceStart, + (selection != 'default' && leading ? 3 : 0) * second, + ); + expect(c.selectedIdentities.toSet(), selected); + c.undo(); + expect(f.kernel.current, same(before)); + expect(c.canUndo, isFalse); + c.redo(); + expect(f.kernel.current, same(after)); + }); + } + } + + test('playhead trim at clip boundaries is a history-free no-op', () { + final f = _Fixture(unconnectedPrimary: true); + final c = f.controller; + addTearDown(c.dispose); + final before = f.kernel.current; + for (final seconds in [0, 100, 101]) { + c.seekTo(seconds * TimelineClock.ticksPerSecond); + expect(c.canCutSelection, isFalse); + expect(c.trimLeftAtPlayhead(), isFalse); + expect(c.trimRightAtPlayhead(), isFalse); + expect(f.kernel.current, same(before)); + expect(c.canUndo, isFalse); + } + }); + + test('blade defaults to Primary and explicit selection stays isolated', () { + final primaryOnly = _Fixture(); + addTearDown(primaryOnly.controller.dispose); + primaryOnly.controller.seekTo(5 * TimelineClock.ticksPerSecond); + expect(primaryOnly.controller.cutSelectionAtPlayhead(), isTrue); + var query = primaryOnly.controller.version.kernelVersion.query(); + expect( + query.element(query.elementById(ElementId('p'))!).duration, + 5 * TimelineClock.ticksPerSecond, + ); + expect( + query.element(query.elementById(ElementId('a'))!).duration, + 10 * TimelineClock.ticksPerSecond, + ); + + final withConnected = _Fixture(); + addTearDown(withConnected.controller.dispose); + query = withConnected.controller.version.kernelVersion.query(); + final connected = query.elementById(ElementId('a'))!; + withConnected.controller.setSelection([LayoutBodyId.element(connected)]); + withConnected.controller.seekTo(5 * TimelineClock.ticksPerSecond); + expect(withConnected.controller.cutSelectionAtPlayhead(), isTrue); + query = withConnected.controller.version.kernelVersion.query(); + for (final identity in withConnected.controller.selectedIdentities) { + final selected = withConnected.controller.elementForIdentity(identity)!; + expect(query.elementById(query.element(selected).id), selected); + } + expect( + query.element(query.elementById(ElementId('p'))!).duration, + 100 * TimelineClock.ticksPerSecond, + ); + expect( + query.element(query.elementById(ElementId('a'))!).duration, + 3 * TimelineClock.ticksPerSecond, + ); + }); + + test('deleting a selected split fragment removes its stale selection', () { + final f = _Fixture(); + final c = f.controller; + addTearDown(c.dispose); + final q = c.version.kernelVersion.query(); + c.setSelection([q.elementById(ElementId('p'))!]); + c.seekTo(5 * TimelineClock.ticksPerSecond); + expect(c.cutSelectionAtPlayhead(), isTrue); + expect(c.selectedIdentities, isNotEmpty); + expect(c.deleteSelection(), isTrue); + expect(c.selectedIdentities, isEmpty); + }); + + test('delayed selection ignores a fragment handle retired by undo', () { + final f = _Fixture(); + final c = f.controller; + addTearDown(c.dispose); + c.setSelection([ + c.version.kernelVersion.query().elementById(ElementId('p'))!, + ]); + c.seekTo(5 * TimelineClock.ticksPerSecond); + expect(c.cutSelectionAtPlayhead(), isTrue); + final split = c.version.kernelVersion.query(); + final fragment = c.selectedIdentities + .map(c.elementForIdentity) + .whereType() + .firstWhere((handle) => split.element(handle).id != ElementId('p')); + c.undo(); + expect(c.elementForIdentity(fragment), isNull); + c.setSelection([fragment, LayoutBodyId.element(fragment)]); + expect(c.selectedIdentities, isEmpty); + expect(c.deleteSelection(), isFalse); + }); + + testWidgets( + 'mouse leaving the left edge keeps the clip at zero until release', + (tester) async { + final f = _Fixture(); + final c = f.controller; + addTearDown(c.dispose); + await tester.pumpWidget(_surface(c)); + final gesture = await tester.startGesture( + down, + kind: ui.PointerDeviceKind.mouse, + ); + await gesture.moveTo(const Offset(-40, 90)); + await tester.pump(); + expect(c.isDragging, isTrue); + expect(c.dragRejection, isNull); + expect(c.dragGhost!.body.start, 0); + await gesture.up(); + await tester.pump(); + final query = c.version.kernelVersion.query(); + expect(query.absoluteStart(query.elementById(ElementId('a'))!), 0); + expect(c.isDragging, isFalse); + expect(tester.takeException(), isNull); + }, + ); + + for (final child in [false, true]) { + test( + 'left overshoot clamps preview and placement even outside: child=$child', + () { + final f = _Fixture(carriedChild: child); + final c = f.controller; + addTearDown(c.dispose); + final base = c.version; + final q = base.kernelVersion.query(); + final a = q.elementById(ElementId('a'))!; + final original = q.element(a); + expect(c.beginDrag(viewport: viewport, position: down), isTrue); + c.updateDrag(viewport: viewport, position: const Offset(5, 90)); + expect(c.dragRejection, isNull); + expect(c.dragGhost!.body.start, 0); + c.updateDrag(viewport: viewport, position: const Offset(-40, 90)); + expect(c.dragRejection, isNull); + expect(c.dragGhost!.body.start, 0); + final preview = c.project(viewport).version.kernelVersion.query(); + expect(preview.absoluteStart(a), 0); + expect( + c.finishDrag(viewport: viewport, position: const Offset(-40, 90)), + isTrue, + ); + final updated = c.version.kernelVersion.query(); + expect(updated.absoluteStart(a), 0); + expect(updated.element(a).duration, original.duration); + expect(updated.element(a).sourceStart, original.sourceStart); + if (child) { + expect( + updated.absoluteStart(updated.elementById(ElementId('child'))!), + 3 * TimelineClock.ticksPerSecond, + ); + } + c.undo(); + expect(c.version, same(base)); + }, + ); + } + + test('right overshoot keeps a committable drag target', () { + final f = _Fixture(); + final c = f.controller; + addTearDown(c.dispose); + final base = c.version; + final query = base.kernelVersion.query(); + final a = query.elementById(ElementId('a'))!; + + expect(c.beginDrag(viewport: viewport, position: down), isTrue); + c.updateDrag(viewport: viewport, position: const Offset(840, 90)); + expect(c.dragRejection, isNull); + expect(c.dragGhost, isNotNull); + expect( + c.finishDrag(viewport: viewport, position: const Offset(840, 90)), + isTrue, + ); + expect(c.version.kernelVersion.query().absoluteStart(a), greaterThan(0)); + expect(c.version, isNot(same(base))); + }); + + test('vertical overshoot keeps a committable drag target', () { + final f = _Fixture(); + final c = f.controller; + addTearDown(c.dispose); + final base = c.version; + + expect(c.beginDrag(viewport: viewport, position: down), isTrue); + c.updateDrag(viewport: viewport, position: const Offset(160, 440)); + expect(c.dragRejection, isNull); + expect(c.dragGhost, isNotNull); + expect( + c.finishDrag(viewport: viewport, position: const Offset(160, 440)), + isTrue, + ); + expect(c.version, isNot(same(base))); + }); + + for (final kind in [ui.PointerDeviceKind.mouse, ui.PointerDeviceKind.touch]) { + testWidgets('connected drag shows hollow Primary landing: $kind', ( + tester, + ) async { + final f = _Fixture(); + final c = f.controller; + addTearDown(c.dispose); + await tester.pumpWidget(_surface(c)); + final base = c.version; + final gesture = await tester.startGesture(down, kind: kind); + await gesture.moveTo(const Offset(300, 150)); + await tester.pump(); + expect(c.dragRejection, isNull); + expect(c.dragMode, LayoutPreviewMode.primaryInsert); + expect(c.version, same(base)); + await _expectPixel( + tester, + 100, + 130, + const TimelineThemeData.dark().selectionOutlineColor, + ); + await _expectPixel( + tester, + 100, + 150, + const TimelineThemeData.dark().primaryLaneBackgroundColor, + ); + // Moving back off Primary removes the serial reservation. + await gesture.moveTo(const Offset(160, 90)); + await tester.pump(); + expect(c.dragMode, LayoutPreviewMode.connected); + await _expectPixel( + tester, + 100, + 150, + const TimelineThemeData.dark().visualClipColor, + ); + await gesture.moveTo(const Offset(300, 150)); + await tester.pump(); + final prepared = c.project(viewport).version; + await gesture.up(); + await tester.pump(); + expect(c.version, same(prepared)); + c.undo(); + expect(c.version, same(base)); + }); + } + for (final side in ConnectionSide.values) { + test('tail ghosts preserve multi-root height offsets on $side', () { + final f = _Fixture( + threePrimary: true, + connectedPrimarySide: side, + independentConnectedA: true, + belowIncumbent: side == ConnectionSide.below, + ); + final c = f.controller; + addTearDown(c.dispose); + c.zoomAt( + screenX: 0, + newPixelsPerTick: 2 / TimelineClock.ticksPerSecond, + viewport: viewport, + ); + final base = c.version; + final q = base.kernelVersion.query(); + final p = LayoutBodyId.element(q.elementById(ElementId('p'))!); + final a = LayoutBodyId.element(q.elementById(ElementId('a'))!); + final difference = base.placementOf(a).top - base.placementOf(p).top; + expect(difference, isNot(0)); + final y = base.placementOf(p).top + 20.0; + c.setSelection([p, a]); + expect(c.beginDrag(viewport: viewport, position: Offset(40, y)), isTrue); + for (final x in [60.0, 76.0, 100.0, 272.0]) { + c.updateDrag(viewport: viewport, position: Offset(x, y)); + expect(c.dragRejection, isNull); + expect( + c.dragGhostFor(a)!.top - c.dragGhostFor(p)!.top, + difference, + reason: + 'root spacing must survive entering and extending the tail gap', + ); + } + final prepared = c.project(viewport).version; + expect( + prepared.placementOf(a).top - prepared.placementOf(p).top, + difference, + ); + expect( + c.finishDrag(viewport: viewport, position: Offset(272, y)), + isTrue, + ); + expect(c.version, same(prepared)); + }); + } + for (final returnToPrimary in [false, true]) { + test( + 'multi-selection tail overshoot and cancel: primary=$returnToPrimary', + () { + final f = _Fixture( + threePrimary: true, + connectedPrimarySide: ConnectionSide.below, + belowIncumbent: true, + ); + final c = f.controller; + addTearDown(c.dispose); + c.zoomAt( + screenX: 0, + newPixelsPerTick: 2 / TimelineClock.ticksPerSecond, + viewport: viewport, + ); + final base = c.version; + final q = base.kernelVersion.query(); + final p = q.elementById(ElementId('p'))!; + final a = q.elementById(ElementId('a'))!; + c.setSelection([LayoutBodyId.element(p), LayoutBodyId.element(a)]); + expect( + c.beginDrag(viewport: viewport, position: const Offset(40, 250)), + isTrue, + ); + c.updateDrag(viewport: viewport, position: const Offset(500, 250)); + expect(c.dragRejection, isNull); + var preview = c.project(viewport).version.kernelVersion.query(); + final gapId = preview.element(preview.elementAt(c.storyline, 2)).id; + expect(preview.absoluteStart(a), 20 * TimelineClock.ticksPerSecond); + expect(preview.absoluteStart(p), 18 * TimelineClock.ticksPerSecond); + c.updateDrag(viewport: viewport, position: const Offset(500, 251)); + preview = c.project(viewport).version.kernelVersion.query(); + expect( + preview.element(preview.elementById(gapId)!).duration, + 98 * TimelineClock.ticksPerSecond, + ); + if (returnToPrimary) { + expect( + c.finishDrag(viewport: viewport, position: const Offset(60, 150)), + isTrue, + ); + final committed = c.version; + preview = committed.kernelVersion.query(); + expect(preview.connectionForTarget(p), isNull); + expect(preview.connectionForTarget(a), isNull); + expect( + preview.element(preview.elementById(gapId)!).duration, + 98 * TimelineClock.ticksPerSecond, + ); + c.undo(); + expect(c.version, same(base)); + c.redo(); + expect(c.version, same(committed)); + } else { + c.cancelDrag(); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + expect(c.version.kernelVersion.query().elementById(gapId), isNull); + } + }, + ); + } + test('multi-selection extends tail when its rightmost root reaches it', () { + final f = _Fixture( + threePrimary: true, + connectedPrimarySide: ConnectionSide.below, + belowIncumbent: true, + ); + final c = f.controller; + addTearDown(c.dispose); + c.zoomAt( + screenX: 0, + newPixelsPerTick: 2 / TimelineClock.ticksPerSecond, + viewport: viewport, + ); + final base = c.version; + final q = base.kernelVersion.query(); + final p = q.elementById(ElementId('p'))!; + final a = q.elementById(ElementId('a'))!; + c.setSelection([LayoutBodyId.element(p), LayoutBodyId.element(a)]); + expect( + c.beginDrag(viewport: viewport, position: const Offset(40, 250)), + isTrue, + ); + // p starts at 18, a at 20: only a has reached the original tail. + c.updateDrag(viewport: viewport, position: const Offset(76, 250)); + expect(c.dragRejection, isNull); + var preview = c.project(viewport).version.kernelVersion.query(); + final gap = preview.elementAt(c.storyline, 2); + expect(preview.element(gap).structure, ElementStructure.gap); + expect(preview.absoluteStart(p), 18 * TimelineClock.ticksPerSecond); + expect(preview.absoluteStart(a), 20 * TimelineClock.ticksPerSecond); + expect(preview.element(gap).duration, 98 * TimelineClock.ticksPerSecond); + c.updateDrag(viewport: viewport, position: const Offset(100, 250)); + preview = c.project(viewport).version.kernelVersion.query(); + expect(preview.element(gap).duration, 98 * TimelineClock.ticksPerSecond); + c.updateDrag(viewport: viewport, position: const Offset(272, 250)); + preview = c.project(viewport).version.kernelVersion.query(); + expect(preview.element(gap).duration, 196 * TimelineClock.ticksPerSecond); + expect( + preview.absoluteStart(a) - preview.absoluteStart(p), + 2 * TimelineClock.ticksPerSecond, + ); + c.updateDrag(viewport: viewport, position: const Offset(272, 251)); + expect( + c.project(viewport).version.kernelVersion.query().element(gap).duration, + 196 * TimelineClock.ticksPerSecond, + ); + expect( + c.finishDrag(viewport: viewport, position: const Offset(272, 251)), + isTrue, + ); + final committed = c.version; + c.undo(); + expect(c.version, same(base)); + c.redo(); + expect(c.version, same(committed)); + }); + for (final primary in [true, false]) { + for (final returnX in [1.0, 60.0]) { + test( + 'return to Primary retains generated gap: primary=$primary x=$returnX', + () { + final f = _Fixture( + threePrimary: true, + unconnectedPrimary: primary, + belowIncumbent: true, + connectedPrimarySide: primary ? null : ConnectionSide.below, + ); + final c = f.controller; + addTearDown(c.dispose); + c.zoomAt( + screenX: 0, + newPixelsPerTick: 2 / TimelineClock.ticksPerSecond, + viewport: viewport, + ); + final base = c.version; + final p = base.kernelVersion.query().elementById(ElementId('p'))!; + final origin = primary + ? const Offset(60, 150) + : const Offset(40, 250); + expect(c.beginDrag(viewport: viewport, position: origin), isTrue); + c.updateDrag(viewport: viewport, position: const Offset(80, 60)); + final tailQuery = c.project(viewport).version.kernelVersion.query(); + final gapId = tailQuery + .element(tailQuery.connectionForTarget(p)!.anchor) + .id; + c.updateDrag(viewport: viewport, position: Offset(returnX, 150)); + expect(c.dragRejection, isNull); + var q = c.project(viewport).version.kernelVersion.query(); + expect(q.elementById(gapId), isNotNull); + expect( + q.element(q.elementById(gapId)!).duration, + 100 * TimelineClock.ticksPerSecond, + ); + expect(q.connectionForTarget(p), isNull); + final prepared = c.project(viewport).version; + expect( + c.finishDrag(viewport: viewport, position: Offset(returnX, 150)), + isTrue, + ); + expect(c.version, same(prepared)); + c.undo(); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + c.redo(); + expect(c.version, same(prepared)); + q = c.version.kernelVersion.query(); + expect(q.elementById(gapId), isNotNull); + }, + ); + } + } + for (final primary in [true, false]) { + test( + 'one persistent gap grows across pointer frames and gestures: primary=$primary', + () { + final f = _Fixture( + threePrimary: true, + unconnectedPrimary: primary, + belowIncumbent: true, + connectedPrimarySide: primary ? null : ConnectionSide.below, + ); + final c = f.controller; + addTearDown(c.dispose); + c.zoomAt( + screenX: 0, + newPixelsPerTick: 2 / TimelineClock.ticksPerSecond, + viewport: viewport, + ); + final base = c.version; + final p = base.kernelVersion.query().elementById(ElementId('p'))!; + expect( + c.beginDrag( + viewport: viewport, + position: primary ? const Offset(60, 150) : const Offset(40, 250), + ), + isTrue, + ); + ElementId? gapId; + for (var step = 0; step < 3; step++) { + final x = 80.0 + step * 200; + c.updateDrag(viewport: viewport, position: Offset(x, 60)); + expect(c.dragRejection, isNull); + var q = c.project(viewport).version.kernelVersion.query(); + final gap = q.elementAt( + c.storyline, + q.storylineLength(c.storyline) - 1, + ); + gapId ??= q.element(gap).id; + expect(q.element(gap).id, gapId); + expect( + q.element(gap).duration, + (step + 1) * 100 * TimelineClock.ticksPerSecond, + ); + expect( + q.absoluteStart(p), + (20 + step * 100) * TimelineClock.ticksPerSecond, + ); + expect(c.dragGhost!.body.start, q.absoluteStart(p)); + // Recompute at unchanged time, not merely the identical-frame fast path. + for (var i = 0; i < 3; i++) { + c.updateDrag(viewport: viewport, position: Offset(x, 61.0 + i)); + q = c.project(viewport).version.kernelVersion.query(); + expect( + q.element(q.elementById(gapId)!).duration, + (step + 1) * 100 * TimelineClock.ticksPerSecond, + ); + } + c.updateDrag(viewport: viewport, position: Offset(x + 100, 60)); + q = c.project(viewport).version.kernelVersion.query(); + expect( + q.element(q.elementById(gapId)!).duration, + (step + 1) * 100 * TimelineClock.ticksPerSecond, + reason: 'moving inside the gap must not extend it', + ); + } + c.updateDrag(viewport: viewport, position: const Offset(60, 60)); + expect(c.dragRejection, isNull); + expect( + c.finishDrag(viewport: viewport, position: const Offset(60, 60)), + isTrue, + ); + var q = c.version.kernelVersion.query(); + expect( + q.element(q.elementById(gapId!)!).duration, + 300 * TimelineClock.ticksPerSecond, + ); + expect(q.absoluteStart(p), 10 * TimelineClock.ticksPerSecond); + final firstCommit = c.version; + c.undo(); + expect(c.version, same(base)); + c.redo(); + expect(c.version, same(firstCommit)); + // The now-persistent terminal gap is resized, not replaced or duplicated. + final y = c.version.placementOf(LayoutBodyId.element(p)).top + 20.0; + expect( + c.beginDrag(viewport: viewport, position: Offset(60, y)), + isTrue, + ); + c.updateDrag(viewport: viewport, position: Offset(680, y)); + expect(c.dragRejection, isNull); + expect( + c.finishDrag(viewport: viewport, position: Offset(680, y)), + isTrue, + ); + q = c.version.kernelVersion.query(); + expect( + q.element(q.elementById(gapId)!).duration, + 400 * TimelineClock.ticksPerSecond, + ); + expect(q.storylineLength(c.storyline), 3); + c.undo(); + expect(c.version, same(firstCommit)); + }, + ); + } + for (final y in [70.0, 230.0]) { + testWidgets('only Primary detach paints its new gap and ghost at y=$y', ( + tester, + ) async { + final f = _Fixture(unconnectedPrimary: true); + final c = f.controller; + addTearDown(c.dispose); + await tester.pumpWidget(_surface(c)); + final base = c.version; + const start = Offset(250, 150); + final end = Offset(250, y); + expect(c.beginDrag(viewport: viewport, position: start), isTrue); + c.updateDrag(viewport: viewport, position: end); + final frame = c.project(viewport); + final q = frame.version.kernelVersion.query(); + final gap = q.elementAt(c.storyline, 0); + expect(c.elementForIdentity(gap), isNull); + final gapIndex = Iterable.generate( + frame.length, + ).firstWhere((index) => frame.identityAt(index) == gap); + expect(c.elementForFrameItem(frame, gapIndex), gap); + expect(q.element(gap).structure, ElementStructure.gap); + await tester.pump(); + expect(tester.takeException(), isNull); + const theme = TimelineThemeData.dark(); + await _expectPixel(tester, 200, 150, theme.gapColor); + await _expectPixel(tester, 200, (y + 10).toInt(), theme.visualClipColor); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + expect(c.finishDrag(viewport: viewport, position: end), isTrue); + expect(c.elementForIdentity(gap), gap); + await tester.pump(); + expect(tester.takeException(), isNull); + c.undo(); + await tester.pump(); + expect(c.version, same(base)); + expect(c.elementForIdentity(gap), isNull); + await _expectPixel(tester, 200, 160, theme.visualClipColor); + await tester.pumpWidget(const SizedBox()); + }); + } + + test('only Primary member can detach onto a zero-tail gap', () { + final f = _Fixture(unconnectedPrimary: true); + final c = f.controller; + addTearDown(c.dispose); + final base = c.version; + expect( + c.beginDrag(viewport: viewport, position: const Offset(250, 150)), + isTrue, + ); + c.updateDrag(viewport: viewport, position: const Offset(250, 70)); + expect(c.dragRejection, isNull); + final q = c.project(viewport).version.kernelVersion.query(); + final p = q.elementById(ElementId('p'))!; + final gap = q.elementAt(c.storyline, 0); + expect(q.storylineLength(c.storyline), 1); + expect(q.element(gap).structure, ElementStructure.gap); + expect(q.element(gap).duration, q.element(p).duration); + expect(q.connectionForTarget(p)!.anchor, gap); + c.cancelDrag(); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + }); + for (final fromPrimary in [true, false]) { + for (final audio in [true, false]) { + test('tail gap is atomic: primary=$fromPrimary audio=$audio', () { + final f = _Fixture( + threePrimary: true, + audioPrimary: audio, + belowIncumbent: true, + unconnectedPrimary: fromPrimary, + connectedPrimarySide: fromPrimary ? null : ConnectionSide.below, + ); + final c = f.controller; + addTearDown(c.dispose); + c.zoomAt( + screenX: 0, + newPixelsPerTick: 2 / TimelineClock.ticksPerSecond, + viewport: viewport, + ); + final base = c.version; + final p = base.kernelVersion.query().elementById(ElementId('p'))!; + final origin = fromPrimary + ? const Offset(60, 150) + : const Offset(40, 250); + expect(c.beginDrag(viewport: viewport, position: origin), isTrue); + c.updateDrag(viewport: viewport, position: const Offset(80, 60)); + expect(c.dragRejection, isNull); + var prepared = c.project(viewport).version; + var q = prepared.kernelVersion.query(); + final gap = q.connectionForTarget(p)!.anchor; + expect(q.element(gap).structure, ElementStructure.gap); + expect(q.absoluteStart(gap), 20 * TimelineClock.ticksPerSecond); + expect(q.element(gap).duration, q.element(p).duration); + expect(q.absoluteStart(p), q.absoluteStart(gap)); + expect( + q.connectionOrderLocation(p)!.side, + audio ? ConnectionSide.below : ConnectionSide.above, + ); + expect(c.version, same(base)); + c.cancelDrag(); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + expect(c.beginDrag(viewport: viewport, position: origin), isTrue); + c.updateDrag(viewport: viewport, position: const Offset(80, 60)); + c.updateDrag(viewport: viewport, position: const Offset(60, 60)); + q = c.project(viewport).version.kernelVersion.query(); + expect( + q.storylineSpan(c.storyline), + 120 * TimelineClock.ticksPerSecond, + ); + c.updateDrag(viewport: viewport, position: const Offset(80, 60)); + prepared = c.project(viewport).version; + expect( + c.finishDrag(viewport: viewport, position: const Offset(80, 60)), + isTrue, + ); + expect(c.version, same(prepared)); + c.undo(); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + c.redo(); + expect(c.version, same(prepared)); + }); + } + } + for (final enabled in [false, true]) { + test('Primary overshoot clamps independently of enabled=$enabled', () { + final f = _Fixture( + threePrimary: true, + unconnectedPrimary: true, + primaryEnabled: enabled, + ); + final c = f.controller; + addTearDown(c.dispose); + c.zoomAt( + screenX: 0, + newPixelsPerTick: 2 / TimelineClock.ticksPerSecond, + viewport: viewport, + ); + final base = c.version; + expect( + c.beginDrag(viewport: viewport, position: const Offset(60, 150)), + isTrue, + ); + c.updateDrag(viewport: viewport, position: const Offset(300, 70)); + expect(c.dragRejection, isNull); + expect(c.dragGhost!.top, 50); + expect(c.dragGhost!.body.start, 20 * TimelineClock.ticksPerSecond); + c.cancelDrag(); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + expect( + c.beginDrag(viewport: viewport, position: const Offset(60, 150)), + isTrue, + ); + c.updateDrag(viewport: viewport, position: const Offset(300, 70)); + c.updateDrag(viewport: viewport, position: const Offset(300, 71)); + expect(c.dragRejection, isNull); + expect( + c.finishDrag(viewport: viewport, position: const Offset(300, 71)), + isTrue, + ); + final q = c.version.kernelVersion.query(); + expect(q.element(q.elementById(ElementId('p'))!).enabled, enabled); + c.undo(); + expect(c.version, same(base)); + }); + } + for (final gap in [false, true]) { + testWidgets('selection border survives adjacent clip paint: gap=$gap', ( + tester, + ) async { + final f = _Fixture(threePrimary: true, gapPrimary: gap); + final c = f.controller; + addTearDown(c.dispose); + c.zoomAt( + screenX: 0, + newPixelsPerTick: 2 / TimelineClock.ticksPerSecond, + viewport: viewport, + ); + await tester.pumpWidget(_surface(c)); + await tester.tapAt(const Offset(60, 150)); + await tester.pump(); + // The time boundary is x=220; paint leaves a one-pixel inset on each side. + await _expectPixel( + tester, + 218, + 155, + const TimelineThemeData.dark().selectionOutlineColor, + ); + await _expectPixel( + tester, + 221, + 155, + Color.alphaBlend( + const TimelineThemeData.dark().clipBorderColor, + const TimelineThemeData.dark().visualClipColor, + ), + ); + for (final x in [219, 220]) { + await _expectPixel( + tester, + x, + 155, + const TimelineThemeData.dark().primaryLaneBackgroundColor, + ); + } + expect(c.canUndo, isFalse); + }); + } + for (final kind in [ui.PointerDeviceKind.mouse, ui.PointerDeviceKind.touch]) { + testWidgets( + 'unconnected Primary reserves its initial drag position: $kind', + (tester) async { + final f = _Fixture(threePrimary: true, unconnectedPrimary: true); + final c = f.controller; + addTearDown(c.dispose); + c.zoomAt( + screenX: 0, + newPixelsPerTick: 2 / TimelineClock.ticksPerSecond, + viewport: viewport, + ); + await tester.pumpWidget(_surface(c)); + final base = c.version; + final gesture = await tester.startGesture( + const Offset(60, 150), + kind: kind, + ); + await gesture.moveTo(const Offset(90, 150)); + await tester.pump(); + expect(c.isDragging, isTrue); + expect(c.dragGhosts.length, 1); + expect(c.project(viewport).version, same(base)); + // The exposed reservation is hollow; the moving clip remains opaque. + await _expectPixel( + tester, + 30, + 165, + const TimelineThemeData.dark().primaryLaneBackgroundColor, + ); + await _expectPixel( + tester, + 30, + 130, + const TimelineThemeData.dark().selectionOutlineColor, + ); + await _expectPixel( + tester, + 30, + 129, + const TimelineThemeData.dark().backgroundColor, + ); + await _expectPixel( + tester, + 100, + 165, + const TimelineThemeData.dark().visualClipColor, + ); + await _expectPixel( + tester, + 100, + 130, + const TimelineThemeData.dark().selectionOutlineColor, + ); + await gesture.up(); + await tester.pump(); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + expect(c.dragGhosts, isEmpty); + expect(tester.takeException(), isNull); + }, + ); + } + for (final kind in [ui.PointerDeviceKind.mouse, ui.PointerDeviceKind.touch]) { + for (final toFront in [true, false]) { + testWidgets( + 'connected Primary owner remains draggable within Primary: $kind front=$toFront', + (tester) async { + final f = _Fixture(threePrimary: true, carriedChild: true); + final c = f.controller; + addTearDown(c.dispose); + c.zoomAt( + screenX: 0, + newPixelsPerTick: 2 / TimelineClock.ticksPerSecond, + viewport: viewport, + ); + await tester.pumpWidget(_surface(c)); + final base = c.version; + final q = base.kernelVersion.query(); + final p = q.elementById(ElementId('p'))!; + final children = [ + q.elementById(ElementId('a'))!, + q.elementById(ElementId('child'))!, + ]; + final gesture = await tester.startGesture( + const Offset(60, 150), + kind: kind, + ); + // Cross touch slop while remaining at the source insertion boundary. + await gesture.moveTo(const Offset(90, 150)); + await tester.pump(); + expect( + c.dragGhosts.length, + 3, + reason: 'an unchanged insertion boundary must not hide the drag', + ); + expect(c.project(viewport).version, same(base)); + await gesture.moveTo(const Offset(70, 70)); + await tester.pump(); + expect(c.isDragging, isTrue); + expect(c.dragRejection, contains('connected clips')); + expect(c.dragGhosts.length, 3); + expect(c.dragGhost!.top, 50); + await _expectPixel( + tester, + 100, + 80, + const TimelineThemeData.dark().visualClipColor, + ); + await _expectPixel( + tester, + 100, + 50, + const TimelineThemeData.dark().selectionOutlineColor, + ); + await _expectPixel( + tester, + 100, + 49, + const TimelineThemeData.dark().backgroundColor, + ); + await _expectPixel( + tester, + 100, + 165, + const TimelineThemeData.dark().primaryLaneBackgroundColor, + ); + await gesture.moveTo(const Offset(90, 270)); + await tester.pump(); + expect(c.dragGhosts.length, 3); + expect(c.dragGhost!.top, 250); + expect(c.project(viewport).version, same(base)); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + await gesture.moveTo(Offset(toFront ? 1 : 238, 150)); + await tester.pump(); + expect(c.dragRejection, isNull); + expect(c.dragGhosts.length, 3); + await _expectPixel( + tester, + toFront ? 190 : 100, + 165, + toFront + ? const TimelineThemeData.dark().visualClipColor + : const TimelineThemeData.dark().primaryLaneBackgroundColor, + ); + final prepared = c.project(viewport).version; + final pq = prepared.kernelVersion.query(); + expect( + pq + .storylineElements(c.storyline) + .map((h) => pq.element(h).id.value), + toFront ? ['p', 'first', 'last'] : ['first', 'last', 'p'], + ); + expect(pq.connectionForTarget(p), isNull); + for (final child in children) { + expect( + pq.connectionForTarget(child)!.anchor, + q.connectionForTarget(child)!.anchor, + ); + expect( + pq.absoluteStart(child) - pq.absoluteStart(p), + q.absoluteStart(child) - q.absoluteStart(p), + ); + } + await gesture.up(); + await tester.pump(); + expect(c.version, same(prepared)); + c.undo(); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + c.redo(); + expect(c.version, same(prepared)); + expect(tester.takeException(), isNull); + }, + ); + } + } + for (final compound in [false, true]) { + for (final below in [false, true]) { + for (final carried in [false, if (!below) true]) { + test( + 'pointer crosses Primary without a missing ghost: compound=$compound below=$below carried=$carried', + () { + final f = _Fixture( + threePrimary: true, + belowIncumbent: below, + carriedChild: carried, + compoundA: compound, + ); + final c = f.controller; + addTearDown(c.dispose); + final base = c.version; + final a = base.kernelVersion.query().elementById(ElementId('a'))!; + final x = below ? 100.0 : 300.0; + expect( + c.beginDrag( + viewport: viewport, + position: Offset(x, below ? 190 : 90), + ), + isTrue, + ); + for (final y + in below + ? [170, 150, 130, 129, 125, 120, 90] + : [129, 130, 150, 169, 170, 175, 180, 210]) { + c.updateDrag( + viewport: viewport, + position: Offset(x, y.toDouble()), + ); + if (carried && y >= 130 && y < 170) { + expect(c.dragRejection, contains('connected clips')); + expect(c.project(viewport).version, same(base)); + continue; + } + expect(c.dragRejection, isNull, reason: 'pointer y=$y'); + expect(c.dragGhost, isNotNull, reason: 'pointer y=$y'); + expect(c.dragGhost!.top, y - 10); + expect(c.dragGhosts.length, carried ? 2 : 1); + expect(c.version, same(base)); + final q = c.project(viewport).version.kernelVersion.query(); + if (y >= 130 && y < 170) { + expect(q.connectionForTarget(a), isNull); + } else { + expect( + q.connectionOrderLocation(a)!.side, + y < 130 ? ConnectionSide.above : ConnectionSide.below, + ); + } + } + final end = Offset(x, below ? 90 : 210); + final prepared = c.project(viewport).version; + expect(c.finishDrag(viewport: viewport, position: end), isTrue); + expect(c.version, same(prepared)); + c.undo(); + expect(c.version, same(base)); + c.redo(); + expect(c.version, same(prepared)); + }, + ); + } + } + } + test( + 'audio above landing can return to Primary and cancel without publishing', + () { + final f = _Fixture( + threePrimary: true, + audioPrimary: true, + belowIncumbent: true, + connectedPrimarySide: ConnectionSide.below, + ); + final c = f.controller; + addTearDown(c.dispose); + c.zoomAt( + screenX: 0, + newPixelsPerTick: 2 / TimelineClock.ticksPerSecond, + viewport: viewport, + ); + final base = c.version; + final p = base.kernelVersion.query().elementById(ElementId('p'))!; + c.beginDrag(viewport: viewport, position: const Offset(40, 250)); + c.updateDrag(viewport: viewport, position: const Offset(60, 60)); + expect(c.dragRejection, isNull); + c.updateDrag(viewport: viewport, position: const Offset(30, 150)); + expect(c.dragMode, LayoutPreviewMode.primaryInsert); + expect( + c + .project(viewport) + .version + .kernelVersion + .query() + .connectionForTarget(p), + isNull, + ); + c.updateDrag(viewport: viewport, position: const Offset(60, 60)); + expect( + c + .project(viewport) + .version + .kernelVersion + .query() + .connectionOrderLocation(p)! + .side, + ConnectionSide.below, + ); + c.cancelDrag(); + expect(c.version, same(base)); + expect(c.project(viewport).version, same(base)); + expect(c.canUndo, isFalse); + }, + ); + for (final fromPrimary in [false, true]) { + for (final start in [10, 12]) { + test( + 'audio above-axis release preserves time and lands below: $start primary=$fromPrimary', + () { + final f = _Fixture( + threePrimary: true, + audioPrimary: true, + belowIncumbent: true, + unconnectedPrimary: fromPrimary, + connectedPrimarySide: fromPrimary ? null : ConnectionSide.below, + ); + final c = f.controller; + addTearDown(c.dispose); + c.zoomAt( + screenX: 0, + newPixelsPerTick: 2 / TimelineClock.ticksPerSecond, + viewport: viewport, + ); + final original = c.version; + final p = original.kernelVersion.query().elementById(ElementId('p'))!; + final a = LayoutBodyId.element( + original.kernelVersion.query().elementById(ElementId('a'))!, + ); + expect( + c.beginDrag( + viewport: viewport, + position: fromPrimary + ? const Offset(60, 150) + : const Offset(40, 250), + ), + isTrue, + ); + final pointer = Offset(40 + start * 2.0, 60); + c.updateDrag(viewport: viewport, position: pointer); + expect(c.dragRejection, isNull); + expect(c.dragGhost!.top, 40); + final prepared = c.project(viewport).version; + final q = prepared.kernelVersion.query(); + expect(q.absoluteStart(p), start * TimelineClock.ticksPerSecond); + expect(q.connectionOrderLocation(p)!.side, ConnectionSide.below); + expect( + prepared.placementOf(LayoutBodyId.element(p)).lane, + start == 10 ? 2 : 1, + ); + expect(prepared.placementOf(a).top, 180); + expect(c.version, same(original)); + expect(c.finishDrag(viewport: viewport, position: pointer), isTrue); + expect(c.version, same(prepared)); + c.undo(); + expect(c.version, same(original)); + c.redo(); + expect(c.version, same(prepared)); + }, + ); + } + } + for (final audio in [true, false]) { + for (final sourceSide in [ + null, + ConnectionSide.below, + if (!audio) ConnectionSide.above, + ]) { + test('latest incumbent avoidance: audio=$audio source=$sourceSide', () { + final f = _Fixture( + threePrimary: true, + audioPrimary: audio, + belowIncumbent: true, + connectedPrimarySide: sourceSide, + ); + final c = f.controller; + addTearDown(c.dispose); + c.zoomAt( + screenX: 0, + newPixelsPerTick: 2 / TimelineClock.ticksPerSecond, + viewport: viewport, + ); + final original = c.version; + final a = LayoutBodyId.element( + original.kernelVersion.query().elementById(ElementId('a'))!, + ); + expect(original.placementOf(a).top, 180); + expect( + c.beginDrag( + viewport: viewport, + position: sourceSide == null + ? const Offset(60, 150) + : Offset(40, sourceSide == ConnectionSide.below ? 250 : 100), + ), + isTrue, + ); + c.updateDrag(viewport: viewport, position: const Offset(44, 190)); + expect(c.dragRejection, isNull); + expect(c.project(viewport).version.placementOf(a).top, 230); + c.updateDrag(viewport: viewport, position: const Offset(44, 210)); + expect( + c.project(viewport).version.placementOf(a).top, + 230, + reason: + 'requested top 190 has not crossed the latest incumbent top 230', + ); + c.updateDrag(viewport: viewport, position: const Offset(44, 250)); + expect( + c.project(viewport).version.placementOf(a).top, + 230, + reason: 'equal top retains the previous inner/outer order', + ); + c.updateDrag(viewport: viewport, position: const Offset(44, 251)); + expect(c.project(viewport).version.placementOf(a).top, 180); + final prepared = c.project(viewport).version; + expect(c.version, same(original)); + expect( + c.finishDrag(viewport: viewport, position: const Offset(44, 251)), + isTrue, + ); + expect(c.version, same(prepared)); + c.undo(); + expect(c.version, same(original)); + c.redo(); + expect(c.version, same(prepared)); + }); + } + } + for (final kind in [ui.PointerDeviceKind.mouse, ui.PointerDeviceKind.touch]) { + testWidgets('gap drag keeps a Primary reservation: $kind', (tester) async { + final f = _Fixture(threePrimary: true, gapPrimary: true); + final c = f.controller; + addTearDown(c.dispose); + c.zoomAt( + screenX: 0, + newPixelsPerTick: 2 / TimelineClock.ticksPerSecond, + viewport: viewport, + ); + await tester.pumpWidget(_surface(c)); + final original = c.version; + final gap = original.kernelVersion.query().elementById(ElementId('p'))!; + final gesture = await tester.startGesture( + const Offset(60, 150), + kind: kind, + ); + await gesture.moveTo(const Offset(100, 220)); + await tester.pump(); + expect(c.isDragging, isTrue); + expect(c.project(viewport).version, same(original)); + expect(c.dragGhost, isNotNull); + expect(c.dragRejection, isNotNull); + await _expectPixel( + tester, + 30, + 165, + const TimelineThemeData.dark().primaryLaneBackgroundColor, + ); + await gesture.moveTo(const Offset(238, 150)); + await tester.pump(); + final prepared = c.project(viewport).version; + final q = prepared.kernelVersion.query(); + expect( + q.storylineElements(c.storyline).map((h) => q.element(h).id.value), + ['first', 'last', 'p'], + ); + expect(q.connectionForTarget(gap), isNull); + expect( + q.element(gap).duration, + original.kernelVersion.query().element(gap).duration, + ); + expect(c.version, same(original)); + await _expectPixel( + tester, + 30, + 165, + const TimelineThemeData.dark().visualClipColor, + ); + await _expectPixel( + tester, + 100, + 165, + const TimelineThemeData.dark().primaryLaneBackgroundColor, + ); + await gesture.moveTo(const Offset(238, 220)); + await tester.pump(); + expect(c.project(viewport).version, same(original)); + await gesture.moveTo(const Offset(238, 150)); + await tester.pump(); + final committed = c.project(viewport).version; + await gesture.up(); + await tester.pump(); + expect(c.version, same(committed)); + c.undo(); + expect(c.version, same(original)); + c.redo(); + expect(c.version, same(committed)); + expect(tester.takeException(), isNull); + }); + testWidgets('off-axis gap release rolls back: $kind', (tester) async { + final f = _Fixture(threePrimary: true, gapPrimary: true); + final c = f.controller; + addTearDown(c.dispose); + c.zoomAt( + screenX: 0, + newPixelsPerTick: 2 / TimelineClock.ticksPerSecond, + viewport: viewport, + ); + await tester.pumpWidget(_surface(c)); + final original = c.version; + final gesture = await tester.startGesture( + const Offset(60, 150), + kind: kind, + ); + await gesture.moveTo(const Offset(238, 150)); + await tester.pump(); + expect(c.project(viewport).version, isNot(same(original))); + await gesture.moveTo(const Offset(238, 220)); + await gesture.up(); + await tester.pump(); + expect(c.version, same(original)); + expect(f.kernel.current, same(original.kernelVersion)); + expect(c.isDragging, isFalse); + expect(c.canUndo, isFalse); + }); + } + + testWidgets( + 'Primary with connections reorders but rejects detach in the same gesture', + (tester) async { + final f = _Fixture(threePrimary: true, carriedChild: true); + final c = f.controller; + addTearDown(c.dispose); + c.zoomAt( + screenX: 0, + newPixelsPerTick: 2 / TimelineClock.ticksPerSecond, + viewport: viewport, + ); + await tester.pumpWidget(_surface(c)); + final original = c.version; + final q = original.kernelVersion.query(); + final p = q.elementById(ElementId('p'))!; + final a = q.elementById(ElementId('a'))!; + final gesture = await tester.startGesture(const Offset(60, 150)); + await gesture.moveTo(const Offset(222, 150)); + await tester.pump(); + expect( + c.project(viewport).version, + same(original), + reason: 'before last is the unchanged source boundary', + ); + await gesture.moveTo(const Offset(238, 150)); + await tester.pump(); + expect(c.dragRejection, isNull); + expect(c.dragMode, LayoutPreviewMode.primaryInsert); + expect(c.dragGhosts.length, 3); + final firstPreview = c.project(viewport).version; + expect( + firstPreview.kernelVersion + .query() + .storylineElements(c.storyline) + .map((h) => q.element(h).id.value), + ['first', 'last', 'p'], + ); + await gesture.moveTo(const Offset(70, 70)); + await tester.pump(); + expect(c.dragMode, LayoutPreviewMode.invalid); + expect(c.dragRejection, contains('connected clips')); + expect( + c + .project(viewport) + .version + .kernelVersion + .query() + .connectionForTarget(p), + isNull, + ); + await gesture.moveTo(const Offset(238, 150)); + await tester.pump(); + final prepared = c.project(viewport).version; + final pq = prepared.kernelVersion.query(); + expect(pq.connectionForTarget(p), isNull); + expect(pq.storylineLength(c.storyline), 3); + expect( + pq.absoluteStart(a) - pq.absoluteStart(p), + 2 * TimelineClock.ticksPerSecond, + ); + expect(pq.element(p).duration, q.element(p).duration); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + await gesture.up(); + await tester.pump(); + expect(c.version, same(prepared)); + expect(c.selectedIdentities, {p}); + c.undo(); + expect(c.version, same(original)); + c.redo(); + expect(c.version, same(prepared)); + expect(tester.takeException(), isNull); + }, + ); + + test( + 'camera change at stationary pointer changes the Primary half target', + () { + final f = _Fixture(threePrimary: true); + final c = f.controller; + addTearDown(c.dispose); + c.zoomAt( + screenX: 0, + newPixelsPerTick: 2 / TimelineClock.ticksPerSecond, + viewport: viewport, + ); + final original = c.version; + c.beginDrag(viewport: viewport, position: const Offset(60, 150)); + c.updateDrag(viewport: viewport, position: const Offset(225, 150)); + expect(c.project(viewport).version, same(original)); + c.panBy(horizontalPixels: 10); + expect(c.project(viewport).version, isNot(same(original))); + c.cancelDrag(); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + }, + ); + test( + 'connected drop into a clip inserts at its boundary without cutting', + () { + final f = _Fixture(); + final c = f.controller; + addTearDown(c.dispose); + final before = c.version.kernelVersion.query(); + final p = before.elementById(ElementId('p'))!; + c.beginDrag(viewport: viewport, position: down); + expect( + c.finishDrag(viewport: viewport, position: const Offset(300, 150)), + isTrue, + ); + final q = c.version.kernelVersion.query(); + expect( + q.storylineElements(c.storyline).map((h) => q.element(h).id.value), + ['a', 'p'], + ); + expect(q.element(p).duration, before.element(p).duration); + expect(q.element(p).sourceStart, before.element(p).sourceStart); + expect(q.element(p).sourceDuration, before.element(p).sourceDuration); + }, + ); + testWidgets( + 'Primary with descendants rejects outside release without publication', + (tester) async { + final f = _Fixture(carriedChild: true, threePrimary: true); + final c = f.controller; + addTearDown(c.dispose); + await tester.pumpWidget(_surface(c)); + final original = c.version; + final q = original.kernelVersion.query(); + final p = q.elementById(ElementId('p'))!; + final a = q.elementById(ElementId('a'))!; + const start = Offset(250, 150), end = Offset(300, 70); + final gesture = await tester.startGesture(start); + await gesture.moveTo(end); + await tester.pump(); + expect(c.dragRejection, contains('connected clips')); + expect(c.dragMode, LayoutPreviewMode.invalid); + expect(c.dragGhosts.length, 3); + final prepared = c.project(viewport).version; + final pq = prepared.kernelVersion.query(); + expect( + pq.storylineElements(c.storyline).map((h) => pq.element(h).id.value), + ['first', 'p', 'last'], + ); + expect(pq.absoluteStart(p), q.absoluteStart(p)); + expect( + pq.absoluteStart(a), + pq.absoluteStart(p) + 2 * TimelineClock.ticksPerSecond, + ); + expect(pq.connectionForTarget(p), isNull); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + await gesture.up(); + await tester.pump(); + expect(c.version, same(prepared)); + expect(c.selectedIdentities, {p}); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + expect(tester.takeException(), isNull); + }, + ); + + test( + 'Primary detach uses current camera, and return/cancel does not publish', + () { + final f = _Fixture(threePrimary: true, unconnectedPrimary: true); + final c = f.controller; + addTearDown(c.dispose); + final original = c.version; + const start = Offset(250, 150), end = Offset(300, 70); + expect(c.beginDrag(viewport: viewport, position: start), isTrue); + c.updateDrag(viewport: viewport, position: end); + final first = c.dragGhost!.body.start; + c.panBy(horizontalPixels: 20, verticalPixels: 10); + expect(c.dragGhost!.body.start, first + TimelineClock.ticksPerSecond); + c.finishDrag(viewport: viewport, position: const Offset(300, 140)); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + c.beginDrag(viewport: viewport, position: const Offset(250, 140)); + c.updateDrag(viewport: viewport, position: end); + c.cancelDrag(); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + }, + ); + + test('last Primary overshoot clamps to zero and creates its gap', () { + final f = _Fixture(unconnectedPrimary: true); + final c = f.controller; + addTearDown(c.dispose); + final original = c.version; + c.beginDrag(viewport: viewport, position: const Offset(250, 150)); + expect( + c.finishDrag(viewport: viewport, position: const Offset(300, 50)), + isTrue, + ); + expect(c.dragRejection, isNull); + final q = c.version.kernelVersion.query(); + expect(q.absoluteStart(q.elementById(ElementId('p'))!), 0); + c.undo(); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + }); + + test( + 'audio Primary previews above and accepts below in the same gesture', + () { + final f = _Fixture( + threePrimary: true, + audioPrimary: true, + unconnectedPrimary: true, + ); + final c = f.controller; + addTearDown(c.dispose); + final original = c.version; + c.beginDrag(viewport: viewport, position: const Offset(250, 150)); + c.updateDrag(viewport: viewport, position: const Offset(300, 70)); + expect(c.dragMode, LayoutPreviewMode.connected); + expect(c.dragRejection, isNull); + expect(c.dragGhost!.top, 50); + expect(c.version, same(original)); + expect(c.isDragging, isTrue); + expect( + c.finishDrag(viewport: viewport, position: const Offset(300, 220)), + isTrue, + ); + final q = c.version.kernelVersion.query(); + expect( + q.connectionOrderLocation(q.elementById(ElementId('p'))!)!.side, + ConnectionSide.below, + ); + c.undo(); + expect(c.version, same(original)); + }, + ); + testWidgets( + 'drag connection follows below-side preview and camera, not Primary insertion', + (tester) async { + final f = _Fixture(); + addTearDown(f.controller.dispose); + final c = f.controller; + await tester.pumpWidget(_surface(c)); + final original = c.version; + c.beginDrag(viewport: viewport, position: down); + c.updateDrag(viewport: viewport, position: const Offset(160, 220)); + Future pixel(int x, int y) async { + await tester.pump(); + final boundary = tester.renderObject( + find.descendant( + of: find.byType(TimelineView), + matching: find.byType(RepaintBoundary), + ), + ); + return tester.runAsync(() async { + final image = await boundary.toImage(pixelRatio: 1); + final data = (await image.toByteData( + format: ui.ImageByteFormat.rawRgba, + ))!; + final value = data.getUint32((y * image.width + x) * 4); + image.dispose(); + return value; + }); + } + + const background = 0x15171aff; + expect(await pixel(100, 200), isNot(background)); + c.panBy(horizontalPixels: 20, verticalPixels: 10); + expect(await pixel(100, 200), isNot(background)); + c.updateDrag(viewport: viewport, position: const Offset(160, 150)); + expect(c.dragMode, LayoutPreviewMode.primaryInsert); + // After vertical pan the Primary band begins at screen y=120. + expect(await pixel(100, 115), background); + c.cancelDrag(); + expect(c.version, same(original)); + expect(c.canUndo, isFalse); + expect(tester.takeException(), isNull); + }, + ); + + testWidgets( + 'drag paints its ghost and connection, but not the landing body', + (tester) async { + final f = _Fixture(); + addTearDown(f.controller.dispose); + final c = f.controller; + await tester.pumpWidget(_surface(c)); + final original = c.version; + const pointer = Offset(160, 60); + c.beginDrag(viewport: viewport, position: down); + c.updateDrag(viewport: viewport, position: pointer); + final prepared = c.project(viewport).version; + expect(prepared, isNot(same(original))); + expect(c.dragGhost!.top, 50); + expect(prepared.placementOf(c.dragSource!).top, 80); + await tester.pump(); + final boundary = tester.renderObject( + find.descendant( + of: find.byType(TimelineView), + matching: find.byType(RepaintBoundary), + ), + ); + await tester.runAsync(() async { + final image = await boundary.toImage(pixelRatio: 1); + final bytes = (await image.toByteData( + format: ui.ImageByteFormat.rawRgba, + ))!; + int pixel(int x, int y) => bytes.getUint32((y * image.width + x) * 4); + const background = 0x15171aff; + expect( + pixel(200, 110), + background, + reason: 'canonical landing body is invisible', + ); + expect( + pixel(100, 125), + isNot(background), + reason: 'connection remains visible while dragging', + ); + expect( + pixel(100, 100), + isNot(background), + reason: 'connection reaches the ghost edge, not the landing edge', + ); + expect( + pixel(200, 60), + isNot(background), + reason: 'pointer ghost is still visible', + ); + image.dispose(); + }); + expect(c.version, same(original)); + expect(c.finishDrag(viewport: viewport, position: pointer), isTrue); + expect(c.version, same(prepared)); + await tester.pump(); + await tester.runAsync(() async { + const background = 0x15171aff; + final placed = await boundary.toImage(pixelRatio: 1); + final placedBytes = (await placed.toByteData( + format: ui.ImageByteFormat.rawRgba, + ))!; + expect( + placedBytes.getUint32((110 * placed.width + 200) * 4), + isNot(background), + ); + placed.dispose(); + }); + await tester.pumpWidget(const SizedBox()); + expect(tester.takeException(), isNull); + }, + ); + test( + 'external coordinated history invalidates drag; stale release cannot publish', + () { + final f = _Fixture(); + addTearDown(f.controller.dispose); + final c = f.controller; + final original = c.version; + c.beginDrag(viewport: viewport, position: down); + c.finishDrag(viewport: viewport, position: moved); + c.beginDrag(viewport: viewport, position: moved); + c.updateDrag(viewport: viewport, position: moved + const Offset(20, 0)); + expect(c.isDragging, isTrue); + f.engine.undo(); + expect(c.finishDrag(viewport: viewport, position: moved), isFalse); + expect(c.version, same(original)); + expect(c.project(viewport).version, same(f.engine.current)); + expect(f.kernel.canUndo, isFalse); + expect(f.kernel.canRedo, isTrue); + }, + ); + + test( + 'external uncoordinated Kernel mutation fails closed, never publishes stale drag', + () { + final f = _Fixture(); + addTearDown(f.controller.dispose); + final c = f.controller; + c.beginDrag(viewport: viewport, position: down); + c.updateDrag(viewport: viewport, position: moved); + final external = f.kernel.beginTransaction().commit(); + expect( + () => c.finishDrag(viewport: viewport, position: moved), + throwsStateError, + ); + expect(c.isDragging, isFalse); + expect(f.kernel.current, same(external)); + expect(() => c.project(viewport), throwsStateError); + }, + ); + + test('editable view rejects a private preview as its published root', () { + final f = _Fixture(); + addTearDown(f.controller.dispose); + final c = f.controller; + final original = c.version; + c.beginDrag(viewport: viewport, position: down); + c.updateDrag(viewport: viewport, position: moved); + final staged = c.project(viewport).version; + expect(() => c.replaceLayout(staged), throwsStateError); + expect(c.version, same(original)); + expect(f.kernel.canUndo, isFalse); + }); + + test('owning connected clips carry their children exactly once', () { + final f = _Fixture(carriedChild: true); + addTearDown(f.controller.dispose); + expect(f.controller.beginDrag(viewport: viewport, position: down), isTrue); + final c = f.controller; + final original = c.version; + c.updateDrag(viewport: viewport, position: moved); + expect(c.dragGhosts.length, 2); + expect(c.version, same(original)); + expect(c.finishDrag(viewport: viewport, position: moved), isTrue); + final q = c.version.kernelVersion.query(); + expect( + q.absoluteStart(q.elementById(ElementId('a'))!), + 5 * TimelineClock.ticksPerSecond, + ); + expect( + q.absoluteStart(q.elementById(ElementId('child'))!), + 8 * TimelineClock.ticksPerSecond, + ); + c.undo(); + expect(c.version, same(original)); + }); + + test('dispose discards prepared edits without publishing history', () { + final f = _Fixture(); + final base = f.kernel.current; + f.controller.beginDrag(viewport: viewport, position: down); + f.controller.updateDrag(viewport: viewport, position: moved); + f.controller.dispose(); + expect(f.kernel.current, same(base)); + expect(f.engine.current!.kernelVersion, same(base)); + expect(f.kernel.canUndo, isFalse); + f.kernel.beginTransaction().rollback(); + }); + + testWidgets('app deactivation cancels a drag before pointer-up', ( + tester, + ) async { + final f = _Fixture(); + addTearDown(f.controller.dispose); + await tester.pumpWidget(_surface(f.controller)); + final gesture = await tester.startGesture(down); + await gesture.moveTo(moved); + await tester.pump(); + expect(f.controller.isDragging, isTrue); + tester.binding.handleAppLifecycleStateChanged(AppLifecycleState.inactive); + await tester.pump(); + expect(f.controller.isDragging, isFalse); + await gesture.up(); + expect(f.kernel.canUndo, isFalse); + tester.binding.handleAppLifecycleStateChanged(AppLifecycleState.resumed); + await tester.pumpWidget(const SizedBox()); + expect(tester.takeException(), isNull); + }); + + testWidgets( + 'controller replacement while dragging cannot commit either document', + (tester) async { + final first = _Fixture(); + final second = _Fixture(); + addTearDown(first.controller.dispose); + addTearDown(second.controller.dispose); + await tester.pumpWidget(_surface(first.controller)); + final gesture = await tester.startGesture(down); + await gesture.moveTo(moved); + await tester.pump(); + expect(first.controller.isDragging, isTrue); + await tester.pumpWidget(_surface(second.controller)); + await gesture.up(); + await tester.pump(); + expect(first.controller.isDragging, isFalse); + expect(first.kernel.canUndo, isFalse); + expect(second.kernel.canUndo, isFalse); + await tester.pumpWidget(const SizedBox()); + expect(tester.takeException(), isNull); + }, + ); + + test('drag theme tokens copy, interpolate and participate in equality', () { + const a = TimelineThemeData.dark(); + final b = a.copyWith(dragGhostOpacity: 0.25); + expect(a, isNot(b)); + expect(b.copyWith(), b); + expect(a.lerp(b, 1), b); + expect(a.dragGhostOpacity, 1); + expect(a.lerp(b, 0.5).dragGhostOpacity, closeTo(0.625, 1e-10)); + }); +} + +Widget _surface(TimelineViewController c) => MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 800, + height: 400, + child: TimelineInteractionRegion( + controller: c, + child: TimelineView(controller: c), + ), + ), + ), +); + +Future _expectPixel( + WidgetTester tester, + int x, + int y, + Color color, +) async { + final boundary = tester.renderObject( + find.descendant( + of: find.byType(TimelineView), + matching: find.byType(RepaintBoundary), + ), + ); + await tester.runAsync(() async { + final image = await boundary.toImage(pixelRatio: 1); + try { + final bytes = (await image.toByteData( + format: ui.ImageByteFormat.rawRgba, + ))!; + final argb = color.toARGB32(); + final rgba = ((argb & 0xffffff) << 8) | (argb >> 24); + expect(bytes.getUint32((y * image.width + x) * 4), rgba); + } finally { + image.dispose(); + } + }); +} + +final class _Fixture { + _Fixture({ + bool carriedChild = false, + bool threePrimary = false, + bool audioPrimary = false, + bool gapPrimary = false, + bool belowIncumbent = false, + bool independentConnectedA = false, + ConnectionSide? connectedPrimarySide, + bool compoundA = false, + bool unconnectedPrimary = false, + bool primaryEnabled = true, + ElementId Function()? createElementId, + TimelineEditFailure? onEditFailure, + }) { + kernel = TimelineKernel.importDto( + TimelineDto( + id: SequenceId('test'), + format: TimelineFormat.fps24, + primaryStorylineId: StorylineId('primary'), + storylines: [ + if (compoundA) + StorylineDto( + id: StorylineId('inner'), + elementIds: [ElementId('inner-clip')], + ), + StorylineDto( + id: StorylineId('primary'), + elementIds: [ + if (threePrimary) ElementId('first'), + if (connectedPrimarySide == null) ElementId('p'), + if (threePrimary) ElementId('last'), + ], + ), + ], + elements: [ + for (final (name, seconds) in [ + ('p', 100), + if (threePrimary) ('first', 10), + if (threePrimary) ('last', 10), + if (!unconnectedPrimary || threePrimary) ('a', 10), + if (compoundA) ('inner-clip', 10), + if (carriedChild) ('child', 5), + ]) + ElementDto( + id: ElementId(name), + enabled: name != 'p' || primaryEnabled, + structure: gapPrimary && name == 'p' + ? ElementStructure.gap + : compoundA && name == 'a' + ? ElementStructure.container + : ElementStructure.content, + containerStorylineId: compoundA && name == 'a' + ? StorylineId('inner') + : null, + sourceRange: TimeRange( + start: RationalTime.zero, + duration: RationalTime.seconds(seconds), + ), + duration: RationalTime.seconds(seconds), + ), + ], + connections: [ + if (!unconnectedPrimary || threePrimary) + ConnectionDto( + id: ConnectionId('a'), + anchorId: ElementId( + belowIncumbent || unconnectedPrimary || independentConnectedA + ? 'first' + : 'p', + ), + targetId: ElementId('a'), + anchorTime: RationalTime.seconds(2), + targetTime: RationalTime.zero, + side: belowIncumbent + ? ConnectionSide.below + : ConnectionSide.above, + ), + if (connectedPrimarySide != null) + ConnectionDto( + id: ConnectionId('p-link'), + anchorId: ElementId('first'), + targetId: ElementId('p'), + anchorTime: RationalTime.zero, + targetTime: RationalTime.zero, + side: connectedPrimarySide, + ), + if (carriedChild) + ConnectionDto( + id: ConnectionId('child'), + anchorId: ElementId('a'), + targetId: ElementId('child'), + anchorTime: RationalTime.seconds(3), + targetTime: RationalTime.zero, + side: ConnectionSide.above, + ), + ], + ), + ); + final primary = kernel.current.query().primaryStoryline; + const domain = LayoutDomainId('main'); + final projection = const TimelineLayoutSceneBuilder() + .projectDefinitionWithMedia( + media: TimelineLayoutMediaIndex.build( + version: kernel.current, + classify: (record) => + audioPrimary && + (record.id == ElementId('p') || + belowIncumbent && record.id == ElementId('a')) + ? LayoutMediaLeafClass.audioOnly + : LayoutMediaLeafClass.nonAudio, + ), + definition: primary, + geometry: (_, _, _) => (height: 40, domain: domain), + ); + engine = TimelineLayoutEngine(kernel: kernel); + engine.buildComponents( + kernel: kernel, + components: TimelineLayoutComponents.build( + semantic: projection, + expanded: const [], + resolve: (_, _, _, _) => const [], + ), + policy: LayoutPolicy( + version: 1, + stacks: [ + for (final side in ConnectionSide.values) + LayoutStackPolicy( + stack: LayoutStackKey(scope: primary, side: side), + primaryBoundary: side == ConnectionSide.above ? 130 : 170, + innerGap: 10, + bodyGap: 10, + domains: const [domain], + ), + ], + ), + ); + var ids = 0; + controller = TimelineViewController.editable( + engine: engine, + geometry: TimelineViewportGeometry(primaryTop: 130, primaryHeight: 40), + camera: TimelineCamera( + baseTick: 0, + pixelsPerTick: 20 / TimelineClock.ticksPerSecond, + ), + createConnectionId: () => ConnectionId('created-link-${ids++}'), + createElementId: + createElementId ?? () => ElementId('created-blade-${ids++}'), + onEditFailure: onEditFailure, + ); + } + late final TimelineKernel kernel; + late final TimelineLayoutEngine engine; + late final TimelineViewController controller; +} diff --git a/packages/cutdex_timeline_ui/test/timeline_keyframe_drag_test.dart b/packages/cutdex_timeline_ui/test/timeline_keyframe_drag_test.dart new file mode 100644 index 0000000..cdf40b5 --- /dev/null +++ b/packages/cutdex_timeline_ui/test/timeline_keyframe_drag_test.dart @@ -0,0 +1,304 @@ +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/gestures.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter/widgets.dart'; +import 'package:flutter_test/flutter_test.dart'; + +const second = TimelineClock.ticksPerSecond; +final viewport = TimelineViewportRect(width: 600, height: 100); + +void main() { + testWidgets( + 'reserved header keeps painted keyframes aligned with drag hits', + (tester) async { + final c = fixture(); + addTearDown(c.dispose); + final clip = c.version.kernelVersion.query().elementById( + ElementId('clip'), + )!; + c.setGeometry( + TimelineViewportGeometry( + primaryTop: 26, + primaryHeight: 60, + clipHeaderOwners: [clip], + clipHeaderHeight: 16, + ), + ); + await mount(tester, c); + final canvas = _KeyframeCenters(); + tester + .widget(find.byType(CustomPaint)) + .painter! + .paint(canvas, const Size(600, 100)); + expect(canvas.centers, contains(const Offset(100, 56))); + expect( + c + .hitTestKeyframe( + viewport: viewport, + position: const Offset(100, 56), + ) + ?.offset, + 2 * second, + ); + expect( + c.hitTestKeyframe(viewport: viewport, position: const Offset(100, 14)), + isNull, + ); + final gesture = await tester.startGesture( + const Offset(100, 56), + kind: PointerDeviceKind.mouse, + ); + await gesture.moveTo(const Offset(150, 56)); + await tester.pump(); + expect(c.selectedKeyframe?.offset, 3 * second); + await gesture.up(); + expect(keys(c), [3 * second, 4 * second]); + }, + ); + + testWidgets( + 'tap selects and seeks; horizontal drag previews then commits one history entry', + (tester) async { + final c = fixture(); + addTearDown(c.dispose); + await mount(tester, c); + await tester.tapAt(const Offset(100, 40)); + expect(c.selectedKeyframe?.offset, 2 * second); + expect(c.playheadTick, 2 * second); + final base = c.version; + final gesture = await tester.startGesture( + const Offset(100, 40), + kind: PointerDeviceKind.mouse, + ); + await gesture.moveTo(const Offset(150, 80)); + await tester.pump(); + expect(c.isDraggingKeyframe, isTrue); + expect(c.dragRejection, isNull); + expect(c.version, same(base)); + expect(c.selectedKeyframe?.offset, 3 * second); + expect(c.playheadTick, 2 * second); + final preview = c.project(viewport).version; + expect(preview, isNot(same(base))); + await gesture.up(); + await tester.pump(); + expect(c.isDragging, isFalse); + expect(c.version, same(preview)); + expect(c.selectedKeyframe?.offset, 3 * second); + expect(keys(c), [3 * second, 4 * second]); + c.undo(); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + c.redo(); + expect(keys(c), [3 * second, 4 * second]); + }, + ); + + testWidgets('neighbor clamps the drop; Escape cancels the private preview', ( + tester, + ) async { + final c = fixture(); + addTearDown(c.dispose); + await mount(tester, c); + final base = c.version; + var gesture = await tester.startGesture( + const Offset(100, 40), + kind: PointerDeviceKind.mouse, + ); + await gesture.moveTo(const Offset(250, 40)); + await tester.pump(); + expect(c.dragRejection, isNull); + expect(c.selectedKeyframe?.offset, 4 * second - second ~/ 30); + await gesture.up(); + expect(keys(c), [4 * second - second ~/ 30, 4 * second]); + c.undo(); + expect(c.version, same(base)); + expect(c.canUndo, isFalse); + gesture = await tester.startGesture( + const Offset(100, 40), + kind: PointerDeviceKind.mouse, + ); + await gesture.moveTo(const Offset(150, 40)); + await tester.pump(); + await tester.sendKeyEvent(LogicalKeyboardKey.escape); + await gesture.up(); + expect(c.version, same(base)); + expect(c.playheadTick, 2 * second); + expect(c.isDragging, isFalse); + }); + + testWidgets('Delete removes selected key channels, not the clip', ( + tester, + ) async { + final c = fixture(); + addTearDown(c.dispose); + await mount(tester, c); + final base = c.version; + await tester.tapAt(const Offset(100, 40)); + await tester.sendKeyEvent(LogicalKeyboardKey.delete); + expect(keys(c), [4 * second]); + expect( + c.version.kernelVersion.query().elementById(ElementId('clip')), + isNotNull, + ); + c.undo(); + expect(c.version, same(base)); + }); + + test('vertical motion does not edit; horizontal moves snap and clamp', () { + final c = fixture(); + addTearDown(c.dispose); + final base = c.version; + expect( + c.beginDrag( + viewport: viewport, + position: const Offset(100, 40), + keyframes: true, + ), + isTrue, + ); + c.updateDrag(viewport: viewport, position: const Offset(100, 95)); + expect(c.project(viewport).version, same(base)); + c.updateDrag(viewport: viewport, position: const Offset(-50, 95)); + expect(c.selectedKeyframe?.offset, 0); + c.updateDrag(viewport: viewport, position: const Offset(900, -100)); + expect(c.selectedKeyframe?.offset, 4 * second - second ~/ 30); + c.updateDrag(viewport: viewport, position: const Offset(153, 40)); + expect(c.selectedKeyframe!.offset % (second ~/ 30), 0); + c.cancelDrag(); + expect(c.version, same(base)); + }); + + test('external history cancels a stale key drag', () { + final c = fixture(); + addTearDown(c.dispose); + c.beginDrag( + viewport: viewport, + position: const Offset(100, 40), + keyframes: true, + ); + c.finishDrag(viewport: viewport, position: const Offset(150, 40)); + c.beginDrag( + viewport: viewport, + position: const Offset(150, 40), + keyframes: true, + ); + c.updateDrag(viewport: viewport, position: const Offset(175, 40)); + c.undo(); + expect(c.isDragging, isFalse); + expect(keys(c), [2 * second, 4 * second]); + }); +} + +List keys(TimelineViewController c) { + final q = c.version.kernelVersion.query(); + final record = q.element(q.elementById(ElementId('clip'))!); + return TimelineSourceClock( + record, + ).keyframeOffsets([record.parameters!['x']!]); +} + +Future mount(WidgetTester tester, TimelineViewController c) => + tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 600, + height: 100, + child: TimelineInteractionRegion( + controller: c, + keyframes: true, + edgeScrollExtent: 0, + child: TimelineView(controller: c, showKeyframes: true), + ), + ), + ), + ), + ); + +TimelineViewController fixture() { + final kernel = TimelineKernel.importDto( + TimelineDto( + id: SequenceId('keys'), + format: TimelineFormat.fps30, + primaryStorylineId: StorylineId('p'), + storylines: [ + StorylineDto(id: StorylineId('p'), elementIds: [ElementId('clip')]), + ], + elements: [ + ElementDto( + id: ElementId('clip'), + structure: ElementStructure.content, + duration: RationalTime.seconds(10), + sourceRange: TimeRange( + start: RationalTime.seconds(5), + duration: RationalTime.seconds(10), + ), + parameters: [ + for (final id in ['x', 'y']) + ParameterCurveDto( + definition: TimelineParameterDefinition( + id: id, + defaultValue: 0, + minimum: -100, + maximum: 100, + ), + keyframes: [ + ParameterKeyframeDto( + sourceTime: RationalTime.seconds(7), + value: 10, + ), + if (id == 'x') + ParameterKeyframeDto( + sourceTime: RationalTime.seconds(9), + value: 20, + ), + ], + ), + ], + ), + ], + ), + ); + final projection = const TimelineLayoutSceneBuilder().projectDefinition( + version: kernel.current, + definition: kernel.current.query().primaryStoryline, + sides: const [], + appearance: (_, _, _) => throw StateError('no connections'), + ); + final engine = TimelineLayoutEngine(kernel: kernel); + engine.buildComponents( + kernel: kernel, + components: TimelineLayoutComponents.build( + semantic: projection, + expanded: const [], + resolve: (_, _, _, _) => const [], + ), + policy: LayoutPolicy(version: 1, stacks: const []), + ); + return TimelineViewController.editable( + engine: engine, + geometry: TimelineViewportGeometry(primaryTop: 10, primaryHeight: 60), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 50 / second), + createConnectionId: () => ConnectionId('unused'), + createElementId: () => ElementId('unused'), + ); +} + +class _KeyframeCenters extends TestRecordingCanvas { + final centers = []; + + @override + void drawPath(Path path, Paint paint) { + if (paint.style == PaintingStyle.fill && + paint.color.toARGB32() == + const TimelineThemeData.dark().keyframeColor.toARGB32()) { + centers.add(path.getBounds().center); + } + super.drawPath(path, paint); + } +} diff --git a/packages/cutdex_timeline_ui/test/timeline_keyframe_position_test.dart b/packages/cutdex_timeline_ui/test/timeline_keyframe_position_test.dart new file mode 100644 index 0000000..56fd333 --- /dev/null +++ b/packages/cutdex_timeline_ui/test/timeline_keyframe_position_test.dart @@ -0,0 +1,151 @@ +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:cutdex_timeline_ui/src/timeline_keyframes.dart'; +import 'package:flutter/widgets.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + for (final speed in [1, 2]) { + testWidgets('2s keyframe aligns with playhead at speed $speed', ( + tester, + ) async { + final kernel = TimelineKernel.importDto( + TimelineDto( + id: SequenceId('keyframe-position'), + format: TimelineFormat.fps30, + primaryStorylineId: StorylineId('primary'), + storylines: [ + StorylineDto( + id: StorylineId('primary'), + elementIds: [ElementId('clip')], + ), + ], + elements: [ + ElementDto( + id: ElementId('clip'), + structure: ElementStructure.content, + duration: RationalTime.seconds(20), + sourceRange: TimeRange( + start: RationalTime.seconds(5), + duration: RationalTime.seconds(20 * speed), + ), + ), + ], + ), + ); + const playhead = 2 * TimelineClock.ticksPerSecond; + final query = kernel.current.query(); + final clip = query.elementById(ElementId('clip'))!; + final sourceTick = query.sourceTimeAt(clip, playhead); + final tx = kernel.beginTransaction(); + tx.setParameterCurve( + clip, + ParameterCurveDto( + definition: TimelineParameterDefinition( + id: 'canvas.rotation', + defaultValue: 0, + minimum: -360, + maximum: 360, + ), + keyframes: [ + ParameterKeyframeDto( + sourceTime: RationalTime.timelineTicks(sourceTick), + value: 30, + ), + ], + ), + ); + tx.commit(); + final projection = const TimelineLayoutSceneBuilder().project( + version: kernel.current, + stacks: const [], + appearance: (_, _, _) => throw StateError('no connections'), + ); + final version = TimelineLayoutEngine(kernel: kernel) + .initializeProjection( + kernel: kernel, + projection: projection, + policy: LayoutPolicy(version: 1, stacks: const []), + ) + .version; + final controller = TimelineViewController( + version: version, + storyline: query.primaryStoryline, + geometry: TimelineViewportGeometry(primaryTop: 10, primaryHeight: 60), + camera: TimelineCamera( + baseTick: 0, + pixelsPerTick: 20 / TimelineClock.ticksPerSecond, + ), + ); + addTearDown(controller.dispose); + controller.seekTo(playhead); + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: TimelineView(controller: controller, showKeyframes: true), + ), + ); + final actual = []; + final expected = []; + for (final pixelsPerSecond in [20.0, 2.0, 1.0]) { + controller.setCamera( + TimelineCamera( + baseTick: 0, + pixelsPerTick: pixelsPerSecond / TimelineClock.ticksPerSecond, + ), + ); + await tester.pump(); + final canvas = _Diamonds(); + tester + .widget(find.byType(CustomPaint)) + .painter! + .paint(canvas, const Size(600, 100)); + actual.add(canvas.centers.isEmpty ? null : canvas.centers.single.dx); + expected.add( + controller.camera.screenXForTick( + playhead, + TimelineViewportRect(width: 600, height: 100), + ), + ); + } + expect( + kernel.current + .query() + .element(clip) + .parameters!['canvas.rotation']! + .keyframeAt(sourceTick), + isNotNull, + ); + final record = kernel.current.query().element(clip); + expect(TimelineSourceClock(record).projectOffsets([sourceTick]), [ + playhead, + ]); + final offsets = timelineKeyframeOffsets( + record, + start: 0, + end: record.duration.toDouble(), + ); + expect( + actual, + orderedEquals(expected.map((x) => closeTo(x, 1e-6))), + reason: + '20, 2, 1 pixels/sec; UI offsets in seconds: ${offsets.map((x) => x / TimelineClock.ticksPerSecond).toList()}; canonical offset: 2s', + ); + }); + } +} + +class _Diamonds extends TestRecordingCanvas { + final centers = []; + @override + void drawPath(Path path, Paint paint) { + if (paint.color.toARGB32() == + const TimelineThemeData.dark().keyframeColor.toARGB32() && + paint.style == PaintingStyle.fill) { + centers.add(path.getBounds().center); + } + super.drawPath(path, paint); + } +} diff --git a/packages/cutdex_timeline_ui/test/timeline_keyframes_test.dart b/packages/cutdex_timeline_ui/test/timeline_keyframes_test.dart new file mode 100644 index 0000000..e0b4c92 --- /dev/null +++ b/packages/cutdex_timeline_ui/test/timeline_keyframes_test.dart @@ -0,0 +1,154 @@ +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:cutdex_timeline_ui/src/timeline_keyframes.dart'; +import 'package:flutter/widgets.dart'; +import 'package:flutter_test/flutter_test.dart'; + +TimelineKernel fixture({List? retime}) => + TimelineKernel.importDto( + TimelineDto( + id: SequenceId('test'), + format: TimelineFormat.fps30, + primaryStorylineId: StorylineId('primary'), + storylines: [ + StorylineDto( + id: StorylineId('primary'), + elementIds: [ElementId('clip')], + ), + ], + elements: [ + ElementDto( + id: ElementId('clip'), + structure: ElementStructure.content, + duration: RationalTime.timelineTicks(100), + sourceRange: TimeRange( + start: RationalTime.timelineTicks(10), + duration: RationalTime.timelineTicks(200), + ), + retimeSegments: retime ?? const [], + parameters: [ + for (final id in ['x', 'y']) + ParameterCurveDto( + definition: TimelineParameterDefinition( + id: id, + defaultValue: 0, + minimum: -10, + maximum: 10, + ), + keyframes: [ + for (final tick in [0, 10, 50, 110, 210, 300]) + ParameterKeyframeDto( + sourceTime: RationalTime.timelineTicks(tick), + value: 1, + ), + ], + ), + ], + ), + ], + ), + ); + +void main() { + test( + 'trim and speed map keys, merge axes and query only the visible range', + () { + final q = fixture().current.query(); + final clip = q.element(q.elementById(ElementId('clip'))!); + expect(timelineKeyframeOffsets(clip, start: 0, end: 100), [0, 20, 50]); + expect(timelineKeyframeOffsets(clip, start: 25, end: 75), [50]); + expect(timelineKeyframeOffsets(clip, start: 60, end: 90), isEmpty); + }, + ); + + test('reverse and freeze show source key occurrences without duplicates', () { + final q = fixture( + retime: [ + RetimeSegmentDto( + projectDuration: RationalTime.timelineTicks(50), + sourceStart: RationalTime.timelineTicks(110), + sourceDelta: RationalTime.timelineTicks(-100), + ), + RetimeSegmentDto( + projectDuration: RationalTime.timelineTicks(50), + sourceStart: RationalTime.timelineTicks(10), + sourceDelta: RationalTime.zero, + ), + ], + ).current.query(); + final clip = q.element(q.elementById(ElementId('clip'))!); + expect(timelineKeyframeOffsets(clip, start: 0, end: 100), [0, 30, 50]); + expect(timelineKeyframeOffsets(clip, start: 60, end: 90), isEmpty); + }); + + testWidgets('clip diamonds follow camera zoom and pan without hit targets', ( + tester, + ) async { + final kernel = fixture(); + final projection = const TimelineLayoutSceneBuilder().project( + version: kernel.current, + stacks: const [], + appearance: (_, _, _) => throw StateError('no connections'), + ); + final version = TimelineLayoutEngine(kernel: kernel) + .initializeProjection( + kernel: kernel, + projection: projection, + policy: LayoutPolicy(version: 1, stacks: const []), + ) + .version; + final c = TimelineViewController( + version: version, + storyline: kernel.current.query().primaryStoryline, + geometry: TimelineViewportGeometry(primaryTop: 10, primaryHeight: 60), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 2), + ); + addTearDown(c.dispose); + Future mount(bool show) => tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: SizedBox( + width: 240, + height: 100, + child: TimelineView(controller: c, showKeyframes: show), + ), + ), + ); + List centers() { + final canvas = _KeyCanvas(); + tester + .widget(find.byType(CustomPaint)) + .painter! + .paint(canvas, const Size(240, 100)); + return canvas.centers; + } + + await mount(true); + expect(centers(), [ + const Offset(0, 40), + const Offset(40, 40), + const Offset(100, 40), + ]); + c.setCamera(TimelineCamera(baseTick: 10, pixelsPerTick: 4)); + await tester.pump(); + expect(centers(), [const Offset(40, 40), const Offset(160, 40)]); + expect(find.byType(GestureDetector), findsNothing); + await mount(false); + expect(centers(), isEmpty); + }); +} + +class _KeyCanvas extends TestRecordingCanvas { + final centers = []; + @override + void drawPath(Path path, Paint paint) { + if (paint.color.toARGB32() == + const TimelineThemeData.dark().keyframeColor.toARGB32() && + paint.style == PaintingStyle.fill) { + centers.add(path.getBounds().center); + } + super.drawPath(path, paint); + } +} diff --git a/packages/cutdex_timeline_ui/test/timeline_ruler_intervals_test.dart b/packages/cutdex_timeline_ui/test/timeline_ruler_intervals_test.dart new file mode 100644 index 0000000..95a11e7 --- /dev/null +++ b/packages/cutdex_timeline_ui/test/timeline_ruler_intervals_test.dart @@ -0,0 +1,41 @@ +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + test('labels use clock intervals at minute and hour zoom levels', () { + for (final (desired, expected) in [ + (0.2, 1), + (1.1, 2), + (11.0, 15), + (25.0, 30), + (40.0, 60), + (100.0, 120), + (200.0, 300), + (700.0, 900), + (1400.0, 1800), + (4000.0, 7200), + (8000.0, 10800), + (100000.0, 172800), + ]) { + expect(TimelineRuler.majorStepSecondsFor(desired), expected); + } + }); + test('ordinary minor ticks stay on whole seconds', () { + for (final desired in [ + 0.1, + 1.5, + 3.0, + 7.0, + 12.0, + 25.0, + 100.0, + 1000.0, + 10000.0, + ]) { + final seconds = TimelineRuler.majorStepSecondsFor(desired); + final divisions = TimelineRuler.minorDivisionsFor(seconds); + expect(seconds % divisions, 0); + expect(seconds ~/ divisions, greaterThanOrEqualTo(1)); + } + }); +} diff --git a/packages/cutdex_timeline_ui/test/timeline_thumbnails_test.dart b/packages/cutdex_timeline_ui/test/timeline_thumbnails_test.dart new file mode 100644 index 0000000..99bde5c --- /dev/null +++ b/packages/cutdex_timeline_ui/test/timeline_thumbnails_test.dart @@ -0,0 +1,675 @@ +import 'dart:ui' as ui; + +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + for (final mapping in ['implicit', 'piecewise', 'reverse', 'freeze']) { + for (final leading in [true, false]) { + testWidgets( + 'edge trim retains filmstrip samples: $mapping, leading $leading', + (tester) async { + final controller = _trimFixture(mapping); + final frames = _Frames(); + addTearDown(controller.dispose); + addTearDown(frames.dispose); + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 800, + height: 60, + child: TimelineView( + controller: controller, + thumbnails: frames, + theme: const TimelineThemeData.dark().copyWith( + clipHeaderHeight: 20, + ), + ), + ), + ), + ), + ); + final before = frames.requests.map((r) => (r.tick, r.span)).toSet(); + final base = controller.version; + final viewport = TimelineViewportRect(width: 800, height: 60); + final down = Offset(leading ? 1 : 599, 40); + expect( + controller.beginDrag( + viewport: viewport, + position: down, + trimHitExtent: 6, + ), + isTrue, + ); + for (final delta in [0.5, 1.5, 2.5, 6.5, 8.0, 32.5, 123.5, 323.5]) { + controller.updateDrag( + viewport: viewport, + position: down.translate(leading ? delta : -delta, 0), + ); + await tester.pump(); + expect(controller.dragRejection, isNull); + expect(frames.requests, isNotEmpty); + for (final request in frames.requests) { + expect( + before, + contains((request.tick, request.span)), + reason: + 'The same source cell must retain its sample and sampling tier after $delta px trim', + ); + } + } + controller.updateDrag( + viewport: viewport, + position: down.translate(leading ? -8 : 8, 0), + ); + await tester.pump(); + expect(controller.dragRejection, isNull); + expect( + frames.requests.map((r) => (r.tick, r.span)).toSet(), + containsAll(before), + reason: + 'Extending an edge reveals cells without replacing old ones', + ); + controller.cancelDrag(); + await tester.pump(); + expect(controller.version, same(base)); + expect(frames.requests.map((r) => (r.tick, r.span)).toSet(), before); + expect( + controller.beginDrag( + viewport: viewport, + position: down, + trimHitExtent: 6, + ), + isTrue, + ); + final target = down.translate(leading ? 323.5 : -323.5, 0); + controller.updateDrag(viewport: viewport, position: target); + await tester.pump(); + final preview = frames.requests.map((r) => (r.tick, r.span)).toSet(); + expect( + controller.finishDrag(viewport: viewport, position: target), + isTrue, + ); + await tester.pump(); + expect(frames.requests.map((r) => (r.tick, r.span)).toSet(), preview); + controller.undo(); + await tester.pump(); + expect(frames.requests.map((r) => (r.tick, r.span)).toSet(), before); + }, + ); + } + } + + for (final (split, withAudio, retimed) in [ + (false, false, false), + (false, true, false), + (true, false, false), + (true, true, false), + (true, false, true), + (true, true, true), + ]) { + testWidgets( + 'filmstrip and video audio remain separate, withAudio=$withAudio, split=$split, retimed=$retimed', + (tester) async { + final kernel = TimelineKernel.importDto( + TimelineDto( + id: SequenceId('s'), + name: 's', + format: TimelineFormat.fps30, + primaryStorylineId: StorylineId('p'), + storylines: [ + StorylineDto( + id: StorylineId('p'), + elementIds: [ElementId('a'), ElementId('b')], + ), + ], + elements: [ + for (final id in ['a', 'b']) + ElementDto( + id: ElementId(id), + structure: ElementStructure.content, + duration: RationalTime.seconds(10), + sourceRange: TimeRange( + start: RationalTime.seconds(5), + duration: RationalTime.seconds(15), + ), + mediaRange: TimeRange( + start: RationalTime.zero, + duration: RationalTime.seconds(30), + ), + retimeSegments: retimed + ? [ + RetimeSegmentDto( + projectDuration: RationalTime.seconds(5), + sourceStart: RationalTime.seconds(5), + sourceDelta: RationalTime.seconds(15), + ), + RetimeSegmentDto( + projectDuration: RationalTime.seconds(5), + sourceStart: RationalTime.seconds(20), + sourceDelta: RationalTime.seconds(-10), + ), + ] + : [], + payloadRef: PayloadRef(id), + name: 'clip', + ), + ], + ), + ); + final engine = TimelineLayoutEngine(kernel: kernel); + final projection = const TimelineLayoutSceneBuilder().projectDefinition( + version: kernel.current, + definition: kernel.current.query().primaryStoryline, + sides: const [], + appearance: (_, _, _) => const LayoutBodyAppearance( + height: 60, + domain: LayoutDomainId('video'), + placementClass: LayoutPlacementClass.visualLike, + ), + ); + engine.buildComponents( + kernel: kernel, + components: TimelineLayoutComponents.build( + semantic: projection, + expanded: const [], + resolve: (_, _, _, _) => const [], + ), + policy: LayoutPolicy(version: 1, stacks: const []), + ); + var ids = 0; + final controller = TimelineViewController.editable( + engine: engine, + geometry: TimelineViewportGeometry(primaryTop: 0, primaryHeight: 60), + camera: TimelineCamera( + baseTick: 0, + pixelsPerTick: 60 / TimelineClock.ticksPerSecond, + ), + createElementId: () => ElementId('split-${ids++}'), + createConnectionId: () => ConnectionId('link-${ids++}'), + ); + final frames = _Frames(); + final audio = _VideoAudio(); + addTearDown(audio.dispose); + final stripHeight = withAudio ? 24.0 : 40.0; + addTearDown(controller.dispose); + addTearDown(frames.dispose); + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 150, + height: 60, + child: TimelineView( + controller: controller, + thumbnails: frames, + waveforms: withAudio ? audio : null, + theme: const TimelineThemeData.dark().copyWith( + clipHeaderHeight: 20, + ), + ), + ), + ), + ), + ); + expect(frames.requests, isNotEmpty); + expect(frames.requests.every((r) => r.id == 'a'), isTrue); + expect( + frames.requests.first.tick, + ((retimed ? 5.0625 : (withAudio ? 4.89375 : 4.78125)) * + TimelineClock.ticksPerSecond) + .round(), + reason: + 'The partial first cell keeps its center, even outside the edit window', + ); + expect( + frames.requests.last.tick, + greaterThan(frames.requests.first.tick), + ); + expect( + frames.requests.length, + withAudio ? 14 : 10, + reason: + 'Two tiles beyond the visible right edge should be prefetched', + ); + expect( + frames.requests.every((r) => r.logicalSize.height == stripHeight), + isTrue, + ); + expect( + frames.requests.every( + (r) => r.logicalSize.width == stripHeight * 9 / 16, + ), + isTrue, + ); + if (!split && !withAudio && !retimed) { + final published = kernel.current; + final beforePreview = frames.requests.map((r) => r.tick).toList(); + final handle = published.query().elementById(ElementId('a'))!; + final preview = const LayoutIntervalEdit().preview( + kernel: kernel, + engine: engine, + projection: engine.currentComponents!.semanticProjection, + edit: (tx) => tx.retimePlayback(handle, [ + RetimeSegmentDto( + projectDuration: RationalTime.seconds(5), + sourceStart: RationalTime.zero, + sourceDelta: RationalTime.seconds(10), + ), + ]), + ); + controller.showLayoutPreview(preview.result.version); + await tester.pump(); + expect(kernel.current, same(published)); + expect(frames.requests.last.tick, greaterThan(beforePreview.last)); + controller.clearLayoutPreview(); + preview.cancel(); + await tester.pump(); + expect(frames.requests.map((r) => r.tick), beforePreview); + for (final piecewise in [false, true]) { + final duration = + (piecewise ? 5 : 10) * TimelineClock.ticksPerSecond + 1; + final speedPreview = const LayoutIntervalEdit().preview( + kernel: kernel, + engine: engine, + projection: engine.currentComponents!.semanticProjection, + edit: (tx) => tx.retimePlayback(handle, [ + RetimeSegmentDto( + projectDuration: RationalTime.timelineTicks(duration), + sourceStart: RationalTime.zero, + sourceDelta: RationalTime.seconds(piecewise ? 5 : 10), + ), + if (piecewise) + RetimeSegmentDto( + projectDuration: RationalTime.seconds(5), + sourceStart: RationalTime.seconds(5), + sourceDelta: RationalTime.seconds(5), + ), + ]), + ); + controller.applyLayout(speedPreview.commit()); + for (final scale in [30.0, 60.0, 120.0, 240.0]) { + controller.setCamera( + TimelineCamera( + baseTick: 0, + pixelsPerTick: scale / TimelineClock.ticksPerSecond, + ), + ); + await tester.pump(); + final sourceDelta = + (piecewise ? 7.5 : 15.0) * TimelineClock.ticksPerSecond; + final sourceTicksPerPixel = + sourceDelta / duration * TimelineClock.ticksPerSecond / scale; + final cellSpan = 22.5 * sourceTicksPerPixel; + final firstCell = + ((5 * TimelineClock.ticksPerSecond + sourceTicksPerPixel) / + cellSpan) + .floor(); + expect( + frames.requests.first.tick, + closeTo((firstCell + 0.5) * cellSpan, 1), + reason: + 'Zoom $scale must sample a complete source cell after retiming, piecewise=$piecewise', + ); + } + controller.undo(); + } + controller.setCamera( + TimelineCamera( + baseTick: 0, + pixelsPerTick: 60 / TimelineClock.ticksPerSecond, + ), + ); + await tester.pump(); + } + if (split) { + final before = frames.requests + .map((request) => (request.tick, request.span)) + .toList(); + controller.panBy(horizontalPixels: 300); + await tester.pump(); + final beforeRight = frames.requests + .map((request) => (request.tick, request.span)) + .toList(); + controller.panBy(horizontalPixels: -300); + await tester.pump(); + controller.seekTo(4 * TimelineClock.ticksPerSecond); + expect(controller.cutSelectionAtPlayhead(), isTrue); + await tester.pump(); + expect( + frames.requests + .take(before.length) + .map((request) => (request.tick, request.span)), + before, + reason: + 'Splitting outside the visible cells must retain their frames', + ); + controller.panBy(horizontalPixels: 300); + await tester.pump(); + expect(frames.requests.first.id, startsWith('split-')); + expect( + frames.requests.map((request) => (request.tick, request.span)), + beforeRight, + reason: 'The right fragment must keep the original source frames', + ); + controller.panBy(horizontalPixels: -300); + controller.undo(); + await tester.pump(); + expect( + frames.requests.map((request) => (request.tick, request.span)), + before, + ); + controller.redo(); + await tester.pump(); + expect( + frames.requests.map((request) => (request.tick, request.span)), + before, + ); + expect(tester.takeException(), isNull); + await tester.pumpWidget(const SizedBox()); + return; + } + final beforeZoom = frames.requests + .map((request) => request.tick) + .toList(); + controller.setCamera( + TimelineCamera( + baseTick: controller.camera.baseTick, + fractionalTick: controller.camera.fractionalTick, + pixelsPerTick: controller.camera.pixelsPerTick * 1.001, + verticalOffset: controller.camera.verticalOffset, + ), + ); + await tester.pump(); + expect(frames.requests, hasLength(beforeZoom.length)); + for (var i = 0; i < beforeZoom.length; i++) { + expect( + frames.requests[i].tick, + closeTo(beforeZoom[i], TimelineFormat.fps30.frameGrid.quantumTicks), + reason: + 'A tiny zoom must shift sample centers by less than a frame', + ); + } + final recorder = ui.PictureRecorder(); + Canvas(recorder).drawColor(Colors.red, BlendMode.src); + final picture = recorder.endRecording(); + frames.image = await tester.runAsync(() => picture.toImage(9, 16)); + picture.dispose(); + frames.ready(); + audio.loaded = true; + audio.ready(); + await tester.pump(); + final canvas = _ImagesCanvas(); + tester + .widget(find.byType(CustomPaint)) + .painter! + .paint(canvas, const Size(150, 60)); + expect( + canvas.destinations.length, + withAudio ? 12 : 8, + reason: 'Prefetched tiles must not be painted outside the viewport', + ); + for (var i = 1; i < canvas.destinations.length; i++) { + expect( + canvas.destinations[i].left, + closeTo(canvas.destinations[i - 1].right, 1e-6), + reason: 'Portrait thumbnails must fill adjacent tiles without gaps', + ); + } + expect( + canvas.destinations.every( + (rect) => + rect.top >= 20 - 1e-6 && rect.bottom <= 20 + stripHeight + 1e-6, + ), + isTrue, + ); + if (withAudio) { + expect(canvas.bars, isNotEmpty); + expect( + canvas.bars.every((bar) => bar.$1.dy >= 46 && bar.$2.dy <= 58), + isTrue, + ); + final height = canvas.bars.first.$2.dy - canvas.bars.first.$1.dy; + audio.gain = 0; + audio.ready(); + await tester.pump(); + final muted = _ImagesCanvas(); + tester + .widget(find.byType(CustomPaint)) + .painter! + .paint(muted, const Size(150, 60)); + expect(height, greaterThan(1)); + expect(muted.bars.every((bar) => bar.$2.dy - bar.$1.dy == 1), isTrue); + } + final before = frames.requests.map((r) => r.tick).toList(); + controller.panBy(horizontalPixels: 240); + await tester.pump(); + expect(frames.requests.first.tick, greaterThan(before.first)); + expect(frames.requests.every((r) => r.id == 'a'), isTrue); + expect( + kernel.current + .query() + .element(kernel.current.query().elementById(ElementId('a'))!) + .sourceStart, + 5 * TimelineClock.ticksPerSecond, + ); + expect(tester.takeException(), isNull); + if (withAudio) { + audio.bound = + false; // Audio removed from the video binding after separation. + audio.ready(); + await tester.pump(); + expect( + frames.requests.every((r) => r.logicalSize.height == 40), + isTrue, + ); + final detached = _ImagesCanvas(); + tester + .widget(find.byType(CustomPaint)) + .painter! + .paint(detached, const Size(150, 60)); + expect(detached.bars, isEmpty); + audio.bound = true; + controller.setGeometry( + TimelineViewportGeometry(primaryTop: 0, primaryHeight: 40), + ); + await tester.pump(); + final compact = _ImagesCanvas(); + tester + .widget(find.byType(CustomPaint)) + .painter! + .paint(compact, const Size(150, 60)); + expect(compact.bars, isEmpty); + expect( + frames.requests.every((r) => r.logicalSize.height == 20), + isTrue, + ); + } + await tester.pumpWidget(const SizedBox()); + }, + ); + } +} + +TimelineViewController _trimFixture(String mapping) { + final segments = switch (mapping) { + 'piecewise' => [(5, 5, 5), (5, 10, 10)], + 'reverse' => [(5, 20, -5), (5, 15, -10)], + 'freeze' => [(5, 10, 0), (5, 10, 5)], + _ => <(int, int, int)>[], + }; + final kernel = TimelineKernel.importDto( + TimelineDto( + id: SequenceId('trim-filmstrip'), + format: TimelineFormat.fps30, + primaryStorylineId: StorylineId('p'), + storylines: [ + StorylineDto(id: StorylineId('p'), elementIds: [ElementId('clip')]), + ], + elements: [ + ElementDto( + id: ElementId('clip'), + structure: ElementStructure.content, + duration: RationalTime.seconds(10), + sourceRange: TimeRange( + start: RationalTime.seconds(mapping == 'freeze' ? 10 : 5), + duration: RationalTime.seconds( + mapping == 'implicit' + ? 10 + : mapping == 'freeze' + ? 5 + : 15, + ), + ), + mediaRange: TimeRange( + start: RationalTime.zero, + duration: RationalTime.seconds(30), + ), + retimeSegments: [ + for (final (duration, start, delta) in segments) + RetimeSegmentDto( + projectDuration: RationalTime.seconds(duration), + sourceStart: RationalTime.seconds(start), + sourceDelta: RationalTime.seconds(delta), + ), + ], + payloadRef: PayloadRef('video'), + ), + ], + ), + ); + final projection = const TimelineLayoutSceneBuilder().projectDefinition( + version: kernel.current, + definition: kernel.current.query().primaryStoryline, + sides: const [], + appearance: (_, _, _) => const LayoutBodyAppearance( + height: 60, + domain: LayoutDomainId('video'), + placementClass: LayoutPlacementClass.visualLike, + ), + ); + final engine = TimelineLayoutEngine(kernel: kernel); + engine.buildComponents( + kernel: kernel, + components: TimelineLayoutComponents.build( + semantic: projection, + expanded: const [], + resolve: (_, _, _, _) => const [], + ), + policy: LayoutPolicy(version: 1, stacks: const []), + ); + var id = 0; + return TimelineViewController.editable( + engine: engine, + geometry: TimelineViewportGeometry(primaryTop: 0, primaryHeight: 60), + camera: TimelineCamera( + baseTick: 0, + pixelsPerTick: 60 / TimelineClock.ticksPerSecond, + ), + createElementId: () => ElementId('element-${id++}'), + createConnectionId: () => ConnectionId('connection-${id++}'), + ); +} + +class _Frames extends ChangeNotifier implements TimelineThumbnails { + final requests = + < + ({ + String id, + int tick, + int span, + Size logicalSize, + double devicePixelRatio, + }) + >[]; + ui.Image? image; + @override + void beginFrame() => requests.clear(); + @override + double? aspectRatioFor(ElementRecord element) => 9 / 16; + @override + ui.Image? imageFor( + ElementRecord element, + int sourceTick, { + required int sourceSpanTicks, + required Size logicalSize, + required double devicePixelRatio, + }) { + requests.add(( + id: element.id.value, + tick: sourceTick, + span: sourceSpanTicks, + logicalSize: logicalSize, + devicePixelRatio: devicePixelRatio, + )); + return image; + } + + @override + void endFrame() {} + void ready() => notifyListeners(); + @override + void dispose() { + image?.dispose(); + super.dispose(); + } +} + +class _ImagesCanvas extends TestRecordingCanvas { + final destinations = []; + final bars = <(Offset, Offset)>[]; + @override + void drawLine(Offset a, Offset b, Paint paint) { + if (paint.color.toARGB32() == + const TimelineThemeData.dark().audioAccentColor.toARGB32()) { + bars.add((a, b)); + } + super.drawLine(a, b, paint); + } + + @override + void drawImageRect(ui.Image image, Rect src, Rect dst, Paint paint) { + destinations.add(dst); + super.drawImageRect(image, src, dst, paint); + } +} + +class _VideoAudio extends ChangeNotifier implements TimelineWaveforms { + bool bound = true; + bool loaded = false; + double gain = 1; + @override + bool hasAudioFor(ElementRecord element) => bound; + @override + void beginFrame() {} + @override + void endFrame() {} + void ready() => notifyListeners(); + @override + TimelineWaveform? waveformFor(ElementRecord element) => loaded && bound + ? TimelineWaveform( + sampleRate: 1, + frameCount: 30, + amplitudeScale: gain, + levels: [ + TimelineWaveformLevel( + samplesPerBucket: 1, + channels: [ + [ + for (var i = 0; i < 30; i++) ...[-0.5, 0.5, 0.5], + ], + ], + ), + ], + ) + : null; +} diff --git a/packages/cutdex_timeline_ui/test/timeline_timecode_ruler_test.dart b/packages/cutdex_timeline_ui/test/timeline_timecode_ruler_test.dart new file mode 100644 index 0000000..784e078 --- /dev/null +++ b/packages/cutdex_timeline_ui/test/timeline_timecode_ruler_test.dart @@ -0,0 +1,533 @@ +import 'dart:ui' as ui; + +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:cutdex_timeline_ui/src/timeline_ruler_scale.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + test( + 'desktop density moves from seconds to frames at the chosen spacing', + () { + for (final (pixelsPerSecond, major, minor) in [ + (12.0, 300, 30), + (30.0, 150, 15), + (120.0, 30, 5), + (360.0, 10, 1), + ]) { + final scale = TimelineRulerScale.resolve( + pixelsPerFrame: pixelsPerSecond / 30, + nominalFramesPerSecond: 30, + labelSpacing: 120, + ); + expect(scale.majorFrames, major); + expect(scale.minorFrames, minor); + } + }, + ); + + test('labels and subdivisions stay legible and on the frame grid', () { + for (final fps in [24, 25, 30, 48, 50, 60, 120]) { + for (final pixelsPerFrame in [.001, .01, .1, .4, 1, 4, 7.99, 8, 16, 32]) { + for (final width in [120.0, 180.0, 320.0]) { + final scale = TimelineRulerScale.resolve( + pixelsPerFrame: pixelsPerFrame.toDouble(), + nominalFramesPerSecond: fps, + labelSpacing: width, + ); + expect( + scale.majorFrames * pixelsPerFrame, + greaterThanOrEqualTo(width), + ); + expect(scale.minorFrames * pixelsPerFrame, greaterThanOrEqualTo(8)); + expect(scale.majorFrames % scale.minorFrames, 0); + if (scale.middleFrames case final middle?) { + expect(scale.majorFrames % middle, 0); + expect(middle % scale.minorFrames, 0); + expect(middle, greaterThan(scale.minorFrames)); + expect(middle, lessThan(scale.majorFrames)); + } + if (pixelsPerFrame >= 8) expect(scale.minorFrames, 1); + } + } + } + }); + + test('complete timecode counts actual frames rather than milliseconds', () { + for (final format in [ + TimelineFormat.fps24, + TimelineFormat.fps25, + TimelineFormat.fps30, + TimelineFormat(frameDuration: RationalTime(1001, 24000)), + TimelineFormat(frameDuration: RationalTime(1001, 30000)), + TimelineFormat(frameDuration: RationalTime(1, 60)), + ]) { + final timecode = TimelineRulerTimecode(format); + final fps = timecode.framesPerSecond; + expect(timecode.formatFrame(0), '00:00:00:00'); + expect(timecode.formatFrame(fps - 1), '00:00:00:${fps - 1}'); + expect(timecode.formatFrame(fps), '00:00:01:00'); + expect(timecode.formatFrame(fps * 60), '00:01:00:00'); + expect(timecode.formatFrame(fps * 3600), '01:00:00:00'); + expect(timecode.formatFrame(fps * 3600 * 100), '100:00:00:00'); + expect(timecode.formatTick(timecode.frameTicks * fps), '00:00:01:00'); + } + final ntsc = TimelineRulerTimecode( + TimelineFormat(frameDuration: RationalTime(1001, 30000)), + ); + expect(ntsc.formatTick(TimelineClock.ticksPerSecond), '00:00:00:29'); + }); + + test('extreme overview scales remain bounded by frame address capacity', () { + final scale = TimelineRulerScale.resolve( + pixelsPerFrame: 1e-30, + nominalFramesPerSecond: 30, + labelSpacing: 120, + ); + expect(scale.majorFrames, greaterThan(0)); + expect(scale.majorFrames, lessThanOrEqualTo(0x7fffffffffffffff)); + expect(scale.minorFrames, scale.majorFrames); + }); + + test('drop-frame timecode skips the correct labels at minute boundaries', () { + for (final multiplier in [1, 2]) { + final timecode = TimelineRulerTimecode( + TimelineFormat( + frameDuration: RationalTime(1001, 30000 * multiplier), + timecodeFormat: TimelineTimecodeFormat.dropFrame, + ), + ); + expect(timecode.formatFrame(0), '00:00:00;00'); + expect( + timecode.formatFrame(1800 * multiplier - 1), + '00:00:59;${30 * multiplier - 1}', + ); + expect( + timecode.formatFrame(1800 * multiplier), + '00:01:00;${(2 * multiplier).toString().padLeft(2, '0')}', + ); + expect(timecode.formatFrame(17982 * multiplier), '00:10:00;00'); + expect(timecode.formatFrame(107892 * multiplier), '01:00:00;00'); + } + }); + + test( + 'project start time shifts addresses without changing local geometry', + () { + final timecode = TimelineRulerTimecode( + TimelineFormat( + frameDuration: RationalTime(1, 25), + startTime: RationalTime.seconds(3600), + ), + ); + expect(timecode.formatFrame(0), '01:00:00:00'); + expect(timecode.formatFrame(26), '01:00:01:01'); + final negative = TimelineRulerTimecode( + TimelineFormat( + frameDuration: RationalTime(1, 25), + startTime: RationalTime.seconds(-1), + ), + ); + expect(negative.formatFrame(0), '-00:00:01:00'); + expect(negative.formatFrame(25), '00:00:00:00'); + }, + ); + + for (final layout in TimelineRulerTimecodeLayout.values) { + for (final pixelsPerSecond in [30.0, 360.0]) { + testWidgets( + '${layout.name} edge timecodes pan until all text is clipped at $pixelsPerSecond px/s', + (tester) async { + final c = _controller(pixelsPerSecond: pixelsPerSecond); + addTearDown(c.dispose); + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: TimelineRuler( + controller: c, + style: TimelineRulerStyle.timecode, + timecodeLayout: layout, + showPlayhead: false, + theme: const TimelineThemeData.dark().copyWith( + rulerHeight: 28, + rulerTextStyle: const TextStyle(fontSize: 12), + ), + ), + ), + ); + List paint() { + final canvas = _RulerCanvas(); + tester + .widget(find.byType(CustomPaint)) + .painter! + .paint(canvas, const Size(640, 28)); + expect(canvas.clips, contains(const Rect.fromLTWH(0, 0, 640, 28))); + return canvas.labels.toSet().toList(); + } + + final original = c.camera; + final initialLabels = paint(); + final label = initialLabels.firstWhere( + (r) => r.left > 100 && r.right < 640, + ); + Matcher sameBounds(Rect expected) => predicate( + (r) => + (r.topLeft - expected.topLeft).distance < 1e-6 && + (r.bottomRight - expected.bottomRight).distance < 1e-6, + 'bounds matching $expected', + ); + Future> pan(double pixels) async { + c.setCamera(original.panBy(horizontalPixels: pixels)); + await tester.pump(); + return paint(); + } + + // Leave only the last few pixels visible, after the major mark and + // several subdivisions have already moved outside the viewport. + final leftPan = label.right - 8.5; + final partialLeft = label.shift(Offset(-leftPan, 0)); + expect(await pan(leftPan), contains(sameBounds(partialLeft))); + expect( + await pan(leftPan + 4), + contains(sameBounds(partialLeft.shift(const Offset(-4, 0)))), + ); + expect( + await pan(leftPan + 9), + isNot(contains(sameBounds(partialLeft.shift(const Offset(-9, 0))))), + ); + + // Right-edge labels enter progressively rather than waiting until the + // complete timecode fits. Centered labels can enter before their mark. + final spacing = initialLabels[1].left - initialLabels[0].left; + final rightLabel = label.shift( + Offset(spacing * (640 / spacing).ceil(), 0), + ); + final rightPan = rightLabel.left - 631.5; + final partialRight = rightLabel.shift(Offset(-rightPan, 0)); + expect(await pan(rightPan), contains(sameBounds(partialRight))); + expect( + await pan(rightPan + 4), + contains(sameBounds(partialRight.shift(const Offset(-4, 0)))), + ); + expect( + await pan(rightPan - 9), + isNot(contains(sameBounds(partialRight.shift(const Offset(9, 0))))), + ); + expect(tester.takeException(), isNull); + }, + ); + } + + testWidgets('${layout.name} timecode stays on the seek and pan grid', ( + tester, + ) async { + final c = _controller(); + addTearDown(c.dispose); + await tester.pumpWidget( + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 640, + child: TimelineRuler( + controller: c, + style: TimelineRulerStyle.timecode, + timecodeLayout: layout, + showPlayhead: false, + theme: const TimelineThemeData.dark().copyWith( + rulerHeight: 28, + rulerTextStyle: const TextStyle(fontSize: 12), + ), + ), + ), + ), + ), + ); + _RulerCanvas paint() { + final canvas = _RulerCanvas(); + tester + .widget( + find.descendant( + of: find.byType(TimelineRuler), + matching: find.byType(CustomPaint), + ), + ) + .painter! + .paint(canvas, const Size(640, 28)); + return canvas; + } + + final before = paint(); + final labels = before.labels.toSet().toList(); + expect(labels.length, greaterThan(1)); + expect(before.rects, [ + const Rect.fromLTWH(0, 0, 640, 28), + ], reason: 'Labels must not erase rectangular sections of the ruler.'); + expect(before.marksAfterLabel, isFalse); + for (final mark in before.marks) { + expect(mark.$1.dx / 15, closeTo((mark.$1.dx / 15).round(), 1e-6)); + expect(mark.$2.dy, greaterThan(mark.$1.dy)); + expect(mark.$1.dy, greaterThanOrEqualTo(0)); + expect(mark.$2.dy, lessThanOrEqualTo(28)); + } + for (final rect in labels) { + expect(rect.center.dy, 14); + expect(rect.left, lessThan(640)); + expect(rect.right, greaterThan(0)); + } + for (var i = 1; i < labels.length; i++) { + expect(labels[i].left - labels[i - 1].right, greaterThanOrEqualTo(24)); + } + if (layout == TimelineRulerTimecodeLayout.overlay) { + expect( + before.labels.length, + labels.length * 2, + reason: 'Overlay uses a glyph halo followed by the text fill.', + ); + expect( + before.marks.any( + (m) => labels.any((r) => r.contains((m.$1 + m.$2) / 2)), + ), + isTrue, + ); + } else { + final subdivisions = before.marks.where((m) => m.$2.dy - m.$1.dy <= 10); + for (final mark in subdivisions) { + if (layout == TimelineRulerTimecodeLayout.centered && + mark.$1.dy >= 20) { + continue; + } + expect(labels.any((r) => r.inflate(4).contains(mark.$1)), isFalse); + } + } + if (layout == TimelineRulerTimecodeLayout.centered) { + // Labels remain anchored even when their text is clipped at an edge. + for (final rect in labels.where((r) => r.center.dx < 640)) { + expect( + before.marks.any( + (m) => + (m.$1.dx - rect.center.dx).abs() < 1e-6 && + m.$1.dy > rect.center.dy, + ), + isTrue, + ); + } + } + final original = c.camera; + c.setCamera(original.panBy(horizontalPixels: 37)); + await tester.pump(); + final after = paint(); + for (final mark in after.marks) { + final localX = mark.$1.dx + 37; + expect(localX / 15, closeTo((localX / 15).round(), 1e-6)); + } + expect(after.marks.length, lessThanOrEqualTo(45)); + final oldTick = c.playheadTick; + await tester.tapAt( + tester.getTopLeft(find.byType(TimelineRuler)) + const Offset(300, 10), + ); + await tester.pump(); + expect(c.playheadTick, greaterThan(oldTick)); + expect(tester.takeException(), isNull); + }); + } + + testWidgets('layout switches repaint without changing the viewport state', ( + tester, + ) async { + final c = _controller(); + addTearDown(c.dispose); + Widget view(TimelineRulerTimecodeLayout layout) => Directionality( + textDirection: TextDirection.ltr, + child: TimelineViewport( + controller: c, + rulerStyle: TimelineRulerStyle.timecode, + rulerTimecodeLayout: layout, + child: const SizedBox.expand(), + ), + ); + CustomPainter painter() => tester + .widget( + find.descendant( + of: find.byType(TimelineRuler), + matching: find.byType(CustomPaint), + ), + ) + .painter!; + await tester.pumpWidget(view(TimelineRulerTimecodeLayout.inline)); + await tester.pump(); + c.seekTo(2 * TimelineClock.ticksPerSecond); + final camera = c.camera; + final tick = c.playheadTick; + var previous = painter(); + for (final layout in TimelineRulerTimecodeLayout.values.skip(1)) { + await tester.pumpWidget(view(layout)); + await tester.pump(); + expect( + tester.widget(find.byType(TimelineRuler)).timecodeLayout, + layout, + ); + final next = painter(); + expect(next.shouldRepaint(previous), isTrue); + expect(c.camera.baseTick, camera.baseTick); + expect(c.camera.pixelsPerTick, camera.pixelsPerTick); + expect(c.playheadTick, tick); + previous = next; + } + expect(tester.takeException(), isNull); + }); + + testWidgets('all layouts clip edge labels at narrow widths and large text', ( + tester, + ) async { + final c = _controller(); + addTearDown(c.dispose); + for (final layout in TimelineRulerTimecodeLayout.values) { + for (final scale in [1.0, 2.0]) { + await tester.pumpWidget( + MediaQuery( + data: MediaQueryData(textScaler: TextScaler.linear(scale)), + child: Directionality( + textDirection: TextDirection.ltr, + child: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 320, + child: TimelineRuler( + controller: c, + style: TimelineRulerStyle.timecode, + timecodeLayout: layout, + showPlayhead: false, + theme: const TimelineThemeData.dark().copyWith( + rulerHeight: 28, + rulerTextStyle: const TextStyle(fontSize: 12), + ), + ), + ), + ), + ), + ), + ); + final canvas = _RulerCanvas(); + final size = tester.getSize(find.byType(TimelineRuler)); + tester + .widget(find.byType(CustomPaint)) + .painter! + .paint(canvas, size); + expect(canvas.labels, isNotEmpty); + for (final rect in canvas.labels) { + expect(rect.left, lessThan(size.width)); + expect(rect.right, greaterThan(0)); + expect(rect.top, greaterThanOrEqualTo(0)); + expect(rect.bottom, lessThanOrEqualTo(size.height)); + } + expect(tester.takeException(), isNull); + } + } + }); + + testWidgets('large text increases label spacing without reducing font size', ( + tester, + ) async { + final c = _controller(pixelsPerSecond: 360); + addTearDown(c.dispose); + await tester.pumpWidget( + MediaQuery( + data: const MediaQueryData(textScaler: TextScaler.linear(2)), + child: Directionality( + textDirection: TextDirection.ltr, + child: TimelineRuler( + controller: c, + style: TimelineRulerStyle.timecode, + showPlayhead: false, + theme: const TimelineThemeData.dark().copyWith( + rulerHeight: 40, + rulerTextStyle: const TextStyle(fontSize: 12), + ), + ), + ), + ), + ); + final canvas = _RulerCanvas(); + tester + .widget(find.byType(CustomPaint)) + .painter! + .paint(canvas, const Size(1000, 40)); + expect(canvas.labels.length, greaterThan(1)); + for (var i = 1; i < canvas.labels.length; i++) { + expect(canvas.labels[i].height, greaterThanOrEqualTo(24)); + expect( + canvas.labels[i].left - canvas.labels[i - 1].right, + greaterThanOrEqualTo(24), + ); + } + }); +} + +class _RulerCanvas extends TestRecordingCanvas { + final marks = <(Offset, Offset)>[]; + final labels = []; + final rects = []; + final clips = []; + bool marksAfterLabel = false; + + @override + void clipRect( + Rect rect, { + ui.ClipOp clipOp = ui.ClipOp.intersect, + bool doAntiAlias = true, + }) => clips.add(rect); + + @override + void drawRect(Rect rect, Paint paint) => rects.add(rect); + + @override + void drawLine(Offset first, Offset second, Paint paint) { + if (first.dx == second.dx) { + marks.add((first, second)); + if (labels.isNotEmpty) marksAfterLabel = true; + } + } + + @override + void drawParagraph(ui.Paragraph paragraph, Offset offset) { + labels.add(offset & Size(paragraph.longestLine, paragraph.height)); + } +} + +TimelineViewController _controller({double pixelsPerSecond = 30}) { + final kernel = TimelineKernel.importDto( + TimelineDto( + id: SequenceId('ruler-test'), + format: TimelineFormat.fps30, + primaryStorylineId: StorylineId('primary'), + storylines: [ + StorylineDto(id: StorylineId('primary'), elementIds: const []), + ], + elements: const [], + ), + ); + final projection = const TimelineLayoutSceneBuilder().project( + version: kernel.current, + stacks: const [], + appearance: (_, _, _) => throw StateError('no connections'), + ); + final layout = TimelineLayoutEngine(kernel: kernel).initializeProjection( + kernel: kernel, + projection: projection, + policy: LayoutPolicy(version: 1, stacks: const []), + ); + return TimelineViewController( + version: layout.version, + storyline: kernel.current.query().primaryStoryline, + geometry: TimelineViewportGeometry(primaryTop: 0, primaryHeight: 48), + format: TimelineFormat.fps30, + camera: TimelineCamera( + baseTick: 0, + pixelsPerTick: pixelsPerSecond / TimelineClock.ticksPerSecond, + ), + ); +} diff --git a/packages/cutdex_timeline_ui/test/timeline_trackpad_navigation_test.dart b/packages/cutdex_timeline_ui/test/timeline_trackpad_navigation_test.dart new file mode 100644 index 0000000..aec238e --- /dev/null +++ b/packages/cutdex_timeline_ui/test/timeline_trackpad_navigation_test.dart @@ -0,0 +1,304 @@ +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_test/flutter_test.dart'; + +final _viewport = TimelineViewportRect(width: 800, height: 400); +const _position = Offset(530, 200); + +void main() { + testWidgets('native pinch ignores translation and keeps the playhead fixed', ( + tester, + ) async { + final c = _controller(); + addTearDown(c.dispose); + await tester.pumpWidget(_surface(c)); + final before = c.camera.screenXForTick(c.playheadTick, _viewport); + final vertical = c.camera.verticalOffset; + final gesture = await tester.createGesture( + kind: PointerDeviceKind.trackpad, + ); + await gesture.panZoomStart(_position); + await gesture.panZoomUpdate( + _position, + pan: const Offset(50, 30), + scale: 1.2, + ); + await gesture.panZoomUpdate( + _position, + pan: const Offset(100, 60), + scale: 1.5, + ); + await tester.pump(); + expect( + c.camera.pixelsPerTick, + greaterThan(10 / TimelineClock.ticksPerSecond), + ); + expect( + c.camera.screenXForTick(c.playheadTick, _viewport), + closeTo(before, 1e-6), + ); + expect(c.camera.verticalOffset, vertical); + await gesture.panZoomEnd(); + await tester.pumpWidget(const SizedBox()); + }); + + testWidgets('pinch remains zoom-only when scale pauses before fingers lift', ( + tester, + ) async { + final c = _controller(); + addTearDown(c.dispose); + await tester.pumpWidget(_surface(c)); + final gesture = await tester.createGesture( + kind: PointerDeviceKind.trackpad, + ); + await gesture.panZoomStart(_position); + await gesture.panZoomUpdate(_position, scale: 1.2); + await gesture.panZoomUpdate(_position, scale: 1.5); + final camera = c.camera; + await gesture.panZoomUpdate( + _position, + pan: const Offset(100, 30), + scale: 1.5, + ); + expect(c.camera, camera); + await gesture.panZoomEnd(); + // The next gesture must still support ordinary two-finger panning. + await gesture.panZoomStart(_position); + await gesture.panZoomUpdate(_position, pan: const Offset(-30, -20)); + await gesture.panZoomUpdate(_position, pan: const Offset(-70, -40)); + expect(c.camera.baseTick, greaterThan(camera.baseTick)); + expect(c.camera.pixelsPerTick, camera.pixelsPerTick); + await gesture.panZoomEnd(); + await tester.pumpWidget(const SizedBox()); + }); + + testWidgets('plain trackpad pan retains horizontal and vertical navigation', ( + tester, + ) async { + final c = _controller(); + addTearDown(c.dispose); + await tester.pumpWidget(_surface(c)); + final camera = c.camera; + final gesture = await tester.createGesture( + kind: PointerDeviceKind.trackpad, + ); + await gesture.panZoomStart(_position); + await gesture.panZoomUpdate(_position, pan: const Offset(-30, -20)); + await gesture.panZoomUpdate(_position, pan: const Offset(-70, -40)); + expect(c.camera.baseTick, greaterThan(camera.baseTick)); + expect(c.camera.verticalOffset, greaterThan(camera.verticalOffset)); + expect(c.camera.pixelsPerTick, camera.pixelsPerTick); + await gesture.panZoomEnd(); + await tester.pumpWidget(const SizedBox()); + }); + + for (final modifier in [ + LogicalKeyboardKey.controlLeft, + LogicalKeyboardKey.metaLeft, + ]) { + testWidgets( + '$modifier scroll zoom anchors the playhead instead of cursor', + (tester) async { + final c = _controller(); + addTearDown(c.dispose); + await tester.pumpWidget(_surface(c)); + final before = c.camera.screenXForTick(c.playheadTick, _viewport); + await tester.sendKeyDownEvent(modifier); + await tester.sendEventToBinding( + const PointerScrollEvent( + position: _position, + scrollDelta: Offset(0, -120), + ), + ); + await tester.sendKeyUpEvent(modifier); + expect( + c.camera.pixelsPerTick, + greaterThan(10 / TimelineClock.ticksPerSecond), + ); + expect( + c.camera.screenXForTick(c.playheadTick, _viewport), + closeTo(before, 1e-6), + ); + await tester.pumpWidget(const SizedBox()); + }, + ); + } + + testWidgets('ordinary wheel still pans instead of zooming', (tester) async { + final c = _controller(); + addTearDown(c.dispose); + await tester.pumpWidget(_surface(c)); + final camera = c.camera; + await tester.sendEventToBinding( + const PointerScrollEvent( + position: _position, + scrollDelta: Offset(60, 20), + ), + ); + expect(c.camera.baseTick, greaterThan(camera.baseTick)); + expect(c.camera.verticalOffset, greaterThan(camera.verticalOffset)); + expect(c.camera.pixelsPerTick, camera.pixelsPerTick); + await tester.pumpWidget(const SizedBox()); + }); + + testWidgets('ruler pinch uses the same stationary playhead anchor', ( + tester, + ) async { + final c = _controller(); + addTearDown(c.dispose); + await tester.pumpWidget(_surface(c, ruler: true)); + final before = c.camera.screenXForTick(c.playheadTick, _viewport); + final gesture = await tester.createGesture( + kind: PointerDeviceKind.trackpad, + ); + await gesture.panZoomStart(_position); + await gesture.panZoomUpdate( + _position, + pan: const Offset(40, 0), + scale: 1.2, + ); + await gesture.panZoomUpdate( + _position, + pan: const Offset(90, 0), + scale: 1.5, + ); + expect( + c.camera.screenXForTick(c.playheadTick, _viewport), + closeTo(before, 1e-6), + ); + await gesture.panZoomEnd(); + await tester.pumpWidget(const SizedBox()); + }); + + testWidgets('offscreen playhead pinch uses the visible center', ( + tester, + ) async { + final c = _controller()..seekTo(200 * TimelineClock.ticksPerSecond); + addTearDown(c.dispose); + await tester.pumpWidget(_surface(c)); + final tick = c.camera.tickAtScreenX( + 400, + _viewport, + rounding: TimelineTickRounding.nearest, + ); + final gesture = await tester.createGesture( + kind: PointerDeviceKind.trackpad, + ); + await gesture.panZoomStart(_position); + await gesture.panZoomUpdate( + _position, + pan: const Offset(40, 20), + scale: 1.2, + ); + await gesture.panZoomUpdate( + _position, + pan: const Offset(90, 40), + scale: 1.5, + ); + expect(c.camera.screenXForTick(tick, _viewport), closeTo(400, 1e-6)); + await gesture.panZoomEnd(); + await tester.pumpWidget(const SizedBox()); + }); + + testWidgets('two-touch pinch also ignores a drifting centroid', ( + tester, + ) async { + final c = _controller(); + addTearDown(c.dispose); + await tester.pumpWidget(_surface(c)); + final before = c.camera.screenXForTick(c.playheadTick, _viewport); + final first = await tester.startGesture(const Offset(300, 200), pointer: 1); + final second = await tester.startGesture( + const Offset(500, 200), + pointer: 2, + ); + await first.moveTo(const Offset(240, 200)); + await second.moveTo(const Offset(660, 240)); + expect( + c.camera.pixelsPerTick, + greaterThan(10 / TimelineClock.ticksPerSecond), + ); + expect( + c.camera.screenXForTick(c.playheadTick, _viewport), + closeTo(before, 1e-6), + ); + await first.up(); + await second.up(); + await tester.pumpWidget(const SizedBox()); + }); +} + +Widget _surface(TimelineViewController controller, {bool ruler = false}) => + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 800, + height: 400, + child: TimelineInteractionRegion( + controller: controller, + ruler: ruler, + child: TimelineView(controller: controller), + ), + ), + ), + ); + +TimelineViewController _controller() { + final kernel = TimelineKernel.importDto( + TimelineDto( + id: SequenceId('trackpad-test'), + format: TimelineFormat.fps30, + primaryStorylineId: StorylineId('primary'), + storylines: [ + StorylineDto( + id: StorylineId('primary'), + elementIds: [ElementId('clip')], + ), + ], + elements: [ + ElementDto( + id: ElementId('clip'), + structure: ElementStructure.content, + duration: RationalTime.seconds(300), + sourceRange: TimeRange( + start: RationalTime.zero, + duration: RationalTime.seconds(300), + ), + ), + ], + ), + ); + final primary = kernel.current.query().primaryStoryline; + final projection = const TimelineLayoutSceneBuilder().project( + version: kernel.current, + stacks: const [], + appearance: (_, _, _) => const LayoutBodyAppearance( + height: 40, + domain: LayoutDomainId('video'), + placementClass: LayoutPlacementClass.visualLike, + ), + ); + final result = TimelineLayoutEngine(kernel: kernel).initializeProjection( + kernel: kernel, + projection: projection, + policy: LayoutPolicy(version: 1, stacks: const []), + ); + final c = TimelineViewController( + version: result.version, + storyline: primary, + geometry: TimelineViewportGeometry(primaryTop: 130, primaryHeight: 40), + camera: TimelineCamera( + baseTick: 10 * TimelineClock.ticksPerSecond, + pixelsPerTick: 10 / TimelineClock.ticksPerSecond, + verticalOffset: 70, + ), + ); + c.seekTo(30 * TimelineClock.ticksPerSecond); + return c; +} diff --git a/packages/cutdex_timeline_ui/test/timeline_view_test.dart b/packages/cutdex_timeline_ui/test/timeline_view_test.dart new file mode 100644 index 0000000..3dc0966 --- /dev/null +++ b/packages/cutdex_timeline_ui/test/timeline_view_test.dart @@ -0,0 +1,1670 @@ +import 'dart:ui' as ui; + +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + test('playback follows the playhead one visible page at a time', () { + final f = _fixture(); + final ticksPerSecond = TimelineClock.ticksPerSecond; + final c = TimelineViewController( + version: f.version, + storyline: f.primary, + geometry: TimelineViewportGeometry(primaryTop: 0, primaryHeight: 20), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 10 / ticksPerSecond), + ); + addTearDown(c.dispose); + c.configureViewport( + width: 100, + height: 80, + end: 40 * ticksPerSecond, + top: 0, + bottom: 80, + ); + + c.seekTo(9 * ticksPerSecond); + c.followPlayback(); + expect(c.camera.baseTick, 0); + c.seekTo(10 * ticksPerSecond); + c.followPlayback(); + expect(c.camera.baseTick, 10 * ticksPerSecond); + c.followPlayback(); + expect(c.camera.baseTick, 10 * ticksPerSecond); + c.seekTo(20 * ticksPerSecond); + c.followPlayback(); + expect(c.camera.baseTick, 20 * ticksPerSecond); + + c.beginScrubbing(); + c.seekTo(30 * ticksPerSecond); + c.followPlayback(); + expect(c.camera.baseTick, 20 * ticksPerSecond); + c.endScrubbing(); + }); + + testWidgets('playhead ticks do not invalidate clip and ruler painters', ( + tester, + ) async { + final f = _fixture(); + final c = TimelineViewController( + version: f.version, + storyline: f.primary, + geometry: TimelineViewportGeometry(primaryTop: 0, primaryHeight: 20), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 10), + ); + addTearDown(c.dispose); + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: TimelineViewport( + controller: c, + child: TimelineView(controller: c), + ), + ), + ); + await tester.pump(); + final painters = tester + .widgetList(find.byType(CustomPaint)) + .map((widget) => widget.painter) + .whereType() + .where( + (painter) => [ + '_TimelinePainter', + '_RulerPainter', + ].contains(painter.runtimeType.toString()), + ) + .toList(); + expect(painters, hasLength(2)); + var invalidations = 0; + var positions = 0; + var editing = 0; + c.editingChanges.addListener(() => editing++); + for (final painter in painters) { + painter.addListener(() => invalidations++); + } + c.addListener(() => positions++); + for (var tick = 1; tick <= 120; tick++) { + c.seekTo(tick); + } + expect(positions, 120); + expect(editing, 120); + expect( + invalidations, + 0, + reason: 'Static content must remain retained during playback', + ); + await tester.pump(); + c.setCamera(TimelineCamera(baseTick: 1, pixelsPerTick: 11)); + c.setHoveredIdentity('hover'); + expect( + editing, + 120, + reason: 'Camera and hover must not rebuild inspectors or preview', + ); + c.setSelection(['selected']); + expect(editing, 121); + expect( + invalidations, + greaterThan(0), + reason: 'Camera changes still repaint content', + ); + }); + + testWidgets('frame detail starts at eight pixels and retains second labels', ( + tester, + ) async { + final f = _fixture(); + final frame = TimelineFormat.fps30.frameGrid.quantumTicks; + final c = TimelineViewController( + version: f.version, + storyline: f.primary, + geometry: TimelineViewportGeometry(primaryTop: 0, primaryHeight: 20), + format: TimelineFormat.fps30, + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 7.99 / frame), + ); + addTearDown(c.dispose); + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: TimelineRuler(controller: c), + ), + ); + _FrameRulerCanvas paint() { + final canvas = _FrameRulerCanvas(); + tester + .widget(find.byType(CustomPaint)) + .painter! + .paint(canvas, const Size(640, 28)); + return canvas; + } + + expect(paint().frameTicks, isEmpty); + c.setCamera(TimelineCamera(baseTick: 0, pixelsPerTick: 8 / frame)); + await tester.pump(); + final detailed = paint(); + expect(detailed.frameTicks, contains(8.0)); + expect(detailed.seconds, [ + closeTo(0, 1e-6), + closeTo(240, 1e-6), + closeTo(480, 1e-6), + ]); + c.setCamera(TimelineCamera(baseTick: 0, pixelsPerTick: 7.99 / frame)); + await tester.pump(); + expect(paint().frameTicks, isEmpty); + }); + + testWidgets('maximum zoom draws every frame without subframe marks', ( + tester, + ) async { + final f = _fixture(); + final format = TimelineFormat(frameDuration: RationalTime(1001, 30000)); + final c = TimelineViewController( + version: f.version, + storyline: f.primary, + geometry: TimelineViewportGeometry(primaryTop: 0, primaryHeight: 20), + format: format, + camera: TimelineCamera( + baseTick: 0, + pixelsPerTick: 32 / format.frameGrid.quantumTicks, + ), + ); + addTearDown(c.dispose); + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: TimelineRuler(controller: c), + ), + ); + final canvas = _FrameRulerCanvas(); + tester + .widget(find.byType(CustomPaint)) + .painter! + .paint(canvas, const Size(640, 28)); + final visible = canvas.ticks.where((x) => x >= 0 && x < 640).toList() + ..sort(); + expect(visible.length, 20); + for (var i = 0; i < visible.length; i++) { + expect(visible[i], closeTo(i * 32, 1e-6)); + } + }); + + for (final rate in [ + RationalTime(1, 24), + RationalTime(1, 30), + RationalTime(1, 60), + RationalTime(1001, 30000), + ]) { + test('zoom caps at 32 pixels per frame for $rate', () { + final f = _fixture(); + final c = TimelineViewController( + version: f.version, + storyline: f.primary, + geometry: TimelineViewportGeometry(primaryTop: 0, primaryHeight: 20), + format: TimelineFormat(frameDuration: rate), + camera: TimelineCamera( + baseTick: 0, + pixelsPerTick: 100 / TimelineClock.ticksPerSecond, + ), + ); + addTearDown(c.dispose); + final v = TimelineViewportRect(width: 600, height: 200); + c.seekTo(c.frameTicks * 2); + final x = c.camera.screenXForTick(c.playheadTick, v); + c.zoomBy(scale: 1e10, viewport: v); + expect(c.camera.pixelsPerTick * c.frameTicks, closeTo(32, 1e-9)); + expect(c.camera.screenXForTick(c.playheadTick, v), closeTo(x, 1e-6)); + final camera = c.camera; + c.zoomBy(scale: 2, viewport: v); + expect(c.camera, same(camera)); + c.zoomAt(screenX: x, newPixelsPerTick: 1, viewport: v); + expect(c.camera.pixelsPerTick * c.frameTicks, closeTo(32, 1e-9)); + }); + } + + testWidgets('playhead overlays external padding and its left half can drag', ( + tester, + ) async { + final f = _fixture(); + final c = TimelineViewController( + version: f.version, + storyline: f.primary, + geometry: TimelineViewportGeometry(primaryTop: 0, primaryHeight: 20), + camera: TimelineCamera( + baseTick: 0, + pixelsPerTick: 100 / TimelineClock.ticksPerSecond, + ), + ); + addTearDown(c.dispose); + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: TimelineViewport( + controller: c, + leadingPadding: 16, + child: TimelineView(controller: c), + ), + ), + ); + await tester.pump(); + final overlay = find.byKey(const ValueKey('timeline-playhead-overlay')); + final canvas = _PlayheadCanvas(); + tester + .widget(overlay) + .painter! + .paint(canvas, tester.getSize(overlay)); + expect(canvas.pointer!.left, 11.5); + expect(canvas.pointer!.right, 20.5); + expect(canvas.pointer!.top, 0); + expect(canvas.pointer!.bottom, 12); + expect(canvas.lineStart!.dy, 12); + expect(canvas.clip!.left, 0); + expect(tester.getTopLeft(find.byType(TimelineView)).dx, 16); + expect(c.camera.baseTick, 0); + final origin = tester.getTopLeft(overlay); + final drag = await tester.startGesture(origin + const Offset(12, 20)); + await drag.moveBy(const Offset(24, 0)); + expect(c.isScrubbing, isTrue); + await drag.moveBy(const Offset(24, 0)); + await drag.up(); + await tester.pump(); + expect(c.isScrubbing, isFalse); + expect(c.playheadTick, greaterThan(0)); + expect(tester.takeException(), isNull); + }); + + testWidgets('scrubbing keeps the marker painted at a viewport edge', ( + tester, + ) async { + final f = _fixture(clipDuration: 300); + final c = TimelineViewController( + version: f.version, + storyline: f.primary, + geometry: TimelineViewportGeometry(primaryTop: 0, primaryHeight: 20), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 1), + ); + addTearDown(c.dispose); + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: Center( + child: SizedBox( + width: 300, + height: 160, + child: TimelineViewport( + controller: c, + child: TimelineView(controller: c), + ), + ), + ), + ), + ); + await tester.pump(); + c.beginScrubbing(); + c.seekTo(301); + await tester.pump(); + final overlay = find.byKey(const ValueKey('timeline-playhead-overlay')); + final canvas = _PlayheadCanvas(); + tester + .widget(overlay) + .painter! + .paint(canvas, tester.getSize(overlay)); + expect(canvas.pointer, isNotNull); + expect(canvas.lineStart!.dx, 300); + c.endScrubbing(); + }); + + testWidgets('ruler click seeks once and ruler drag marks scrubbing', ( + tester, + ) async { + final f = _fixture(); + final c = TimelineViewController( + version: f.version, + storyline: f.primary, + geometry: TimelineViewportGeometry(primaryTop: 0, primaryHeight: 20), + camera: TimelineCamera( + baseTick: 0, + pixelsPerTick: 100 / TimelineClock.ticksPerSecond, + ), + ); + addTearDown(c.dispose); + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: TimelineViewport( + controller: c, + child: TimelineView(controller: c), + ), + ), + ); + await tester.pump(); + final ruler = find.byType(TimelineRuler); + final origin = tester.getTopLeft(ruler); + await tester.tapAt(origin + const Offset(120, 10)); + expect(c.playheadTick, greaterThan(0)); + expect(c.isScrubbing, isFalse); + final drag = await tester.startGesture(origin + const Offset(220, 10)); + await drag.moveBy(const Offset(30, 0)); + expect(c.isScrubbing, isTrue); + await drag.up(); + expect(c.isScrubbing, isFalse); + }); + + for (final dragHandle in [true, false]) { + testWidgets( + '${dragHandle ? 'playhead handle' : 'ruler'} drag scrolls at edge and stops on release', + (tester) async { + const second = TimelineClock.ticksPerSecond; + final f = _fixture(clipDuration: 20 * second); + final c = TimelineViewController( + version: f.version, + storyline: f.primary, + geometry: TimelineViewportGeometry(primaryTop: 0, primaryHeight: 20), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 30 / second), + ); + addTearDown(c.dispose); + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: Center( + child: SizedBox( + width: 300, + height: 160, + child: TimelineViewport( + controller: c, + child: TimelineView(controller: c), + ), + ), + ), + ), + ); + await tester.pump(); + final origin = tester.getTopLeft(find.byType(TimelineRuler)); + final drag = await tester.startGesture( + origin + Offset(dragHandle ? 8 : 100, dragHandle ? 20 : 10), + ); + await drag.moveBy(Offset(dragHandle ? 305 : 215, 0)); + expect(c.isScrubbing, isTrue); + final before = c.playheadTick; + for (var i = 0; i < 20; i++) { + await tester.pump(const Duration(milliseconds: 50)); + final overlay = find.byKey( + const ValueKey('timeline-playhead-overlay'), + ); + final canvas = _PlayheadCanvas(); + tester + .widget(overlay) + .painter! + .paint(canvas, tester.getSize(overlay)); + expect( + canvas.pointer, + isNotNull, + reason: 'The playhead must remain painted while edge scrolling', + ); + } + expect(c.camera.baseTick, greaterThan(0)); + expect(c.playheadTick, greaterThan(before)); + expect( + c.camera.screenXForTick( + c.playheadTick, + TimelineViewportRect(width: 300, height: 132), + ), + inInclusiveRange(0, 301), + ); + await drag.up(); + await tester.pump(); + expect(c.isScrubbing, isFalse); + final stopped = c.camera.baseTick; + await tester.pump(const Duration(milliseconds: 200)); + expect(c.camera.baseTick, stopped); + expect(tester.takeException(), isNull); + }, + ); + } + + test('default zoom anchors visible playhead and falls back to center', () { + final f = _fixture(); + const second = TimelineClock.ticksPerSecond; + final c = TimelineViewController( + version: f.version, + storyline: f.primary, + geometry: TimelineViewportGeometry(primaryTop: 0, primaryHeight: 20), + camera: TimelineCamera( + baseTick: 10 * second, + pixelsPerTick: 100 / second, + ), + ); + addTearDown(c.dispose); + final viewport = TimelineViewportRect(left: 20, width: 600, height: 100); + final version = c.version.kernelVersion; + c.seekTo(12 * second); + c.zoomBy(scale: 2, viewport: viewport); + expect( + c.camera.screenXForTick(c.playheadTick, viewport), + closeTo(220, 1e-6), + ); + c.zoomBy(scale: .5, viewport: viewport); + expect(c.camera.baseTick, 10 * second); + for (final tick in [0, 30 * second]) { + c.seekTo(tick); + final centerTick = c.camera.tickAtScreenX( + 320, + viewport, + rounding: TimelineTickRounding.nearest, + ); + c.zoomBy(scale: 2, viewport: viewport); + expect(c.camera.screenXForTick(centerTick, viewport), closeTo(320, 1e-6)); + expect(c.playheadTick, tick); + } + expect(c.version.kernelVersion, same(version)); + c.setCamera(TimelineCamera(baseTick: 0, pixelsPerTick: 100 / second)); + c.seekTo(second); + c.zoomBy(scale: .5, viewport: viewport); + expect(c.camera.baseTick, 0); + expect(c.camera.fractionalTick, 0); + }); + + testWidgets('ruler retains the preceding interval while panning left', ( + tester, + ) async { + final f = _fixture(); + const second = TimelineClock.ticksPerSecond; + const scale = 100 / second; + const size = Size(600, 28); + final controller = TimelineViewController( + version: f.version, + storyline: f.primary, + geometry: TimelineViewportGeometry(primaryTop: 10, primaryHeight: 20), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: scale), + ); + addTearDown(controller.dispose); + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: size.width, + child: TimelineRuler(controller: controller), + ), + ), + ), + ); + _RulerCanvas paint() { + final canvas = _RulerCanvas(); + tester + .widget(find.byType(CustomPaint)) + .painter! + .paint(canvas, size); + return canvas; + } + + final initial = paint(); + final step = initial.major[1] - initial.major[0]; + expect(initial.minor, isNotEmpty); + for (final pan in [0.25, 1.0, 20.0, step - 0.25, step + 0.25]) { + final tick = pan / scale; + controller.setCamera( + TimelineCamera( + baseTick: tick.floor(), + fractionalTick: tick - tick.floor(), + pixelsPerTick: scale, + ), + ); + await tester.pump(); + final result = paint(); + final intervalStart = (pan / step).floor() * step - pan; + expect(result.major.first, closeTo(intervalStart, 1e-6)); + expect(result.labels.first.dx, closeTo(intervalStart + 4, 1e-6)); + for (final mark in initial.minor.where( + (x) => x >= pan && x - pan < size.width, + )) { + expect(result.minor, contains(closeTo(mark - pan, 1e-6))); + } + expect(result.major.length, lessThanOrEqualTo(initial.major.length + 1)); + expect(result.clips, contains(Offset.zero & size)); + } + expect(tester.takeException(), isNull); + }); + + test('empty viewport fits once and retains explicit zoom through resize', () { + final f = _fixture(); + final c = TimelineViewController( + version: f.version, + storyline: f.primary, + geometry: TimelineViewportGeometry(primaryTop: 10, primaryHeight: 20), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 1), + ); + addTearDown(c.dispose); + c.configureViewport(width: 800, height: 300, end: 0, top: 0, bottom: 100); + c.reconcileViewport(); + final initial = c.camera.pixelsPerTick; + expect(initial * 20 * TimelineClock.ticksPerSecond, closeTo(800, 0.001)); + c.zoomAt( + screenX: 0, + newPixelsPerTick: initial * 2, + viewport: TimelineViewportRect(width: 800, height: 300), + ); + expect(c.camera.pixelsPerTick, initial * 2); + c.configureViewport(width: 1200, height: 400, end: 0, top: 0, bottom: 100); + c.reconcileViewport(); + expect(c.camera.pixelsPerTick, initial * 2); + expect(c.camera.baseTick, 0); + }); + + testWidgets( + 'viewport overlays both bars without shrinking content or ruler', + (tester) async { + final f = _fixture(); + final c = TimelineViewController( + version: f.version, + storyline: f.primary, + geometry: TimelineViewportGeometry(primaryTop: 10, primaryHeight: 40), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 30), + ); + addTearDown(c.dispose); + const surface = Key('review-viewport-content'); + await tester.pumpWidget( + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 200, + height: 60, + child: TimelineViewport( + controller: c, + child: const SizedBox.expand(key: surface), + ), + ), + ), + ), + ); + await tester.pumpAndSettle(); + final rect = tester.getRect(find.byKey(surface)); + final horizontal = tester.getRect( + find.byKey(const ValueKey('timeline-horizontal-scrollbar')), + ); + final vertical = tester.getRect( + find.byKey(const ValueKey('timeline-vertical-scrollbar')), + ); + expect(tester.getSize(find.byType(TimelineRuler)).width, rect.width); + expect(horizontal.bottom, rect.bottom); + expect(horizontal.top, lessThan(rect.bottom)); + expect(vertical.right, rect.right); + expect(vertical.left, lessThan(rect.right)); + expect(rect.width, 200); + expect( + rect.height, + 60 - tester.getSize(find.byType(TimelineRuler)).height, + ); + expect(horizontal.right, vertical.left); + expect(vertical.bottom, horizontal.top); + c.panBy(horizontalPixels: 100000); + await tester.pumpAndSettle(); + final end = c.version.kernelVersion.query().storylineSpan(c.storyline); + final endpoint = c.camera.screenXForTick( + end, + TimelineViewportRect(width: rect.width, height: rect.height), + ); + expect(endpoint, greaterThan(0)); + expect(endpoint, lessThan(rect.width - 12)); + expect(tester.takeException(), isNull); + await tester.pumpWidget(const SizedBox()); + }, + ); + + test('viewport bounds retain tail space and preserve zoom when cleared', () { + final fixture = _fixture(); + final c = TimelineViewController( + version: fixture.version, + storyline: fixture.primary, + geometry: TimelineViewportGeometry(primaryTop: 10, primaryHeight: 20), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 30), + ); + addTearDown(c.dispose); + c.configureViewport(width: 100, height: 80, end: 10, top: -20, bottom: 200); + c.reconcileViewport(); + expect(c.camera.verticalOffset, -20); + c.panBy(verticalPixels: 50); + c.configureViewport( + width: 100, + height: 100, + end: 10, + top: -20, + bottom: 220, + ); + c.setCamera(c.camera); + expect( + c.camera.verticalOffset, + 30, + reason: 'resize and added content preserve the user position', + ); + c.configureViewport(width: 100, height: 80, end: 10, top: -20, bottom: 200); + c.panBy(horizontalPixels: 10000, verticalPixels: 10000); + final viewport = TimelineViewportRect(width: 100, height: 80); + expect(c.camera.screenXForTick(12, viewport), closeTo(100, 0.001)); + expect(c.camera.screenXForTick(10, viewport), lessThan(100)); + expect(c.camera.verticalOffset, 120); + c.panBy(horizontalPixels: -10000, verticalPixels: -10000); + expect(c.camera.baseTick, 0); + expect(c.camera.verticalOffset, -20); + c.configureViewport(width: 400, height: 400, end: 10, top: 0, bottom: 200); + c.panBy(horizontalPixels: 10000, verticalPixels: 10000); + expect(c.camera.baseTick, greaterThan(0)); + expect(c.camera.verticalOffset, -20); + final scale = c.camera.pixelsPerTick; + c.configureViewport(width: 400, height: 400, end: 0, top: 0, bottom: 200); + c.setCamera(c.camera); + expect(c.camera.pixelsPerTick, scale); + c.panBy(horizontalPixels: 10000, verticalPixels: 10000); + expect(c.camera.baseTick, 0); + expect(c.camera.verticalOffset, -20); + expect(c.version, same(fixture.version)); + }); + + test('focus primary uses current geometry and actual content bounds', () { + final fixture = _fixture(); + final c = TimelineViewController( + version: fixture.version, + storyline: fixture.primary, + geometry: TimelineViewportGeometry(primaryTop: 80, primaryHeight: 50), + camera: TimelineCamera(baseTick: 2, pixelsPerTick: 30), + ); + addTearDown(c.dispose); + c.configureViewport(width: 100, height: 100, end: 10, top: 0, bottom: 300); + c.reconcileViewport(); + expect(c.camera.verticalOffset, 55); + expect(c.camera.baseTick, 2); + c.panBy(verticalPixels: 1000); + expect(c.camera.verticalOffset, 200); + c.reconcileViewport(); + expect(c.camera.verticalOffset, 200); + c.configureViewport( + width: 100, + height: 120, + end: 10, + top: -100, + bottom: 400, + ); + c.reconcileViewport(); + expect(c.camera.verticalOffset, 200); + c.focusPrimary(resetHorizontal: true); + expect(c.camera.verticalOffset, 45); + expect(c.camera.baseTick, 0); + c.panBy(verticalPixels: -1000); + expect(c.camera.verticalOffset, -100); + expect(c.version, same(fixture.version)); + }); + + testWidgets( + 'floating bars reveal on hover and scroll and yield to clip drags', + (tester) async { + final f = _richFixture(); + final c = TimelineViewController( + version: f.version, + storyline: f.primary, + geometry: TimelineViewportGeometry(primaryTop: 10, primaryHeight: 20), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 30), + ); + addTearDown(c.dispose); + var taps = 0; + await tester.pumpWidget( + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 200, + height: 100, + child: TimelineViewport( + showRuler: false, + controller: c, + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () => taps++, + child: const SizedBox.expand(), + ), + ), + ), + ), + ), + ); + final bar = find.byKey(const ValueKey('timeline-horizontal-scrollbar')); + double opacity() => tester + .widget( + find.descendant(of: bar, matching: find.byType(AnimatedOpacity)), + ) + .opacity; + await tester.pumpAndSettle(); + await tester.pump(const Duration(seconds: 1)); + await tester.pumpAndSettle(); + expect(opacity(), 0.25); + final mouse = await tester.createGesture( + kind: ui.PointerDeviceKind.mouse, + ); + await mouse.addPointer(location: const Offset(300, 200)); + await mouse.moveTo(tester.getCenter(bar)); + await tester.pumpAndSettle(); + expect(opacity(), 1); + await mouse.moveTo(const Offset(300, 200)); + await tester.pumpAndSettle(); + c.panBy(horizontalPixels: 20); + await tester.pump(); + expect(opacity(), 1); + await tester.pump(const Duration(seconds: 1)); + await tester.pumpAndSettle(); + expect(opacity(), 0.25); + final before = tester.getSize(find.byType(TimelineViewport)); + final q = c.version.kernelVersion.query(); + c.showIncomingClip( + c.version, + element: q.elementById(ElementId('connected'))!, + start: 0, + top: 10, + audioOnly: false, + position: const Offset(100, 90), + viewport: TimelineViewportRect(width: 200, height: 100), + ); + await tester.pumpAndSettle(); + expect(opacity(), 0); + await tester.tapAt(tester.getCenter(bar)); + expect(taps, 1); + expect(c.isDragging, isTrue); + c.clearIncomingClip(); + await tester.pumpAndSettle(); + expect(opacity(), greaterThan(0)); + expect(tester.getSize(find.byType(TimelineViewport)), before); + final thumb = find.byKey(const ValueKey('timeline-horizontal-thumb')); + final camera = c.camera.baseTick; + await tester.dragFrom(tester.getCenter(thumb), const Offset(35, 0)); + await tester.pumpAndSettle(); + expect(c.camera.baseTick, greaterThan(camera)); + await mouse.removePointer(); + await tester.pumpWidget(const SizedBox()); + }, + ); + + testWidgets('horizontal scrollbar starts at zero with no leading space', ( + tester, + ) async { + final fixture = _fixture(); + final controller = TimelineViewController( + version: fixture.version, + storyline: fixture.primary, + geometry: TimelineViewportGeometry(primaryTop: 10, primaryHeight: 20), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 30), + ); + addTearDown(controller.dispose); + await tester.pumpWidget( + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 100, + height: 80, + child: TimelineViewport( + showRuler: false, + controller: controller, + child: const SizedBox.expand(), + ), + ), + ), + ), + ); + final track = find.byKey(const ValueKey('timeline-horizontal-scrollbar')); + final thumb = find.byKey(const ValueKey('timeline-horizontal-thumb')); + expect(tester.getTopLeft(thumb).dx, tester.getTopLeft(track).dx); + controller.panBy(horizontalPixels: 60); + await tester.pump(); + expect( + tester.getTopLeft(thumb).dx, + greaterThan(tester.getTopLeft(track).dx), + ); + controller.panBy(horizontalPixels: -1000); + await tester.pump(); + expect(tester.getTopLeft(thumb).dx, tester.getTopLeft(track).dx); + controller.setCamera(TimelineCamera(baseTick: 0, pixelsPerTick: 1)); + await tester.pumpAndSettle(); + expect(track, findsNothing); + expect( + find.byKey(const ValueKey('timeline-vertical-scrollbar')), + findsNothing, + ); + }); + + testWidgets( + 'primary-only viewport stays centered through resize without vertical scroll', + (tester) async { + final fixture = _fixture(); + final controller = TimelineViewController( + version: fixture.version, + storyline: fixture.primary, + geometry: TimelineViewportGeometry(primaryTop: 48, primaryHeight: 72), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 1), + ); + addTearDown(controller.dispose); + final height = ValueNotifier(200.0); + addTearDown(height.dispose); + + await tester.pumpWidget( + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: ValueListenableBuilder( + valueListenable: height, + builder: (context, value, child) => SizedBox( + width: 400, + height: value, + child: TimelineViewport( + showRuler: false, + controller: controller, + child: child!, + ), + ), + child: const SizedBox.expand(), + ), + ), + ), + ); + await tester.pumpAndSettle(); + expect(controller.camera.verticalOffset, -16); + expect( + find.byKey(const ValueKey('timeline-vertical-scrollbar')), + findsNothing, + ); + + controller.panBy(verticalPixels: 1000); + expect(controller.camera.verticalOffset, -16); + + height.value = 300; + await tester.pumpAndSettle(); + expect(controller.camera.verticalOffset, -66); + expect( + find.byKey(const ValueKey('timeline-vertical-scrollbar')), + findsNothing, + ); + }, + ); + + testWidgets('connected content reserves vertical drag space', (tester) async { + final fixture = _richFixture(); + final controller = TimelineViewController( + version: fixture.version, + storyline: fixture.primary, + geometry: TimelineViewportGeometry(primaryTop: 30, primaryHeight: 20), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 1), + ); + addTearDown(controller.dispose); + + await tester.pumpWidget( + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 400, + height: 60, + child: TimelineViewport( + showRuler: false, + controller: controller, + child: const SizedBox.expand(), + ), + ), + ), + ), + ); + await tester.pumpAndSettle(); + + expect( + find.byKey(const ValueKey('timeline-vertical-scrollbar')), + findsOneWidget, + ); + controller.panBy(verticalPixels: -1000); + final top = controller.camera.verticalOffset; + controller.panBy(verticalPixels: 2000); + expect(controller.camera.verticalOffset, greaterThan(top)); + }); + + test('viewport stops at zero for initialization, pan and zoom', () { + final fixture = _fixture(); + final controller = TimelineViewController( + version: fixture.version, + storyline: fixture.primary, + geometry: TimelineViewportGeometry(primaryTop: 10, primaryHeight: 20), + camera: TimelineCamera( + baseTick: -1, + fractionalTick: 0.5, + pixelsPerTick: 10, + verticalOffset: 12, + ), + ); + addTearDown(controller.dispose); + expect(controller.camera.baseTick, 0); + expect(controller.camera.fractionalTick, 0); + expect(controller.camera.verticalOffset, 12); + controller.panBy(horizontalPixels: -100, verticalPixels: 8); + expect(controller.camera.baseTick, 0); + expect(controller.camera.verticalOffset, 20); + controller.panBy(horizontalPixels: 20); + expect(controller.camera.baseTick, 2); + controller.zoomAt( + screenX: 100, + newPixelsPerTick: 1, + viewport: TimelineViewportRect(width: 400, height: 100), + ); + expect(controller.camera.baseTick, 0); + expect(controller.camera.fractionalTick, 0); + expect(controller.camera.pixelsPerTick, controller.maxPixelsPerTick); + expect(controller.version, same(fixture.version)); + }); + + test('clip header theme tokens copy, interpolate and compare', () { + const a = TimelineThemeData.dark(); + final b = a.copyWith( + clipHeaderHeight: 24, + clipHeaderPadding: 9, + clipNameTextStyle: const TextStyle( + color: Color(0xfffedcba), + fontSize: 15, + ), + ); + expect(a.copyWith(), a); + expect(b.copyWith().hashCode, b.hashCode); + expect(a, isNot(b)); + final middle = a.lerp(b, .5); + expect(middle.clipHeaderHeight, 21); + expect(a.clipHeaderPadding, 2); + expect(middle.clipHeaderPadding, 5.5); + expect(middle.clipNameTextStyle.fontSize, 13); + }); + + test( + 'frame element resolution covers clips and gaps and skips transitions', + () { + final fixture = _richFixture(); + final c = TimelineViewController( + version: fixture.version, + storyline: fixture.primary, + geometry: TimelineViewportGeometry(primaryTop: 30, primaryHeight: 20), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 30), + ); + addTearDown(c.dispose); + final frame = c.project(TimelineViewportRect(width: 600, height: 80)); + final query = frame.version.kernelVersion.query(); + final ids = []; + var transitions = 0; + for (var index = 0; index < frame.length; index++) { + final handle = c.elementForFrameItem(frame, index); + if (frame.kindAt(index) == TimelineViewportItemKind.transition) { + transitions++; + expect(handle, isNull); + } else { + ids.add(query.element(handle!).id.value); + } + } + expect(transitions, 1); + expect( + ids, + unorderedEquals(['left', 'right', 'gap', 'container', 'connected']), + ); + }, + ); + + testWidgets( + 'visible media headers paint names while an unnamed gap stays blank', + (tester) async { + final fixture = _richFixture(); + final c = TimelineViewController( + version: fixture.version, + storyline: fixture.primary, + geometry: TimelineViewportGeometry(primaryTop: 30, primaryHeight: 20), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 30), + ); + addTearDown(c.dispose); + await tester.pumpWidget( + _themeFixture(controller: c, inherited: const TimelineThemeData.dark()), + ); + final canvas = _NameCanvas(); + _painter(tester).paint(canvas, const Size(600, 80)); + expect( + canvas.labels.length, + 4, + reason: 'gap ID and transition boundary are not named clips', + ); + expect( + canvas.labels.map((l) => l.width), + unorderedEquals([ + for (final name in ['Video', 'Sound', 'Compound', 'Linked audio']) + _nameWidth(name), + ]), + ); + expect(c.version, same(fixture.version)); + }, + ); + + testWidgets( + 'blank names fall back to IDs and stay anchored to cropped clip beginnings', + (tester) async { + final fixture = _fixture(name: ' '); + final c = TimelineViewController( + version: fixture.version, + storyline: fixture.primary, + geometry: TimelineViewportGeometry(primaryTop: 10, primaryHeight: 20), + camera: TimelineCamera(baseTick: 2, pixelsPerTick: 30), + ); + addTearDown(c.dispose); + await tester.pumpWidget( + _themeFixture(controller: c, inherited: const TimelineThemeData.dark()), + ); + final canvas = _NameCanvas(); + _painter(tester).paint(canvas, const Size(240, 40)); + expect(canvas.labels.first.offset.dx, -57); + expect(canvas.labels.map((l) => l.width), [ + _nameWidth('left'), + _nameWidth('right'), + ]); + c.setCamera(TimelineCamera(baseTick: 3, pixelsPerTick: 30)); + await tester.pump(); + final panned = _NameCanvas(); + _painter(tester).paint(panned, const Size(240, 40)); + expect(panned.labels.first.offset.dx, -87); + expect( + panned.paragraphs.first, + same(canvas.paragraphs.first), + reason: 'Panning must reuse shaped clip labels', + ); + expect( + panned.labels.map((l) => l.width), + canvas.labels.map((l) => l.width), + ); + }, + ); + + testWidgets( + 'long names ellipsize and narrow clips cannot spill into neighbors', + (tester) async { + final fixture = _fixture(name: 'A very long clip name that cannot fit'); + final c = TimelineViewController( + version: fixture.version, + storyline: fixture.primary, + geometry: TimelineViewportGeometry(primaryTop: 10, primaryHeight: 20), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 10), + ); + addTearDown(c.dispose); + await tester.pumpWidget( + _themeFixture(controller: c, inherited: const TimelineThemeData.dark()), + ); + final canvas = _NameCanvas(); + _painter(tester).paint(canvas, const Size(100, 40)); + expect(canvas.labels.length, 2); + expect(canvas.labels.every((l) => l.truncated && l.width <= 44), isTrue); + expect( + canvas.rectangles, + [ + const Rect.fromLTWH(0, 0, 100, 40), + const Rect.fromLTWH(0, 10, 100, 20), + ], + reason: + 'canvas and primary lane backgrounds are filled, not clip headers', + ); + c.setCamera(TimelineCamera(baseTick: 2, pixelsPerTick: 10)); + await tester.pump(); + final panned = _NameCanvas(); + _painter(tester).paint(panned, const Size(100, 40)); + expect(panned.labels.first.offset.dx, -17); + expect( + panned.labels.map((l) => l.width), + canvas.labels.map((l) => l.width), + ); + c.setCamera(TimelineCamera(baseTick: 0, pixelsPerTick: 0.8)); + final narrow = _NameCanvas(); + _painter(tester).paint(narrow, const Size(100, 40)); + expect( + narrow.labels, + isEmpty, + reason: 'no readable space inside a 4px clip', + ); + }, + ); + + testWidgets('paints a projected frame and reuses it while panning', ( + tester, + ) async { + final fixture = _fixture(); + final metrics = TimelineViewportMetrics(); + final controller = TimelineViewController( + version: fixture.version, + storyline: fixture.primary, + geometry: TimelineViewportGeometry(primaryTop: 10, primaryHeight: 20), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 10), + viewportEngine: TimelineViewportEngine(overscanScreens: 1), + metrics: metrics, + ); + addTearDown(controller.dispose); + + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: Center( + child: SizedBox( + width: 100, + height: 40, + child: TimelineView(controller: controller), + ), + ), + ), + ); + + expect(find.byType(CustomPaint), findsOneWidget); + expect(metrics.cacheRebuilds, 1); + expect(metrics.candidatesWritten, 2); + + controller.panBy(horizontalPixels: 10); + await tester.pump(); + + expect(controller.camera.baseTick, 1); + expect(metrics.cacheHits, greaterThanOrEqualTo(1)); + expect(metrics.cacheRebuilds, 1); + }); + + test('camera zoom remains presentation-only and cursor anchored', () { + final fixture = _fixture(); + final controller = TimelineViewController( + version: fixture.version, + storyline: fixture.primary, + geometry: TimelineViewportGeometry(primaryTop: 0, primaryHeight: 20), + camera: TimelineCamera( + baseTick: 0, + pixelsPerTick: 100 / TimelineClock.ticksPerSecond, + ), + ); + addTearDown(controller.dispose); + final before = controller.version.kernelVersion; + final viewport = TimelineViewportRect(width: 100, height: 40); + + controller.zoomAt( + screenX: 50, + newPixelsPerTick: 200 / TimelineClock.ticksPerSecond, + viewport: viewport, + ); + + expect( + controller.camera.screenXForTick( + TimelineClock.ticksPerSecond ~/ 2, + viewport, + ), + closeTo(50, 1e-6), + ); + expect(controller.version.kernelVersion, same(before)); + }); + + testWidgets('resolves global theme once and honors a local override', ( + tester, + ) async { + final fixture = _fixture(); + final controller = TimelineViewController( + version: fixture.version, + storyline: fixture.primary, + geometry: TimelineViewportGeometry(primaryTop: 0, primaryHeight: 20), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 10), + ); + addTearDown(controller.dispose); + const inheritedA = TimelineThemeData.dark(); + final inheritedB = inheritedA.copyWith( + backgroundColor: const Color(0xff000000), + ); + + await tester.pumpWidget( + _themeFixture(controller: controller, inherited: inheritedA), + ); + final inheritedPainterA = _painter(tester); + await tester.pumpWidget( + _themeFixture(controller: controller, inherited: inheritedB), + ); + final inheritedPainterB = _painter(tester); + expect(inheritedPainterB.shouldRepaint(inheritedPainterA), isTrue); + + const local = TimelineThemeData.dark(); + await tester.pumpWidget( + _themeFixture( + controller: controller, + inherited: inheritedA, + local: local, + ), + ); + final localPainterA = _painter(tester); + await tester.pumpWidget( + _themeFixture( + controller: controller, + inherited: inheritedB, + local: local, + ), + ); + final localPainterB = _painter(tester); + expect(localPainterB.shouldRepaint(localPainterA), isFalse); + }); + + testWidgets( + 'renders structural and connected items without reclassification', + (tester) async { + final fixture = _richFixture(); + final metrics = TimelineViewportMetrics(); + final controller = TimelineViewController( + version: fixture.version, + storyline: fixture.primary, + geometry: TimelineViewportGeometry(primaryTop: 30, primaryHeight: 20), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 5), + metrics: metrics, + ); + addTearDown(controller.dispose); + final classified = {}; + + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: SizedBox( + width: 100, + height: 80, + child: TimelineView( + controller: controller, + classifyContent: (element) { + classified.add(element.id); + return element.id.value == 'right' + ? LayoutMediaLeafClass.audioOnly + : LayoutMediaLeafClass.nonAudio; + }, + ), + ), + ), + ); + + expect(classified, {ElementId('left'), ElementId('right')}); + expect(metrics.candidatesWritten, 6); + }, + ); + + testWidgets('connection starts at the connected clip leading edge', ( + tester, + ) async { + final fixture = _richFixture(); + final controller = TimelineViewController( + version: fixture.version, + storyline: fixture.primary, + geometry: TimelineViewportGeometry(primaryTop: 30, primaryHeight: 20), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 5), + ); + addTearDown(controller.dispose); + final theme = const TimelineThemeData.dark().copyWith( + connectionLineWidth: 3, + ); + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: SizedBox( + width: 100, + height: 100, + child: TimelineView(controller: controller, theme: theme), + ), + ), + ); + + final viewport = TimelineViewportRect(width: 100, height: 100); + final frame = controller.project(viewport); + final index = Iterable.generate(frame.length).singleWhere( + (index) => frame.kindAt(index) == TimelineViewportItemKind.connected, + ); + final clipLeft = controller.presentationBoundsAt(frame, index).left; + final canvas = _ConnectionCanvas(); + _painter(tester).paint(canvas, const Size(100, 100)); + expect(canvas.connections, hasLength(1)); + expect( + canvas.connections.single.dx - theme.connectionLineWidth / 2, + closeTo(clipLeft, 0.001), + ); + }); + + test('hit testing and interaction state stay presentation-only', () { + final fixture = _fixture(); + final controller = TimelineViewController( + version: fixture.version, + storyline: fixture.primary, + geometry: TimelineViewportGeometry(primaryTop: 10, primaryHeight: 20), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 10), + ); + addTearDown(controller.dispose); + final before = controller.version.kernelVersion; + final query = before.query(); + final left = query.elementById(ElementId('left'))!; + final right = query.elementById(ElementId('right'))!; + final viewport = TimelineViewportRect(width: 100, height: 40); + + final leftHit = controller.hitTest( + viewport: viewport, + position: const Offset(25, 20), + ); + final boundaryHit = controller.hitTest( + viewport: viewport, + position: const Offset(50, 20), + ); + + expect(leftHit?.identity, left); + expect(leftHit?.kind, TimelineViewportItemKind.primary); + expect(leftHit?.bounds, const Rect.fromLTWH(0, 10, 50, 20)); + expect(boundaryHit?.identity, right); + expect( + controller.hitTest(viewport: viewport, position: const Offset(100, 20)), + isNull, + ); + + controller.setSelection([left]); + controller.setHoveredIdentity(right); + expect(controller.selectedIdentities, {left}); + expect(controller.isSelected(left), isTrue); + expect(controller.hoveredIdentity, right); + expect(controller.version.kernelVersion, same(before)); + }); + + test('Primary clips are centered independently inside their band', () { + final fixture = _fixture(); + final controller = TimelineViewController( + version: fixture.version, + storyline: fixture.primary, + geometry: TimelineViewportGeometry( + primaryTop: 10, + primaryHeight: 20, + primaryClipHeight: 12, + ), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 10), + ); + addTearDown(controller.dispose); + final frame = controller.project( + TimelineViewportRect(width: 100, height: 40), + ); + final primary = List.generate(frame.length, (index) => index) + .where( + (index) => frame.kindAt(index) == TimelineViewportItemKind.primary, + ) + .toList(); + expect(primary, isNotEmpty); + expect(frame.screenTopAt(primary.first), 14); + expect(frame.screenHeightAt(primary.first), 12); + }); +} + +class _FrameRulerCanvas extends TestRecordingCanvas { + final ticks = []; + final frameTicks = []; + final seconds = []; + @override + void drawLine(Offset first, Offset second, Paint paint) { + if (first.dx == second.dx) ticks.add(first.dx); + if (first.dy == 25) frameTicks.add(first.dx); + if (second.dy == 6) seconds.add(first.dx); + } +} + +class _PlayheadCanvas extends TestRecordingCanvas { + Rect? pointer, clip; + Offset? lineStart; + @override + void drawPath(Path path, Paint paint) => pointer = path.getBounds(); + @override + void drawLine(Offset first, Offset second, Paint paint) => lineStart = first; + @override + void clipRect( + Rect rect, { + ui.ClipOp clipOp = ui.ClipOp.intersect, + bool doAntiAlias = true, + }) => clip = rect; +} + +class _ConnectionCanvas extends TestRecordingCanvas { + final connections = []; + + @override + void drawLine(Offset first, Offset second, Paint paint) { + if (first.dx == second.dx && paint.strokeWidth == 3) { + connections.add(first); + } + super.drawLine(first, second, paint); + } +} + +class _RulerCanvas extends TestRecordingCanvas { + final major = []; + final minor = []; + final labels = []; + final clips = []; + @override + void drawLine(Offset a, Offset b, Paint paint) { + if (b.dy == 6) major.add(a.dx); + if (b.dy == 3) minor.add(a.dx); + super.drawLine(a, b, paint); + } + + @override + void drawParagraph(ui.Paragraph paragraph, Offset offset) { + labels.add(offset); + super.drawParagraph(paragraph, offset); + } + + @override + void clipRect( + Rect rect, { + ui.ClipOp clipOp = ui.ClipOp.intersect, + bool doAntiAlias = true, + }) { + clips.add(rect); + super.clipRect(rect, clipOp: clipOp, doAntiAlias: doAntiAlias); + } +} + +Widget _themeFixture({ + required TimelineViewController controller, + required TimelineThemeData inherited, + TimelineThemeData? local, +}) => Theme( + data: ThemeData(extensions: [inherited]), + child: SizedBox( + width: 100, + height: 40, + child: TimelineView(controller: controller, theme: local), + ), +); + +CustomPainter _painter(WidgetTester tester) => + tester.widget(find.byType(CustomPaint)).painter!; + +final class _NameCanvas extends TestRecordingCanvas { + final paragraphs = []; + final rectangles = []; + + @override + void drawRect(Rect rect, Paint paint) { + rectangles.add(rect); + super.drawRect(rect, paint); + } + + final labels = <({double width, Offset offset, bool truncated})>[]; + + @override + void drawParagraph(ui.Paragraph paragraph, Offset offset) { + paragraphs.add(paragraph); + labels.add(( + width: paragraph.longestLine, + offset: offset, + truncated: paragraph.didExceedMaxLines, + )); + super.drawParagraph(paragraph, offset); + } +} + +double _nameWidth(String name) { + final text = TextPainter( + textDirection: TextDirection.ltr, + text: TextSpan( + text: name, + style: const TimelineThemeData.dark().clipNameTextStyle, + ), + )..layout(); + final width = text.width; + text.dispose(); + return width; +} + +({LayoutVersion version, StorylineHandle primary}) _fixture({ + String? name, + int clipDuration = 5, +}) { + final kernel = TimelineKernel.importDto( + TimelineDto( + id: SequenceId('ui-test'), + format: TimelineFormat.fps24, + primaryStorylineId: StorylineId('primary'), + storylines: [ + StorylineDto( + id: StorylineId('primary'), + elementIds: [ElementId('left'), ElementId('right')], + ), + ], + elements: [ + for (final id in ['left', 'right']) + ElementDto( + id: ElementId(id), + name: name, + structure: ElementStructure.content, + sourceRange: TimeRange( + start: RationalTime.zero, + duration: RationalTime.timelineTicks(clipDuration), + ), + duration: RationalTime.timelineTicks(clipDuration), + ), + ], + ), + ); + final projection = const TimelineLayoutSceneBuilder().project( + version: kernel.current, + stacks: const [], + appearance: (_, _, _) => throw StateError('fixture has no connections'), + ); + final result = TimelineLayoutEngine(kernel: kernel).initializeProjection( + kernel: kernel, + projection: projection, + policy: LayoutPolicy(version: 1, stacks: const []), + ); + return ( + version: result.version, + primary: kernel.current.query().primaryStoryline, + ); +} + +({LayoutVersion version, StorylineHandle primary}) _richFixture() { + final kernel = TimelineKernel.importDto( + TimelineDto( + id: SequenceId('ui-rich-test'), + format: TimelineFormat.fps24, + primaryStorylineId: StorylineId('primary'), + storylines: [ + StorylineDto( + id: StorylineId('primary'), + elementIds: [ + ElementId('left'), + ElementId('right'), + ElementId('gap'), + ElementId('container'), + ], + ), + StorylineDto( + id: StorylineId('child'), + elementIds: [ElementId('child-content')], + ), + ], + elements: [ + for (final id in ['left', 'right', 'child-content', 'connected']) + ElementDto( + id: ElementId(id), + name: switch (id) { + 'left' => 'Video', + 'right' => 'Sound', + 'connected' => 'Linked audio', + _ => 'Inner clip', + }, + structure: ElementStructure.content, + sourceRange: TimeRange( + start: RationalTime.zero, + duration: RationalTime.timelineTicks(5), + ), + duration: RationalTime.timelineTicks(5), + ), + ElementDto( + id: ElementId('gap'), + structure: ElementStructure.gap, + sourceRange: TimeRange( + start: RationalTime.zero, + duration: RationalTime.timelineTicks(5), + ), + duration: RationalTime.timelineTicks(5), + ), + ElementDto( + id: ElementId('container'), + name: 'Compound', + structure: ElementStructure.container, + sourceRange: TimeRange( + start: RationalTime.zero, + duration: RationalTime.timelineTicks(5), + ), + duration: RationalTime.timelineTicks(5), + containerStorylineId: StorylineId('child'), + ), + ], + connections: [ + ConnectionDto( + id: ConnectionId('connected'), + anchorId: ElementId('left'), + targetId: ElementId('connected'), + anchorTime: RationalTime.timelineTicks(2), + targetTime: RationalTime.zero, + side: ConnectionSide.below, + ), + ], + transitions: [ + TransitionDto( + id: TransitionId('transition'), + storylineId: StorylineId('primary'), + leftId: ElementId('left'), + rightId: ElementId('right'), + duration: RationalTime.timelineTicks(2), + timing: TransitionTiming.overlap, + ), + ], + ), + ); + final primary = kernel.current.query().primaryStoryline; + final stack = LayoutStackKey(scope: primary, side: ConnectionSide.below); + const domain = LayoutDomainId('audio'); + final projection = const TimelineLayoutSceneBuilder().project( + version: kernel.current, + stacks: [stack], + appearance: (_, _, _) => const LayoutBodyAppearance( + height: 10, + domain: domain, + placementClass: LayoutPlacementClass.audioOnly, + ), + ); + final result = TimelineLayoutEngine(kernel: kernel).initializeProjection( + kernel: kernel, + projection: projection, + policy: LayoutPolicy( + version: 1, + stacks: [ + LayoutStackPolicy( + stack: stack, + primaryBoundary: 50, + domains: const [domain], + innerGap: 5, + ), + ], + ), + ); + return (version: result.version, primary: primary); +} diff --git a/packages/cutdex_timeline_ui/test/timeline_viewport_camera_test.dart b/packages/cutdex_timeline_ui/test/timeline_viewport_camera_test.dart new file mode 100644 index 0000000..69ec769 --- /dev/null +++ b/packages/cutdex_timeline_ui/test/timeline_viewport_camera_test.dart @@ -0,0 +1,286 @@ +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/widgets.dart'; +import 'package:flutter_test/flutter_test.dart'; + +typedef _CameraState = (int, double, double, double); + +_CameraState _camera(TimelineViewController controller) => ( + controller.camera.baseTick, + controller.camera.fractionalTick, + controller.camera.pixelsPerTick, + controller.camera.verticalOffset, +); + +void main() { + test( + 'preparation is silent and reconciliation publishes one camera change', + () { + final controller = _controller(); + addTearDown(controller.dispose); + var contentChanges = 0; + var editingChanges = 0; + var notifications = 0; + controller.contentChanges.addListener(() => contentChanges++); + controller.editingChanges.addListener(() => editingChanges++); + controller.addListener(() => notifications++); + controller.configureViewport( + width: 800, + height: 300, + end: 0, + top: -130, + bottom: 170, + ); + controller.prepareViewport(); + final prepared = _camera(controller); + expect(contentChanges, 0); + expect(editingChanges, 0); + expect(notifications, 0); + controller.reconcileViewport(); + expect(_camera(controller), prepared); + expect(contentChanges, 1); + expect(notifications, 1); + expect(editingChanges, 0); + controller.configureViewport( + width: 800, + height: 300, + end: 0, + top: -130, + bottom: 170, + ); + controller.prepareViewport(); + controller.reconcileViewport(); + expect(_camera(controller), prepared); + expect(contentChanges, 1); + expect(notifications, 1); + }, + ); + + test('zero-sized preparation does not consume initial empty placement', () { + final controller = _controller(); + addTearDown(controller.dispose); + controller.configureViewport( + width: 0, + height: 0, + end: 0, + top: 0, + bottom: 40, + ); + controller.prepareViewport(); + controller.reconcileViewport(); + expect(controller.camera.pixelsPerTick, 1); + controller.configureViewport( + width: 800, + height: 300, + end: 0, + top: -130, + bottom: 170, + ); + controller.prepareViewport(); + expect( + controller.camera.pixelsPerTick * 20 * TimelineClock.ticksPerSecond, + 800, + ); + expect(controller.camera.verticalOffset, -130); + controller.reconcileViewport(); + }); + + testWidgets('populated timeline centers before painting and retains zoom', ( + tester, + ) async { + final controller = _controller(populated: true); + addTearDown(controller.dispose); + final scale = controller.camera.pixelsPerTick; + final paints = <_CameraState>[]; + await tester.pumpWidget(_host(controller, paints)); + expect(paints.single, _camera(controller)); + expect(controller.camera.pixelsPerTick, scale); + final viewportHeight = tester + .getSize( + find.byWidgetPredicate( + (widget) => + widget is CustomPaint && widget.painter is _CameraPainter, + ), + ) + .height; + expect(controller.camera.verticalOffset, 20 - viewportHeight / 2); + await tester.pumpAndSettle(); + expect(paints.every((camera) => camera == paints.first), isTrue); + expect(tester.takeException(), isNull); + await tester.pumpWidget(const SizedBox()); + }); + + testWidgets( + 'empty timeline paints its final initial camera on the first frame', + (tester) async { + final controller = _controller(); + addTearDown(controller.dispose); + final paints = <_CameraState>[]; + await tester.pumpWidget(_host(controller, paints)); + expect(paints.single, _camera(controller)); + expect( + controller.camera.pixelsPerTick * 20 * TimelineClock.ticksPerSecond, + 800, + ); + await tester.pumpAndSettle(); + expect(paints.every((camera) => camera == paints.first), isTrue); + await tester.pumpWidget(const SizedBox()); + }, + ); + + testWidgets('controller switch does not paint before camera initialization', ( + tester, + ) async { + final first = _controller(); + final second = _controller(); + addTearDown(first.dispose); + addTearDown(second.dispose); + final firstPaints = <_CameraState>[]; + final secondPaints = <_CameraState>[]; + await tester.pumpWidget(_host(first, firstPaints)); + await tester.pumpAndSettle(); + first.zoomAt( + screenX: 0, + newPixelsPerTick: first.camera.pixelsPerTick * 2, + viewport: TimelineViewportRect(width: 800, height: 276), + ); + await tester.pumpAndSettle(); + final saved = _camera(first); + await tester.pumpWidget(_host(second, secondPaints)); + expect(secondPaints.single, _camera(second)); + await tester.pumpAndSettle(); + firstPaints.clear(); + await tester.pumpWidget(_host(first, firstPaints)); + expect(firstPaints.single, saved); + await tester.pumpAndSettle(); + expect(_camera(first), saved); + expect(tester.takeException(), isNull); + await tester.pumpWidget(const SizedBox()); + }); + + testWidgets( + 'saved empty timeline keeps zoom and clamps before its first paint', + (tester) async { + final controller = _controller(); + addTearDown(controller.dispose); + final scale = 50 / TimelineClock.ticksPerSecond; + controller.restoreViewState( + playheadTick: 0, + camera: TimelineCamera( + baseTick: 500, + pixelsPerTick: scale, + verticalOffset: 999, + ), + ); + final paints = <_CameraState>[]; + await tester.pumpWidget(_host(controller, paints)); + expect(paints.single, _camera(controller)); + expect(controller.camera.pixelsPerTick, scale); + expect(controller.camera.baseTick, 0); + await tester.pumpAndSettle(); + expect(paints.every((camera) => camera == paints.first), isTrue); + await tester.pumpWidget(const SizedBox()); + }, + ); + + testWidgets('cached viewport clamps a new size before painting', ( + tester, + ) async { + final controller = _controller(); + addTearDown(controller.dispose); + final paints = <_CameraState>[]; + await tester.pumpWidget(_host(controller, paints, height: 600)); + await tester.pumpAndSettle(); + final scale = controller.camera.pixelsPerTick; + final offset = controller.camera.verticalOffset; + paints.clear(); + await tester.pumpWidget(_host(controller, paints)); + expect(paints.single, _camera(controller)); + expect(controller.camera.verticalOffset, isNot(offset)); + expect(controller.camera.pixelsPerTick, scale); + await tester.pumpAndSettle(); + expect(paints.every((camera) => camera == paints.first), isTrue); + await tester.pumpWidget(const SizedBox()); + }); +} + +Widget _host( + TimelineViewController controller, + List<_CameraState> paints, { + double height = 300, +}) => Directionality( + textDirection: TextDirection.ltr, + child: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 800, + height: height, + child: TimelineViewport( + controller: controller, + child: CustomPaint(painter: _CameraPainter(controller, paints)), + ), + ), + ), +); + +class _CameraPainter extends CustomPainter { + _CameraPainter(this.controller, this.paints) + : super(repaint: controller.contentChanges); + final TimelineViewController controller; + final List<_CameraState> paints; + @override + void paint(Canvas canvas, Size size) => paints.add(_camera(controller)); + @override + bool shouldRepaint(covariant _CameraPainter oldDelegate) => + oldDelegate.controller != controller || oldDelegate.paints != paints; +} + +TimelineViewController _controller({bool populated = false}) { + final kernel = TimelineKernel.importDto( + TimelineDto( + id: SequenceId('empty'), + format: TimelineFormat.fps24, + primaryStorylineId: StorylineId('primary'), + elements: [ + if (populated) + ElementDto( + id: ElementId('clip'), + structure: ElementStructure.content, + sourceRange: TimeRange( + start: RationalTime.zero, + duration: RationalTime.timelineTicks( + 20 * TimelineClock.ticksPerSecond, + ), + ), + duration: RationalTime.timelineTicks( + 20 * TimelineClock.ticksPerSecond, + ), + ), + ], + storylines: [ + StorylineDto( + id: StorylineId('primary'), + elementIds: [if (populated) ElementId('clip')], + ), + ], + ), + ); + final projection = const TimelineLayoutSceneBuilder().project( + version: kernel.current, + stacks: const [], + appearance: (_, _, _) => throw StateError('No connected content'), + ); + final result = TimelineLayoutEngine(kernel: kernel).initializeProjection( + kernel: kernel, + projection: projection, + policy: LayoutPolicy(version: 1, stacks: const []), + ); + return TimelineViewController( + version: result.version, + storyline: kernel.current.query().primaryStoryline, + geometry: TimelineViewportGeometry(primaryTop: 10, primaryHeight: 20), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 1), + ); +} diff --git a/packages/cutdex_timeline_ui/test/timeline_waveforms_test.dart b/packages/cutdex_timeline_ui/test/timeline_waveforms_test.dart new file mode 100644 index 0000000..35b2bf6 --- /dev/null +++ b/packages/cutdex_timeline_ui/test/timeline_waveforms_test.dart @@ -0,0 +1,343 @@ +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +const _waveform = TimelineWaveform( + sampleRate: 1, + frameCount: 6, + levels: [ + TimelineWaveformLevel( + samplesPerBucket: 1, + channels: [ + [ + -0.1, + 0.1, + 0.1, + -0.2, + 0.05, + 0.2, + -0.3, + 0.3, + 0.3, + -0.4, + 0.4, + 0.4, + -0.05, + 0.5, + 0.5, + -0.6, + 0.6, + 0.6, + ], + ], + ), + ], +); + +void main() { + const second = TimelineClock.ticksPerSecond; + test( + 'coarse envelopes exclude peaks outside the requested source interval', + () { + const waveform = TimelineWaveform( + sampleRate: 1, + frameCount: 4, + levels: [ + TimelineWaveformLevel( + samplesPerBucket: 1, + channels: [ + [-1, 1, 1, -0.1, 0.1, 0.1, -0.1, 0.1, 0.1, -1, 1, 1], + ], + ), + TimelineWaveformLevel( + samplesPerBucket: 2, + channels: [ + [-1, 1, 0.7, -1, 1, 0.7], + ], + ), + ], + ); + expect(waveform.envelope(second, 3 * second), ( + minimum: -0.1, + maximum: 0.1, + )); + expect(waveform.envelope(3 * second, second), ( + minimum: -0.1, + maximum: 0.1, + )); + }, + ); + test('envelopes cover peaks, reverse ranges and out-of-source silence', () { + expect(_waveform.envelope(second, 3 * second), ( + minimum: -0.3, + maximum: 0.3, + )); + expect(_waveform.envelope(3 * second, second), ( + minimum: -0.3, + maximum: 0.3, + )); + expect(_waveform.envelope(8 * second, 9 * second), ( + minimum: 0.0, + maximum: 0.0, + )); + final delayed = TimelineWaveform( + sampleRate: 1, + sourceStartSeconds: 2, + frameCount: 6, + levels: _waveform.levels, + ); + expect(delayed.envelope(0, second), (minimum: 0.0, maximum: 0.0)); + expect(delayed.envelope(3 * second, 4 * second), ( + minimum: -0.2, + maximum: 0.05, + )); + }); + + test( + 'opposite-phase channels preserve peaks and zoom uses coarser levels', + () { + const waveform = TimelineWaveform( + sampleRate: 1, + frameCount: 2, + levels: [ + TimelineWaveformLevel( + samplesPerBucket: 1, + channels: [ + [0.5, 0.5, 0.5, 0.8, 0.8, 0.8], + [-0.5, -0.5, 0.5, -0.8, -0.8, 0.8], + ], + ), + TimelineWaveformLevel( + samplesPerBucket: 2, + channels: [ + [0.5, 0.8, 0.7], + [-0.8, -0.5, 0.7], + ], + ), + ], + ); + expect(waveform.envelope(0, 2 * second), (minimum: -0.8, maximum: 0.8)); + }, + ); + + for (final reverse in [false, true]) { + testWidgets( + 'paint maps trimmed 2x audio, reverse=$reverse, and async readiness', + (tester) async { + final kernel = TimelineKernel.importDto( + TimelineDto( + id: SequenceId('s'), + name: 's', + format: TimelineFormat.fps30, + primaryStorylineId: StorylineId('p'), + storylines: [ + StorylineDto( + id: StorylineId('p'), + elementIds: [ElementId('audio')], + ), + ], + elements: [ + ElementDto( + id: ElementId('audio'), + structure: ElementStructure.content, + duration: RationalTime.seconds(2), + sourceRange: TimeRange( + start: RationalTime.seconds(1), + duration: RationalTime.seconds(4), + ), + mediaRange: TimeRange( + start: RationalTime.seconds(0), + duration: RationalTime.seconds(6), + ), + retimeSegments: reverse + ? [ + RetimeSegmentDto( + projectDuration: RationalTime.seconds(2), + sourceStart: RationalTime.seconds(5), + sourceDelta: RationalTime.seconds(-4), + ), + ] + : [], + payloadRef: PayloadRef('audio'), + name: 'audio', + ), + ], + ), + ); + final engine = TimelineLayoutEngine(kernel: kernel); + final projection = const TimelineLayoutSceneBuilder().projectDefinition( + version: kernel.current, + definition: kernel.current.query().primaryStoryline, + sides: const [], + appearance: (_, _, _) => const LayoutBodyAppearance( + height: 60, + domain: LayoutDomainId('audio'), + placementClass: LayoutPlacementClass.audioOnly, + ), + ); + final version = engine + .buildComponents( + kernel: kernel, + components: TimelineLayoutComponents.build( + semantic: projection, + expanded: const [], + resolve: (_, _, _, _) => const [], + ), + policy: LayoutPolicy(version: 1, stacks: const []), + ) + .version; + final controller = TimelineViewController( + version: version, + storyline: kernel.current.query().primaryStoryline, + geometry: TimelineViewportGeometry(primaryTop: 0, primaryHeight: 60), + camera: TimelineCamera(baseTick: 0, pixelsPerTick: 50 / second), + ); + final source = _Source(); + addTearDown(controller.dispose); + addTearDown(source.dispose); + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: SizedBox( + width: 100, + height: 60, + child: TimelineView( + controller: controller, + waveforms: source, + classifyContent: (_) => LayoutMediaLeafClass.audioOnly, + theme: const TimelineThemeData.dark().copyWith( + clipHeaderHeight: 20, + ), + ), + ), + ), + ); + _WaveCanvas paint() { + final canvas = _WaveCanvas(); + tester + .widget(find.byType(CustomPaint)) + .painter! + .paint(canvas, const Size(100, 60)); + return canvas; + } + + expect(paint().bars, isEmpty); + expect(source.requests, greaterThan(0)); + source.ready(); + await tester.pump(); + final canvas = paint(); + expect(canvas.bars.length, inInclusiveRange(49, 50)); + expect( + canvas.bars.every((b) => b.$2.dy == 58), + isTrue, + reason: 'positive and negative peaks share the bottom baseline', + ); + expect( + canvas.bars.every((b) => b.$1.dy >= 22 && b.$2.dy <= 58), + isTrue, + ); + final firstHeight = canvas.bars.first.$2.dy - canvas.bars.first.$1.dy; + final lastHeight = canvas.bars.last.$2.dy - canvas.bars.last.$1.dy; + expect(firstHeight, closeTo((reverse ? 0.5 : 0.2) * 36, 0.001)); + expect(lastHeight, closeTo((reverse ? 0.2 : 0.5) * 36, 0.001)); + if (!reverse) { + final published = kernel.current; + final handle = published.query().elementById(ElementId('audio'))!; + final preview = const LayoutIntervalEdit().preview( + kernel: kernel, + engine: engine, + projection: engine.currentComponents!.semanticProjection, + edit: (tx) => tx.retimePlayback(handle, [ + RetimeSegmentDto( + projectDuration: RationalTime.seconds(4), + sourceStart: RationalTime.zero, + sourceDelta: RationalTime.seconds(2), + ), + ]), + ); + controller.showLayoutPreview(preview.result.version); + await tester.pump(); + expect(kernel.current, same(published)); + expect(controller.contentEndTick, 4 * second); + final previewQuery = controller + .project(TimelineViewportRect(width: 100, height: 60)) + .version + .kernelVersion + .query(); + expect(previewQuery.element(handle).duration, 4 * second); + final previewCanvas = paint(); + final previewLastHeight = + previewCanvas.bars.last.$2.dy - previewCanvas.bars.last.$1.dy; + expect(previewLastHeight, lessThan(lastHeight)); + controller.clearLayoutPreview(); + preview.cancel(); + await tester.pump(); + final restored = paint(); + expect( + restored.bars.last.$2.dy - restored.bars.last.$1.dy, + closeTo(lastHeight, 0.001), + ); + } + final camera = controller.camera; + final retained = canvas.bars.skip(5).take(30).toList(); + controller.panBy(horizontalPixels: 0.5); + await tester.pump(); + final panned = paint().bars; + for (final bar in retained) { + final moved = panned.singleWhere( + (candidate) => (candidate.$1.dx - (bar.$1.dx - 0.5)).abs() < 1e-9, + ); + expect(moved.$1.dy, bar.$1.dy); + expect(moved.$2.dy, bar.$2.dy); + } + controller.setCamera(camera); + await tester.pump(); + controller.setCamera( + TimelineCamera(baseTick: second, pixelsPerTick: 100 / second), + ); + await tester.pump(); + final zoomed = paint(); + expect(zoomed.bars.length, inInclusiveRange(49, 50)); + expect(tester.takeException(), isNull); + expect(controller.version, same(version)); + }, + ); + } +} + +class _Source extends ChangeNotifier implements TimelineWaveforms { + int requests = 0; + bool loaded = false; + void ready() { + loaded = true; + notifyListeners(); + } + + @override + void beginFrame() {} + @override + bool hasAudioFor(ElementRecord element) => true; + @override + TimelineWaveform? waveformFor(ElementRecord element) { + requests++; + return loaded ? _waveform : null; + } + + @override + void endFrame() {} +} + +class _WaveCanvas extends TestRecordingCanvas { + final bars = <(Offset, Offset)>[]; + @override + void drawLine(Offset p1, Offset p2, Paint paint) { + if (paint.color.toARGB32() == + const TimelineThemeData.dark().audioAccentColor.toARGB32()) { + bars.add((p1, p2)); + } + super.drawLine(p1, p2, paint); + } +} diff --git a/packages/cutdex_timeline_ui/test/waveform_gain_test.dart b/packages/cutdex_timeline_ui/test/waveform_gain_test.dart new file mode 100644 index 0000000..d288980 --- /dev/null +++ b/packages/cutdex_timeline_ui/test/waveform_gain_test.dart @@ -0,0 +1,109 @@ +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'media_trim_test.dart' show connectedFixture; + +void main() { + testWidgets('gain scales bars, silence flattens and overload marks the top', ( + tester, + ) async { + final controller = connectedFixture(gap: false); + final source = _Waveforms(); + addTearDown(controller.dispose); + addTearDown(source.dispose); + await tester.pumpWidget( + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 800, + height: 140, + child: TimelineView(controller: controller, waveforms: source), + ), + ), + ), + ); + _Bars paint() { + final canvas = _Bars(); + tester + .widget( + find.descendant( + of: find.byType(TimelineView), + matching: find.byType(CustomPaint), + ), + ) + .painter! + .paint(canvas, const Size(800, 140)); + return canvas; + } + + final normal = paint(); + expect(normal.heights, isNotEmpty); + source.gain = .5; + source.changed(); + await tester.pump(); + final quiet = paint(); + expect(quiet.heights.length, normal.heights.length); + for (var i = 0; i < normal.heights.length; i++) { + expect(quiet.heights[i], closeTo(normal.heights[i] / 2, 1e-8)); + } + source.gain = 0; + source.changed(); + await tester.pump(); + expect(paint().heights.every((h) => h == 1), isTrue); + source.gain = 4; + source.changed(); + await tester.pump(); + final loud = paint(); + expect(loud.warnings, loud.heights.length); + expect(loud.heights.first, closeTo(normal.heights.first * 2, 1e-8)); + source.gain = 1; + source.changed(); + await tester.pump(); + expect(paint().heights, normal.heights); + expect(paint().warnings, 0); + }); +} + +class _Waveforms extends ChangeNotifier implements TimelineWaveforms { + double gain = 1; + void changed() => notifyListeners(); + @override + void beginFrame() {} + @override + bool hasAudioFor(ElementRecord element) => true; + @override + void endFrame() {} + @override + TimelineWaveform waveformFor(ElementRecord element) => TimelineWaveform( + sampleRate: 1, + frameCount: 10, + amplitudeScale: gain, + levels: [ + TimelineWaveformLevel( + samplesPerBucket: 1, + channels: [ + [ + for (var i = 0; i < 10; i++) ...[-.5, .5, .25], + ], + ], + ), + ], + ); +} + +class _Bars extends TestRecordingCanvas { + final heights = []; + int warnings = 0; + @override + void drawLine(Offset p1, Offset p2, Paint paint) { + if (paint.color.toARGB32() == + const TimelineThemeData.dark().audioAccentColor.toARGB32()) { + heights.add(p2.dy - p1.dy); + } + if (paint.color.toARGB32() == 0xFFEF4444) warnings++; + super.drawLine(p1, p2, paint); + } +} diff --git a/packages/cutdex_timeline_ui/test/waveform_zoom_test.dart b/packages/cutdex_timeline_ui/test/waveform_zoom_test.dart new file mode 100644 index 0000000..613b1dc --- /dev/null +++ b/packages/cutdex_timeline_ui/test/waveform_zoom_test.dart @@ -0,0 +1,225 @@ +import 'dart:io'; +import 'dart:math' as math; +import 'dart:ui' as ui; + +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'media_trim_test.dart' show connectedFixture, viewport, second; + +void main() { + testWidgets( + 'continuous zoom keeps peaks on the ruler and pyramid switching exact', + (tester) async { + final controller = connectedFixture(gap: false); + final waveforms = _ZoomWaveforms(); + addTearDown(controller.dispose); + addTearDown(waveforms.dispose); + await tester.pumpWidget( + MaterialApp( + home: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 800, + height: 140, + child: TimelineView(controller: controller, waveforms: waveforms), + ), + ), + ), + ); + final painterFinder = find.descendant( + of: find.byType(TimelineView), + matching: find.byType(CustomPaint), + ); + _Bars paint() { + final canvas = _Bars(); + tester + .widget(painterFinder) + .painter! + .paint(canvas, const Size(800, 140)); + return canvas; + } + + final base = controller.version; + final originalCamera = controller.camera; + final original = paint().bars; + var maximumPositionError = 0.0; + var maximumFrameJump = 0.0; + double? previousCenter; + final recorder = ui.PictureRecorder(); + final sheet = Canvas(recorder); + var row = 0; + for (var i = 0; i <= 400; i++) { + final pixelsPerSecond = 10 + i * 0.1; + controller.zoomAt( + screenX: 0, + newPixelsPerTick: pixelsPerSecond / second, + viewport: viewport, + ); + await tester.pump(); + final bars = paint().bars; + final peaks = bars.where((bar) => bar.$2.dy - bar.$1.dy > 15).toList(); + expect( + peaks, + isNotEmpty, + reason: 'peak vanished at $pixelsPerSecond px/s', + ); + final center = + peaks.map((b) => b.$1.dx).reduce((a, b) => a + b) / peaks.length; + final expected = controller.camera.screenXForTick(4 * second, viewport); + final error = (center - expected).abs(); + maximumPositionError = math.max(maximumPositionError, error); + // A 2 px sampling column quantizes a narrow peak by at most one column. + expect( + error, + lessThanOrEqualTo(2.01), + reason: 'peak left the time ruler at $pixelsPerSecond px/s', + ); + if (previousCenter != null) { + expect(center, greaterThanOrEqualTo(previousCenter)); + maximumFrameJump = math.max( + maximumFrameJump, + center - previousCenter, + ); + expect(center - previousCenter, lessThanOrEqualTo(2.01)); + } + previousCenter = center; + // Compare every displayed source interval against the finest-level oracle. + for (final bar in bars) { + final start = (((bar.$1.dx - 1) / pixelsPerSecond) * second) + .floor() + .clamp(0, 10 * second); + final end = (((bar.$1.dx + 1) / pixelsPerSecond) * second) + .floor() + .clamp(0, 10 * second); + final exact = waveforms.finest.envelope(start, end); + final expectedHeight = math.max( + 1.0, + math.max(exact.maximum.abs(), exact.minimum.abs()) * 18, + ); + expect( + bar.$2.dy - bar.$1.dy, + closeTo(expectedHeight, 0.0001), + reason: 'pyramid introduced a height jump at $pixelsPerSecond px/s', + ); + } + if (i % 50 == 0) { + sheet.save(); + sheet.translate(0, row * 60.0 - 90); + sheet.clipRect(const Rect.fromLTWH(0, 90, 520, 40)); + tester + .widget(painterFinder) + .painter! + .paint(sheet, const Size(800, 140)); + sheet.restore(); + final label = TextPainter( + text: TextSpan( + text: '$pixelsPerSecond px/s', + style: const TextStyle(color: Colors.white, fontSize: 11), + ), + textDirection: TextDirection.ltr, + )..layout(); + label.paint(sheet, Offset(5, row * 60.0 + 42)); + label.dispose(); + row++; + } + } + controller.setCamera(originalCamera); + await tester.pump(); + expect( + paint().bars, + original, + reason: 'zoom round trip must restore the same waveform', + ); + expect(controller.version, same(base)); + expect(tester.takeException(), isNull); + // Optional inspection artifact from the real Flutter painter. + final picture = recorder.endRecording(); + const output = String.fromEnvironment('WAVEFORM_ZOOM_CAPTURE'); + if (output.isNotEmpty) { + await tester.runAsync(() async { + final image = await picture.toImage(520, row * 60); + final data = await image.toByteData(format: ui.ImageByteFormat.png); + await File(output).writeAsBytes(data!.buffer.asUint8List()); + image.dispose(); + }); + } + picture.dispose(); + // ignore: avoid_print + print( + 'Zoom audit: 401 frames, max peak error=$maximumPositionError px, max step=$maximumFrameJump px', + ); + }, + ); +} + +class _ZoomWaveforms extends ChangeNotifier implements TimelineWaveforms { + _ZoomWaveforms() { + final values = [ + for (var i = 0; i < 10000; i++) ...[ + i >= 4000 && i < 4010 ? -1.0 : -0.1, + i >= 4000 && i < 4010 ? 1.0 : 0.1, + 0.1, + ], + ]; + final levels = [ + TimelineWaveformLevel(samplesPerBucket: 1, channels: [values]), + ]; + for (var depth = 0; depth < 8; depth++) { + final previous = levels.last; + final channel = previous.channels.single; + final merged = []; + for (var i = 0; i < channel.length; i += 6) { + if (i + 3 >= channel.length) { + merged.addAll(channel.sublist(i)); + continue; + } + merged.addAll([ + math.min(channel[i], channel[i + 3]), + math.max(channel[i + 1], channel[i + 4]), + 0.1, + ]); + } + levels.add( + TimelineWaveformLevel( + samplesPerBucket: previous.samplesPerBucket * 2, + channels: [merged], + ), + ); + } + waveform = TimelineWaveform( + sampleRate: 1000, + frameCount: 10000, + levels: levels, + ); + finest = TimelineWaveform( + sampleRate: 1000, + frameCount: 10000, + levels: [levels.first], + ); + } + late final TimelineWaveform waveform; + late final TimelineWaveform finest; + @override + void beginFrame() {} + @override + bool hasAudioFor(ElementRecord element) => true; + @override + TimelineWaveform? waveformFor(ElementRecord element) => waveform; + @override + void endFrame() {} +} + +class _Bars extends TestRecordingCanvas { + final bars = <(Offset, Offset)>[]; + @override + void drawLine(Offset p1, Offset p2, Paint paint) { + if (paint.color.toARGB32() == + const TimelineThemeData.dark().audioAccentColor.toARGB32()) { + bars.add((p1, p2)); + } + super.drawLine(p1, p2, paint); + } +} diff --git a/pubspec.lock b/pubspec.lock index 162afbf..765f384 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -210,86 +210,61 @@ packages: url: "https://github.com/cutdex-ai/cutdex_agent.git" source: git version: "0.1.0" + cutdex_core: + dependency: "direct main" + description: + path: ".dependencies/cutdex_core" + relative: true + source: path + version: "0.0.1" cutdex_editor: dependency: transitive description: - path: "packages/editor" - ref: "8f8fb5bbeab604a7d60b6dfdfe4aec5ac92ea0d4" - resolved-ref: "8f8fb5bbeab604a7d60b6dfdfe4aec5ac92ea0d4" - url: "ssh://git@git.orangraph.com:2222/lingjhf/cutdex_sdk.git" - source: git + path: ".dependencies/cutdex_core/packages/editor" + relative: true + source: path version: "0.1.0" + cutdex_execution: + dependency: transitive + description: + path: ".dependencies/cutdex_core/packages/execution" + relative: true + source: path + version: "0.0.1" cutdex_mcp: dependency: transitive description: - path: "packages/mcp" - ref: "8f8fb5bbeab604a7d60b6dfdfe4aec5ac92ea0d4" - resolved-ref: "8f8fb5bbeab604a7d60b6dfdfe4aec5ac92ea0d4" - url: "ssh://git@git.orangraph.com:2222/lingjhf/cutdex_sdk.git" - source: git + path: ".dependencies/cutdex_core/packages/mcp" + relative: true + source: path version: "0.1.0" - cutdex_preview: - dependency: transitive + cutdex_native_flutter: + dependency: "direct main" description: - path: "packages/preview" - ref: "8f8fb5bbeab604a7d60b6dfdfe4aec5ac92ea0d4" - resolved-ref: "8f8fb5bbeab604a7d60b6dfdfe4aec5ac92ea0d4" - url: "ssh://git@git.orangraph.com:2222/lingjhf/cutdex_sdk.git" - source: git - version: "0.1.0" + path: ".dependencies/cutdex_core/native_flutter" + relative: true + source: path + version: "0.0.1" cutdex_project: dependency: transitive description: - path: "packages/project" - ref: "8f8fb5bbeab604a7d60b6dfdfe4aec5ac92ea0d4" - resolved-ref: "8f8fb5bbeab604a7d60b6dfdfe4aec5ac92ea0d4" - url: "ssh://git@git.orangraph.com:2222/lingjhf/cutdex_sdk.git" - source: git + path: ".dependencies/cutdex_core/packages/project" + relative: true + source: path version: "0.1.0" - cutdex_runtime: - dependency: transitive - description: - path: "packages/runtime" - ref: "8f8fb5bbeab604a7d60b6dfdfe4aec5ac92ea0d4" - resolved-ref: "8f8fb5bbeab604a7d60b6dfdfe4aec5ac92ea0d4" - url: "ssh://git@git.orangraph.com:2222/lingjhf/cutdex_sdk.git" - source: git - version: "0.0.1" - cutdex_sdk: - dependency: "direct main" - description: - path: "." - resolved-ref: "8f8fb5bbeab604a7d60b6dfdfe4aec5ac92ea0d4" - tag-pattern: "v{{version}}" - url: "ssh://git@git.orangraph.com:2222/lingjhf/cutdex_sdk.git" - source: git - version: "0.1.1" cutdex_timeline: dependency: transitive description: - path: "packages/timeline" - ref: "8f8fb5bbeab604a7d60b6dfdfe4aec5ac92ea0d4" - resolved-ref: "8f8fb5bbeab604a7d60b6dfdfe4aec5ac92ea0d4" - url: "ssh://git@git.orangraph.com:2222/lingjhf/cutdex_sdk.git" - source: git + path: ".dependencies/cutdex_core/packages/timeline" + relative: true + source: path version: "0.2.0" - cutdex_timeline_ui: - dependency: transitive - description: - path: "packages/timeline_ui" - ref: "8f8fb5bbeab604a7d60b6dfdfe4aec5ac92ea0d4" - resolved-ref: "8f8fb5bbeab604a7d60b6dfdfe4aec5ac92ea0d4" - url: "ssh://git@git.orangraph.com:2222/lingjhf/cutdex_sdk.git" - source: git - version: "0.1.0" cutdex_tools: dependency: transitive description: - path: "packages/tools" - ref: "8f8fb5bbeab604a7d60b6dfdfe4aec5ac92ea0d4" - resolved-ref: "8f8fb5bbeab604a7d60b6dfdfe4aec5ac92ea0d4" - url: "ssh://git@git.orangraph.com:2222/lingjhf/cutdex_sdk.git" - source: git + path: ".dependencies/cutdex_core/packages/tools" + relative: true + source: path version: "0.1.0" dart_style: dependency: transitive diff --git a/pubspec.yaml b/pubspec.yaml index 455419c..9477850 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,13 +2,14 @@ name: cutdex description: "Cutdex video editing application." publish_to: none -version: 0.1.2+3 +version: 0.1.3+4 environment: sdk: ^3.13.4 workspace: - packages/* + - packages/cutdex_timeline_ui/example dependencies: cutdex_ui: ^0.1.0 @@ -25,11 +26,12 @@ dependencies: intl: ^0.20.3 flutter_secure_storage: ^11.2.0 - cutdex_sdk: - git: - url: ssh://git@git.orangraph.com:2222/lingjhf/cutdex_sdk.git - tag_pattern: v{{version}} - version: ^0.1.1 + cutdex_core: + path: .dependencies/cutdex_core + cutdex_native_flutter: + path: .dependencies/cutdex_core/native_flutter + cutdex_preview: ^0.1.0 + cutdex_timeline_ui: ^0.1.0 cutdex_agent: git: url: https://github.com/cutdex-ai/cutdex_agent.git diff --git a/pubspec_overrides.yaml.example b/pubspec_overrides.yaml.example index 834f1c2..7bd2cbd 100644 --- a/pubspec_overrides.yaml.example +++ b/pubspec_overrides.yaml.example @@ -1,7 +1,9 @@ -# Default SDK dependency is the pinned remote Git tag. -# Copy to ignored pubspec_overrides.yaml only for local source development. +# Copy to ignored pubspec_overrides.yaml for sibling source development. +# CI verifies the Core release ZIP and uses its bundled native_flutter source. dependency_overrides: - cutdex_sdk: - path: ../cutdex_sdk + cutdex_core: + path: ../cutdex_core + cutdex_native_flutter: + path: ../cutdex_native_flutter cutdex_agent: path: ../cutdex_agent diff --git a/test/adaptive_workspace_test.dart b/test/adaptive_workspace_test.dart index c845ed9..eddbee8 100644 --- a/test/adaptive_workspace_test.dart +++ b/test/adaptive_workspace_test.dart @@ -36,10 +36,10 @@ import 'package:cutdex/workspace/timeline_provider.dart'; import 'package:cutdex/workspace/timeline_session.dart'; import 'package:cutdex/workspace/view_settings.dart'; import 'package:cutdex/workspace/workspace_mode.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/layout.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; import 'package:drift/native.dart'; import 'package:cutdex_ui/icons.dart'; import 'package:cutdex_ui/theme.dart'; diff --git a/test/agent_attachment_composer_test.dart b/test/agent_attachment_composer_test.dart index 36ef442..289da47 100644 --- a/test/agent_attachment_composer_test.dart +++ b/test/agent_attachment_composer_test.dart @@ -16,7 +16,7 @@ import 'package:cutdex/shared/widgets/drop_to_add_overlay.dart'; import 'package:cutdex/workspace/project_state.dart'; import 'package:cutdex/workspace/projects.dart'; import 'package:cutdex/workspace/media_import.dart'; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/test/agent_context_budget_test.dart b/test/agent_context_budget_test.dart index 37f9c62..572553e 100644 --- a/test/agent_context_budget_test.dart +++ b/test/agent_context_budget_test.dart @@ -5,8 +5,8 @@ import 'package:cutdex/integrations/agent/agent_prompt_policy.dart'; import 'package:cutdex/integrations/agent/editor_agent_tools.dart'; import 'package:cutdex_agent/cutdex_agent.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:cutdex_sdk/tools.dart'; -import 'package:cutdex_sdk/editor/commands.dart'; +import 'package:cutdex_core/tools.dart'; +import 'package:cutdex_core/editor/commands.dart'; class _CatalogHost implements EditorCommandHost { _CatalogHost([this.operations]); diff --git a/test/agent_image_preview_test.dart b/test/agent_image_preview_test.dart index 145b6e4..fc8e1f3 100644 --- a/test/agent_image_preview_test.dart +++ b/test/agent_image_preview_test.dart @@ -5,8 +5,8 @@ import 'dart:io'; import 'package:cutdex/features/assistant/agent_attachment_card.dart'; import 'package:cutdex/integrations/runtime/media_thumbnails.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/agent_tool_recovery_test.dart b/test/agent_tool_recovery_test.dart index c88607c..77797c9 100644 --- a/test/agent_tool_recovery_test.dart +++ b/test/agent_tool_recovery_test.dart @@ -3,8 +3,8 @@ import 'dart:io'; import 'package:cutdex/integrations/agent/editor_agent_tools.dart'; import 'package:cutdex_agent/cutdex_agent.dart'; import 'package:cutdex_agent/io.dart'; -import 'package:cutdex_sdk/editor/commands.dart'; -import 'package:cutdex_sdk/tools.dart'; +import 'package:cutdex_core/editor/commands.dart'; +import 'package:cutdex_core/tools.dart'; import 'package:flutter_test/flutter_test.dart'; class _Host implements EditorCommandHost { diff --git a/test/app_database_test.dart b/test/app_database_test.dart index a65a924..372d789 100644 --- a/test/app_database_test.dart +++ b/test/app_database_test.dart @@ -8,8 +8,8 @@ import 'package:cutdex/workspace/workspace_mode.dart'; import 'package:cutdex/workspace/persistence/recent_projects.dart'; import 'package:drift/native.dart'; import 'package:drift/drift.dart' show Value; -import 'package:cutdex_sdk/timeline/layout.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:path/path.dart' as p; import 'package:sqlite3/sqlite3.dart'; diff --git a/test/app_failure_test.dart b/test/app_failure_test.dart index d7e201d..aa5afd2 100644 --- a/test/app_failure_test.dart +++ b/test/app_failure_test.dart @@ -4,8 +4,8 @@ import 'package:cutdex/errors/app_failure.dart'; import 'package:cutdex/integrations/app_failure_adapter.dart'; import 'package:cutdex/l10n/l10n.dart'; import 'package:cutdex/workspace/project_state.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/project.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/app_update_recovery_test.dart b/test/app_update_recovery_test.dart index e80e733..1f3609f 100644 --- a/test/app_update_recovery_test.dart +++ b/test/app_update_recovery_test.dart @@ -7,7 +7,7 @@ import 'package:cutdex/integrations/app_updates.dart'; import 'package:cutdex/settings/settings_operation.dart'; import 'package:cutdex/workspace/persistence/recent_projects.dart'; import 'package:cutdex/workspace/projects.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/test/app_update_shutdown_test.dart b/test/app_update_shutdown_test.dart index 78fe9ed..04bd831 100644 --- a/test/app_update_shutdown_test.dart +++ b/test/app_update_shutdown_test.dart @@ -4,8 +4,8 @@ import 'dart:async'; import 'package:cutdex/features/properties/canvas_presets.dart'; import 'package:cutdex/workspace/projects.dart'; import 'package:cutdex/workspace/persistence/recent_projects.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/project.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/application_tools_test.dart b/test/application_tools_test.dart index 395c6fe..e477012 100644 --- a/test/application_tools_test.dart +++ b/test/application_tools_test.dart @@ -9,8 +9,8 @@ import 'package:cutdex/workspace/persistence/recent_projects.dart'; import 'package:cutdex/workspace/preview_target.dart'; import 'package:cutdex/workspace/timeline_provider.dart'; import 'package:cutdex_agent/cutdex_agent.dart'; -import 'package:cutdex_sdk/tools.dart'; -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_core/tools.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; import 'package:cutdex/persistence/app_settings_repositories.dart'; import 'support/memory_app_settings.dart'; diff --git a/test/audio_beat_tools_test.dart b/test/audio_beat_tools_test.dart index 4e0c5e0..f1dd419 100644 --- a/test/audio_beat_tools_test.dart +++ b/test/audio_beat_tools_test.dart @@ -8,10 +8,10 @@ import 'package:cutdex/workspace/timeline_session.dart'; import 'package:cutdex_agent/cutdex_agent.dart'; import 'package:cutdex_agent/io.dart'; import 'package:cutdex/integrations/agent/agent_prompt_policy.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/runtime/contracts.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_native_flutter/contracts.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter_test/flutter_test.dart'; class _AudioMedia implements EditorMediaService, EditorAudioSource { diff --git a/test/audio_properties_test.dart b/test/audio_properties_test.dart index 7e64c13..43e486a 100644 --- a/test/audio_properties_test.dart +++ b/test/audio_properties_test.dart @@ -1,13 +1,14 @@ import 'package:cutdex/app/editor_theme.dart'; import 'package:cutdex/integrations/runtime/timeline_waveforms.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'package:cutdex/l10n/app_localizations.dart'; import 'package:cutdex/features/properties/audio_gain_scale.dart'; import 'package:cutdex/features/properties/audio_properties.dart'; import 'package:cutdex_ui/widgets.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; +import 'package:cutdex_core/execution.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_core/timeline/engine.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/caption_edit_context_test.dart b/test/caption_edit_context_test.dart index 922d8e0..eaf1908 100644 --- a/test/caption_edit_context_test.dart +++ b/test/caption_edit_context_test.dart @@ -2,8 +2,8 @@ import 'package:cutdex/app/editor_theme.dart'; import 'package:cutdex/features/properties/caption_properties.dart'; import 'package:cutdex/l10n/app_localizations.dart'; import 'package:cutdex/workspace/timeline_session.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:cutdex_ui/theme.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/clip_animation_test.dart b/test/clip_animation_test.dart index 37cbe92..8e06251 100644 --- a/test/clip_animation_test.dart +++ b/test/clip_animation_test.dart @@ -1,5 +1,5 @@ -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter_test/flutter_test.dart'; import 'support/preview_fixture.dart'; diff --git a/test/clip_mask_test.dart b/test/clip_mask_test.dart index 27b9ef0..5f1d62a 100644 --- a/test/clip_mask_test.dart +++ b/test/clip_mask_test.dart @@ -1,6 +1,6 @@ import 'package:cutdex/features/properties/animation_labels.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter_test/flutter_test.dart'; import 'support/preview_fixture.dart'; diff --git a/test/compact_inspector_test.dart b/test/compact_inspector_test.dart index a04832d..f653b6e 100644 --- a/test/compact_inspector_test.dart +++ b/test/compact_inspector_test.dart @@ -9,7 +9,7 @@ import 'package:cutdex/features/properties/speed_properties.dart'; import 'package:cutdex_ui/widgets.dart'; import 'package:cutdex_ui/icons.dart'; import 'package:cutdex/l10n/app_localizations.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:cutdex_ui/theme.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/test/composer_reference_validator_test.dart b/test/composer_reference_validator_test.dart index a7301a0..490ed40 100644 --- a/test/composer_reference_validator_test.dart +++ b/test/composer_reference_validator_test.dart @@ -1,7 +1,7 @@ import 'package:cutdex/features/assistant/composer_document.dart'; import 'package:cutdex/features/assistant/composer_reference_validator.dart'; import 'package:cutdex/workspace/project_state.dart'; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { diff --git a/test/composer_suggestions_test.dart b/test/composer_suggestions_test.dart index 3cabe2c..4a35d8d 100644 --- a/test/composer_suggestions_test.dart +++ b/test/composer_suggestions_test.dart @@ -1,5 +1,5 @@ import 'package:cutdex/features/assistant/composer_suggestions.dart'; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:cutdex/l10n/app_localizations_en.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/diagnostic_settings_test.dart b/test/diagnostic_settings_test.dart index 21be81e..b2bf826 100644 --- a/test/diagnostic_settings_test.dart +++ b/test/diagnostic_settings_test.dart @@ -8,7 +8,7 @@ import 'package:cutdex/features/settings/diagnostic_settings.dart'; import 'package:cutdex/integrations/platform/file_picker.dart'; import 'package:cutdex/l10n/app_localizations.dart'; import 'package:cutdex/settings/settings_operation.dart'; -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/diagnostics/app_diagnostics_test.dart b/test/diagnostics/app_diagnostics_test.dart index 24b142d..600477f 100644 --- a/test/diagnostics/app_diagnostics_test.dart +++ b/test/diagnostics/app_diagnostics_test.dart @@ -4,7 +4,7 @@ import 'dart:io'; import 'package:cutdex/diagnostics/app_diagnostics.dart'; import 'package:cutdex/diagnostics/diagnostic_store.dart'; import 'package:cutdex/diagnostics/request_report.dart'; -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/diagnostics/edit_operation_diagnostics_test.dart b/test/diagnostics/edit_operation_diagnostics_test.dart index df6cb04..024f5bd 100644 --- a/test/diagnostics/edit_operation_diagnostics_test.dart +++ b/test/diagnostics/edit_operation_diagnostics_test.dart @@ -8,14 +8,14 @@ import 'package:cutdex/diagnostics/app_diagnostics.dart'; import 'package:cutdex/features/properties/speed_properties.dart'; import 'package:cutdex/features/timeline/timeline_speed_editor.dart'; import 'package:cutdex/l10n/app_localizations.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'package:cutdex_ui/widgets.dart'; import 'package:flutter/material.dart'; import 'package:cutdex/diagnostics/diagnostic_store.dart'; import 'package:cutdex/workspace/timeline_session.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline/layout.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_core/timeline/layout.dart'; import 'package:flutter_test/flutter_test.dart'; final sequence = SequenceId('sequence'); diff --git a/test/editor_acceptance_test.dart b/test/editor_acceptance_test.dart index 869804e..166e326 100644 --- a/test/editor_acceptance_test.dart +++ b/test/editor_acceptance_test.dart @@ -8,8 +8,8 @@ import 'package:cutdex/integrations/editor_command_host.dart'; import 'package:cutdex/workspace/timeline_session.dart'; import 'package:cutdex_agent/cutdex_agent.dart'; import 'package:cutdex_agent/io.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter_test/flutter_test.dart'; import 'transcription_tools_test.dart' show Media; diff --git a/test/editor_commands_test.dart b/test/editor_commands_test.dart index 819780b..db44091 100644 --- a/test/editor_commands_test.dart +++ b/test/editor_commands_test.dart @@ -6,8 +6,8 @@ import 'package:cutdex/l10n/app_localizations.dart'; import 'package:cutdex/workspace/project_assets_changed.dart'; import 'package:cutdex/features/properties/animation_labels.dart'; import 'package:cutdex/integrations/editor_command_host.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/engine.dart'; import 'package:cutdex/workspace/media_import.dart'; import 'dart:convert'; @@ -31,9 +31,9 @@ import 'package:cutdex/workspace/timeline_provider.dart'; import 'package:cutdex/features/properties/picture_properties.dart'; import 'package:cutdex/features/preview/preview_panel.dart'; import 'package:cutdex_agent/cutdex_agent.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/tools.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_core/tools.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/test/editor_panel_defaults_test.dart b/test/editor_panel_defaults_test.dart index 063c08c..34bc54b 100644 --- a/test/editor_panel_defaults_test.dart +++ b/test/editor_panel_defaults_test.dart @@ -2,7 +2,7 @@ import 'package:cutdex/app/editor_theme.dart'; import 'package:cutdex/features/editor/editor_panel_defaults.dart'; import 'package:cutdex/features/preview/preview_panel.dart'; import 'package:cutdex/l10n/app_localizations.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'package:cutdex_ui/icons.dart'; import 'package:cutdex_ui/widgets.dart'; import 'package:flutter/material.dart'; diff --git a/test/editor_theme_test.dart b/test/editor_theme_test.dart index 6758975..dc718d7 100644 --- a/test/editor_theme_test.dart +++ b/test/editor_theme_test.dart @@ -2,7 +2,7 @@ import 'dart:math' as math; import 'package:cutdex/app/editor_theme.dart'; import 'package:cutdex_ui/theme.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/export_publication_test.dart b/test/export_publication_test.dart index 1c6b6e5..6bfc537 100644 --- a/test/export_publication_test.dart +++ b/test/export_publication_test.dart @@ -3,7 +3,7 @@ import 'dart:convert'; import 'package:crypto/crypto.dart'; import 'package:cutdex/integrations/runtime/export_publication.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { diff --git a/test/features/assistant/agent_composer_controller_test.dart b/test/features/assistant/agent_composer_controller_test.dart index 6e9e984..483b2b2 100644 --- a/test/features/assistant/agent_composer_controller_test.dart +++ b/test/features/assistant/agent_composer_controller_test.dart @@ -6,7 +6,7 @@ import 'package:cutdex/features/assistant/agent_composer_controller.dart'; import 'package:cutdex/features/assistant/agent_composer_store.dart'; import 'package:cutdex/workspace/external_media_import.dart'; import 'package:cutdex/workspace/media_import.dart'; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:flutter_test/flutter_test.dart'; final _asset = AssetDocument( diff --git a/test/features/projects/project_sidebar_lifecycle_test.dart b/test/features/projects/project_sidebar_lifecycle_test.dart index 8958321..7a65e17 100644 --- a/test/features/projects/project_sidebar_lifecycle_test.dart +++ b/test/features/projects/project_sidebar_lifecycle_test.dart @@ -8,7 +8,7 @@ import 'package:cutdex/l10n/app_localizations.dart'; import 'package:cutdex/workspace/project_state.dart'; import 'package:cutdex/workspace/projects.dart'; import 'package:cutdex/workspace/workspace_mode.dart'; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/features/timeline/timeline_drop_duration_test.dart b/test/features/timeline/timeline_drop_duration_test.dart index 342dbde..3e5fa44 100644 --- a/test/features/timeline/timeline_drop_duration_test.dart +++ b/test/features/timeline/timeline_drop_duration_test.dart @@ -6,9 +6,9 @@ import 'package:cutdex/workspace/preview_target.dart'; import 'package:cutdex/workspace/project_state.dart'; import 'package:cutdex/workspace/projects.dart'; import 'package:cutdex/workspace/timeline_session.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; diff --git a/test/features/timeline/timeline_drop_preparation_test.dart b/test/features/timeline/timeline_drop_preparation_test.dart index 38b8f72..68b69f9 100644 --- a/test/features/timeline/timeline_drop_preparation_test.dart +++ b/test/features/timeline/timeline_drop_preparation_test.dart @@ -6,10 +6,10 @@ import 'package:cutdex/workspace/project_state.dart'; import 'package:cutdex/workspace/preview_target.dart'; import 'package:cutdex/workspace/projects.dart'; import 'package:cutdex/workspace/timeline_session.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/fullscreen_playback_bar_test.dart b/test/fullscreen_playback_bar_test.dart index bf5faac..ca9c4fc 100644 --- a/test/fullscreen_playback_bar_test.dart +++ b/test/fullscreen_playback_bar_test.dart @@ -1,7 +1,7 @@ import 'package:cutdex/app/editor_theme.dart'; import 'package:cutdex/features/preview/fullscreen_playback_bar.dart'; import 'package:cutdex/l10n/l10n.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/localized_surfaces_test.dart b/test/localized_surfaces_test.dart index 0d5e835..6697a18 100644 --- a/test/localized_surfaces_test.dart +++ b/test/localized_surfaces_test.dart @@ -11,7 +11,7 @@ import 'package:cutdex/l10n/l10n.dart'; import 'package:cutdex/workspace/media_color_interpretation.dart'; import 'package:cutdex/workspace/persistence/project_workspace.dart'; import 'package:cutdex/workspace/workspace_mode.dart'; -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/media_binding_test.dart b/test/media_binding_test.dart index 96eff83..a8f27cb 100644 --- a/test/media_binding_test.dart +++ b/test/media_binding_test.dart @@ -1,6 +1,6 @@ import 'support/creation_names.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'dart:async'; import 'dart:io'; @@ -8,8 +8,8 @@ import 'dart:io'; import 'package:cutdex/workspace/persistence/project_workspace.dart'; import 'package:cutdex/integrations/runtime/media_thumbnails.dart'; import 'package:cutdex/integrations/runtime/media_waveforms.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/media_color_interpretation_test.dart b/test/media_color_interpretation_test.dart index a0bf087..c707df4 100644 --- a/test/media_color_interpretation_test.dart +++ b/test/media_color_interpretation_test.dart @@ -2,10 +2,10 @@ import 'package:cutdex/app/editor_theme.dart'; import 'package:cutdex/l10n/app_localizations.dart'; import 'package:cutdex/features/preview/preview_panel.dart'; import 'package:cutdex/features/properties/color_interpretation_properties.dart'; -import 'package:cutdex_sdk/preview.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; import 'package:cutdex/workspace/media_color_interpretation.dart'; import 'package:cutdex/workspace/timeline_session.dart'; -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; import 'package:flutter/material.dart'; import 'package:cutdex_ui/theme.dart'; import 'package:cutdex_ui/widgets.dart'; diff --git a/test/media_import_test.dart b/test/media_import_test.dart index ad08f4a..e9f66a0 100644 --- a/test/media_import_test.dart +++ b/test/media_import_test.dart @@ -5,7 +5,7 @@ import 'dart:io'; import 'package:cutdex/workspace/media_import.dart'; import 'package:cutdex/workspace/persistence/project_workspace.dart'; import 'package:cutdex/integrations/platform/media_source_reader.dart'; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { diff --git a/test/media_panel_test.dart b/test/media_panel_test.dart index 43e0fed..51140c5 100644 --- a/test/media_panel_test.dart +++ b/test/media_panel_test.dart @@ -16,8 +16,8 @@ import 'package:cutdex/workspace/project_state.dart'; import 'package:cutdex/workspace/media_file_extensions.dart'; import 'package:cutdex/workspace/media_import.dart'; import 'package:cutdex/workspace/media_availability.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; import 'package:cutdex/integrations/platform/native_project_drop_region.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; diff --git a/test/palette_theme_test.dart b/test/palette_theme_test.dart index 2db8491..49b5677 100644 --- a/test/palette_theme_test.dart +++ b/test/palette_theme_test.dart @@ -2,7 +2,7 @@ import 'dart:math' as math; import 'package:cutdex/app/editor_theme.dart'; import 'package:cutdex_ui/theme.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/picture_corner_radius_test.dart b/test/picture_corner_radius_test.dart index 7fbaf54..9a5c8c4 100644 --- a/test/picture_corner_radius_test.dart +++ b/test/picture_corner_radius_test.dart @@ -2,9 +2,10 @@ import 'package:cutdex/app/editor_theme.dart'; import 'package:cutdex/features/preview/preview_panel.dart'; import 'package:cutdex/features/properties/picture_properties.dart'; import 'package:cutdex/l10n/app_localizations.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/execution.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:cutdex_ui/theme.dart'; import 'package:cutdex_ui/widgets.dart'; import 'package:flutter/material.dart'; diff --git a/test/picture_distortion_test.dart b/test/picture_distortion_test.dart index 5c66542..79a7d32 100644 --- a/test/picture_distortion_test.dart +++ b/test/picture_distortion_test.dart @@ -2,9 +2,9 @@ import 'package:cutdex/app/editor_theme.dart'; import 'package:cutdex/features/preview/preview_panel.dart'; import 'package:cutdex/features/properties/distortion_properties.dart'; import 'package:cutdex/l10n/app_localizations.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_core/timeline/engine.dart'; import 'package:cutdex_ui/theme.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/test/picture_edits_test.dart b/test/picture_edits_test.dart index f3e611a..409decc 100644 --- a/test/picture_edits_test.dart +++ b/test/picture_edits_test.dart @@ -1,10 +1,10 @@ import 'dart:async'; import 'package:cutdex/features/properties/picture_edits.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/picture_effect_test.dart b/test/picture_effect_test.dart index ed7d6bd..2a7d642 100644 --- a/test/picture_effect_test.dart +++ b/test/picture_effect_test.dart @@ -3,8 +3,8 @@ import 'package:cutdex/features/preview/preview_panel.dart'; import 'package:cutdex/features/properties/effect_properties.dart'; import 'package:cutdex/features/properties/effect_labels.dart'; import 'package:cutdex/l10n/app_localizations.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:cutdex_ui/theme.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/test/picture_keyframes_test.dart b/test/picture_keyframes_test.dart index 70404ea..aaf8688 100644 --- a/test/picture_keyframes_test.dart +++ b/test/picture_keyframes_test.dart @@ -1,9 +1,9 @@ import 'package:cutdex/app/editor_theme.dart'; import 'package:cutdex/l10n/app_localizations.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'package:cutdex/features/preview/preview_panel.dart'; import 'package:cutdex/features/properties/picture_properties.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:cutdex_ui/theme.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/test/picture_stroke_test.dart b/test/picture_stroke_test.dart index c37c0c7..c502ec2 100644 --- a/test/picture_stroke_test.dart +++ b/test/picture_stroke_test.dart @@ -2,8 +2,8 @@ import 'package:cutdex/app/editor_theme.dart'; import 'package:cutdex/features/preview/preview_panel.dart'; import 'package:cutdex/features/properties/stroke_properties.dart'; import 'package:cutdex/l10n/app_localizations.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:cutdex_ui/theme.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/test/preview_controller_test.dart b/test/preview_controller_test.dart index 770cc6a..0c0ba22 100644 --- a/test/preview_controller_test.dart +++ b/test/preview_controller_test.dart @@ -2,15 +2,15 @@ import 'package:cutdex/app/editor_theme.dart'; import 'package:cutdex/l10n/app_localizations.dart'; import 'package:cutdex/l10n/app_localizations_zh.dart'; import 'package:cutdex/integrations/editor_command_host.dart'; -import 'package:cutdex_sdk/tools.dart'; +import 'package:cutdex_core/tools.dart'; import 'package:cutdex/features/preview/preview_messages.dart'; import 'package:cutdex/features/properties/animation_labels.dart'; import 'package:cutdex/features/properties/canvas_presets.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'dart:async'; -import 'package:cutdex_sdk/preview.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; import 'package:cutdex/features/preview/preview_panel.dart'; import 'package:cutdex/features/properties/mask_properties.dart'; import 'package:cutdex/features/properties/property_number_input.dart'; @@ -18,10 +18,10 @@ import 'package:cutdex_ui/theme.dart'; import 'package:flutter/material.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline/layout.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_core/timeline/layout.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/preview_interaction_test.dart b/test/preview_interaction_test.dart index 5ceb33c..07ad4d0 100644 --- a/test/preview_interaction_test.dart +++ b/test/preview_interaction_test.dart @@ -3,9 +3,9 @@ import 'package:cutdex/l10n/app_localizations.dart'; import 'dart:async'; import 'dart:math' as math; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; diff --git a/test/preview_panel_test.dart b/test/preview_panel_test.dart index 20066a0..c703807 100644 --- a/test/preview_panel_test.dart +++ b/test/preview_panel_test.dart @@ -8,14 +8,14 @@ import 'package:cutdex/features/properties/canvas_presets.dart'; import 'dart:async'; import 'package:cutdex/features/preview/preview_panel.dart'; -import 'package:cutdex_sdk/preview.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; import 'package:cutdex_ui/theme.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'package:cutdex/workspace/media_availability.dart'; import 'package:cutdex/workspace/preview_target.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/test/project_entry_test.dart b/test/project_entry_test.dart index 2f158d8..aecadf5 100644 --- a/test/project_entry_test.dart +++ b/test/project_entry_test.dart @@ -9,9 +9,9 @@ import 'support/empty_conversation_repository.dart'; import 'package:cutdex/integrations/agent/conversation_repository.dart'; import 'package:cutdex/l10n/app_localizations.dart'; import 'package:cutdex/integrations/editor_command_host.dart'; -import 'package:cutdex_sdk/tools.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/tools.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'dart:io'; diff --git a/test/project_properties_test.dart b/test/project_properties_test.dart index a5dd8b3..a82bdc8 100644 --- a/test/project_properties_test.dart +++ b/test/project_properties_test.dart @@ -6,12 +6,12 @@ import 'package:cutdex_ui/theme.dart'; import 'dart:async'; import 'package:cutdex/l10n/app_localizations.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'package:cutdex/features/properties/properties_panel.dart'; import 'package:cutdex/workspace/timeline_provider.dart'; import 'package:cutdex/workspace/timeline_session.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/runtime/contracts.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_native_flutter/contracts.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/project_property_binding_test.dart b/test/project_property_binding_test.dart index 4a505c7..be19fa2 100644 --- a/test/project_property_binding_test.dart +++ b/test/project_property_binding_test.dart @@ -1,7 +1,7 @@ import 'package:cutdex/app/editor_theme.dart'; import 'package:cutdex/features/properties/project_properties.dart'; import 'package:cutdex/l10n/app_localizations.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/project_switch_presentation_test.dart b/test/project_switch_presentation_test.dart index 744ad35..ec3fd6a 100644 --- a/test/project_switch_presentation_test.dart +++ b/test/project_switch_presentation_test.dart @@ -14,7 +14,7 @@ import 'package:cutdex/workspace/projects.dart'; import 'package:cutdex/workspace/timeline_provider.dart'; import 'package:cutdex/workspace/view_settings.dart'; import 'package:cutdex/workspace/workspace_navigation.dart'; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/project_workspace_test.dart b/test/project_workspace_test.dart index 9d53106..0b17581 100644 --- a/test/project_workspace_test.dart +++ b/test/project_workspace_test.dart @@ -4,13 +4,13 @@ import 'dart:io'; import 'package:cutdex/errors/app_failure.dart'; -import 'package:cutdex_sdk/editor/commands.dart'; +import 'package:cutdex_core/editor/commands.dart'; import 'package:cutdex/workspace/persistence/project_workspace.dart'; import 'package:cutdex/workspace/background_task_registry.dart'; import 'package:cutdex/workspace/project_state.dart'; import 'package:cutdex/workspace/media_import.dart'; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { diff --git a/test/properties_preview_updates_test.dart b/test/properties_preview_updates_test.dart index 5f72796..568efa0 100644 --- a/test/properties_preview_updates_test.dart +++ b/test/properties_preview_updates_test.dart @@ -3,8 +3,8 @@ import 'package:cutdex/features/preview/preview_panel.dart'; import 'package:cutdex/features/properties/picture_properties.dart'; import 'package:cutdex/features/properties/properties_inspector_controller.dart'; import 'package:cutdex/l10n/app_localizations.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/properties_scroll_state_test.dart b/test/properties_scroll_state_test.dart index 7441e7e..ccabf67 100644 --- a/test/properties_scroll_state_test.dart +++ b/test/properties_scroll_state_test.dart @@ -3,7 +3,7 @@ import 'package:cutdex/features/preview/preview_panel.dart'; import 'package:cutdex/features/properties/properties_panel.dart'; import 'package:cutdex/l10n/app_localizations.dart'; import 'package:cutdex/workspace/timeline_provider.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/property_consistency_test.dart b/test/property_consistency_test.dart index 1630a85..00a929f 100644 --- a/test/property_consistency_test.dart +++ b/test/property_consistency_test.dart @@ -2,10 +2,10 @@ import 'package:cutdex/app/editor_theme.dart'; import 'package:cutdex/features/properties/audio_properties.dart'; import 'package:cutdex/l10n/app_localizations.dart'; import 'package:cutdex_ui/widgets.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/runtime/contracts.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_native_flutter/contracts.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/property_edit_controller_test.dart b/test/property_edit_controller_test.dart index 1fd6da7..12b74b5 100644 --- a/test/property_edit_controller_test.dart +++ b/test/property_edit_controller_test.dart @@ -1,6 +1,6 @@ import 'package:cutdex/features/properties/property_edit_controller.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter_test/flutter_test.dart'; import 'support/preview_fixture.dart'; diff --git a/test/property_operation_context_test.dart b/test/property_operation_context_test.dart index bb37798..ef526dd 100644 --- a/test/property_operation_context_test.dart +++ b/test/property_operation_context_test.dart @@ -6,10 +6,10 @@ import 'package:cutdex/features/properties/picture_properties.dart'; import 'package:cutdex/features/properties/mask_properties.dart'; import 'package:cutdex/l10n/app_localizations.dart'; import 'package:cutdex/workspace/timeline_session.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/saved_edit_validation_test.dart b/test/saved_edit_validation_test.dart index 3770e16..b10ea26 100644 --- a/test/saved_edit_validation_test.dart +++ b/test/saved_edit_validation_test.dart @@ -1,9 +1,9 @@ import 'dart:io'; import 'package:cutdex/features/properties/canvas_presets.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter_test/flutter_test.dart'; import '../integration_test/support/saved_edit_validation.dart'; diff --git a/test/source_preview_test.dart b/test/source_preview_test.dart index 497a4b4..7714fdf 100644 --- a/test/source_preview_test.dart +++ b/test/source_preview_test.dart @@ -1,5 +1,5 @@ import 'package:cutdex/workspace/preview_target.dart'; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { diff --git a/test/speed_properties_test.dart b/test/speed_properties_test.dart index 50b836b..ec0c6d9 100644 --- a/test/speed_properties_test.dart +++ b/test/speed_properties_test.dart @@ -8,11 +8,11 @@ import 'package:cutdex/features/timeline/timeline_speed_editor.dart'; import 'package:cutdex/l10n/app_localizations.dart'; import 'package:cutdex_ui/widgets.dart'; import 'package:cutdex/workspace/timeline_session.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/layout.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/support/memory_app_settings.dart b/test/support/memory_app_settings.dart index e8f005b..d6832d9 100644 --- a/test/support/memory_app_settings.dart +++ b/test/support/memory_app_settings.dart @@ -1,5 +1,6 @@ import 'package:cutdex/persistence/app_settings_repositories.dart'; -import 'package:cutdex_sdk/timeline_ui.dart' show TimelineRulerTimecodeLayout; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart' + show TimelineRulerTimecodeLayout; import 'package:cutdex/workspace/project_state.dart'; import 'package:cutdex/workspace/persistence/recent_projects.dart'; diff --git a/test/support/preview_fixture.dart b/test/support/preview_fixture.dart index ec96d8e..0211f77 100644 --- a/test/support/preview_fixture.dart +++ b/test/support/preview_fixture.dart @@ -4,8 +4,8 @@ import 'dart:io'; import 'package:cutdex/workspace/persistence/project_workspace.dart'; import 'package:cutdex/workspace/timeline_session.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_core/timeline/model.dart'; Future< ({ diff --git a/test/timeline_ruler_previews_test.dart b/test/timeline_ruler_previews_test.dart index e265b2e..712b6ef 100644 --- a/test/timeline_ruler_previews_test.dart +++ b/test/timeline_ruler_previews_test.dart @@ -1,5 +1,5 @@ import 'package:cutdex/features/timeline/timeline_ruler_previews.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/timeline_ruler_settings_widget_test.dart b/test/timeline_ruler_settings_widget_test.dart index cc6f40c..8512644 100644 --- a/test/timeline_ruler_settings_widget_test.dart +++ b/test/timeline_ruler_settings_widget_test.dart @@ -7,10 +7,10 @@ import 'package:cutdex/integrations/agent/conversation_repository.dart'; import 'package:cutdex/l10n/app_localizations.dart'; import 'package:cutdex/persistence/app_database.dart'; import 'package:cutdex/persistence/app_settings_repositories.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/layout.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:cutdex_ui/widgets.dart'; import 'package:drift/native.dart'; import 'package:flutter/material.dart'; diff --git a/test/timeline_session_test.dart b/test/timeline_session_test.dart index 4612329..9eb403f 100644 --- a/test/timeline_session_test.dart +++ b/test/timeline_session_test.dart @@ -7,7 +7,7 @@ import 'package:cutdex/features/media/transcription_dialog.dart'; import 'package:cutdex_ui/widgets.dart'; import 'package:cutdex_native/cutdex_native.dart'; import 'package:cutdex/features/properties/canvas_presets.dart'; -import 'package:cutdex_sdk/editor.dart'; +import 'package:cutdex_core/editor.dart'; import 'dart:async'; import 'dart:convert'; @@ -26,9 +26,10 @@ import 'package:cutdex/workspace/timeline_provider.dart'; import 'package:cutdex/features/timeline/timeline_panel.dart'; import 'package:cutdex/features/properties/properties_panel.dart'; import 'package:cutdex/features/properties/picture_properties.dart'; -import 'package:cutdex_sdk/preview.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; import 'package:cutdex/features/preview/preview_panel.dart'; -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_core/execution.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; import 'package:cutdex/features/media/media_panel.dart'; import 'package:cutdex/workspace/projects.dart'; import 'package:cutdex/workspace/project_state.dart'; @@ -38,11 +39,11 @@ import 'package:cutdex/workspace/timeline_session.dart'; import 'package:cutdex/workspace/timeline_view_state.dart'; import 'package:cutdex/persistence/app_database.dart'; import 'package:cutdex/persistence/app_settings_repositories.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/layout.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:flutter/material.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/foundation.dart'; diff --git a/test/timeline_speed_layout_test.dart b/test/timeline_speed_layout_test.dart index 6acc1bc..428a17d 100644 --- a/test/timeline_speed_layout_test.dart +++ b/test/timeline_speed_layout_test.dart @@ -1,8 +1,8 @@ import 'dart:ui'; import 'package:cutdex/features/timeline/timeline_speed_layout.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { diff --git a/test/timeline_switch_presentation_test.dart b/test/timeline_switch_presentation_test.dart index f0ba973..53b61de 100644 --- a/test/timeline_switch_presentation_test.dart +++ b/test/timeline_switch_presentation_test.dart @@ -14,7 +14,7 @@ import 'package:cutdex/workspace/media_availability.dart'; import 'package:cutdex/workspace/project_state.dart'; import 'package:cutdex/workspace/projects.dart'; import 'package:cutdex/workspace/timeline_provider.dart'; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/timeline_thumbnails_test.dart b/test/timeline_thumbnails_test.dart index 5774bae..a83fad1 100644 --- a/test/timeline_thumbnails_test.dart +++ b/test/timeline_thumbnails_test.dart @@ -2,9 +2,9 @@ import 'dart:async'; import 'dart:ui' as ui; import 'package:cutdex/integrations/runtime/timeline_thumbnails.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/timeline_view_state_test.dart b/test/timeline_view_state_test.dart index 4cc1ed1..7228b6e 100644 --- a/test/timeline_view_state_test.dart +++ b/test/timeline_view_state_test.dart @@ -1,7 +1,7 @@ import 'package:cutdex/persistence/app_settings_repositories.dart'; import 'package:cutdex/workspace/timeline_view_state.dart'; -import 'package:cutdex_sdk/timeline/layout.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter_test/flutter_test.dart'; import 'support/preview_fixture.dart'; diff --git a/test/timeline_waveforms_test.dart b/test/timeline_waveforms_test.dart index be5abac..c7378ba 100644 --- a/test/timeline_waveforms_test.dart +++ b/test/timeline_waveforms_test.dart @@ -1,9 +1,9 @@ import 'dart:async'; import 'package:cutdex/integrations/runtime/timeline_waveforms.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/engine.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/engine.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/services.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/transcription_tools_test.dart b/test/transcription_tools_test.dart index 0d686be..f0b8180 100644 --- a/test/transcription_tools_test.dart +++ b/test/transcription_tools_test.dart @@ -17,13 +17,13 @@ import 'package:cutdex/integrations/editor_command_host.dart'; import 'package:cutdex/integrations/editor_tools.dart'; import 'package:cutdex/integrations/runtime/processing_configuration.dart'; import 'package:cutdex/workspace/timeline_session.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/runtime/contracts.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline/layout.dart'; -import 'package:cutdex_sdk/runtime/execution.dart'; -import 'package:cutdex_sdk/tools.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_native_flutter/contracts.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/execution.dart'; +import 'package:cutdex_core/tools.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; diff --git a/test/widget_test.dart b/test/widget_test.dart index 4615ecd..484c892 100644 --- a/test/widget_test.dart +++ b/test/widget_test.dart @@ -31,7 +31,7 @@ import 'package:flutter/gestures.dart'; import 'package:flutter/services.dart'; import 'package:cutdex/workspace/projects.dart'; import 'package:cutdex/workspace/project_state.dart'; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:cutdex/app/app.dart'; import 'package:cutdex/app/router/app_router.dart'; import 'package:cutdex/integrations/agent/conversation_repository.dart'; diff --git a/test/windows_media_import_test.dart b/test/windows_media_import_test.dart index 3ee2b63..10c1de2 100644 --- a/test/windows_media_import_test.dart +++ b/test/windows_media_import_test.dart @@ -6,7 +6,7 @@ import 'dart:io'; import 'package:cutdex/workspace/media_file_extensions.dart'; import 'package:cutdex/workspace/media_import.dart'; import 'package:cutdex/workspace/persistence/project_workspace.dart'; -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/workspace/external_media_import_test.dart b/test/workspace/external_media_import_test.dart index 5606b62..6333034 100644 --- a/test/workspace/external_media_import_test.dart +++ b/test/workspace/external_media_import_test.dart @@ -5,7 +5,7 @@ import 'package:cutdex/workspace/external_media_import.dart'; import 'package:cutdex/workspace/media_import.dart'; import 'package:cutdex/workspace/project_state.dart'; import 'package:cutdex/workspace/projects.dart'; -import 'package:cutdex_sdk/project.dart'; +import 'package:cutdex_core/project.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/workspace/media_timeline_duration_test.dart b/test/workspace/media_timeline_duration_test.dart index b1ec16e..5de57bb 100644 --- a/test/workspace/media_timeline_duration_test.dart +++ b/test/workspace/media_timeline_duration_test.dart @@ -1,7 +1,7 @@ import 'package:cutdex/errors/app_failure.dart'; import 'package:cutdex/workspace/media_timeline_duration.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { diff --git a/test/workspace/prepared_media_entry_points_test.dart b/test/workspace/prepared_media_entry_points_test.dart index d8b2c30..1d6f876 100644 --- a/test/workspace/prepared_media_entry_points_test.dart +++ b/test/workspace/prepared_media_entry_points_test.dart @@ -6,10 +6,10 @@ import 'dart:convert'; import 'dart:io'; import 'package:cutdex/workspace/persistence/project_workspace.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/workspace/prepared_media_metadata_test.dart b/test/workspace/prepared_media_metadata_test.dart index a946c83..bd6523d 100644 --- a/test/workspace/prepared_media_metadata_test.dart +++ b/test/workspace/prepared_media_metadata_test.dart @@ -1,8 +1,8 @@ import 'package:cutdex/errors/app_failure.dart'; import 'package:cutdex/workspace/prepared_media_metadata.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter_test/flutter_test.dart'; MediaInfo _info({ diff --git a/test/workspace/preview_controller_registry_test.dart b/test/workspace/preview_controller_registry_test.dart index 8cf0da8..918f29d 100644 --- a/test/workspace/preview_controller_registry_test.dart +++ b/test/workspace/preview_controller_registry_test.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:cutdex/workspace/preview_controller_registry.dart'; -import 'package:cutdex_sdk/runtime.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/workspace/timeline_navigation_test.dart b/test/workspace/timeline_navigation_test.dart index 198d31b..ef5668f 100644 --- a/test/workspace/timeline_navigation_test.dart +++ b/test/workspace/timeline_navigation_test.dart @@ -14,9 +14,9 @@ import 'package:cutdex/workspace/project_state.dart'; import 'package:cutdex/workspace/projects.dart'; import 'package:cutdex/workspace/timeline_provider.dart'; import 'package:cutdex/workspace/persistence/recent_projects.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; diff --git a/tool/README.md b/tool/README.md index a9a777b..7381441 100644 --- a/tool/README.md +++ b/tool/README.md @@ -106,7 +106,7 @@ python tool/windows/package_windows_release.py ` ## 应用更新产物 -Cutdex 的 macOS 更新构建配置为 `CUTDEX_UPDATE_FEED_URL` / `CUTDEX_UPDATE_PUBLIC_KEY`;在构建前设置正式 HTTPS 更新源。Windows production 使用固定的公开 Gitea 仓库与 deskup 0.2.0;开发更新源、Release 附件与迁移说明见 [Windows 更新与发布](../docs/windows-updates.md)。 +Cutdex 的 macOS 更新构建配置为 `CUTDEX_UPDATE_FEED_URL` / `CUTDEX_UPDATE_PUBLIC_KEY`;在构建前设置正式 HTTPS 更新源。Windows production 使用固定的公开 Gitea 仓库与 pubspec.lock 锁定的 deskup SDK;开发更新源、Release 附件与迁移说明见 [Windows 更新与发布](../docs/windows-updates.md)。 生成更新产物的应用入口: diff --git a/tool/check.py b/tool/check.py index 1646da6..551a6b5 100644 --- a/tool/check.py +++ b/tool/check.py @@ -43,7 +43,8 @@ def check_analyze(): def check_flutter(): - package_tests = sorted(str(path.relative_to(ROOT)) for path in (ROOT / 'packages').glob('*/test')) + package_tests = sorted(str(path.relative_to(ROOT)) for pattern in ('*/test', '*/example/test') + for path in (ROOT / 'packages').glob(pattern)) run(tool_command('flutter', ['test', '--reporter', 'expanded', 'test', *package_tests])) diff --git a/tool/check_package_boundaries.py b/tool/check_package_boundaries.py index d7da062..7744b73 100644 --- a/tool/check_package_boundaries.py +++ b/tool/check_package_boundaries.py @@ -9,10 +9,14 @@ ROOT = Path(__file__).resolve().parent.parent RUNTIME = { 'cutdex_native': {'flutter', 'path'}, 'cutdex_ui': {'flutter', 'cutdex_native', 'freezed_annotation'}, + 'cutdex_timeline_ui': {'flutter', 'cutdex_core'}, + 'cutdex_preview': {'flutter', 'cutdex_core', 'cutdex_native_flutter', 'cutdex_timeline_ui'}, } DEVELOPMENT = { 'cutdex_native': {'flutter_test', 'flutter_lints'}, 'cutdex_ui': {'flutter_test', 'flutter_lints', 'build_runner', 'freezed'}, + 'cutdex_timeline_ui': {'flutter_test', 'flutter_lints'}, + 'cutdex_preview': {'flutter_test', 'flutter_lints'}, } TOKENS = re.compile( r"//[^\n]*|/\*.*?\*/|" @@ -51,6 +55,18 @@ def package_uri(uri): return dependency, posixpath.normpath(unquote(path)) +def native_channels(source): + """Recognize reserved wire names, ignoring comments and ordinary text.""" + for token in TOKENS.finditer(source): + if token.lastgroup != 'string': + continue + value = token.group().removeprefix('r') + quote = value[0] * (3 if value[:3] == value[0] * 3 else 1) + value = value[len(quote):-len(quote)] + if value == 'cutdex_runtime' or value.startswith('cutdex_runtime/'): + yield value + + def dependency_names(manifest, section): """Read the flat dependency keys used by our workspace manifests.""" match = re.search(rf'^{section}:\s*\n(.*?)(?=^\S|\Z)', manifest, @@ -66,6 +82,10 @@ def check(root): def reject(source, message): errors.append(f'{source.relative_to(root)}: {message}') + def check_transport(source, content): + for channel in native_channels(content): + reject(source, f'native channel {channel} belongs to cutdex_native_flutter transport') + for package, allowed in RUNTIME.items(): directory = root / 'packages' / package manifest_path = directory / 'pubspec.yaml' @@ -84,7 +104,10 @@ def check(root): if area != 'lib': declared |= dev_dependencies for source in (directory / area).rglob('*.dart'): - for kind, uri in directives(source.read_text(encoding='utf-8')): + content = source.read_text(encoding='utf-8') + if area == 'lib': + check_transport(source, content) + for kind, uri in directives(content): if uri.startswith('package:'): dependency, path = package_uri(uri) if dependency not in declared: @@ -99,7 +122,10 @@ def check(root): for area in ['lib', 'test', 'integration_test', 'test_driver', 'tool']: for source in (root / area).rglob('*.dart'): - for kind, uri in directives(source.read_text(encoding='utf-8')): + content = source.read_text(encoding='utf-8') + if area == 'lib': + check_transport(source, content) + for kind, uri in directives(content): if uri.startswith('package:'): dependency, path = package_uri(uri) if dependency != 'cutdex' and (path == 'src' or path.startswith('src/')): diff --git a/tool/gitea/ci_scope.py b/tool/gitea/ci_scope.py index 7ce8bab..6b05b3c 100644 --- a/tool/gitea/ci_scope.py +++ b/tool/gitea/ci_scope.py @@ -12,11 +12,10 @@ def packaging_change(path): return ( path.startswith(('.gitea/', '.github/workflows/', '.github/actions/', 'tool/', 'android/', 'windows/', - 'packages/cutdex_native/android/', - 'packages/cutdex_native/windows/', + 'packages/cutdex_native/', 'lib/integrations/app_update', 'lib/features/settings/update')) - or PurePosixPath(path).name in {'pubspec.yaml', 'pubspec.lock', '.metadata', '.fvmrc'} + or PurePosixPath(path).name in {'pubspec.yaml', 'pubspec.lock', '.metadata', '.fvmrc', 'dependencies.json'} or (path.startswith('test/') and 'update' in path) ) diff --git a/tool/gitea/prepare_dependencies.py b/tool/gitea/prepare_dependencies.py new file mode 100644 index 0000000..a05f621 --- /dev/null +++ b/tool/gitea/prepare_dependencies.py @@ -0,0 +1,144 @@ +"""Resolve the application's verified, self-contained Core source release.""" +import argparse +import hashlib +import io +import json +import os +from pathlib import Path, PurePosixPath +import posixpath +import re +import shutil +import sys +import tempfile +import zipfile + +from read_dependencies import ROOT, validate_pins +from release_transport import SERVER, request + + +def verify_archive(data, pins): + validate_pins(pins) + core, native = pins['core'], pins['nativeFlutter'] + artifact = core['artifact'] + if not re.fullmatch(r'[a-f0-9]{64}', artifact['sha256']): + raise ValueError('Core archive must pin a complete SHA256 digest.') + if hashlib.sha256(data).hexdigest() != artifact['sha256']: + raise ValueError('Core archive SHA256 does not match the application dependency lock.') + prefix = f"cutdex-core-{core['version']}/" + if artifact['file'] != f"cutdex-core-{core['version']}.zip" or core.get('ref') != 'v' + core['version']: + raise ValueError('Core archive must refer to the exact recorded release version.') + with zipfile.ZipFile(io.BytesIO(data)) as archive: + names = archive.namelist() + if len(names) != len(set(names)): + raise ValueError('Duplicate Core archive paths.') + for item in archive.infolist(): + path = PurePosixPath(item.filename) + if not item.filename.startswith(prefix) or '..' in path.parts or ':' in item.filename or '\\' in item.filename: + raise ValueError('Unsafe Core archive path.') + if (item.external_attr >> 16) & 0o170000 == 0o120000: + target = archive.read(item).decode() + resolved = posixpath.normpath(posixpath.join(str(path.parent), target)) + if target.startswith('/') or '\\' in target or ':' in target or not resolved.startswith(prefix): + raise ValueError('Core symlink escapes its source directory.') + manifest = json.loads(archive.read(prefix + 'RELEASE.json')) + if manifest['version'] != core['version'] or manifest['source_commit'] != core['revision']: + raise ValueError('Core release manifest differs from the recorded commit/version.') + bundled = manifest['native_flutter'] + if bundled['version'] != native['version'] or bundled['source_commit'] != native['revision'] or bundled['path'] != 'native_flutter': + raise ValueError('Bundled native Flutter differs from the recorded release commit/version.') + for package, version in (('', core['version']), ('native_flutter/', native['version'])): + text = archive.read(prefix + package + 'pubspec.yaml').decode() + if re.search(r'^version:\s*(\S+)\s*$', text, re.M)[1] != version: + raise ValueError('Bundled package version differs from release metadata.') + platform_pins = json.loads(archive.read(prefix + 'native_flutter/native-dependencies.json')) + if bundled['platform_dependencies'] != platform_pins: + raise ValueError('Bundled platform pins differ from release metadata.') + core_pin = json.loads(archive.read(prefix + 'native-flutter-dependency.json')) + if (core_pin['revision'] != native['revision'] or core_pin['version'] != native['version'] + or core_pin['repository'] != native['repository']): + raise ValueError('Core native Flutter pin differs from the application release pin.') + return prefix, manifest + + +def extract_archive(data, prefix, destination): + """Materialize internal aliases as copies, including on Windows without symlink privileges.""" + links = [] + with zipfile.ZipFile(io.BytesIO(data)) as archive: + for item in archive.infolist(): + relative = PurePosixPath(item.filename).relative_to(PurePosixPath(prefix)) + path = destination.joinpath(*relative.parts) + if item.is_dir(): + path.mkdir(parents=True, exist_ok=True) + elif (item.external_attr >> 16) & 0o170000 == 0o120000: + target = posixpath.normpath(posixpath.join(str(relative.parent), archive.read(item).decode())) + links.append((path, destination.joinpath(*PurePosixPath(target).parts))) + else: + path.parent.mkdir(parents=True, exist_ok=True) + path.write_bytes(archive.read(item)) + path.chmod((item.external_attr >> 16) & 0o777 or 0o644) + for path, target in links: + if not target.exists(): + raise ValueError('Core archive alias target is missing.') + path.parent.mkdir(parents=True, exist_ok=True) + if target.is_dir(): + shutil.copytree(target, path) + else: + shutil.copy2(target, path) + + +def release_archive(pins): + core = pins['core'] + release = request(f"{SERVER}/api/v1/repos/{core['repository']}/releases/tags/{core['ref']}") + if release.get('draft') or release.get('prerelease') or release['tag_name'] != core['ref']: + raise ValueError('Core dependency must be a published stable release.') + assets = [asset for asset in release['assets'] if asset['name'] == core['artifact']['file']] + if len(assets) != 1: + raise ValueError('Expected exactly one Core release source archive.') + url = assets[0]['browser_download_url'] + if not url.startswith(SERVER + '/'): + raise ValueError('Unexpected Core release download origin.') + return request(url) + + +def prepare(pins, root=ROOT): + validate_pins(pins) + cache_root = Path(os.environ.get('CUTDEX_CORE_ARCHIVE_CACHE', Path.home() / '.cache/cutdex/core')) + cache_root.mkdir(parents=True, exist_ok=True) + digest = pins['core']['artifact']['sha256'] + archive_path = cache_root / (digest + '.zip') + data = archive_path.read_bytes() if archive_path.is_file() else release_archive(pins) + prefix, manifest = verify_archive(data, pins) + if not archive_path.is_file(): + with tempfile.NamedTemporaryFile(dir=cache_root, delete=False) as stream: + temporary_archive = Path(stream.name) + stream.write(data) + temporary_archive.replace(archive_path) + dependencies = root / '.dependencies' + dependencies.mkdir(exist_ok=True) + destination = dependencies / 'cutdex_core' + if destination.is_symlink() or (destination / '.git').exists(): + raise ValueError('Core source checkout is for development; use the local dependency overrides.') + if destination.exists() and not (destination / 'RELEASE.json').is_file(): + raise ValueError('Refusing to replace an unmanaged Core directory.') + with tempfile.TemporaryDirectory(prefix='core-release-', dir=dependencies) as directory: + staged = Path(directory) / 'cutdex_core' + staged.mkdir() + extract_archive(data, prefix, staged) + if destination.exists(): + shutil.rmtree(destination) + staged.rename(destination) + print(f"Prepared Core {manifest['version']} with native Flutter {manifest['native_flutter']['version']}; archive SHA256 verified.") + + +def main(): + argparse.ArgumentParser(description=__doc__).parse_args() + os.environ['GITEA_TOKEN'] = os.environ.get('CUTDEX_GITEA_TOKEN', os.environ.get('GITEA_TOKEN', '')) + prepare(json.loads((ROOT / 'dependencies.json').read_text())) + + +if __name__ == '__main__': + try: + main() + except (ValueError, OSError, KeyError, zipfile.BadZipFile) as error: + print(f'Core dependency preparation failed: {error}', file=sys.stderr) + sys.exit(1) diff --git a/tool/gitea/read_dependencies.py b/tool/gitea/read_dependencies.py new file mode 100644 index 0000000..09a7106 --- /dev/null +++ b/tool/gitea/read_dependencies.py @@ -0,0 +1,77 @@ +"""Expose exact application dependencies to CI or update development commit pins.""" +import argparse +import json +import os +from pathlib import Path +import re +import subprocess + +ROOT = Path(__file__).resolve().parents[2] +DEPENDENCIES = ('core', 'nativeFlutter') + + +def validate_pins(pins): + if pins.get('schemaVersion') != 1: + raise ValueError('Unsupported application dependency lock schema.') + for name in DEPENDENCIES: + pin = pins[name] + if not re.fullmatch(r'[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+', pin['repository']): + raise ValueError(f'{name}: invalid repository identity.') + if not re.fullmatch(r'[a-f0-9]{40}', pin['revision']): + raise ValueError(f'{name}: dependency must pin a full commit SHA.') + reference = pin.get('ref', pin['revision']) + if reference != pin['revision'] and reference != 'v' + pin.get('version', ''): + raise ValueError(f'{name}: release ref must match the recorded version.') + if reference != pin['revision'] and not re.fullmatch(r'\d+\.\d+\.\d+', pin['version']): + raise ValueError(f'{name}: invalid release version.') + return pins + + +def write_outputs(pins, output): + validate_pins(pins) + for name in DEPENDENCIES: + pin = pins[name] + for key in ('repository', 'revision'): + output.write(f'{name}-{key}={pin[key]}\n') + output.write(f"{name}-ref={pin.get('ref', pin['revision'])}\n") + + +def verify_checkouts(pins): + validate_pins(pins) + for name, directory in (('core', 'cutdex_core'), ('nativeFlutter', 'cutdex_native_flutter')): + revision = subprocess.check_output(['git', 'rev-parse', 'HEAD'], + cwd=ROOT / '.dependencies' / directory, text=True).strip() + if revision != pins[name]['revision']: + raise ValueError(f'{name}: checkout does not match the recorded commit.') + print('Both dependency checkouts match their recorded commits.') + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--core', type=Path, help='Update the core pin from this committed checkout') + parser.add_argument('--native-flutter', type=Path, help='Update the native Flutter pin from this committed checkout') + parser.add_argument('--verify', action='store_true', help='Verify CI dependency checkouts match the recorded commits') + args = parser.parse_args() + path = ROOT / 'dependencies.json' + pins = json.loads(path.read_text()) + if args.core or args.native_flutter: + for name, checkout in (('core', args.core), ('nativeFlutter', args.native_flutter)): + if checkout: + sha = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=checkout, text=True).strip() + manifest = 'native-dependencies.json' if name == 'nativeFlutter' else 'native-flutter-dependency.json' + subprocess.check_output(['git', 'show', f'{sha}:{manifest}'], cwd=checkout) + pubspec = subprocess.check_output(['git', 'show', f'{sha}:pubspec.yaml'], cwd=checkout, text=True) + pins[name].update(revision=sha, version=re.search(r'^version:\s*(\S+)\s*$', pubspec, re.M)[1]) + pins[name].pop('ref', None) + validate_pins(pins) + path.write_text(json.dumps(pins, indent=2) + '\n') + print('Updated committed application dependency pins.') + elif args.verify: + verify_checkouts(pins) + else: + with Path(os.environ['GITHUB_OUTPUT']).open('a', encoding='utf-8') as output: + write_outputs(pins, output) + + +if __name__ == '__main__': + main() diff --git a/tool/gitea/test_ci_scope.py b/tool/gitea/test_ci_scope.py index 42da2e5..ba9ca6a 100644 --- a/tool/gitea/test_ci_scope.py +++ b/tool/gitea/test_ci_scope.py @@ -33,13 +33,24 @@ class ScopeTests(unittest.TestCase): 'tool/gitea/ci_scope.py', 'tool/windows/windows_updates.py', 'windows/runner/main.cpp.in', 'android/app/build.gradle.kts', 'pubspec.yaml', 'pubspec.lock', '.fvmrc', 'packages/cutdex_ui/pubspec.yaml', - 'packages/cutdex_native/windows/CMakeLists.txt', + 'packages/cutdex_native/windows/CMakeLists.txt', 'dependencies.json', 'lib/integrations/app_update_bridge.dart', 'lib/features/settings/update_controller.dart', 'test/app_updates_test.dart'): with self.subTest(path=path): self.assertEqual(select_scope('pull_request', ['README.md', path]), {'build-app': True, 'package-app': True}) + def test_windows_source_setup_preserves_explicit_compiler_configuration(self): + workflow = (Path(__file__).resolve().parents[2] / '.gitea/workflows/ci.yml').read_text() + branch = workflow.split(' windows-build:', 1)[1].split(' windows:', 1)[0] + cleanup = branch.index('Clear inherited native build overrides') + setup = branch.index('/.gitea/actions/setup-windows') + build = branch.index('Build production Windows app') + self.assertLess(cleanup, setup) + self.assertLess(setup, build) + self.assertIn('"$key=" >> $env:GITHUB_ENV', branch[cleanup:setup]) + self.assertNotIn('Remove-Item', branch[setup:]) + def test_arbitrary_runtime_markdown_is_not_treated_as_documentation(self): self.assertTrue(select_scope('pull_request', ['assets/help.md'])['build-app']) diff --git a/tool/gitea/test_dependencies.py b/tool/gitea/test_dependencies.py new file mode 100644 index 0000000..30b39c4 --- /dev/null +++ b/tool/gitea/test_dependencies.py @@ -0,0 +1,44 @@ +import copy +import io +import unittest +from unittest.mock import patch + +from read_dependencies import validate_pins, verify_checkouts, write_outputs + + +class DependencyPinsTests(unittest.TestCase): + def setUp(self): + self.pins = {'schemaVersion': 1, + 'core': {'repository': 'lingjhf/cutdex_core', 'revision': 'a' * 40}, + 'nativeFlutter': {'repository': 'cutdex-native/cutdex_native_flutter', + 'revision': 'b' * 40, 'version': '0.0.1', 'ref': 'v0.0.1'}} + + def test_development_commit_and_release_tag_outputs(self): + output = io.StringIO() + write_outputs(self.pins, output) + self.assertIn('core-ref=' + 'a' * 40 + '\n', output.getvalue()) + self.assertIn('nativeFlutter-ref=v0.0.1\n', output.getvalue()) + self.assertIn('nativeFlutter-revision=' + 'b' * 40 + '\n', output.getvalue()) + + def test_unpinned_branch_mismatched_version_and_invalid_identity_are_rejected(self): + for field, value in (('ref', 'main'), ('ref', 'v0.0.2'), ('version', '0.0.1\ninjected=true'), + ('revision', 'short'), ('repository', 'owner/repo\ninjected=true')): + pins = copy.deepcopy(self.pins) + pins['nativeFlutter'][field] = value + with self.subTest(field=field, value=value), self.assertRaises(ValueError): + validate_pins(pins) + + def test_mutated_release_tag_cannot_change_dependency_commit(self): + with patch('read_dependencies.subprocess.check_output', side_effect=['a' * 40, 'c' * 40]): + with self.assertRaisesRegex(ValueError, 'nativeFlutter: checkout'): + verify_checkouts(self.pins) + + def test_both_dependency_commits_are_checked_in_their_own_checkouts(self): + with patch('read_dependencies.subprocess.check_output', side_effect=['a' * 40, 'b' * 40]) as git: + verify_checkouts(self.pins) + self.assertEqual([call.kwargs['cwd'].name for call in git.call_args_list], + ['cutdex_core', 'cutdex_native_flutter']) + + +if __name__ == '__main__': + unittest.main() diff --git a/tool/gitea/test_prepare_dependencies.py b/tool/gitea/test_prepare_dependencies.py new file mode 100644 index 0000000..a5d5df0 --- /dev/null +++ b/tool/gitea/test_prepare_dependencies.py @@ -0,0 +1,100 @@ +import copy +import hashlib +import io +import json +from pathlib import Path +import tempfile +from unittest.mock import patch +import unittest +import zipfile + +from prepare_dependencies import extract_archive, prepare, verify_archive + + +class CoreSourceDependencyTests(unittest.TestCase): + def bundle(self, extra=None): + prefix = 'cutdex-core-0.0.1/' + native = {'version': '0.0.1', 'source_commit': 'b' * 40, 'path': 'native_flutter', + 'platform_dependencies': {'schemaVersion': 1, 'platforms': {}}} + files = {'RELEASE.json': json.dumps({'version': '0.0.1', 'source_commit': 'a' * 40, + 'native_flutter': native}), + 'pubspec.yaml': 'name: cutdex_core\nversion: 0.0.1\n', + 'native_flutter/pubspec.yaml': 'name: cutdex_native_flutter\nversion: 0.0.1\n', + 'native_flutter/native-dependencies.json': json.dumps(native['platform_dependencies']), + 'native-flutter-dependency.json': json.dumps({'repository': 'cutdex-native/cutdex_native_flutter', + 'revision': 'b' * 40, 'version': '0.0.1'}), + 'native_flutter/darwin/runtime/source.swift': 'source'} + data = io.BytesIO() + with zipfile.ZipFile(data, 'w') as archive: + for name, body in files.items(): + archive.writestr(prefix + name, body) + link = zipfile.ZipInfo(prefix + 'native_flutter/darwin/cutdex_native_flutter') + link.external_attr = 0o120777 << 16 + archive.writestr(link, 'runtime') + if extra: + archive.writestr(extra[0], extra[1]) + body = data.getvalue() + pins = {'schemaVersion': 1, + 'core': {'repository': 'lingjhf/cutdex_core', 'version': '0.0.1', 'ref': 'v0.0.1', + 'revision': 'a' * 40, 'artifact': {'file': 'cutdex-core-0.0.1.zip', + 'sha256': hashlib.sha256(body).hexdigest()}}, + 'nativeFlutter': {'repository': 'cutdex-native/cutdex_native_flutter', + 'revision': 'b' * 40, 'version': '0.0.1', 'ref': 'v0.0.1'}} + return body, pins + + def test_exact_release_bundle_materializes_apple_alias_without_symlink_privileges(self): + data, pins = self.bundle() + prefix, manifest = verify_archive(data, pins) + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + extract_archive(data, prefix, root) + self.assertEqual((root / 'native_flutter/darwin/cutdex_native_flutter/source.swift').read_text(), 'source') + self.assertFalse((root / 'native_flutter/darwin/cutdex_native_flutter').is_symlink()) + self.assertEqual(manifest['native_flutter']['source_commit'], pins['nativeFlutter']['revision']) + + def test_digest_core_commit_and_native_commit_mismatches_fail_before_extraction(self): + data, pins = self.bundle() + for package, field in [('core', 'revision'), ('nativeFlutter', 'revision'), ('nativeFlutter', 'repository')]: + altered = copy.deepcopy(pins) + altered[package][field] = 'old/native_flutter' if field == 'repository' else 'c' * 40 + with self.subTest(package=package), self.assertRaises(ValueError): + verify_archive(data, altered) + with self.assertRaisesRegex(ValueError, 'SHA256'): + verify_archive(data + b'changed', pins) + + def test_cached_archive_is_verified_and_extracted_fresh_for_retry(self): + data, pins = self.bundle() + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + cache = root / 'cache' + cache.mkdir() + (cache / (pins['core']['artifact']['sha256'] + '.zip')).write_bytes(data) + with patch.dict('os.environ', {'CUTDEX_CORE_ARCHIVE_CACHE': str(cache)}), patch('prepare_dependencies.release_archive') as fetch: + prepare(pins, root) + source = root / '.dependencies/cutdex_core/native_flutter/darwin/runtime/source.swift' + source.write_text('local stale content') + prepare(pins, root) + self.assertEqual(source.read_text(), 'source') + fetch.assert_not_called() + + def test_development_checkout_is_never_removed_by_release_preparation(self): + data, pins = self.bundle() + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + development = root / '.dependencies/cutdex_core' + development.mkdir(parents=True) + (development / '.git').mkdir() + with patch('prepare_dependencies.release_archive', return_value=data), patch.dict('os.environ', {'CUTDEX_CORE_ARCHIVE_CACHE': str(root / 'cache')}): + with self.assertRaisesRegex(ValueError, 'development'): + prepare(pins, root) + self.assertTrue((development / '.git').is_dir()) + + def test_archive_escape_and_duplicate_paths_are_rejected(self): + for name in ['cutdex-core-0.0.1/../outside', 'cutdex-core-0.0.1/pubspec.yaml']: + data, pins = self.bundle((name, 'unexpected')) + with self.subTest(name=name), self.assertRaises(ValueError): + verify_archive(data, pins) + + +if __name__ == '__main__': + unittest.main() diff --git a/tool/testing/app_frame_bench.dart b/tool/testing/app_frame_bench.dart index 084458a..0898110 100644 --- a/tool/testing/app_frame_bench.dart +++ b/tool/testing/app_frame_bench.dart @@ -21,12 +21,12 @@ import 'package:cutdex/workspace/timeline_provider.dart'; import 'package:cutdex/workspace/view_settings.dart'; import 'package:cutdex/workspace/workspace_mode.dart'; import 'package:cutdex/workspace/workspace_navigation.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/project.dart'; -import 'package:cutdex_sdk/timeline/layout.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_core/project.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:drift/native.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; diff --git a/tool/testing/release_smoke.dart b/tool/testing/release_smoke.dart index 88a55a1..5a62761 100644 --- a/tool/testing/release_smoke.dart +++ b/tool/testing/release_smoke.dart @@ -6,10 +6,10 @@ import 'dart:ui' as ui; import 'package:cutdex/integrations/runtime/processing_configuration.dart'; import 'package:cutdex/workspace/persistence/project_workspace.dart'; import 'package:cutdex/workspace/persistence/timeline_creation_names.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter/rendering.dart'; diff --git a/tool/tests/local_flutter_test.py b/tool/tests/local_flutter_test.py index 7edf0cc..c6e876f 100644 --- a/tool/tests/local_flutter_test.py +++ b/tool/tests/local_flutter_test.py @@ -76,7 +76,7 @@ sys.exit(7 if 'fail' in sys.argv else 0) def test_cli_injects_environment_before_build_and_preserves_machine_io(self): (self.root / '.env.local').write_text( 'CUTDEX_ENV_FILE_TEST="C:/My SDK/native"\nCUTDEX_ENV_PARENT_TEST=file\n' - 'CUTDEX_ANDROID_PATH="C:/My SDK/cutdex_android"\n', + 'CUTDEX_ANDROID_PATH="C:/My SDK/cutdex-android"\n', encoding='utf-8') result = self.run_cli('run', '--machine', '--profile', '--dart-define=VALUE=with space') self.assertEqual(result.returncode, 0, result.stderr) @@ -84,7 +84,7 @@ sys.exit(7 if 'fail' in sys.argv else 0) self.assertEqual(data['args'], ['run', '--machine', '--profile', '--dart-define=VALUE=with space']) self.assertEqual(data['file'], 'C:/My SDK/native') self.assertEqual(data['parent'], 'parent') - self.assertEqual(data['android'], 'C:/My SDK/cutdex_android') + self.assertEqual(data['android'], 'C:/My SDK/cutdex-android') self.assertEqual(data['input'], 'daemon-request') self.assertEqual(Path(data['cwd']).resolve(), self.root.resolve()) self.assertEqual(result.stderr.strip(), 'flutter-diagnostic') diff --git a/tool/tests/package_boundaries_test.py b/tool/tests/package_boundaries_test.py index 4a1df6a..c6e6286 100644 --- a/tool/tests/package_boundaries_test.py +++ b/tool/tests/package_boundaries_test.py @@ -63,9 +63,9 @@ dev_dependencies: for error in boundaries.check(self.root))) def test_application_cannot_import_sibling_repository_sources(self): - self.write('lib/bridge.dart', "export '../../cutdex_sdk/lib/editor.dart';") + self.write('lib/bridge.dart', "export '../../cutdex_core/lib/editor.dart';") self.write('integration_test/save_test.dart', - "import '../../cutdex_sdk/packages/project/lib/cutdex_project.dart';") + "import '../../cutdex_core/packages/project/lib/cutdex_project.dart';") self.assertEqual(len(boundaries.check(self.root)), 2) def test_application_library_cannot_import_test_or_tool_sources(self): @@ -101,3 +101,23 @@ dev_dependencies: const fixture = "import 'package:cutdex_ui/src/fake.dart';"; ''') self.assertEqual(boundaries.check(self.root), []) + + def test_application_and_ui_cannot_own_native_media_channels(self): + for path in ('lib/diagnostics.dart', 'packages/cutdex_preview/lib/bridge.dart'): + with self.subTest(path=path): + self.write(path, "const native = MethodChannel('cutdex_runtime');") + self.assertTrue(any('belongs to cutdex_native_flutter transport' in error + for error in boundaries.check(self.root))) + + def test_native_event_and_indirect_channel_names_are_rejected(self): + for channel in ('cutdex_runtime', 'cutdex_runtime/sessions/$id'): + with self.subTest(channel=channel): + self.write('lib/bridge.dart', f"const name = '{channel}';") + self.assertEqual(len(boundaries.check(self.root)), 1) + + def test_wire_mocks_and_application_channels_remain_host_owned(self): + self.write('test/preview_test.dart', "const native = MethodChannel('cutdex_runtime');") + self.write('lib/window.dart', "const window = MethodChannel('cutdex_native/window');") + self.write('lib/note.dart', "// MethodChannel('cutdex_runtime');\n" + "const message = 'Missing cutdex_runtime plugin';") + self.assertEqual(boundaries.check(self.root), []) diff --git a/tool/windows/native_preview_bench.dart b/tool/windows/native_preview_bench.dart index d31b5da..104346b 100644 --- a/tool/windows/native_preview_bench.dart +++ b/tool/windows/native_preview_bench.dart @@ -11,12 +11,12 @@ import 'package:cutdex/features/properties/properties_panel.dart'; import 'package:cutdex/features/timeline/timeline_panel.dart'; import 'package:cutdex/l10n/app_localizations.dart'; import 'package:cutdex/workspace/timeline_provider.dart'; -import 'package:cutdex_sdk/editor.dart'; -import 'package:cutdex_sdk/preview.dart'; -import 'package:cutdex_sdk/runtime.dart'; -import 'package:cutdex_sdk/timeline/model.dart'; -import 'package:cutdex_sdk/timeline/layout.dart'; -import 'package:cutdex_sdk/timeline_ui.dart'; +import 'package:cutdex_core/editor.dart'; +import 'package:cutdex_preview/cutdex_preview.dart'; +import 'package:cutdex_native_flutter/cutdex_native_flutter.dart'; +import 'package:cutdex_core/timeline/model.dart'; +import 'package:cutdex_core/timeline/layout.dart'; +import 'package:cutdex_timeline_ui/cutdex_timeline_ui.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index e181429..a4ec0b7 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -7,7 +7,7 @@ #include "generated_plugin_registrant.h" #include -#include +#include #include #include #include @@ -15,8 +15,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { CutdexNativePluginCApiRegisterWithRegistrar( registry->GetRegistrarForPlugin("CutdexNativePluginCApi")); - CutdexRuntimePluginCApiRegisterWithRegistrar( - registry->GetRegistrarForPlugin("CutdexRuntimePluginCApi")); + CutdexNativeFlutterPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("CutdexNativeFlutterPluginCApi")); DeskupPluginCApiRegisterWithRegistrar( registry->GetRegistrarForPlugin("DeskupPluginCApi")); FilegatePluginCApiRegisterWithRegistrar( diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index 337347c..fe04a02 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -4,7 +4,7 @@ list(APPEND FLUTTER_PLUGIN_LIST cutdex_native - cutdex_runtime + cutdex_native_flutter deskup filegate flutter_secure_storage_windows -- 2.54.0 From 70b5eeda297e2bc0d7e7552b98a3fb25daaa0ccd Mon Sep 17 00:00:00 2001 From: lingjhf Date: Mon, 12 Oct 2026 03:21:41 +0800 Subject: [PATCH 12/14] fix(ci): normalize trusted release attachment URLs --- tool/gitea/prepare_dependencies.py | 7 ++----- tool/gitea/test_prepare_dependencies.py | 14 +++++++++++++- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/tool/gitea/prepare_dependencies.py b/tool/gitea/prepare_dependencies.py index a05f621..377f99e 100644 --- a/tool/gitea/prepare_dependencies.py +++ b/tool/gitea/prepare_dependencies.py @@ -13,7 +13,7 @@ import tempfile import zipfile from read_dependencies import ROOT, validate_pins -from release_transport import SERVER, request +from release_transport import SERVER, attachment_url, request def verify_archive(data, pins): @@ -94,10 +94,7 @@ def release_archive(pins): assets = [asset for asset in release['assets'] if asset['name'] == core['artifact']['file']] if len(assets) != 1: raise ValueError('Expected exactly one Core release source archive.') - url = assets[0]['browser_download_url'] - if not url.startswith(SERVER + '/'): - raise ValueError('Unexpected Core release download origin.') - return request(url) + return request(attachment_url(assets[0])) def prepare(pins, root=ROOT): diff --git a/tool/gitea/test_prepare_dependencies.py b/tool/gitea/test_prepare_dependencies.py index a5d5df0..ccdc178 100644 --- a/tool/gitea/test_prepare_dependencies.py +++ b/tool/gitea/test_prepare_dependencies.py @@ -8,10 +8,22 @@ from unittest.mock import patch import unittest import zipfile -from prepare_dependencies import extract_archive, prepare, verify_archive +from prepare_dependencies import extract_archive, prepare, release_archive, verify_archive class CoreSourceDependencyTests(unittest.TestCase): + def test_local_gitea_response_links_use_verified_public_origin(self): + _, pins = self.bundle() + asset = {'name': pins['core']['artifact']['file'], + 'browser_download_url': 'http://git.orangraph.com/lingjhf/cutdex_core/releases/download/v0.0.1/cutdex-core-0.0.1.zip'} + release = {'tag_name': 'v0.0.1', 'draft': False, 'prerelease': False, 'assets': [asset]} + with patch('prepare_dependencies.request', side_effect=[release, b'archive']) as send: + self.assertEqual(release_archive(pins), b'archive') + self.assertEqual(send.call_args.args[0], asset['browser_download_url'].replace('http:', 'https:')) + asset['browser_download_url'] = 'https://untrusted.example/archive.zip' + with patch('prepare_dependencies.request', return_value=release), self.assertRaises(ValueError): + release_archive(pins) + def bundle(self, extra=None): prefix = 'cutdex-core-0.0.1/' native = {'version': '0.0.1', 'source_commit': 'b' * 40, 'path': 'native_flutter', -- 2.54.0 From 1eee8007e3618ffa709a6f6968acf5bb4b6b5bf2 Mon Sep 17 00:00:00 2001 From: lingjhf Date: Mon, 12 Oct 2026 03:36:29 +0800 Subject: [PATCH 13/14] fix(packaging): audit the renamed native Flutter plugin --- tool/windows/check_windows_release.py | 2 +- tool/windows/test_check_windows_release.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tool/windows/check_windows_release.py b/tool/windows/check_windows_release.py index f53c01a..a4be476 100644 --- a/tool/windows/check_windows_release.py +++ b/tool/windows/check_windows_release.py @@ -19,7 +19,7 @@ ws2_32 ucrtbase version '''.split()) SYSTEM_DLLS = {name + '.dll' for name in SYSTEM_DLLS} REQUIRED = ( - 'cutdex.exe', 'flutter_windows.dll', 'cutdex_runtime_plugin.dll', + 'cutdex.exe', 'flutter_windows.dll', 'cutdex_native_flutter_plugin.dll', 'deskup_plugin.dll', 'velopack_libc.dll', 'cutdex_windows_ffi.dll', 'sqlite3.dll', 'data/app.so', 'data/icudtl.dat', 'processing/bin/cutdex-processing-worker.exe', diff --git a/tool/windows/test_check_windows_release.py b/tool/windows/test_check_windows_release.py index 40a4d28..4d6bb15 100644 --- a/tool/windows/test_check_windows_release.py +++ b/tool/windows/test_check_windows_release.py @@ -37,6 +37,12 @@ class DependencyGateTest(unittest.TestCase): with self.assertRaisesRegex(ValueError, 'data/app.so'): audit(self.root, lambda p: []) + def test_native_flutter_plugin_is_required_after_migration(self): + (self.root / 'cutdex_native_flutter_plugin.dll').unlink() + (self.root / 'cutdex_runtime_plugin.dll').touch() + with self.assertRaisesRegex(ValueError, 'cutdex_native_flutter_plugin.dll'): + audit(self.root, lambda p: [], require_processing=False) + def test_jvm_is_not_assumed_to_be_a_system_dependency(self): with self.assertRaisesRegex(ValueError, 'jvm.dll'): audit(self.root, lambda p: ['jvm.dll'] if p.name == 'cutdex.exe' else []) -- 2.54.0 From d81c4b19d75ebdaf7fb349856dfaccf38ad26ef0 Mon Sep 17 00:00:00 2001 From: lingjhf Date: Mon, 12 Oct 2026 03:47:46 +0800 Subject: [PATCH 14/14] test(chat): await request events and settle file operations --- test/chat_controller_test.dart | 160 +++++++++++++++++++++++++-------- 1 file changed, 124 insertions(+), 36 deletions(-) diff --git a/test/chat_controller_test.dart b/test/chat_controller_test.dart index 0a2b48c..0f34a98 100644 --- a/test/chat_controller_test.dart +++ b/test/chat_controller_test.dart @@ -22,6 +22,12 @@ import 'package:flutter_test/flutter_test.dart'; class _Model implements ModelAdapter { final requests = []; final streams = >[]; + final _requestWaiters = >{}; + + Future waitForRequests(int count) { + if (requests.length >= count) return Future.value(); + return _requestWaiters.putIfAbsent(count, Completer.new).future; + } @override Stream stream( @@ -31,6 +37,9 @@ class _Model implements ModelAdapter { requests.add(request); final stream = StreamController(); streams.add(stream); + for (final count in _requestWaiters.keys.toList()) { + if (requests.length >= count) _requestWaiters.remove(count)!.complete(); + } unawaited(cancellation.whenCancelled.then((_) => stream.close())); return stream.stream; } @@ -82,12 +91,46 @@ class _DelayedRestoreConversation extends AgentConversationService { } } -Future _until(bool Function() check) async { - for (var attempt = 0; attempt < 1000; attempt++) { - if (check()) return; - await Future.delayed(const Duration(milliseconds: 1)); +Future _waitForRequests( + ProviderContainer container, + ChatControllerProvider provider, + _Model model, + int count, +) async { + if (model.requests.length >= count) return; + final settled = Completer(); + void onState(ChatState state) { + if (!state.busy && model.requests.length < count && !settled.isCompleted) { + settled.completeError( + TestFailure('Send settled before model request $count: ${state.error}'), + ); + } + } + + final subscription = container.listen(provider, (_, state) => onState(state)); + onState(container.read(provider)); + try { + await Future.any([model.waitForRequests(count), settled.future]); + } finally { + subscription.close(); + } +} + +Future _waitForState( + ProviderContainer container, + ChatControllerProvider provider, + bool Function(ChatState) check, +) async { + if (check(container.read(provider))) return; + final ready = Completer(); + final subscription = container.listen(provider, (_, state) { + if (check(state) && !ready.isCompleted) ready.complete(); + }); + try { + await ready.future; + } finally { + subscription.close(); } - fail('Expected state was not reached'); } void main() { @@ -95,6 +138,7 @@ void main() { late Directory conversationsRoot; late ConversationRepository conversationRepository; late ProviderContainer container; + late AgentConversationRegistry registry; setUp(() async { model = _Model(); conversationsRoot = await Directory.systemTemp.createTemp('chat-test-'); @@ -131,8 +175,11 @@ void main() { ), ], ); + registry = container.read(agentConversationRegistryProvider); }); tearDown(() async { + // Disposal initiates cancellation, but files remain open until the run settles. + await registry.cancelAll(); container.dispose(); await conversationsRoot.delete(recursive: true); }); @@ -391,7 +438,12 @@ void main() { ); await tester.runAsync(() async { await tester.tap(find.byTooltip('发送消息')); - await _until(() => model.requests.isNotEmpty); + await _waitForRequests( + container, + chatControllerProvider('lib'), + model, + 1, + ); }); await tester.pumpAndSettle(); expect(model.requests.single.messages.single.text, '测试发送'); @@ -461,11 +513,10 @@ void main() { ); await tester.runAsync(() async { model.streams.single.add(const TextDelta('正在生成的内容')); - await _until( - () => container - .read(chatControllerProvider('lib')) - .partialResponse - .isNotEmpty, + await _waitForState( + container, + chatControllerProvider('lib'), + (state) => state.partialResponse.isNotEmpty, ); }); await tester.pumpAndSettle(); @@ -473,7 +524,11 @@ void main() { await tester.runAsync(() async { await tester.tap(find.byTooltip('停止回复')); await container.read(chatControllerProvider('lib').notifier).stop(); - await _until(() => !container.read(chatControllerProvider('lib')).busy); + await _waitForState( + container, + chatControllerProvider('lib'), + (state) => !state.busy, + ); }); await tester.pumpAndSettle(); expect(find.text('回复已中断'), findsOneWidget); @@ -514,7 +569,11 @@ void main() { addTearDown(subscription.close); await tester.pump(); await tester.runAsync( - () => _until(() => isolated.read(provider).messages.length == 2), + () => _waitForState( + isolated, + provider, + (state) => state.messages.length == 2, + ), ); final controller = isolated.read(provider.notifier); expect(isolated.read(provider).messages.last.elapsedMs, 23000); @@ -621,7 +680,12 @@ void main() { await tester.pump(); await tester.runAsync(() async { await tester.tap(find.byTooltip('发送消息')); - await _until(() => model.streams.isNotEmpty); + await _waitForRequests( + container, + chatControllerProvider('project'), + model, + 1, + ); }); await tester.pump(); expect(find.byKey(const Key('test-project-selector')), findsNothing); @@ -629,8 +693,10 @@ void main() { await tester.runAsync(() async { model.streams.single.add(ModelResponse(text: '已经开始')); await model.streams.single.close(); - await _until( - () => !container.read(chatControllerProvider('project')).busy, + await _waitForState( + container, + chatControllerProvider('project'), + (state) => !state.busy, ); }); await tester.pumpAndSettle(); @@ -697,7 +763,12 @@ void main() { ); await tester.runAsync(() async { await tester.sendKeyEvent(LogicalKeyboardKey.enter); - await _until(() => model.requests.isNotEmpty); + await _waitForRequests( + container, + chatControllerProvider('lib'), + model, + 1, + ); }); await tester.pumpAndSettle(); expect( @@ -709,7 +780,11 @@ void main() { await tester.runAsync(() async { model.streams.single.add(ModelResponse(text: 'ok')); await model.streams.single.close(); - await _until(() => !container.read(chatControllerProvider('lib')).busy); + await _waitForState( + container, + chatControllerProvider('lib'), + (state) => !state.busy, + ); }); await tester.pumpAndSettle(); expect(tester.takeException(), isNull); @@ -725,11 +800,15 @@ void main() { addTearDown(subscription.close); final controller = container.read(provider.notifier); final sending = controller.send('你好', timelineId: 'first'); - await _until(() => model.streams.isNotEmpty); + await _waitForRequests(container, provider, model, 1); await controller.send('重复', timelineId: 'first'); expect(model.requests, hasLength(1)); model.streams[0].add(const TextDelta('你好呀')); - await _until(() => container.read(provider).partialResponse == '你好呀'); + await _waitForState( + container, + provider, + (state) => state.partialResponse == '你好呀', + ); expect(container.read(provider).busy, isTrue); model.streams[0].add(ModelResponse(text: '你好呀!')); await model.streams[0].close(); @@ -738,7 +817,7 @@ void main() { expect(container.read(provider).partialResponse, isEmpty); final second = controller.send('接着说', timelineId: 'second'); - await _until(() => model.requests.length == 2); + await _waitForRequests(container, provider, model, 2); expect(model.requests[1].messages.map((m) => m.text), [ '你好', '你好呀!', @@ -758,7 +837,7 @@ void main() { final other = container .read(otherProvider.notifier) .send('新会话', timelineId: 'timeline'); - await _until(() => model.requests.length == 3); + await _waitForRequests(container, otherProvider, model, 3); expect(model.requests.last.messages.map((m) => m.text), ['新会话']); model.streams[2].add(ModelResponse(text: '新回答')); await model.streams[2].close(); @@ -773,16 +852,20 @@ void main() { addTearDown(subscription.close); final controller = container.read(provider.notifier); final sending = controller.send('开始', timelineId: 'timeline'); - await _until(() => model.streams.isNotEmpty); + await _waitForRequests(container, provider, model, 1); model.streams[0].add(const TextDelta('部分回复')); - await _until(() => container.read(provider).partialResponse.isNotEmpty); + await _waitForState( + container, + provider, + (state) => state.partialResponse.isNotEmpty, + ); controller.stop(); await sending; expect(container.read(provider).busy, isFalse); expect(container.read(provider).messages.last.text, '部分回复'); expect(container.read(provider).messages.last.interrupted, isTrue); final next = controller.send('再来', timelineId: 'timeline'); - await _until(() => model.streams.length == 2); + await _waitForRequests(container, provider, model, 2); model.streams[1].add(ModelResponse(text: '完成')); await model.streams[1].close(); await next; @@ -805,14 +888,14 @@ void main() { final first = container .read(firstProvider.notifier) .send('第一条', timelineId: 'timeline'); - await _until(() => model.streams.length == 1); + await _waitForRequests(container, firstProvider, model, 1); model.streams[0].add(ModelResponse(text: '第一答')); await model.streams[0].close(); await first; final second = container .read(secondProvider.notifier) .send('第二条', timelineId: 'timeline'); - await _until(() => model.streams.length == 2); + await _waitForRequests(container, secondProvider, model, 2); expect(model.requests[1].messages.map((message) => message.text), ['第二条']); model.streams[1].add(ModelResponse(text: '第二答')); await model.streams[1].close(); @@ -835,7 +918,7 @@ void main() { final first = container .read(provider.notifier) .send('保留这段对话', timelineId: 'timeline'); - await _until(() => model.streams.isNotEmpty); + await _waitForRequests(container, provider, model, 1); model.streams.single.add(ModelResponse(text: '已经保存')); await model.streams.single.close(); await first; @@ -877,13 +960,18 @@ void main() { ), ], ); + registry = container.read(agentConversationRegistryProvider); final restoredProvider = chatControllerProvider( 'project', conversationId: conversationId, ); subscription = container.listen(restoredProvider, (_, _) {}); addTearDown(subscription.close); - await _until(() => container.read(restoredProvider).messages.length == 2); + await _waitForState( + container, + restoredProvider, + (state) => state.messages.length == 2, + ); expect( container .read(restoredProvider) @@ -895,7 +983,7 @@ void main() { final continued = container .read(restoredProvider.notifier) .send('继续', timelineId: 'timeline'); - await _until(() => model.requests.length == 2); + await _waitForRequests(container, restoredProvider, model, 2); expect(model.requests.last.messages.map((message) => message.text), [ '保留这段对话', '已经保存', @@ -949,7 +1037,7 @@ void main() { final first = switchingContainer .read(provider.notifier) .send('旧会话', timelineId: 'timeline'); - await _until(() => firstModel.streams.isNotEmpty); + await _waitForRequests(switchingContainer, provider, firstModel, 1); firstModel.streams.single.add(ModelResponse(text: '旧回答')); await firstModel.streams.single.close(); await first; @@ -964,7 +1052,7 @@ void main() { final second = switchingContainer .read(provider.notifier) .send('继续会话', timelineId: 'timeline'); - await _until(() => firstModel.streams.length == 2); + await _waitForRequests(switchingContainer, provider, firstModel, 2); expect(firstModel.requests.last.messages.map((message) => message.text), [ '旧会话', '旧回答', @@ -1004,7 +1092,7 @@ void main() { final sending = container .read(provider.notifier) .send('hello', timelineId: 'timeline'); - await _until(() => model.streams.isNotEmpty); + await _waitForRequests(container, provider, model, 1); model.streams.single.addError(entry.key); await model.streams.single.close(); await sending; @@ -1018,7 +1106,7 @@ void main() { addTearDown(subscription.close); final controller = container.read(provider.notifier); final sending = controller.send('开始', timelineId: 'timeline'); - await _until(() => model.streams.isNotEmpty); + await _waitForRequests(container, provider, model, 1); model.streams[0].addError(StateError('sensitive remote payload')); await model.streams[0].close(); await sending; @@ -1032,7 +1120,7 @@ void main() { ['开始'], ); final next = controller.send('重试', timelineId: 'timeline'); - await _until(() => model.streams.length == 2); + await _waitForRequests(container, provider, model, 2); model.streams[1].add(ModelResponse(text: '成功')); await model.streams[1].close(); await next; @@ -1048,7 +1136,7 @@ void main() { await early; expect(container.read(provider).busy, isFalse); final later = controller.send('再次开始', timelineId: 'timeline'); - await _until(() => model.streams.isNotEmpty); + await _waitForRequests(container, provider, model, 1); subscription.close(); container.dispose(); await later; -- 2.54.0