panelui-native 0.82.0 → 0.83.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/lib/module/components/bottom-sheet/index.js +111 -16
- package/lib/module/components/bottom-sheet/index.js.map +1 -1
- package/lib/module/components/image-generation/dot-field.js +66 -9
- package/lib/module/components/image-generation/dot-field.js.map +1 -1
- package/lib/module/components/image-generation/index.js +65 -23
- package/lib/module/components/image-generation/index.js.map +1 -1
- package/lib/module/native/index.js +24 -0
- package/lib/module/native/index.js.map +1 -1
- package/lib/typescript/src/components/bottom-sheet/index.d.ts +17 -1
- package/lib/typescript/src/components/bottom-sheet/index.d.ts.map +1 -1
- package/lib/typescript/src/components/image-generation/dot-field.d.ts +36 -1
- package/lib/typescript/src/components/image-generation/dot-field.d.ts.map +1 -1
- package/lib/typescript/src/components/image-generation/index.d.ts +16 -8
- package/lib/typescript/src/components/image-generation/index.d.ts.map +1 -1
- package/lib/typescript/src/native/index.d.ts +26 -0
- package/lib/typescript/src/native/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/bottom-sheet/index.tsx +139 -16
- package/src/components/image-generation/dot-field.ts +65 -9
- package/src/components/image-generation/index.tsx +67 -18
- package/src/native/index.ts +45 -0
|
@@ -7,7 +7,7 @@ import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
|
7
7
|
import Animated, { Extrapolation, FadeIn, cancelAnimation, interpolate, SlideInDown, runOnJS, useAnimatedScrollHandler, useAnimatedStyle, useReducedMotion, useSharedValue, withSpring, withTiming } from 'react-native-reanimated';
|
|
8
8
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
9
9
|
import { tv } from 'tailwind-variants';
|
|
10
|
-
import { getNativeUI } from "../../native/index.js";
|
|
10
|
+
import { getComposeModifiers, getNativeUI, getSwiftUIModifiers } from "../../native/index.js";
|
|
11
11
|
import { XIcon } from "../../icons/index.js";
|
|
12
12
|
import { ModalPortal } from "../../primitives/portal.js";
|
|
13
13
|
import { Scrim } from "../../primitives/scrim.js";
|
|
@@ -106,6 +106,22 @@ const DETENT_FRACTION = {
|
|
|
106
106
|
full: 0.9
|
|
107
107
|
};
|
|
108
108
|
|
|
109
|
+
/**
|
|
110
|
+
* How long to treat a dismissal *we* asked for as still in flight.
|
|
111
|
+
*
|
|
112
|
+
* A timer, because there is nothing to wait on. The platform reports a
|
|
113
|
+
* dismissal the reader performed — that report is the binding writing its new
|
|
114
|
+
* value back — but not one we asked for, where the binding already holds the
|
|
115
|
+
* value it would have written and the change is suppressed at the source. So
|
|
116
|
+
* the only sheet whose departure can be observed is the one we did not ask to
|
|
117
|
+
* leave.
|
|
118
|
+
*
|
|
119
|
+
* Comfortably past the system's own sheet transition, since the cost of being
|
|
120
|
+
* late is a present held a little longer than it needed to be, and the cost of
|
|
121
|
+
* being early is the platform dropping it and no sheet at all.
|
|
122
|
+
*/
|
|
123
|
+
const NATIVE_DISMISS_MS = 400;
|
|
124
|
+
|
|
109
125
|
/**
|
|
110
126
|
* The height the content should at least fill for a given set of detents.
|
|
111
127
|
*
|
|
@@ -136,6 +152,27 @@ export function bottomSheetDetentHeight(snapPoints, screenHeight) {
|
|
|
136
152
|
return undefined;
|
|
137
153
|
}
|
|
138
154
|
|
|
155
|
+
/**
|
|
156
|
+
* The modifier that paints a native sheet's own surface, for whichever toolkit
|
|
157
|
+
* is drawing it — or nothing, where neither is reachable.
|
|
158
|
+
*
|
|
159
|
+
* A sheet's surface is not the background of anything hosted in it. The
|
|
160
|
+
* grabber's strip at the top and the safe-area inset at the bottom are the
|
|
161
|
+
* sheet's own chrome, and a colour put behind the content stops short of both
|
|
162
|
+
* of them — so the sheet arrives two-tone, and shifts as it moves between
|
|
163
|
+
* detents. These two reach the surface itself.
|
|
164
|
+
*
|
|
165
|
+
* The toolkits do not share a vocabulary, so the question is asked of each in
|
|
166
|
+
* its own terms rather than one answer being sent to both.
|
|
167
|
+
*/
|
|
168
|
+
function nativeSheetSurface(color) {
|
|
169
|
+
const swiftUI = getSwiftUIModifiers();
|
|
170
|
+
if (swiftUI) return [swiftUI.presentationBackground(color)];
|
|
171
|
+
const compose = getComposeModifiers();
|
|
172
|
+
if (compose) return [compose.background(color)];
|
|
173
|
+
return undefined;
|
|
174
|
+
}
|
|
175
|
+
|
|
139
176
|
/**
|
|
140
177
|
* Set by the root so Content knows the platform is drawing the sheet, and with
|
|
141
178
|
* which detents. Null means the styled sheet renders.
|
|
@@ -160,7 +197,8 @@ function BottomSheetRoot({
|
|
|
160
197
|
onOpenChange,
|
|
161
198
|
defaultOpen = false,
|
|
162
199
|
native,
|
|
163
|
-
snapPoints
|
|
200
|
+
snapPoints,
|
|
201
|
+
nativeBackground
|
|
164
202
|
}) {
|
|
165
203
|
const [internalOpen, setInternalOpen] = useState(defaultOpen);
|
|
166
204
|
const isControlled = open !== undefined;
|
|
@@ -176,8 +214,9 @@ function BottomSheetRoot({
|
|
|
176
214
|
const nativeUI = native ? getNativeUI() : null;
|
|
177
215
|
const nativeSheet = useMemo(() => nativeUI ? {
|
|
178
216
|
nativeUI,
|
|
179
|
-
snapPoints
|
|
180
|
-
|
|
217
|
+
snapPoints,
|
|
218
|
+
background: nativeBackground
|
|
219
|
+
} : null, [nativeBackground, nativeUI, snapPoints]);
|
|
181
220
|
return /*#__PURE__*/_jsx(BottomSheetContext.Provider, {
|
|
182
221
|
value: context,
|
|
183
222
|
children: /*#__PURE__*/_jsx(NativeSheetContext.Provider, {
|
|
@@ -234,6 +273,10 @@ function BottomSheetContent({
|
|
|
234
273
|
const insets = useSafeAreaInsets();
|
|
235
274
|
const translateY = useSharedValue(0);
|
|
236
275
|
const closeTint = useCSSVariable('--color-muted-foreground');
|
|
276
|
+
// Read unconditionally, used only by the native branch: the platform draws
|
|
277
|
+
// that sheet's container, so a token can only reach it as a colour handed
|
|
278
|
+
// over, never as a class.
|
|
279
|
+
const popoverSurface = useCSSVariable('--color-popover');
|
|
237
280
|
|
|
238
281
|
/*
|
|
239
282
|
* The scrolling body's gesture, if there is one. It is built here rather
|
|
@@ -307,35 +350,77 @@ function BottomSheetContent({
|
|
|
307
350
|
* sees a sheet that "took a moment" or never came at all.
|
|
308
351
|
*
|
|
309
352
|
* `isPresented` is therefore driven from here rather than straight from
|
|
310
|
-
* `open
|
|
311
|
-
*
|
|
312
|
-
*
|
|
353
|
+
* `open`: a present that arrives during a dismissal is held, and let through
|
|
354
|
+
* once that dismissal is over.
|
|
355
|
+
*
|
|
356
|
+
* Knowing when it is over is the hard half, because it depends on who asked.
|
|
357
|
+
* A dismissal the reader performed is reported — that report is the platform
|
|
358
|
+
* writing the new value back to us. One we asked for is not: the value is
|
|
359
|
+
* already what the platform would have written, so the change is suppressed
|
|
360
|
+
* at the source and no report is ever sent. A queue that waits for one
|
|
361
|
+
* regardless waits for ever, and every present after the first is held —
|
|
362
|
+
* which is a sheet that opens once and then never again, whether the flag was
|
|
363
|
+
* raised by the reader's swipe or by a Close button inside the sheet.
|
|
364
|
+
*
|
|
365
|
+
* So the two are ended by their own means: the reader's by the report, ours
|
|
366
|
+
* by {@link NATIVE_DISMISS_MS} — and by the report as well, if one turns up,
|
|
367
|
+
* since arriving early is only ever an improvement.
|
|
313
368
|
*/
|
|
314
369
|
const [nativePresented, setNativePresented] = useState(open);
|
|
370
|
+
const nativeOnScreen = useRef(open);
|
|
315
371
|
const nativeDismissing = useRef(false);
|
|
372
|
+
const nativeDismissTimer = useRef(null);
|
|
316
373
|
const openRef = useRef(open);
|
|
317
374
|
openRef.current = open;
|
|
375
|
+
|
|
376
|
+
/** The dismissal is over: let a held present through, if one is waiting. */
|
|
377
|
+
const endNativeDismissal = useCallback(() => {
|
|
378
|
+
if (nativeDismissTimer.current !== null) {
|
|
379
|
+
clearTimeout(nativeDismissTimer.current);
|
|
380
|
+
nativeDismissTimer.current = null;
|
|
381
|
+
}
|
|
382
|
+
if (!nativeDismissing.current) return;
|
|
383
|
+
nativeDismissing.current = false;
|
|
384
|
+
if (openRef.current) {
|
|
385
|
+
nativeOnScreen.current = true;
|
|
386
|
+
setNativePresented(true);
|
|
387
|
+
}
|
|
388
|
+
}, []);
|
|
318
389
|
useEffect(() => {
|
|
319
390
|
if (!nativeSheet) return;
|
|
320
391
|
if (open) {
|
|
321
392
|
if (nativeDismissing.current) return;
|
|
393
|
+
nativeOnScreen.current = true;
|
|
322
394
|
setNativePresented(true);
|
|
323
395
|
return;
|
|
324
396
|
}
|
|
325
|
-
|
|
397
|
+
|
|
398
|
+
// Only a sheet the platform still has on screen can be in the middle of
|
|
399
|
+
// leaving. One the reader already swiped away has reported itself gone.
|
|
400
|
+
if (nativeOnScreen.current) {
|
|
401
|
+
nativeOnScreen.current = false;
|
|
402
|
+
nativeDismissing.current = true;
|
|
403
|
+
if (nativeDismissTimer.current !== null) clearTimeout(nativeDismissTimer.current);
|
|
404
|
+
nativeDismissTimer.current = setTimeout(endNativeDismissal, NATIVE_DISMISS_MS);
|
|
405
|
+
}
|
|
326
406
|
setNativePresented(false);
|
|
327
|
-
}, [
|
|
407
|
+
}, [endNativeDismissal, nativeSheet, open]);
|
|
408
|
+
useEffect(() => () => {
|
|
409
|
+
if (nativeDismissTimer.current !== null) clearTimeout(nativeDismissTimer.current);
|
|
410
|
+
}, []);
|
|
328
411
|
const onNativeDismiss = useCallback(() => {
|
|
329
|
-
//
|
|
330
|
-
//
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
412
|
+
// The platform reporting that its sheet has gone. Whatever asked for it,
|
|
413
|
+
// there is nothing on screen now.
|
|
414
|
+
nativeOnScreen.current = false;
|
|
415
|
+
|
|
416
|
+
// Ours, or the reader's? A dismissal we asked for hands the queue back
|
|
417
|
+
// ahead of its window; one the reader performed is a close to report.
|
|
418
|
+
if (nativeDismissing.current) {
|
|
419
|
+
endNativeDismissal();
|
|
335
420
|
return;
|
|
336
421
|
}
|
|
337
422
|
if (dismissible) close();
|
|
338
|
-
}, [close, dismissible]);
|
|
423
|
+
}, [close, dismissible, endNativeDismissal]);
|
|
339
424
|
const pan = useMemo(() => Gesture.Pan()
|
|
340
425
|
/*
|
|
341
426
|
* A drag has to travel before it takes the touch. This detector wraps
|
|
@@ -426,6 +511,15 @@ function BottomSheetContent({
|
|
|
426
511
|
* height, so a native sheet keeps the system's snapping.
|
|
427
512
|
*/
|
|
428
513
|
const snapPoints = nativeSheet.snapPoints ?? (size === 'auto' ? undefined : [size]);
|
|
514
|
+
/*
|
|
515
|
+
* `true` means the theme's surface, and a string means itself. A token
|
|
516
|
+
* that did not resolve is dropped rather than passed on — an unresolved
|
|
517
|
+
* colour reaching the platform is a sheet painted some default, which is
|
|
518
|
+
* further from the material than leaving the material alone.
|
|
519
|
+
*/
|
|
520
|
+
const requested = nativeSheet.background;
|
|
521
|
+
const surface = requested === true ? typeof popoverSurface === 'string' ? popoverSurface : undefined : typeof requested === 'string' ? requested : undefined;
|
|
522
|
+
const modifiers = surface ? nativeSheetSurface(surface) : undefined;
|
|
429
523
|
// The platform owns presentation, so this stays mounted and toggles
|
|
430
524
|
// isPresented rather than unmounting on close.
|
|
431
525
|
//
|
|
@@ -442,6 +536,7 @@ function BottomSheetContent({
|
|
|
442
536
|
isPresented: nativePresented,
|
|
443
537
|
onDismiss: onNativeDismiss,
|
|
444
538
|
snapPoints: snapPoints,
|
|
539
|
+
modifiers: modifiers,
|
|
445
540
|
children: /*#__PURE__*/_jsx(RNHostView, {
|
|
446
541
|
matchContents: true,
|
|
447
542
|
children: /*#__PURE__*/_jsx(BottomSheetContext.Provider, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["cloneElement","createContext","isValidElement","useCallback","useContext","useEffect","useMemo","useRef","useState","Pressable","StyleSheet","useWindowDimensions","View","useCSSVariable","Gesture","GestureDetector","Animated","Extrapolation","FadeIn","cancelAnimation","interpolate","SlideInDown","runOnJS","useAnimatedScrollHandler","useAnimatedStyle","useReducedMotion","useSharedValue","withSpring","withTiming","useSafeAreaInsets","tv","getNativeUI","XIcon","ModalPortal","Scrim","Text","textChildren","useBackHandler","cn","impactKnock","jsx","_jsx","jsxs","_jsxs","SPRING","duration","dampingRatio","EXIT_SPRING","overshootClamping","DISMISS_DISTANCE","DISMISS_VELOCITY","ENTERING","springify","project","velocity","decelerationRate","sheetVariants","base","variants","detached","false","true","defaultVariants","BottomSheetContext","useBottomSheet","component","context","Error","DETENT_FRACTION","half","full","bottomSheetDetentHeight","snapPoints","screenHeight","length","undefined","first","fraction","height","NativeSheetContext","SheetSurfaceContext","BottomSheetRoot","children","open","onOpenChange","defaultOpen","native","internalOpen","setInternalOpen","isControlled","resolvedOpen","setOpen","next","nativeUI","nativeSheet","Provider","value","BottomSheetTrigger","onPress","args","props","SIZE_FRACTION","BottomSheetContent","className","dismissible","showClose","showGrabber","blur","size","width","screenWidth","reducedMotion","insets","translateY","closeTint","scrollGesture","Native","scrollOffset","hasScrollable","close","presented","setPresented","land","finished","nativePresented","setNativePresented","nativeDismissing","openRef","current","onNativeDismiss","wasOurs","pan","Pan","activeOffsetY","simultaneousWithExternalGesture","onChange","event","changeY","onEnd","projected","velocityY","sheetStyle","transform","backdropStyle","opacity","CLAMP","sizedHeight","Math","min","top","surface","Host","BottomSheet","NativeBottomSheet","RNHostView","matchContents","ignoreSafeArea","style","position","isPresented","onDismiss","minHeight","paddingBottom","max","bottom","absoluteFill","accessibilityLabel","gesture","entering","accessibilityViewIsModal","accessibilityRole","hitSlop","color","BottomSheetHeader","title","description","text","weight","muted","displayName","BottomSheetBody","onScroll","handler","contentOffset","y","body","ScrollView","scrollEventThrottle","showsVerticalScrollIndicator","BottomSheetFooter","Object","assign","Trigger","Content","Header","Body","Footer"],"sourceRoot":"../../../../src","sources":["components/bottom-sheet/index.tsx"],"mappings":";;AAAA,SACEA,YAAY,EACZC,aAAa,EACbC,cAAc,EACdC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QAIH,OAAO;AACd,SACEC,SAAS,EACTC,UAAU,EACVC,mB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SAAS,CAAE;IAAA,GAC/BH,KAAK;IAAAlB,QAAA,EAER9C,YAAY,CAAC8C,QAAQ;EAAC,CACJ,CACtB;;EAED;AACF;AACA;AACA;AACA;EACE,IAAI,CAACoE,OAAO,EAAE,OAAOmC,IAAI;EACzB,oBAAOhJ,IAAA,CAAC1B,eAAe;IAACwJ,OAAO,EAAEjB,OAAO,CAACnC,aAAc;IAAAjC,QAAA,EAAEuG;EAAI,CAAkB,CAAC;AAClF;AACAL,eAAe,CAACD,WAAW,GAAG,kBAAkB;AAOhD;AACA;AACA;AACA;AACA;AACA,SAASU,iBAAiBA,CAAC;EACzBtF,SAAS;EACTrB,QAAQ;EACR,GAAGkB;AACmB,CAAC,EAAE;EACzB,oBACE3D,IAAA,CAAC7B,IAAI;IACH2F,SAAS,EAAEjE,EAAE,CAAC,mCAAmC,EAAEiE,SAAS,CAAE;IAAA,GAC1DH,KAAK;IAAAlB,QAAA,EAER9C,YAAY,CAAC8C,QAAQ;EAAC,CACnB,CAAC;AAEX;AACA2G,iBAAiB,CAACV,WAAW,GAAG,oBAAoB;AAEpD,OAAO,MAAM3B,WAAW,GAAGsC,MAAM,CAACC,MAAM,CAAC9G,eAAe,EAAE;EACxD+G,OAAO,EAAE/F,kBAAkB;EAC3BgG,OAAO,EAAE3F,kBAAkB;EAC3B4F,MAAM,EAAErB,iBAAiB;EACzBsB,IAAI,EAAEf,eAAe;EACrBgB,MAAM,EAAEP;AACV,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["cloneElement","createContext","isValidElement","useCallback","useContext","useEffect","useMemo","useRef","useState","Pressable","StyleSheet","useWindowDimensions","View","useCSSVariable","Gesture","GestureDetector","Animated","Extrapolation","FadeIn","cancelAnimation","interpolate","SlideInDown","runOnJS","useAnimatedScrollHandler","useAnimatedStyle","useReducedMotion","useSharedValue","withSpring","withTiming","useSafeAreaInsets","tv","getComposeModifiers","getNativeUI","getSwiftUIModifiers","XIcon","ModalPortal","Scrim","Text","textChildren","useBackHandler","cn","impactKnock","jsx","_jsx","jsxs","_jsxs","SPRING","duration","dampingRatio","EXIT_SPRING","overshootClamping","DISMISS_DISTANCE","DISMISS_VELOCITY","ENTERING","springify","project","velocity","decelerationRate","sheetVariants","base","variants","detached","false","true","defaultVariants","BottomSheetContext","useBottomSheet","component","context","Error","DETENT_FRACTION","half","full","NATIVE_DISMISS_MS","bottomSheetDetentHeight","snapPoints","screenHeight","length","undefined","first","fraction","height","nativeSheetSurface","color","swiftUI","presentationBackground","compose","background","NativeSheetContext","SheetSurfaceContext","BottomSheetRoot","children","open","onOpenChange","defaultOpen","native","nativeBackground","internalOpen","setInternalOpen","isControlled","resolvedOpen","setOpen","next","nativeUI","nativeSheet","Provider","value","BottomSheetTrigger","onPress","args","props","SIZE_FRACTION","BottomSheetContent","className","dismissible","showClose","showGrabber","blur","size","width","screenWidth","reducedMotion","insets","translateY","closeTint","popoverSurface","scrollGesture","Native","scrollOffset","hasScrollable","close","presented","setPresented","land","finished","nativePresented","setNativePresented","nativeOnScreen","nativeDismissing","nativeDismissTimer","openRef","current","endNativeDismissal","clearTimeout","setTimeout","onNativeDismiss","pan","Pan","activeOffsetY","simultaneousWithExternalGesture","onChange","event","changeY","onEnd","projected","velocityY","sheetStyle","transform","backdropStyle","opacity","CLAMP","sizedHeight","Math","min","top","surface","Host","BottomSheet","NativeBottomSheet","RNHostView","requested","modifiers","matchContents","ignoreSafeArea","style","position","isPresented","onDismiss","minHeight","paddingBottom","max","bottom","absoluteFill","accessibilityLabel","gesture","entering","accessibilityViewIsModal","accessibilityRole","hitSlop","BottomSheetHeader","title","description","text","weight","muted","displayName","BottomSheetBody","onScroll","handler","contentOffset","y","body","ScrollView","scrollEventThrottle","showsVerticalScrollIndicator","BottomSheetFooter","Object","assign","Trigger","Content","Header","Body","Footer"],"sourceRoot":"../../../../src","sources":["components/bottom-sheet/index.tsx"],"mappings":";;AAAA,SACEA,YAAY,EACZC,aAAa,EACbC,cAAc,EACdC,WAAW,EACX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AACA;AACA,SAASU,iBAAiBA,CAAC;EACzB5F,SAAS;EACTtB,QAAQ;EACR,GAAGmB;AACmB,CAAC,EAAE;EACzB,oBACEnE,IAAA,CAAC/B,IAAI;IACHqG,SAAS,EAAEzE,EAAE,CAAC,mCAAmC,EAAEyE,SAAS,CAAE;IAAA,GAC1DH,KAAK;IAAAnB,QAAA,EAERrD,YAAY,CAACqD,QAAQ;EAAC,CACnB,CAAC;AAEX;AACAkH,iBAAiB,CAACV,WAAW,GAAG,oBAAoB;AAEpD,OAAO,MAAM5B,WAAW,GAAGuC,MAAM,CAACC,MAAM,CAACrH,eAAe,EAAE;EACxDsH,OAAO,EAAErG,kBAAkB;EAC3BsG,OAAO,EAAEjG,kBAAkB;EAC3BkG,MAAM,EAAErB,iBAAiB;EACzBsB,IAAI,EAAEf,eAAe;EACrBgB,MAAM,EAAEP;AACV,CAAC,CAAC","ignoreList":[]}
|
|
@@ -27,6 +27,15 @@ export const DOT_LIT_RADIUS = 1.9;
|
|
|
27
27
|
/** How visible the resting grid is, under everything. */
|
|
28
28
|
export const DOT_REST_OPACITY = 0.16;
|
|
29
29
|
|
|
30
|
+
/**
|
|
31
|
+
* How visible the lit dots are, together.
|
|
32
|
+
*
|
|
33
|
+
* "Together" is the operative word: they are drawn as two layers fading into
|
|
34
|
+
* one another, and this is what the pair composites to, not what either one
|
|
35
|
+
* carries. {@link crossfadeAlphas} is what holds that true.
|
|
36
|
+
*/
|
|
37
|
+
export const LIT_OPACITY = 0.9;
|
|
38
|
+
|
|
30
39
|
/** How many still frames one loop is drawn as. */
|
|
31
40
|
export const FRAMES = 24;
|
|
32
41
|
|
|
@@ -117,11 +126,20 @@ export function influenceAt(distance, radius) {
|
|
|
117
126
|
/**
|
|
118
127
|
* Where the light is at a phase of the loop, and how wide it reaches.
|
|
119
128
|
*
|
|
120
|
-
* `drift` wanders around the middle
|
|
121
|
-
*
|
|
122
|
-
* amplitudes because a light that reaches the corners
|
|
123
|
-
*
|
|
124
|
-
*
|
|
129
|
+
* `drift` wanders around the middle on a figure-eight: one horizontal pass to
|
|
130
|
+
* two vertical, so the path arrives back where it started and the loop has no
|
|
131
|
+
* seam in it. The amplitudes are small because a light that reaches the corners
|
|
132
|
+
* stops reading as one source.
|
|
133
|
+
*
|
|
134
|
+
* The two frequencies used not to divide into each other, on the reasoning that
|
|
135
|
+
* a path which never closes is one the eye cannot learn. It closes anyway —
|
|
136
|
+
* every animation here restarts at the end of its period — so all that bought
|
|
137
|
+
* was a jump of four normal steps, once a pass. A figure-eight is not a shape
|
|
138
|
+
* anybody follows over four seconds of soft light on a dot grid.
|
|
139
|
+
*
|
|
140
|
+
* `pulse` is a ring leaving the centre, and has expanded past the last dot
|
|
141
|
+
* before it restarts, so it fades out rather than snapping back. `scan` crosses
|
|
142
|
+
* as a band, which is the same maths with the light infinitely tall.
|
|
125
143
|
*/
|
|
126
144
|
function lightAt(animation, phase, width, height) {
|
|
127
145
|
const short = Math.min(width, height);
|
|
@@ -153,7 +171,7 @@ function lightAt(animation, phase, width, height) {
|
|
|
153
171
|
}
|
|
154
172
|
return {
|
|
155
173
|
x: width / 2 + Math.sin(turn) * width * 0.26,
|
|
156
|
-
y: height / 2 + Math.cos(turn *
|
|
174
|
+
y: height / 2 + Math.cos(turn * 2) * height * 0.22,
|
|
157
175
|
radius: short * 0.42,
|
|
158
176
|
ring: 0
|
|
159
177
|
};
|
|
@@ -165,12 +183,17 @@ function lightAt(animation, phase, width, height) {
|
|
|
165
183
|
* Only the dots the light actually reaches are in it — the rest are already
|
|
166
184
|
* drawn by the resting grid underneath, so this is a fraction of the field
|
|
167
185
|
* rather than all of it.
|
|
186
|
+
*
|
|
187
|
+
* `points` is the same grid {@link anchors} would build, passed in by a caller
|
|
188
|
+
* that is about to ask for every frame of a loop. Building it here instead cost
|
|
189
|
+
* a fresh array of several hundred pairs per frame, to arrive at the identical
|
|
190
|
+
* grid twenty-four times over.
|
|
168
191
|
*/
|
|
169
|
-
export function litPath(width, height, phase, animation = 'drift') {
|
|
192
|
+
export function litPath(width, height, phase, animation = 'drift', points) {
|
|
170
193
|
if (width <= 0 || height <= 0) return '';
|
|
171
194
|
const light = lightAt(animation, phase, width, height);
|
|
172
195
|
let path = '';
|
|
173
|
-
for (const [x, y] of anchors(width, height)) {
|
|
196
|
+
for (const [x, y] of points ?? anchors(width, height)) {
|
|
174
197
|
const deltaX = x - light.x;
|
|
175
198
|
const deltaY = Number.isNaN(light.y) ? 0 : y - light.y;
|
|
176
199
|
const distance = Math.abs(Math.sqrt(deltaX * deltaX + deltaY * deltaY) - light.ring);
|
|
@@ -188,9 +211,10 @@ export function litPath(width, height, phase, animation = 'drift') {
|
|
|
188
211
|
* reduced-motion field shows, so there is no separate code path for holding it.
|
|
189
212
|
*/
|
|
190
213
|
export function litFrames(width, height, animation = 'drift') {
|
|
214
|
+
const points = width > 0 && height > 0 ? anchors(width, height) : [];
|
|
191
215
|
return Array.from({
|
|
192
216
|
length: FRAMES
|
|
193
|
-
}, (_unused, index) => litPath(width, height, index / FRAMES, animation));
|
|
217
|
+
}, (_unused, index) => litPath(width, height, index / FRAMES, animation, points));
|
|
194
218
|
}
|
|
195
219
|
|
|
196
220
|
/** One pass of the loop, in milliseconds, per animation. */
|
|
@@ -207,4 +231,37 @@ export function frameAt(time, animation) {
|
|
|
207
231
|
const phase = time % PERIOD[animation] / PERIOD[animation];
|
|
208
232
|
return Math.min(FRAMES - 1, Math.floor(phase * FRAMES));
|
|
209
233
|
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Where a moment falls in the loop, as a frame index with its fraction kept.
|
|
237
|
+
*
|
|
238
|
+
* {@link frameAt} rounds this down, and rounding it down is what made the field
|
|
239
|
+
* a flipbook: twenty-four pictures spread over the period, which on the slowest
|
|
240
|
+
* animation is a new one every 175ms however fast the screen refreshes. The
|
|
241
|
+
* fraction is what the two layers cross-fade on, so the light moves at the rate
|
|
242
|
+
* the display can draw rather than the rate the frames were built at.
|
|
243
|
+
*/
|
|
244
|
+
export function framePhase(time, animation) {
|
|
245
|
+
'worklet';
|
|
246
|
+
|
|
247
|
+
return time % PERIOD[animation] / PERIOD[animation] * FRAMES;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* What the outgoing and incoming layers are worth, a fraction `t` of the way
|
|
252
|
+
* from one frame to the next.
|
|
253
|
+
*
|
|
254
|
+
* Not `[1 - t, t]`. The layers are drawn over one another, so a dot lit in both
|
|
255
|
+
* of them composites to `1 - (1-a)(1-b)`, and two half-strength copies of it
|
|
256
|
+
* come to 0.70 rather than 0.90 — the field dips a fifth in the middle of every
|
|
257
|
+
* step, which six steps a second turns into a flicker. So only the outgoing
|
|
258
|
+
* layer ramps, and the incoming one is solved for: whatever leaves the pair at
|
|
259
|
+
* {@link LIT_OPACITY} the whole way across.
|
|
260
|
+
*/
|
|
261
|
+
export function crossfadeAlphas(t) {
|
|
262
|
+
'worklet';
|
|
263
|
+
|
|
264
|
+
const out = LIT_OPACITY * (1 - t);
|
|
265
|
+
return [out, 1 - (1 - LIT_OPACITY) / (1 - out)];
|
|
266
|
+
}
|
|
210
267
|
//# sourceMappingURL=dot-field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DOT_GAP","DOT_RADIUS","DOT_LIT_RADIUS","DOT_REST_OPACITY","FRAMES","MAX_DOTS","gapFor","width","height","cells","Math","sqrt","circle","x","y","r","d","toFixed","anchors","gap","margin","innerWidth","max","innerHeight","columns","floor","rows","offsetX","offsetY","out","row","column","push","gridPath","path","dotCount","length","influenceAt","distance","radius","proximity","lightAt","animation","phase","short","min","turn","PI","reach","ring","Number","NaN","sin","cos","litPath","light","deltaX","deltaY","isNaN","abs","influence","litFrames","Array","from","_unused","index","PERIOD","drift","pulse","scan","frameAt","time"],"sourceRoot":"../../../../src","sources":["components/image-generation/dot-field.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO,MAAMA,OAAO,GAAG,EAAE;;AAEzB;AACA,OAAO,MAAMC,UAAU,GAAG,CAAC;AAC3B,OAAO,MAAMC,cAAc,GAAG,GAAG;;AAEjC;AACA,OAAO,MAAMC,gBAAgB,GAAG,IAAI;;AAEpC;AACA,OAAO,MAAMC,MAAM,GAAG,EAAE;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,QAAQ,GAAG,GAAG;;AAEpB;;AAGA;AACA,OAAO,SAASC,MAAMA,CAACC,KAAa,EAAEC,MAAc,EAAU;EAC5D,IAAID,KAAK,IAAI,CAAC,IAAIC,MAAM,IAAI,CAAC,EAAE,
|
|
1
|
+
{"version":3,"names":["DOT_GAP","DOT_RADIUS","DOT_LIT_RADIUS","DOT_REST_OPACITY","LIT_OPACITY","FRAMES","MAX_DOTS","gapFor","width","height","cells","Math","sqrt","circle","x","y","r","d","toFixed","anchors","gap","margin","innerWidth","max","innerHeight","columns","floor","rows","offsetX","offsetY","out","row","column","push","gridPath","path","dotCount","length","influenceAt","distance","radius","proximity","lightAt","animation","phase","short","min","turn","PI","reach","ring","Number","NaN","sin","cos","litPath","points","light","deltaX","deltaY","isNaN","abs","influence","litFrames","Array","from","_unused","index","PERIOD","drift","pulse","scan","frameAt","time","framePhase","crossfadeAlphas","t"],"sourceRoot":"../../../../src","sources":["components/image-generation/dot-field.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO,MAAMA,OAAO,GAAG,EAAE;;AAEzB;AACA,OAAO,MAAMC,UAAU,GAAG,CAAC;AAC3B,OAAO,MAAMC,cAAc,GAAG,GAAG;;AAEjC;AACA,OAAO,MAAMC,gBAAgB,GAAG,IAAI;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAG,GAAG;;AAE9B;AACA,OAAO,MAAMC,MA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G,CAAC,EAAEM,IAAI,CAACe,KAAK,CAACkB,KAAK,GAAGvC,MAAM,CAAC,CAAC;AACzD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASqE,UAAUA,CAACD,IAAY,EAAE9B,SAA4B,EAAU;EAC7E,SAAS;;EACT,OAAS8B,IAAI,GAAGL,MAAM,CAACzB,SAAS,CAAC,GAAIyB,MAAM,CAACzB,SAAS,CAAC,GAAItC,MAAM;AAClE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASsE,eAAeA,CAACC,CAAS,EAAoB;EAC3D,SAAS;;EACT,MAAM9C,GAAG,GAAG1B,WAAW,IAAI,CAAC,GAAGwE,CAAC,CAAC;EACjC,OAAO,CAAC9C,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG1B,WAAW,KAAK,CAAC,GAAG0B,GAAG,CAAC,CAAC;AACjD","ignoreList":[]}
|
|
@@ -17,14 +17,22 @@
|
|
|
17
17
|
*
|
|
18
18
|
* ## The dot field
|
|
19
19
|
*
|
|
20
|
-
* A grid of dots with a soft
|
|
21
|
-
*
|
|
22
|
-
* costs twenty-two worklets a frame rather than five hundred — the dots inside
|
|
23
|
-
* a column never move independently of it, and at this scale nobody can tell.
|
|
20
|
+
* A grid of dots with a soft light moving through it, drawn as three layers:
|
|
21
|
+
* the field at rest, and two copies of the lit dots fading into one another.
|
|
24
22
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
23
|
+
* Every picture the loop will ever draw is built when the box is measured, so
|
|
24
|
+
* running it hands over a string that already exists. That leaves twenty-four
|
|
25
|
+
* pictures to spread across the pass, which on its own is a flipbook — a new
|
|
26
|
+
* one every 175ms, however fast the screen refreshes. The two layers are what
|
|
27
|
+
* fills the gap: one holds the frame being left and one the frame being
|
|
28
|
+
* arrived at, and only their opacities move, which the compositor animates at
|
|
29
|
+
* the display's own rate without the drawing being touched.
|
|
30
|
+
*
|
|
31
|
+
* They are opacities on views rather than on the dots, and that is not a
|
|
32
|
+
* detail. A value that changes every frame sitting beside the path string
|
|
33
|
+
* pushes the path every frame too, and every push of a path is a re-parse of
|
|
34
|
+
* several hundred subpaths — which is the cost this whole arrangement exists
|
|
35
|
+
* to avoid. Kept apart, the path is pushed only when it actually changes.
|
|
28
36
|
*
|
|
29
37
|
* ## What arrives, and when
|
|
30
38
|
*
|
|
@@ -36,7 +44,7 @@
|
|
|
36
44
|
*
|
|
37
45
|
* ## Reduced motion
|
|
38
46
|
*
|
|
39
|
-
* The
|
|
47
|
+
* The light stops, and the field holds wherever the clock was left. A
|
|
40
48
|
* placeholder that shows nothing is indistinguishable from a component that
|
|
41
49
|
* failed to load, so this is a quieter picture rather than an empty one.
|
|
42
50
|
*/
|
|
@@ -49,10 +57,10 @@ import { useCSSVariable } from 'uniwind';
|
|
|
49
57
|
import { AlertTriangleIcon, CheckIcon, RotateCcwIcon } from "../../icons/index.js";
|
|
50
58
|
import { Text } from "../../primitives/text.js";
|
|
51
59
|
import { cn } from "../../utils/cn.js";
|
|
52
|
-
import { DOT_REST_OPACITY,
|
|
60
|
+
import { DOT_REST_OPACITY, FRAMES, crossfadeAlphas, framePhase, gridPath, litFrames } from "./dot-field.js";
|
|
53
61
|
|
|
54
62
|
/** How far the generation has got. */
|
|
55
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
63
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
56
64
|
/**
|
|
57
65
|
* The moment a held field is frozen at.
|
|
58
66
|
*
|
|
@@ -194,8 +202,21 @@ function ImageGenerationField({
|
|
|
194
202
|
* light is somewhere legible rather than dead centre or absent, which is the
|
|
195
203
|
* difference between "not animating" and "failed to load".
|
|
196
204
|
*/
|
|
197
|
-
const
|
|
198
|
-
d: frames[
|
|
205
|
+
const slotA = useAnimatedProps(() => ({
|
|
206
|
+
d: frames[Math.floor(framePhase(clock.value, animation))] ?? ''
|
|
207
|
+
}));
|
|
208
|
+
const slotB = useAnimatedProps(() => ({
|
|
209
|
+
d: frames[(Math.floor(framePhase(clock.value, animation)) + 1) % FRAMES] ?? ''
|
|
210
|
+
}));
|
|
211
|
+
|
|
212
|
+
// Only these move between one frame and the next, and a view's opacity is a
|
|
213
|
+
// layer alpha — so the drawing underneath is composited again rather than
|
|
214
|
+
// drawn again.
|
|
215
|
+
const fadeOut = useAnimatedStyle(() => ({
|
|
216
|
+
opacity: crossfadeAlphas(framePhase(clock.value, animation) % 1)[0]
|
|
217
|
+
}));
|
|
218
|
+
const fadeIn = useAnimatedStyle(() => ({
|
|
219
|
+
opacity: crossfadeAlphas(framePhase(clock.value, animation) % 1)[1]
|
|
199
220
|
}));
|
|
200
221
|
const onLayout = event => {
|
|
201
222
|
const {
|
|
@@ -215,17 +236,38 @@ function ImageGenerationField({
|
|
|
215
236
|
className: className,
|
|
216
237
|
style: [StyleSheet.absoluteFill, style],
|
|
217
238
|
...props,
|
|
218
|
-
children: grid ? /*#__PURE__*/_jsxs(
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
239
|
+
children: grid ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
240
|
+
children: [/*#__PURE__*/_jsx(Svg, {
|
|
241
|
+
width: size.width,
|
|
242
|
+
height: size.height,
|
|
243
|
+
style: StyleSheet.absoluteFill,
|
|
244
|
+
children: /*#__PURE__*/_jsx(Path, {
|
|
245
|
+
d: grid,
|
|
246
|
+
fill: color,
|
|
247
|
+
fillOpacity: DOT_REST_OPACITY
|
|
248
|
+
})
|
|
249
|
+
}), /*#__PURE__*/_jsx(Animated.View, {
|
|
250
|
+
style: [StyleSheet.absoluteFill, fadeOut],
|
|
251
|
+
pointerEvents: "none",
|
|
252
|
+
children: /*#__PURE__*/_jsx(Svg, {
|
|
253
|
+
width: size.width,
|
|
254
|
+
height: size.height,
|
|
255
|
+
children: /*#__PURE__*/_jsx(AnimatedPath, {
|
|
256
|
+
animatedProps: slotA,
|
|
257
|
+
fill: color
|
|
258
|
+
})
|
|
259
|
+
})
|
|
260
|
+
}), /*#__PURE__*/_jsx(Animated.View, {
|
|
261
|
+
style: [StyleSheet.absoluteFill, fadeIn],
|
|
262
|
+
pointerEvents: "none",
|
|
263
|
+
children: /*#__PURE__*/_jsx(Svg, {
|
|
264
|
+
width: size.width,
|
|
265
|
+
height: size.height,
|
|
266
|
+
children: /*#__PURE__*/_jsx(AnimatedPath, {
|
|
267
|
+
animatedProps: slotB,
|
|
268
|
+
fill: color
|
|
269
|
+
})
|
|
270
|
+
})
|
|
229
271
|
})]
|
|
230
272
|
}) : null
|
|
231
273
|
});
|