diff --git a/.eslintrc.json b/.eslintrc.json
deleted file mode 100644
index 86bb32e..0000000
--- a/.eslintrc.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": ["plugin:react-hooks/recommended"]
-}
diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index fcadb2c..0000000
--- a/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-* text eol=lf
diff --git a/.github/workflows/canary.yaml b/.github/workflows/canary.yaml
new file mode 100644
index 0000000..e6f3dc7
--- /dev/null
+++ b/.github/workflows/canary.yaml
@@ -0,0 +1,91 @@
+name: Publish Canary
+
+on:
+ pull_request:
+ branches:
+ - 'master'
+
+jobs:
+ publish-canary:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: '22'
+
+ - name: Install pnpm
+ uses: pnpm/action-setup@v2
+ with:
+ version: 10
+
+ - name: Get pnpm store directory
+ shell: bash
+ run: |
+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
+
+ - name: Setup pnpm cache
+ uses: actions/cache@v3
+ with:
+ path: ${{ env.STORE_PATH }}
+ key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
+ restore-keys: |
+ ${{ runner.os }}-pnpm-store-
+
+ - name: Install dependencies
+ run: pnpm install
+
+ - name: Build package
+ run: pnpm build
+ working-directory: packages/use-file-picker
+
+ - name: Test package
+ run: pnpm test
+ working-directory: packages/use-file-picker
+
+ - name: Lint package
+ run: pnpm lint
+
+ - name: Bump version for canary
+ working-directory: packages/use-file-picker
+ run: |
+ # Get current version from package.json
+ CURRENT_VERSION=$(node -p "require('./package.json').version")
+ # Remove any existing pre-release identifiers
+ BASE_VERSION=$(echo $CURRENT_VERSION | sed 's/-.*$//')
+
+ # Create canary version with PR number and run number
+ CANARY_VERSION="${BASE_VERSION}-canary.${GITHUB_PR_NUMBER}.${GITHUB_RUN_NUMBER}"
+
+ # Update package.json with new version
+ npm pkg set version=$CANARY_VERSION
+ env:
+ GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
+ GITHUB_RUN_NUMBER: ${{ github.run_number }}
+
+ - name: Configure NPM
+ run: |
+ echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc
+ working-directory: packages/use-file-picker
+ env:
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
+
+ - name: Publish canary
+ run: pnpm publish --tag canary --no-git-checks
+ working-directory: packages/use-file-picker
+ env:
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
+
+ - name: Check if package.json version is already published
+ run: |
+ PACKAGE_VERSION=$(node -p "require('./package.json').version")
+ LATEST_VERSION=$(npm view use-file-picker version)
+ if [ "$LATEST_VERSION" = "$PACKAGE_VERSION" ]; then
+ echo "Version $PACKAGE_VERSION is already published"
+ exit 1
+ fi
+ working-directory: packages/use-file-picker
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
deleted file mode 100644
index f2795cb..0000000
--- a/.github/workflows/main.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-name: CI
-on: [push]
-jobs:
- build:
- name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
-
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- node: ['18.x', '20.x']
- os: [ubuntu-latest, windows-latest, macOS-latest]
-
- steps:
- - name: Checkout repo
- uses: actions/checkout@v2
-
- - name: Use Node ${{ matrix.node }}
- uses: actions/setup-node@v1
- with:
- node-version: ${{ matrix.node }}
-
- - name: Install deps and build (with cache)
- uses: bahmutov/npm-install@v1
-
- - name: Install yarn
- run: npm i -g yarn
-
- - name: Lint
- run: yarn lint
-
- - name: Test
- run: yarn test --ci --coverage --maxWorkers=2
-
- - name: Build
- run: yarn build
diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml
new file mode 100644
index 0000000..83793c5
--- /dev/null
+++ b/.github/workflows/publish.yaml
@@ -0,0 +1,64 @@
+name: Publish Package
+
+on:
+ push:
+ branches:
+ - master
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: '22'
+
+ - name: Install pnpm
+ uses: pnpm/action-setup@v2
+ with:
+ version: 10
+
+ - name: Get pnpm store directory
+ shell: bash
+ run: |
+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
+
+ - name: Setup pnpm cache
+ uses: actions/cache@v3
+ with:
+ path: ${{ env.STORE_PATH }}
+ key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
+ restore-keys: |
+ ${{ runner.os }}-pnpm-store-
+
+ - name: Install dependencies
+ run: pnpm install
+
+ - name: Build package
+ run: pnpm build
+ working-directory: packages/use-file-picker
+
+ - name: Test package
+ run: pnpm test
+ working-directory: packages/use-file-picker
+
+ - name: Lint package
+ run: pnpm lint
+
+ - name: Configure NPM
+ run: |
+ echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc
+ working-directory: packages/use-file-picker
+ env:
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
+
+ - name: Publish package
+ run: pnpm publish --no-git-checks
+ working-directory: packages/use-file-picker
+ env:
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
diff --git a/.github/workflows/size.yml b/.github/workflows/size.yml
deleted file mode 100644
index ae468a8..0000000
--- a/.github/workflows/size.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-name: size
-on: [pull_request]
-jobs:
- size:
- runs-on: ubuntu-latest
-
- env:
- CI_JOB_NUMBER: 1
- steps:
- - uses: actions/checkout@v1
- - uses: actions/setup-node@v3
- with:
- node-version: 16
- - uses: andresz1/size-limit-action@v1
- with:
- github_token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.gitignore b/.gitignore
index 37bf862..63f5984 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,5 @@
*.log
.DS_Store
node_modules
-.cache
-dist
-storybook-static
+.turbo
+/**/dist
\ No newline at end of file
diff --git a/.storybook/main.js b/.storybook/main.js
deleted file mode 100644
index 4bc8459..0000000
--- a/.storybook/main.js
+++ /dev/null
@@ -1,8 +0,0 @@
-module.exports = {
- stories: ['../stories/**/*.stories.@(ts|tsx|js|jsx)'],
- addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
- // https://storybook.js.org/docs/react/configure/typescript#mainjs-configuration
- typescript: {
- check: true, // type-check stories during Storybook build
- },
-};
diff --git a/.storybook/preview.js b/.storybook/preview.js
deleted file mode 100644
index 29ae5f2..0000000
--- a/.storybook/preview.js
+++ /dev/null
@@ -1,5 +0,0 @@
-// https://storybook.js.org/docs/react/writing-stories/parameters#global-parameters
-export const parameters = {
- // https://storybook.js.org/docs/react/essentials/actions#automatically-matching-args
- actions: { argTypesRegex: '^on.*' },
-};
diff --git a/LICENSE b/LICENSE
index 7596dc6..d96959d 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2023 Milosz
+Copyright (c) 2025 Milosz Jankiewicz, Kamil Planer
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/eslint.config.js b/eslint.config.js
new file mode 100644
index 0000000..66d427e
--- /dev/null
+++ b/eslint.config.js
@@ -0,0 +1,37 @@
+import js from '@eslint/js';
+import globals from 'globals';
+import tseslint from 'typescript-eslint';
+import pluginReact from 'eslint-plugin-react';
+import { defineConfig } from 'eslint/config';
+
+export default defineConfig([
+ {
+ files: ['**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
+ plugins: { js },
+ extends: ['js/recommended'],
+ ignores: ['**/dist/**', '**/node_modules/**', '**/build/**'],
+ },
+ {
+ files: ['**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
+ languageOptions: { globals: globals.browser },
+ ignores: ['**/dist/**', '**/node_modules/**', '**/build/**'],
+ },
+ ...tseslint.configs.recommended.map(config => ({
+ ...config,
+ ignores: ['**/dist/**', '**/node_modules/**', '**/build/**'],
+ })),
+ {
+ ...pluginReact.configs.flat.recommended,
+ rules: {
+ ...pluginReact.configs.flat.recommended.rules,
+ 'react/react-in-jsx-scope': 'off',
+ },
+ settings: {
+ ...pluginReact.configs.flat.recommended.settings,
+ react: {
+ version: '19',
+ },
+ },
+ ignores: ['**/dist/**', '**/node_modules/**', '**/build/**'],
+ },
+]);
diff --git a/example/.npmignore b/example/.npmignore
deleted file mode 100644
index 587e4ec..0000000
--- a/example/.npmignore
+++ /dev/null
@@ -1,3 +0,0 @@
-node_modules
-.cache
-dist
\ No newline at end of file
diff --git a/example/index.html b/example/index.html
deleted file mode 100644
index 3c6f91f..0000000
--- a/example/index.html
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
- Playground
-
-
-
-
-
-
-
diff --git a/example/package.json b/example/package.json
deleted file mode 100644
index 96f0240..0000000
--- a/example/package.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "name": "example",
- "private": true,
- "version": "1.0.0",
- "main": "index.js",
- "license": "MIT",
- "scripts": {
- "start": "vite --host",
- "build": "vite build"
- },
- "dependencies": {
- "react-app-polyfill": "^3.0.0"
- },
- "alias": {
- "react": "../node_modules/react",
- "react-dom": "../node_modules/react-dom/profiling",
- "scheduler/tracing": "../node_modules/scheduler/tracing-profiling"
- },
- "devDependencies": {
- "@types/react": "^17.0.47",
- "@types/react-dom": "^17.0.17",
- "vite": "latest",
- "vite-preset-react": "latest",
- "typescript": "4.9.5"
- }
-}
diff --git a/example/tsconfig.json b/example/tsconfig.json
deleted file mode 100644
index 3c43903..0000000
--- a/example/tsconfig.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": "../tsconfig.json"
-}
diff --git a/example/vite.config.js b/example/vite.config.js
deleted file mode 100644
index f460093..0000000
--- a/example/vite.config.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { defineConfig } from 'vite';
-import ReactPlugin from 'vite-preset-react';
-
-// https://vitejs.dev/config/
-export default defineConfig({
- plugins: [
- ReactPlugin({
- injectReact: false,
- }),
- ],
-});
diff --git a/example/yarn.lock b/example/yarn.lock
deleted file mode 100644
index 7ea72ac..0000000
--- a/example/yarn.lock
+++ /dev/null
@@ -1,784 +0,0 @@
-# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
-# yarn lockfile v1
-
-
-"@ampproject/remapping@^2.2.0":
- version "2.2.0"
- resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz"
- integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==
- dependencies:
- "@jridgewell/gen-mapping" "^0.1.0"
- "@jridgewell/trace-mapping" "^0.3.9"
-
-"@babel/code-frame@^7.18.6":
- version "7.18.6"
- resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz"
- integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==
- dependencies:
- "@babel/highlight" "^7.18.6"
-
-"@babel/compat-data@^7.20.5":
- version "7.21.0"
- resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.21.0.tgz"
- integrity sha512-gMuZsmsgxk/ENC3O/fRw5QY8A9/uxQbbCEypnLIiYYc/qVJtEV7ouxC3EllIIwNzMqAQee5tanFabWsUOutS7g==
-
-"@babel/core@^7.17.10":
- version "7.21.3"
- resolved "https://registry.npmjs.org/@babel/core/-/core-7.21.3.tgz"
- integrity sha512-qIJONzoa/qiHghnm0l1n4i/6IIziDpzqc36FBs4pzMhDUraHqponwJLiAKm1hGLP3OSB/TVNz6rMwVGpwxxySw==
- dependencies:
- "@ampproject/remapping" "^2.2.0"
- "@babel/code-frame" "^7.18.6"
- "@babel/generator" "^7.21.3"
- "@babel/helper-compilation-targets" "^7.20.7"
- "@babel/helper-module-transforms" "^7.21.2"
- "@babel/helpers" "^7.21.0"
- "@babel/parser" "^7.21.3"
- "@babel/template" "^7.20.7"
- "@babel/traverse" "^7.21.3"
- "@babel/types" "^7.21.3"
- convert-source-map "^1.7.0"
- debug "^4.1.0"
- gensync "^1.0.0-beta.2"
- json5 "^2.2.2"
- semver "^6.3.0"
-
-"@babel/generator@^7.21.3":
- version "7.21.3"
- resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.21.3.tgz"
- integrity sha512-QS3iR1GYC/YGUnW7IdggFeN5c1poPUurnGttOV/bZgPGV+izC/D8HnD6DLwod0fsatNyVn1G3EVWMYIF0nHbeA==
- dependencies:
- "@babel/types" "^7.21.3"
- "@jridgewell/gen-mapping" "^0.3.2"
- "@jridgewell/trace-mapping" "^0.3.17"
- jsesc "^2.5.1"
-
-"@babel/helper-annotate-as-pure@^7.18.6":
- version "7.18.6"
- resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz"
- integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==
- dependencies:
- "@babel/types" "^7.18.6"
-
-"@babel/helper-compilation-targets@^7.20.7":
- version "7.20.7"
- resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz"
- integrity sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==
- dependencies:
- "@babel/compat-data" "^7.20.5"
- "@babel/helper-validator-option" "^7.18.6"
- browserslist "^4.21.3"
- lru-cache "^5.1.1"
- semver "^6.3.0"
-
-"@babel/helper-environment-visitor@^7.18.9":
- version "7.18.9"
- resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz"
- integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==
-
-"@babel/helper-function-name@^7.21.0":
- version "7.21.0"
- resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz"
- integrity sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==
- dependencies:
- "@babel/template" "^7.20.7"
- "@babel/types" "^7.21.0"
-
-"@babel/helper-hoist-variables@^7.18.6":
- version "7.18.6"
- resolved "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz"
- integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==
- dependencies:
- "@babel/types" "^7.18.6"
-
-"@babel/helper-module-imports@^7.18.6":
- version "7.18.6"
- resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz"
- integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==
- dependencies:
- "@babel/types" "^7.18.6"
-
-"@babel/helper-module-transforms@^7.21.2":
- version "7.21.2"
- resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz"
- integrity sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ==
- dependencies:
- "@babel/helper-environment-visitor" "^7.18.9"
- "@babel/helper-module-imports" "^7.18.6"
- "@babel/helper-simple-access" "^7.20.2"
- "@babel/helper-split-export-declaration" "^7.18.6"
- "@babel/helper-validator-identifier" "^7.19.1"
- "@babel/template" "^7.20.7"
- "@babel/traverse" "^7.21.2"
- "@babel/types" "^7.21.2"
-
-"@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2":
- version "7.20.2"
- resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz"
- integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==
-
-"@babel/helper-simple-access@^7.20.2":
- version "7.20.2"
- resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz"
- integrity sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==
- dependencies:
- "@babel/types" "^7.20.2"
-
-"@babel/helper-split-export-declaration@^7.18.6":
- version "7.18.6"
- resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz"
- integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==
- dependencies:
- "@babel/types" "^7.18.6"
-
-"@babel/helper-string-parser@^7.19.4":
- version "7.19.4"
- resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz"
- integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==
-
-"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1":
- version "7.19.1"
- resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz"
- integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==
-
-"@babel/helper-validator-option@^7.18.6":
- version "7.21.0"
- resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz"
- integrity sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==
-
-"@babel/helpers@^7.21.0":
- version "7.21.0"
- resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.21.0.tgz"
- integrity sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA==
- dependencies:
- "@babel/template" "^7.20.7"
- "@babel/traverse" "^7.21.0"
- "@babel/types" "^7.21.0"
-
-"@babel/highlight@^7.18.6":
- version "7.18.6"
- resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz"
- integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==
- dependencies:
- "@babel/helper-validator-identifier" "^7.18.6"
- chalk "^2.0.0"
- js-tokens "^4.0.0"
-
-"@babel/parser@^7.20.7", "@babel/parser@^7.21.3":
- version "7.21.3"
- resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.21.3.tgz"
- integrity sha512-lobG0d7aOfQRXh8AyklEAgZGvA4FShxo6xQbUrrT/cNBPUdIDojlokwJsQyCC/eKia7ifqM0yP+2DRZ4WKw2RQ==
-
-"@babel/plugin-syntax-jsx@^7.18.6":
- version "7.18.6"
- resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz"
- integrity sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==
- dependencies:
- "@babel/helper-plugin-utils" "^7.18.6"
-
-"@babel/plugin-transform-react-jsx-development@^7.16.7":
- version "7.18.6"
- resolved "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.18.6.tgz"
- integrity sha512-SA6HEjwYFKF7WDjWcMcMGUimmw/nhNRDWxr+KaLSCrkD/LMDBvWRmHAYgE1HDeF8KUuI8OAu+RT6EOtKxSW2qA==
- dependencies:
- "@babel/plugin-transform-react-jsx" "^7.18.6"
-
-"@babel/plugin-transform-react-jsx-self@^7.16.7":
- version "7.21.0"
- resolved "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.21.0.tgz"
- integrity sha512-f/Eq+79JEu+KUANFks9UZCcvydOOGMgF7jBrcwjHa5jTZD8JivnhCJYvmlhR/WTXBWonDExPoW0eO/CR4QJirA==
- dependencies:
- "@babel/helper-plugin-utils" "^7.20.2"
-
-"@babel/plugin-transform-react-jsx-source@^7.16.7":
- version "7.19.6"
- resolved "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.19.6.tgz"
- integrity sha512-RpAi004QyMNisst/pvSanoRdJ4q+jMCWyk9zdw/CyLB9j8RXEahodR6l2GyttDRyEVWZtbN+TpLiHJ3t34LbsQ==
- dependencies:
- "@babel/helper-plugin-utils" "^7.19.0"
-
-"@babel/plugin-transform-react-jsx@^7.17.3", "@babel/plugin-transform-react-jsx@^7.18.6":
- version "7.21.0"
- resolved "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.21.0.tgz"
- integrity sha512-6OAWljMvQrZjR2DaNhVfRz6dkCAVV+ymcLUmaf8bccGOHn2v5rHJK3tTpij0BuhdYWP4LLaqj5lwcdlpAAPuvg==
- dependencies:
- "@babel/helper-annotate-as-pure" "^7.18.6"
- "@babel/helper-module-imports" "^7.18.6"
- "@babel/helper-plugin-utils" "^7.20.2"
- "@babel/plugin-syntax-jsx" "^7.18.6"
- "@babel/types" "^7.21.0"
-
-"@babel/template@^7.20.7":
- version "7.20.7"
- resolved "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz"
- integrity sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==
- dependencies:
- "@babel/code-frame" "^7.18.6"
- "@babel/parser" "^7.20.7"
- "@babel/types" "^7.20.7"
-
-"@babel/traverse@^7.21.0", "@babel/traverse@^7.21.2", "@babel/traverse@^7.21.3":
- version "7.21.3"
- resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.3.tgz"
- integrity sha512-XLyopNeaTancVitYZe2MlUEvgKb6YVVPXzofHgqHijCImG33b/uTurMS488ht/Hbsb2XK3U2BnSTxKVNGV3nGQ==
- dependencies:
- "@babel/code-frame" "^7.18.6"
- "@babel/generator" "^7.21.3"
- "@babel/helper-environment-visitor" "^7.18.9"
- "@babel/helper-function-name" "^7.21.0"
- "@babel/helper-hoist-variables" "^7.18.6"
- "@babel/helper-split-export-declaration" "^7.18.6"
- "@babel/parser" "^7.21.3"
- "@babel/types" "^7.21.3"
- debug "^4.1.0"
- globals "^11.1.0"
-
-"@babel/types@^7.18.6", "@babel/types@^7.20.2", "@babel/types@^7.20.7", "@babel/types@^7.21.0", "@babel/types@^7.21.2", "@babel/types@^7.21.3":
- version "7.21.3"
- resolved "https://registry.npmjs.org/@babel/types/-/types-7.21.3.tgz"
- integrity sha512-sBGdETxC+/M4o/zKC0sl6sjWv62WFR/uzxrJ6uYyMLZOUlPnwzw0tKgVHOXxaAd5l2g8pEDM5RZ495GPQI77kg==
- dependencies:
- "@babel/helper-string-parser" "^7.19.4"
- "@babel/helper-validator-identifier" "^7.19.1"
- to-fast-properties "^2.0.0"
-
-"@esbuild/linux-loong64@0.14.54":
- version "0.14.54"
- resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz#de2a4be678bd4d0d1ffbb86e6de779cde5999028"
- integrity sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==
-
-"@jridgewell/gen-mapping@^0.1.0":
- version "0.1.1"
- resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz"
- integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==
- dependencies:
- "@jridgewell/set-array" "^1.0.0"
- "@jridgewell/sourcemap-codec" "^1.4.10"
-
-"@jridgewell/gen-mapping@^0.3.2":
- version "0.3.2"
- resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz"
- integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==
- dependencies:
- "@jridgewell/set-array" "^1.0.1"
- "@jridgewell/sourcemap-codec" "^1.4.10"
- "@jridgewell/trace-mapping" "^0.3.9"
-
-"@jridgewell/resolve-uri@3.1.0":
- version "3.1.0"
- resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz"
- integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==
-
-"@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1":
- version "1.1.2"
- resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz"
- integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==
-
-"@jridgewell/sourcemap-codec@1.4.14", "@jridgewell/sourcemap-codec@^1.4.10":
- version "1.4.14"
- resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz"
- integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==
-
-"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9":
- version "0.3.17"
- resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz"
- integrity sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==
- dependencies:
- "@jridgewell/resolve-uri" "3.1.0"
- "@jridgewell/sourcemap-codec" "1.4.14"
-
-"@rollup/pluginutils@^4.2.1":
- version "4.2.1"
- resolved "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz"
- integrity sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==
- dependencies:
- estree-walker "^2.0.1"
- picomatch "^2.2.2"
-
-"@types/prop-types@*":
- version "15.7.5"
- resolved "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz"
- integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==
-
-"@types/react-dom@^17.0.17":
- version "17.0.19"
- resolved "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.19.tgz"
- integrity sha512-PiYG40pnQRdPHnlf7tZnp0aQ6q9tspYr72vD61saO6zFCybLfMqwUCN0va1/P+86DXn18ZWeW30Bk7xlC5eEAQ==
- dependencies:
- "@types/react" "^17"
-
-"@types/react@^17", "@types/react@^17.0.47":
- version "17.0.55"
- resolved "https://registry.npmjs.org/@types/react/-/react-17.0.55.tgz"
- integrity sha512-kBcAhmT8RivFDYxHdy8QfPKu+WyfiiGjdPb9pIRtd6tj05j0zRHq5DBGW5Ogxv5cwSKd93BVgUk/HZ4I9p3zNg==
- dependencies:
- "@types/prop-types" "*"
- "@types/scheduler" "*"
- csstype "^3.0.2"
-
-"@types/scheduler@*":
- version "0.16.3"
- resolved "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.3.tgz"
- integrity sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==
-
-"@vitejs/plugin-react@^1.3.2":
- version "1.3.2"
- resolved "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-1.3.2.tgz"
- integrity sha512-aurBNmMo0kz1O4qRoY+FM4epSA39y3ShWGuqfLRA/3z0oEJAdtoSfgA3aO98/PCCHAqMaduLxIxErWrVKIFzXA==
- dependencies:
- "@babel/core" "^7.17.10"
- "@babel/plugin-transform-react-jsx" "^7.17.3"
- "@babel/plugin-transform-react-jsx-development" "^7.16.7"
- "@babel/plugin-transform-react-jsx-self" "^7.16.7"
- "@babel/plugin-transform-react-jsx-source" "^7.16.7"
- "@rollup/pluginutils" "^4.2.1"
- react-refresh "^0.13.0"
- resolve "^1.22.0"
-
-ansi-styles@^3.2.1:
- version "3.2.1"
- resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz"
- integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
- dependencies:
- color-convert "^1.9.0"
-
-asap@~2.0.6:
- version "2.0.6"
- resolved "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz"
- integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==
-
-browserslist@^4.21.3:
- version "4.21.5"
- resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz"
- integrity sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==
- dependencies:
- caniuse-lite "^1.0.30001449"
- electron-to-chromium "^1.4.284"
- node-releases "^2.0.8"
- update-browserslist-db "^1.0.10"
-
-caniuse-lite@^1.0.30001449:
- version "1.0.30001473"
- resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001473.tgz"
- integrity sha512-ewDad7+D2vlyy+E4UJuVfiBsU69IL+8oVmTuZnH5Q6CIUbxNfI50uVpRHbUPDD6SUaN2o0Lh4DhTrvLG/Tn1yg==
-
-chalk@^2.0.0:
- version "2.4.2"
- resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz"
- integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
- dependencies:
- ansi-styles "^3.2.1"
- escape-string-regexp "^1.0.5"
- supports-color "^5.3.0"
-
-color-convert@^1.9.0:
- version "1.9.3"
- resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz"
- integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
- dependencies:
- color-name "1.1.3"
-
-color-name@1.1.3:
- version "1.1.3"
- resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz"
- integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==
-
-convert-source-map@^1.7.0:
- version "1.9.0"
- resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz"
- integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==
-
-core-js@^3.19.2:
- version "3.29.1"
- resolved "https://registry.npmjs.org/core-js/-/core-js-3.29.1.tgz"
- integrity sha512-+jwgnhg6cQxKYIIjGtAHq2nwUOolo9eoFZ4sHfUH09BLXBgxnH4gA0zEd+t+BO2cNB8idaBtZFcFTRjQJRJmAw==
-
-csstype@^3.0.2:
- version "3.1.1"
- resolved "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz"
- integrity sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==
-
-debug@^4.1.0:
- version "4.3.4"
- resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz"
- integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
- dependencies:
- ms "2.1.2"
-
-electron-to-chromium@^1.4.284:
- version "1.4.346"
- resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.346.tgz"
- integrity sha512-9ZpKQD8hyWAoYf5bccm2qpaWogAGxb833DVC0arHo9nIbiAMh+aAKHZWABR2P9sK4a3zoCq7eXg8tylqPAnuNw==
-
-esbuild-android-64@0.14.54:
- version "0.14.54"
- resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz#505f41832884313bbaffb27704b8bcaa2d8616be"
- integrity sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==
-
-esbuild-android-arm64@0.14.54:
- version "0.14.54"
- resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.54.tgz#8ce69d7caba49646e009968fe5754a21a9871771"
- integrity sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==
-
-esbuild-darwin-64@0.14.54:
- version "0.14.54"
- resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.54.tgz#24ba67b9a8cb890a3c08d9018f887cc221cdda25"
- integrity sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==
-
-esbuild-darwin-arm64@0.14.54:
- version "0.14.54"
- resolved "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz"
- integrity sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==
-
-esbuild-freebsd-64@0.14.54:
- version "0.14.54"
- resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.54.tgz#09250f997a56ed4650f3e1979c905ffc40bbe94d"
- integrity sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==
-
-esbuild-freebsd-arm64@0.14.54:
- version "0.14.54"
- resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.54.tgz#bafb46ed04fc5f97cbdb016d86947a79579f8e48"
- integrity sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==
-
-esbuild-linux-32@0.14.54:
- version "0.14.54"
- resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz#e2a8c4a8efdc355405325033fcebeb941f781fe5"
- integrity sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==
-
-esbuild-linux-64@0.14.54:
- version "0.14.54"
- resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz#de5fdba1c95666cf72369f52b40b03be71226652"
- integrity sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==
-
-esbuild-linux-arm64@0.14.54:
- version "0.14.54"
- resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz#dae4cd42ae9787468b6a5c158da4c84e83b0ce8b"
- integrity sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==
-
-esbuild-linux-arm@0.14.54:
- version "0.14.54"
- resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.54.tgz#a2c1dff6d0f21dbe8fc6998a122675533ddfcd59"
- integrity sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==
-
-esbuild-linux-mips64le@0.14.54:
- version "0.14.54"
- resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.54.tgz#d9918e9e4cb972f8d6dae8e8655bf9ee131eda34"
- integrity sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==
-
-esbuild-linux-ppc64le@0.14.54:
- version "0.14.54"
- resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.54.tgz#3f9a0f6d41073fb1a640680845c7de52995f137e"
- integrity sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==
-
-esbuild-linux-riscv64@0.14.54:
- version "0.14.54"
- resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.54.tgz#618853c028178a61837bc799d2013d4695e451c8"
- integrity sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==
-
-esbuild-linux-s390x@0.14.54:
- version "0.14.54"
- resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.54.tgz#d1885c4c5a76bbb5a0fe182e2c8c60eb9e29f2a6"
- integrity sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==
-
-esbuild-netbsd-64@0.14.54:
- version "0.14.54"
- resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.54.tgz#69ae917a2ff241b7df1dbf22baf04bd330349e81"
- integrity sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==
-
-esbuild-openbsd-64@0.14.54:
- version "0.14.54"
- resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.54.tgz#db4c8495287a350a6790de22edea247a57c5d47b"
- integrity sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==
-
-esbuild-sunos-64@0.14.54:
- version "0.14.54"
- resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.54.tgz#54287ee3da73d3844b721c21bc80c1dc7e1bf7da"
- integrity sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==
-
-esbuild-windows-32@0.14.54:
- version "0.14.54"
- resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.54.tgz#f8aaf9a5667630b40f0fb3aa37bf01bbd340ce31"
- integrity sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==
-
-esbuild-windows-64@0.14.54:
- version "0.14.54"
- resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.54.tgz#bf54b51bd3e9b0f1886ffdb224a4176031ea0af4"
- integrity sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==
-
-esbuild-windows-arm64@0.14.54:
- version "0.14.54"
- resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.54.tgz#937d15675a15e4b0e4fafdbaa3a01a776a2be982"
- integrity sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==
-
-esbuild@^0.14.27:
- version "0.14.54"
- resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.14.54.tgz"
- integrity sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==
- optionalDependencies:
- "@esbuild/linux-loong64" "0.14.54"
- esbuild-android-64 "0.14.54"
- esbuild-android-arm64 "0.14.54"
- esbuild-darwin-64 "0.14.54"
- esbuild-darwin-arm64 "0.14.54"
- esbuild-freebsd-64 "0.14.54"
- esbuild-freebsd-arm64 "0.14.54"
- esbuild-linux-32 "0.14.54"
- esbuild-linux-64 "0.14.54"
- esbuild-linux-arm "0.14.54"
- esbuild-linux-arm64 "0.14.54"
- esbuild-linux-mips64le "0.14.54"
- esbuild-linux-ppc64le "0.14.54"
- esbuild-linux-riscv64 "0.14.54"
- esbuild-linux-s390x "0.14.54"
- esbuild-netbsd-64 "0.14.54"
- esbuild-openbsd-64 "0.14.54"
- esbuild-sunos-64 "0.14.54"
- esbuild-windows-32 "0.14.54"
- esbuild-windows-64 "0.14.54"
- esbuild-windows-arm64 "0.14.54"
-
-escalade@^3.1.1:
- version "3.1.1"
- resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz"
- integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==
-
-escape-string-regexp@^1.0.5:
- version "1.0.5"
- resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz"
- integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==
-
-estree-walker@^2.0.1:
- version "2.0.2"
- resolved "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz"
- integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==
-
-fsevents@~2.3.2:
- version "2.3.2"
- resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz"
- integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
-
-function-bind@^1.1.1:
- version "1.1.1"
- resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"
- integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
-
-gensync@^1.0.0-beta.2:
- version "1.0.0-beta.2"
- resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz"
- integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==
-
-globals@^11.1.0:
- version "11.12.0"
- resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz"
- integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
-
-has-flag@^3.0.0:
- version "3.0.0"
- resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz"
- integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==
-
-has@^1.0.3:
- version "1.0.3"
- resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz"
- integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==
- dependencies:
- function-bind "^1.1.1"
-
-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"
- integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==
- dependencies:
- has "^1.0.3"
-
-js-tokens@^4.0.0:
- version "4.0.0"
- resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz"
- integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
-
-jsesc@^2.5.1:
- version "2.5.2"
- resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz"
- integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==
-
-json5@^2.2.2:
- version "2.2.3"
- resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz"
- integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==
-
-lru-cache@^5.1.1:
- version "5.1.1"
- resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz"
- integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==
- dependencies:
- yallist "^3.0.2"
-
-ms@2.1.2:
- version "2.1.2"
- resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz"
- integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
-
-nanoid@^3.3.6:
- version "3.3.6"
- resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz"
- integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==
-
-node-releases@^2.0.8:
- version "2.0.10"
- resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz"
- integrity sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==
-
-object-assign@^4.1.1:
- version "4.1.1"
- resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz"
- integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==
-
-path-parse@^1.0.7:
- version "1.0.7"
- resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz"
- integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
-
-performance-now@^2.1.0:
- version "2.1.0"
- resolved "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz"
- integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==
-
-picocolors@^1.0.0:
- version "1.0.0"
- resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz"
- integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
-
-picomatch@^2.2.2:
- version "2.3.1"
- resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz"
- integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
-
-postcss@^8.4.13:
- version "8.4.24"
- resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz"
- integrity sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==
- dependencies:
- nanoid "^3.3.6"
- picocolors "^1.0.0"
- source-map-js "^1.0.2"
-
-promise@^8.1.0:
- version "8.3.0"
- resolved "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz"
- integrity sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==
- dependencies:
- asap "~2.0.6"
-
-raf@^3.4.1:
- version "3.4.1"
- resolved "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz"
- integrity sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==
- dependencies:
- performance-now "^2.1.0"
-
-react-app-polyfill@^3.0.0:
- version "3.0.0"
- resolved "https://registry.npmjs.org/react-app-polyfill/-/react-app-polyfill-3.0.0.tgz"
- integrity sha512-sZ41cxiU5llIB003yxxQBYrARBqe0repqPTTYBTmMqTz9szeBbE37BehCE891NZsmdZqqP+xWKdT3eo3vOzN8w==
- dependencies:
- core-js "^3.19.2"
- object-assign "^4.1.1"
- promise "^8.1.0"
- raf "^3.4.1"
- regenerator-runtime "^0.13.9"
- whatwg-fetch "^3.6.2"
-
-react-refresh@^0.13.0:
- version "0.13.0"
- resolved "https://registry.npmjs.org/react-refresh/-/react-refresh-0.13.0.tgz"
- integrity sha512-XP8A9BT0CpRBD+NYLLeIhld/RqG9+gktUjW1FkE+Vm7OCinbG1SshcK5tb9ls4kzvjZr9mOQc7HYgBngEyPAXg==
-
-regenerator-runtime@^0.13.9:
- version "0.13.11"
- resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz"
- integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==
-
-resolve@^1.22.0:
- version "1.22.1"
- resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz"
- 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"
-
-"rollup@>=2.59.0 <2.78.0":
- version "2.77.3"
- resolved "https://registry.npmjs.org/rollup/-/rollup-2.77.3.tgz"
- integrity sha512-/qxNTG7FbmefJWoeeYJFbHehJ2HNWnjkAFRKzWN/45eNBBF/r8lo992CwcJXEzyVxs5FmfId+vTSTQDb+bxA+g==
- optionalDependencies:
- fsevents "~2.3.2"
-
-semver@^6.3.0:
- version "6.3.0"
- resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz"
- integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
-
-source-map-js@^1.0.2:
- version "1.0.2"
- resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz"
- integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
-
-supports-color@^5.3.0:
- version "5.5.0"
- resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz"
- integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
- dependencies:
- has-flag "^3.0.0"
-
-supports-preserve-symlinks-flag@^1.0.0:
- version "1.0.0"
- resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz"
- integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==
-
-to-fast-properties@^2.0.0:
- version "2.0.0"
- resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz"
- integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==
-
-typescript@4.9.5:
- version "4.9.5"
- resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz"
- integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
-
-update-browserslist-db@^1.0.10:
- version "1.0.10"
- resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz"
- integrity sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==
- dependencies:
- escalade "^3.1.1"
- picocolors "^1.0.0"
-
-vite-preset-react@latest:
- version "2.3.0"
- resolved "https://registry.npmjs.org/vite-preset-react/-/vite-preset-react-2.3.0.tgz"
- integrity sha512-so8NjBurFEkG1okeB1kuZALhUs5LBRPDqlcf+7Fw/E2Pkz7O3fL7aQKHY0xU0i4wBIW72Yox/d0M0MREzcfuhQ==
- dependencies:
- "@vitejs/plugin-react" "^1.3.2"
-
-vite@latest:
- version "2.9.16"
- resolved "https://registry.npmjs.org/vite/-/vite-2.9.16.tgz"
- integrity sha512-X+6q8KPyeuBvTQV8AVSnKDvXoBMnTx8zxh54sOwmmuOdxkjMmEJXH2UEchA+vTMps1xw9vL64uwJOWryULg7nA==
- dependencies:
- esbuild "^0.14.27"
- postcss "^8.4.13"
- resolve "^1.22.0"
- rollup ">=2.59.0 <2.78.0"
- optionalDependencies:
- fsevents "~2.3.2"
-
-whatwg-fetch@^3.6.2:
- version "3.6.2"
- resolved "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz"
- integrity sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==
-
-yallist@^3.0.2:
- version "3.1.1"
- resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz"
- integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==
diff --git a/index.d.ts b/index.d.ts
deleted file mode 100644
index e4ddc90..0000000
--- a/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './dist/index';
diff --git a/package.json b/package.json
index 3d2898a..1f01426 100644
--- a/package.json
+++ b/package.json
@@ -1,52 +1,23 @@
{
- "name": "use-file-picker",
+ "name": "@use-file-picker/base",
+ "private": true,
"description": "Simple react hook to open browser file selector.",
- "version": "2.1.3",
+ "version": "0.0.1",
"license": "MIT",
- "author": "Milosz Jankiewicz",
+ "author": "MiĆosz Jankiewicz, Kamil Planer",
"homepage": "https://github.com/Jaaneek/useFilePicker",
"repository": {
"url": "https://github.com/Jaaneek/useFilePicker",
"type": "git"
},
"type": "module",
- "exports": {
- ".": {
- "types": "./dist/index.d.ts",
- "import": "./dist/index.esm.js",
- "require": "./dist/index.js"
- },
- "./validators": {
- "types": "./validators.d.ts",
- "import": "./dist/validators.esm.js",
- "require": "./dist/validators.js"
- },
- "./types": "./types.d.ts"
- },
- "types": "./dist/index.d.ts",
- "files": [
- "./dist",
- "./src",
- "./index.d.ts",
- "./validators.d.ts",
- "./types.d.ts"
- ],
"scripts": {
- "analyze": "size-limit --why",
- "build": "dts build -i ./src/index.ts -o ./dist/index.js -i ./src/validators.ts -o ./dist/validators.js -f esm,cjs",
- "build-storybook": "build-storybook",
- "lint": "dts lint",
- "lint:fix": "dts lint --fix",
- "prepare": "yarn build",
- "size": "size-limit",
- "start": "dts watch",
- "storybook": "start-storybook -p 6006",
- "test": "dts test --passWithNoTests"
- },
- "husky": {
- "hooks": {
- "pre-commit": "dts lint"
- }
+ "dev": "turbo dev",
+ "build": "turbo build",
+ "test": "turbo test",
+ "lint": "eslint .",
+ "lint:fix": "eslint . --fix",
+ "type-check": "turbo type-check"
},
"prettier": {
"printWidth": 120,
@@ -56,68 +27,19 @@
"arrowParens": "avoid",
"endOfLine": "lf"
},
- "jest": {
- "testEnvironment": "jsdom",
- "transform": {
- "^.+\\.tsx?$": "ts-jest"
- }
- },
- "peerDependencies": {
- "react": ">=16"
- },
+ "packageManager": "pnpm@10.11.0",
"engines": {
"node": ">=12"
},
- "size-limit": [
- {
- "path": "dist/use-file-picker.cjs.production.min.js",
- "limit": "10 KB"
- },
- {
- "path": "dist/use-file-picker.esm.js",
- "limit": "10 KB"
- }
- ],
- "keywords": [
- "file",
- "fileselector",
- "file-selector",
- "file-picker",
- "filepicker",
- "file-input",
- "react-file",
- "react-file-picker",
- "react-file-selector"
- ],
- "dependencies": {
- "file-selector": "0.2.4"
- },
"devDependencies": {
- "@size-limit/preset-small-lib": "^4.9.1",
- "@storybook/addon-essentials": "6.5.16",
- "@storybook/addon-info": "^5.3.21",
- "@storybook/addon-links": "6.5.16",
- "@storybook/addons": "6.5.16",
- "@storybook/react": "6.5.16",
- "@testing-library/jest-dom": "^5.16.5",
- "@testing-library/react": "14.0.0",
- "@testing-library/user-event": "^14.4.3",
- "@types/react": "^18.0.33",
- "@types/react-dom": "^18.0.11",
- "babel-loader": "^8.2.2",
- "dts-cli": "^2.0.3",
- "eslint": "^8.37.0",
- "eslint-plugin-prettier": "^4.2.1",
- "husky": "^4.3.6",
- "jest": "^29.5.0",
- "prettier": "2.8.8",
- "react": "^18.2.0",
- "react-dom": "^18.2.0",
- "react-is": "^17.0.1",
- "size-limit": "^4.9.1",
- "ts-jest": "^29.0.5",
- "ts-xor": "1.1.0",
- "tslib": "2.5.0",
- "typescript": "^5.1.3"
+ "@eslint/js": "^9.27.0",
+ "eslint": "^9.27.0",
+ "eslint-plugin-react": "^7.37.5",
+ "globals": "^16.2.0",
+ "pkgroll": "^2.12.2",
+ "prettier": "^3.5.3",
+ "turbo": "^2.5.3",
+ "typescript": "^5.8.3",
+ "typescript-eslint": "^8.32.1"
}
}
diff --git a/packages/example/.gitignore b/packages/example/.gitignore
new file mode 100644
index 0000000..a547bf3
--- /dev/null
+++ b/packages/example/.gitignore
@@ -0,0 +1,24 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+lerna-debug.log*
+
+node_modules
+dist
+dist-ssr
+*.local
+
+# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
+.idea
+.DS_Store
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
diff --git a/packages/example/README.md b/packages/example/README.md
new file mode 100644
index 0000000..da98444
--- /dev/null
+++ b/packages/example/README.md
@@ -0,0 +1,54 @@
+# React + TypeScript + Vite
+
+This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
+
+Currently, two official plugins are available:
+
+- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
+- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
+
+## Expanding the ESLint configuration
+
+If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
+
+```js
+export default tseslint.config({
+ extends: [
+ // Remove ...tseslint.configs.recommended and replace with this
+ ...tseslint.configs.recommendedTypeChecked,
+ // Alternatively, use this for stricter rules
+ ...tseslint.configs.strictTypeChecked,
+ // Optionally, add this for stylistic rules
+ ...tseslint.configs.stylisticTypeChecked,
+ ],
+ languageOptions: {
+ // other options...
+ parserOptions: {
+ project: ['./tsconfig.node.json', './tsconfig.app.json'],
+ tsconfigRootDir: import.meta.dirname,
+ },
+ },
+})
+```
+
+You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
+
+```js
+// eslint.config.js
+import reactX from 'eslint-plugin-react-x'
+import reactDom from 'eslint-plugin-react-dom'
+
+export default tseslint.config({
+ plugins: {
+ // Add the react-x and react-dom plugins
+ 'react-x': reactX,
+ 'react-dom': reactDom,
+ },
+ rules: {
+ // other rules...
+ // Enable its recommended typescript rules
+ ...reactX.configs['recommended-typescript'].rules,
+ ...reactDom.configs.recommended.rules,
+ },
+})
+```
diff --git a/packages/example/eslint.config.js b/packages/example/eslint.config.js
new file mode 100644
index 0000000..092408a
--- /dev/null
+++ b/packages/example/eslint.config.js
@@ -0,0 +1,28 @@
+import js from '@eslint/js'
+import globals from 'globals'
+import reactHooks from 'eslint-plugin-react-hooks'
+import reactRefresh from 'eslint-plugin-react-refresh'
+import tseslint from 'typescript-eslint'
+
+export default tseslint.config(
+ { ignores: ['dist'] },
+ {
+ extends: [js.configs.recommended, ...tseslint.configs.recommended],
+ files: ['**/*.{ts,tsx}'],
+ languageOptions: {
+ ecmaVersion: 2020,
+ globals: globals.browser,
+ },
+ plugins: {
+ 'react-hooks': reactHooks,
+ 'react-refresh': reactRefresh,
+ },
+ rules: {
+ ...reactHooks.configs.recommended.rules,
+ 'react-refresh/only-export-components': [
+ 'warn',
+ { allowConstantExport: true },
+ ],
+ },
+ },
+)
diff --git a/packages/example/index.html b/packages/example/index.html
new file mode 100644
index 0000000..bc90dcc
--- /dev/null
+++ b/packages/example/index.html
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+ Use file picker example
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/example/package.json b/packages/example/package.json
new file mode 100644
index 0000000..3d0a823
--- /dev/null
+++ b/packages/example/package.json
@@ -0,0 +1,29 @@
+{
+ "name": "example",
+ "private": true,
+ "version": "0.0.0",
+ "type": "module",
+ "scripts": {
+ "dev": "vite --host",
+ "lint": "eslint .",
+ "preview": "vite preview"
+ },
+ "dependencies": {
+ "react": "^19.1.0",
+ "react-dom": "^19.1.0",
+ "use-file-picker": "workspace:*"
+ },
+ "devDependencies": {
+ "@eslint/js": "^9.25.0",
+ "@types/react": "^19.1.2",
+ "@types/react-dom": "^19.1.2",
+ "@vitejs/plugin-react-swc": "^3.9.0",
+ "eslint": "^9.25.0",
+ "eslint-plugin-react-hooks": "^5.2.0",
+ "eslint-plugin-react-refresh": "^0.4.19",
+ "globals": "^16.0.0",
+ "typescript": "~5.8.3",
+ "typescript-eslint": "^8.30.1",
+ "vite": "^6.3.5"
+ }
+}
diff --git a/packages/example/src/App.tsx b/packages/example/src/App.tsx
new file mode 100644
index 0000000..ebba96c
--- /dev/null
+++ b/packages/example/src/App.tsx
@@ -0,0 +1,15 @@
+import { UseFilePicker } from './UseFilePicker';
+import UseImperativeFilePicker from './UseImperativeFilePicker';
+
+function App() {
+ return (
+ <>
+ useFilePicker
+
+ useImperativeFilePicker
+
+ >
+ );
+}
+
+export default App;
diff --git a/example/index.tsx b/packages/example/src/UseFilePicker.tsx
similarity index 70%
rename from example/index.tsx
rename to packages/example/src/UseFilePicker.tsx
index b9d2214..990031e 100644
--- a/example/index.tsx
+++ b/packages/example/src/UseFilePicker.tsx
@@ -1,12 +1,11 @@
-import 'react-app-polyfill/ie11';
-import * as React from 'react';
-import * as ReactDOM from 'react-dom';
-import { useFilePicker } from '../src';
-import { Validator, ImageDimensionsValidator, FileAmountLimitValidator } from '../src/validators';
-import { UseFilePickerConfig } from '../src/types';
-import Imperative from './imperative';
-import { FileWithPath } from 'file-selector';
+/* eslint-disable @typescript-eslint/no-unused-vars */
+import { useFilePicker } from 'use-file-picker';
+import { Validator, ImageDimensionsValidator, FileAmountLimitValidator } from 'use-file-picker/validators';
+import { type UseFilePickerConfig, type FileWithPath } from 'use-file-picker';
+import { useState } from 'react';
+// eslint-disable-next-line @typescript-eslint/ban-ts-comment
+// @ts-ignore
class CustomValidator extends Validator {
/**
* Validation takes place before parsing. You have access to config passed as argument to useFilePicker hook
@@ -14,7 +13,7 @@ class CustomValidator extends Validator {
* Example validator below allowes only even amount of files
* @returns {Promise} resolve means that file passed validation, reject means that file did not pass
*/
- async validateBeforeParsing(config: UseFilePickerConfig, plainFiles: File[]): Promise {
+ async validateBeforeParsing(_config: UseFilePickerConfig, plainFiles: File[]): Promise {
return new Promise((res, rej) => (plainFiles.length % 2 === 0 ? res(undefined) : rej({ oddNumberOfFiles: true })));
}
/**
@@ -24,7 +23,7 @@ class CustomValidator extends Validator {
* Example validator below allowes only if file hasn't been modified in last 24 hours
* @returns {Promise} resolve means that file passed validation, reject means that file did not pass
*/
- async validateAfterParsing(config: UseFilePickerConfig, file: FileWithPath, reader: FileReader): Promise {
+ async validateAfterParsing(_config: UseFilePickerConfig, file: FileWithPath, _reader: FileReader): Promise {
return new Promise((res, rej) =>
file.lastModified < new Date().getTime() - 24 * 60 * 60 * 1000
? res(undefined)
@@ -33,11 +32,18 @@ class CustomValidator extends Validator {
}
}
-const App = () => {
+export const UseFilePicker = () => {
+ const [selectionMode, setSelectionMode] = useState<'file' | 'dir'>('file');
const { openFilePicker, filesContent, loading, errors, plainFiles, clear } = useFilePicker({
multiple: true,
- readAs: 'DataURL', // availible formats: "Text" | "BinaryString" | "ArrayBuffer" | "DataURL"
- accept: ['.png', '.jpeg', '.heic'],
+ readAs: 'Text', // availible formats: "Text" | "BinaryString" | "ArrayBuffer" | "DataURL"
+ initializeWithCustomParameters(inputElement) {
+ inputElement.webkitdirectory = selectionMode === 'dir';
+ inputElement.addEventListener('cancel', () => {
+ alert('cancel');
+ });
+ },
+ // accept: ['.png', '.jpeg', '.heic'],
// readFilesContent: false, // ignores file content,
validators: [
new FileAmountLimitValidator({ min: 1, max: 3 }),
@@ -64,6 +70,9 @@ const App = () => {
return (
+
@@ -86,22 +95,12 @@ const App = () => {
) : null}
{/* If readAs is set to DataURL, You can display an image */}
- {!!filesContent.length ?
: null}
- {!!filesContent.length ? {filesContent[0].content}
: null}
+ {filesContent.length ?
: null}
+ {filesContent.length ? {filesContent[0].content}
: null}
{plainFiles.map(file => (
- {file.name}
+ {file.name}
))}
);
};
-
-ReactDOM.render(
- <>
- useFilePicker
-
- useImperativeFilePicker
-
- >,
- document.getElementById('root')
-);
diff --git a/example/imperative.tsx b/packages/example/src/UseImperativeFilePicker.tsx
similarity index 79%
rename from example/imperative.tsx
rename to packages/example/src/UseImperativeFilePicker.tsx
index ddf48ac..92d8475 100644
--- a/example/imperative.tsx
+++ b/packages/example/src/UseImperativeFilePicker.tsx
@@ -1,18 +1,20 @@
-import 'react-app-polyfill/ie11';
-import * as React from 'react';
-import { useImperativeFilePicker } from '../src';
-import { PersistentFileAmountLimitValidator } from '../src/validators';
+import React, { useState } from 'react';
+import { useImperativeFilePicker } from 'use-file-picker';
+import { PersistentFileAmountLimitValidator } from 'use-file-picker/validators';
-const Imperative = () => {
+export const UseImperativeFilePicker = () => {
// for imperative file picker, if you want to limit amount of files selected by user, you need to pass persistent validator
const validators = React.useMemo(() => [new PersistentFileAmountLimitValidator({ min: 2, max: 3 })], []);
-
+ const [selectionMode, setSelectionMode] = useState<'file' | 'dir'>('file');
const { openFilePicker, filesContent, loading, errors, plainFiles, clear, removeFileByIndex, removeFileByReference } =
useImperativeFilePicker({
multiple: true,
- readAs: 'Text',
+ readAs: 'DataURL',
readFilesContent: true,
validators,
+ initializeWithCustomParameters(inputElement) {
+ inputElement.webkitdirectory = selectionMode === 'dir';
+ },
onFilesSelected: ({ plainFiles, filesContent, errors }) => {
// this callback is always called, even if there are errors
console.log('onFilesSelected', plainFiles, filesContent, errors);
@@ -37,6 +39,9 @@ const Imperative = () => {
return (
+
@@ -63,7 +68,7 @@ const Imperative = () => {
)}
{plainFiles.map((file, i) => (
-
+
{file.name}