@tastic/hud 0.25.1 → 0.27.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 +47 -11
- package/dist/chrome/index.d.mts +5 -23
- package/dist/chrome/index.d.ts +5 -23
- package/dist/chrome/index.mjs +9 -7
- package/dist/chunk-B2DSHZJT.mjs +177 -0
- package/dist/chunk-FOJLQMKA.mjs +315 -0
- package/dist/{chunk-AJD4FMG5.mjs → chunk-JBE7IQC5.mjs} +26 -336
- package/dist/index-1fnoSjO0.d.ts +100 -0
- package/dist/index-Bhu3I6FN.d.mts +100 -0
- package/dist/index.d.mts +12 -97
- package/dist/index.d.ts +12 -97
- package/dist/index.js +8 -6
- package/dist/index.mjs +26 -176
- package/dist/lobby/index.d.mts +7 -0
- package/dist/lobby/index.d.ts +7 -0
- package/dist/lobby/index.js +513 -0
- package/dist/lobby/index.mjs +19 -0
- package/dist/usePopoverHost-T8QWb2_A.d.mts +25 -0
- package/dist/usePopoverHost-T8QWb2_A.d.ts +25 -0
- package/package.json +11 -4
- package/src/PlayerSetupPanel.tsx +34 -12
- package/src/SectionedDropdown.tsx +4 -11
- package/src/lobby/index.ts +13 -0
- package/src/menuOption.ts +14 -0
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MONO_FONT
|
|
3
|
+
} from "./chunk-FOJLQMKA.mjs";
|
|
1
4
|
import {
|
|
2
5
|
DialogHeader,
|
|
3
6
|
OverlayBackdrop,
|
|
@@ -85,10 +88,6 @@ var styles = StyleSheet.create({
|
|
|
85
88
|
}
|
|
86
89
|
});
|
|
87
90
|
|
|
88
|
-
// src/fonts.ts
|
|
89
|
-
import { Platform } from "react-native";
|
|
90
|
-
var MONO_FONT = Platform.select({ ios: "Menlo", android: "monospace", default: "monospace" });
|
|
91
|
-
|
|
92
91
|
// src/AchievementCatalogSection.tsx
|
|
93
92
|
import { getBlendedColor, useAutoPaperTheme as useAutoPaperTheme2 } from "@rific/auto-paper";
|
|
94
93
|
import { Fragment } from "react";
|
|
@@ -287,7 +286,7 @@ import { Button as Button2, SoundContext, TouchableRipple, useHapticSettings, us
|
|
|
287
286
|
import { useUpdater } from "@rific/updater";
|
|
288
287
|
import { rotateInsets as rotateInsets2, useIsTouchPrimaryDevice, useRotation as useRotation2 } from "@tastic/core";
|
|
289
288
|
import { useContext, useState as useState3 } from "react";
|
|
290
|
-
import { Platform
|
|
289
|
+
import { Platform, StyleSheet as StyleSheet7, useWindowDimensions as useWindowDimensions3, View as View6 } from "react-native";
|
|
291
290
|
import { Icon as Icon2, Portal as Portal3, Text as Text6 } from "react-native-paper";
|
|
292
291
|
import { useSafeAreaInsets as useSafeAreaInsets2 } from "react-native-safe-area-context";
|
|
293
292
|
|
|
@@ -347,13 +346,13 @@ function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverride, ve
|
|
|
347
346
|
const [opened, setOpened] = useState3(visible);
|
|
348
347
|
if (visible && !opened) setOpened(true);
|
|
349
348
|
const showLockOrientation = isTouchPrimary && lockOrientation !== void 0 && onLockOrientationChange !== void 0;
|
|
350
|
-
const showEdgeGuard =
|
|
349
|
+
const showEdgeGuard = Platform.OS === "ios" && deferBottomEdgeGestures !== void 0 && onDeferBottomEdgeGestures !== void 0;
|
|
351
350
|
const showKeepAwake = isTouchPrimary && expoKeepAwake !== void 0;
|
|
352
|
-
const showHaptics =
|
|
351
|
+
const showHaptics = Platform.OS !== "web" && !hideHaptics;
|
|
353
352
|
const showSound = !hideSound;
|
|
354
353
|
const showAppearance = !hideAppearance;
|
|
355
|
-
const showBlur = showAppearance &&
|
|
356
|
-
const showUpdateCheck =
|
|
354
|
+
const showBlur = showAppearance && Platform.OS !== "android" && expoBlur !== void 0 && expoBlur !== null;
|
|
355
|
+
const showUpdateCheck = Platform.OS !== "web" && !hideUpdateCheck;
|
|
357
356
|
if (!opened) return null;
|
|
358
357
|
return /* @__PURE__ */ jsx8(Portal3, { children: /* @__PURE__ */ jsxs7(RotatedFrame, { rotation, rotatedSafeArea: true, portalHost: true, passThrough: true, children: [
|
|
359
358
|
/* @__PURE__ */ jsxs7(Dialog, { visible, onDismiss, style: [styles7.dialog, { width: sheetWidth }], children: [
|
|
@@ -648,139 +647,17 @@ var styles9 = StyleSheet9.create({
|
|
|
648
647
|
}
|
|
649
648
|
});
|
|
650
649
|
|
|
651
|
-
// src/PopoverBody.tsx
|
|
652
|
-
import { StyleSheet as StyleSheet10, View as View9 } from "react-native";
|
|
653
|
-
import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
654
|
-
var CARET_SIZE = 7;
|
|
655
|
-
var CARET_RING_OFFSET = 2;
|
|
656
|
-
var CARET_DIP = 1;
|
|
657
|
-
function PopoverBody({ visible, children, align = "center", verticalAlign = "below", caretColor, caretBorderColor, caretBorderWidth = 1, triggerSize = 0 }) {
|
|
658
|
-
if (!visible) return null;
|
|
659
|
-
const above = verticalAlign === "above";
|
|
660
|
-
const alignStyle = align === "left" ? styles10.contentLeft : align === "right" ? styles10.contentRight : styles10.contentCenter;
|
|
661
|
-
const verticalStyle = above ? styles10.contentAbove : styles10.contentBelow;
|
|
662
|
-
const ringSize = CARET_SIZE + caretBorderWidth;
|
|
663
|
-
const caretOffset = (halfFootprint) => align === "right" ? { right: triggerSize / 2 - halfFootprint } : { left: triggerSize / 2 - halfFootprint };
|
|
664
|
-
const caretFill = above ? "borderTopColor" : "borderBottomColor";
|
|
665
|
-
const caretWidthProp = above ? "borderTopWidth" : "borderBottomWidth";
|
|
666
|
-
const caretEdge = (size) => above ? { bottom: -size + CARET_DIP } : { top: -size + CARET_DIP };
|
|
667
|
-
return /* @__PURE__ */ jsxs10(View9, { style: [styles10.content, alignStyle, verticalStyle], children: [
|
|
668
|
-
children,
|
|
669
|
-
caretColor && /* @__PURE__ */ jsxs10(Fragment2, { children: [
|
|
670
|
-
/* @__PURE__ */ jsx11(View9, { style: [styles10.caret, caretOffset(ringSize), caretEdge(ringSize), { [caretFill]: caretBorderColor ?? caretColor, [caretWidthProp]: ringSize, borderLeftWidth: ringSize, borderRightWidth: ringSize }] }),
|
|
671
|
-
/* @__PURE__ */ jsx11(View9, { style: [styles10.caret, caretOffset(CARET_SIZE), caretEdge(CARET_SIZE - CARET_RING_OFFSET), { [caretFill]: caretColor, [caretWidthProp]: CARET_SIZE, borderLeftWidth: CARET_SIZE, borderRightWidth: CARET_SIZE }] })
|
|
672
|
-
] })
|
|
673
|
-
] });
|
|
674
|
-
}
|
|
675
|
-
var styles10 = StyleSheet10.create({
|
|
676
|
-
caret: {
|
|
677
|
-
borderLeftColor: "transparent",
|
|
678
|
-
borderRightColor: "transparent",
|
|
679
|
-
height: 0,
|
|
680
|
-
position: "absolute",
|
|
681
|
-
width: 0,
|
|
682
|
-
// Explicit, not left to DOM order - the box it dips into is itself a position:'relative' view,
|
|
683
|
-
// which React Native Web always gives an implicit zIndex:0 (see PopoverBody's stacking-context
|
|
684
|
-
// notes elsewhere in this codebase), so painting on top needs a real zIndex to beat that
|
|
685
|
-
// reliably rather than relying on being the later sibling.
|
|
686
|
-
zIndex: 1
|
|
687
|
-
},
|
|
688
|
-
content: {
|
|
689
|
-
position: "absolute",
|
|
690
|
-
zIndex: 50
|
|
691
|
-
},
|
|
692
|
-
contentAbove: {
|
|
693
|
-
bottom: "100%",
|
|
694
|
-
marginBottom: 8
|
|
695
|
-
},
|
|
696
|
-
contentBelow: {
|
|
697
|
-
marginTop: 8,
|
|
698
|
-
top: "100%"
|
|
699
|
-
},
|
|
700
|
-
// Stretched to the anchor's own (trigger) width, with alignItems centering the actual (usually
|
|
701
|
-
// much wider) popover box inside via plain flexbox - not `left:'50%'` plus a percentage
|
|
702
|
-
// `transform`, which depends on native resolving the box's own auto width before applying the
|
|
703
|
-
// transform and has proven unreliable there, visibly shifting the box off-center.
|
|
704
|
-
contentCenter: {
|
|
705
|
-
alignItems: "center",
|
|
706
|
-
left: 0,
|
|
707
|
-
right: 0
|
|
708
|
-
},
|
|
709
|
-
contentLeft: {
|
|
710
|
-
left: 0
|
|
711
|
-
},
|
|
712
|
-
contentRight: {
|
|
713
|
-
right: 0
|
|
714
|
-
}
|
|
715
|
-
});
|
|
716
|
-
|
|
717
|
-
// src/useAutoAlign.ts
|
|
718
|
-
import { useEffect as useEffect2, useRef as useRef3, useState as useState5 } from "react";
|
|
719
|
-
import { useWindowDimensions as useWindowDimensions4 } from "react-native";
|
|
720
|
-
var EDGE_MARGIN = 12;
|
|
721
|
-
function rotateRect(x, y, width, height, rotation, windowWidth, windowHeight) {
|
|
722
|
-
if (rotation === 0) return { x, y, width, height };
|
|
723
|
-
const cx = windowWidth / 2;
|
|
724
|
-
const cy = windowHeight / 2;
|
|
725
|
-
const dx = x + width / 2 - cx;
|
|
726
|
-
const dy = y + height / 2 - cy;
|
|
727
|
-
const [newDx, newDy, newWidth, newHeight] = rotation === 180 ? [-dx, -dy, width, height] : rotation === 90 ? [-dy, dx, height, width] : [dy, -dx, height, width];
|
|
728
|
-
return { x: cx + newDx - newWidth / 2, y: cy + newDy - newHeight / 2, width: newWidth, height: newHeight };
|
|
729
|
-
}
|
|
730
|
-
function useAutoAlign(open, contentWidth, contentHeight, rotation = 0, bounds) {
|
|
731
|
-
const triggerRef = useRef3(null);
|
|
732
|
-
const { width: windowWidth, height: windowHeight } = useWindowDimensions4();
|
|
733
|
-
const [align, setAlign] = useState5("center");
|
|
734
|
-
const [verticalAlign, setVerticalAlign] = useState5("below");
|
|
735
|
-
const [maxHeight, setMaxHeight] = useState5(contentHeight);
|
|
736
|
-
const [measured, setMeasured] = useState5(false);
|
|
737
|
-
const [prevOpen, setPrevOpen] = useState5(open);
|
|
738
|
-
if (open !== prevOpen) {
|
|
739
|
-
setPrevOpen(open);
|
|
740
|
-
if (open) setMeasured(false);
|
|
741
|
-
}
|
|
742
|
-
useEffect2(() => {
|
|
743
|
-
if (!open) return;
|
|
744
|
-
const place = (limits) => (rawX, rawY, rawWidth, rawHeight) => {
|
|
745
|
-
const { x, y, width: triggerWidth, height: triggerHeight } = rotateRect(rawX, rawY, rawWidth, rawHeight, rotation, windowWidth, windowHeight);
|
|
746
|
-
const centerX = x + triggerWidth / 2;
|
|
747
|
-
const overflowsRight = centerX + contentWidth / 2 > limits.right - EDGE_MARGIN;
|
|
748
|
-
const overflowsLeft = centerX - contentWidth / 2 < limits.left + EDGE_MARGIN;
|
|
749
|
-
if (overflowsRight && !overflowsLeft) setAlign("right");
|
|
750
|
-
else if (overflowsLeft && !overflowsRight) setAlign("left");
|
|
751
|
-
else setAlign("center");
|
|
752
|
-
const roomBelow = limits.bottom - (y + triggerHeight) - EDGE_MARGIN;
|
|
753
|
-
const roomAbove = y - limits.top - EDGE_MARGIN;
|
|
754
|
-
const above = contentHeight > roomBelow && roomAbove > roomBelow;
|
|
755
|
-
setVerticalAlign(above ? "above" : "below");
|
|
756
|
-
setMaxHeight(Math.max(above ? roomAbove : roomBelow, 0));
|
|
757
|
-
setMeasured(true);
|
|
758
|
-
};
|
|
759
|
-
const screen = { left: 0, top: 0, right: windowWidth, bottom: windowHeight };
|
|
760
|
-
const boundsView = bounds?.current;
|
|
761
|
-
if (!boundsView) {
|
|
762
|
-
triggerRef.current?.measureInWindow(place(screen));
|
|
763
|
-
return;
|
|
764
|
-
}
|
|
765
|
-
boundsView.measureInWindow((rawX, rawY, rawWidth, rawHeight) => {
|
|
766
|
-
const b = rotateRect(rawX, rawY, rawWidth, rawHeight, rotation, windowWidth, windowHeight);
|
|
767
|
-
triggerRef.current?.measureInWindow(place({ left: Math.max(b.x, 0), top: Math.max(b.y, 0), right: Math.min(b.x + b.width, windowWidth), bottom: Math.min(b.y + b.height, windowHeight) }));
|
|
768
|
-
});
|
|
769
|
-
}, [open, contentWidth, contentHeight, windowWidth, windowHeight, rotation, bounds]);
|
|
770
|
-
return { align, maxHeight, measured, triggerRef, verticalAlign };
|
|
771
|
-
}
|
|
772
|
-
|
|
773
650
|
// src/CornerActionButtons.tsx
|
|
774
651
|
import { IconButton as IconButton2 } from "@rific/feedback-press";
|
|
775
|
-
import { StyleSheet as
|
|
776
|
-
import { Fragment as
|
|
652
|
+
import { StyleSheet as StyleSheet10 } from "react-native";
|
|
653
|
+
import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
777
654
|
function CornerActionButtons({ onBack, onSettings, fg, insets, backIcon = "arrow-left", backLabel = "Back", hitSlop }) {
|
|
778
|
-
return /* @__PURE__ */
|
|
779
|
-
/* @__PURE__ */
|
|
780
|
-
/* @__PURE__ */
|
|
655
|
+
return /* @__PURE__ */ jsxs10(Fragment2, { children: [
|
|
656
|
+
/* @__PURE__ */ jsx11(IconButton2, { icon: backIcon, iconColor: fg, size: 24, style: [styles10.back, { top: 8 + insets.top, left: 8 + insets.left }], hitSlop, onPress: onBack, accessibilityLabel: backLabel }),
|
|
657
|
+
/* @__PURE__ */ jsx11(IconButton2, { icon: "cog", iconColor: fg, size: 24, style: [styles10.topRight, { top: 8 + insets.top, right: 8 + insets.right }], hitSlop, onPress: onSettings, accessibilityLabel: "Settings" })
|
|
781
658
|
] });
|
|
782
659
|
}
|
|
783
|
-
var
|
|
660
|
+
var styles10 = StyleSheet10.create({
|
|
784
661
|
back: {
|
|
785
662
|
position: "absolute"
|
|
786
663
|
},
|
|
@@ -789,200 +666,19 @@ var styles11 = StyleSheet11.create({
|
|
|
789
666
|
}
|
|
790
667
|
});
|
|
791
668
|
|
|
792
|
-
// src/InlineColorPicker.tsx
|
|
793
|
-
import { defaultColors, getContrastColor } from "@rific/auto-paper";
|
|
794
|
-
import { TouchableRipple as TouchableRipple2 } from "@rific/feedback-press";
|
|
795
|
-
import { clamp, useRotation as useRotation4 } from "@tastic/core";
|
|
796
|
-
import { ScrollView, StyleSheet as StyleSheet12, useWindowDimensions as useWindowDimensions5, View as View11 } from "react-native";
|
|
797
|
-
import { Icon as Icon3, Text as Text8 } from "react-native-paper";
|
|
798
|
-
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
799
|
-
var EMOJI_PATTERN = /\p{Extended_Pictographic}/u;
|
|
800
|
-
var DEFAULT_SIZE = 48;
|
|
801
|
-
var SWATCH_SIZE = 28;
|
|
802
|
-
var SWATCH_RING_WIDTH = 2;
|
|
803
|
-
var SWATCHES_PADDING = 8;
|
|
804
|
-
var SWATCHES_GAP = 6;
|
|
805
|
-
var SWATCHES_BORDER_WIDTH = 2;
|
|
806
|
-
var MIN_COLUMNS = 4;
|
|
807
|
-
var MAX_COLUMNS = 5;
|
|
808
|
-
var SCREEN_MARGIN = 40;
|
|
809
|
-
function widthForColumns(columns) {
|
|
810
|
-
return SWATCHES_BORDER_WIDTH * 2 + SWATCHES_PADDING * 2 + SWATCH_SIZE * columns + SWATCHES_GAP * (columns - 1);
|
|
811
|
-
}
|
|
812
|
-
function getInlineColorPickerContentSize(swatchCount, windowWidth, columns) {
|
|
813
|
-
const autoColumns = clamp(Math.floor((windowWidth - 2 * SCREEN_MARGIN + SWATCHES_GAP) / (SWATCH_SIZE + SWATCHES_GAP)), MIN_COLUMNS, MAX_COLUMNS);
|
|
814
|
-
const resolvedColumns = columns ?? autoColumns;
|
|
815
|
-
const width = widthForColumns(resolvedColumns);
|
|
816
|
-
const rows = Math.ceil(swatchCount / resolvedColumns);
|
|
817
|
-
const height = SWATCHES_BORDER_WIDTH * 2 + SWATCHES_PADDING * 2 + SWATCH_SIZE * rows + SWATCHES_GAP * (rows - 1);
|
|
818
|
-
return { width, height };
|
|
819
|
-
}
|
|
820
|
-
function SwatchDrawing({ size, children }) {
|
|
821
|
-
return /* @__PURE__ */ jsx13(View11, { style: [styles12.drawing, { borderRadius: size / 2, height: size, width: size }], children });
|
|
822
|
-
}
|
|
823
|
-
function InlineColorPicker({ id, host, value, onChange, previewValue, swatches = defaultColors, takenValue, allowSwapTaken, dark, align: forcedAlign, alignOverride, rotation: rotationOverride, icon = "palette", tag, labelFontFamily = MONO_FONT, autoDismiss = true, columns, size = DEFAULT_SIZE, renderSwatch, bounds }) {
|
|
824
|
-
const ambientRotation = useRotation4();
|
|
825
|
-
const rotation = rotationOverride ?? ambientRotation;
|
|
826
|
-
const menuBg = dark ? "#000000" : "#FFFFFF";
|
|
827
|
-
const { width: windowWidth } = useWindowDimensions5();
|
|
828
|
-
const { width: swatchesWidth, height: swatchesHeight } = getInlineColorPickerContentSize(swatches.length, windowWidth, columns);
|
|
829
|
-
const open = host.openId === id;
|
|
830
|
-
const auto = useAutoAlign(open, swatchesWidth, swatchesHeight, rotation, bounds);
|
|
831
|
-
const placement = alignOverride ?? auto;
|
|
832
|
-
const { maxHeight, measured, triggerRef, verticalAlign } = placement;
|
|
833
|
-
const align = forcedAlign ?? placement.align;
|
|
834
|
-
const displayFor = previewValue ?? ((hex) => hex);
|
|
835
|
-
const displayValue = displayFor(value);
|
|
836
|
-
const contrastColor = getContrastColor(displayValue);
|
|
837
|
-
const tagFontSize = size * (tag && EMOJI_PATTERN.test(tag) ? 0.6 : 0.4);
|
|
838
|
-
const triggerDrawing = renderSwatch?.(displayValue, size, "trigger") ?? null;
|
|
839
|
-
return /* @__PURE__ */ jsxs12(View11, { style: [styles12.anchor, open && styles12.anchorOpen], children: [
|
|
840
|
-
/* @__PURE__ */ jsx13(TouchableRipple2, { onPress: () => host.toggle(id), borderless: true, style: [styles12.trigger, triggerDrawing === null && { backgroundColor: displayValue }, { borderRadius: size / 2, height: size, width: size }], children: /* @__PURE__ */ jsxs12(View11, { ref: triggerRef, collapsable: false, style: styles12.triggerMeasure, children: [
|
|
841
|
-
triggerDrawing !== null && /* @__PURE__ */ jsx13(SwatchDrawing, { size, children: triggerDrawing }),
|
|
842
|
-
tag ? /* @__PURE__ */ jsx13(Text8, { style: [styles12.tagLabel, { color: contrastColor, fontFamily: labelFontFamily, fontSize: tagFontSize }], numberOfLines: 1, adjustsFontSizeToFit: true, children: tag }) : /* @__PURE__ */ jsx13(Icon3, { source: icon, size: size * 0.6, color: contrastColor })
|
|
843
|
-
] }) }),
|
|
844
|
-
/* @__PURE__ */ jsx13(PopoverBody, { visible: open && measured, align, verticalAlign, caretColor: menuBg, caretBorderColor: displayValue, caretBorderWidth: SWATCHES_BORDER_WIDTH, triggerSize: size, children: /* @__PURE__ */ jsx13(ScrollView, { style: [styles12.swatches, { backgroundColor: menuBg, borderColor: displayValue, width: swatchesWidth, maxHeight }], contentContainerStyle: styles12.swatchesContent, showsVerticalScrollIndicator: false, children: swatches.map((swatch) => {
|
|
845
|
-
const selected = swatch.value.toLowerCase() === value.toLowerCase();
|
|
846
|
-
const taken = !selected && !!takenValue && swatch.value.toLowerCase() === takenValue.toLowerCase();
|
|
847
|
-
const swappable = taken && allowSwapTaken;
|
|
848
|
-
const swatchDisplay = displayFor(swatch.value);
|
|
849
|
-
const contrast = getContrastColor(swatchDisplay);
|
|
850
|
-
const drawnSize = selected ? SWATCH_SIZE - 2 * SWATCH_RING_WIDTH : SWATCH_SIZE;
|
|
851
|
-
const drawing = renderSwatch?.(swatchDisplay, drawnSize, "swatch") ?? null;
|
|
852
|
-
const mark = selected ? /* @__PURE__ */ jsx13(Icon3, { source: "check", size: 16, color: contrast }) : swappable ? /* @__PURE__ */ jsx13(Icon3, { source: "swap-horizontal", size: 16, color: contrast }) : taken ? /* @__PURE__ */ jsx13(Icon3, { source: "close", size: 16, color: contrast }) : /* @__PURE__ */ jsx13(View11, {});
|
|
853
|
-
return /* @__PURE__ */ jsx13(
|
|
854
|
-
TouchableRipple2,
|
|
855
|
-
{
|
|
856
|
-
disabled: taken && !swappable,
|
|
857
|
-
onPress: () => {
|
|
858
|
-
onChange(swatch.value);
|
|
859
|
-
if (autoDismiss) host.close();
|
|
860
|
-
},
|
|
861
|
-
borderless: true,
|
|
862
|
-
style: [styles12.swatch, drawing === null && { backgroundColor: swatchDisplay }, selected && styles12.swatchSelected, taken && !swappable && styles12.swatchTaken],
|
|
863
|
-
children: drawing !== null ? /* @__PURE__ */ jsxs12(View11, { style: styles12.swatchFace, children: [
|
|
864
|
-
/* @__PURE__ */ jsx13(SwatchDrawing, { size: drawnSize, children: drawing }),
|
|
865
|
-
mark
|
|
866
|
-
] }) : mark
|
|
867
|
-
},
|
|
868
|
-
swatch.value
|
|
869
|
-
);
|
|
870
|
-
}) }) })
|
|
871
|
-
] });
|
|
872
|
-
}
|
|
873
|
-
var styles12 = StyleSheet12.create({
|
|
874
|
-
anchor: {
|
|
875
|
-
position: "relative"
|
|
876
|
-
},
|
|
877
|
-
// See SectionedDropdown's identical comment - React Native Web gives every position:'relative' view
|
|
878
|
-
// its own stacking context, so the elevation has to live on the anchor itself, not just the
|
|
879
|
-
// popover content nested inside it, to correctly paint above this anchor's own later siblings.
|
|
880
|
-
anchorOpen: {
|
|
881
|
-
zIndex: 100
|
|
882
|
-
},
|
|
883
|
-
// A renderSwatch drawing (see SwatchDrawing).
|
|
884
|
-
drawing: {
|
|
885
|
-
left: 0,
|
|
886
|
-
overflow: "hidden",
|
|
887
|
-
pointerEvents: "none",
|
|
888
|
-
position: "absolute",
|
|
889
|
-
top: 0
|
|
890
|
-
},
|
|
891
|
-
swatch: {
|
|
892
|
-
alignItems: "center",
|
|
893
|
-
borderRadius: SWATCH_SIZE / 2,
|
|
894
|
-
height: SWATCH_SIZE,
|
|
895
|
-
justifyContent: "center",
|
|
896
|
-
width: SWATCH_SIZE
|
|
897
|
-
},
|
|
898
|
-
// A drawn swatch (see SwatchDrawing) and its mark: the whole circle inside the selected one's ring.
|
|
899
|
-
swatchFace: {
|
|
900
|
-
alignItems: "center",
|
|
901
|
-
bottom: 0,
|
|
902
|
-
justifyContent: "center",
|
|
903
|
-
left: 0,
|
|
904
|
-
position: "absolute",
|
|
905
|
-
right: 0,
|
|
906
|
-
top: 0
|
|
907
|
-
},
|
|
908
|
-
swatchSelected: {
|
|
909
|
-
borderColor: "#ffffff",
|
|
910
|
-
borderWidth: SWATCH_RING_WIDTH
|
|
911
|
-
},
|
|
912
|
-
swatchTaken: {
|
|
913
|
-
opacity: 0.35
|
|
914
|
-
},
|
|
915
|
-
swatches: {
|
|
916
|
-
borderRadius: 12,
|
|
917
|
-
borderWidth: SWATCHES_BORDER_WIDTH,
|
|
918
|
-
elevation: 8,
|
|
919
|
-
shadowColor: "#000000",
|
|
920
|
-
shadowOffset: { height: 2, width: 0 },
|
|
921
|
-
shadowOpacity: 0.3,
|
|
922
|
-
shadowRadius: 8
|
|
923
|
-
// width is set inline above - border-box sizing means it has to include the border too
|
|
924
|
-
// (2*SWATCHES_BORDER_WIDTH), not just padding+content, or exactly enough room goes missing that
|
|
925
|
-
// the last column silently wraps to a new row. Anything wider than the exact sum just shows as
|
|
926
|
-
// dead space on the right edge of each row instead.
|
|
927
|
-
},
|
|
928
|
-
// Separate from `swatches` itself - see SectionedDropdown's identical menu/menuContent split.
|
|
929
|
-
// The scroll frame's own bounds (including maxHeight) live on the ScrollView; the actual grid
|
|
930
|
-
// wrapping belongs to its contentContainerStyle, which sizes to the unclamped content instead.
|
|
931
|
-
swatchesContent: {
|
|
932
|
-
flexDirection: "row",
|
|
933
|
-
flexWrap: "wrap",
|
|
934
|
-
gap: SWATCHES_GAP,
|
|
935
|
-
padding: SWATCHES_PADDING
|
|
936
|
-
},
|
|
937
|
-
tagLabel: {
|
|
938
|
-
fontWeight: "700",
|
|
939
|
-
letterSpacing: 0.5
|
|
940
|
-
},
|
|
941
|
-
// borderRadius/height/width come from the `size` prop instead (see render-site override) - no
|
|
942
|
-
// fixed default here, since this style object is shared by every caller regardless of size.
|
|
943
|
-
trigger: {
|
|
944
|
-
alignItems: "center",
|
|
945
|
-
alignSelf: "flex-start",
|
|
946
|
-
justifyContent: "center"
|
|
947
|
-
},
|
|
948
|
-
// Wraps just the icon/tag, inside the TouchableRipple, purely so useAutoAlign has a plain View
|
|
949
|
-
// to attach its measurement ref to - TouchableRipple itself doesn't forward a ref to a
|
|
950
|
-
// measurable native node. Padded horizontally so a multi-character tag doesn't butt right up
|
|
951
|
-
// against the trigger's own circular edge (an icon alone doesn't need it, but this style is
|
|
952
|
-
// shared by both).
|
|
953
|
-
triggerMeasure: {
|
|
954
|
-
alignItems: "center",
|
|
955
|
-
height: "100%",
|
|
956
|
-
justifyContent: "center",
|
|
957
|
-
paddingHorizontal: 4,
|
|
958
|
-
width: "100%"
|
|
959
|
-
}
|
|
960
|
-
});
|
|
961
|
-
|
|
962
|
-
// src/usePopoverHost.ts
|
|
963
|
-
import { useCallback as useCallback3, useState as useState6 } from "react";
|
|
964
|
-
function usePopoverHost() {
|
|
965
|
-
const [openId, setOpenId] = useState6(null);
|
|
966
|
-
const toggle = useCallback3((id) => {
|
|
967
|
-
setOpenId((prev) => prev === id ? null : id);
|
|
968
|
-
}, []);
|
|
969
|
-
const close = useCallback3(() => setOpenId(null), []);
|
|
970
|
-
return { openId, toggle, close };
|
|
971
|
-
}
|
|
972
|
-
|
|
973
669
|
// src/PressAwayOverlay.tsx
|
|
974
|
-
import { Pressable, StyleSheet as
|
|
975
|
-
import { jsx as
|
|
670
|
+
import { Pressable, StyleSheet as StyleSheet11 } from "react-native";
|
|
671
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
976
672
|
function PressAwayOverlay({ active, onPress, style }) {
|
|
977
673
|
if (!active) return null;
|
|
978
|
-
return /* @__PURE__ */
|
|
674
|
+
return /* @__PURE__ */ jsx12(Pressable, { accessibilityLabel: "Dismiss", accessibilityRole: "button", onPress, style: [StyleSheet11.absoluteFill, style] });
|
|
979
675
|
}
|
|
980
676
|
|
|
981
677
|
// src/StaggeredWord.tsx
|
|
982
|
-
import { useEffect as
|
|
983
|
-
import { StyleSheet as
|
|
678
|
+
import { useEffect as useEffect2 } from "react";
|
|
679
|
+
import { StyleSheet as StyleSheet12, View as View9 } from "react-native";
|
|
984
680
|
import Animated, { Easing, useAnimatedStyle, useSharedValue, withDelay, withTiming } from "react-native-reanimated";
|
|
985
|
-
import { jsx as
|
|
681
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
986
682
|
var STAGGER_MS = 45;
|
|
987
683
|
var LETTER_DURATION_MS = 320;
|
|
988
684
|
function getStaggeredWordDuration(letterCount) {
|
|
@@ -990,7 +686,7 @@ function getStaggeredWordDuration(letterCount) {
|
|
|
990
686
|
}
|
|
991
687
|
function AnimatedLetter({ char, index, color, reducedMotion, fontFamily, fontSize, lineHeight, fontWeight, letterSpacing }) {
|
|
992
688
|
const progress = useSharedValue(reducedMotion ? 1 : 0);
|
|
993
|
-
|
|
689
|
+
useEffect2(() => {
|
|
994
690
|
if (reducedMotion) return;
|
|
995
691
|
progress.value = withDelay(index * STAGGER_MS, withTiming(1, { duration: LETTER_DURATION_MS, easing: Easing.out(Easing.back(1.5)) }));
|
|
996
692
|
}, [reducedMotion]);
|
|
@@ -998,12 +694,12 @@ function AnimatedLetter({ char, index, color, reducedMotion, fontFamily, fontSiz
|
|
|
998
694
|
opacity: progress.value,
|
|
999
695
|
transform: [{ translateY: (1 - progress.value) * 12 }, { scale: 0.85 + progress.value * 0.15 }]
|
|
1000
696
|
}));
|
|
1001
|
-
return /* @__PURE__ */
|
|
697
|
+
return /* @__PURE__ */ jsx13(Animated.Text, { allowFontScaling: false, style: [{ color, fontFamily, fontSize, lineHeight, fontWeight, letterSpacing }, style], children: char });
|
|
1002
698
|
}
|
|
1003
699
|
function StaggeredWord({ word, color, fontFamily, fontSize, lineHeight, reducedMotion, startIndex = 0, fontWeight = "bold", letterSpacing, style, onLayout }) {
|
|
1004
|
-
return /* @__PURE__ */
|
|
700
|
+
return /* @__PURE__ */ jsx13(View9, { style: [styles11.row, style], onLayout, children: word.split("").map((char, i) => /* @__PURE__ */ jsx13(AnimatedLetter, { char, index: startIndex + i, color, reducedMotion, fontFamily, fontSize, lineHeight, fontWeight, letterSpacing }, i)) });
|
|
1005
701
|
}
|
|
1006
|
-
var
|
|
702
|
+
var styles11 = StyleSheet12.create({
|
|
1007
703
|
row: {
|
|
1008
704
|
flexDirection: "row"
|
|
1009
705
|
}
|
|
@@ -1011,12 +707,12 @@ var styles13 = StyleSheet14.create({
|
|
|
1011
707
|
|
|
1012
708
|
// src/UpdateDialog.tsx
|
|
1013
709
|
import { useUpdater as useUpdater2 } from "@rific/updater";
|
|
1014
|
-
import { jsx as
|
|
710
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1015
711
|
function UpdateDialog({ rotation = 0, autoCheck = true, autoPrompt = true, onError }) {
|
|
1016
712
|
const { manifest, onConfirm, respond } = useUpdateConfirmBridge();
|
|
1017
713
|
useUpdater2({ autoCheck, autoPrompt, onConfirm, onError });
|
|
1018
714
|
const date = manifest ? new Date(manifest.createdAt) : null;
|
|
1019
|
-
return /* @__PURE__ */
|
|
715
|
+
return /* @__PURE__ */ jsx14(ConfirmDialog, { visible: !!manifest, title: "Update Available", message: date ? `Released ${date.toLocaleDateString()} at ${date.toLocaleTimeString()}` : "", confirmLabel: "Restart", cancelLabel: "Later", icon: "update", rotation, onConfirm: () => respond(true), onCancel: () => respond(false) });
|
|
1020
716
|
}
|
|
1021
717
|
|
|
1022
718
|
export {
|
|
@@ -1024,7 +720,6 @@ export {
|
|
|
1024
720
|
useWellColors,
|
|
1025
721
|
LOCKED_BADGE_COLOR,
|
|
1026
722
|
AchievementRow,
|
|
1027
|
-
MONO_FONT,
|
|
1028
723
|
AchievementCatalogSection,
|
|
1029
724
|
StatRow,
|
|
1030
725
|
StatSection,
|
|
@@ -1035,12 +730,7 @@ export {
|
|
|
1035
730
|
BaseSettingsDialog,
|
|
1036
731
|
BaseStatsScreen,
|
|
1037
732
|
ContentGutter,
|
|
1038
|
-
PopoverBody,
|
|
1039
|
-
useAutoAlign,
|
|
1040
733
|
CornerActionButtons,
|
|
1041
|
-
getInlineColorPickerContentSize,
|
|
1042
|
-
InlineColorPicker,
|
|
1043
|
-
usePopoverHost,
|
|
1044
734
|
PressAwayOverlay,
|
|
1045
735
|
getStaggeredWordDuration,
|
|
1046
736
|
StaggeredWord,
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { SeedColor } from '@rific/auto-paper';
|
|
4
|
+
import { Profile } from '@tastic/profile';
|
|
5
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
6
|
+
import { P as PopoverHost, A as AlignResult, a as PopoverRotation, u as useAutoAlign } from './usePopoverHost-T8QWb2_A.js';
|
|
7
|
+
|
|
8
|
+
interface MenuOption<T extends string | number> {
|
|
9
|
+
value: T;
|
|
10
|
+
label: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
icon?: string;
|
|
13
|
+
iconSize?: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare const LABELED_DROPDOWN_POPOVER_WIDTH = 180;
|
|
17
|
+
declare function getLabeledDropdownContentHeight(optionCount: number): number;
|
|
18
|
+
interface LabeledDropdownOption<T extends string> {
|
|
19
|
+
value: T;
|
|
20
|
+
label: string;
|
|
21
|
+
icon?: string;
|
|
22
|
+
}
|
|
23
|
+
interface Props$2<T extends string> {
|
|
24
|
+
id: string;
|
|
25
|
+
host: PopoverHost;
|
|
26
|
+
options: LabeledDropdownOption<T>[];
|
|
27
|
+
value: T;
|
|
28
|
+
onChange: (value: T) => void;
|
|
29
|
+
color: string;
|
|
30
|
+
dark: boolean;
|
|
31
|
+
align?: 'left' | 'right' | 'center';
|
|
32
|
+
alignOverride?: AlignResult;
|
|
33
|
+
}
|
|
34
|
+
declare function LabeledDropdown<T extends string>({ id, host, options, value, onChange, color, dark, align: forcedAlign, alignOverride }: Props$2<T>): react.JSX.Element;
|
|
35
|
+
|
|
36
|
+
declare function getColorPopoverId(idPrefix: string): string;
|
|
37
|
+
declare function getProfilePopoverId(idPrefix: string): string;
|
|
38
|
+
declare function getCpuDifficultyPopoverId(idPrefix: string): string;
|
|
39
|
+
interface PlayerSetupPanelProps<C extends string = string> {
|
|
40
|
+
idPrefix: string;
|
|
41
|
+
host?: PopoverHost;
|
|
42
|
+
label?: string;
|
|
43
|
+
labelFontFamily?: string;
|
|
44
|
+
color: string;
|
|
45
|
+
onColorChange: (hex: string) => void;
|
|
46
|
+
swatches: SeedColor[];
|
|
47
|
+
takenColor?: string;
|
|
48
|
+
allowSwapTaken?: boolean;
|
|
49
|
+
colorCaption?: string;
|
|
50
|
+
showColor?: boolean;
|
|
51
|
+
colorAlignOverride?: AlignResult;
|
|
52
|
+
colorRotation?: PopoverRotation;
|
|
53
|
+
isHuman: boolean;
|
|
54
|
+
secondPicker?: ReactNode;
|
|
55
|
+
secondPickerId?: string;
|
|
56
|
+
ready?: boolean;
|
|
57
|
+
onToggleReady?: () => void;
|
|
58
|
+
dark: boolean;
|
|
59
|
+
showReadyButton?: boolean;
|
|
60
|
+
profiles?: Profile[];
|
|
61
|
+
selectedProfileId?: string | null;
|
|
62
|
+
takenProfileId?: string | null;
|
|
63
|
+
guestLabel?: string;
|
|
64
|
+
nullLabel?: string;
|
|
65
|
+
onProfileSelect?: (profile: Profile | null) => void;
|
|
66
|
+
onManageProfiles?: () => void;
|
|
67
|
+
cpuDifficulty?: C;
|
|
68
|
+
cpuDifficultyOptions?: LabeledDropdownOption<C>[];
|
|
69
|
+
onCpuDifficultyChange?: (value: C) => void;
|
|
70
|
+
humanIcon?: string;
|
|
71
|
+
cpuIcon?: string;
|
|
72
|
+
previewValue?: (hex: string) => string;
|
|
73
|
+
triggerStyle?: StyleProp<ViewStyle>;
|
|
74
|
+
useSeatPickerAlign?: (open: boolean, contentWidth: number, contentHeight: number) => AlignResult;
|
|
75
|
+
}
|
|
76
|
+
declare function PlayerSetupPanel<C extends string = string>({ idPrefix, host, label, labelFontFamily, color, onColorChange, swatches, takenColor, allowSwapTaken, colorCaption, showColor, colorAlignOverride, colorRotation, isHuman, secondPicker, secondPickerId, ready, onToggleReady, dark, showReadyButton, profiles, selectedProfileId, takenProfileId, guestLabel, nullLabel, onProfileSelect, onManageProfiles, cpuDifficulty, cpuDifficultyOptions, onCpuDifficultyChange, humanIcon, cpuIcon, previewValue, triggerStyle, useSeatPickerAlign }: PlayerSetupPanelProps<C>): react.JSX.Element;
|
|
77
|
+
|
|
78
|
+
interface Props$1 {
|
|
79
|
+
color: string;
|
|
80
|
+
ready: boolean;
|
|
81
|
+
onToggleReady: () => void;
|
|
82
|
+
style?: StyleProp<ViewStyle>;
|
|
83
|
+
labelFontFamily?: string;
|
|
84
|
+
}
|
|
85
|
+
declare function ReadyButton({ color, ready, onToggleReady, style, labelFontFamily }: Props$1): react.JSX.Element;
|
|
86
|
+
|
|
87
|
+
interface Props {
|
|
88
|
+
onBack: () => void;
|
|
89
|
+
onSettings: () => void;
|
|
90
|
+
onRandomize?: () => void;
|
|
91
|
+
onReset?: () => void;
|
|
92
|
+
fg: string;
|
|
93
|
+
popoverOpen: boolean;
|
|
94
|
+
children: ReactNode;
|
|
95
|
+
}
|
|
96
|
+
declare function SharedActionBand({ onBack, onSettings, onRandomize, onReset, fg, popoverOpen, children }: Props): react.JSX.Element;
|
|
97
|
+
|
|
98
|
+
declare function useZoneClampedAlign(open: boolean, contentWidth: number, contentHeight: number, rotation?: PopoverRotation): ReturnType<typeof useAutoAlign>;
|
|
99
|
+
|
|
100
|
+
export { LABELED_DROPDOWN_POPOVER_WIDTH as L, type MenuOption as M, PlayerSetupPanel as P, ReadyButton as R, SharedActionBand as S, LabeledDropdown as a, type LabeledDropdownOption as b, type PlayerSetupPanelProps as c, getCpuDifficultyPopoverId as d, getLabeledDropdownContentHeight as e, getProfilePopoverId as f, getColorPopoverId as g, useZoneClampedAlign as u };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { SeedColor } from '@rific/auto-paper';
|
|
4
|
+
import { Profile } from '@tastic/profile';
|
|
5
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
6
|
+
import { P as PopoverHost, A as AlignResult, a as PopoverRotation, u as useAutoAlign } from './usePopoverHost-T8QWb2_A.mjs';
|
|
7
|
+
|
|
8
|
+
interface MenuOption<T extends string | number> {
|
|
9
|
+
value: T;
|
|
10
|
+
label: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
icon?: string;
|
|
13
|
+
iconSize?: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare const LABELED_DROPDOWN_POPOVER_WIDTH = 180;
|
|
17
|
+
declare function getLabeledDropdownContentHeight(optionCount: number): number;
|
|
18
|
+
interface LabeledDropdownOption<T extends string> {
|
|
19
|
+
value: T;
|
|
20
|
+
label: string;
|
|
21
|
+
icon?: string;
|
|
22
|
+
}
|
|
23
|
+
interface Props$2<T extends string> {
|
|
24
|
+
id: string;
|
|
25
|
+
host: PopoverHost;
|
|
26
|
+
options: LabeledDropdownOption<T>[];
|
|
27
|
+
value: T;
|
|
28
|
+
onChange: (value: T) => void;
|
|
29
|
+
color: string;
|
|
30
|
+
dark: boolean;
|
|
31
|
+
align?: 'left' | 'right' | 'center';
|
|
32
|
+
alignOverride?: AlignResult;
|
|
33
|
+
}
|
|
34
|
+
declare function LabeledDropdown<T extends string>({ id, host, options, value, onChange, color, dark, align: forcedAlign, alignOverride }: Props$2<T>): react.JSX.Element;
|
|
35
|
+
|
|
36
|
+
declare function getColorPopoverId(idPrefix: string): string;
|
|
37
|
+
declare function getProfilePopoverId(idPrefix: string): string;
|
|
38
|
+
declare function getCpuDifficultyPopoverId(idPrefix: string): string;
|
|
39
|
+
interface PlayerSetupPanelProps<C extends string = string> {
|
|
40
|
+
idPrefix: string;
|
|
41
|
+
host?: PopoverHost;
|
|
42
|
+
label?: string;
|
|
43
|
+
labelFontFamily?: string;
|
|
44
|
+
color: string;
|
|
45
|
+
onColorChange: (hex: string) => void;
|
|
46
|
+
swatches: SeedColor[];
|
|
47
|
+
takenColor?: string;
|
|
48
|
+
allowSwapTaken?: boolean;
|
|
49
|
+
colorCaption?: string;
|
|
50
|
+
showColor?: boolean;
|
|
51
|
+
colorAlignOverride?: AlignResult;
|
|
52
|
+
colorRotation?: PopoverRotation;
|
|
53
|
+
isHuman: boolean;
|
|
54
|
+
secondPicker?: ReactNode;
|
|
55
|
+
secondPickerId?: string;
|
|
56
|
+
ready?: boolean;
|
|
57
|
+
onToggleReady?: () => void;
|
|
58
|
+
dark: boolean;
|
|
59
|
+
showReadyButton?: boolean;
|
|
60
|
+
profiles?: Profile[];
|
|
61
|
+
selectedProfileId?: string | null;
|
|
62
|
+
takenProfileId?: string | null;
|
|
63
|
+
guestLabel?: string;
|
|
64
|
+
nullLabel?: string;
|
|
65
|
+
onProfileSelect?: (profile: Profile | null) => void;
|
|
66
|
+
onManageProfiles?: () => void;
|
|
67
|
+
cpuDifficulty?: C;
|
|
68
|
+
cpuDifficultyOptions?: LabeledDropdownOption<C>[];
|
|
69
|
+
onCpuDifficultyChange?: (value: C) => void;
|
|
70
|
+
humanIcon?: string;
|
|
71
|
+
cpuIcon?: string;
|
|
72
|
+
previewValue?: (hex: string) => string;
|
|
73
|
+
triggerStyle?: StyleProp<ViewStyle>;
|
|
74
|
+
useSeatPickerAlign?: (open: boolean, contentWidth: number, contentHeight: number) => AlignResult;
|
|
75
|
+
}
|
|
76
|
+
declare function PlayerSetupPanel<C extends string = string>({ idPrefix, host, label, labelFontFamily, color, onColorChange, swatches, takenColor, allowSwapTaken, colorCaption, showColor, colorAlignOverride, colorRotation, isHuman, secondPicker, secondPickerId, ready, onToggleReady, dark, showReadyButton, profiles, selectedProfileId, takenProfileId, guestLabel, nullLabel, onProfileSelect, onManageProfiles, cpuDifficulty, cpuDifficultyOptions, onCpuDifficultyChange, humanIcon, cpuIcon, previewValue, triggerStyle, useSeatPickerAlign }: PlayerSetupPanelProps<C>): react.JSX.Element;
|
|
77
|
+
|
|
78
|
+
interface Props$1 {
|
|
79
|
+
color: string;
|
|
80
|
+
ready: boolean;
|
|
81
|
+
onToggleReady: () => void;
|
|
82
|
+
style?: StyleProp<ViewStyle>;
|
|
83
|
+
labelFontFamily?: string;
|
|
84
|
+
}
|
|
85
|
+
declare function ReadyButton({ color, ready, onToggleReady, style, labelFontFamily }: Props$1): react.JSX.Element;
|
|
86
|
+
|
|
87
|
+
interface Props {
|
|
88
|
+
onBack: () => void;
|
|
89
|
+
onSettings: () => void;
|
|
90
|
+
onRandomize?: () => void;
|
|
91
|
+
onReset?: () => void;
|
|
92
|
+
fg: string;
|
|
93
|
+
popoverOpen: boolean;
|
|
94
|
+
children: ReactNode;
|
|
95
|
+
}
|
|
96
|
+
declare function SharedActionBand({ onBack, onSettings, onRandomize, onReset, fg, popoverOpen, children }: Props): react.JSX.Element;
|
|
97
|
+
|
|
98
|
+
declare function useZoneClampedAlign(open: boolean, contentWidth: number, contentHeight: number, rotation?: PopoverRotation): ReturnType<typeof useAutoAlign>;
|
|
99
|
+
|
|
100
|
+
export { LABELED_DROPDOWN_POPOVER_WIDTH as L, type MenuOption as M, PlayerSetupPanel as P, ReadyButton as R, SharedActionBand as S, LabeledDropdown as a, type LabeledDropdownOption as b, type PlayerSetupPanelProps as c, getCpuDifficultyPopoverId as d, getLabeledDropdownContentHeight as e, getProfilePopoverId as f, getColorPopoverId as g, useZoneClampedAlign as u };
|