react-native-marquee-animation 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.
Files changed (68) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +174 -0
  3. package/RNMarquee.podspec +27 -0
  4. package/THIRD_PARTY_NOTICES.md +8 -0
  5. package/android/build.gradle +58 -0
  6. package/android/settings.gradle +34 -0
  7. package/android/src/main/AndroidManifest.xml +1 -0
  8. package/android/src/main/java/com/marquee/MarqueeEvent.kt +44 -0
  9. package/android/src/main/java/com/marquee/MarqueeModels.kt +45 -0
  10. package/android/src/main/java/com/marquee/MarqueeMotion.kt +163 -0
  11. package/android/src/main/java/com/marquee/MarqueePackage.kt +16 -0
  12. package/android/src/main/java/com/marquee/MarqueeView.kt +376 -0
  13. package/android/src/main/java/com/marquee/MarqueeViewManager.kt +135 -0
  14. package/ios/MarqueeRenderer.swift +652 -0
  15. package/ios/RNMarqueeView.h +14 -0
  16. package/ios/RNMarqueeView.mm +118 -0
  17. package/lib/module/RNMarqueeViewNativeComponent.ts +32 -0
  18. package/lib/module/index.js +4 -0
  19. package/lib/module/index.js.map +1 -0
  20. package/lib/module/internal/events.js +10 -0
  21. package/lib/module/internal/events.js.map +1 -0
  22. package/lib/module/internal/geometry.js +10 -0
  23. package/lib/module/internal/geometry.js.map +1 -0
  24. package/lib/module/internal/options.js +29 -0
  25. package/lib/module/internal/options.js.map +1 -0
  26. package/lib/module/marquee.js +32 -0
  27. package/lib/module/marquee.js.map +1 -0
  28. package/lib/module/marquee.native.js +95 -0
  29. package/lib/module/marquee.native.js.map +1 -0
  30. package/lib/module/package.json +1 -0
  31. package/lib/module/types.js +4 -0
  32. package/lib/module/types.js.map +1 -0
  33. package/lib/module/use-reduced-motion.js +61 -0
  34. package/lib/module/use-reduced-motion.js.map +1 -0
  35. package/lib/module/view-props.js +5 -0
  36. package/lib/module/view-props.js.map +1 -0
  37. package/lib/typescript/package.json +1 -0
  38. package/lib/typescript/src/RNMarqueeViewNativeComponent.d.ts +28 -0
  39. package/lib/typescript/src/RNMarqueeViewNativeComponent.d.ts.map +1 -0
  40. package/lib/typescript/src/index.d.ts +3 -0
  41. package/lib/typescript/src/index.d.ts.map +1 -0
  42. package/lib/typescript/src/internal/events.d.ts +3 -0
  43. package/lib/typescript/src/internal/events.d.ts.map +1 -0
  44. package/lib/typescript/src/internal/geometry.d.ts +3 -0
  45. package/lib/typescript/src/internal/geometry.d.ts.map +1 -0
  46. package/lib/typescript/src/internal/options.d.ts +16 -0
  47. package/lib/typescript/src/internal/options.d.ts.map +1 -0
  48. package/lib/typescript/src/marquee.d.ts +469 -0
  49. package/lib/typescript/src/marquee.d.ts.map +1 -0
  50. package/lib/typescript/src/marquee.native.d.ts +470 -0
  51. package/lib/typescript/src/marquee.native.d.ts.map +1 -0
  52. package/lib/typescript/src/types.d.ts +46 -0
  53. package/lib/typescript/src/types.d.ts.map +1 -0
  54. package/lib/typescript/src/use-reduced-motion.d.ts +3 -0
  55. package/lib/typescript/src/use-reduced-motion.d.ts.map +1 -0
  56. package/lib/typescript/src/view-props.d.ts +4 -0
  57. package/lib/typescript/src/view-props.d.ts.map +1 -0
  58. package/package.json +166 -0
  59. package/src/RNMarqueeViewNativeComponent.ts +32 -0
  60. package/src/index.ts +12 -0
  61. package/src/internal/events.ts +12 -0
  62. package/src/internal/geometry.ts +14 -0
  63. package/src/internal/options.ts +48 -0
  64. package/src/marquee.native.tsx +144 -0
  65. package/src/marquee.tsx +35 -0
  66. package/src/types.ts +59 -0
  67. package/src/use-reduced-motion.ts +88 -0
  68. package/src/view-props.ts +24 -0
