@react-native-motion-kit/text-motion 0.0.0-stage → 0.1.0
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/CHANGELOG.md +11 -0
- package/LICENSE +20 -0
- package/README.ko.md +698 -0
- package/README.md +696 -2
- package/lib/module/accessibility/index.js +4 -0
- package/lib/module/accessibility/index.js.map +1 -0
- package/lib/module/accessibility/policies.js +39 -0
- package/lib/module/accessibility/policies.js.map +1 -0
- package/lib/module/controls/brand.js +4 -0
- package/lib/module/controls/brand.js.map +1 -0
- package/lib/module/controls/controls.js +28 -0
- package/lib/module/controls/controls.js.map +1 -0
- package/lib/module/controls/descriptors.js +55 -0
- package/lib/module/controls/descriptors.js.map +1 -0
- package/lib/module/controls/index.js +4 -0
- package/lib/module/controls/index.js.map +1 -0
- package/lib/module/effects/compose.js +48 -0
- package/lib/module/effects/compose.js.map +1 -0
- package/lib/module/effects/fade.js +15 -0
- package/lib/module/effects/fade.js.map +1 -0
- package/lib/module/effects/index.js +12 -0
- package/lib/module/effects/index.js.map +1 -0
- package/lib/module/effects/lineReveal.js +17 -0
- package/lib/module/effects/lineReveal.js.map +1 -0
- package/lib/module/effects/pulse.js +14 -0
- package/lib/module/effects/pulse.js.map +1 -0
- package/lib/module/effects/rise.js +14 -0
- package/lib/module/effects/rise.js.map +1 -0
- package/lib/module/effects/scale.js +15 -0
- package/lib/module/effects/scale.js.map +1 -0
- package/lib/module/effects/shake.js +14 -0
- package/lib/module/effects/shake.js.map +1 -0
- package/lib/module/effects/slide.js +15 -0
- package/lib/module/effects/slide.js.map +1 -0
- package/lib/module/effects/typewriter.js +19 -0
- package/lib/module/effects/typewriter.js.map +1 -0
- package/lib/module/effects/validation.js +10 -0
- package/lib/module/effects/validation.js.map +1 -0
- package/lib/module/index.js +10 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/presets/index.js +35 -0
- package/lib/module/presets/index.js.map +1 -0
- package/lib/module/recipe/component.js +60 -0
- package/lib/module/recipe/component.js.map +1 -0
- package/lib/module/recipe/defineTextMotion.js +9 -0
- package/lib/module/recipe/defineTextMotion.js.map +1 -0
- package/lib/module/recipe/descriptors.js +60 -0
- package/lib/module/recipe/descriptors.js.map +1 -0
- package/lib/module/recipe/index.js +5 -0
- package/lib/module/recipe/index.js.map +1 -0
- package/lib/module/recipe/recipe.js +163 -0
- package/lib/module/recipe/recipe.js.map +1 -0
- package/lib/module/renderers/index.js +5 -0
- package/lib/module/renderers/index.js.map +1 -0
- package/lib/module/renderers/nativeText.js +494 -0
- package/lib/module/renderers/nativeText.js.map +1 -0
- package/lib/module/renderers/nativeTextControls.js +96 -0
- package/lib/module/renderers/nativeTextControls.js.map +1 -0
- package/lib/module/renderers/nativeTextLineLayout.js +290 -0
- package/lib/module/renderers/nativeTextLineLayout.js.map +1 -0
- package/lib/module/renderers/nativeTextPlayback.js +91 -0
- package/lib/module/renderers/nativeTextPlayback.js.map +1 -0
- package/lib/module/renderers/overlayText.js +543 -0
- package/lib/module/renderers/overlayText.js.map +1 -0
- package/lib/module/renderers/overlayTextLayout.js +182 -0
- package/lib/module/renderers/overlayTextLayout.js.map +1 -0
- package/lib/module/renderers/rendererMotion.js +264 -0
- package/lib/module/renderers/rendererMotion.js.map +1 -0
- package/lib/module/split/createToken.js +19 -0
- package/lib/module/split/createToken.js.map +1 -0
- package/lib/module/split/custom.js +57 -0
- package/lib/module/split/custom.js.map +1 -0
- package/lib/module/split/graphemes.js +25 -0
- package/lib/module/split/graphemes.js.map +1 -0
- package/lib/module/split/index.js +7 -0
- package/lib/module/split/index.js.map +1 -0
- package/lib/module/split/lines.js +43 -0
- package/lib/module/split/lines.js.map +1 -0
- package/lib/module/split/segmenter.js +74 -0
- package/lib/module/split/segmenter.js.map +1 -0
- package/lib/module/split/words.js +28 -0
- package/lib/module/split/words.js.map +1 -0
- package/lib/module/timeline/index.js +7 -0
- package/lib/module/timeline/index.js.map +1 -0
- package/lib/module/timeline/parallel.js +21 -0
- package/lib/module/timeline/parallel.js.map +1 -0
- package/lib/module/timeline/sequence.js +18 -0
- package/lib/module/timeline/sequence.js.map +1 -0
- package/lib/module/timeline/stagger.js +43 -0
- package/lib/module/timeline/stagger.js.map +1 -0
- package/lib/module/timeline/validation.js +24 -0
- package/lib/module/timeline/validation.js.map +1 -0
- package/lib/module/timeline/wave.js +25 -0
- package/lib/module/timeline/wave.js.map +1 -0
- package/lib/module/types/index.js +4 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/module/types/recipe.js +4 -0
- package/lib/module/types/recipe.js.map +1 -0
- package/lib/module/types/renderer.js +27 -0
- package/lib/module/types/renderer.js.map +1 -0
- package/lib/module/types/token.js +2 -0
- package/lib/module/types/token.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/accessibility/index.d.ts +2 -0
- package/lib/typescript/src/accessibility/index.d.ts.map +1 -0
- package/lib/typescript/src/accessibility/policies.d.ts +13 -0
- package/lib/typescript/src/accessibility/policies.d.ts.map +1 -0
- package/lib/typescript/src/controls/brand.d.ts +2 -0
- package/lib/typescript/src/controls/brand.d.ts.map +1 -0
- package/lib/typescript/src/controls/controls.d.ts +28 -0
- package/lib/typescript/src/controls/controls.d.ts.map +1 -0
- package/lib/typescript/src/controls/descriptors.d.ts +14 -0
- package/lib/typescript/src/controls/descriptors.d.ts.map +1 -0
- package/lib/typescript/src/controls/index.d.ts +3 -0
- package/lib/typescript/src/controls/index.d.ts.map +1 -0
- package/lib/typescript/src/effects/compose.d.ts +11 -0
- package/lib/typescript/src/effects/compose.d.ts.map +1 -0
- package/lib/typescript/src/effects/fade.d.ts +10 -0
- package/lib/typescript/src/effects/fade.d.ts.map +1 -0
- package/lib/typescript/src/effects/index.d.ts +10 -0
- package/lib/typescript/src/effects/index.d.ts.map +1 -0
- package/lib/typescript/src/effects/lineReveal.d.ts +11 -0
- package/lib/typescript/src/effects/lineReveal.d.ts.map +1 -0
- package/lib/typescript/src/effects/pulse.d.ts +8 -0
- package/lib/typescript/src/effects/pulse.d.ts.map +1 -0
- package/lib/typescript/src/effects/rise.d.ts +8 -0
- package/lib/typescript/src/effects/rise.d.ts.map +1 -0
- package/lib/typescript/src/effects/scale.d.ts +10 -0
- package/lib/typescript/src/effects/scale.d.ts.map +1 -0
- package/lib/typescript/src/effects/shake.d.ts +8 -0
- package/lib/typescript/src/effects/shake.d.ts.map +1 -0
- package/lib/typescript/src/effects/slide.d.ts +10 -0
- package/lib/typescript/src/effects/slide.d.ts.map +1 -0
- package/lib/typescript/src/effects/typewriter.d.ts +13 -0
- package/lib/typescript/src/effects/typewriter.d.ts.map +1 -0
- package/lib/typescript/src/effects/validation.d.ts +2 -0
- package/lib/typescript/src/effects/validation.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +15 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/presets/index.d.ts +10 -0
- package/lib/typescript/src/presets/index.d.ts.map +1 -0
- package/lib/typescript/src/recipe/component.d.ts +3 -0
- package/lib/typescript/src/recipe/component.d.ts.map +1 -0
- package/lib/typescript/src/recipe/defineTextMotion.d.ts +4 -0
- package/lib/typescript/src/recipe/defineTextMotion.d.ts.map +1 -0
- package/lib/typescript/src/recipe/descriptors.d.ts +15 -0
- package/lib/typescript/src/recipe/descriptors.d.ts.map +1 -0
- package/lib/typescript/src/recipe/index.d.ts +4 -0
- package/lib/typescript/src/recipe/index.d.ts.map +1 -0
- package/lib/typescript/src/recipe/recipe.d.ts +67 -0
- package/lib/typescript/src/recipe/recipe.d.ts.map +1 -0
- package/lib/typescript/src/renderers/index.d.ts +3 -0
- package/lib/typescript/src/renderers/index.d.ts.map +1 -0
- package/lib/typescript/src/renderers/nativeText.d.ts +13 -0
- package/lib/typescript/src/renderers/nativeText.d.ts.map +1 -0
- package/lib/typescript/src/renderers/nativeTextControls.d.ts +16 -0
- package/lib/typescript/src/renderers/nativeTextControls.d.ts.map +1 -0
- package/lib/typescript/src/renderers/nativeTextLineLayout.d.ts +84 -0
- package/lib/typescript/src/renderers/nativeTextLineLayout.d.ts.map +1 -0
- package/lib/typescript/src/renderers/nativeTextPlayback.d.ts +21 -0
- package/lib/typescript/src/renderers/nativeTextPlayback.d.ts.map +1 -0
- package/lib/typescript/src/renderers/overlayText.d.ts +13 -0
- package/lib/typescript/src/renderers/overlayText.d.ts.map +1 -0
- package/lib/typescript/src/renderers/overlayTextLayout.d.ts +36 -0
- package/lib/typescript/src/renderers/overlayTextLayout.d.ts.map +1 -0
- package/lib/typescript/src/renderers/rendererMotion.d.ts +53 -0
- package/lib/typescript/src/renderers/rendererMotion.d.ts.map +1 -0
- package/lib/typescript/src/split/createToken.d.ts +11 -0
- package/lib/typescript/src/split/createToken.d.ts.map +1 -0
- package/lib/typescript/src/split/custom.d.ts +17 -0
- package/lib/typescript/src/split/custom.d.ts.map +1 -0
- package/lib/typescript/src/split/graphemes.d.ts +4 -0
- package/lib/typescript/src/split/graphemes.d.ts.map +1 -0
- package/lib/typescript/src/split/index.d.ts +5 -0
- package/lib/typescript/src/split/index.d.ts.map +1 -0
- package/lib/typescript/src/split/lines.d.ts +4 -0
- package/lib/typescript/src/split/lines.d.ts.map +1 -0
- package/lib/typescript/src/split/segmenter.d.ts +18 -0
- package/lib/typescript/src/split/segmenter.d.ts.map +1 -0
- package/lib/typescript/src/split/words.d.ts +4 -0
- package/lib/typescript/src/split/words.d.ts.map +1 -0
- package/lib/typescript/src/timeline/index.d.ts +5 -0
- package/lib/typescript/src/timeline/index.d.ts.map +1 -0
- package/lib/typescript/src/timeline/parallel.d.ts +4 -0
- package/lib/typescript/src/timeline/parallel.d.ts.map +1 -0
- package/lib/typescript/src/timeline/sequence.d.ts +4 -0
- package/lib/typescript/src/timeline/sequence.d.ts.map +1 -0
- package/lib/typescript/src/timeline/stagger.d.ts +11 -0
- package/lib/typescript/src/timeline/stagger.d.ts.map +1 -0
- package/lib/typescript/src/timeline/validation.d.ts +4 -0
- package/lib/typescript/src/timeline/validation.d.ts.map +1 -0
- package/lib/typescript/src/timeline/wave.d.ts +11 -0
- package/lib/typescript/src/timeline/wave.d.ts.map +1 -0
- package/lib/typescript/src/types/index.d.ts +6 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -0
- package/lib/typescript/src/types/recipe.d.ts +123 -0
- package/lib/typescript/src/types/recipe.d.ts.map +1 -0
- package/lib/typescript/src/types/renderer.d.ts +51 -0
- package/lib/typescript/src/types/renderer.d.ts.map +1 -0
- package/lib/typescript/src/types/token.d.ts +35 -0
- package/lib/typescript/src/types/token.d.ts.map +1 -0
- package/package.json +116 -3
- package/src/accessibility/index.ts +7 -0
- package/src/accessibility/policies.ts +60 -0
- package/src/controls/brand.ts +3 -0
- package/src/controls/controls.ts +41 -0
- package/src/controls/descriptors.ts +83 -0
- package/src/controls/index.ts +2 -0
- package/src/effects/compose.ts +98 -0
- package/src/effects/fade.ts +22 -0
- package/src/effects/index.ts +9 -0
- package/src/effects/lineReveal.ts +28 -0
- package/src/effects/pulse.ts +19 -0
- package/src/effects/rise.ts +19 -0
- package/src/effects/scale.ts +22 -0
- package/src/effects/shake.ts +19 -0
- package/src/effects/slide.ts +22 -0
- package/src/effects/typewriter.ts +16 -0
- package/src/effects/validation.ts +9 -0
- package/src/index.tsx +46 -0
- package/src/presets/index.ts +42 -0
- package/src/recipe/component.tsx +88 -0
- package/src/recipe/defineTextMotion.ts +6 -0
- package/src/recipe/descriptors.ts +158 -0
- package/src/recipe/index.ts +3 -0
- package/src/recipe/recipe.ts +359 -0
- package/src/renderers/index.ts +2 -0
- package/src/renderers/nativeText.tsx +813 -0
- package/src/renderers/nativeTextControls.ts +131 -0
- package/src/renderers/nativeTextLineLayout.ts +495 -0
- package/src/renderers/nativeTextPlayback.ts +204 -0
- package/src/renderers/overlayText.tsx +945 -0
- package/src/renderers/overlayTextLayout.ts +312 -0
- package/src/renderers/rendererMotion.ts +483 -0
- package/src/split/createToken.ts +26 -0
- package/src/split/custom.ts +92 -0
- package/src/split/graphemes.ts +27 -0
- package/src/split/index.ts +9 -0
- package/src/split/lines.ts +35 -0
- package/src/split/segmenter.ts +111 -0
- package/src/split/words.ts +28 -0
- package/src/timeline/index.ts +4 -0
- package/src/timeline/parallel.ts +30 -0
- package/src/timeline/sequence.ts +29 -0
- package/src/timeline/stagger.ts +60 -0
- package/src/timeline/validation.ts +29 -0
- package/src/timeline/wave.ts +34 -0
- package/src/types/index.ts +34 -0
- package/src/types/recipe.ts +195 -0
- package/src/types/renderer.ts +91 -0
- package/src/types/token.ts +39 -0
|
@@ -0,0 +1,543 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useCallback, useLayoutEffect, useRef, useState } from 'react';
|
|
4
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
5
|
+
import { createAnimatedComponent, useAnimatedStyle, useReducedMotion, useSharedValue } from 'react-native-reanimated';
|
|
6
|
+
import { createHiddenTokenAccessibilityProps, createParentAccessibilityProps, parentLabelPolicy, resolveAccessibleText } from "../accessibility/index.js";
|
|
7
|
+
import { createTextMotionRendererHandle } from "../recipe/descriptors.js";
|
|
8
|
+
import { createTextMotionRendererCapability } from "../types/renderer.js";
|
|
9
|
+
import { useNativeTextControlsPlayback } from "./nativeTextControls.js";
|
|
10
|
+
import { areNativeTextPlaybackRunsEqual, createNativeTextPlaybackRun } from "./nativeTextPlayback.js";
|
|
11
|
+
import { compareOverlayTextLayouts, createOverlayTextLayout } from "./overlayTextLayout.js";
|
|
12
|
+
import { clampTextMotionProgress, createTextMotionControlledProgressPlan, createTextMotionControlledTimelineSpan, createTextMotionDelaySecondsByItemIndex, createTextMotionItemMotion, createOverlayTextStyleTransformStatePair, createTextMotionProgressAnimation, createTextMotionStyleTransformStatePair, readTextMotionProgressForAnimatedStyle, shouldRenderTextMotionFinalState } from "./rendererMotion.js";
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
const AnimatedView = createAnimatedComponent(View);
|
|
15
|
+
const LINE_MASK_CAPABILITY = createTextMotionRendererCapability('line-mask');
|
|
16
|
+
const HIDDEN_ACCESSIBILITY_PROPS = {
|
|
17
|
+
accessibilityElementsHidden: true,
|
|
18
|
+
accessible: false,
|
|
19
|
+
importantForAccessibility: 'no-hide-descendants'
|
|
20
|
+
};
|
|
21
|
+
const OVERLAY_CONTAINER_STYLE = {
|
|
22
|
+
...StyleSheet.absoluteFill,
|
|
23
|
+
pointerEvents: 'none'
|
|
24
|
+
};
|
|
25
|
+
const PENDING_OVERLAY_CONTAINER_STYLE = {
|
|
26
|
+
opacity: 0
|
|
27
|
+
};
|
|
28
|
+
const SOURCE_LAYOUT_STYLE = {
|
|
29
|
+
alignSelf: 'stretch'
|
|
30
|
+
};
|
|
31
|
+
const READY_SOURCE_STYLE = {
|
|
32
|
+
opacity: 0
|
|
33
|
+
};
|
|
34
|
+
const MASK_STYLE = {
|
|
35
|
+
left: 0,
|
|
36
|
+
overflow: 'hidden',
|
|
37
|
+
position: 'absolute',
|
|
38
|
+
right: 0
|
|
39
|
+
};
|
|
40
|
+
const LINE_ANIMATION_STYLE = {
|
|
41
|
+
left: 0,
|
|
42
|
+
position: 'absolute',
|
|
43
|
+
top: 0,
|
|
44
|
+
width: '100%'
|
|
45
|
+
};
|
|
46
|
+
const LINE_CONTENT_CLIP_STYLE = {
|
|
47
|
+
overflow: 'hidden',
|
|
48
|
+
width: '100%'
|
|
49
|
+
};
|
|
50
|
+
const PARAGRAPH_COPY_STYLE = {
|
|
51
|
+
left: 0,
|
|
52
|
+
position: 'absolute',
|
|
53
|
+
width: '100%'
|
|
54
|
+
};
|
|
55
|
+
const OVERLAY_TEXT_SHAPING_STYLE_KEYS = ['direction', 'fontFamily', 'fontSize', 'fontStyle', 'fontVariant', 'fontWeight', 'includeFontPadding', 'letterSpacing', 'lineHeight', 'textAlign', 'textAlignVertical', 'textTransform', 'verticalAlign', 'writingDirection'];
|
|
56
|
+
const OVERLAY_TEXT_BOX_LAYOUT_STYLE_KEYS = ['alignSelf', 'aspectRatio', 'borderBottomWidth', 'borderEndWidth', 'borderLeftWidth', 'borderRightWidth', 'borderStartWidth', 'borderTopWidth', 'borderWidth', 'bottom', 'boxSizing', 'display', 'end', 'flex', 'flexBasis', 'flexGrow', 'flexShrink', 'height', 'inset', 'insetBlock', 'insetBlockEnd', 'insetBlockStart', 'insetInline', 'insetInlineEnd', 'insetInlineStart', 'left', 'margin', 'marginBlock', 'marginBlockEnd', 'marginBlockStart', 'marginBottom', 'marginEnd', 'marginHorizontal', 'marginInline', 'marginInlineEnd', 'marginInlineStart', 'marginLeft', 'marginRight', 'marginStart', 'marginTop', 'marginVertical', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'padding', 'paddingBlock', 'paddingBlockEnd', 'paddingBlockStart', 'paddingBottom', 'paddingEnd', 'paddingHorizontal', 'paddingInline', 'paddingInlineEnd', 'paddingInlineStart', 'paddingLeft', 'paddingRight', 'paddingStart', 'paddingTop', 'paddingVertical', 'position', 'right', 'start', 'top', 'width'];
|
|
57
|
+
const OVERLAY_TEXT_LAYOUT_STYLE_KEYS = [...OVERLAY_TEXT_SHAPING_STYLE_KEYS, ...OVERLAY_TEXT_BOX_LAYOUT_STYLE_KEYS];
|
|
58
|
+
function createContainerProps(textProps, parentAccessibilityProps) {
|
|
59
|
+
return {
|
|
60
|
+
accessibilityActions: textProps?.accessibilityActions,
|
|
61
|
+
accessibilityHint: textProps?.accessibilityHint,
|
|
62
|
+
accessibilityLabel: textProps?.accessibilityLabel ?? parentAccessibilityProps.accessibilityLabel,
|
|
63
|
+
accessibilityLanguage: textProps?.accessibilityLanguage,
|
|
64
|
+
accessibilityRole: textProps?.accessibilityRole,
|
|
65
|
+
accessibilityState: textProps?.accessibilityState,
|
|
66
|
+
accessibilityValue: textProps?.accessibilityValue,
|
|
67
|
+
accessible: parentAccessibilityProps.accessible,
|
|
68
|
+
nativeID: textProps?.nativeID,
|
|
69
|
+
onAccessibilityAction: textProps?.onAccessibilityAction,
|
|
70
|
+
testID: textProps?.testID
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function createTypographyProps(textProps) {
|
|
74
|
+
return {
|
|
75
|
+
allowFontScaling: textProps?.allowFontScaling,
|
|
76
|
+
maxFontSizeMultiplier: textProps?.maxFontSizeMultiplier
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
function OverlayTextFinalSource({
|
|
80
|
+
children,
|
|
81
|
+
containerProps,
|
|
82
|
+
sourceAccessibilityProps,
|
|
83
|
+
textStyle,
|
|
84
|
+
typographyProps
|
|
85
|
+
}) {
|
|
86
|
+
return /*#__PURE__*/_jsx(View, {
|
|
87
|
+
...containerProps,
|
|
88
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
89
|
+
...sourceAccessibilityProps,
|
|
90
|
+
...typographyProps,
|
|
91
|
+
style: [textStyle, SOURCE_LAYOUT_STYLE],
|
|
92
|
+
children: children
|
|
93
|
+
})
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
function createInitialTextStyle(tokenMotion) {
|
|
97
|
+
return {
|
|
98
|
+
opacity: tokenMotion.initial.opacity,
|
|
99
|
+
transform: [{
|
|
100
|
+
translateX: tokenMotion.initial.translateX
|
|
101
|
+
}, {
|
|
102
|
+
translateY: tokenMotion.initial.translateY
|
|
103
|
+
}, {
|
|
104
|
+
scale: tokenMotion.initial.scale
|
|
105
|
+
}]
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function createSourceTextMotionStyle(layout, pendingMotion) {
|
|
109
|
+
if (layout) {
|
|
110
|
+
return READY_SOURCE_STYLE;
|
|
111
|
+
}
|
|
112
|
+
if (pendingMotion.initial.scale !== 1) {
|
|
113
|
+
return PENDING_OVERLAY_CONTAINER_STYLE;
|
|
114
|
+
}
|
|
115
|
+
return createInitialTextStyle(pendingMotion);
|
|
116
|
+
}
|
|
117
|
+
function createLineFrameStyle(line) {
|
|
118
|
+
return {
|
|
119
|
+
height: line.height,
|
|
120
|
+
top: line.y,
|
|
121
|
+
transformOrigin: [line.x + line.width / 2, line.height / 2, 0]
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
function isSerializableRecord(value) {
|
|
125
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
126
|
+
}
|
|
127
|
+
function createStableLayoutInputValue(value) {
|
|
128
|
+
if (Array.isArray(value)) {
|
|
129
|
+
return value.map(createStableLayoutInputValue);
|
|
130
|
+
}
|
|
131
|
+
if (!isSerializableRecord(value)) {
|
|
132
|
+
return value;
|
|
133
|
+
}
|
|
134
|
+
const entries = Object.entries(value);
|
|
135
|
+
entries.sort(([left], [right]) => left.localeCompare(right));
|
|
136
|
+
return Object.fromEntries(entries.map(([key, nestedValue]) => [key, createStableLayoutInputValue(nestedValue)]));
|
|
137
|
+
}
|
|
138
|
+
function createOverlayTextLayoutStyleSnapshot(style) {
|
|
139
|
+
const flattenedStyle = StyleSheet.flatten(style) ?? {};
|
|
140
|
+
return OVERLAY_TEXT_LAYOUT_STYLE_KEYS.reduce((snapshot, key) => {
|
|
141
|
+
const value = flattenedStyle[key];
|
|
142
|
+
if (value === undefined) {
|
|
143
|
+
return snapshot;
|
|
144
|
+
}
|
|
145
|
+
return {
|
|
146
|
+
...snapshot,
|
|
147
|
+
[key]: createStableLayoutInputValue(value)
|
|
148
|
+
};
|
|
149
|
+
}, {});
|
|
150
|
+
}
|
|
151
|
+
function createOverlayTextInputKey(text, textProps) {
|
|
152
|
+
return JSON.stringify({
|
|
153
|
+
allowFontScaling: textProps?.allowFontScaling,
|
|
154
|
+
maxFontSizeMultiplier: textProps?.maxFontSizeMultiplier,
|
|
155
|
+
style: createOverlayTextLayoutStyleSnapshot(textProps?.style),
|
|
156
|
+
text
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
function createParagraphCopyOffset(line) {
|
|
160
|
+
return line.y === 0 ? 0 : -line.y;
|
|
161
|
+
}
|
|
162
|
+
function OverlayTextLineMask({
|
|
163
|
+
children,
|
|
164
|
+
frameAnimatedStyle,
|
|
165
|
+
line,
|
|
166
|
+
maskTestID,
|
|
167
|
+
motionTestID,
|
|
168
|
+
paragraphTestID,
|
|
169
|
+
revealContentAnimatedStyle,
|
|
170
|
+
textStyle,
|
|
171
|
+
typographyProps
|
|
172
|
+
}) {
|
|
173
|
+
return /*#__PURE__*/_jsx(AnimatedView, {
|
|
174
|
+
...HIDDEN_ACCESSIBILITY_PROPS,
|
|
175
|
+
pointerEvents: "none",
|
|
176
|
+
style: [MASK_STYLE, createLineFrameStyle(line), frameAnimatedStyle],
|
|
177
|
+
testID: maskTestID,
|
|
178
|
+
children: /*#__PURE__*/_jsx(AnimatedView, {
|
|
179
|
+
style: [LINE_ANIMATION_STYLE, revealContentAnimatedStyle],
|
|
180
|
+
testID: motionTestID,
|
|
181
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
182
|
+
collapsable: false,
|
|
183
|
+
style: [LINE_CONTENT_CLIP_STYLE, {
|
|
184
|
+
height: line.height
|
|
185
|
+
}],
|
|
186
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
187
|
+
...HIDDEN_ACCESSIBILITY_PROPS,
|
|
188
|
+
...typographyProps,
|
|
189
|
+
style: [textStyle, PARAGRAPH_COPY_STYLE, {
|
|
190
|
+
top: createParagraphCopyOffset(line)
|
|
191
|
+
}],
|
|
192
|
+
testID: paragraphTestID,
|
|
193
|
+
children: children
|
|
194
|
+
})
|
|
195
|
+
})
|
|
196
|
+
})
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
function useOverlayTextAnimatedStyle(options) {
|
|
200
|
+
const {
|
|
201
|
+
controlled,
|
|
202
|
+
progress,
|
|
203
|
+
renderFinalState,
|
|
204
|
+
tokenMotion
|
|
205
|
+
} = options;
|
|
206
|
+
const initialOpacity = tokenMotion.initial.opacity;
|
|
207
|
+
const initialScale = tokenMotion.initial.scale;
|
|
208
|
+
const initialTranslateX = tokenMotion.initial.translateX;
|
|
209
|
+
const initialTranslateY = tokenMotion.initial.translateY;
|
|
210
|
+
const targetOpacity = tokenMotion.target.opacity;
|
|
211
|
+
const targetScale = tokenMotion.target.scale;
|
|
212
|
+
const targetTranslateX = tokenMotion.target.translateX;
|
|
213
|
+
const targetTranslateY = tokenMotion.target.translateY;
|
|
214
|
+
const pulseScale = tokenMotion.pulseScale;
|
|
215
|
+
const itemDelaySeconds = controlled ? options.controlledProgressPlan.itemDelaySeconds : 0;
|
|
216
|
+
const totalTimelineSpan = controlled ? options.controlledProgressPlan.totalTimelineSpan : 1;
|
|
217
|
+
return useAnimatedStyle(() => {
|
|
218
|
+
const current = readTextMotionProgressForAnimatedStyle({
|
|
219
|
+
controlledProgressPlan: controlled ? {
|
|
220
|
+
itemDelaySeconds,
|
|
221
|
+
totalTimelineSpan
|
|
222
|
+
} : undefined,
|
|
223
|
+
progress,
|
|
224
|
+
renderFinalState
|
|
225
|
+
});
|
|
226
|
+
const clampedCurrent = clampTextMotionProgress(current);
|
|
227
|
+
const baseScale = initialScale + (targetScale - initialScale) * current;
|
|
228
|
+
const pulseProgress = 1 - Math.abs(clampedCurrent * 2 - 1);
|
|
229
|
+
const pulseMultiplier = 1 + (pulseScale - 1) * pulseProgress;
|
|
230
|
+
return {
|
|
231
|
+
opacity: initialOpacity + (targetOpacity - initialOpacity) * current,
|
|
232
|
+
transform: [{
|
|
233
|
+
translateX: initialTranslateX + (targetTranslateX - initialTranslateX) * current
|
|
234
|
+
}, {
|
|
235
|
+
translateY: initialTranslateY + (targetTranslateY - initialTranslateY) * current
|
|
236
|
+
}, {
|
|
237
|
+
scale: baseScale * pulseMultiplier
|
|
238
|
+
}]
|
|
239
|
+
};
|
|
240
|
+
}, [initialOpacity, initialScale, initialTranslateX, initialTranslateY, controlled, progress, pulseScale, renderFinalState, targetOpacity, targetScale, targetTranslateX, targetTranslateY, itemDelaySeconds, totalTimelineSpan]);
|
|
241
|
+
}
|
|
242
|
+
function OverlayTextUncontrolledLine({
|
|
243
|
+
children,
|
|
244
|
+
controls,
|
|
245
|
+
line,
|
|
246
|
+
maskTestID,
|
|
247
|
+
motionTestID,
|
|
248
|
+
paragraphTestID,
|
|
249
|
+
playbackIdentity,
|
|
250
|
+
revealContentMotion,
|
|
251
|
+
textStyle,
|
|
252
|
+
frameMotion,
|
|
253
|
+
typographyProps
|
|
254
|
+
}) {
|
|
255
|
+
const reducedMotionEnabled = useReducedMotion();
|
|
256
|
+
const renderFinalState = shouldRenderTextMotionFinalState(reducedMotionEnabled, frameMotion.reducedMotion);
|
|
257
|
+
const progress = useSharedValue(renderFinalState ? 1 : 0);
|
|
258
|
+
const playbackRun = createNativeTextPlaybackRun(frameMotion, renderFinalState, playbackIdentity);
|
|
259
|
+
const previousPlaybackRun = useRef(undefined);
|
|
260
|
+
const frameAnimatedStyle = useOverlayTextAnimatedStyle({
|
|
261
|
+
controlled: false,
|
|
262
|
+
progress,
|
|
263
|
+
renderFinalState,
|
|
264
|
+
tokenMotion: frameMotion
|
|
265
|
+
});
|
|
266
|
+
const revealContentAnimatedStyle = useOverlayTextAnimatedStyle({
|
|
267
|
+
controlled: false,
|
|
268
|
+
progress,
|
|
269
|
+
renderFinalState,
|
|
270
|
+
tokenMotion: revealContentMotion
|
|
271
|
+
});
|
|
272
|
+
useLayoutEffect(() => {
|
|
273
|
+
if (areNativeTextPlaybackRunsEqual(previousPlaybackRun.current, playbackRun)) {
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
previousPlaybackRun.current = playbackRun;
|
|
277
|
+
if (playbackRun.renderFinalState) {
|
|
278
|
+
progress.value = 1;
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
progress.value = 0;
|
|
282
|
+
progress.value = createTextMotionProgressAnimation(playbackRun);
|
|
283
|
+
});
|
|
284
|
+
useNativeTextControlsPlayback({
|
|
285
|
+
controls,
|
|
286
|
+
createProgressAnimation: createTextMotionProgressAnimation,
|
|
287
|
+
progress,
|
|
288
|
+
renderFinalState,
|
|
289
|
+
tokenMotion: frameMotion
|
|
290
|
+
});
|
|
291
|
+
return /*#__PURE__*/_jsx(OverlayTextLineMask, {
|
|
292
|
+
frameAnimatedStyle: frameAnimatedStyle,
|
|
293
|
+
line: line,
|
|
294
|
+
maskTestID: maskTestID,
|
|
295
|
+
motionTestID: motionTestID,
|
|
296
|
+
paragraphTestID: paragraphTestID,
|
|
297
|
+
revealContentAnimatedStyle: revealContentAnimatedStyle,
|
|
298
|
+
textStyle: textStyle,
|
|
299
|
+
typographyProps: typographyProps,
|
|
300
|
+
children: children
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
function OverlayTextControlledLine({
|
|
304
|
+
children,
|
|
305
|
+
controlledProgress,
|
|
306
|
+
controlledProgressPlan,
|
|
307
|
+
line,
|
|
308
|
+
maskTestID,
|
|
309
|
+
motionTestID,
|
|
310
|
+
paragraphTestID,
|
|
311
|
+
revealContentMotion,
|
|
312
|
+
textStyle,
|
|
313
|
+
frameMotion,
|
|
314
|
+
typographyProps
|
|
315
|
+
}) {
|
|
316
|
+
const reducedMotionEnabled = useReducedMotion();
|
|
317
|
+
const renderFinalState = shouldRenderTextMotionFinalState(reducedMotionEnabled, frameMotion.reducedMotion);
|
|
318
|
+
const frameAnimatedStyle = useOverlayTextAnimatedStyle({
|
|
319
|
+
controlled: true,
|
|
320
|
+
controlledProgressPlan,
|
|
321
|
+
progress: controlledProgress,
|
|
322
|
+
renderFinalState,
|
|
323
|
+
tokenMotion: frameMotion
|
|
324
|
+
});
|
|
325
|
+
const revealContentAnimatedStyle = useOverlayTextAnimatedStyle({
|
|
326
|
+
controlled: true,
|
|
327
|
+
controlledProgressPlan,
|
|
328
|
+
progress: controlledProgress,
|
|
329
|
+
renderFinalState,
|
|
330
|
+
tokenMotion: revealContentMotion
|
|
331
|
+
});
|
|
332
|
+
return /*#__PURE__*/_jsx(OverlayTextLineMask, {
|
|
333
|
+
frameAnimatedStyle: frameAnimatedStyle,
|
|
334
|
+
line: line,
|
|
335
|
+
maskTestID: maskTestID,
|
|
336
|
+
motionTestID: motionTestID,
|
|
337
|
+
paragraphTestID: paragraphTestID,
|
|
338
|
+
revealContentAnimatedStyle: revealContentAnimatedStyle,
|
|
339
|
+
textStyle: textStyle,
|
|
340
|
+
typographyProps: typographyProps,
|
|
341
|
+
children: children
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
function warnOverlayTextFallbackOnce(warnedRef, reason) {
|
|
345
|
+
if (warnedRef.current) {
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
348
|
+
warnedRef.current = true;
|
|
349
|
+
if (typeof __DEV__ !== 'undefined' && __DEV__) {
|
|
350
|
+
console.warn(`@react-native-motion-kit/text-motion overlayText() received unsupported line layout (${reason}); rendering readable final text instead.`);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
function isTextLayoutEventRecord(value) {
|
|
354
|
+
return typeof value === 'object' && value !== null;
|
|
355
|
+
}
|
|
356
|
+
function readTextLayoutNativeEvent(event) {
|
|
357
|
+
if (!isTextLayoutEventRecord(event) || !('nativeEvent' in event)) {
|
|
358
|
+
return event;
|
|
359
|
+
}
|
|
360
|
+
const nativeEvent = event.nativeEvent;
|
|
361
|
+
if (!isTextLayoutEventRecord(nativeEvent) || 'lines' in nativeEvent) {
|
|
362
|
+
return nativeEvent;
|
|
363
|
+
}
|
|
364
|
+
return 'nativeEvent' in nativeEvent ? nativeEvent.nativeEvent : nativeEvent;
|
|
365
|
+
}
|
|
366
|
+
function createMaskTestID(prefix, line) {
|
|
367
|
+
return prefix ? `${prefix}-${line.motionIndex}` : undefined;
|
|
368
|
+
}
|
|
369
|
+
function createParagraphTestID(prefix, line) {
|
|
370
|
+
return prefix ? `${prefix}-${line.motionIndex}-copy` : undefined;
|
|
371
|
+
}
|
|
372
|
+
function createMotionTestID(prefix, line) {
|
|
373
|
+
return prefix ? `${prefix}-${line.motionIndex}-motion` : undefined;
|
|
374
|
+
}
|
|
375
|
+
function createOverlayTestID(prefix) {
|
|
376
|
+
return prefix ? `${prefix}-overlay` : undefined;
|
|
377
|
+
}
|
|
378
|
+
function createOverlayTextRendererComponent(options) {
|
|
379
|
+
function OverlayTextActiveRenderer({
|
|
380
|
+
children,
|
|
381
|
+
containerProps,
|
|
382
|
+
recipe,
|
|
383
|
+
sourceAccessibilityProps,
|
|
384
|
+
text,
|
|
385
|
+
textProps,
|
|
386
|
+
textStyle,
|
|
387
|
+
typographyProps
|
|
388
|
+
}) {
|
|
389
|
+
const inputKey = createOverlayTextInputKey(text, textProps);
|
|
390
|
+
const styleState = createTextMotionStyleTransformStatePair(recipe.effects, 'overlayText()');
|
|
391
|
+
const overlayStyleState = createOverlayTextStyleTransformStatePair(recipe.effects);
|
|
392
|
+
const delaySecondsByLineIndex = createTextMotionDelaySecondsByItemIndex(recipe, 1);
|
|
393
|
+
const pendingMotion = createTextMotionItemMotion(recipe, styleState, delaySecondsByLineIndex[0] ?? 0);
|
|
394
|
+
const [layoutResult, setLayoutResult] = useState(undefined);
|
|
395
|
+
const boundInputKey = layoutResult?.inputKey;
|
|
396
|
+
const retainedLayout = layoutResult?.layout;
|
|
397
|
+
const currentLayout = boundInputKey === inputKey ? retainedLayout : undefined;
|
|
398
|
+
const fallbackReason = boundInputKey === inputKey ? layoutResult?.fallbackReason : undefined;
|
|
399
|
+
const layoutPending = Boolean(retainedLayout && boundInputKey !== inputKey);
|
|
400
|
+
const warnedFallback = useRef(false);
|
|
401
|
+
const externalProgress = textProps?.progress;
|
|
402
|
+
const controls = textProps?.controls;
|
|
403
|
+
const delaySecondsByMotionIndex = retainedLayout ? createTextMotionDelaySecondsByItemIndex(recipe, retainedLayout.motionCount) : [];
|
|
404
|
+
const totalTimelineSpan = createTextMotionControlledTimelineSpan(delaySecondsByMotionIndex);
|
|
405
|
+
const onTextLayout = useCallback(event => {
|
|
406
|
+
const nextLayout = createOverlayTextLayout(text, readTextLayoutNativeEvent(event));
|
|
407
|
+
if (nextLayout.kind === 'static') {
|
|
408
|
+
setLayoutResult({
|
|
409
|
+
inputKey
|
|
410
|
+
});
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
if (nextLayout.kind === 'fallback') {
|
|
414
|
+
setLayoutResult({
|
|
415
|
+
fallbackReason: nextLayout.reason,
|
|
416
|
+
inputKey
|
|
417
|
+
});
|
|
418
|
+
warnOverlayTextFallbackOnce(warnedFallback, nextLayout.reason);
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
const change = compareOverlayTextLayouts(retainedLayout, nextLayout);
|
|
422
|
+
if (change === 'identical' && boundInputKey === inputKey) {
|
|
423
|
+
return;
|
|
424
|
+
}
|
|
425
|
+
setLayoutResult({
|
|
426
|
+
inputKey,
|
|
427
|
+
layout: nextLayout
|
|
428
|
+
});
|
|
429
|
+
}, [boundInputKey, inputKey, retainedLayout, text]);
|
|
430
|
+
if (text.trim().length === 0 || fallbackReason) {
|
|
431
|
+
return /*#__PURE__*/_jsx(OverlayTextFinalSource, {
|
|
432
|
+
containerProps: containerProps,
|
|
433
|
+
sourceAccessibilityProps: sourceAccessibilityProps,
|
|
434
|
+
textStyle: textStyle,
|
|
435
|
+
typographyProps: typographyProps,
|
|
436
|
+
children: children
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
440
|
+
...containerProps,
|
|
441
|
+
style: {
|
|
442
|
+
position: 'relative'
|
|
443
|
+
},
|
|
444
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
445
|
+
...sourceAccessibilityProps,
|
|
446
|
+
...typographyProps,
|
|
447
|
+
onTextLayout: onTextLayout,
|
|
448
|
+
style: [textStyle, SOURCE_LAYOUT_STYLE, createSourceTextMotionStyle(currentLayout, pendingMotion)],
|
|
449
|
+
children: children
|
|
450
|
+
}), retainedLayout ? /*#__PURE__*/_jsx(View, {
|
|
451
|
+
...HIDDEN_ACCESSIBILITY_PROPS,
|
|
452
|
+
pointerEvents: "none",
|
|
453
|
+
style: [OVERLAY_CONTAINER_STYLE, layoutPending ? PENDING_OVERLAY_CONTAINER_STYLE : undefined],
|
|
454
|
+
testID: createOverlayTestID(options.testIDPrefix),
|
|
455
|
+
children: retainedLayout.motionLines.map(line => {
|
|
456
|
+
const frameMotion = createTextMotionItemMotion(recipe, overlayStyleState.frame, delaySecondsByMotionIndex[line.motionIndex] ?? 0);
|
|
457
|
+
const revealContentMotion = createTextMotionItemMotion(recipe, overlayStyleState.revealContent, delaySecondsByMotionIndex[line.motionIndex] ?? 0);
|
|
458
|
+
if (!externalProgress) {
|
|
459
|
+
return /*#__PURE__*/_jsx(OverlayTextUncontrolledLine, {
|
|
460
|
+
controls: controls,
|
|
461
|
+
line: line,
|
|
462
|
+
maskTestID: createMaskTestID(options.testIDPrefix, line),
|
|
463
|
+
motionTestID: createMotionTestID(options.testIDPrefix, line),
|
|
464
|
+
paragraphTestID: createParagraphTestID(options.testIDPrefix, line),
|
|
465
|
+
playbackIdentity: retainedLayout.playbackSignature,
|
|
466
|
+
revealContentMotion: revealContentMotion,
|
|
467
|
+
textStyle: textStyle,
|
|
468
|
+
frameMotion: frameMotion,
|
|
469
|
+
typographyProps: typographyProps,
|
|
470
|
+
children: text
|
|
471
|
+
}, line.index);
|
|
472
|
+
}
|
|
473
|
+
return /*#__PURE__*/_jsx(OverlayTextControlledLine, {
|
|
474
|
+
controlledProgress: externalProgress,
|
|
475
|
+
controlledProgressPlan: createTextMotionControlledProgressPlan(line.motionIndex, delaySecondsByMotionIndex, totalTimelineSpan),
|
|
476
|
+
line: line,
|
|
477
|
+
maskTestID: createMaskTestID(options.testIDPrefix, line),
|
|
478
|
+
motionTestID: createMotionTestID(options.testIDPrefix, line),
|
|
479
|
+
paragraphTestID: createParagraphTestID(options.testIDPrefix, line),
|
|
480
|
+
revealContentMotion: revealContentMotion,
|
|
481
|
+
textStyle: textStyle,
|
|
482
|
+
frameMotion: frameMotion,
|
|
483
|
+
typographyProps: typographyProps,
|
|
484
|
+
children: text
|
|
485
|
+
}, line.index);
|
|
486
|
+
})
|
|
487
|
+
}) : null]
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
function OverlayTextRenderer({
|
|
491
|
+
children,
|
|
492
|
+
recipe,
|
|
493
|
+
textProps,
|
|
494
|
+
tokens
|
|
495
|
+
}) {
|
|
496
|
+
const reducedMotionEnabled = useReducedMotion();
|
|
497
|
+
const text = typeof children === 'string' ? children : '';
|
|
498
|
+
const textStyle = textProps?.style;
|
|
499
|
+
const policy = recipe.accessibility ?? parentLabelPolicy();
|
|
500
|
+
const accessibilityLabel = resolveAccessibleText(text, tokens);
|
|
501
|
+
const parentAccessibilityProps = createParentAccessibilityProps(policy, accessibilityLabel);
|
|
502
|
+
const sourceAccessibilityProps = createHiddenTokenAccessibilityProps(policy);
|
|
503
|
+
const containerProps = createContainerProps(textProps, parentAccessibilityProps);
|
|
504
|
+
const typographyProps = createTypographyProps(textProps);
|
|
505
|
+
const externalProgress = textProps?.progress;
|
|
506
|
+
const controls = textProps?.controls;
|
|
507
|
+
if (externalProgress && controls) {
|
|
508
|
+
throw new Error('@react-native-motion-kit/text-motion cannot receive both progress and controls. Use progress for raw app-owned values, or controls for event-driven playback.');
|
|
509
|
+
}
|
|
510
|
+
if (reducedMotionEnabled) {
|
|
511
|
+
return /*#__PURE__*/_jsx(OverlayTextFinalSource, {
|
|
512
|
+
containerProps: containerProps,
|
|
513
|
+
sourceAccessibilityProps: sourceAccessibilityProps,
|
|
514
|
+
textStyle: textStyle,
|
|
515
|
+
typographyProps: typographyProps,
|
|
516
|
+
children: children
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
return /*#__PURE__*/_jsx(OverlayTextActiveRenderer, {
|
|
520
|
+
containerProps: containerProps,
|
|
521
|
+
recipe: recipe,
|
|
522
|
+
sourceAccessibilityProps: sourceAccessibilityProps,
|
|
523
|
+
text: text,
|
|
524
|
+
textProps: textProps,
|
|
525
|
+
textStyle: textStyle,
|
|
526
|
+
typographyProps: typographyProps,
|
|
527
|
+
children: children
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
OverlayTextRenderer.displayName = 'OverlayTextRenderer';
|
|
531
|
+
return OverlayTextRenderer;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
/** Render one native paragraph with animated masks for each actual rendered line. */
|
|
535
|
+
export function overlayText(options = {}) {
|
|
536
|
+
return createTextMotionRendererHandle({
|
|
537
|
+
kind: 'overlayText',
|
|
538
|
+
capabilities: [LINE_MASK_CAPABILITY, 'style-transform'],
|
|
539
|
+
motionUnit: 'rendered-line',
|
|
540
|
+
Component: createOverlayTextRendererComponent(options)
|
|
541
|
+
});
|
|
542
|
+
}
|
|
543
|
+
//# sourceMappingURL=overlayText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useCallback","useLayoutEffect","useRef","useState","StyleSheet","Text","View","createAnimatedComponent","useAnimatedStyle","useReducedMotion","useSharedValue","createHiddenTokenAccessibilityProps","createParentAccessibilityProps","parentLabelPolicy","resolveAccessibleText","createTextMotionRendererHandle","createTextMotionRendererCapability","useNativeTextControlsPlayback","areNativeTextPlaybackRunsEqual","createNativeTextPlaybackRun","compareOverlayTextLayouts","createOverlayTextLayout","clampTextMotionProgress","createTextMotionControlledProgressPlan","createTextMotionControlledTimelineSpan","createTextMotionDelaySecondsByItemIndex","createTextMotionItemMotion","createOverlayTextStyleTransformStatePair","createTextMotionProgressAnimation","createTextMotionStyleTransformStatePair","readTextMotionProgressForAnimatedStyle","shouldRenderTextMotionFinalState","jsx","_jsx","jsxs","_jsxs","AnimatedView","LINE_MASK_CAPABILITY","HIDDEN_ACCESSIBILITY_PROPS","accessibilityElementsHidden","accessible","importantForAccessibility","OVERLAY_CONTAINER_STYLE","absoluteFill","pointerEvents","PENDING_OVERLAY_CONTAINER_STYLE","opacity","SOURCE_LAYOUT_STYLE","alignSelf","READY_SOURCE_STYLE","MASK_STYLE","left","overflow","position","right","LINE_ANIMATION_STYLE","top","width","LINE_CONTENT_CLIP_STYLE","PARAGRAPH_COPY_STYLE","OVERLAY_TEXT_SHAPING_STYLE_KEYS","OVERLAY_TEXT_BOX_LAYOUT_STYLE_KEYS","OVERLAY_TEXT_LAYOUT_STYLE_KEYS","createContainerProps","textProps","parentAccessibilityProps","accessibilityActions","accessibilityHint","accessibilityLabel","accessibilityLanguage","accessibilityRole","accessibilityState","accessibilityValue","nativeID","onAccessibilityAction","testID","createTypographyProps","allowFontScaling","maxFontSizeMultiplier","OverlayTextFinalSource","children","containerProps","sourceAccessibilityProps","textStyle","typographyProps","style","createInitialTextStyle","tokenMotion","initial","transform","translateX","translateY","scale","createSourceTextMotionStyle","layout","pendingMotion","createLineFrameStyle","line","height","y","transformOrigin","x","isSerializableRecord","value","Array","isArray","createStableLayoutInputValue","map","entries","Object","sort","localeCompare","fromEntries","key","nestedValue","createOverlayTextLayoutStyleSnapshot","flattenedStyle","flatten","reduce","snapshot","undefined","createOverlayTextInputKey","text","JSON","stringify","createParagraphCopyOffset","OverlayTextLineMask","frameAnimatedStyle","maskTestID","motionTestID","paragraphTestID","revealContentAnimatedStyle","collapsable","useOverlayTextAnimatedStyle","options","controlled","progress","renderFinalState","initialOpacity","initialScale","initialTranslateX","initialTranslateY","targetOpacity","target","targetScale","targetTranslateX","targetTranslateY","pulseScale","itemDelaySeconds","controlledProgressPlan","totalTimelineSpan","current","clampedCurrent","baseScale","pulseProgress","Math","abs","pulseMultiplier","OverlayTextUncontrolledLine","controls","playbackIdentity","revealContentMotion","frameMotion","reducedMotionEnabled","reducedMotion","playbackRun","previousPlaybackRun","createProgressAnimation","OverlayTextControlledLine","controlledProgress","warnOverlayTextFallbackOnce","warnedRef","reason","__DEV__","console","warn","isTextLayoutEventRecord","readTextLayoutNativeEvent","event","nativeEvent","createMaskTestID","prefix","motionIndex","createParagraphTestID","createMotionTestID","createOverlayTestID","createOverlayTextRendererComponent","OverlayTextActiveRenderer","recipe","inputKey","styleState","effects","overlayStyleState","delaySecondsByLineIndex","layoutResult","setLayoutResult","boundInputKey","retainedLayout","currentLayout","fallbackReason","layoutPending","Boolean","warnedFallback","externalProgress","delaySecondsByMotionIndex","motionCount","onTextLayout","nextLayout","kind","change","trim","length","testIDPrefix","motionLines","frame","revealContent","playbackSignature","index","OverlayTextRenderer","tokens","policy","accessibility","Error","displayName","overlayText","capabilities","motionUnit","Component"],"sourceRoot":"../../../src","sources":["renderers/overlayText.tsx"],"mappings":";;AAAA,SACEA,WAAW,EACXC,eAAe,EACfC,MAAM,EACNC,QAAQ,QAIH,OAAO;AACd,SACEC,UAAU,EACVC,IAAI,EACJC,IAAI,QAMC,cAAc;AACrB,SACEC,uBAAuB,EACvBC,gBAAgB,EAChBC,gBAAgB,EAChBC,cAAc,QAET,yBAAyB;AAUhC,SACEC,mCAAmC,EACnCC,8BAA8B,EAC9BC,iBAAiB,EACjBC,qBAAqB,QAChB,2BAAkB;AACzB,SAASC,8BAA8B,QAAQ,0BAAuB;AACtE,SAASC,kCAAkC,QAAQ,sBAAmB;AACtE,SAASC,6BAA6B,QAAQ,yBAAsB;AACpE,SACEC,8BAA8B,EAC9BC,2BAA2B,QAEtB,yBAAsB;AAC7B,SACEC,yBAAyB,EACzBC,uBAAuB,QAGlB,wBAAqB;AAC5B,SACEC,uBAAuB,EACvBC,sCAAsC,EACtCC,sCAAsC,EACtCC,uCAAuC,EACvCC,0BAA0B,EAC1BC,wCAAwC,EACxCC,iCAAiC,EACjCC,uCAAuC,EACvCC,sCAAsC,EACtCC,gCAAgC,QAG3B,qBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA0G1B,MAAMC,YAAY,GAAG7B,uBAAuB,CAACD,IAAI,CAAC;AAClD,MAAM+B,oBAAkD,GACtDrB,kCAAkC,CAAC,WAAW,CAAC;AACjD,MAAMsB,0BAA0B,GAAG;EACjCC,2BAA2B,EAAE,IAAI;EACjCC,UAAU,EAAE,KAAK;EACjBC,yBAAyB,EAAE;AAC7B,CAAU;AACV,MAAMC,uBAAuB,GAAG;EAC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