@artsy/palette-mobile 19.11.0 → 19.13.0--canary.392.4616.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.
Files changed (75) hide show
  1. package/dist/Theme.d.ts +0 -1
  2. package/dist/elements/ArtsyKeyboardAvoidingView/ArtsyKeyboardAvoidingView.d.ts +0 -1
  3. package/dist/elements/BackButton/BackButton.d.ts +0 -1
  4. package/dist/elements/BackButton/BackButton.stories.d.ts +0 -1
  5. package/dist/elements/Banner/Banner.d.ts +0 -1
  6. package/dist/elements/BorderBox/BorderBox.d.ts +1 -2
  7. package/dist/elements/Button/Button.d.ts +0 -1
  8. package/dist/elements/Button/Button.stories.d.ts +0 -1
  9. package/dist/elements/ButtonNew/Button.d.ts +0 -1
  10. package/dist/elements/Checkbox/Check.d.ts +0 -1
  11. package/dist/elements/Checkbox/Checkbox.d.ts +0 -1
  12. package/dist/elements/Checkbox/Checkbox.stories.d.ts +5 -6
  13. package/dist/elements/Chip/Chip.stories.d.ts +0 -1
  14. package/dist/elements/ClassTheme/ClassTheme.d.ts +1 -2
  15. package/dist/elements/Collapse/Collapse.stories.d.ts +0 -1
  16. package/dist/elements/CollapsibleMenuItem/CollapsibleMenuItem.d.ts +1 -2
  17. package/dist/elements/EntityHeader/EntityHeader.d.ts +0 -1
  18. package/dist/elements/Flex/Flex.d.ts +0 -1
  19. package/dist/elements/Image/Image.d.ts +0 -1
  20. package/dist/elements/Input/Input.d.ts +0 -2
  21. package/dist/elements/Input/Input.js +2 -2
  22. package/dist/elements/Input/Input.tests.js +1 -1
  23. package/dist/elements/Input/InputTitle.d.ts +0 -1
  24. package/dist/elements/Join/Join.d.ts +0 -1
  25. package/dist/elements/LegacyScreen/LegacyScreen.d.ts +2 -3
  26. package/dist/elements/LegacyTabs/StepTabs.d.ts +0 -1
  27. package/dist/elements/LegacyTabs/TabBarContainer.d.ts +0 -1
  28. package/dist/elements/List/BulletedItem.d.ts +0 -1
  29. package/dist/elements/MeasuredView/MeasuredView.d.ts +0 -1
  30. package/dist/elements/MenuItem/MenuItem.d.ts +0 -1
  31. package/dist/elements/Message/Message.d.ts +0 -1
  32. package/dist/elements/Pill/Pill.d.ts +0 -1
  33. package/dist/elements/Popover/Popover.d.ts +0 -1
  34. package/dist/elements/Radio/RadioButton.d.ts +0 -1
  35. package/dist/elements/Screen/Background.d.ts +0 -1
  36. package/dist/elements/Screen/Body.d.ts +0 -1
  37. package/dist/elements/Screen/BottomView.d.ts +0 -1
  38. package/dist/elements/Screen/FloatingHeader.d.ts +0 -1
  39. package/dist/elements/Screen/FullWidthDivider.d.ts +0 -1
  40. package/dist/elements/Screen/FullWidthItem.d.ts +0 -1
  41. package/dist/elements/Screen/ScreenBase.d.ts +0 -1
  42. package/dist/elements/Screen/ScreenFlatList.d.ts +0 -1
  43. package/dist/elements/Screen/ScreenScrollContext.d.ts +0 -1
  44. package/dist/elements/Screen/StickySubHeader.d.ts +0 -1
  45. package/dist/elements/Screen/index.d.ts +3 -4
  46. package/dist/elements/SearchInput/RoundSearchInput.d.ts +0 -1
  47. package/dist/elements/SearchInput/RoundSearchInput.js +2 -2
  48. package/dist/elements/Separator/Separator.d.ts +1 -2
  49. package/dist/elements/Separator/Separator.stories.d.ts +1 -1
  50. package/dist/elements/Separator/ShadowSeparator.d.ts +1 -1
  51. package/dist/elements/SimpleMessage/SimpleMessage.d.ts +0 -1
  52. package/dist/elements/Skeleton/Skeleton.stories.d.ts +0 -1
  53. package/dist/elements/Spinner/Spinner.d.ts +0 -1
  54. package/dist/elements/Tabs/SubTabBar.d.ts +0 -1
  55. package/dist/elements/Tabs/TabScrollView.d.ts +0 -1
  56. package/dist/elements/Tabs/Tabs.d.ts +6 -7
  57. package/dist/elements/Tabs/TabsContainer.d.ts +0 -1
  58. package/dist/elements/Tabs/TabsWithHeader.d.ts +0 -1
  59. package/dist/elements/Text/Text.d.ts +0 -1
  60. package/dist/elements/Text/Text.js +1 -1
  61. package/dist/elements/ToolTip/ToolTip.d.ts +0 -1
  62. package/dist/elements/ToolTip/ToolTipFlyout.d.ts +0 -1
  63. package/dist/elements/Touchable/Touchable.stories.d.ts +0 -1
  64. package/dist/elements/Touchable/TouchableHighlightColor.d.ts +0 -1
  65. package/dist/elements/VisualClue/VisualClueDot.d.ts +0 -1
  66. package/dist/elements/VisualClue/VisualClueText.d.ts +0 -1
  67. package/dist/setupJest.js +1 -1
  68. package/dist/storybook/decorators.js +2 -1
  69. package/dist/tokens.js +2 -2
  70. package/dist/types.d.ts +2 -2
  71. package/dist/utils/Wrap.d.ts +0 -1
  72. package/dist/utils/hooks/useSpace.d.ts +1 -1
  73. package/dist/utils/hooks/useTheme.d.ts +1 -3
  74. package/dist/utils/types.js +0 -1
  75. package/package.json +18 -17
