@swan-io/lake 17.0.1 → 18.0.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swan-io/lake",
3
- "version": "17.0.1",
3
+ "version": "18.0.1",
4
4
  "engines": {
5
5
  "node": ">22.12.0"
6
6
  },
@@ -30,9 +30,9 @@
30
30
  "react-native-web": ">=0.21.2"
31
31
  },
32
32
  "dependencies": {
33
- "@swan-io/boxed": "^3.2.1",
33
+ "@bloodyowl/boxed": "^3.4.0",
34
34
  "@zoontek/chicane": "^3.0.0",
35
- "@swan-io/use-form": "^3.1.0",
35
+ "@swan-io/use-form": "^4.0.0",
36
36
  "dayjs": "^1.11.21",
37
37
  "polished": "^4.3.1",
38
38
  "rifm": "^0.12.1",
@@ -1,4 +1,4 @@
1
- import { Future, Result } from "@swan-io/boxed";
1
+ import { Future, Result } from "@bloodyowl/boxed";
2
2
  import { ReactNode, Ref } from "react";
3
3
  type Suggestion<T> = {
4
4
  title: string;
@@ -1,5 +1,5 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { AsyncData, Result } from "@swan-io/boxed";
2
+ import { AsyncData, Result } from "@bloodyowl/boxed";
3
3
  import { useRef, useState } from "react";
4
4
  import { StyleSheet } from "react-native";
5
5
  import { match, P } from "ts-pattern";
@@ -1,5 +1,5 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Option } from "@swan-io/boxed";
2
+ import { Option } from "@bloodyowl/boxed";
3
3
  import { Children, Fragment, memo, useEffect, useState } from "react";
4
4
  import { ActivityIndicator, StyleSheet, View, } from "react-native";
5
5
  import { match, P } from "ts-pattern";
@@ -1,4 +1,4 @@
1
- import { AsyncData, Result } from "@swan-io/boxed";
1
+ import { AsyncData, Result } from "@bloodyowl/boxed";
2
2
  import { ReactElement, ReactNode, Ref } from "react";
3
3
  import { IconName } from "./Icon";
4
4
  import { LakeTextInputProps } from "./LakeTextInput";
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Option } from "@swan-io/boxed";
2
+ import { Option } from "@bloodyowl/boxed";
3
3
  import { Link } from "@zoontek/chicane";
4
4
  import { StyleSheet, View } from "react-native";
5
5
  import { match, P } from "ts-pattern";
@@ -1,6 +1,6 @@
1
1
  import { createElement as _createElement } from "react";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Array, Option } from "@swan-io/boxed";
3
+ import { Array, Option } from "@bloodyowl/boxed";
4
4
  import { StyleSheet, View } from "react-native";
5
5
  import { match } from "ts-pattern";
6
6
  import { animations, colors, spacings } from "../constants/design";
@@ -1,5 +1,5 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Array, Dict, Option } from "@swan-io/boxed";
2
+ import { Array, Dict, Option } from "@bloodyowl/boxed";
3
3
  import { useEffect, useMemo, useRef, useState } from "react";
4
4
  import { Pressable, StyleSheet, Text, TextInput, View, } from "react-native";
5
5
  import { backgroundColor, colors, radii, shadows, texts } from "../constants/design";
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Array, Option } from "@swan-io/boxed";
2
+ import { Array, Option } from "@bloodyowl/boxed";
3
3
  import { Children, useMemo, useReducer, useRef } from "react";
4
4
  import { View } from "react-native";
5
5
  import { match, P } from "ts-pattern";
@@ -1,5 +1,5 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Option } from "@swan-io/boxed";
2
+ import { Option } from "@bloodyowl/boxed";
3
3
  import { cloneElement, memo, useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, } from "react";
4
4
  import { StyleSheet, View } from "react-native";
5
5
  import { commonStyles } from "../constants/commonStyles";
@@ -1,2 +1,2 @@
1
- import { AsyncData } from "@swan-io/boxed";
1
+ import { AsyncData } from "@bloodyowl/boxed";
2
2
  export declare const useAsyncDataSuspense: <T extends AsyncData<unknown>>(asyncData: T) => void;
@@ -1,4 +1,4 @@
1
- import { Deferred } from "@swan-io/boxed";
1
+ import { Deferred } from "@bloodyowl/boxed";
2
2
  import { useEffect, useMemo, useRef } from "react";
