react-native-gleam 1.0.0-beta.7 → 1.0.0-beta.8
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.
|
@@ -12,6 +12,7 @@ import android.graphics.Shader
|
|
|
12
12
|
import android.os.SystemClock
|
|
13
13
|
import android.view.Choreographer
|
|
14
14
|
import android.view.animation.DecelerateInterpolator
|
|
15
|
+
import androidx.annotation.UiThread
|
|
15
16
|
import com.facebook.react.bridge.Arguments
|
|
16
17
|
import com.facebook.react.bridge.ReactContext
|
|
17
18
|
import com.facebook.react.bridge.WritableMap
|
|
@@ -412,9 +413,9 @@ class GleamView(context: Context) : ReactViewGroup(context) {
|
|
|
412
413
|
*/
|
|
413
414
|
companion object SharedClock {
|
|
414
415
|
private val views = mutableListOf<GleamView>()
|
|
415
|
-
private val iterationSnapshot = mutableListOf<GleamView>()
|
|
416
416
|
private var frameCallback: Choreographer.FrameCallback? = null
|
|
417
417
|
|
|
418
|
+
@UiThread
|
|
418
419
|
fun register(view: GleamView) {
|
|
419
420
|
if (!views.contains(view)) {
|
|
420
421
|
views.add(view)
|
|
@@ -422,6 +423,7 @@ class GleamView(context: Context) : ReactViewGroup(context) {
|
|
|
422
423
|
if (views.size == 1) start()
|
|
423
424
|
}
|
|
424
425
|
|
|
426
|
+
@UiThread
|
|
425
427
|
fun unregister(view: GleamView) {
|
|
426
428
|
views.remove(view)
|
|
427
429
|
if (views.isEmpty()) stop()
|
|
@@ -430,9 +432,10 @@ class GleamView(context: Context) : ReactViewGroup(context) {
|
|
|
430
432
|
private fun start() {
|
|
431
433
|
frameCallback = Choreographer.FrameCallback { frameTimeNanos ->
|
|
432
434
|
val timeMs = frameTimeNanos / 1_000_000f
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
435
|
+
// Reverse index iteration — safe if onFrame triggers unregister (shrinks tail)
|
|
436
|
+
for (i in views.indices.reversed()) {
|
|
437
|
+
views[i].onFrame(timeMs)
|
|
438
|
+
}
|
|
436
439
|
frameCallback?.let { Choreographer.getInstance().postFrameCallback(it) }
|
|
437
440
|
}
|
|
438
441
|
Choreographer.getInstance().postFrameCallback(frameCallback!!)
|
package/ios/GleamView.mm
CHANGED
|
@@ -223,6 +223,12 @@ static void _unregisterView(GleamView *view) {
|
|
|
223
223
|
_didInitialSetup = NO;
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
+
// Invariant: a registered view (_isRegistered=YES) is held by the static
|
|
227
|
+
// __strong _views array, which prevents ARC dealloc while registered.
|
|
228
|
+
// Off-main dealloc with _isRegistered=YES should therefore be unreachable.
|
|
229
|
+
// If the invariant is violated in release, we skip _unregisterView to avoid
|
|
230
|
+
// racing on the statics (_views, _viewCount, _displayLink) that are read/written
|
|
231
|
+
// by the display link on the main thread. The view leaks in _views but no crash.
|
|
226
232
|
- (void)dealloc
|
|
227
233
|
{
|
|
228
234
|
if (_isRegistered) {
|
|
@@ -230,9 +236,7 @@ static void _unregisterView(GleamView *view) {
|
|
|
230
236
|
if ([NSThread isMainThread]) {
|
|
231
237
|
_unregisterView(self);
|
|
232
238
|
} else {
|
|
233
|
-
|
|
234
|
-
_stopDisplayLinkIfNeeded();
|
|
235
|
-
});
|
|
239
|
+
NSAssert(NO, @"GleamView deallocated off main thread — static __strong array should prevent this");
|
|
236
240
|
}
|
|
237
241
|
}
|
|
238
242
|
}
|
package/lib/module/index.js
CHANGED
|
@@ -25,19 +25,12 @@ export let GleamTransition = /*#__PURE__*/function (GleamTransition) {
|
|
|
25
25
|
return GleamTransition;
|
|
26
26
|
}({});
|
|
27
27
|
|
|
28
|
-
// Shimmer-specific
|
|
29
|
-
//
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
for (const key of Object.keys(props)) {
|
|
35
|
-
if (!SHIMMER_KEYS.has(key)) {
|
|
36
|
-
viewProps[key] = props[key];
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return viewProps;
|
|
40
|
-
}
|
|
28
|
+
// Shimmer-specific keys that must be destructured from props before spreading
|
|
29
|
+
// viewProps onto <View> in Line mode.
|
|
30
|
+
// Direction 1 (compile-time): `satisfies` catches stale/typo keys.
|
|
31
|
+
// Direction 2 (DEV runtime): check inside GleamViewComponent catches
|
|
32
|
+
// new NativeProps keys that weren't added to this list or destructured.
|
|
33
|
+
const SHIMMER_KEYS = new Set(['loading', 'speed', 'direction', 'delay', 'transitionDuration', 'transitionType', 'intensity', 'baseColor', 'highlightColor', 'onTransitionEnd']);
|
|
41
34
|
function hasLineChildren(children) {
|
|
42
35
|
let found = false;
|
|
43
36
|
React.Children.forEach(children, child => {
|
|
@@ -64,13 +57,24 @@ function GleamViewComponent({
|
|
|
64
57
|
loading,
|
|
65
58
|
speed,
|
|
66
59
|
direction,
|
|
60
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
61
|
+
delay,
|
|
67
62
|
transitionDuration,
|
|
68
63
|
transitionType,
|
|
69
64
|
intensity,
|
|
70
65
|
baseColor,
|
|
71
66
|
highlightColor,
|
|
72
|
-
|
|
67
|
+
onTransitionEnd,
|
|
68
|
+
children,
|
|
69
|
+
...viewProps
|
|
73
70
|
} = props;
|
|
71
|
+
if (__DEV__) {
|
|
72
|
+
for (const key of Object.keys(viewProps)) {
|
|
73
|
+
if (SHIMMER_KEYS.has(key)) {
|
|
74
|
+
console.error(`GleamView: shimmer prop "${key}" leaked into viewProps. ` + 'Add it to the destructuring in GleamViewComponent and to SHIMMER_KEYS.');
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
74
78
|
const lineCountRef = useRef(0);
|
|
75
79
|
const warnedTransitionRef = useRef(false);
|
|
76
80
|
const [hasLines, setHasLines] = useState(() => hasLineChildren(children));
|
|
@@ -80,8 +84,12 @@ function GleamViewComponent({
|
|
|
80
84
|
return () => {
|
|
81
85
|
lineCountRef.current--;
|
|
82
86
|
if (lineCountRef.current === 0) {
|
|
83
|
-
|
|
84
|
-
|
|
87
|
+
queueMicrotask(() => {
|
|
88
|
+
if (lineCountRef.current === 0) {
|
|
89
|
+
setHasLines(false);
|
|
90
|
+
warnedTransitionRef.current = false;
|
|
91
|
+
}
|
|
92
|
+
});
|
|
85
93
|
}
|
|
86
94
|
};
|
|
87
95
|
}, []);
|
|
@@ -101,7 +109,7 @@ function GleamViewComponent({
|
|
|
101
109
|
// but that type isn't publicly exported from react-native. Safe at runtime.
|
|
102
110
|
const nativeRef = ref;
|
|
103
111
|
if (hasLines) {
|
|
104
|
-
if (__DEV__ &&
|
|
112
|
+
if (__DEV__ && onTransitionEnd && !warnedTransitionRef.current) {
|
|
105
113
|
warnedTransitionRef.current = true;
|
|
106
114
|
console.warn('GleamView: onTransitionEnd is ignored when GleamView.Line children are present. ' + 'Use onTransitionEnd on individual GleamView.Line components instead.');
|
|
107
115
|
}
|
|
@@ -109,7 +117,7 @@ function GleamViewComponent({
|
|
|
109
117
|
value: contextValue,
|
|
110
118
|
children: /*#__PURE__*/_jsx(View, {
|
|
111
119
|
ref: nativeRef,
|
|
112
|
-
...
|
|
120
|
+
...viewProps,
|
|
113
121
|
children: children
|
|
114
122
|
})
|
|
115
123
|
});
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useMemo","useRef","useState","View","NativeGleamView","GleamContext","GleamLine","jsx","_jsx","GleamDirection","GleamTransition","
|
|
1
|
+
{"version":3,"names":["React","useCallback","useMemo","useRef","useState","View","NativeGleamView","GleamContext","GleamLine","jsx","_jsx","GleamDirection","GleamTransition","SHIMMER_KEYS","Set","hasLineChildren","children","found","Children","forEach","child","isValidElement","type","Fragment","props","GleamViewComponent","ref","loading","speed","direction","delay","transitionDuration","transitionType","intensity","baseColor","highlightColor","onTransitionEnd","viewProps","__DEV__","key","Object","keys","has","console","error","lineCountRef","warnedTransitionRef","hasLines","setHasLines","registerLine","current","queueMicrotask","contextValue","nativeRef","warn","Provider","value","displayName","GleamView","assign","Line"],"s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AAK;IACLC,SAAS;IACTE,kBAAkB;IAClBC,cAAc;IACdC,SAAS;IACTC,SAAS;IACTC,cAAc;IACdc;EACF,CAAC,CAAC,EACF,CACEtB,OAAO,EACPC,KAAK,EACLC,SAAS,EACTE,kBAAkB,EAClBC,cAAc,EACdC,SAAS,EACTC,SAAS,EACTC,cAAc,EACdc,YAAY,CAEhB,CAAC;;EAED;EACA;EACA,MAAMI,SAAS,GAAG3B,GAAU;EAE5B,IAAIqB,QAAQ,EAAE;IACZ,IAAIT,OAAO,IAAIF,eAAe,IAAI,CAACU,mBAAmB,CAACI,OAAO,EAAE;MAC9DJ,mBAAmB,CAACI,OAAO,GAAG,IAAI;MAClCP,OAAO,CAACW,IAAI,CACV,kFAAkF,GAChF,sEACJ,CAAC;IACH;IACA,oBACE5C,IAAA,CAACH,YAAY,CAACgD,QAAQ;MAACC,KAAK,EAAEJ,YAAa;MAAApC,QAAA,eACzCN,IAAA,CAACL,IAAI;QAACqB,GAAG,EAAE2B,SAAU;QAAA,GAAKhB,SAAS;QAAArB,QAAA,EAChCA;MAAQ,CACL;IAAC,CACc,CAAC;EAE5B;EAEA,oBACEN,IAAA,CAACH,YAAY,CAACgD,QAAQ;IAACC,KAAK,EAAEJ,YAAa;IAAApC,QAAA,eACzCN,IAAA,CAACJ,eAAe;MAACoB,GAAG,EAAE2B,SAAU;MAAA,GAAK7B,KAAK;MAAAR,QAAA,EACvCA;IAAQ,CACM;EAAC,CACG,CAAC;AAE5B;AAEAS,kBAAkB,CAACgC,WAAW,GAAG,WAAW;AAE5C,OAAO,MAAMC,SAAS,GAAGlB,MAAM,CAACmB,MAAM,CAAClC,kBAAkB,EAAE;EACzDmC,IAAI,EAAEpD;AACR,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AACtE,OAAO,EA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AC1B,GAAG,EACH,GAAG,KAAK,EACT,EAAE,WAAW,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;CAAE,2CAqG5C;kBAxGQ,kBAAkB;;;AA4G3B,eAAO,MAAM,SAAS;;CAEpB,CAAC"}
|
package/package.json
CHANGED
package/src/index.tsx
CHANGED
|
@@ -28,9 +28,12 @@ export enum GleamTransition {
|
|
|
28
28
|
Collapse = 'collapse',
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
// Shimmer-specific
|
|
32
|
-
//
|
|
33
|
-
|
|
31
|
+
// Shimmer-specific keys that must be destructured from props before spreading
|
|
32
|
+
// viewProps onto <View> in Line mode.
|
|
33
|
+
// Direction 1 (compile-time): `satisfies` catches stale/typo keys.
|
|
34
|
+
// Direction 2 (DEV runtime): check inside GleamViewComponent catches
|
|
35
|
+
// new NativeProps keys that weren't added to this list or destructured.
|
|
36
|
+
const SHIMMER_KEYS: ReadonlySet<string> = new Set([
|
|
34
37
|
'loading',
|
|
35
38
|
'speed',
|
|
36
39
|
'direction',
|
|
@@ -41,20 +44,7 @@ const SHIMMER_KEY_LIST = [
|
|
|
41
44
|
'baseColor',
|
|
42
45
|
'highlightColor',
|
|
43
46
|
'onTransitionEnd',
|
|
44
|
-
|
|
45
|
-
] as const satisfies ReadonlyArray<keyof NativeProps | 'children'>;
|
|
46
|
-
|
|
47
|
-
const SHIMMER_KEYS: ReadonlySet<string> = new Set(SHIMMER_KEY_LIST);
|
|
48
|
-
|
|
49
|
-
function pickViewProps(props: NativeProps) {
|
|
50
|
-
const viewProps: Record<string, unknown> = {};
|
|
51
|
-
for (const key of Object.keys(props)) {
|
|
52
|
-
if (!SHIMMER_KEYS.has(key)) {
|
|
53
|
-
viewProps[key] = (props as Record<string, unknown>)[key];
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return viewProps;
|
|
57
|
-
}
|
|
47
|
+
] as const satisfies ReadonlyArray<keyof NativeProps>);
|
|
58
48
|
|
|
59
49
|
function hasLineChildren(children: React.ReactNode): boolean {
|
|
60
50
|
let found = false;
|
|
@@ -84,14 +74,29 @@ function GleamViewComponent({
|
|
|
84
74
|
loading,
|
|
85
75
|
speed,
|
|
86
76
|
direction,
|
|
77
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
78
|
+
delay,
|
|
87
79
|
transitionDuration,
|
|
88
80
|
transitionType,
|
|
89
81
|
intensity,
|
|
90
82
|
baseColor,
|
|
91
83
|
highlightColor,
|
|
84
|
+
onTransitionEnd,
|
|
92
85
|
children,
|
|
86
|
+
...viewProps
|
|
93
87
|
} = props;
|
|
94
88
|
|
|
89
|
+
if (__DEV__) {
|
|
90
|
+
for (const key of Object.keys(viewProps)) {
|
|
91
|
+
if (SHIMMER_KEYS.has(key)) {
|
|
92
|
+
console.error(
|
|
93
|
+
`GleamView: shimmer prop "${key}" leaked into viewProps. ` +
|
|
94
|
+
'Add it to the destructuring in GleamViewComponent and to SHIMMER_KEYS.'
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
95
100
|
const lineCountRef = useRef(0);
|
|
96
101
|
const warnedTransitionRef = useRef(false);
|
|
97
102
|
const [hasLines, setHasLines] = useState(() => hasLineChildren(children));
|
|
@@ -102,8 +107,12 @@ function GleamViewComponent({
|
|
|
102
107
|
return () => {
|
|
103
108
|
lineCountRef.current--;
|
|
104
109
|
if (lineCountRef.current === 0) {
|
|
105
|
-
|
|
106
|
-
|
|
110
|
+
queueMicrotask(() => {
|
|
111
|
+
if (lineCountRef.current === 0) {
|
|
112
|
+
setHasLines(false);
|
|
113
|
+
warnedTransitionRef.current = false;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
107
116
|
}
|
|
108
117
|
};
|
|
109
118
|
}, []);
|
|
@@ -138,7 +147,7 @@ function GleamViewComponent({
|
|
|
138
147
|
const nativeRef = ref as any;
|
|
139
148
|
|
|
140
149
|
if (hasLines) {
|
|
141
|
-
if (__DEV__ &&
|
|
150
|
+
if (__DEV__ && onTransitionEnd && !warnedTransitionRef.current) {
|
|
142
151
|
warnedTransitionRef.current = true;
|
|
143
152
|
console.warn(
|
|
144
153
|
'GleamView: onTransitionEnd is ignored when GleamView.Line children are present. ' +
|
|
@@ -147,7 +156,7 @@ function GleamViewComponent({
|
|
|
147
156
|
}
|
|
148
157
|
return (
|
|
149
158
|
<GleamContext.Provider value={contextValue}>
|
|
150
|
-
<View ref={nativeRef} {...
|
|
159
|
+
<View ref={nativeRef} {...viewProps}>
|
|
151
160
|
{children}
|
|
152
161
|
</View>
|
|
153
162
|
</GleamContext.Provider>
|