@hzblj/kara-components 0.11.0 → 0.12.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 +28 -0
- package/lib/module/atoms/box/box.js +3 -0
- package/lib/module/atoms/box/box.js.map +1 -1
- package/lib/module/atoms/box/index.js +0 -1
- package/lib/module/atoms/box/index.js.map +1 -1
- package/lib/module/atoms/index.js +1 -0
- package/lib/module/atoms/index.js.map +1 -1
- package/lib/module/atoms/pressable/pressable.js +62 -15
- package/lib/module/atoms/pressable/pressable.js.map +1 -1
- package/lib/module/atoms/rn-text/rn-text.js +66 -26
- package/lib/module/atoms/rn-text/rn-text.js.map +1 -1
- package/lib/module/atoms/skeleton/skeleton.js +3 -3
- package/lib/module/atoms/skeleton/skeleton.js.map +1 -1
- package/lib/module/atoms/stagger/index.js +5 -0
- package/lib/module/atoms/stagger/index.js.map +1 -0
- package/lib/module/atoms/stagger/stagger.js +102 -0
- package/lib/module/atoms/stagger/stagger.js.map +1 -0
- package/lib/module/atoms/stagger/stagger.types.js +4 -0
- package/lib/module/atoms/stagger/stagger.types.js.map +1 -0
- package/lib/module/molecules/scroll-edge-container/scroll-edge-container.android.js +3 -3
- package/lib/module/molecules/scroll-edge-container/scroll-edge-container.android.js.map +1 -1
- package/lib/module/organisms/snackbar/snackbar.js +32 -20
- package/lib/module/organisms/snackbar/snackbar.js.map +1 -1
- package/lib/typescript/atoms/box/box.d.ts +3 -0
- package/lib/typescript/atoms/box/index.d.ts +0 -1
- package/lib/typescript/atoms/index.d.ts +1 -0
- package/lib/typescript/atoms/pressable/pressable.types.d.ts +4 -3
- package/lib/typescript/atoms/rn-text/rn-text.types.d.ts +7 -4
- package/lib/typescript/atoms/stagger/index.d.ts +2 -0
- package/lib/typescript/atoms/stagger/stagger.d.ts +2 -0
- package/lib/typescript/atoms/stagger/stagger.types.d.ts +32 -0
- package/lib/typescript/organisms/snackbar/snackbar.types.d.ts +6 -8
- package/package.json +4 -4
- package/src/atoms/box/box.tsx +3 -0
- package/src/atoms/box/index.ts +0 -1
- package/src/atoms/index.ts +1 -0
- package/src/atoms/pressable/pressable.tsx +162 -106
- package/src/atoms/pressable/pressable.types.ts +4 -2
- package/src/atoms/rn-text/rn-text.tsx +101 -32
- package/src/atoms/rn-text/rn-text.types.ts +7 -3
- package/src/atoms/skeleton/skeleton.tsx +3 -3
- package/src/atoms/stagger/index.ts +2 -0
- package/src/atoms/stagger/stagger.tsx +98 -0
- package/src/atoms/stagger/stagger.types.ts +35 -0
- package/src/molecules/scroll-edge-container/scroll-edge-container.android.tsx +3 -3
- package/src/organisms/snackbar/snackbar.tsx +20 -40
- package/src/organisms/snackbar/snackbar.types.ts +6 -8
- package/lib/module/atoms/box/a-box.js +0 -6
- package/lib/module/atoms/box/a-box.js.map +0 -1
- package/lib/module/motion.js +0 -19
- package/lib/module/motion.js.map +0 -1
- package/lib/typescript/atoms/box/a-box.d.ts +0 -49
- package/lib/typescript/motion.d.ts +0 -8
- package/src/atoms/box/a-box.ts +0 -5
- package/src/motion.ts +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @hzblj/kara-components
|
|
2
2
|
|
|
3
|
+
## 0.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#28](https://github.com/hzblj/kara-ui/pull/28) [`84ddbac`](https://github.com/hzblj/kara-ui/commit/84ddbacba9f35d578fa7dfce3e9f696ae09771f8) Thanks [@hzblj](https://github.com/hzblj)! - Motion in the engine. Every `sx` view (`Box`, `Image`, anything wrapped with `sx()`), `RnText` and `Pressable` take `entering`, `exiting`, `layout` and `animate`, and become a Reanimated view by themselves when they do, or when their `style` comes from `useAnimatedStyle`. Without them a `Box` stays a plain `View` and costs nothing more. `ABox` is gone: use `Box`, and pass `animated` to one whose animated style only arrives after it mounts.
|
|
8
|
+
|
|
9
|
+
- `entering` and `exiting` take a preset named by the way the view moves (`fade`, `fadeUp`, `fadeDown`, `scale`), a preset adjusted (`{preset: 'scale', duration: 'slow', delay: 120}`, or with a `spring`), or Reanimated's own builder. Arriving takes `fast` and leaving `quick`; with motion reduced every preset fades.
|
|
10
|
+
- `animate` carries a change of the colours, `opacity` and the transform over to the new value on the UI thread, through Reanimated's CSS transitions: `animate`, `animate="slow"`, `animate="snappy"` or a config whose `keys` can add sizes, radii and blur. On iOS the UIKit colours a transition cannot read are resolved to the values UIKit draws (`resolveSystemColor` in `@hzblj/kara-native`, a native rebuild picks it up), so a selected row blends on both platforms.
|
|
11
|
+
- `layout` moves a view into its new place on the `smooth` spring, or a spring token, a timed config or Reanimated's own transition. It snaps with motion reduced.
|
|
12
|
+
- The native views take `animate` too: SwiftUI's `.animation(_:value:)` on iOS, animated `graphicsLayer` values, a `background` animation spec and `animateContentSize` on Android, on the same tokens.
|
|
13
|
+
|
|
14
|
+
New `Stagger`: a `Box` whose children arrive one after another, a step (`interval`, `stagger` by default) apart. Only the children that arrive together take turns, so the next page of a list staggers while an item added on its own appears at once. A `Box`, `RnText` or `Pressable` child takes the motion directly; any other is wrapped in a `Box`.
|
|
15
|
+
|
|
16
|
+
Springs as tokens: `springs` in `@hzblj/kara-theme` holds SwiftUI's set (`interactive`, `smooth`, `snappy`, `bouncy`), a perceptual duration and a bounce each, and `springPhysics` turns one into the physics every platform runs, so a token is one curve in Reanimated, in a CSS transition, in SwiftUI and in Compose. `spring(name)` and `timing(size, curve)` (moved here from the components) give `withSpring` and `withTiming` configs, and `useEntering`, `useExiting` and `useLayoutTransition` hand kara's presets to a Reanimated view of your own.
|
|
17
|
+
|
|
18
|
+
`Pressable` presses on springs, down on `interactive` and back on `smooth`, so a press let go halfway eases back instead of turning on the spot. `Snackbar`'s `entering` and `exiting` take the presets too.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- [#28](https://github.com/hzblj/kara-ui/pull/28) [`84ddbac`](https://github.com/hzblj/kara-ui/commit/84ddbacba9f35d578fa7dfce3e9f696ae09771f8) Thanks [@hzblj](https://github.com/hzblj)! - Faster styling. A resolved React Native style carries only the keys a call site set, where it used to carry forty-odd more as `undefined`, each walked on every mount. Views with the same native `sx` share one resolved modifier array, as they already shared a style, and `sx()` splits its props, the motion props included, in a single walk. `RnText` reads the user's text size from one subscription at the root (`useFontScale`, provided with the breakpoint) instead of one per text, and shares its text style the way `sx` shares its own.
|
|
23
|
+
|
|
24
|
+
`RnText` no longer loses its last line on iOS when React Native lays the paragraph out a hair shorter than its lines need, which happened depending on where the text sat on the page.
|
|
25
|
+
|
|
26
|
+
- Updated dependencies [[`84ddbac`](https://github.com/hzblj/kara-ui/commit/84ddbacba9f35d578fa7dfce3e9f696ae09771f8), [`84ddbac`](https://github.com/hzblj/kara-ui/commit/84ddbacba9f35d578fa7dfce3e9f696ae09771f8), [`84ddbac`](https://github.com/hzblj/kara-ui/commit/84ddbacba9f35d578fa7dfce3e9f696ae09771f8)]:
|
|
27
|
+
- @hzblj/kara-sx@0.12.0
|
|
28
|
+
- @hzblj/kara-theme@0.12.0
|
|
29
|
+
- @hzblj/kara-native@0.12.0
|
|
30
|
+
|
|
3
31
|
## 0.11.0
|
|
4
32
|
|
|
5
33
|
### Minor Changes
|
|
@@ -6,6 +6,9 @@ import { View } from 'react-native';
|
|
|
6
6
|
/**
|
|
7
7
|
* A React Native `View` that takes the design system's `sx` props. The `sx()` HOC is the whole
|
|
8
8
|
* implementation — Box is just its first caller, and any other style-taking component gets the same.
|
|
9
|
+
*
|
|
10
|
+
* That includes motion: `entering`, `exiting`, `layout`, `animate` or an animated `style` make it an `Animated.View`
|
|
11
|
+
* from its first frame, and without them it stays a plain `View`.
|
|
9
12
|
*/
|
|
10
13
|
export const Box = sx(View);
|
|
11
14
|
//# sourceMappingURL=box.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["sx","View","Box"],"sourceRoot":"../../../../src","sources":["atoms/box/box.tsx"],"mappings":";;AAAA,SAAQA,EAAE,QAAO,gBAAgB;AACjC,SAAQC,IAAI,QAAO,cAAc;;AAEjC;AACA;AACA;AACA;AACA,OAAO,MAAMC,GAAG,GAAGF,EAAE,CAACC,IAAI,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["sx","View","Box"],"sourceRoot":"../../../../src","sources":["atoms/box/box.tsx"],"mappings":";;AAAA,SAAQA,EAAE,QAAO,gBAAgB;AACjC,SAAQC,IAAI,QAAO,cAAc;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,GAAG,GAAGF,EAAE,CAACC,IAAI,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["atoms/box/index.ts"],"mappings":";;AAAA,cAAc,
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["atoms/box/index.ts"],"mappings":";;AAAA,cAAc,UAAO;AACrB,cAAc,gBAAa","ignoreList":[]}
|
|
@@ -34,6 +34,7 @@ export * from "./segmented-control/index.js";
|
|
|
34
34
|
export * from "./skeleton/index.js";
|
|
35
35
|
export * from "./slider/index.js";
|
|
36
36
|
export * from "./spacer/index.js";
|
|
37
|
+
export * from "./stagger/index.js";
|
|
37
38
|
export * from "./surface/index.js";
|
|
38
39
|
export * from "./switch/index.js";
|
|
39
40
|
export * from "./text/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["atoms/index.ts"],"mappings":";;AAAA,cAAc,+BAAsB;AACpC,cAAc,mBAAU;AACxB,cAAc,kBAAS;AACvB,cAAc,sBAAa;AAC3B,cAAc,gBAAO;AACrB,cAAc,mBAAU;AACxB,cAAc,iBAAQ;AACtB,cAAc,qBAAY;AAC1B,cAAc,iBAAQ;AACtB,cAAc,yBAAgB;AAC9B,cAAc,wBAAe;AAC7B,cAAc,oBAAW;AACzB,cAAc,gBAAO;AACrB,cAA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C,cAAc,qBAAY;AAC1B,cAAc,mBAAU;AACxB,cAAc,mBAAU;AACxB,cAAc,oBAAW;AACzB,cAAc,oBAAW;AACzB,cAAc,mBAAU;AACxB,cAAc,iBAAQ;AACtB,cAAc,uBAAc;AAC5B,cAAc,oBAAW;AACzB,cAAc,oBAAW","ignoreList":[]}
|
|
@@ -1,24 +1,59 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { accessibilityProps, splitAccessibility,
|
|
4
|
-
import { opacity, useAppTheme, useReducedMotion, withOpacity } from '@hzblj/kara-theme';
|
|
3
|
+
import { accessibilityProps, markMotionComponent, splitAccessibility, spring, timing, useSplitSxMotion } from '@hzblj/kara-sx';
|
|
4
|
+
import { opacity, springs, useAppTheme, useReducedMotion, withOpacity } from '@hzblj/kara-theme';
|
|
5
5
|
import { useCallback, useMemo } from 'react';
|
|
6
6
|
import { Platform, Pressable as RNPressable } from 'react-native';
|
|
7
|
-
import Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
|
|
7
|
+
import Animated, { useAnimatedStyle, useSharedValue, withSpring, withTiming } from 'react-native-reanimated';
|
|
8
8
|
import { haptics } from "../../haptics/index.js";
|
|
9
|
-
import { timing } from "../../motion.js";
|
|
10
9
|
import { splitForRipple } from "../../ripple-clip.js";
|
|
11
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
/**
|
|
12
|
+
* The scale follows the finger on springs, as UIKit's own presses do: down on `interactive`, back on `smooth`, neither
|
|
13
|
+
* with a bounce (a press is not a toy). A spring keeps the speed it has, so a tap let go halfway down eases back instead
|
|
14
|
+
* of turning on the spot, which a timed curve restarted from rest cannot do.
|
|
15
|
+
*/
|
|
16
|
+
const SCALE_IN = spring('interactive');
|
|
17
|
+
const SCALE_OUT = spring('smooth');
|
|
15
18
|
|
|
16
19
|
/** A dim comes in at once and leaves a little slower, as UIKit's own highlight does. */
|
|
17
20
|
const DIM_IN = timing('micro', 'out');
|
|
18
21
|
const DIM_OUT = timing('quick', 'out');
|
|
19
22
|
const PLATFORM_EFFECT = Platform.OS === 'ios' ? 'scale' : 'none';
|
|
20
23
|
const AnimatedPressable = Animated.createAnimatedComponent(RNPressable);
|
|
21
|
-
|
|
24
|
+
|
|
25
|
+
/** What `animate` covers by default, less the transform. */
|
|
26
|
+
const VISUAL_KEYS = ['bg', 'borderColor', 'opacity'];
|
|
27
|
+
const TRANSFORM_KEYS = new Set(['offsetX', 'offsetY', 'rotate', 'scale']);
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The press scale owns the transform, so `animate` leaves it alone: a transition on the same transform would take it
|
|
31
|
+
* back from the press at every re-render. A duration or spring token keeps its timing.
|
|
32
|
+
*/
|
|
33
|
+
const withoutTransform = animate => {
|
|
34
|
+
if (animate === undefined || animate === false) {
|
|
35
|
+
return animate;
|
|
36
|
+
}
|
|
37
|
+
if (animate === true) {
|
|
38
|
+
return {
|
|
39
|
+
keys: VISUAL_KEYS
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
if (typeof animate === 'string') {
|
|
43
|
+
return animate in springs ? {
|
|
44
|
+
keys: VISUAL_KEYS,
|
|
45
|
+
spring: animate
|
|
46
|
+
} : {
|
|
47
|
+
duration: animate,
|
|
48
|
+
keys: VISUAL_KEYS
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
...animate,
|
|
53
|
+
keys: (animate.keys ?? VISUAL_KEYS).filter(key => !TRANSFORM_KEYS.has(key))
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
export const Pressable = markMotionComponent(({
|
|
22
57
|
children,
|
|
23
58
|
disabled = false,
|
|
24
59
|
haptic = false,
|
|
@@ -31,10 +66,14 @@ export const Pressable = ({
|
|
|
31
66
|
...props
|
|
32
67
|
}) => {
|
|
33
68
|
const [accessibility, ownProps] = splitAccessibility(props);
|
|
34
|
-
const [resolved, rest] = useSplitSx(ownProps);
|
|
35
69
|
const reduced = useReducedMotion();
|
|
36
70
|
// With motion reduced the press still shows, and nothing moves: a scale dims instead.
|
|
37
71
|
const effect = reduced && pressEffect === 'scale' ? 'opacity' : pressEffect;
|
|
72
|
+
// Always a Reanimated view (the press effect is one), so the motion props need no latch here.
|
|
73
|
+
const [resolved, motion, rest] = useSplitSxMotion(effect === 'scale' && ownProps.animate !== undefined ? {
|
|
74
|
+
...ownProps,
|
|
75
|
+
animate: withoutTransform(ownProps.animate)
|
|
76
|
+
} : ownProps);
|
|
38
77
|
// 0 at rest, 1 held: one value drives whichever effect is picked, so a change of effect needs no second animation.
|
|
39
78
|
const pressed = useSharedValue(0);
|
|
40
79
|
const feedback = haptic === true ? 'light' : haptic || undefined;
|
|
@@ -65,15 +104,17 @@ export const Pressable = ({
|
|
|
65
104
|
|
|
66
105
|
// The finger is down: the Taptic Engine has until the release to wake, so the haptic lands with the press.
|
|
67
106
|
const onPressIn = useCallback(() => {
|
|
68
|
-
if (effect
|
|
69
|
-
pressed.value =
|
|
107
|
+
if (effect === 'scale') {
|
|
108
|
+
pressed.value = withSpring(1, SCALE_IN);
|
|
109
|
+
} else if (effect === 'opacity') {
|
|
110
|
+
pressed.value = withTiming(1, DIM_IN);
|
|
70
111
|
}
|
|
71
112
|
if (feedback) {
|
|
72
113
|
haptics.prepare(feedback);
|
|
73
114
|
}
|
|
74
115
|
}, [effect, feedback, pressed]);
|
|
75
116
|
const onPressOut = useCallback(() => {
|
|
76
|
-
pressed.value =
|
|
117
|
+
pressed.value = effect === 'scale' ? withSpring(0, SCALE_OUT) : withTiming(0, DIM_OUT);
|
|
77
118
|
}, [effect, pressed]);
|
|
78
119
|
const onPressWithHaptic = useCallback(() => {
|
|
79
120
|
if (feedback) {
|
|
@@ -83,7 +124,10 @@ export const Pressable = ({
|
|
|
83
124
|
}, [feedback, onPress]);
|
|
84
125
|
if (androidStyle) {
|
|
85
126
|
return /*#__PURE__*/_jsx(Animated.View, {
|
|
86
|
-
|
|
127
|
+
entering: motion.entering,
|
|
128
|
+
exiting: motion.exiting,
|
|
129
|
+
layout: motion.layout,
|
|
130
|
+
style: [androidStyle.outer, motion.style, rStyle],
|
|
87
131
|
children: /*#__PURE__*/_jsx(RNPressable, {
|
|
88
132
|
...a11y,
|
|
89
133
|
android_ripple: ripple,
|
|
@@ -102,14 +146,17 @@ export const Pressable = ({
|
|
|
102
146
|
return /*#__PURE__*/_jsx(AnimatedPressable, {
|
|
103
147
|
...a11y,
|
|
104
148
|
disabled: disabled,
|
|
149
|
+
entering: motion.entering,
|
|
150
|
+
exiting: motion.exiting,
|
|
105
151
|
hitSlop: 8,
|
|
152
|
+
layout: motion.layout,
|
|
106
153
|
onPress: onPressWithHaptic,
|
|
107
154
|
onPressIn: onPressIn,
|
|
108
155
|
onPressOut: onPressOut,
|
|
109
|
-
style: [resolved, rStyle],
|
|
156
|
+
style: [resolved, motion.style, rStyle],
|
|
110
157
|
testID: testID,
|
|
111
158
|
...rest,
|
|
112
159
|
children: children
|
|
113
160
|
});
|
|
114
|
-
};
|
|
161
|
+
});
|
|
115
162
|
//# sourceMappingURL=pressable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["accessibilityProps","splitAccessibility","
|
|
1
|
+
{"version":3,"names":["accessibilityProps","markMotionComponent","splitAccessibility","spring","timing","useSplitSxMotion","opacity","springs","useAppTheme","useReducedMotion","withOpacity","useCallback","useMemo","Platform","Pressable","RNPressable","Animated","useAnimatedStyle","useSharedValue","withSpring","withTiming","haptics","splitForRipple","jsx","_jsx","SCALE_IN","SCALE_OUT","DIM_IN","DIM_OUT","PLATFORM_EFFECT","OS","AnimatedPressable","createAnimatedComponent","VISUAL_KEYS","TRANSFORM_KEYS","Set","withoutTransform","animate","undefined","keys","duration","filter","key","has","children","disabled","haptic","onPress","pressEffect","pressedOpacity","pressedScale","ripple","withRipple","testID","props","accessibility","ownProps","reduced","effect","resolved","motion","rest","pressed","feedback","a11y","dimmed","theme","isAndroid","rStyle","transform","scale","value","color","String","foreground","androidStyle","onPressIn","prepare","onPressOut","onPressWithHaptic","play","View","entering","exiting","layout","style","outer","android_ripple","hitSlop","inner"],"sourceRoot":"../../../../src","sources":["atoms/pressable/pressable.tsx"],"mappings":";;AAAA,SAEEA,kBAAkB,EAClBC,mBAAmB,EAEnBC,kBAAkB,EAClBC,MAAM,EACNC,MAAM,EACNC,gBAAgB,QACX,gBAAgB;AACvB,SAAQC,OAAO,EAAmBC,OAAO,EAAEC,WAAW,EAAEC,gBAAgB,EAAEC,WAAW,QAAO,mBAAmB;AAC/G,SAAQC,WAAW,EAAEC,OAAO,QAAO,OAAO;AAC1C,SAAQC,QAAQ,EAAEC,SAAS,IAAIC,WAAW,QAAuB,cAAc;AAC/E,OAAOC,QAAQ,IAAGC,gBAAgB,EAAEC,cAAc,EAAEC,UAAU,EAAEC,UAAU,QAAO,yBAAyB;AAE1G,SAAQC,OAAO,QAAO,wBAAe;AACrC,SAAQC,cAAc,QAAO,sBAAmB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAGhD;AACA;AACA;AACA;AACA;AACA,MAAMC,QAAQ,GAAGtB,MAAM,CAAC,aAAa,CAAC;AACtC,MAAMuB,SAAS,GAAGvB,MAAM,CAAC,QAAQ,CAAC;;AAElC;AACA,MAAMwB,MAAM,GAAGvB,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC;AACrC,MAAMwB,OAAO,GAAGxB,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC;AAEtC,MAAMyB,eAAe,GAAGhB,QAAQ,CAACiB,EAAE,KAAK,KAAK,GAAG,OAAO,GAAG,MAAM;AAEhE,MAAMC,iBAAiB,GAAGf,QAAQ,CAACgB,uBAAuB,CAACjB,WAAW,CAAC;;AAEvE;AACA,MAAMkB,WAAqC,GAAG,CAAC,IAAI,EAAE,aAAa,EAAE,SAAS,CAAC;AAE9E,MAAMC,cAAc,GAAG,IAAIC,GAAG,CAAgB,CAAC,SAAS,E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AppTheme } from '@hzblj/kara-theme';
|
|
5
|
-
import { Text as RNText
|
|
3
|
+
import { isAnimatedStyle, markMotionComponent, themeKey, useAnimatedLatch, useSplitSxMotion } from '@hzblj/kara-sx';
|
|
4
|
+
import { MAX_FONT_SCALE, useAppTheme, useFontScale } from '@hzblj/kara-theme';
|
|
5
|
+
import { Platform, Text as RNText } from 'react-native';
|
|
6
|
+
import Animated from 'react-native-reanimated';
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
|
|
8
|
+
/**
|
|
9
|
+
* A hundredth of a point off every line on iOS, which no one can see and which keeps the last line on screen. React
|
|
10
|
+
* Native measures a paragraph and rounds the height up to the pixel grid, then draws it into the frame Yoga laid out,
|
|
11
|
+
* and that frame can come back a hair short of the exact height (`53.9998` for three 18 pt lines, depending on where
|
|
12
|
+
* the text sits on the page). With `lineHeight` fixed, the lines need exactly 54 and the text container drops the last
|
|
13
|
+
* one, cutting the line before it off mid-word. Lines a hair shorter leave the rounding room to absorb the error.
|
|
14
|
+
*/
|
|
15
|
+
const LINE_HEIGHT_SLACK = Platform.OS === 'ios' ? 0.01 : 0;
|
|
16
|
+
|
|
17
|
+
/** Variants, colours and alignments are few, so the text half of the style is shared like the `sx` half. */
|
|
18
|
+
const MAX_TEXT_STYLES = 512;
|
|
19
|
+
const textStyles = new Map();
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The variant at the user's text size, in its colour. React Native scales `fontSize` for the user's setting but leaves
|
|
23
|
+
* `lineHeight` alone, so a grown glyph ends up in an ungrown line and clips. Scaling it here by the same factor keeps
|
|
24
|
+
* the ratio the variant was designed at, and by the same ceiling `maxFontSizeMultiplier` caps the glyph with
|
|
25
|
+
* (`useFontScale` is capped already), so the two cannot disagree.
|
|
26
|
+
*
|
|
27
|
+
* The native tiers need none of this: SwiftUI's `lineSpacing` is extra space *on top of* the font's own line
|
|
28
|
+
* height, which scales with it, and Compose reads `lineHeight` in `sp`.
|
|
29
|
+
*/
|
|
30
|
+
const textStyle = (theme, variant, color, align, fontScale) => {
|
|
31
|
+
const key = `${themeKey(theme)}|${variant}|${color}|${align}|${fontScale}`;
|
|
32
|
+
const existing = textStyles.get(key);
|
|
33
|
+
if (existing) {
|
|
34
|
+
return existing;
|
|
35
|
+
}
|
|
36
|
+
if (textStyles.size >= MAX_TEXT_STYLES) {
|
|
37
|
+
textStyles.clear();
|
|
38
|
+
}
|
|
39
|
+
const typography = theme.typography[variant];
|
|
40
|
+
const style = {
|
|
41
|
+
...typography,
|
|
42
|
+
color: theme.color(color),
|
|
43
|
+
lineHeight: typography.lineHeight * fontScale - LINE_HEIGHT_SLACK
|
|
44
|
+
};
|
|
45
|
+
if (align) {
|
|
46
|
+
style.textAlign = align;
|
|
47
|
+
}
|
|
48
|
+
textStyles.set(key, style);
|
|
49
|
+
return style;
|
|
50
|
+
};
|
|
51
|
+
export const RnText = markMotionComponent(({
|
|
8
52
|
align,
|
|
9
53
|
color = 'content.primary',
|
|
54
|
+
style,
|
|
10
55
|
variant = 'body',
|
|
11
56
|
...props
|
|
12
57
|
}) => {
|
|
13
58
|
const theme = useAppTheme();
|
|
59
|
+
const fontScale = useFontScale();
|
|
14
60
|
// A view style, which a text accepts whole — only React Native's types disagree, on `userSelect`'s width.
|
|
15
|
-
const [sx, rest] =
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const lineHeight = style.lineHeight * Math.min(fontScale, MAX_FONT_SCALE);
|
|
30
|
-
return /*#__PURE__*/_jsx(RNText, {
|
|
61
|
+
const [sx, motion, rest] = useSplitSxMotion(props);
|
|
62
|
+
const animated = useAnimatedLatch(motion.animated || isAnimatedStyle(style), 'RnText');
|
|
63
|
+
const text = textStyle(theme, variant, color, align, fontScale);
|
|
64
|
+
if (!animated) {
|
|
65
|
+
return /*#__PURE__*/_jsx(RNText, {
|
|
66
|
+
maxFontSizeMultiplier: MAX_FONT_SCALE,
|
|
67
|
+
style: [text, sx, style],
|
|
68
|
+
...rest
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
return /*#__PURE__*/_jsx(Animated.Text, {
|
|
72
|
+
entering: motion.entering,
|
|
73
|
+
exiting: motion.exiting,
|
|
74
|
+
layout: motion.layout,
|
|
31
75
|
maxFontSizeMultiplier: MAX_FONT_SCALE,
|
|
32
|
-
style: [
|
|
33
|
-
color: theme.color(color),
|
|
34
|
-
lineHeight,
|
|
35
|
-
textAlign: align
|
|
36
|
-
}],
|
|
76
|
+
style: [text, sx, motion.style, style],
|
|
37
77
|
...rest
|
|
38
78
|
});
|
|
39
|
-
};
|
|
79
|
+
});
|
|
40
80
|
//# sourceMappingURL=rn-text.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["isAnimatedStyle","markMotionComponent","themeKey","useAnimatedLatch","useSplitSxMotion","MAX_FONT_SCALE","useAppTheme","useFontScale","Platform","Text","RNText","Animated","jsx","_jsx","LINE_HEIGHT_SLACK","OS","MAX_TEXT_STYLES","textStyles","Map","textStyle","theme","variant","color","align","fontScale","key","existing","get","size","clear","typography","style","lineHeight","textAlign","set","RnText","props","sx","motion","rest","animated","text","maxFontSizeMultiplier","entering","exiting","layout"],"sourceRoot":"../../../../src","sources":["atoms/rn-text/rn-text.tsx"],"mappings":";;AAAA,SACEA,eAAe,EACfC,mBAAmB,EAEnBC,QAAQ,EACRC,gBAAgB,EAChBC,gBAAgB,QACX,gBAAgB;AACvB,SAEEC,cAAc,EAGdC,WAAW,EACXC,YAAY,QACP,mBAAmB;AAC1B,SAAQC,QAAQ,EAAEC,IAAI,IAAIC,MAAM,QAAuC,cAAc;AACrF,OAAOC,QAAQ,MAAM,yBAAyB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAI9C;AACA;AAC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EACtF,MAAMhB,KAAK,GAAGd,WAAW,CAAC,CAAC;EAC3B,MAAMkB,SAAS,GAAGjB,YAAY,CAAC,CAAC;EAChC;EACA,MAAM,CAAC8B,EAAE,EAAEC,MAAM,EAAEC,IAAI,CAAC,GAAGnC,gBAAgB,CAACgC,KAAK,CAAmD;EACpG,MAAMI,QAAQ,GAAGrC,gBAAgB,CAACmC,MAAM,CAACE,QAAQ,IAAIxC,eAAe,CAAC+B,KAAK,CAAC,EAAE,QAAQ,CAAC;EACtF,MAAMU,IAAI,GAAGtB,SAAS,CAACC,KAAK,EAAEC,OAAO,EAAEC,KAAK,EAAEC,KAAK,EAAEC,SAAS,CAAC;EAE/D,IAAI,CAACgB,QAAQ,EAAE;IACb,oBACE3B,IAAA,CAACH,MAAM;MAACgC,qBAAqB,EAAErC,cAAe;MAAC0B,KAAK,EAAE,CAACU,IAAI,EAAEJ,EAAE,EAAEN,KAAK,CAA0B;MAAA,GAAKQ;IAAI,CAAG,CAAC;EAEjH;EAEA,oBACE1B,IAAA,CAACF,QAAQ,CAACF,IAAI;IACZkC,QAAQ,EAAEL,MAAM,CAACK,QAAS;IAC1BC,OAAO,EAAEN,MAAM,CAACM,OAAQ;IACxBC,MAAM,EAAEP,MAAM,CAACO,MAAO;IACtBH,qBAAqB,EAAErC,cAAe;IACtC0B,KAAK,EAAE,CAACU,IAAI,EAAEJ,EAAE,EAAEC,MAAM,CAACP,KAAK,EAAEA,KAAK,CAAE;IAAA,GACnCQ;EAAI,CACT,CAAC;AAEN,CACF,CAAC","ignoreList":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { timing } from '@hzblj/kara-sx';
|
|
3
4
|
import { duration, opacity, useReducedMotion } from '@hzblj/kara-theme';
|
|
4
5
|
import { useEffect } from 'react';
|
|
5
6
|
import { cancelAnimation, useAnimatedStyle, useSharedValue, withRepeat, withTiming } from 'react-native-reanimated';
|
|
6
|
-
import {
|
|
7
|
-
import { ABox } from "../box/index.js";
|
|
7
|
+
import { Box } from "../box/index.js";
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
/** A breath, not a transition, so it sits off the scale: `slow` twice each way, at constant speed. */
|
|
10
10
|
const PULSE = {
|
|
@@ -33,7 +33,7 @@ export const Skeleton = ({
|
|
|
33
33
|
const rStyle = useAnimatedStyle(() => ({
|
|
34
34
|
opacity: pulse.value
|
|
35
35
|
}), []);
|
|
36
|
-
return /*#__PURE__*/_jsx(
|
|
36
|
+
return /*#__PURE__*/_jsx(Box, {
|
|
37
37
|
"aria-hidden": true,
|
|
38
38
|
bg: "fill.quaternary",
|
|
39
39
|
borderRadius: borderRadius,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["duration","opacity","useReducedMotion","useEffect","cancelAnimation","useAnimatedStyle","useSharedValue","withRepeat","withTiming","
|
|
1
|
+
{"version":3,"names":["timing","duration","opacity","useReducedMotion","useEffect","cancelAnimation","useAnimatedStyle","useSharedValue","withRepeat","withTiming","Box","jsx","_jsx","PULSE","slow","Skeleton","borderRadius","h","testID","w","reduced","pulse","o40","value","o70","o100","rStyle","bg","style","wide","undefined"],"sourceRoot":"../../../../src","sources":["atoms/skeleton/skeleton.tsx"],"mappings":";;AAAA,SAAQA,MAAM,QAAO,gBAAgB;AACrC,SAAQC,QAAQ,EAAEC,OAAO,EAAEC,gBAAgB,QAAO,mBAAmB;AACrE,SAAQC,SAAS,QAAO,OAAO;AAC/B,SAAQC,eAAe,EAAEC,gBAAgB,EAAEC,cAAc,EAAEC,UAAU,EAAEC,UAAU,QAAO,yBAAyB;AAEjH,SAAQC,GAAG,QAAO,iBAAQ;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAG1B;AACA,MAAMC,KAAK,GAAG;EAAC,GAAGb,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC;EAAEC,QAAQ,EAAEA,QAAQ,CAACa,IAAI,GAAG;AAAC,CAAC;AAExE,OAAO,MAAMC,QAA2B,GAAGA,CAAC;EAACC,YAAY,GAAG,OAAO;EAAEC,CAAC;EAAEC,MAAM;EAAEC;AAAgB,CAAC,KAAK;EACpG,MAAMC,OAAO,GAAGjB,gBAAgB,CAAC,CAAC;EAClC,MAAMkB,KAAK,GAAGd,cAAc,CAASL,OAAO,CAACoB,GAAG,CAAC;;EAEjD;EACAlB,SAAS,CAAC,MAAM;IACd,IAAIgB,OAAO,EAAE;MACXf,eAAe,CAACgB,KAAK,CAAC;MACtBA,KAAK,CAACE,KAAK,GAAGrB,OAAO,CAACsB,GAAG;MACzB;IACF;IAEAH,KAAK,CAACE,KAAK,GAAGrB,OAAO,CAACoB,GAAG;IACzBD,KAAK,CAACE,KAAK,GAAGf,UAAU,CAACC,UAAU,CAACP,OAAO,CAACuB,IAAI,EAAEZ,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC;EACrE,CAAC,EAAE,CAACQ,KAAK,EAAED,OAAO,CAAC,CAAC;EAEpB,MAAMM,MAAM,GAAGpB,gBAAgB,CAAC,OAAO;IAACJ,OAAO,EAAEmB,KAAK,CAACE;EAAK,CAAC,CAAC,EAAE,EAAE,CAAC;EAEnE,oBACEX,IAAA,CAACF,GAAG;IACF,mBAAW;IACXiB,EAAE,EAAC,iBAAiB;IACpBX,YAAY,EAAEA,YAAa;IAC3BC,CAAC,EAAEA,CAAE;IACLW,KAAK,EAAEF,MAAO;IACdR,MAAM,EAAEA,MAAO;IACfC,CAAC,EAAEA,CAAE;IACLU,IAAI,EAAEV,CAAC,KAAKW;EAAU,CACvB,CAAC;AAEN,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["atoms/stagger/index.ts"],"mappings":";;AAAA,cAAc,cAAW;AACzB,cAAc,oBAAiB","ignoreList":[]}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { isMotionComponent } from '@hzblj/kara-sx';
|
|
4
|
+
import { duration } from '@hzblj/kara-theme';
|
|
5
|
+
import { Children, cloneElement, isValidElement, useLayoutEffect, useRef } from 'react';
|
|
6
|
+
import { Box } from "../box/index.js";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
const asConfig = motion => typeof motion === 'string' ? {
|
|
9
|
+
preset: motion
|
|
10
|
+
} : motion;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The stagger's preset, or the child's own with the delay added: a child that names its look keeps it and only takes
|
|
14
|
+
* its turn. Reanimated's own builder is the child's, untouched, since adding a delay to one mutates it.
|
|
15
|
+
*/
|
|
16
|
+
const withDelay = (own, fallback, delay) => {
|
|
17
|
+
if (own === undefined) {
|
|
18
|
+
return {
|
|
19
|
+
...fallback,
|
|
20
|
+
delay: (fallback.delay ?? 0) + delay
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
if (typeof own === 'string') {
|
|
24
|
+
return {
|
|
25
|
+
delay,
|
|
26
|
+
preset: own
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return typeof own === 'object' && own !== null && 'preset' in own ? {
|
|
30
|
+
...own,
|
|
31
|
+
delay: (own.delay ?? 0) + delay
|
|
32
|
+
} : own;
|
|
33
|
+
};
|
|
34
|
+
export const Stagger = ({
|
|
35
|
+
children,
|
|
36
|
+
entering = 'fadeUp',
|
|
37
|
+
exiting,
|
|
38
|
+
from = 'start',
|
|
39
|
+
interval = 'stagger',
|
|
40
|
+
layout,
|
|
41
|
+
testID,
|
|
42
|
+
...sx
|
|
43
|
+
}) => {
|
|
44
|
+
// The children that have arrived already. Only the ones new in this render take turns, so a list that grows by a
|
|
45
|
+
// page staggers the page, and an item added on its own arrives at once instead of after everything above it.
|
|
46
|
+
const arrived = useRef(new Set());
|
|
47
|
+
const items = Children.toArray(children);
|
|
48
|
+
const turns = new Map();
|
|
49
|
+
for (const item of items) {
|
|
50
|
+
if (/*#__PURE__*/isValidElement(item) && item.key !== null && !arrived.current.has(item.key)) {
|
|
51
|
+
turns.set(item.key, turns.size);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Marked once committed: a render React throws away must not use up a child's turn.
|
|
56
|
+
useLayoutEffect(() => {
|
|
57
|
+
for (const key of turns.keys()) {
|
|
58
|
+
arrived.current.add(key);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
const step = duration[interval];
|
|
62
|
+
const enter = asConfig(entering);
|
|
63
|
+
const leave = exiting === undefined ? undefined : asConfig(exiting);
|
|
64
|
+
const delayOf = key => {
|
|
65
|
+
const turn = key === null ? undefined : turns.get(key);
|
|
66
|
+
if (turn === undefined) {
|
|
67
|
+
return 0;
|
|
68
|
+
}
|
|
69
|
+
return (from === 'start' ? turn : turns.size - 1 - turn) * step;
|
|
70
|
+
};
|
|
71
|
+
return (
|
|
72
|
+
/*#__PURE__*/
|
|
73
|
+
// With `layout` the container moves and resizes with its children, so what holds it can follow.
|
|
74
|
+
_jsx(Box, {
|
|
75
|
+
layout: layout,
|
|
76
|
+
testID: testID,
|
|
77
|
+
...sx,
|
|
78
|
+
children: items.map(item => {
|
|
79
|
+
if (! /*#__PURE__*/isValidElement(item)) {
|
|
80
|
+
return item;
|
|
81
|
+
}
|
|
82
|
+
const delay = delayOf(item.key);
|
|
83
|
+
|
|
84
|
+
// A component that takes the motion props gets them directly, with no view added around it.
|
|
85
|
+
if (isMotionComponent(item.type)) {
|
|
86
|
+
return /*#__PURE__*/cloneElement(item, {
|
|
87
|
+
entering: withDelay(item.props.entering, enter, delay),
|
|
88
|
+
exiting: item.props.exiting ?? leave,
|
|
89
|
+
layout: item.props.layout ?? layout
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
return /*#__PURE__*/_jsx(Box, {
|
|
93
|
+
entering: withDelay(undefined, enter, delay),
|
|
94
|
+
exiting: leave,
|
|
95
|
+
layout: layout,
|
|
96
|
+
children: item
|
|
97
|
+
}, item.key);
|
|
98
|
+
})
|
|
99
|
+
})
|
|
100
|
+
);
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=stagger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isMotionComponent","duration","Children","cloneElement","isValidElement","useLayoutEffect","useRef","Box","jsx","_jsx","asConfig","motion","preset","withDelay","own","fallback","delay","undefined","Stagger","children","entering","exiting","from","interval","layout","testID","sx","arrived","Set","items","toArray","turns","Map","item","key","current","has","set","size","keys","add","step","enter","leave","delayOf","turn","get","map","type","props"],"sourceRoot":"../../../../src","sources":["atoms/stagger/stagger.tsx"],"mappings":";;AAAA,SAAQA,iBAAiB,QAAiE,gBAAgB;AAC1G,SAAQC,QAAQ,QAAO,mBAAmB;AAC1C,SAAQC,QAAQ,EAAEC,YAAY,EAAEC,cAAc,EAA+BC,eAAe,EAAEC,MAAM,QAAO,OAAO;AAElH,SAAQC,GAAG,QAAO,iBAAQ;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAK1B,MAAMC,QAAQ,GAAIC,MAAqB,IAA0B,OAAOA,MAAM,KAAK,QAAQ,GAAG;EAACC,MAAM,EAAED;AAAM,CAAC,GAAGA,MAAO;;AAExH;AACA;AACA;AACA;AACA,MAAME,SAAS,GAAGA,CAACC,GAA4B,EAAEC,QAA4B,EAAEC,KAAa,KAAkB;EAC5G,IAAIF,GAAG,KAAKG,SAAS,EAAE;IACrB,OAAO;MAAC,GAAGF,QAAQ;MAAEC,KAAK,EAAE,CAACD,QAAQ,CAACC,KAAK,IAAI,CAAC,IAAIA;IAAK,CAAC;EAC5D;EAEA,IAAI,OAAOF,GAAG,KAAK,QAAQ,EAAE;IAC3B,OAAO;MAACE,KAAK;MAAEJ,MAAM,EAAEE;IAAG,CAAC;EAC7B;EAEA,OAAO,OAAOA,GAAG,KAAK,QAAQ,IAAIA,GAAG,KAAK,IAAI,IAAI,QAAQ,IAAIA,GAAG,GAAG;IAAC,GAAGA,GAA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C;AAEV,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["atoms/stagger/stagger.types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { timing } from '@hzblj/kara-sx';
|
|
3
4
|
import { opacity } from '@hzblj/kara-theme';
|
|
4
5
|
import { cloneElement, useCallback, useRef } from 'react';
|
|
5
6
|
import { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
|
|
6
|
-
import {
|
|
7
|
-
import { timing } from "../../motion.js";
|
|
7
|
+
import { Box } from "../../atoms/box/index.js";
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
/** Less than a pixel scrolled is not scrolled — a fling settles a fraction away from the edge. */
|
|
10
10
|
const EDGE_SLOP = 0.5;
|
|
@@ -21,7 +21,7 @@ const EdgeBar = ({
|
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
23
|
return /*#__PURE__*/_jsxs(Box, {
|
|
24
|
-
children: [/*#__PURE__*/_jsx(
|
|
24
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
25
25
|
bg: "surface.secondary",
|
|
26
26
|
bottom: 0,
|
|
27
27
|
left: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["opacity","cloneElement","useCallback","useRef","useAnimatedStyle","useSharedValue","withTiming","
|
|
1
|
+
{"version":3,"names":["timing","opacity","cloneElement","useCallback","useRef","useAnimatedStyle","useSharedValue","withTiming","Box","jsx","_jsx","jsxs","_jsxs","EDGE_SLOP","FILL","EdgeBar","children","filled","fill","value","bg","bottom","left","pointerEvents","position","right","style","top","ScrollEdgeContainer","automaticInsets","_automaticInsets","bottomBar","effect","_effect","testID","topBar","sx","topFilled","o0","bottomFilled","metrics","content","offset","viewport","state","flex","onContentSizeChange","onLayout","onScroll","scrollEventThrottle","props","update","current","o100","scrollable","width","height","event","nativeEvent","layout","contentOffset","y"],"sourceRoot":"../../../../src","sources":["molecules/scroll-edge-container/scroll-edge-container.android.tsx"],"mappings":";;AAAA,SAAQA,MAAM,QAAO,gBAAgB;AACrC,SAAQC,OAAO,QAAO,mBAAmB;AACzC,SAAQC,YAAY,EAAkBC,WAAW,EAAEC,MAAM,QAAO,OAAO;AAEvE,SAA0BC,gBAAgB,EAAEC,cAAc,EAAEC,UAAU,QAAO,yBAAyB;AAEtG,SAAQC,GAAG,QAAO,0BAAiB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGnC;AACA,MAAMC,SAAS,GAAG,GAAG;AAErB,MAAMC,IAAI,GAAGd,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC;AAInC;AACA,MAAMe,OAAO,GAAGA,CAAC;EAACC,QAAQ;EAAEC;AAAW,CAAC,KAAK;EAC3C,MAAMC,IAAI,GAAGb,gBAAgB,CAAC,OAAO;IAACJ,OAAO,EAAEgB,MAAM,CAACE;EAAK,CAAC,CAAC,EAAE,EAAE,CAAC;EAElE,IAAI,CAACH,QAAQ,EAAE;IACb,OAAO,IAAI;EACb;EAEA,oBACEJ,KAAA,CAACJ,GAAG;IAAAQ,QAAA,gBACFN,IAAA,CAACF,GAAG;MACFY,EAAE,EAAC,mBAAmB;MACtBC,MAAM,EAAE,CAAE;MACVC,IAAI,EAAE,CAAE;MACRC,aAAa,EAAC,MAAM;MACpBC,QAAQ,EAAC,UAAU;MACnBC,KAAK,EAAE,CAAE;MACTC,KAAK,EAAER,IAAK;MACZS,GAAG,EAAE;IAAE,CACR,CAAC,EACDX,QAAQ;EAAA,CACN,CAAC;AAEV,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMY,mBAAiD,GAAGA,CAAC;EAChEC,eAAe,EAAEC,gBAAgB;EACjCC,SAAS;EACTf,QAAQ;EACRgB,MAAM,EAA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