zkit-ui 2.0.5 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/android/src/main/java/cn/fontree/zkit/ui/preview/{GalleryLayoutSupport.java → NativeImagePreviewLayoutSupport.java} +12 -12
- package/android/src/main/java/cn/fontree/zkit/ui/preview/{GalleryMediaItem.java → NativeImagePreviewMediaItem.java} +2 -2
- package/android/src/main/java/cn/fontree/zkit/ui/preview/NativeImagePreviewModule.kt +43 -0
- package/android/src/main/java/cn/fontree/zkit/ui/preview/{GalleryPagerAdapter.java → NativeImagePreviewPagerAdapter.java} +18 -18
- package/android/src/main/java/cn/fontree/zkit/ui/preview/{GallerySharedElementGeometry.java → NativeImagePreviewSharedElementGeometry.java} +2 -2
- package/android/src/main/java/cn/fontree/zkit/ui/preview/NativeImagePreviewSharedElementNames.java +39 -0
- package/android/src/main/java/cn/fontree/zkit/ui/preview/{GallerySharedElementState.java → NativeImagePreviewSharedElementState.java} +4 -4
- package/android/src/main/java/cn/fontree/zkit/ui/preview/{GallerySourceViewRegistry.java → NativeImagePreviewSourceViewRegistry.java} +2 -2
- package/android/src/main/java/cn/fontree/zkit/ui/preview/{GalleryTransitionSnapshotView.java → NativeImagePreviewTransitionSnapshotView.java} +3 -3
- package/android/src/main/java/cn/fontree/zkit/ui/preview/{GalleryVideoPlayerView.java → NativeImagePreviewVideoPlayerView.java} +7 -7
- package/android/src/main/java/cn/fontree/zkit/ui/preview/{GaleriaView.kt → NativeImagePreviewView.kt} +18 -18
- package/android/src/main/java/cn/fontree/zkit/ui/preview/{GalleryViewerOverlayView.java → NativeImagePreviewViewerOverlayView.java} +49 -49
- package/android/src/main/java/cn/fontree/zkit/ui/preview/{GalleryViewerPageView.java → NativeImagePreviewViewerPageView.java} +27 -27
- package/android/src/main/java/cn/fontree/zkit/ui/preview/{GalleryViewerTransitionController.java → NativeImagePreviewViewerTransitionController.java} +22 -22
- package/dist/ui/Button/index.d.ts +1 -1
- package/dist/ui/Button/index.d.ts.map +1 -1
- package/dist/ui/Button/index.js +18 -3
- package/dist/ui/NativeImagePreview/NativeImagePreview.js +6 -6
- package/dist/ui/NativeImagePreview/NativeImagePreview.web.d.ts +1 -0
- package/dist/ui/NativeImagePreview/NativeImagePreview.web.d.ts.map +1 -1
- package/dist/ui/NativeImagePreview/NativeImagePreview.web.js +105 -11
- package/dist/ui/NativeImagePreview/context.d.ts +1 -1
- package/dist/ui/NativeImagePreview/context.d.ts.map +1 -1
- package/dist/ui/NativeImagePreview/types.d.ts +3 -1
- package/dist/ui/NativeImagePreview/types.d.ts.map +1 -1
- package/dist/ui/NativeImagePreview/utils.d.ts.map +1 -1
- package/dist/ui/NativeImagePreview/utils.js +1 -0
- package/dist/ui/NativeImagePreview/web/geometry.d.ts +20 -0
- package/dist/ui/NativeImagePreview/web/geometry.d.ts.map +1 -0
- package/dist/ui/NativeImagePreview/web/geometry.js +121 -0
- package/dist/ui/NativeImagePreview/web/media.d.ts +6 -0
- package/dist/ui/NativeImagePreview/web/media.d.ts.map +1 -0
- package/dist/ui/NativeImagePreview/web/media.js +90 -0
- package/dist/ui/NativeImagePreview/web/styles.css +137 -0
- package/dist/ui/NativeImagePreview/web/transition.d.ts +15 -0
- package/dist/ui/NativeImagePreview/web/transition.d.ts.map +1 -0
- package/dist/ui/NativeImagePreview/web/transition.js +77 -0
- package/dist/ui/NativeImagePreview/web/types.d.ts +74 -0
- package/dist/ui/NativeImagePreview/web/types.d.ts.map +1 -0
- package/dist/ui/NativeImagePreview/web/types.js +3 -0
- package/dist/ui/NativeImagePreview/web/viewer.d.ts +104 -0
- package/dist/ui/NativeImagePreview/web/viewer.d.ts.map +1 -0
- package/dist/ui/NativeImagePreview/web/viewer.js +894 -0
- package/expo-module.config.json +2 -2
- package/ios/{GalleryViewer/GaleriaImageLoader.swift → NativeImagePreview/NativeImagePreviewImageLoader.swift} +7 -7
- package/ios/NativeImagePreview/NativeImagePreviewImageViewInteraction.swift +245 -0
- package/ios/{GalleryViewer/GaleriaLayoutSupport.swift → NativeImagePreview/NativeImagePreviewLayoutSupport.swift} +19 -19
- package/ios/NativeImagePreview/NativeImagePreviewMedia.swift +28 -0
- package/ios/NativeImagePreview/NativeImagePreviewSourceViewRegistry.swift +80 -0
- package/ios/{GalleryViewer/GaleriaVideoPlayerView.swift → NativeImagePreview/NativeImagePreviewVideoPlayerView.swift} +1 -1
- package/ios/{GalleryViewer/GaleriaViewerConfiguration.swift → NativeImagePreview/NativeImagePreviewViewerConfiguration.swift} +7 -7
- package/ios/{GalleryViewer/GaleriaViewerController.swift → NativeImagePreview/NativeImagePreviewViewerController.swift} +36 -36
- package/ios/{GalleryViewer/GaleriaViewerPageView.swift → NativeImagePreview/NativeImagePreviewViewerPageView.swift} +33 -33
- package/ios/{GalleryViewer/GaleriaViewerTransitionCoordinator.swift → NativeImagePreview/NativeImagePreviewViewerTransitionCoordinator.swift} +16 -16
- package/ios/{GaleriaModule.swift → NativeImagePreviewModule.swift} +4 -4
- package/ios/{GaleriaView.swift → NativeImagePreviewView.swift} +26 -27
- package/package.json +18 -12
- package/src/services/ImagePreviewService/README.md +1 -1
- package/src/types.d.ts +1 -0
- package/src/ui/Button/README.md +1 -1
- package/src/ui/Button/index.tsx +27 -7
- package/src/ui/NativeImagePreview/NativeImagePreview.tsx +7 -7
- package/src/ui/NativeImagePreview/NativeImagePreview.web.tsx +175 -11
- package/src/ui/NativeImagePreview/README.md +3 -3
- package/src/ui/NativeImagePreview/context.tsx +1 -1
- package/src/ui/NativeImagePreview/types.ts +3 -1
- package/src/ui/NativeImagePreview/utils.ts +1 -0
- package/src/ui/NativeImagePreview/web/geometry.ts +134 -0
- package/src/ui/NativeImagePreview/web/media.ts +91 -0
- package/src/ui/NativeImagePreview/web/styles.css +137 -0
- package/src/ui/NativeImagePreview/web/transition.ts +111 -0
- package/src/ui/NativeImagePreview/web/types.ts +88 -0
- package/src/ui/NativeImagePreview/web/viewer.ts +1024 -0
- package/android/src/main/java/cn/fontree/zkit/ui/preview/GaleriaModule.kt +0 -43
- package/android/src/main/java/cn/fontree/zkit/ui/preview/GallerySharedElementNames.java +0 -39
- package/ios/GalleryViewer/GaleriaImageViewInteraction.swift +0 -245
- package/ios/GalleryViewer/GaleriaMedia.swift +0 -28
- package/ios/GalleryViewer/GaleriaSourceViewRegistry.swift +0 -80
- /package/android/src/main/res/layout/{galeria_player_view.xml → native_image_preview_player_view.xml} +0 -0
|
@@ -20,16 +20,16 @@ import androidx.viewpager2.widget.ViewPager2;
|
|
|
20
20
|
import java.util.ArrayList;
|
|
21
21
|
import java.util.List;
|
|
22
22
|
|
|
23
|
-
public final class
|
|
23
|
+
public final class NativeImagePreviewViewerOverlayView extends FrameLayout implements NativeImagePreviewViewerPageView.Listener {
|
|
24
24
|
public interface Listener {
|
|
25
25
|
void onOverlayDismissed();
|
|
26
26
|
|
|
27
27
|
void onOverlayIndexChange(int index);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
private final List<
|
|
30
|
+
private final List<NativeImagePreviewMediaItem> items;
|
|
31
31
|
@Nullable
|
|
32
|
-
private final String
|
|
32
|
+
private final String previewGroupId;
|
|
33
33
|
@Nullable
|
|
34
34
|
private final Listener listener;
|
|
35
35
|
private final boolean lightTheme;
|
|
@@ -39,8 +39,8 @@ public final class GalleryViewerOverlayView extends FrameLayout implements Galle
|
|
|
39
39
|
private View backgroundView;
|
|
40
40
|
private FrameLayout contentView;
|
|
41
41
|
private ViewPager2 viewPager;
|
|
42
|
-
private
|
|
43
|
-
private
|
|
42
|
+
private NativeImagePreviewPagerAdapter pagerAdapter;
|
|
43
|
+
private NativeImagePreviewViewerTransitionController transitionController;
|
|
44
44
|
private int currentIndex;
|
|
45
45
|
private float downX;
|
|
46
46
|
private float downY;
|
|
@@ -54,7 +54,7 @@ public final class GalleryViewerOverlayView extends FrameLayout implements Galle
|
|
|
54
54
|
@Nullable
|
|
55
55
|
private View dragTarget;
|
|
56
56
|
@Nullable
|
|
57
|
-
private
|
|
57
|
+
private NativeImagePreviewViewerPageView dragPageView;
|
|
58
58
|
@Nullable
|
|
59
59
|
private ImageView hiddenActiveSourceView;
|
|
60
60
|
private float hiddenActiveSourcePreviousAlpha = 1f;
|
|
@@ -69,7 +69,7 @@ public final class GalleryViewerOverlayView extends FrameLayout implements Galle
|
|
|
69
69
|
if (openingTransitionStarted || closing || finished) {
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
72
|
-
|
|
72
|
+
NativeImagePreviewViewerPageView pageView = resolveCurrentPageView();
|
|
73
73
|
if (pageView == null || getWidth() <= 0 || getHeight() <= 0) {
|
|
74
74
|
postOnAnimation(this);
|
|
75
75
|
return;
|
|
@@ -78,19 +78,19 @@ public final class GalleryViewerOverlayView extends FrameLayout implements Galle
|
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
80
|
|
|
81
|
-
public
|
|
81
|
+
public NativeImagePreviewViewerOverlayView(
|
|
82
82
|
@NonNull Context context,
|
|
83
|
-
@NonNull List<
|
|
83
|
+
@NonNull List<NativeImagePreviewMediaItem> sourceItems,
|
|
84
84
|
int startIndex,
|
|
85
85
|
boolean lightTheme,
|
|
86
|
-
@Nullable String
|
|
86
|
+
@Nullable String previewGroupId,
|
|
87
87
|
@Nullable Listener listener
|
|
88
88
|
) {
|
|
89
89
|
super(context);
|
|
90
90
|
this.items = new ArrayList<>(sourceItems);
|
|
91
91
|
this.currentIndex = Math.max(0, Math.min(startIndex, items.size() - 1));
|
|
92
92
|
this.lightTheme = lightTheme;
|
|
93
|
-
this.
|
|
93
|
+
this.previewGroupId = previewGroupId;
|
|
94
94
|
this.listener = listener;
|
|
95
95
|
ViewConfiguration viewConfiguration = ViewConfiguration.get(context);
|
|
96
96
|
touchSlop = viewConfiguration.getScaledTouchSlop();
|
|
@@ -187,7 +187,7 @@ public final class GalleryViewerOverlayView extends FrameLayout implements Galle
|
|
|
187
187
|
if (!dragging) {
|
|
188
188
|
float dx = event.getRawX() - downX;
|
|
189
189
|
float dy = event.getRawY() - downY;
|
|
190
|
-
|
|
190
|
+
NativeImagePreviewViewerPageView pageView = resolveCurrentPageView();
|
|
191
191
|
if (pageView != null
|
|
192
192
|
&& Math.abs(dy) > touchSlop
|
|
193
193
|
&& pageView.canBeginVerticalDismiss(dx, dy, event.getRawX(), event.getRawY())) {
|
|
@@ -244,14 +244,14 @@ public final class GalleryViewerOverlayView extends FrameLayout implements Galle
|
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
@Override
|
|
247
|
-
public void onDismissRequested(@NonNull
|
|
247
|
+
public void onDismissRequested(@NonNull NativeImagePreviewViewerPageView pageView) {
|
|
248
248
|
if (pageView == resolveCurrentPageView()) {
|
|
249
249
|
closeViewer();
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
|
|
253
253
|
@Override
|
|
254
|
-
public void onVideoCloseRequested(@NonNull
|
|
254
|
+
public void onVideoCloseRequested(@NonNull NativeImagePreviewViewerPageView pageView) {
|
|
255
255
|
if (pageView == resolveCurrentPageView()) {
|
|
256
256
|
closeViewer();
|
|
257
257
|
}
|
|
@@ -281,7 +281,7 @@ public final class GalleryViewerOverlayView extends FrameLayout implements Galle
|
|
|
281
281
|
));
|
|
282
282
|
viewPager.setOffscreenPageLimit(1);
|
|
283
283
|
viewPager.setUserInputEnabled(false);
|
|
284
|
-
pagerAdapter = new
|
|
284
|
+
pagerAdapter = new NativeImagePreviewPagerAdapter(this, this::applySourcePlaceholderIfNeeded);
|
|
285
285
|
viewPager.setAdapter(pagerAdapter);
|
|
286
286
|
pagerAdapter.setItems(items);
|
|
287
287
|
viewPager.setCurrentItem(currentIndex, false);
|
|
@@ -302,31 +302,31 @@ public final class GalleryViewerOverlayView extends FrameLayout implements Galle
|
|
|
302
302
|
contentView.addView(viewPager);
|
|
303
303
|
addView(contentView);
|
|
304
304
|
|
|
305
|
-
transitionController = new
|
|
305
|
+
transitionController = new NativeImagePreviewViewerTransitionController(this, backgroundView, contentView);
|
|
306
306
|
}
|
|
307
307
|
|
|
308
308
|
private void startOpenTransition(
|
|
309
|
-
@NonNull
|
|
310
|
-
@Nullable
|
|
309
|
+
@NonNull NativeImagePreviewViewerPageView pageView,
|
|
310
|
+
@Nullable NativeImagePreviewSharedElementState resolvedPageState
|
|
311
311
|
) {
|
|
312
312
|
if (openingTransitionStarted) {
|
|
313
313
|
return;
|
|
314
314
|
}
|
|
315
315
|
openingTransitionStarted = true;
|
|
316
|
-
|
|
317
|
-
String anchorKey =
|
|
318
|
-
ImageView sourceView =
|
|
319
|
-
|
|
316
|
+
NativeImagePreviewMediaItem item = items.get(currentIndex);
|
|
317
|
+
String anchorKey = NativeImagePreviewSharedElementNames.forItem(previewGroupId, item);
|
|
318
|
+
ImageView sourceView = NativeImagePreviewSourceViewRegistry.find(anchorKey);
|
|
319
|
+
NativeImagePreviewSharedElementState sourceState = NativeImagePreviewLayoutSupport.captureImageViewState(sourceView);
|
|
320
320
|
applySourcePlaceholderIfNeeded(pageView, currentIndex);
|
|
321
321
|
pageView.prepareForOpenTransition();
|
|
322
322
|
pageView.setMediaHidden(true);
|
|
323
323
|
|
|
324
324
|
Drawable fallbackDrawable = sourceState != null ? sourceState.getDrawable() : null;
|
|
325
|
-
RectF overlayBounds =
|
|
326
|
-
|
|
325
|
+
RectF overlayBounds = NativeImagePreviewLayoutSupport.viewBoundsOnScreen(this);
|
|
326
|
+
NativeImagePreviewSharedElementState effectivePageState = usableSharedElementState(resolvedPageState)
|
|
327
327
|
? resolvedPageState
|
|
328
328
|
: pageView.sharedElementState();
|
|
329
|
-
|
|
329
|
+
NativeImagePreviewSharedElementGeometry targetGeometry = usableSharedElementState(effectivePageState)
|
|
330
330
|
? effectivePageState.getGeometry()
|
|
331
331
|
: defaultOpenGeometryFromSource(sourceState, overlayBounds, pageView, fallbackDrawable);
|
|
332
332
|
|
|
@@ -338,7 +338,7 @@ public final class GalleryViewerOverlayView extends FrameLayout implements Galle
|
|
|
338
338
|
);
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
-
private void finishOpenTransition(@NonNull
|
|
341
|
+
private void finishOpenTransition(@NonNull NativeImagePreviewViewerPageView pageView) {
|
|
342
342
|
if (contentPresented) {
|
|
343
343
|
return;
|
|
344
344
|
}
|
|
@@ -365,23 +365,23 @@ public final class GalleryViewerOverlayView extends FrameLayout implements Galle
|
|
|
365
365
|
viewPager.requestDisallowInterceptTouchEvent(false);
|
|
366
366
|
releaseVelocityTracker();
|
|
367
367
|
|
|
368
|
-
|
|
368
|
+
NativeImagePreviewViewerPageView pageView = resolveCurrentPageView();
|
|
369
369
|
if (pageView == null) {
|
|
370
370
|
finishWithoutAnimation();
|
|
371
371
|
return;
|
|
372
372
|
}
|
|
373
373
|
|
|
374
374
|
pageView.prepareForReturnTransition();
|
|
375
|
-
|
|
375
|
+
NativeImagePreviewSharedElementState pageState = pageView.sharedElementState();
|
|
376
376
|
pageView.setMediaHidden(true);
|
|
377
377
|
|
|
378
|
-
|
|
379
|
-
String anchorKey =
|
|
380
|
-
ImageView targetView =
|
|
381
|
-
|
|
382
|
-
|
|
378
|
+
NativeImagePreviewMediaItem item = items.get(currentIndex);
|
|
379
|
+
String anchorKey = NativeImagePreviewSharedElementNames.forItem(previewGroupId, item);
|
|
380
|
+
ImageView targetView = NativeImagePreviewSourceViewRegistry.find(anchorKey);
|
|
381
|
+
NativeImagePreviewSharedElementState targetState = NativeImagePreviewLayoutSupport.captureImageViewState(targetView);
|
|
382
|
+
NativeImagePreviewSharedElementGeometry targetGeometry = targetState != null
|
|
383
383
|
? targetState.getGeometry()
|
|
384
|
-
:
|
|
384
|
+
: NativeImagePreviewLayoutSupport.captureImageViewGeometry(
|
|
385
385
|
targetView,
|
|
386
386
|
pageState != null ? pageState.getDrawable() : null
|
|
387
387
|
);
|
|
@@ -398,8 +398,8 @@ public final class GalleryViewerOverlayView extends FrameLayout implements Galle
|
|
|
398
398
|
}
|
|
399
399
|
|
|
400
400
|
@Nullable
|
|
401
|
-
private
|
|
402
|
-
|
|
401
|
+
private NativeImagePreviewViewerPageView resolveCurrentPageView() {
|
|
402
|
+
NativeImagePreviewViewerPageView pageView = pagerAdapter.findAttachedView(currentIndex);
|
|
403
403
|
if (pageView != null) {
|
|
404
404
|
return pageView;
|
|
405
405
|
}
|
|
@@ -407,16 +407,16 @@ public final class GalleryViewerOverlayView extends FrameLayout implements Galle
|
|
|
407
407
|
}
|
|
408
408
|
|
|
409
409
|
@NonNull
|
|
410
|
-
private
|
|
411
|
-
@Nullable
|
|
410
|
+
private NativeImagePreviewSharedElementGeometry defaultOpenGeometryFromSource(
|
|
411
|
+
@Nullable NativeImagePreviewSharedElementState sourceState,
|
|
412
412
|
@NonNull RectF overlayBounds,
|
|
413
|
-
@NonNull
|
|
413
|
+
@NonNull NativeImagePreviewViewerPageView pageView,
|
|
414
414
|
@Nullable Drawable fallbackDrawable
|
|
415
415
|
) {
|
|
416
416
|
if (sourceState != null) {
|
|
417
417
|
RectF sourceContent = sourceState.getGeometry().getContentFrameInVisibleBounds();
|
|
418
418
|
if (sourceContent.width() > 1f && sourceContent.height() > 1f) {
|
|
419
|
-
return
|
|
419
|
+
return NativeImagePreviewLayoutSupport.defaultGeometryForAspectRatio(
|
|
420
420
|
sourceContent.width(),
|
|
421
421
|
sourceContent.height(),
|
|
422
422
|
overlayBounds
|
|
@@ -426,7 +426,7 @@ public final class GalleryViewerOverlayView extends FrameLayout implements Galle
|
|
|
426
426
|
return pageView.defaultTransitionGeometry(overlayBounds, fallbackDrawable);
|
|
427
427
|
}
|
|
428
428
|
|
|
429
|
-
private boolean usableSharedElementState(@Nullable
|
|
429
|
+
private boolean usableSharedElementState(@Nullable NativeImagePreviewSharedElementState state) {
|
|
430
430
|
if (state == null) {
|
|
431
431
|
return false;
|
|
432
432
|
}
|
|
@@ -446,7 +446,7 @@ public final class GalleryViewerOverlayView extends FrameLayout implements Galle
|
|
|
446
446
|
currentIndex = Math.max(0, Math.min(pagerIndex, items.size() - 1));
|
|
447
447
|
}
|
|
448
448
|
|
|
449
|
-
private void startDragging(@NonNull
|
|
449
|
+
private void startDragging(@NonNull NativeImagePreviewViewerPageView pageView, float rawY) {
|
|
450
450
|
dragging = true;
|
|
451
451
|
dragPageView = pageView;
|
|
452
452
|
dragPageView.prepareForDismissDrag();
|
|
@@ -493,7 +493,7 @@ public final class GalleryViewerOverlayView extends FrameLayout implements Galle
|
|
|
493
493
|
}
|
|
494
494
|
|
|
495
495
|
private void syncPagerGesturePolicy() {
|
|
496
|
-
|
|
496
|
+
NativeImagePreviewViewerPageView pageView = resolveCurrentPageView();
|
|
497
497
|
boolean canPage = items.size() > 1 && pageView != null && pageView.canPageHorizontally();
|
|
498
498
|
viewPager.setUserInputEnabled(canPage);
|
|
499
499
|
viewPager.requestDisallowInterceptTouchEvent(!canPage);
|
|
@@ -525,7 +525,7 @@ public final class GalleryViewerOverlayView extends FrameLayout implements Galle
|
|
|
525
525
|
|
|
526
526
|
private void animateBackToCenter() {
|
|
527
527
|
View target = getActiveDragTarget();
|
|
528
|
-
|
|
528
|
+
NativeImagePreviewViewerPageView restorePageView = dragPageView;
|
|
529
529
|
dragPageView = null;
|
|
530
530
|
target.animate()
|
|
531
531
|
.translationY(0f)
|
|
@@ -550,17 +550,17 @@ public final class GalleryViewerOverlayView extends FrameLayout implements Galle
|
|
|
550
550
|
if (index < 0 || index >= items.size()) {
|
|
551
551
|
return null;
|
|
552
552
|
}
|
|
553
|
-
|
|
554
|
-
String anchorKey =
|
|
555
|
-
return
|
|
553
|
+
NativeImagePreviewMediaItem item = items.get(index);
|
|
554
|
+
String anchorKey = NativeImagePreviewSharedElementNames.forItem(previewGroupId, item);
|
|
555
|
+
return NativeImagePreviewSourceViewRegistry.find(anchorKey);
|
|
556
556
|
}
|
|
557
557
|
|
|
558
|
-
private void applySourcePlaceholderIfNeeded(@NonNull
|
|
558
|
+
private void applySourcePlaceholderIfNeeded(@NonNull NativeImagePreviewViewerPageView pageView, int index) {
|
|
559
559
|
ImageView sourceView = sourceViewForIndex(index);
|
|
560
560
|
if (sourceView == null) {
|
|
561
561
|
return;
|
|
562
562
|
}
|
|
563
|
-
Drawable sourceDrawable =
|
|
563
|
+
Drawable sourceDrawable = NativeImagePreviewLayoutSupport.transitionDrawableForImageView(sourceView);
|
|
564
564
|
pageView.setImagePlaceholderIfEmpty(sourceDrawable);
|
|
565
565
|
}
|
|
566
566
|
|
|
@@ -23,26 +23,26 @@ import com.bumptech.glide.request.RequestListener;
|
|
|
23
23
|
import com.bumptech.glide.request.target.Target;
|
|
24
24
|
import com.github.chrisbanes.photoview.PhotoView;
|
|
25
25
|
|
|
26
|
-
public final class
|
|
26
|
+
public final class NativeImagePreviewViewerPageView extends FrameLayout {
|
|
27
27
|
public interface Listener {
|
|
28
|
-
void onDismissRequested(@NonNull
|
|
28
|
+
void onDismissRequested(@NonNull NativeImagePreviewViewerPageView pageView);
|
|
29
29
|
|
|
30
|
-
void onVideoCloseRequested(@NonNull
|
|
30
|
+
void onVideoCloseRequested(@NonNull NativeImagePreviewViewerPageView pageView);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
private final FrameLayout mediaContainer;
|
|
34
34
|
private final PhotoView photoView;
|
|
35
|
-
private final
|
|
35
|
+
private final NativeImagePreviewVideoPlayerView videoPlayerView;
|
|
36
36
|
private final FrameLayout loadingContainer;
|
|
37
37
|
private final ObjectAnimator loadingPulseAnimator;
|
|
38
38
|
@Nullable
|
|
39
|
-
private
|
|
39
|
+
private NativeImagePreviewMediaItem item;
|
|
40
40
|
@Nullable
|
|
41
41
|
private Listener listener;
|
|
42
42
|
private boolean active;
|
|
43
43
|
private boolean allowParentInterceptOnImageEdge;
|
|
44
44
|
|
|
45
|
-
public
|
|
45
|
+
public NativeImagePreviewViewerPageView(@NonNull Context context) {
|
|
46
46
|
super(context);
|
|
47
47
|
setLayoutParams(new LayoutParams(
|
|
48
48
|
ViewGroup.LayoutParams.MATCH_PARENT,
|
|
@@ -73,7 +73,7 @@ public final class GalleryViewerPageView extends FrameLayout {
|
|
|
73
73
|
});
|
|
74
74
|
mediaContainer.addView(photoView);
|
|
75
75
|
|
|
76
|
-
videoPlayerView = new
|
|
76
|
+
videoPlayerView = new NativeImagePreviewVideoPlayerView(context);
|
|
77
77
|
videoPlayerView.setVisibility(GONE);
|
|
78
78
|
videoPlayerView.setListener(() -> {
|
|
79
79
|
if (listener != null) {
|
|
@@ -106,9 +106,9 @@ public final class GalleryViewerPageView extends FrameLayout {
|
|
|
106
106
|
this.listener = listener;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
public void bind(@NonNull
|
|
109
|
+
public void bind(@NonNull NativeImagePreviewMediaItem item) {
|
|
110
110
|
this.item = item;
|
|
111
|
-
if (item.getMediaType() ==
|
|
111
|
+
if (item.getMediaType() == NativeImagePreviewMediaItem.MediaType.IMAGE) {
|
|
112
112
|
bindImage(item);
|
|
113
113
|
} else {
|
|
114
114
|
bindVideo(item);
|
|
@@ -117,7 +117,7 @@ public final class GalleryViewerPageView extends FrameLayout {
|
|
|
117
117
|
|
|
118
118
|
public void setActive(boolean active) {
|
|
119
119
|
this.active = active;
|
|
120
|
-
if (item == null || item.getMediaType() !=
|
|
120
|
+
if (item == null || item.getMediaType() != NativeImagePreviewMediaItem.MediaType.VIDEO) {
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
123
|
videoPlayerView.setActive(active);
|
|
@@ -144,7 +144,7 @@ public final class GalleryViewerPageView extends FrameLayout {
|
|
|
144
144
|
if (item == null) {
|
|
145
145
|
return true;
|
|
146
146
|
}
|
|
147
|
-
if (item.getMediaType() ==
|
|
147
|
+
if (item.getMediaType() == NativeImagePreviewMediaItem.MediaType.IMAGE) {
|
|
148
148
|
return photoView.getScale() <= 1.02f;
|
|
149
149
|
}
|
|
150
150
|
return true;
|
|
@@ -162,7 +162,7 @@ public final class GalleryViewerPageView extends FrameLayout {
|
|
|
162
162
|
if (Math.abs(dy) <= Math.abs(dx) * 1.02f) {
|
|
163
163
|
return false;
|
|
164
164
|
}
|
|
165
|
-
if (item.getMediaType() ==
|
|
165
|
+
if (item.getMediaType() == NativeImagePreviewMediaItem.MediaType.IMAGE) {
|
|
166
166
|
return photoView.getScale() <= 1.02f;
|
|
167
167
|
}
|
|
168
168
|
return !videoPlayerView.isTouchOnInteractiveControls(rawX, rawY);
|
|
@@ -172,7 +172,7 @@ public final class GalleryViewerPageView extends FrameLayout {
|
|
|
172
172
|
if (item == null) {
|
|
173
173
|
return;
|
|
174
174
|
}
|
|
175
|
-
if (item.getMediaType() ==
|
|
175
|
+
if (item.getMediaType() == NativeImagePreviewMediaItem.MediaType.IMAGE) {
|
|
176
176
|
photoView.setAlpha(hidden ? 0f : 1f);
|
|
177
177
|
} else {
|
|
178
178
|
videoPlayerView.setMediaHidden(hidden);
|
|
@@ -180,7 +180,7 @@ public final class GalleryViewerPageView extends FrameLayout {
|
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
public void setImagePlaceholderIfEmpty(@Nullable Drawable drawable) {
|
|
183
|
-
if (item == null || item.getMediaType() !=
|
|
183
|
+
if (item == null || item.getMediaType() != NativeImagePreviewMediaItem.MediaType.IMAGE) {
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
186
|
if (drawable == null || photoView.getDrawable() != null) {
|
|
@@ -192,18 +192,18 @@ public final class GalleryViewerPageView extends FrameLayout {
|
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
@Nullable
|
|
195
|
-
public
|
|
195
|
+
public NativeImagePreviewSharedElementState sharedElementState() {
|
|
196
196
|
if (item == null) {
|
|
197
197
|
return null;
|
|
198
198
|
}
|
|
199
|
-
if (item.getMediaType() ==
|
|
200
|
-
return
|
|
199
|
+
if (item.getMediaType() == NativeImagePreviewMediaItem.MediaType.IMAGE) {
|
|
200
|
+
return NativeImagePreviewLayoutSupport.captureImageViewState(photoView);
|
|
201
201
|
}
|
|
202
202
|
return videoPlayerView.sharedElementState();
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
@NonNull
|
|
206
|
-
public
|
|
206
|
+
public NativeImagePreviewSharedElementGeometry defaultTransitionGeometry(@NonNull RectF containerBounds, @Nullable Drawable fallbackDrawable) {
|
|
207
207
|
Drawable drawable = currentDrawable();
|
|
208
208
|
if (drawable == null) {
|
|
209
209
|
drawable = fallbackDrawable;
|
|
@@ -215,16 +215,16 @@ public final class GalleryViewerPageView extends FrameLayout {
|
|
|
215
215
|
float top = containerBounds.top + (containerBounds.height() - fallbackHeight) * 0.5f;
|
|
216
216
|
RectF visibleFrame = new RectF(left, top, left + fallbackWidth, top + fallbackHeight);
|
|
217
217
|
RectF contentFrame = new RectF(0f, 0f, visibleFrame.width(), visibleFrame.height());
|
|
218
|
-
return new
|
|
218
|
+
return new NativeImagePreviewSharedElementGeometry(visibleFrame, contentFrame);
|
|
219
219
|
}
|
|
220
|
-
return
|
|
220
|
+
return NativeImagePreviewLayoutSupport.defaultGeometryFor(drawable, containerBounds);
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
public void prepareForOpenTransition() {
|
|
224
224
|
if (item == null) {
|
|
225
225
|
return;
|
|
226
226
|
}
|
|
227
|
-
if (item.getMediaType() ==
|
|
227
|
+
if (item.getMediaType() == NativeImagePreviewMediaItem.MediaType.IMAGE) {
|
|
228
228
|
photoView.setScale(1f, false);
|
|
229
229
|
photoView.setAllowParentInterceptOnEdge(allowParentInterceptOnImageEdge);
|
|
230
230
|
} else {
|
|
@@ -236,7 +236,7 @@ public final class GalleryViewerPageView extends FrameLayout {
|
|
|
236
236
|
if (item == null) {
|
|
237
237
|
return;
|
|
238
238
|
}
|
|
239
|
-
if (item.getMediaType() ==
|
|
239
|
+
if (item.getMediaType() == NativeImagePreviewMediaItem.MediaType.IMAGE) {
|
|
240
240
|
photoView.setScale(1f, false);
|
|
241
241
|
photoView.setAllowParentInterceptOnEdge(allowParentInterceptOnImageEdge);
|
|
242
242
|
} else {
|
|
@@ -248,7 +248,7 @@ public final class GalleryViewerPageView extends FrameLayout {
|
|
|
248
248
|
if (item == null) {
|
|
249
249
|
return;
|
|
250
250
|
}
|
|
251
|
-
if (item.getMediaType() ==
|
|
251
|
+
if (item.getMediaType() == NativeImagePreviewMediaItem.MediaType.IMAGE) {
|
|
252
252
|
photoView.setScale(1f, false);
|
|
253
253
|
} else {
|
|
254
254
|
videoPlayerView.prepareForReturnTransition();
|
|
@@ -256,13 +256,13 @@ public final class GalleryViewerPageView extends FrameLayout {
|
|
|
256
256
|
}
|
|
257
257
|
|
|
258
258
|
public void restoreAfterDismissCancelled() {
|
|
259
|
-
if (item == null || item.getMediaType() !=
|
|
259
|
+
if (item == null || item.getMediaType() != NativeImagePreviewMediaItem.MediaType.VIDEO) {
|
|
260
260
|
return;
|
|
261
261
|
}
|
|
262
262
|
videoPlayerView.restoreAfterDismissCancelled();
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
-
private void bindImage(@NonNull
|
|
265
|
+
private void bindImage(@NonNull NativeImagePreviewMediaItem item) {
|
|
266
266
|
photoView.setVisibility(VISIBLE);
|
|
267
267
|
videoPlayerView.release();
|
|
268
268
|
videoPlayerView.setVisibility(GONE);
|
|
@@ -313,7 +313,7 @@ public final class GalleryViewerPageView extends FrameLayout {
|
|
|
313
313
|
});
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
private void bindVideo(@NonNull
|
|
316
|
+
private void bindVideo(@NonNull NativeImagePreviewMediaItem item) {
|
|
317
317
|
photoView.setVisibility(GONE);
|
|
318
318
|
Glide.with(photoView).clear(photoView);
|
|
319
319
|
photoView.setImageDrawable(null);
|
|
@@ -328,7 +328,7 @@ public final class GalleryViewerPageView extends FrameLayout {
|
|
|
328
328
|
if (item == null) {
|
|
329
329
|
return null;
|
|
330
330
|
}
|
|
331
|
-
if (item.getMediaType() ==
|
|
331
|
+
if (item.getMediaType() == NativeImagePreviewMediaItem.MediaType.IMAGE) {
|
|
332
332
|
return photoView.getDrawable();
|
|
333
333
|
}
|
|
334
334
|
return videoPlayerView.getPosterDrawable();
|
|
@@ -12,16 +12,16 @@ import android.widget.ImageView;
|
|
|
12
12
|
import androidx.annotation.NonNull;
|
|
13
13
|
import androidx.annotation.Nullable;
|
|
14
14
|
|
|
15
|
-
public final class
|
|
15
|
+
public final class NativeImagePreviewViewerTransitionController {
|
|
16
16
|
private final FrameLayout containerView;
|
|
17
17
|
private final View backgroundView;
|
|
18
18
|
private final View contentView;
|
|
19
19
|
@Nullable
|
|
20
|
-
private
|
|
20
|
+
private NativeImagePreviewTransitionSnapshotView snapshotView;
|
|
21
21
|
@Nullable
|
|
22
22
|
private ImageView hiddenSourceView;
|
|
23
23
|
|
|
24
|
-
public
|
|
24
|
+
public NativeImagePreviewViewerTransitionController(
|
|
25
25
|
@NonNull FrameLayout containerView,
|
|
26
26
|
@NonNull View backgroundView,
|
|
27
27
|
@NonNull View contentView
|
|
@@ -33,8 +33,8 @@ public final class GalleryViewerTransitionController {
|
|
|
33
33
|
|
|
34
34
|
public void performOpenTransition(
|
|
35
35
|
@Nullable ImageView sourceView,
|
|
36
|
-
@Nullable
|
|
37
|
-
@NonNull
|
|
36
|
+
@Nullable NativeImagePreviewSharedElementState sourceState,
|
|
37
|
+
@NonNull NativeImagePreviewSharedElementGeometry targetGeometry,
|
|
38
38
|
@NonNull Runnable completion
|
|
39
39
|
) {
|
|
40
40
|
clearSnapshot();
|
|
@@ -54,9 +54,9 @@ public final class GalleryViewerTransitionController {
|
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
snapshotView = new
|
|
57
|
+
NativeImagePreviewSharedElementGeometry sourceGeometry = frameInContainer(sourceState.getGeometry());
|
|
58
|
+
NativeImagePreviewSharedElementGeometry endGeometry = frameInContainer(targetGeometry);
|
|
59
|
+
snapshotView = new NativeImagePreviewTransitionSnapshotView(containerView.getContext(), sourceState.getDrawable());
|
|
60
60
|
containerView.addView(snapshotView);
|
|
61
61
|
snapshotView.applyGeometry(sourceGeometry);
|
|
62
62
|
animateSnapshot(
|
|
@@ -86,8 +86,8 @@ public final class GalleryViewerTransitionController {
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
public void performCloseTransition(
|
|
89
|
-
@Nullable
|
|
90
|
-
@Nullable
|
|
89
|
+
@Nullable NativeImagePreviewSharedElementState pageState,
|
|
90
|
+
@Nullable NativeImagePreviewSharedElementGeometry targetGeometry,
|
|
91
91
|
@Nullable ImageView targetView,
|
|
92
92
|
@NonNull Runnable completion
|
|
93
93
|
) {
|
|
@@ -111,9 +111,9 @@ public final class GalleryViewerTransitionController {
|
|
|
111
111
|
if (targetView != null) {
|
|
112
112
|
targetView.setAlpha(0f);
|
|
113
113
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
snapshotView = new
|
|
114
|
+
NativeImagePreviewSharedElementGeometry startGeometry = frameInContainer(pageState.getGeometry());
|
|
115
|
+
NativeImagePreviewSharedElementGeometry endGeometry = frameInContainer(targetGeometry);
|
|
116
|
+
snapshotView = new NativeImagePreviewTransitionSnapshotView(containerView.getContext(), pageState.getDrawable());
|
|
117
117
|
containerView.addView(snapshotView);
|
|
118
118
|
snapshotView.applyGeometry(startGeometry);
|
|
119
119
|
animateSnapshot(
|
|
@@ -138,14 +138,14 @@ public final class GalleryViewerTransitionController {
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
private void animateSnapshot(
|
|
141
|
-
@NonNull
|
|
142
|
-
@NonNull
|
|
141
|
+
@NonNull NativeImagePreviewSharedElementGeometry startGeometry,
|
|
142
|
+
@NonNull NativeImagePreviewSharedElementGeometry endGeometry,
|
|
143
143
|
float backgroundStartAlpha,
|
|
144
144
|
float backgroundEndAlpha,
|
|
145
145
|
long durationMs,
|
|
146
146
|
@NonNull Runnable completion
|
|
147
147
|
) {
|
|
148
|
-
|
|
148
|
+
NativeImagePreviewTransitionSnapshotView localSnapshotView = snapshotView;
|
|
149
149
|
if (localSnapshotView == null) {
|
|
150
150
|
completion.run();
|
|
151
151
|
return;
|
|
@@ -169,14 +169,14 @@ public final class GalleryViewerTransitionController {
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
@NonNull
|
|
172
|
-
private
|
|
173
|
-
@NonNull
|
|
174
|
-
@NonNull
|
|
172
|
+
private NativeImagePreviewSharedElementGeometry interpolateGeometry(
|
|
173
|
+
@NonNull NativeImagePreviewSharedElementGeometry start,
|
|
174
|
+
@NonNull NativeImagePreviewSharedElementGeometry end,
|
|
175
175
|
float progress
|
|
176
176
|
) {
|
|
177
177
|
RectF visibleFrame = interpolateRect(start.getVisibleFrameInWindow(), end.getVisibleFrameInWindow(), progress);
|
|
178
178
|
RectF contentFrame = interpolateRect(start.getContentFrameInVisibleBounds(), end.getContentFrameInVisibleBounds(), progress);
|
|
179
|
-
return new
|
|
179
|
+
return new NativeImagePreviewSharedElementGeometry(visibleFrame, contentFrame);
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
@NonNull
|
|
@@ -190,12 +190,12 @@ public final class GalleryViewerTransitionController {
|
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
@NonNull
|
|
193
|
-
private
|
|
193
|
+
private NativeImagePreviewSharedElementGeometry frameInContainer(@NonNull NativeImagePreviewSharedElementGeometry geometry) {
|
|
194
194
|
int[] location = new int[2];
|
|
195
195
|
containerView.getLocationOnScreen(location);
|
|
196
196
|
RectF visibleFrame = geometry.getVisibleFrameInWindow();
|
|
197
197
|
visibleFrame.offset(-location[0], -location[1]);
|
|
198
|
-
return new
|
|
198
|
+
return new NativeImagePreviewSharedElementGeometry(
|
|
199
199
|
visibleFrame,
|
|
200
200
|
geometry.getContentFrameInVisibleBounds()
|
|
201
201
|
);
|
|
@@ -61,7 +61,7 @@ export type ButtonColors = {
|
|
|
61
61
|
loading?: string;
|
|
62
62
|
pressedOverlay?: string;
|
|
63
63
|
};
|
|
64
|
-
type NativePressableProps = Omit<React.ComponentPropsWithoutRef<typeof Pressable>, 'accessibilityRole' | 'accessibilityState' | 'children' | 'disabled' | 'style'>;
|
|
64
|
+
type NativePressableProps = Omit<React.ComponentPropsWithoutRef<typeof Pressable>, 'accessibilityRole' | 'accessibilityState' | 'children' | 'disabled' | 'role' | 'style'>;
|
|
65
65
|
export type ButtonRef = React.ComponentRef<typeof Pressable>;
|
|
66
66
|
export interface ButtonProps extends NativePressableProps {
|
|
67
67
|
variant?: ButtonVariant;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAEV,cAAc,EAId,SAAS,EACT,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAEL,SAAS,EAKT,IAAI,EACL,MAAM,cAAc,CAAC;AAetB,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAC5E,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAC3F,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AACxD,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC1D,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,KAAK,CAAC;AAClD,MAAM,MAAM,iBAAiB,GACzB,MAAM,GACN,MAAM,GACN,SAAS,GACT,OAAO,GACP,WAAW,GACX,iBAAiB,GACjB,eAAe,CAAC;AACpB,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,SAAS,CAAC;AACrD,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,QAAQ,CAAC;AACnD,MAAM,MAAM,uBAAuB,GAC/B,UAAU,GACV,SAAS,GACT,WAAW,GACX,QAAQ,GACR,iBA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