@artsy/palette-mobile 19.5.0--canary.373.4328.0 → 19.5.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.
@@ -3,7 +3,6 @@ import { Component } from "react";
3
3
  import { Animated } from "react-native";
4
4
  export class CssTransition extends Component {
5
5
  animatedValue = new Animated.Value(0);
6
- // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time 🙏
7
6
  constructor(props) {
8
7
  super(props);
9
8
  this.state = {
@@ -28,7 +27,6 @@ export class CssTransition extends Component {
28
27
  const prevStyle = this.mergeStyles(previousStyle);
29
28
  const nextStyle = this.mergeStyles(style);
30
29
  const animateCheckboxStyle = this.props.animate.reduce((acc, cssProperty) => {
31
- // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time 🙏
32
30
  acc[cssProperty] = this.animatedValue.interpolate({
33
31
  inputRange: [0, 1],
34
32
  outputRange: [prevStyle[cssProperty], nextStyle[cssProperty]],
@@ -37,9 +35,7 @@ export class CssTransition extends Component {
37
35
  }, {});
38
36
  return _jsx(Animated.View, { style: [style, animateCheckboxStyle], ...props });
39
37
  }
40
- // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time 🙏
41
38
  mergeStyles(style) {
42
- // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time 🙏
43
39
  return style.reduce((acc, obj) => {
44
40
  Object.keys(obj).forEach((key) => (acc[key] = obj[key]));
45
41
  return acc;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from "react";
3
3
  import { Pressable } from "react-native";
4
- import { trigger } from "react-native-haptic-feedback";
4
+ import Haptic from "react-native-haptic-feedback";
5
5
  import Animated, { interpolateColor, useAnimatedReaction, useAnimatedStyle, useDerivedValue, useSharedValue, withTiming, } from "react-native-reanimated";
6
6
  import { useColorsForVariantAndState } from "./colors";
7
7
  import { MeasuredView } from "../../elements/MeasuredView";
@@ -45,7 +45,7 @@ export const Button = ({ children, disabled: disabledProp, haptic, icon, iconPos
45
45
  return;
46
46
  }
47
47
  if (haptic !== undefined) {
48
- trigger(haptic === true ? "impactLight" : haptic);
48
+ Haptic.trigger(haptic === true ? "impactLight" : haptic);
49
49
  }
50
50
  onPress(event);
51
51
  };
@@ -2,15 +2,15 @@
2
2
  declare const _default: {
3
3
  title: string;
4
4
  component: import("react").FC<Omit<import("react-native/types").TouchableWithoutFeedbackProps, "hitSlop"> & Omit<import("..").BoxProps, "hitSlop"> & {
5
- hitSlop?: import("react-native/types").Insets | undefined;
6
- checked?: boolean | undefined;
7
- disabled?: boolean | undefined;
8
- error?: boolean | undefined;
9
- text?: string | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
10
- subtitle?: string | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
11
- children?: string | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
12
- accessibilityLabel?: string | undefined;
13
- accessibilityHint?: string | undefined;
5
+ hitSlop?: import("react-native/types").Insets;
6
+ checked?: boolean;
7
+ disabled?: boolean;
8
+ 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>>;
12
+ accessibilityLabel?: string;
13
+ accessibilityHint?: string;
14
14
  }>;
15
15
  };
16
16
  export default _default;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { useTheme } from "../../";
3
3
  export declare const ClassTheme: ({ theme, children, }: {
4
- theme?: "v3" | undefined;
4
+ theme?: "v3";
5
5
  children: import("react").ReactNode | ((helpers: ReturnType<typeof useTheme>) => React.ReactNode);
6
6
  }) => import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { fireEvent, screen } from "@testing-library/react-native";
3
3
  import { Input } from "./Input";
4
4
  import { renderWithWrappers } from "../../utils/tests/renderWithWrappers";
5
- describe.skip("Input", () => {
5
+ describe("Input", () => {
6
6
  const testID = "input";
7
7
  it("renders an instance of native TextInput", () => {
8
8
  renderWithWrappers(_jsx(Input, { testID: testID }));
@@ -1,6 +1,6 @@
1
1
  export declare const maskValue: ({ currentValue, mask, previousValue, }: {
2
2
  currentValue: string | undefined;
3
3
  mask: string | string[] | undefined;
4
- previousValue?: string | undefined;
5
- }) => string | undefined;
4
+ previousValue?: string;
5
+ }) => string;
6
6
  export declare const unmaskText: (mask: string) => string;
@@ -30,6 +30,6 @@ export declare const LegacyScreen: (({ children }: {
30
30
  children?: import("react").ReactNode;
31
31
  }>;
32
32
  BodyXPadding: import("react").FC<import("..").BoxProps>;
33
- SafeBottomPadding: () => import("react/jsx-runtime").JSX.Element | null;
33
+ SafeBottomPadding: () => import("react/jsx-runtime").JSX.Element;
34
34
  };
35
35
  export {};
@@ -14,6 +14,6 @@ interface Props {
14
14
  * A view that renders off-screen, measures the width and height of the view, and reports it back.
15
15
  * Note: it is rendering just null when in test mode.
16
16
  */
17
- export declare const MeasuredView: ({ children, setMeasuredState, show }: Props) => import("react/jsx-runtime").JSX.Element | null;
17
+ export declare const MeasuredView: ({ children, setMeasuredState, show }: Props) => import("react/jsx-runtime").JSX.Element;
18
18
  export declare const useOffscreenStyle: (notOffscreen?: boolean) => ViewStyle;
19
19
  export {};
@@ -1,5 +1,5 @@
1
1
  export declare const PopIn: ({ children, xOffset, yOffset, }: {
2
2
  children: React.ReactNode;
3
- xOffset?: number | undefined;
4
- yOffset?: number | undefined;
3
+ xOffset?: number;
4
+ yOffset?: number;
5
5
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- import { FlashListProps, FlashListRef } from "@shopify/flash-list";
1
+ import { MasonryFlashListProps, MasonryFlashListRef } from "@shopify/flash-list";
2
2
  import { Ref } from "react";
3
- export declare function TabMasonry<T>(props: FlashListProps<T> & {
4
- innerRef?: Ref<FlashListRef<T>> | null;
3
+ export declare function TabMasonry<T>(props: MasonryFlashListProps<T> & {
4
+ innerRef?: Ref<MasonryFlashListRef<T>> | null;
5
5
  }): import("react/jsx-runtime").JSX.Element;
@@ -6,7 +6,7 @@ export function TabMasonry(props) {
6
6
  useListenForTabContentScroll();
7
7
  const space = useSpace();
8
8
  const contentContainerStyle = (props.contentContainerStyle ?? {});
9
- return (_jsx(Tabs.FlashList, { masonry: true, contentContainerStyle: {
9
+ return (_jsx(Tabs.MasonryFlashList, { contentContainerStyle: {
10
10
  paddingHorizontal: space(2),
11
11
  ...contentContainerStyle,
12
12
  }, ...props, ref: props.innerRef }));
@@ -8,14 +8,14 @@ export declare const Tabs: import("react").FC<import("./TabsContainer").TabsCont
8
8
  FlashList: typeof TabFlashList;
9
9
  Masonry: typeof TabMasonry;
10
10
  Lazy: import("react").FC<{
11
- cancelLazyFadeIn?: boolean | undefined;
12
- mountDelayMs?: number | undefined;
13
- startMounted?: boolean | undefined;
11
+ cancelLazyFadeIn?: boolean;
12
+ mountDelayMs?: number;
13
+ startMounted?: boolean;
14
14
  children: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
15
15
  }>;
16
16
  ScrollView: import("react").FC<import("react-native/types").ScrollViewProps>;
17
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>> | undefined;
18
+ ref?: import("react").Ref<import("react-native/types").SectionList<T, import("react-native/types").DefaultSectionT>>;
19
19
  }) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
20
20
  SubTabBar: import("react").FC<{
21
21
  children?: import("react").ReactNode;
@@ -1,7 +1,7 @@
1
1
  import { StyleProp, ViewStyle } from "react-native";
2
2
  export declare const DataList: <ItemT>({ data, keyExtractor, renderItem, contentContainerStyle, }: {
3
3
  data: ItemT[];
4
- keyExtractor?: ((item: ItemT, index: number) => string) | undefined;
4
+ keyExtractor?: (item: ItemT, index: number) => string;
5
5
  renderItem: (info: {
6
6
  item: ItemT;
7
7
  index: number;
@@ -12,7 +12,7 @@ export declare const List: ({ children, contentContainerStyle, style, horizontal
12
12
  children: React.ReactElement[] | React.ReactElement;
13
13
  contentContainerStyle?: StyleProp<ViewStyle>;
14
14
  style?: StyleProp<ViewStyle>;
15
- horizontal?: boolean | undefined;
15
+ horizontal?: boolean;
16
16
  }) => import("react/jsx-runtime").JSX.Element;
17
17
  export declare const Row: ({ children }: {
18
18
  children: React.ReactNode;
@@ -1,12 +1,12 @@
1
1
  import { MutableRefObject } from "react";
2
2
  export declare const useMeasure: ({ ref, extraDeps, }: {
3
3
  ref: MutableRefObject<any>;
4
- extraDeps?: string[] | undefined;
4
+ extraDeps?: Array<string>;
5
5
  }) => {
6
- x?: number | undefined;
7
- y?: number | undefined;
8
- width?: number | undefined;
9
- height?: number | undefined;
10
- pageX?: number | undefined;
11
- pageY?: number | undefined;
6
+ x: number;
7
+ y: number;
8
+ width: number;
9
+ height: number;
10
+ pageX: number;
11
+ pageY: number;
12
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/palette-mobile",
3
- "version": "19.5.0--canary.373.4328.0",
3
+ "version": "19.5.0",
4
4
  "description": "Artsy's design system for React Native",
5
5
  "scripts": {
6
6
  "android": "expo run:android --port 8082",
@@ -36,7 +36,7 @@
36
36
  "@artsy/icons": "^3.49.0",
37
37
  "@artsy/palette-tokens": "7.0.0",
38
38
  "@d11/react-native-fast-image": "^8.10.0",
39
- "@shopify/flash-list": "^2.0.3",
39
+ "@shopify/flash-list": "^1.8.3",
40
40
  "@styled-system/core": "^5.1.2",
41
41
  "@styled-system/theme-get": "^5.1.2",
42
42
  "events": "^3.3.0",
@@ -47,7 +47,6 @@
47
47
  "react-native-collapsible-tab-view": "^8.0.1",
48
48
  "react-native-pager-view": "6.5.0",
49
49
  "react-native-popover-view": "^6.1.0",
50
- "react-native-worklets": "^0.5.1",
51
50
  "react-spring": "8.0.23",
52
51
  "styled-system": "^5.1.5"
53
52
  },
@@ -78,13 +77,7 @@
78
77
  "@babel/preset-typescript": "7.18.6",
79
78
  "@babel/runtime": "^7.25.0",
80
79
  "@react-native-async-storage/async-storage": "2.0.0",
81
- "@react-native-community/cli": "15.0.1",
82
- "@react-native-community/cli-platform-android": "15.0.1",
83
- "@react-native-community/cli-platform-ios": "15.0.1",
84
- "@react-native/babel-preset": "0.76.9",
85
80
  "@react-native/eslint-config": "0.76.9",
86
- "@react-native/metro-config": "0.76.9",
87
- "@react-native/typescript-config": "0.76.9",
88
81
  "@storybook/react-native": "6.0.1-beta.11",
89
82
  "@testing-library/react-native": "13.2.0",
90
83
  "@types/events": "^3.0.0",
@@ -122,7 +115,6 @@
122
115
  "jest-watch-typeahead": "2.2.2",
123
116
  "jotai": "1.12.1",
124
117
  "lint-staged": "13.1.2",
125
- "metro-react-native-babel-preset": "0.76.8",
126
118
  "nodemon": "^2.0.20",
127
119
  "patch-package": "^8.0.0",
128
120
  "postinstall-prepare": "^2.0.0",
@@ -134,7 +126,7 @@
134
126
  "react-native-device-info": "14.0.4",
135
127
  "react-native-haptic-feedback": "1.14.0",
136
128
  "react-native-linear-gradient": "2.6.2",
137
- "react-native-reanimated": "^4.1.0",
129
+ "react-native-reanimated": "3.16.7",
138
130
  "react-native-safe-area-context": "5.4.1",
139
131
  "react-native-svg": "15.10.1",
140
132
  "react-test-renderer": "18.3.1",