@swan-io/lake 2.7.0 → 2.7.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swan-io/lake",
3
- "version": "2.7.0",
3
+ "version": "2.7.2",
4
4
  "engines": {
5
5
  "node": ">=18.0.0",
6
6
  "yarn": "^1.22.0"
@@ -27,8 +27,8 @@
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
29
  "@popperjs/core": "^2.11.8",
30
- "@react-three/drei": "^9.77.10",
31
- "@react-three/fiber": "^8.13.4",
30
+ "@react-three/drei": "^9.79.3",
31
+ "@react-three/fiber": "^8.13.5",
32
32
  "@swan-io/boxed": "^1.0.2",
33
33
  "@swan-io/chicane": "^1.4.1",
34
34
  "dayjs": "^1.11.9",
@@ -37,23 +37,23 @@
37
37
  "react": "^18.2.0",
38
38
  "react-atomic-state": "^1.2.7",
39
39
  "react-dom": "^18.2.0",
40
- "react-native-web": "^0.19.6",
40
+ "react-native-web": "^0.19.7",
41
41
  "react-popper": "^2.3.0",
42
- "react-ux-form": "^1.3.0",
42
+ "react-ux-form": "^1.4.0",
43
43
  "rifm": "^0.12.1",
44
44
  "three": "^0.154.0",
45
45
  "ts-dedent": "^2.2.0",
46
- "ts-pattern": "^5.0.1",
46
+ "ts-pattern": "^5.0.4",
47
47
  "urql": "^4.0.4",
48
48
  "uuid": "^9.0.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@types/react": "^18.2.14",
52
- "@types/react-dom": "^18.2.6",
51
+ "@types/react": "^18.2.15",
52
+ "@types/react-dom": "^18.2.7",
53
53
  "@types/react-native": "^0.72.2",
54
- "@types/three": "^0.152.1",
54
+ "@types/three": "^0.154.0",
55
55
  "@types/uuid": "^9.0.2",
56
56
  "jsdom": "^22.1.0",
57
- "type-fest": "^3.12.0"
57
+ "type-fest": "^4.0.0"
58
58
  }
59
59
  }
@@ -157,7 +157,7 @@ const LakeComboboxWithRef = ({ inputRef, value, items, itemHeight = DEFAULT_ELEM
157
157
  ], onPress: () => {
158
158
  window.clearTimeout(blurTimeoutId.current);
159
159
  setIsFetchingAdditionalInfo(true);
160
- Promise.resolve(onSelectItem(item)).finally(() => {
160
+ void Promise.resolve(onSelectItem(item)).finally(() => {
161
161
  setIsFetchingAdditionalInfo(false);
162
162
  close();
163
163
  });
@@ -164,5 +164,5 @@ maxCharCount, help, renderEnd, ...props }, forwardRef) => {
164
164
  readOnly && hasError && styles.readOnlyError,
165
165
  disabled && styles.disabled,
166
166
  readOnly && styles.readOnly,
167
- ] }), isNotNullish(renderEnd) && _jsx(View, { style: styles.endComponents, children: renderEnd() }), validating && (_jsx(ActivityIndicator, { size: "small", style: styles.endIcon, color: colors.current[500] })), !validating && hasError && (_jsx(Icon, { name: "warning-regular", size: 20, color: colors.negative[400], style: [styles.endIcon, readOnly && styles.readOnlyEndIcon] })), !validating && !hasError && valid && (_jsx(Icon, { name: "checkmark-filled", size: 20, color: colors.positive[400], style: [styles.endIcon, readOnly && styles.readOnlyEndIcon] }))] }), isNotNullish(unit) && (_jsx(LakeText, { color: colors.gray[900], style: [styles.unit, (disabled || readOnly) && styles.unitDisabled], children: unit }))] }), children] }), !hideErrors && (_jsxs(Box, { direction: "row", style: styles.errorContainer, children: [isNotNullish(help) ? (_jsx(LakeText, { variant: "smallRegular", color: isNotNullish(error) ? colors.negative[500] : colors.gray[500], children: help })) : (_jsx(LakeText, { variant: "smallRegular", color: colors.negative[500], children: error ?? " " })), isNotNullish(maxCharCount) && (_jsxs(_Fragment, { children: [_jsx(Fill, { minWidth: 4 }), _jsxs(LakeText, { variant: "smallRegular", color: charCount > maxCharCount ? colors.negative[500] : colors.gray[400], style: styles.descriptionLimitation, children: [charCount, " / ", maxCharCount] })] }))] }))] }));
167
+ ] }), isNotNullish(renderEnd) && _jsx(View, { style: styles.endComponents, children: renderEnd() }), validating && (_jsx(ActivityIndicator, { size: "small", style: styles.endIcon, color: colors.current[500] })), !validating && hasError && (_jsx(Icon, { name: "warning-regular", size: 20, color: colors.negative[400], style: [styles.endIcon, readOnly && styles.readOnlyEndIcon] })), !validating && !hasError && valid && (_jsx(Icon, { name: "checkmark-filled", size: 20, color: colors.positive[400], style: [styles.endIcon, readOnly && styles.readOnlyEndIcon] }))] }), isNotNullish(unit) && (_jsx(LakeText, { color: colors.gray[900], style: [styles.unit, (disabled || readOnly) && styles.unitDisabled], children: unit }))] }), children] }), !hideErrors && (_jsxs(Box, { direction: "row", style: styles.errorContainer, children: [isNotNullish(error) ? (_jsx(LakeText, { variant: "smallRegular", color: colors.negative[500], children: error })) : (_jsx(LakeText, { variant: "smallRegular", color: colors.gray[500], children: help ?? " " })), isNotNullish(maxCharCount) && (_jsxs(_Fragment, { children: [_jsx(Fill, { minWidth: 4 }), _jsxs(LakeText, { variant: "smallRegular", color: charCount > maxCharCount ? colors.negative[500] : colors.gray[400], style: styles.descriptionLimitation, children: [charCount, " / ", maxCharCount] })] }))] }))] }));
168
168
  });
@@ -30,7 +30,7 @@ export const showToast = ({ variant, title, description, autoClose }) => {
30
30
  return uid;
31
31
  }
32
32
  // by default, only info and success toasts are auto-closing
33
- const isAutoClosingToast = autoClose != null ? autoClose : variant === "info" || variant === "success";
33
+ const isAutoClosingToast = autoClose ?? (variant === "info" || variant === "success");
34
34
  const progress = isAutoClosingToast ? new Animated.Value(1) : undefined;
35
35
  const timeout = progress
36
36
  ? createControllableTimeout({
@@ -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" && typeof value === "number") {
52
+ if (item != null && value != null) {
53
53
  if (item > value) {
54
54
  endIndex = searchIndex;
55
55
  continue;