@@ -0,0 +1,118 @@
1
+ #import "RNMarqueeView.h"
2
+
3
+ #import <React/RCTConversions.h>
4
+
5
+ #import <react/renderer/components/RNMarqueeViewSpec/ComponentDescriptors.h>
6
+ #import <react/renderer/components/RNMarqueeViewSpec/EventEmitters.h>
7
+ #import <react/renderer/components/RNMarqueeViewSpec/Props.h>
8
+ #import <react/renderer/components/RNMarqueeViewSpec/RCTComponentViewHelpers.h>
9
+
10
+ #import "RNMarquee-Swift.h"
11
+ #import "RCTFabricComponentsPlugins.h"
12
+
13
+ using namespace facebook::react;
14
+
15
+ @interface RNMarqueeView () <RCTRNMarqueeViewViewProtocol, MarqueeRendererDelegate>
16
+ @end
17
+
18
+ @implementation RNMarqueeView {
19
+ MarqueeRenderer *_renderer;
20
+ MarqueeConfiguration *_pendingConfiguration;
21
+ }
22
+
23
+ + (ComponentDescriptorProvider)componentDescriptorProvider
24
+ {
25
+ return concreteComponentDescriptorProvider<RNMarqueeViewComponentDescriptor>();
26
+ }
27
+
28
+ - (instancetype)initWithFrame:(CGRect)frame
29
+ {
30
+ if (self = [super initWithFrame:frame]) {
31
+ static const auto defaultProps = std::make_shared<const RNMarqueeViewProps>();
32
+ _props = defaultProps;
33
+ _renderer = [[MarqueeRenderer alloc] initWithFrame:self.bounds];
34
+ _renderer.delegate = self;
35
+ self.contentView = _renderer;
36
+ }
37
+ return self;
38
+ }
39
+
40
+ - (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps
41
+ {
42
+ const auto &newProps = *std::static_pointer_cast<const RNMarqueeViewProps>(props);
43
+ MarqueeConfiguration *configuration = [MarqueeConfiguration new];
44
+ configuration.contentWidth = newProps.contentWidth;
45
+ configuration.spacing = newProps.spacing;
46
+ configuration.active = newProps.active;
47
+ configuration.reduceMotion = newProps.reduceMotion;
48
+ configuration.speed = newProps.speed;
49
+ configuration.direction = RCTNSStringFromString(newProps.direction);
50
+ configuration.shortContentMode = RCTNSStringFromString(newProps.shortContentMode);
51
+ configuration.contentAlignment = RCTNSStringFromString(newProps.contentAlignment);
52
+ configuration.maxFlingVelocity = newProps.maxFlingVelocity;
53
+ configuration.deceleration = newProps.deceleration;
54
+ configuration.pauseOnPress = newProps.pauseOnPress;
55
+ configuration.resumeDelay = MAX(0, newProps.resumeDelayMs / 1000.0);
56
+ _pendingConfiguration = configuration;
57
+ [super updateProps:props oldProps:oldProps];
58
+ }
59
+
60
+ - (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask
61
+ {
62
+ [super finalizeUpdates:updateMask];
63
+ if (_pendingConfiguration != nil) {
64
+ [_renderer applyConfiguration:_pendingConfiguration];
65
+ _pendingConfiguration = nil;
66
+ }
67
+ }
68
+
69
+ - (void)mountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
70
+ {
71
+ [_renderer insertSubview:childComponentView atIndex:index];
72
+ }
73
+
74
+ - (void)unmountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
75
+ {
76
+ [childComponentView removeFromSuperview];
77
+ }
78
+
79
+ - (void)prepareForRecycle
80
+ {
81
+ [super prepareForRecycle];
82
+ _pendingConfiguration = nil;
83
+ [_renderer resetForReuse];
84
+ }
85
+
86
+ - (void)invalidate
87
+ {
88
+ [_renderer invalidateRenderer];
89
+ _pendingConfiguration = nil;
90
+ [super invalidate];
91
+ }
92
+
93
+ - (void)marqueeRenderer:(MarqueeRenderer *)renderer didChangeState:(NSString *)state
94
+ {
95
+ if (renderer != _renderer || !_eventEmitter) {
96
+ return;
97
+ }
98
+ auto eventEmitter = std::static_pointer_cast<const RNMarqueeViewEventEmitter>(_eventEmitter);
99
+ eventEmitter->onAnimationStateChange({
100
+ .state = std::string(state.UTF8String ?: ""),
101
+ });
102
+ }
103
+
104
+ - (void)marqueeRenderer:(MarqueeRenderer *)renderer
105
+ didLayoutContentWidth:(CGFloat)contentWidth
106
+ containerWidth:(CGFloat)containerWidth
107
+ {
108
+ if (renderer != _renderer || !_eventEmitter) {
109
+ return;
110
+ }
111
+ auto eventEmitter = std::static_pointer_cast<const RNMarqueeViewEventEmitter>(_eventEmitter);
112
+ eventEmitter->onContentLayout({
113
+ .contentWidth = static_cast<Float>(contentWidth),
114
+ .containerWidth = static_cast<Float>(containerWidth),
115
+ });
116
+ }
117
+
118
+ @end
@@ -0,0 +1,32 @@
1
+ import type { HostComponent, ViewProps } from 'react-native';
2
+ import { codegenNativeComponent, type CodegenTypes } from 'react-native';
3
+
4
+ type NativeAnimationStateEvent = Readonly<{
5
+ state: string;
6
+ }>;
7
+
8
+ type NativeContentLayoutEvent = Readonly<{
9
+ contentWidth: CodegenTypes.Float;
10
+ containerWidth: CodegenTypes.Float;
11
+ }>;
12
+
13
+ export interface NativeMarqueeViewProps extends ViewProps {
14
+ active: boolean;
15
+ reduceMotion: boolean;
16
+ speed: CodegenTypes.Double;
17
+ direction: string;
18
+ shortContentMode: string;
19
+ contentAlignment: string;
20
+ contentWidth: CodegenTypes.Float;
21
+ spacing: CodegenTypes.Float;
22
+ maxFlingVelocity: CodegenTypes.Float;
23
+ deceleration: CodegenTypes.Float;
24
+ pauseOnPress: boolean;
25
+ resumeDelayMs: CodegenTypes.Double;
26
+ onAnimationStateChange?: CodegenTypes.DirectEventHandler<NativeAnimationStateEvent>;
27
+ onContentLayout?: CodegenTypes.DirectEventHandler<NativeContentLayoutEvent>;
28
+ }
29
+
30
+ export default codegenNativeComponent<NativeMarqueeViewProps>(
31
+ 'RNMarqueeView'
32
+ ) as HostComponent<NativeMarqueeViewProps>;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export { Marquee } from './marquee';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Marquee"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,WAAW","ignoreList":[]}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ const STATE_BY_NATIVE_VALUE = {
4
+ idle: 'idle',
5
+ paused: 'paused',
6
+ reducedMotion: 'reduced-motion',
7
+ running: 'running'
8
+ };
9
+ export const resolveAnimationState = nativeState => STATE_BY_NATIVE_VALUE[nativeState] ?? null;
10
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["STATE_BY_NATIVE_VALUE","idle","paused","reducedMotion","running","resolveAnimationState","nativeState"],"sourceRoot":"../../../src","sources":["internal/events.ts"],"mappings":";;AAEA,MAAMA,qBAAsE,GAAG;EAC7EC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE,QAAQ;EAChBC,aAAa,EAAE,gBAAgB;EAC/BC,OAAO,EAAE;AACX,CAAC;AAED,OAAO,MAAMC,qBAAqB,GAChCC,WAAmB,IACcN,qBAAqB,CAACM,WAAW,CAAC,IAAI,IAAI","ignoreList":[]}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ export const CONTENT_WIDTH_EPSILON = 0.25;
4
+ export const resolveMeasuredContentWidth = (currentWidth, measuredWidth) => {
5
+ if (!Number.isFinite(measuredWidth) || measuredWidth < 0) {
6
+ return currentWidth;
7
+ }
8
+ return Math.abs(currentWidth - measuredWidth) > CONTENT_WIDTH_EPSILON ? measuredWidth : currentWidth;
9
+ };
10
+ //# sourceMappingURL=geometry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["CONTENT_WIDTH_EPSILON","resolveMeasuredContentWidth","currentWidth","measuredWidth","Number","isFinite","Math","abs"],"sourceRoot":"../../../src","sources":["internal/geometry.ts"],"mappings":";;AAAA,OAAO,MAAMA,qBAAqB,GAAG,IAAI;AAEzC,OAAO,MAAMC,2BAA2B,GAAGA,CACzCC,YAAoB,EACpBC,aAAqB,KACV;EACX,IAAI,CAACC,MAAM,CAACC,QAAQ,CAACF,aAAa,CAAC,IAAIA,aAAa,GAAG,CAAC,EAAE;IACxD,OAAOD,YAAY;EACrB;EAEA,OAAOI,IAAI,CAACC,GAAG,CAACL,YAAY,GAAGC,aAAa,CAAC,GAAGH,qBAAqB,GACjEG,aAAa,GACbD,YAAY;AAClB,CAAC","ignoreList":[]}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ export const DEFAULT_INTERACTION = {
4
+ deceleration: 0.9985,
5
+ maxFlingVelocity: 3_200,
6
+ pauseOnPress: true,
7
+ resumeDelay: 0
8
+ };
9
+ const requireNonnegative = (value, name) => {
10
+ if (!Number.isFinite(value) || value < 0) {
11
+ throw new RangeError(`${name} must be a finite nonnegative number.`);
12
+ }
13
+ return value;
14
+ };
15
+ export const resolveInteraction = interaction => {
16
+ const deceleration = interaction?.deceleration ?? DEFAULT_INTERACTION.deceleration;
17
+ if (!Number.isFinite(deceleration) || deceleration <= 0 || deceleration >= 1) {
18
+ throw new RangeError('interaction.deceleration must be greater than 0 and below 1.');
19
+ }
20
+ return {
21
+ deceleration,
22
+ maxFlingVelocity: requireNonnegative(interaction?.maxFlingVelocity ?? DEFAULT_INTERACTION.maxFlingVelocity, 'interaction.maxFlingVelocity'),
23
+ pauseOnPress: interaction?.pauseOnPress ?? DEFAULT_INTERACTION.pauseOnPress,
24
+ resumeDelay: requireNonnegative(interaction?.resumeDelay ?? DEFAULT_INTERACTION.resumeDelay, 'interaction.resumeDelay')
25
+ };
26
+ };
27
+ export const resolveSpeed = speed => requireNonnegative(speed, 'speed');
28
+ export const resolveSpacing = spacing => requireNonnegative(spacing, 'spacing');
29
+ //# sourceMappingURL=options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["DEFAULT_INTERACTION","deceleration","maxFlingVelocity","pauseOnPress","resumeDelay","requireNonnegative","value","name","Number","isFinite","RangeError","resolveInteraction","interaction","resolveSpeed","speed","resolveSpacing","spacing"],"sourceRoot":"../../../src","sources":["internal/options.ts"],"mappings":";;AAEA,OAAO,MAAMA,mBAAmB,GAAG;EACjCC,YAAY,EAAE,MAAM;EACpBC,gBAAgB,EAAE,KAAK;EACvBC,YAAY,EAAE,IAAI;EAClBC,WAAW,EAAE;AACf,CAAU;AAEV,MAAMC,kBAAkB,GAAGA,CAACC,KAAa,EAAEC,IAAY,KAAa;EAClE,IAAI,CAACC,MAAM,CAACC,QAAQ,CAACH,KAAK,CAAC,IAAIA,KAAK,GAAG,CAAC,EAAE;IACxC,MAAM,IAAII,UAAU,CAAC,GAAGH,IAAI,uCAAuC,CAAC;EACtE;EACA,OAAOD,KAAK;AACd,CAAC;AAED,OAAO,MAAMK,kBAAkB,GAAIC,WAAgC,IAAK;EACtE,MAAMX,YAAY,GAChBW,WAAW,EAAEX,YAAY,IAAID,mBAAmB,CAACC,YAAY;EAC/D,IACE,CAACO,MAAM,CAACC,QAAQ,CAACR,YAAY,CAAC,IAC9BA,YAAY,IAAI,CAAC,IACjBA,YAAY,IAAI,CAAC,EACjB;IACA,MAAM,IAAIS,UAAU,CAClB,8DACF,CAAC;EACH;EAEA,OAAO;IACLT,YAAY;IACZC,gBAAgB,EAAEG,kBAAkB,CAClCO,WAAW,EAAEV,gBAAgB,IAAIF,mBAAmB,CAACE,gBAAgB,EACrE,8BACF,CAAC;IACDC,YAAY,EAAES,WAAW,EAAET,YAAY,IAAIH,mBAAmB,CAACG,YAAY;IAC3EC,WAAW,EAAEC,kBAAkB,CAC7BO,WAAW,EAAER,WAAW,IAAIJ,mBAAmB,CAACI,WAAW,EAC3D,yBACF;EACF,CAAC;AACH,CAAC;AAED,OAAO,MAAMS,YAAY,GAAIC,KAAa,IACxCT,kBAAkB,CAACS,KAAK,EAAE,OAAO,CAAC;AAEpC,OAAO,MAAMC,cAAc,GAAIC,OAAe,IAC5CX,kBAAkB,CAACW,OAAO,EAAE,SAAS,CAAC","ignoreList":[]}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ import { forwardRef } from 'react';
4
+ import { View } from 'react-native';
5
+ import { getViewProps } from "./view-props.js";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ export const Marquee = /*#__PURE__*/forwardRef((props, ref) => {
8
+ const {
9
+ accessibilityLabel,
10
+ children,
11
+ contentContainerStyle,
12
+ style
13
+ } = props;
14
+ const viewProps = getViewProps(props);
15
+ return /*#__PURE__*/_jsx(View, {
16
+ ...viewProps,
17
+ accessibilityLabel: accessibilityLabel,
18
+ accessibilityRole: viewProps.accessibilityRole ?? 'text',
19
+ accessible: true,
20
+ ref: ref,
21
+ style: style,
22
+ children: /*#__PURE__*/_jsx(View, {
23
+ accessibilityElementsHidden: true,
24
+ importantForAccessibility: "no-hide-descendants",
25
+ pointerEvents: "none",
26
+ style: contentContainerStyle,
27
+ children: children
28
+ })
29
+ });
30
+ });
31
+ Marquee.displayName = 'Marquee';
32
+ //# sourceMappingURL=marquee.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["forwardRef","View","getViewProps","jsx","_jsx","Marquee","props","ref","accessibilityLabel","children","contentContainerStyle","style","viewProps","accessibilityRole","accessible","accessibilityElementsHidden","importantForAccessibility","pointerEvents","displayName"],"sourceRoot":"../../src","sources":["marquee.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAA2B,OAAO;AACrD,SAASC,IAAI,QAAQ,cAAc;AAGnC,SAASC,YAAY,QAAQ,iBAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE5C,OAAO,MAAMC,OAAO,gBAAGL,UAAU,CAC/B,CAACM,KAAK,EAAEC,GAAG,KAAK;EACd,MAAM;IAAEC,kBAAkB;IAAEC,QAAQ;IAAEC,qBAAqB;IAAEC;EAAM,CAAC,GAClEL,KAAK;EACP,MAAMM,SAAS,GAAGV,YAAY,CAACI,KAAK,CAAC;EAErC,oBACEF,IAAA,CAACH,IAAI;IAAA,GACCW,SAAS;IACbJ,kBAAkB,EAAEA,kBAAmB;IACvCK,iBAAiB,EAAED,SAAS,CAACC,iBAAiB,IAAI,MAAO;IACzDC,UAAU;IACVP,GAAG,EAAEA,GAAI;IACTI,KAAK,EAAEA,KAAM;IAAAF,QAAA,eAEbL,IAAA,CAACH,IAAI;MACHc,2BAA2B;MAC3BC,yBAAyB,EAAC,qBAAqB;MAC/CC,aAAa,EAAC,MAAM;MACpBN,KAAK,EAAED,qBAAsB;MAAAD,QAAA,EAE5BA;IAAQ,CACL;EAAC,CACH,CAAC;AAEX,CACF,CAAC;AAEDJ,OAAO,CAACa,WAAW,GAAG,SAAS","ignoreList":[]}
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+
3
+ import { forwardRef, useCallback, useMemo, useState } from 'react';
4
+ import { StyleSheet, View } from 'react-native';
5
+ import NativeMarqueeView from './RNMarqueeViewNativeComponent';
6
+ import { resolveAnimationState } from "./internal/events.js";
7
+ import { resolveMeasuredContentWidth } from "./internal/geometry.js";
8
+ import { resolveInteraction, resolveSpacing, resolveSpeed } from "./internal/options.js";
9
+ import { useMarqueeReducedMotion } from "./use-reduced-motion.js";
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ const NATIVE_SHORT_CONTENT_MODES = {
12
+ repeat: 'repeat',
13
+ static: 'static'
14
+ };
15
+ export const Marquee = /*#__PURE__*/forwardRef((props, ref) => {
16
+ const {
17
+ accessibilityLabel,
18
+ active = true,
19
+ children,
20
+ contentAlignment = 'start',
21
+ contentContainerStyle,
22
+ direction = 'left',
23
+ interaction,
24
+ onAnimationStateChange,
25
+ onContentLayout,
26
+ reduceMotion: reduceMotionPolicy = 'system',
27
+ shortContentMode = 'static',
28
+ spacing: spacingProp = 0,
29
+ speed: speedProp = 25,
30
+ style,
31
+ ...viewProps
32
+ } = props;
33
+ const [contentWidth, setContentWidth] = useState(0);
34
+ const reduceMotion = useMarqueeReducedMotion(reduceMotionPolicy);
35
+ const resolvedInteraction = useMemo(() => resolveInteraction(interaction), [interaction]);
36
+ const speed = resolveSpeed(speedProp);
37
+ const spacing = resolveSpacing(spacingProp);
38
+ const handleContentContainerLayout = useCallback(event => {
39
+ const nextWidth = event.nativeEvent.layout.width;
40
+ setContentWidth(currentWidth => resolveMeasuredContentWidth(currentWidth, nextWidth));
41
+ }, []);
42
+ const handleAnimationStateChange = useCallback(event => {
43
+ const state = resolveAnimationState(event.nativeEvent.state);
44
+ if (state) {
45
+ onAnimationStateChange?.({
46
+ state
47
+ });
48
+ }
49
+ }, [onAnimationStateChange]);
50
+ const handleContentLayout = useCallback(event => {
51
+ onContentLayout?.(event.nativeEvent);
52
+ }, [onContentLayout]);
53
+ return /*#__PURE__*/_jsx(NativeMarqueeView, {
54
+ ...viewProps,
55
+ accessibilityLabel: accessibilityLabel,
56
+ accessibilityLiveRegion: "none",
57
+ accessibilityRole: viewProps.accessibilityRole ?? 'text',
58
+ accessible: true,
59
+ active: active,
60
+ contentAlignment: contentAlignment,
61
+ contentWidth: contentWidth,
62
+ deceleration: resolvedInteraction.deceleration,
63
+ direction: direction,
64
+ importantForAccessibility: "yes",
65
+ maxFlingVelocity: resolvedInteraction.maxFlingVelocity,
66
+ onAnimationStateChange: onAnimationStateChange ? handleAnimationStateChange : undefined,
67
+ onContentLayout: onContentLayout ? handleContentLayout : undefined,
68
+ pauseOnPress: resolvedInteraction.pauseOnPress,
69
+ reduceMotion: reduceMotion,
70
+ ref: ref,
71
+ resumeDelayMs: resolvedInteraction.resumeDelay,
72
+ shortContentMode: NATIVE_SHORT_CONTENT_MODES[shortContentMode],
73
+ spacing: spacing,
74
+ speed: speed,
75
+ style: style,
76
+ children: /*#__PURE__*/_jsx(View, {
77
+ accessibilityElementsHidden: true,
78
+ collapsable: false,
79
+ importantForAccessibility: "no-hide-descendants",
80
+ onLayout: handleContentContainerLayout,
81
+ pointerEvents: "none",
82
+ style: [styles.content, contentContainerStyle],
83
+ children: children
84
+ })
85
+ });
86
+ });
87
+ Marquee.displayName = 'Marquee';
88
+ const styles = StyleSheet.create({
89
+ content: {
90
+ alignSelf: 'flex-start',
91
+ flexDirection: 'row',
92
+ flexShrink: 0
93
+ }
94
+ });
95
+ //# sourceMappingURL=marquee.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["forwardRef","useCallback","useMemo","useState","StyleSheet","View","NativeMarqueeView","resolveAnimationState","resolveMeasuredContentWidth","resolveInteraction","resolveSpacing","resolveSpeed","useMarqueeReducedMotion","jsx","_jsx","NATIVE_SHORT_CONTENT_MODES","repeat","static","Marquee","props","ref","accessibilityLabel","active","children","contentAlignment","contentContainerStyle","direction","interaction","onAnimationStateChange","onContentLayout","reduceMotion","reduceMotionPolicy","shortContentMode","spacing","spacingProp","speed","speedProp","style","viewProps","contentWidth","setContentWidth","resolvedInteraction","handleContentContainerLayout","event","nextWidth","nativeEvent","layout","width","currentWidth","handleAnimationStateChange","state","handleContentLayout","accessibilityLiveRegion","accessibilityRole","accessible","deceleration","importantForAccessibility","maxFlingVelocity","undefined","pauseOnPress","resumeDelayMs","resumeDelay","accessibilityElementsHidden","collapsable","onLayout","pointerEvents","styles","content","displayName","create","alignSelf","flexDirection","flexShrink"],"sourceRoot":"../../src","sources":["marquee.native.tsx"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+
3
+ import { useSyncExternalStore } from 'react';
4
+ import { AccessibilityInfo } from 'react-native';
5
+ const listeners = new Set();
6
+ let reduceMotion = true;
7
+ let listening = false;
8
+ let generation = 0;
9
+ let subscription = null;
10
+ const notify = () => {
11
+ listeners.forEach(listener => listener());
12
+ };
13
+ const setReduceMotion = value => {
14
+ if (reduceMotion === value) {
15
+ return;
16
+ }
17
+ reduceMotion = value;
18
+ notify();
19
+ };
20
+ const startListening = () => {
21
+ if (listening) {
22
+ return;
23
+ }
24
+ listening = true;
25
+ generation += 1;
26
+ const currentGeneration = generation;
27
+ AccessibilityInfo.isReduceMotionEnabled().then(value => {
28
+ if (listening && currentGeneration === generation) {
29
+ setReduceMotion(value);
30
+ }
31
+ }).catch(() => undefined);
32
+ subscription = AccessibilityInfo.addEventListener('reduceMotionChanged', value => {
33
+ if (listening && currentGeneration === generation) {
34
+ setReduceMotion(value);
35
+ }
36
+ });
37
+ };
38
+ const subscribe = listener => {
39
+ listeners.add(listener);
40
+ startListening();
41
+ return () => {
42
+ listeners.delete(listener);
43
+ if (listeners.size !== 0) {
44
+ return;
45
+ }
46
+ subscription?.remove();
47
+ subscription = null;
48
+ listening = false;
49
+ generation += 1;
50
+ reduceMotion = true;
51
+ };
52
+ };
53
+ const emptySubscribe = () => () => undefined;
54
+ const getSystemSnapshot = () => listening ? reduceMotion : true;
55
+ const getReducedSnapshot = () => true;
56
+ const getUnreducedSnapshot = () => false;
57
+ export const useMarqueeReducedMotion = policy => {
58
+ const system = policy === 'system';
59
+ return useSyncExternalStore(system ? subscribe : emptySubscribe, system ? getSystemSnapshot : policy === 'always' ? getReducedSnapshot : getUnreducedSnapshot, policy === 'never' ? getUnreducedSnapshot : getReducedSnapshot);
60
+ };
61
+ //# sourceMappingURL=use-reduced-motion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useSyncExternalStore","AccessibilityInfo","listeners","Set","reduceMotion","listening","generation","subscription","notify","forEach","listener","setReduceMotion","value","startListening","currentGeneration","isReduceMotionEnabled","then","catch","undefined","addEventListener","subscribe","add","delete","size","remove","emptySubscribe","getSystemSnapshot","getReducedSnapshot","getUnreducedSnapshot","useMarqueeReducedMotion","policy","system"],"sourceRoot":"../../src","sources":["use-reduced-motion.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,OAAO;AAC5C,SAASC,iBAAiB,QAAQ,cAAc;AAKhD,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAW,CAAC;AACrC,IAAIC,YAAY,GAAG,IAAI;AACvB,IAAIC,SAAS,GAAG,KAAK;AACrB,IAAIC,UAAU,GAAG,CAAC;AAClB,IAAIC,YAA0E,GAC5E,IAAI;AAEN,MAAMC,MAAM,GAAGA,CAAA,KAAY;EACzBN,SAAS,CAACO,OAAO,CAAEC,QAAQ,IAAKA,QAAQ,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED,MAAMC,eAAe,GAAIC,KAAc,IAAW;EAChD,IAAIR,YAAY,KAAKQ,KAAK,EAAE;IAC1B;EACF;EACAR,YAAY,GAAGQ,KAAK;EACpBJ,MAAM,CAAC,CAAC;AACV,CAAC;AAED,MAAMK,cAAc,GAAGA,CAAA,KAAY;EACjC,IAAIR,SAAS,EAAE;IACb;EACF;EAEAA,SAAS,GAAG,IAAI;EAChBC,UAAU,IAAI,CAAC;EACf,MAAMQ,iBAAiB,GAAGR,UAAU;EACpCL,iBAAiB,CAACc,qBAAqB,CAAC,CAAC,CACtCC,IAAI,CAAEJ,KAAK,IAAK;IACf,IAAIP,SAAS,IAAIS,iBAAiB,KAAKR,UAAU,EAAE;MACjDK,eAAe,CAACC,KAAK,CAAC;IACxB;EACF,CAAC,CAAC,CACDK,KAAK,CAAC,MAAMC,SAAS,CAAC;EACzBX,YAAY,GAAGN,iBAAiB,CAACkB,gBAAgB,CAC/C,qBAAqB,EACpBP,KAAK,IAAK;IACT,IAAIP,SAAS,IAAIS,iBAAiB,KAAKR,UAAU,EAAE;MACjDK,eAAe,CAACC,KAAK,CAAC;IACxB;EACF,CACF,CAAC;AACH,CAAC;AAED,MAAMQ,SAAS,GAAIV,QAAkB,IAAmB;EACtDR,SAAS,CAACmB,GAAG,CAACX,QAAQ,CAAC;EACvBG,cAAc,CAAC,CAAC;EAEhB,OAAO,MAAM;IACXX,SAAS,CAACoB,MAAM,CAACZ,QAAQ,CAAC;IAC1B,IAAIR,SAAS,CAACqB,IAAI,KAAK,CAAC,EAAE;MACxB;IACF;IAEAhB,YAAY,EAAEiB,MAAM,CAAC,CAAC;IACtBjB,YAAY,GAAG,IAAI;IACnBF,SAAS,GAAG,KAAK;IACjBC,UAAU,IAAI,CAAC;IACfF,YAAY,GAAG,IAAI;EACrB,CAAC;AACH,CAAC;AAED,MAAMqB,cAAc,GAAGA,CAAA,KAAoB,MAAMP,SAAS;AAC1D,MAAMQ,iBAAiB,GAAGA,CAAA,KAAgBrB,SAAS,GAAGD,YAAY,GAAG,IAAK;AAC1E,MAAMuB,kBAAkB,GAAGA,CAAA,KAAe,IAAI;AAC9C,MAAMC,oBAAoB,GAAGA,CAAA,KAAe,KAAK;AAEjD,OAAO,MAAMC,uBAAuB,GAClCC,MAA2B,IACf;EACZ,MAAMC,MAAM,GAAGD,MAAM,KAAK,QAAQ;EAElC,OAAO9B,oBAAoB,CACzB+B,MAAM,GAAGX,SAAS,GAAGK,cAAc,EACnCM,MAAM,GACFL,iBAAiB,GACjBI,MAAM,KAAK,QAAQ,GACjBH,kBAAkB,GAClBC,oBAAoB,EAC1BE,MAAM,KAAK,OAAO,GAAGF,oBAAoB,GAAGD,kBAC9C,CAAC;AACH,CAAC","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ const COMPONENT_PROP_KEYS = new Set(['accessibilityLabel', 'active', 'children', 'contentAlignment', 'contentContainerStyle', 'direction', 'interaction', 'onAnimationStateChange', 'onContentLayout', 'reduceMotion', 'shortContentMode', 'spacing', 'speed', 'style']);
4
+ export const getViewProps = props => Object.fromEntries(Object.entries(props).filter(([key]) => !COMPONENT_PROP_KEYS.has(key)));
5
+ //# sourceMappingURL=view-props.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["COMPONENT_PROP_KEYS","Set","getViewProps","props","Object","fromEntries","entries","filter","key","has"],"sourceRoot":"../../src","sources":["view-props.ts"],"mappings":";;AAGA,MAAMA,mBAAmB,GAAG,IAAIC,GAAG,CAAC,CAClC,oBAAoB,EACpB,QAAQ,EACR,UAAU,EACV,kBAAkB,EAClB,uBAAuB,EACvB,WAAW,EACX,aAAa,EACb,wBAAwB,EACxB,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,SAAS,EACT,OAAO,EACP,OAAO,CACR,CAAC;AAEF,OAAO,MAAMC,YAAY,GAAIC,KAAmB,IAC9CC,MAAM,CAACC,WAAW,CAChBD,MAAM,CAACE,OAAO,CAACH,KAAK,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,KAAK,CAACR,mBAAmB,CAACS,GAAG,CAACD,GAAG,CAAC,CACvE,CAAC","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,28 @@
1
+ import type { HostComponent, ViewProps } from 'react-native';
2
+ import { type CodegenTypes } from 'react-native';
3
+ type NativeAnimationStateEvent = Readonly<{
4
+ state: string;
5
+ }>;
6
+ type NativeContentLayoutEvent = Readonly<{
7
+ contentWidth: CodegenTypes.Float;
8
+ containerWidth: CodegenTypes.Float;
9
+ }>;
10
+ export interface NativeMarqueeViewProps extends ViewProps {
11
+ active: boolean;
12
+ reduceMotion: boolean;
13
+ speed: CodegenTypes.Double;
14
+ direction: string;
15
+ shortContentMode: string;
16
+ contentAlignment: string;
17
+ contentWidth: CodegenTypes.Float;
18
+ spacing: CodegenTypes.Float;
19
+ maxFlingVelocity: CodegenTypes.Float;
20
+ deceleration: CodegenTypes.Float;
21
+ pauseOnPress: boolean;
22
+ resumeDelayMs: CodegenTypes.Double;
23
+ onAnimationStateChange?: CodegenTypes.DirectEventHandler<NativeAnimationStateEvent>;
24
+ onContentLayout?: CodegenTypes.DirectEventHandler<NativeContentLayoutEvent>;
25
+ }
26
+ declare const _default: HostComponent<NativeMarqueeViewProps>;
27
+ export default _default;
28
+ //# sourceMappingURL=RNMarqueeViewNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RNMarqueeViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/RNMarqueeViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAA0B,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAEzE,KAAK,yBAAyB,GAAG,QAAQ,CAAC;IACxC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,KAAK,wBAAwB,GAAG,QAAQ,CAAC;IACvC,YAAY,EAAE,YAAY,CAAC,KAAK,CAAC;IACjC,cAAc,EAAE,YAAY,CAAC,KAAK,CAAC;CACpC,CAAC,CAAC;AAEH,MAAM,WAAW,sBAAuB,SAAQ,SAAS;IACvD,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,YAAY,CAAC,KAAK,CAAC;IACjC,OAAO,EAAE,YAAY,CAAC,KAAK,CAAC;IAC5B,gBAAgB,EAAE,YAAY,CAAC,KAAK,CAAC;IACrC,YAAY,EAAE,YAAY,CAAC,KAAK,CAAC;IACjC,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,YAAY,CAAC,MAAM,CAAC;IACnC,sBAAsB,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,yBAAyB,CAAC,CAAC;IACpF,eAAe,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,wBAAwB,CAAC,CAAC;CAC7E;wBAII,aAAa,CAAC,sBAAsB,CAAC;AAF1C,wBAE2C"}
@@ -0,0 +1,3 @@
1
+ export { Marquee } from './marquee';
2
+ export type { MarqueeAnimationState, MarqueeAnimationStateEvent, MarqueeContentAlignment, MarqueeContentLayoutEvent, MarqueeDirection, MarqueeInteraction, MarqueeProps, MarqueeReduceMotion, MarqueeShortContentMode, } from './types.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EACV,qBAAqB,EACrB,0BAA0B,EAC1B,uBAAuB,EACvB,yBAAyB,EACzB,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,YAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { MarqueeAnimationState } from '../types.js';
2
+ export declare const resolveAnimationState: (nativeState: string) => MarqueeAnimationState | null;
3
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/internal/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAU,CAAC;AAStD,eAAO,MAAM,qBAAqB,GAChC,aAAa,MAAM,KAClB,qBAAqB,GAAG,IAAkD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const CONTENT_WIDTH_EPSILON = 0.25;
2
+ export declare const resolveMeasuredContentWidth: (currentWidth: number, measuredWidth: number) => number;
3
+ //# sourceMappingURL=geometry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../../../src/internal/geometry.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAE1C,eAAO,MAAM,2BAA2B,GACtC,cAAc,MAAM,EACpB,eAAe,MAAM,KACpB,MAQF,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { MarqueeInteraction } from '../types.js';
2
+ export declare const DEFAULT_INTERACTION: {
3
+ readonly deceleration: 0.9985;
4
+ readonly maxFlingVelocity: 3200;
5
+ readonly pauseOnPress: true;
6
+ readonly resumeDelay: 0;
7
+ };
8
+ export declare const resolveInteraction: (interaction?: MarqueeInteraction) => {
9
+ deceleration: number;
10
+ maxFlingVelocity: number;
11
+ pauseOnPress: boolean;
12
+ resumeDelay: number;
13
+ };
14
+ export declare const resolveSpeed: (speed: number) => number;
15
+ export declare const resolveSpacing: (spacing: number) => number;
16
+ //# sourceMappingURL=options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../src/internal/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAU,CAAC;AAEnD,eAAO,MAAM,mBAAmB;;;;;CAKtB,CAAC;AASX,eAAO,MAAM,kBAAkB,GAAI,cAAc,kBAAkB;;;;;CAyBlE,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,MACT,CAAC;AAErC,eAAO,MAAM,cAAc,GAAI,SAAS,MAAM,KAAG,MACT,CAAC"}