@swan-io/lake 1.3.2 → 1.4.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/package.json +27 -30
- package/src/components/Caption.d.ts +1 -1
- package/src/components/FixedListViewCells.d.ts +2 -2
- package/src/components/Heading.d.ts +1 -1
- package/src/components/LakeHeading.d.ts +1 -1
- package/src/components/LakeText.d.ts +1 -1
- package/src/components/Link.d.ts +1 -1
- package/src/components/Pressable.d.ts +8 -8
- package/src/components/Stack.d.ts +4 -4
- package/src/components/Svg.d.ts +1 -1
- package/src/constants/insets.js +1 -1
- package/src/utils/array.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swan-io/lake",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=14.0.0",
|
|
6
6
|
"yarn": "^1.20.0"
|
|
@@ -26,36 +26,33 @@
|
|
|
26
26
|
],
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@popperjs/core": "2.11.6",
|
|
30
|
-
"@swan-io/boxed": "0.12.1",
|
|
31
|
-
"@swan-io/chicane": "1.3.4",
|
|
32
|
-
"dayjs": "1.11.7",
|
|
33
|
-
"graphql": "15.8.0",
|
|
34
|
-
"polished": "4.2.2",
|
|
35
|
-
"prism-react-renderer": "1.3.5",
|
|
36
|
-
"react": "18.2.0",
|
|
37
|
-
"react-dom": "18.2.0",
|
|
38
|
-
"react-dropzone": "14.2.3",
|
|
39
|
-
"react-fast-compare": "3.2.
|
|
40
|
-
"react-native-web": "0.18.12",
|
|
41
|
-
"react-popper": "2.3.0",
|
|
42
|
-
"react-ux-form": "1.3.0",
|
|
43
|
-
"rifm": "0.12.1",
|
|
44
|
-
"ts-dedent": "2.2.0",
|
|
45
|
-
"ts-pattern": "4.2.1",
|
|
46
|
-
"urql": "3.0.
|
|
47
|
-
"uuid": "9.0.0"
|
|
29
|
+
"@popperjs/core": "^2.11.6",
|
|
30
|
+
"@swan-io/boxed": "^0.12.1",
|
|
31
|
+
"@swan-io/chicane": "^1.3.4",
|
|
32
|
+
"dayjs": "^1.11.7",
|
|
33
|
+
"graphql": "^15.8.0",
|
|
34
|
+
"polished": "^4.2.2",
|
|
35
|
+
"prism-react-renderer": "^1.3.5",
|
|
36
|
+
"react": "^18.2.0",
|
|
37
|
+
"react-dom": "^18.2.0",
|
|
38
|
+
"react-dropzone": "^14.2.3",
|
|
39
|
+
"react-fast-compare": "^3.2.1",
|
|
40
|
+
"react-native-web": "^0.18.12",
|
|
41
|
+
"react-popper": "^2.3.0",
|
|
42
|
+
"react-ux-form": "^1.3.0",
|
|
43
|
+
"rifm": "^0.12.1",
|
|
44
|
+
"ts-dedent": "^2.2.0",
|
|
45
|
+
"ts-pattern": "^4.2.1",
|
|
46
|
+
"urql": "^3.0.4",
|
|
47
|
+
"uuid": "^9.0.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@storybook/react": "6.5.16",
|
|
51
|
-
"@
|
|
52
|
-
"@
|
|
53
|
-
"@types/react": "
|
|
54
|
-
"@types/
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"jsdom": "21.1.0",
|
|
58
|
-
"type-fest": "3.6.1",
|
|
59
|
-
"vitest": "0.29.2"
|
|
50
|
+
"@storybook/react": "^6.5.16",
|
|
51
|
+
"@types/react": "^18.0.28",
|
|
52
|
+
"@types/react-dom": "^18.0.11",
|
|
53
|
+
"@types/react-native": "^0.70.12",
|
|
54
|
+
"@types/uuid": "^9.0.1",
|
|
55
|
+
"jsdom": "^21.1.1",
|
|
56
|
+
"type-fest": "^3.6.1"
|
|
60
57
|
}
|
|
61
58
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactText } from "react";
|
|
2
2
|
import { Text, TextProps } from "react-native";
|
|
3
3
|
export declare const Caption: import("react").ForwardRefExoticComponent<TextProps & {
|
|
4
|
-
align?: "
|
|
4
|
+
align?: "left" | "right" | "center" | undefined;
|
|
5
5
|
children: ReactText;
|
|
6
6
|
} & import("react").RefAttributes<Text>>;
|
|
@@ -21,7 +21,7 @@ export declare const SimpleTitleCell: ({ isHighlighted, text, }: {
|
|
|
21
21
|
export declare const SimpleRegularTextCell: ({ variant, text, textAlign, }: {
|
|
22
22
|
variant?: "semibold" | "medium" | "regular" | "light" | "smallSemibold" | "smallMedium" | "smallRegular" | undefined;
|
|
23
23
|
text: string;
|
|
24
|
-
textAlign?: "
|
|
24
|
+
textAlign?: "left" | "right" | "center" | undefined;
|
|
25
25
|
}) => JSX.Element;
|
|
26
26
|
export declare const CopyableRegularTextCell: ({ variant, text, copyWording, copiedWording, }: {
|
|
27
27
|
variant?: "semibold" | "medium" | "regular" | "light" | "smallSemibold" | "smallMedium" | "smallRegular" | undefined;
|
|
@@ -33,7 +33,7 @@ export declare const BalanceCell: ({ value, currency, formatCurrency, textAlign,
|
|
|
33
33
|
value: number;
|
|
34
34
|
currency: string;
|
|
35
35
|
formatCurrency: (value: number, currency: string) => string;
|
|
36
|
-
textAlign?: "
|
|
36
|
+
textAlign?: "left" | "right" | "center" | undefined;
|
|
37
37
|
}) => JSX.Element;
|
|
38
38
|
export declare const LinkCell: ({ children, external, onPress, }: {
|
|
39
39
|
children: ReactNode;
|
|
@@ -54,7 +54,7 @@ declare const sizes: {
|
|
|
54
54
|
type HeadingSize = keyof typeof sizes;
|
|
55
55
|
export declare const Heading: import("react").ForwardRefExoticComponent<Except<TextProps, "accessibilityRole"> & {
|
|
56
56
|
level: 1 | 2 | 3 | 4 | 5 | 6;
|
|
57
|
-
align?: "
|
|
57
|
+
align?: "left" | "right" | "center" | undefined;
|
|
58
58
|
size: HeadingSize;
|
|
59
59
|
children: ReactNode;
|
|
60
60
|
} & import("react").RefAttributes<Text>>;
|
|
@@ -2,7 +2,7 @@ import { ReactNode } from "react";
|
|
|
2
2
|
import { Text, TextProps } from "react-native";
|
|
3
3
|
import { Except } from "type-fest";
|
|
4
4
|
export declare const LakeHeading: import("react").ForwardRefExoticComponent<Except<TextProps, "accessibilityRole"> & {
|
|
5
|
-
align?: "
|
|
5
|
+
align?: "left" | "right" | "center" | undefined;
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
color?: string | undefined;
|
|
8
8
|
level: 1 | 2 | 3 | 4 | 5 | 6 | "none";
|
|
@@ -11,7 +11,7 @@ declare const variants: {
|
|
|
11
11
|
};
|
|
12
12
|
export type TextVariant = keyof typeof variants;
|
|
13
13
|
export declare const LakeText: import("react").ForwardRefExoticComponent<TextProps & {
|
|
14
|
-
align?: "
|
|
14
|
+
align?: "left" | "right" | "center" | undefined;
|
|
15
15
|
children: ReactNode;
|
|
16
16
|
color?: string | undefined;
|
|
17
17
|
variant?: "semibold" | "medium" | "regular" | "light" | "smallSemibold" | "smallMedium" | "smallRegular" | undefined;
|
package/src/components/Link.d.ts
CHANGED
|
@@ -109,7 +109,7 @@ export declare const Link: import("react").MemoExoticComponent<import("react").F
|
|
|
109
109
|
selectionColor?: import("react-native").ColorValue | undefined;
|
|
110
110
|
textBreakStrategy?: "simple" | "highQuality" | "balanced" | undefined;
|
|
111
111
|
dataDetectorType?: "none" | "all" | "link" | "phoneNumber" | "email" | null | undefined;
|
|
112
|
-
android_hyphenationFrequency?: "
|
|
112
|
+
android_hyphenationFrequency?: "normal" | "none" | "full" | undefined;
|
|
113
113
|
onBlur?: ((event: import("react-native").NativeSyntheticEvent<import("react").FocusEvent<Element, Element>>) => void) | undefined;
|
|
114
114
|
onFocus?: ((event: import("react-native").NativeSyntheticEvent<import("react").FocusEvent<Element, Element>>) => void) | undefined;
|
|
115
115
|
onPressMove?: ((event: unknown) => void) | undefined;
|
|
@@ -134,7 +134,7 @@ export declare const PressableText: FC<{
|
|
|
134
134
|
selectionColor?: import("react-native").ColorValue | undefined;
|
|
135
135
|
textBreakStrategy?: "simple" | "highQuality" | "balanced" | undefined;
|
|
136
136
|
dataDetectorType?: "none" | "all" | "link" | "phoneNumber" | "email" | null | undefined;
|
|
137
|
-
android_hyphenationFrequency?: "
|
|
137
|
+
android_hyphenationFrequency?: "normal" | "none" | "full" | undefined;
|
|
138
138
|
onBlur?: ((event: NativeSyntheticEvent<React.FocusEvent>) => void) | undefined;
|
|
139
139
|
onFocus?: ((event: NativeSyntheticEvent<React.FocusEvent>) => void) | undefined;
|
|
140
140
|
onPressMove?: ((event: unknown) => void) | undefined;
|
|
@@ -150,14 +150,14 @@ export declare const PressableText: FC<{
|
|
|
150
150
|
ref?: Ref<Text> | undefined;
|
|
151
151
|
}>;
|
|
152
152
|
export declare const PressableTextInput: FC<Except<{
|
|
153
|
-
textAlign?: "
|
|
153
|
+
textAlign?: "left" | "right" | "center" | undefined;
|
|
154
154
|
testID?: string | undefined;
|
|
155
|
-
textAlignVertical?: "auto" | "center" | "
|
|
155
|
+
textAlignVertical?: "auto" | "center" | "top" | "bottom" | undefined;
|
|
156
156
|
style?: false | import("react-native").TextStyle | import("react-native").RegisteredStyle<import("react-native").TextStyle> | import("react-native").RecursiveArray<import("react-native").TextStyle | import("react-native").Falsy | import("react-native").RegisteredStyle<import("react-native").TextStyle>> | ((state: PressableStateCallbackType) => import("react-native").StyleProp<import("react-native").TextStyle>) | null | undefined;
|
|
157
157
|
children?: string | number | boolean | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactFragment | import("react").ReactPortal | ((state: PressableStateCallbackType) => ReactNode) | null | undefined;
|
|
158
158
|
hitSlop?: import("react-native").Insets | undefined;
|
|
159
159
|
onLayout?: ((event: import("react-native").LayoutChangeEvent) => void) | undefined;
|
|
160
|
-
pointerEvents?: "
|
|
160
|
+
pointerEvents?: "none" | "auto" | "box-none" | "box-only" | undefined;
|
|
161
161
|
removeClippedSubviews?: boolean | undefined;
|
|
162
162
|
nativeID?: string | undefined;
|
|
163
163
|
accessibilityRole?: import("react-native").WebAccessibilityRole | undefined;
|
|
@@ -279,10 +279,13 @@ export declare const PressableTextInput: FC<Except<{
|
|
|
279
279
|
disabled?: boolean | undefined;
|
|
280
280
|
selectionColor?: import("react-native").ColorValue | undefined;
|
|
281
281
|
textBreakStrategy?: "simple" | "highQuality" | "balanced" | undefined;
|
|
282
|
+
autoFocus?: boolean | undefined;
|
|
282
283
|
value?: string | undefined;
|
|
284
|
+
onContentSizeChange?: ((e: NativeSyntheticEvent<import("react-native").TextInputContentSizeChangeEventData>) => void) | undefined;
|
|
285
|
+
onScroll?: ((e: NativeSyntheticEvent<import("react-native").TextInputScrollEventData>) => void) | undefined;
|
|
286
|
+
scrollEnabled?: boolean | undefined;
|
|
283
287
|
autoCapitalize?: "none" | "sentences" | "words" | "characters" | undefined;
|
|
284
288
|
autoCorrect?: boolean | undefined;
|
|
285
|
-
autoFocus?: boolean | undefined;
|
|
286
289
|
blurOnSubmit?: boolean | undefined;
|
|
287
290
|
caretHidden?: boolean | undefined;
|
|
288
291
|
contextMenuHidden?: boolean | undefined;
|
|
@@ -294,13 +297,11 @@ export declare const PressableTextInput: FC<Except<{
|
|
|
294
297
|
onBlur?: ((event: NativeSyntheticEvent<React.FocusEvent>) => void) | undefined;
|
|
295
298
|
onChange?: ((e: NativeSyntheticEvent<import("react-native").TextInputChangeEventData>) => void) | undefined;
|
|
296
299
|
onChangeText?: ((text: string) => void) | undefined;
|
|
297
|
-
onContentSizeChange?: ((e: NativeSyntheticEvent<import("react-native").TextInputContentSizeChangeEventData>) => void) | undefined;
|
|
298
300
|
onEndEditing?: ((e: NativeSyntheticEvent<import("react-native").TextInputEndEditingEventData>) => void) | undefined;
|
|
299
301
|
onFocus?: ((event: NativeSyntheticEvent<React.FocusEvent>) => void) | undefined;
|
|
300
302
|
onSelectionChange?: ((e: NativeSyntheticEvent<import("react-native").TextInputSelectionChangeEventData>) => void) | undefined;
|
|
301
303
|
onSubmitEditing?: ((e: NativeSyntheticEvent<import("react-native").TextInputSubmitEditingEventData>) => void) | undefined;
|
|
302
304
|
onTextInput?: ((e: NativeSyntheticEvent<import("react-native").TextInputTextInputEventData>) => void) | undefined;
|
|
303
|
-
onScroll?: ((e: NativeSyntheticEvent<import("react-native").TextInputScrollEventData>) => void) | undefined;
|
|
304
305
|
onKeyPress?: ((e: NativeSyntheticEvent<import("react-native").TextInputKeyPressEventData>) => void) | undefined;
|
|
305
306
|
placeholder?: string | undefined;
|
|
306
307
|
placeholderTextColor?: import("react-native").ColorValue | undefined;
|
|
@@ -324,7 +325,6 @@ export declare const PressableTextInput: FC<Except<{
|
|
|
324
325
|
selectionState?: import("react-native").DocumentSelectionState | undefined;
|
|
325
326
|
spellCheck?: boolean | undefined;
|
|
326
327
|
textContentType?: "none" | "location" | "name" | "nickname" | "username" | "URL" | "addressCity" | "addressCityAndState" | "addressState" | "countryName" | "creditCardNumber" | "emailAddress" | "familyName" | "fullStreetAddress" | "givenName" | "jobTitle" | "middleName" | "namePrefix" | "nameSuffix" | "organizationName" | "postalCode" | "streetAddressLine1" | "streetAddressLine2" | "sublocality" | "telephoneNumber" | "password" | "newPassword" | "oneTimeCode" | undefined;
|
|
327
|
-
scrollEnabled?: boolean | undefined;
|
|
328
328
|
cursorColor?: import("react-native").ColorValue | null | undefined;
|
|
329
329
|
importantForAutofill?: "auto" | "yes" | "no" | "noExcludeDescendants" | "yesExcludeDescendants" | undefined;
|
|
330
330
|
disableFullscreenUI?: boolean | undefined;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { View } from "react-native";
|
|
3
3
|
export declare const Stack: import("react").ForwardRefExoticComponent<import("react-native").ViewProps & {
|
|
4
|
-
alignItems?: ("
|
|
4
|
+
alignItems?: ("center" | "stretch" | "baseline" | "end" | "start") | undefined;
|
|
5
5
|
children?: import("react").ReactNode;
|
|
6
|
-
direction?: ("
|
|
7
|
-
justifyContent?: ("
|
|
6
|
+
direction?: ("columnReverse" | "row" | "column" | "rowReverse") | undefined;
|
|
7
|
+
justifyContent?: ("normal" | "center" | "end" | "start" | "spaceBetween" | "spaceAround" | "spaceEvenly") | undefined;
|
|
8
8
|
style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
|
|
9
9
|
} & {
|
|
10
|
-
space?: 4 | 8 | 12 |
|
|
10
|
+
space?: 16 | 4 | 8 | 12 | 20 | 24 | 32 | 40 | 48 | 72 | 96 | undefined;
|
|
11
11
|
wrap?: boolean | undefined;
|
|
12
12
|
} & import("react").RefAttributes<View>>;
|
package/src/components/Svg.d.ts
CHANGED
|
@@ -118,7 +118,7 @@ export declare const Svg: ({ style, ...props }: SvgProps) => import("react").Rea
|
|
|
118
118
|
flexShrink: number;
|
|
119
119
|
})[];
|
|
120
120
|
testID?: string | undefined;
|
|
121
|
-
pointerEvents?: "
|
|
121
|
+
pointerEvents?: "none" | "auto" | "box-none" | "box-only" | undefined;
|
|
122
122
|
nativeID?: string | undefined;
|
|
123
123
|
accessibilityRole?: import("react-native").WebAccessibilityRole | undefined;
|
|
124
124
|
focusable?: boolean | undefined;
|
package/src/constants/insets.js
CHANGED
|
@@ -7,7 +7,7 @@ const top = `${cssFn}(safe-area-inset-top)`;
|
|
|
7
7
|
const bottom = `${cssFn}(safe-area-inset-bottom)`;
|
|
8
8
|
const left = `${cssFn}(safe-area-inset-left)`;
|
|
9
9
|
const right = `${cssFn}(safe-area-inset-right)`;
|
|
10
|
-
const addToX = (value, to) => isAvailable && (value
|
|
10
|
+
const addToX = (value, to) => isAvailable && (typeof value === "string" || value > 0)
|
|
11
11
|
? `calc(${to} + ${typeof value === "string" ? value : `${value}px`})`
|
|
12
12
|
: value;
|
|
13
13
|
export const insets = {
|
package/src/utils/array.js
CHANGED
|
@@ -49,7 +49,7 @@ export const sortedIndexOf = (array, value) => {
|
|
|
49
49
|
if (item === value) {
|
|
50
50
|
return searchIndex;
|
|
51
51
|
}
|
|
52
|
-
if (typeof item === "number") {
|
|
52
|
+
if (typeof item === "number" && typeof value === "number") {
|
|
53
53
|
if (item > value) {
|
|
54
54
|
endIndex = searchIndex;
|
|
55
55
|
continue;
|