@tastic/shell 0.9.0 → 0.11.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 CHANGED
@@ -28,12 +28,15 @@ package ecosystem, on [`@tastic/hud`](https://github.com/jayrdeaton/react-native
28
28
  middleware })` builds one persisted store from the shell's keys (theme, haptics, sound, Keep Awake,
29
29
  profiles, seat selection, seat colors, app settings, seat 2, the never-saved `liveplay`, and
30
30
  `lastActiveGame` in a pack with a resumable game), the pack's own `reducers` and every game's own
31
- `reducers`.
32
- - **What a game builds on**: `createPlayerSettings` (its settings and controls, kept per player),
33
- `createGameStats` (its stats and achievements), `createGameGuideSlice` (which version of its How to
34
- Play a player has seen), `onProfileRemoved` (forget a deleted profile), `useActiveRound`,
35
- `useProfiles`, `useSeatColors`, `SettingsDialog`, `safeBack`, `useBackBlock` (Android's and the
36
- browser's back mid-match open Quit Match?) and `imageGameIcon`.
31
+ `reducers`. Each of the shell's keys exports its reducer, actions and defaults, and
32
+ `createShellReducers` builds them all (see [The store's keys](#the-stores-keys)).
33
+ - **What a game builds on**: `createPlayerSettings` and `seatPlayerKey` (its settings and controls,
34
+ kept per player), `createGameStats` (its stats and achievements), `createGameGuideSlice` (which
35
+ version of its How to Play a player has seen), `onProfileRemoved` (forget a deleted profile),
36
+ `usePack` and `usePackGame`, `useActiveRound`, `useProfiles`, `useSeatColors`, `useOpponent`,
37
+ `useAppSettings`, `useGameGuide`, `useAtComputer`, `roundModeFor`, `humanSeatsFor`, `seatTwoFor`,
38
+ `MatchChips`, `SettingsDialog`, `safeBack`, `useBackBlock` (Android's and the browser's back
39
+ mid-match open Quit Match?) and `imageGameIcon` (see [Hooks and helpers](#hooks-and-helpers)).
37
40
 
38
41
  ## Install
39
42
 
@@ -119,11 +122,11 @@ PuckTastic and DuelTastic draw what they always did:
119
122
  | `useScreenOptions?` | A hook returning stack screen options (`StackScreenOptions`), merged after the shell's own (a status bar style of the pack's own, Reduce Motion's crossfade). The shell's already follow the app's theme, and stay dark over a `Backdrop`. |
120
123
  | `useFeedbackSounds?` | A hook returning the two sounds every button plays (`FeedbackSounds`: `selection`, `notification`), in place of the shell's two wavs. |
121
124
  | `Toaster?` | The pack's own toaster, drawn in a frame over the whole app (inside the safe area) in place of the shell's. The toast provider is given no Paper, so nothing portals it out of the frame. |
122
- | `edgeGuard?` | `false` leaves Edge Guard out of Settings (no edge controls, no Edge Guard plugin). |
125
+ | `edgeGuard?` | `false` leaves Edge Guard out of Settings (no edge controls, no Edge Guard plugin), and out of the play screens' options on Android. |
123
126
  | `seatTheme?` | `(colors, dark) => ({ color, harmony })`: the theme the seats' colors make (a muted seed from seat 1's color), applied whenever they or dark mode change and as a fresh install's theme, in place of a triad of the raw colors. With it, `useSeatColors` reads each seat's color from where it's remembered (`seatColors`) rather than from the theme. |
124
127
  | `previewColor?` | `(hex, dark) => string`: how every profile color is drawn (the seat buttons and their swatches on Home and in the loadouts, a loadout's Ready button and seat controls, each `ProfileChip`), mounted as `@tastic/profile`'s `ProfileColorProvider`. Saved colors stay as picked. |
125
128
  | `guide?` | The pack's own How to Play (`PackGuide`: `version`, `selectVersionSeen`, `markSeen`, `getSteps({ touch })`), for cards that teach every game at once: shown on Home's first launch (never while a cold launch resumes a game), replayed from Home's Settings, never in a play screen. Its seen version is a key of the pack's own. |
126
- | `guestLabel?`, `nullLabel?` | Seat 1's button on Home and in every loadout: the chip's label for a guest (default `'P1'`) and the guest row's in its menu. |
129
+ | `guestLabel?`, `nullLabel?` | Seat 1's button on Home and in every loadout: the chip's label for a guest (default `'P1'`) and the guest row's in its menu. A 2 Player loadout's seat 2 button takes the same two (its guest default `'P2'`). |
127
130
  | `guestStats?` | The stats screen keeps a guest's stats under `GUEST_PLAYER_ID` (`'guest'`): a Guest entry between Everyone and the profiles once a profile exists, and the screen opens on seat 1's player. Without it the screen opens on Everyone, where guests count. |
128
131
  | `AchievementList?` | One achievement list across the pack's games, on the Achievements tab, with the game picker hidden there. |
129
132
  | `statsTabs?` | Tabs of the pack's own between Stats and Achievements (`PackStatsTab`: `value`, `label`, `Content`, handed both filters). With them every tab is as wide as its label, with no icons, so three fit a phone. |
@@ -136,8 +139,9 @@ PuckTastic and DuelTastic draw what they always did:
136
139
  ### `GameDefinition`
137
140
 
138
141
  Each game is one object: its `id`, `title`, `blurb` and `icon` (a component drawn in the seats'
139
- colors, or `imageGameIcon({ light, dark })` for a light and dark pair of pictures), its seat 2
140
- choices (`seatTwo`: `'cpu'`, `'person'`, `'nobody'`), whether 2 Player seats its players side by side
142
+ colors, handed `GameIconProps`: `size`, `p1Color`, `p2Color` and `dark`; or `imageGameIcon({ light,
143
+ dark })` for a light and dark pair of pictures), its seat 2 choices (`seatTwo`, each a `SeatTwo`: `'cpu'`,
144
+ `'person'`, `'nobody'`), whether 2 Player seats its players side by side
141
145
  at a computer (`sideBySideAtComputer`) and in a wide window (`sideBySideWhenWide`), the store `reducers` it mounts, its root `Provider`, its `useLoadout(mode)`, its
142
146
  `PlayScreen`, its `StatsSections` and `AchievementList`, `resetStats`, and its How to Play `guide`.
143
147
  See `src/types.ts` for every field.
@@ -162,9 +166,29 @@ What a game can leave out or add, each optional, so a two-seat game sets none of
162
166
  A game never imports another game, and the shell never imports a game: games reach the shell only
163
167
  through the pack (`usePack()`).
164
168
 
169
+ `useLoadout(mode)` returns the game's part of the loadout (`GameLoadout`), built from its own saved
170
+ settings for the round `mode` seat 2 makes:
171
+
172
+ | Field | |
173
+ | --- | --- |
174
+ | `roundSettings` | The settings the round plays with, committed (liveplay's `activeRound.settings`) once every human seat is Ready. The play screen reads them back with `useActiveRound`. |
175
+ | `options` | `(props: LoadoutOptionsProps) => ReactNode`: the match-options row (board, rules, puck), drawn under the loadout's popover `host` in its colors (`accentColor`, `mutedColor`, `onAccentColor`, `dark`). `onRandomize` and `onReset` are undefined while the loadout folds them into its shared action band. |
176
+ | `optionIds` | The popover ids the options row opens, so the loadout lifts the row while one is open. |
177
+ | `randomize`, `reset` | The loadout's randomize and reset buttons. |
178
+ | `seatControl` | `(seat, host, look) => ReactNode \| undefined`: a human seat's controls picker (shot style, keys) in `look`'s colors (`SeatControlLook`: `accentColor`, `seatColor`, `mutedColor`, `dark`), or undefined where the game has none. |
179
+ | `cpuDifficulty?` | The CPU's levels (`{ value, options, onChange }`, the options hud's `MenuOption`s), saved per game, in player 1's opponent menu. Left out by a game with no seat 2, or whose CPU has no levels. |
180
+
181
+ A game's `guide` (`GameGuide`) builds its How to Play cards from the live settings: `version`,
182
+ `selectVersionSeen(state)` and `markSeen(version)` (from `createGameGuideSlice`), `selectInput(state)`
183
+ (the settings the cards read, as a flat object, compared shallowly) and `getSteps(input, { touch,
184
+ mode })`, hud's `GuideStep`s for a touch-first device or not and the round (`RoundMode`) seat 2's
185
+ saved choice makes in this game (`seatTwoFor`).
186
+
165
187
  ### `createPackStore`
166
188
 
167
- `createPackStore(pack, config)`, where `config` is `PackStoreConfig`:
189
+ `createPackStore(pack, config)` returns `{ store, persistor }` (`PackStore` is the store's type). It
190
+ reads only the pack's `seatColors`, `appearance`, `seatTheme`, `reducers` and its games' `reducers` and
191
+ `resumable` (`PackStoreSource`). `config` is `PackStoreConfig`:
168
192
 
169
193
  | Field | |
170
194
  | --- | --- |
@@ -174,6 +198,97 @@ through the pack (`usePack()`).
174
198
  | `serializableIgnoredPaths?` | State paths the dev serializability check skips (keys too big to walk on every action). |
175
199
  | `middleware?` | The pack's own middleware, after the shell's (Solitaire's settings that follow the player). |
176
200
 
201
+ ### The store's keys
202
+
203
+ `createPackStore` mounts these beside the pack's and the games' own keys.
204
+ `createShellReducers({ seatColors, appearance, seatTheme })` builds the same set (all but
205
+ `lastActiveGame`), and `ShellState` is their state, what a game's selectors read. Each key's reducer,
206
+ actions and defaults are exported for a pack's own code and its tests.
207
+
208
+ | Key | |
209
+ | --- | --- |
210
+ | `theme` | auto-paper's theme, starting from the pack's `appearance` and a triad of its `seatColors` (or what `seatTheme` makes of them). |
211
+ | `haptic`, `sound` | feedback-press's settings. Sound starts off in a development build. |
212
+ | `keepAwake` | `@rific/core`'s Keep Awake setting. |
213
+ | `profiles` | `@tastic/profile`'s roster, kept in step with the shared one (see `useProfiles`). |
214
+ | `profileSelection` | Which profile each seat last picked, null for a guest: `profileSelectionReducer`, starting from `defaultProfileSelectionState` (`{ 1: null, 2: null }`). `profileSelectionActions`: `select({ seat, profileId })` (a profile already in the other seat swaps the two), `clearProfile(profileId)` and `pruneToRoster(profileIds)`. Never shared with a sibling app. |
215
+ | `seatColors` | Each seat's remembered color: `createSeatColorsReducer(seatColors)`, starting from `defaultSeatColorsState(seatColors)` (each guest seat on its own seat color, the CPU on seat 2's, no profile picks). `seatColorsActions`: `setLastGuestColor({ seat, color })`, `setLastCpuColor(color)` and `setProfileColor({ profile, color })`, a profile's pick in this pack (null, or the profile's own color, drops it). |
216
+ | `appSettings` | Settings for the whole pack (`AppSettings`): `deferBottomEdgeGestures`, Edge Guard's opt-in, false in `DEFAULT_APP_SETTINGS`. `appSettingsReducer`, and `appSettingsActions.initialize(patch)`, which merges. Read and written with `useAppSettings`. |
217
+ | `opponent` | Who sits in seat 2 for the whole pack (`OpponentState`: `seatTwo`), the CPU in `DEFAULT_OPPONENT`. `opponentReducer`, and `opponentActions`: `setSeatTwo(seatTwo)` and `initialize(state)`. Read and written with `useOpponent`. |
218
+ | `liveplay` | This round, never saved (`LiveplaySliceState`): `activelyPlaying` (false) and `activeRound` (null until a loadout commits one; `ActiveRound`: `game`, `mode`, `settings`). `liveplayReducer`, and `liveplayActions`: `setActivelyPlaying(on)`, `setActiveRound(round)` and `initialize(state)`. A play screen sets `activelyPlaying` while a round is live and unpaused, and back to false as it unmounts: Edge Guard, when the player has turned it on, only guards while it's true. |
219
+ | `lastActiveGame` | Only in a pack with a `resumable` game: the play screen a cold launch resumes. Not exported. |
220
+
221
+ ### Building a game's keys
222
+
223
+ - `createPlayerSettings({ id, defaults, distinctControls })`: a game's loadout settings, kept per
224
+ player. `defaults` holds every setting, with `controlScheme` (`{ 1, 2 }`) for each seat's controls.
225
+ The match settings follow seat 1's player (only what they changed is saved, so a setting added later
226
+ starts at its default), and each seat's controls follow the player in it (seat 2's only for a
227
+ person). `distinctControls`, optional, lists every control in menu order where the two seats can't
228
+ share one (a desktop key cluster): when both would get the same, seat 2 shows and plays the first
229
+ one seat 1 isn't using, never saved. It returns `reducers` (`<id>Settings` and `<id>Controls`, for
230
+ the game's own `reducers`), `settingsReducer`, `controlsReducer`, `actions` (`patch(player,
231
+ changes)`, `setControl(player, control)`), `compose(saved, controls, selection, seatTwoIsPerson)`,
232
+ `select(state)` (the same settings read straight from the store, as How to Play reads them) and
233
+ `useSettings()` (`{ settings, setSettings(patch) }`, the loadout's one write path). A deleted
234
+ profile's settings and controls go with it.
235
+ - `seatPlayerKey(selection, seat)`: who a seat's saved settings belong to: the profile picked for it,
236
+ or that seat's guest (`'guest:1'`, `'guest:2'`).
237
+ - `createGameStats({ key, defaultStats, isValidStats, catalog, getProfileStatsView })`: one game's
238
+ stats and achievements, on `@tastic/achievements`' `createAchievementsSlice` under the store key
239
+ `key`. The stats keep a `profiles` bucket per profile beside the device-wide totals, and
240
+ `getProfileStatsView(bucket)` shows a bucket in the same shape, so every achievement in `catalog`
241
+ reads either. `isValidStats` is optional. It returns `reducer` (a deleted profile takes its bucket
242
+ and unlocks with it), `actions`, `Provider` (the game's `Provider`) and `useStats()`: `stats`,
243
+ `unlockedAchievements`, `record(update, profileIds)`, which applies a result and returns what it
244
+ unlocked (`RecordResult`: `device`, and `profiles` by seat for each seat the optional `profileIds`
245
+ maps to a profile), and
246
+ `resetAll()`.
247
+ - `createGameGuideSlice(mountKey)`: which version of a game's How to Play a player has finished or
248
+ skipped, under the game's own key: `{ actions: { markSeen }, reducer, selectVersionSeen }`, for its
249
+ `GameGuide`. Unlike hud's `createGuideSlice`, a saved store without the key reads as not seen, so a
250
+ game added to a pack in an update shows its cards to everyone.
251
+ - `onProfileRemoved(reducer, forget)`: wraps a game's reducer so it runs `forget(state, profileId)`
252
+ when the Profiles screen deletes a profile (not when a sibling app's roster sync drops one).
253
+ `forgetProfileAchievements(dropStats)` is a `forget` for a `createAchievementsSlice` state: it drops
254
+ the profile's unlocks, and its stats through `dropStats(stats, profileId)`.
255
+
256
+ ### Hooks and helpers
257
+
258
+ `RootLayout` mounts every provider these read.
259
+
260
+ - `usePack()`: the `PackDefinition`. `usePackGame(id)`: one of its games, or undefined for an id the
261
+ pack doesn't have. `PackProvider` (`pack`, `children`) provides them.
262
+ - `useProfiles()`: `profiles`, `lastSelected` (each seat's profile id, or null), `loaded`,
263
+ `createProfile(input)`, `updateProfile(id, patch)`, `deleteProfile(id)` (which also clears it from
264
+ any seat) and `selectProfile(seat, profileId)`. Its `ProfilesProvider` reconciles the saved roster
265
+ with `@tastic/profile`'s shared one in the App Group `group.com.infinitetoken.tastic` once at launch
266
+ (`loaded` turns true then, and the splash screen waits for it) and keeps the two in step.
267
+ - `useSeatColors(p2IsHuman)`: both seats' live colors and their pickers' handlers (`p1Color`,
268
+ `p2Color`, `handleP1ColorChange`, `handleP2ColorChange`), with the theme following them (see
269
+ `seatTheme`). A pick of the other seat's current color swaps the two.
270
+ - `useActiveRound(game, defaults)`: the round a play screen plays, `{ mode, settings }`: the one its
271
+ loadout committed, with its settings over `defaults`, or with none (a direct link, a web reload, a
272
+ game with no loadout) `defaults` and the mode a fresh install's seat 2 makes in this game.
273
+ - `useOpponent()`: `{ seatTwo, setSeatTwo }`, seat 2's saved choice for the whole pack.
274
+ - `useAppSettings()`: `{ settings, setSettings(patch) }`, the pack-wide settings (`AppSettings`). A
275
+ patch changes only the fields it names.
276
+ - `useGameGuide()`: How to Play. `openFirstTime(gameId, next)` shows a game's cards if this player
277
+ hasn't finished or skipped this version, then runs `next` once they close (at once otherwise);
278
+ `openFor(gameId)` shows them now; `openPack()` shows the pack's own `guide`; `autoShowPack()` shows
279
+ it once per session while unseen (Home's first launch). A game with no cards of its own opens
280
+ nothing.
281
+ - `useAtComputer()`: true on the web without a touch-first screen (`@tastic/core`'s
282
+ `useIsTouchPrimaryDevice`), where `sideBySideAtComputer` and `MatchChips` see a computer.
283
+ - `roundModeFor(seatTwo)`: `'cpu'` is `'vsCpu'`, `'person'` `'twoPlayer'` and `'nobody'` `'solo'`.
284
+ `humanSeatsFor(mode)`: the seats that press Ready, `[1, 2]` in 2 Player and `[1]` otherwise.
285
+ `seatTwoFor(saved, choices)`: seat 2's saved choice as one game reads it (see `GameDefinition`).
286
+ - `SettingsDialog` (`SettingsDialogProps`): `visible`, `onDismiss`, `onShowHowToPlay` (optional: shows
287
+ the How to Play row, as a loadout does; left out on Home and in a match) and `children` (a play
288
+ screen's own rows). The pack's `useSettingsRules` goes above the shell's rows, and `children` and
289
+ then the pack's `SettingsSections` under them.
290
+ - `safeBack()`: back, or Home (`/`) where there's nothing to go back to.
291
+
177
292
  ### On every pack (0.2.0)
178
293
 
179
294
  Six fixes CardTastic's move brought to every pack's screens: Home's press-away overlay sits in the
@@ -182,7 +297,7 @@ scroller, so a press on a row played the game), seat 1's menu closes on every ch
182
297
  Home's scrollers fade out at an edge with more past it (auto-paper's `FadingScrollView`), a press
183
298
  anywhere on the stats screen (its header and margins too) closes a picker's menu, the stats screen's
184
299
  column is capped at 640pt in the wide layout, and Profiles' roster is capped at 640pt in the wide
185
- layout (hud's `RotatedFrame`, which nothing turns any more). Every hud import goes through `@tastic/hud/chrome`,
300
+ layout (hud's `ScreenFrame`, `RotatedFrame` before hud 0.34). Every hud import goes through `@tastic/hud/chrome`,
186
301
  `/guide` or `/lobby`, so an app with no Skia can install the shell; a pack's own imports don't change.
187
302
  The shell's routes are handed to expo-router as plain `Href`s, so an app with typed routes type-checks
188
303
  the shell before its own routes match.
@@ -202,7 +317,7 @@ longer reads the accelerometer, draws a turn or offers Lock Orientation. A pack
202
317
  ### The chips over a match (0.6.0)
203
318
 
204
319
  `MatchChips` is every game's back and settings chips during a match, so they sit and show the same
205
- way in every game of every pack. A play screen renders it with `playing` (true while play is on: a
320
+ way in every game of every pack. A play screen renders it (`MatchChipsProps`) with `playing` (true while play is on: a
206
321
  live puck, a shot in flight, a round being ridden), `faceToFace` (two players at opposite ends of the
207
322
  screen right now) and `onBack`/`onSettings`, plus `centerLineY` when the line between the players isn't
208
323
  the window's middle.
@@ -239,13 +354,19 @@ const quit = useBackBlock(hasProgress, requestBack)
239
354
  in), so a game whose progress comes from a state hook that itself needs Quit Match?'s `paused` calls
240
355
  this after that hook, and mirrors the value into the getter it gives `useQuitConfirmation`.
241
356
  - Off when there's nothing to lose (0-0, Game Over), so a back there leaves at once, as the chip does.
357
+ - `quit` goes back (`safeBack`) unless a third argument, `leave`, says where: `useBackBlock(held,
358
+ onHeld, leave)`. For a Quit Match? that more than one thing opens, such as a back and a Home button
359
+ that goes to Home past the screen underneath, pass a `leave` that reads which one opened it
360
+ (`() => router.dismissTo('/')` for Home). It's read when `quit` runs, so it can change between
361
+ renders.
242
362
  - While it's on, the web also asks before the page unloads (expo-router's `usePreventRemove` adds a
243
363
  `beforeunload` handler with it). iOS's swipe back is off on every screen anyway.
244
364
 
245
365
  ## Peer dependencies
246
366
 
247
- None are bundled. The floors are the versions PuckTastic and DuelTastic ran the shell on when it
248
- became a package (the lower of the two where they differ).
367
+ None are bundled. The floors started as the versions PuckTastic and DuelTastic ran the shell on when
368
+ it became a package (the lower of the two where they differ), and some have been raised since for
369
+ what the shell started using (noted in the table).
249
370
 
250
371
  | Peer | Floor | Used for |
251
372
  | --- | --- | --- |
@@ -256,19 +377,24 @@ became a package (the lower of the two where they differ).
256
377
  | `expo-constants` | >=58.0.12 | the web tab title |
257
378
  | `expo-blur`, `@react-native-masked-view/masked-view` | >=58.0.4, >=0.3.2 | auto-paper's blur and its scroll fade, Home's fading scrollers |
258
379
  | `expo-haptics`, `expo-keep-awake` | >=58.0.7, >=58.0.3 | the toaster's haptics, Keep Awake |
380
+ | `expo-audio` | >=58.0.11 | the UI sounds, through `@rific/feedback-press/audio` |
259
381
  | `react-native-gesture-handler`, `react-native-reanimated`, `react-native-safe-area-context` | >=3.3.0, >=4.7.1, >=5.11.0 | the gesture root, auto-paper's dialogs and the loadout's fades, insets (with room for iPadOS's window controls) |
260
382
  | `react-native-paper` | >=5.15.3 | text, icons, the toaster and feedback-press |
261
383
  | `@reduxjs/toolkit`, `redux`, `react-redux`, `redux-persist`, `@react-native-async-storage/async-storage` | >=2.13.0, >=5.0.1, >=9.3.0, >=6.0.0, >=2.2.0 | the store and where it's saved |
262
384
  | `@rific/auto-paper` | >=0.13.4 | the theme |
263
385
  | `@rific/core` | >=0.5.0 | settings slices, Keep Awake, `safeBack` |
264
386
  | `@rific/feedback-press` | >=0.13.1 | haptic and sound settings, the UI sounds |
265
- | `@rific/toaster` | >=0.10.1 | toasts (DuelTastic runs 0.12, PuckTastic 0.10) |
266
- | `@tastic/core` | >=0.15.0 | the seat mode from the window's shape, the root background |
267
- | `@tastic/hud` | >=0.29.0 | Settings, the stats screen, the loadout's panels (its Skia-free `/lobby` entry, new in 0.26.0; 0.27.1's options for a pack drawn on its own backdrop; 0.28.0's Ready pill; 0.29.0's leading Settings sections), How to Play |
268
- | `@tastic/profile` | >=0.16.2 | profiles, the seat buttons, seat colors |
387
+ | `@rific/toaster` | >=0.10.1 | toasts |
388
+ | `@tastic/core` | >=0.16.0 | the seat mode from the window's shape, the root background, the test for a computer behind `useAtComputer` (0.16.0's `useIsTouchPrimaryDevice`) |
389
+ | `@tastic/hud` | >=0.34.0 | Settings, the stats screen, the loadout's panels (its Skia-free `/lobby` entry, new in 0.26.0; 0.27.1's options for a pack drawn on its own backdrop; 0.28.0's Ready pill; 0.29.0's leading Settings sections), How to Play, and `ScreenFrame` around the stats screen, Profiles and the toaster (0.34.0, where `RotatedFrame` became `ScreenFrame`) |
390
+ | `@tastic/profile` | >=0.18.0 | profiles and the shared roster, the seat buttons, seat colors, the dividers in player 1's opponent menu (0.18.0's `dividerBefore`) |
269
391
  | `@tastic/achievements` | >=0.6.0 | `createGameStats`, `forgetProfileAchievements` |
270
392
  | `@tastic/split-screen` | >=0.5.5 | the 2 Player loadout's two halves |
271
- | `@tastic/edge-guard` | >=0.1.5 | Edge Guard during play |
393
+ | `@tastic/edge-guard` | >=0.2.0 | Edge Guard during play (`useEdgeGestureGuard` on iOS, `edgeGuardScreenOptions` on Android) |
272
394
 
273
395
  The two UI sounds every button plays (`assets/sounds/select.wav` and `notification.wav`) ship with the
274
- package.
396
+ package. They play through `@rific/feedback-press/audio`'s `useAudioPool`, which imports `expo-audio`.
397
+
398
+ ---
399
+
400
+ Made by [Infinite Token](https://www.infinitetoken.com), the team behind [Lumber](https://lumber.infinitetoken.com): end-to-end encrypted logging.
package/dist/index.d.mts CHANGED
@@ -14,7 +14,6 @@ export { safeBack } from '@rific/core';
14
14
  import * as _tastic_profile from '@tastic/profile';
15
15
  import { profilesReducer, Profile, CreateProfileInput, SeatColorsState as SeatColorsState$1 } from '@tastic/profile';
16
16
  import * as _rific_feedback_press from '@rific/feedback-press';
17
- import { SoundSettings } from '@rific/feedback-press';
18
17
  import * as redux_persist from 'redux-persist';
19
18
  import { PersistedState, Persistor } from 'redux-persist';
20
19
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
@@ -105,9 +104,7 @@ type LastActiveGameState = {
105
104
  declare function createShellReducers({ seatColors, appearance, seatTheme }: Pick<PackDefinition, 'seatColors' | 'appearance' | 'seatTheme'>): {
106
105
  theme: _rific_core.SettingsReducer<_rific_auto_paper.ThemeState>;
107
106
  haptic: _rific_core.SettingsReducer<_rific_feedback_press.HapticSettings>;
108
- sound: (state: SoundSettings | undefined, action: {
109
- type: string;
110
- }) => SoundSettings;
107
+ sound: _rific_core.SettingsReducer<_rific_feedback_press.SoundSettings>;
111
108
  keepAwake: _rific_core.SettingsReducer<_rific_core.KeepAwakeSettings>;
112
109
  profiles: typeof profilesReducer;
113
110
  profileSelection: (state: _tastic_profile.ProfileSelectionState<Seat> | undefined, action: {
@@ -342,8 +339,6 @@ declare function createPackStore(pack: PackStoreSource, { keyPrefix, migrate, bl
342
339
  liveplay: LiveplaySliceState;
343
340
  } & redux_persist_es_persistReducer.PersistPartial, {
344
341
  type: string;
345
- } | {
346
- type: string;
347
342
  payload?: unknown;
348
343
  } | {
349
344
  type: string;
@@ -445,7 +440,7 @@ declare function useAppSettings(): {
445
440
 
446
441
  declare function useAtComputer(): boolean;
447
442
 
448
- declare function useBackBlock(held: boolean, onHeld: () => void): () => void;
443
+ declare function useBackBlock(held: boolean, onHeld: () => void, leave?: () => void): () => void;
449
444
 
450
445
  declare function useOpponent(): {
451
446
  seatTwo: SeatTwo;
package/dist/index.d.ts CHANGED
@@ -14,7 +14,6 @@ export { safeBack } from '@rific/core';
14
14
  import * as _tastic_profile from '@tastic/profile';
15
15
  import { profilesReducer, Profile, CreateProfileInput, SeatColorsState as SeatColorsState$1 } from '@tastic/profile';
16
16
  import * as _rific_feedback_press from '@rific/feedback-press';
17
- import { SoundSettings } from '@rific/feedback-press';
18
17
  import * as redux_persist from 'redux-persist';
19
18
  import { PersistedState, Persistor } from 'redux-persist';
20
19
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
@@ -105,9 +104,7 @@ type LastActiveGameState = {
105
104
  declare function createShellReducers({ seatColors, appearance, seatTheme }: Pick<PackDefinition, 'seatColors' | 'appearance' | 'seatTheme'>): {
106
105
  theme: _rific_core.SettingsReducer<_rific_auto_paper.ThemeState>;
107
106
  haptic: _rific_core.SettingsReducer<_rific_feedback_press.HapticSettings>;
108
- sound: (state: SoundSettings | undefined, action: {
109
- type: string;
110
- }) => SoundSettings;
107
+ sound: _rific_core.SettingsReducer<_rific_feedback_press.SoundSettings>;
111
108
  keepAwake: _rific_core.SettingsReducer<_rific_core.KeepAwakeSettings>;
112
109
  profiles: typeof profilesReducer;
113
110
  profileSelection: (state: _tastic_profile.ProfileSelectionState<Seat> | undefined, action: {
@@ -342,8 +339,6 @@ declare function createPackStore(pack: PackStoreSource, { keyPrefix, migrate, bl
342
339
  liveplay: LiveplaySliceState;
343
340
  } & redux_persist_es_persistReducer.PersistPartial, {
344
341
  type: string;
345
- } | {
346
- type: string;
347
342
  payload?: unknown;
348
343
  } | {
349
344
  type: string;
@@ -445,7 +440,7 @@ declare function useAppSettings(): {
445
440
 
446
441
  declare function useAtComputer(): boolean;
447
442
 
448
- declare function useBackBlock(held: boolean, onHeld: () => void): () => void;
443
+ declare function useBackBlock(held: boolean, onHeld: () => void, leave?: () => void): () => void;
449
444
 
450
445
  declare function useOpponent(): {
451
446
  seatTwo: SeatTwo;