From 9f343f86906b247e38a4fb0eb5489285ee59d524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=9D=B1=E6=BE=94?= Date: Tue, 25 Oct 2022 14:37:12 +0800 Subject: [PATCH] fix: fixed index error then data length changed --- .eslintrc | 3 + .eslintrc.js | 17 - exampleExpo/package.json | 2 +- exampleExpo/src/Home.tsx | 427 +++--- exampleExpo/src/normal/index.tsx | 205 +-- exampleExpo/yarn.lock | 20 +- package.json | 10 +- src/Carousel.tsx | 457 ++++--- src/LazyView.tsx | 13 +- src/ScrollViewGesture.tsx | 508 ++++--- src/constants/index.ts | 19 +- src/hooks/computeNewIndexWhenDataChanges.ts | 42 + src/hooks/index.test.ts | 71 + src/hooks/useAutoPlay.ts | 118 +- src/hooks/useCarouselController.tsx | 595 ++++---- src/hooks/useCheckMounted.ts | 18 +- src/hooks/useCommonVariables.ts | 90 +- src/hooks/useInitProps.ts | 141 +- src/hooks/useLayoutConfig.ts | 40 +- src/hooks/useOffsetX.ts | 142 +- src/hooks/useOnProgressChange.ts | 95 +- src/hooks/usePropsErrorBoundary.ts | 53 +- src/hooks/useVisibleRanges.tsx | 78 +- src/index.tsx | 10 +- src/layouts/BaseLayout.tsx | 204 +-- src/layouts/ParallaxLayout.tsx | 250 ++-- src/layouts/index.tsx | 16 +- src/layouts/normal.ts | 32 +- src/layouts/parallax.ts | 123 +- src/layouts/stack.ts | 635 ++++----- src/store/index.ts | 15 +- src/types.ts | 221 +-- src/utils/computedWithAutoFillData.ts | 120 +- src/utils/dealWithAnimation.ts | 37 +- src/utils/handlerOffsetDirection.ts | 15 + src/utils/log.ts | 7 +- yarn.lock | 1359 ++++++++++++++++--- 37 files changed, 3712 insertions(+), 2496 deletions(-) create mode 100644 .eslintrc delete mode 100644 .eslintrc.js create mode 100644 src/hooks/computeNewIndexWhenDataChanges.ts create mode 100644 src/hooks/index.test.ts create mode 100644 src/utils/handlerOffsetDirection.ts diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 00000000..04d8c1e4 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,3 @@ +{ +"extends": "@dohooo" +} \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 8d28425c..00000000 --- a/.eslintrc.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports = { - root: true, - extends: ['@react-native-community', 'prettier'], - rules: { - 'prettier/prettier': [ - 'error', - { - quoteProps: 'consistent', - singleQuote: true, - tabWidth: 4, - trailingComma: 'es5', - useTabs: false, - }, - ], - 'react-native/no-inline-styles': 0, - }, -}; diff --git a/exampleExpo/package.json b/exampleExpo/package.json index 4f14f55f..c81a0e95 100644 --- a/exampleExpo/package.json +++ b/exampleExpo/package.json @@ -32,7 +32,7 @@ "metro-config": "^0.71.1", "react": "18.0.0", "react-dom": "18.0.0", - "react-native": "0.69.4", + "react-native": "0.69.5", "react-native-gesture-handler": "~2.5.0", "react-native-reanimated": "~2.9.1", "react-native-safe-area-context": "4.3.1", diff --git a/exampleExpo/src/Home.tsx b/exampleExpo/src/Home.tsx index 824eb06c..cc6b0a65 100644 --- a/exampleExpo/src/Home.tsx +++ b/exampleExpo/src/Home.tsx @@ -1,243 +1,246 @@ -import * as React from 'react'; +/* eslint-disable @typescript-eslint/no-use-before-define */ +/* eslint-disable @typescript-eslint/ban-ts-comment */ +import * as React from "react"; import { - View, - Text, - StyleSheet, - ScrollView, - TouchableHighlight, -} from 'react-native'; -import { useNavigation, NavigationProp } from '@react-navigation/native'; -import { isAndroid, isIos } from './utils'; + View, + Text, + StyleSheet, + ScrollView, + TouchableHighlight, +} from "react-native"; -import NormalComponent from './normal'; -import ParallaxComponent from './parallax'; -import StackComponent from './stack'; -import LeftAlignComponent from './left-align'; -import ComplexComponent from './complex'; -import AdvancedParallaxComponent from './advanced-parallax'; -import PauseAdvancedParallaxComponent from './pause-advanced-parallax'; -import ScaleFadeInOutComponent from './scale-fade-in-out'; -import RotateInOutComponent from './rotate-in-out'; -import RotateScaleFadeInOutComponent from './rotate-scale-fade-in-out'; -import AnimTabBarComponent from './anim-tab-bar'; -import MarqueeComponent from './marquee'; -import MultipleComponent from './multiple'; -import Flow from './flow'; -import Cube3D from './cube-3d'; -import BlurParallax from './blur-parallax'; -import Curve from './curve'; -import PressSwipe from './press-swipe'; -import Fold from './fold'; -import Tear from './tear'; -import StackCards from './stack-cards'; -import Circular from './circular'; -import ParallaxLayers from './parallax-layers'; +import type { NavigationProp } from "@react-navigation/native"; +import { useNavigation } from "@react-navigation/native"; + +import AdvancedParallaxComponent from "./advanced-parallax"; +import AnimTabBarComponent from "./anim-tab-bar"; +import BlurParallax from "./blur-parallax"; +import Circular from "./circular"; +import ComplexComponent from "./complex"; +import Cube3D from "./cube-3d"; +import Curve from "./curve"; +import Flow from "./flow"; +import Fold from "./fold"; +import LeftAlignComponent from "./left-align"; +import MarqueeComponent from "./marquee"; +import MultipleComponent from "./multiple"; +import NormalComponent from "./normal"; +import ParallaxComponent from "./parallax"; +import ParallaxLayers from "./parallax-layers"; +import PauseAdvancedParallaxComponent from "./pause-advanced-parallax"; +import PressSwipe from "./press-swipe"; +import RotateInOutComponent from "./rotate-in-out"; +import RotateScaleFadeInOutComponent from "./rotate-scale-fade-in-out"; +import ScaleFadeInOutComponent from "./scale-fade-in-out"; +import StackComponent from "./stack"; +import StackCards from "./stack-cards"; +import Tear from "./tear"; +import { isAndroid, isIos } from "./utils"; // Not support to WEB (react-native-snap-carousel) const SnapCarouselComplexComponent = React.lazy( - () => import('./snap-carousel-complex') + () => import("./snap-carousel-complex"), ); const SnapCarouselLoopComponent = React.lazy( - () => import('./snap-carousel-loop') + () => import("./snap-carousel-loop"), ); export const LayoutsPage = [ - { - name: 'Normal', - page: NormalComponent, - }, - { - name: 'Parallax', - page: ParallaxComponent, - }, - { - name: 'Stack', - page: StackComponent, - }, - { - name: 'LeftAlign', - page: LeftAlignComponent, - }, + { + name: "Normal", + page: NormalComponent, + }, + { + name: "Parallax", + page: ParallaxComponent, + }, + { + name: "Stack", + page: StackComponent, + }, + { + name: "LeftAlign", + page: LeftAlignComponent, + }, ]; export const CustomAnimations = [ - { - name: 'Curve', - page: Curve, - }, - { - name: 'BlurParallax', - page: BlurParallax, - }, - { - name: 'Cube3D', - page: Cube3D, - }, - { - name: 'PressSwipe', - page: PressSwipe, - }, - { - name: 'Tear', - page: Tear, - }, - { - name: 'StackCards', - page: StackCards, - }, - { - name: 'Fold', - page: Fold, - }, - { - name: 'Circular', - page: Circular, - }, - { - name: 'Flow', - page: Flow, - }, - { - name: 'ParallaxLayers', - page: ParallaxLayers, - }, - { - name: 'AdvancedParallax', - page: AdvancedParallaxComponent, - }, - { - name: 'PauseAdvancedParallax', - page: PauseAdvancedParallaxComponent, - }, - { - name: 'ScaleFadeInOut', - page: ScaleFadeInOutComponent, - }, - { - name: 'RotateInOut', - page: RotateInOutComponent, - }, - { - name: 'RotateScaleFadeInOut', - page: RotateScaleFadeInOutComponent, - }, - { - name: 'AnimTabBar', - page: AnimTabBarComponent, - }, - { - name: 'Marquee', - page: MarqueeComponent, - }, - { - name: 'Multiple', - page: MultipleComponent, - }, + { + name: "Curve", + page: Curve, + }, + { + name: "BlurParallax", + page: BlurParallax, + }, + { + name: "Cube3D", + page: Cube3D, + }, + { + name: "PressSwipe", + page: PressSwipe, + }, + { + name: "Tear", + page: Tear, + }, + { + name: "StackCards", + page: StackCards, + }, + { + name: "Fold", + page: Fold, + }, + { + name: "Circular", + page: Circular, + }, + { + name: "Flow", + page: Flow, + }, + { + name: "ParallaxLayers", + page: ParallaxLayers, + }, + { + name: "AdvancedParallax", + page: AdvancedParallaxComponent, + }, + { + name: "PauseAdvancedParallax", + page: PauseAdvancedParallaxComponent, + }, + { + name: "ScaleFadeInOut", + page: ScaleFadeInOutComponent, + }, + { + name: "RotateInOut", + page: RotateInOutComponent, + }, + { + name: "RotateScaleFadeInOut", + page: RotateScaleFadeInOutComponent, + }, + { + name: "AnimTabBar", + page: AnimTabBarComponent, + }, + { + name: "Marquee", + page: MarqueeComponent, + }, + { + name: "Multiple", + page: MultipleComponent, + }, ]; export const OtherPage = [ - { - name: 'Complex', - page: ComplexComponent, - }, + { + name: "Complex", + page: ComplexComponent, + }, ]; if (isIos || isAndroid) { - OtherPage.push( - { - name: 'SnapCarouselComplex', - // @ts-ignore - page: SnapCarouselComplexComponent, - }, - { - name: 'SnapCarouselLoop', - // @ts-ignore - page: SnapCarouselLoopComponent, - } - ); + OtherPage.push( + { + name: "SnapCarouselComplex", + // @ts-expect-error + page: SnapCarouselComplexComponent, + }, + { + name: "SnapCarouselLoop", + page: SnapCarouselLoopComponent, + }, + ); } const Index = () => { - const navigation = useNavigation>(); - return ( - - - {'Layouts'} + const navigation = useNavigation>(); + return ( + + + {"Layouts"} + + {LayoutsPage.map(({ name }, index) => { + return ( + navigation.navigate(name)} + > + + {name} - {LayoutsPage.map(({ name }, index) => { - return ( - navigation.navigate(name)} - > - - {name} - - - ); - })} - - {'CustomAnimations'} + + ); + })} + + {"CustomAnimations"} + + {CustomAnimations.map(({ name }, index) => { + return ( + navigation.navigate(name)} + > + + {name} - {CustomAnimations.map(({ name }, index) => { - return ( - navigation.navigate(name)} - > - - {name} - - - ); - })} - - {'Others'} + + ); + })} + + {"Others"} + + {OtherPage.map(({ name }, index) => { + return ( + navigation.navigate(name)} + > + + {name} - {OtherPage.map(({ name }, index) => { - return ( - navigation.navigate(name)} - > - - {name} - - - ); - })} - - ); + + ); + })} + + ); }; export default Index; const styles = StyleSheet.create({ - listItem: { - alignItems: 'flex-start', - borderColor: '#e8ecf0', - borderBottomWidth: 0.5, - padding: 16, - backgroundColor: '#fff', - }, - text: { - fontSize: 16, - }, - section: { - flexDirection: 'row', - paddingHorizontal: 16, - paddingVertical: 8, - backgroundColor: '#e8ecf0', - }, - sectionText: { - fontSize: 14, - fontWeight: 'bold', - }, + listItem: { + alignItems: "flex-start", + borderColor: "#e8ecf0", + borderBottomWidth: 0.5, + padding: 16, + backgroundColor: "#fff", + }, + text: { + fontSize: 16, + }, + section: { + flexDirection: "row", + paddingHorizontal: 16, + paddingVertical: 8, + backgroundColor: "#e8ecf0", + }, + sectionText: { + fontSize: 14, + fontWeight: "bold", + }, }); diff --git a/exampleExpo/src/normal/index.tsx b/exampleExpo/src/normal/index.tsx index 69ce2f47..c285de5f 100644 --- a/exampleExpo/src/normal/index.tsx +++ b/exampleExpo/src/normal/index.tsx @@ -1,108 +1,125 @@ -import * as React from 'react'; -import { View } from 'react-native'; -import Carousel, { ICarouselInstance } from 'react-native-reanimated-carousel'; -import { SBItem } from '../components/SBItem'; -import SButton from '../components/SButton'; -import { ElementsText, window } from '../constants'; +/* eslint-disable no-console */ +import * as React from "react"; +import { View } from "react-native"; +import type { ICarouselInstance } from "react-native-reanimated-carousel"; +import Carousel from "react-native-reanimated-carousel"; + +import { SBItem } from "../components/SBItem"; +import SButton from "../components/SButton"; +import { ElementsText, window } from "../constants"; const PAGE_WIDTH = window.width; function Index() { - const [data, setData] = React.useState([...new Array(6).keys()]); - const [isVertical, setIsVertical] = React.useState(false); - const [isFast, setIsFast] = React.useState(false); - const [isAutoPlay, setIsAutoPlay] = React.useState(false); - const [isPagingEnabled, setIsPagingEnabled] = React.useState(true); - const ref = React.useRef(null); + const [data, setData] = React.useState([...new Array(4).keys()]); + const [isVertical, setIsVertical] = React.useState(false); + const [isFast, setIsFast] = React.useState(false); + const [isAutoPlay, setIsAutoPlay] = React.useState(false); + const [isPagingEnabled, setIsPagingEnabled] = React.useState(true); + const ref = React.useRef(null); - const baseOptions = isVertical - ? ({ - vertical: true, - width: PAGE_WIDTH, - height: PAGE_WIDTH / 2, - } as const) - : ({ - vertical: false, - width: PAGE_WIDTH, - height: PAGE_WIDTH / 2, - } as const); + const baseOptions = isVertical + ? ({ + vertical: true, + width: PAGE_WIDTH, + height: PAGE_WIDTH / 2, + } as const) + : ({ + vertical: false, + width: PAGE_WIDTH, + height: PAGE_WIDTH / 2, + } as const); - return ( - - console.log('current index:', index)} - renderItem={({ index }) => } - /> - { - setIsVertical(!isVertical); - }} - > - {isVertical ? 'Set horizontal' : 'Set Vertical'} - - { - setIsFast(!isFast); - }} - > - {isFast ? 'NORMAL' : 'FAST'} - - { - setIsPagingEnabled(!isPagingEnabled); - }} - > + return ( + + console.log("current index:", index)} + renderItem={({ index }) => } + /> + { + setData([...new Array(5).keys()]); + }} + > + {"Change the data length to 5"} + + { + setData([...new Array(3).keys()]); + }} + > + {"Change the data length to 3"} + + { + setIsVertical(!isVertical); + }} + > + {isVertical ? "Set horizontal" : "Set Vertical"} + + { + setIsFast(!isFast); + }} + > + {isFast ? "NORMAL" : "FAST"} + + { + setIsPagingEnabled(!isPagingEnabled); + }} + > PagingEnabled:{isPagingEnabled.toString()} - - { - setIsAutoPlay(!isAutoPlay); - }} - > - {ElementsText.AUTOPLAY}:{`${isAutoPlay}`} - - { - console.log(ref.current?.getCurrentIndex()); - }} - > + + { + setIsAutoPlay(!isAutoPlay); + }} + > + {ElementsText.AUTOPLAY}:{`${isAutoPlay}`} + + { + console.log(ref.current?.getCurrentIndex()); + }} + > Log current index - - { - setData( - data.length === 6 - ? [...new Array(8).keys()] - : [...new Array(6).keys()] - ); - }} - > + + { + setData( + data.length === 6 + ? [...new Array(8).keys()] + : [...new Array(6).keys()], + ); + }} + > Change data length to:{data.length === 6 ? 8 : 6} - - { - ref.current?.scrollTo({ count: -1, animated: true }); - }} - > + + { + ref.current?.scrollTo({ count: -1, animated: true }); + }} + > prev - - { - ref.current?.scrollTo({ count: 1, animated: true }); - }} - > + + { + ref.current?.scrollTo({ count: 1, animated: true }); + }} + > next - - - ); + + + ); } export default Index; diff --git a/exampleExpo/yarn.lock b/exampleExpo/yarn.lock index b89325fb..eef707a7 100644 --- a/exampleExpo/yarn.lock +++ b/exampleExpo/yarn.lock @@ -10013,10 +10013,10 @@ react-is@^17.0.1: resolved "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== -react-native-codegen@^0.69.1: - version "0.69.1" - resolved "https://registry.npmjs.org/react-native-codegen/-/react-native-codegen-0.69.1.tgz#3632be2f24464e6fad8dd11a25d1b6f3bc2c7d0b" - integrity sha512-TOZEqBarczcyYN3iZE3VpKkooOevaAzBq9n7lU0h9mQUvtRhLVyolc+a5K6cWI0e4v4K69I0MqzjPcPeFKo32Q== +react-native-codegen@^0.69.2: + version "0.69.2" + resolved "https://registry.npmjs.org/react-native-codegen/-/react-native-codegen-0.69.2.tgz#e33ac3b1486de59ddae687b731ddbfcef8af0e4e" + integrity sha512-yPcgMHD4mqLbckqnWjFBaxomDnBREfRjDi2G/WxNyPBQLD+PXUEmZTkDx6QoOXN+Bl2SkpnNOSsLE2+/RUHoPw== dependencies: "@babel/parser" "^7.14.0" flow-parser "^0.121.0" @@ -10087,10 +10087,10 @@ react-native-web@~0.18.7: postcss-value-parser "^4.2.0" styleq "^0.1.2" -react-native@0.69.4: - version "0.69.4" - resolved "https://registry.npmjs.org/react-native/-/react-native-0.69.4.tgz#d66f2a117442a9398b065876afdc568b209dc4da" - integrity sha512-rqNMialM/T4pHRKWqTIpOxA65B/9kUjtnepxwJqvsdCeMP9Q2YdSx4VASFR9RoEFYcPRU41yGf6EKrChNfns3g== +react-native@0.69.5: + version "0.69.5" + resolved "https://registry.npmjs.org/react-native/-/react-native-0.69.5.tgz#959142bfef21beed837160b54aa17313f5e1898f" + integrity sha512-4Psrj1nDMLQjBXVH8n3UikzOHQc8+sa6NbxZQR0XKtpx8uC3HiJBgX+/FIum/RWxfi5J/Dt/+A2gLGmq2Hps8g== dependencies: "@jest/create-cache-key-function" "^27.0.1" "@react-native-community/cli" "^8.0.4" @@ -10115,7 +10115,7 @@ react-native@0.69.4: pretty-format "^26.5.2" promise "^8.0.3" react-devtools-core "4.24.0" - react-native-codegen "^0.69.1" + react-native-codegen "^0.69.2" react-native-gradle-plugin "^0.0.7" react-refresh "^0.4.0" react-shallow-renderer "16.15.0" @@ -12014,10 +12014,8 @@ watchpack@^1.6.1: resolved "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz#1267e6c55e0b9b5be44c2023aed5437a2c26c453" integrity sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ== dependencies: - chokidar "^3.4.1" graceful-fs "^4.1.2" neo-async "^2.5.0" - watchpack-chokidar2 "^2.0.1" optionalDependencies: chokidar "^3.4.1" watchpack-chokidar2 "^2.0.1" diff --git a/package.json b/package.json index 92e265b4..4f51cf11 100644 --- a/package.json +++ b/package.json @@ -22,9 +22,11 @@ ], "scripts": { "gif": "node scripts/makegif.js ./scripts/gif-works-directory", - "test": "jest", + "test": "vitest run src/**/*", + "test:dev": "vitest dev src/**/*", "typescript": "tsc --noEmit", "lint": "eslint \"src/**/*.{js,ts,tsx}\"", + "lint:fix": "eslint \"src/**/*.{js,ts,tsx}\" --fix", "dev": "yarn watch 'yarn prepare' ./src", "prepare": "bob build", "release": "yarn prepare && dotenv release-it --no-git.requireUpstream", @@ -57,6 +59,7 @@ "devDependencies": { "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@commitlint/config-conventional": "^11.0.0", + "@dohooo/eslint-config": "^0.0.7", "@react-native-community/eslint-config": "^2.0.0", "@release-it/conventional-changelog": "^2.0.0", "@types/jest": "^26.0.0", @@ -68,7 +71,7 @@ "commitlint": "^11.0.0", "cz-conventional-changelog": "^3.3.0", "dotenv-cli": "^5.1.0", - "eslint": "^7.2.0", + "eslint": "^8.26.0", "eslint-config-prettier": "^7.0.0", "eslint-plugin-prettier": "^3.1.3", "gifify": "^2.4.3", @@ -83,7 +86,8 @@ "react-native-reanimated": "2.8.0", "release-it": "^14.2.2", "sponsorkit": "^0.1.3", - "typescript": "^4.0.8" + "typescript": "^4.0.8", + "vitest": "^0.24.3" }, "peerDependencies": { "react": ">=16.8.0", diff --git a/src/Carousel.tsx b/src/Carousel.tsx index f9dc2374..fb80053d 100644 --- a/src/Carousel.tsx +++ b/src/Carousel.tsx @@ -1,243 +1,242 @@ -import React from 'react'; -import { runOnJS, useDerivedValue } from 'react-native-reanimated'; - -import { useCarouselController } from './hooks/useCarouselController'; -import { useAutoPlay } from './hooks/useAutoPlay'; -import { usePropsErrorBoundary } from './hooks/usePropsErrorBoundary'; -import { ScrollViewGesture } from './ScrollViewGesture'; -import { useVisibleRanges } from './hooks/useVisibleRanges'; - -import type { ICarouselInstance, TCarouselProps } from './types'; -import { StyleSheet } from 'react-native'; -import { BaseLayout } from './layouts/BaseLayout'; -import { useLayoutConfig } from './hooks/useLayoutConfig'; -import { useInitProps } from './hooks/useInitProps'; -import { CTX } from './store'; -import { useCommonVariables } from './hooks/useCommonVariables'; -import { useOnProgressChange } from './hooks/useOnProgressChange'; -import { computedRealIndexWithAutoFillData } from './utils/computedWithAutoFillData'; +/* eslint-disable @typescript-eslint/no-use-before-define */ +import React from "react"; +import { StyleSheet } from "react-native"; +import { runOnJS, useDerivedValue } from "react-native-reanimated"; + +import { useAutoPlay } from "./hooks/useAutoPlay"; +import { useCarouselController } from "./hooks/useCarouselController"; +import { useCommonVariables } from "./hooks/useCommonVariables"; +import { useInitProps } from "./hooks/useInitProps"; +import { useLayoutConfig } from "./hooks/useLayoutConfig"; +import { useOnProgressChange } from "./hooks/useOnProgressChange"; +import { usePropsErrorBoundary } from "./hooks/usePropsErrorBoundary"; +import { useVisibleRanges } from "./hooks/useVisibleRanges"; +import { BaseLayout } from "./layouts/BaseLayout"; +import { ScrollViewGesture } from "./ScrollViewGesture"; +import { CTX } from "./store"; +import type { ICarouselInstance, TCarouselProps } from "./types"; +import { computedRealIndexWithAutoFillData } from "./utils/computedWithAutoFillData"; const Carousel = React.forwardRef>( - (_props, ref) => { - const props = useInitProps(_props); - - const { - testID, - data, - rawData, - loop, - autoFillData, - mode, - style, - width, - height, - vertical, - autoPlay, - windowSize, - autoPlayReverse, - autoPlayInterval, - scrollAnimationDuration, - withAnimation, - renderItem, - onScrollEnd, - onSnapToItem, - onScrollBegin, - onProgressChange, - customAnimation, - defaultIndex, - } = props; - - const commonVariables = useCommonVariables(props); - const { size, handlerOffset } = commonVariables; - const dataLength = data.length; - - const offsetX = useDerivedValue(() => { - const totalSize = size * dataLength; - const x = handlerOffset.value % totalSize; - - if (!loop) { - return handlerOffset.value; - } - return isNaN(x) ? 0 : x; - }, [loop, size, dataLength]); - - usePropsErrorBoundary(props); - useOnProgressChange({ - autoFillData, - loop, - size, - offsetX, - rawData, - onProgressChange, - }); - - const carouselController = useCarouselController({ - loop, - size, - data, - autoFillData, - handlerOffset, - withAnimation, - defaultIndex, - onScrollEnd: () => runOnJS(_onScrollEnd)(), - onScrollBegin: () => !!onScrollBegin && runOnJS(onScrollBegin)(), - duration: scrollAnimationDuration, - }); - - const { next, prev, scrollTo, getSharedIndex, getCurrentIndex } = - carouselController; - - const { start: startAutoPlay, pause: pauseAutoPlay } = useAutoPlay({ - autoPlay, - autoPlayInterval, - autoPlayReverse, - carouselController, + (_props, ref) => { + const props = useInitProps(_props); + + const { + testID, + data, + rawData, + loop, + autoFillData, + mode, + style, + width, + height, + vertical, + autoPlay, + windowSize, + autoPlayReverse, + autoPlayInterval, + scrollAnimationDuration, + withAnimation, + renderItem, + onScrollEnd, + onSnapToItem, + onScrollBegin, + onProgressChange, + customAnimation, + defaultIndex, + } = props; + + const commonVariables = useCommonVariables(props); + const { size, handlerOffset } = commonVariables; + const dataLength = data.length; + + const offsetX = useDerivedValue(() => { + const totalSize = size * dataLength; + const x = handlerOffset.value % totalSize; + + if (!loop) + return handlerOffset.value; + + return isNaN(x) ? 0 : x; + }, [loop, size, dataLength]); + + usePropsErrorBoundary(props); + useOnProgressChange({ + autoFillData, + loop, + size, + offsetX, + rawData, + onProgressChange, + }); + + const carouselController = useCarouselController({ + loop, + size, + data, + autoFillData, + handlerOffset, + withAnimation, + defaultIndex, + onScrollEnd: () => runOnJS(_onScrollEnd)(), + onScrollBegin: () => !!onScrollBegin && runOnJS(onScrollBegin)(), + duration: scrollAnimationDuration, + }); + + const { next, prev, scrollTo, getSharedIndex, getCurrentIndex } + = carouselController; + + const { start: startAutoPlay, pause: pauseAutoPlay } = useAutoPlay({ + autoPlay, + autoPlayInterval, + autoPlayReverse, + carouselController, + }); + + const _onScrollEnd = React.useCallback(() => { + const _sharedIndex = Math.round(getSharedIndex()); + + const realIndex = computedRealIndexWithAutoFillData({ + index: _sharedIndex, + dataLength: rawData.length, + loop, + autoFillData, + }); + + if (onSnapToItem) + onSnapToItem(realIndex); + + if (onScrollEnd) + onScrollEnd(realIndex); + }, [ + loop, + autoFillData, + rawData.length, + getSharedIndex, + onSnapToItem, + onScrollEnd, + ]); + + const scrollViewGestureOnScrollBegin = React.useCallback(() => { + pauseAutoPlay(); + onScrollBegin?.(); + }, [onScrollBegin, pauseAutoPlay]); + + const scrollViewGestureOnScrollEnd = React.useCallback(() => { + startAutoPlay(); + _onScrollEnd(); + }, [_onScrollEnd, startAutoPlay]); + + const scrollViewGestureOnTouchBegin = React.useCallback(pauseAutoPlay, [ + pauseAutoPlay, + ]); + + const scrollViewGestureOnTouchEnd = React.useCallback(startAutoPlay, [ + startAutoPlay, + ]); + + React.useImperativeHandle( + ref, + () => ({ + next, + prev, + getCurrentIndex, + scrollTo, + }), + [getCurrentIndex, next, prev, scrollTo], + ); + + const visibleRanges = useVisibleRanges({ + total: data.length, + viewSize: size, + translation: handlerOffset, + windowSize, + }); + + const layoutConfig = useLayoutConfig({ ...props, size }); + + const renderLayout = React.useCallback( + (item: any, i: number) => { + const realIndex = computedRealIndexWithAutoFillData({ + index: i, + dataLength: rawData.length, + loop, + autoFillData, }); - const _onScrollEnd = React.useCallback(() => { - const _sharedIndex = Math.round(getSharedIndex()); - - const realIndex = computedRealIndexWithAutoFillData({ - index: _sharedIndex, - dataLength: rawData.length, - loop, - autoFillData, - }); - - if (onSnapToItem) { - onSnapToItem(realIndex); - } - if (onScrollEnd) { - onScrollEnd(realIndex); + return ( + + {({ animationValue }) => + renderItem({ + item, + index: realIndex, + animationValue, + }) } - }, [ - loop, - autoFillData, - rawData.length, - getSharedIndex, - onSnapToItem, - onScrollEnd, - ]); - - const scrollViewGestureOnScrollBegin = React.useCallback(() => { - pauseAutoPlay(); - onScrollBegin?.(); - }, [onScrollBegin, pauseAutoPlay]); - - const scrollViewGestureOnScrollEnd = React.useCallback(() => { - startAutoPlay(); - _onScrollEnd(); - }, [_onScrollEnd, startAutoPlay]); - - const scrollViewGestureOnTouchBegin = React.useCallback(pauseAutoPlay, [ - pauseAutoPlay, - ]); - - const scrollViewGestureOnTouchEnd = React.useCallback(startAutoPlay, [ - startAutoPlay, - ]); - - React.useImperativeHandle( - ref, - () => ({ - next, - prev, - getCurrentIndex, - scrollTo, - }), - [getCurrentIndex, next, prev, scrollTo] + ); - - const visibleRanges = useVisibleRanges({ - total: data.length, - viewSize: size, - translation: handlerOffset, - windowSize, - }); - - const layoutConfig = useLayoutConfig({ ...props, size }); - - const renderLayout = React.useCallback( - (item: any, i: number) => { - const realIndex = computedRealIndexWithAutoFillData({ - index: i, - dataLength: rawData.length, - loop, - autoFillData, - }); - - return ( - - {({ animationValue }) => - renderItem({ - item, - index: realIndex, - animationValue, - }) - } - - ); + }, + [ + loop, + rawData, + offsetX, + visibleRanges, + autoFillData, + renderItem, + layoutConfig, + customAnimation, + ], + ); + + return ( + + - - {data.map(renderLayout)} - - - ); - } + style, + vertical + ? styles.itemsVertical + : styles.itemsHorizontal, + ]} + testID={testID} + onScrollBegin={scrollViewGestureOnScrollBegin} + onScrollEnd={scrollViewGestureOnScrollEnd} + onTouchBegin={scrollViewGestureOnTouchBegin} + onTouchEnd={scrollViewGestureOnTouchEnd} + > + {data.map(renderLayout)} + + + ); + }, ); export default Carousel as ( - props: React.PropsWithChildren> + props: React.PropsWithChildren> ) => React.ReactElement; const styles = StyleSheet.create({ - container: { - overflow: 'hidden', - }, - itemsHorizontal: { - flexDirection: 'row', - }, - itemsVertical: { - flexDirection: 'column', - }, + container: { + overflow: "hidden", + }, + itemsHorizontal: { + flexDirection: "row", + }, + itemsVertical: { + flexDirection: "column", + }, }); diff --git a/src/LazyView.tsx b/src/LazyView.tsx index 028793f7..0ea48695 100644 --- a/src/LazyView.tsx +++ b/src/LazyView.tsx @@ -1,15 +1,14 @@ -import React from 'react'; +import React from "react"; interface Props { - shouldUpdate: boolean; + shouldUpdate: boolean } export const LazyView: React.FC = (props) => { - const { shouldUpdate, children } = props; + const { shouldUpdate, children } = props; - if (!shouldUpdate) { - return <>; - } + if (!shouldUpdate) + return <>; - return <>{children}; + return <>{children}; }; diff --git a/src/ScrollViewGesture.tsx b/src/ScrollViewGesture.tsx index 2c9db11e..d8c4037b 100644 --- a/src/ScrollViewGesture.tsx +++ b/src/ScrollViewGesture.tsx @@ -1,293 +1,287 @@ -import React from 'react'; -import type { StyleProp, ViewStyle } from 'react-native'; +import React from "react"; +import type { StyleProp, ViewStyle } from "react-native"; +import type { PanGestureHandlerGestureEvent } from "react-native-gesture-handler"; import { - PanGestureHandler, - PanGestureHandlerGestureEvent, -} from 'react-native-gesture-handler'; + PanGestureHandler, +} from "react-native-gesture-handler"; import Animated, { - cancelAnimation, - runOnJS, - useAnimatedGestureHandler, - useAnimatedReaction, - useDerivedValue, - useSharedValue, - withDecay, -} from 'react-native-reanimated'; -import { Easing } from './constants'; -import { CTX } from './store'; -import type { WithTimingAnimation } from './types'; -import { dealWithAnimation } from './utils/dealWithAnimation'; + cancelAnimation, + runOnJS, + useAnimatedGestureHandler, + useAnimatedReaction, + useDerivedValue, + useSharedValue, + withDecay, +} from "react-native-reanimated"; -type GestureContext = { - validStart: boolean; - panOffset: number; - max: number; -}; +import { Easing } from "./constants"; +import { CTX } from "./store"; +import type { WithTimingAnimation } from "./types"; +import { dealWithAnimation } from "./utils/dealWithAnimation"; + +interface GestureContext extends Record { + validStart: boolean + panOffset: number + max: number +} interface Props { - size: number; - infinite?: boolean; - testID?: string; - style?: StyleProp; - onScrollBegin?: () => void; - onScrollEnd?: () => void; - onTouchBegin?: () => void; - onTouchEnd?: () => void; - translation: Animated.SharedValue; + size: number + infinite?: boolean + testID?: string + style?: StyleProp + onScrollBegin?: () => void + onScrollEnd?: () => void + onTouchBegin?: () => void + onTouchEnd?: () => void + translation: Animated.SharedValue } const IScrollViewGesture: React.FC = (props) => { - const { - props: { - vertical, - data, - pagingEnabled, - snapEnabled, - panGestureHandlerProps, - loop: infinite, - scrollAnimationDuration, - withAnimation, - enabled, - }, - } = React.useContext(CTX); + const { + props: { + vertical, + data, + pagingEnabled, + snapEnabled, + panGestureHandlerProps, + loop: infinite, + scrollAnimationDuration, + withAnimation, + enabled, + }, + } = React.useContext(CTX); - const { - size, - translation, - testID, - style = {}, - onScrollBegin, - onScrollEnd, - onTouchBegin, - onTouchEnd, - } = props; + const { + size, + translation, + testID, + style = {}, + onScrollBegin, + onScrollEnd, + onTouchBegin, + onTouchEnd, + } = props; - const maxPage = data.length; - const isHorizontal = useDerivedValue(() => !vertical, [vertical]); - const touching = useSharedValue(false); - const scrollEndTranslation = useSharedValue(0); - const scrollEndVelocity = useSharedValue(0); + const maxPage = data.length; + const isHorizontal = useDerivedValue(() => !vertical, [vertical]); + const touching = useSharedValue(false); + const scrollEndTranslation = useSharedValue(0); + const scrollEndVelocity = useSharedValue(0); - const _withSpring = React.useCallback( - (toValue: number, onFinished?: () => void) => { - 'worklet'; - const defaultWithAnimation: WithTimingAnimation = { - type: 'timing', - config: { - duration: scrollAnimationDuration + 100, - easing: Easing.easeOutQuart, - }, - }; + const _withSpring = React.useCallback( + (toValue: number, onFinished?: () => void) => { + "worklet"; + const defaultWithAnimation: WithTimingAnimation = { + type: "timing", + config: { + duration: scrollAnimationDuration + 100, + easing: Easing.easeOutQuart, + }, + }; - return dealWithAnimation(withAnimation ?? defaultWithAnimation)( - toValue, - (isFinished: boolean) => { - 'worklet'; - if (isFinished) { - onFinished && runOnJS(onFinished)(); - } - } - ); + return dealWithAnimation(withAnimation ?? defaultWithAnimation)( + toValue, + (isFinished: boolean) => { + "worklet"; + if (isFinished) + onFinished && runOnJS(onFinished)(); }, - [scrollAnimationDuration, withAnimation] - ); + ); + }, + [scrollAnimationDuration, withAnimation], + ); - const endWithSpring = React.useCallback( - (onFinished?: () => void) => { - 'worklet'; - const origin = translation.value; - const velocity = scrollEndVelocity.value; - if (!pagingEnabled) { - /** + const endWithSpring = React.useCallback( + (onFinished?: () => void) => { + "worklet"; + const origin = translation.value; + const velocity = scrollEndVelocity.value; + if (!pagingEnabled) { + /** * If enabled, releasing the touch will scroll to the nearest item. * valid when pagingEnabled=false */ - if (snapEnabled) { - const nextPage = - Math.round((origin + velocity * 0.4) / size) * size; + if (snapEnabled) { + const nextPage + = Math.round((origin + velocity * 0.4) / size) * size; - translation.value = _withSpring(nextPage, onFinished); - return; - } - translation.value = withDecay({ - velocity, - deceleration: 0.999, - }); - return; - } + translation.value = _withSpring(nextPage, onFinished); + return; + } + translation.value = withDecay({ + velocity, + deceleration: 0.999, + }); + return; + } - const direction = -(scrollEndTranslation.value >= 0 ? 1 : -1); - const computed = direction < 0 ? Math.ceil : Math.floor; - const page = computed(-translation.value / size); - let finalPage = page + direction; + const direction = -(scrollEndTranslation.value >= 0 ? 1 : -1); + const computed = direction < 0 ? Math.ceil : Math.floor; + const page = computed(-translation.value / size); + let finalPage = page + direction; - if (!infinite) { - finalPage = Math.min(maxPage - 1, Math.max(0, finalPage)); - } + if (!infinite) + finalPage = Math.min(maxPage - 1, Math.max(0, finalPage)); - translation.value = _withSpring(-finalPage * size, onFinished); - }, - [ - translation, - scrollEndVelocity.value, - pagingEnabled, - size, - scrollEndTranslation.value, - infinite, - _withSpring, - snapEnabled, - maxPage, - ] - ); + translation.value = _withSpring(-finalPage * size, onFinished); + }, + [ + translation, + scrollEndVelocity.value, + pagingEnabled, + size, + scrollEndTranslation.value, + infinite, + _withSpring, + snapEnabled, + maxPage, + ], + ); - const onFinish = React.useCallback( - (isFinished: boolean) => { - 'worklet'; - if (isFinished) { - touching.value = false; - onScrollEnd && runOnJS(onScrollEnd)(); - } - }, - [onScrollEnd, touching] - ); + const onFinish = React.useCallback( + (isFinished: boolean) => { + "worklet"; + if (isFinished) { + touching.value = false; + onScrollEnd && runOnJS(onScrollEnd)(); + } + }, + [onScrollEnd, touching], + ); - const activeDecay = React.useCallback(() => { - 'worklet'; - touching.value = true; - translation.value = withDecay( - { velocity: scrollEndVelocity.value }, - (isFinished) => onFinish(isFinished as boolean) - ); - }, [onFinish, scrollEndVelocity.value, touching, translation]); + const activeDecay = React.useCallback(() => { + "worklet"; + touching.value = true; + translation.value = withDecay( + { velocity: scrollEndVelocity.value }, + isFinished => onFinish(isFinished as boolean), + ); + }, [onFinish, scrollEndVelocity.value, touching, translation]); - const resetBoundary = React.useCallback(() => { - 'worklet'; - if (touching.value) { - return; - } + const resetBoundary = React.useCallback(() => { + "worklet"; + if (touching.value) + return; - if (translation.value > 0) { - if (scrollEndTranslation.value < 0) { - activeDecay(); - return; - } - if (!infinite) { - translation.value = _withSpring(0); - return; - } - } + if (translation.value > 0) { + if (scrollEndTranslation.value < 0) { + activeDecay(); + return; + } + if (!infinite) { + translation.value = _withSpring(0); + return; + } + } - if (translation.value < -((maxPage - 1) * size)) { - if (scrollEndTranslation.value > 0) { - activeDecay(); - return; - } - if (!infinite) { - translation.value = _withSpring(-((maxPage - 1) * size)); - return; - } - } - }, [ - touching.value, - translation, - maxPage, - size, - scrollEndTranslation.value, - infinite, - activeDecay, - _withSpring, - ]); + if (translation.value < -((maxPage - 1) * size)) { + if (scrollEndTranslation.value > 0) { + activeDecay(); + return; + } + if (!infinite) + translation.value = _withSpring(-((maxPage - 1) * size)); + } + }, [ + touching.value, + translation, + maxPage, + size, + scrollEndTranslation.value, + infinite, + activeDecay, + _withSpring, + ]); - useAnimatedReaction( - () => translation.value, - () => { - if (!pagingEnabled) { - resetBoundary(); - } - }, - [pagingEnabled, resetBoundary] - ); + useAnimatedReaction( + () => translation.value, + () => { + if (!pagingEnabled) + resetBoundary(); + }, + [pagingEnabled, resetBoundary], + ); - const panGestureEventHandler = useAnimatedGestureHandler< - PanGestureHandlerGestureEvent, - GestureContext - >( - { - onStart: (_, ctx) => { - touching.value = true; - ctx.validStart = true; - onScrollBegin && runOnJS(onScrollBegin)(); - ctx.max = (maxPage - 1) * size; - ctx.panOffset = translation.value; - }, - onActive: (e, ctx) => { - if (ctx.validStart) { - ctx.validStart = false; - cancelAnimation(translation); - } - touching.value = true; - const { translationX, translationY } = e; - let panTranslation = isHorizontal.value - ? translationX - : translationY; + const panGestureEventHandler = useAnimatedGestureHandler< + PanGestureHandlerGestureEvent, + GestureContext + >( + { + onStart: (_, ctx) => { + touching.value = true; + ctx.validStart = true; + onScrollBegin && runOnJS(onScrollBegin)(); + ctx.max = (maxPage - 1) * size; + ctx.panOffset = translation.value; + }, + onActive: (e, ctx) => { + if (ctx.validStart) { + ctx.validStart = false; + cancelAnimation(translation); + } + touching.value = true; + const { translationX, translationY } = e; + const panTranslation = isHorizontal.value + ? translationX + : translationY; - if ( - !infinite && - (translation.value > 0 || translation.value < -ctx.max) - ) { - const boundary = translation.value > 0 ? 0 : -ctx.max; - const fixed = boundary - ctx.panOffset; - const dynamic = panTranslation - fixed; - translation.value = boundary + dynamic * 0.5; - return; - } + if ( + !infinite + && (translation.value > 0 || translation.value < -ctx.max) + ) { + const boundary = translation.value > 0 ? 0 : -ctx.max; + const fixed = boundary - ctx.panOffset; + const dynamic = panTranslation - fixed; + translation.value = boundary + dynamic * 0.5; + return; + } - translation.value = ctx.panOffset + panTranslation; - }, - onEnd: (e) => { - const { velocityX, velocityY, translationX, translationY } = e; - scrollEndVelocity.value = isHorizontal.value - ? velocityX - : velocityY; - scrollEndTranslation.value = isHorizontal.value - ? translationX - : translationY; + translation.value = ctx.panOffset + panTranslation; + }, + onEnd: (e) => { + const { velocityX, velocityY, translationX, translationY } = e; + scrollEndVelocity.value = isHorizontal.value + ? velocityX + : velocityY; + scrollEndTranslation.value = isHorizontal.value + ? translationX + : translationY; - endWithSpring(onScrollEnd); + endWithSpring(onScrollEnd); - if (!infinite) { - touching.value = false; - } - }, - }, - [ - pagingEnabled, - isHorizontal.value, - infinite, - maxPage, - size, - snapEnabled, - onScrollBegin, - onScrollEnd, - ] - ); + if (!infinite) + touching.value = false; + }, + }, + [ + pagingEnabled, + isHorizontal.value, + infinite, + maxPage, + size, + snapEnabled, + onScrollBegin, + onScrollEnd, + ], + ); - return ( - - - {props.children} - - - ); + return ( + + + {props.children} + + + ); }; export const ScrollViewGesture = IScrollViewGesture; diff --git a/src/constants/index.ts b/src/constants/index.ts index 761070d7..281dcca3 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -1,15 +1,16 @@ -import Animated, { Easing as _Easing } from 'react-native-reanimated'; +import type Animated from "react-native-reanimated"; +import { Easing as _Easing } from "react-native-reanimated"; export enum DATA_LENGTH { - SINGLE_ITEM = 1, - DOUBLE_ITEM = 2, + SINGLE_ITEM = 1, + DOUBLE_ITEM = 2, } export const Easing = { - easeOutQuart: _Easing.bezier( - 0.25, - 1, - 0.5, - 1 - ) as unknown as Animated.EasingFunction, + easeOutQuart: _Easing.bezier( + 0.25, + 1, + 0.5, + 1, + ) as unknown as Animated.EasingFunction, }; diff --git a/src/hooks/computeNewIndexWhenDataChanges.ts b/src/hooks/computeNewIndexWhenDataChanges.ts new file mode 100644 index 00000000..6ba37cf6 --- /dev/null +++ b/src/hooks/computeNewIndexWhenDataChanges.ts @@ -0,0 +1,42 @@ +export function computeNewIndexWhenDataChanges(params: { + direction: number + handlerOffset: number + size: number + previousLength: number + currentLength: number +}) { + "worklet"; + const { direction, handlerOffset: _handlerOffset, size, previousLength, currentLength } = params; + + let handlerOffset = _handlerOffset; + let positionIndex; + let round; + + const isPositive = direction < 0; + + if (isPositive) { + positionIndex = (Math.abs(handlerOffset)) / size; + round = parseInt(String(positionIndex / previousLength)); + } + else { + positionIndex = (Math.abs(handlerOffset) - size) / size; + round = parseInt(String(positionIndex / previousLength)) + 1; + } + + const prevIndex = isPositive ? (positionIndex) % previousLength : previousLength - (positionIndex) % previousLength - 1; + const changedLength = round * (currentLength - previousLength); + const changedOffset = changedLength * size; + if (prevIndex > currentLength - 1 && currentLength < previousLength) { + if (isPositive) + handlerOffset = (currentLength - 1) * size * direction; + + else + handlerOffset = (currentLength - 1) * size * -1; + } + else { + handlerOffset += changedOffset * direction; + } + + return handlerOffset; +} + diff --git a/src/hooks/index.test.ts b/src/hooks/index.test.ts new file mode 100644 index 00000000..3f8bd8d6 --- /dev/null +++ b/src/hooks/index.test.ts @@ -0,0 +1,71 @@ +import { describe, expect, it } from "vitest"; + +import { computeNewIndexWhenDataChanges } from "./computeNewIndexWhenDataChanges"; + +describe("should work as expected", () => { + const size = 375; + const positive = -1; + const negative = 1; + + const params = (params: { + direction: "positive" | "negative" + currentIndex: number + previousLength: number + currentLength: number + }) => { + const { currentIndex, direction: _direction, previousLength, currentLength } = params; + const direction = _direction === "negative" ? negative : positive; + return { + direction, + handlerOffset: size * currentIndex * direction, + size, + previousLength, + currentLength, + }; + }; + + it("The direction is negative, And changing length of data set from 4 to 3, the new index will to be 2.", async () => { + const currentIndex = 1; + const handlerOffset = computeNewIndexWhenDataChanges(params({ + currentIndex, + direction: "negative", + previousLength: 4, + currentLength: 3, + })); + + expect(handlerOffset / size).toBe(2 * positive); + }); + + it("The direction is negative, Changing length of data set from 4 to 3, the index remains original.", async () => { + const handlerOffset = computeNewIndexWhenDataChanges(params({ + currentIndex: 2, + direction: "negative", + previousLength: 4, + currentLength: 3, + })); + + expect(handlerOffset / size).toBe(1 * negative); + }); + + it("The direction is positive, Changing length of data set from 4 to 5, the index remains original.", async () => { + const handlerOffset = computeNewIndexWhenDataChanges(params({ + currentIndex: 3, + direction: "positive", + previousLength: 4, + currentLength: 5, + })); + + expect(handlerOffset / size).toBe(3 * positive); + }); + + it("The direction is negative, Changing length of data set from 4 to 5, the index remains original.", async () => { + const handlerOffset = computeNewIndexWhenDataChanges(params({ + currentIndex: 3, + direction: "negative", + previousLength: 4, + currentLength: 5, + })); + + expect(handlerOffset / size).toBe(4 * negative); + }); +}); diff --git a/src/hooks/useAutoPlay.ts b/src/hooks/useAutoPlay.ts index fa0159da..2a441f2d 100644 --- a/src/hooks/useAutoPlay.ts +++ b/src/hooks/useAutoPlay.ts @@ -1,63 +1,63 @@ -import * as React from 'react'; -import type { ICarouselController } from './useCarouselController'; +import * as React from "react"; + +import type { ICarouselController } from "./useCarouselController"; export function useAutoPlay(opts: { - autoPlay?: boolean; - autoPlayInterval?: number; - autoPlayReverse?: boolean; - carouselController: ICarouselController; + autoPlay?: boolean + autoPlayInterval?: number + autoPlayReverse?: boolean + carouselController: ICarouselController }) { - const { - autoPlay = false, - autoPlayReverse = false, - autoPlayInterval, - carouselController, - } = opts; - - const { prev, next } = carouselController; - const timer = React.useRef(); - const stopped = React.useRef(!autoPlay); - - const play = React.useCallback(() => { - if (stopped.current) { - return; - } - - timer.current && clearTimeout(timer.current); - timer.current = setTimeout(() => { - autoPlayReverse - ? prev({ onFinished: play }) - : next({ onFinished: play }); - }, autoPlayInterval); - }, [autoPlayReverse, autoPlayInterval, prev, next]); - - const pause = React.useCallback(() => { - if (!autoPlay) { - return; - } - timer.current && clearTimeout(timer.current); - stopped.current = true; - }, [autoPlay]); - - const start = React.useCallback(() => { - if (!autoPlay) { - return; - } - stopped.current = false; - play(); - }, [play, autoPlay]); - - React.useEffect(() => { - if (autoPlay) { - start(); - } else { - pause(); - } - return pause; - }, [pause, start, autoPlay]); - - return { - pause, - start, - }; + const { + autoPlay = false, + autoPlayReverse = false, + autoPlayInterval, + carouselController, + } = opts; + + const { prev, next } = carouselController; + const timer = React.useRef(); + const stopped = React.useRef(!autoPlay); + + const play = React.useCallback(() => { + if (stopped.current) + return; + + timer.current && clearTimeout(timer.current); + timer.current = setTimeout(() => { + autoPlayReverse + ? prev({ onFinished: play }) + : next({ onFinished: play }); + }, autoPlayInterval); + }, [autoPlayReverse, autoPlayInterval, prev, next]); + + const pause = React.useCallback(() => { + if (!autoPlay) + return; + + timer.current && clearTimeout(timer.current); + stopped.current = true; + }, [autoPlay]); + + const start = React.useCallback(() => { + if (!autoPlay) + return; + + stopped.current = false; + play(); + }, [play, autoPlay]); + + React.useEffect(() => { + if (autoPlay) + start(); + else + pause(); + + return pause; + }, [pause, start, autoPlay]); + + return { + pause, + start, + }; } diff --git a/src/hooks/useCarouselController.tsx b/src/hooks/useCarouselController.tsx index 55b1a8c8..424c5477 100644 --- a/src/hooks/useCarouselController.tsx +++ b/src/hooks/useCarouselController.tsx @@ -1,313 +1,310 @@ -import React, { useRef } from 'react'; -import type Animated from 'react-native-reanimated'; -import { Easing } from '../constants'; +import React, { useRef } from "react"; +import type Animated from "react-native-reanimated"; import { - runOnJS, - useAnimatedReaction, - useSharedValue, -} from 'react-native-reanimated'; + runOnJS, + useAnimatedReaction, + useSharedValue, +} from "react-native-reanimated"; + +import { Easing } from "../constants"; import type { - TCarouselActionOptions, - TCarouselProps, - WithTimingAnimation, -} from '../types'; -import { dealWithAnimation } from '../utils/dealWithAnimation'; -import { convertToSharedIndex } from '../utils/computedWithAutoFillData'; -import { round } from '../utils/log'; + TCarouselActionOptions, + TCarouselProps, + WithTimingAnimation, +} from "../types"; +import { convertToSharedIndex } from "../utils/computedWithAutoFillData"; +import { dealWithAnimation } from "../utils/dealWithAnimation"; +import { handlerOffsetDirection } from "../utils/handlerOffsetDirection"; +import { round } from "../utils/log"; interface IOpts { - loop: boolean; - size: number; - data: TCarouselProps['data']; - autoFillData: TCarouselProps['autoFillData']; - handlerOffset: Animated.SharedValue; - withAnimation?: TCarouselProps['withAnimation']; - duration?: number; - defaultIndex?: number; - onScrollBegin?: () => void; - onScrollEnd?: () => void; + loop: boolean + size: number + data: TCarouselProps["data"] + autoFillData: TCarouselProps["autoFillData"] + handlerOffset: Animated.SharedValue + withAnimation?: TCarouselProps["withAnimation"] + duration?: number + defaultIndex?: number + onScrollBegin?: () => void + onScrollEnd?: () => void } export interface ICarouselController { - getSharedIndex: () => number; - prev: (opts?: TCarouselActionOptions) => void; - next: (opts?: TCarouselActionOptions) => void; - getCurrentIndex: () => number; - scrollTo: (opts?: TCarouselActionOptions) => void; + getSharedIndex: () => number + prev: (opts?: TCarouselActionOptions) => void + next: (opts?: TCarouselActionOptions) => void + getCurrentIndex: () => number + scrollTo: (opts?: TCarouselActionOptions) => void } export function useCarouselController(options: IOpts): ICarouselController { - const { - size, - data, - loop, - handlerOffset, - withAnimation, - defaultIndex = 0, - duration, - autoFillData, - } = options; - - const dataInfo = React.useMemo( - () => ({ - length: data.length, - disable: !data.length, - originalLength: data.length, - }), - [data] + const { + size, + data, + loop, + handlerOffset, + withAnimation, + defaultIndex = 0, + duration, + autoFillData, + } = options; + + const dataInfo = React.useMemo( + () => ({ + length: data.length, + disable: !data.length, + originalLength: data.length, + }), + [data], + ); + + const index = useSharedValue(defaultIndex); + // The Index displayed to the user + const sharedIndex = useRef(defaultIndex); + const sharedPreIndex = useRef(defaultIndex); + + const currentFixedPage = React.useCallback(() => { + if (loop) + return -Math.round(handlerOffset.value / size); + + const fixed = (handlerOffset.value / size) % dataInfo.length; + return Math.round( + handlerOffset.value <= 0 + ? Math.abs(fixed) + : Math.abs(fixed > 0 ? dataInfo.length - fixed : 0), ); - - const index = useSharedValue(defaultIndex); - // The Index displayed to the user - const sharedIndex = useRef(defaultIndex); - const sharedPreIndex = useRef(defaultIndex); - - const currentFixedPage = React.useCallback(() => { - if (loop) { - return -Math.round(handlerOffset.value / size); + }, [handlerOffset, dataInfo, size, loop]); + + function setSharedIndex(newSharedIndex: number) { + sharedIndex.current = newSharedIndex; + } + + useAnimatedReaction( + () => { + const handlerOffsetValue = handlerOffset.value; + const toInt = round(handlerOffsetValue / size) % dataInfo.length; + const isPositive = handlerOffsetValue <= 0; + const i = isPositive + ? Math.abs(toInt) + : Math.abs(toInt > 0 ? dataInfo.length - toInt : 0); + + const newSharedIndexValue = convertToSharedIndex({ + loop, + rawDataLength: dataInfo.originalLength, + autoFillData: autoFillData!, + index: i, + }); + + return { + i, + newSharedIndexValue, + }; + }, + ({ i, newSharedIndexValue }) => { + index.value = i; + runOnJS(setSharedIndex)(newSharedIndexValue); + }, + [ + sharedPreIndex, + sharedIndex, + size, + dataInfo, + index, + loop, + autoFillData, + handlerOffset, + ], + ); + + const getCurrentIndex = React.useCallback(() => { + return index.value; + }, [index]); + + const canSliding = React.useCallback(() => { + return !dataInfo.disable; + }, [dataInfo]); + + const onScrollEnd = React.useCallback(() => { + options.onScrollEnd?.(); + }, [options]); + + const onScrollBegin = React.useCallback(() => { + options.onScrollBegin?.(); + }, [options]); + + const scrollWithTiming = React.useCallback( + (toValue: number, onFinished?: () => void) => { + "worklet"; + const callback = (isFinished: boolean) => { + "worklet"; + if (isFinished) { + runOnJS(onScrollEnd)(); + onFinished && runOnJS(onFinished)(); } - - const fixed = (handlerOffset.value / size) % dataInfo.length; - return Math.round( - handlerOffset.value <= 0 - ? Math.abs(fixed) - : Math.abs(fixed > 0 ? dataInfo.length - fixed : 0) + }; + + const defaultWithAnimation: WithTimingAnimation = { + type: "timing", + config: { duration, easing: Easing.easeOutQuart }, + }; + + return dealWithAnimation(withAnimation ?? defaultWithAnimation)( + toValue, + callback, + ); + }, + [duration, withAnimation, onScrollEnd], + ); + + const next = React.useCallback( + (opts: TCarouselActionOptions = {}) => { + "worklet"; + const { count = 1, animated = true, onFinished } = opts; + if (!canSliding() || (!loop && index.value >= dataInfo.length - 1)) + return; + + onScrollBegin?.(); + + const nextPage = currentFixedPage() + count; + index.value = nextPage; + + if (animated) { + handlerOffset.value = scrollWithTiming( + -nextPage * size, + onFinished, + ) as any; + } + else { + handlerOffset.value = -nextPage * size; + onFinished?.(); + } + }, + [ + canSliding, + loop, + index, + dataInfo, + onScrollBegin, + handlerOffset, + size, + scrollWithTiming, + currentFixedPage, + ], + ); + + const prev = React.useCallback( + (opts: TCarouselActionOptions = {}) => { + const { count = 1, animated = true, onFinished } = opts; + if (!canSliding() || (!loop && index.value <= 0)) return; + + onScrollBegin?.(); + + const prevPage = currentFixedPage() - count; + index.value = prevPage; + + if (animated) { + handlerOffset.value = scrollWithTiming( + -prevPage * size, + onFinished, ); - }, [handlerOffset, dataInfo, size, loop]); - - function setSharedIndex(newSharedIndex: number) { - sharedIndex.current = newSharedIndex; - } - - useAnimatedReaction( - () => { - const handlerOffsetValue = handlerOffset.value; - const toInt = round(handlerOffsetValue / size) % dataInfo.length; - const isPositive = handlerOffsetValue <= 0; - const i = isPositive - ? Math.abs(toInt) - : Math.abs(toInt > 0 ? dataInfo.length - toInt : 0); - - const newSharedIndexValue = convertToSharedIndex({ - loop, - rawDataLength: dataInfo.originalLength, - autoFillData: autoFillData!, - index: i, - }); - - return { - i, - newSharedIndexValue, - }; - }, - ({ i, newSharedIndexValue }) => { - index.value = i; - runOnJS(setSharedIndex)(newSharedIndexValue); - }, - [ - sharedPreIndex, - sharedIndex, - size, - dataInfo, - index, - loop, - autoFillData, - handlerOffset, - ] - ); - - const getCurrentIndex = React.useCallback(() => { - return index.value; - }, [index]); - - const canSliding = React.useCallback(() => { - return !dataInfo.disable; - }, [dataInfo]); - - const onScrollEnd = React.useCallback(() => { - options.onScrollEnd?.(); - }, [options]); - - const onScrollBegin = React.useCallback(() => { - options.onScrollBegin?.(); - }, [options]); - - const scrollWithTiming = React.useCallback( - (toValue: number, onFinished?: () => void) => { - 'worklet'; - const callback = (isFinished: boolean) => { - 'worklet'; - if (isFinished) { - runOnJS(onScrollEnd)(); - onFinished && runOnJS(onFinished)(); - } - }; - - const defaultWithAnimation: WithTimingAnimation = { - type: 'timing', - config: { duration, easing: Easing.easeOutQuart }, - }; - - return dealWithAnimation(withAnimation ?? defaultWithAnimation)( - toValue, - callback - ); - }, - [duration, withAnimation, onScrollEnd] - ); - - const next = React.useCallback( - (opts: TCarouselActionOptions = {}) => { - 'worklet'; - const { count = 1, animated = true, onFinished } = opts; - if (!canSliding() || (!loop && index.value >= dataInfo.length - 1)) - return; - - onScrollBegin?.(); - - const nextPage = currentFixedPage() + count; - index.value = nextPage; - - if (animated) { - handlerOffset.value = scrollWithTiming( - -nextPage * size, - onFinished - ) as any; - } else { - handlerOffset.value = -nextPage * size; - onFinished?.(); - } - }, - [ - canSliding, - loop, - index, - dataInfo, - onScrollBegin, - handlerOffset, - size, - scrollWithTiming, - currentFixedPage, - ] - ); - - const prev = React.useCallback( - (opts: TCarouselActionOptions = {}) => { - const { count = 1, animated = true, onFinished } = opts; - if (!canSliding() || (!loop && index.value <= 0)) return; - - onScrollBegin?.(); - - const prevPage = currentFixedPage() - count; - index.value = prevPage; - - if (animated) { - handlerOffset.value = scrollWithTiming( - -prevPage * size, - onFinished - ); - } else { - handlerOffset.value = -prevPage * size; - onFinished?.(); - } - }, - [ - canSliding, - loop, - index, - onScrollBegin, - handlerOffset, - size, - scrollWithTiming, - currentFixedPage, - ] - ); - - const to = React.useCallback( - (opts: { i: number; animated: boolean; onFinished?: () => void }) => { - const { i, animated = false, onFinished } = opts; - if (i === index.value) return; - if (!canSliding()) return; - - onScrollBegin?.(); - // direction -> 1 | -1 - const isPositiveZero = Object.is(handlerOffset.value, +0); - const isNegativeZero = Object.is(handlerOffset.value, -0); - const direction = isPositiveZero - ? 1 - : isNegativeZero - ? -1 - : Math.sign(handlerOffset.value); - - // target offset - const offset = i * size * direction; - // page width size * page count - const totalSize = dataInfo.length * size; - - let isCloseToNextLoop = false; - - if (loop) { - isCloseToNextLoop = - Math.abs(handlerOffset.value % totalSize) / totalSize >= - 0.5; - } - - const finalOffset = - (Math.floor(Math.abs(handlerOffset.value / totalSize)) + - (isCloseToNextLoop ? 1 : 0)) * - totalSize * - direction + - offset; - - if (animated) { - index.value = i; - handlerOffset.value = scrollWithTiming(finalOffset, onFinished); - } else { - handlerOffset.value = finalOffset; - index.value = i; - onFinished?.(); - } - }, - [ - index, - canSliding, - onScrollBegin, - handlerOffset, - size, - dataInfo.length, - loop, - scrollWithTiming, - ] - ); - - const scrollTo = React.useCallback( - (opts: TCarouselActionOptions = {}) => { - const { index: i, count, animated = false, onFinished } = opts; - if (typeof i === 'number' && i > -1) { - to({ i, animated, onFinished }); - return; - } - - if (!count) { - return; - } - - const n = Math.round(count); - - if (n < 0) { - prev({ count: Math.abs(n), animated, onFinished }); - } else { - next({ count: n, animated, onFinished }); - } - }, - [prev, next, to] - ); - - return { - next, - prev, - scrollTo, - getCurrentIndex, - getSharedIndex: () => sharedIndex.current, - }; + } + else { + handlerOffset.value = -prevPage * size; + onFinished?.(); + } + }, + [ + canSliding, + loop, + index, + onScrollBegin, + handlerOffset, + size, + scrollWithTiming, + currentFixedPage, + ], + ); + + const to = React.useCallback( + (opts: { i: number; animated: boolean; onFinished?: () => void }) => { + const { i, animated = false, onFinished } = opts; + if (i === index.value) return; + if (!canSliding()) return; + + onScrollBegin?.(); + // direction -> 1 | -1 + const direction = handlerOffsetDirection(handlerOffset); + + // target offset + const offset = i * size * direction; + // page width size * page count + const totalSize = dataInfo.length * size; + + let isCloseToNextLoop = false; + + if (loop) { + isCloseToNextLoop + = Math.abs(handlerOffset.value % totalSize) / totalSize + >= 0.5; + } + + const finalOffset + = (Math.floor(Math.abs(handlerOffset.value / totalSize)) + + (isCloseToNextLoop ? 1 : 0)) + * totalSize + * direction + + offset; + + if (animated) { + index.value = i; + handlerOffset.value = scrollWithTiming(finalOffset, onFinished); + } + else { + handlerOffset.value = finalOffset; + index.value = i; + onFinished?.(); + } + }, + [ + index, + canSliding, + onScrollBegin, + handlerOffset, + size, + dataInfo.length, + loop, + scrollWithTiming, + ], + ); + + const scrollTo = React.useCallback( + (opts: TCarouselActionOptions = {}) => { + const { index: i, count, animated = false, onFinished } = opts; + if (typeof i === "number" && i > -1) { + to({ i, animated, onFinished }); + return; + } + + if (!count) + return; + + const n = Math.round(count); + + if (n < 0) + prev({ count: Math.abs(n), animated, onFinished }); + + else + next({ count: n, animated, onFinished }); + }, + [prev, next, to], + ); + + return { + next, + prev, + scrollTo, + getCurrentIndex, + getSharedIndex: () => sharedIndex.current, + }; } diff --git a/src/hooks/useCheckMounted.ts b/src/hooks/useCheckMounted.ts index c371255f..e2b67e94 100644 --- a/src/hooks/useCheckMounted.ts +++ b/src/hooks/useCheckMounted.ts @@ -1,14 +1,14 @@ -import React from 'react'; +import React from "react"; export function useCheckMounted() { - const mounted = React.useRef(false); + const mounted = React.useRef(false); - React.useEffect(() => { - mounted.current = true; - return () => { - mounted.current = false; - }; - }, []); + React.useEffect(() => { + mounted.current = true; + return () => { + mounted.current = false; + }; + }, []); - return mounted; + return mounted; } diff --git a/src/hooks/useCommonVariables.ts b/src/hooks/useCommonVariables.ts index bae7c27e..76ecc11d 100644 --- a/src/hooks/useCommonVariables.ts +++ b/src/hooks/useCommonVariables.ts @@ -1,37 +1,73 @@ -import React from 'react'; -import Animated, { useSharedValue } from 'react-native-reanimated'; -import type { TInitializeCarouselProps } from './useInitProps'; +import React from "react"; +import type Animated from "react-native-reanimated"; +import { useSharedValue, useAnimatedReaction } from "react-native-reanimated"; + +import { computeNewIndexWhenDataChanges } from "./computeNewIndexWhenDataChanges"; +import type { TInitializeCarouselProps } from "./useInitProps"; + +import { handlerOffsetDirection } from "../utils/handlerOffsetDirection"; interface ICommonVariables { - size: number; - validLength: number; - handlerOffset: Animated.SharedValue; + size: number + validLength: number + handlerOffset: Animated.SharedValue } export function useCommonVariables( - props: TInitializeCarouselProps + props: TInitializeCarouselProps, ): ICommonVariables { - const { - vertical, - height, - width, - data, - defaultIndex, - defaultScrollOffsetValue, - } = props; - const size = vertical ? height : width; - const validLength = data.length - 1; - const defaultHandlerOffsetValue = -Math.abs(defaultIndex * size); - const _handlerOffset = useSharedValue(defaultHandlerOffsetValue); - const handlerOffset = defaultScrollOffsetValue ?? _handlerOffset; - - React.useEffect(() => { - handlerOffset.value = defaultHandlerOffsetValue; - }, [vertical, handlerOffset, defaultHandlerOffsetValue]); + const { + vertical, + height, + width, + data, + defaultIndex, + defaultScrollOffsetValue, + loop, + } = props; + const size = vertical ? height : width; + const validLength = data.length - 1; + const defaultHandlerOffsetValue = -Math.abs(defaultIndex * size); + const _handlerOffset = useSharedValue(defaultHandlerOffsetValue); + const handlerOffset = defaultScrollOffsetValue ?? _handlerOffset; + const prevData = useSharedValue(data); + React.useEffect(() => { + handlerOffset.value = defaultHandlerOffsetValue; + }, [vertical, handlerOffset, defaultHandlerOffsetValue]); + + useAnimatedReaction(() => { + const previousLength = prevData.value.length; + const currentLength = data.length; + const isLengthChanged = previousLength !== currentLength; return { - size, - validLength, - handlerOffset, + shouldComputed: isLengthChanged && loop, + previousLength, + currentLength, + data, }; + }, ({ shouldComputed, previousLength, currentLength }) => { + if (shouldComputed) { + // direction -> 1 | -1 + const direction = handlerOffsetDirection(handlerOffset); + + handlerOffset.value = computeNewIndexWhenDataChanges({ + direction, + previousLength, + currentLength, + size, + handlerOffset: handlerOffset.value, + }); + + prevData.value = data; + } + }, [ + data, loop, + ]); + + return { + size, + validLength, + handlerOffset, + }; } diff --git a/src/hooks/useInitProps.ts b/src/hooks/useInitProps.ts index b8940603..1117ff98 100644 --- a/src/hooks/useInitProps.ts +++ b/src/hooks/useInitProps.ts @@ -1,82 +1,83 @@ -import { computedFillDataWithAutoFillData } from '../utils/computedWithAutoFillData'; -import React from 'react'; -import type { TCarouselProps } from '../types'; +import React from "react"; + +import type { TCarouselProps } from "../types"; +import { computedFillDataWithAutoFillData } from "../utils/computedWithAutoFillData"; type TGetRequiredProps

