Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .changeset/panel-disable-support.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
'@storybook/react-native-ui': minor
'@storybook/react-native-ui-lite': minor
'@storybook/react-native-ui': patch
'@storybook/react-native-ui-lite': patch
---

feat: honor `parameters[paramKey].disable` on addon panels — matches web Storybook. When every panel is disabled for the current story, the addons UI is hidden.
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module.exports = defineConfig([
rules: {
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/array-type': 'off',
'react-hooks/set-state-in-effect': 'warn',
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useRef } from 'react';
import { Text } from 'react-native';

const TestCase = () => {
// eslint-disable-next-line react-hooks/refs, react-hooks/purity
const unstableRef = useRef(Math.random().toString(36).slice(2, 11)).current;
return <Text>{unstableRef}</Text>;
};
Expand Down
18 changes: 9 additions & 9 deletions examples/expo-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"dependencies": {
"@expo/dom-webview": "^56.0.4",
"@expo/metro-runtime": "~56.0.7",
"@expo/metro-runtime": "~56.0.14",
"@gorhom/bottom-sheet": "^5.2.8",
"@react-native-async-storage/async-storage": "2.2.0",
"@react-native-community/datetimepicker": "9.1.0",
Expand All @@ -42,15 +42,15 @@
"@storybook/addon-ondevice-controls": "^10.4.4",
"@storybook/addon-ondevice-notes": "^10.4.4",
"@storybook/addon-react-native-server": "^1.0.1",
"@storybook/react": "^10.4.0",
"@storybook/react": "^10.4.2",
"@storybook/react-native": "^10.4.4",
"@storybook/react-native-ui-lite": "^10.4.4",
"@storybook/react-native-web-vite": "^10.4.0",
"@storybook/react-native-web-vite": "^10.4.2",
"babel-plugin-react-compiler": "^1.0.0",
"expo": "56.0.0-preview.10",
"expo-modules-core": "56.0.7",
"expo-sqlite": "~56.0.3",
"expo-updates": "~56.0.10",
"expo": "56.0.9",
"expo-modules-core": "56.0.15",
"expo-sqlite": "~56.0.4",
"expo-updates": "~56.0.18",
"react": "19.2.3",
"react-compiler-runtime": "^1.0.0",
"react-dom": "19.2.3",
Expand All @@ -61,7 +61,7 @@
"react-native-svg": "15.15.4",
"react-native-web": "^0.21.2",
"react-native-worklets": "0.8.3",
"storybook": "^10.4.0",
"storybook": "^10.4.2",
"storybook-addon-deep-controls": "^0.10.0",
"ws": "^8.20.0"
},
Expand All @@ -76,7 +76,7 @@
"babel-plugin-react-docgen-typescript": "^1.5.1",
"expo-atlas": "^0.4.3",
"jest": "^29.7.0",
"jest-expo": "~56.0.1",
"jest-expo": "~56.0.4",
"test-renderer": "^0.15.0",
"typescript": "~6.0.3",
"vite": "^8.0.5"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"dependencies": "82849322610405a4f914999a7ac6af9f8d9e5d48",
"devDependencies": "0599e7c491da1f7cdf9e74a0c41f87b73bf11714"
"dependencies": "593df8b195d12df732278a2214db3d0d866d2028",
"devDependencies": "878b5807dd332c6f9a1bd40ef268d9ca5665866d"
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* do not change this file, it is auto generated by storybook. */
/// <reference types="@storybook/react-native/metro-env" />
import { start, updateView, View, type Features } from '@storybook/react-native';
import { start, updateView, type View, type Features } from '@storybook/react-native';


import "@storybook/addon-ondevice-controls/register";
Expand Down Expand Up @@ -49,7 +49,7 @@ const annotations = [

globalThis.STORIES = normalizedStories;
globalThis.STORYBOOK_WEBSOCKET = {
host: '192.168.1.171',
host: '192.168.1.210',
port: 7007,
secured: false,
};
Expand Down
16 changes: 8 additions & 8 deletions examples/expo-new-wrapper-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"prebuild": "expo prebuild"
},
"dependencies": {
"@expo/metro-runtime": "~56.0.7",
"@expo/metro-runtime": "~56.0.14",
"@gorhom/bottom-sheet": "^5.2.8",
"@react-native-async-storage/async-storage": "2.2.0",
"@react-native-community/datetimepicker": "9.1.0",
Expand All @@ -24,14 +24,14 @@
"@storybook/addon-ondevice-controls": "^10.4.4",
"@storybook/addon-ondevice-notes": "^10.4.4",
"@storybook/addon-react-native-server": "^1.0.1",
"@storybook/react": "^10.4.0",
"@storybook/react": "^10.4.2",
"@storybook/react-native": "^10.4.4",
"@storybook/react-native-ui-lite": "^10.4.4",
"@storybook/react-native-web-vite": "^10.4.0",
"@storybook/react-native-web-vite": "^10.4.2",
"babel-plugin-react-compiler": "^1.0.0",
"expo": "56.0.0-preview.10",
"expo-modules-core": "56.0.7",
"expo-updates": "~56.0.10",
"expo": "56.0.9",
"expo-modules-core": "56.0.15",
"expo-updates": "~56.0.18",
"react": "19.2.3",
"react-compiler-runtime": "^1.0.0",
"react-dom": "19.2.3",
Expand All @@ -42,7 +42,7 @@
"react-native-svg": "15.15.4",
"react-native-web": "^0.21.2",
"react-native-worklets": "0.8.3",
"storybook": "^10.4.0",
"storybook": "^10.4.2",
"storybook-addon-deep-controls": "^0.10.0",
"ws": "^8.20.0"
},
Expand All @@ -56,7 +56,7 @@
"babel-plugin-react-docgen-typescript": "^1.5.1",
"expo-atlas": "^0.4.3",
"jest": "^29.7.0",
"jest-expo": "~56.0.1",
"jest-expo": "~56.0.4",
"test-renderer": "^0.15.0",
"typescript": "~6.0.3",
"vite": "^8.0.5"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* do not change this file, it is auto generated by storybook. */
/// <reference types="@storybook/react-native/metro-env" />
import { start, updateView, View, type Features } from '@storybook/react-native';
import { start, updateView, type View, type Features } from '@storybook/react-native';


import "@storybook/addon-ondevice-controls/register";
Expand Down Expand Up @@ -49,7 +49,7 @@ const annotations = [

globalThis.STORIES = normalizedStories;
globalThis.STORYBOOK_WEBSOCKET = {
host: '192.168.1.171',
host: '192.168.1.210',
port: 7007,
secured: false,
};
Expand Down
34 changes: 17 additions & 17 deletions examples/expo-router-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,41 +24,41 @@
"@storybook/addon-ondevice-controls": "^10.4.4",
"@storybook/addon-ondevice-notes": "^10.4.4",
"@storybook/addon-react-native-server": "^1.0.1",
"@storybook/react": "^10.4.0",
"@storybook/react": "^10.4.2",
"@storybook/react-native": "^10.4.4",
"@storybook/react-native-ui-lite": "^10.4.4",
"@storybook/react-native-web-vite": "^10.4.0",
"expo": "56.0.0-preview.10",
"expo-constants": "~56.0.9",
"expo-font": "~56.0.3",
"@storybook/react-native-web-vite": "^10.4.2",
"expo": "56.0.9",
"expo-constants": "~56.0.17",
"expo-font": "~56.0.5",
"expo-haptics": "~56.0.3",
"expo-image": "~56.0.4",
"expo-linking": "~56.0.6",
"expo-modules-core": "56.0.7",
"expo-router": "~56.1.4",
"expo-splash-screen": "~56.0.5",
"expo-sqlite": "~56.0.3",
"expo-image": "~56.0.10",
"expo-linking": "~56.0.13",
"expo-modules-core": "56.0.15",
"expo-router": "~56.2.9",
"expo-splash-screen": "~56.0.10",
"expo-sqlite": "~56.0.4",
"expo-status-bar": "~56.0.4",
"expo-symbols": "~56.0.5",
"expo-system-ui": "~56.0.4",
"expo-web-browser": "~56.0.4",
"expo-symbols": "~56.0.6",
"expo-system-ui": "~56.0.5",
"expo-web-browser": "~56.0.5",
"react": "19.2.3",
"react-dom": "19.2.3",
"react-native": "0.85.3",
"react-native-gesture-handler": "~2.31.2",
"react-native-reanimated": "~4.3.1",
"react-native-safe-area-context": "^5.7.0",
"react-native-screens": "4.25.0",
"react-native-screens": "4.25.2",
"react-native-svg": "15.15.4",
"react-native-web": "^0.21.2",
"react-native-worklets": "0.8.3",
"storybook": "^10.4.0",
"storybook": "^10.4.2",
"ws": "^8.20.0"
},
"devDependencies": {
"@types/react": "~19.2.14",
"eslint": "^9.39.4",
"eslint-config-expo": "^56.0.3",
"eslint-config-expo": "^56.0.4",
"typescript": "~6.0.3"
},
"private": true
Expand Down
4 changes: 2 additions & 2 deletions examples/repack-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
"@storybook/addon-ondevice-backgrounds": "^10.4.4",
"@storybook/addon-ondevice-controls": "^10.4.4",
"@storybook/addon-ondevice-notes": "^10.4.4",
"@storybook/react": "^10.4.0",
"@storybook/react": "^10.4.2",
"@storybook/react-native": "^10.4.4",
"@storybook/react-native-ui-lite": "^10.4.4",
"react": "19.2.3",
"react-native": "0.85.3",
"react-native-safe-area-context": "^5.7.0",
"storybook": "^10.4.0"
"storybook": "^10.4.2"
},
"devDependencies": {
"@babel/core": "^7.26.0",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
"@prettier/plugin-oxc": "^0.1.3",
"cross-env": "^10.1.0",
"eslint": "^9.39.4",
"eslint-config-expo": "^56.0.3",
"eslint-config-expo": "^56.0.4",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-react-hooks": "7.1.1",
"prettier": "^3.8.1",
"sherif": "^1.11.0",
"typescript": "~6.0.3"
},
"packageManager": "pnpm@11.0.9+sha512.34ce82e6780233cf9cad8685029a8f81d2e06196c5a9bad98879f7424940c6817c4e4524fb7d38b8553ceed48b9758b8ebaf1abd3600c232c4c8cf7366086f38",
"packageManager": "pnpm@11.5.2+sha512.71c631e382066efc25625d5cf029075de07b61b37f6e27350fbd84b1bda5864c8c1967adc280776b45c30a715c0359a3be08fef42d5bb09e2b99029979692916",
"engines": {
"node": ">=26.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/ondevice-actions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"fast-deep-equal": "^3.1.3"
},
"devDependencies": {
"storybook": "^10.4.0",
"storybook": "^10.4.2",
"typescript": "~6.0.3"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/ondevice-backgrounds/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@storybook/react-native-theming": "^10.4.4"
},
"devDependencies": {
"storybook": "^10.4.0",
"storybook": "^10.4.2",
"typescript": "~6.0.3"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/ondevice-controls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"devDependencies": {
"@gorhom/bottom-sheet": "*",
"cross-env": "^10.1.0",
"storybook": "^10.4.0",
"storybook": "^10.4.2",
"typescript": "~6.0.3"
},
"peerDependencies": {
Expand Down
3 changes: 3 additions & 0 deletions packages/ondevice-controls/src/components/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ const Slider = ({
const isRTL = I18nManager.isRTL;
const initialValueRef = useRef(value ?? minimumValue);
const [trackWidth, setTrackWidth] = useState(0);
// eslint-disable-next-line react-hooks/refs
const [displayValue, setDisplayValue] = useState(initialValueRef.current);

// eslint-disable-next-line react-hooks/refs
const translateX = useRef(new Animated.Value(0)).current;
const currentTranslateRef = useRef(0);
const startTranslateRef = useRef(0);
Expand Down Expand Up @@ -180,6 +182,7 @@ const Slider = ({

const panResponder = useMemo(
() =>
// eslint-disable-next-line react-hooks/refs
PanResponder.create({
onStartShouldSetPanResponder: () => !disabled,
onMoveShouldSetPanResponder: () => !disabled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export function HoloColorPicker({

const pickerResponder = useMemo(
() =>
// eslint-disable-next-line react-hooks/refs
createPanResponder({
onStart: handleHueChange,
onMove: handleHueChange,
Expand Down
4 changes: 4 additions & 0 deletions packages/ondevice-controls/src/useDebounceCallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,14 @@ export default function useDebouncedCallback<T extends (...args: any[]) => Retur
const funcRef = useRef(callback);
const mounted = useRef(true);

// eslint-disable-next-line react-hooks/refs
funcRef.current = callback;

if (typeof callback !== 'function') {
throw new TypeError('Expected a function');
}

// eslint-disable-next-line react-hooks/immutability
wait = +wait || 0;
options = options || {};

Expand Down Expand Up @@ -203,6 +205,7 @@ export default function useDebouncedCallback<T extends (...args: any[]) => Retur
};

const timerExpired = () => {
// eslint-disable-next-line react-hooks/purity
const time = Date.now();
if (shouldInvoke(time)) {
return trailingEdge(time);
Expand All @@ -224,6 +227,7 @@ export default function useDebouncedCallback<T extends (...args: any[]) => Retur
};

const func: DebouncedState<T> = (...args: Parameters<T>): ReturnType<T> => {
// eslint-disable-next-line react-hooks/purity
const time = Date.now();
const isInvoking = shouldInvoke(time);

Expand Down
2 changes: 1 addition & 1 deletion packages/ondevice-notes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"devDependencies": {
"react-native-markdown-display": "^7.0.2",
"storybook": "^10.4.0",
"storybook": "^10.4.2",
"tsdown": "^0.22.0",
"typescript": "~6.0.3"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/react-native-ui-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
},
"dependencies": {
"@nozbe/microfuzz": "^1.0.0",
"@storybook/react": "^10.4.0",
"@storybook/react": "^10.4.2",
"@storybook/react-native-theming": "^10.4.4",
"es-toolkit": "^1.45.1",
"memoizerific": "^1.11.3",
"ts-dedent": "^2.2.0"
},
"devDependencies": {
"@types/react": "~19.2.14",
"storybook": "^10.4.0",
"storybook": "^10.4.2",
"tsdown": "^0.22.0",
"typescript": "~6.0.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-ui-common/src/util/useStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ export const useStyle = <
styleFactory: () => TOutput,
deps?: DependencyList
): TOutput =>
// eslint-disable-next-line react-hooks/exhaustive-deps
// eslint-disable-next-line react-hooks/exhaustive-deps, react-hooks/use-memo
useMemo(styleFactory, deps as DependencyList);
8 changes: 4 additions & 4 deletions packages/react-native-ui-lite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@
},
"dependencies": {
"@gorhom/portal": "^1.0.14",
"@legendapp/list": "3.0.0-beta.56",
"@nozbe/microfuzz": "^1.0.0",
"@storybook/react": "^10.4.0",
"@storybook/react": "^10.4.2",
"@storybook/react-native-theming": "^10.4.4",
"@storybook/react-native-ui-common": "^10.4.4",
"polished": "^4.3.1"
},
"devDependencies": {
"@types/react": "~19.2.14",
"storybook": "^10.4.0",
"storybook": "^10.4.2",
"ts-dedent": "^2.2.0",
"tsdown": "^0.22.0",
"typescript": "~6.0.3"
"typescript": "~6.0.3",
"@legendapp/list": "^3.0.2"
},
"peerDependencies": {
"react": "*",
Expand Down
Loading