@hjmds/react-native 1.7.0 → 1.9.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/README.md +30 -2
- package/THIRD_PARTY_NOTICES.md +58 -0
- package/dist/actions.js +1 -1
- package/dist/actions.js.map +1 -1
- package/dist/agreement.d.ts.map +1 -1
- package/dist/agreement.js +13 -3
- package/dist/agreement.js.map +1 -1
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +6 -3
- package/dist/calendar.js.map +1 -1
- package/dist/carousel-motion.d.ts +16 -0
- package/dist/carousel-motion.d.ts.map +1 -0
- package/dist/carousel-motion.js +57 -0
- package/dist/carousel-motion.js.map +1 -0
- package/dist/celebration.d.ts +8 -0
- package/dist/celebration.d.ts.map +1 -0
- package/dist/celebration.js +64 -0
- package/dist/celebration.js.map +1 -0
- package/dist/content-transition.d.ts +12 -0
- package/dist/content-transition.d.ts.map +1 -0
- package/dist/content-transition.js +34 -0
- package/dist/content-transition.js.map +1 -0
- package/dist/context-menu-native.d.ts +17 -0
- package/dist/context-menu-native.d.ts.map +1 -0
- package/dist/context-menu-native.js +11 -0
- package/dist/context-menu-native.js.map +1 -0
- package/dist/data-display.d.ts.map +1 -1
- package/dist/data-display.js +8 -2
- package/dist/data-display.js.map +1 -1
- package/dist/date-picker.d.ts +8 -1
- package/dist/date-picker.d.ts.map +1 -1
- package/dist/date-picker.js +3 -3
- package/dist/date-picker.js.map +1 -1
- package/dist/evidence.d.ts +61 -2
- package/dist/evidence.d.ts.map +1 -1
- package/dist/evidence.js +104 -46
- package/dist/evidence.js.map +1 -1
- package/dist/feedback.d.ts +7 -2
- package/dist/feedback.d.ts.map +1 -1
- package/dist/feedback.js +104 -24
- package/dist/feedback.js.map +1 -1
- package/dist/forms.d.ts +8 -3
- package/dist/forms.d.ts.map +1 -1
- package/dist/forms.js +64 -11
- package/dist/forms.js.map +1 -1
- package/dist/image-viewer.d.ts +25 -0
- package/dist/image-viewer.d.ts.map +1 -0
- package/dist/image-viewer.js +49 -0
- package/dist/image-viewer.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/inputs.d.ts.map +1 -1
- package/dist/inputs.js +40 -31
- package/dist/inputs.js.map +1 -1
- package/dist/internal/state.d.ts +19 -0
- package/dist/internal/state.d.ts.map +1 -1
- package/dist/internal/state.js +15 -0
- package/dist/internal/state.js.map +1 -1
- package/dist/internal/toast-presentation.d.ts +27 -0
- package/dist/internal/toast-presentation.d.ts.map +1 -0
- package/dist/internal/toast-presentation.js +2 -0
- package/dist/internal/toast-presentation.js.map +1 -0
- package/dist/keyboard-controller.d.ts +19 -0
- package/dist/keyboard-controller.d.ts.map +1 -0
- package/dist/keyboard-controller.js +18 -0
- package/dist/keyboard-controller.js.map +1 -0
- package/dist/masonry.d.ts +14 -0
- package/dist/masonry.d.ts.map +1 -0
- package/dist/masonry.js +16 -0
- package/dist/masonry.js.map +1 -0
- package/dist/mentions.d.ts.map +1 -1
- package/dist/mentions.js +15 -7
- package/dist/mentions.js.map +1 -1
- package/dist/navigation.d.ts.map +1 -1
- package/dist/navigation.js +6 -4
- package/dist/navigation.js.map +1 -1
- package/dist/number-field.d.ts.map +1 -1
- package/dist/number-field.js +9 -4
- package/dist/number-field.js.map +1 -1
- package/dist/overlays.d.ts +1 -1
- package/dist/overlays.d.ts.map +1 -1
- package/dist/overlays.js +18 -7
- package/dist/overlays.js.map +1 -1
- package/dist/primitives.d.ts.map +1 -1
- package/dist/primitives.js +2 -2
- package/dist/primitives.js.map +1 -1
- package/dist/provider.d.ts +19 -1
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +10 -2
- package/dist/provider.js.map +1 -1
- package/dist/qr-code.d.ts +11 -0
- package/dist/qr-code.d.ts.map +1 -0
- package/dist/qr-code.js +16 -0
- package/dist/qr-code.js.map +1 -0
- package/dist/screen-transition.d.ts +14 -0
- package/dist/screen-transition.d.ts.map +1 -0
- package/dist/screen-transition.js +42 -0
- package/dist/screen-transition.js.map +1 -0
- package/dist/sheet-gesture.d.ts +27 -0
- package/dist/sheet-gesture.d.ts.map +1 -0
- package/dist/sheet-gesture.js +97 -0
- package/dist/sheet-gesture.js.map +1 -0
- package/dist/slider.d.ts.map +1 -1
- package/dist/slider.js +58 -11
- package/dist/slider.js.map +1 -1
- package/dist/sortable.d.ts +15 -0
- package/dist/sortable.d.ts.map +1 -0
- package/dist/sortable.js +64 -0
- package/dist/sortable.js.map +1 -0
- package/dist/steps.js +1 -1
- package/dist/steps.js.map +1 -1
- package/dist/swipe-actions.d.ts +17 -0
- package/dist/swipe-actions.d.ts.map +1 -0
- package/dist/swipe-actions.js +58 -0
- package/dist/swipe-actions.js.map +1 -0
- package/dist/tags-input.d.ts.map +1 -1
- package/dist/tags-input.js +6 -1
- package/dist/tags-input.js.map +1 -1
- package/dist/thinking-orb.d.ts +9 -0
- package/dist/thinking-orb.d.ts.map +1 -0
- package/dist/thinking-orb.js +68 -0
- package/dist/thinking-orb.js.map +1 -0
- package/dist/toast-liquid.d.ts +8 -0
- package/dist/toast-liquid.d.ts.map +1 -0
- package/dist/toast-liquid.js +160 -0
- package/dist/toast-liquid.js.map +1 -0
- package/dist/transfer-list.d.ts.map +1 -1
- package/dist/transfer-list.js +4 -3
- package/dist/transfer-list.js.map +1 -1
- package/dist/upload-item.d.ts.map +1 -1
- package/dist/upload-item.js +6 -1
- package/dist/upload-item.js.map +1 -1
- package/dist/virtual-list.d.ts +14 -0
- package/dist/virtual-list.d.ts.map +1 -0
- package/dist/virtual-list.js +12 -0
- package/dist/virtual-list.js.map +1 -0
- package/docs/liquid-toast.md +101 -0
- package/docs/patches/@react-native-menu__menu.patch +43 -0
- package/docs/patches/README.md +27 -0
- package/docs/patches/react-native-ios-context-menu.patch +14 -0
- package/docs/patches/react-native-ios-utilities.patch +34 -0
- package/docs/patches/react-native-screen-transitions.patch +87 -0
- package/package.json +194 -5
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
import { AccessibilityInfo, AppState, View } from "react-native";
|
|
4
|
+
import { Canvas, Picture, Skia, PaintStyle, createPicture } from "@shopify/react-native-skia";
|
|
5
|
+
import { useSharedValue } from "react-native-reanimated";
|
|
6
|
+
import { buildThinkingOrbFrame, createThinkingOrbClock, thinkingOrbRecipe, validateThinkingOrb } from "@hjmds/design-contracts/components/thinking-orb";
|
|
7
|
+
import { useHjmNativeTheme } from "./provider.js";
|
|
8
|
+
/** Skia is isolated to this entry; hosts must forward navigation/list visibility via active. */
|
|
9
|
+
export function ThinkingOrb({ state = "working", size = 64, label, speed = 1, paused = false, active = true, style, testID }) {
|
|
10
|
+
validateThinkingOrb({ state, size, speed, label });
|
|
11
|
+
const theme = useHjmNativeTheme();
|
|
12
|
+
// Default to static until the asynchronous OS preference resolves to avoid an initial motion flash.
|
|
13
|
+
const [osReduced, setOsReduced] = useState(true);
|
|
14
|
+
const [foreground, setForeground] = useState(AppState.currentState === "active");
|
|
15
|
+
const clock = useRef(createThinkingOrbClock());
|
|
16
|
+
const [emptyPicture] = useState(() => createPicture(() => { }));
|
|
17
|
+
const picture = useSharedValue(emptyPicture);
|
|
18
|
+
const reduced = theme.environment.reducedMotion || osReduced;
|
|
19
|
+
const ink = theme.colors.text;
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
let mounted = true;
|
|
22
|
+
let observed = false;
|
|
23
|
+
void AccessibilityInfo.isReduceMotionEnabled().then(value => { if (mounted && !observed)
|
|
24
|
+
setOsReduced(value); }).catch(() => { });
|
|
25
|
+
const motion = AccessibilityInfo.addEventListener("reduceMotionChanged", value => { observed = true; setOsReduced(value); });
|
|
26
|
+
const app = AppState.addEventListener("change", value => setForeground(value === "active"));
|
|
27
|
+
return () => { mounted = false; motion.remove(); app.remove(); };
|
|
28
|
+
}, []);
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
const fill = Skia.Paint(), stroke = Skia.Paint();
|
|
31
|
+
fill.setAntiAlias(true);
|
|
32
|
+
stroke.setAntiAlias(true);
|
|
33
|
+
stroke.setStyle(PaintStyle.Stroke);
|
|
34
|
+
fill.setColor(Skia.Color(ink));
|
|
35
|
+
stroke.setColor(Skia.Color(ink));
|
|
36
|
+
const draw = () => {
|
|
37
|
+
const frame = buildThinkingOrbFrame(state, size, reduced ? thinkingOrbRecipe.motion.staticTime : clock.current.time);
|
|
38
|
+
// A shared picture updates Skia directly; no React setState/commit per animation frame.
|
|
39
|
+
// Pictures are GC-owned: disposing a replaced picture here can race UI-thread consumption.
|
|
40
|
+
picture.value = createPicture(canvas => {
|
|
41
|
+
for (const line of frame.lines) {
|
|
42
|
+
stroke.setAlphaf((1 - Math.min(1, Math.max(0, line.white))) * (line.a ?? 1));
|
|
43
|
+
stroke.setStrokeWidth(line.w);
|
|
44
|
+
canvas.drawLine(line.x1, line.y1, line.x2, line.y2, stroke);
|
|
45
|
+
}
|
|
46
|
+
for (const dot of frame.dots) {
|
|
47
|
+
fill.setAlphaf((1 - Math.min(1, Math.max(0, dot.white))) * (dot.a ?? 1));
|
|
48
|
+
canvas.drawCircle(dot.x, dot.y, dot.r, fill);
|
|
49
|
+
}
|
|
50
|
+
}, Skia.XYWHRect(0, 0, size, size));
|
|
51
|
+
};
|
|
52
|
+
let raf = 0, disposed = false;
|
|
53
|
+
draw();
|
|
54
|
+
clock.current.resetDelta();
|
|
55
|
+
const loop = (now) => {
|
|
56
|
+
if (disposed)
|
|
57
|
+
return;
|
|
58
|
+
clock.current.sample(now, speed);
|
|
59
|
+
draw();
|
|
60
|
+
raf = requestAnimationFrame(loop);
|
|
61
|
+
};
|
|
62
|
+
if (active && !paused && !reduced && foreground)
|
|
63
|
+
raf = requestAnimationFrame(loop);
|
|
64
|
+
return () => { disposed = true; cancelAnimationFrame(raf); clock.current.resetDelta(); fill.dispose(); stroke.dispose(); };
|
|
65
|
+
}, [state, size, speed, active, paused, reduced, foreground, ink, picture]);
|
|
66
|
+
return _jsx(View, { testID: testID, accessible: true, accessibilityRole: "progressbar", accessibilityLabel: label, accessibilityLiveRegion: "polite", accessibilityState: { busy: true }, style: [{ width: size, height: size }, style], children: _jsx(Canvas, { accessible: false, importantForAccessibility: "no-hide-descendants", style: { width: size, height: size }, children: _jsx(Picture, { picture: picture }) }) });
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=thinking-orb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thinking-orb.js","sourceRoot":"","sources":["../src/thinking-orb.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,IAAI,EAAkC,MAAM,cAAc,CAAC;AACjG,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,EAAkB,MAAM,4BAA4B,CAAC;AAC9G,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,mBAAmB,EAA2B,MAAM,iDAAiD,CAAC;AACjL,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGlD,gGAAgG;AAChG,MAAM,UAAU,WAAW,CAAC,EAAE,KAAK,GAAG,SAAS,EAAE,IAAI,GAAG,EAAE,EAAE,KAAK,EAAE,KAAK,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,EAAoB;IAC5I,mBAAmB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IACnD,MAAM,KAAK,GAAG,iBAAiB,EAAE,CAAC;IAClC,oGAAoG;IACpG,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,GAAG,IAAI,CAAC,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAC7H,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IAC5E,OAAO,KAAC,IAAI,IAAC,MAAM,EAAE,MAAM,EAAE,UAAU,QAAC,iBAAiB,EAAC,aAAa,EAAC,kBAAkB,EAAE,KAAK,EAAE,uBAAuB,EAAC,QAAQ,EAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,KAAK,CAAC,YACnN,KAAC,MAAM,IAAC,UAAU,EAAE,KAAK,EAAE,yBAAyB,EAAC,qBAAqB,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAC7G,KAAC,OAAO,IAAC,OAAO,EAAE,OAAO,GAAI,GACtB,GACJ,CAAC;AACV,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type LiquidToastAnchor } from "@hjmds/design-contracts/components/toast";
|
|
2
|
+
import type { ToastPresentationAdapter } from "./internal/toast-presentation.js";
|
|
3
|
+
export type LiquidToastOptions = Readonly<{
|
|
4
|
+
anchor?: LiquidToastAnchor;
|
|
5
|
+
}>;
|
|
6
|
+
/** Optional entry: requires Skia 2.6, Reanimated 4.5 and Worklets 0.10 in the host. */
|
|
7
|
+
export declare function createLiquidToastPresentation(options?: LiquidToastOptions): ToastPresentationAdapter;
|
|
8
|
+
//# sourceMappingURL=toast-liquid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast-liquid.d.ts","sourceRoot":"","sources":["../src/toast-liquid.tsx"],"names":[],"mappings":"AAQA,OAAO,EAA8G,KAAK,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAE9L,OAAO,KAAK,EAAgC,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAE/G,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IAAE,MAAM,CAAC,EAAE,iBAAiB,CAAA;CAAE,CAAC,CAAC;AAY1E,uFAAuF;AACvF,wBAAgB,6BAA6B,CAAC,OAAO,GAAE,kBAAuB,GAAG,wBAAwB,CAMxG"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
+
import { AccessibilityInfo, PanResponder, View } from "react-native";
|
|
4
|
+
import { Canvas, Group, Paint, Blur, ColorMatrix, RoundedRect, Shadow } from "@shopify/react-native-skia";
|
|
5
|
+
import Animated, { cancelAnimation, interpolateColor, useAnimatedStyle, useDerivedValue, useSharedValue, withDelay, withSpring } from "react-native-reanimated";
|
|
6
|
+
import { scheduleOnRN } from "react-native-worklets";
|
|
7
|
+
import { withAlpha } from "@hjmds/design-contracts/colors";
|
|
8
|
+
import { resolveColorReference } from "@hjmds/design-contracts/color-references";
|
|
9
|
+
import { toastRecipe } from "@hjmds/design-contracts/recipes";
|
|
10
|
+
import { buildLiquidToastGeometry, liquidToastRecipe as recipe, resolveLiquidToastLayout, validateLiquidToastAnchor } from "@hjmds/design-contracts/components/toast";
|
|
11
|
+
import { useHjmNativeTheme } from "./provider.js";
|
|
12
|
+
const cardShadow = toastRecipe.surface.shadow;
|
|
13
|
+
// Skia Shadow takes one color, so the token opacity must be folded into it. Passing `color` alone drew an opaque black
|
|
14
|
+
// halo (2026-09-30 iPhone 17 · iOS 27 capture: a dark rectangular band behind the card). Skia `blur` is a sigma while
|
|
15
|
+
// RN shadowRadius is roughly two sigmas, so halve it to match the standard Toast.
|
|
16
|
+
const shadowColor = withAlpha(cardShadow.color, cardShadow.opacity);
|
|
17
|
+
const shadowBlur = cardShadow.radius / 2;
|
|
18
|
+
// The halo reaches about three sigmas past the card. The canvas grows by that much on each side; a canvas exactly as wide
|
|
19
|
+
// as the region clipped it into straight left/right/bottom edges on phones where the card fills the width.
|
|
20
|
+
const canvasBleed = Math.ceil(shadowBlur * 3 + Math.abs(cardShadow.offsetY));
|
|
21
|
+
/** Optional entry: requires Skia 2.6, Reanimated 4.5 and Worklets 0.10 in the host. */
|
|
22
|
+
export function createLiquidToastPresentation(options = {}) {
|
|
23
|
+
const anchor = options.anchor?.kind === "island"
|
|
24
|
+
? { kind: "island", frame: { ...options.anchor.frame } }
|
|
25
|
+
: options.anchor ?? { kind: "capsule" };
|
|
26
|
+
validateLiquidToastAnchor(anchor);
|
|
27
|
+
return Object.freeze({ kind: "liquid", anchor, Surface: LiquidSurface });
|
|
28
|
+
}
|
|
29
|
+
function LiquidSurface({ anchor, ...props }) {
|
|
30
|
+
const theme = useHjmNativeTheme();
|
|
31
|
+
const [height, setHeight] = useState(0);
|
|
32
|
+
const [reader, setReader] = useState(false);
|
|
33
|
+
const [osReduced, setOsReduced] = useState(false);
|
|
34
|
+
const callbacks = useRef(props);
|
|
35
|
+
callbacks.current = props;
|
|
36
|
+
const generation = useRef(0);
|
|
37
|
+
const entered = useRef(false);
|
|
38
|
+
const layout = resolveLiquidToastLayout({
|
|
39
|
+
width: props.width, height, availableHeight: props.availableHeight, anchor,
|
|
40
|
+
...(props.windowOrigin === undefined ? {} : { windowOrigin: props.windowOrigin }),
|
|
41
|
+
});
|
|
42
|
+
// Accessibility and constrained layouts keep the same store entry with standard chrome.
|
|
43
|
+
const fallback = reader || osReduced || theme.environment.reducedMotion || (height > 0 && !layout.fits);
|
|
44
|
+
const drop = useSharedValue(0), expand = useSharedValue(0), reveal = useSharedValue(0), tint = useSharedValue(0), drag = useSharedValue(0);
|
|
45
|
+
const geometry = useDerivedValue(() => buildLiquidToastGeometry(drop.value, expand.value, layout), [layout]);
|
|
46
|
+
const cardColor = resolveColorReference(toastRecipe.surface.background, theme.palette);
|
|
47
|
+
const anchorColor = anchor.kind === "island" ? "#000000" : theme.colors.text;
|
|
48
|
+
// Black is a physical occlusion match only for an explicitly supplied hardware frame.
|
|
49
|
+
const dropletColor = useDerivedValue(() => interpolateColor(tint.value, [0, 1], [anchorColor, cardColor]));
|
|
50
|
+
const x = useDerivedValue(() => geometry.value.x);
|
|
51
|
+
const y = useDerivedValue(() => geometry.value.y - layout.canvasTop + drag.value);
|
|
52
|
+
const w = useDerivedValue(() => geometry.value.width);
|
|
53
|
+
const h = useDerivedValue(() => geometry.value.height);
|
|
54
|
+
const r = useDerivedValue(() => geometry.value.radius);
|
|
55
|
+
const nx = useDerivedValue(() => geometry.value.neckX);
|
|
56
|
+
const ny = useDerivedValue(() => geometry.value.neckY - layout.canvasTop);
|
|
57
|
+
const nw = useDerivedValue(() => geometry.value.neckWidth);
|
|
58
|
+
const nh = useDerivedValue(() => geometry.value.neckHeight);
|
|
59
|
+
const nr = useDerivedValue(() => geometry.value.neckWidth / 2);
|
|
60
|
+
const opacity = useDerivedValue(() => Math.max(0, Math.min(1, expand.value)));
|
|
61
|
+
// An in-app capsule is only the starting point. Left on screen after the card settled it read as a second, floating
|
|
62
|
+
// Dynamic Island under the real one (2026-09-30 capture), so it fades out as the card expands and returns on exit.
|
|
63
|
+
// A verified island frame stays: it covers the hardware cutout.
|
|
64
|
+
const anchorOpacity = useDerivedValue(() => anchor.kind === "island"
|
|
65
|
+
? 1
|
|
66
|
+
: Math.max(0, Math.min(1, drop.value * 4)) * (1 - Math.max(0, Math.min(1, expand.value))));
|
|
67
|
+
const contentStyle = useAnimatedStyle(() => ({
|
|
68
|
+
opacity: reveal.value,
|
|
69
|
+
transform: [{ translateY: geometry.value.offsetY + drag.value }, { scale: 0.88 + Math.max(0, Math.min(1, reveal.value)) * 0.12 }],
|
|
70
|
+
}));
|
|
71
|
+
useEffect(() => {
|
|
72
|
+
let active = true;
|
|
73
|
+
void AccessibilityInfo.isScreenReaderEnabled().then(value => { if (active)
|
|
74
|
+
setReader(value); });
|
|
75
|
+
void AccessibilityInfo.isReduceMotionEnabled().then(value => { if (active)
|
|
76
|
+
setOsReduced(value); });
|
|
77
|
+
const screen = AccessibilityInfo.addEventListener("screenReaderChanged", setReader);
|
|
78
|
+
const motion = AccessibilityInfo.addEventListener("reduceMotionChanged", setOsReduced);
|
|
79
|
+
return () => { active = false; screen.remove(); motion.remove(); };
|
|
80
|
+
}, []);
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
const token = ++generation.current;
|
|
83
|
+
const values = [drop, expand, reveal, tint, drag];
|
|
84
|
+
values.forEach(cancelAnimation);
|
|
85
|
+
const phase = props.snapshot.phase;
|
|
86
|
+
const settle = () => {
|
|
87
|
+
entered.current = true;
|
|
88
|
+
drop.value = expand.value = reveal.value = tint.value = 1;
|
|
89
|
+
drag.value = 0;
|
|
90
|
+
callbacks.current.onResume("presentation");
|
|
91
|
+
};
|
|
92
|
+
if (fallback || props.suspended) {
|
|
93
|
+
settle();
|
|
94
|
+
if (phase === "closing" && props.suspended)
|
|
95
|
+
callbacks.current.onExitComplete();
|
|
96
|
+
}
|
|
97
|
+
else if (phase === "closing") {
|
|
98
|
+
const complete = () => { if (generation.current === token)
|
|
99
|
+
callbacks.current.onExitComplete(); };
|
|
100
|
+
reveal.value = withSpring(0, recipe.spring.fade);
|
|
101
|
+
expand.value = withDelay(recipe.delay.collapse, withSpring(0, recipe.spring.collapse));
|
|
102
|
+
tint.value = withDelay(recipe.delay.return, withSpring(0, recipe.spring.return));
|
|
103
|
+
drop.value = withDelay(recipe.delay.return, withSpring(0, recipe.spring.return, finished => {
|
|
104
|
+
"worklet";
|
|
105
|
+
if (finished)
|
|
106
|
+
scheduleOnRN(complete);
|
|
107
|
+
}));
|
|
108
|
+
}
|
|
109
|
+
else if (height > 0 && props.width > 0 && !entered.current) {
|
|
110
|
+
callbacks.current.onPause("presentation");
|
|
111
|
+
const finishedStages = new Set();
|
|
112
|
+
const finish = (stage) => {
|
|
113
|
+
if (generation.current !== token)
|
|
114
|
+
return;
|
|
115
|
+
finishedStages.add(stage);
|
|
116
|
+
if (finishedStages.size === 3)
|
|
117
|
+
settle();
|
|
118
|
+
};
|
|
119
|
+
drop.value = withSpring(1, recipe.spring.drop, finished => {
|
|
120
|
+
"worklet";
|
|
121
|
+
if (finished)
|
|
122
|
+
scheduleOnRN(finish, "drop");
|
|
123
|
+
});
|
|
124
|
+
tint.value = withDelay(recipe.delay.tint, withSpring(1, recipe.spring.tint));
|
|
125
|
+
expand.value = withDelay(recipe.delay.expand, withSpring(1, recipe.spring.expand, finished => {
|
|
126
|
+
"worklet";
|
|
127
|
+
if (finished)
|
|
128
|
+
scheduleOnRN(finish, "expand");
|
|
129
|
+
}));
|
|
130
|
+
reveal.value = withDelay(recipe.delay.reveal, withSpring(1, recipe.spring.reveal, finished => {
|
|
131
|
+
"worklet";
|
|
132
|
+
if (finished)
|
|
133
|
+
scheduleOnRN(finish, "reveal");
|
|
134
|
+
}));
|
|
135
|
+
}
|
|
136
|
+
else if (entered.current)
|
|
137
|
+
settle();
|
|
138
|
+
return () => { generation.current++; values.forEach(cancelAnimation); };
|
|
139
|
+
}, [drop, expand, reveal, tint, drag, fallback, props.suspended, props.snapshot.phase, height, props.width]);
|
|
140
|
+
const gesture = useMemo(() => PanResponder.create({
|
|
141
|
+
onMoveShouldSetPanResponder: (_event, state) => state.dy < -6 && Math.abs(state.dy) > Math.abs(state.dx),
|
|
142
|
+
onPanResponderGrant: () => callbacks.current.onPause("gesture"),
|
|
143
|
+
onPanResponderMove: (_event, state) => { drag.value = Math.max(-120, Math.min(24, state.dy)); },
|
|
144
|
+
onPanResponderRelease: (_event, state) => {
|
|
145
|
+
callbacks.current.onResume("gesture");
|
|
146
|
+
// A responder takeover may suppress the child's touch-end; release its pause as well.
|
|
147
|
+
callbacks.current.onResume("pointer");
|
|
148
|
+
if (state.dy < recipe.swipe.distance || state.vy * 1000 < recipe.swipe.velocity)
|
|
149
|
+
callbacks.current.onDismiss("swipe");
|
|
150
|
+
else
|
|
151
|
+
drag.value = withSpring(0, recipe.spring.drag);
|
|
152
|
+
},
|
|
153
|
+
onPanResponderTerminate: () => { callbacks.current.onResume("gesture"); callbacks.current.onResume("pointer"); drag.value = withSpring(0, recipe.spring.drag); },
|
|
154
|
+
}), [drag]);
|
|
155
|
+
if (fallback)
|
|
156
|
+
return props.fallback;
|
|
157
|
+
// Only decoration is rasterized. RN text and its independent action/close stay accessible.
|
|
158
|
+
return _jsxs(View, { pointerEvents: "box-none", style: { width: "100%", paddingTop: layout.cardTop, alignItems: "center" }, children: [height > 0 ? _jsx(Canvas, { pointerEvents: "none", accessible: false, accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants", style: { position: "absolute", top: layout.canvasTop, left: -canvasBleed, width: props.width + canvasBleed * 2, height: layout.canvasHeight + canvasBleed }, children: _jsxs(Group, { transform: [{ translateX: canvasBleed }], children: [_jsx(Group, { opacity: opacity, children: _jsx(RoundedRect, { x: x, y: y, width: w, height: h, r: r, color: cardColor, children: _jsx(Shadow, { dx: 0, dy: cardShadow.offsetY, blur: shadowBlur, color: shadowColor, shadowOnly: true }) }) }), _jsxs(Group, { layer: _jsxs(Paint, { children: [_jsx(Blur, { blur: recipe.blur }), _jsx(ColorMatrix, { matrix: [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, recipe.gain, -recipe.gain * recipe.threshold] })] }), children: [_jsx(Group, { opacity: anchorOpacity, children: _jsx(RoundedRect, { x: layout.anchorX + 4, y: layout.anchorY - layout.canvasTop + 4, width: Math.max(0, layout.anchorWidth - 8), height: Math.max(0, layout.anchorHeight - 8), r: layout.anchorHeight / 2, color: anchorColor }) }), _jsx(RoundedRect, { x: nx, y: ny, width: nw, height: nh, r: nr, color: anchorColor }), _jsx(RoundedRect, { x: x, y: y, width: w, height: h, r: r, color: dropletColor })] }), _jsx(Group, { opacity: anchorOpacity, children: _jsx(RoundedRect, { x: layout.anchorX, y: layout.anchorY - layout.canvasTop, width: layout.anchorWidth, height: layout.anchorHeight, r: layout.anchorHeight / 2, color: anchorColor }) })] }) }) : null, _jsx(Animated.View, { ...gesture.panHandlers, onLayout: event => setHeight(event.nativeEvent.layout.height), style: [{ width: "100%", maxWidth: recipe.maxWidth }, contentStyle], children: props.body })] });
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=toast-liquid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast-liquid.js","sourceRoot":"","sources":["../src/toast-liquid.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAC1G,OAAO,QAAQ,EAAE,EAAE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChK,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,IAAI,MAAM,EAAE,wBAAwB,EAAE,yBAAyB,EA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,iBAAiB,CAAC,EAAE,CAAC,+BA4FvB"}
|
package/dist/transfer-list.js
CHANGED
|
@@ -5,7 +5,7 @@ import { useMemo, useState } from "react";
|
|
|
5
5
|
import { Pressable, ScrollView, View } from "react-native";
|
|
6
6
|
import { Button } from "./actions.js";
|
|
7
7
|
import { Text } from "./primitives.js";
|
|
8
|
-
import { useControllableState } from "./internal/state.js";
|
|
8
|
+
import { mixedCheckboxState, useControllableState } from "./internal/state.js";
|
|
9
9
|
import { useHjmNativeTheme } from "./provider.js";
|
|
10
10
|
const emptySelection = () => ({
|
|
11
11
|
source: new Set(),
|
|
@@ -36,9 +36,10 @@ export function TransferList({ items, labels, targetKeys: controlledTargetKeys,
|
|
|
36
36
|
return (_jsxs(View, { style: { flex: 1, gap: spacing.xs }, children: [_jsx(Pressable, { accessibilityRole: "checkbox",
|
|
37
37
|
// `mixed` is the contract's answer, not a third visual state invented
|
|
38
38
|
// here: some rows checked is neither on nor off.
|
|
39
|
-
|
|
39
|
+
// mixedCheckboxState keeps Android from holding a stale ", mixed" suffix.
|
|
40
|
+
accessibilityState: mixedCheckboxState(selectAll), accessibilityLabel: `${panel === "source" ? labels.source : labels.target}, ${labels.selectAll}`, disabled: rows.length === 0, onPress: () => setSelection(toggleTransferListSelectAll(descriptor, selection, panel)), style: { minHeight: 44, justifyContent: "center" }, children: _jsx(Text, { variant: "label", children: labels.selectAll }) }), _jsx(ScrollView, { accessibilityRole: "list", accessibilityLabel: panel === "source" ? labels.source : labels.target, style: { borderWidth: 1, borderColor: colors.border, borderRadius: 12 }, children: rows.length === 0 ? (_jsx(Text, { tone: "muted", variant: "caption", style: { padding: spacing.sm }, children: labels.empty })) : (rows.map((item) => {
|
|
40
41
|
const checked = selection[panel].has(item.id);
|
|
41
|
-
return (_jsx(Pressable, { accessibilityRole: "checkbox", accessibilityState: { checked, disabled: item.disabled === true }, disabled: item.disabled === true, onPress: () => setSelection(toggleTransferListSelection(descriptor, selection, panel, item.id)), style: { minHeight: 44, justifyContent: "center", paddingHorizontal: spacing.sm }, children: _jsxs(Text, { children: [checked ? "✓ " : "", item.label] }) }, item.id));
|
|
42
|
+
return (_jsx(Pressable, { accessibilityRole: "checkbox", accessibilityLabel: item.label, accessibilityState: { checked, disabled: item.disabled === true }, disabled: item.disabled === true, onPress: () => setSelection(toggleTransferListSelection(descriptor, selection, panel, item.id)), style: { minHeight: 44, justifyContent: "center", paddingHorizontal: spacing.sm }, children: _jsxs(Text, { children: [checked ? "✓ " : "", item.label] }) }, item.id));
|
|
42
43
|
})) })] }));
|
|
43
44
|
};
|
|
44
45
|
return (_jsxs(View, { style: [{ gap: spacing.sm }, style], children: [_jsx(Text, { variant: "label", children: labels.source }), renderPanel("source"), _jsxs(View, { style: { flexDirection: "row", gap: spacing.sm, justifyContent: "center" }, children: [_jsx(Button, { tone: "secondary", disabled: selection.source.size === 0, onPress: () => move("toTarget"), children: labels.toTarget }), _jsx(Button, { tone: "secondary", disabled: selection.target.size === 0, onPress: () => move("toSource"), children: labels.toSource })] }), _jsx(Text, { variant: "label", children: labels.target }), renderPanel("target")] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transfer-list.js","sourceRoot":"","sources":["../src/transfer-list.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC9B,yBAAyB,EACzB,iCAAiC,EACjC,2BAA2B,EAC3B,2BAA2B,GAI5B,MAAM,kDAAkD,CAAC;AAE1D,OAAO,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAkC,MAAM,cAAc,CAAC;AAC3F,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBA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AC,QAAQ,GACT,EACT,KAAC,MAAM,IAAC,IAAI,EAAC,WAAW,EAAC,QAAQ,EAAE,SAAS,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,YAC5F,MAAM,CAAC,QAAQ,GACT,IACJ,EACP,KAAC,IAAI,IAAC,OAAO,EAAC,OAAO,YAAE,MAAM,CAAC,MAAM,GAAQ,EAC3C,WAAW,CAAC,QAAQ,CAAC,IACjB,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-item.d.ts","sourceRoot":"","sources":["../src/upload-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACtB,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAmB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAO/E,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACrC,UAAU,EAAE,oBAAoB,CAAC;IACjC,MAAM,EAAE,gBAAgB,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC,CAAC;AAEH,wBAAgB,UAAU,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,eAAe,+
|
|
1
|
+
{"version":3,"file":"upload-item.d.ts","sourceRoot":"","sources":["../src/upload-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACtB,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAmB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAO/E,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACrC,UAAU,EAAE,oBAAoB,CAAC;IACjC,MAAM,EAAE,gBAAgB,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC,CAAC;AAEH,wBAAgB,UAAU,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,eAAe,+BA2CpG"}
|
package/dist/upload-item.js
CHANGED
|
@@ -20,6 +20,11 @@ export function UploadItem({ descriptor, labels, onCancel, onRetry, leading, sty
|
|
|
20
20
|
: descriptor.state.status === "success" || descriptor.state.status === "uploading"
|
|
21
21
|
? colors.contentBrand
|
|
22
22
|
: colors.textMuted;
|
|
23
|
-
return (
|
|
23
|
+
return (
|
|
24
|
+
// The row itself is a plain container. When the root was one accessible
|
|
25
|
+
// element, VoiceOver and TalkBack swallowed Cancel/Retry into it and the
|
|
26
|
+
// action was unreachable (2026-09-30 audit). The file text is one grouped
|
|
27
|
+
// element and the action is a separate button, as the contract's slots list.
|
|
28
|
+
_jsxs(View, { style: [{ alignItems: "center", borderColor: colors.border, borderRadius: 12, borderWidth: 1, direction: environment.direction, flexDirection: "row", gap: uploadItemRecipe.row.gap, minHeight: uploadItemRecipe.row.minHeight, paddingHorizontal: uploadItemRecipe.row.paddingHorizontal, paddingVertical: 8 }, style], children: [leading === undefined ? null : _jsx(View, { accessible: false, importantForAccessibility: "no-hide-descendants", children: leading }), _jsxs(View, { accessibilityLabel: announcement.label, accessibilityState: { busy: descriptor.state.status === "uploading" }, accessibilityValue: { text: announcement.description }, accessible: true, style: { flex: 1, gap: 2, minWidth: 0 }, children: [_jsx(Text, { children: descriptor.name }), descriptor.sizeLabel === undefined ? null : _jsx(Text, { tone: "muted", variant: "label", children: descriptor.sizeLabel }), _jsx(Text, { accessibilityLiveRegion: "polite", style: { color: statusColor }, variant: "label", children: announcement.description }), descriptor.state.status === "uploading" ? _jsx(Progress, { accessibilityLabel: announcement.description, ...(descriptor.state.progress === null ? {} : { value: descriptor.state.progress }), valueText: announcement.description }) : null] }), action === null ? null : (_jsx(Pressable, { accessibilityLabel: action === "cancel" ? labels.cancel : labels.retry, accessibilityRole: "button", onPress: () => action === "cancel" ? onCancel?.(descriptor.id) : onRetry?.(descriptor.id), style: ({ pressed }) => [minimumTargetStyle, { alignItems: "center", justifyContent: "center", opacity: pressed ? 0.72 : 1 }], children: _jsx(Text, { emphasis: "strong", style: { color: action === "cancel" ? colors.danger : colors.contentBrand }, variant: "label", children: action === "cancel" ? labels.cancel : labels.retry }) }))] }));
|
|
24
29
|
}
|
|
25
30
|
//# sourceMappingURL=upload-item.js.map
|
package/dist/upload-item.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-item.js","sourceRoot":"","sources":["../src/upload-item.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,EAC7B,gBAAgB,GAGjB,MAAM,gDAAgD,CAAC;AAExD,OAAO,EAAE,SAAS,EAAE,IAAI,EAAkC,MAAM,cAAc,CAAC;AAE/E,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,iBA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
|
|
2
|
+
export type VirtualListProps<T> = {
|
|
3
|
+
items: readonly T[];
|
|
4
|
+
keyExtractor: (item: T) => string;
|
|
5
|
+
renderItem: (item: T, index: number) => ReactNode;
|
|
6
|
+
rowHeight: number;
|
|
7
|
+
height: number;
|
|
8
|
+
label: string;
|
|
9
|
+
empty?: ReactNode;
|
|
10
|
+
overscan?: number;
|
|
11
|
+
};
|
|
12
|
+
/** FlatList owns recycling and native assistive scrolling; rowHeight must fit the host's current text scale. */
|
|
13
|
+
export declare function VirtualList<T>({ items, keyExtractor, renderItem, rowHeight, height, label, empty, overscan }: VirtualListProps<T>): import("react").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=virtual-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtual-list.d.ts","sourceRoot":"","sources":["../src/virtual-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAAE,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;IAAC,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAAC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AACxO,gHAAgH;AAChH,wBAAgB,WAAW,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAY,EAAE,EAAE,gBAAgB,CAAC,CAAC,CAAC,+BAQrI"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { FlatList, View } from "react-native";
|
|
3
|
+
import { resolveVirtualWindow, validateListKeys } from "@hjmds/design-contracts/components/virtual-list";
|
|
4
|
+
/** FlatList owns recycling and native assistive scrolling; rowHeight must fit the host's current text scale. */
|
|
5
|
+
export function VirtualList({ items, keyExtractor, renderItem, rowHeight, height, label, empty, overscan = 3 }) {
|
|
6
|
+
validateListKeys(items.map(keyExtractor), label);
|
|
7
|
+
resolveVirtualWindow(items.length, rowHeight, height, 0, overscan);
|
|
8
|
+
// ScrollView defaults to flexGrow: 1; disable it so the declared viewport
|
|
9
|
+
// remains fixed inside a tall host instead of expanding beyond `height`.
|
|
10
|
+
return _jsx(FlatList, { data: items, accessibilityLabel: label, keyExtractor: keyExtractor, style: { height, flexGrow: 0, flexShrink: 0 }, getItemLayout: (_data, index) => ({ length: rowHeight, offset: index * rowHeight, index }), initialNumToRender: Math.ceil(height / rowHeight) + overscan, ListEmptyComponent: _jsx(View, { children: empty }), renderItem: ({ item, index }) => _jsx(View, { style: { height: rowHeight }, children: renderItem(item, index) }) });
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=virtual-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtual-list.js","sourceRoot":"","sources":["../src/virtual-list.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AAEzG,gHAAgH;AAChH,MAAM,UAAU,WAAW,CAAI,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,GAAG,CAAC,EAAuB;IACpI,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC,CAAC;IAAC,oBAAoB,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC;IACrH,0EAA0E;IAC1E,yEAAyE;IACzE,OAAO,KAAC,QAAQ,IAAC,IAAI,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,EACjF,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,KAAK,EAAE,CAAC,EACzI,kBAAkB,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,GAAG,QAAQ,EAAE,kBAAkB,EAAE,KAAC,IAAI,cAAE,KAAK,GAAQ,EACtG,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAC,IAAI,IAAC,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,YAAG,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,GAAQ,GAAI,CAAC;AAC9G,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Liquid Toast (stable, optional Native presentation)
|
|
2
|
+
|
|
3
|
+
Promoted 2026-09-30 after fixing three device-visible defects and checking the installed iPhone 17 / iOS 27 simulator
|
|
4
|
+
(island anchor) and Android 16 emulator (capsule anchor): the Skia shadow ignored the token opacity and was clipped by a
|
|
5
|
+
region-wide canvas, the capsule anchor stayed on screen as a second "island", and the droplet turned card-colored before
|
|
6
|
+
leaving the anchor. [Record](../../../docs/evidence/liquid-toast-2026-09-30/README.md).
|
|
7
|
+
|
|
8
|
+
Liquid Toast uses the existing Toast store with a capsule, connecting neck, droplet, card expansion
|
|
9
|
+
and reverse exit inspired by expo-dynamic-notifications. It is an in-app effect, not ActivityKit,
|
|
10
|
+
Live Activity or a background notification service. The upstream MIT notice ships with this package.
|
|
11
|
+
|
|
12
|
+
## Installation and compatibility
|
|
13
|
+
|
|
14
|
+
Use the exact published HJM version train for contracts and renderer. The effect is imported from `@hjmds/react-native/toast-liquid`; the root
|
|
15
|
+
barrel intentionally does not re-export its factory.
|
|
16
|
+
|
|
17
|
+
Install the host-compatible versions of these optional peers before importing that subpath:
|
|
18
|
+
|
|
19
|
+
| Peer | Initial tested type/bundle fixture |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| @shopify/react-native-skia | 2.6.2 |
|
|
22
|
+
| react-native-reanimated | 4.5.1 |
|
|
23
|
+
| react-native-worklets | 0.10.1 |
|
|
24
|
+
|
|
25
|
+
The Native showcase uses Expo 57 / RN 0.86.2. Reanimated/Worklets in this lane declare RN 0.83–0.86;
|
|
26
|
+
this does not extend the effect to the base renderer's entire RN >=0.81 range. The base Metro fixture
|
|
27
|
+
remains RN 0.81.6 and actively rejects imports of the optional peers. Its development install reports
|
|
28
|
+
their peer mismatch because the optional effect is typechecked in the same package; that is not a
|
|
29
|
+
claim that RN 0.81 can run the effect. No framework upgrade is forced on standard Toast consumers.
|
|
30
|
+
|
|
31
|
+
Configure the Worklets Babel plugin in a bare RN app according to its version's setup. The Expo fixture
|
|
32
|
+
uses `babel-preset-expo`'s integration. A binary must already contain compatible native modules;
|
|
33
|
+
adding JS dependencies alone does not add them to an installed development client or OTA runtime.
|
|
34
|
+
No `expo-blur`, Expo symbols or remote avatar loader is required by HJM.
|
|
35
|
+
|
|
36
|
+
## Usage
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
import { ToastRegion, useToastRegion } from '@hjmds/react-native/feedback';
|
|
40
|
+
import { createLiquidToastPresentation } from '@hjmds/react-native/toast-liquid';
|
|
41
|
+
|
|
42
|
+
// Create outside render, or memoize. Default anchor works without hardware identification.
|
|
43
|
+
const liquid = createLiquidToastPresentation({ anchor: { kind: 'capsule' } });
|
|
44
|
+
|
|
45
|
+
<ToastRegion placement="top" maxVisible={1} presentationAdapter={liquid}
|
|
46
|
+
safeAreaInsets={insets} occluded={modalIsOpen}>
|
|
47
|
+
{children}
|
|
48
|
+
</ToastRegion>
|
|
49
|
+
|
|
50
|
+
const toast = useToastRegion();
|
|
51
|
+
toast.publish({
|
|
52
|
+
id: `generation:${job.id}`,
|
|
53
|
+
presentation: 'liquid',
|
|
54
|
+
title: t('generation.completed.title'),
|
|
55
|
+
description: t('generation.completed.description'),
|
|
56
|
+
closeLabel: t('common.closeNotification'),
|
|
57
|
+
tone: 'success',
|
|
58
|
+
action: { label: t('generation.open'), onAction: openResult },
|
|
59
|
+
});
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The host must provide current safe-area insets and set `occluded` while its modal hides the region.
|
|
63
|
+
Mount a region covering the intended screen, outside clipping containers. Ordinary descriptors still
|
|
64
|
+
render standard Toasts. Liquid requires `placement="top"`, `maxVisible={1}`; other combinations throw.
|
|
65
|
+
Without the adapter, and on Web, the same descriptor uses the standard accessible surface.
|
|
66
|
+
|
|
67
|
+
An island anchor is explicitly `{ kind: 'island', frame: { x, y, width, height } }` in window points.
|
|
68
|
+
Only supply a frame verified by the application's device/window adapter. HJM never infers hardware
|
|
69
|
+
from safe-area height. Until the viewport origin is measured, or if the frame lies outside the current
|
|
70
|
+
width, the effect uses a capsule. Refresh the adapter's frame after a window geometry change; its
|
|
71
|
+
Surface identity remains stable, so this does not replace the store entry. Hardware alignment is
|
|
72
|
+
unverified until captured on that device. Omit it for Android, notched and older supported iPhones.
|
|
73
|
+
|
|
74
|
+
## Lifecycle and accessibility
|
|
75
|
+
|
|
76
|
+
- One store owns FIFO, bounded overflow, stable ids, action revisions and exit completion. Updating
|
|
77
|
+
a visible id changes copy/tone without replaying the entry. Its initial presentation choice is
|
|
78
|
+
retained for that entry; publish a new id to request a different presentation.
|
|
79
|
+
- Readable duration starts after the entry springs settle. `presentation`, `window`, `occlusion`,
|
|
80
|
+
`focus`, `pointer`, and `gesture` pauses are independent. Do not use the first three reasons from
|
|
81
|
+
product code: they are renderer-owned. User-programmed pauses should use `programmatic`.
|
|
82
|
+
- Actionable messages persist by default; explicit finite durations have the existing 5-second floor.
|
|
83
|
+
Results remain accessible in product UI after the notification closes.
|
|
84
|
+
- Upward swipe, close and action use the existing dismiss reasons. Late animation completions are
|
|
85
|
+
ignored after interruption/unmount. Background recovery shows the final card without replay.
|
|
86
|
+
- Text and controls stay RN nodes; Skia paints only decoration. The effect does not bitmap text or
|
|
87
|
+
add a second live announcement. Screen readers or reduced motion use standard Toast chrome.
|
|
88
|
+
- Content height is measured, allowing long copy and large fonts. Insufficient viewport space falls
|
|
89
|
+
back to the standard surface. Dark mode, RTL and colors use the HJM provider.
|
|
90
|
+
|
|
91
|
+
## Validation scope
|
|
92
|
+
|
|
93
|
+
`test/toast-liquid.test.tsx` tests lifecycle with controlled animation completions; it cannot measure
|
|
94
|
+
GPU performance or verify native accessibility behavior. The source geometry is covered in the
|
|
95
|
+
contracts package. `Patterns/Liquid Toast` provides capsule, long-copy, reduced-motion and burst
|
|
96
|
+
interaction cases; the Web `LiquidHintFallback` story preserves the same descriptor semantics.
|
|
97
|
+
|
|
98
|
+
Installed checks on 2026-09-30 (no new simulator/emulator, no native rebuild): iPhone 17 / iOS 27.0 simulator with a
|
|
99
|
+
host-supplied island frame, and Android 16 emulator with the capsule anchor ([record](../../../docs/evidence/liquid-toast-2026-09-30/README.md)).
|
|
100
|
+
Other island models' frames are host-measured and unverified here; physical devices, frame times and spoken
|
|
101
|
+
VoiceOver/TalkBack journeys remain consumer-release QA.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
diff --git a/android/src/main/java/com/reactnativemenu/MenuView.kt b/android/src/main/java/com/reactnativemenu/MenuView.kt
|
|
2
|
+
index 17ed7c6491b60e87fe829fb3f8841424617b4cfb..8abbe4b112a278bdce74de04c9d50f48db09e244 100644
|
|
3
|
+
--- a/android/src/main/java/com/reactnativemenu/MenuView.kt
|
|
4
|
+
+++ b/android/src/main/java/com/reactnativemenu/MenuView.kt
|
|
5
|
+
@@ -47,11 +47,15 @@ class MenuView(private val mContext: ReactContext) : ReactViewGroup(mContext) {
|
|
6
|
+
prepareMenu()
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
- override fun setHitSlopRect(rect: Rect?) {
|
|
10
|
+
- super.setHitSlopRect(rect)
|
|
11
|
+
- mHitSlopRect = rect
|
|
12
|
+
- updateTouchDelegate()
|
|
13
|
+
- }
|
|
14
|
+
+ // RN 0.81+ exposes a Kotlin property rather than a callable Java setter.
|
|
15
|
+
+ // Preserve both RN hit testing and the menu TouchDelegate when the prop changes.
|
|
16
|
+
+ override var hitSlopRect: Rect?
|
|
17
|
+
+ get() = super.hitSlopRect
|
|
18
|
+
+ set(value) {
|
|
19
|
+
+ super.hitSlopRect = value
|
|
20
|
+
+ mHitSlopRect = value
|
|
21
|
+
+ updateTouchDelegate()
|
|
22
|
+
+ }
|
|
23
|
+
|
|
24
|
+
override fun onInterceptTouchEvent(ev: MotionEvent): Boolean {
|
|
25
|
+
return true
|
|
26
|
+
diff --git a/android/src/main/java/com/reactnativemenu/MenuViewManagerBase.kt b/android/src/main/java/com/reactnativemenu/MenuViewManagerBase.kt
|
|
27
|
+
index 0cd90f4741508a95a63198574228c244ad41afd8..77733af70c938b5e50fb89839f32de8fa04f4964 100644
|
|
28
|
+
--- a/android/src/main/java/com/reactnativemenu/MenuViewManagerBase.kt
|
|
29
|
+
+++ b/android/src/main/java/com/reactnativemenu/MenuViewManagerBase.kt
|
|
30
|
+
@@ -122,10 +122,10 @@ abstract class MenuViewManagerBase : ReactClippingViewManager<MenuView>() {
|
|
31
|
+
@ReactProp(name = "hitSlop")
|
|
32
|
+
fun setHitSlop(view: ReactViewGroup, @Nullable hitSlop: ReadableMap?) {
|
|
33
|
+
if (hitSlop == null) {
|
|
34
|
+
- // We should keep using setters as `Val cannot be reassigned`
|
|
35
|
+
- view.setHitSlopRect(null)
|
|
36
|
+
+ // RN 0.81+ uses Kotlin property access; dispatches to MenuView hit testing.
|
|
37
|
+
+ view.hitSlopRect = null
|
|
38
|
+
} else {
|
|
39
|
+
- view.setHitSlopRect(
|
|
40
|
+
+ view.hitSlopRect = (
|
|
41
|
+
Rect(
|
|
42
|
+
if (hitSlop.hasKey("left"))
|
|
43
|
+
PixelUtil.toPixelFromDIP(hitSlop.getDouble("left")).toInt()
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# RN 0.86 optional menu compatibility
|
|
2
|
+
|
|
3
|
+
Only hosts importing `@hjmds/react-native/context-menu-native` need these patches.
|
|
4
|
+
HJM's npm installation does not automatically apply them. Copy the three patch
|
|
5
|
+
files into your repository and configure your package manager. For pnpm, use:
|
|
6
|
+
|
|
7
|
+
```yaml
|
|
8
|
+
overrides:
|
|
9
|
+
react-native-ios-context-menu: 3.2.1
|
|
10
|
+
react-native-ios-utilities: 5.2.0
|
|
11
|
+
patchedDependencies:
|
|
12
|
+
'@react-native-menu/menu@1.2.2': patches/@react-native-menu__menu.patch
|
|
13
|
+
react-native-ios-context-menu@3.2.1: patches/react-native-ios-context-menu.patch
|
|
14
|
+
react-native-ios-utilities@5.2.0: patches/react-native-ios-utilities.patch
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Install Zeego 3.0.6 and these exact native peers. Reinstall dependencies and iOS
|
|
18
|
+
Pods, then rebuild the native client; Fast Refresh cannot update native binaries.
|
|
19
|
+
The iOS overrides remain in the same major lane. The older pins force obsolete
|
|
20
|
+
Folly dependencies on RN's prebuilt framework. The Android patch adapts hitSlop to
|
|
21
|
+
the Kotlin property API while preserving TouchDelegate. The iOS patches correct
|
|
22
|
+
subtitle availability and exclude a removed legacy root-content class in Fabric.
|
|
23
|
+
Remove each patch when the pinned upstream package incorporates its fix.
|
|
24
|
+
|
|
25
|
+
The full showcase was built on iOS and its native menu save action was observed.
|
|
26
|
+
Android compilation passed with the Kotlin patch. These are specific host results,
|
|
27
|
+
not a guarantee for every Expo/RN version or an accessibility certification.
|