= Record< - P, - Required[P] +P, +Required[P] >; export type TInitializeCarouselProps = TCarouselProps & - TGetRequiredProps< - | 'defaultIndex' - | 'loop' - | 'width' - | 'height' - | 'scrollAnimationDuration' - | 'autoPlayInterval' - | 'autoFillData' - > & { - // Raw data that has not been processed - rawData: T[]; - }; +TGetRequiredProps< +| "defaultIndex" +| "loop" +| "width" +| "height" +| "scrollAnimationDuration" +| "autoPlayInterval" +| "autoFillData" +> & { + // Raw data that has not been processed + rawData: T[] +}; export function useInitProps( - props: TCarouselProps + props: TCarouselProps, ): TInitializeCarouselProps { - const { - defaultIndex = 0, - data: rawData = [], - loop = true, - enabled = true, - autoPlayInterval: _autoPlayInterval = 1000, - scrollAnimationDuration = 500, - style = {}, - panGestureHandlerProps = {}, - pagingEnabled = true, - autoFillData = true, - snapEnabled = props.enableSnap ?? true, - width: _width, - height: _height, - } = props; - - const width = Math.round(_width || 0); - const height = Math.round(_height || 0); - const autoPlayInterval = Math.max(_autoPlayInterval, 0); + const { + defaultIndex = 0, + data: rawData = [], + loop = true, + enabled = true, + autoPlayInterval: _autoPlayInterval = 1000, + scrollAnimationDuration = 500, + style = {}, + panGestureHandlerProps = {}, + pagingEnabled = true, + autoFillData = true, + snapEnabled = props.enableSnap ?? true, + width: _width, + height: _height, + } = props; - const data = React.useMemo( - () => - computedFillDataWithAutoFillData({ - loop, - autoFillData, - data: rawData, - dataLength: rawData.length, - }), - [rawData, loop, autoFillData] - ); + const width = Math.round(_width || 0); + const height = Math.round(_height || 0); + const autoPlayInterval = Math.max(_autoPlayInterval, 0); - if (props.mode === 'vertical-stack' || props.mode === 'horizontal-stack') { - if (!props.modeConfig) { - props.modeConfig = {}; - } - props.modeConfig.showLength = - props.modeConfig?.showLength ?? data.length - 1; - } - return { - ...props, - defaultIndex, - autoFillData, - data, - rawData, + const data = React.useMemo( + () => + computedFillDataWithAutoFillData({ loop, - enabled, - autoPlayInterval, - scrollAnimationDuration, - style, - panGestureHandlerProps, - pagingEnabled, - snapEnabled, - width, - height, - }; + autoFillData, + data: rawData, + dataLength: rawData.length, + }), + [rawData, loop, autoFillData], + ); + + if (props.mode === "vertical-stack" || props.mode === "horizontal-stack") { + if (!props.modeConfig) + props.modeConfig = {}; + + props.modeConfig.showLength + = props.modeConfig?.showLength ?? data.length - 1; + } + return { + ...props, + defaultIndex, + autoFillData, + data, + rawData, + loop, + enabled, + autoPlayInterval, + scrollAnimationDuration, + style, + panGestureHandlerProps, + pagingEnabled, + snapEnabled, + width, + height, + }; } diff --git a/src/hooks/useLayoutConfig.ts b/src/hooks/useLayoutConfig.ts index 37cce55c..8d91849d 100644 --- a/src/hooks/useLayoutConfig.ts +++ b/src/hooks/useLayoutConfig.ts @@ -1,26 +1,28 @@ -import React from 'react'; -import type { TAnimationStyle } from '../layouts/BaseLayout'; -import { Layouts } from '../layouts'; -import type { TInitializeCarouselProps } from './useInitProps'; +import React from "react"; + +import type { TInitializeCarouselProps } from "./useInitProps"; + +import { Layouts } from "../layouts"; +import type { TAnimationStyle } from "../layouts/BaseLayout"; type TLayoutConfigOpts = TInitializeCarouselProps & { size: number }; export function useLayoutConfig( - opts: TLayoutConfigOpts + opts: TLayoutConfigOpts, ): TAnimationStyle { - const { size, vertical } = opts as Required>; + const { size, vertical } = opts as Required>; - return React.useMemo(() => { - const baseConfig = { size, vertical }; - switch (opts.mode) { - case 'parallax': - return Layouts.parallax(baseConfig, opts.modeConfig); - case 'horizontal-stack': - return Layouts.horizontalStack(opts.modeConfig); - case 'vertical-stack': - return Layouts.verticalStack(opts.modeConfig); - default: - return Layouts.normal(baseConfig); - } - }, [opts.mode, opts.modeConfig, size, vertical]); + return React.useMemo(() => { + const baseConfig = { size, vertical }; + switch (opts.mode) { + case "parallax": + return Layouts.parallax(baseConfig, opts.modeConfig); + case "horizontal-stack": + return Layouts.horizontalStack(opts.modeConfig); + case "vertical-stack": + return Layouts.verticalStack(opts.modeConfig); + default: + return Layouts.normal(baseConfig); + } + }, [opts.mode, opts.modeConfig, size, vertical]); } diff --git a/src/hooks/useOffsetX.ts b/src/hooks/useOffsetX.ts index 4702eaf2..47a124c9 100644 --- a/src/hooks/useOffsetX.ts +++ b/src/hooks/useOffsetX.ts @@ -1,87 +1,87 @@ -import Animated, { - Extrapolate, - interpolate, - useDerivedValue, -} from 'react-native-reanimated'; -import type { IVisibleRanges } from './useVisibleRanges'; +import type Animated from "react-native-reanimated"; +import { + Extrapolate, + interpolate, + useDerivedValue, +} from "react-native-reanimated"; + +import type { IVisibleRanges } from "./useVisibleRanges"; export interface IOpts { - index: number; - size: number; - handlerOffset: Animated.SharedValue; - data: unknown[]; - type?: 'positive' | 'negative'; - viewCount?: number; - loop?: boolean; + index: number + size: number + handlerOffset: Animated.SharedValue + data: unknown[] + type?: "positive" | "negative" + viewCount?: number + loop?: boolean } export const useOffsetX = (opts: IOpts, visibleRanges: IVisibleRanges) => { - const { - handlerOffset, - index, - size, - loop, - data, - type = 'positive', - viewCount = Math.round((data.length - 1) / 2), - } = opts; + const { + handlerOffset, + index, + size, + loop, + data, + type = "positive", + viewCount = Math.round((data.length - 1) / 2), + } = opts; - const ITEM_LENGTH = data.length; - const VALID_LENGTH = ITEM_LENGTH - 1; - const TOTAL_WIDTH = size * ITEM_LENGTH; - const HALF_WIDTH = 0.5 * size; + const ITEM_LENGTH = data.length; + const VALID_LENGTH = ITEM_LENGTH - 1; + const TOTAL_WIDTH = size * ITEM_LENGTH; + const HALF_WIDTH = 0.5 * size; - const positiveCount = - type === 'positive' ? viewCount : VALID_LENGTH - viewCount; + const positiveCount + = type === "positive" ? viewCount : VALID_LENGTH - viewCount; - let startPos = size * index; - if (index > positiveCount) { - startPos = (index - ITEM_LENGTH) * size; - } + let startPos = size * index; + if (index > positiveCount) + startPos = (index - ITEM_LENGTH) * size; - const MAX = positiveCount * size; - const MIN = -((VALID_LENGTH - positiveCount) * size); + const MAX = positiveCount * size; + const MIN = -((VALID_LENGTH - positiveCount) * size); - const x = useDerivedValue(() => { - const { negativeRange, positiveRange } = visibleRanges.value; - if ( - (index < negativeRange[0] || index > negativeRange[1]) && - (index < positiveRange[0] || index > positiveRange[1]) - ) { - return Number.MAX_SAFE_INTEGER; - } + const x = useDerivedValue(() => { + const { negativeRange, positiveRange } = visibleRanges.value; + if ( + (index < negativeRange[0] || index > negativeRange[1]) + && (index < positiveRange[0] || index > positiveRange[1]) + ) + return Number.MAX_SAFE_INTEGER; - if (loop) { - const inputRange = [ - -TOTAL_WIDTH, - MIN - HALF_WIDTH - startPos - Number.MIN_VALUE, - MIN - HALF_WIDTH - startPos, - 0, - MAX + HALF_WIDTH - startPos, - MAX + HALF_WIDTH - startPos + Number.MIN_VALUE, - TOTAL_WIDTH, - ]; + if (loop) { + const inputRange = [ + -TOTAL_WIDTH, + MIN - HALF_WIDTH - startPos - Number.MIN_VALUE, + MIN - HALF_WIDTH - startPos, + 0, + MAX + HALF_WIDTH - startPos, + MAX + HALF_WIDTH - startPos + Number.MIN_VALUE, + TOTAL_WIDTH, + ]; - const outputRange = [ - startPos, - MAX + HALF_WIDTH - Number.MIN_VALUE, - MIN - HALF_WIDTH, - startPos, - MAX + HALF_WIDTH, - MIN - HALF_WIDTH + Number.MIN_VALUE, - startPos, - ]; + const outputRange = [ + startPos, + MAX + HALF_WIDTH - Number.MIN_VALUE, + MIN - HALF_WIDTH, + startPos, + MAX + HALF_WIDTH, + MIN - HALF_WIDTH + Number.MIN_VALUE, + startPos, + ]; - return interpolate( - handlerOffset.value, - inputRange, - outputRange, - Extrapolate.CLAMP - ); - } + return interpolate( + handlerOffset.value, + inputRange, + outputRange, + Extrapolate.CLAMP, + ); + } - return handlerOffset.value + size * index; - }, [loop, data, viewCount, type, size, visibleRanges]); + return handlerOffset.value + size * index; + }, [loop, data, viewCount, type, size, visibleRanges]); - return x; + return x; }; diff --git a/src/hooks/useOnProgressChange.ts b/src/hooks/useOnProgressChange.ts index 084300cb..7c24ea8d 100644 --- a/src/hooks/useOnProgressChange.ts +++ b/src/hooks/useOnProgressChange.ts @@ -1,51 +1,52 @@ -import Animated, { - runOnJS, - useAnimatedReaction, -} from 'react-native-reanimated'; -import { computedOffsetXValueWithAutoFillData } from '../utils/computedWithAutoFillData'; -import type { TCarouselProps } from '../types'; +import type Animated from "react-native-reanimated"; +import { + runOnJS, + useAnimatedReaction, +} from "react-native-reanimated"; + +import type { TCarouselProps } from "../types"; +import { computedOffsetXValueWithAutoFillData } from "../utils/computedWithAutoFillData"; export function useOnProgressChange( - opts: { - size: number; - autoFillData: boolean; - loop: boolean; - offsetX: Animated.SharedValue; - rawData: TCarouselProps['data']; - } & Pick + opts: { + size: number + autoFillData: boolean + loop: boolean + offsetX: Animated.SharedValue + rawData: TCarouselProps["data"] + } & Pick, ) { - const { autoFillData, loop, offsetX, rawData, size, onProgressChange } = - opts; - - const rawDataLength = rawData.length; - - useAnimatedReaction( - () => offsetX.value, - (_value) => { - let value = computedOffsetXValueWithAutoFillData({ - value: _value, - rawDataLength, - size, - autoFillData, - loop, - }); - - if (!loop) { - value = Math.max( - -((rawDataLength - 1) * size), - Math.min(value, 0) - ); - } - - let absoluteProgress = Math.abs(value / size); - - if (value > 0) { - absoluteProgress = rawDataLength - absoluteProgress; - } - - !!onProgressChange && - runOnJS(onProgressChange)(value, absoluteProgress); - }, - [loop, autoFillData, rawDataLength, onProgressChange] - ); + const { autoFillData, loop, offsetX, rawData, size, onProgressChange } + = opts; + + const rawDataLength = rawData.length; + + useAnimatedReaction( + () => offsetX.value, + (_value) => { + let value = computedOffsetXValueWithAutoFillData({ + value: _value, + rawDataLength, + size, + autoFillData, + loop, + }); + + if (!loop) { + value = Math.max( + -((rawDataLength - 1) * size), + Math.min(value, 0), + ); + } + + let absoluteProgress = Math.abs(value / size); + + if (value > 0) + absoluteProgress = rawDataLength - absoluteProgress; + + if (onProgressChange) + runOnJS(onProgressChange)(value, absoluteProgress); + }, + [loop, autoFillData, rawDataLength, onProgressChange], + ); } diff --git a/src/hooks/usePropsErrorBoundary.ts b/src/hooks/usePropsErrorBoundary.ts index 69be67b2..26eee892 100644 --- a/src/hooks/usePropsErrorBoundary.ts +++ b/src/hooks/usePropsErrorBoundary.ts @@ -1,31 +1,32 @@ -import React from 'react'; -import type { TCarouselProps } from '../types'; +import React from "react"; + +import type { TCarouselProps } from "../types"; export function usePropsErrorBoundary(props: TCarouselProps) { - React.useEffect(() => { - const { defaultIndex, data } = props; + React.useEffect(() => { + const { defaultIndex, data } = props; - const viewCount = data.length; - if (typeof defaultIndex === 'number' && viewCount > 0) { - if (defaultIndex < 0 || defaultIndex >= viewCount) { - throw Error( - 'DefaultIndex must be in the range of data length.' - ); - } - } + const viewCount = data.length; + if (typeof defaultIndex === "number" && viewCount > 0) { + if (defaultIndex < 0 || defaultIndex >= viewCount) { + throw new Error( + "DefaultIndex must be in the range of data length.", + ); + } + } - // TODO - if (!props.mode || props.mode === 'parallax') { - if (!props.vertical && !props.width) { - throw Error( - '`width` must be specified for horizontal carousels.' - ); - } - if (props.vertical && !props.height) { - throw Error( - '`height` must be specified for vertical carousels.' - ); - } - } - }, [props]); + // TODO + if (!props.mode || props.mode === "parallax") { + if (!props.vertical && !props.width) { + throw new Error( + "`width` must be specified for horizontal carousels.", + ); + } + if (props.vertical && !props.height) { + throw new Error( + "`height` must be specified for vertical carousels.", + ); + } + } + }, [props]); } diff --git a/src/hooks/useVisibleRanges.tsx b/src/hooks/useVisibleRanges.tsx index d82454c3..0a96dd45 100644 --- a/src/hooks/useVisibleRanges.tsx +++ b/src/hooks/useVisibleRanges.tsx @@ -1,49 +1,49 @@ -import type Animated from 'react-native-reanimated'; -import { useDerivedValue } from 'react-native-reanimated'; +import type Animated from "react-native-reanimated"; +import { useDerivedValue } from "react-native-reanimated"; export type IVisibleRanges = Animated.SharedValue<{ - negativeRange: number[]; - positiveRange: number[]; + negativeRange: number[] + positiveRange: number[] }>; export function useVisibleRanges(options: { - total: number; - viewSize: number; - windowSize?: number; - translation: Animated.SharedValue; + total: number + viewSize: number + windowSize?: number + translation: Animated.SharedValue }): IVisibleRanges { - const { - total = 0, - viewSize, - translation, - windowSize: _windowSize = 0, - } = options; + const { + total = 0, + viewSize, + translation, + windowSize: _windowSize = 0, + } = options; - const windowSize = total <= _windowSize ? total : _windowSize; + const windowSize = total <= _windowSize ? total : _windowSize; - const ranges = useDerivedValue(() => { - const positiveCount = Math.round(windowSize / 2); - const negativeCount = windowSize - positiveCount; - let curIndex = Math.round(-translation.value / viewSize); - curIndex = curIndex < 0 ? (curIndex % total) + total : curIndex; - const negativeRange = [ - (curIndex - negativeCount + total) % total, - (curIndex - 1 + total) % total, - ]; - const positiveRange = [ - (curIndex + total) % total, - (curIndex + positiveCount + total) % total, - ]; - if (negativeRange[0] < total && negativeRange[0] > negativeRange[1]) { - negativeRange[1] = total - 1; - positiveRange[0] = 0; - } - if (positiveRange[0] > positiveRange[1]) { - negativeRange[1] = total - 1; - positiveRange[0] = 0; - } - return { negativeRange, positiveRange }; - }, [total, windowSize, translation]); + const ranges = useDerivedValue(() => { + const positiveCount = Math.round(windowSize / 2); + const negativeCount = windowSize - positiveCount; + let curIndex = Math.round(-translation.value / viewSize); + curIndex = curIndex < 0 ? (curIndex % total) + total : curIndex; + const negativeRange = [ + (curIndex - negativeCount + total) % total, + (curIndex - 1 + total) % total, + ]; + const positiveRange = [ + (curIndex + total) % total, + (curIndex + positiveCount + total) % total, + ]; + if (negativeRange[0] < total && negativeRange[0] > negativeRange[1]) { + negativeRange[1] = total - 1; + positiveRange[0] = 0; + } + if (positiveRange[0] > positiveRange[1]) { + negativeRange[1] = total - 1; + positiveRange[0] = 0; + } + return { negativeRange, positiveRange }; + }, [total, windowSize, translation]); - return ranges; + return ranges; } diff --git a/src/index.tsx b/src/index.tsx index fbc40f21..44b8e948 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,8 +1,8 @@ +import Carousel from "./Carousel"; export type { - TCarouselProps, - ICarouselInstance, - IComputedDirectionTypes, -} from './types'; -import Carousel from './Carousel'; + TCarouselProps, + ICarouselInstance, + IComputedDirectionTypes, +} from "./types"; export default Carousel; diff --git a/src/layouts/BaseLayout.tsx b/src/layouts/BaseLayout.tsx index eddaee19..d97599f7 100644 --- a/src/layouts/BaseLayout.tsx +++ b/src/layouts/BaseLayout.tsx @@ -1,116 +1,118 @@ -import React from 'react'; -import type { ViewStyle } from 'react-native'; +import React from "react"; +import type { ViewStyle } from "react-native"; +import type { AnimatedStyleProp } from "react-native-reanimated"; import Animated, { - AnimatedStyleProp, - runOnJS, - useAnimatedReaction, - useAnimatedStyle, - useDerivedValue, -} from 'react-native-reanimated'; -import { useCheckMounted } from '../hooks/useCheckMounted'; -import { IOpts, useOffsetX } from '../hooks/useOffsetX'; -import type { IVisibleRanges } from '../hooks/useVisibleRanges'; -import { LazyView } from '../LazyView'; -import { CTX } from '../store'; -import type { ILayoutConfig } from './stack'; + runOnJS, + useAnimatedReaction, + useAnimatedStyle, + useDerivedValue, +} from "react-native-reanimated"; + +import type { ILayoutConfig } from "./stack"; + +import { useCheckMounted } from "../hooks/useCheckMounted"; +import type { IOpts } from "../hooks/useOffsetX"; +import { useOffsetX } from "../hooks/useOffsetX"; +import type { IVisibleRanges } from "../hooks/useVisibleRanges"; +import { LazyView } from "../LazyView"; +import { CTX } from "../store"; export type TAnimationStyle = (value: number) => AnimatedStyleProp; export const BaseLayout: React.FC<{ - index: number; - handlerOffset: Animated.SharedValue; - visibleRanges: IVisibleRanges; - animationStyle: TAnimationStyle; - children: (ctx: { - animationValue: Animated.SharedValue; - }) => React.ReactElement; + index: number + handlerOffset: Animated.SharedValue + visibleRanges: IVisibleRanges + animationStyle: TAnimationStyle + children: (ctx: { + animationValue: Animated.SharedValue + }) => React.ReactElement }> = (props) => { - const mounted = useCheckMounted(); - const { handlerOffset, index, children, visibleRanges, animationStyle } = - props; + const mounted = useCheckMounted(); + const { handlerOffset, index, children, visibleRanges, animationStyle } + = props; - const context = React.useContext(CTX); - const { - props: { - loop, - data, - width, - height, - vertical, - customConfig, - mode, - modeConfig, - }, - } = context; - const size = vertical ? height : width; - const [shouldUpdate, setShouldUpdate] = React.useState(false); - let offsetXConfig: IOpts = { - handlerOffset: handlerOffset, - index, - size, - data, - loop, - ...(typeof customConfig === 'function' ? customConfig() : {}), - }; + const context = React.useContext(CTX); + const { + props: { + loop, + data, + width, + height, + vertical, + customConfig, + mode, + modeConfig, + }, + } = context; + const size = vertical ? height : width; + const [shouldUpdate, setShouldUpdate] = React.useState(false); + let offsetXConfig: IOpts = { + handlerOffset, + index, + size, + data, + loop, + ...(typeof customConfig === "function" ? customConfig() : {}), + }; - if (mode === 'horizontal-stack') { - const { snapDirection, showLength } = modeConfig as ILayoutConfig; + if (mode === "horizontal-stack") { + const { snapDirection, showLength } = modeConfig as ILayoutConfig; - offsetXConfig = { - handlerOffset: handlerOffset, - index, - size, - data, - loop, - type: snapDirection === 'right' ? 'negative' : 'positive', - viewCount: showLength, - }; - } + offsetXConfig = { + handlerOffset, + index, + size, + data, + loop, + type: snapDirection === "right" ? "negative" : "positive", + viewCount: showLength, + }; + } - const x = useOffsetX(offsetXConfig, visibleRanges); - const animationValue = useDerivedValue(() => x.value / size, [x, size]); - const animatedStyle = useAnimatedStyle( - // @ts-ignore - () => animationStyle(x.value / size), - [animationStyle] - ); + const x = useOffsetX(offsetXConfig, visibleRanges); + const animationValue = useDerivedValue(() => x.value / size, [x, size]); + const animatedStyle = useAnimatedStyle( + () => animationStyle(x.value / size), + [animationStyle], + ); - const updateView = React.useCallback( - (negativeRange: number[], positiveRange: number[]) => { - mounted.current && - setShouldUpdate( - (index >= negativeRange[0] && index <= negativeRange[1]) || - (index >= positiveRange[0] && index <= positiveRange[1]) + const updateView = React.useCallback( + (negativeRange: number[], positiveRange: number[]) => { + mounted.current + && setShouldUpdate( + (index >= negativeRange[0] && index <= negativeRange[1]) + || (index >= positiveRange[0] && index <= positiveRange[1]), ); - }, - [index, mounted] - ); + }, + [index, mounted], + ); - useAnimatedReaction( - () => visibleRanges.value, - () => { - runOnJS(updateView)( - visibleRanges.value.negativeRange, - visibleRanges.value.positiveRange - ); - }, - [visibleRanges.value] - ); + useAnimatedReaction( + () => visibleRanges.value, + () => { + runOnJS(updateView)( + visibleRanges.value.negativeRange, + visibleRanges.value.positiveRange, + ); + }, + [visibleRanges.value], + ); - return ( - - - {children({ animationValue })} - - - ); + return ( + + + {children({ animationValue })} + + + ); }; diff --git a/src/layouts/ParallaxLayout.tsx b/src/layouts/ParallaxLayout.tsx index bf693527..4cdb2077 100644 --- a/src/layouts/ParallaxLayout.tsx +++ b/src/layouts/ParallaxLayout.tsx @@ -1,140 +1,142 @@ -import React from 'react'; +import React from "react"; import Animated, { - Extrapolate, - interpolate, - runOnJS, - useAnimatedReaction, - useAnimatedStyle, -} from 'react-native-reanimated'; -import type { IComputedDirectionTypes } from '../types'; -import { useOffsetX } from '../hooks/useOffsetX'; -import type { IVisibleRanges } from '../hooks/useVisibleRanges'; -import { LazyView } from '../LazyView'; -import type { ILayoutConfig } from './parallax'; + Extrapolate, + interpolate, + runOnJS, + useAnimatedReaction, + useAnimatedStyle, +} from "react-native-reanimated"; -export const ParallaxLayout: React.FC< - IComputedDirectionTypes< - { - loop?: boolean; - handlerOffset: Animated.SharedValue; - index: number; - data: unknown[]; - visibleRanges: IVisibleRanges; - } & ILayoutConfig - > -> = (props) => { - const { - handlerOffset, - parallaxScrollingOffset = 100, - parallaxScrollingScale = 0.8, - parallaxAdjacentItemScale = Math.pow(parallaxScrollingScale, 2), - index, - width, - height, - loop, - data, - children, - visibleRanges, - vertical, - } = props; +import type { ILayoutConfig } from "./parallax"; - const [shouldUpdate, setShouldUpdate] = React.useState(false); +import { useOffsetX } from "../hooks/useOffsetX"; +import type { IVisibleRanges } from "../hooks/useVisibleRanges"; +import { LazyView } from "../LazyView"; +import type { IComputedDirectionTypes } from "../types"; - const size = props.vertical ? props.height : props.width; +export const ParallaxLayout: React.FC< +IComputedDirectionTypes< +{ + loop?: boolean + handlerOffset: Animated.SharedValue + index: number + data: unknown[] + visibleRanges: IVisibleRanges +} & ILayoutConfig +> +> = (props) => { + const { + handlerOffset, + parallaxScrollingOffset = 100, + parallaxScrollingScale = 0.8, + parallaxAdjacentItemScale = parallaxScrollingScale ** 2, + index, + width, + height, + loop, + data, + children, + visibleRanges, + vertical, + } = props; - const x = useOffsetX( - { - handlerOffset: handlerOffset, - index, - size, - data, - loop, - }, - visibleRanges - ); + const [shouldUpdate, setShouldUpdate] = React.useState(false); - const offsetXStyle = useAnimatedStyle(() => { - const value = x.value / size; + const size = props.vertical ? props.height : props.width; - const translate = interpolate( - value, - [-1, 0, 1], - [ - -size + parallaxScrollingOffset, - 0, - size - parallaxScrollingOffset, - ], - Extrapolate.EXTEND - ); + const x = useOffsetX( + { + handlerOffset, + index, + size, + data, + loop, + }, + visibleRanges, + ); - const zIndex = interpolate( - value, - [-1, 0, 1], - [0, size, 0], - Extrapolate.CLAMP - ); + const offsetXStyle = useAnimatedStyle(() => { + const value = x.value / size; - const scale = interpolate( - value, - [-1, 0, 1], - [ - parallaxAdjacentItemScale, - parallaxScrollingScale, - parallaxAdjacentItemScale, - ], - Extrapolate.CLAMP - ); + const translate = interpolate( + value, + [-1, 0, 1], + [ + -size + parallaxScrollingOffset, + 0, + size - parallaxScrollingOffset, + ], + Extrapolate.EXTEND, + ); - return { - transform: [ - vertical - ? { - translateY: translate, - } - : { - translateX: translate, - }, - { - scale, - }, - ], - zIndex, - }; - }, [loop, vertical, parallaxScrollingOffset]); + const zIndex = interpolate( + value, + [-1, 0, 1], + [0, size, 0], + Extrapolate.CLAMP, + ); - const updateView = React.useCallback( - (negativeRange: number[], positiveRange: number[]) => { - setShouldUpdate( - (index >= negativeRange[0] && index <= negativeRange[1]) || - (index >= positiveRange[0] && index <= positiveRange[1]) - ); - }, - [index] + const scale = interpolate( + value, + [-1, 0, 1], + [ + parallaxAdjacentItemScale, + parallaxScrollingScale, + parallaxAdjacentItemScale, + ], + Extrapolate.CLAMP, ); - useAnimatedReaction( - () => visibleRanges.value, - () => { - runOnJS(updateView)( - visibleRanges.value.negativeRange, - visibleRanges.value.positiveRange - ); + return { + transform: [ + vertical + ? { + translateY: translate, + } + : { + translateX: translate, + }, + { + scale, }, - [visibleRanges.value] - ); + ], + zIndex, + }; + }, [loop, vertical, parallaxScrollingOffset]); - return ( - - {children} - - ); + const updateView = React.useCallback( + (negativeRange: number[], positiveRange: number[]) => { + setShouldUpdate( + (index >= negativeRange[0] && index <= negativeRange[1]) + || (index >= positiveRange[0] && index <= positiveRange[1]), + ); + }, + [index], + ); + + useAnimatedReaction( + () => visibleRanges.value, + () => { + runOnJS(updateView)( + visibleRanges.value.negativeRange, + visibleRanges.value.positiveRange, + ); + }, + [visibleRanges.value], + ); + + return ( + + {children} + + ); }; diff --git a/src/layouts/index.tsx b/src/layouts/index.tsx index 4ebe4759..c8938883 100644 --- a/src/layouts/index.tsx +++ b/src/layouts/index.tsx @@ -1,12 +1,12 @@ -import { normalLayout } from './normal'; -import { parallaxLayout } from './parallax'; -import { horizontalStackLayout, verticalStackLayout } from './stack'; +import { normalLayout } from "./normal"; +import { parallaxLayout } from "./parallax"; +import { horizontalStackLayout, verticalStackLayout } from "./stack"; -export type TMode = 'parallax' | 'horizontal-stack' | 'vertical-stack'; +export type TMode = "parallax" | "horizontal-stack" | "vertical-stack"; export const Layouts = { - normal: normalLayout, - parallax: parallaxLayout, - horizontalStack: horizontalStackLayout, - verticalStack: verticalStackLayout, + normal: normalLayout, + parallax: parallaxLayout, + horizontalStack: horizontalStackLayout, + verticalStack: verticalStackLayout, }; diff --git a/src/layouts/normal.ts b/src/layouts/normal.ts index 84e66fe1..c317b210 100644 --- a/src/layouts/normal.ts +++ b/src/layouts/normal.ts @@ -1,22 +1,22 @@ -import { interpolate } from 'react-native-reanimated'; +import { interpolate } from "react-native-reanimated"; export function normalLayout(opts: { size: number; vertical: boolean }) { - const { size, vertical } = opts; + const { size, vertical } = opts; - return (value: number) => { - 'worklet'; - const translate = interpolate(value, [-1, 0, 1], [-size, 0, size]); + return (value: number) => { + "worklet"; + const translate = interpolate(value, [-1, 0, 1], [-size, 0, size]); - return { - transform: [ - vertical - ? { - translateY: translate, - } - : { - translateX: translate, - }, - ], - }; + return { + transform: [ + vertical + ? { + translateY: translate, + } + : { + translateX: translate, + }, + ], }; + }; } diff --git a/src/layouts/parallax.ts b/src/layouts/parallax.ts index 48eb16d3..2f8246f3 100644 --- a/src/layouts/parallax.ts +++ b/src/layouts/parallax.ts @@ -1,88 +1,89 @@ -import { Extrapolate, interpolate } from 'react-native-reanimated'; -import type { IComputedDirectionTypes } from '../types'; +import { Extrapolate, interpolate } from "react-native-reanimated"; -type TBaseConfig = { - size: number; - vertical: boolean; -}; +import type { IComputedDirectionTypes } from "../types"; + +interface TBaseConfig { + size: number + vertical: boolean +} export interface ILayoutConfig { - /** + /** * control prev/next item offset. * @default 100 */ - parallaxScrollingOffset?: number; - /** + parallaxScrollingOffset?: number + /** * control prev/current/next item offset. * @default 0.8 */ - parallaxScrollingScale?: number; - /** + parallaxScrollingScale?: number + /** * control prev/next item offset. * @default Math.pow(parallaxScrollingScale, 2) */ - parallaxAdjacentItemScale?: number; + parallaxAdjacentItemScale?: number } export type TParallaxModeProps = IComputedDirectionTypes<{ - /** + /** * Carousel Animated transitions. */ - mode?: 'parallax'; - modeConfig?: ILayoutConfig; + mode?: "parallax" + modeConfig?: ILayoutConfig }>; export function parallaxLayout( - baseConfig: TBaseConfig, - modeConfig: ILayoutConfig = {} + baseConfig: TBaseConfig, + modeConfig: ILayoutConfig = {}, ) { - const { size, vertical } = baseConfig; - const { - parallaxScrollingOffset = 100, - parallaxScrollingScale = 0.8, - parallaxAdjacentItemScale = Math.pow(parallaxScrollingScale, 2), - } = modeConfig; + const { size, vertical } = baseConfig; + const { + parallaxScrollingOffset = 100, + parallaxScrollingScale = 0.8, + parallaxAdjacentItemScale = parallaxScrollingScale ** 2, + } = modeConfig; - return (value: number) => { - 'worklet'; - const translate = interpolate( - value, - [-1, 0, 1], - [-size + parallaxScrollingOffset, 0, size - parallaxScrollingOffset] - ); + return (value: number) => { + "worklet"; + const translate = interpolate( + value, + [-1, 0, 1], + [-size + parallaxScrollingOffset, 0, size - parallaxScrollingOffset], + ); - const zIndex = interpolate( - value, - [-1, 0, 1], - [0, size, 0], - Extrapolate.CLAMP - ); + const zIndex = interpolate( + value, + [-1, 0, 1], + [0, size, 0], + Extrapolate.CLAMP, + ); - const scale = interpolate( - value, - [-1, 0, 1], - [ - parallaxAdjacentItemScale, - parallaxScrollingScale, - parallaxAdjacentItemScale, - ], - Extrapolate.CLAMP - ); + const scale = interpolate( + value, + [-1, 0, 1], + [ + parallaxAdjacentItemScale, + parallaxScrollingScale, + parallaxAdjacentItemScale, + ], + Extrapolate.CLAMP, + ); - return { - transform: [ - vertical - ? { - translateY: translate, - } - : { - translateX: translate, - }, - { - scale, - }, - ], - zIndex, - }; + return { + transform: [ + vertical + ? { + translateY: translate, + } + : { + translateX: translate, + }, + { + scale, + }, + ], + zIndex, }; + }; } diff --git a/src/layouts/stack.ts b/src/layouts/stack.ts index 46d0b6fa..77a9b57c 100644 --- a/src/layouts/stack.ts +++ b/src/layouts/stack.ts @@ -1,26 +1,28 @@ -import { useMemo } from 'react'; -import { Dimensions, TransformsStyle, ViewStyle } from 'react-native'; -import { Extrapolate, interpolate } from 'react-native-reanimated'; -import type { IComputedDirectionTypes, CustomConfig } from '../types'; +import { useMemo } from "react"; +import type { TransformsStyle, ViewStyle } from "react-native"; +import { Dimensions } from "react-native"; +import { Extrapolate, interpolate } from "react-native-reanimated"; -const screen = Dimensions.get('window'); +import type { IComputedDirectionTypes, CustomConfig } from "../types"; + +const screen = Dimensions.get("window"); export interface ILayoutConfig { - showLength?: number; - moveSize?: number; - stackInterval?: number; - scaleInterval?: number; - opacityInterval?: number; - rotateZDeg?: number; - snapDirection?: 'left' | 'right'; + showLength?: number + moveSize?: number + stackInterval?: number + scaleInterval?: number + opacityInterval?: number + rotateZDeg?: number + snapDirection?: "left" | "right" } export type TStackModeProps = IComputedDirectionTypes<{ - /** + /** * Carousel Animated transitions. */ - mode?: 'horizontal-stack' | 'vertical-stack'; - /** + mode?: "horizontal-stack" | "vertical-stack" + /** * Stack animation style. * @default * mode: 'vertical', @@ -30,328 +32,331 @@ export type TStackModeProps = IComputedDirectionTypes<{ * scaleInterval: 0.08, * rotateZDeg: 135, */ - modeConfig?: ILayoutConfig; + modeConfig?: ILayoutConfig }>; export function horizontalStackLayout(modeConfig: ILayoutConfig = {}) { - return (_value: number) => { - 'worklet'; - - const { - showLength, - snapDirection = 'left', - moveSize = screen.width, - stackInterval = 18, - scaleInterval = 0.04, - opacityInterval = 0.1, - rotateZDeg = 30, - } = modeConfig; - - const transform: TransformsStyle['transform'] = []; - const { validLength, value, inputRange } = getCommonVariables({ - showLength: showLength!, - value: _value, - snapDirection, - }); - const { zIndex, opacity } = getCommonStyles({ - validLength, - value, - opacityInterval, - snapDirection, - }); - - const styles: ViewStyle = { - transform, - zIndex, - opacity, - }; - - let translateX: number; - let scale: number; - let rotateZ: string; - - if (snapDirection === 'left') { - translateX = interpolate( - value, - inputRange, - [-moveSize, 0, validLength * stackInterval], - Extrapolate.CLAMP - ); - scale = interpolate( - value, - inputRange, - [1, 1, 1 - validLength * scaleInterval], - Extrapolate.CLAMP - ); - rotateZ = `${interpolate( - value, - inputRange, - [-rotateZDeg, 0, 0], - Extrapolate.CLAMP - )}deg`; - } else if (snapDirection === 'right') { - translateX = interpolate( - value, - inputRange, - [-validLength * stackInterval, 0, moveSize], - Extrapolate.CLAMP - ); - scale = interpolate( - value, - inputRange, - [1 - validLength * scaleInterval, 1, 1], - Extrapolate.CLAMP - ); - rotateZ = `${interpolate( - value, - inputRange, - [0, 0, rotateZDeg], - Extrapolate.CLAMP - )}deg`; - } - - transform.push( - { - translateX: translateX!, - }, - { - scale: scale!, - }, - { - rotateZ: rotateZ!, - } - ); - - return styles; + return (_value: number) => { + "worklet"; + + const { + showLength, + snapDirection = "left", + moveSize = screen.width, + stackInterval = 18, + scaleInterval = 0.04, + opacityInterval = 0.1, + rotateZDeg = 30, + } = modeConfig; + + const transform: TransformsStyle["transform"] = []; + const { validLength, value, inputRange } = getCommonVariables({ + showLength: showLength!, + value: _value, + snapDirection, + }); + const { zIndex, opacity } = getCommonStyles({ + validLength, + value, + opacityInterval, + snapDirection, + }); + + const styles: ViewStyle = { + transform, + zIndex, + opacity, }; + + let translateX: number; + let scale: number; + let rotateZ: string; + + if (snapDirection === "left") { + translateX = interpolate( + value, + inputRange, + [-moveSize, 0, validLength * stackInterval], + Extrapolate.CLAMP, + ); + scale = interpolate( + value, + inputRange, + [1, 1, 1 - validLength * scaleInterval], + Extrapolate.CLAMP, + ); + rotateZ = `${interpolate( + value, + inputRange, + [-rotateZDeg, 0, 0], + Extrapolate.CLAMP, + )}deg`; + } + else if (snapDirection === "right") { + translateX = interpolate( + value, + inputRange, + [-validLength * stackInterval, 0, moveSize], + Extrapolate.CLAMP, + ); + scale = interpolate( + value, + inputRange, + [1 - validLength * scaleInterval, 1, 1], + Extrapolate.CLAMP, + ); + rotateZ = `${interpolate( + value, + inputRange, + [0, 0, rotateZDeg], + Extrapolate.CLAMP, + )}deg`; + } + + transform.push( + { + translateX: translateX!, + }, + { + scale: scale!, + }, + { + rotateZ: rotateZ!, + }, + ); + + return styles; + }; } export function useHorizontalStackLayout( - customAnimationConfig: ILayoutConfig = {}, - customConfig: CustomConfig = {} + customAnimationConfig: ILayoutConfig = {}, + customConfig: CustomConfig = {}, ) { - const config = useMemo( - () => ({ - type: - customAnimationConfig.snapDirection === 'right' - ? 'negative' - : 'positive', - viewCount: customAnimationConfig.showLength, - ...customConfig, - }), - [customAnimationConfig, customConfig] - ); + const config = useMemo( + () => ({ + type: + customAnimationConfig.snapDirection === "right" + ? "negative" + : "positive", + viewCount: customAnimationConfig.showLength, + ...customConfig, + }), + [customAnimationConfig, customConfig], + ); - return { - layout: horizontalStackLayout(customAnimationConfig), - config, - }; + return { + layout: horizontalStackLayout(customAnimationConfig), + config, + }; } export function verticalStackLayout(modeConfig: ILayoutConfig = {}) { - return (_value: number) => { - 'worklet'; - - const { - showLength, - snapDirection = 'left', - moveSize = screen.width, - stackInterval = 18, - scaleInterval = 0.04, - opacityInterval = 0.1, - rotateZDeg = 30, - } = modeConfig; - const transform: TransformsStyle['transform'] = []; - const { validLength, value, inputRange } = getCommonVariables({ - showLength: showLength!, - value: _value, - snapDirection, - }); - const { zIndex, opacity } = getCommonStyles({ - validLength, - value, - opacityInterval, - snapDirection, - }); - - const styles: ViewStyle = { - transform, - zIndex, - opacity, - }; - - let translateX: number; - let scale: number; - let rotateZ: string; - let translateY: number; - - if (snapDirection === 'left') { - translateX = interpolate( - value, - inputRange, - [-moveSize, 0, 0], - Extrapolate.CLAMP - ); - scale = interpolate( - value, - inputRange, - [1, 1, 1 - validLength * scaleInterval], - Extrapolate.CLAMP - ); - rotateZ = `${interpolate( - value, - inputRange, - [-rotateZDeg, 0, 0], - Extrapolate.CLAMP - )}deg`; - translateY = interpolate( - value, - inputRange, - [0, 0, validLength * stackInterval], - Extrapolate.CLAMP - ); - } else if (snapDirection === 'right') { - translateX = interpolate( - value, - inputRange, - [0, 0, moveSize], - Extrapolate.CLAMP - ); - scale = interpolate( - value, - inputRange, - [1 - validLength * scaleInterval, 1, 1], - Extrapolate.CLAMP - ); - rotateZ = `${interpolate( - value, - inputRange, - [0, 0, rotateZDeg], - Extrapolate.CLAMP - )}deg`; - translateY = interpolate( - value, - inputRange, - [validLength * stackInterval, 0, 0], - Extrapolate.CLAMP - ); - } - - transform.push( - { - translateX: translateX!, - }, - { - scale: scale!, - }, - { - rotateZ: rotateZ!, - }, - { - translateY: translateY!, - } - ); - - return styles; + return (_value: number) => { + "worklet"; + + const { + showLength, + snapDirection = "left", + moveSize = screen.width, + stackInterval = 18, + scaleInterval = 0.04, + opacityInterval = 0.1, + rotateZDeg = 30, + } = modeConfig; + const transform: TransformsStyle["transform"] = []; + const { validLength, value, inputRange } = getCommonVariables({ + showLength: showLength!, + value: _value, + snapDirection, + }); + const { zIndex, opacity } = getCommonStyles({ + validLength, + value, + opacityInterval, + snapDirection, + }); + + const styles: ViewStyle = { + transform, + zIndex, + opacity, }; + + let translateX: number; + let scale: number; + let rotateZ: string; + let translateY: number; + + if (snapDirection === "left") { + translateX = interpolate( + value, + inputRange, + [-moveSize, 0, 0], + Extrapolate.CLAMP, + ); + scale = interpolate( + value, + inputRange, + [1, 1, 1 - validLength * scaleInterval], + Extrapolate.CLAMP, + ); + rotateZ = `${interpolate( + value, + inputRange, + [-rotateZDeg, 0, 0], + Extrapolate.CLAMP, + )}deg`; + translateY = interpolate( + value, + inputRange, + [0, 0, validLength * stackInterval], + Extrapolate.CLAMP, + ); + } + else if (snapDirection === "right") { + translateX = interpolate( + value, + inputRange, + [0, 0, moveSize], + Extrapolate.CLAMP, + ); + scale = interpolate( + value, + inputRange, + [1 - validLength * scaleInterval, 1, 1], + Extrapolate.CLAMP, + ); + rotateZ = `${interpolate( + value, + inputRange, + [0, 0, rotateZDeg], + Extrapolate.CLAMP, + )}deg`; + translateY = interpolate( + value, + inputRange, + [validLength * stackInterval, 0, 0], + Extrapolate.CLAMP, + ); + } + + transform.push( + { + translateX: translateX!, + }, + { + scale: scale!, + }, + { + rotateZ: rotateZ!, + }, + { + translateY: translateY!, + }, + ); + + return styles; + }; } function getCommonVariables(opts: { - value: number; - showLength: number; - snapDirection: 'left' | 'right'; + value: number + showLength: number + snapDirection: "left" | "right" }) { - 'worklet'; + "worklet"; - const { showLength, value: _value, snapDirection } = opts; - function easeInOutCubic(v: number): number { - return v < 0.5 ? 4 * v * v * v : 1 - Math.pow(-2 * v + 2, 3) / 2; - } - const page = Math.floor(Math.abs(_value)); - const diff = Math.abs(_value) % 1; - const value = - _value < 0 - ? -(page + easeInOutCubic(diff)) - : page + easeInOutCubic(diff); - const validLength = showLength! - 1; - - let inputRange: [number, number, number]; - - if (snapDirection === 'left') { - inputRange = [-1, 0, validLength]; - } else if (snapDirection === 'right') { - inputRange = [-validLength, 0, 1]; - } else { - throw Error('snapDirection must be set to either left or right'); - } + const { showLength, value: _value, snapDirection } = opts; + function easeInOutCubic(v: number): number { + return v < 0.5 ? 4 * v * v * v : 1 - (-2 * v + 2) ** 3 / 2; + } + const page = Math.floor(Math.abs(_value)); + const diff = Math.abs(_value) % 1; + const value + = _value < 0 + ? -(page + easeInOutCubic(diff)) + : page + easeInOutCubic(diff); + const validLength = showLength! - 1; - return { - inputRange, - validLength, - value, - }; + let inputRange: [number, number, number]; + + if (snapDirection === "left") + inputRange = [-1, 0, validLength]; + else if (snapDirection === "right") + inputRange = [-validLength, 0, 1]; + else + throw new Error("snapDirection must be set to either left or right"); + + return { + inputRange, + validLength, + value, + }; } function getCommonStyles(opts: { - value: number; - validLength: number; - opacityInterval: number; - snapDirection: 'left' | 'right'; + value: number + validLength: number + opacityInterval: number + snapDirection: "left" | "right" }) { - 'worklet'; - - const { snapDirection, validLength, value, opacityInterval } = opts; - - let zIndex: number; - let opacity: number; - - if (snapDirection === 'left') { - zIndex = - Math.floor( - interpolate( - value, - [-1.5, -1, -1 + Number.MIN_VALUE, 0, validLength], - [ - Number.MIN_VALUE, - validLength, - validLength, - validLength - 1, - -1, - ] - ) * 10000 - ) / 100; - - opacity = interpolate( - value, - [-1, 0, validLength - 1, validLength], - [0.25, 1, 1 - (validLength - 1) * opacityInterval, 0.25] - ); - } else if (snapDirection === 'right') { - zIndex = - Math.floor( - interpolate( - value, - [-validLength, 0, 1 - Number.MIN_VALUE, 1, 1.5], - [ - 1, - validLength - 1, - validLength, - validLength, - Number.MIN_VALUE, - ] - ) * 10000 - ) / 100; - opacity = interpolate( - value, - [-validLength, 1 - validLength, 0, 1], - [0.25, 1 - (validLength - 1) * opacityInterval, 1, 0.25] - ); - } else { - throw Error('snapDirection must be set to either left or right'); - } + "worklet"; - return { - zIndex, - opacity, - }; + const { snapDirection, validLength, value, opacityInterval } = opts; + + let zIndex: number; + let opacity: number; + + if (snapDirection === "left") { + zIndex + = Math.floor( + interpolate( + value, + [-1.5, -1, -1 + Number.MIN_VALUE, 0, validLength], + [ + Number.MIN_VALUE, + validLength, + validLength, + validLength - 1, + -1, + ], + ) * 10000, + ) / 100; + + opacity = interpolate( + value, + [-1, 0, validLength - 1, validLength], + [0.25, 1, 1 - (validLength - 1) * opacityInterval, 0.25], + ); + } + else if (snapDirection === "right") { + zIndex + = Math.floor( + interpolate( + value, + [-validLength, 0, 1 - Number.MIN_VALUE, 1, 1.5], + [ + 1, + validLength - 1, + validLength, + validLength, + Number.MIN_VALUE, + ], + ) * 10000, + ) / 100; + opacity = interpolate( + value, + [-validLength, 1 - validLength, 0, 1], + [0.25, 1 - (validLength - 1) * opacityInterval, 1, 0.25], + ); + } + else { + throw new Error("snapDirection must be set to either left or right"); + } + + return { + zIndex, + opacity, + }; } diff --git a/src/store/index.ts b/src/store/index.ts index 9e2aa832..5d9f96d8 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -1,12 +1,13 @@ -import React from 'react'; -import type { TInitializeCarouselProps } from '../hooks/useInitProps'; +import React from "react"; + +import type { TInitializeCarouselProps } from "../hooks/useInitProps"; export interface IContext { - props: TInitializeCarouselProps; - common: { - size: number; - validLength: number; - }; + props: TInitializeCarouselProps + common: { + size: number + validLength: number + } } export const CTX = React.createContext({} as IContext); diff --git a/src/types.ts b/src/types.ts index 34f53d48..7559da4d 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,229 +1,230 @@ -import type { StyleProp, ViewStyle } from 'react-native'; -import type { PanGestureHandlerProps } from 'react-native-gesture-handler'; +import type { StyleProp, ViewStyle } from "react-native"; +import type { PanGestureHandlerProps } from "react-native-gesture-handler"; import type { - AnimatedStyleProp, - SharedValue, - WithSpringConfig, - WithTimingConfig, -} from 'react-native-reanimated'; -import type Animated from 'react-native-reanimated'; -import type { TParallaxModeProps } from './layouts/parallax'; -import type { TStackModeProps } from './layouts/stack'; + AnimatedStyleProp, + SharedValue, + WithSpringConfig, + WithTimingConfig, +} from "react-native-reanimated"; +import type Animated from "react-native-reanimated"; + +import type { TParallaxModeProps } from "./layouts/parallax"; +import type { TStackModeProps } from "./layouts/stack"; export type IComputedDirectionTypes = | (T & - VP & { - /** + VP & { + /** * Layout items vertically instead of horizontally */ - vertical: true; - /** + vertical: true + /** * Layout items vertically instead of horizontally */ - /** + /** * Specified carousel container width. */ - width?: number; - height: number; - }) + width?: number + height: number + }) | (T & - HP & { - /** + HP & { + /** * Layout items vertically instead of horizontally */ - vertical?: false; - /** + vertical?: false + /** * Layout items vertically instead of horizontally */ - /** + /** * Specified carousel container width. */ - width: number; - height?: number; - }); + width: number + height?: number + }); -export type CustomConfig = { - type?: 'negative' | 'positive'; - viewCount?: number; -}; +export interface CustomConfig { + type?: "negative" | "positive" + viewCount?: number +} -export type WithSpringAnimation = { - type: 'spring'; - config: WithSpringConfig; -}; +export interface WithSpringAnimation { + type: "spring" + config: WithSpringConfig +} -export type WithTimingAnimation = { - type: 'timing'; - config: WithTimingConfig; -}; +export interface WithTimingAnimation { + type: "timing" + config: WithTimingConfig +} export type WithAnimation = WithSpringAnimation | WithTimingAnimation; export type TCarouselProps = { - ref?: React.Ref; - /** + ref?: React.Ref + /** * The default animated value of the carousel. */ - defaultScrollOffsetValue?: SharedValue; - /** + defaultScrollOffsetValue?: SharedValue + /** * Carousel loop playback. * @default true */ - loop?: boolean; - /** + loop?: boolean + /** * Carousel items data set. */ - data: T[]; - /** + data: T[] + /** * Auto fill data array to allow loop playback when the loop props is true. * @default true * @example * [1] => [1, 1, 1] * [1, 2] => [1, 2, 1, 2] */ - autoFillData?: boolean; - /** + autoFillData?: boolean + /** * Default index * @default 0 */ - defaultIndex?: number; - /** + defaultIndex?: number + /** * Auto play */ - autoPlay?: boolean; - /** + autoPlay?: boolean + /** * Auto play * @description reverse playback */ - autoPlayReverse?: boolean; - /** + autoPlayReverse?: boolean + /** * Auto play * @description playback interval */ - autoPlayInterval?: number; - /** + autoPlayInterval?: number + /** * Time a scroll animation takes to finish * @default 500 (ms) */ - scrollAnimationDuration?: number; - /** + scrollAnimationDuration?: number + /** * Carousel container style */ - style?: StyleProp; - /** + style?: StyleProp + /** * PanGestureHandler props */ - panGestureHandlerProps?: Partial< - Omit - >; - /** + panGestureHandlerProps?: Partial< + Omit + > + /** * Determines the maximum number of items will respond to pan gesture events, * windowSize={11} will active visible item plus up to 5 items above and 5 below the viewpor, * Reducing this number will reduce the calculation of the animation value and may improve performance. * @default 0 all items will respond to pan gesture events. */ - windowSize?: number; - /** + windowSize?: number + /** * When true, the scroll view stops on multiples of the scroll view's size when scrolling. * @default true */ - pagingEnabled?: boolean; - /** + pagingEnabled?: boolean + /** * If enabled, releasing the touch will scroll to the nearest item. * valid when pagingEnabled=false * @deprecated please use snapEnabled instead */ - enableSnap?: boolean; - /** + enableSnap?: boolean + /** * If enabled, releasing the touch will scroll to the nearest item. * valid when pagingEnabled=false * @default true */ - snapEnabled?: boolean; - /** + snapEnabled?: boolean + /** * If false, Carousel will not respond to any gestures. * @default true */ - enabled?: boolean; - /** + enabled?: boolean + /** * Specifies the scrolling animation effect. */ - withAnimation?: WithAnimation; - /** + withAnimation?: WithAnimation + /** * Used to locate this view in end-to-end tests. */ - testID?: string; - /** + testID?: string + /** * Custom carousel config. */ - customConfig?: () => CustomConfig; - /** + customConfig?: () => CustomConfig + /** * Custom animations. * Must use `worklet`, Details: https://docs.swmansion.com/react-native-reanimated/docs/2.2.0/worklets/ */ - customAnimation?: (value: number) => AnimatedStyleProp; - /** + customAnimation?: (value: number) => AnimatedStyleProp + /** * Render carousel item. */ - renderItem: CarouselRenderItem; - /** + renderItem: CarouselRenderItem + /** * Callback fired when navigating to an item. */ - onSnapToItem?: (index: number) => void; - /** + onSnapToItem?: (index: number) => void + /** * On scroll begin */ - onScrollBegin?: () => void; - /** + onScrollBegin?: () => void + /** * On scroll end */ - onScrollEnd?: (index: number) => void; - /** + onScrollEnd?: (index: number) => void + /** * On progress change * @param offsetProgress Total of offset distance (0 390 780 ...) * @param absoluteProgress Convert to index (0 1 2 ...) */ - onProgressChange?: ( - offsetProgress: number, - absoluteProgress: number - ) => void; + onProgressChange?: ( + offsetProgress: number, + absoluteProgress: number + ) => void } & (TParallaxModeProps | TStackModeProps); export interface ICarouselInstance { - /** + /** * Scroll to previous item, it takes one optional argument (count), * which allows you to specify how many items to cross */ - prev: (opts?: Omit) => void; - /** + prev: (opts?: Omit) => void + /** * Scroll to next item, it takes one optional argument (count), * which allows you to specify how many items to cross */ - next: (opts?: Omit) => void; - /** + next: (opts?: Omit) => void + /** * Get current item index */ - getCurrentIndex: () => number; - /** + getCurrentIndex: () => number + /** * Use value to scroll to a position where relative to the current position, * scrollTo(-2) is equivalent to prev(2), scrollTo(2) is equivalent to next(2) */ - scrollTo: (opts?: TCarouselActionOptions) => void; + scrollTo: (opts?: TCarouselActionOptions) => void } export interface CarouselRenderItemInfo { - item: ItemT; - index: number; - animationValue: Animated.SharedValue; + item: ItemT + index: number + animationValue: Animated.SharedValue } export type CarouselRenderItem = ( - info: CarouselRenderItemInfo + info: CarouselRenderItemInfo ) => React.ReactElement; export interface TCarouselActionOptions { - index?: number; - count?: number; - animated?: boolean; - onFinished?: () => void; + index?: number + count?: number + animated?: boolean + onFinished?: () => void } diff --git a/src/utils/computedWithAutoFillData.ts b/src/utils/computedWithAutoFillData.ts index 9d6bae85..1a4075a9 100644 --- a/src/utils/computedWithAutoFillData.ts +++ b/src/utils/computedWithAutoFillData.ts @@ -1,94 +1,94 @@ -import { DATA_LENGTH } from '../constants'; +import { DATA_LENGTH } from "../constants"; const { SINGLE_ITEM, DOUBLE_ITEM } = DATA_LENGTH; function isAutoFillData(params: { autoFillData: boolean; loop: boolean }) { - 'worklet'; - return !!params.loop && !!params.autoFillData; + "worklet"; + return !!params.loop && !!params.autoFillData; } type BaseParams = { - autoFillData: boolean; - loop: boolean; + autoFillData: boolean + loop: boolean } & T; export function convertToSharedIndex( - params: BaseParams<{ index: number; rawDataLength: number }> + params: BaseParams<{ index: number; rawDataLength: number }>, ) { - 'worklet'; - const { loop, rawDataLength, index, autoFillData } = params; - - if (isAutoFillData({ loop, autoFillData })) { - switch (rawDataLength) { - case SINGLE_ITEM: - return 0; - case DOUBLE_ITEM: - return index % 2; - } + "worklet"; + const { loop, rawDataLength, index, autoFillData } = params; + + if (isAutoFillData({ loop, autoFillData })) { + switch (rawDataLength) { + case SINGLE_ITEM: + return 0; + case DOUBLE_ITEM: + return index % 2; } + } - return index; + return index; } export function computedOffsetXValueWithAutoFillData( - params: BaseParams<{ - rawDataLength: number; - value: number; - size: number; - }> + params: BaseParams<{ + rawDataLength: number + value: number + size: number + }>, ) { - 'worklet'; + "worklet"; - const { rawDataLength, value, size, loop, autoFillData } = params; + const { rawDataLength, value, size, loop, autoFillData } = params; - if (isAutoFillData({ loop, autoFillData })) { - switch (rawDataLength) { - case SINGLE_ITEM: - return value % size; - case DOUBLE_ITEM: - return value % (size * 2); - } + if (isAutoFillData({ loop, autoFillData })) { + switch (rawDataLength) { + case SINGLE_ITEM: + return value % size; + case DOUBLE_ITEM: + return value % (size * 2); } + } - return value; + return value; } export function computedRealIndexWithAutoFillData( - params: BaseParams<{ - index: number; - dataLength: number; - }> + params: BaseParams<{ + index: number + dataLength: number + }>, ) { - const { index, dataLength, loop, autoFillData } = params; - - if (isAutoFillData({ loop, autoFillData })) { - switch (dataLength) { - case SINGLE_ITEM: - return index % 1; - case DOUBLE_ITEM: - return index % 2; - } + const { index, dataLength, loop, autoFillData } = params; + + if (isAutoFillData({ loop, autoFillData })) { + switch (dataLength) { + case SINGLE_ITEM: + return index % 1; + case DOUBLE_ITEM: + return index % 2; } + } - return index; + return index; } export function computedFillDataWithAutoFillData( - params: BaseParams<{ - data: T[]; - dataLength: number; - }> + params: BaseParams<{ + data: T[] + dataLength: number + }>, ): T[] { - const { data, loop, autoFillData, dataLength } = params; - - if (isAutoFillData({ loop, autoFillData })) { - switch (dataLength) { - case SINGLE_ITEM: - return [data[0], data[0], data[0]]; - case DOUBLE_ITEM: - return [data[0], data[1], data[0], data[1]]; - } + const { data, loop, autoFillData, dataLength } = params; + + if (isAutoFillData({ loop, autoFillData })) { + switch (dataLength) { + case SINGLE_ITEM: + return [data[0], data[0], data[0]]; + case DOUBLE_ITEM: + return [data[0], data[1], data[0], data[1]]; } + } - return data; + return data; } diff --git a/src/utils/dealWithAnimation.ts b/src/utils/dealWithAnimation.ts index aa5fe14a..7d4f5cbc 100644 --- a/src/utils/dealWithAnimation.ts +++ b/src/utils/dealWithAnimation.ts @@ -1,22 +1,23 @@ -import type { WithAnimation } from '../types'; -import { withSpring, withTiming } from 'react-native-reanimated'; +import { withSpring, withTiming } from "react-native-reanimated"; + +import type { WithAnimation } from "../types"; export function dealWithAnimation( - withAnimation: WithAnimation + withAnimation: WithAnimation, ): (value: number, cb: (isFinished: boolean) => void) => number { - 'worklet'; - switch (withAnimation.type) { - case 'spring': - return (value, cb) => { - return withSpring(value, withAnimation.config, (isFinished) => - cb(isFinished as boolean) - ); - }; - case 'timing': - return (value, cb) => { - return withTiming(value, withAnimation.config, (isFinished) => - cb(isFinished as boolean) - ); - }; - } + "worklet"; + switch (withAnimation.type) { + case "spring": + return (value, cb) => { + return withSpring(value, withAnimation.config, isFinished => + cb(isFinished as boolean), + ); + }; + case "timing": + return (value, cb) => { + return withTiming(value, withAnimation.config, isFinished => + cb(isFinished as boolean), + ); + }; + } } diff --git a/src/utils/handlerOffsetDirection.ts b/src/utils/handlerOffsetDirection.ts new file mode 100644 index 00000000..ff511605 --- /dev/null +++ b/src/utils/handlerOffsetDirection.ts @@ -0,0 +1,15 @@ +import type { SharedValue } from "react-native-reanimated"; + +export function handlerOffsetDirection(handlerOffset: SharedValue): -1 | 1 { + "worklet"; + + const isPositiveZero = Object.is(handlerOffset.value, +0); + const isNegativeZero = Object.is(handlerOffset.value, -0); + const direction = isPositiveZero + ? 1 + : isNegativeZero + ? -1 + : Math.sign(handlerOffset.value) as -1 | 1; + + return direction; +} diff --git a/src/utils/log.ts b/src/utils/log.ts index f3f60cb7..c5039090 100644 --- a/src/utils/log.ts +++ b/src/utils/log.ts @@ -3,10 +3,11 @@ * e.g. runOnJS(lop)(...); */ export function log(...msg: any) { - console.log(...msg); + // eslint-disable-next-line no-console + console.log(...msg); } export function round(number: number) { - 'worklet'; - return Math.round(number); + "worklet"; + return Math.round(number); } diff --git a/yarn.lock b/yarn.lock index 676ea23d..268b64cb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14,13 +14,6 @@ resolved "https://registry.npmmirror.com/@antfu/utils/-/utils-0.5.0.tgz#b3169429997cb87850e543cb74660f9e2fed7efd" integrity sha512-MrAQ/MrPSxbh1bBrmwJjORfJymw4IqSHFBXqvxaga3ZdDM+/zokYF8DjyJpSjY2QmpmgQrajDUBJOWrYeARfzA== -"@babel/code-frame@7.12.11": - version "7.12.11" - resolved "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" - integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== - dependencies: - "@babel/highlight" "^7.10.4" - "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.16.7": version "7.16.7" resolved "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789" @@ -274,6 +267,11 @@ dependencies: "@babel/types" "^7.16.7" +"@babel/helper-validator-identifier@^7.15.7": + version "7.19.1" + resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" + integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== + "@babel/helper-validator-identifier@^7.16.7": version "7.16.7" resolved "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad" @@ -303,7 +301,7 @@ "@babel/traverse" "^7.17.0" "@babel/types" "^7.17.0" -"@babel/highlight@^7.10.4", "@babel/highlight@^7.16.7": +"@babel/highlight@^7.16.7": version "7.16.10" resolved "https://registry.npmmirror.com/@babel/highlight/-/highlight-7.16.10.tgz#744f2eb81579d6eea753c227b0f570ad785aba88" integrity sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw== @@ -1356,6 +1354,61 @@ dependencies: "@cspotcode/source-map-consumer" "0.8.0" +"@dohooo/eslint-config-basic@0.0.7": + version "0.0.7" + resolved "https://registry.npmjs.org/@dohooo/eslint-config-basic/-/eslint-config-basic-0.0.7.tgz#19db9cd0e0ca019a6cdd3a7de5fda450714e4a27" + integrity sha512-prnvzDuQaab7/N/1/Tdz1C3Rr69pGbmsorD55hpEMER+SPFhCDUK+mhdLMpzFhQm7B5qUUXUIF6UoClcx3JQHA== + dependencies: + eslint-plugin-eslint-comments "^3.2.0" + eslint-plugin-file-progress "^1.3.0" + eslint-plugin-html "^6.2.0" + eslint-plugin-import "^2.26.0" + eslint-plugin-jsonc "^2.2.1" + eslint-plugin-markdown "^2.2.1" + eslint-plugin-n "^15.2.0" + eslint-plugin-promise "^6.0.0" + eslint-plugin-unicorn "^42.0.0" + eslint-plugin-yml "^1.0.0" + jsonc-eslint-parser "^2.1.0" + yaml-eslint-parser "^1.0.1" + +"@dohooo/eslint-config-react@0.0.7": + version "0.0.7" + resolved "https://registry.npmjs.org/@dohooo/eslint-config-react/-/eslint-config-react-0.0.7.tgz#2c7646c755e219a30534fbb3444a0ec2e2878a25" + integrity sha512-DN+25sMO8o1otWE1LE4u2x3UBAeFbwTZlJ1vTxgNyxTcnBZwGMtfWufToCWnMmn+6m+yeOY3cjz8C4YQ/JuVQw== + dependencies: + "@dohooo/eslint-config-ts" "0.0.7" + eslint-plugin-react "^7.30.0" + +"@dohooo/eslint-config-ts@0.0.7": + version "0.0.7" + resolved "https://registry.npmjs.org/@dohooo/eslint-config-ts/-/eslint-config-ts-0.0.7.tgz#64cabc9b5df07b660f7d534f3f4116651ea89576" + integrity sha512-ln6b/KOM7NA3OMRAI2yw5aWJqCIS+vFXF7WLQ72vDD6xEPUGAOY7QC8T8ZMjh0lmWeoL/rswPsdMjIjfdgSeQQ== + dependencies: + "@dohooo/eslint-config-basic" "0.0.7" + "@typescript-eslint/eslint-plugin" "^5.26.0" + "@typescript-eslint/parser" "^5.26.0" + +"@dohooo/eslint-config@^0.0.7": + version "0.0.7" + resolved "https://registry.npmjs.org/@dohooo/eslint-config/-/eslint-config-0.0.7.tgz#1dd36f8df6b16658642325d623944d90d4e32c92" + integrity sha512-SlOBOF7FkFU6QuezcYSeIqI61zCwlbod88j+Ui3luTfhxx9qy4t3hxaA+cyb824xplhLhwaV6nh/ewRrzI/rFQ== + dependencies: + "@dohooo/eslint-config-react" "0.0.7" + "@typescript-eslint/eslint-plugin" "^5.26.0" + "@typescript-eslint/parser" "^5.26.0" + eslint-plugin-eslint-comments "^3.2.0" + eslint-plugin-html "^6.2.0" + eslint-plugin-import "^2.26.0" + eslint-plugin-jsonc "^2.2.1" + eslint-plugin-n "^15.2.0" + eslint-plugin-promise "^6.0.0" + eslint-plugin-unicorn "^42.0.0" + eslint-plugin-vue "^9.0.1" + eslint-plugin-yml "^1.0.0" + jsonc-eslint-parser "^2.1.0" + yaml-eslint-parser "^1.0.1" + "@egjs/hammerjs@^2.0.17": version "2.0.17" resolved "https://registry.npmmirror.com/@egjs/hammerjs/-/hammerjs-2.0.17.tgz#5dc02af75a6a06e4c2db0202cae38c9263895124" @@ -1363,19 +1416,29 @@ dependencies: "@types/hammerjs" "^2.0.36" -"@eslint/eslintrc@^0.4.3": - version "0.4.3" - resolved "https://registry.npmmirror.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" - integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw== +"@esbuild/android-arm@0.15.12": + version "0.15.12" + resolved "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.12.tgz#e548b10a5e55b9e10537a049ebf0bc72c453b769" + integrity sha512-IC7TqIqiyE0MmvAhWkl/8AEzpOtbhRNDo7aph47We1NbE5w2bt/Q+giAhe0YYeVpYnIhGMcuZY92qDK6dQauvA== + +"@esbuild/linux-loong64@0.15.12": + version "0.15.12" + resolved "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.12.tgz#475b33a2631a3d8ca8aa95ee127f9a61d95bf9c1" + integrity sha512-tZEowDjvU7O7I04GYvWQOS4yyP9E/7YlsB0jjw1Ycukgr2ycEzKyIk5tms5WnLBymaewc6VmRKnn5IJWgK4eFw== + +"@eslint/eslintrc@^1.3.3": + version "1.3.3" + resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz#2b044ab39fdfa75b4688184f9e573ce3c5b0ff95" + integrity sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg== dependencies: ajv "^6.12.4" - debug "^4.1.1" - espree "^7.3.0" - globals "^13.9.0" - ignore "^4.0.6" + debug "^4.3.2" + espree "^9.4.0" + globals "^13.15.0" + ignore "^5.2.0" import-fresh "^3.2.1" - js-yaml "^3.13.1" - minimatch "^3.0.4" + js-yaml "^4.1.0" + minimatch "^3.1.2" strip-json-comments "^3.1.1" "@hapi/address@2.x.x": @@ -1410,18 +1473,23 @@ dependencies: "@hapi/hoek" "^8.3.0" -"@humanwhocodes/config-array@^0.5.0": - version "0.5.0" - resolved "https://registry.npmmirror.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9" - integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg== +"@humanwhocodes/config-array@^0.11.6": + version "0.11.6" + resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.6.tgz#6a51d603a3aaf8d4cf45b42b3f2ac9318a4adc4b" + integrity sha512-jJr+hPTJYKyDILJfhNSHsjiwXYf26Flsz8DvNndOsHs5pwSnpGUEy8yzF0JYhCEvTDdV2vuOK5tt8BVhwO5/hg== dependencies: - "@humanwhocodes/object-schema" "^1.2.0" + "@humanwhocodes/object-schema" "^1.2.1" debug "^4.1.1" minimatch "^3.0.4" -"@humanwhocodes/object-schema@^1.2.0": +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/object-schema@^1.2.1": version "1.2.1" - resolved "https://registry.npmmirror.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== "@hutson/parse-repository-url@^3.0.0": @@ -1707,7 +1775,7 @@ resolved "https://registry.npmmirror.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== -"@nodelib/fs.walk@^1.2.3": +"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": version "1.2.8" resolved "https://registry.npmmirror.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== @@ -2088,6 +2156,11 @@ resolved "https://registry.npmmirror.com/@types/chai/-/chai-4.3.0.tgz#23509ebc1fa32f1b4d50d6a66c4032d5b8eaabdc" integrity sha512-/ceqdqeRraGolFTcfoXNiqjyQhZzbINDngeoAq9GoHa8PPK1yNzTaxWjA6BFWp5Ua9JpXEMSS4s5i9tS0hOJtw== +"@types/chai@^4.3.3": + version "4.3.3" + resolved "https://registry.npmjs.org/@types/chai/-/chai-4.3.3.tgz#3c90752792660c4b562ad73b3fbd68bf3bc7ae07" + integrity sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g== + "@types/eslint-visitor-keys@^1.0.0": version "1.0.0" resolved "https://registry.npmmirror.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" @@ -2155,6 +2228,16 @@ resolved "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== +"@types/json-schema@^7.0.9": + version "7.0.11" + resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" + integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== + +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== + "@types/keyv@*": version "3.1.3" resolved "https://registry.npmmirror.com/@types/keyv/-/keyv-3.1.3.tgz#1c9aae32872ec1f20dcdaee89a9f3ba88f465e41" @@ -2162,6 +2245,13 @@ dependencies: "@types/node" "*" +"@types/mdast@^3.0.0": + version "3.0.10" + resolved "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.10.tgz#4724244a82a4598884cbbe9bcfd73dff927ee8af" + integrity sha512-W864tg/Osz1+9f4lrGTZpCSO5/z4608eUp19tbozkq2HJK6i3z1kT0H9tlADXuYIb1YYOBByU4Jsqkk75q48qA== + dependencies: + "@types/unist" "*" + "@types/minimist@^1.2.0": version "1.2.2" resolved "https://registry.npmmirror.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" @@ -2207,7 +2297,7 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@^17", "@types/react@~17.0.2": +"@types/react@*", "@types/react@~17.0.2": version "17.0.48" resolved "https://registry.npmmirror.com/@types/react/-/react-17.0.48.tgz#a4532a8b91d7b27b8768b6fc0c3bccb760d15a6c" integrity sha512-zJ6IYlJ8cYYxiJfUaZOQee4lh99mFihBoqkOSEGV+dFi9leROW6+PgstzQ+w3gWTnUfskALtQPGHK6dYmPj+2A== @@ -2228,6 +2318,11 @@ resolved "https://registry.npmmirror.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== +"@types/semver@^7.3.12": + version "7.3.12" + resolved "https://registry.npmjs.org/@types/semver/-/semver-7.3.12.tgz#920447fdd78d76b19de0438b7f60df3c4a80bf1c" + integrity sha512-WwA1MW0++RfXmCr12xeYOOC5baSC9mSb0ZqCquFzKhcoF4TvHu5MKOuXsncgZcpVFhB1pXd5hZmM0ryAoCp12A== + "@types/stack-utils@^1.0.1": version "1.0.1" resolved "https://registry.npmmirror.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e" @@ -2238,6 +2333,11 @@ resolved "https://registry.npmmirror.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== +"@types/unist@*", "@types/unist@^2.0.2": + version "2.0.6" + resolved "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d" + integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ== + "@types/yargs-parser@*": version "20.2.1" resolved "https://registry.npmmirror.com/@types/yargs-parser/-/yargs-parser-20.2.1.tgz#3b9ce2489919d9e4fea439b76916abc34b2df129" @@ -2269,6 +2369,20 @@ semver "^7.3.2" tsutils "^3.17.1" +"@typescript-eslint/eslint-plugin@^5.26.0": + version "5.41.0" + resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.41.0.tgz#f8eeb1c6bb2549f795f3ba71aec3b38d1ab6b1e1" + integrity sha512-DXUS22Y57/LAFSg3x7Vi6RNAuLpTXwxB9S2nIA7msBb/Zt8p7XqMwdpdc1IU7CkOQUPgAqR5fWvxuKCbneKGmA== + dependencies: + "@typescript-eslint/scope-manager" "5.41.0" + "@typescript-eslint/type-utils" "5.41.0" + "@typescript-eslint/utils" "5.41.0" + debug "^4.3.4" + ignore "^5.2.0" + regexpp "^3.2.0" + semver "^7.3.7" + tsutils "^3.21.0" + "@typescript-eslint/experimental-utils@3.10.1": version "3.10.1" resolved "https://registry.npmmirror.com/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz#e179ffc81a80ebcae2ea04e0332f8b251345a686" @@ -2291,11 +2405,44 @@ "@typescript-eslint/typescript-estree" "3.10.1" eslint-visitor-keys "^1.1.0" +"@typescript-eslint/parser@^5.26.0": + version "5.41.0" + resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.41.0.tgz#0414a6405007e463dc527b459af1f19430382d67" + integrity sha512-HQVfix4+RL5YRWZboMD1pUfFN8MpRH4laziWkkAzyO1fvNOY/uinZcvo3QiFJVS/siNHupV8E5+xSwQZrl6PZA== + dependencies: + "@typescript-eslint/scope-manager" "5.41.0" + "@typescript-eslint/types" "5.41.0" + "@typescript-eslint/typescript-estree" "5.41.0" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@5.41.0": + version "5.41.0" + resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.41.0.tgz#28e3a41d626288d0628be14cf9de8d49fc30fadf" + integrity sha512-xOxPJCnuktUkY2xoEZBKXO5DBCugFzjrVndKdUnyQr3+9aDWZReKq9MhaoVnbL+maVwWJu/N0SEtrtEUNb62QQ== + dependencies: + "@typescript-eslint/types" "5.41.0" + "@typescript-eslint/visitor-keys" "5.41.0" + +"@typescript-eslint/type-utils@5.41.0": + version "5.41.0" + resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.41.0.tgz#2371601171e9f26a4e6da918a7913f7266890cdf" + integrity sha512-L30HNvIG6A1Q0R58e4hu4h+fZqaO909UcnnPbwKiN6Rc3BUEx6ez2wgN7aC0cBfcAjZfwkzE+E2PQQ9nEuoqfA== + dependencies: + "@typescript-eslint/typescript-estree" "5.41.0" + "@typescript-eslint/utils" "5.41.0" + debug "^4.3.4" + tsutils "^3.21.0" + "@typescript-eslint/types@3.10.1": version "3.10.1" resolved "https://registry.npmmirror.com/@typescript-eslint/types/-/types-3.10.1.tgz#1d7463fa7c32d8a23ab508a803ca2fe26e758727" integrity sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ== +"@typescript-eslint/types@5.41.0": + version "5.41.0" + resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.41.0.tgz#6800abebc4e6abaf24cdf220fb4ce28f4ab09a85" + integrity sha512-5BejraMXMC+2UjefDvrH0Fo/eLwZRV6859SXRg+FgbhA0R0l6lDqDGAQYhKbXhPN2ofk2kY5sgGyLNL907UXpA== + "@typescript-eslint/typescript-estree@3.10.1": version "3.10.1" resolved "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz#fd0061cc38add4fad45136d654408569f365b853" @@ -2310,6 +2457,33 @@ semver "^7.3.2" tsutils "^3.17.1" +"@typescript-eslint/typescript-estree@5.41.0": + version "5.41.0" + resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.41.0.tgz#bf5c6b3138adbdc73ba4871d060ae12c59366c61" + integrity sha512-SlzFYRwFSvswzDSQ/zPkIWcHv8O5y42YUskko9c4ki+fV6HATsTODUPbRbcGDFYP86gaJL5xohUEytvyNNcXWg== + dependencies: + "@typescript-eslint/types" "5.41.0" + "@typescript-eslint/visitor-keys" "5.41.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.41.0": + version "5.41.0" + resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.41.0.tgz#f41ae5883994a249d00b2ce69f4188f3a23fa0f9" + integrity sha512-QlvfwaN9jaMga9EBazQ+5DDx/4sAdqDkcs05AsQHMaopluVCUyu1bTRUVKzXbgjDlrRAQrYVoi/sXJ9fmG+KLQ== + dependencies: + "@types/json-schema" "^7.0.9" + "@types/semver" "^7.3.12" + "@typescript-eslint/scope-manager" "5.41.0" + "@typescript-eslint/types" "5.41.0" + "@typescript-eslint/typescript-estree" "5.41.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + semver "^7.3.7" + "@typescript-eslint/visitor-keys@3.10.1": version "3.10.1" resolved "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz#cd4274773e3eb63b2e870ac602274487ecd1e931" @@ -2317,6 +2491,14 @@ dependencies: eslint-visitor-keys "^1.1.0" +"@typescript-eslint/visitor-keys@5.41.0": + version "5.41.0" + resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.41.0.tgz#d3510712bc07d5540160ed3c0f8f213b73e3bcd9" + integrity sha512-vilqeHj267v8uzzakbm13HkPMl7cbYpKVjgFWZPIOHIJHZtinvypUhJ5xBXfWYg4eFKqztbMMpOgFpT9Gfx4fw== + dependencies: + "@typescript-eslint/types" "5.41.0" + eslint-visitor-keys "^3.3.0" + JSONStream@^1.0.4: version "1.3.5" resolved "https://registry.npmmirror.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -2358,9 +2540,9 @@ acorn-globals@^6.0.0: acorn "^7.1.1" acorn-walk "^7.1.1" -acorn-jsx@^5.3.1: +acorn-jsx@^5.3.2: version "5.3.2" - resolved "https://registry.npmmirror.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn-walk@^7.1.1: @@ -2373,7 +2555,7 @@ acorn-walk@^8.1.1: resolved "https://registry.npmmirror.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^7.1.1, acorn@^7.4.0: +acorn@^7.1.1: version "7.4.1" resolved "https://registry.npmmirror.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== @@ -2383,6 +2565,11 @@ acorn@^8.2.4, acorn@^8.4.1: resolved "https://registry.npmmirror.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf" integrity sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ== +acorn@^8.5.0, acorn@^8.8.0: + version "8.8.1" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz#0a3f9cbecc4ec3bea6f0a80b66ae8dd2da250b73" + integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA== + add-stream@^1.0.0: version "1.0.0" resolved "https://registry.npmmirror.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" @@ -2413,16 +2600,6 @@ ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.6: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.1: - version "8.10.0" - resolved "https://registry.npmmirror.com/ajv/-/ajv-8.10.0.tgz#e573f719bd3af069017e3b66538ab968d040e54d" - integrity sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - anser@^1.4.9: version "1.4.10" resolved "https://registry.npmmirror.com/anser/-/anser-1.4.10.tgz#befa3eddf282684bd03b63dcda3927aef8c2e35b" @@ -2442,11 +2619,6 @@ ansi-colors@^1.0.1: dependencies: ansi-wrap "^0.1.0" -ansi-colors@^4.1.1: - version "4.1.1" - resolved "https://registry.npmmirror.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - ansi-cyan@^0.1.1: version "0.1.1" resolved "https://registry.npmmirror.com/ansi-cyan/-/ansi-cyan-0.1.1.tgz#538ae528af8982f28ae30d86f2f17456d2609873" @@ -2576,6 +2748,11 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + arr-diff@^1.0.1: version "1.1.0" resolved "https://registry.npmmirror.com/arr-diff/-/arr-diff-1.1.0.tgz#687c32758163588fef7de7b36fabe495eb1a399a" @@ -2637,6 +2814,17 @@ array-includes@^3.1.3, array-includes@^3.1.4: get-intrinsic "^1.1.1" is-string "^1.0.7" +array-includes@^3.1.5: + version "3.1.5" + resolved "https://registry.npmjs.org/array-includes/-/array-includes-3.1.5.tgz#2c320010db8d31031fd2a5f6b3bbd4b1aad31bdb" + integrity sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + get-intrinsic "^1.1.1" + is-string "^1.0.7" + array-map@~0.0.0: version "0.0.0" resolved "https://registry.npmmirror.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662" @@ -2662,6 +2850,16 @@ array-unique@^0.3.2: resolved "https://registry.npmmirror.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" integrity sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ== +array.prototype.flat@^1.2.5: + version "1.3.0" + resolved "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz#0b0c1567bf57b38b56b4c97b8aa72ab45e4adc7b" + integrity sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.2" + es-shim-unscopables "^1.0.0" + array.prototype.flatmap@^1.2.5: version "1.2.5" resolved "https://registry.npmmirror.com/array.prototype.flatmap/-/array.prototype.flatmap-1.2.5.tgz#908dc82d8a406930fdf38598d51e7411d18d4446" @@ -2671,6 +2869,16 @@ array.prototype.flatmap@^1.2.5: define-properties "^1.1.3" es-abstract "^1.19.0" +array.prototype.flatmap@^1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.0.tgz#a7e8ed4225f4788a70cd910abcf0791e76a5534f" + integrity sha512-PZC9/8TKAIxcWKdyeb77EzULHPrIX/tIZebLJUQOMR1OwYosT8yggdfWScfTBCDj5utONvOuPQQumYsU2ULbkg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.2" + es-shim-unscopables "^1.0.0" + arrify@^1.0.1: version "1.0.1" resolved "https://registry.npmmirror.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -2708,11 +2916,6 @@ astral-regex@^1.0.0: resolved "https://registry.npmmirror.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== -astral-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.npmmirror.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" - integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== - async-retry@1.3.3: version "1.3.3" resolved "https://registry.npmmirror.com/async-retry/-/async-retry-1.3.3.tgz#0e7f36c04d8478e7a58bdbed80cedf977785f280" @@ -2968,6 +3171,11 @@ bl@^4.0.3, bl@^4.1.0: inherits "^2.0.4" readable-stream "^3.4.0" +boolbase@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== + boxen@^5.0.0: version "5.1.2" resolved "https://registry.npmmirror.com/boxen/-/boxen-5.1.2.tgz#788cb686fc83c1f486dfa8a40c68fc2b831d2b50" @@ -3068,6 +3276,18 @@ buffer@^5.5.0: base64-js "^1.3.1" ieee754 "^1.1.13" +builtin-modules@^3.3.0: + version "3.3.0" + resolved "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" + integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== + +builtins@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9" + integrity sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ== + dependencies: + semver "^7.0.0" + bytes@3.0.0: version "3.0.0" resolved "https://registry.npmmirror.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" @@ -3218,7 +3438,7 @@ chalk@4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@4.1.2, chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1: +chalk@4.1.2, chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: version "4.1.2" resolved "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -3248,6 +3468,21 @@ char-regex@^1.0.2: resolved "https://registry.npmmirror.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== +character-entities-legacy@^1.0.0: + version "1.1.4" + resolved "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz#94bc1845dce70a5bb9d2ecc748725661293d8fc1" + integrity sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA== + +character-entities@^1.0.0: + version "1.2.4" + resolved "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz#e12c3939b7eaf4e5b15e7ad4c5e28e1d48c5b16b" + integrity sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw== + +character-reference-invalid@^1.0.0: + version "1.1.4" + resolved "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz#083329cda0eae272ab3dbbf37e9a382c13af1560" + integrity sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg== + chardet@^0.4.0: version "0.4.2" resolved "https://registry.npmmirror.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" @@ -3278,6 +3513,11 @@ ci-info@^3.2.0: resolved "https://registry.npmmirror.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2" integrity sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw== +ci-info@^3.3.0: + version "3.5.0" + resolved "https://registry.npmjs.org/ci-info/-/ci-info-3.5.0.tgz#bfac2a29263de4c829d806b1ab478e35091e171f" + integrity sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw== + cjs-module-lexer@^0.6.0: version "0.6.0" resolved "https://registry.npmmirror.com/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz#4186fcca0eae175970aee870b9fe2d6cf8d5655f" @@ -3293,6 +3533,13 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" +clean-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz#8df7c7aae51fd36874e8f8d05b9180bc11a3fed7" + integrity sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw== + dependencies: + escape-string-regexp "^1.0.5" + clean-stack@^2.0.0: version "2.2.0" resolved "https://registry.npmmirror.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" @@ -3909,6 +4156,11 @@ crypto-random-string@^2.0.0: resolved "https://registry.npmmirror.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== +cssesc@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== + cssom@^0.4.4: version "0.4.4" resolved "https://registry.npmmirror.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" @@ -3995,20 +4247,34 @@ dayjs@^1.8.15: resolved "https://registry.npmmirror.com/dayjs/-/dayjs-1.10.7.tgz#2cf5f91add28116748440866a0a1d26f3a6ce468" integrity sha512-P6twpd70BcPK34K26uJ1KT3wlhpuOAPoMwJzpsIWUxHZ7wpmbdZL/hQqBDfz7hGurYSa5PhzdhDHtt319hL3ig== -debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.5.2: +debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.5.2, debug@^2.6.9: version "2.6.9" resolved "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" -debug@4, debug@4.3.3, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: +debug@4, debug@4.3.3, debug@^4.1.0, debug@^4.1.1: version "4.3.3" resolved "https://registry.npmmirror.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== dependencies: ms "2.1.2" +debug@^3.2.7: + version "3.2.7" + resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + +debug@^4.0.0, debug@^4.3.2, debug@^4.3.4: + version "4.3.4" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + decamelize-keys@^1.1.0: version "1.1.0" resolved "https://registry.npmmirror.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" @@ -4107,6 +4373,14 @@ define-properties@^1.1.3: dependencies: object-keys "^1.0.12" +define-properties@^1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" + integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA== + dependencies: + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + define-property@^0.2.5: version "0.2.5" resolved "https://registry.npmmirror.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" @@ -4234,6 +4508,20 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" +dom-serializer@^1.0.1: + version "1.4.1" + resolved "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz#de5d41b1aea290215dc45a6dae8adcf1d32e2d30" + integrity sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.2.0" + entities "^2.0.0" + +domelementtype@^2.0.1, domelementtype@^2.2.0: + version "2.3.0" + resolved "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" + integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== + domexception@^2.0.1: version "2.0.1" resolved "https://registry.npmmirror.com/domexception/-/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304" @@ -4241,6 +4529,22 @@ domexception@^2.0.1: dependencies: webidl-conversions "^5.0.0" +domhandler@^4.2.0, domhandler@^4.2.2: + version "4.3.1" + resolved "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c" + integrity sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ== + dependencies: + domelementtype "^2.2.0" + +domutils@^2.8.0: + version "2.8.0" + resolved "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" + integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== + dependencies: + dom-serializer "^1.0.1" + domelementtype "^2.2.0" + domhandler "^4.2.0" + dot-prop@^5.1.0, dot-prop@^5.2.0: version "5.3.0" resolved "https://registry.npmmirror.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" @@ -4330,12 +4634,15 @@ end-of-stream@^1.1.0, end-of-stream@^1.4.1: dependencies: once "^1.4.0" -enquirer@^2.3.5: - version "2.3.6" - resolved "https://registry.npmmirror.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" - integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== - dependencies: - ansi-colors "^4.1.1" +entities@^2.0.0: + version "2.2.0" + resolved "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" + integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== + +entities@^3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz#2b887ca62585e96db3903482d336c1006c3001d4" + integrity sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q== envinfo@^7.7.2: version "7.8.1" @@ -4390,6 +4697,43 @@ es-abstract@^1.19.0, es-abstract@^1.19.1: string.prototype.trimstart "^1.0.4" unbox-primitive "^1.0.1" +es-abstract@^1.19.2, es-abstract@^1.19.5: + version "1.20.4" + resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.4.tgz#1d103f9f8d78d4cf0713edcd6d0ed1a46eed5861" + integrity sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + function.prototype.name "^1.1.5" + get-intrinsic "^1.1.3" + get-symbol-description "^1.0.0" + has "^1.0.3" + has-property-descriptors "^1.0.0" + has-symbols "^1.0.3" + internal-slot "^1.0.3" + is-callable "^1.2.7" + is-negative-zero "^2.0.2" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + is-string "^1.0.7" + is-weakref "^1.0.2" + object-inspect "^1.12.2" + object-keys "^1.1.1" + object.assign "^4.1.4" + regexp.prototype.flags "^1.4.3" + safe-regex-test "^1.0.0" + string.prototype.trimend "^1.0.5" + string.prototype.trimstart "^1.0.5" + unbox-primitive "^1.0.2" + +es-shim-unscopables@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" + integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== + dependencies: + has "^1.0.3" + es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.npmmirror.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -4399,101 +4743,201 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +esbuild-android-64@0.15.12: + version "0.15.12" + resolved "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.12.tgz#5e8151d5f0a748c71a7fbea8cee844ccf008e6fc" + integrity sha512-MJKXwvPY9g0rGps0+U65HlTsM1wUs9lbjt5CU19RESqycGFDRijMDQsh68MtbzkqWSRdEtiKS1mtPzKneaAI0Q== + esbuild-android-arm64@0.14.23: version "0.14.23" resolved "https://registry.npmmirror.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.23.tgz#c89b3c50b4f47668dcbeb0b34ee4615258818e71" integrity sha512-k9sXem++mINrZty1v4FVt6nC5BQCFG4K2geCIUUqHNlTdFnuvcqsY7prcKZLFhqVC1rbcJAr9VSUGFL/vD4vsw== +esbuild-android-arm64@0.15.12: + version "0.15.12" + resolved "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.12.tgz#5ee72a6baa444bc96ffcb472a3ba4aba2cc80666" + integrity sha512-Hc9SEcZbIMhhLcvhr1DH+lrrec9SFTiRzfJ7EGSBZiiw994gfkVV6vG0sLWqQQ6DD7V4+OggB+Hn0IRUdDUqvA== + esbuild-darwin-64@0.14.23: version "0.14.23" resolved "https://registry.npmmirror.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.23.tgz#1c131e8cb133ed935ca32f824349a117c896a15b" integrity sha512-lB0XRbtOYYL1tLcYw8BoBaYsFYiR48RPrA0KfA/7RFTr4MV7Bwy/J4+7nLsVnv9FGuQummM3uJ93J3ptaTqFug== +esbuild-darwin-64@0.15.12: + version "0.15.12" + resolved "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.12.tgz#70047007e093fa1b3ba7ef86f9b3fa63db51fe25" + integrity sha512-qkmqrTVYPFiePt5qFjP8w/S+GIUMbt6k8qmiPraECUWfPptaPJUGkCKrWEfYFRWB7bY23FV95rhvPyh/KARP8Q== + esbuild-darwin-arm64@0.14.23: version "0.14.23" resolved "https://registry.npmmirror.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.23.tgz#3c6245a50109dd84953f53d7833bd3b4f0e8c6fa" integrity sha512-yat73Z/uJ5tRcfRiI4CCTv0FSnwErm3BJQeZAh+1tIP0TUNh6o+mXg338Zl5EKChD+YGp6PN+Dbhs7qa34RxSw== +esbuild-darwin-arm64@0.15.12: + version "0.15.12" + resolved "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.12.tgz#41c951f23d9a70539bcca552bae6e5196696ae04" + integrity sha512-z4zPX02tQ41kcXMyN3c/GfZpIjKoI/BzHrdKUwhC/Ki5BAhWv59A9M8H+iqaRbwpzYrYidTybBwiZAIWCLJAkw== + esbuild-freebsd-64@0.14.23: version "0.14.23" resolved "https://registry.npmmirror.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.23.tgz#0cdc54e72d3dd9cd992f9c2960055e68a7f8650c" integrity sha512-/1xiTjoLuQ+LlbfjJdKkX45qK/M7ARrbLmyf7x3JhyQGMjcxRYVR6Dw81uH3qlMHwT4cfLW4aEVBhP1aNV7VsA== +esbuild-freebsd-64@0.15.12: + version "0.15.12" + resolved "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.12.tgz#a761b5afd12bbedb7d56c612e9cfa4d2711f33f0" + integrity sha512-XFL7gKMCKXLDiAiBjhLG0XECliXaRLTZh6hsyzqUqPUf/PY4C6EJDTKIeqqPKXaVJ8+fzNek88285krSz1QECw== + esbuild-freebsd-arm64@0.14.23: version "0.14.23" resolved "https://registry.npmmirror.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.23.tgz#1d11faed3a0c429e99b7dddef84103eb509788b2" integrity sha512-uyPqBU/Zcp6yEAZS4LKj5jEE0q2s4HmlMBIPzbW6cTunZ8cyvjG6YWpIZXb1KK3KTJDe62ltCrk3VzmWHp+iLg== +esbuild-freebsd-arm64@0.15.12: + version "0.15.12" + resolved "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.12.tgz#6b0839d4d58deabc6cbd96276eb8cbf94f7f335e" + integrity sha512-jwEIu5UCUk6TjiG1X+KQnCGISI+ILnXzIzt9yDVrhjug2fkYzlLbl0K43q96Q3KB66v6N1UFF0r5Ks4Xo7i72g== + esbuild-linux-32@0.14.23: version "0.14.23" resolved "https://registry.npmmirror.com/esbuild-linux-32/-/esbuild-linux-32-0.14.23.tgz#fd9f033fc27dcab61100cb1eb1c936893a68c841" integrity sha512-37R/WMkQyUfNhbH7aJrr1uCjDVdnPeTHGeDhZPUNhfoHV0lQuZNCKuNnDvlH/u/nwIYZNdVvz1Igv5rY/zfrzQ== +esbuild-linux-32@0.15.12: + version "0.15.12" + resolved "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.12.tgz#bd50bfe22514d434d97d5150977496e2631345b4" + integrity sha512-uSQuSEyF1kVzGzuIr4XM+v7TPKxHjBnLcwv2yPyCz8riV8VUCnO/C4BF3w5dHiVpCd5Z1cebBtZJNlC4anWpwA== + esbuild-linux-64@0.14.23: version "0.14.23" resolved "https://registry.npmmirror.com/esbuild-linux-64/-/esbuild-linux-64-0.14.23.tgz#c04c438514f1359ecb1529205d0c836d4165f198" integrity sha512-H0gztDP60qqr8zoFhAO64waoN5yBXkmYCElFklpd6LPoobtNGNnDe99xOQm28+fuD75YJ7GKHzp/MLCLhw2+vQ== +esbuild-linux-64@0.15.12: + version "0.15.12" + resolved "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.12.tgz#074bb2b194bf658245f8490f29c01ffcdfa8c931" + integrity sha512-QcgCKb7zfJxqT9o5z9ZUeGH1k8N6iX1Y7VNsEi5F9+HzN1OIx7ESxtQXDN9jbeUSPiRH1n9cw6gFT3H4qbdvcA== + esbuild-linux-arm64@0.14.23: version "0.14.23" resolved "https://registry.npmmirror.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.23.tgz#d1b3ab2988ab0734886eb9e811726f7db099ab96" integrity sha512-c4MLOIByNHR55n3KoYf9hYDfBRghMjOiHLaoYLhkQkIabb452RWi+HsNgB41sUpSlOAqfpqKPFNg7VrxL3UX9g== +esbuild-linux-arm64@0.15.12: + version "0.15.12" + resolved "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.12.tgz#3bf789c4396dc032875a122988efd6f3733f28f5" + integrity sha512-HtNq5xm8fUpZKwWKS2/YGwSfTF+339L4aIA8yphNKYJckd5hVdhfdl6GM2P3HwLSCORS++++7++//ApEwXEuAQ== + esbuild-linux-arm@0.14.23: version "0.14.23" resolved "https://registry.npmmirror.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.23.tgz#df7558b6a5076f5eb9fd387c8704f768b61d97fb" integrity sha512-x64CEUxi8+EzOAIpCUeuni0bZfzPw/65r8tC5cy5zOq9dY7ysOi5EVQHnzaxS+1NmV+/RVRpmrzGw1QgY2Xpmw== +esbuild-linux-arm@0.15.12: + version "0.15.12" + resolved "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.12.tgz#b91b5a8d470053f6c2c9c8a5e67ec10a71fe4a67" + integrity sha512-Wf7T0aNylGcLu7hBnzMvsTfEXdEdJY/hY3u36Vla21aY66xR0MS5I1Hw8nVquXjTN0A6fk/vnr32tkC/C2lb0A== + esbuild-linux-mips64le@0.14.23: version "0.14.23" resolved "https://registry.npmmirror.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.23.tgz#bb4c47fccc9493d460ffeb1f88e8a97a98a14f8b" integrity sha512-kHKyKRIAedYhKug2EJpyJxOUj3VYuamOVA1pY7EimoFPzaF3NeY7e4cFBAISC/Av0/tiV0xlFCt9q0HJ68IBIw== +esbuild-linux-mips64le@0.15.12: + version "0.15.12" + resolved "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.12.tgz#2fb54099ada3c950a7536dfcba46172c61e580e2" + integrity sha512-Qol3+AvivngUZkTVFgLpb0H6DT+N5/zM3V1YgTkryPYFeUvuT5JFNDR3ZiS6LxhyF8EE+fiNtzwlPqMDqVcc6A== + esbuild-linux-ppc64le@0.14.23: version "0.14.23" resolved "https://registry.npmmirror.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.23.tgz#a332dbc8a1b4e30cfe1261bfaa5cef57c9c8c02a" integrity sha512-7ilAiJEPuJJnJp/LiDO0oJm5ygbBPzhchJJh9HsHZzeqO+3PUzItXi+8PuicY08r0AaaOe25LA7sGJ0MzbfBag== +esbuild-linux-ppc64le@0.15.12: + version "0.15.12" + resolved "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.12.tgz#9e3b8c09825fb27886249dfb3142a750df29a1b7" + integrity sha512-4D8qUCo+CFKaR0cGXtGyVsOI7w7k93Qxb3KFXWr75An0DHamYzq8lt7TNZKoOq/Gh8c40/aKaxvcZnTgQ0TJNg== + esbuild-linux-riscv64@0.14.23: version "0.14.23" resolved "https://registry.npmmirror.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.23.tgz#85675f3f931f5cd7cfb238fd82f77a62ffcb6d86" integrity sha512-fbL3ggK2wY0D8I5raPIMPhpCvODFE+Bhb5QGtNP3r5aUsRR6TQV+ZBXIaw84iyvKC8vlXiA4fWLGhghAd/h/Zg== +esbuild-linux-riscv64@0.15.12: + version "0.15.12" + resolved "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.12.tgz#923d0f5b6e12ee0d1fe116b08e4ae4478fe40693" + integrity sha512-G9w6NcuuCI6TUUxe6ka0enjZHDnSVK8bO+1qDhMOCtl7Tr78CcZilJj8SGLN00zO5iIlwNRZKHjdMpfFgNn1VA== + esbuild-linux-s390x@0.14.23: version "0.14.23" resolved "https://registry.npmmirror.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.23.tgz#a526282a696e6d846f4c628f5315475518c0c0f0" integrity sha512-GHMDCyfy7+FaNSO8RJ8KCFsnax8fLUsOrj9q5Gi2JmZMY0Zhp75keb5abTFCq2/Oy6KVcT0Dcbyo/bFb4rIFJA== +esbuild-linux-s390x@0.15.12: + version "0.15.12" + resolved "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.12.tgz#3b1620220482b96266a0c6d9d471d451a1eab86f" + integrity sha512-Lt6BDnuXbXeqSlVuuUM5z18GkJAZf3ERskGZbAWjrQoi9xbEIsj/hEzVnSAFLtkfLuy2DE4RwTcX02tZFunXww== + esbuild-netbsd-64@0.14.23: version "0.14.23" resolved "https://registry.npmmirror.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.23.tgz#8e456605694719aa1be4be266d6cd569c06dfaf5" integrity sha512-ovk2EX+3rrO1M2lowJfgMb/JPN1VwVYrx0QPUyudxkxLYrWeBxDKQvc6ffO+kB4QlDyTfdtAURrVzu3JeNdA2g== +esbuild-netbsd-64@0.15.12: + version "0.15.12" + resolved "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.12.tgz#276730f80da646859b1af5a740e7802d8cd73e42" + integrity sha512-jlUxCiHO1dsqoURZDQts+HK100o0hXfi4t54MNRMCAqKGAV33JCVvMplLAa2FwviSojT/5ZG5HUfG3gstwAG8w== + esbuild-openbsd-64@0.14.23: version "0.14.23" resolved "https://registry.npmmirror.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.23.tgz#f2fc51714b4ddabc86e4eb30ca101dd325db2f7d" integrity sha512-uYYNqbVR+i7k8ojP/oIROAHO9lATLN7H2QeXKt2H310Fc8FJj4y3Wce6hx0VgnJ4k1JDrgbbiXM8rbEgQyg8KA== +esbuild-openbsd-64@0.15.12: + version "0.15.12" + resolved "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.12.tgz#bd0eea1dd2ca0722ed489d88c26714034429f8ae" + integrity sha512-1o1uAfRTMIWNOmpf8v7iudND0L6zRBYSH45sofCZywrcf7NcZA+c7aFsS1YryU+yN7aRppTqdUK1PgbZVaB1Dw== + esbuild-sunos-64@0.14.23: version "0.14.23" resolved "https://registry.npmmirror.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.23.tgz#a408f33ea20e215909e20173a0fd78b1aaad1f8e" integrity sha512-hAzeBeET0+SbScknPzS2LBY6FVDpgE+CsHSpe6CEoR51PApdn2IB0SyJX7vGelXzlyrnorM4CAsRyb9Qev4h9g== +esbuild-sunos-64@0.15.12: + version "0.15.12" + resolved "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.12.tgz#5e56bf9eef3b2d92360d6d29dcde7722acbecc9e" + integrity sha512-nkl251DpoWoBO9Eq9aFdoIt2yYmp4I3kvQjba3jFKlMXuqQ9A4q+JaqdkCouG3DHgAGnzshzaGu6xofGcXyPXg== + esbuild-windows-32@0.14.23: version "0.14.23" resolved "https://registry.npmmirror.com/esbuild-windows-32/-/esbuild-windows-32-0.14.23.tgz#b9005bbff54dac3975ff355d5de2b5e37165d128" integrity sha512-Kttmi3JnohdaREbk6o9e25kieJR379TsEWF0l39PQVHXq3FR6sFKtVPgY8wk055o6IB+rllrzLnbqOw/UV60EA== +esbuild-windows-32@0.15.12: + version "0.15.12" + resolved "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.12.tgz#a4f1a301c1a2fa7701fcd4b91ef9d2620cf293d0" + integrity sha512-WlGeBZHgPC00O08luIp5B2SP4cNCp/PcS+3Pcg31kdcJPopHxLkdCXtadLU9J82LCfw4TVls21A6lilQ9mzHrw== + esbuild-windows-64@0.14.23: version "0.14.23" resolved "https://registry.npmmirror.com/esbuild-windows-64/-/esbuild-windows-64-0.14.23.tgz#2b5a99befeaca6aefdad32d738b945730a60a060" integrity sha512-JtIT0t8ymkpl6YlmOl6zoSWL5cnCgyLaBdf/SiU/Eg3C13r0NbHZWNT/RDEMKK91Y6t79kTs3vyRcNZbfu5a8g== +esbuild-windows-64@0.15.12: + version "0.15.12" + resolved "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.12.tgz#bc2b467541744d653be4fe64eaa9b0dbbf8e07f6" + integrity sha512-VActO3WnWZSN//xjSfbiGOSyC+wkZtI8I4KlgrTo5oHJM6z3MZZBCuFaZHd8hzf/W9KPhF0lY8OqlmWC9HO5AA== + esbuild-windows-arm64@0.14.23: version "0.14.23" resolved "https://registry.npmmirror.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.23.tgz#edc560bbadb097eb45fc235aeacb942cb94a38c0" integrity sha512-cTFaQqT2+ik9e4hePvYtRZQ3pqOvKDVNarzql0VFIzhc0tru/ZgdLoXd6epLiKT+SzoSce6V9YJ+nn6RCn6SHw== +esbuild-windows-arm64@0.15.12: + version "0.15.12" + resolved "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.12.tgz#9a7266404334a86be800957eaee9aef94c3df328" + integrity sha512-Of3MIacva1OK/m4zCNIvBfz8VVROBmQT+gRX6pFTLPngFYcj6TFH/12VveAqq1k9VB2l28EoVMNMUCcmsfwyuA== + esbuild@^0.14.14: version "0.14.23" resolved "https://registry.npmmirror.com/esbuild/-/esbuild-0.14.23.tgz#95e842cb22bc0c7d82c140adc16788aac91469fe" @@ -4519,6 +4963,34 @@ esbuild@^0.14.14: esbuild-windows-64 "0.14.23" esbuild-windows-arm64 "0.14.23" +esbuild@^0.15.9: + version "0.15.12" + resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.15.12.tgz#6c8e22d6d3b7430d165c33848298d3fc9a1f251c" + integrity sha512-PcT+/wyDqJQsRVhaE9uX/Oq4XLrFh0ce/bs2TJh4CSaw9xuvI+xFrH2nAYOADbhQjUgAhNWC5LKoUsakm4dxng== + optionalDependencies: + "@esbuild/android-arm" "0.15.12" + "@esbuild/linux-loong64" "0.15.12" + esbuild-android-64 "0.15.12" + esbuild-android-arm64 "0.15.12" + esbuild-darwin-64 "0.15.12" + esbuild-darwin-arm64 "0.15.12" + esbuild-freebsd-64 "0.15.12" + esbuild-freebsd-arm64 "0.15.12" + esbuild-linux-32 "0.15.12" + esbuild-linux-64 "0.15.12" + esbuild-linux-arm "0.15.12" + esbuild-linux-arm64 "0.15.12" + esbuild-linux-mips64le "0.15.12" + esbuild-linux-ppc64le "0.15.12" + esbuild-linux-riscv64 "0.15.12" + esbuild-linux-s390x "0.15.12" + esbuild-netbsd-64 "0.15.12" + esbuild-openbsd-64 "0.15.12" + esbuild-sunos-64 "0.15.12" + esbuild-windows-32 "0.15.12" + esbuild-windows-64 "0.15.12" + esbuild-windows-arm64 "0.15.12" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.npmmirror.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -4573,7 +5045,30 @@ eslint-config-prettier@^7.0.0: resolved "https://registry.npmmirror.com/eslint-config-prettier/-/eslint-config-prettier-7.2.0.tgz#f4a4bd2832e810e8cc7c1411ec85b3e85c0c53f9" integrity sha512-rV4Qu0C3nfJKPOAhFujFxB7RMP+URFyQqqOZW9DMRD7ZDTFyjaIlETU3xzHELt++4ugC0+Jm084HQYkkJe+Ivg== -eslint-plugin-eslint-comments@^3.1.2: +eslint-import-resolver-node@^0.3.6: + version "0.3.6" + resolved "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd" + integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw== + dependencies: + debug "^3.2.7" + resolve "^1.20.0" + +eslint-module-utils@^2.7.3: + version "2.7.4" + resolved "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz#4f3e41116aaf13a20792261e61d3a2e7e0583974" + integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA== + dependencies: + debug "^3.2.7" + +eslint-plugin-es@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz#f0822f0c18a535a97c3e714e89f88586a7641ec9" + integrity sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ== + dependencies: + eslint-utils "^2.0.0" + regexpp "^3.0.0" + +eslint-plugin-eslint-comments@^3.1.2, eslint-plugin-eslint-comments@^3.2.0: version "3.2.0" resolved "https://registry.npmmirror.com/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz#9e1cd7b4413526abb313933071d7aba05ca12ffa" integrity sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ== @@ -4581,6 +5076,14 @@ eslint-plugin-eslint-comments@^3.1.2: escape-string-regexp "^1.0.5" ignore "^5.0.5" +eslint-plugin-file-progress@^1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/eslint-plugin-file-progress/-/eslint-plugin-file-progress-1.3.0.tgz#737a432a66a4501cbdb53cb945551703c6f9b454" + integrity sha512-LncpnGHU26KPvCrvDC2Sl9PfjdrsG8qltgiK6BR7KybWtfqrdlsu1ax3+hyPMn5OkKBTF3Wki3oqK1MSMeOtQw== + dependencies: + chalk "^4.1.2" + ora "^5.4.1" + eslint-plugin-flowtype@2.50.3: version "2.50.3" resolved "https://registry.npmmirror.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.50.3.tgz#61379d6dce1d010370acd6681740fd913d68175f" @@ -4588,11 +5091,67 @@ eslint-plugin-flowtype@2.50.3: dependencies: lodash "^4.17.10" +eslint-plugin-html@^6.2.0: + version "6.2.0" + resolved "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-6.2.0.tgz#715bc00b50bbd0d996e28f953c289a5ebec69d43" + integrity sha512-vi3NW0E8AJombTvt8beMwkL1R/fdRWl4QSNRNMhVQKWm36/X0KF0unGNAY4mqUF06mnwVWZcIcerrCnfn9025g== + dependencies: + htmlparser2 "^7.1.2" + +eslint-plugin-import@^2.26.0: + version "2.26.0" + resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b" + integrity sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA== + dependencies: + array-includes "^3.1.4" + array.prototype.flat "^1.2.5" + debug "^2.6.9" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.6" + eslint-module-utils "^2.7.3" + has "^1.0.3" + is-core-module "^2.8.1" + is-glob "^4.0.3" + minimatch "^3.1.2" + object.values "^1.1.5" + resolve "^1.22.0" + tsconfig-paths "^3.14.1" + eslint-plugin-jest@22.4.1: version "22.4.1" resolved "https://registry.npmmirror.com/eslint-plugin-jest/-/eslint-plugin-jest-22.4.1.tgz#a5fd6f7a2a41388d16f527073b778013c5189a9c" integrity sha512-gcLfn6P2PrFAVx3AobaOzlIEevpAEf9chTpFZz7bYfc7pz8XRv7vuKTIE4hxPKZSha6XWKKplDQ0x9Pq8xX2mg== +eslint-plugin-jsonc@^2.2.1: + version "2.5.0" + resolved "https://registry.npmjs.org/eslint-plugin-jsonc/-/eslint-plugin-jsonc-2.5.0.tgz#b0daea12f0927a3bba99557902ce6e0b48c37b4b" + integrity sha512-G257khwkrOQ5MJpSzz4yQh5K12W4xFZRcHmVlhVFWh2GCLDX+JwHnmkQoUoFDbOieSPBMsPFZDTJScwrXiWlIg== + dependencies: + eslint-utils "^3.0.0" + jsonc-eslint-parser "^2.0.4" + natural-compare "^1.4.0" + +eslint-plugin-markdown@^2.2.1: + version "2.2.1" + resolved "https://registry.npmjs.org/eslint-plugin-markdown/-/eslint-plugin-markdown-2.2.1.tgz#76b8a970099fbffc6cc1ffcad9772b96911c027a" + integrity sha512-FgWp4iyYvTFxPwfbxofTvXxgzPsDuSKHQy2S+a8Ve6savbujey+lgrFFbXQA0HPygISpRYWYBjooPzhYSF81iA== + dependencies: + mdast-util-from-markdown "^0.8.5" + +eslint-plugin-n@^15.2.0: + version "15.3.0" + resolved "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.3.0.tgz#3e1ad236a17dce7ecc0760621c46cc251ef99560" + integrity sha512-IyzPnEWHypCWasDpxeJnim60jhlumbmq0pubL6IOcnk8u2y53s5QfT8JnXy7skjHJ44yWHRb11PLtDHuu1kg/Q== + dependencies: + builtins "^5.0.1" + eslint-plugin-es "^4.1.0" + eslint-utils "^3.0.0" + ignore "^5.1.1" + is-core-module "^2.10.0" + minimatch "^3.1.2" + resolve "^1.22.1" + semver "^7.3.7" + eslint-plugin-prettier@3.1.2: version "3.1.2" resolved "https://registry.npmmirror.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.2.tgz#432e5a667666ab84ce72f945c72f77d996a5c9ba" @@ -4607,6 +5166,11 @@ eslint-plugin-prettier@^3.1.3: dependencies: prettier-linter-helpers "^1.0.0" +eslint-plugin-promise@^6.0.0: + version "6.1.1" + resolved "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz#269a3e2772f62875661220631bd4dafcb4083816" + integrity sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig== + eslint-plugin-react-hooks@^4.0.4: version "4.3.0" resolved "https://registry.npmmirror.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz#318dbf312e06fab1c835a4abef00121751ac1172" @@ -4645,6 +5209,69 @@ eslint-plugin-react@^7.20.0: semver "^6.3.0" string.prototype.matchall "^4.0.6" +eslint-plugin-react@^7.30.0: + version "7.31.10" + resolved "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.31.10.tgz#6782c2c7fe91c09e715d536067644bbb9491419a" + integrity sha512-e4N/nc6AAlg4UKW/mXeYWd3R++qUano5/o+t+wnWxIf+bLsOaH3a4q74kX3nDjYym3VBN4HyO9nEn1GcAqgQOA== + dependencies: + array-includes "^3.1.5" + array.prototype.flatmap "^1.3.0" + doctrine "^2.1.0" + estraverse "^5.3.0" + jsx-ast-utils "^2.4.1 || ^3.0.0" + minimatch "^3.1.2" + object.entries "^1.1.5" + object.fromentries "^2.0.5" + object.hasown "^1.1.1" + object.values "^1.1.5" + prop-types "^15.8.1" + resolve "^2.0.0-next.3" + semver "^6.3.0" + string.prototype.matchall "^4.0.7" + +eslint-plugin-unicorn@^42.0.0: + version "42.0.0" + resolved "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-42.0.0.tgz#47d60c00c263ad743403b052db689e39acbacff1" + integrity sha512-ixBsbhgWuxVaNlPTT8AyfJMlhyC5flCJFjyK3oKE8TRrwBnaHvUbuIkCM1lqg8ryYrFStL/T557zfKzX4GKSlg== + dependencies: + "@babel/helper-validator-identifier" "^7.15.7" + ci-info "^3.3.0" + clean-regexp "^1.0.0" + eslint-utils "^3.0.0" + esquery "^1.4.0" + indent-string "^4.0.0" + is-builtin-module "^3.1.0" + lodash "^4.17.21" + pluralize "^8.0.0" + read-pkg-up "^7.0.1" + regexp-tree "^0.1.24" + safe-regex "^2.1.1" + semver "^7.3.5" + strip-indent "^3.0.0" + +eslint-plugin-vue@^9.0.1: + version "9.6.0" + resolved "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.6.0.tgz#5d1825b93d54595b1ba97106843e1d28cf3bb291" + integrity sha512-zzySkJgVbFCylnG2+9MDF7N+2Rjze2y0bF8GyUNpFOnT8mCMfqqtLDJkHBuYu9N/psW1A6DVbQhPkP92E+qakA== + dependencies: + eslint-utils "^3.0.0" + natural-compare "^1.4.0" + nth-check "^2.0.1" + postcss-selector-parser "^6.0.9" + semver "^7.3.5" + vue-eslint-parser "^9.0.1" + xml-name-validator "^4.0.0" + +eslint-plugin-yml@^1.0.0: + version "1.2.0" + resolved "https://registry.npmjs.org/eslint-plugin-yml/-/eslint-plugin-yml-1.2.0.tgz#4574e5ab2fbaea5f2b278819b19ea273f8b58af0" + integrity sha512-v0jAU/F5SJg28zkpxwGpY04eGZMWFP6os8u2qaEAIRjSH2GqrNl0yBR5+sMHLU/026kAduxVbvLSqmT3Mu3O0g== + dependencies: + debug "^4.3.2" + lodash "^4.17.21" + natural-compare "^1.4.0" + yaml-eslint-parser "^1.1.0" + eslint-scope@^5.0.0, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -4653,14 +5280,29 @@ eslint-scope@^5.0.0, eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-utils@^2.0.0, eslint-utils@^2.1.0: +eslint-scope@^7.1.1: + version "7.1.1" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" + integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-utils@^2.0.0: version "2.1.0" resolved "https://registry.npmmirror.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== dependencies: eslint-visitor-keys "^1.1.0" -eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + dependencies: + eslint-visitor-keys "^2.0.0" + +eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: version "1.3.0" resolved "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== @@ -4670,60 +5312,64 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -eslint@^7.2.0: - version "7.32.0" - resolved "https://registry.npmmirror.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" - integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA== - dependencies: - "@babel/code-frame" "7.12.11" - "@eslint/eslintrc" "^0.4.3" - "@humanwhocodes/config-array" "^0.5.0" +eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + +eslint@^8.26.0: + version "8.26.0" + resolved "https://registry.npmjs.org/eslint/-/eslint-8.26.0.tgz#2bcc8836e6c424c4ac26a5674a70d44d84f2181d" + integrity sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg== + dependencies: + "@eslint/eslintrc" "^1.3.3" + "@humanwhocodes/config-array" "^0.11.6" + "@humanwhocodes/module-importer" "^1.0.1" + "@nodelib/fs.walk" "^1.2.8" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" - debug "^4.0.1" + debug "^4.3.2" doctrine "^3.0.0" - enquirer "^2.3.5" escape-string-regexp "^4.0.0" - eslint-scope "^5.1.1" - eslint-utils "^2.1.0" - eslint-visitor-keys "^2.0.0" - espree "^7.3.1" + eslint-scope "^7.1.1" + eslint-utils "^3.0.0" + eslint-visitor-keys "^3.3.0" + espree "^9.4.0" esquery "^1.4.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" - functional-red-black-tree "^1.0.1" - glob-parent "^5.1.2" - globals "^13.6.0" - ignore "^4.0.6" + find-up "^5.0.0" + glob-parent "^6.0.2" + globals "^13.15.0" + grapheme-splitter "^1.0.4" + ignore "^5.2.0" import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" - js-yaml "^3.13.1" + is-path-inside "^3.0.3" + js-sdsl "^4.1.4" + js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" lodash.merge "^4.6.2" - minimatch "^3.0.4" + minimatch "^3.1.2" natural-compare "^1.4.0" optionator "^0.9.1" - progress "^2.0.0" - regexpp "^3.1.0" - semver "^7.2.1" - strip-ansi "^6.0.0" + regexpp "^3.2.0" + strip-ansi "^6.0.1" strip-json-comments "^3.1.0" - table "^6.0.9" text-table "^0.2.0" - v8-compile-cache "^2.0.3" -espree@^7.3.0, espree@^7.3.1: - version "7.3.1" - resolved "https://registry.npmmirror.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" - integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== +espree@^9.0.0, espree@^9.3.1, espree@^9.4.0: + version "9.4.0" + resolved "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz#cd4bc3d6e9336c433265fc0aa016fc1aaf182f8a" + integrity sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw== dependencies: - acorn "^7.4.0" - acorn-jsx "^5.3.1" - eslint-visitor-keys "^1.3.0" + acorn "^8.8.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.3.0" esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" @@ -5341,11 +5987,26 @@ function-bind@^1.1.1: resolved "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function.prototype.name@^1.1.5: + version "1.1.5" + resolved "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" + integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.0" + functions-have-names "^1.2.2" + functional-red-black-tree@^1.0.1: version "1.0.1" resolved "https://registry.npmmirror.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== +functions-have-names@^1.2.2: + version "1.2.3" + resolved "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== + gauge@~2.7.3: version "2.7.4" resolved "https://registry.npmmirror.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" @@ -5384,6 +6045,15 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: has "^1.0.3" has-symbols "^1.0.1" +get-intrinsic@^1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz#063c84329ad93e83893c7f4f243ef63ffa351385" + integrity sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.3" + get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.npmmirror.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" @@ -5531,6 +6201,13 @@ glob-parent@^5.1.2: dependencies: is-glob "^4.0.1" +glob-parent@^6.0.2: + version "6.0.2" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + glob@7.1.4: version "7.1.4" resolved "https://registry.npmmirror.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" @@ -5594,10 +6271,10 @@ globals@^11.1.0: resolved "https://registry.npmmirror.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^13.6.0, globals@^13.9.0: - version "13.12.1" - resolved "https://registry.npmmirror.com/globals/-/globals-13.12.1.tgz#ec206be932e6c77236677127577aa8e50bf1c5cb" - integrity sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw== +globals@^13.15.0: + version "13.17.0" + resolved "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz#902eb1e680a41da93945adbdcb5a9f361ba69bd4" + integrity sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw== dependencies: type-fest "^0.20.2" @@ -5613,7 +6290,7 @@ globby@11.0.4: merge2 "^1.3.0" slash "^3.0.0" -globby@^11.0.1: +globby@^11.0.1, globby@^11.1.0: version "11.1.0" resolved "https://registry.npmmirror.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -5664,6 +6341,11 @@ graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, resolved "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96" integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ== +grapheme-splitter@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" + integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== + growly@^1.3.0: version "1.3.0" resolved "https://registry.npmmirror.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" @@ -5704,6 +6386,11 @@ has-bigints@^1.0.1: resolved "https://registry.npmmirror.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== +has-bigints@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" + integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.npmmirror.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -5714,11 +6401,23 @@ has-flag@^4.0.0: resolved "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +has-property-descriptors@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" + integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== + dependencies: + get-intrinsic "^1.1.1" + has-symbols@^1.0.1, has-symbols@^1.0.2: version "1.0.2" resolved "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== +has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + has-tostringtag@^1.0.0: version "1.0.0" resolved "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" @@ -5824,6 +6523,16 @@ html-escaper@^2.0.0: resolved "https://registry.npmmirror.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== +htmlparser2@^7.1.2: + version "7.2.0" + resolved "https://registry.npmjs.org/htmlparser2/-/htmlparser2-7.2.0.tgz#8817cdea38bbc324392a90b1990908e81a65f5a5" + integrity sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.2.2" + domutils "^2.8.0" + entities "^3.0.1" + http-cache-semantics@^4.0.0: version "4.1.0" resolved "https://registry.npmmirror.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" @@ -5919,12 +6628,7 @@ ieee754@^1.1.13: resolved "https://registry.npmmirror.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== -ignore@^4.0.6: - version "4.0.6" - resolved "https://registry.npmmirror.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" - integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== - -ignore@^5.0.5, ignore@^5.1.4, ignore@^5.2.0: +ignore@^5.0.5, ignore@^5.1.1, ignore@^5.1.4, ignore@^5.2.0: version "5.2.0" resolved "https://registry.npmmirror.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== @@ -6185,6 +6889,19 @@ is-accessor-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" +is-alphabetical@^1.0.0: + version "1.0.4" + resolved "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz#9e7d6b94916be22153745d184c298cbf986a686d" + integrity sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg== + +is-alphanumerical@^1.0.0: + version "1.0.4" + resolved "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz#7eb9a2431f855f6b1ef1a78e326df515696c4dbf" + integrity sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A== + dependencies: + is-alphabetical "^1.0.0" + is-decimal "^1.0.0" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.npmmirror.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -6215,11 +6932,23 @@ is-buffer@^1.1.5: resolved "https://registry.npmmirror.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== +is-builtin-module@^3.1.0: + version "3.2.0" + resolved "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.0.tgz#bb0310dfe881f144ca83f30100ceb10cf58835e0" + integrity sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw== + dependencies: + builtin-modules "^3.3.0" + is-callable@^1.1.4, is-callable@^1.2.4: version "1.2.4" resolved "https://registry.npmmirror.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== +is-callable@^1.2.7: + version "1.2.7" + resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" + integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== + is-ci@3.0.1: version "3.0.1" resolved "https://registry.npmmirror.com/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867" @@ -6234,6 +6963,13 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" +is-core-module@^2.10.0, is-core-module@^2.9.0: + version "2.11.0" + resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" + integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== + dependencies: + has "^1.0.3" + is-core-module@^2.2.0, is-core-module@^2.5.0, is-core-module@^2.8.1: version "2.8.1" resolved "https://registry.npmmirror.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" @@ -6262,6 +6998,11 @@ is-date-object@^1.0.1: dependencies: has-tostringtag "^1.0.0" +is-decimal@^1.0.0: + version "1.0.4" + resolved "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz#65a3a5958a1c5b63a706e1b333d7cd9f630d3fa5" + integrity sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw== + is-descriptor@^0.1.0: version "0.1.6" resolved "https://registry.npmmirror.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" @@ -6345,13 +7086,18 @@ is-git-repository@^2.0.0: execa "^4.0.3" is-absolute "^1.0.0" -is-glob@^4.0.0, is-glob@^4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: version "4.0.3" resolved "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: is-extglob "^2.1.1" +is-hexadecimal@^1.0.0: + version "1.0.4" + resolved "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz#cc35c97588da4bd49a8eedd6bc4082d44dcb23a7" + integrity sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw== + is-installed-globally@^0.4.0: version "0.4.0" resolved "https://registry.npmmirror.com/is-installed-globally/-/is-installed-globally-0.4.0.tgz#9a0fd407949c30f86eb6959ef1b7994ed0b7b520" @@ -6365,7 +7111,7 @@ is-interactive@^1.0.0: resolved "https://registry.npmmirror.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== -is-negative-zero@^2.0.1: +is-negative-zero@^2.0.1, is-negative-zero@^2.0.2: version "2.0.2" resolved "https://registry.npmmirror.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== @@ -6404,7 +7150,7 @@ is-path-cwd@^2.2.0: resolved "https://registry.npmmirror.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== -is-path-inside@^3.0.2: +is-path-inside@^3.0.2, is-path-inside@^3.0.3: version "3.0.3" resolved "https://registry.npmmirror.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== @@ -6451,6 +7197,13 @@ is-shared-array-buffer@^1.0.1: resolved "https://registry.npmmirror.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz#97b0c85fbdacb59c9c446fe653b82cf2b5b7cfe6" integrity sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA== +is-shared-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" + integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== + dependencies: + call-bind "^1.0.2" + is-ssh@^1.3.0: version "1.3.3" resolved "https://registry.npmmirror.com/is-ssh/-/is-ssh-1.3.3.tgz#7f133285ccd7f2c2c7fc897b771b53d95a2b2c7e" @@ -6511,7 +7264,7 @@ is-utf8@^0.2.1: resolved "https://registry.npmmirror.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" integrity sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q== -is-weakref@^1.0.1: +is-weakref@^1.0.1, is-weakref@^1.0.2: version "1.0.2" resolved "https://registry.npmmirror.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== @@ -7098,6 +7851,11 @@ jiti@^1.12.15: resolved "https://registry.npmmirror.com/jiti/-/jiti-1.13.0.tgz#3cdfc4e651ca0cca4c62ed5e47747b5841d41a8e" integrity sha512-/n9mNxZj/HDSrincJ6RP+L+yXbpnB8FybySBa+IjIaoH9FIxBbrbRT5XUbe8R7zuVM2AQqNMNDDqz0bzx3znOQ== +js-sdsl@^4.1.4: + version "4.1.5" + resolved "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.5.tgz#1ff1645e6b4d1b028cd3f862db88c9d887f26e2a" + integrity sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q== + "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -7111,6 +7869,13 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + jsbn@~0.1.0: version "0.1.1" resolved "https://registry.npmmirror.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -7189,11 +7954,6 @@ json-schema-traverse@^0.4.1: resolved "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== -json-schema-traverse@^1.0.0: - version "1.0.0" - resolved "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" - integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== - json-schema@0.4.0: version "0.4.0" resolved "https://registry.npmmirror.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" @@ -7221,6 +7981,13 @@ json5@^0.5.1: resolved "https://registry.npmmirror.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" integrity sha512-4xrs1aW+6N5DalkqSVA8fxh458CXvR99WU8WLKmq4v8eWAL86Xo3BVqyd3SkA9wEVjCMqyvvRRkshAdOnBp5rw== +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + json5@^2.1.2, json5@^2.1.3: version "2.2.0" resolved "https://registry.npmmirror.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" @@ -7228,6 +7995,16 @@ json5@^2.1.2, json5@^2.1.3: dependencies: minimist "^1.2.5" +jsonc-eslint-parser@^2.0.4, jsonc-eslint-parser@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/jsonc-eslint-parser/-/jsonc-eslint-parser-2.1.0.tgz#4c126b530aa583d85308d0b3041ff81ce402bbb2" + integrity sha512-qCRJWlbP2v6HbmKW7R3lFbeiVWHo+oMJ0j+MizwvauqnCV/EvtAeEeuCgoc/ErtsuoKgYB8U4Ih8AxJbXoE6/g== + dependencies: + acorn "^8.5.0" + eslint-visitor-keys "^3.0.0" + espree "^9.0.0" + semver "^7.3.5" + jsonfile@^2.1.0: version "2.4.0" resolved "https://registry.npmmirror.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" @@ -7382,6 +8159,11 @@ local-pkg@^0.4.1: resolved "https://registry.npmmirror.com/local-pkg/-/local-pkg-0.4.1.tgz#e7b0d7aa0b9c498a1110a5ac5b00ba66ef38cfff" integrity sha512-lL87ytIGP2FU5PWwNDo0w3WhIo2gopIAxPg9RxDYF7m4rr5ahuZxP22xnJHIvaLTe4Z9P6uKKY2UHiwyB4pcrw== +local-pkg@^0.4.2: + version "0.4.2" + resolved "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.2.tgz#13107310b77e74a0e513147a131a2ba288176c2f" + integrity sha512-mlERgSPrbxU3BP4qBqAvvwlgW4MTg78iwJdGGnv7kibKjWcJksrG3t6LB5lXI93wXRDvG4NpUgJFmTG4T6rdrg== + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.npmmirror.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -7447,11 +8229,6 @@ lodash.throttle@^4.1.1: resolved "https://registry.npmmirror.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4" integrity sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ== -lodash.truncate@^4.4.2: - version "4.4.2" - resolved "https://registry.npmmirror.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" - integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== - lodash@4.17.21, lodash@^4.17.10, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.3.0, lodash@^4.7.0: version "4.17.21" resolved "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" @@ -7599,6 +8376,22 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" +mdast-util-from-markdown@^0.8.5: + version "0.8.5" + resolved "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz#d1ef2ca42bc377ecb0463a987910dae89bd9a28c" + integrity sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ== + dependencies: + "@types/mdast" "^3.0.0" + mdast-util-to-string "^2.0.0" + micromark "~2.11.0" + parse-entities "^2.0.0" + unist-util-stringify-position "^2.0.0" + +mdast-util-to-string@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz#b8cfe6a713e1091cb5b728fc48885a4767f8b97b" + integrity sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w== + meow@^8.0.0: version "8.1.2" resolved "https://registry.npmmirror.com/meow/-/meow-8.1.2.tgz#bcbe45bda0ee1729d350c03cffc8395a36c4e897" @@ -7856,6 +8649,14 @@ metro@0.59.0, metro@^0.59.0: xpipe "^1.0.5" yargs "^14.2.0" +micromark@~2.11.0: + version "2.11.4" + resolved "https://registry.npmjs.org/micromark/-/micromark-2.11.4.tgz#d13436138eea826383e822449c9a5c50ee44665a" + integrity sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA== + dependencies: + debug "^4.0.0" + parse-entities "^2.0.0" + micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.npmmirror.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" @@ -7942,7 +8743,7 @@ min-indent@^1.0.0: resolved "https://registry.npmmirror.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -minimatch@^3.0.4: +minimatch@^3.0.4, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -7963,6 +8764,11 @@ minimist@1.2.5, minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2 resolved "https://registry.npmmirror.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== +minimist@^1.2.6: + version "1.2.7" + resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" + integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== + mixin-deep@^1.2.0: version "1.3.2" resolved "https://registry.npmmirror.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" @@ -8008,7 +8814,7 @@ ms@2.1.2: resolved "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3: +ms@2.1.3, ms@^2.1.1: version "2.1.3" resolved "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -8033,6 +8839,11 @@ nanoid@^3.3.1: resolved "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35" integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== +nanoid@^3.3.4: + version "3.3.4" + resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" + integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.npmmirror.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -8221,6 +9032,13 @@ npmlog@^4.0.1: gauge "~2.7.3" set-blocking "~2.0.0" +nth-check@^2.0.1: + version "2.1.1" + resolved "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" + integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== + dependencies: + boolbase "^1.0.0" + nullthrows@^1.1.1: version "1.1.1" resolved "https://registry.npmmirror.com/nullthrows/-/nullthrows-1.1.1.tgz#7818258843856ae971eae4208ad7d7eb19a431b1" @@ -8265,6 +9083,11 @@ object-inspect@^1.11.0, object-inspect@^1.9.0: resolved "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.12.0.tgz#6e2c120e868fd1fd18cb4f18c31741d0d6e776f0" integrity sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g== +object-inspect@^1.12.2: + version "1.12.2" + resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" + integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== + object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" resolved "https://registry.npmmirror.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" @@ -8298,6 +9121,16 @@ object.assign@^4.1.0, object.assign@^4.1.2: has-symbols "^1.0.1" object-keys "^1.1.1" +object.assign@^4.1.4: + version "4.1.4" + resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" + integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + has-symbols "^1.0.3" + object-keys "^1.1.1" + object.entries@^1.1.5: version "1.1.5" resolved "https://registry.npmmirror.com/object.entries/-/object.entries-1.1.5.tgz#e1acdd17c4de2cd96d5a08487cfb9db84d881861" @@ -8324,6 +9157,14 @@ object.hasown@^1.1.0: define-properties "^1.1.3" es-abstract "^1.19.1" +object.hasown@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.1.tgz#ad1eecc60d03f49460600430d97f23882cf592a3" + integrity sha512-LYLe4tivNQzq4JdaWW6WO3HMZZJWzkkH8fnI6EebWl0VZth2wL2Lovm74ep2/gZzlaTdV62JZHEqHQ2yVn8Q/A== + dependencies: + define-properties "^1.1.4" + es-abstract "^1.19.5" + object.pick@^1.3.0: version "1.3.0" resolved "https://registry.npmmirror.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" @@ -8575,6 +9416,18 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" +parse-entities@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz#53c6eb5b9314a1f4ec99fa0fdf7ce01ecda0cbe8" + integrity sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ== + dependencies: + character-entities "^1.0.0" + character-entities-legacy "^1.0.0" + character-reference-invalid "^1.0.0" + is-alphanumerical "^1.0.0" + is-decimal "^1.0.0" + is-hexadecimal "^1.0.0" + parse-json@5.2.0, parse-json@^5.0.0: version "5.2.0" resolved "https://registry.npmmirror.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" @@ -8779,6 +9632,11 @@ plugin-error@^0.1.2: arr-union "^2.0.1" extend-shallow "^1.1.2" +pluralize@^8.0.0: + version "8.0.0" + resolved "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" + integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== + pod-install@^0.1.0: version "0.1.32" resolved "https://registry.npmmirror.com/pod-install/-/pod-install-0.1.32.tgz#2cafa6c0f7428738a560e0495a02e1e5778a944d" @@ -8789,6 +9647,23 @@ posix-character-classes@^0.1.0: resolved "https://registry.npmmirror.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== +postcss-selector-parser@^6.0.9: + version "6.0.10" + resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz#79b61e2c0d1bfc2602d549e11d0876256f8df88d" + integrity sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w== + dependencies: + cssesc "^3.0.0" + util-deprecate "^1.0.2" + +postcss@^8.4.16: + version "8.4.18" + resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.18.tgz#6d50046ea7d3d66a85e0e782074e7203bc7fbca2" + integrity sha512-Wi8mWhncLJm11GATDaQKobXSNEYGUHeQLiQqDFG1qQ5UTDPTEvKw0Xt5NsTpktGTwLps3ByrWsBrG0rB8YQ9oA== + dependencies: + nanoid "^3.3.4" + picocolors "^1.0.0" + source-map-js "^1.0.2" + postcss@^8.4.6: version "8.4.7" resolved "https://registry.npmmirror.com/postcss/-/postcss-8.4.7.tgz#f99862069ec4541de386bf57f5660a6c7a0875a8" @@ -8886,11 +9761,6 @@ process-nextick-args@~2.0.0: resolved "https://registry.npmmirror.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -progress@^2.0.0: - version "2.0.3" - resolved "https://registry.npmmirror.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" - integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - promise@^7.1.1: version "7.3.1" resolved "https://registry.npmmirror.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" @@ -8913,7 +9783,7 @@ prompts@^2.0.1, prompts@^2.4.0: kleur "^3.0.3" sisteransi "^1.0.5" -prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.npmmirror.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -9240,6 +10110,11 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" +regexp-tree@^0.1.24, regexp-tree@~0.1.1: + version "0.1.24" + resolved "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.24.tgz#3d6fa238450a4d66e5bc9c4c14bb720e2196829d" + integrity sha512-s2aEVuLhvnVJW6s/iPgEGK6R+/xngd2jNQ+xy4bXNDKxZKJH6jpPHY6kVeVv1IeLCHgswRj+Kl3ELaDjG6V1iw== + regexp.prototype.flags@^1.3.1: version "1.4.1" resolved "https://registry.npmmirror.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.1.tgz#b3f4c0059af9e47eca9f3f660e51d81307e72307" @@ -9248,7 +10123,16 @@ regexp.prototype.flags@^1.3.1: call-bind "^1.0.2" define-properties "^1.1.3" -regexpp@^3.0.0, regexpp@^3.1.0: +regexp.prototype.flags@^1.4.1, regexp.prototype.flags@^1.4.3: + version "1.4.3" + resolved "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" + integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + functions-have-names "^1.2.2" + +regexpp@^3.0.0, regexpp@^3.2.0: version "3.2.0" resolved "https://registry.npmmirror.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== @@ -9371,11 +10255,6 @@ require-directory@^2.1.1: resolved "https://registry.npmmirror.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== -require-from-string@^2.0.2: - version "2.0.2" - resolved "https://registry.npmmirror.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - require-main-filename@^2.0.0: version "2.0.0" resolved "https://registry.npmmirror.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" @@ -9442,6 +10321,15 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14 path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +resolve@^1.20.0, resolve@^1.22.1: + version "1.22.1" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" + integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== + dependencies: + is-core-module "^2.9.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + resolve@^2.0.0-next.3: version "2.0.0-next.3" resolved "https://registry.npmmirror.com/resolve/-/resolve-2.0.0-next.3.tgz#d41016293d4a8586a39ca5d9b5f15cbea1f55e46" @@ -9521,6 +10409,13 @@ rollup@^2.59.0: optionalDependencies: fsevents "~2.3.2" +rollup@~2.78.0: + version "2.78.1" + resolved "https://registry.npmjs.org/rollup/-/rollup-2.78.1.tgz#52fe3934d9c83cb4f7c4cb5fb75d88591be8648f" + integrity sha512-VeeCgtGi4P+o9hIg+xz4qQpRl6R401LWEXBmxYKOV4zlF82lyhgh2hTZnheFUbANE8l2A41F458iwj2vEYaXJg== + optionalDependencies: + fsevents "~2.3.2" + rsvp@^4.8.4: version "4.8.5" resolved "https://registry.npmmirror.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" @@ -9574,6 +10469,15 @@ safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: resolved "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +safe-regex-test@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" + integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.3" + is-regex "^1.1.4" + safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.npmmirror.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" @@ -9581,6 +10485,13 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" +safe-regex@^2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz#f7128f00d056e2fe5c11e81a1324dd974aadced2" + integrity sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A== + dependencies: + regexp-tree "~0.1.1" + "safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -9653,7 +10564,7 @@ semver@7.3.2: resolved "https://registry.npmmirror.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -semver@7.3.5, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5: +semver@7.3.5, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5: version "7.3.5" resolved "https://registry.npmmirror.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== @@ -9665,6 +10576,13 @@ semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: resolved "https://registry.npmmirror.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^7.0.0, semver@^7.3.6, semver@^7.3.7: + version "7.3.8" + resolved "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" + integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== + dependencies: + lru-cache "^6.0.0" + send@0.17.2: version "0.17.2" resolved "https://registry.npmmirror.com/send/-/send-0.17.2.tgz#926622f76601c41808012c8bf1688fe3906f7820" @@ -9866,15 +10784,6 @@ slice-ansi@^2.0.0: astral-regex "^1.0.0" is-fullwidth-code-point "^2.0.0" -slice-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.npmmirror.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" - integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.npmmirror.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -10157,6 +11066,20 @@ string.prototype.matchall@^4.0.6: regexp.prototype.flags "^1.3.1" side-channel "^1.0.4" +string.prototype.matchall@^4.0.7: + version "4.0.7" + resolved "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.7.tgz#8e6ecb0d8a1fb1fda470d81acecb2dba057a481d" + integrity sha512-f48okCX7JiwVi1NXCVWcFnZgADDC/n2vePlQ/KUCNqCikLLilQvwjMO8+BHVKvgzH0JB0J9LEPgxOGT02RoETg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + get-intrinsic "^1.1.1" + has-symbols "^1.0.3" + internal-slot "^1.0.3" + regexp.prototype.flags "^1.4.1" + side-channel "^1.0.4" + string.prototype.trimend@^1.0.4: version "1.0.4" resolved "https://registry.npmmirror.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" @@ -10165,6 +11088,15 @@ string.prototype.trimend@^1.0.4: call-bind "^1.0.2" define-properties "^1.1.3" +string.prototype.trimend@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz#914a65baaab25fbdd4ee291ca7dde57e869cb8d0" + integrity sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + string.prototype.trimstart@^1.0.4: version "1.0.4" resolved "https://registry.npmmirror.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" @@ -10173,6 +11105,15 @@ string.prototype.trimstart@^1.0.4: call-bind "^1.0.2" define-properties "^1.1.3" +string.prototype.trimstart@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz#5466d93ba58cfa2134839f81d7f42437e8c01fef" + integrity sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -10265,6 +11206,13 @@ strip-json-comments@~2.0.1: resolved "https://registry.npmmirror.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== +strip-literal@^0.4.2: + version "0.4.2" + resolved "https://registry.npmjs.org/strip-literal/-/strip-literal-0.4.2.tgz#4f9fa6c38bb157b924e9ace7155ebf8a2342cbcf" + integrity sha512-pv48ybn4iE1O9RLgCAN0iU4Xv7RlBTiit6DKmMiErbs9x1wH6vXBs45tWc0H5wUIF6TLTrKweqkmYF/iraQKNw== + dependencies: + acorn "^8.8.0" + sudo-prompt@^9.0.0: version "9.2.1" resolved "https://registry.npmmirror.com/sudo-prompt/-/sudo-prompt-9.2.1.tgz#77efb84309c9ca489527a4e749f287e6bdd52afd" @@ -10320,17 +11268,6 @@ table-layout@^0.4.2: typical "^2.6.1" wordwrapjs "^3.0.0" -table@^6.0.9: - version "6.8.0" - resolved "https://registry.npmmirror.com/table/-/table-6.8.0.tgz#87e28f14fa4321c3377ba286f07b79b281a3b3ca" - integrity sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA== - dependencies: - ajv "^8.0.1" - lodash.truncate "^4.4.2" - slice-ansi "^4.0.0" - string-width "^4.2.3" - strip-ansi "^6.0.1" - tar-fs@^2.0.0, tar-fs@^2.1.1: version "2.1.1" resolved "https://registry.npmmirror.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" @@ -10438,16 +11375,31 @@ time-stamp@^1.0.0: resolved "https://registry.npmmirror.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" integrity sha512-gLCeArryy2yNTRzTGKbZbloctj64jkZ57hj5zdraXue6aFgd6PmvVtEyiUU+hvU0v7q08oVv8r8ev0tRo6bvgw== +tinybench@^2.3.0: + version "2.3.1" + resolved "https://registry.npmjs.org/tinybench/-/tinybench-2.3.1.tgz#14f64e6b77d7ef0b1f6ab850c7a808c6760b414d" + integrity sha512-hGYWYBMPr7p4g5IarQE7XhlyWveh1EKhy4wUBS1LrHXCKYgvz+4/jCqgmJqZxxldesn05vccrtME2RLLZNW7iA== + tinypool@^0.1.1: version "0.1.2" resolved "https://registry.npmmirror.com/tinypool/-/tinypool-0.1.2.tgz#5b1d5f5bb403afac8c67000047951ce76342fda7" integrity sha512-fvtYGXoui2RpeMILfkvGIgOVkzJEGediv8UJt7TxdAOY8pnvUkFg/fkvqTfXG9Acc9S17Cnn1S4osDc2164guA== +tinypool@^0.3.0: + version "0.3.0" + resolved "https://registry.npmjs.org/tinypool/-/tinypool-0.3.0.tgz#c405d8b743509fc28ea4ca358433190be654f819" + integrity sha512-NX5KeqHOBZU6Bc0xj9Vr5Szbb1j8tUHIeD18s41aDJaPeC5QTdEhK0SpdpUrZlj2nv5cctNcSjaKNanXlfcVEQ== + tinyspy@^0.2.10: version "0.2.10" resolved "https://registry.npmmirror.com/tinyspy/-/tinyspy-0.2.10.tgz#7f684504bda345620f7a6a8462c618ef3d055517" integrity sha512-Qij6rGWCDjWIejxCXXVi6bNgvrYBp3PbqC4cBP/0fD6WHDOHCw09Zd13CsxrDqSR5PFq01WeqDws8t5lz5sH0A== +tinyspy@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/tinyspy/-/tinyspy-1.0.2.tgz#6da0b3918bfd56170fb3cd3a2b5ef832ee1dff0d" + integrity sha512-bSGlgwLBYf7PnUsQ6WOc6SJ3pGOcd+d8AA6EUnLDDM0kWEstC1JIlSZA3UNliDXhd9ABoS7hiRBDCu+XP/sf1Q== + tmp@^0.0.33: version "0.0.33" resolved "https://registry.npmmirror.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -10560,6 +11512,16 @@ ts-node@^10.5.0: v8-compile-cache-lib "^3.0.0" yn "3.1.1" +tsconfig-paths@^3.14.1: + version "3.14.1" + resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" + integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.6" + strip-bom "^3.0.0" + tslib@^1.8.1, tslib@^1.9.0: version "1.14.1" resolved "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" @@ -10570,7 +11532,7 @@ tslib@^2.1.0: resolved "https://registry.npmmirror.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== -tsutils@^3.17.1: +tsutils@^3.17.1, tsutils@^3.21.0: version "3.21.0" resolved "https://registry.npmmirror.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== @@ -10703,6 +11665,16 @@ unbox-primitive@^1.0.1: has-symbols "^1.0.2" which-boxed-primitive "^1.0.2" +unbox-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== + dependencies: + call-bind "^1.0.2" + has-bigints "^1.0.2" + has-symbols "^1.0.3" + which-boxed-primitive "^1.0.2" + unc-path-regex@^0.1.2: version "0.1.2" resolved "https://registry.npmmirror.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" @@ -10763,6 +11735,13 @@ unique-string@^2.0.0: dependencies: crypto-random-string "^2.0.0" +unist-util-stringify-position@^2.0.0: + version "2.0.3" + resolved "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz#cce3bfa1cdf85ba7375d1d5b17bdc4cada9bd9da" + integrity sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g== + dependencies: + "@types/unist" "^2.0.2" + universal-user-agent@^6.0.0: version "6.0.0" resolved "https://registry.npmmirror.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" @@ -10852,7 +11831,7 @@ use@^3.1.0: resolved "https://registry.npmmirror.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== -util-deprecate@^1.0.1, util-deprecate@~1.0.1: +util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== @@ -10877,11 +11856,6 @@ v8-compile-cache-lib@^3.0.0: resolved "https://registry.npmmirror.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz#0582bcb1c74f3a2ee46487ceecf372e46bce53e8" integrity sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA== -v8-compile-cache@^2.0.3: - version "2.3.0" - resolved "https://registry.npmmirror.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" - integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== - v8-to-istanbul@^7.0.0: version "7.1.2" resolved "https://registry.npmmirror.com/v8-to-istanbul/-/v8-to-istanbul-7.1.2.tgz#30898d1a7fa0c84d225a2c1434fb958f290883c1" @@ -10925,6 +11899,18 @@ vite@>=2.7.13: optionalDependencies: fsevents "~2.3.2" +vite@^3.0.0: + version "3.1.8" + resolved "https://registry.npmjs.org/vite/-/vite-3.1.8.tgz#fa29144167d19b773baffd65b3972ea4c12359c9" + integrity sha512-m7jJe3nufUbuOfotkntGFupinL/fmuTNuQmiVE7cH2IZMuf4UbfbGYMUT3jVWgGYuRVLY9j8NnrRqgw5rr5QTg== + dependencies: + esbuild "^0.15.9" + postcss "^8.4.16" + resolve "^1.22.1" + rollup "~2.78.0" + optionalDependencies: + fsevents "~2.3.2" + vitest@^0.2.7: version "0.2.8" resolved "https://registry.npmmirror.com/vitest/-/vitest-0.2.8.tgz#1beb95cafe6ab05e00fa0f4925341407a314574e" @@ -10938,11 +11924,41 @@ vitest@^0.2.7: tinyspy "^0.2.10" vite ">=2.7.13" +vitest@^0.24.3: + version "0.24.3" + resolved "https://registry.npmjs.org/vitest/-/vitest-0.24.3.tgz#d91c7e2d557877d5270033efdf18add6063f0c97" + integrity sha512-aM0auuPPgMSstWvr851hB74g/LKaKBzSxcG3da7ejfZbx08Y21JpZmbmDYrMTCGhVZKqTGwzcnLMwyfz2WzkhQ== + dependencies: + "@types/chai" "^4.3.3" + "@types/chai-subset" "^1.3.3" + "@types/node" "*" + chai "^4.3.6" + debug "^4.3.4" + local-pkg "^0.4.2" + strip-literal "^0.4.2" + tinybench "^2.3.0" + tinypool "^0.3.0" + tinyspy "^1.0.2" + vite "^3.0.0" + vlq@^1.0.0: version "1.0.1" resolved "https://registry.npmmirror.com/vlq/-/vlq-1.0.1.tgz#c003f6e7c0b4c1edd623fd6ee50bbc0d6a1de468" integrity sha512-gQpnTgkubC6hQgdIcRdYGDSDc+SaujOdyesZQMv6JlfQee/9Mp0Qhnys6WxDWvQnL5WZdT7o2Ul187aSt0Rq+w== +vue-eslint-parser@^9.0.1: + version "9.1.0" + resolved "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.1.0.tgz#0e121d1bb29bd10763c83e3cc583ee03434a9dd5" + integrity sha512-NGn/iQy8/Wb7RrRa4aRkokyCZfOUWk19OP5HP6JEozQFX5AoS/t+Z0ZN7FY4LlmWc4FNI922V7cvX28zctN8dQ== + dependencies: + debug "^4.3.4" + eslint-scope "^7.1.1" + eslint-visitor-keys "^3.3.0" + espree "^9.3.1" + esquery "^1.4.0" + lodash "^4.17.21" + semver "^7.3.6" + w3c-hr-time@^1.0.2: version "1.0.2" resolved "https://registry.npmmirror.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" @@ -11172,6 +12188,11 @@ xml-name-validator@^3.0.0: resolved "https://registry.npmmirror.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== +xml-name-validator@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835" + integrity sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw== + xmlbuilder@^9.0.7: version "9.0.7" resolved "https://registry.npmmirror.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" @@ -11219,11 +12240,25 @@ yallist@^4.0.0: resolved "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== +yaml-eslint-parser@^1.0.1, yaml-eslint-parser@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/yaml-eslint-parser/-/yaml-eslint-parser-1.1.0.tgz#62703e2f4afbe5a17d3fe297882740bf89504e78" + integrity sha512-b464Q1fYiX1oYx2kE8k4mEp6S9Prk+tfDsY/IPxQ0FCjEuj3AKko5Skf3/yQJeYTTDyjDE+aWIJemnv29HvEWQ== + dependencies: + eslint-visitor-keys "^3.0.0" + lodash "^4.17.21" + yaml "^2.0.0" + yaml@1.10.2, yaml@^1.10.0: version "1.10.2" resolved "https://registry.npmmirror.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== +yaml@^2.0.0: + version "2.1.3" + resolved "https://registry.npmjs.org/yaml/-/yaml-2.1.3.tgz#9b3a4c8aff9821b696275c79a8bee8399d945207" + integrity sha512-AacA8nRULjKMX2DvWvOAdBZMOfQlypSFkjcOcu9FalllIDJ1kvlREzcdIZmidQUqqeMv7jorHjq2HlLv/+c2lg== + yargs-parser@20.2.9, yargs-parser@^20.2.2, yargs-parser@^20.2.3: version "20.2.9" resolved "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"