package/dist/Theme.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ThemeType, ThemeWithDarkModeType, THEMES } from "./tokens";
3
2
  type ThemeOptions = keyof typeof THEMES;
4
3
  interface ThemeProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const ArtsyKeyboardAvoidingViewContext: import("react").Context<{
3
2
  isPresentedModally: boolean;
4
3
  isVisible: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TouchableOpacityProps, ViewProps } from "react-native";
3
2
  import { Color } from "../../types";
4
3
  export interface BackButtonProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: {
3
2
  title: string;
4
3
  component: import("react").FC<import("./BackButton").BackButtonProps>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FlexProps } from "styled-system";
3
2
  export type BannerVariant = keyof typeof BANNER_VARIANTS;
4
3
  export interface CommonBannerProps extends FlexProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { BorderProps, SpaceProps } from "styled-system";
3
2
  import { SpacingUnitsTheme } from "../../tokens";
4
3
  import { FlexProps } from "../Flex";
@@ -9,4 +8,4 @@ export interface BorderBoxProps extends FlexProps, BorderProps, SpaceProps<Spaci
9
8
  * A `View` or `div` (depending on the platform) that has a common border
10
9
  * and padding set by default
11
10
  */
12
- export declare const BorderBox: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").BoxProps & import("react").RefAttributes<import("react-native/types").View>>, any, BorderBoxProps, never>;
11
+ export declare const BorderBox: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").BoxProps & import("react").RefAttributes<import("react-native").View>>, any, BorderBoxProps, never>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TextVariant } from "@artsy/palette-tokens/dist/typography/v3";
3
2
  import { PressableProps } from "react-native";
4
3
  import { HapticFeedbackTypes } from "react-native-haptic-feedback";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ButtonProps } from "./Button";
3
2
  declare const _default: {
4
3
  title: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PressableProps } from "react-native";
3
2
  import { HapticFeedbackTypes } from "react-native-haptic-feedback";
4
3
  import { BoxProps } from "../Box";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const CHECK_SIZE = 22;
3
2
  export interface CheckProps {
4
3
  disabled?: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Insets, TouchableWithoutFeedbackProps } from "react-native";
3
2
  import { FlexProps } from "../Flex";
