expo-stacked-sheets 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. package/README.md +14 -10
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # Expo Stacked Sheets
2
2
 
3
- Edit multiple drafts in an Expo app. Minimize them to keep using the current
4
- screen, then reopen any draft from an iOS Mail-style card overview.
3
+ 3D stacked sheets for Expo and React Native. Works on iOS and Android.
5
4
 
6
5
  ## Demo
7
6
 
@@ -20,11 +19,13 @@ Requires Expo SDK 58 and React Native 0.88.
20
19
  npx expo install expo-stacked-sheets
21
20
  ```
22
21
 
23
- If your SDK patch uses Safe Area Context 5.10.x (such as Expo 58.0.22), include
24
- `'react-native-safe-area-context@~5.10.1'` in the install command.
22
+ On Expo 58.0.22, use
23
+ `npx expo install expo-stacked-sheets 'react-native-safe-area-context@~5.10.1'`.
25
24
 
26
25
  ## Usage
27
26
 
27
+ Add this to `App.tsx` or a full-screen Expo Router route.
28
+
28
29
  ```tsx
29
30
  import { StackedSheets } from 'expo-stacked-sheets';
30
31
  import { Button } from 'react-native';
@@ -36,9 +37,13 @@ export default function App() {
36
37
  <GestureHandlerRootView style={{ flex: 1 }}>
37
38
  <SafeAreaProvider>
38
39
  <StackedSheets
40
+ initialSheets={[
41
+ { title: 'Weekend plans', body: 'Pick a place for breakfast.' },
42
+ { title: 'Reading list', body: 'Finish the last chapter.' },
43
+ ]}
39
44
  renderBackground={({ active, openSheet }) => (
40
45
  <SafeAreaView>
41
- <Button title="New draft" disabled={!active} onPress={() => openSheet()} />
46
+ <Button title="New sheet" disabled={!active} onPress={() => openSheet()} />
42
47
  </SafeAreaView>
43
48
  )}
44
49
  />
@@ -48,8 +53,10 @@ export default function App() {
48
53
  }
49
54
  ```
50
55
 
51
- Reuse the providers if your app already has them. Drafts stay in memory.
52
- Use `onSaveSheet` to save them in your app.
56
+ Tap the bar at the bottom to see both sheets. The down arrow minimizes a sheet.
57
+
58
+ Sheets stay in memory. To enable Save, pass a synchronous `onSaveSheet` callback
59
+ that returns `true` when the save succeeds.
53
60
  [Component props](https://github.com/siyo-ch/expo-stacked-sheets/blob/main/packages/stacked-sheets/src/types.ts)
54
61
 
55
62
  ## Run the Notes demo
@@ -58,7 +65,4 @@ From a [repository checkout](https://github.com/siyo-ch/expo-stacked-sheets), ru
58
65
  `npm ci && npm start`. Press `i` for iOS or `a` for Android.
59
66
  [Photo credits](https://github.com/siyo-ch/expo-stacked-sheets/blob/main/assets/notes/CREDITS.md)
60
67
 
61
- For an unpublished build, run `npm pack --workspace expo-stacked-sheets` and
62
- install the resulting `.tgz` in your Expo app.
63
-
64
68
  [MIT](https://github.com/siyo-ch/expo-stacked-sheets/blob/main/LICENSE)
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "expo-stacked-sheets",
3
- "version": "1.0.1",
4
- "description": "Stacked sheet editing and overview for Expo and React Native",
5
- "keywords": ["expo", "react-native", "stacked-sheets", "drafts", "reanimated"],
3
+ "version": "1.0.2",
4
+ "description": "3D stacked sheets for Expo and React Native, built with Reanimated and Gesture Handler.",
5
+ "keywords": ["expo", "react-native", "stacked-sheets", "bottom-sheet", "sheet", "3d", "reanimated", "gesture-handler", "ios", "android"],
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/siyo-ch/expo-stacked-sheets",
8
8
  "bugs": "https://github.com/siyo-ch/expo-stacked-sheets/issues",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "files": ["src"],
25
25
  "scripts": {
26
- "prepack": "node -e \"require('node:fs').copyFileSync('../../README.md', 'README.md')\""
26
+ "prepack": "node scripts/prepare-readme.cjs"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "@react-navigation/native": "^7.5.1",