@tastic/shell 0.23.0 → 0.24.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
@@ -350,7 +350,8 @@ scroller beside seat 1's button in the upright layout (as the frame's first chil
350
350
  scroller, so a press on a row played the game), seat 1's menu closes on every change of window, both of
351
351
  Home's scrollers fade out at an edge with more past it (auto-paper's `FadingScrollView`), a press
352
352
  anywhere on the stats screen (its header and margins too) closes a picker's menu, the stats screen's
353
- column is capped at 640pt in the wide layout, and Profiles' roster is capped at 640pt in the wide
353
+ column is capped at 640pt in the wide layout, with Back in the window's corner and no header band, the tabs
354
+ beside Back (hud 0.41's `BaseStatsScreen`), and Profiles' roster is capped at 640pt in the wide
354
355
  layout (hud's `ScreenFrame`, `RotatedFrame` before hud 0.34). Every hud import goes through `@tastic/hud/chrome`,
355
356
  `/guide` or `/lobby`, so an app with no Skia can install the shell; a pack's own imports don't change.
356
357
  The shell's routes are handed to expo-router as plain `Href`s, so an app with typed routes type-checks
@@ -462,7 +463,7 @@ what the shell started using (noted in the table).
462
463
  | `@rific/feedback-press` | >=0.15.0 | haptic and sound settings, the UI sounds |
463
464
  | `@rific/toaster` | >=0.10.1 | toasts |
464
465
  | `@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`) |
465
- | `@tastic/hud` | >=0.37.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, Edit Profile and the toaster (0.34.0, where `RotatedFrame` became `ScreenFrame`), a pack's lettering (0.35.0's `LetteringProvider`), Settings' Profile row (0.37.0's `profilesRow`) |
466
+ | `@tastic/hud` | >=0.41.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, Edit Profile and the toaster (0.34.0, where `RotatedFrame` became `ScreenFrame`), a pack's lettering (0.35.0's `LetteringProvider`), Settings' Profile row (0.37.0's `profilesRow`), the stats screen with no header band in a landscape window (0.41.0's `tabs` and `maxContentWidth`) |
466
467
  | `@tastic/profile` | >=0.26.0 | profiles and the shared roster, the seat buttons, seat colors, the dividers in player 1's opponent menu (0.18.0's `dividerBefore`), and each profile's Edit Profile screen (0.22.0's `EditProfileScreen`, behind `EditProfileRoute`, with a pack's sections from 0.25.0) |
467
468
  | `@tastic/achievements` | >=0.6.0 | `createGameStats`, `forgetProfileAchievements` |
468
469
  | `@tastic/split-screen` | >=0.5.5 | the 2 Player loadout's two halves |
package/dist/index.js CHANGED
@@ -119,7 +119,7 @@ var RNPaper2 = __toESM(require("react-native-paper"));
119
119
  var import_react_native_safe_area_context2 = require("react-native-safe-area-context");
120
120
 
121
121
  // src/components/Fonts.tsx
122
- var import_vector_icons = require("@expo/vector-icons");
122
+ var import_MaterialCommunityIcons = __toESM(require("@expo/vector-icons/MaterialCommunityIcons"));
123
123
  var import_expo_constants = __toESM(require("expo-constants"));
124
124
  var import_expo_font = require("expo-font");
125
125
  var import_head = __toESM(require("expo-router/head"));
@@ -133,7 +133,7 @@ var { markReady: markSplashReady, useReady: useSplashReady, pendingGates: pendin
133
133
  var import_jsx_runtime2 = require("react/jsx-runtime");
134
134
  function Fonts({ children }) {
135
135
  const pack = usePack();
136
- const [loaded, error] = (0, import_expo_font.useFonts)({ ...pack.fonts, ...import_vector_icons.MaterialCommunityIcons.font });
136
+ const [loaded, error] = (0, import_expo_font.useFonts)({ ...pack.fonts, ...import_MaterialCommunityIcons.default.font });
137
137
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
138
138
  import_react_native.Platform.OS === "web" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_head.default, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("title", { children: import_expo_constants.default.expoConfig?.name }) }),
139
139
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SplashGate, { gate: "fonts", ready: loaded || !!error, children })
@@ -1758,7 +1758,7 @@ var MANAGE_OPTION = { value: MANAGE, label: "Manage", icon: "account-cog-outline
1758
1758
  var STATS_MAX_WIDTH = 640;
1759
1759
  function StatsScreen() {
1760
1760
  const pickerHost = (0, import_chrome8.usePopoverHost)();
1761
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StatsPressAway, { host: pickerHost, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_chrome8.ScreenFrame, { portalHost: true, maxContentWidth: STATS_MAX_WIDTH, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StatsContent, { pickerHost }) }) });
1761
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StatsPressAway, { host: pickerHost, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_chrome8.ScreenFrame, { portalHost: true, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StatsContent, { pickerHost }) }) });
1762
1762
  }
