diff --git a/packages/rn-storybook-auto-screenshots/package.json b/packages/rn-storybook-auto-screenshots/package.json index b023105..3ac537f 100644 --- a/packages/rn-storybook-auto-screenshots/package.json +++ b/packages/rn-storybook-auto-screenshots/package.json @@ -29,7 +29,7 @@ "author": "Screenshotbot", "license": "Apache-2.0", "peerDependencies": { - "@storybook/react-native": "*", + "@storybook/react-native": ">=10.0.0 <11.0.0", "react": "*", "react-native": "*" }, diff --git a/packages/rn-storybook-auto-screenshots/src/StoryRenderer.tsx b/packages/rn-storybook-auto-screenshots/src/StoryRenderer.tsx index d322044..a89ca54 100644 --- a/packages/rn-storybook-auto-screenshots/src/StoryRenderer.tsx +++ b/packages/rn-storybook-auto-screenshots/src/StoryRenderer.tsx @@ -140,6 +140,13 @@ export function StoryRenderer({ storyName = 'MyFeature/Initial' }: StoryRenderer ); } +// NOTE: _storyIndex, _idToPrepared, _preview, and createPreparedStoryMapping are +// internal APIs on the View class (underscore-prefixed). @storybook/react-native does +// not expose a public API for programmatic story rendering — getStorybookUI() is the +// only public rendering path. We rely on these internals because there is no alternative. +// Verified against @storybook/react-native ^10.0.0. If Storybook exposes a public API +// in a future version, we should migrate to it. + /** * Get all available story IDs from Storybook's registry. */