4
3
  type CheckboxProps = Omit<TouchableWithoutFeedbackProps, "hitSlop"> & Omit<FlexProps, "hitSlop"> & {
@@ -1,14 +1,13 @@
1
- /// <reference types="react" />
2
1
  declare const _default: {
3
2
  title: string;
4
- component: import("react").FC<Omit<import("react-native/types").TouchableWithoutFeedbackProps, "hitSlop"> & Omit<import("..").BoxProps, "hitSlop"> & {
5
- hitSlop?: import("react-native/types").Insets;
3
+ component: import("react").FC<Omit<import("react-native").TouchableWithoutFeedbackProps, "hitSlop"> & Omit<import("..").BoxProps, "hitSlop"> & {
4
+ hitSlop?: import("react-native").Insets;
6
5
  checked?: boolean;
7
6
  disabled?: boolean;
8
7
  error?: boolean;
9
- text?: string | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
10
- subtitle?: string | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
11
- children?: string | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
8
+ text?: React.ReactElement | string;
9
+ subtitle?: React.ReactElement | string;
10
+ children?: React.ReactElement | string;
12
11
  accessibilityLabel?: string;
13
12
  accessibilityHint?: string;
14
13
  }>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: {
3
2
  title: string;
4
3
  component: import("react").FC<import("./Chip").ChipProps>;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { useTheme } from "../../";
3
2
  export declare const ClassTheme: ({ theme, children, }: {
4
3
  theme?: "v3";
5
- children: import("react").ReactNode | ((helpers: ReturnType<typeof useTheme>) => React.ReactNode);
4
+ children: React.ReactNode | ((helpers: ReturnType<typeof useTheme>) => React.ReactNode);
6
5
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: {
3
2
  title: string;
4
3
  component: import("react").FC<import("./Collapse").CollapseProps>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface CollapsableMenuItemProps {
3
2
  overtitle?: string;
4
3
  title: string;
@@ -15,6 +14,6 @@ export interface CollapsibleMenuItem {
15
14
  offsetTop: () => Promise<number>;
16
15
  }
17
16
  export declare const CollapsibleMenuItem: import("react").ForwardRefExoticComponent<CollapsableMenuItemProps & {
18
- children?: import("react").ReactNode;
17
+ children?: import("react").ReactNode | undefined;
19
18
  } & import("react").RefAttributes<CollapsibleMenuItem>>;
20
19
  export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { AvatarSize } from "../Avatar";
3
2
  import { FlexProps } from "../Flex";
4
3
  export interface EntityHeaderProps extends FlexProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { View } from "react-native";
3
2
  import { BoxProps } from "../Box";
4
3
  export type FlexProps = BoxProps;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FastImageProps } from "@d11/react-native-fast-image";
3
2
  import { StyleProp, ViewStyle } from "react-native";
4
3
  import { GeminiResizeMode } from "../../utils/createGeminiUrl";
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="react" />
3
1
  import { EventEmitter } from "events";
4
2
  import { TextInput, TextInputProps } from "react-native";
5
3
  export declare const inputEvents: EventEmitter<[never]>;
@@ -344,8 +344,8 @@ export const Input = forwardRef(({ addClearListener = false, defaultValue, disab
344
344
  }
345
345
  return (_jsx(Flex, { style: {
346
346
  position: "absolute",
347
- top: -10000,
348
- width: 10000,
347
+ top: -10000, // make sure its off the screen
348
+ width: 10000, // make sure Texts can take as much space as they need
349
349
  alignItems: "baseline", // this is to make Texts get the smallest width they can get to fit the text
350
350
  }, children: placeholder.map((placeholderString, index) => (_jsx(Text, { onLayout: (event) => {
351
351
  placeholderWidths.current[index] = event.nativeEvent.layout.width;
@@ -10,7 +10,7 @@ describe("Input", () => {
10
10
  });
11
11
  it("uses correct font family", () => {
12
12
  renderWithWrappers(_jsx(Input, { testID: testID, placeholder: "input" }));
13
- expect(screen.getByPlaceholderText("input")).toHaveStyle({ fontFamily: "Unica77LL-Regular" });
13
+ expect(screen.getByPlaceholderText("input").props.style[0].fontFamily).toEqual("Unica77LL-Regular");
14
14
  });
15
15
  it("mutates given text as value", () => {
16
16
  renderWithWrappers(_jsx(Input, { testID: testID }));
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const InputTitle: React.FC<{
3
2
  children: React.ReactNode;
4
3
  optional?: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface JoinProps {
3
2
  children: React.ReactNode;
4
3
  separator: React.ReactElement;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FlexProps } from "../Flex";
3
2
  interface HeaderProps {
4
3
  onBack?: () => void;
@@ -24,10 +23,10 @@ export declare const LegacyScreen: (({ children }: {
24
23
  Header: import("react").FC<HeaderProps>;
25
24
  FloatingHeader: import("react").FC<HeaderProps>;
26
25
  Background: import("react").FC<{
27
- children?: import("react").ReactNode;
26
+ children?: import("react").ReactNode | undefined;
28
27
  }>;
29
28
  BottomView: import("react").FC<{
30
- children?: import("react").ReactNode;
29
+ children?: import("react").ReactNode | undefined;
31
30
  }>;
32
31
  BodyXPadding: import("react").FC<import("..").BoxProps>;
33
32
  SafeBottomPadding: () => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TabsProps } from "../LegacyTabs";
3
2
  /**
4
3
  * Renders a list of tabs. Evenly-spaces them across the screen with
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Animated, LayoutRectangle } from "react-native";
3
2
  export declare const TAB_BAR_HEIGHT = 48;
4
3
  export interface TabBarContainerProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FlexProps } from "../Flex";
3
2
  interface BulletedItemProps extends FlexProps {
4
3
  children: React.ReactNode;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ViewStyle } from "react-native";
3
2
  export interface ViewMeasurements {
4
3
  width: number;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface MenuItemProps {
3
2
  disabled?: boolean;
4
3
  title: React.ReactNode;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FlexProps } from "../Flex";
3
2
  import { TextProps } from "../Text";
4
3
  type MessageVariant = "default" | "info" | "success" | "alert" | "warning" | "error" | "dark";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { IconProps } from "@artsy/icons/native";
3
2
  import { MotiPressableProps } from "moti/interactions";
4
3
  import { FlattenInterpolation } from "styled-components";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import RNPopover from "react-native-popover-view";
3
2
  import { PopoverProps as RNPopoverProps } from "react-native-popover-view/dist/Types";
4
3
  interface PopoverProps extends Omit<RNPopoverProps, "placement"> {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TextVariant } from "@artsy/palette-tokens/dist/typography/v3";
3
2
  import { Insets, TouchableWithoutFeedbackProps } from "react-native";
4
3
  import { FlexProps } from "../Flex";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const Background: React.FC<{
3
2
  children: React.ReactNode;
4
3
  }>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type ScrollViewProps } from "react-native";
3
2
  import { FlexProps } from "../Flex";
4
3
  interface BodyBaseProps extends FlexProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface BottomViewProps {
3
2
  children: React.ReactNode;
4
3
  darkMode?: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FlexProps } from "../Flex";
3
2
  export interface FloatingHeaderProps extends FlexProps {
4
3
  onBack?: () => void;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { FlexProps } from "../Flex";
3
2
  export declare const FullWidthDivider: React.FC<FlexProps>;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { FlexProps } from "../Flex";
3
2
  export declare const FullWidthItem: React.FC<FlexProps>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FlexProps } from "../Flex";
3
2
  export interface ScreenBaseProps extends FlexProps {
4
3
  children: React.ReactNode;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FlatList, FlatListProps } from "react-native";
3
2
  export type ScreenFlatListProps<T> = Omit<FlatListProps<T>, "CellRendererComponent"> & {
4
3
  innerRef?: React.ForwardedRef<FlatList<T>>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SharedValue } from "react-native-reanimated";
3
2
  export interface ScreenScrollContextProps {
4
3
  currentScrollYAnimated: SharedValue<number>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface StickySubHeaderProps extends React.PropsWithChildren<{}> {
3
2
  title: string;
4
3
  /**
@@ -1,10 +1,9 @@
1
- /// <reference types="react" />
2
1
  import { ScreenFlatList } from "./ScreenFlatList";
3
2
  export * from "./constants";
4
3
  export declare const Screen: import("react").FC<import("./ScreenBase").ScreenBaseProps> & {
5
4
  AnimatedHeader: import("react").FC<import("./Header").HeaderProps>;
6
5
  Background: import("react").FC<{
7
- children: import("react").ReactNode;
6
+ children: React.ReactNode;
8
7
  }>;
9
8
  Body: import("react").FC<import("./Body").BodyProps>;
10
9
  BottomView: import("react").FC<import("./BottomView").BottomViewProps>;
@@ -14,9 +13,9 @@ export declare const Screen: import("react").FC<import("./ScreenBase").ScreenBas
14
13
  FullWidthItem: import("react").FC<import("..").BoxProps>;
15
14
  Header: import("react").FC<import("./Header").HeaderProps>;
16
15
  ScreenScrollContextProvider: import("react").FC<{
17
- children?: import("react").ReactNode;
16
+ children?: import("react").ReactNode | undefined;
18
17
  }>;
19
- ScrollView: import("react").FC<import("react-native/types").ScrollViewProps>;
18
+ ScrollView: import("react").FC<import("react-native").ScrollViewProps>;
20
19
  StickySubHeader: import("react").FC<import("./StickySubHeader").StickySubHeaderProps>;
21
20
  useListenForScreenScroll: () => {
22
21
  scrollHandler: import("react-native-reanimated").ScrollHandlerProcessed<Record<string, unknown>>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TextInputProps } from "react-native";
3
2
  interface RoundSearchInputProps extends Omit<TextInputProps, "placeholder"> {
4
3
  onLeftIconPress?: () => void;
@@ -61,8 +61,8 @@ export const RoundSearchInput = ({ value, placeholder, onLeftIconPress, ...rest
61
61
  }
62
62
  return (_jsx(Flex, { style: {
63
63
  position: "absolute",
64
- top: -10000,
65
- width: 10000,
64
+ top: -10000, // make sure its off the screen
65
+ width: 10000, // make sure Texts can take as much space as they need
66
66
  alignItems: "baseline", // this is to make Texts get the smallest width they can get to fit the text
67
67
  }, children: placeholder.map((placeholderString, index) => (_jsx(Text, { onLayout: (event) => {
68
68
  placeholderWidths.current[index] = event.nativeEvent.layout.width;
@@ -1,8 +1,7 @@
1
- /// <reference types="styled-components-react-native" />
2
1
  import { BorderProps, SpaceProps, WidthProps } from "styled-system";
3
2
  export interface SeparatorProps extends SpaceProps, WidthProps, BorderProps {
4
3
  }
5
4
  /**
6
5
  * A horizontal divider whose width and spacing can be adjusted
7
6
  */
8
- export declare const Separator: import("styled-components").StyledComponent<typeof import("react-native/types").View, import("styled-components").DefaultTheme, SeparatorProps, never>;
7
+ export declare const Separator: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, SeparatorProps, never>;
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  title: string;
3
- component: import("styled-components").StyledComponent<typeof import("react-native/types").View, import("styled-components").DefaultTheme, import("./Separator").SeparatorProps, never>;
3
+ component: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, import("./Separator").SeparatorProps, never>;
4
4
  };
5
5
  export default _default;
6
6
  export declare const Styled: () => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- export declare const ShadowSeparator: import("styled-components").StyledComponent<typeof import("react-native/types").View, any, import("./Separator").SeparatorProps, never>;
1
+ export declare const ShadowSeparator: import("styled-components").StyledComponent<typeof import("react-native").View, any, import("./Separator").SeparatorProps, never>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FlexProps } from "../Flex";
3
2
  import { TextProps } from "../Text";
4
3
  interface SimpleMessageProps extends FlexProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: {
3
2
  title: string;
4
3
  component: import("react").FC<{
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ViewProps } from "react-native";
3
2
  import { Color } from "../../types";
4
3
  export interface SpinnerProps extends ViewProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Use to position content directly below the tab bar, and for it to stick while
4
3
  * scrolling in the subview.
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { ScrollViewProps } from "react-native";
3
2
  export declare const TabScrollView: React.FC<ScrollViewProps>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { useAnimatedTabIndex, useCurrentTabScrollY, useFocusedTab, useHeaderMeasurements } from "react-native-collapsible-tab-view";
3
2
  import { TabFlashList } from "./TabFlashList";
4
3
  import { TabFlatList } from "./TabFlatList";
@@ -11,14 +10,14 @@ export declare const Tabs: import("react").FC<import("./TabsContainer").TabsCont
11
10
  cancelLazyFadeIn?: boolean;
12
11
  mountDelayMs?: number;
13
12
  startMounted?: boolean;
14
- children: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
13
+ children: React.ReactElement;
15
14
  }>;
16
- ScrollView: import("react").FC<import("react-native/types").ScrollViewProps>;
17
- SectionList: <T>(p: import("react-native/types").SectionListProps<T, import("react-native/types").DefaultSectionT> & {
18
- ref?: import("react").Ref<import("react-native/types").SectionList<T, import("react-native/types").DefaultSectionT>>;
19
- }) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
15
+ ScrollView: import("react").FC<import("react-native").ScrollViewProps>;
16
+ SectionList: <T>(p: import("react-native").SectionListProps<T> & {
17
+ ref?: React.Ref<import("react-native").SectionList<T>>;
18
+ }) => React.ReactElement;
20
19
  SubTabBar: import("react").FC<{
21
- children?: import("react").ReactNode;
20
+ children?: import("react").ReactNode | undefined;
22
21
  }>;
23
22
  Tab: typeof import("react-native-collapsible-tab-view").Tab;
24
23
  TabsWithHeader: import("react").FC<import("./TabsWithHeader").TabsWithHeaderProps>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CollapsibleProps, TabItemProps } from "react-native-collapsible-tab-view";
3
2
  interface Indicator {
4
3
  tabName: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CollapsibleProps } from "react-native-collapsible-tab-view";
3
2
  import { TabsContainerProps } from "./TabsContainer";
4
3
  import { HeaderProps } from "../Screen/Header";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TextVariant } from "@artsy/palette-tokens/dist/typography/v3";
3
2
  import { Text as RNText, TextProps as RNTextProps } from "react-native";
4
3
  import { ColorProps, LineHeightProps, SpaceProps, TypographyProps } from "styled-system";
@@ -11,7 +11,7 @@ export const Text = forwardRef(({ variant = "sm", italic = false, color = "onBac
11
11
  const nativeTextStyle = [caps ? { textTransform: "uppercase" } : {}];
12
12
  return (_jsx(InnerStyledText, { ref: ref, selectable: selectable, style: [
13
13
  ...nativeTextStyle,
14
- { textAlignVertical: "center" },
14
+ { textAlignVertical: "center" }, // android renders text higher by default, so we bring it down to be consistent with ios
15
15
  { textDecorationLine: !!underline ? "underline" : "none" },
16
16
  !!maxWidth ? { width: "100%", maxWidth: 600, alignSelf: "center" } : {},
17
17
  style, // keep last so we can override
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface ToolTipContextValues {
3
2
  dismissToolTip: () => void;
4
3
  setToolTip: (toolTip: string) => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ViewStyle } from "react-native";
3
2
  interface Props {
4
3
  containerStyle?: ViewStyle;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: {
3
2
  title: string;
4
3
  component: import("react").FC<import("./Touchable").TouchableProps>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TouchableProps } from "./Touchable";
3
2
  import { Color } from "../../types";
4
3
  interface TouchableHighlightState {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { StyleProp, ViewStyle } from "react-native";
3
2
  import { Color } from "../../types";
4
3
  interface VisualClueDotProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { StyleProp, ViewStyle } from "react-native";
3
2
  export declare const VisualClueText: React.FC<{
4
3
  style?: StyleProp<ViewStyle>;
package/dist/setupJest.js CHANGED
@@ -6,4 +6,4 @@ jest.mock("react-native-blurhash", () => {
6
6
  Blurhash: ReactNative.View,
7
7
  };
8
8
  });
9
- require("react-native-reanimated").setUpTests();
9
+ jest.mock("react-native-reanimated", () => require("react-native-reanimated/mock"));
@@ -13,7 +13,8 @@ export const withTheme = (story) => (_jsxs(Theme, { theme: "v3light", children:
13
13
  const atomStorage = createJSONStorage(() => AsyncStorage);
14
14
  const atomWithAsyncStorage = (key, initialValue) => atomWithStorage(key, initialValue, {
15
15
  ...atomStorage,
16
- delayInit: true,
16
+ }, {
17
+ getOnInit: false,
17
18
  });
18
19
  const modeAtom = atomWithAsyncStorage("dark-mode-mode", "system");
19
20
  export const useDarkModeSwitcher = (story) => {
package/dist/tokens.js CHANGED
@@ -16,12 +16,12 @@ export const COLOR_LAYER_ROLE = [
16
16
  // onName: Anything small, texts, icons, etc.
17
17
  // onNameContrast: Anything small, texts, icons, etc based on contrast.
18
18
  "background",
19
- "onBackground",
19
+ "onBackground", // same as onBackgroundHigh
20
20
  "onBackgroundHigh",
21
21
  "onBackgroundMedium",
22
22
  "onBackgroundLow",
23
23
  "surface",
24
- "onSurface",
24
+ "onSurface", // same as onSurfaceHigh
25
25
  "onSurfaceHigh",
26
26
  "onSurfaceMedium",
27
27
  "onSurfaceLow",
package/dist/types.d.ts CHANGED
@@ -12,5 +12,5 @@ export type ColorLayerRole = typeof COLOR_LAYER_ROLE[number];
12
12
  export type ColorCSS = string & {};
13
13
  export type ColorDSValue = ColorLayerName | ColorLayerRole;
14
14
  export type Color = ColorLayerName | ColorLayerRole | ColorCSS;
15
- export declare const isRoleLayer: (name: Color) => name is "background" | "onBackground" | "onBackgroundHigh" | "onBackgroundMedium" | "onBackgroundLow" | "surface" | "onSurface" | "onSurfaceHigh" | "onSurfaceMedium" | "onSurfaceLow" | "primary" | "onPrimaryHigh" | "onPrimaryMedium" | "onPrimaryLow" | "secondary" | "onSecondaryHigh" | "onSecondaryMedium" | "onSecondaryLow" | "brand" | "onBrand";
16
- export declare const isNameLayer: (name: Color) => name is "brand" | "devpurple" | "mono100" | "mono60" | "mono30" | "mono15" | "mono10" | "mono5" | "mono0" | "blue200" | "blue150" | "blue100" | "blue15" | "blue10" | "green150" | "green100" | "green10" | "yellow150" | "yellow100" | "yellow10" | "orange150" | "orange100" | "orange10" | "red150" | "red100" | "red50" | "red10";
15
+ export declare const isRoleLayer: (name: Color) => name is ColorLayerRole;
16
+ export declare const isNameLayer: (name: Color) => name is ColorLayerName;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface WrapProps {
3
2
  if: boolean;
4
3
  children?: React.ReactNode;
@@ -1 +1 @@
1
- export declare const useSpace: () => (spaceName: 2 | 0.5 | 1 | 4 | 6 | 12) => number;
1
+ export declare const useSpace: () => (spaceName: import("@artsy/palette-tokens").SpacingUnit) => number;
@@ -1,5 +1,5 @@
1
1
  import { SpacingUnit } from "@artsy/palette-tokens/dist/themes/v3";
2
- import { AllThemesType, ThemeType, ThemeWithDarkModeType } from "../../tokens";
2
+ import { ThemeType, ThemeWithDarkModeType } from "../../tokens";
3
3
  import { Color, ColorDSValue } from "../../types";
4
4
  export declare const useTheme: () => {
5
5
  theme: ThemeType | ThemeWithDarkModeType;
@@ -7,11 +7,9 @@ export declare const useTheme: () => {
7
7
  color: ColorFn;
8
8
  };
9
9
  type SpaceFn = (spaceName: SpacingUnit) => number;
10
- declare const space: (theme: AllThemesType) => SpaceFn;
11
10
  export interface ColorFn {
12
11
  (colorNumber: undefined): undefined;
13
12
  (colorNumber: ColorDSValue | Color): string;
14
13
  (colorNumber: ColorDSValue | Color | undefined): string | undefined;
15
14
  }
16
- declare const color: (theme: AllThemesType) => ColorFn;
17
15
  export {};
@@ -1 +0,0 @@
1
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/palette-mobile",
3
- "version": "19.11.0",
3
+ "version": "19.13.0--canary.392.4616.0",
4
4
  "description": "Artsy's design system for React Native",
5
5
  "scripts": {
6
6
  "android": "expo run:android --port 8082",
@@ -14,6 +14,7 @@
14
14
  "lint": "eslint --cache --cache-location '.cache/eslint/' --ext .ts,.tsx --fix",
15
15
  "local-palette-dev": "./scripts/sync-after-change",
16
16
  "open-xcode": "open ios/PaletteMobile.xcworkspace",
17
+ "postinstall": "yarn patch-package",
17
18
  "prebuild": "npx expo prebuild",
18
19
  "prepare": "patch-package && husky install",
19
20
  "prepublishOnly": "yarn clean && yarn compile",
@@ -45,7 +46,7 @@
45
46
  "react-nanny": "^2.15.0",
46
47
  "react-native-blurhash": "2.1.1",
47
48
  "react-native-collapsible-tab-view": "^8.0.1",
48
- "react-native-pager-view": "6.5.0",
49
+ "react-native-pager-view": "6.7.1",
49
50
  "react-native-popover-view": "^6.1.0",
50
51
  "react-spring": "8.0.23",
51
52
  "styled-system": "^5.1.5"
@@ -76,15 +77,15 @@
76
77
  "@babel/preset-react": "7.18.6",
77
78
  "@babel/preset-typescript": "7.18.6",
78
79
  "@babel/runtime": "^7.25.0",
79
- "@react-native-async-storage/async-storage": "2.0.0",
80
+ "@react-native-async-storage/async-storage": "2.2.0",
80
81
  "@react-native/eslint-config": "0.76.9",
81
82
  "@storybook/react-native": "7.6.20",
82
83
  "@testing-library/react-native": "13.2.0",
83
84
  "@types/events": "^3.0.0",
84
85
  "@types/jest": "29.4.0",
85
86
  "@types/lodash": "4.14.191",
86
- "@types/react": "18.3.12",
87
- "@types/react-test-renderer": "18.3.0",
87
+ "@types/react": "~19.0.10",
88
+ "@types/react-test-renderer": "19.0.0",
88
89
  "@types/styled-components": "^5.1.26",
89
90
  "@types/styled-components-react-native": "^5.2.1",
90
91
  "@types/styled-system": "^5.1.16",
@@ -106,33 +107,33 @@
106
107
  "eslint-plugin-react-native-a11y": "^3.5.1",
107
108
  "eslint-plugin-storybook": "0.6.10",
108
109
  "eslint-plugin-testing-library": "6.4.0",
109
- "expo": "~52.0.0",
110
- "expo-dev-client": "~5.0.20",
110
+ "expo": "^53.0.0",
111
+ "expo-dev-client": "~5.2.4",
111
112
  "husky": "^8.0.3",
112
- "jest": "29.6.3",
113
+ "jest": "~29.7.0",
113
114
  "jest-environment-jsdom": "29.4.2",
114
115
  "jest-extended": "3.2.3",
115
116
  "jest-watch-typeahead": "2.2.2",
116
- "jotai": "1.12.1",
117
+ "jotai": "^2.15.0",
117
118
  "lint-staged": "13.1.2",
118
119
  "nodemon": "^2.0.20",
119
120
  "patch-package": "^8.0.0",
120
121
  "postinstall-prepare": "^2.0.0",
121
122
  "prettier": "^2.8.8",
122
123
  "pull-lock": "1.0.0",
123
- "react": "18.3.1",
124
- "react-dom": "18.3.1",
125
- "react-native": "0.76.9",
124
+ "react": "19.0.0",
125
+ "react-dom": "19.0.0",
126
+ "react-native": "0.79.6",
126
127
  "react-native-device-info": "14.0.4",
127
128
  "react-native-haptic-feedback": "1.14.0",
128
129
  "react-native-linear-gradient": "2.6.2",
129
- "react-native-reanimated": "3.16.7",
130
+ "react-native-reanimated": "3.17.5",
130
131
  "react-native-safe-area-context": "5.4.1",
131
- "react-native-svg": "15.10.1",
132
- "react-test-renderer": "18.3.1",
132
+ "react-native-svg": "15.12.0",
133
+ "react-test-renderer": "19.0.0",
133
134
  "rimraf": "4.1.2",
134
- "styled-components": "^5.3.6",
135
- "typescript": "5.0.4"
135
+ "styled-components": "5.3.6",
136
+ "typescript": "5.8.3"
136
137
  },
137
138
  "resolutions": {
138
139
  "@types/react": "18.3.12"