@tastic/hud 0.31.0 → 0.31.1
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
|
@@ -280,6 +280,13 @@ A game with music passes `showMusic`, which adds a Music toggle beside Sound and
|
|
|
280
280
|
follow; it's apart from Sound, so a player can keep the effects and turn the music off. Hidden unless
|
|
281
281
|
asked for, since most games have no music.
|
|
282
282
|
|
|
283
|
+
On iOS a line under the Sound, Music and Haptics row says that silent mode mutes Sound and Music
|
|
284
|
+
("Silent mode mutes sound and music", or just the one that shows).
|
|
285
|
+
`@rific/feedback-press` plays both in the ambient audio session, the convention for game sounds, so
|
|
286
|
+
silent mode mutes them; a player who doesn't know that takes the sound for broken, and iOS gives apps
|
|
287
|
+
no reliable way to read the switch, so the rows can't grey themselves out. Always shown on iOS while
|
|
288
|
+
either row is, never on Android (its silent mode leaves media playing) or the web.
|
|
289
|
+
|
|
283
290
|
## Overlay cards (`OverlayCard`, `OverlayBackdrop`, `useOverlayCardColors`)
|
|
284
291
|
|
|
285
292
|
`ConfirmDialog` and `HowToPlayDialog` draw their card and the dim behind it with these, and a game's
|
package/dist/chrome/index.js
CHANGED
|
@@ -568,6 +568,7 @@ function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverride, ve
|
|
|
568
568
|
const showAppearance = !hideAppearance;
|
|
569
569
|
const showBlur = showAppearance && import_react_native12.Platform.OS !== "android" && expoBlur !== void 0 && expoBlur !== null;
|
|
570
570
|
const showUpdateCheck = import_react_native12.Platform.OS !== "web" && !hideUpdateCheck;
|
|
571
|
+
const silentNote = import_react_native12.Platform.OS !== "ios" ? null : showSound && showMusic ? "Silent mode mutes sound and music" : showSound ? "Silent mode mutes sound" : showMusic ? "Silent mode mutes music" : null;
|
|
571
572
|
const hasLeading = leading !== void 0 && leading !== null && leading !== false;
|
|
572
573
|
if (!opened) return null;
|
|
573
574
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native_paper8.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(RotatedFrame, { rotation, rotatedSafeArea: true, portalHost: true, passThrough: true, children: [
|
|
@@ -639,6 +640,7 @@ function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverride, ve
|
|
|
639
640
|
}
|
|
640
641
|
)
|
|
641
642
|
] }),
|
|
643
|
+
silentNote && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native_paper8.Text, { variant: "bodySmall", style: [styles9.silentNote, { color: colors.onSurfaceVariant }], children: silentNote }),
|
|
642
644
|
onShowHowToPlay && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
643
645
|
import_feedback_press3.TouchableRipple,
|
|
644
646
|
{
|
|
@@ -734,6 +736,11 @@ var styles9 = import_react_native12.StyleSheet.create({
|
|
|
734
736
|
sectionLabel: {
|
|
735
737
|
letterSpacing: 2
|
|
736
738
|
},
|
|
739
|
+
// Lined up with the toggles' labels: past the 36pt icon badge (SettingIcon) and the 12pt gap
|
|
740
|
+
silentNote: {
|
|
741
|
+
marginBottom: 4,
|
|
742
|
+
paddingLeft: 48
|
|
743
|
+
},
|
|
737
744
|
// Used to carry marginHorizontal: -12 + paddingHorizontal: 12 (netting to the same inset as
|
|
738
745
|
// APPEARANCE/SOUND & HAPTICS below, while giving the ripple/hover highlight room to breathe
|
|
739
746
|
// into the dialog's own gutter beyond that). Removed: this dialog scrolls (Dialog.ScrollArea +
|
package/dist/chrome/index.mjs
CHANGED
|
@@ -368,6 +368,7 @@ function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverride, ve
|
|
|
368
368
|
const showAppearance = !hideAppearance;
|
|
369
369
|
const showBlur = showAppearance && Platform.OS !== "android" && expoBlur !== void 0 && expoBlur !== null;
|
|
370
370
|
const showUpdateCheck = Platform.OS !== "web" && !hideUpdateCheck;
|
|
371
|
+
const silentNote = Platform.OS !== "ios" ? null : showSound && showMusic ? "Silent mode mutes sound and music" : showSound ? "Silent mode mutes sound" : showMusic ? "Silent mode mutes music" : null;
|
|
371
372
|
const hasLeading = leading !== void 0 && leading !== null && leading !== false;
|
|
372
373
|
if (!opened) return null;
|
|
373
374
|
return /* @__PURE__ */ jsx8(Portal3, { children: /* @__PURE__ */ jsxs7(RotatedFrame, { rotation, rotatedSafeArea: true, portalHost: true, passThrough: true, children: [
|
|
@@ -439,6 +440,7 @@ function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverride, ve
|
|
|
439
440
|
}
|
|
440
441
|
)
|
|
441
442
|
] }),
|
|
443
|
+
silentNote && /* @__PURE__ */ jsx8(Text6, { variant: "bodySmall", style: [styles7.silentNote, { color: colors.onSurfaceVariant }], children: silentNote }),
|
|
442
444
|
onShowHowToPlay && /* @__PURE__ */ jsx8(
|
|
443
445
|
TouchableRipple,
|
|
444
446
|
{
|
|
@@ -534,6 +536,11 @@ var styles7 = StyleSheet7.create({
|
|
|
534
536
|
sectionLabel: {
|
|
535
537
|
letterSpacing: 2
|
|
536
538
|
},
|
|
539
|
+
// Lined up with the toggles' labels: past the 36pt icon badge (SettingIcon) and the 12pt gap
|
|
540
|
+
silentNote: {
|
|
541
|
+
marginBottom: 4,
|
|
542
|
+
paddingLeft: 48
|
|
543
|
+
},
|
|
537
544
|
// Used to carry marginHorizontal: -12 + paddingHorizontal: 12 (netting to the same inset as
|
|
538
545
|
// APPEARANCE/SOUND & HAPTICS below, while giving the ripple/hover highlight room to breathe
|
|
539
546
|
// into the dialog's own gutter beyond that). Removed: this dialog scrolls (Dialog.ScrollArea +
|
package/dist/index.js
CHANGED
|
@@ -767,6 +767,7 @@ function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverride, ve
|
|
|
767
767
|
const showAppearance = !hideAppearance;
|
|
768
768
|
const showBlur = showAppearance && import_react_native13.Platform.OS !== "android" && expoBlur !== void 0 && expoBlur !== null;
|
|
769
769
|
const showUpdateCheck = import_react_native13.Platform.OS !== "web" && !hideUpdateCheck;
|
|
770
|
+
const silentNote = import_react_native13.Platform.OS !== "ios" ? null : showSound && showMusic ? "Silent mode mutes sound and music" : showSound ? "Silent mode mutes sound" : showMusic ? "Silent mode mutes music" : null;
|
|
770
771
|
const hasLeading = leading !== void 0 && leading !== null && leading !== false;
|
|
771
772
|
if (!opened) return null;
|
|
772
773
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native_paper9.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(RotatedFrame, { rotation, rotatedSafeArea: true, portalHost: true, passThrough: true, children: [
|
|
@@ -838,6 +839,7 @@ function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverride, ve
|
|
|
838
839
|
}
|
|
839
840
|
)
|
|
840
841
|
] }),
|
|
842
|
+
silentNote && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native_paper9.Text, { variant: "bodySmall", style: [styles10.silentNote, { color: colors.onSurfaceVariant }], children: silentNote }),
|
|
841
843
|
onShowHowToPlay && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
842
844
|
import_feedback_press3.TouchableRipple,
|
|
843
845
|
{
|
|
@@ -933,6 +935,11 @@ var styles10 = import_react_native13.StyleSheet.create({
|
|
|
933
935
|
sectionLabel: {
|
|
934
936
|
letterSpacing: 2
|
|
935
937
|
},
|
|
938
|
+
// Lined up with the toggles' labels: past the 36pt icon badge (SettingIcon) and the 12pt gap
|
|
939
|
+
silentNote: {
|
|
940
|
+
marginBottom: 4,
|
|
941
|
+
paddingLeft: 48
|
|
942
|
+
},
|
|
936
943
|
// Used to carry marginHorizontal: -12 + paddingHorizontal: 12 (netting to the same inset as
|
|
937
944
|
// APPEARANCE/SOUND & HAPTICS below, while giving the ripple/hover highlight room to breathe
|
|
938
945
|
// into the dialog's own gutter beyond that). Removed: this dialog scrolls (Dialog.ScrollArea +
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tastic/hud",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.1",
|
|
4
4
|
"description": "Visual component kit for local-multiplayer React Native games: inline (non-modal) popovers, dropdowns, color pickers, gauges, ready buttons, and dialogs, built to stay scoped to one player's own zone on a shared screen",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -181,6 +181,8 @@ export function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverr
|
|
|
181
181
|
// See the Blur row's own comment below for why it hides on Android and without expo-blur.
|
|
182
182
|
const showBlur = showAppearance && Platform.OS !== 'android' && expoBlur !== undefined && expoBlur !== null
|
|
183
183
|
const showUpdateCheck = Platform.OS !== 'web' && !hideUpdateCheck
|
|
184
|
+
// See the note's own comment below
|
|
185
|
+
const silentNote = Platform.OS !== 'ios' ? null : showSound && showMusic ? 'Silent mode mutes sound and music' : showSound ? 'Silent mode mutes sound' : showMusic ? 'Silent mode mutes music' : null
|
|
184
186
|
const hasLeading = leading !== undefined && leading !== null && leading !== false
|
|
185
187
|
|
|
186
188
|
// Laid out in its own turned frame rather than rotated in place. Paper's Portal mounts at the app
|
|
@@ -353,6 +355,17 @@ export function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverr
|
|
|
353
355
|
</View>
|
|
354
356
|
)}
|
|
355
357
|
|
|
358
|
+
{/* iOS's silent mode mutes Sound and Music: feedback-press plays them in the ambient audio
|
|
359
|
+
session, the convention for game sounds. A player who doesn't know that thinks the sound
|
|
360
|
+
is broken (Jay, HexFleet, 2026-11-15), and iOS gives apps no reliable way to read the
|
|
361
|
+
switch, so the rows can't show it themselves; this says so under them, always, on iOS.
|
|
362
|
+
Android's silent mode leaves media playing, and the web has none. */}
|
|
363
|
+
{silentNote && (
|
|
364
|
+
<Text variant='bodySmall' style={[styles.silentNote, { color: colors.onSurfaceVariant }]}>
|
|
365
|
+
{silentNote}
|
|
366
|
+
</Text>
|
|
367
|
+
)}
|
|
368
|
+
|
|
356
369
|
{/* Not a toggle, but it reads like one of the rows above and belongs with them rather than
|
|
357
370
|
down in `children` (which sits below Appearance) - this is the "replay the intro"
|
|
358
371
|
entry point every game's own how-to-play flow shares. Dismisses this dialog first so
|
|
@@ -498,6 +511,11 @@ const styles = StyleSheet.create({
|
|
|
498
511
|
sectionLabel: {
|
|
499
512
|
letterSpacing: 2
|
|
500
513
|
},
|
|
514
|
+
// Lined up with the toggles' labels: past the 36pt icon badge (SettingIcon) and the 12pt gap
|
|
515
|
+
silentNote: {
|
|
516
|
+
marginBottom: 4,
|
|
517
|
+
paddingLeft: 48
|
|
518
|
+
},
|
|
501
519
|
// Used to carry marginHorizontal: -12 + paddingHorizontal: 12 (netting to the same inset as
|
|
502
520
|
// APPEARANCE/SOUND & HAPTICS below, while giving the ripple/hover highlight room to breathe
|
|
503
521
|
// into the dialog's own gutter beyond that). Removed: this dialog scrolls (Dialog.ScrollArea +
|