3
3
  export const useAsyncDataSuspense = (asyncData) => {
4
4
  // For the sake of simplicity here, we also consider `NotAsked` to be a
@@ -1,4 +1,4 @@
1
- import { Option } from "@swan-io/boxed";
1
+ import { Option } from "@bloodyowl/boxed";
2
2
  import { RefObject } from "react";
3
3
  import { Text, View, ViewStyle } from "react-native";
4
4
  export type ElementPosition = {
@@ -1,4 +1,4 @@
1
- import { Option } from "@swan-io/boxed";
1
+ import { Option } from "@bloodyowl/boxed";
2
2
  import { useCallback, useEffect, useRef, useState } from "react";
3
3
  import { match, P } from "ts-pattern";
4
4
  const MAX_OFFSET_FOR_CENTER_PLACEMENT = 100;
@@ -1,4 +1,4 @@
1
- import { Option, Result } from "@swan-io/boxed";
1
+ import { Option, Result } from "@bloodyowl/boxed";
2
2
  import { useCallback, useEffect, useMemo, useState } from "react";
3
3
  const getItem = (key) => Result.fromExecution(() => localStorage.getItem(key)).getOr(null);
4
4
  const setItem = (key, value) => {
@@ -1,4 +1,4 @@
1
- import { Future, Result } from "@swan-io/boxed";
1
+ import { Future, Result } from "@bloodyowl/boxed";
2
2
  import { describe, expect, it } from "vitest";
3
3
  import { pollUntilOk } from "../polling";
4
4
  const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
@@ -1,4 +1,4 @@
1
- import { Dict } from "@swan-io/boxed";
1
+ import { Dict } from "@bloodyowl/boxed";
2
2
  import { P } from "ts-pattern";
3
3
  export const identity = (value) => value;
4
4
  export const noop = () => { };
@@ -1,4 +1,4 @@
1
- import { Result } from "@swan-io/boxed";
1
+ import { Result } from "@bloodyowl/boxed";
2
2
  export declare const filterRejectionsToResult: <T extends {
3
3
  __typename: string;
4
4
  }>(input: T) => Result<Exclude<T, {
package/src/utils/gql.js CHANGED
@@ -1,2 +1,2 @@
1
- import { Result } from "@swan-io/boxed";
1
+ import { Result } from "@bloodyowl/boxed";
2
2
  export const filterRejectionsToResult = (input) => (input.__typename.endsWith("Rejection") ? Result.Error(input) : Result.Ok(input));
@@ -1,4 +1,4 @@
1
- import { Future, Result } from "@swan-io/boxed";
1
+ import { Future, Result } from "@bloodyowl/boxed";
2
2
  type Options = {
3
3
  maxAttempts: number;
4
4
  /** Delay before each attempt, including the first. Defaults to 1000ms. */
@@ -1,4 +1,4 @@
1
- import { Future, Result } from "@swan-io/boxed";
1
+ import { Future, Result } from "@bloodyowl/boxed";
2
2
  /**
3
3
  * Waits `intervalMs`, runs `attempt`, repeats while it returns `Error` (up to `maxAttempts`).
4
4
  * Cancelling the returned future stops the loop — unlike `Future.retry`, which keeps polling.
@@ -1,4 +1,4 @@
1
- import { Option } from "@swan-io/boxed";
1
+ import { Option } from "@bloodyowl/boxed";
2
2
  export declare const safeSplitAround: (string: string, expression: string) => string[];
3
3
  export declare const deburr: (value: string) => string;
4
4
  export declare const trim: (value: string) => string;
@@ -1,4 +1,4 @@
1
- import { Option } from "@swan-io/boxed";
1
+ import { Option } from "@bloodyowl/boxed";
2
2
  export const safeSplitAround = (string, expression) => {
3
3
  let index = 0;
4
4
  const splitString = [];
@@ -1,4 +1,4 @@
1
- import { Result } from "@swan-io/boxed";
1
+ import { Result } from "@bloodyowl/boxed";
2
2
  type Size = {
3
3
  width: number;
4
4
  height: number;
package/src/utils/svg.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Result } from "@swan-io/boxed";
1
+ import { Result } from "@bloodyowl/boxed";
2
2
  import { match } from "ts-pattern";
3
3
  import { encodeBase64 } from "./base64";
4
4
  import { isNotNullish, isNotNullishOrEmpty } from "./nullish";
@@ -1,2 +1,2 @@
1
- import { Future } from "@swan-io/boxed";
1
+ import { Future } from "@bloodyowl/boxed";
2
2
  export declare const detectScrollAnimationEnd: (element: HTMLElement) => Future<void>;
@@ -1,4 +1,4 @@
1
- import { Future } from "@swan-io/boxed";
1
+ import { Future } from "@bloodyowl/boxed";
2
2
  // When using `node.scroll()` with smooth behavior, there isn't any event to detect when the scroll animation is finished
3
3
  // We need this also with `ScrollView.scrollTo` (which just call the native node.scroll function)
4
4
  // More info about why this workaround: https://stackoverflow.com/a/60001032