1763
1763
  function StatsPressAway({ host, children }) {
1764
1764
  return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native10.View, { testID: "stats-press-away", style: styles5.screen, onStartShouldSetResponder: () => host.openId !== null, onResponderRelease: host.close, children });
@@ -1810,9 +1810,8 @@ function StatsContent({ pickerHost }) {
1810
1810
  const surface = pack.Backdrop ? { backgroundColor: colors.surface } : void 0;
1811
1811
  const triggerStyle = pack.Backdrop ? [styles5.pill, surface] : void 0;
1812
1812
  const PackTabContent = packTab?.Content;
1813
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_chrome8.BaseStatsScreen, { title, titleStyle: pack.titleStyle, onBack: import_core6.safeBack, insets, onReset: reset.onReset, resetLabel: reset.label, resetConfirmTitle: reset.title, resetConfirmBody: reset.body, fg: pack.foreground, bg: pack.Backdrop ? "transparent" : void 0, children: [
1813
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_chrome8.BaseStatsScreen, { title, titleStyle: pack.titleStyle, onBack: import_core6.safeBack, insets, maxContentWidth: STATS_MAX_WIDTH, tabs: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native_paper3.SegmentedButtons, { value: tab, onValueChange: setTab, buttons: tabButtons, theme: SEGMENT_THEME, style: [styles5.tabs, surface] }), onReset: reset.onReset, resetLabel: reset.label, resetConfirmTitle: reset.title, resetConfirmBody: reset.body, fg: pack.foreground, bg: pack.Backdrop ? "transparent" : void 0, children: [
1814
1814
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_chrome8.PressAwayOverlay, { active: pickerHost.openId !== null, onPress: pickerHost.close, style: styles5.pressAway }),
1815
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native_paper3.SegmentedButtons, { value: tab, onValueChange: setTab, buttons: tabButtons, theme: SEGMENT_THEME, style: [styles5.tabs, surface] }),
1816
1815
  /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native10.View, { style: [styles5.filters, pickerHost.openId !== null && styles5.filtersOpen], onStartShouldSetResponder: () => pickerHost.openId !== null, children: [
1817
1816
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_profile10.OptionPicker, { id: PLAYER_PICKER_ID, host: pickerHost, options: playerOptions, value: profileId ?? EVERYONE, onChange: (value) => value === MANAGE ? import_expo_router11.router.push(PROFILES_HREF) : setSelectedProfileId(value === EVERYONE ? null : value), color: colors.primary, dark, icon: profileId ? "account" : "account-group", caption: "Player", alignOverride: playerAlign, triggerStyle }),
1818
1817
  showGamePicker && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_profile10.OptionPicker, { id: GAME_PICKER_ID, host: pickerHost, options: gameOptions, value: gameId, onChange: setGameId, color: colors.primary, dark, icon: "view-grid-outline", caption: "Game", alignOverride: gameAlign, triggerStyle })
package/dist/index.mjs CHANGED
@@ -38,7 +38,7 @@ import * as RNPaper2 from "react-native-paper";
38
38
  import { SafeAreaProvider } from "react-native-safe-area-context";
39
39
 
40
40
  // src/components/Fonts.tsx
41
- import { MaterialCommunityIcons } from "@expo/vector-icons";
41
+ import MaterialCommunityIcons from "@expo/vector-icons/MaterialCommunityIcons";
42
42
  import Constants from "expo-constants";
43
43
  import { useFonts } from "expo-font";
44
44
  import Head from "expo-router/head";
@@ -1677,7 +1677,7 @@ var MANAGE_OPTION = { value: MANAGE, label: "Manage", icon: "account-cog-outline
1677
1677
  var STATS_MAX_WIDTH = 640;
1678
1678
  function StatsScreen() {
1679
1679
  const pickerHost = usePopoverHost3();
1680
- return /* @__PURE__ */ jsx21(StatsPressAway, { host: pickerHost, children: /* @__PURE__ */ jsx21(ScreenFrame4, { portalHost: true, maxContentWidth: STATS_MAX_WIDTH, children: /* @__PURE__ */ jsx21(StatsContent, { pickerHost }) }) });
1680
+ return /* @__PURE__ */ jsx21(StatsPressAway, { host: pickerHost, children: /* @__PURE__ */ jsx21(ScreenFrame4, { portalHost: true, children: /* @__PURE__ */ jsx21(StatsContent, { pickerHost }) }) });
1681
1681
  }
1682
1682
  function StatsPressAway({ host, children }) {
1683
1683
  return /* @__PURE__ */ jsx21(View5, { testID: "stats-press-away", style: styles5.screen, onStartShouldSetResponder: () => host.openId !== null, onResponderRelease: host.close, children });
@@ -1729,9 +1729,8 @@ function StatsContent({ pickerHost }) {
1729
1729
  const surface = pack.Backdrop ? { backgroundColor: colors.surface } : void 0;
1730
1730
  const triggerStyle = pack.Backdrop ? [styles5.pill, surface] : void 0;
1731
1731
  const PackTabContent = packTab?.Content;
1732
- return /* @__PURE__ */ jsxs8(BaseStatsScreen, { title, titleStyle: pack.titleStyle, onBack: safeBack, insets, onReset: reset.onReset, resetLabel: reset.label, resetConfirmTitle: reset.title, resetConfirmBody: reset.body, fg: pack.foreground, bg: pack.Backdrop ? "transparent" : void 0, children: [
1732
+ return /* @__PURE__ */ jsxs8(BaseStatsScreen, { title, titleStyle: pack.titleStyle, onBack: safeBack, insets, maxContentWidth: STATS_MAX_WIDTH, tabs: /* @__PURE__ */ jsx21(SegmentedButtons2, { value: tab, onValueChange: setTab, buttons: tabButtons, theme: SEGMENT_THEME, style: [styles5.tabs, surface] }), onReset: reset.onReset, resetLabel: reset.label, resetConfirmTitle: reset.title, resetConfirmBody: reset.body, fg: pack.foreground, bg: pack.Backdrop ? "transparent" : void 0, children: [
1733
1733
  /* @__PURE__ */ jsx21(PressAwayOverlay3, { active: pickerHost.openId !== null, onPress: pickerHost.close, style: styles5.pressAway }),
1734
- /* @__PURE__ */ jsx21(SegmentedButtons2, { value: tab, onValueChange: setTab, buttons: tabButtons, theme: SEGMENT_THEME, style: [styles5.tabs, surface] }),
1735
1734
  /* @__PURE__ */ jsxs8(View5, { style: [styles5.filters, pickerHost.openId !== null && styles5.filtersOpen], onStartShouldSetResponder: () => pickerHost.openId !== null, children: [
1736
1735
  /* @__PURE__ */ jsx21(OptionPicker2, { id: PLAYER_PICKER_ID, host: pickerHost, options: playerOptions, value: profileId ?? EVERYONE, onChange: (value) => value === MANAGE ? router6.push(PROFILES_HREF) : setSelectedProfileId(value === EVERYONE ? null : value), color: colors.primary, dark, icon: profileId ? "account" : "account-group", caption: "Player", alignOverride: playerAlign, triggerStyle }),
1737
1736
  showGamePicker && /* @__PURE__ */ jsx21(OptionPicker2, { id: GAME_PICKER_ID, host: pickerHost, options: gameOptions, value: gameId, onChange: setGameId, color: colors.primary, dark, icon: "view-grid-outline", caption: "Game", alignOverride: gameAlign, triggerStyle })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tastic/shell",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
4
4
  "description": "The app around a pack of React Native games, two-seat or for one player: Home, the loadout, the stats screen, Profiles and Settings, the pack's Redux store and its root providers, driven by one PackDefinition",
5
5
  "keywords": [
6
6
  "react-native",
@@ -86,7 +86,7 @@
86
86
  "@tastic/achievements": "^0.6.1",
87
87
  "@tastic/core": "^0.19.0",
88
88
  "@tastic/edge-guard": "^0.2.1",
89
- "@tastic/hud": "^0.40.0",
89
+ "@tastic/hud": "^0.41.0",
90
90
  "@tastic/profile": "^0.29.0",
91
91
  "@tastic/split-screen": "^0.6.0",
92
92
  "@testing-library/react-native": "^14.1.0",
@@ -138,7 +138,7 @@
138
138
  "@tastic/achievements": ">=0.6.0",
139
139
  "@tastic/core": ">=0.16.0",
140
140
  "@tastic/edge-guard": ">=0.2.0",
141
- "@tastic/hud": ">=0.40.0",
141
+ "@tastic/hud": ">=0.41.0",
142
142
  "@tastic/profile": ">=0.29.0",
143
143
  "@tastic/split-screen": ">=0.5.5",
144
144
  "expo-audio": ">=58.0.11",
@@ -1,4 +1,4 @@
1
- import { MaterialCommunityIcons } from '@expo/vector-icons'
1
+ import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons'
2
2
  import Constants from 'expo-constants'
3
3
  import { useFonts } from 'expo-font'
4
4
  import Head from 'expo-router/head'
@@ -60,13 +60,14 @@ const STATS_MAX_WIDTH = 640
60
60
  // can't be told apart. A pack for one player at a time (PackDefinition.guestStats) keeps a guest's
61
61
  // stats under GUEST_PLAYER_ID, offers Guest in the picker and opens on whoever is in seat 1.
62
62
  //
63
- // In hud's ScreenFrame: it hosts the reset confirm's portal inside the frame, and caps the column in the
64
- // wide layout.
63
+ // In hud's ScreenFrame, which hosts the reset confirm's portal inside the frame. The page caps its own column in the wide layout
64
+ // (BaseStatsScreen's maxContentWidth), leaving Back in the window's corner, where every screen's is, and no header above it: the
65
+ // tabs are beside Back (Jay, 2026-11-30).
65
66
  export function StatsScreen() {
66
67
  const pickerHost = usePopoverHost()
67
68
  return (
68
69
  <StatsPressAway host={pickerHost}>
69
- <ScreenFrame portalHost maxContentWidth={STATS_MAX_WIDTH}>
70
+ <ScreenFrame portalHost>
70
71
  <StatsContent pickerHost={pickerHost} />
71
72
  </ScreenFrame>
72
73
  </StatsPressAway>
@@ -74,8 +75,8 @@ export function StatsScreen() {
74
75
  }
75
76
 
76
77
  // Closes the pickers' open menu on a press anywhere on the screen that nothing else takes: the header
77
- // (its title and blank space) and, in the wide layout, the frame either side of the capped column. The
78
- // page's own press-away overlay only covers the scrolling content, which neither is part of. A press
78
+ // (its title and blank space) and whatever the page leaves of the screen below a short one. The page's own
79
+ // press-away overlay only covers the scrolling content, which neither is part of. A press
79
80
  // only reaches this when no control under the finger claims it, so the back button, the menu's rows and
80
81
  // everything else still work.
81
82
  function StatsPressAway({ host, children }: { host: PopoverHost; children: ReactNode }) {
@@ -161,13 +162,12 @@ function StatsContent({ pickerHost }: { pickerHost: PopoverHost }) {
161
162
  const PackTabContent = packTab?.Content
162
163
 
163
164
  return (
164
- <BaseStatsScreen title={title} titleStyle={pack.titleStyle} onBack={safeBack} insets={insets} onReset={reset.onReset} resetLabel={reset.label} resetConfirmTitle={reset.title} resetConfirmBody={reset.body} fg={pack.foreground} bg={pack.Backdrop ? 'transparent' : undefined}>
165
+ <BaseStatsScreen title={title} titleStyle={pack.titleStyle} onBack={safeBack} insets={insets} maxContentWidth={STATS_MAX_WIDTH} tabs={<SegmentedButtons value={tab} onValueChange={setTab} buttons={tabButtons} theme={SEGMENT_THEME} style={[styles.tabs, surface]} />} onReset={reset.onReset} resetLabel={reset.label} resetConfirmTitle={reset.title} resetConfirmBody={reset.body} fg={pack.foreground} bg={pack.Backdrop ? 'transparent' : undefined}>
165
166
  {/* Inside the page, not before it: BaseStatsScreen paints an opaque full-screen container that
166
167
  would hide a tap catcher placed underneath it. Over the stat sections and under the open
167
168
  filters (pressAway's zIndex sits below filtersOpen's), so a tap anywhere on the page but a
168
- menu closes it. Off the page (the header, the margins) StatsPressAway closes it. */}
169
+ menu closes it. Off the page (the header, below a short page) StatsPressAway closes it. */}
169
170
  <PressAwayOverlay active={pickerHost.openId !== null} onPress={pickerHost.close} style={styles.pressAway} />
170
- <SegmentedButtons value={tab} onValueChange={setTab} buttons={tabButtons} theme={SEGMENT_THEME} style={[styles.tabs, surface]} />
171
171
 
172
172
  {/* Takes a press on its own blank parts (the gap, an open menu's padding) while a menu is open, so
173
173
  it never reaches StatsPressAway. */}