@tastic/hud 0.21.0 → 0.23.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 +36 -15
- package/dist/chrome/index.d.mts +99 -18
- package/dist/chrome/index.d.ts +99 -18
- package/dist/chrome/index.js +363 -63
- package/dist/chrome/index.mjs +19 -3
- package/dist/{chunk-UOA35OWJ.mjs → chunk-BXG44LIA.mjs} +333 -45
- package/dist/index.d.mts +12 -81
- package/dist/index.d.ts +12 -81
- package/dist/index.js +88 -72
- package/dist/index.mjs +105 -365
- package/package.json +3 -2
- package/src/AchievementCatalogSection.tsx +7 -6
- package/src/AchievementRow.tsx +13 -13
- package/src/ActivityStatSection.tsx +10 -5
- package/src/BaseSettingsDialog.tsx +13 -13
- package/src/StatRow.tsx +10 -11
- package/src/StatSection.tsx +14 -14
- package/src/chrome/index.ts +13 -4
- package/src/index.ts +1 -0
- package/src/wellSurface.ts +30 -0
package/dist/index.js
CHANGED
|
@@ -82,7 +82,7 @@ function TriggerGauge({ segments, litIndices, size, accentColor, mutedColor, das
|
|
|
82
82
|
if (mountProgress.value < 1) {
|
|
83
83
|
const startFrac = i * MOUNT_STAGGER_MS / totalDurationMs;
|
|
84
84
|
const endFrac = startFrac + MOUNT_DURATION_MS / totalDurationMs;
|
|
85
|
-
local = (0,
|
|
85
|
+
local = (0, import_core8.clamp)((mountProgress.value - startFrac) / (endFrac - startFrac), 0, 1);
|
|
86
86
|
}
|
|
87
87
|
const sweep = dashAngleDeg * local;
|
|
88
88
|
if (sweep <= 0) continue;
|
|
@@ -106,7 +106,7 @@ function TriggerGauge({ segments, litIndices, size, accentColor, mutedColor, das
|
|
|
106
106
|
if (!isLitNow) continue;
|
|
107
107
|
const startFrac = i * MOUNT_STAGGER_MS / totalDurationMs;
|
|
108
108
|
const endFrac = startFrac + MOUNT_DURATION_MS / totalDurationMs;
|
|
109
|
-
local = (0,
|
|
109
|
+
local = (0, import_core8.clamp)((mountProgress.value - startFrac) / (endFrac - startFrac), 0, 1);
|
|
110
110
|
} else if (isLitNow === wasLit) {
|
|
111
111
|
local = 1;
|
|
112
112
|
} else if (isLitNow) {
|
|
@@ -135,12 +135,12 @@ function TriggerGauge({ segments, litIndices, size, accentColor, mutedColor, das
|
|
|
135
135
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native_skia.Path, { path: litPath, style: "stroke", strokeWidth: LIT_THICKNESS, strokeCap: "round", color: accentColor, opacity: 1 })
|
|
136
136
|
] }) });
|
|
137
137
|
}
|
|
138
|
-
var import_react_native_skia,
|
|
138
|
+
var import_react_native_skia, import_core8, import_react9, import_react_native17, import_react_native_reanimated, import_jsx_runtime16, UNLIT_THICKNESS, LIT_THICKNESS, DASH_GAP_PX, ARC_GAP, DEFAULT_START_DEG, MIN_DASH_ANGLE_DEG, MOUNT_DURATION_MS, MOUNT_STAGGER_MS, SELECTION_TRANSITION_DURATION_MS, styles14;
|
|
139
139
|
var init_TriggerGauge = __esm({
|
|
140
140
|
"src/TriggerGauge.tsx"() {
|
|
141
141
|
"use strict";
|
|
142
142
|
import_react_native_skia = require("@shopify/react-native-skia");
|
|
143
|
-
|
|
143
|
+
import_core8 = require("@tastic/core");
|
|
144
144
|
import_react9 = require("react");
|
|
145
145
|
import_react_native17 = require("react-native");
|
|
146
146
|
import_react_native_reanimated = require("react-native-reanimated");
|
|
@@ -200,6 +200,7 @@ __export(index_exports, {
|
|
|
200
200
|
StatSection: () => StatSection,
|
|
201
201
|
TriggerGaugeHost: () => TriggerGaugeHost,
|
|
202
202
|
UpdateDialog: () => UpdateDialog,
|
|
203
|
+
WELL_SHADOW: () => WELL_SHADOW,
|
|
203
204
|
getColorPopoverId: () => getColorPopoverId,
|
|
204
205
|
getCpuDifficultyPopoverId: () => getCpuDifficultyPopoverId,
|
|
205
206
|
getInlineColorPickerContentSize: () => getInlineColorPickerContentSize,
|
|
@@ -215,6 +216,7 @@ __export(index_exports, {
|
|
|
215
216
|
useOverlayCardColors: () => useOverlayCardColors,
|
|
216
217
|
usePopoverHost: () => usePopoverHost,
|
|
217
218
|
useQuitConfirmation: () => useQuitConfirmation,
|
|
219
|
+
useWellColors: () => useWellColors,
|
|
218
220
|
useZoneClampedAlign: () => useZoneClampedAlign
|
|
219
221
|
});
|
|
220
222
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -226,16 +228,25 @@ var import_react_native3 = require("react-native");
|
|
|
226
228
|
var import_react_native_paper2 = require("react-native-paper");
|
|
227
229
|
|
|
228
230
|
// src/AchievementRow.tsx
|
|
229
|
-
var import_auto_paper = require("@rific/auto-paper");
|
|
230
231
|
var import_react_native = require("react-native");
|
|
231
232
|
var import_react_native_paper = require("react-native-paper");
|
|
233
|
+
|
|
234
|
+
// src/wellSurface.ts
|
|
235
|
+
var import_auto_paper = require("@rific/auto-paper");
|
|
236
|
+
var WELL_SHADOW = "0px 1px 2px rgba(0, 0, 0, 0.3), 0px 1px 3px 1px rgba(0, 0, 0, 0.15)";
|
|
237
|
+
function useWellColors() {
|
|
238
|
+
const { colors } = (0, import_auto_paper.useAutoPaperTheme)();
|
|
239
|
+
return { bg: colors.surface, fg: colors.onSurface, fgMuted: colors.onSurfaceVariant };
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// src/AchievementRow.tsx
|
|
232
243
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
233
244
|
var LOCKED_BADGE_COLOR = "rgba(128,128,128,0.3)";
|
|
234
245
|
function AchievementRow({ icon, title, description, badgeColor, unlockedLabel, checkColor, progress, deviceMarker, fg: fgOverride, fgMuted: fgMutedOverride, sectionBg: sectionBgOverride }) {
|
|
235
|
-
const
|
|
236
|
-
const fg = fgOverride ??
|
|
237
|
-
const fgMuted = fgMutedOverride ??
|
|
238
|
-
const sectionBg = sectionBgOverride ??
|
|
246
|
+
const well = useWellColors();
|
|
247
|
+
const fg = fgOverride ?? well.fg;
|
|
248
|
+
const fgMuted = fgMutedOverride ?? well.fgMuted;
|
|
249
|
+
const sectionBg = sectionBgOverride ?? well.bg;
|
|
239
250
|
const unlocked = unlockedLabel !== void 0;
|
|
240
251
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native.View, { style: [styles.row, { backgroundColor: sectionBg }], children: [
|
|
241
252
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.View, { style: [styles.badge, { backgroundColor: badgeColor }], children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native_paper.Icon, { source: icon, size: 20, color: unlocked ? "#000000" : fgMuted }) }),
|
|
@@ -278,6 +289,7 @@ var styles = import_react_native.StyleSheet.create({
|
|
|
278
289
|
row: {
|
|
279
290
|
alignItems: "center",
|
|
280
291
|
borderRadius: 12,
|
|
292
|
+
boxShadow: WELL_SHADOW,
|
|
281
293
|
flexDirection: "row",
|
|
282
294
|
gap: 12,
|
|
283
295
|
padding: 12
|
|
@@ -299,13 +311,13 @@ var MONO_FONT = import_react_native2.Platform.select({ ios: "Menlo", android: "m
|
|
|
299
311
|
|
|
300
312
|
// src/AchievementCatalogSection.tsx
|
|
301
313
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
302
|
-
function AchievementCatalogSection({ rows, label = "ALL ACHIEVEMENTS", fg, fgMuted: fgMutedOverride }) {
|
|
314
|
+
function AchievementCatalogSection({ rows, label = "ALL ACHIEVEMENTS", fg, fgMuted: fgMutedOverride, sectionBg }) {
|
|
303
315
|
const { dark } = (0, import_auto_paper2.useAutoPaperTheme)();
|
|
304
316
|
const fgMuted = fgMutedOverride ?? (dark ? "rgba(255,255,255,0.5)" : "rgba(0,0,0,0.5)");
|
|
305
317
|
const tierAccent = (tierColor) => dark ? tierColor : (0, import_auto_paper2.getBlendedColor)("#000000", tierColor, 0.5);
|
|
306
318
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react.Fragment, { children: [
|
|
307
319
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native_paper2.Text, { variant: "labelMedium", style: [styles2.label, { color: fgMuted, fontFamily: MONO_FONT }], children: label }),
|
|
308
|
-
rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(AchievementRow, { icon: row.icon, title: row.title, description: row.description, badgeColor: row.unlockedAt !== void 0 ? row.tierColor : LOCKED_BADGE_COLOR, checkColor: tierAccent(row.tierColor), unlockedLabel: row.unlockedLabel, progress: row.progress, deviceMarker: row.deviceMarker, fg, fgMuted: fgMutedOverride }, row.id))
|
|
320
|
+
rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(AchievementRow, { icon: row.icon, title: row.title, description: row.description, badgeColor: row.unlockedAt !== void 0 ? row.tierColor : LOCKED_BADGE_COLOR, checkColor: tierAccent(row.tierColor), unlockedLabel: row.unlockedLabel, progress: row.progress, deviceMarker: row.deviceMarker, fg, fgMuted: fgMutedOverride, sectionBg }, row.id))
|
|
309
321
|
] });
|
|
310
322
|
}
|
|
311
323
|
var styles2 = import_react_native3.StyleSheet.create({
|
|
@@ -360,14 +372,13 @@ var styles3 = import_react_native4.StyleSheet.create({
|
|
|
360
372
|
});
|
|
361
373
|
|
|
362
374
|
// src/StatRow.tsx
|
|
363
|
-
var import_auto_paper4 = require("@rific/auto-paper");
|
|
364
375
|
var import_react_native5 = require("react-native");
|
|
365
376
|
var import_react_native_paper4 = require("react-native-paper");
|
|
366
377
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
367
378
|
function StatRow({ label, value, fg: fgOverride, fgMuted: fgMutedOverride }) {
|
|
368
|
-
const
|
|
369
|
-
const fg = fgOverride ??
|
|
370
|
-
const fgMuted = fgMutedOverride ??
|
|
379
|
+
const well = useWellColors();
|
|
380
|
+
const fg = fgOverride ?? well.fg;
|
|
381
|
+
const fgMuted = fgMutedOverride ?? well.fgMuted;
|
|
371
382
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native5.View, { style: styles4.row, children: [
|
|
372
383
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_paper4.Text, { variant: "bodyMedium", style: { color: fgMuted }, children: label }),
|
|
373
384
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_paper4.Text, { variant: "bodyMedium", style: [styles4.value, { color: fg }], children: value })
|
|
@@ -385,14 +396,13 @@ var styles4 = import_react_native5.StyleSheet.create({
|
|
|
385
396
|
});
|
|
386
397
|
|
|
387
398
|
// src/StatSection.tsx
|
|
388
|
-
var import_auto_paper5 = require("@rific/auto-paper");
|
|
389
399
|
var import_react_native6 = require("react-native");
|
|
390
400
|
var import_react_native_paper5 = require("react-native-paper");
|
|
391
401
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
392
402
|
function StatSection({ label, fg: fgOverride, sectionBg: sectionBgOverride, children }) {
|
|
393
|
-
const
|
|
394
|
-
const fg = fgOverride ??
|
|
395
|
-
const sectionBg = sectionBgOverride ??
|
|
403
|
+
const well = useWellColors();
|
|
404
|
+
const fg = fgOverride ?? well.fg;
|
|
405
|
+
const sectionBg = sectionBgOverride ?? well.bg;
|
|
396
406
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native6.View, { style: [styles5.section, { backgroundColor: sectionBg }], children: [
|
|
397
407
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native_paper5.Text, { variant: "labelMedium", style: [styles5.label, { color: fg }], children: label }),
|
|
398
408
|
children
|
|
@@ -409,6 +419,7 @@ var styles5 = import_react_native6.StyleSheet.create({
|
|
|
409
419
|
},
|
|
410
420
|
section: {
|
|
411
421
|
borderRadius: 12,
|
|
422
|
+
boxShadow: WELL_SHADOW,
|
|
412
423
|
gap: 8,
|
|
413
424
|
padding: 16
|
|
414
425
|
}
|
|
@@ -416,26 +427,27 @@ var styles5 = import_react_native6.StyleSheet.create({
|
|
|
416
427
|
|
|
417
428
|
// src/ActivityStatSection.tsx
|
|
418
429
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
419
|
-
function ActivityStatSection({ stats }) {
|
|
420
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(StatSection, { label: "ACTIVITY", children: [
|
|
421
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StatRow, { label: "Days Played", value: String(stats.distinctDaysPlayed) }),
|
|
422
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StatRow, { label: "Day Streak", value: String(stats.currentDayStreak) }),
|
|
423
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StatRow, { label: "Best Day Streak", value: String(stats.bestDayStreak) })
|
|
430
|
+
function ActivityStatSection({ stats, fg, fgMuted, sectionBg }) {
|
|
431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(StatSection, { label: "ACTIVITY", fg, sectionBg, children: [
|
|
432
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StatRow, { label: "Days Played", value: String(stats.distinctDaysPlayed), fg, fgMuted }),
|
|
433
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StatRow, { label: "Day Streak", value: String(stats.currentDayStreak), fg, fgMuted }),
|
|
434
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StatRow, { label: "Best Day Streak", value: String(stats.bestDayStreak), fg, fgMuted })
|
|
424
435
|
] });
|
|
425
436
|
}
|
|
426
437
|
|
|
427
438
|
// src/BaseSettingsDialog.tsx
|
|
428
|
-
var
|
|
439
|
+
var import_auto_paper7 = require("@rific/auto-paper");
|
|
440
|
+
var import_core4 = require("@rific/core");
|
|
429
441
|
var import_feedback_press2 = require("@rific/feedback-press");
|
|
430
442
|
var import_updater = require("@rific/updater");
|
|
431
|
-
var
|
|
443
|
+
var import_core5 = require("@tastic/core");
|
|
432
444
|
var import_react6 = require("react");
|
|
433
445
|
var import_react_native13 = require("react-native");
|
|
434
446
|
var import_react_native_paper9 = require("react-native-paper");
|
|
435
447
|
var import_react_native_safe_area_context2 = require("react-native-safe-area-context");
|
|
436
448
|
|
|
437
449
|
// src/ConfirmDialog.tsx
|
|
438
|
-
var
|
|
450
|
+
var import_auto_paper6 = require("@rific/auto-paper");
|
|
439
451
|
var import_feedback_press = require("@rific/feedback-press");
|
|
440
452
|
var import_core2 = require("@tastic/core");
|
|
441
453
|
var import_react3 = require("react");
|
|
@@ -443,7 +455,7 @@ var import_react_native11 = require("react-native");
|
|
|
443
455
|
var import_react_native_paper7 = require("react-native-paper");
|
|
444
456
|
|
|
445
457
|
// src/DialogHeader.tsx
|
|
446
|
-
var
|
|
458
|
+
var import_auto_paper4 = require("@rific/auto-paper");
|
|
447
459
|
var import_react_native7 = require("react-native");
|
|
448
460
|
var import_react_native_paper6 = require("react-native-paper");
|
|
449
461
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
@@ -452,7 +464,7 @@ function isCompactDialogHeight(height) {
|
|
|
452
464
|
return height < COMPACT_DIALOG_HEIGHT;
|
|
453
465
|
}
|
|
454
466
|
function DialogHeader({ icon, title, color, compact = false, style }) {
|
|
455
|
-
const { colors } = (0,
|
|
467
|
+
const { colors } = (0, import_auto_paper4.useAutoPaperTheme)();
|
|
456
468
|
const accent = color ?? colors.primary;
|
|
457
469
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native7.View, { style: [compact ? styles6.compact : styles6.full, style], children: [
|
|
458
470
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native_paper6.Icon, { source: icon, size: compact ? COMPACT_ICON_SIZE : ICON_SIZE, color: accent }),
|
|
@@ -549,11 +561,11 @@ var overlayActionStyles = import_react_native8.StyleSheet.create({
|
|
|
549
561
|
});
|
|
550
562
|
|
|
551
563
|
// src/OverlaySurface.tsx
|
|
552
|
-
var
|
|
564
|
+
var import_auto_paper5 = require("@rific/auto-paper");
|
|
553
565
|
var import_react_native9 = require("react-native");
|
|
554
566
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
555
567
|
function useOverlayCardColors() {
|
|
556
|
-
const { colors } = (0,
|
|
568
|
+
const { colors } = (0, import_auto_paper5.useAutoPaperTheme)();
|
|
557
569
|
return { fg: colors.onSurface, fgMuted: colors.onSurfaceVariant, cardBorder: colors.outlineVariant, backdrop: colors.backdrop };
|
|
558
570
|
}
|
|
559
571
|
function OverlayBackdrop({ children, style, onLayout }) {
|
|
@@ -561,9 +573,9 @@ function OverlayBackdrop({ children, style, onLayout }) {
|
|
|
561
573
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native9.View, { onLayout, style: [overlayStyles.overlay, { backgroundColor: backdrop }, style], children });
|
|
562
574
|
}
|
|
563
575
|
function OverlayCard({ children, style, ...rest }) {
|
|
564
|
-
const { isV3, roundness } = (0,
|
|
565
|
-
const blur = (0,
|
|
566
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
576
|
+
const { isV3, roundness } = (0, import_auto_paper5.useAutoPaperTheme)();
|
|
577
|
+
const blur = (0, import_auto_paper5.useBlur)();
|
|
578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_auto_paper5.BlurView, { blur, style: [overlayStyles.card, styles7.card, { borderRadius: (isV3 ? 7 : 1) * roundness }, style], ...rest, children });
|
|
567
579
|
}
|
|
568
580
|
var styles7 = import_react_native9.StyleSheet.create({
|
|
569
581
|
card: { overflow: "hidden" }
|
|
@@ -589,7 +601,7 @@ function useCompactDialog(rotation = 0) {
|
|
|
589
601
|
// src/ConfirmDialog.tsx
|
|
590
602
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
591
603
|
function ConfirmDialog({ visible, title, message, confirmLabel, cancelLabel, onConfirm, onCancel, rotation = 0, icon = "help-circle-outline", destructive = false }) {
|
|
592
|
-
const { colors } = (0,
|
|
604
|
+
const { colors } = (0, import_auto_paper6.useAutoPaperTheme)();
|
|
593
605
|
const { fg } = useOverlayCardColors();
|
|
594
606
|
const { compact, onLayout } = useCompactDialog(rotation);
|
|
595
607
|
const onCancelRef = (0, import_react3.useRef)(onCancel);
|
|
@@ -693,22 +705,24 @@ var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
|
693
705
|
function SettingIcon({ source, color, containerColor }) {
|
|
694
706
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native13.View, { style: [styles10.iconBadge, { backgroundColor: containerColor }], children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native_paper9.Icon, { source, size: 18, color }) });
|
|
695
707
|
}
|
|
696
|
-
function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverride, version, lockOrientation, onLockOrientationChange, deferBottomEdgeGestures, onDeferBottomEdgeGestures,
|
|
697
|
-
const { colors } = (0,
|
|
698
|
-
const ambientRotation = (0,
|
|
708
|
+
function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverride, version, lockOrientation, onLockOrientationChange, deferBottomEdgeGestures, onDeferBottomEdgeGestures, hideSound = false, hideHaptics = false, hideAppearance = false, hideUpdateCheck = false, onUpdateError, onShowHowToPlay, children }) {
|
|
709
|
+
const { colors } = (0, import_auto_paper7.useAutoPaperTheme)();
|
|
710
|
+
const ambientRotation = (0, import_core5.useRotation)();
|
|
699
711
|
const rotation = rotationOverride ?? ambientRotation;
|
|
700
712
|
const window = (0, import_react_native13.useWindowDimensions)();
|
|
701
713
|
const turned = rotation === 90 || rotation === -90;
|
|
702
714
|
const compactHeader = isCompactDialogHeight(turned ? window.width : window.height);
|
|
703
|
-
const insets = (0,
|
|
715
|
+
const insets = (0, import_core5.rotateInsets)((0, import_react_native_safe_area_context2.useSafeAreaInsets)(), rotation);
|
|
704
716
|
const sheetWidth = Math.min(overlayStyles.card.maxWidth, (turned ? window.height : window.width) - 2 * Math.max(insets.left, insets.right, SHEET_GUTTER));
|
|
705
|
-
const isTouchPrimary = (0,
|
|
717
|
+
const isTouchPrimary = (0, import_core5.useIsTouchPrimaryDevice)();
|
|
706
718
|
const { settings: hapticSettings, set: setHapticSettings } = (0, import_feedback_press2.useHapticSettings)();
|
|
707
719
|
const { settings: soundSettings, set: setSoundSettings } = (0, import_feedback_press2.useSoundSettings)();
|
|
720
|
+
const { settings: keepAwakeSettings, set: setKeepAwakeSettings } = (0, import_core4.useKeepAwakeSettings)();
|
|
721
|
+
const expoKeepAwake = (0, import_core4.useExpoKeepAwake)();
|
|
708
722
|
const sound = (0, import_react6.useContext)(import_feedback_press2.SoundContext);
|
|
709
723
|
const { forceShort: forceHapticFeedback } = (0, import_feedback_press2.useVibration)();
|
|
710
|
-
const { settings: themeSettings, set: setThemeSettings } = (0,
|
|
711
|
-
const expoBlur = (0,
|
|
724
|
+
const { settings: themeSettings, set: setThemeSettings } = (0, import_auto_paper7.useThemeSettings)();
|
|
725
|
+
const expoBlur = (0, import_auto_paper7.useBlurModule)();
|
|
712
726
|
const [infoMessage, setInfoMessage] = (0, import_react6.useState)(null);
|
|
713
727
|
const { manifest: updateManifest, onConfirm: onUpdateConfirm, respond: respondToUpdateConfirm } = useUpdateConfirmBridge();
|
|
714
728
|
const { check, checking, updateReady } = (0, import_updater.useUpdater)({
|
|
@@ -723,7 +737,7 @@ function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverride, ve
|
|
|
723
737
|
if (visible && !opened) setOpened(true);
|
|
724
738
|
const showLockOrientation = isTouchPrimary && lockOrientation !== void 0 && onLockOrientationChange !== void 0;
|
|
725
739
|
const showEdgeGuard = import_react_native13.Platform.OS === "ios" && deferBottomEdgeGestures !== void 0 && onDeferBottomEdgeGestures !== void 0;
|
|
726
|
-
const showKeepAwake = isTouchPrimary &&
|
|
740
|
+
const showKeepAwake = isTouchPrimary && expoKeepAwake !== void 0;
|
|
727
741
|
const showHaptics = import_react_native13.Platform.OS !== "web" && !hideHaptics;
|
|
728
742
|
const showSound = !hideSound;
|
|
729
743
|
const showAppearance = !hideAppearance;
|
|
@@ -731,8 +745,8 @@ function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverride, ve
|
|
|
731
745
|
const showUpdateCheck = import_react_native13.Platform.OS !== "web" && !hideUpdateCheck;
|
|
732
746
|
if (!opened) return null;
|
|
733
747
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native_paper9.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(RotatedFrame, { rotation, rotatedSafeArea: true, portalHost: true, passThrough: true, children: [
|
|
734
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
735
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
748
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_auto_paper7.Dialog, { visible, onDismiss, style: [styles10.dialog, { width: sheetWidth }], children: [
|
|
749
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_auto_paper7.Dialog.ScrollArea, { style: styles10.scrollArea, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_auto_paper7.FadingScrollView, { contentContainerStyle: styles10.scrollContent, showsVerticalScrollIndicator: false, children: [
|
|
736
750
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DialogHeader, { icon: "cog", title: "Settings", compact: compactHeader }),
|
|
737
751
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native13.View, { style: styles10.content, children: [
|
|
738
752
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native13.View, { style: styles10.toggleGroup, children: [
|
|
@@ -750,8 +764,8 @@ function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverride, ve
|
|
|
750
764
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native_paper9.Text, { variant: "bodySmall", numberOfLines: 1, style: { color: colors.onSurfaceVariant }, children: "Require second swipe" })
|
|
751
765
|
] })
|
|
752
766
|
] }) }),
|
|
753
|
-
showKeepAwake && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_feedback_press2.TouchableRipple, { onPress: () =>
|
|
754
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SettingIcon, { source:
|
|
767
|
+
showKeepAwake && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_feedback_press2.TouchableRipple, { onPress: () => setKeepAwakeSettings({ enabled: !keepAwakeSettings.enabled }), style: styles10.toggleButton, accessibilityLabel: `Keep awake ${keepAwakeSettings.enabled ? "on" : "off"}`, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native13.View, { style: styles10.toggleContent, children: [
|
|
768
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SettingIcon, { source: keepAwakeSettings.enabled ? "eye" : "eye-closed", color: keepAwakeSettings.enabled ? colors.tertiary : colors.onSurfaceVariant, containerColor: keepAwakeSettings.enabled ? colors.tertiaryContainer : colors.surfaceVariant }),
|
|
755
769
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native13.View, { style: styles10.flexShrink, children: [
|
|
756
770
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native_paper9.Text, { variant: "bodyLarge", style: { color: colors.onSurface }, children: "Keep Awake" }),
|
|
757
771
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native_paper9.Text, { variant: "bodySmall", numberOfLines: 1, style: { color: colors.onSurfaceVariant }, children: "Stop auto-lock mid-match" })
|
|
@@ -814,7 +828,7 @@ function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverride, ve
|
|
|
814
828
|
] }),
|
|
815
829
|
showAppearance && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native13.View, { style: styles10.section, children: [
|
|
816
830
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native_paper9.Text, { variant: "labelMedium", style: [styles10.sectionLabel, { color: colors.onSurfaceVariant }], children: "APPEARANCE" }),
|
|
817
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
831
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_auto_paper7.AutoAppearancePicker, { showLabels: false }),
|
|
818
832
|
showBlur && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_feedback_press2.TouchableRipple, { onPress: () => setThemeSettings({ blur: !themeSettings.blur }), style: styles10.toggleButton, accessibilityLabel: `Blur ${themeSettings.blur ? "on" : "off"}`, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native13.View, { style: styles10.toggleContent, children: [
|
|
819
833
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SettingIcon, { source: themeSettings.blur ? "blur" : "blur-off", color: themeSettings.blur ? colors.tertiary : colors.onSurfaceVariant, containerColor: themeSettings.blur ? colors.tertiaryContainer : colors.surfaceVariant }),
|
|
820
834
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native13.View, { style: styles10.flexShrink, children: [
|
|
@@ -925,16 +939,16 @@ var styles10 = import_react_native13.StyleSheet.create({
|
|
|
925
939
|
});
|
|
926
940
|
|
|
927
941
|
// src/BaseStatsScreen.tsx
|
|
928
|
-
var
|
|
942
|
+
var import_auto_paper8 = require("@rific/auto-paper");
|
|
929
943
|
var import_feedback_press3 = require("@rific/feedback-press");
|
|
930
|
-
var
|
|
944
|
+
var import_core6 = require("@tastic/core");
|
|
931
945
|
var import_react7 = require("react");
|
|
932
946
|
var import_react_native14 = require("react-native");
|
|
933
947
|
var import_react_native_paper10 = require("react-native-paper");
|
|
934
948
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
935
949
|
function BaseStatsScreen({ rotation: rotationOverride, title = "Achievements", titleVariant = "headlineSmall", onBack, backLabel = "Back", hitSlop, insets, onReset, resetLabel = "Reset All Stats", resetConfirmTitle = "Reset Everything?", resetConfirmBody = "This permanently erases all stats and achievements. This cannot be undone.", fg: fgOverride, bg: bgOverride, children }) {
|
|
936
|
-
const { dark, colors } = (0,
|
|
937
|
-
const ambientRotation = (0,
|
|
950
|
+
const { dark, colors } = (0, import_auto_paper8.useAutoPaperTheme)();
|
|
951
|
+
const ambientRotation = (0, import_core6.useRotation)();
|
|
938
952
|
const rotation = rotationOverride ?? ambientRotation;
|
|
939
953
|
const [confirmResetVisible, setConfirmResetVisible] = (0, import_react7.useState)(false);
|
|
940
954
|
const showReset = !!onReset;
|
|
@@ -945,7 +959,7 @@ function BaseStatsScreen({ rotation: rotationOverride, title = "Achievements", t
|
|
|
945
959
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_feedback_press3.IconButton, { icon: "arrow-left", iconColor: fg, size: 24, hitSlop, onPress: onBack, accessibilityLabel: backLabel }),
|
|
946
960
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native_paper10.Text, { variant: titleVariant, style: [styles11.title, { color: fg }], children: title })
|
|
947
961
|
] }),
|
|
948
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
962
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_auto_paper8.FadingScrollView, { style: styles11.scrollView, contentContainerStyle: [styles11.content, { paddingBottom: 32 + insets.bottom }], showsVerticalScrollIndicator: false, children: [
|
|
949
963
|
children,
|
|
950
964
|
showReset && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_feedback_press3.Button, { mode: "contained", onPress: () => setConfirmResetVisible(true), buttonColor: colors.danger, textColor: colors.onDanger, style: styles11.resetButton, children: resetLabel })
|
|
951
965
|
] }),
|
|
@@ -1000,12 +1014,12 @@ var styles11 = import_react_native14.StyleSheet.create({
|
|
|
1000
1014
|
});
|
|
1001
1015
|
|
|
1002
1016
|
// src/ContentGutter.tsx
|
|
1003
|
-
var
|
|
1017
|
+
var import_core7 = require("@tastic/core");
|
|
1004
1018
|
var import_react_native15 = require("react-native");
|
|
1005
1019
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1006
1020
|
function ContentGutter({ maxContentWidth, leftGutter, rightGutter, style, children }) {
|
|
1007
|
-
const { width: windowWidth } = (0,
|
|
1008
|
-
const { contentWidth, gutterWidth } = (0,
|
|
1021
|
+
const { width: windowWidth } = (0, import_core7.useRotatedWindowDimensions)();
|
|
1022
|
+
const { contentWidth, gutterWidth } = (0, import_core7.computeContentBounds)(windowWidth, maxContentWidth ?? Infinity);
|
|
1009
1023
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native15.View, { style: [styles12.row, style], children: [
|
|
1010
1024
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native15.View, { style: [styles12.gutter, { width: gutterWidth }], children: leftGutter }),
|
|
1011
1025
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native15.View, { style: { width: contentWidth }, children }),
|
|
@@ -1024,13 +1038,13 @@ var styles12 = import_react_native15.StyleSheet.create({
|
|
|
1024
1038
|
});
|
|
1025
1039
|
|
|
1026
1040
|
// src/ControlSchemePicker.tsx
|
|
1027
|
-
var
|
|
1041
|
+
var import_core10 = require("@tastic/core");
|
|
1028
1042
|
var import_react_native20 = require("react-native");
|
|
1029
1043
|
|
|
1030
1044
|
// src/SectionedDropdown.tsx
|
|
1031
|
-
var
|
|
1045
|
+
var import_auto_paper9 = require("@rific/auto-paper");
|
|
1032
1046
|
var import_feedback_press4 = require("@rific/feedback-press");
|
|
1033
|
-
var
|
|
1047
|
+
var import_core9 = require("@tastic/core");
|
|
1034
1048
|
var import_react_native19 = require("react-native");
|
|
1035
1049
|
var import_react_native_paper11 = require("react-native-paper");
|
|
1036
1050
|
|
|
@@ -1186,11 +1200,11 @@ var MENU_ITEM_HEIGHT_WITH_DESCRIPTION = 58;
|
|
|
1186
1200
|
var MENU_DIVIDER_HEIGHT = 9;
|
|
1187
1201
|
var MENU_VERTICAL_PADDING = 12;
|
|
1188
1202
|
function SectionedDropdown({ id, host, icon, accessibilityLabel, sections, accentColor, mutedColor, onAccentColor, dark, align: forcedAlign, alignOverride, rotation: rotationOverride, autoDismiss = true, labelFontFamily = MONO_FONT, allClearLabels = { all: "All", clear: "Clear" } }) {
|
|
1189
|
-
const ambientRotation = (0,
|
|
1203
|
+
const ambientRotation = (0, import_core9.useRotation)();
|
|
1190
1204
|
const rotation = rotationOverride ?? ambientRotation;
|
|
1191
1205
|
const menuBg = dark ? "#000000" : "#FFFFFF";
|
|
1192
|
-
const menuBorderColor = (0,
|
|
1193
|
-
const resolvedOnAccentColor = onAccentColor ?? (0,
|
|
1206
|
+
const menuBorderColor = (0, import_auto_paper9.getBlendedColor)(mutedColor, menuBg, 0.5);
|
|
1207
|
+
const resolvedOnAccentColor = onAccentColor ?? (0, import_auto_paper9.getColorRoles)(accentColor, menuBg).onColor;
|
|
1194
1208
|
const fg = dark ? "#FFFFFF" : "#000000";
|
|
1195
1209
|
const open = host.openId === id;
|
|
1196
1210
|
const estimatedHeight = MENU_VERTICAL_PADDING + sections.reduce((sum, section, sectionIndex) => {
|
|
@@ -1372,7 +1386,7 @@ var styles15 = import_react_native19.StyleSheet.create({
|
|
|
1372
1386
|
// src/ControlSchemePicker.tsx
|
|
1373
1387
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1374
1388
|
function ControlSchemePicker({ id, host, value, onChange, options, takenValue, accentColor, mutedColor, onAccentColor, dark, align, alignOverride, rotation, labelFontFamily }) {
|
|
1375
|
-
const isTouchPrimary = (0,
|
|
1389
|
+
const isTouchPrimary = (0, import_core10.useIsTouchPrimaryDevice)();
|
|
1376
1390
|
if (import_react_native20.Platform.OS !== "web" || isTouchPrimary) return null;
|
|
1377
1391
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SectionedDropdown, { id, host, icon: "keyboard-outline", accessibilityLabel: "Control scheme", sections: [{ kind: "single", id: "controls", options, value, onChange, takenValue }], accentColor, mutedColor, onAccentColor, dark, align, alignOverride, rotation, labelFontFamily });
|
|
1378
1392
|
}
|
|
@@ -1431,9 +1445,9 @@ var styles17 = import_react_native22.StyleSheet.create({
|
|
|
1431
1445
|
});
|
|
1432
1446
|
|
|
1433
1447
|
// src/InlineColorPicker.tsx
|
|
1434
|
-
var
|
|
1448
|
+
var import_auto_paper10 = require("@rific/auto-paper");
|
|
1435
1449
|
var import_feedback_press6 = require("@rific/feedback-press");
|
|
1436
|
-
var
|
|
1450
|
+
var import_core11 = require("@tastic/core");
|
|
1437
1451
|
var import_react_native23 = require("react-native");
|
|
1438
1452
|
var import_react_native_paper13 = require("react-native-paper");
|
|
1439
1453
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
@@ -1450,15 +1464,15 @@ function widthForColumns(columns) {
|
|
|
1450
1464
|
return SWATCHES_BORDER_WIDTH * 2 + SWATCHES_PADDING * 2 + SWATCH_SIZE * columns + SWATCHES_GAP * (columns - 1);
|
|
1451
1465
|
}
|
|
1452
1466
|
function getInlineColorPickerContentSize(swatchCount, windowWidth, columns) {
|
|
1453
|
-
const autoColumns = (0,
|
|
1467
|
+
const autoColumns = (0, import_core11.clamp)(Math.floor((windowWidth - 2 * SCREEN_MARGIN + SWATCHES_GAP) / (SWATCH_SIZE + SWATCHES_GAP)), MIN_COLUMNS, MAX_COLUMNS);
|
|
1454
1468
|
const resolvedColumns = columns ?? autoColumns;
|
|
1455
1469
|
const width = widthForColumns(resolvedColumns);
|
|
1456
1470
|
const rows = Math.ceil(swatchCount / resolvedColumns);
|
|
1457
1471
|
const height = SWATCHES_BORDER_WIDTH * 2 + SWATCHES_PADDING * 2 + SWATCH_SIZE * rows + SWATCHES_GAP * (rows - 1);
|
|
1458
1472
|
return { width, height };
|
|
1459
1473
|
}
|
|
1460
|
-
function InlineColorPicker({ id, host, value, onChange, previewValue, swatches =
|
|
1461
|
-
const ambientRotation = (0,
|
|
1474
|
+
function InlineColorPicker({ id, host, value, onChange, previewValue, swatches = import_auto_paper10.defaultColors, takenValue, allowSwapTaken, dark, align: forcedAlign, alignOverride, rotation: rotationOverride, icon = "palette", tag, labelFontFamily = MONO_FONT, autoDismiss = true, columns, size = DEFAULT_SIZE }) {
|
|
1475
|
+
const ambientRotation = (0, import_core11.useRotation)();
|
|
1462
1476
|
const rotation = rotationOverride ?? ambientRotation;
|
|
1463
1477
|
const menuBg = dark ? "#000000" : "#FFFFFF";
|
|
1464
1478
|
const { width: windowWidth } = (0, import_react_native23.useWindowDimensions)();
|
|
@@ -1470,7 +1484,7 @@ function InlineColorPicker({ id, host, value, onChange, previewValue, swatches =
|
|
|
1470
1484
|
const align = forcedAlign ?? placement.align;
|
|
1471
1485
|
const displayFor = previewValue ?? ((hex) => hex);
|
|
1472
1486
|
const displayValue = displayFor(value);
|
|
1473
|
-
const contrastColor = (0,
|
|
1487
|
+
const contrastColor = (0, import_auto_paper10.getContrastColor)(displayValue);
|
|
1474
1488
|
const tagFontSize = size * (tag && EMOJI_PATTERN.test(tag) ? 0.6 : 0.4);
|
|
1475
1489
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react_native23.View, { style: [styles18.anchor, open && styles18.anchorOpen], children: [
|
|
1476
1490
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_feedback_press6.TouchableRipple, { onPress: () => host.toggle(id), borderless: true, style: [styles18.trigger, { backgroundColor: displayValue, borderRadius: size / 2, height: size, width: size }], children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_native23.View, { ref: triggerRef, collapsable: false, style: styles18.triggerMeasure, children: tag ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_native_paper13.Text, { style: [styles18.tagLabel, { color: contrastColor, fontFamily: labelFontFamily, fontSize: tagFontSize }], numberOfLines: 1, adjustsFontSizeToFit: true, children: tag }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_native_paper13.Icon, { source: icon, size: size * 0.6, color: contrastColor }) }) }),
|
|
@@ -1489,7 +1503,7 @@ function InlineColorPicker({ id, host, value, onChange, previewValue, swatches =
|
|
|
1489
1503
|
},
|
|
1490
1504
|
borderless: true,
|
|
1491
1505
|
style: [styles18.swatch, { backgroundColor: swatchDisplay }, selected && styles18.swatchSelected, taken && !swappable && styles18.swatchTaken],
|
|
1492
|
-
children: selected ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_native_paper13.Icon, { source: "check", size: 16, color: (0,
|
|
1506
|
+
children: selected ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_native_paper13.Icon, { source: "check", size: 16, color: (0, import_auto_paper10.getContrastColor)(swatchDisplay) }) : swappable ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_native_paper13.Icon, { source: "swap-horizontal", size: 16, color: (0, import_auto_paper10.getContrastColor)(swatchDisplay) }) : taken ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_native_paper13.Icon, { source: "close", size: 16, color: (0, import_auto_paper10.getContrastColor)(swatchDisplay) }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_native23.View, {})
|
|
1493
1507
|
},
|
|
1494
1508
|
swatch.value
|
|
1495
1509
|
);
|
|
@@ -1568,7 +1582,7 @@ var styles18 = import_react_native23.StyleSheet.create({
|
|
|
1568
1582
|
});
|
|
1569
1583
|
|
|
1570
1584
|
// src/LabeledDropdown.tsx
|
|
1571
|
-
var
|
|
1585
|
+
var import_auto_paper11 = require("@rific/auto-paper");
|
|
1572
1586
|
var import_feedback_press7 = require("@rific/feedback-press");
|
|
1573
1587
|
var import_react_native24 = require("react-native");
|
|
1574
1588
|
var import_react_native_paper14 = require("react-native-paper");
|
|
@@ -1602,7 +1616,7 @@ function LabeledDropdown({ id, host, options, value, onChange, color, dark, alig
|
|
|
1602
1616
|
] }) }),
|
|
1603
1617
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(PopoverBody, { visible: open && measured, align, verticalAlign, caretColor: menuBg, caretBorderColor: color, caretBorderWidth: 2, triggerSize: TRIGGER_HEIGHT, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_native24.ScrollView, { style: [styles19.menu, { backgroundColor: menuBg, borderColor: color, width: POPOVER_WIDTH, maxHeight }], contentContainerStyle: styles19.menuContent, showsVerticalScrollIndicator: false, children: options.map((option) => {
|
|
1604
1618
|
const isSelected = option.value === value;
|
|
1605
|
-
const onColor = (0,
|
|
1619
|
+
const onColor = (0, import_auto_paper11.getContrastColor)(color);
|
|
1606
1620
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_feedback_press7.TouchableRipple, { onPress: () => handleSelect(option), style: [styles19.row, isSelected && { backgroundColor: color }], children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react_native24.View, { style: styles19.rowInner, children: [
|
|
1607
1621
|
option.icon && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_native_paper14.Icon, { source: option.icon, size: 18, color: isSelected ? onColor : fg }),
|
|
1608
1622
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_native_paper14.Text, { style: [styles19.rowLabel, { color: isSelected ? onColor : fg }], numberOfLines: 1, children: option.label })
|
|
@@ -1942,6 +1956,7 @@ function useQuitConfirmation(hasProgress, onConfirmedBack) {
|
|
|
1942
1956
|
StatSection,
|
|
1943
1957
|
TriggerGaugeHost,
|
|
1944
1958
|
UpdateDialog,
|
|
1959
|
+
WELL_SHADOW,
|
|
1945
1960
|
getColorPopoverId,
|
|
1946
1961
|
getCpuDifficultyPopoverId,
|
|
1947
1962
|
getInlineColorPickerContentSize,
|
|
@@ -1957,5 +1972,6 @@ function useQuitConfirmation(hasProgress, onConfirmedBack) {
|
|
|
1957
1972
|
useOverlayCardColors,
|
|
1958
1973
|
usePopoverHost,
|
|
1959
1974
|
useQuitConfirmation,
|
|
1975
|
+
useWellColors,
|
|
1960
1976
|
useZoneClampedAlign
|
|
1961
1977
|
});
|