From db264aed9e8c67d0eb0d19eaa72e828654d298ec Mon Sep 17 00:00:00 2001 From: thomasvo Date: Fri, 2 Jan 2026 10:43:11 -0800 Subject: [PATCH 01/20] ci: automatic changelog generation --- .github/release.yml | 23 + CONTRIBUTING.md | 13 + README.md | 4 + package.json | 9 +- yarn.lock | 1057 ++----------------------------------------- 5 files changed, 77 insertions(+), 1029 deletions(-) create mode 100644 .github/release.yml diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 00000000..2493a1b4 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,23 @@ +changelog: + exclude: + labels: + - ignore-for-release + - dependencies + authors: + - dependabot + categories: + - title: Breaking Changes ๐Ÿ›  + labels: + - breaking + - title: New Features ๐ŸŽ‰ + labels: + - enhancement + - title: Bug Fixes ๐Ÿ› + labels: + - bug + - title: Documentation ๐Ÿ“š + labels: + - documentation + - title: Other Changes + labels: + - "*" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9c29109c..1295017f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -88,6 +88,19 @@ To publish new versions, run the following: yarn release ``` +### Changelog and Release Notes + +Release notes are automatically generated from merged pull requests. Please label your PRs with: + +- `breaking`: Breaking changes (major version bump) +- `enhancement`: New features (minor version bump) +- `bug`: Bug fixes (patch version bump) +- `documentation`: Documentation updates + +PRs labeled with `dependencies` are excluded from release notes. + +Release notes are organized by category based on labels (see `.github/release.yml`). + ### Scripts The `package.json` file contains various scripts for common tasks: diff --git a/README.md b/README.md index 5ac8ac22..26a2051b 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,10 @@ Check out this [Expo Snack](https://snack.expo.dev/@thomasttvo/eaf257) ![](https://thumbs.gfycat.com/NaughtyBlackandwhiteBudgie-size_restricted.gif) +## Changelog + +See [GitHub Releases](https://github.com/openspacelabs/react-native-zoomable-view/releases) for version history and release notes. + ## Getting started - [Installation](#installation) diff --git a/package.json b/package.json index 3a16d853..cb0f7c38 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,6 @@ "devDependencies": { "@commitlint/config-conventional": "^11.0.0", "@react-native/eslint-config": "^0.73.0", - "@release-it/conventional-changelog": "^2.0.0", "@types/lodash": "^4.17.7", "@types/react": "^16.9.19", "@types/react-native": "^0.65.4", @@ -115,12 +114,8 @@ "publish": true }, "github": { - "release": true - }, - "plugins": { - "@release-it/conventional-changelog": { - "preset": "angular" - } + "release": true, + "autoGenerate": true } }, "eslintConfig": { diff --git a/yarn.lock b/yarn.lock index b01883f3..36346fca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -49,7 +49,7 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.28.5.tgz#a8a4962e1567121ac0b3b487f52107443b455c7f" integrity sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA== -"@babel/core@^7.11.6", "@babel/core@^7.23.9", "@babel/core@^7.25.2": +"@babel/core@^7.11.6", "@babel/core@^7.25.2": version "7.28.5" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.28.5.tgz#4c81b35e51e1b734f510c99b07dfbc7bbbb48f7e" integrity sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw== @@ -130,7 +130,7 @@ jsesc "^2.5.1" source-map "^0.5.0" -"@babel/generator@^7.20.0", "@babel/generator@^7.28.5", "@babel/generator@^7.7.2": +"@babel/generator@^7.20.0", "@babel/generator@^7.28.5": version "7.28.5" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.28.5.tgz#712722d5e50f44d07bc7ac9fe84438742dd61298" integrity sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ== @@ -502,7 +502,7 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.8.tgz#7bacdcbe71bdc3ff936d510c15dcea7cf0b99016" integrity sha512-BRYa3wcQnjS/nqI8Ac94pYYpJfojHVvVXJ97+IDCImX4Jc8W8Xv1+47enbruk+q1etOpsQNwnfFcNGw+gtPGxA== -"@babel/parser@^7.20.0", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.3", "@babel/parser@^7.27.2", "@babel/parser@^7.28.5": +"@babel/parser@^7.20.0", "@babel/parser@^7.20.7", "@babel/parser@^7.25.3", "@babel/parser@^7.27.2", "@babel/parser@^7.28.5": version "7.28.5" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.28.5.tgz#0b0225ee90362f030efd644e8034c99468893b08" integrity sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ== @@ -616,7 +616,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-jsx@^7.27.1", "@babel/plugin-syntax-jsx@^7.7.2": +"@babel/plugin-syntax-jsx@^7.27.1": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz#2f9beb5eff30fa507c5532d107daac7b888fa34c" integrity sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w== @@ -672,7 +672,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-syntax-typescript@^7.27.1", "@babel/plugin-syntax-typescript@^7.7.2": +"@babel/plugin-syntax-typescript@^7.27.1": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz#5147d29066a793450f220c63fa3a9431b7e6dd18" integrity sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ== @@ -1378,11 +1378,6 @@ "@babel/helper-validator-identifier" "^7.24.7" to-fast-properties "^2.0.0" -"@bcoe/v8-coverage@^0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" - integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== - "@commitlint/cli@^11.0.0": version "11.0.0" resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-11.0.0.tgz#698199bc52afed50aa28169237758fa14a67b5d3" @@ -1570,11 +1565,6 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== -"@hutson/parse-repository-url@^3.0.0": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz#98c23c950a3d9b6c8f0daed06da6c3af06981340" - integrity sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q== - "@iarna/toml@2.2.5": version "2.2.5" resolved "https://registry.yarnpkg.com/@iarna/toml/-/toml-2.2.5.tgz#b32366c89b43c6f8cefbdefac778b9c828e3ba8c" @@ -1596,57 +1586,11 @@ js-yaml "^3.13.1" resolve-from "^5.0.0" -"@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3": +"@istanbuljs/schema@^0.1.2": version "0.1.3" resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== -"@jest/console@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.7.0.tgz#cd4822dbdb84529265c5a2bdb529a3c9cc950ffc" - integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg== - dependencies: - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - slash "^3.0.0" - -"@jest/core@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.7.0.tgz#b6cccc239f30ff36609658c5a5e2291757ce448f" - integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg== - dependencies: - "@jest/console" "^29.7.0" - "@jest/reporters" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - ci-info "^3.2.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - jest-changed-files "^29.7.0" - jest-config "^29.7.0" - jest-haste-map "^29.7.0" - jest-message-util "^29.7.0" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-resolve-dependencies "^29.7.0" - jest-runner "^29.7.0" - jest-runtime "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" - jest-watcher "^29.7.0" - micromatch "^4.0.4" - pretty-format "^29.7.0" - slash "^3.0.0" - strip-ansi "^6.0.0" - "@jest/create-cache-key-function@^29.7.0": version "29.7.0" resolved "https://registry.yarnpkg.com/@jest/create-cache-key-function/-/create-cache-key-function-29.7.0.tgz#793be38148fab78e65f40ae30c36785f4ad859f0" @@ -1664,21 +1608,6 @@ "@types/node" "*" jest-mock "^29.7.0" -"@jest/expect-utils@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6" - integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA== - dependencies: - jest-get-type "^29.6.3" - -"@jest/expect@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.7.0.tgz#76a3edb0cb753b70dfbfe23283510d3d45432bf2" - integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ== - dependencies: - expect "^29.7.0" - jest-snapshot "^29.7.0" - "@jest/fake-timers@^29.7.0": version "29.7.0" resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565" @@ -1691,46 +1620,6 @@ jest-mock "^29.7.0" jest-util "^29.7.0" -"@jest/globals@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d" - integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/expect" "^29.7.0" - "@jest/types" "^29.6.3" - jest-mock "^29.7.0" - -"@jest/reporters@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7" - integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg== - dependencies: - "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@jridgewell/trace-mapping" "^0.3.18" - "@types/node" "*" - chalk "^4.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^6.0.0" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.1.3" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - jest-worker "^29.7.0" - slash "^3.0.0" - string-length "^4.0.1" - strip-ansi "^6.0.0" - v8-to-istanbul "^9.0.1" - "@jest/schemas@^29.6.3": version "29.6.3" resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" @@ -1738,35 +1627,6 @@ dependencies: "@sinclair/typebox" "^0.27.8" -"@jest/source-map@^29.6.3": - version "29.6.3" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.6.3.tgz#d90ba772095cf37a34a5eb9413f1b562a08554c4" - integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw== - dependencies: - "@jridgewell/trace-mapping" "^0.3.18" - callsites "^3.0.0" - graceful-fs "^4.2.9" - -"@jest/test-result@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.7.0.tgz#8db9a80aa1a097bb2262572686734baed9b1657c" - integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA== - dependencies: - "@jest/console" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/istanbul-lib-coverage" "^2.0.0" - collect-v8-coverage "^1.0.0" - -"@jest/test-sequencer@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz#6cef977ce1d39834a3aea887a1726628a6f072ce" - integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw== - dependencies: - "@jest/test-result" "^29.7.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - slash "^3.0.0" - "@jest/transform@^29.7.0": version "29.7.0" resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.7.0.tgz#df2dd9c346c7d7768b8a06639994640c642e284c" @@ -1858,7 +1718,7 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz#6912b00d2c631c0d15ce1a7ab57cd657f2a8f8ba" integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og== -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.28": +"@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.28": version "0.3.31" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz#db15d6781c931f3a251a3dac39501c98a6082fd0" integrity sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw== @@ -2104,16 +1964,6 @@ invariant "^2.2.4" nullthrows "^1.1.1" -"@release-it/conventional-changelog@^2.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@release-it/conventional-changelog/-/conventional-changelog-2.0.1.tgz#bdd52ad3ecc0d6e39d637592d6ea2bd6d28e5ecb" - integrity sha512-q67D3Jod935kZt6wThsDeOmhY+RWYPMY7nYyl0YxiXK8vVZzD+9z957fXGz+8Uk3iugmgDaucht7VxTaZlu6nA== - dependencies: - concat-stream "^2.0.0" - conventional-changelog "^3.1.24" - conventional-recommended-bump "^6.1.0" - prepend-file "^2.0.0" - "@sinclair/typebox@^0.27.8": version "0.27.8" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" @@ -2217,11 +2067,6 @@ resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz#4ba8ddb720221f432e443bd5f9117fd22cfd4762" integrity sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw== -"@types/istanbul-lib-coverage@^2.0.1": - version "2.0.6" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7" - integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w== - "@types/istanbul-lib-report@*": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686" @@ -2236,14 +2081,6 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@29": - version "29.5.14" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.14.tgz#2b910912fa1d6856cadcd0c1f95af7df1d6049e5" - integrity sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ== - dependencies: - expect "^29.0.0" - pretty-format "^29.0.0" - "@types/json-schema@^7.0.9": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" @@ -2553,11 +2390,6 @@ acorn@^8.9.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== -add-stream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" - integrity sha1-anmQQ3ynNtXhKI25K9MmbV9csqo= - agent-base@^7.1.2: version "7.1.4" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.4.tgz#e3cd76d4c548ee895d3c3fd8dc1f6c5b9032e7a8" @@ -3123,11 +2955,6 @@ chalk@^2.0.0, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -char-regex@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" - integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== - chardet@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" @@ -3170,11 +2997,6 @@ ci-info@^3.2.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.1.tgz#58331f6f472a25fe3a50a351ae3052936c2c7f32" integrity sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg== -cjs-module-lexer@^1.0.0: - version "1.4.3" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz#0f79731eb8cfe1ec72acd4066efac9d61991b00d" - integrity sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q== - clean-stack@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" @@ -3211,15 +3033,6 @@ cliui@^6.0.0: strip-ansi "^6.0.0" wrap-ansi "^6.2.0" -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - cliui@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" @@ -3241,16 +3054,6 @@ clone@^1.0.2: resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== - -collect-v8-coverage@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz#cc1f01eb8d02298cbc9a437c74c70ab4e5210b80" - integrity sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw== - color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -3317,16 +3120,6 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-2.0.0.tgz#414cf5af790a48c60ab9be4527d56d5e41133cb1" - integrity sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.0.2" - typedarray "^0.0.6" - configstore@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/configstore/-/configstore-5.0.1.tgz#d365021b5df4b98cdd187d6a3b0e3f6a7cc5ed96" @@ -3349,7 +3142,7 @@ connect@^3.6.5: parseurl "~1.3.3" utils-merge "1.0.1" -conventional-changelog-angular@^5.0.0, conventional-changelog-angular@^5.0.12: +conventional-changelog-angular@^5.0.0: version "5.0.13" resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz#896885d63b914a70d4934b59d2fe7bde1832b28c" integrity sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA== @@ -3357,21 +3150,7 @@ conventional-changelog-angular@^5.0.0, conventional-changelog-angular@^5.0.12: compare-func "^2.0.0" q "^1.5.1" -conventional-changelog-atom@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-2.0.8.tgz#a759ec61c22d1c1196925fca88fe3ae89fd7d8de" - integrity sha512-xo6v46icsFTK3bb7dY/8m2qvc8sZemRgdqLb/bjpBsH2UyOS8rKNTgcb5025Hri6IpANPApbXMg15QLb1LJpBw== - dependencies: - q "^1.5.1" - -conventional-changelog-codemirror@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-2.0.8.tgz#398e9530f08ce34ec4640af98eeaf3022eb1f7dc" - integrity sha512-z5DAsn3uj1Vfp7po3gpt2Boc+Bdwmw2++ZHa5Ak9k0UKsYAO5mH1UBTN0qSCuJZREIhX6WU4E1p3IW2oRCNzQw== - dependencies: - q "^1.5.1" - -conventional-changelog-conventionalcommits@^4.3.1, conventional-changelog-conventionalcommits@^4.5.0: +conventional-changelog-conventionalcommits@^4.3.1: version "4.6.1" resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.6.1.tgz#f4c0921937050674e578dc7875f908351ccf4014" integrity sha512-lzWJpPZhbM1R0PIzkwzGBCnAkH5RKJzJfFQZcl/D+2lsJxAwGnDKBqn/F4C1RD31GJNn8NuKWQzAZDAVXPp2Mw== @@ -3380,108 +3159,7 @@ conventional-changelog-conventionalcommits@^4.3.1, conventional-changelog-conven lodash "^4.17.15" q "^1.5.1" -conventional-changelog-core@^4.2.1: - version "4.2.4" - resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.2.4.tgz#e50d047e8ebacf63fac3dc67bf918177001e1e9f" - integrity sha512-gDVS+zVJHE2v4SLc6B0sLsPiloR0ygU7HaDW14aNJE1v4SlqJPILPl/aJC7YdtRE4CybBf8gDwObBvKha8Xlyg== - dependencies: - add-stream "^1.0.0" - conventional-changelog-writer "^5.0.0" - conventional-commits-parser "^3.2.0" - dateformat "^3.0.0" - get-pkg-repo "^4.0.0" - git-raw-commits "^2.0.8" - git-remote-origin-url "^2.0.0" - git-semver-tags "^4.1.1" - lodash "^4.17.15" - normalize-package-data "^3.0.0" - q "^1.5.1" - read-pkg "^3.0.0" - read-pkg-up "^3.0.0" - through2 "^4.0.0" - -conventional-changelog-ember@^2.0.9: - version "2.0.9" - resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-2.0.9.tgz#619b37ec708be9e74a220f4dcf79212ae1c92962" - integrity sha512-ulzIReoZEvZCBDhcNYfDIsLTHzYHc7awh+eI44ZtV5cx6LVxLlVtEmcO+2/kGIHGtw+qVabJYjdI5cJOQgXh1A== - dependencies: - q "^1.5.1" - -conventional-changelog-eslint@^3.0.9: - version "3.0.9" - resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.9.tgz#689bd0a470e02f7baafe21a495880deea18b7cdb" - integrity sha512-6NpUCMgU8qmWmyAMSZO5NrRd7rTgErjrm4VASam2u5jrZS0n38V7Y9CzTtLT2qwz5xEChDR4BduoWIr8TfwvXA== - dependencies: - q "^1.5.1" - -conventional-changelog-express@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-2.0.6.tgz#420c9d92a347b72a91544750bffa9387665a6ee8" - integrity sha512-SDez2f3iVJw6V563O3pRtNwXtQaSmEfTCaTBPCqn0oG0mfkq0rX4hHBq5P7De2MncoRixrALj3u3oQsNK+Q0pQ== - dependencies: - q "^1.5.1" - -conventional-changelog-jquery@^3.0.11: - version "3.0.11" - resolved "https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-3.0.11.tgz#d142207400f51c9e5bb588596598e24bba8994bf" - integrity sha512-x8AWz5/Td55F7+o/9LQ6cQIPwrCjfJQ5Zmfqi8thwUEKHstEn4kTIofXub7plf1xvFA2TqhZlq7fy5OmV6BOMw== - dependencies: - q "^1.5.1" - -conventional-changelog-jshint@^2.0.9: - version "2.0.9" - resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.9.tgz#f2d7f23e6acd4927a238555d92c09b50fe3852ff" - integrity sha512-wMLdaIzq6TNnMHMy31hql02OEQ8nCQfExw1SE0hYL5KvU+JCTuPaDO+7JiogGT2gJAxiUGATdtYYfh+nT+6riA== - dependencies: - compare-func "^2.0.0" - q "^1.5.1" - -conventional-changelog-preset-loader@^2.3.4: - version "2.3.4" - resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz#14a855abbffd59027fd602581f1f34d9862ea44c" - integrity sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g== - -conventional-changelog-writer@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-5.0.0.tgz#c4042f3f1542f2f41d7d2e0d6cad23aba8df8eec" - integrity sha512-HnDh9QHLNWfL6E1uHz6krZEQOgm8hN7z/m7tT16xwd802fwgMN0Wqd7AQYVkhpsjDUx/99oo+nGgvKF657XP5g== - dependencies: - conventional-commits-filter "^2.0.7" - dateformat "^3.0.0" - handlebars "^4.7.6" - json-stringify-safe "^5.0.1" - lodash "^4.17.15" - meow "^8.0.0" - semver "^6.0.0" - split "^1.0.0" - through2 "^4.0.0" - -conventional-changelog@^3.1.24: - version "3.1.24" - resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-3.1.24.tgz#ebd180b0fd1b2e1f0095c4b04fd088698348a464" - integrity sha512-ed6k8PO00UVvhExYohroVPXcOJ/K1N0/drJHx/faTH37OIZthlecuLIRX/T6uOp682CAoVoFpu+sSEaeuH6Asg== - dependencies: - conventional-changelog-angular "^5.0.12" - conventional-changelog-atom "^2.0.8" - conventional-changelog-codemirror "^2.0.8" - conventional-changelog-conventionalcommits "^4.5.0" - conventional-changelog-core "^4.2.1" - conventional-changelog-ember "^2.0.9" - conventional-changelog-eslint "^3.0.9" - conventional-changelog-express "^2.0.6" - conventional-changelog-jquery "^3.0.11" - conventional-changelog-jshint "^2.0.9" - conventional-changelog-preset-loader "^2.3.4" - -conventional-commits-filter@^2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz#f8d9b4f182fce00c9af7139da49365b136c8a0b3" - integrity sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA== - dependencies: - lodash.ismatch "^4.4.0" - modify-values "^1.0.0" - -conventional-commits-parser@^3.0.0, conventional-commits-parser@^3.2.0: +conventional-commits-parser@^3.0.0: version "3.2.2" resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.2.2.tgz#190fb9900c6e02be0c0bca9b03d57e24982639fd" integrity sha512-Jr9KAKgqAkwXMRHjxDwO/zOCDKod1XdAESHAGuJX38iZ7ZzVti/tvVoysO0suMsdAObp9NQ2rHSsSbnAqZ5f5g== @@ -3493,20 +3171,6 @@ conventional-commits-parser@^3.0.0, conventional-commits-parser@^3.2.0: split2 "^3.0.0" through2 "^4.0.0" -conventional-recommended-bump@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-6.1.0.tgz#cfa623285d1de554012f2ffde70d9c8a22231f55" - integrity sha512-uiApbSiNGM/kkdL9GTOLAqC4hbptObFo4wW2QRyHsKciGAfQuLU1ShZ1BIVI/+K2BE/W1AWYQMCXAsv4dyKPaw== - dependencies: - concat-stream "^2.0.0" - conventional-changelog-preset-loader "^2.3.4" - conventional-commits-filter "^2.0.7" - conventional-commits-parser "^3.2.0" - git-raw-commits "^2.0.8" - git-semver-tags "^4.1.1" - meow "^8.0.0" - q "^1.5.1" - convert-source-map@^1.7.0: version "1.8.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" @@ -3567,19 +3231,6 @@ cosmiconfig@^9.0.0: js-yaml "^4.1.0" parse-json "^5.2.0" -create-jest@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" - integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q== - dependencies: - "@jest/types" "^29.6.3" - chalk "^4.0.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - jest-config "^29.7.0" - jest-util "^29.7.0" - prompts "^2.0.1" - cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -3631,11 +3282,6 @@ data-view-byte-offset@^1.0.0: es-errors "^1.3.0" is-data-view "^1.0.1" -dateformat@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" - integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== - debug@2.6.9, debug@^2.2.0, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -3650,13 +3296,6 @@ debug@4, debug@4.3.2, debug@^4.1.0: dependencies: ms "2.1.2" -debug@^4.1.1, debug@^4.4.0, debug@^4.4.1: - version "4.4.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" - integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== - dependencies: - ms "^2.1.3" - debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: version "4.3.7" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" @@ -3664,6 +3303,13 @@ debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: dependencies: ms "^2.1.3" +debug@^4.4.0, debug@^4.4.1: + version "4.4.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" + integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== + dependencies: + ms "^2.1.3" + decamelize-keys@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" @@ -3701,11 +3347,6 @@ dedent@^0.7.0: resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw= -dedent@^1.0.0: - version "1.7.1" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.7.1.tgz#364661eea3d73f3faba7089214420ec2f8f13e15" - integrity sha512-9JmrhGZpOlEgOLdQgSm0zxFaYoQon408V1v49aqTWuXENVlnCuY9JBZcXZiCsZQWDjTm5Qf/nIvAy77mXDAjEg== - deep-extend@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" @@ -3716,11 +3357,6 @@ deep-is@^0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== -deepmerge@^4.2.2: - version "4.3.1" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" - integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== - defaults@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" @@ -3810,16 +3446,6 @@ destroy@1.2.0: resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== -detect-newline@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" - integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== - -diff-sequences@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" - integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== - dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -3873,11 +3499,6 @@ electron-to-chromium@^1.5.4: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.24.tgz#b3cd2f71b7a84bac340d862e3b7b0aadf48478de" integrity sha512-0x0wLCmpdKFCi9ulhvYZebgcPmHTkFVUfU2wzDykadkslKwT4oAmDTHEKLnlrDsMGZe4B+ksn8quZfZjYsBetA== -emittery@^0.13.1: - version "0.13.1" - resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" - integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== - emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -4317,7 +3938,7 @@ event-target-shim@^5.0.0, event-target-shim@^5.0.1: resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== -execa@5.1.1, execa@^5.0.0: +execa@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== @@ -4347,22 +3968,6 @@ execa@^4.0.2, execa@^4.0.3: signal-exit "^3.0.2" strip-final-newline "^2.0.0" -exit@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" - integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== - -expect@^29.0.0, expect@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" - integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== - dependencies: - "@jest/expect-utils" "^29.7.0" - jest-get-type "^29.6.3" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - exponential-backoff@^3.1.1: version "3.1.3" resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.3.tgz#51cf92c1c0493c766053f9d3abee4434c244d2f6" @@ -4479,13 +4084,6 @@ find-babel-config@^2.1.1: dependencies: json5 "^2.2.3" -find-up@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= - dependencies: - locate-path "^2.0.0" - find-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" @@ -4493,7 +4091,7 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" -find-up@^4.0.0, find-up@^4.1.0: +find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== @@ -4649,16 +4247,6 @@ get-package-type@^0.1.0: resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== -get-pkg-repo@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-4.2.1.tgz#75973e1c8050c73f48190c52047c4cee3acbf385" - integrity sha512-2+QbHjFRfGB74v/pYWjd5OhU3TDIC2Gv/YKUTk/tCvAz0pkn/Mz6P3uByuBimLOcPvN2jYdScl3xGFSrx0jEcA== - dependencies: - "@hutson/parse-repository-url" "^3.0.0" - hosted-git-info "^4.0.0" - through2 "^2.0.0" - yargs "^16.2.0" - get-stdin@8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" @@ -4700,7 +4288,7 @@ get-symbol-description@^1.0.2: es-errors "^1.3.0" get-intrinsic "^1.2.4" -git-raw-commits@^2.0.0, git-raw-commits@^2.0.8: +git-raw-commits@^2.0.0: version "2.0.10" resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.10.tgz#e2255ed9563b1c9c3ea6bd05806410290297bbc1" integrity sha512-sHhX5lsbG9SOO6yXdlwgEMQ/ljIn7qMpAbJZCGfXX2fq5T8M5SrDnpYk9/4HswTildcIqatsWa91vty6VhWSaQ== @@ -4711,22 +4299,6 @@ git-raw-commits@^2.0.0, git-raw-commits@^2.0.8: split2 "^3.0.0" through2 "^4.0.0" -git-remote-origin-url@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz#5282659dae2107145a11126112ad3216ec5fa65f" - integrity sha1-UoJlna4hBxRaERJhEq0yFuxfpl8= - dependencies: - gitconfiglocal "^1.0.0" - pify "^2.3.0" - -git-semver-tags@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-4.1.1.tgz#63191bcd809b0ec3e151ba4751c16c444e5b5780" - integrity sha512-OWyMt5zBe7xFs8vglMmhM9lRQzCWL3WjHtxNNfJTMngGym7pC1kh8sP6jevfydJ6LP3ZvGxfb6ABYgPUM0mtsA== - dependencies: - meow "^8.0.0" - semver "^6.0.0" - git-up@^4.0.0: version "4.0.5" resolved "https://registry.yarnpkg.com/git-up/-/git-up-4.0.5.tgz#e7bb70981a37ea2fb8fe049669800a1f9a01d759" @@ -4742,13 +4314,6 @@ git-url-parse@11.6.0: dependencies: git-up "^4.0.0" -gitconfiglocal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz#41d045f3851a5ea88f03f24ca1c6178114464b9b" - integrity sha1-QdBF84UaXqiPA/JMocYXgRRGS5s= - dependencies: - ini "^1.3.2" - glob-parent@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -4895,7 +4460,7 @@ got@^9.6.0: to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" -graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4: +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4: version "4.2.8" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== @@ -4910,18 +4475,6 @@ graphemer@^1.4.0: resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== -handlebars@^4.7.6: - version "4.7.7" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" - integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== - dependencies: - minimist "^1.2.5" - neo-async "^2.6.0" - source-map "^0.6.1" - wordwrap "^1.0.0" - optionalDependencies: - uglify-js "^3.1.4" - hard-rejection@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" @@ -5043,18 +4596,13 @@ hosted-git-info@^2.1.4: resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== -hosted-git-info@^4.0.0, hosted-git-info@^4.0.1: +hosted-git-info@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.0.2.tgz#5e425507eede4fea846b7262f0838456c4209961" integrity sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg== dependencies: lru-cache "^6.0.0" -html-escaper@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" - integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== - http-cache-semantics@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" @@ -5185,14 +4733,6 @@ import-lazy@^2.1.0: resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM= -import-local@^3.0.2: - version "3.2.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.2.0.tgz#c3d5c745798c02a6f8b897726aba5100186ee260" - integrity sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA== - dependencies: - pkg-dir "^4.2.0" - resolve-cwd "^3.0.0" - imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -5221,7 +4761,7 @@ ini@2.0.0: resolved "https://registry.yarnpkg.com/ini/-/ini-2.0.0.tgz#e5fd556ecdd5726be978fa1001862eacb0a94bc5" integrity sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA== -ini@^1.3.2, ini@^1.3.4, ini@~1.3.0: +ini@^1.3.4, ini@~1.3.0: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== @@ -5405,11 +4945,6 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-generator-fn@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" - integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== - is-generator-function@^1.0.10: version "1.0.10" resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" @@ -5663,11 +5198,6 @@ istanbul-lib-coverage@^3.0.0: resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.2.tgz#36786d4d82aad2ea5911007e255e2da6b5f80d86" integrity sha512-o5+eTUYzCJ11/+JhW5/FUCdfsdoYVdQ/8I/OveE2XsjehYn5DdeSnNQAbjYaO8gQ6hvGTN6GM6ddQqpTVG5j8g== -istanbul-lib-coverage@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" - integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== - istanbul-lib-instrument@^5.0.4: version "5.0.4" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.0.4.tgz#e976f2aa66ebc6737f236d3ab05b76e36f885c80" @@ -5679,43 +5209,6 @@ istanbul-lib-instrument@^5.0.4: istanbul-lib-coverage "^3.0.0" semver "^6.3.0" -istanbul-lib-instrument@^6.0.0: - version "6.0.3" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz#fa15401df6c15874bcb2105f773325d78c666765" - integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== - dependencies: - "@babel/core" "^7.23.9" - "@babel/parser" "^7.23.9" - "@istanbuljs/schema" "^0.1.3" - istanbul-lib-coverage "^3.2.0" - semver "^7.5.4" - -istanbul-lib-report@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" - integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== - dependencies: - istanbul-lib-coverage "^3.0.0" - make-dir "^4.0.0" - supports-color "^7.1.0" - -istanbul-lib-source-maps@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" - integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== - dependencies: - debug "^4.1.1" - istanbul-lib-coverage "^3.0.0" - source-map "^0.6.1" - -istanbul-reports@^3.1.3: - version "3.2.0" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.2.0.tgz#cb4535162b5784aa623cee21a7252cf2c807ac93" - integrity sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA== - dependencies: - html-escaper "^2.0.0" - istanbul-lib-report "^3.0.0" - iterator.prototype@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/iterator.prototype/-/iterator.prototype-1.1.2.tgz#5e29c8924f01916cb9335f1ff80619dcff22b0c0" @@ -5727,114 +5220,6 @@ iterator.prototype@^1.1.2: reflect.getprototypeof "^1.0.4" set-function-name "^2.0.1" -jest-changed-files@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a" - integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w== - dependencies: - execa "^5.0.0" - jest-util "^29.7.0" - p-limit "^3.1.0" - -jest-circus@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.7.0.tgz#b6817a45fcc835d8b16d5962d0c026473ee3668a" - integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/expect" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - dedent "^1.0.0" - is-generator-fn "^2.0.0" - jest-each "^29.7.0" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-runtime "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" - p-limit "^3.1.0" - pretty-format "^29.7.0" - pure-rand "^6.0.0" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-cli@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.7.0.tgz#5592c940798e0cae677eec169264f2d839a37995" - integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg== - dependencies: - "@jest/core" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" - chalk "^4.0.0" - create-jest "^29.7.0" - exit "^0.1.2" - import-local "^3.0.2" - jest-config "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" - yargs "^17.3.1" - -jest-config@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.7.0.tgz#bcbda8806dbcc01b1e316a46bb74085a84b0245f" - integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ== - dependencies: - "@babel/core" "^7.11.6" - "@jest/test-sequencer" "^29.7.0" - "@jest/types" "^29.6.3" - babel-jest "^29.7.0" - chalk "^4.0.0" - ci-info "^3.2.0" - deepmerge "^4.2.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-circus "^29.7.0" - jest-environment-node "^29.7.0" - jest-get-type "^29.6.3" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-runner "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" - micromatch "^4.0.4" - parse-json "^5.2.0" - pretty-format "^29.7.0" - slash "^3.0.0" - strip-json-comments "^3.1.1" - -jest-diff@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" - integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== - dependencies: - chalk "^4.0.0" - diff-sequences "^29.6.3" - jest-get-type "^29.6.3" - pretty-format "^29.7.0" - -jest-docblock@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.7.0.tgz#8fddb6adc3cdc955c93e2a87f61cfd350d5d119a" - integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g== - dependencies: - detect-newline "^3.0.0" - -jest-each@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.7.0.tgz#162a9b3f2328bdd991beaabffbb74745e56577d1" - integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ== - dependencies: - "@jest/types" "^29.6.3" - chalk "^4.0.0" - jest-get-type "^29.6.3" - jest-util "^29.7.0" - pretty-format "^29.7.0" - jest-environment-node@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" @@ -5871,24 +5256,6 @@ jest-haste-map@^29.7.0: optionalDependencies: fsevents "^2.3.2" -jest-leak-detector@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728" - integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw== - dependencies: - jest-get-type "^29.6.3" - pretty-format "^29.7.0" - -jest-matcher-utils@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12" - integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g== - dependencies: - chalk "^4.0.0" - jest-diff "^29.7.0" - jest-get-type "^29.6.3" - pretty-format "^29.7.0" - jest-message-util@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3" @@ -5913,120 +5280,11 @@ jest-mock@^29.7.0: "@types/node" "*" jest-util "^29.7.0" -jest-pnp-resolver@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" - integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== - jest-regex-util@^29.6.3: version "29.6.3" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52" integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== -jest-resolve-dependencies@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz#1b04f2c095f37fc776ff40803dc92921b1e88428" - integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA== - dependencies: - jest-regex-util "^29.6.3" - jest-snapshot "^29.7.0" - -jest-resolve@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.7.0.tgz#64d6a8992dd26f635ab0c01e5eef4399c6bcbc30" - integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== - dependencies: - chalk "^4.0.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - jest-pnp-resolver "^1.2.2" - jest-util "^29.7.0" - jest-validate "^29.7.0" - resolve "^1.20.0" - resolve.exports "^2.0.0" - slash "^3.0.0" - -jest-runner@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.7.0.tgz#809af072d408a53dcfd2e849a4c976d3132f718e" - integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ== - dependencies: - "@jest/console" "^29.7.0" - "@jest/environment" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - emittery "^0.13.1" - graceful-fs "^4.2.9" - jest-docblock "^29.7.0" - jest-environment-node "^29.7.0" - jest-haste-map "^29.7.0" - jest-leak-detector "^29.7.0" - jest-message-util "^29.7.0" - jest-resolve "^29.7.0" - jest-runtime "^29.7.0" - jest-util "^29.7.0" - jest-watcher "^29.7.0" - jest-worker "^29.7.0" - p-limit "^3.1.0" - source-map-support "0.5.13" - -jest-runtime@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.7.0.tgz#efecb3141cf7d3767a3a0cc8f7c9990587d3d817" - integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/fake-timers" "^29.7.0" - "@jest/globals" "^29.7.0" - "@jest/source-map" "^29.6.3" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - cjs-module-lexer "^1.0.0" - collect-v8-coverage "^1.0.0" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - jest-message-util "^29.7.0" - jest-mock "^29.7.0" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" - slash "^3.0.0" - strip-bom "^4.0.0" - -jest-snapshot@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz#c2c574c3f51865da1bb329036778a69bf88a6be5" - integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw== - dependencies: - "@babel/core" "^7.11.6" - "@babel/generator" "^7.7.2" - "@babel/plugin-syntax-jsx" "^7.7.2" - "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/types" "^7.3.3" - "@jest/expect-utils" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - babel-preset-current-node-syntax "^1.0.0" - chalk "^4.0.0" - expect "^29.7.0" - graceful-fs "^4.2.9" - jest-diff "^29.7.0" - jest-get-type "^29.6.3" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - natural-compare "^1.4.0" - pretty-format "^29.7.0" - semver "^7.5.3" - jest-util@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" @@ -6051,20 +5309,6 @@ jest-validate@^29.6.3, jest-validate@^29.7.0: leven "^3.1.0" pretty-format "^29.7.0" -jest-watcher@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.7.0.tgz#7810d30d619c3a62093223ce6bb359ca1b28a2f2" - integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g== - dependencies: - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - emittery "^0.13.1" - jest-util "^29.7.0" - string-length "^4.0.1" - jest-worker@^29.6.3, jest-worker@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a" @@ -6075,16 +5319,6 @@ jest-worker@^29.6.3, jest-worker@^29.7.0: merge-stream "^2.0.0" supports-color "^8.0.0" -jest@29: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-29.7.0.tgz#994676fc24177f088f1c5e3737f5697204ff2613" - integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== - dependencies: - "@jest/core" "^29.7.0" - "@jest/types" "^29.6.3" - import-local "^3.0.2" - jest-cli "^29.7.0" - "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -6150,11 +5384,6 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= -json-stringify-safe@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - json5@^2.1.2: version "2.2.0" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" @@ -6251,24 +5480,6 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= -load-json-file@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" - integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs= - dependencies: - graceful-fs "^4.1.2" - parse-json "^4.0.0" - pify "^3.0.0" - strip-bom "^3.0.0" - -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" @@ -6296,11 +5507,6 @@ lodash.debounce@^4.0.8: resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= -lodash.ismatch@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37" - integrity sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc= - lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" @@ -6372,13 +5578,6 @@ make-dir@^3.0.0: dependencies: semver "^6.0.0" -make-dir@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" - integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== - dependencies: - semver "^7.5.3" - makeerror@1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" @@ -6952,11 +6151,6 @@ mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -modify-values@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" - integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw== - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -6992,11 +6186,6 @@ negotiator@0.6.2: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== -neo-async@^2.6.0: - version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - new-github-release-url@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/new-github-release-url/-/new-github-release-url-1.0.0.tgz#493847e6fecce39c247e9d89929be773d2e7f777" @@ -7036,7 +6225,7 @@ node-releases@^2.0.27: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.27.tgz#eedca519205cf20f650f61d56b070db111231e4e" integrity sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA== -normalize-package-data@^2.3.2, normalize-package-data@^2.5.0: +normalize-package-data@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== @@ -7256,13 +6445,6 @@ p-cancelable@^2.0.0: resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf" integrity sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg== -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - p-limit@^2.0.0, p-limit@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" @@ -7270,20 +6452,13 @@ p-limit@^2.0.0, p-limit@^2.2.0: dependencies: p-try "^2.0.0" -p-limit@^3.0.2, p-limit@^3.1.0: +p-limit@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== dependencies: yocto-queue "^0.1.0" -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= - dependencies: - p-limit "^1.1.0" - p-locate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" @@ -7312,11 +6487,6 @@ p-map@^4.0.0: dependencies: aggregate-error "^3.0.0" -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= - p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -7415,13 +6585,6 @@ path-scurry@^1.6.1: lru-cache "^10.2.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" -path-type@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" - integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== - dependencies: - pify "^3.0.0" - path-type@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" @@ -7447,28 +6610,11 @@ picomatch@^2.0.4, picomatch@^2.2.3: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== -pify@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= - -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= - pirates@^4.0.4: version "4.0.7" resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.7.tgz#643b4a18c4257c8a65104b73f3049ce9a0a15e22" integrity sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA== -pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - pkg-dir@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-5.0.0.tgz#a02d6aebe6ba133a928f74aec20bafdfe6b8e760" @@ -7505,14 +6651,6 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prepend-file@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/prepend-file/-/prepend-file-2.0.0.tgz#2d3256376a64ca3b5640153890a89cadbebaf1a9" - integrity sha512-U6on3jv5hQ+CNEO7gFn00PUlm3F/oXIQTMg6jpeQTQHLYSZl/Cxb4NpH44FA0By+maPXpfUaqmCoPUTu/Z3/8g== - dependencies: - path-exists "^4.0.0" - temp-write "^4.0.0" - prepend-http@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" @@ -7530,7 +6668,7 @@ prettier@^2.0.5: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.4.1.tgz#671e11c89c14a4cfc876ce564106c4a6726c9f5c" integrity sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA== -pretty-format@^29.0.0, pretty-format@^29.7.0: +pretty-format@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== @@ -7551,7 +6689,7 @@ promise@^8.3.0: dependencies: asap "~2.0.6" -prompts@^2.0.1, prompts@^2.4.2: +prompts@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== @@ -7602,11 +6740,6 @@ pupa@^2.1.1: dependencies: escape-goat "^2.0.0" -pure-rand@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.1.0.tgz#d173cf23258231976ccbdb05247c9787957604f2" - integrity sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA== - q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" @@ -7767,14 +6900,6 @@ react@17.0.2: loose-envify "^1.1.0" object-assign "^4.1.1" -read-pkg-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" - integrity sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc= - dependencies: - find-up "^2.0.0" - read-pkg "^3.0.0" - read-pkg-up@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" @@ -7784,15 +6909,6 @@ read-pkg-up@^7.0.1: read-pkg "^5.2.0" type-fest "^0.8.1" -read-pkg@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" - integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= - dependencies: - load-json-file "^4.0.0" - normalize-package-data "^2.3.2" - path-type "^3.0.0" - read-pkg@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" @@ -7803,7 +6919,7 @@ read-pkg@^5.2.0: parse-json "^5.0.0" type-fest "^0.6.0" -readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.4.0: +readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.4.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -7973,13 +7089,6 @@ resolve-alpn@^1.0.0: resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" integrity sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g== -resolve-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" - integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== - dependencies: - resolve-from "^5.0.0" - resolve-from@5.0.0, resolve-from@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" @@ -8002,11 +7111,6 @@ resolve-global@1.0.0, resolve-global@^1.0.0: dependencies: global-dirs "^0.1.1" -resolve.exports@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.3.tgz#41955e6f1b4013b7586f873749a635dea07ebe3f" - integrity sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A== - resolve@^1.1.6, resolve@^1.10.0: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" @@ -8015,7 +7119,7 @@ resolve@^1.1.6, resolve@^1.10.0: is-core-module "^2.2.0" path-parse "^1.0.6" -resolve@^1.20.0, resolve@^1.22.10, resolve@^1.22.8: +resolve@^1.22.10, resolve@^1.22.8: version "1.22.11" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.11.tgz#aad857ce1ffb8bfa9b0b1ac29f1156383f68c262" integrity sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ== @@ -8174,7 +7278,7 @@ semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.1.3, semver@^7.5.3, semver@^7.5.4: +semver@^7.1.3: version "7.7.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946" integrity sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q== @@ -8315,14 +7419,6 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -source-map-support@0.5.13: - version "0.5.13" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" - integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" @@ -8336,7 +7432,7 @@ source-map@^0.5.0, source-map@^0.5.6: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= -source-map@^0.6.0, source-map@^0.6.1: +source-map@^0.6.0: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== @@ -8379,13 +7475,6 @@ split2@^3.0.0: dependencies: readable-stream "^3.0.0" -split@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" - integrity sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg== - dependencies: - through "2" - sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" @@ -8425,14 +7514,6 @@ strict-uri-encode@^2.0.0: resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY= -string-length@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" - integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== - dependencies: - char-regex "^1.0.2" - strip-ansi "^6.0.0" - string-natural-compare@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4" @@ -8538,16 +7619,6 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= - -strip-bom@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" - integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== - strip-final-newline@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" @@ -8596,22 +7667,6 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -temp-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" - integrity sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0= - -temp-write@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/temp-write/-/temp-write-4.0.0.tgz#cd2e0825fc826ae72d201dc26eef3bf7e6fc9320" - integrity sha512-HIeWmj77uOOHb0QX7siN3OtwV3CTntquin6TNVg6SHOqCP3hYKmox90eeFOGaY1MqJ9WYDDjkyZrW6qS5AWpbw== - dependencies: - graceful-fs "^4.1.15" - is-stream "^2.0.0" - make-dir "^3.0.0" - temp-dir "^1.0.0" - uuid "^3.3.2" - terser@^5.15.0: version "5.44.1" resolved "https://registry.yarnpkg.com/terser/-/terser-5.44.1.tgz#e391e92175c299b8c284ad6ded609e37303b0a9c" @@ -8646,7 +7701,7 @@ throat@^5.0.0: resolved "https://registry.yarnpkg.com/throat/-/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b" integrity sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA== -through2@^2.0.0, through2@^2.0.1: +through2@^2.0.1: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== @@ -8661,7 +7716,7 @@ through2@^4.0.0: dependencies: readable-stream "3" -through@2, "through@>=2.2.7 <3", through@^2.3.6: +"through@>=2.2.7 <3", through@^2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= @@ -8830,21 +7885,11 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= - typescript@^4.9.5: version "4.9.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== -uglify-js@^3.1.4: - version "3.14.2" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.14.2.tgz#d7dd6a46ca57214f54a2d0a43cad0f35db82ac99" - integrity sha512-rtPMlmcO4agTUfz10CbgJ1k6UAoXM2gWb3GoMPPZB/+/Ackf8lNWk11K4rYi2D0apgoFRLtQOZhb+/iGNJq26A== - unbox-primitive@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" @@ -8985,20 +8030,6 @@ uuid@8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== -uuid@^3.3.2: - version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - -v8-to-istanbul@^9.0.1: - version "9.3.0" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175" - integrity sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA== - dependencies: - "@jridgewell/trace-mapping" "^0.3.12" - "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^2.0.0" - validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -9137,11 +8168,6 @@ word-wrap@^1.2.5: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== -wordwrap@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= - wrap-ansi@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" @@ -9235,7 +8261,7 @@ yaml@1.10.2, yaml@^1.10.0: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== -yargs-parser@20.2.9, yargs-parser@^20.2.2, yargs-parser@^20.2.3: +yargs-parser@20.2.9, yargs-parser@^20.2.3: version "20.2.9" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== @@ -9270,20 +8296,7 @@ yargs@^15.1.0: y18n "^4.0.0" yargs-parser "^18.1.2" -yargs@^16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" - -yargs@^17.3.1, yargs@^17.5.1, yargs@^17.6.2: +yargs@^17.5.1, yargs@^17.6.2: version "17.7.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== From 47556ee187175eb182428600bc874b9fe8bb3364 Mon Sep 17 00:00:00 2001 From: thomasvo Date: Fri, 2 Jan 2026 12:41:50 -0800 Subject: [PATCH 02/20] add PR label check workflow - Extracts valid labels from release.yml using github-script - Requires at least one changelog label on PRs - Runs on label changes (labeled/unlabeled events) --- .github/workflows/lint.yml | 1 + .github/workflows/pr-labels.yml | 44 +++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/pr-labels.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e8630020..961b99d8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,3 +12,4 @@ jobs: - name: Run ESLint run: yarn run lint + diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml new file mode 100644 index 00000000..1542aa26 --- /dev/null +++ b/.github/workflows/pr-labels.yml @@ -0,0 +1,44 @@ +name: PR Labels + +on: + pull_request: + types: [opened, synchronize, reopened, labeled, unlabeled] + +jobs: + check-labels: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Extract valid labels from release.yml + id: extract-labels + uses: actions/github-script@v7 + with: + script: | + const fs = require('fs'); + const yaml = require('js-yaml'); + + const releaseConfig = yaml.load(fs.readFileSync('.github/release.yml', 'utf8')); + const labels = []; + + if (releaseConfig.changelog?.categories) { + for (const category of releaseConfig.changelog.categories) { + if (category.labels) { + for (const label of category.labels) { + if (label !== '*') { + labels.push(label); + } + } + } + } + } + + const labelsString = labels.join(','); + core.info(`Extracted labels: ${labelsString}`); + core.setOutput('labels', labelsString); + + - uses: mheap/github-action-required-labels@v5 + with: + mode: minimum + count: 1 + labels: ${{ steps.extract-labels.outputs.labels }} From 1ed9dd743fdb666ddd82d0ac33cb41db3edf27c5 Mon Sep 17 00:00:00 2001 From: thomasvo Date: Fri, 2 Jan 2026 12:48:28 -0800 Subject: [PATCH 03/20] remove change --- .github/workflows/lint.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 961b99d8..e8630020 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,4 +12,3 @@ jobs: - name: Run ESLint run: yarn run lint - From 2c65678be906d73eb3f822a2abf993e450ed93ff Mon Sep 17 00:00:00 2001 From: thomasvo Date: Mon, 5 Jan 2026 09:23:59 -0800 Subject: [PATCH 04/20] fix: use yq instead of js-yaml for label extraction - yq is pre-installed on GitHub runners - no need to install dependencies on every run --- .github/workflows/pr-labels.yml | 29 +- lib/commonjs/ReactNativeZoomableView.js | 1047 +++++++---------- lib/commonjs/ReactNativeZoomableView.js.map | 2 +- lib/commonjs/animations/index.js | 4 - lib/commonjs/animations/index.js.map | 2 +- .../components/AnimatedTouchFeedback.js | 20 +- .../components/AnimatedTouchFeedback.js.map | 2 +- lib/commonjs/components/StaticPin.js | 57 +- lib/commonjs/components/StaticPin.js.map | 2 +- lib/commonjs/components/index.js | 1 - lib/commonjs/components/index.js.map | 2 +- lib/commonjs/debugHelper/index.js | 15 +- lib/commonjs/debugHelper/index.js.map | 2 +- .../helper/applyPanBoundariesToOffset.js | 30 +- .../helper/applyPanBoundariesToOffset.js.map | 2 +- .../calcNewScaledOffsetForZoomCentering.js | 4 +- ...calcNewScaledOffsetForZoomCentering.js.map | 2 +- lib/commonjs/helper/coordinateConversion.js | 14 +- .../helper/coordinateConversion.js.map | 2 +- lib/commonjs/helper/index.js | 6 - lib/commonjs/helper/index.js.map | 2 +- lib/commonjs/index.js | 5 +- lib/commonjs/index.js.map | 2 +- lib/commonjs/package.json | 1 + lib/commonjs/typings/index.js | 8 +- lib/commonjs/typings/index.js.map | 2 +- lib/module/ReactNativeZoomableView.js | 1023 +++++++--------- lib/module/ReactNativeZoomableView.js.map | 2 +- lib/module/animations/index.js | 2 + lib/module/animations/index.js.map | 2 +- .../components/AnimatedTouchFeedback.js | 11 +- .../components/AnimatedTouchFeedback.js.map | 2 +- lib/module/components/StaticPin.js | 46 +- lib/module/components/StaticPin.js.map | 2 +- lib/module/components/index.js | 2 + lib/module/components/index.js.map | 2 +- lib/module/debugHelper/index.js | 7 +- lib/module/debugHelper/index.js.map | 2 +- .../helper/applyPanBoundariesToOffset.js | 31 +- .../helper/applyPanBoundariesToOffset.js.map | 2 +- .../calcNewScaledOffsetForZoomCentering.js | 5 +- ...calcNewScaledOffsetForZoomCentering.js.map | 2 +- lib/module/helper/coordinateConversion.js | 10 +- lib/module/helper/coordinateConversion.js.map | 2 +- lib/module/helper/index.js | 7 +- lib/module/helper/index.js.map | 2 +- lib/module/index.js | 5 +- lib/module/index.js.map | 2 +- lib/module/package.json | 1 + lib/module/typings/index.js | 7 +- lib/module/typings/index.js.map | 2 +- lib/typescript/ReactNativeZoomableView.d.ts | 1 + .../ReactNativeZoomableView.d.ts.map | 1 + lib/typescript/__tests__/index.test.d.ts | 0 lib/typescript/animations/index.d.ts | 1 + lib/typescript/animations/index.d.ts.map | 1 + .../components/AnimatedTouchFeedback.d.ts | 1 + .../components/AnimatedTouchFeedback.d.ts.map | 1 + lib/typescript/components/StaticPin.d.ts | 1 + lib/typescript/components/StaticPin.d.ts.map | 1 + lib/typescript/components/index.d.ts | 1 + lib/typescript/components/index.d.ts.map | 1 + lib/typescript/debugHelper/index.d.ts | 1 + lib/typescript/debugHelper/index.d.ts.map | 1 + .../helper/applyPanBoundariesToOffset.d.ts | 1 + .../applyPanBoundariesToOffset.d.ts.map | 1 + .../calcNewScaledOffsetForZoomCentering.d.ts | 1 + ...lcNewScaledOffsetForZoomCentering.d.ts.map | 1 + .../helper/coordinateConversion.d.ts | 1 + .../helper/coordinateConversion.d.ts.map | 1 + lib/typescript/helper/index.d.ts | 1 + lib/typescript/helper/index.d.ts.map | 1 + lib/typescript/index.d.ts | 1 + lib/typescript/index.d.ts.map | 1 + lib/typescript/typings/index.d.ts | 1 + lib/typescript/typings/index.d.ts.map | 1 + 76 files changed, 1086 insertions(+), 1384 deletions(-) create mode 100644 lib/commonjs/package.json create mode 100644 lib/module/package.json create mode 100644 lib/typescript/ReactNativeZoomableView.d.ts.map delete mode 100644 lib/typescript/__tests__/index.test.d.ts create mode 100644 lib/typescript/animations/index.d.ts.map create mode 100644 lib/typescript/components/AnimatedTouchFeedback.d.ts.map create mode 100644 lib/typescript/components/StaticPin.d.ts.map create mode 100644 lib/typescript/components/index.d.ts.map create mode 100644 lib/typescript/debugHelper/index.d.ts.map create mode 100644 lib/typescript/helper/applyPanBoundariesToOffset.d.ts.map create mode 100644 lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts.map create mode 100644 lib/typescript/helper/coordinateConversion.d.ts.map create mode 100644 lib/typescript/helper/index.d.ts.map create mode 100644 lib/typescript/index.d.ts.map create mode 100644 lib/typescript/typings/index.d.ts.map diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index 1542aa26..cef7bced 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -12,30 +12,11 @@ jobs: - name: Extract valid labels from release.yml id: extract-labels - uses: actions/github-script@v7 - with: - script: | - const fs = require('fs'); - const yaml = require('js-yaml'); - - const releaseConfig = yaml.load(fs.readFileSync('.github/release.yml', 'utf8')); - const labels = []; - - if (releaseConfig.changelog?.categories) { - for (const category of releaseConfig.changelog.categories) { - if (category.labels) { - for (const label of category.labels) { - if (label !== '*') { - labels.push(label); - } - } - } - } - } - - const labelsString = labels.join(','); - core.info(`Extracted labels: ${labelsString}`); - core.setOutput('labels', labelsString); + run: | + # Extract labels from release.yml, excluding wildcards + labels=$(yq eval '.changelog.categories[].labels[]' .github/release.yml | grep -v '^\*$' | tr '\n' ',' | sed 's/,$//') + echo "labels=$labels" >> $GITHUB_OUTPUT + echo "Extracted labels: $labels" - uses: mheap/github-action-required-labels@v5 with: diff --git a/lib/commonjs/ReactNativeZoomableView.js b/lib/commonjs/ReactNativeZoomableView.js index cd0ced3a..a682c4bf 100644 --- a/lib/commonjs/ReactNativeZoomableView.js +++ b/lib/commonjs/ReactNativeZoomableView.js @@ -4,35 +4,18 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.ReactNativeZoomableView = void 0; - var _lodash = require("lodash"); - var _react = _interopRequireWildcard(require("react")); - var _reactNative = require("react-native"); - var _animations = require("./animations"); - var _components = require("./components"); - var _StaticPin = require("./components/StaticPin"); - var _debugHelper = require("./debugHelper"); - var _helper = require("./helper"); - var _applyPanBoundariesToOffset = require("./helper/applyPanBoundariesToOffset"); - var _coordinateConversion = require("./helper/coordinateConversion"); - -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } - -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - +var _jsxRuntime = require("react/jsx-runtime"); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } const initialState = { originalWidth: 0, originalHeight: 0, @@ -45,380 +28,77 @@ const initialState = { height: 0 } }; - class ReactNativeZoomableView extends _react.Component { + static defaultProps = { + zoomEnabled: true, + panEnabled: true, + initialZoom: 1, + initialOffsetX: 0, + initialOffsetY: 0, + maxZoom: 1.5, + minZoom: 0.5, + pinchToZoomInSensitivity: 1, + pinchToZoomOutSensitivity: 1, + movementSensibility: 1, + doubleTapDelay: 300, + bindToBorders: true, + zoomStep: 0.5, + onLongPress: null, + longPressDuration: 700, + contentWidth: undefined, + contentHeight: undefined, + panBoundaryPadding: 0, + visualTouchFeedbackEnabled: true, + staticPinPosition: undefined, + staticPinIcon: undefined, + onStaticPinPositionChange: undefined, + onStaticPinPositionMove: undefined, + animatePin: true, + disablePanOnInitialZoom: false + }; + panAnim = new _reactNative.Animated.ValueXY({ + x: 0, + y: 0 + }); + zoomAnim = new _reactNative.Animated.Value(1); + pinAnim = new _reactNative.Animated.ValueXY({ + x: 0, + y: 0 + }); + __offsets = { + x: { + value: 0, + boundaryCrossedAnimInEffect: false + }, + y: { + value: 0, + boundaryCrossedAnimInEffect: false + } + }; + zoomLevel = 1; + lastGestureCenterPosition = null; + lastGestureTouchDistance = null; + _gestureStarted = false; set gestureStarted(v) { this._gestureStarted = v; } - get gestureStarted() { return this._gestureStarted; } + /** * Last press time (used to evaluate whether user double tapped) * @type {number} */ - - + longPressTimeout = null; + touches = []; constructor(props) { - super(props); // This needs to be done before anything else to initialize the state. + super(props); + // This needs to be done before anything else to initialize the state. // Otherwise, the logic below may reference the state when it's undefined, // causing runtime errors. - - _defineProperty(this, "zoomSubjectWrapperRef", void 0); - - _defineProperty(this, "gestureHandlers", void 0); - - _defineProperty(this, "doubleTapFirstTapReleaseTimestamp", void 0); - - _defineProperty(this, "panAnim", new _reactNative.Animated.ValueXY({ - x: 0, - y: 0 - })); - - _defineProperty(this, "zoomAnim", new _reactNative.Animated.Value(1)); - - _defineProperty(this, "pinAnim", new _reactNative.Animated.ValueXY({ - x: 0, - y: 0 - })); - - _defineProperty(this, "__offsets", { - x: { - value: 0, - boundaryCrossedAnimInEffect: false - }, - y: { - value: 0, - boundaryCrossedAnimInEffect: false - } - }); - - _defineProperty(this, "zoomLevel", 1); - - _defineProperty(this, "lastGestureCenterPosition", null); - - _defineProperty(this, "lastGestureTouchDistance", null); - - _defineProperty(this, "gestureType", void 0); - - _defineProperty(this, "_gestureStarted", false); - - _defineProperty(this, "longPressTimeout", null); - - _defineProperty(this, "onTransformInvocationInitialized", void 0); - - _defineProperty(this, "singleTapTimeoutId", void 0); - - _defineProperty(this, "touches", []); - - _defineProperty(this, "doubleTapFirstTap", void 0); - - _defineProperty(this, "measureZoomSubjectInterval", void 0); - - _defineProperty(this, "debouncedOnStaticPinPositionChange", (0, _lodash.debounce)(position => { - var _this$props$onStaticP, _this$props; - - return (_this$props$onStaticP = (_this$props = this.props).onStaticPinPositionChange) === null || _this$props$onStaticP === void 0 ? void 0 : _this$props$onStaticP.call(_this$props, position); - }, 100)); - - _defineProperty(this, "measureZoomSubject", () => { - // make sure we measure after animations are complete - requestAnimationFrame(() => { - // this setTimeout is here to fix a weird issue on iOS where the measurements are all `0` - // when navigating back (react-navigation stack) from another view - // while closing the keyboard at the same time - setTimeout(() => { - var _this$zoomSubjectWrap; - - // In normal conditions, we're supposed to measure zoomSubject instead of its wrapper. - // However, our zoomSubject may have been transformed by an initial zoomLevel or offset, - // in which case these measurements will not represent the true "original" measurements. - // We just need to make sure the zoomSubjectWrapper perfectly aligns with the zoomSubject - // (no border, space, or anything between them) - (_this$zoomSubjectWrap = this.zoomSubjectWrapperRef.current) === null || _this$zoomSubjectWrap === void 0 ? void 0 : _this$zoomSubjectWrap.measure((x, y, width, height, pageX, pageY) => { - // When the component is off-screen, these become all 0s, so we don't set them - // to avoid messing up calculations, especially ones that are done right after - // the component transitions from hidden to visible. - if (!pageX && !pageY && !width && !height) return; // If these values are all the same, don't re-set them in state - // this way we don't re-render - - if (this.state.originalX === x && this.state.originalY === y && this.state.originalWidth === width && this.state.originalHeight === height && this.state.originalPageX === pageX && this.state.originalPageY === pageY) { - return; - } - - this.setState({ - originalX: x, - originalY: y, - originalWidth: width, - originalHeight: height, - originalPageX: pageX, - originalPageY: pageY - }); - }); - }); - }); - }); - - _defineProperty(this, "_handleStartShouldSetPanResponder", (e, gestureState) => { - if (this.props.onStartShouldSetPanResponder) { - this.props.onStartShouldSetPanResponder(e, gestureState, this._getZoomableViewEventObject(), false); - } // Always set pan responder on start - // of gesture so we can handle tap. - // "Pan threshold validation" will be handled - // in `onPanResponderMove` instead of in `onMoveShouldSetPanResponder` - - - return true; - }); - - _defineProperty(this, "_handlePanResponderGrant", (e, gestureState) => { - var _this$props$onPanResp, _this$props3; - - if (this.props.onLongPress) { - e.persist(); - this.longPressTimeout = setTimeout(() => { - var _this$props$onLongPre, _this$props2; - - (_this$props$onLongPre = (_this$props2 = this.props).onLongPress) === null || _this$props$onLongPre === void 0 ? void 0 : _this$props$onLongPre.call(_this$props2, e, gestureState, this._getZoomableViewEventObject()); - this.longPressTimeout = null; - }, this.props.longPressDuration); - } - - (_this$props$onPanResp = (_this$props3 = this.props).onPanResponderGrant) === null || _this$props$onPanResp === void 0 ? void 0 : _this$props$onPanResp.call(_this$props3, e, gestureState, this._getZoomableViewEventObject()); - this.panAnim.stopAnimation(); - this.zoomAnim.stopAnimation(); - this.gestureStarted = true; - this.raisePin(); - }); - - _defineProperty(this, "_handlePanResponderEnd", (e, gestureState) => { - var _this$props$onPanResp2, _this$props4; - - if (!this.gestureType) { - this._resolveAndHandleTap(e); - } - - this.setState({ - debugPoints: [] - }); - this.lastGestureCenterPosition = null; - const disableMomentum = this.props.disableMomentum || this.props.panEnabled && this.gestureType === 'shift' && this.props.disablePanOnInitialZoom && this.zoomLevel === this.props.initialZoom; // Trigger final shift animation unless disablePanOnInitialZoom is set and we're on the initial zoom level - // or disableMomentum - - if (!disableMomentum) { - (0, _animations.getPanMomentumDecayAnim)(this.panAnim, { - x: gestureState.vx / this.zoomLevel, - y: gestureState.vy / this.zoomLevel - }).start(); - } - - if (this.longPressTimeout) { - clearTimeout(this.longPressTimeout); - this.longPressTimeout = null; - } - - (_this$props$onPanResp2 = (_this$props4 = this.props).onPanResponderEnd) === null || _this$props$onPanResp2 === void 0 ? void 0 : _this$props$onPanResp2.call(_this$props4, e, gestureState, this._getZoomableViewEventObject()); - - if (this.gestureType === 'pinch') { - var _this$props$onZoomEnd, _this$props5; - - (_this$props$onZoomEnd = (_this$props5 = this.props).onZoomEnd) === null || _this$props$onZoomEnd === void 0 ? void 0 : _this$props$onZoomEnd.call(_this$props5, e, gestureState, this._getZoomableViewEventObject()); - } else if (this.gestureType === 'shift') { - var _this$props$onShiftin, _this$props6; - - (_this$props$onShiftin = (_this$props6 = this.props).onShiftingEnd) === null || _this$props$onShiftin === void 0 ? void 0 : _this$props$onShiftin.call(_this$props6, e, gestureState, this._getZoomableViewEventObject()); - } - - if (this.props.staticPinPosition) { - this._updateStaticPin(); - } - - this.dropPin(); - this.gestureType = null; - this.gestureStarted = false; - }); - - _defineProperty(this, "_handlePanResponderMove", (e, gestureState) => { - if (this.props.onPanResponderMove) { - if (this.props.onPanResponderMove(e, gestureState, this._getZoomableViewEventObject())) { - return false; - } - } // Only supports 2 touches and below, - // any invalid number will cause the gesture to end. - - - if (gestureState.numberActiveTouches <= 2) { - if (!this.gestureStarted) { - this._handlePanResponderGrant(e, gestureState); - } - } else { - if (this.gestureStarted) { - this._handlePanResponderEnd(e, gestureState); - } - - return true; - } - - if (gestureState.numberActiveTouches === 2) { - if (this.longPressTimeout) { - clearTimeout(this.longPressTimeout); - this.longPressTimeout = null; - } // change some measurement states when switching gesture to ensure a smooth transition - - - if (this.gestureType !== 'pinch') { - this.lastGestureCenterPosition = (0, _helper.calcGestureCenterPoint)(e, gestureState); - this.lastGestureTouchDistance = (0, _helper.calcGestureTouchDistance)(e, gestureState); - } - - this.gestureType = 'pinch'; - - this._handlePinching(e, gestureState); - } else if (gestureState.numberActiveTouches === 1) { - if (this.longPressTimeout && (Math.abs(gestureState.dx) > 5 || Math.abs(gestureState.dy) > 5)) { - clearTimeout(this.longPressTimeout); - this.longPressTimeout = null; - } // change some measurement states when switching gesture to ensure a smooth transition - - - if (this.gestureType !== 'shift') { - this.lastGestureCenterPosition = (0, _helper.calcGestureCenterPoint)(e, gestureState); - } - - const { - dx, - dy - } = gestureState; - const isShiftGesture = Math.abs(dx) > 2 || Math.abs(dy) > 2; - - if (isShiftGesture) { - this.gestureType = 'shift'; - - this._handleShifting(gestureState); - } - } - }); - - _defineProperty(this, "_resolveAndHandleTap", e => { - const now = Date.now(); - - if (this.doubleTapFirstTapReleaseTimestamp && this.props.doubleTapDelay && now - this.doubleTapFirstTapReleaseTimestamp < this.props.doubleTapDelay) { - this.doubleTapFirstTap && this._addTouch({ ...this.doubleTapFirstTap, - id: now.toString(), - isSecondTap: true - }); - this.singleTapTimeoutId && clearTimeout(this.singleTapTimeoutId); - delete this.doubleTapFirstTapReleaseTimestamp; - delete this.singleTapTimeoutId; - delete this.doubleTapFirstTap; - - this._handleDoubleTap(e); - } else { - this.doubleTapFirstTapReleaseTimestamp = now; - this.doubleTapFirstTap = { - id: now.toString(), - x: e.nativeEvent.pageX - this.state.originalPageX, - y: e.nativeEvent.pageY - this.state.originalPageY - }; - - this._addTouch(this.doubleTapFirstTap); // persist event so e.nativeEvent is preserved after a timeout delay - - - e.persist(); - this.singleTapTimeoutId = setTimeout(() => { - var _this$props$onSingleT, _this$props7; - - delete this.doubleTapFirstTapReleaseTimestamp; - delete this.singleTapTimeoutId; // Pan to the tapped location - - if (this.props.staticPinPosition && this.doubleTapFirstTap) { - const tapX = this.props.staticPinPosition.x - this.doubleTapFirstTap.x; - const tapY = this.props.staticPinPosition.y - this.doubleTapFirstTap.y; - - _reactNative.Animated.timing(this.panAnim, { - toValue: { - x: this.offsetX + tapX / this.zoomLevel, - y: this.offsetY + tapY / this.zoomLevel - }, - useNativeDriver: true, - duration: 200 - }).start(() => { - this._updateStaticPin(); - }); - } - - (_this$props$onSingleT = (_this$props7 = this.props).onSingleTap) === null || _this$props$onSingleT === void 0 ? void 0 : _this$props$onSingleT.call(_this$props7, e, this._getZoomableViewEventObject()); - }, this.props.doubleTapDelay); - } - }); - - _defineProperty(this, "moveStaticPinTo", (position, duration) => { - const { - originalWidth, - originalHeight - } = this.state; - const { - staticPinPosition, - contentWidth, - contentHeight - } = this.props; - if (!staticPinPosition) return; - if (!originalWidth || !originalHeight) return; - if (!contentWidth || !contentHeight) return; // Offset for the static pin - - const pinX = staticPinPosition.x - originalWidth / 2; - const pinY = staticPinPosition.y - originalHeight / 2; - this.offsetX = contentWidth / 2 - position.x + pinX / this.zoomLevel; - this.offsetY = contentHeight / 2 - position.y + pinY / this.zoomLevel; - - if (duration) { - _reactNative.Animated.timing(this.panAnim, { - toValue: { - x: this.offsetX, - y: this.offsetY - }, - useNativeDriver: true, - duration - }).start(); - } else { - this.panAnim.setValue({ - x: this.offsetX, - y: this.offsetY - }); - } - }); - - _defineProperty(this, "_staticPinPosition", () => { - if (!this.props.staticPinPosition) return; - if (!this.props.contentWidth || !this.props.contentHeight) return; - return (0, _coordinateConversion.viewportPositionToImagePosition)({ - viewportPosition: { - x: this.props.staticPinPosition.x, - y: this.props.staticPinPosition.y - }, - imageSize: { - height: this.props.contentHeight, - width: this.props.contentWidth - }, - zoomableEvent: { ...this._getZoomableViewEventObject(), - offsetX: this.offsetX, - offsetY: this.offsetY, - zoomLevel: this.zoomLevel - } - }); - }); - - _defineProperty(this, "_updateStaticPin", () => { - var _this$props$onStaticP2, _this$props8; - - const position = this._staticPinPosition(); - - if (!position) return; - (_this$props$onStaticP2 = (_this$props8 = this.props).onStaticPinPositionChange) === null || _this$props$onStaticP2 === void 0 ? void 0 : _this$props$onStaticP2.call(_this$props8, position); - }); - - this.state = { ...initialState + this.state = { + ...initialState }; this.gestureHandlers = _reactNative.PanResponder.create({ onStartShouldSetPanResponder: this._handleStartShouldSetPanResponder, @@ -426,8 +106,6 @@ class ReactNativeZoomableView extends _react.Component { onPanResponderMove: this._handlePanResponderMove, onPanResponderRelease: this._handlePanResponderEnd, onPanResponderTerminate: (evt, gestureState) => { - var _this$props$onPanResp3, _this$props9; - // We should also call _handlePanResponderEnd // to properly perform cleanups when the gesture is terminated // (aka gesture handling responsibility is taken over by another component). @@ -435,30 +113,13 @@ class ReactNativeZoomableView extends _react.Component { // on real device, sometimes onPanResponderRelease is not called when you lift 2 fingers up, // but onPanResponderTerminate is called instead for no apparent reason. this._handlePanResponderEnd(evt, gestureState); - - (_this$props$onPanResp3 = (_this$props9 = this.props).onPanResponderTerminate) === null || _this$props$onPanResp3 === void 0 ? void 0 : _this$props$onPanResp3.call(_this$props9, evt, gestureState, this._getZoomableViewEventObject()); - }, - onPanResponderTerminationRequest: (evt, gestureState) => { - var _this$props$onPanResp4, _this$props10; - - return !!((_this$props$onPanResp4 = (_this$props10 = this.props).onPanResponderTerminationRequest) !== null && _this$props$onPanResp4 !== void 0 && _this$props$onPanResp4.call(_this$props10, evt, gestureState, this._getZoomableViewEventObject())); + this.props.onPanResponderTerminate?.(evt, gestureState, this._getZoomableViewEventObject()); }, + onPanResponderTerminationRequest: (evt, gestureState) => !!this.props.onPanResponderTerminationRequest?.(evt, gestureState, this._getZoomableViewEventObject()), // Defaults to true to prevent parent components, such as React Navigation's tab view, from taking over as responder. - onShouldBlockNativeResponder: (evt, gestureState) => { - var _this$props$onShouldB, _this$props$onShouldB2, _this$props11; - - return (_this$props$onShouldB = (_this$props$onShouldB2 = (_this$props11 = this.props).onShouldBlockNativeResponder) === null || _this$props$onShouldB2 === void 0 ? void 0 : _this$props$onShouldB2.call(_this$props11, evt, gestureState, this._getZoomableViewEventObject())) !== null && _this$props$onShouldB !== void 0 ? _this$props$onShouldB : true; - }, - onStartShouldSetPanResponderCapture: (evt, gestureState) => { - var _this$props$onStartSh, _this$props12; - - return !!((_this$props$onStartSh = (_this$props12 = this.props).onStartShouldSetPanResponderCapture) !== null && _this$props$onStartSh !== void 0 && _this$props$onStartSh.call(_this$props12, evt, gestureState)); - }, - onMoveShouldSetPanResponderCapture: (evt, gestureState) => { - var _this$props$onMoveSho, _this$props13; - - return !!((_this$props$onMoveSho = (_this$props13 = this.props).onMoveShouldSetPanResponderCapture) !== null && _this$props$onMoveSho !== void 0 && _this$props$onMoveSho.call(_this$props13, evt, gestureState)); - } + onShouldBlockNativeResponder: (evt, gestureState) => this.props.onShouldBlockNativeResponder?.(evt, gestureState, this._getZoomableViewEventObject()) ?? true, + onStartShouldSetPanResponderCapture: (evt, gestureState) => !!this.props.onStartShouldSetPanResponderCapture?.(evt, gestureState), + onMoveShouldSetPanResponderCapture: (evt, gestureState) => !!this.props.onMoveShouldSetPanResponderCapture?.(evt, gestureState) }); this.zoomSubjectWrapperRef = /*#__PURE__*/(0, _react.createRef)(); if (this.props.zoomAnimatedValue) this.zoomAnim = this.props.zoomAnimatedValue; @@ -486,10 +147,8 @@ class ReactNativeZoomableView extends _react.Component { this.lastGestureTouchDistance = 150; this.gestureType = null; } - raisePin() { if (!this.props.animatePin) return; - _reactNative.Animated.timing(this.pinAnim, { toValue: { x: 0, @@ -500,10 +159,8 @@ class ReactNativeZoomableView extends _react.Component { duration: 100 }).start(); } - dropPin() { if (!this.props.animatePin) return; - _reactNative.Animated.timing(this.pinAnim, { toValue: { x: 0, @@ -514,34 +171,26 @@ class ReactNativeZoomableView extends _react.Component { duration: 100 }).start(); } - set offsetX(x) { this.__setOffset('x', x); } - set offsetY(y) { this.__setOffset('y', y); } - get offsetX() { return this.__getOffset('x'); } - get offsetY() { return this.__getOffset('y'); } - __setOffset(axis, offset) { const offsetState = this.__offsets[axis]; - if (this.props.bindToBorders) { const containerSize = axis === 'x' ? this.state.originalWidth : this.state.originalHeight; const contentSize = axis === 'x' ? this.props.contentWidth || this.state.originalWidth : this.props.contentHeight || this.state.originalHeight; const boundOffset = contentSize && containerSize && this.props.panBoundaryPadding != null ? (0, _applyPanBoundariesToOffset.applyPanBoundariesToOffset)(offset, containerSize, contentSize, this.zoomLevel, this.props.panBoundaryPadding) : offset; - if (!this.gestureType && !offsetState.boundaryCrossedAnimInEffect) { const boundariesApplied = boundOffset !== offset && boundOffset.toFixed(3) !== offset.toFixed(3); - if (boundariesApplied) { offsetState.boundaryCrossedAnimInEffect = true; (0, _animations.getBoundaryCrossedAnim)(this.panAnim[axis], boundOffset).start(() => { @@ -551,111 +200,91 @@ class ReactNativeZoomableView extends _react.Component { } } } - offsetState.value = offset; } - __getOffset(axis) { return this.__offsets[axis].value; } - componentDidUpdate(prevProps, prevState) { - var _prevProps$staticPinP, _this$props$staticPin, _prevProps$staticPinP2, _this$props$staticPin2; - const { zoomEnabled, initialZoom } = this.props; - if (prevProps.zoomEnabled && !zoomEnabled && initialZoom) { this.zoomLevel = initialZoom; this.zoomAnim.setValue(this.zoomLevel); } - if (!this.onTransformInvocationInitialized && this._invokeOnTransform().successful) { this.panAnim.addListener(() => this._invokeOnTransform()); this.zoomAnim.addListener(() => this._invokeOnTransform()); this.onTransformInvocationInitialized = true; } - const currState = this.state; const originalMeasurementsChanged = currState.originalHeight !== prevState.originalHeight || currState.originalWidth !== prevState.originalWidth || currState.originalPageX !== prevState.originalPageX || currState.originalPageY !== prevState.originalPageY || currState.originalX !== prevState.originalX || currState.originalY !== prevState.originalY; - const staticPinPositionChanged = ((_prevProps$staticPinP = prevProps.staticPinPosition) === null || _prevProps$staticPinP === void 0 ? void 0 : _prevProps$staticPinP.x) !== ((_this$props$staticPin = this.props.staticPinPosition) === null || _this$props$staticPin === void 0 ? void 0 : _this$props$staticPin.x) || ((_prevProps$staticPinP2 = prevProps.staticPinPosition) === null || _prevProps$staticPinP2 === void 0 ? void 0 : _prevProps$staticPinP2.y) !== ((_this$props$staticPin2 = this.props.staticPinPosition) === null || _this$props$staticPin2 === void 0 ? void 0 : _this$props$staticPin2.y); // We use a custom `onLayout` event, so the clients can stay in-sync + const staticPinPositionChanged = prevProps.staticPinPosition?.x !== this.props.staticPinPosition?.x || prevProps.staticPinPosition?.y !== this.props.staticPinPosition?.y; + + // We use a custom `onLayout` event, so the clients can stay in-sync // with when the internal measurements are actually saved to the state, // thus helping them apply transformations at more accurate timings - if (originalMeasurementsChanged) { - var _this$props$onLayout, _this$props14; - const layout = { width: currState.originalWidth, height: currState.originalHeight, x: currState.originalX, y: currState.originalY }; - (_this$props$onLayout = (_this$props14 = this.props).onLayout) === null || _this$props$onLayout === void 0 ? void 0 : _this$props$onLayout.call(_this$props14, { + this.props.onLayout?.({ nativeEvent: { layout } }); } - if (this.onTransformInvocationInitialized && (originalMeasurementsChanged || staticPinPositionChanged)) { this._invokeOnTransform(); } } - componentDidMount() { - this.measureZoomSubject(); // We've already run `grabZoomSubjectOriginalMeasurements` at various events + this.measureZoomSubject(); + // We've already run `grabZoomSubjectOriginalMeasurements` at various events // to make sure the measurements are promptly updated. // However, there might be cases we haven't accounted for, especially when // native processes are involved. To account for those cases, // we'll use an interval here to ensure we're always up-to-date. // The `setState` in `grabZoomSubjectOriginalMeasurements` won't trigger a rerender // if the values given haven't changed, so we're not running performance risk here. - this.measureZoomSubjectInterval = setInterval(this.measureZoomSubject, 1e3); } - componentWillUnmount() { this.measureZoomSubjectInterval && clearInterval(this.measureZoomSubjectInterval); } + debouncedOnStaticPinPositionChange = (0, _lodash.debounce)(position => this.props.onStaticPinPositionChange?.(position), 100); /** * try to invoke onTransform * @private */ _invokeOnTransform() { - var _this$props$onTransfo, _this$props15; - const zoomableViewEvent = this._getZoomableViewEventObject(); - const position = this._staticPinPosition(); - if (!zoomableViewEvent.originalWidth || !zoomableViewEvent.originalHeight) return { successful: false }; - (_this$props$onTransfo = (_this$props15 = this.props).onTransform) === null || _this$props$onTransfo === void 0 ? void 0 : _this$props$onTransfo.call(_this$props15, zoomableViewEvent); - + this.props.onTransform?.(zoomableViewEvent); if (position) { - var _this$props$onStaticP3, _this$props16; - - (_this$props$onStaticP3 = (_this$props16 = this.props).onStaticPinPositionMove) === null || _this$props$onStaticP3 === void 0 ? void 0 : _this$props$onStaticP3.call(_this$props16, position); + this.props.onStaticPinPositionMove?.(position); this.debouncedOnStaticPinPositionChange(position); } - return { successful: true }; } + /** * Returns additional information about components current state for external event hooks * * @returns {{}} * @private */ - - _getZoomableViewEventObject(overwriteObj = {}) { return { zoomLevel: this.zoomLevel, @@ -668,13 +297,196 @@ class ReactNativeZoomableView extends _react.Component { ...overwriteObj }; } + /** * Get the original box dimensions and save them for later use. * (They will be used to calculate boxBorders) * * @private */ + measureZoomSubject = () => { + // make sure we measure after animations are complete + requestAnimationFrame(() => { + // this setTimeout is here to fix a weird issue on iOS where the measurements are all `0` + // when navigating back (react-navigation stack) from another view + // while closing the keyboard at the same time + setTimeout(() => { + // In normal conditions, we're supposed to measure zoomSubject instead of its wrapper. + // However, our zoomSubject may have been transformed by an initial zoomLevel or offset, + // in which case these measurements will not represent the true "original" measurements. + // We just need to make sure the zoomSubjectWrapper perfectly aligns with the zoomSubject + // (no border, space, or anything between them) + this.zoomSubjectWrapperRef.current?.measure((x, y, width, height, pageX, pageY) => { + // When the component is off-screen, these become all 0s, so we don't set them + // to avoid messing up calculations, especially ones that are done right after + // the component transitions from hidden to visible. + if (!pageX && !pageY && !width && !height) return; + + // If these values are all the same, don't re-set them in state + // this way we don't re-render + if (this.state.originalX === x && this.state.originalY === y && this.state.originalWidth === width && this.state.originalHeight === height && this.state.originalPageX === pageX && this.state.originalPageY === pageY) { + return; + } + this.setState({ + originalX: x, + originalY: y, + originalWidth: width, + originalHeight: height, + originalPageX: pageX, + originalPageY: pageY + }); + }); + }); + }); + }; + + /** + * Handles the start of touch events and checks for taps + * + * @param e + * @param gestureState + * @returns {boolean} + * + * @private + */ + _handleStartShouldSetPanResponder = (e, gestureState) => { + if (this.props.onStartShouldSetPanResponder) { + this.props.onStartShouldSetPanResponder(e, gestureState, this._getZoomableViewEventObject(), false); + } + + // Always set pan responder on start + // of gesture so we can handle tap. + // "Pan threshold validation" will be handled + // in `onPanResponderMove` instead of in `onMoveShouldSetPanResponder` + return true; + }; + + /** + * Calculates pinch distance + * + * @param e + * @param gestureState + * @private + */ + _handlePanResponderGrant = (e, gestureState) => { + if (this.props.onLongPress) { + e.persist(); + this.longPressTimeout = setTimeout(() => { + this.props.onLongPress?.(e, gestureState, this._getZoomableViewEventObject()); + this.longPressTimeout = null; + }, this.props.longPressDuration); + } + this.props.onPanResponderGrant?.(e, gestureState, this._getZoomableViewEventObject()); + this.panAnim.stopAnimation(); + this.zoomAnim.stopAnimation(); + this.gestureStarted = true; + this.raisePin(); + }; + /** + * Handles the end of touch events + * + * @param e + * @param gestureState + * + * @private + */ + _handlePanResponderEnd = (e, gestureState) => { + if (!this.gestureType) { + this._resolveAndHandleTap(e); + } + this.setState({ + debugPoints: [] + }); + this.lastGestureCenterPosition = null; + const disableMomentum = this.props.disableMomentum || this.props.panEnabled && this.gestureType === 'shift' && this.props.disablePanOnInitialZoom && this.zoomLevel === this.props.initialZoom; + + // Trigger final shift animation unless disablePanOnInitialZoom is set and we're on the initial zoom level + // or disableMomentum + if (!disableMomentum) { + (0, _animations.getPanMomentumDecayAnim)(this.panAnim, { + x: gestureState.vx / this.zoomLevel, + y: gestureState.vy / this.zoomLevel + }).start(); + } + if (this.longPressTimeout) { + clearTimeout(this.longPressTimeout); + this.longPressTimeout = null; + } + this.props.onPanResponderEnd?.(e, gestureState, this._getZoomableViewEventObject()); + if (this.gestureType === 'pinch') { + this.props.onZoomEnd?.(e, gestureState, this._getZoomableViewEventObject()); + } else if (this.gestureType === 'shift') { + this.props.onShiftingEnd?.(e, gestureState, this._getZoomableViewEventObject()); + } + if (this.props.staticPinPosition) { + this._updateStaticPin(); + } + this.dropPin(); + this.gestureType = null; + this.gestureStarted = false; + }; + + /** + * Handles the actual movement of our pan responder + * + * @param e + * @param gestureState + * + * @private + */ + _handlePanResponderMove = (e, gestureState) => { + if (this.props.onPanResponderMove) { + if (this.props.onPanResponderMove(e, gestureState, this._getZoomableViewEventObject())) { + return false; + } + } + + // Only supports 2 touches and below, + // any invalid number will cause the gesture to end. + if (gestureState.numberActiveTouches <= 2) { + if (!this.gestureStarted) { + this._handlePanResponderGrant(e, gestureState); + } + } else { + if (this.gestureStarted) { + this._handlePanResponderEnd(e, gestureState); + } + return true; + } + if (gestureState.numberActiveTouches === 2) { + if (this.longPressTimeout) { + clearTimeout(this.longPressTimeout); + this.longPressTimeout = null; + } + + // change some measurement states when switching gesture to ensure a smooth transition + if (this.gestureType !== 'pinch') { + this.lastGestureCenterPosition = (0, _helper.calcGestureCenterPoint)(e, gestureState); + this.lastGestureTouchDistance = (0, _helper.calcGestureTouchDistance)(e, gestureState); + } + this.gestureType = 'pinch'; + this._handlePinching(e, gestureState); + } else if (gestureState.numberActiveTouches === 1) { + if (this.longPressTimeout && (Math.abs(gestureState.dx) > 5 || Math.abs(gestureState.dy) > 5)) { + clearTimeout(this.longPressTimeout); + this.longPressTimeout = null; + } + // change some measurement states when switching gesture to ensure a smooth transition + if (this.gestureType !== 'shift') { + this.lastGestureCenterPosition = (0, _helper.calcGestureCenterPoint)(e, gestureState); + } + const { + dx, + dy + } = gestureState; + const isShiftGesture = Math.abs(dx) > 2 || Math.abs(dy) > 2; + if (isShiftGesture) { + this.gestureType = 'shift'; + this._handleShifting(gestureState); + } + } + }; /** * Handles the pinch movement and zooming @@ -685,8 +497,6 @@ class ReactNativeZoomableView extends _react.Component { * @private */ _handlePinching(e, gestureState) { - var _this$props$onZoomAft, _this$props17; - if (!this.props.zoomEnabled) return; const { maxZoom, @@ -695,39 +505,36 @@ class ReactNativeZoomableView extends _react.Component { pinchToZoomOutSensitivity } = this.props; const distance = (0, _helper.calcGestureTouchDistance)(e, gestureState); - if (this.props.onZoomBefore && this.props.onZoomBefore(e, gestureState, this._getZoomableViewEventObject())) { return; } - if (!distance) return; - if (!this.lastGestureTouchDistance) return; // define the new zoom level and take zoom level sensitivity into consideration + if (!this.lastGestureTouchDistance) return; + // define the new zoom level and take zoom level sensitivity into consideration const zoomGrowthFromLastGestureState = distance / this.lastGestureTouchDistance; this.lastGestureTouchDistance = distance; const pinchToZoomSensitivity = zoomGrowthFromLastGestureState < 1 ? pinchToZoomOutSensitivity : pinchToZoomInSensitivity; if (pinchToZoomSensitivity == null) return; - const deltaGrowth = zoomGrowthFromLastGestureState - 1; // 0 - no resistance + const deltaGrowth = zoomGrowthFromLastGestureState - 1; + // 0 - no resistance // 10 - 90% resistance - const deltaGrowthAdjustedBySensitivity = deltaGrowth * (1 - pinchToZoomSensitivity * 9 / 100); - let newZoomLevel = this.zoomLevel * (1 + deltaGrowthAdjustedBySensitivity); // make sure max and min zoom levels are respected + let newZoomLevel = this.zoomLevel * (1 + deltaGrowthAdjustedBySensitivity); + // make sure max and min zoom levels are respected if (maxZoom != null && newZoomLevel > maxZoom) { newZoomLevel = maxZoom; } - if (minZoom != null && newZoomLevel < minZoom) { newZoomLevel = minZoom; } - const gestureCenterPoint = (0, _helper.calcGestureCenterPoint)(e, gestureState); if (!gestureCenterPoint) return; let zoomCenter = { x: gestureCenterPoint.x - this.state.originalPageX, y: gestureCenterPoint.y - this.state.originalPageY }; - if (this.props.staticPinPosition) { // When we use a static pin position, the zoom centre is the same as that position, // otherwise the pin moves around way too much while zooming. @@ -735,9 +542,9 @@ class ReactNativeZoomableView extends _react.Component { x: this.props.staticPinPosition.x, y: this.props.staticPinPosition.y }; - } // Uncomment to debug - + } + // Uncomment to debug this.props.debug && this._setPinchDebugPoints(e, zoomCenter); const { originalHeight, @@ -750,14 +557,11 @@ class ReactNativeZoomableView extends _react.Component { if (!originalHeight || !originalWidth) return; let offsetY = (0, _helper.calcNewScaledOffsetForZoomCentering)(oldOffsetY, originalHeight, oldScale, newScale, zoomCenter.y); let offsetX = (0, _helper.calcNewScaledOffsetForZoomCentering)(oldOffsetX, originalWidth, oldScale, newScale, zoomCenter.x); - const offsetShift = this._calcOffsetShiftSinceLastGestureState(gestureCenterPoint); - if (offsetShift) { offsetX += offsetShift.x; offsetY += offsetShift.y; } - this.offsetX = offsetX; this.offsetY = offsetY; this.zoomLevel = newScale; @@ -766,16 +570,15 @@ class ReactNativeZoomableView extends _react.Component { y: this.offsetY }); this.zoomAnim.setValue(this.zoomLevel); - (_this$props$onZoomAft = (_this$props17 = this.props).onZoomAfter) === null || _this$props$onZoomAft === void 0 ? void 0 : _this$props$onZoomAft.call(_this$props17, e, gestureState, this._getZoomableViewEventObject()); + this.props.onZoomAfter?.(e, gestureState, this._getZoomableViewEventObject()); } + /** * Used to debug pinch events * @param gestureResponderEvent * @param zoomCenter * @param points */ - - _setPinchDebugPoints(gestureResponderEvent, zoomCenter, ...points) { const { touches @@ -794,6 +597,7 @@ class ReactNativeZoomableView extends _react.Component { }, zoomCenter, ...points] }); } + /** * Calculates the amount the offset should shift since the last position during panning * @@ -801,14 +605,11 @@ class ReactNativeZoomableView extends _react.Component { * * @private */ - - _calcOffsetShiftSinceLastGestureState(gestureCenterPoint) { const { movementSensibility } = this.props; let shift = null; - if (this.lastGestureCenterPosition && movementSensibility) { const dx = gestureCenterPoint.x - this.lastGestureCenterPosition.x; const dy = gestureCenterPoint.y - this.lastGestureCenterPosition.y; @@ -819,10 +620,10 @@ class ReactNativeZoomableView extends _react.Component { y: shiftY }; } - this.lastGestureCenterPosition = gestureCenterPoint; return shift; } + /** * Handles movement by tap and move * @@ -830,23 +631,18 @@ class ReactNativeZoomableView extends _react.Component { * * @private */ - - _handleShifting(gestureState) { // Skips shifting if panEnabled is false or disablePanOnInitialZoom is true and we're on the initial zoom level if (!this.props.panEnabled || this.props.disablePanOnInitialZoom && this.zoomLevel === this.props.initialZoom) { return; } - const shift = this._calcOffsetShiftSinceLastGestureState({ x: gestureState.moveX, y: gestureState.moveY }); - if (!shift) return; const offsetX = this.offsetX + shift.x; const offsetY = this.offsetY + shift.y; - if (this.props.debug && this.state.originalPageX && this.state.originalPageY) { const x = gestureState.moveX - this.state.originalPageX; const y = gestureState.moveY - this.state.originalPageY; @@ -857,11 +653,10 @@ class ReactNativeZoomableView extends _react.Component { }] }); } - this._setNewOffsetPosition(offsetX, offsetY); - this.raisePin(); } + /** * Set the state to offset moved * @@ -869,18 +664,14 @@ class ReactNativeZoomableView extends _react.Component { * @param {number} newOffsetY * @returns */ - - _setNewOffsetPosition(newOffsetX, newOffsetY) { const { onShiftingBefore, onShiftingAfter } = this.props; - - if (onShiftingBefore !== null && onShiftingBefore !== void 0 && onShiftingBefore(null, null, this._getZoomableViewEventObject())) { + if (onShiftingBefore?.(null, null, this._getZoomableViewEventObject())) { return; } - this.offsetX = newOffsetX; this.offsetY = newOffsetY; this.panAnim.setValue({ @@ -888,8 +679,9 @@ class ReactNativeZoomableView extends _react.Component { y: this.offsetY }); this.zoomAnim.setValue(this.zoomLevel); - onShiftingAfter === null || onShiftingAfter === void 0 ? void 0 : onShiftingAfter(null, null, this._getZoomableViewEventObject()); + onShiftingAfter?.(null, null, this._getZoomableViewEventObject()); } + /** * Check whether the press event is double tap * or single tap and handle the event accordingly @@ -898,21 +690,126 @@ class ReactNativeZoomableView extends _react.Component { * * @private */ + _resolveAndHandleTap = e => { + const now = Date.now(); + if (this.doubleTapFirstTapReleaseTimestamp && this.props.doubleTapDelay && now - this.doubleTapFirstTapReleaseTimestamp < this.props.doubleTapDelay) { + this.doubleTapFirstTap && this._addTouch({ + ...this.doubleTapFirstTap, + id: now.toString(), + isSecondTap: true + }); + this.singleTapTimeoutId && clearTimeout(this.singleTapTimeoutId); + delete this.doubleTapFirstTapReleaseTimestamp; + delete this.singleTapTimeoutId; + delete this.doubleTapFirstTap; + this._handleDoubleTap(e); + } else { + this.doubleTapFirstTapReleaseTimestamp = now; + this.doubleTapFirstTap = { + id: now.toString(), + x: e.nativeEvent.pageX - this.state.originalPageX, + y: e.nativeEvent.pageY - this.state.originalPageY + }; + this._addTouch(this.doubleTapFirstTap); + // persist event so e.nativeEvent is preserved after a timeout delay + e.persist(); + this.singleTapTimeoutId = setTimeout(() => { + delete this.doubleTapFirstTapReleaseTimestamp; + delete this.singleTapTimeoutId; + // Pan to the tapped location + if (this.props.staticPinPosition && this.doubleTapFirstTap) { + const tapX = this.props.staticPinPosition.x - this.doubleTapFirstTap.x; + const tapY = this.props.staticPinPosition.y - this.doubleTapFirstTap.y; + _reactNative.Animated.timing(this.panAnim, { + toValue: { + x: this.offsetX + tapX / this.zoomLevel, + y: this.offsetY + tapY / this.zoomLevel + }, + useNativeDriver: true, + duration: 200 + }).start(() => { + this._updateStaticPin(); + }); + } + this.props.onSingleTap?.(e, this._getZoomableViewEventObject()); + }, this.props.doubleTapDelay); + } + }; + moveStaticPinTo = (position, duration) => { + const { + originalWidth, + originalHeight + } = this.state; + const { + staticPinPosition, + contentWidth, + contentHeight + } = this.props; + if (!staticPinPosition) return; + if (!originalWidth || !originalHeight) return; + if (!contentWidth || !contentHeight) return; + + // Offset for the static pin + const pinX = staticPinPosition.x - originalWidth / 2; + const pinY = staticPinPosition.y - originalHeight / 2; + this.offsetX = contentWidth / 2 - position.x + pinX / this.zoomLevel; + this.offsetY = contentHeight / 2 - position.y + pinY / this.zoomLevel; + if (duration) { + _reactNative.Animated.timing(this.panAnim, { + toValue: { + x: this.offsetX, + y: this.offsetY + }, + useNativeDriver: true, + duration + }).start(); + } else { + this.panAnim.setValue({ + x: this.offsetX, + y: this.offsetY + }); + } + }; + _staticPinPosition = () => { + if (!this.props.staticPinPosition) return; + if (!this.props.contentWidth || !this.props.contentHeight) return; + return (0, _coordinateConversion.viewportPositionToImagePosition)({ + viewportPosition: { + x: this.props.staticPinPosition.x, + y: this.props.staticPinPosition.y + }, + imageSize: { + height: this.props.contentHeight, + width: this.props.contentWidth + }, + zoomableEvent: { + ...this._getZoomableViewEventObject(), + offsetX: this.offsetX, + offsetY: this.offsetY, + zoomLevel: this.zoomLevel + } + }); + }; + _updateStaticPin = () => { + const position = this._staticPinPosition(); + if (!position) return; + this.props.onStaticPinPositionChange?.(position); + }; _addTouch(touch) { this.touches.push(touch); this.setState({ touches: [...this.touches] }); } - _removeTouch(touch) { this.touches.splice(this.touches.indexOf(touch), 1); this.setState({ touches: [...this.touches] }); } + /** * Handles the double tap event * @@ -920,47 +817,43 @@ class ReactNativeZoomableView extends _react.Component { * * @private */ - - _handleDoubleTap(e) { const { onDoubleTapBefore, onDoubleTapAfter, doubleTapZoomToCenter } = this.props; - onDoubleTapBefore === null || onDoubleTapBefore === void 0 ? void 0 : onDoubleTapBefore(e, this._getZoomableViewEventObject()); - + onDoubleTapBefore?.(e, this._getZoomableViewEventObject()); const nextZoomStep = this._getNextZoomStep(); - if (nextZoomStep == null) return; const { originalPageX, originalPageY - } = this.state; // define new zoom position coordinates + } = this.state; + // define new zoom position coordinates const zoomPositionCoordinates = { x: e.nativeEvent.pageX - originalPageX, y: e.nativeEvent.pageY - originalPageY - }; // if doubleTapZoomToCenter enabled -> always zoom to center instead + }; + // if doubleTapZoomToCenter enabled -> always zoom to center instead if (doubleTapZoomToCenter) { zoomPositionCoordinates.x = 0; zoomPositionCoordinates.y = 0; } - this.zoomTo(nextZoomStep, zoomPositionCoordinates); - onDoubleTapAfter === null || onDoubleTapAfter === void 0 ? void 0 : onDoubleTapAfter(e, this._getZoomableViewEventObject({ + onDoubleTapAfter?.(e, this._getZoomableViewEventObject({ zoomLevel: nextZoomStep })); } + /** * Returns the next zoom step based on current step and zoomStep property. * If we are zoomed all the way in -> return to initialzoom * * @returns {*} */ - - _getNextZoomStep() { const { zoomStep, @@ -971,20 +864,17 @@ class ReactNativeZoomableView extends _react.Component { zoomLevel } = this; if (maxZoom == null) return; - if (zoomLevel.toFixed(2) === maxZoom.toFixed(2)) { return initialZoom; } - if (zoomStep == null) return; const nextZoomStep = zoomLevel * (1 + zoomStep); - if (nextZoomStep > maxZoom) { return maxZoom; } - return nextZoomStep; } + /** * Zooms to a specific level. A "zoom center" can be provided, which specifies * the point that will remain in the same position on the screen after the zoom. @@ -994,25 +884,21 @@ class ReactNativeZoomableView extends _react.Component { * @param newZoomLevel * @param zoomCenter - If not supplied, the container's center is the zoom center */ - - zoomTo(newZoomLevel, zoomCenter) { - var _this$props$onZoomBef, _this$props18, _this$props$onZoomAft2, _this$props19; - if (!this.props.zoomEnabled) return false; if (this.props.maxZoom && newZoomLevel > this.props.maxZoom) return false; if (this.props.minZoom && newZoomLevel < this.props.minZoom) return false; - (_this$props$onZoomBef = (_this$props18 = this.props).onZoomBefore) === null || _this$props$onZoomBef === void 0 ? void 0 : _this$props$onZoomBef.call(_this$props18, null, null, this._getZoomableViewEventObject()); // == Perform Pan Animation to preserve the zoom center while zooming == + this.props.onZoomBefore?.(null, null, this._getZoomableViewEventObject()); + // == Perform Pan Animation to preserve the zoom center while zooming == let listenerId = ''; - if (zoomCenter) { // Calculates panAnim values based on changes in zoomAnim. - let prevScale = this.zoomLevel; // Since zoomAnim is calculated in native driver, + let prevScale = this.zoomLevel; + // Since zoomAnim is calculated in native driver, // it will jitter panAnim once in a while, // because here panAnim is being calculated in js. // However the jittering should mostly occur in simulator. - listenerId = this.zoomAnim.addListener(({ value: newScale }) => { @@ -1022,16 +908,18 @@ class ReactNativeZoomableView extends _react.Component { }); prevScale = newScale; }); - } // == Perform Zoom Animation == - + } + // == Perform Zoom Animation == (0, _animations.getZoomToAnimation)(this.zoomAnim, newZoomLevel).start(() => { this.zoomAnim.removeListener(listenerId); - }); // == Zoom Animation Ends == + }); + // == Zoom Animation Ends == - (_this$props$onZoomAft2 = (_this$props19 = this.props).onZoomAfter) === null || _this$props$onZoomAft2 === void 0 ? void 0 : _this$props$onZoomAft2.call(_this$props19, null, null, this._getZoomableViewEventObject()); + this.props.onZoomAfter?.(null, null, this._getZoomableViewEventObject()); return true; } + /** * Zooms in or out by a specified change level * Use a positive number for `zoomLevelChange` to zoom in @@ -1043,13 +931,12 @@ class ReactNativeZoomableView extends _react.Component { * * @return {bool} */ - - zoomBy(zoomLevelChange) { // if no zoom level Change given -> just use zoom step - zoomLevelChange || (zoomLevelChange = this.props.zoomStep || 0); + zoomLevelChange ||= this.props.zoomStep || 0; return this.zoomTo(this.zoomLevel + zoomLevelChange); } + /** * Moves the zoomed view to a specified position * Returns a promise when finished @@ -1059,8 +946,6 @@ class ReactNativeZoomableView extends _react.Component { * * @return {bool} */ - - moveTo(newOffsetX, newOffsetY) { const { originalWidth, @@ -1069,9 +954,9 @@ class ReactNativeZoomableView extends _react.Component { if (!originalWidth || !originalHeight) return; const offsetX = (newOffsetX - originalWidth / 2) / this.zoomLevel; const offsetY = (newOffsetY - originalHeight / 2) / this.zoomLevel; - this._setNewOffsetPosition(-offsetX, -offsetY); } + /** * Moves the zoomed view by a certain amount. * @@ -1082,15 +967,11 @@ class ReactNativeZoomableView extends _react.Component { * * @return {bool} */ - - moveBy(offsetChangeX, offsetChangeY) { const offsetX = (this.offsetX * this.zoomLevel - offsetChangeX) / this.zoomLevel; const offsetY = (this.offsetY * this.zoomLevel - offsetChangeY) / this.zoomLevel; - this._setNewOffsetPosition(offsetX, offsetY); } - render() { const { staticPinIcon, @@ -1107,87 +988,57 @@ class ReactNativeZoomableView extends _react.Component { touches, debugPoints = [] } = this.state; - return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({ - style: styles.container - }, this.gestureHandlers.panHandlers, { + return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, { + style: styles.container, + ...this.gestureHandlers.panHandlers, ref: this.zoomSubjectWrapperRef, - onLayout: this.measureZoomSubject - }), /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, { - style: [styles.zoomSubject, this.props.style, { - transform: [// In RN79, we need to split the scale into X and Y to avoid - // the content getting pixelated when zooming in - { - scaleX: this.zoomAnim - }, { - scaleY: this.zoomAnim - }, ...this.panAnim.getTranslateTransform()] - }] - }, children), visualTouchFeedbackEnabled && (touches === null || touches === void 0 ? void 0 : touches.map(touch => doubleTapDelay && /*#__PURE__*/_react.default.createElement(_components.AnimatedTouchFeedback, { - x: touch.x, - y: touch.y, - key: touch.id, - animationDuration: doubleTapDelay, - onAnimationDone: () => { - this._removeTouch(touch); - } - }))), debugPoints.map(({ - x, - y - }, index) => { - return /*#__PURE__*/_react.default.createElement(_debugHelper.DebugTouchPoint, { - key: index, - x: x, - y: y - }); - }), staticPinPosition && /*#__PURE__*/_react.default.createElement(_StaticPin.StaticPin, { - staticPinIcon: staticPinIcon, - staticPinPosition: staticPinPosition, - pinSize: pinSize, - onPress: onStaticPinPress, - onLongPress: onStaticPinLongPress, - onParentMove: this._handlePanResponderMove, - pinAnim: this.pinAnim, - setPinSize: size => { - this.setState({ - pinSize: size - }); - }, - pinProps: pinProps - })); + onLayout: this.measureZoomSubject, + children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, { + style: [styles.zoomSubject, this.props.style, { + transform: [ + // In RN79, we need to split the scale into X and Y to avoid + // the content getting pixelated when zooming in + { + scaleX: this.zoomAnim + }, { + scaleY: this.zoomAnim + }, ...this.panAnim.getTranslateTransform()] + }], + children: children + }), visualTouchFeedbackEnabled && touches?.map(touch => doubleTapDelay && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.AnimatedTouchFeedback, { + x: touch.x, + y: touch.y, + animationDuration: doubleTapDelay, + onAnimationDone: () => { + this._removeTouch(touch); + } + }, touch.id)), debugPoints.map(({ + x, + y + }, index) => { + return /*#__PURE__*/(0, _jsxRuntime.jsx)(_debugHelper.DebugTouchPoint, { + x: x, + y: y + }, index); + }), staticPinPosition && /*#__PURE__*/(0, _jsxRuntime.jsx)(_StaticPin.StaticPin, { + staticPinIcon: staticPinIcon, + staticPinPosition: staticPinPosition, + pinSize: pinSize, + onPress: onStaticPinPress, + onLongPress: onStaticPinLongPress, + onParentMove: this._handlePanResponderMove, + pinAnim: this.pinAnim, + setPinSize: size => { + this.setState({ + pinSize: size + }); + }, + pinProps: pinProps + })] + }); } - } - exports.ReactNativeZoomableView = ReactNativeZoomableView; - -_defineProperty(ReactNativeZoomableView, "defaultProps", { - zoomEnabled: true, - panEnabled: true, - initialZoom: 1, - initialOffsetX: 0, - initialOffsetY: 0, - maxZoom: 1.5, - minZoom: 0.5, - pinchToZoomInSensitivity: 1, - pinchToZoomOutSensitivity: 1, - movementSensibility: 1, - doubleTapDelay: 300, - bindToBorders: true, - zoomStep: 0.5, - onLongPress: null, - longPressDuration: 700, - contentWidth: undefined, - contentHeight: undefined, - panBoundaryPadding: 0, - visualTouchFeedbackEnabled: true, - staticPinPosition: undefined, - staticPinIcon: undefined, - onStaticPinPositionChange: undefined, - onStaticPinPositionMove: undefined, - animatePin: true, - disablePanOnInitialZoom: false -}); - const styles = _reactNative.StyleSheet.create({ container: { alignItems: 'center', @@ -1203,7 +1054,5 @@ const styles = _reactNative.StyleSheet.create({ width: '100%' } }); - -var _default = ReactNativeZoomableView; -exports.default = _default; +var _default = exports.default = ReactNativeZoomableView; //# sourceMappingURL=ReactNativeZoomableView.js.map \ No newline at end of file diff --git a/lib/commonjs/ReactNativeZoomableView.js.map b/lib/commonjs/ReactNativeZoomableView.js.map index bd17215e..54e8037d 100644 --- a/lib/commonjs/ReactNativeZoomableView.js.map +++ b/lib/commonjs/ReactNativeZoomableView.js.map @@ -1 +1 @@ -{"version":3,"sources":["ReactNativeZoomableView.tsx"],"names":["initialState","originalWidth","originalHeight","originalPageX","originalPageY","originalX","originalY","pinSize","width","height","ReactNativeZoomableView","Component","gestureStarted","v","_gestureStarted","constructor","props","Animated","ValueXY","x","y","Value","value","boundaryCrossedAnimInEffect","position","onStaticPinPositionChange","requestAnimationFrame","setTimeout","zoomSubjectWrapperRef","current","measure","pageX","pageY","state","setState","e","gestureState","onStartShouldSetPanResponder","_getZoomableViewEventObject","onLongPress","persist","longPressTimeout","longPressDuration","onPanResponderGrant","panAnim","stopAnimation","zoomAnim","raisePin","gestureType","_resolveAndHandleTap","debugPoints","lastGestureCenterPosition","disableMomentum","panEnabled","disablePanOnInitialZoom","zoomLevel","initialZoom","vx","vy","start","clearTimeout","onPanResponderEnd","onZoomEnd","onShiftingEnd","staticPinPosition","_updateStaticPin","dropPin","onPanResponderMove","numberActiveTouches","_handlePanResponderGrant","_handlePanResponderEnd","lastGestureTouchDistance","_handlePinching","Math","abs","dx","dy","isShiftGesture","_handleShifting","now","Date","doubleTapFirstTapReleaseTimestamp","doubleTapDelay","doubleTapFirstTap","_addTouch","id","toString","isSecondTap","singleTapTimeoutId","_handleDoubleTap","nativeEvent","tapX","tapY","timing","toValue","offsetX","offsetY","useNativeDriver","duration","onSingleTap","contentWidth","contentHeight","pinX","pinY","setValue","viewportPosition","imageSize","zoomableEvent","_staticPinPosition","gestureHandlers","PanResponder","create","_handleStartShouldSetPanResponder","_handlePanResponderMove","onPanResponderRelease","onPanResponderTerminate","evt","onPanResponderTerminationRequest","onShouldBlockNativeResponder","onStartShouldSetPanResponderCapture","onMoveShouldSetPanResponderCapture","zoomAnimatedValue","panAnimatedValueXY","initialOffsetX","initialOffsetY","addListener","animatePin","pinAnim","easing","Easing","out","ease","__setOffset","__getOffset","axis","offset","offsetState","__offsets","bindToBorders","containerSize","contentSize","boundOffset","panBoundaryPadding","boundariesApplied","toFixed","componentDidUpdate","prevProps","prevState","zoomEnabled","onTransformInvocationInitialized","_invokeOnTransform","successful","currState","originalMeasurementsChanged","staticPinPositionChanged","layout","onLayout","componentDidMount","measureZoomSubject","measureZoomSubjectInterval","setInterval","componentWillUnmount","clearInterval","zoomableViewEvent","onTransform","onStaticPinPositionMove","debouncedOnStaticPinPositionChange","overwriteObj","maxZoom","minZoom","pinchToZoomInSensitivity","pinchToZoomOutSensitivity","distance","onZoomBefore","zoomGrowthFromLastGestureState","pinchToZoomSensitivity","deltaGrowth","deltaGrowthAdjustedBySensitivity","newZoomLevel","gestureCenterPoint","zoomCenter","debug","_setPinchDebugPoints","oldOffsetX","oldOffsetY","oldScale","newScale","offsetShift","_calcOffsetShiftSinceLastGestureState","onZoomAfter","gestureResponderEvent","points","touches","movementSensibility","shift","shiftX","shiftY","moveX","moveY","_setNewOffsetPosition","newOffsetX","newOffsetY","onShiftingBefore","onShiftingAfter","touch","push","_removeTouch","splice","indexOf","onDoubleTapBefore","onDoubleTapAfter","doubleTapZoomToCenter","nextZoomStep","_getNextZoomStep","zoomPositionCoordinates","zoomTo","zoomStep","listenerId","prevScale","removeListener","zoomBy","zoomLevelChange","moveTo","moveBy","offsetChangeX","offsetChangeY","render","staticPinIcon","children","visualTouchFeedbackEnabled","onStaticPinLongPress","onStaticPinPress","pinProps","styles","container","panHandlers","zoomSubject","style","transform","scaleX","scaleY","getTranslateTransform","map","index","size","undefined","StyleSheet","alignItems","flex","justifyContent","overflow"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAYA;;AAKA;;AACA;;AACA;;AACA;;AAKA;;AACA;;;;;;;;;;AAUA,MAAMA,YAA0C,GAAG;AACjDC,EAAAA,aAAa,EAAE,CADkC;AAEjDC,EAAAA,cAAc,EAAE,CAFiC;AAGjDC,EAAAA,aAAa,EAAE,CAHkC;AAIjDC,EAAAA,aAAa,EAAE,CAJkC;AAKjDC,EAAAA,SAAS,EAAE,CALsC;AAMjDC,EAAAA,SAAS,EAAE,CANsC;AAOjDC,EAAAA,OAAO,EAAE;AAAEC,IAAAA,KAAK,EAAE,CAAT;AAAYC,IAAAA,MAAM,EAAE;AAApB;AAPwC,CAAnD;;AAUA,MAAMC,uBAAN,SAAsCC,gBAAtC,CAGE;AAsD0B,MAAdC,cAAc,CAACC,CAAD,EAAa;AACrC,SAAKC,eAAL,GAAuBD,CAAvB;AACD;;AAEwB,MAAdD,cAAc,GAAG;AAC1B,WAAO,KAAKE,eAAZ;AACD;AAED;AACF;AACA;AACA;;;AAQEC,EAAAA,WAAW,CAACC,KAAD,EAAsC;AAC/C,UAAMA,KAAN,EAD+C,CAE/C;AACA;AACA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AE;AACTa,IAAAA,UAAU,EAAE,QADH;AAETC,IAAAA,IAAI,EAAE,CAFG;AAGTC,IAAAA,cAAc,EAAE,QAHP;AAITC,IAAAA,QAAQ,EAAE,QAJD;AAKTlO,IAAAA,QAAQ,EAAE;AALD,GADoB;AAQ/BoN,EAAAA,WAAW,EAAE;AACXW,IAAAA,UAAU,EAAE,QADD;AAEXC,IAAAA,IAAI,EAAE,CAFK;AAGXC,IAAAA,cAAc,EAAE,QAHL;AAIXjP,IAAAA,KAAK,EAAE;AAJI;AARkB,CAAlB,CAAf;;eAgBeE,uB","sourcesContent":["import { debounce } from 'lodash';\nimport React, { Component, createRef, RefObject } from 'react';\nimport {\n Animated,\n Easing,\n GestureResponderEvent,\n PanResponder,\n PanResponderCallbacks,\n PanResponderGestureState,\n PanResponderInstance,\n StyleSheet,\n View,\n} from 'react-native';\n\nimport {\n getBoundaryCrossedAnim,\n getPanMomentumDecayAnim,\n getZoomToAnimation,\n} from './animations';\nimport { AnimatedTouchFeedback } from './components';\nimport { StaticPin } from './components/StaticPin';\nimport { DebugTouchPoint } from './debugHelper';\nimport {\n calcGestureCenterPoint,\n calcGestureTouchDistance,\n calcNewScaledOffsetForZoomCentering,\n} from './helper';\nimport { applyPanBoundariesToOffset } from './helper/applyPanBoundariesToOffset';\nimport { viewportPositionToImagePosition } from './helper/coordinateConversion';\nimport {\n ReactNativeZoomableViewProps,\n ReactNativeZoomableViewState,\n Size2D,\n TouchPoint,\n Vec2D,\n ZoomableViewEvent,\n} from './typings';\n\nconst initialState: ReactNativeZoomableViewState = {\n originalWidth: 0,\n originalHeight: 0,\n originalPageX: 0,\n originalPageY: 0,\n originalX: 0,\n originalY: 0,\n pinSize: { width: 0, height: 0 },\n};\n\nclass ReactNativeZoomableView extends Component<\n ReactNativeZoomableViewProps,\n ReactNativeZoomableViewState\n> {\n zoomSubjectWrapperRef: RefObject;\n gestureHandlers: PanResponderInstance;\n doubleTapFirstTapReleaseTimestamp: number | undefined;\n\n static defaultProps = {\n zoomEnabled: true,\n panEnabled: true,\n initialZoom: 1,\n initialOffsetX: 0,\n initialOffsetY: 0,\n maxZoom: 1.5,\n minZoom: 0.5,\n pinchToZoomInSensitivity: 1,\n pinchToZoomOutSensitivity: 1,\n movementSensibility: 1,\n doubleTapDelay: 300,\n bindToBorders: true,\n zoomStep: 0.5,\n onLongPress: null,\n longPressDuration: 700,\n contentWidth: undefined,\n contentHeight: undefined,\n panBoundaryPadding: 0,\n visualTouchFeedbackEnabled: true,\n staticPinPosition: undefined,\n staticPinIcon: undefined,\n onStaticPinPositionChange: undefined,\n onStaticPinPositionMove: undefined,\n animatePin: true,\n disablePanOnInitialZoom: false,\n };\n\n private panAnim = new Animated.ValueXY({ x: 0, y: 0 });\n private zoomAnim = new Animated.Value(1);\n private pinAnim = new Animated.ValueXY({ x: 0, y: 0 });\n\n private __offsets = {\n x: {\n value: 0,\n boundaryCrossedAnimInEffect: false,\n },\n y: {\n value: 0,\n boundaryCrossedAnimInEffect: false,\n },\n };\n\n private zoomLevel = 1;\n private lastGestureCenterPosition: { x: number; y: number } | null = null;\n private lastGestureTouchDistance: number | null = null;\n private gestureType: 'pinch' | 'shift' | null;\n\n private _gestureStarted = false;\n private set gestureStarted(v: boolean) {\n this._gestureStarted = v;\n }\n\n public get gestureStarted() {\n return this._gestureStarted;\n }\n\n /**\n * Last press time (used to evaluate whether user double tapped)\n * @type {number}\n */\n private longPressTimeout: NodeJS.Timeout | null = null;\n private onTransformInvocationInitialized: boolean | undefined;\n private singleTapTimeoutId: NodeJS.Timeout | undefined;\n private touches: TouchPoint[] = [];\n private doubleTapFirstTap: TouchPoint | undefined;\n private measureZoomSubjectInterval: NodeJS.Timer | undefined;\n\n constructor(props: ReactNativeZoomableViewProps) {\n super(props);\n // This needs to be done before anything else to initialize the state.\n // Otherwise, the logic below may reference the state when it's undefined,\n // causing runtime errors.\n this.state = { ...initialState };\n\n this.gestureHandlers = PanResponder.create({\n onStartShouldSetPanResponder: this._handleStartShouldSetPanResponder,\n onPanResponderGrant: this._handlePanResponderGrant,\n onPanResponderMove: this._handlePanResponderMove,\n onPanResponderRelease: this._handlePanResponderEnd,\n onPanResponderTerminate: (evt, gestureState) => {\n // We should also call _handlePanResponderEnd\n // to properly perform cleanups when the gesture is terminated\n // (aka gesture handling responsibility is taken over by another component).\n // This also fixes a weird issue where\n // on real device, sometimes onPanResponderRelease is not called when you lift 2 fingers up,\n // but onPanResponderTerminate is called instead for no apparent reason.\n this._handlePanResponderEnd(evt, gestureState);\n this.props.onPanResponderTerminate?.(\n evt,\n gestureState,\n this._getZoomableViewEventObject()\n );\n },\n onPanResponderTerminationRequest: (evt, gestureState) =>\n !!this.props.onPanResponderTerminationRequest?.(\n evt,\n gestureState,\n this._getZoomableViewEventObject()\n ),\n // Defaults to true to prevent parent components, such as React Navigation's tab view, from taking over as responder.\n onShouldBlockNativeResponder: (evt, gestureState) =>\n this.props.onShouldBlockNativeResponder?.(\n evt,\n gestureState,\n this._getZoomableViewEventObject()\n ) ?? true,\n onStartShouldSetPanResponderCapture: (evt, gestureState) =>\n !!this.props.onStartShouldSetPanResponderCapture?.(evt, gestureState),\n onMoveShouldSetPanResponderCapture: (evt, gestureState) =>\n !!this.props.onMoveShouldSetPanResponderCapture?.(evt, gestureState),\n });\n\n this.zoomSubjectWrapperRef = createRef();\n\n if (this.props.zoomAnimatedValue)\n this.zoomAnim = this.props.zoomAnimatedValue;\n if (this.props.panAnimatedValueXY)\n this.panAnim = this.props.panAnimatedValueXY;\n\n if (this.props.initialZoom) this.zoomLevel = this.props.initialZoom;\n if (this.props.initialOffsetX != null)\n this.offsetX = this.props.initialOffsetX;\n if (this.props.initialOffsetY != null)\n this.offsetY = this.props.initialOffsetY;\n\n this.panAnim.setValue({ x: this.offsetX, y: this.offsetY });\n this.zoomAnim.setValue(this.zoomLevel);\n this.panAnim.addListener(({ x, y }) => {\n this.offsetX = x;\n this.offsetY = y;\n });\n this.zoomAnim.addListener(({ value }) => {\n this.zoomLevel = value;\n });\n\n this.lastGestureTouchDistance = 150;\n\n this.gestureType = null;\n }\n\n private raisePin() {\n if (!this.props.animatePin) return;\n Animated.timing(this.pinAnim, {\n toValue: { x: 0, y: -10 },\n useNativeDriver: true,\n easing: Easing.out(Easing.ease),\n duration: 100,\n }).start();\n }\n\n private dropPin() {\n if (!this.props.animatePin) return;\n Animated.timing(this.pinAnim, {\n toValue: { x: 0, y: 0 },\n useNativeDriver: true,\n easing: Easing.out(Easing.ease),\n duration: 100,\n }).start();\n }\n\n private set offsetX(x: number) {\n this.__setOffset('x', x);\n }\n\n private set offsetY(y: number) {\n this.__setOffset('y', y);\n }\n\n private get offsetX() {\n return this.__getOffset('x');\n }\n\n private get offsetY() {\n return this.__getOffset('y');\n }\n\n private __setOffset(axis: 'x' | 'y', offset: number) {\n const offsetState = this.__offsets[axis];\n\n if (this.props.bindToBorders) {\n const containerSize =\n axis === 'x' ? this.state.originalWidth : this.state.originalHeight;\n const contentSize =\n axis === 'x'\n ? this.props.contentWidth || this.state.originalWidth\n : this.props.contentHeight || this.state.originalHeight;\n\n const boundOffset =\n contentSize && containerSize && this.props.panBoundaryPadding != null\n ? applyPanBoundariesToOffset(\n offset,\n containerSize,\n contentSize,\n this.zoomLevel,\n this.props.panBoundaryPadding\n )\n : offset;\n\n if (!this.gestureType && !offsetState.boundaryCrossedAnimInEffect) {\n const boundariesApplied =\n boundOffset !== offset &&\n boundOffset.toFixed(3) !== offset.toFixed(3);\n if (boundariesApplied) {\n offsetState.boundaryCrossedAnimInEffect = true;\n getBoundaryCrossedAnim(this.panAnim[axis], boundOffset).start(() => {\n offsetState.boundaryCrossedAnimInEffect = false;\n });\n return;\n }\n }\n }\n\n offsetState.value = offset;\n }\n\n private __getOffset(axis: 'x' | 'y') {\n return this.__offsets[axis].value;\n }\n\n componentDidUpdate(\n prevProps: ReactNativeZoomableViewProps,\n prevState: ReactNativeZoomableViewState\n ) {\n const { zoomEnabled, initialZoom } = this.props;\n if (prevProps.zoomEnabled && !zoomEnabled && initialZoom) {\n this.zoomLevel = initialZoom;\n this.zoomAnim.setValue(this.zoomLevel);\n }\n if (\n !this.onTransformInvocationInitialized &&\n this._invokeOnTransform().successful\n ) {\n this.panAnim.addListener(() => this._invokeOnTransform());\n this.zoomAnim.addListener(() => this._invokeOnTransform());\n this.onTransformInvocationInitialized = true;\n }\n\n const currState = this.state;\n const originalMeasurementsChanged =\n currState.originalHeight !== prevState.originalHeight ||\n currState.originalWidth !== prevState.originalWidth ||\n currState.originalPageX !== prevState.originalPageX ||\n currState.originalPageY !== prevState.originalPageY ||\n currState.originalX !== prevState.originalX ||\n currState.originalY !== prevState.originalY;\n\n const staticPinPositionChanged =\n prevProps.staticPinPosition?.x !== this.props.staticPinPosition?.x ||\n prevProps.staticPinPosition?.y !== this.props.staticPinPosition?.y;\n\n // We use a custom `onLayout` event, so the clients can stay in-sync\n // with when the internal measurements are actually saved to the state,\n // thus helping them apply transformations at more accurate timings\n if (originalMeasurementsChanged) {\n const layout = {\n width: currState.originalWidth,\n height: currState.originalHeight,\n x: currState.originalX,\n y: currState.originalY,\n };\n this.props.onLayout?.({ nativeEvent: { layout } });\n }\n\n if (\n this.onTransformInvocationInitialized &&\n (originalMeasurementsChanged || staticPinPositionChanged)\n ) {\n this._invokeOnTransform();\n }\n }\n\n componentDidMount() {\n this.measureZoomSubject();\n // We've already run `grabZoomSubjectOriginalMeasurements` at various events\n // to make sure the measurements are promptly updated.\n // However, there might be cases we haven't accounted for, especially when\n // native processes are involved. To account for those cases,\n // we'll use an interval here to ensure we're always up-to-date.\n // The `setState` in `grabZoomSubjectOriginalMeasurements` won't trigger a rerender\n // if the values given haven't changed, so we're not running performance risk here.\n this.measureZoomSubjectInterval = setInterval(this.measureZoomSubject, 1e3);\n }\n\n componentWillUnmount() {\n this.measureZoomSubjectInterval &&\n clearInterval(this.measureZoomSubjectInterval);\n }\n\n debouncedOnStaticPinPositionChange = debounce(\n (position: Vec2D) => this.props.onStaticPinPositionChange?.(position),\n 100\n );\n\n /**\n * try to invoke onTransform\n * @private\n */\n _invokeOnTransform() {\n const zoomableViewEvent = this._getZoomableViewEventObject();\n const position = this._staticPinPosition();\n\n if (!zoomableViewEvent.originalWidth || !zoomableViewEvent.originalHeight)\n return { successful: false };\n\n this.props.onTransform?.(zoomableViewEvent);\n\n if (position) {\n this.props.onStaticPinPositionMove?.(position);\n this.debouncedOnStaticPinPositionChange(position);\n }\n\n return { successful: true };\n }\n\n /**\n * Returns additional information about components current state for external event hooks\n *\n * @returns {{}}\n * @private\n */\n _getZoomableViewEventObject(overwriteObj = {}): ZoomableViewEvent {\n return {\n zoomLevel: this.zoomLevel,\n offsetX: this.offsetX,\n offsetY: this.offsetY,\n originalHeight: this.state.originalHeight,\n originalWidth: this.state.originalWidth,\n originalPageX: this.state.originalPageX,\n originalPageY: this.state.originalPageY,\n ...overwriteObj,\n } as ZoomableViewEvent;\n }\n\n /**\n * Get the original box dimensions and save them for later use.\n * (They will be used to calculate boxBorders)\n *\n * @private\n */\n private measureZoomSubject = () => {\n // make sure we measure after animations are complete\n requestAnimationFrame(() => {\n // this setTimeout is here to fix a weird issue on iOS where the measurements are all `0`\n // when navigating back (react-navigation stack) from another view\n // while closing the keyboard at the same time\n setTimeout(() => {\n // In normal conditions, we're supposed to measure zoomSubject instead of its wrapper.\n // However, our zoomSubject may have been transformed by an initial zoomLevel or offset,\n // in which case these measurements will not represent the true \"original\" measurements.\n // We just need to make sure the zoomSubjectWrapper perfectly aligns with the zoomSubject\n // (no border, space, or anything between them)\n this.zoomSubjectWrapperRef.current?.measure(\n (x, y, width, height, pageX, pageY) => {\n // When the component is off-screen, these become all 0s, so we don't set them\n // to avoid messing up calculations, especially ones that are done right after\n // the component transitions from hidden to visible.\n if (!pageX && !pageY && !width && !height) return;\n\n // If these values are all the same, don't re-set them in state\n // this way we don't re-render\n if (\n this.state.originalX === x &&\n this.state.originalY === y &&\n this.state.originalWidth === width &&\n this.state.originalHeight === height &&\n this.state.originalPageX === pageX &&\n this.state.originalPageY === pageY\n ) {\n return;\n }\n\n this.setState({\n originalX: x,\n originalY: y,\n originalWidth: width,\n originalHeight: height,\n originalPageX: pageX,\n originalPageY: pageY,\n });\n }\n );\n });\n });\n };\n\n /**\n * Handles the start of touch events and checks for taps\n *\n * @param e\n * @param gestureState\n * @returns {boolean}\n *\n * @private\n */\n _handleStartShouldSetPanResponder = (\n e: GestureResponderEvent,\n gestureState: PanResponderGestureState\n ) => {\n if (this.props.onStartShouldSetPanResponder) {\n this.props.onStartShouldSetPanResponder(\n e,\n gestureState,\n this._getZoomableViewEventObject(),\n false\n );\n }\n\n // Always set pan responder on start\n // of gesture so we can handle tap.\n // \"Pan threshold validation\" will be handled\n // in `onPanResponderMove` instead of in `onMoveShouldSetPanResponder`\n return true;\n };\n\n /**\n * Calculates pinch distance\n *\n * @param e\n * @param gestureState\n * @private\n */\n _handlePanResponderGrant: NonNullable<\n PanResponderCallbacks['onPanResponderGrant']\n > = (e, gestureState) => {\n if (this.props.onLongPress) {\n e.persist();\n this.longPressTimeout = setTimeout(() => {\n this.props.onLongPress?.(\n e,\n gestureState,\n this._getZoomableViewEventObject()\n );\n this.longPressTimeout = null;\n }, this.props.longPressDuration);\n }\n\n this.props.onPanResponderGrant?.(\n e,\n gestureState,\n this._getZoomableViewEventObject()\n );\n\n this.panAnim.stopAnimation();\n this.zoomAnim.stopAnimation();\n this.gestureStarted = true;\n\n this.raisePin();\n };\n\n /**\n * Handles the end of touch events\n *\n * @param e\n * @param gestureState\n *\n * @private\n */\n _handlePanResponderEnd: NonNullable<\n PanResponderCallbacks['onPanResponderEnd']\n > = (e, gestureState) => {\n if (!this.gestureType) {\n this._resolveAndHandleTap(e);\n }\n\n this.setState({ debugPoints: [] });\n\n this.lastGestureCenterPosition = null;\n\n const disableMomentum =\n this.props.disableMomentum ||\n (this.props.panEnabled &&\n this.gestureType === 'shift' &&\n this.props.disablePanOnInitialZoom &&\n this.zoomLevel === this.props.initialZoom);\n\n // Trigger final shift animation unless disablePanOnInitialZoom is set and we're on the initial zoom level\n // or disableMomentum\n if (!disableMomentum) {\n getPanMomentumDecayAnim(this.panAnim, {\n x: gestureState.vx / this.zoomLevel,\n y: gestureState.vy / this.zoomLevel,\n }).start();\n }\n\n if (this.longPressTimeout) {\n clearTimeout(this.longPressTimeout);\n this.longPressTimeout = null;\n }\n\n this.props.onPanResponderEnd?.(\n e,\n gestureState,\n this._getZoomableViewEventObject()\n );\n\n if (this.gestureType === 'pinch') {\n this.props.onZoomEnd?.(\n e,\n gestureState,\n this._getZoomableViewEventObject()\n );\n } else if (this.gestureType === 'shift') {\n this.props.onShiftingEnd?.(\n e,\n gestureState,\n this._getZoomableViewEventObject()\n );\n }\n\n if (this.props.staticPinPosition) {\n this._updateStaticPin();\n }\n\n this.dropPin();\n\n this.gestureType = null;\n this.gestureStarted = false;\n };\n\n /**\n * Handles the actual movement of our pan responder\n *\n * @param e\n * @param gestureState\n *\n * @private\n */\n _handlePanResponderMove = (\n e: GestureResponderEvent,\n gestureState: PanResponderGestureState\n ) => {\n if (this.props.onPanResponderMove) {\n if (\n this.props.onPanResponderMove(\n e,\n gestureState,\n this._getZoomableViewEventObject()\n )\n ) {\n return false;\n }\n }\n\n // Only supports 2 touches and below,\n // any invalid number will cause the gesture to end.\n if (gestureState.numberActiveTouches <= 2) {\n if (!this.gestureStarted) {\n this._handlePanResponderGrant(e, gestureState);\n }\n } else {\n if (this.gestureStarted) {\n this._handlePanResponderEnd(e, gestureState);\n }\n return true;\n }\n\n if (gestureState.numberActiveTouches === 2) {\n if (this.longPressTimeout) {\n clearTimeout(this.longPressTimeout);\n this.longPressTimeout = null;\n }\n\n // change some measurement states when switching gesture to ensure a smooth transition\n if (this.gestureType !== 'pinch') {\n this.lastGestureCenterPosition = calcGestureCenterPoint(\n e,\n gestureState\n );\n this.lastGestureTouchDistance = calcGestureTouchDistance(\n e,\n gestureState\n );\n }\n this.gestureType = 'pinch';\n this._handlePinching(e, gestureState);\n } else if (gestureState.numberActiveTouches === 1) {\n if (\n this.longPressTimeout &&\n (Math.abs(gestureState.dx) > 5 || Math.abs(gestureState.dy) > 5)\n ) {\n clearTimeout(this.longPressTimeout);\n this.longPressTimeout = null;\n }\n // change some measurement states when switching gesture to ensure a smooth transition\n if (this.gestureType !== 'shift') {\n this.lastGestureCenterPosition = calcGestureCenterPoint(\n e,\n gestureState\n );\n }\n\n const { dx, dy } = gestureState;\n const isShiftGesture = Math.abs(dx) > 2 || Math.abs(dy) > 2;\n if (isShiftGesture) {\n this.gestureType = 'shift';\n this._handleShifting(gestureState);\n }\n }\n };\n\n /**\n * Handles the pinch movement and zooming\n *\n * @param e\n * @param gestureState\n *\n * @private\n */\n _handlePinching(\n e: GestureResponderEvent,\n gestureState: PanResponderGestureState\n ) {\n if (!this.props.zoomEnabled) return;\n\n const {\n maxZoom,\n minZoom,\n pinchToZoomInSensitivity,\n pinchToZoomOutSensitivity,\n } = this.props;\n\n const distance = calcGestureTouchDistance(e, gestureState);\n\n if (\n this.props.onZoomBefore &&\n this.props.onZoomBefore(\n e,\n gestureState,\n this._getZoomableViewEventObject()\n )\n ) {\n return;\n }\n\n if (!distance) return;\n if (!this.lastGestureTouchDistance) return;\n\n // define the new zoom level and take zoom level sensitivity into consideration\n const zoomGrowthFromLastGestureState =\n distance / this.lastGestureTouchDistance;\n this.lastGestureTouchDistance = distance;\n\n const pinchToZoomSensitivity =\n zoomGrowthFromLastGestureState < 1\n ? pinchToZoomOutSensitivity\n : pinchToZoomInSensitivity;\n\n if (pinchToZoomSensitivity == null) return;\n const deltaGrowth = zoomGrowthFromLastGestureState - 1;\n // 0 - no resistance\n // 10 - 90% resistance\n const deltaGrowthAdjustedBySensitivity =\n deltaGrowth * (1 - (pinchToZoomSensitivity * 9) / 100);\n\n let newZoomLevel = this.zoomLevel * (1 + deltaGrowthAdjustedBySensitivity);\n\n // make sure max and min zoom levels are respected\n if (maxZoom != null && newZoomLevel > maxZoom) {\n newZoomLevel = maxZoom;\n }\n\n if (minZoom != null && newZoomLevel < minZoom) {\n newZoomLevel = minZoom;\n }\n\n const gestureCenterPoint = calcGestureCenterPoint(e, gestureState);\n\n if (!gestureCenterPoint) return;\n\n let zoomCenter = {\n x: gestureCenterPoint.x - this.state.originalPageX,\n y: gestureCenterPoint.y - this.state.originalPageY,\n };\n\n if (this.props.staticPinPosition) {\n // When we use a static pin position, the zoom centre is the same as that position,\n // otherwise the pin moves around way too much while zooming.\n zoomCenter = {\n x: this.props.staticPinPosition.x,\n y: this.props.staticPinPosition.y,\n };\n }\n\n // Uncomment to debug\n this.props.debug && this._setPinchDebugPoints(e, zoomCenter);\n\n const { originalHeight, originalWidth } = this.state;\n\n const oldOffsetX = this.offsetX;\n const oldOffsetY = this.offsetY;\n const oldScale = this.zoomLevel;\n const newScale = newZoomLevel;\n\n if (!originalHeight || !originalWidth) return;\n\n let offsetY = calcNewScaledOffsetForZoomCentering(\n oldOffsetY,\n originalHeight,\n oldScale,\n newScale,\n zoomCenter.y\n );\n let offsetX = calcNewScaledOffsetForZoomCentering(\n oldOffsetX,\n originalWidth,\n oldScale,\n newScale,\n zoomCenter.x\n );\n\n const offsetShift =\n this._calcOffsetShiftSinceLastGestureState(gestureCenterPoint);\n if (offsetShift) {\n offsetX += offsetShift.x;\n offsetY += offsetShift.y;\n }\n\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n this.zoomLevel = newScale;\n\n this.panAnim.setValue({ x: this.offsetX, y: this.offsetY });\n this.zoomAnim.setValue(this.zoomLevel);\n\n this.props.onZoomAfter?.(\n e,\n gestureState,\n this._getZoomableViewEventObject()\n );\n }\n\n /**\n * Used to debug pinch events\n * @param gestureResponderEvent\n * @param zoomCenter\n * @param points\n */\n _setPinchDebugPoints(\n gestureResponderEvent: GestureResponderEvent,\n zoomCenter: Vec2D,\n ...points: Vec2D[]\n ) {\n const { touches } = gestureResponderEvent.nativeEvent;\n const { originalPageY, originalPageX } = this.state;\n\n this.setState({\n debugPoints: [\n {\n x: touches[0].pageX - originalPageX,\n y: touches[0].pageY - originalPageY,\n },\n {\n x: touches[1].pageX - originalPageX,\n y: touches[1].pageY - originalPageY,\n },\n zoomCenter,\n ...points,\n ],\n });\n }\n\n /**\n * Calculates the amount the offset should shift since the last position during panning\n *\n * @param {Vec2D} gestureCenterPoint\n *\n * @private\n */\n _calcOffsetShiftSinceLastGestureState(gestureCenterPoint: Vec2D) {\n const { movementSensibility } = this.props;\n\n let shift = null;\n\n if (this.lastGestureCenterPosition && movementSensibility) {\n const dx = gestureCenterPoint.x - this.lastGestureCenterPosition.x;\n const dy = gestureCenterPoint.y - this.lastGestureCenterPosition.y;\n\n const shiftX = dx / this.zoomLevel / movementSensibility;\n const shiftY = dy / this.zoomLevel / movementSensibility;\n\n shift = {\n x: shiftX,\n y: shiftY,\n };\n }\n\n this.lastGestureCenterPosition = gestureCenterPoint;\n\n return shift;\n }\n\n /**\n * Handles movement by tap and move\n *\n * @param gestureState\n *\n * @private\n */\n _handleShifting(gestureState: PanResponderGestureState) {\n // Skips shifting if panEnabled is false or disablePanOnInitialZoom is true and we're on the initial zoom level\n if (\n !this.props.panEnabled ||\n (this.props.disablePanOnInitialZoom &&\n this.zoomLevel === this.props.initialZoom)\n ) {\n return;\n }\n const shift = this._calcOffsetShiftSinceLastGestureState({\n x: gestureState.moveX,\n y: gestureState.moveY,\n });\n if (!shift) return;\n\n const offsetX = this.offsetX + shift.x;\n const offsetY = this.offsetY + shift.y;\n\n if (\n this.props.debug &&\n this.state.originalPageX &&\n this.state.originalPageY\n ) {\n const x = gestureState.moveX - this.state.originalPageX;\n const y = gestureState.moveY - this.state.originalPageY;\n this.setState({ debugPoints: [{ x, y }] });\n }\n\n this._setNewOffsetPosition(offsetX, offsetY);\n\n this.raisePin();\n }\n\n /**\n * Set the state to offset moved\n *\n * @param {number} newOffsetX\n * @param {number} newOffsetY\n * @returns\n */\n _setNewOffsetPosition(newOffsetX: number, newOffsetY: number) {\n const { onShiftingBefore, onShiftingAfter } = this.props;\n\n if (onShiftingBefore?.(null, null, this._getZoomableViewEventObject())) {\n return;\n }\n\n this.offsetX = newOffsetX;\n this.offsetY = newOffsetY;\n\n this.panAnim.setValue({ x: this.offsetX, y: this.offsetY });\n this.zoomAnim.setValue(this.zoomLevel);\n\n onShiftingAfter?.(null, null, this._getZoomableViewEventObject());\n }\n\n /**\n * Check whether the press event is double tap\n * or single tap and handle the event accordingly\n *\n * @param e\n *\n * @private\n */\n private _resolveAndHandleTap = (e: GestureResponderEvent) => {\n const now = Date.now();\n if (\n this.doubleTapFirstTapReleaseTimestamp &&\n this.props.doubleTapDelay &&\n now - this.doubleTapFirstTapReleaseTimestamp < this.props.doubleTapDelay\n ) {\n this.doubleTapFirstTap &&\n this._addTouch({\n ...this.doubleTapFirstTap,\n id: now.toString(),\n isSecondTap: true,\n });\n this.singleTapTimeoutId && clearTimeout(this.singleTapTimeoutId);\n delete this.doubleTapFirstTapReleaseTimestamp;\n delete this.singleTapTimeoutId;\n delete this.doubleTapFirstTap;\n this._handleDoubleTap(e);\n } else {\n this.doubleTapFirstTapReleaseTimestamp = now;\n this.doubleTapFirstTap = {\n id: now.toString(),\n x: e.nativeEvent.pageX - this.state.originalPageX,\n y: e.nativeEvent.pageY - this.state.originalPageY,\n };\n this._addTouch(this.doubleTapFirstTap);\n\n // persist event so e.nativeEvent is preserved after a timeout delay\n e.persist();\n this.singleTapTimeoutId = setTimeout(() => {\n delete this.doubleTapFirstTapReleaseTimestamp;\n delete this.singleTapTimeoutId;\n\n // Pan to the tapped location\n if (this.props.staticPinPosition && this.doubleTapFirstTap) {\n const tapX =\n this.props.staticPinPosition.x - this.doubleTapFirstTap.x;\n const tapY =\n this.props.staticPinPosition.y - this.doubleTapFirstTap.y;\n\n Animated.timing(this.panAnim, {\n toValue: {\n x: this.offsetX + tapX / this.zoomLevel,\n y: this.offsetY + tapY / this.zoomLevel,\n },\n useNativeDriver: true,\n duration: 200,\n }).start(() => {\n this._updateStaticPin();\n });\n }\n\n this.props.onSingleTap?.(e, this._getZoomableViewEventObject());\n }, this.props.doubleTapDelay);\n }\n };\n\n moveStaticPinTo = (position: Vec2D, duration?: number) => {\n const { originalWidth, originalHeight } = this.state;\n const { staticPinPosition, contentWidth, contentHeight } = this.props;\n\n if (!staticPinPosition) return;\n if (!originalWidth || !originalHeight) return;\n if (!contentWidth || !contentHeight) return;\n\n // Offset for the static pin\n const pinX = staticPinPosition.x - originalWidth / 2;\n const pinY = staticPinPosition.y - originalHeight / 2;\n\n this.offsetX = contentWidth / 2 - position.x + pinX / this.zoomLevel;\n this.offsetY = contentHeight / 2 - position.y + pinY / this.zoomLevel;\n\n if (duration) {\n Animated.timing(this.panAnim, {\n toValue: { x: this.offsetX, y: this.offsetY },\n useNativeDriver: true,\n duration,\n }).start();\n } else {\n this.panAnim.setValue({ x: this.offsetX, y: this.offsetY });\n }\n };\n\n private _staticPinPosition = () => {\n if (!this.props.staticPinPosition) return;\n if (!this.props.contentWidth || !this.props.contentHeight) return;\n\n return viewportPositionToImagePosition({\n viewportPosition: {\n x: this.props.staticPinPosition.x,\n y: this.props.staticPinPosition.y,\n },\n imageSize: {\n height: this.props.contentHeight,\n width: this.props.contentWidth,\n },\n zoomableEvent: {\n ...this._getZoomableViewEventObject(),\n offsetX: this.offsetX,\n offsetY: this.offsetY,\n zoomLevel: this.zoomLevel,\n },\n });\n };\n\n private _updateStaticPin = () => {\n const position = this._staticPinPosition();\n if (!position) return;\n this.props.onStaticPinPositionChange?.(position);\n };\n\n private _addTouch(touch: TouchPoint) {\n this.touches.push(touch);\n this.setState({ touches: [...this.touches] });\n }\n\n private _removeTouch(touch: TouchPoint) {\n this.touches.splice(this.touches.indexOf(touch), 1);\n this.setState({ touches: [...this.touches] });\n }\n\n /**\n * Handles the double tap event\n *\n * @param e\n *\n * @private\n */\n _handleDoubleTap(e: GestureResponderEvent) {\n const { onDoubleTapBefore, onDoubleTapAfter, doubleTapZoomToCenter } =\n this.props;\n\n onDoubleTapBefore?.(e, this._getZoomableViewEventObject());\n\n const nextZoomStep = this._getNextZoomStep();\n if (nextZoomStep == null) return;\n\n const { originalPageX, originalPageY } = this.state;\n\n // define new zoom position coordinates\n const zoomPositionCoordinates = {\n x: e.nativeEvent.pageX - originalPageX,\n y: e.nativeEvent.pageY - originalPageY,\n };\n\n // if doubleTapZoomToCenter enabled -> always zoom to center instead\n if (doubleTapZoomToCenter) {\n zoomPositionCoordinates.x = 0;\n zoomPositionCoordinates.y = 0;\n }\n\n this.zoomTo(nextZoomStep, zoomPositionCoordinates);\n\n onDoubleTapAfter?.(\n e,\n this._getZoomableViewEventObject({ zoomLevel: nextZoomStep })\n );\n }\n\n /**\n * Returns the next zoom step based on current step and zoomStep property.\n * If we are zoomed all the way in -> return to initialzoom\n *\n * @returns {*}\n */\n _getNextZoomStep() {\n const { zoomStep, maxZoom, initialZoom } = this.props;\n const { zoomLevel } = this;\n\n if (maxZoom == null) return;\n\n if (zoomLevel.toFixed(2) === maxZoom.toFixed(2)) {\n return initialZoom;\n }\n\n if (zoomStep == null) return;\n\n const nextZoomStep = zoomLevel * (1 + zoomStep);\n if (nextZoomStep > maxZoom) {\n return maxZoom;\n }\n\n return nextZoomStep;\n }\n\n /**\n * Zooms to a specific level. A \"zoom center\" can be provided, which specifies\n * the point that will remain in the same position on the screen after the zoom.\n * The coordinates of the zoom center is relative to the zoom subject.\n * { x: 0, y: 0 } is the very center of the zoom subject.\n *\n * @param newZoomLevel\n * @param zoomCenter - If not supplied, the container's center is the zoom center\n */\n zoomTo(newZoomLevel: number, zoomCenter?: Vec2D) {\n if (!this.props.zoomEnabled) return false;\n if (this.props.maxZoom && newZoomLevel > this.props.maxZoom) return false;\n if (this.props.minZoom && newZoomLevel < this.props.minZoom) return false;\n\n this.props.onZoomBefore?.(null, null, this._getZoomableViewEventObject());\n\n // == Perform Pan Animation to preserve the zoom center while zooming ==\n let listenerId = '';\n if (zoomCenter) {\n // Calculates panAnim values based on changes in zoomAnim.\n let prevScale = this.zoomLevel;\n // Since zoomAnim is calculated in native driver,\n // it will jitter panAnim once in a while,\n // because here panAnim is being calculated in js.\n // However the jittering should mostly occur in simulator.\n listenerId = this.zoomAnim.addListener(({ value: newScale }) => {\n this.panAnim.setValue({\n x: calcNewScaledOffsetForZoomCentering(\n this.offsetX,\n this.state.originalWidth,\n prevScale,\n newScale,\n zoomCenter.x\n ),\n y: calcNewScaledOffsetForZoomCentering(\n this.offsetY,\n this.state.originalHeight,\n prevScale,\n newScale,\n zoomCenter.y\n ),\n });\n prevScale = newScale;\n });\n }\n\n // == Perform Zoom Animation ==\n getZoomToAnimation(this.zoomAnim, newZoomLevel).start(() => {\n this.zoomAnim.removeListener(listenerId);\n });\n // == Zoom Animation Ends ==\n\n this.props.onZoomAfter?.(null, null, this._getZoomableViewEventObject());\n return true;\n }\n\n /**\n * Zooms in or out by a specified change level\n * Use a positive number for `zoomLevelChange` to zoom in\n * Use a negative number for `zoomLevelChange` to zoom out\n *\n * Returns a promise if everything was updated and a boolean, whether it could be updated or if it exceeded the min/max zoom limits.\n *\n * @param {number | null} zoomLevelChange\n *\n * @return {bool}\n */\n zoomBy(zoomLevelChange: number) {\n // if no zoom level Change given -> just use zoom step\n zoomLevelChange ||= this.props.zoomStep || 0;\n return this.zoomTo(this.zoomLevel + zoomLevelChange);\n }\n\n /**\n * Moves the zoomed view to a specified position\n * Returns a promise when finished\n *\n * @param {number} newOffsetX the new position we want to move it to (x-axis)\n * @param {number} newOffsetY the new position we want to move it to (y-axis)\n *\n * @return {bool}\n */\n moveTo(newOffsetX: number, newOffsetY: number) {\n const { originalWidth, originalHeight } = this.state;\n if (!originalWidth || !originalHeight) return;\n\n const offsetX = (newOffsetX - originalWidth / 2) / this.zoomLevel;\n const offsetY = (newOffsetY - originalHeight / 2) / this.zoomLevel;\n\n this._setNewOffsetPosition(-offsetX, -offsetY);\n }\n\n /**\n * Moves the zoomed view by a certain amount.\n *\n * Returns a promise when finished\n *\n * @param {number} offsetChangeX the amount we want to move the offset by (x-axis)\n * @param {number} offsetChangeY the amount we want to move the offset by (y-axis)\n *\n * @return {bool}\n */\n moveBy(offsetChangeX: number, offsetChangeY: number) {\n const offsetX =\n (this.offsetX * this.zoomLevel - offsetChangeX) / this.zoomLevel;\n const offsetY =\n (this.offsetY * this.zoomLevel - offsetChangeY) / this.zoomLevel;\n\n this._setNewOffsetPosition(offsetX, offsetY);\n }\n\n render() {\n const {\n staticPinIcon,\n children,\n visualTouchFeedbackEnabled,\n doubleTapDelay,\n staticPinPosition,\n onStaticPinLongPress,\n onStaticPinPress,\n pinProps,\n } = this.props;\n\n const { pinSize, touches, debugPoints = [] } = this.state;\n\n return (\n \n \n {children}\n \n\n {visualTouchFeedbackEnabled &&\n touches?.map(\n (touch) =>\n doubleTapDelay && (\n {\n this._removeTouch(touch);\n }}\n />\n )\n )}\n\n {/* For Debugging Only */}\n {debugPoints.map(({ x, y }, index) => {\n return ;\n })}\n\n {staticPinPosition && (\n {\n this.setState({ pinSize: size });\n }}\n pinProps={pinProps}\n />\n )}\n \n );\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n alignItems: 'center',\n flex: 1,\n justifyContent: 'center',\n overflow: 'hidden',\n position: 'relative',\n },\n zoomSubject: {\n alignItems: 'center',\n flex: 1,\n justifyContent: 'center',\n width: '100%',\n },\n});\n\nexport default ReactNativeZoomableView;\n\nexport { ReactNativeZoomableView };\n"]} \ No newline at end of file +{"version":3,"names":["_lodash","require","_react","_interopRequireWildcard","_reactNative","_animations","_components","_StaticPin","_debugHelper","_helper","_applyPanBoundariesToOffset","_coordinateConversion","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","initialState","originalWidth","originalHeight","originalPageX","originalPageY","originalX","originalY","pinSize","width","height","ReactNativeZoomableView","Component","defaultProps","zoomEnabled","panEnabled","initialZoom","initialOffsetX","initialOffsetY","maxZoom","minZoom","pinchToZoomInSensitivity","pinchToZoomOutSensitivity","movementSensibility","doubleTapDelay","bindToBorders","zoomStep","onLongPress","longPressDuration","contentWidth","undefined","contentHeight","panBoundaryPadding","visualTouchFeedbackEnabled","staticPinPosition","staticPinIcon","onStaticPinPositionChange","onStaticPinPositionMove","animatePin","disablePanOnInitialZoom","panAnim","Animated","ValueXY","x","y","zoomAnim","Value","pinAnim","__offsets","value","boundaryCrossedAnimInEffect","zoomLevel","lastGestureCenterPosition","lastGestureTouchDistance","_gestureStarted","gestureStarted","v","longPressTimeout","touches","constructor","props","state","gestureHandlers","PanResponder","create","onStartShouldSetPanResponder","_handleStartShouldSetPanResponder","onPanResponderGrant","_handlePanResponderGrant","onPanResponderMove","_handlePanResponderMove","onPanResponderRelease","_handlePanResponderEnd","onPanResponderTerminate","evt","gestureState","_getZoomableViewEventObject","onPanResponderTerminationRequest","onShouldBlockNativeResponder","onStartShouldSetPanResponderCapture","onMoveShouldSetPanResponderCapture","zoomSubjectWrapperRef","createRef","zoomAnimatedValue","panAnimatedValueXY","offsetX","offsetY","setValue","addListener","gestureType","raisePin","timing","toValue","useNativeDriver","easing","Easing","out","ease","duration","start","dropPin","__setOffset","__getOffset","axis","offset","offsetState","containerSize","contentSize","boundOffset","applyPanBoundariesToOffset","boundariesApplied","toFixed","getBoundaryCrossedAnim","componentDidUpdate","prevProps","prevState","onTransformInvocationInitialized","_invokeOnTransform","successful","currState","originalMeasurementsChanged","staticPinPositionChanged","layout","onLayout","nativeEvent","componentDidMount","measureZoomSubject","measureZoomSubjectInterval","setInterval","componentWillUnmount","clearInterval","debouncedOnStaticPinPositionChange","debounce","position","zoomableViewEvent","_staticPinPosition","onTransform","overwriteObj","requestAnimationFrame","setTimeout","current","measure","pageX","pageY","setState","persist","stopAnimation","_resolveAndHandleTap","debugPoints","disableMomentum","getPanMomentumDecayAnim","vx","vy","clearTimeout","onPanResponderEnd","onZoomEnd","onShiftingEnd","_updateStaticPin","numberActiveTouches","calcGestureCenterPoint","calcGestureTouchDistance","_handlePinching","Math","abs","dx","dy","isShiftGesture","_handleShifting","distance","onZoomBefore","zoomGrowthFromLastGestureState","pinchToZoomSensitivity","deltaGrowth","deltaGrowthAdjustedBySensitivity","newZoomLevel","gestureCenterPoint","zoomCenter","debug","_setPinchDebugPoints","oldOffsetX","oldOffsetY","oldScale","newScale","calcNewScaledOffsetForZoomCentering","offsetShift","_calcOffsetShiftSinceLastGestureState","onZoomAfter","gestureResponderEvent","points","shift","shiftX","shiftY","moveX","moveY","_setNewOffsetPosition","newOffsetX","newOffsetY","onShiftingBefore","onShiftingAfter","now","Date","doubleTapFirstTapReleaseTimestamp","doubleTapFirstTap","_addTouch","id","toString","isSecondTap","singleTapTimeoutId","_handleDoubleTap","tapX","tapY","onSingleTap","moveStaticPinTo","pinX","pinY","viewportPositionToImagePosition","viewportPosition","imageSize","zoomableEvent","touch","push","_removeTouch","splice","indexOf","onDoubleTapBefore","onDoubleTapAfter","doubleTapZoomToCenter","nextZoomStep","_getNextZoomStep","zoomPositionCoordinates","zoomTo","listenerId","prevScale","getZoomToAnimation","removeListener","zoomBy","zoomLevelChange","moveTo","moveBy","offsetChangeX","offsetChangeY","render","children","onStaticPinLongPress","onStaticPinPress","pinProps","jsxs","View","style","styles","container","panHandlers","ref","jsx","zoomSubject","transform","scaleX","scaleY","getTranslateTransform","map","AnimatedTouchFeedback","animationDuration","onAnimationDone","index","DebugTouchPoint","StaticPin","onPress","onParentMove","setPinSize","size","exports","StyleSheet","alignItems","flex","justifyContent","overflow","_default"],"sourceRoot":"../../src","sources":["ReactNativeZoomableView.tsx"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAYA,IAAAI,WAAA,GAAAJ,OAAA;AAKA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AAKA,IAAAS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/commonjs/animations/index.js b/lib/commonjs/animations/index.js index 50cd3e9c..83bff6a3 100644 --- a/lib/commonjs/animations/index.js +++ b/lib/commonjs/animations/index.js @@ -6,9 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.getBoundaryCrossedAnim = getBoundaryCrossedAnim; exports.getPanMomentumDecayAnim = getPanMomentumDecayAnim; exports.getZoomToAnimation = getZoomToAnimation; - var _reactNative = require("react-native"); - function getBoundaryCrossedAnim(animValue, toValue) { return _reactNative.Animated.spring(animValue, { overshootClamping: true, @@ -16,7 +14,6 @@ function getBoundaryCrossedAnim(animValue, toValue) { useNativeDriver: true }); } - function getPanMomentumDecayAnim(animValue, velocity) { return _reactNative.Animated.decay(animValue, { velocity, @@ -24,7 +21,6 @@ function getPanMomentumDecayAnim(animValue, velocity) { useNativeDriver: true }); } - function getZoomToAnimation(animValue, toValue) { return _reactNative.Animated.timing(animValue, { easing: _reactNative.Easing.out(_reactNative.Easing.ease), diff --git a/lib/commonjs/animations/index.js.map b/lib/commonjs/animations/index.js.map index ab66f9bb..fd01704c 100644 --- a/lib/commonjs/animations/index.js.map +++ b/lib/commonjs/animations/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["index.ts"],"names":["getBoundaryCrossedAnim","animValue","toValue","Animated","spring","overshootClamping","useNativeDriver","getPanMomentumDecayAnim","velocity","decay","deceleration","getZoomToAnimation","timing","easing","Easing","out","ease"],"mappings":";;;;;;;;;AAAA;;AAIO,SAASA,sBAAT,CACLC,SADK,EAELC,OAFK,EAGL;AACA,SAAOC,sBAASC,MAAT,CAAgBH,SAAhB,EAA2B;AAChCI,IAAAA,iBAAiB,EAAE,IADa;AAEhCH,IAAAA,OAFgC;AAGhCI,IAAAA,eAAe,EAAE;AAHe,GAA3B,CAAP;AAKD;;AAEM,SAASC,uBAAT,CACLN,SADK,EAELO,QAFK,EAGL;AACA,SAAOL,sBAASM,KAAT,CAAeR,SAAf,EAA0B;AAC/BO,IAAAA,QAD+B;AAE/BE,IAAAA,YAAY,EAAE,KAFiB;AAG/BJ,IAAAA,eAAe,EAAE;AAHc,GAA1B,CAAP;AAKD;;AAEM,SAASK,kBAAT,CAA4BV,SAA5B,EAAuDC,OAAvD,EAAwE;AAC7E,SAAOC,sBAASS,MAAT,CAAgBX,SAAhB,EAA2B;AAChCY,IAAAA,MAAM,EAAEC,oBAAOC,GAAP,CAAWD,oBAAOE,IAAlB,CADwB;AAEhCd,IAAAA,OAFgC;AAGhCI,IAAAA,eAAe,EAAE;AAHe,GAA3B,CAAP;AAKD","sourcesContent":["import { Animated, Easing } from 'react-native';\n\nimport { Vec2D } from '../typings';\n\nexport function getBoundaryCrossedAnim(\n animValue: Animated.Value,\n toValue: number\n) {\n return Animated.spring(animValue, {\n overshootClamping: true,\n toValue,\n useNativeDriver: true,\n });\n}\n\nexport function getPanMomentumDecayAnim(\n animValue: Animated.Value | Animated.ValueXY,\n velocity: number | Vec2D\n) {\n return Animated.decay(animValue, {\n velocity,\n deceleration: 0.994,\n useNativeDriver: true,\n });\n}\n\nexport function getZoomToAnimation(animValue: Animated.Value, toValue: number) {\n return Animated.timing(animValue, {\n easing: Easing.out(Easing.ease),\n toValue,\n useNativeDriver: true,\n });\n}\n"]} \ No newline at end of file +{"version":3,"names":["_reactNative","require","getBoundaryCrossedAnim","animValue","toValue","Animated","spring","overshootClamping","useNativeDriver","getPanMomentumDecayAnim","velocity","decay","deceleration","getZoomToAnimation","timing","easing","Easing","out","ease"],"sourceRoot":"../../../src","sources":["animations/index.ts"],"mappings":";;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIO,SAASC,sBAAsBA,CACpCC,SAAyB,EACzBC,OAAe,EACf;EACA,OAAOC,qBAAQ,CAACC,MAAM,CAACH,SAAS,EAAE;IAChCI,iBAAiB,EAAE,IAAI;IACvBH,OAAO;IACPI,eAAe,EAAE;EACnB,CAAC,CAAC;AACJ;AAEO,SAASC,uBAAuBA,CACrCN,SAA4C,EAC5CO,QAAwB,EACxB;EACA,OAAOL,qBAAQ,CAACM,KAAK,CAACR,SAAS,EAAE;IAC/BO,QAAQ;IACRE,YAAY,EAAE,KAAK;IACnBJ,eAAe,EAAE;EACnB,CAAC,CAAC;AACJ;AAEO,SAASK,kBAAkBA,CAACV,SAAyB,EAAEC,OAAe,EAAE;EAC7E,OAAOC,qBAAQ,CAACS,MAAM,CAACX,SAAS,EAAE;IAChCY,MAAM,EAAEC,mBAAM,CAACC,GAAG,CAACD,mBAAM,CAACE,IAAI,CAAC;IAC/Bd,OAAO;IACPI,eAAe,EAAE;EACnB,CAAC,CAAC;AACJ","ignoreList":[]} diff --git a/lib/commonjs/components/AnimatedTouchFeedback.js b/lib/commonjs/components/AnimatedTouchFeedback.js index eab34dfe..02a15b82 100644 --- a/lib/commonjs/components/AnimatedTouchFeedback.js +++ b/lib/commonjs/components/AnimatedTouchFeedback.js @@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.AnimatedTouchFeedback = void 0; - var _react = _interopRequireWildcard(require("react")); - var _reactNative = require("react-native"); - -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } - -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - +var _jsxRuntime = require("react/jsx-runtime"); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } const AnimatedTouchFeedback = ({ x, y, @@ -27,7 +22,6 @@ const AnimatedTouchFeedback = ({ appearDisappearAnimRef.current.setValue(0); const inDuration = animationDuration * 0.8; const outDuration = animationDuration - inDuration; - _reactNative.Animated.sequence([_reactNative.Animated.timing(appearDisappearAnimRef.current, { delay: animationDelay || 0, toValue: 1, @@ -39,13 +33,9 @@ const AnimatedTouchFeedback = ({ duration: outDuration, easing: _reactNative.Easing.out(_reactNative.Easing.ease), useNativeDriver: true - })]).start(() => { - var _onAnimationDoneRef$c; - - return (_onAnimationDoneRef$c = onAnimationDoneRef.current) === null || _onAnimationDoneRef$c === void 0 ? void 0 : _onAnimationDoneRef$c.call(onAnimationDoneRef); - }); + })]).start(() => onAnimationDoneRef.current?.()); }, [animationDelay, animationDuration]); - return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, { + return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, { pointerEvents: "none", style: [styles.animatedTouchFeedback, { opacity: appearDisappearAnimRef.current.interpolate({ @@ -63,9 +53,7 @@ const AnimatedTouchFeedback = ({ }] }); }; - exports.AnimatedTouchFeedback = AnimatedTouchFeedback; - const styles = _reactNative.StyleSheet.create({ animatedTouchFeedback: { backgroundColor: 'lightgray', diff --git a/lib/commonjs/components/AnimatedTouchFeedback.js.map b/lib/commonjs/components/AnimatedTouchFeedback.js.map index 7c31ae2f..b33e7fbd 100644 --- a/lib/commonjs/components/AnimatedTouchFeedback.js.map +++ b/lib/commonjs/components/AnimatedTouchFeedback.js.map @@ -1 +1 @@ -{"version":3,"sources":["AnimatedTouchFeedback.tsx"],"names":["AnimatedTouchFeedback","x","y","animationDelay","animationDuration","onAnimationDone","appearDisappearAnimRef","Animated","Value","onAnimationDoneRef","current","setValue","inDuration","outDuration","sequence","timing","delay","toValue","duration","easing","Easing","linear","useNativeDriver","out","ease","start","styles","animatedTouchFeedback","opacity","interpolate","inputRange","outputRange","left","top","transform","scale","StyleSheet","create","backgroundColor","borderRadius","height","position","width"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAEO,MAAMA,qBAAqB,GAAG,CAAC;AACpCC,EAAAA,CADoC;AAEpCC,EAAAA,CAFoC;AAGpCC,EAAAA,cAHoC;AAIpCC,EAAAA,iBAJoC;AAKpCC,EAAAA;AALoC,CAAD,KAY/B;AACJ,QAAMC,sBAAsB,GAAG,mBAAuB,IAAIC,sBAASC,KAAb,CAAmB,CAAnB,CAAvB,CAA/B;AACA,QAAMC,kBAAkB,GAAG,mBAAOJ,eAAP,CAA3B;AACAI,EAAAA,kBAAkB,CAACC,OAAnB,GAA6BL,eAA7B;AAEA,wBAAU,MAAM;AACdC,IAAAA,sBAAsB,CAACI,OAAvB,CAA+BC,QAA/B,CAAwC,CAAxC;AACA,UAAMC,UAAU,GAAGR,iBAAiB,GAAG,GAAvC;AACA,UAAMS,WAAW,GAAGT,iBAAiB,GAAGQ,UAAxC;;AACAL,0BAASO,QAAT,CAAkB,CAChBP,sBAASQ,MAAT,CAAgBT,sBAAsB,CAACI,OAAvC,EAAgD;AAC9CM,MAAAA,KAAK,EAAEb,cAAc,IAAI,CADqB;AAE9Cc,MAAAA,OAAO,EAAE,CAFqC;AAG9CC,MAAAA,QAAQ,EAAEN,UAHoC;AAI9CO,MAAAA,MAAM,EAAEC,oBAAOC,MAJ+B;AAK9CC,MAAAA,eAAe,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rBW,IAAAA,eAAe,EAAE,WADI;AAErBC,IAAAA,YAAY,EAAE,EAFO;AAGrBC,IAAAA,MAAM,EAAE,EAHa;AAIrBC,IAAAA,QAAQ,EAAE,UAJW;AAKrBC,IAAAA,KAAK,EAAE;AALc;AADQ,CAAlB,CAAf","sourcesContent":["import React, { useEffect, useRef } from 'react';\nimport { Animated, Easing, StyleSheet } from 'react-native';\n\nexport const AnimatedTouchFeedback = ({\n x,\n y,\n animationDelay,\n animationDuration,\n onAnimationDone,\n}: {\n x: number;\n y: number;\n animationDuration: number;\n animationDelay?: number;\n onAnimationDone?: () => void;\n}) => {\n const appearDisappearAnimRef = useRef(new Animated.Value(0));\n const onAnimationDoneRef = useRef(onAnimationDone);\n onAnimationDoneRef.current = onAnimationDone;\n\n useEffect(() => {\n appearDisappearAnimRef.current.setValue(0);\n const inDuration = animationDuration * 0.8;\n const outDuration = animationDuration - inDuration;\n Animated.sequence([\n Animated.timing(appearDisappearAnimRef.current, {\n delay: animationDelay || 0,\n toValue: 1,\n duration: inDuration,\n easing: Easing.linear,\n useNativeDriver: true,\n }),\n Animated.timing(appearDisappearAnimRef.current, {\n toValue: 0,\n duration: outDuration,\n easing: Easing.out(Easing.ease),\n useNativeDriver: true,\n }),\n ]).start(() => onAnimationDoneRef.current?.());\n }, [animationDelay, animationDuration]);\n\n return (\n \n );\n};\n\nconst styles = StyleSheet.create({\n animatedTouchFeedback: {\n backgroundColor: 'lightgray',\n borderRadius: 40,\n height: 40,\n position: 'absolute',\n width: 40,\n },\n});\n"]} \ No newline at end of file +{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AnimatedTouchFeedback","x","y","animationDelay","animationDuration","onAnimationDone","appearDisappearAnimRef","useRef","Animated","Value","onAnimationDoneRef","current","useEffect","setValue","inDuration","outDuration","sequence","timing","delay","toValue","duration","easing","Easing","linear","useNativeDriver","out","ease","start","jsx","View","pointerEvents","style","styles","animatedTouchFeedback","opacity","interpolate","inputRange","outputRange","left","top","transform","scale","exports","StyleSheet","create","backgroundColor","borderRadius","height","position","width"],"sourceRoot":"../../../src","sources":["components/AnimatedTouchFeedback.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAA4D,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,K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AAI;IACZC,aAAa,EAAC,MAAM;IACpBC,KAAK,EAAE,CACLC,MAAM,CAACC,qBAAqB,EAC5B;MACEC,OAAO,EAAE5B,sBAAsB,CAACK,OAAO,CAACwB,WAAW,CAAC;QAClDC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QAClBC,WAAW,EAAE,CAAC,CAAC,EAAE,GAAG;MACtB,CAAC,CAAC;MACFC,IAAI,EAAErC,CAAC,GAAG,EAAE;MACZsC,GAAG,EAAErC,CAAC,GAAG,EAAE;MACXsC,SAAS,EAAE,CACT;QACEC,KAAK,EAAEnC,sBAAsB,CAACK,OAAO,CAACwB,WAAW,CAAC;UAChDC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;UAClBC,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC;QACtB,CAAC;MACH,CAAC;IAEL,CAAC;EACD,CACH,CAAC;AAEN,CAAC;AAACK,OAAA,CAAA1C,qBAAA,GAAAA,qBAAA;AAEF,MAAMgC,MAAM,GAAGW,uBAAU,CAACC,MAAM,CAAC;EAC/BX,qBAAqB,EAAE;IACrBY,eAAe,EAAE,WAAW;IAC5BC,YAAY,EAAE,EAAE;IAChBC,MAAM,EAAE,EAAE;IACVC,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]} diff --git a/lib/commonjs/components/StaticPin.js b/lib/commonjs/components/StaticPin.js index 61e18bd4..0edb95b6 100644 --- a/lib/commonjs/components/StaticPin.js +++ b/lib/commonjs/components/StaticPin.js @@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.StaticPin = void 0; - var _react = _interopRequireDefault(require("react")); - var _reactNative = require("react-native"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } - +var _jsxRuntime = require("react/jsx-runtime"); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } const StaticPin = ({ staticPinPosition, pinAnim, @@ -25,18 +20,17 @@ const StaticPin = ({ pinProps = {} }) => { const tapTime = _react.default.useRef(0); - const transform = [{ translateY: -pinSize.height }, { translateX: -pinSize.width / 2 }, ...pinAnim.getTranslateTransform()]; const opacity = pinSize.width && pinSize.height ? 1 : 0; - const panResponder = _react.default.useRef(_reactNative.PanResponder.create({ onStartShouldSetPanResponder: () => { - tapTime.current = Date.now(); // We want to handle tap on this so set true + tapTime.current = Date.now(); + // We want to handle tap on this so set true return true; }, onPanResponderMove: (evt, gestureState) => { @@ -47,45 +41,44 @@ const StaticPin = ({ onPanResponderRelease: (evt, gestureState) => { if (Math.abs(gestureState.dx) > 5 || Math.abs(gestureState.dy) > 5) return; const dt = Date.now() - tapTime.current; - if (onPress && dt < 500) { onPress(evt); } - if (onLongPress && dt > 500) { // RN long press is 500ms onLongPress(evt); } } })).current; - - return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, _extends({ + return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, { style: [{ left: staticPinPosition.x, top: staticPinPosition.y }, styles.pinWrapper, { opacity, transform - }] - }, pinProps), /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({ - onLayout: ({ - nativeEvent: { - layout - } - }) => { - setPinSize(layout); - } - }, panResponder.panHandlers), staticPinIcon || - /*#__PURE__*/ - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - _react.default.createElement(_reactNative.Image, { - source: require('../assets/pin.png'), - style: styles.pin - }))); + }], + ...pinProps, + children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, { + onLayout: ({ + nativeEvent: { + layout + } + }) => { + setPinSize(layout); + }, + ...panResponder.panHandlers, + children: staticPinIcon || + /*#__PURE__*/ + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + (0, _jsxRuntime.jsx)(_reactNative.Image, { + source: require('../assets/pin.png'), + style: styles.pin + }) + }) + }); }; - exports.StaticPin = StaticPin; - const styles = _reactNative.StyleSheet.create({ pin: { height: 64, diff --git a/lib/commonjs/components/StaticPin.js.map b/lib/commonjs/components/StaticPin.js.map index 9b74671e..8e3d3ade 100644 --- a/lib/commonjs/components/StaticPin.js.map +++ b/lib/commonjs/components/StaticPin.js.map @@ -1 +1 @@ -{"version":3,"sources":["StaticPin.tsx"],"names":["StaticPin","staticPinPosition","pinAnim","staticPinIcon","pinSize","onParentMove","onPress","onLongPress","setPinSize","pinProps","tapTime","React","useRef","transform","translateY","height","translateX","width","getTranslateTransform","opacity","panResponder","PanResponder","create","onStartShouldSetPanResponder","current","Date","now","onPanResponderMove","evt","gestureState","Math","abs","dx","dy","onPanResponderRelease","dt","left","x","top","y","styles","pinWrapper","nativeEvent","layout","panHandlers","require","pin","StyleSheet","position"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAYO,MAAMA,SAAS,GAAG,CAAC;AACxBC,EAAAA,iBADwB;AAExBC,EAAAA,OAFwB;AAGxBC,EAAAA,aAHwB;AAIxBC,EAAAA,OAJwB;AAKxBC,EAAAA,YALwB;AAMxBC,EAAAA,OANwB;AAOxBC,EAAAA,WAPwB;AAQxBC,EAAAA,UARwB;AASxBC,EAAAA,QAAQ,GAAG;AATa,CAAD,KAwBnB;AACJ,QAAMC,OAAO,GAAGC,eAAMC,MAAN,CAAa,CAAb,CAAhB;;AACA,QAAMC,SAAS,GAAG,CAChB;AAAEC,IAAAA,UAAU,EAAE,CAACV,OAAO,CAACW;AAAvB,GADgB,EAEhB;AAAEC,IAAAA,UAAU,EAAE,CAACZ,OAAO,CAACa,KAAT,GAAiB;AAA/B,GAFgB,EAGhB,GAAGf,OAAO,CAACgB,qBAAR,EAHa,CAAlB;AAMA,QAAMC,OAAO,GAAGf,OAAO,CAACa,KAAR,IAAiBb,OAAO,CAACW,MAAzB,GAAkC,CA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tB,MAAAA,OAAF;AAAWN,MAAAA;AAAX,KANK;AADT,KASMJ,QATN,gBAWE,6BAAC,iBAAD;AACE,IAAA,QAAQ,EAAE,CAAC;AAAEiC,MAAAA,WAAW,EAAE;AAAEC,QAAAA;AAAF;AAAf,KAAD,KAAiC;AACzCnC,MAAAA,UAAU,CAACmC,MAAD,CAAV;AACD;AAHH,KAIMvB,YAAY,CAACwB,WAJnB,GAMGzC,aAAa;AAAA;AACZ;AACA,+BAAC,kBAAD;AAAO,IAAA,MAAM,EAAE0C,OAAO,CAAC,mBAAD,CAAtB;AAA6C,IAAA,KAAK,EAAEL,MAAM,CAACM;AAA3D,IARJ,CAXF,CADF;AAyBD,CAxFM;;;;AA0FP,MAAMN,MAAM,GAAGO,wBAAWzB,MAAX,CAAkB;AAC/BwB,EAAAA,GAAG,EAAE;AACH/B,IAAAA,MAAM,EAAE,EADL;AAEHE,IAAAA,KAAK,EAAE;AAFJ,GAD0B;AAK/BwB,EAAAA,UAAU,EAAE;AACVO,IAAAA,QAAQ,EAAE;AADA;AALmB,CAAlB,CAAf","sourcesContent":["import React from 'react';\nimport {\n Animated,\n GestureResponderEvent,\n Image,\n PanResponder,\n PanResponderGestureState,\n StyleSheet,\n View,\n ViewProps,\n} from 'react-native';\nimport { Size2D } from 'src/typings';\n\nexport const StaticPin = ({\n staticPinPosition,\n pinAnim,\n staticPinIcon,\n pinSize,\n onParentMove,\n onPress,\n onLongPress,\n setPinSize,\n pinProps = {},\n}: {\n staticPinPosition: { x: number; y: number };\n pinAnim: Animated.ValueXY;\n staticPinIcon: React.ReactNode;\n pinSize: Size2D;\n /** Internal handler for passing move event to parent */\n onParentMove: (\n evt: GestureResponderEvent,\n gestureState: PanResponderGestureState\n ) => boolean | undefined;\n onPress?: (evt: GestureResponderEvent) => void;\n onLongPress?: (evt: GestureResponderEvent) => void;\n setPinSize: (size: Size2D) => void;\n pinProps?: ViewProps;\n}) => {\n const tapTime = React.useRef(0);\n const transform = [\n { translateY: -pinSize.height },\n { translateX: -pinSize.width / 2 },\n ...pinAnim.getTranslateTransform(),\n ];\n\n const opacity = pinSize.width && pinSize.height ? 1 : 0;\n\n const panResponder = React.useRef(\n PanResponder.create({\n onStartShouldSetPanResponder: () => {\n tapTime.current = Date.now();\n\n // We want to handle tap on this so set true\n return true;\n },\n onPanResponderMove: (evt, gestureState) => {\n // However if the user moves finger we want to pass this evt to parent\n // to handle panning (tap not recognized)\n if (Math.abs(gestureState.dx) > 5 && Math.abs(gestureState.dy) > 5)\n onParentMove(evt, gestureState);\n },\n onPanResponderRelease: (evt, gestureState) => {\n if (Math.abs(gestureState.dx) > 5 || Math.abs(gestureState.dy) > 5)\n return;\n const dt = Date.now() - tapTime.current;\n if (onPress && dt < 500) {\n onPress(evt);\n }\n if (onLongPress && dt > 500) {\n // RN long press is 500ms\n onLongPress(evt);\n }\n },\n })\n ).current;\n\n return (\n \n {\n setPinSize(layout);\n }}\n {...panResponder.panHandlers}\n >\n {staticPinIcon || (\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n \n )}\n \n \n );\n};\n\nconst styles = StyleSheet.create({\n pin: {\n height: 64,\n width: 48,\n },\n pinWrapper: {\n position: 'absolute',\n },\n});\n"]} \ No newline at end of file +{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","e","__esModule","default","StaticPin","staticPinPosition","pinAnim","staticPinIcon","pinSize","onParentMove","onPress","onLongPress","setPinSize","pinProps","tapTime","React","useRef","transform","translateY","height","translateX","width","getTranslateTransform","opacity","panResponder","PanResponder","create","onStartShouldSetPanResponder","current","Date","now","onPanResponderMove","evt","gestureState","Math","abs","dx","dy","onPanResponderRelease","dt","jsx","Animated","View","style","left","x","top","y","styles","pinWrapper","children","onLayout","nativeEvent","layout","panHandlers","Image","source","pin","exports","StyleSheet","position"],"sourceRoot":"../../../src","sources":["components/StaticPin.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC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GAAAA,SAAA;AAEF,MAAM4C,MAAM,GAAGW,uBAAU,CAACjC,MAAM,CAAC;EAC/B+B,GAAG,EAAE;IACHtC,MAAM,EAAE,EAAE;IACVE,KAAK,EAAE;EACT,CAAC;EACD4B,UAAU,EAAE;IACVW,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]} diff --git a/lib/commonjs/components/index.js b/lib/commonjs/components/index.js index ac2c0975..00f88b3c 100644 --- a/lib/commonjs/components/index.js +++ b/lib/commonjs/components/index.js @@ -9,6 +9,5 @@ Object.defineProperty(exports, "AnimatedTouchFeedback", { return _AnimatedTouchFeedback.AnimatedTouchFeedback; } }); - var _AnimatedTouchFeedback = require("./AnimatedTouchFeedback"); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/commonjs/components/index.js.map b/lib/commonjs/components/index.js.map index 363d8580..2f768078 100644 --- a/lib/commonjs/components/index.js.map +++ b/lib/commonjs/components/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA","sourcesContent":["export { AnimatedTouchFeedback } from './AnimatedTouchFeedback';\n"]} \ No newline at end of file +{"version":3,"names":["_AnimatedTouchFeedback","require"],"sourceRoot":"../../../src","sources":["components/index.tsx"],"mappings":";;;;;;;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA","ignoreList":[]} diff --git a/lib/commonjs/debugHelper/index.js b/lib/commonjs/debugHelper/index.js index 0ac1e56c..75beac3d 100644 --- a/lib/commonjs/debugHelper/index.js +++ b/lib/commonjs/debugHelper/index.js @@ -4,13 +4,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.DebugTouchPoint = exports.DebugRect = void 0; - var _react = _interopRequireDefault(require("react")); - var _reactNative = require("react-native"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - +var _jsxRuntime = require("react/jsx-runtime"); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } const DebugTouchPoint = ({ diameter = 20, x = 0, @@ -18,7 +15,7 @@ const DebugTouchPoint = ({ color = 'yellow' }) => { const radius = diameter / 2; - return /*#__PURE__*/_react.default.createElement(_reactNative.View, { + return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, { style: [styles.debugPoint, { width: diameter, height: diameter, @@ -30,9 +27,7 @@ const DebugTouchPoint = ({ pointerEvents: "none" }); }; - exports.DebugTouchPoint = DebugTouchPoint; - const DebugRect = ({ height, x = 0, @@ -40,7 +35,7 @@ const DebugRect = ({ color = 'yellow' }) => { const width = 5; - return /*#__PURE__*/_react.default.createElement(_reactNative.View, { + return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, { style: [styles.debugRect, { width, height, @@ -51,9 +46,7 @@ const DebugRect = ({ pointerEvents: "none" }); }; - exports.DebugRect = DebugRect; - const styles = _reactNative.StyleSheet.create({ debugPoint: { opacity: 0.7, diff --git a/lib/commonjs/debugHelper/index.js.map b/lib/commonjs/debugHelper/index.js.map index d73e3c83..8e476675 100644 --- a/lib/commonjs/debugHelper/index.js.map +++ b/lib/commonjs/debugHelper/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["index.tsx"],"names":["DebugTouchPoint","diameter","x","y","color","radius","styles","debugPoint","width","height","borderRadius","backgroundColor","left","top","DebugRect","debugRect","StyleSheet","create","opacity","position"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEO,MAAMA,eAAe,GAAG,CAAC;AAC9BC,EAAAA,QAAQ,GAAG,EADmB;AAE9BC,EAAAA,CAAC,GAAG,CAF0B;AAG9BC,EAAAA,CAAC,GAAG,CAH0B;AAI9BC,EAAAA,KAAK,GAAG;AAJsB,CAAD,KAKzB;AACJ,QAAMC,MAAM,GAAGJ,QAAQ,GAAG,CAA1B;AACA,sBACE,6BAAC,iBAAD;AACE,IAAA,KAAK,EAAE,CACLK,MAAM,CAACC,UADF,EAEL;AACEC,MAAAA,KAAK,EAAEP,QADT;AAEEQ,MAAAA,MAAM,EAAER,QAFV;AAGES,MAAAA,YAAY,EAAET,QAHhB;AAIEU,MAAAA,eAAe,EAAEP,KAJnB;AAKEQ,MAAAA,IAAI,EAAEV,CAAC,GAAGG,MALZ;AAMEQ,MAAAA,GAAG,EAAEV,CAAC,GAAGE;AANX,KAFK,CADT;AAYE,IAAA,aAAa,EAAC;AAZhB,IADF;AAgBD,CAvBM;;;;AAwBA,MAAMS,SAAS,GAAG,CAAC;AACxBL,EAAAA,MADwB;AAExBP,EAAAA,CAAC,GAAG,CAFoB;AAGxBC,EAAAA,CAAC,GAAG,CAHoB;AAIxBC,EAAAA,KAAK,GAAG;AAJgB,CAAD,KAUnB;AACJ,QAAMI,KAAK,GAAG,CAAd;AACA,sBACE,6BAAC,iBAAD;AACE,IAAA,KAAK,EAAE,CACLF,MAAM,CAACS,SADF,EAEL;AACEP,MAAAA,KADF;AAEEC,MAAAA,MAFF;AAGEE,MAAAA,eAAe,EAAEP,KAHnB;AAIEQ,MAAAA,IAAI,EAAEV,CAAC,GAAGM,KAAK,GAAG,CAJpB;AAKEK,MAAAA,GAAG,EAAEV;AALP,KAFK,CADT;AAWE,IAAA,aAAa,EAAC;AAXhB,IADF;AAeD,CA3BM;;;;AA6BP,MAAMG,MAAM,GAAGU,wBAAWC,MAAX,CAAkB;AAC/BV,EAAAA,UAAU,EAAE;AACVW,IAAAA,OAAO,EAAE,GADC;AAEVC,IAAAA,QAAQ,EAAE;AAFA,GADmB;AAK/BJ,EAAAA,SAAS,EAAE;AACTG,IAAAA,OAAO,EAAE,GADA;AAETC,IAAAA,QAAQ,EAAE;AAFD;AALoB,CAAlB,CAAf","sourcesContent":["import React from 'react';\nimport { StyleSheet, View } from 'react-native';\n\nexport const DebugTouchPoint = ({\n diameter = 20,\n x = 0,\n y = 0,\n color = 'yellow',\n}) => {\n const radius = diameter / 2;\n return (\n \n );\n};\nexport const DebugRect = ({\n height,\n x = 0,\n y = 0,\n color = 'yellow',\n}: {\n height: number;\n x: number;\n y: number;\n color: string;\n}) => {\n const width = 5;\n return (\n \n );\n};\n\nconst styles = StyleSheet.create({\n debugPoint: {\n opacity: 0.7,\n position: 'absolute',\n },\n debugRect: {\n opacity: 0.5,\n position: 'absolute',\n },\n});\n"]} \ No newline at end of file +{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","e","__esModule","default","DebugTouchPoint","diameter","x","y","color","radius","jsx","View","style","styles","debugPoint","width","height","borderRadius","backgroundColor","left","top","pointerEvents","exports","DebugRect","debugRect","StyleSheet","create","opacity","position"],"sourceRoot":"../../../src","sources":["debugHelper/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAgD,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEzC,MAAMG,eAAe,GAAGA,CAAC;EAC9BC,QAAQ,GAAG,EAAE;EACbC,CAAC,GAAG,CAAC;EACLC,CAAC,GAAG,CAAC;EACLC,KAAK,GAAG;AACV,CAAC,KAAK;EACJ,MAAMC,MAAM,GAAGJ,QAAQ,GAAG,CAAC;EAC3B,oBACE,IAAAL,WAAA,CAAAU,GAAA,EAACX,YAAA,CAAAY,IAAI;IACHC,KAAK,EAAE,CACLC,MAAM,CAACC,UAAU,EACjB;MACEC,KAAK,EAAEV,QAAQ;MACfW,MAAM,EAAEX,QAAQ;MAChBY,YAAY,EAAEZ,QAAQ;MACtBa,eAAe,EAAEV,KAAK;MACtBW,IAAI,EAAEb,CAAC,GAAGG,MAAM;MAChBW,GAAG,EAAEb,CAAC,GAAGE;IACX,CAAC,CACD;IACFY,aAAa,EAAC;EAAM,CACrB,CAAC;AAEN,CAAC;AAACC,OAAA,CAAAlB,eAAA,GAAAA,eAAA;AACK,MAAMmB,SAAS,GAAGA,CAAC;EACxBP,MAAM;EACNV,CAAC,GAAG,CAAC;EACLC,CAAC,GAAG,CAAC;EACLC,KAAK,GAAG;AAMV,CAAC,KAAK;EACJ,MAAMO,KAAK,GAAG,CAAC;EACf,oBACE,IAAAf,WAAA,CAAAU,GAAA,EAACX,YAAA,CAAAY,IAAI;IACHC,KAAK,EAAE,CACLC,MAAM,CAACW,SAAS,EAChB;MACET,KAAK;MACLC,MAAM;MACNE,eAAe,EAAEV,KAAK;MACtBW,IAAI,EAAEb,CAAC,GAAGS,KAAK,GAAG,CAAC;MACnBK,GAAG,EAAEb;IACP,CAAC,CACD;IACFc,aAAa,EAAC;EAAM,CACrB,CAAC;AAEN,CAAC;AAACC,OAAA,CAAAC,SAAA,GAAAA,SAAA;AAEF,MAAMV,MAAM,GAAGY,uBAAU,CAACC,MAAM,CAAC;EAC/BZ,UAAU,EAAE;IACVa,OAAO,EAAE,GAAG;IACZC,QAAQ,EAAE;EACZ,CAAC;EACDJ,SAAS,EAAE;IACTG,OAAO,EAAE,GAAG;IACZC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]} diff --git a/lib/commonjs/helper/applyPanBoundariesToOffset.js b/lib/commonjs/helper/applyPanBoundariesToOffset.js index 2cea2986..1b474daa 100644 --- a/lib/commonjs/helper/applyPanBoundariesToOffset.js +++ b/lib/commonjs/helper/applyPanBoundariesToOffset.js @@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.applyPanBoundariesToOffset = applyPanBoundariesToOffset; - /** * Takes a single offset value and calculates the correct offset value * to make sure it's within the pan boundaries @@ -24,38 +23,41 @@ function applyPanBoundariesToOffset(offsetScaled, containerSize, contentSize, sc const contentStartBorderUnscaled = containerSize / 2 + offsetUnscaled - contentSizeUnscaled / 2; const contentEndBorderUnscaled = contentStartBorderUnscaled + contentSizeUnscaled; const containerStartBorder = 0; - const containerEndBorder = containerStartBorder + containerSize; // do not let boundary padding be greater than the container size or less than 0 + const containerEndBorder = containerStartBorder + containerSize; + // do not let boundary padding be greater than the container size or less than 0 if (!boundaryPadding || boundaryPadding < 0) boundaryPadding = 0; - if (boundaryPadding > containerSize) boundaryPadding = containerSize; // Calculate container's measurements with boundary padding applied. + if (boundaryPadding > containerSize) boundaryPadding = containerSize; + + // Calculate container's measurements with boundary padding applied. // this should shrink the container's size by the amount of the boundary padding, // so that the content inside can be panned a bit further away from the original container's boundaries. - const paddedContainerSize = containerSize - boundaryPadding * 2; const paddedContainerStartBorder = containerStartBorder + boundaryPadding; - const paddedContainerEndBorder = containerEndBorder - boundaryPadding; // if content is smaller than the padded container, - // don't let the content move + const paddedContainerEndBorder = containerEndBorder - boundaryPadding; + // if content is smaller than the padded container, + // don't let the content move if (contentSizeUnscaled < paddedContainerSize) { return 0; - } // if content is larger than the padded container, + } + + // if content is larger than the padded container, // don't let the padded container go outside of content + // maximum distance the content's center can move from its original position. // assuming the content original center is the container's center. - - const contentMaxOffsetScaled = (paddedContainerSize / 2 - contentSizeUnscaled / 2) / scale; - - if ( // content reaching the end boundary + if ( + // content reaching the end boundary contentEndBorderUnscaled < paddedContainerEndBorder) { return contentMaxOffsetScaled; } - - if ( // content reaching the start boundary + if ( + // content reaching the start boundary contentStartBorderUnscaled > paddedContainerStartBorder) { return -contentMaxOffsetScaled; } - return offsetScaled; } //# sourceMappingURL=applyPanBoundariesToOffset.js.map \ No newline at end of file diff --git a/lib/commonjs/helper/applyPanBoundariesToOffset.js.map b/lib/commonjs/helper/applyPanBoundariesToOffset.js.map index 92ab44ec..e8b91629 100644 --- a/lib/commonjs/helper/applyPanBoundariesToOffset.js.map +++ b/lib/commonjs/helper/applyPanBoundariesToOffset.js.map @@ -1 +1 @@ -{"version":3,"sources":["applyPanBoundariesToOffset.ts"],"names":["applyPanBoundariesToOffset","offsetScaled","containerSize","contentSize","scale","boundaryPadding","contentSizeUnscaled","offsetUnscaled","contentStartBorderUnscaled","contentEndBorderUnscaled","containerStartBorder","containerEndBorder","paddedContainerSize","paddedContainerStartBorder","paddedContainerEndBorder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AAED,SAAOd,YAAP;AACD","sourcesContent":["/**\n * Takes a single offset value and calculates the correct offset value\n * to make sure it's within the pan boundaries\n *\n *\n * @param offsetScaled\n * @param containerSize\n * @param contentSize\n * @param scale\n * @param boundaryPadding - see README\n *\n * @returns {number}\n */\nexport function applyPanBoundariesToOffset(\n offsetScaled: number,\n containerSize: number,\n contentSize: number,\n scale: number,\n boundaryPadding: number\n) {\n const contentSizeUnscaled = contentSize * scale;\n const offsetUnscaled = offsetScaled * scale;\n\n const contentStartBorderUnscaled =\n containerSize / 2 + offsetUnscaled - contentSizeUnscaled / 2;\n const contentEndBorderUnscaled =\n contentStartBorderUnscaled + contentSizeUnscaled;\n\n const containerStartBorder = 0;\n const containerEndBorder = containerStartBorder + containerSize;\n\n // do not let boundary padding be greater than the container size or less than 0\n if (!boundaryPadding || boundaryPadding < 0) boundaryPadding = 0;\n if (boundaryPadding > containerSize) boundaryPadding = containerSize;\n\n // Calculate container's measurements with boundary padding applied.\n // this should shrink the container's size by the amount of the boundary padding,\n // so that the content inside can be panned a bit further away from the original container's boundaries.\n const paddedContainerSize = containerSize - boundaryPadding * 2;\n const paddedContainerStartBorder = containerStartBorder + boundaryPadding;\n const paddedContainerEndBorder = containerEndBorder - boundaryPadding;\n\n // if content is smaller than the padded container,\n // don't let the content move\n if (contentSizeUnscaled < paddedContainerSize) {\n return 0;\n }\n\n // if content is larger than the padded container,\n // don't let the padded container go outside of content\n\n // maximum distance the content's center can move from its original position.\n // assuming the content original center is the container's center.\n const contentMaxOffsetScaled =\n (paddedContainerSize / 2 - contentSizeUnscaled / 2) / scale;\n\n if (\n // content reaching the end boundary\n contentEndBorderUnscaled < paddedContainerEndBorder\n ) {\n return contentMaxOffsetScaled;\n }\n if (\n // content reaching the start boundary\n contentStartBorderUnscaled > paddedContainerStartBorder\n ) {\n return -contentMaxOffsetScaled;\n }\n\n return offsetScaled;\n}\n"]} \ No newline at end of file +{"version":3,"names":["applyPanBoundariesToOffset","offsetScaled","containerSize","contentSize","scale","boundaryPadding","contentSizeUnscaled","offsetUnscaled","contentStartBorderUnscaled","contentEndBorderUnscaled","containerStartBorder","containerEndBorder","paddedContainerSize","paddedContainerStartBorder","paddedContainerEndBorder","contentMaxOffsetScaled"],"sourceRoot":"../../../src","sources":["helper/applyPanBoundariesToOffset.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,0BAA0BA,CACxCC,YAAoB,EACpBC,aAAqB,EACrBC,WAAmB,EACnBC,KAAa,EACbC,eAAuB,EACvB;EACA,MAAMC,mBAAmB,GAAGH,WAAW,GAAGC,KAAK;EAC/C,MAAMG,cAAc,GAAGN,YAAY,GAAGG,KAAK;EAE3C,MAAMI,0BAA0B,GAC9BN,aAAa,GAAG,CAAC,GAAGK,cAAc,GAAGD,mBAAmB,GAAG,CAAC;EAC9D,MAAMG,wBAAwB,GAC5BD,0BAA0B,GAAGF,mBAAmB;EAElD,MAAMI,oBAAoB,GAAG,CAAC;EAC9B,MAAMC,kBAAkB,GAAGD,oBAAoB,GAAGR,aAAa;;EAE/D;EACA,IAAI,CAACG,eAAe,IAAIA,eAAe,GAAG,CAAC,EAAEA,eAAe,GAAG,CAAC;EAChE,IAAIA,eAAe,GAAGH,aAAa,EAAEG,eAAe,GAAGH,aAAa;;EAEpE;EACA;EACA;EACA,MAAMU,mBAAmB,GAAGV,aAAa,GAAGG,eAAe,GAAG,CAAC;EAC/D,MAAMQ,0BAA0B,GAAGH,oBAAoB,GAAGL,eAAe;EACzE,MAAMS,wBAAwB,GAAGH,kBAAkB,GAAGN,eAAe;;EAErE;EACA;EACA,IAAIC,mBAAmB,GAAGM,mBAAmB,EAAE;IAC7C,OAAO,CAAC;EACV;;EAEA;EACA;;EAEA;EACA;EACA,MAAMG,sBAAsB,GAC1B,CAACH,mBAAmB,GAAG,CAAC,GAAGN,mBAAmB,GAAG,CAAC,IAAIF,KAAK;EAE7D;EACE;EACAK,wBAAwB,GAAGK,wBAAwB,EACnD;IACA,OAAOC,sBAAsB;EAC/B;EACA;EACE;EACAP,0BAA0B,GAAGK,0BAA0B,EACvD;IACA,OAAO,CAACE,sBAAsB;EAChC;EAEA,OAAOd,YAAY;AACrB","ignoreList":[]} diff --git a/lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js b/lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js index 11471321..cdf9a308 100644 --- a/lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js +++ b/lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js @@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.calcNewScaledOffsetForZoomCentering = calcNewScaledOffsetForZoomCentering; - /** * Calculates the new offset for the zoomSubject to ensure zoom center position is retained after zooming. * Parameters should correspond to whether we need the offset for the X or Y axis @@ -57,8 +56,9 @@ exports.calcNewScaledOffsetForZoomCentering = calcNewScaledOffsetForZoomCenterin */ function calcNewScaledOffsetForZoomCentering(oldOffsetXOrYScaled, zoomSubjectOriginalWidthOrHeight, oldScale, newScale, zoomCenterXOrY) { const oldOffSetUnscaled = oldOffsetXOrYScaled * oldScale; - const growthRate = newScale / oldScale; // these act like namespaces just for the sake of readability + const growthRate = newScale / oldScale; + // these act like namespaces just for the sake of readability const zoomSubjectOriginalCenter = {}; const zoomSubjectCurrentCenter = {}; const zoomSubjectNewCenter = {}; diff --git a/lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js.map b/lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js.map index d2beba74..0b6bb9c3 100644 --- a/lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js.map +++ b/lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js.map @@ -1 +1 @@ -{"version":3,"sources":["calcNewScaledOffsetForZoomCentering.ts"],"names":["calcNewScaledOffsetForZoomCentering","oldOffsetXOrYScaled","zoomSubjectOriginalWidthOrHeight","oldScale","newScale","zoomCenterXOrY","oldOffSetUnscaled","growthRate","zoomSubjectOriginalCenter","zoomSubjectCurrentCenter","zoomSubjectNewCenter","xOrY","distanceToZoomCenter","newOffsetUnscaled"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,mCAAT,CACLC,mBADK,EAELC,gCAFK,EAGLC,QAHK,EAILC,QAJK,EAKLC,cALK,EAML;AACA,QAAMC,iBAAiB,GAAGL,mBAAmB,GAAGE,QAAhD;AACA,QAAMI,UAAU,GAAGH,QAAQ,GAAGD,QAA9B,CAFA,CAIA;;AACA,QAAMK,yBAAyB,GAAG,EAAlC;AACA,QAAMC,wBAAwB,GAAG,EAAjC;AACA,QAAMC,oBAAoB,GAAG,EAA7B;AAEAF,EAAAA,yBAAyB,CAACG,IAA1B,GAAiCT,gCAAgC,GAAG,CAApE;AACAO,EAAAA,wBAAwB,CAACE,IAAzB,GACEH,yBAAyB,CAACG,IAA1B,GAAiCL,iBADnC;AAEAG,EAAAA,wBAAwB,CAACG,oBAAzB,GACEH,wBAAwB,CAACE,IAAzB,GAAgCN,cADlC;AAGAK,EAAAA,oBAAoB,CAACE,oBAArB,GACEH,wBAAwB,CAACG,oBAAzB,GAAgDL,UADlD;AAEAG,EAAAA,oBAAoB,CAACC,IAArB,GACED,oBAAoB,CAACE,oBAArB,GAA4CP,cAD9C;AAGA,QAAMQ,iBAAiB,GACrBH,oBAAoB,CAACC,IAArB,GAA4BH,yBAAyB,CAACG,IADxD;AAGA,SAAOE,iBAAiB,GAAGT,QAA3B;AACD","sourcesContent":["/**\n * Calculates the new offset for the zoomSubject to ensure zoom center position is retained after zooming.\n * Parameters should correspond to whether we need the offset for the X or Y axis\n *\n * ## Terms Used:\n *\n * - Zoom Subject: the view that's being zoomed and panned\n * - Zoom Center: the point whose relative position to the window is retained\n * - Unscaled: a measurement in pixels denoting the true size as observed by the users' eyes\n * - Scaled: a measurement in pixels scaled to the \"scale transformation\" of the zoom subject to match with its true size.\n * *For example:*\n * If the scale on the zoom subject is 0.5,\n * then to draw an actual 4px line on the zoom subject, we need to scale it to 4px / 0.5 = 8px\n * 8px is the scaled measurement\n *\n * ## Overall idea of this algorithm:\n *\n * When users perform zooming by pinching the screen,\n * we need to shift the zoom subject so that the position of the zoom center is always the same.\n * The offset amount to shift the layer is the returned value.\n *\n *\n * ## How we achieve our goal:\n *\n * To retain, the zoom center position, whenever a zoom action is performed,\n * we just need to make sure the distances from all the points in the zoom subject\n * to the zoom center increases or decreases by the growth rate of the scale.\n *\n * ```\n * newDistanceAnyPointToZoomCenter = oldDistanceAnyPointToZoomCenter * (newScale/oldScale)\n * ```\n *\n * We can't calculate that for all the points because there are unlimited points on a plain.\n * However, due to the way `transform` works in RN, every point is scaled from the zoom subject center.\n * Therefore, it's sufficient to base our calculation on the distance from the zoom subject center to the zoom center.\n *\n * ```\n * newDistanceZoomSubjectCenterToZoomCenter = oldDistanceZoomSubjectCenterToZoomCenter * (newScale/oldScale)\n * ```\n *\n * Once we have `newDistanceZoomSubjectCenterToZoomCenter`,\n * we can easily calculate the position of the new center, which leads us to the offset amount.\n * Refer to the code for more details\n *\n * @param oldOffsetXOrYScaled\n * @param zoomSubjectOriginalWidthOrHeight\n * @param oldScale\n * @param newScale\n * @param zoomCenterXOrY\n */\nexport function calcNewScaledOffsetForZoomCentering(\n oldOffsetXOrYScaled: number,\n zoomSubjectOriginalWidthOrHeight: number,\n oldScale: number,\n newScale: number,\n zoomCenterXOrY: number\n) {\n const oldOffSetUnscaled = oldOffsetXOrYScaled * oldScale;\n const growthRate = newScale / oldScale;\n\n // these act like namespaces just for the sake of readability\n const zoomSubjectOriginalCenter = {} as Center;\n const zoomSubjectCurrentCenter = {} as Center;\n const zoomSubjectNewCenter = {} as Center;\n\n zoomSubjectOriginalCenter.xOrY = zoomSubjectOriginalWidthOrHeight / 2;\n zoomSubjectCurrentCenter.xOrY =\n zoomSubjectOriginalCenter.xOrY + oldOffSetUnscaled;\n zoomSubjectCurrentCenter.distanceToZoomCenter =\n zoomSubjectCurrentCenter.xOrY - zoomCenterXOrY;\n\n zoomSubjectNewCenter.distanceToZoomCenter =\n zoomSubjectCurrentCenter.distanceToZoomCenter * growthRate;\n zoomSubjectNewCenter.xOrY =\n zoomSubjectNewCenter.distanceToZoomCenter + zoomCenterXOrY;\n\n const newOffsetUnscaled =\n zoomSubjectNewCenter.xOrY - zoomSubjectOriginalCenter.xOrY;\n\n return newOffsetUnscaled / newScale;\n}\n\ninterface Center {\n xOrY: number;\n distanceToZoomCenter: number;\n}\n"]} \ No newline at end of file +{"version":3,"names":["calcNewScaledOffsetForZoomCentering","oldOffsetXOrYScaled","zoomSubjectOriginalWidthOrHeight","oldScale","newScale","zoomCenterXOrY","oldOffSetUnscaled","growthRate","zoomSubjectOriginalCenter","zoomSubjectCurrentCenter","zoomSubjectNewCenter","xOrY","distanceToZoomCenter","newOffsetUnscaled"],"sourceRoot":"../../../src","sources":["helper/calcNewScaledOffsetForZoomCentering.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,mCAAmCA,CACjDC,mBAA2B,EAC3BC,gCAAwC,EACxCC,QAAgB,EAChBC,QAAgB,EAChBC,cAAsB,EACtB;EACA,MAAMC,iBAAiB,GAAGL,mBAAmB,GAAGE,QAAQ;EACxD,MAAMI,UAAU,GAAGH,QAAQ,GAAGD,QAAQ;;EAEtC;EACA,MAAMK,yBAAyB,GAAG,CAAC,CAAW;EAC9C,MAAMC,wBAAwB,GAAG,CAAC,CAAW;EAC7C,MAAMC,oBAAoB,GAAG,CAAC,CAAW;EAEzCF,yBAAyB,CAACG,IAAI,GAAGT,gCAAgC,GAAG,CAAC;EACrEO,wBAAwB,CAACE,IAAI,GAC3BH,yBAAyB,CAACG,IAAI,GAAGL,iBAAiB;EACpDG,wBAAwB,CAACG,oBAAoB,GAC3CH,wBAAwB,CAACE,IAAI,GAAGN,cAAc;EAEhDK,oBAAoB,CAACE,oBAAoB,GACvCH,wBAAwB,CAACG,oBAAoB,GAAGL,UAAU;EAC5DG,oBAAoB,CAACC,IAAI,GACvBD,oBAAoB,CAACE,oBAAoB,GAAGP,cAAc;EAE5D,MAAMQ,iBAAiB,GACrBH,oBAAoB,CAACC,IAAI,GAAGH,yBAAyB,CAACG,IAAI;EAE5D,OAAOE,iBAAiB,GAAGT,QAAQ;AACrC","ignoreList":[]} diff --git a/lib/commonjs/helper/coordinateConversion.js b/lib/commonjs/helper/coordinateConversion.js index ed72a050..c49c2092 100644 --- a/lib/commonjs/helper/coordinateConversion.js +++ b/lib/commonjs/helper/coordinateConversion.js @@ -7,7 +7,7 @@ exports.applyContainResizeMode = applyContainResizeMode; exports.defaultTransformSubjectData = void 0; exports.getImageOriginOnTransformSubject = getImageOriginOnTransformSubject; exports.viewportPositionToImagePosition = viewportPositionToImagePosition; -const defaultTransformSubjectData = { +const defaultTransformSubjectData = exports.defaultTransformSubjectData = { offsetX: 0, offsetY: 0, zoomLevel: 0, @@ -16,6 +16,7 @@ const defaultTransformSubjectData = { originalPageX: 0, originalPageY: 0 }; + /** * Assuming you have an image that's being resized to fit into a container * using the "contain" resize mode. You can use this function to calculate the @@ -27,9 +28,6 @@ const defaultTransformSubjectData = { * @param imgSize * @param containerSize */ - -exports.defaultTransformSubjectData = defaultTransformSubjectData; - function applyContainResizeMode(imgSize, containerSize) { const { width: imageWidth, @@ -42,7 +40,6 @@ function applyContainResizeMode(imgSize, containerSize) { const imageAspect = imageWidth / imageHeight; const areaAspect = areaWidth / areaHeight; let newSize; - if (imageAspect >= areaAspect) { // longest edge is horizontal newSize = { @@ -56,7 +53,6 @@ function applyContainResizeMode(imgSize, containerSize) { height: areaHeight }; } - if (isNaN(newSize.height)) newSize.height = areaHeight; if (isNaN(newSize.width)) newSize.width = areaWidth; const scale = imageWidth ? newSize.width / imageWidth : newSize.height / imageHeight; @@ -69,13 +65,12 @@ function applyContainResizeMode(imgSize, containerSize) { scale }; } + /** * get the coord of image's origin relative to the transformSubject * @param resizedImageSize * @param transformSubject */ - - function getImageOriginOnTransformSubject(resizedImageSize, transformSubject) { const { offsetX, @@ -89,6 +84,7 @@ function getImageOriginOnTransformSubject(resizedImageSize, transformSubject) { y: offsetY * zoomLevel + originalHeight / 2 - resizedImageSize.height / 2 * zoomLevel }; } + /** * Translates the coord system of a point from the viewport's space to the image's space * @@ -98,8 +94,6 @@ function getImageOriginOnTransformSubject(resizedImageSize, transformSubject) { * * @return {Vec2D} returns null if point is out of the sheet's bound */ - - function viewportPositionToImagePosition({ viewportPosition, imageSize, diff --git a/lib/commonjs/helper/coordinateConversion.js.map b/lib/commonjs/helper/coordinateConversion.js.map index d15f032f..88b61d95 100644 --- a/lib/commonjs/helper/coordinateConversion.js.map +++ b/lib/commonjs/helper/coordinateConversion.js.map @@ -1 +1 @@ -{"version":3,"sources":["coordinateConversion.ts"],"names":["defaultTransformSubjectData","offsetX","offsetY","zoomLevel","originalWidth","originalHeight","originalPageX","originalPageY","applyContainResizeMode","imgSize","containerSize","width","imageWidth","height","imageHeight","areaWidth","areaHeight","imageAspect","areaAspect","newSize","isNaN","scale","isFinite","size","getImageOriginOnTransformSubject","resizedImageSize","transformSubject","x","y","viewportPositionToImagePosition","viewportPosition","imageSize","zoomableEvent","resizedImgSize","resizedImgScale","sheetOriginOnContainer","pointOnSheet"],"mappings":";;;;;;;;;AAEO,MAAM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DS,cAD6D,EAE7DD,aAF6D,CAA/D;AAKA,QAAMI,YAAY,GAAG;AACnBT,IAAAA,CAAC,EACC,CAACG,gBAAgB,CAACH,CAAjB,GAAqBQ,sBAAsB,CAACR,CAA7C,IACAK,aAAa,CAAC7B,SADd,GAEA+B,eAJiB;AAKnBN,IAAAA,CAAC,EACC,CAACE,gBAAgB,CAACF,CAAjB,GAAqBO,sBAAsB,CAACP,CAA7C,IACAI,aAAa,CAAC7B,SADd,GAEA+B;AARiB,GAArB;AAWA,SAAOE,YAAP;AACD","sourcesContent":["import { Size2D, Vec2D, ZoomableViewEvent } from 'src/typings';\n\nexport const defaultTransformSubjectData: ZoomableViewEvent = {\n offsetX: 0,\n offsetY: 0,\n zoomLevel: 0,\n originalWidth: 0,\n originalHeight: 0,\n originalPageX: 0,\n originalPageY: 0,\n};\n\n/**\n * Assuming you have an image that's being resized to fit into a container\n * using the \"contain\" resize mode. You can use this function to calculate the\n * size of the image after fitting.\n *\n * Since our sheet is resized in this manner, we need this function\n * for things like pan boundaries and marker placement\n *\n * @param imgSize\n * @param containerSize\n */\nexport function applyContainResizeMode(\n imgSize: Size2D,\n containerSize: Size2D\n): { size: Size2D; scale: number } | { size: null; scale: null } {\n const { width: imageWidth, height: imageHeight } = imgSize;\n const { width: areaWidth, height: areaHeight } = containerSize;\n const imageAspect = imageWidth / imageHeight;\n const areaAspect = areaWidth / areaHeight;\n\n let newSize;\n if (imageAspect >= areaAspect) {\n // longest edge is horizontal\n newSize = { width: areaWidth, height: areaWidth / imageAspect };\n } else {\n // longest edge is vertical\n newSize = { width: areaHeight * imageAspect, height: areaHeight };\n }\n\n if (isNaN(newSize.height)) newSize.height = areaHeight;\n if (isNaN(newSize.width)) newSize.width = areaWidth;\n\n const scale = imageWidth\n ? newSize.width / imageWidth\n : newSize.height / imageHeight;\n\n if (!isFinite(scale)) return { size: null, scale: null };\n\n return {\n size: newSize,\n scale,\n };\n}\n\n/**\n * get the coord of image's origin relative to the transformSubject\n * @param resizedImageSize\n * @param transformSubject\n */\nexport function getImageOriginOnTransformSubject(\n resizedImageSize: Size2D,\n transformSubject: ZoomableViewEvent\n) {\n const { offsetX, offsetY, zoomLevel, originalWidth, originalHeight } =\n transformSubject;\n return {\n x:\n offsetX * zoomLevel +\n originalWidth / 2 -\n (resizedImageSize.width / 2) * zoomLevel,\n y:\n offsetY * zoomLevel +\n originalHeight / 2 -\n (resizedImageSize.height / 2) * zoomLevel,\n };\n}\n\n/**\n * Translates the coord system of a point from the viewport's space to the image's space\n *\n * @param pointOnContainer\n * @param sheetImageSize\n * @param transformSubject\n *\n * @return {Vec2D} returns null if point is out of the sheet's bound\n */\nexport function viewportPositionToImagePosition({\n viewportPosition,\n imageSize,\n zoomableEvent,\n}: {\n viewportPosition: Vec2D;\n imageSize: Size2D;\n zoomableEvent: ZoomableViewEvent;\n}): Vec2D | null {\n const { size: resizedImgSize, scale: resizedImgScale } =\n applyContainResizeMode(imageSize, {\n width: zoomableEvent.originalWidth,\n height: zoomableEvent.originalHeight,\n });\n\n if (resizedImgScale == null) return null;\n\n const sheetOriginOnContainer = getImageOriginOnTransformSubject(\n resizedImgSize,\n zoomableEvent\n );\n\n const pointOnSheet = {\n x:\n (viewportPosition.x - sheetOriginOnContainer.x) /\n zoomableEvent.zoomLevel /\n resizedImgScale,\n y:\n (viewportPosition.y - sheetOriginOnContainer.y) /\n zoomableEvent.zoomLevel /\n resizedImgScale,\n };\n\n return pointOnSheet;\n}\n"]} \ No newline at end of file +{"version":3,"names":["defaultTransformSubjectData","exports","offsetX","offsetY","zoomLevel","originalWidth","originalHeight","originalPageX","originalPageY","applyContainResizeMode","imgSize","containerSize","width","imageWidth","height","imageHeight","areaWidth","areaHeight","imageAspect","areaAspect","newSize","isNaN","scale","isFinite","size","getImageOriginOnTransformSubject","resizedImageSize","transformSubject","x","y","viewportPositionToImagePosition","viewportPosition","imageSize","zoomableEvent","resizedImgSize","resizedImgScale","sheetOriginOnContainer","pointOnSheet"],"sourceRoot":"../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,CAACF,CAAC,GAAGO,sBAAsB,CAACP,CAAC,IAC9CI,aAAa,CAAC7B,SAAS,GACvB+B;EACJ,CAAC;EAED,OAAOE,YAAY;AACrB","ignoreList":[]} diff --git a/lib/commonjs/helper/index.js b/lib/commonjs/helper/index.js index 9f2d7467..5d28b872 100644 --- a/lib/commonjs/helper/index.js +++ b/lib/commonjs/helper/index.js @@ -11,9 +11,7 @@ Object.defineProperty(exports, "calcNewScaledOffsetForZoomCentering", { return _calcNewScaledOffsetForZoomCentering.calcNewScaledOffsetForZoomCentering; } }); - var _calcNewScaledOffsetForZoomCentering = require("./calcNewScaledOffsetForZoomCentering"); - /** * Calculates the gesture center point relative to the page coordinate system * @@ -28,7 +26,6 @@ var _calcNewScaledOffsetForZoomCentering = require("./calcNewScaledOffsetForZoom function calcGestureCenterPoint(e, gestureState) { const touches = e.nativeEvent.touches; if (!touches[0]) return null; - if (gestureState.numberActiveTouches === 2) { if (!touches[1]) return null; return { @@ -36,17 +33,14 @@ function calcGestureCenterPoint(e, gestureState) { y: (touches[0].pageY + touches[1].pageY) / 2 }; } - if (gestureState.numberActiveTouches === 1) { return { x: touches[0].pageX, y: touches[0].pageY }; } - return null; } - function calcGestureTouchDistance(e, gestureState) { const touches = e.nativeEvent.touches; if (gestureState.numberActiveTouches !== 2 || !touches[0] || !touches[1]) return null; diff --git a/lib/commonjs/helper/index.js.map b/lib/commonjs/helper/index.js.map index 1c735d67..53f40f3c 100644 --- a/lib/commonjs/helper/index.js.map +++ b/lib/commonjs/helper/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["index.ts"],"names":["calcGestureCenterPoint","e","gestureState","touches","nativeEvent","numberActiveTouches","x","pageX","y","pageY","calcGestureTouchDistance","dx","Math","abs","dy","sqrt"],"mappings":";;;;;;;;;;;;;;AAIA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,sBAAT,CACLC,CADK,EAELC,YAFK,EAGS;AACd,QAAMC,OAA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CAAP,CAAWM,KAAvC,CAAX;AACA,SAAOG,IAAI,CAACG,IAAL,CAAUJ,EAAE,GAAGA,EAAL,GAAUG,EAAE,GAAGA,EAAzB,CAAP;AACD","sourcesContent":["import { GestureResponderEvent, PanResponderGestureState } from 'react-native';\n\nimport { Vec2D } from '../typings';\n\nexport { calcNewScaledOffsetForZoomCentering } from './calcNewScaledOffsetForZoomCentering';\n\n/**\n * Calculates the gesture center point relative to the page coordinate system\n *\n * We're unable to use touch.locationX/Y\n * because locationX uses the axis system of the leaf element that the touch occurs on,\n * which makes it even more complicated to translate into our container's axis system.\n *\n * We're also unable to use gestureState.moveX/Y\n * because gestureState.moveX/Y is messed up on real device\n * (Sometimes it's the center point, but sometimes it randomly takes the position of one of the touches)\n */\nexport function calcGestureCenterPoint(\n e: GestureResponderEvent,\n gestureState: PanResponderGestureState\n): Vec2D | null {\n const touches = e.nativeEvent.touches;\n if (!touches[0]) return null;\n\n if (gestureState.numberActiveTouches === 2) {\n if (!touches[1]) return null;\n return {\n x: (touches[0].pageX + touches[1].pageX) / 2,\n y: (touches[0].pageY + touches[1].pageY) / 2,\n };\n }\n if (gestureState.numberActiveTouches === 1) {\n return {\n x: touches[0].pageX,\n y: touches[0].pageY,\n };\n }\n\n return null;\n}\n\nexport function calcGestureTouchDistance(\n e: GestureResponderEvent,\n gestureState: PanResponderGestureState\n): number | null {\n const touches = e.nativeEvent.touches;\n if (gestureState.numberActiveTouches !== 2 || !touches[0] || !touches[1])\n return null;\n\n const dx = Math.abs(touches[0].pageX - touches[1].pageX);\n const dy = Math.abs(touches[0].pageY - touches[1].pageY);\n return Math.sqrt(dx * dx + dy * dy);\n}\n"]} \ No newline at end of file +{"version":3,"names":["_calcNewScaledOffsetForZoomCentering","require","calcGestureCenterPoint","e","gestureState","touches","nativeEvent","numberActiveTouches","x","pageX","y","pageY","calcGestureTouchDistance","dx","Math","abs","dy","sqrt"],"sourceRoot":"../../../src","sources":["helper/index.ts"],"mappings":";;;;;;;;;;;;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,MAAMO,EAAE,GAAGF,IAAI,CAACC,GAAG,CAACV,OAAO,CAAC,CAAC,CAAC,CAACM,KAAK,GAAGN,OAAO,CAAC,CAAC,CAAC,CAACM,KAAK,CAAC;EACxD,OAAOG,IAAI,CAACG,IAAI,CAACJ,EAAE,GAAGA,EAAE,GAAGG,EAAE,GAAGA,EAAE,CAAC;AACrC","ignoreList":[]} diff --git a/lib/commonjs/index.js b/lib/commonjs/index.js index 0cc39c61..39cbcac4 100644 --- a/lib/commonjs/index.js +++ b/lib/commonjs/index.js @@ -27,10 +27,7 @@ Object.defineProperty(exports, "viewportPositionToImagePosition", { return _coordinateConversion.viewportPositionToImagePosition; } }); - var _coordinateConversion = require("./helper/coordinateConversion"); - var _ReactNativeZoomableView = _interopRequireDefault(require("./ReactNativeZoomableView")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/commonjs/index.js.map b/lib/commonjs/index.js.map index 003621e3..631e5134 100644 --- a/lib/commonjs/index.js.map +++ b/lib/commonjs/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAKA","sourcesContent":["import {\n applyContainResizeMode,\n getImageOriginOnTransformSubject,\n viewportPositionToImagePosition,\n} from './helper/coordinateConversion';\nimport ReactNativeZoomableView from './ReactNativeZoomableView';\nimport type {\n ReactNativeZoomableViewProps,\n ZoomableViewEvent,\n} from './typings';\n\nexport {\n // Helper functions for coordinate conversion\n applyContainResizeMode,\n getImageOriginOnTransformSubject,\n ReactNativeZoomableView,\n ReactNativeZoomableViewProps,\n viewportPositionToImagePosition,\n ZoomableViewEvent,\n};\n"]} \ No newline at end of file +{"version":3,"names":["_coordinateConversion","require","_ReactNativeZoomableView","_interopRequireDefault","e","__esModule","default"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,qBAAA,GAAAC,OAAA;AAKA,IAAAC,wBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAgE,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]} diff --git a/lib/commonjs/package.json b/lib/commonjs/package.json new file mode 100644 index 00000000..729ac4d9 --- /dev/null +++ b/lib/commonjs/package.json @@ -0,0 +1 @@ +{"type":"commonjs"} diff --git a/lib/commonjs/typings/index.js b/lib/commonjs/typings/index.js index 36ab7057..4907bab3 100644 --- a/lib/commonjs/typings/index.js +++ b/lib/commonjs/typings/index.js @@ -4,13 +4,11 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.SwipeDirection = void 0; -let SwipeDirection; -exports.SwipeDirection = SwipeDirection; - -(function (SwipeDirection) { +let SwipeDirection = exports.SwipeDirection = /*#__PURE__*/function (SwipeDirection) { SwipeDirection["SWIPE_UP"] = "SWIPE_UP"; SwipeDirection["SWIPE_DOWN"] = "SWIPE_DOWN"; SwipeDirection["SWIPE_LEFT"] = "SWIPE_LEFT"; SwipeDirection["SWIPE_RIGHT"] = "SWIPE_RIGHT"; -})(SwipeDirection || (exports.SwipeDirection = SwipeDirection = {})); + return SwipeDirection; +}({}); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/commonjs/typings/index.js.map b/lib/commonjs/typings/index.js.map index eec8e49d..1b6eb0df 100644 --- a/lib/commonjs/typings/index.js.map +++ b/lib/commonjs/typings/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["index.ts"],"names":["SwipeDirection"],"mappings":";;;;;;IASYA,c;;;WAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;GAAAA,c,8BAAAA,c","sourcesContent":["import { ReactNode } from 'react';\nimport {\n Animated,\n GestureResponderEvent,\n LayoutChangeEvent,\n PanResponderGestureState,\n ViewProps,\n} from 'react-native';\n\nexport enum SwipeDirection {\n SWIPE_UP = 'SWIPE_UP',\n SWIPE_DOWN = 'SWIPE_DOWN',\n SWIPE_LEFT = 'SWIPE_LEFT',\n SWIPE_RIGHT = 'SWIPE_RIGHT',\n}\n\nexport interface ZoomableViewEvent {\n zoomLevel: number;\n offsetX: number;\n offsetY: number;\n originalHeight: number;\n originalWidth: number;\n originalPageX: number;\n originalPageY: number;\n}\n\nexport interface ReactNativeZoomableViewProps {\n // options\n style?: ViewProps['style'];\n children?: ReactNode;\n zoomEnabled?: boolean;\n panEnabled?: boolean;\n initialZoom?: number;\n initialOffsetX?: number;\n initialOffsetY?: number;\n contentWidth?: number;\n contentHeight?: number;\n panBoundaryPadding?: number;\n maxZoom?: number;\n minZoom?: number;\n doubleTapDelay?: number;\n doubleTapZoomToCenter?: boolean;\n bindToBorders?: boolean;\n zoomStep?: number;\n pinchToZoomInSensitivity?: number;\n pinchToZoomOutSensitivity?: number;\n movementSensibility?: number;\n longPressDuration?: number;\n visualTouchFeedbackEnabled?: boolean;\n disablePanOnInitialZoom?: boolean;\n\n // Zoom animated value ref\n zoomAnimatedValue?: Animated.Value;\n panAnimatedValueXY?: Animated.ValueXY;\n\n // debug\n debug?: boolean;\n\n // callbacks\n onLayout?: (event: Pick) => void;\n onTransform?: (zoomableViewEventObject: ZoomableViewEvent) => void;\n onSingleTap?: (\n event: GestureResponderEvent,\n zoomableViewEventObject: ZoomableViewEvent\n ) => void;\n onDoubleTapBefore?: (\n event: GestureResponderEvent,\n zoomableViewEventObject: ZoomableViewEvent\n ) => void;\n onDoubleTapAfter?: (\n event: GestureResponderEvent,\n zoomableViewEventObject: ZoomableViewEvent\n ) => void;\n onShiftingBefore?: (\n event: GestureResponderEvent | null,\n gestureState: PanResponderGestureState | null,\n zoomableViewEventObject: ZoomableViewEvent\n ) => boolean;\n onShiftingAfter?: (\n event: GestureResponderEvent | null,\n gestureState: PanResponderGestureState | null,\n zoomableViewEventObject: ZoomableViewEvent\n ) => boolean;\n onShiftingEnd?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState,\n zoomableViewEventObject: ZoomableViewEvent\n ) => void;\n onZoomBefore?: (\n event: GestureResponderEvent | null,\n gestureState: PanResponderGestureState | null,\n zoomableViewEventObject: ZoomableViewEvent\n ) => boolean | undefined;\n onZoomAfter?: (\n event: GestureResponderEvent | null,\n gestureState: PanResponderGestureState | null,\n zoomableViewEventObject: ZoomableViewEvent\n ) => void;\n onZoomEnd?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState,\n zoomableViewEventObject: ZoomableViewEvent\n ) => void;\n onLongPress?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState,\n zoomableViewEventObject: ZoomableViewEvent\n ) => void;\n onStartShouldSetPanResponder?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState,\n zoomableViewEventObject: ZoomableViewEvent,\n baseComponentResult: boolean\n ) => boolean;\n onPanResponderGrant?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState,\n zoomableViewEventObject: ZoomableViewEvent\n ) => void;\n onPanResponderEnd?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState,\n zoomableViewEventObject: ZoomableViewEvent\n ) => void;\n onPanResponderMove?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState,\n zoomableViewEventObject: ZoomableViewEvent\n ) => boolean;\n onPanResponderTerminate?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState,\n zoomableViewEventObject: ZoomableViewEvent\n ) => void;\n onPanResponderTerminationRequest?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState,\n zoomableViewEventObject: ZoomableViewEvent\n ) => boolean;\n onShouldBlockNativeResponder?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState,\n zoomableViewEventObject: ZoomableViewEvent\n ) => boolean;\n onStartShouldSetPanResponderCapture?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState\n ) => boolean;\n onMoveShouldSetPanResponderCapture?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState\n ) => boolean;\n onStaticPinPress?: (event: GestureResponderEvent) => void;\n onStaticPinLongPress?: (event: GestureResponderEvent) => void;\n staticPinPosition?: Vec2D;\n staticPinIcon?: React.ReactElement;\n onStaticPinPositionChange?: (position: Vec2D) => void;\n onStaticPinPositionMove?: (position: Vec2D) => void;\n animatePin: boolean;\n pinProps?: ViewProps;\n disableMomentum?: boolean;\n}\n\nexport interface Vec2D {\n x: number;\n y: number;\n}\n\nexport interface Size2D {\n width: number;\n height: number;\n}\n\nexport interface TouchPoint extends Vec2D {\n id: string;\n isSecondTap?: boolean;\n}\n\nexport interface ReactNativeZoomableViewState {\n touches?: TouchPoint[];\n originalWidth: number;\n originalHeight: number;\n originalPageX: number;\n originalPageY: number;\n originalX: number;\n originalY: number;\n debugPoints?: undefined | Vec2D[];\n pinSize: Size2D;\n}\n\nexport interface ReactNativeZoomableViewWithGesturesProps\n extends ReactNativeZoomableViewProps {\n swipeLengthThreshold?: number;\n swipeVelocityThreshold?: number;\n swipeDirectionalThreshold?: number;\n swipeMinZoom?: number;\n swipeMaxZoom?: number;\n swipeDisabled?: boolean;\n onSwipe?: (\n swipeDirection: SwipeDirection,\n gestureState: PanResponderGestureState\n ) => void;\n onSwipeUp?: (gestureState: PanResponderGestureState) => void;\n onSwipeDown?: (gestureState: PanResponderGestureState) => void;\n onSwipeLeft?: (gestureState: PanResponderGestureState) => void;\n onSwipeRight?: (gestureState: PanResponderGestureState) => void;\n}\n"]} \ No newline at end of file +{"version":3,"names":["SwipeDirection","exports"],"sourceRoot":"../../../src","sources":["typings/index.ts"],"mappings":";;;;;;IASYA,cAAc,GAAAC,OAAA,CAAAD,cAAA,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]} diff --git a/lib/module/ReactNativeZoomableView.js b/lib/module/ReactNativeZoomableView.js index 35cb90f7..8ac51081 100644 --- a/lib/module/ReactNativeZoomableView.js +++ b/lib/module/ReactNativeZoomableView.js @@ -1,6 +1,4 @@ -function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +"use strict"; import { debounce } from 'lodash'; import React, { Component, createRef } from 'react'; @@ -12,6 +10,7 @@ import { DebugTouchPoint } from './debugHelper'; import { calcGestureCenterPoint, calcGestureTouchDistance, calcNewScaledOffsetForZoomCentering } from './helper'; import { applyPanBoundariesToOffset } from './helper/applyPanBoundariesToOffset'; import { viewportPositionToImagePosition } from './helper/coordinateConversion'; +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; const initialState = { originalWidth: 0, originalHeight: 0, @@ -24,379 +23,77 @@ const initialState = { height: 0 } }; - class ReactNativeZoomableView extends Component { + static defaultProps = { + zoomEnabled: true, + panEnabled: true, + initialZoom: 1, + initialOffsetX: 0, + initialOffsetY: 0, + maxZoom: 1.5, + minZoom: 0.5, + pinchToZoomInSensitivity: 1, + pinchToZoomOutSensitivity: 1, + movementSensibility: 1, + doubleTapDelay: 300, + bindToBorders: true, + zoomStep: 0.5, + onLongPress: null, + longPressDuration: 700, + contentWidth: undefined, + contentHeight: undefined, + panBoundaryPadding: 0, + visualTouchFeedbackEnabled: true, + staticPinPosition: undefined, + staticPinIcon: undefined, + onStaticPinPositionChange: undefined, + onStaticPinPositionMove: undefined, + animatePin: true, + disablePanOnInitialZoom: false + }; + panAnim = new Animated.ValueXY({ + x: 0, + y: 0 + }); + zoomAnim = new Animated.Value(1); + pinAnim = new Animated.ValueXY({ + x: 0, + y: 0 + }); + __offsets = { + x: { + value: 0, + boundaryCrossedAnimInEffect: false + }, + y: { + value: 0, + boundaryCrossedAnimInEffect: false + } + }; + zoomLevel = 1; + lastGestureCenterPosition = null; + lastGestureTouchDistance = null; + _gestureStarted = false; set gestureStarted(v) { this._gestureStarted = v; } - get gestureStarted() { return this._gestureStarted; } + /** * Last press time (used to evaluate whether user double tapped) * @type {number} */ - - + longPressTimeout = null; + touches = []; constructor(props) { - super(props); // This needs to be done before anything else to initialize the state. + super(props); + // This needs to be done before anything else to initialize the state. // Otherwise, the logic below may reference the state when it's undefined, // causing runtime errors. - - _defineProperty(this, "zoomSubjectWrapperRef", void 0); - - _defineProperty(this, "gestureHandlers", void 0); - - _defineProperty(this, "doubleTapFirstTapReleaseTimestamp", void 0); - - _defineProperty(this, "panAnim", new Animated.ValueXY({ - x: 0, - y: 0 - })); - - _defineProperty(this, "zoomAnim", new Animated.Value(1)); - - _defineProperty(this, "pinAnim", new Animated.ValueXY({ - x: 0, - y: 0 - })); - - _defineProperty(this, "__offsets", { - x: { - value: 0, - boundaryCrossedAnimInEffect: false - }, - y: { - value: 0, - boundaryCrossedAnimInEffect: false - } - }); - - _defineProperty(this, "zoomLevel", 1); - - _defineProperty(this, "lastGestureCenterPosition", null); - - _defineProperty(this, "lastGestureTouchDistance", null); - - _defineProperty(this, "gestureType", void 0); - - _defineProperty(this, "_gestureStarted", false); - - _defineProperty(this, "longPressTimeout", null); - - _defineProperty(this, "onTransformInvocationInitialized", void 0); - - _defineProperty(this, "singleTapTimeoutId", void 0); - - _defineProperty(this, "touches", []); - - _defineProperty(this, "doubleTapFirstTap", void 0); - - _defineProperty(this, "measureZoomSubjectInterval", void 0); - - _defineProperty(this, "debouncedOnStaticPinPositionChange", debounce(position => { - var _this$props$onStaticP, _this$props; - - return (_this$props$onStaticP = (_this$props = this.props).onStaticPinPositionChange) === null || _this$props$onStaticP === void 0 ? void 0 : _this$props$onStaticP.call(_this$props, position); - }, 100)); - - _defineProperty(this, "measureZoomSubject", () => { - // make sure we measure after animations are complete - requestAnimationFrame(() => { - // this setTimeout is here to fix a weird issue on iOS where the measurements are all `0` - // when navigating back (react-navigation stack) from another view - // while closing the keyboard at the same time - setTimeout(() => { - var _this$zoomSubjectWrap; - - // In normal conditions, we're supposed to measure zoomSubject instead of its wrapper. - // However, our zoomSubject may have been transformed by an initial zoomLevel or offset, - // in which case these measurements will not represent the true "original" measurements. - // We just need to make sure the zoomSubjectWrapper perfectly aligns with the zoomSubject - // (no border, space, or anything between them) - (_this$zoomSubjectWrap = this.zoomSubjectWrapperRef.current) === null || _this$zoomSubjectWrap === void 0 ? void 0 : _this$zoomSubjectWrap.measure((x, y, width, height, pageX, pageY) => { - // When the component is off-screen, these become all 0s, so we don't set them - // to avoid messing up calculations, especially ones that are done right after - // the component transitions from hidden to visible. - if (!pageX && !pageY && !width && !height) return; // If these values are all the same, don't re-set them in state - // this way we don't re-render - - if (this.state.originalX === x && this.state.originalY === y && this.state.originalWidth === width && this.state.originalHeight === height && this.state.originalPageX === pageX && this.state.originalPageY === pageY) { - return; - } - - this.setState({ - originalX: x, - originalY: y, - originalWidth: width, - originalHeight: height, - originalPageX: pageX, - originalPageY: pageY - }); - }); - }); - }); - }); - - _defineProperty(this, "_handleStartShouldSetPanResponder", (e, gestureState) => { - if (this.props.onStartShouldSetPanResponder) { - this.props.onStartShouldSetPanResponder(e, gestureState, this._getZoomableViewEventObject(), false); - } // Always set pan responder on start - // of gesture so we can handle tap. - // "Pan threshold validation" will be handled - // in `onPanResponderMove` instead of in `onMoveShouldSetPanResponder` - - - return true; - }); - - _defineProperty(this, "_handlePanResponderGrant", (e, gestureState) => { - var _this$props$onPanResp, _this$props3; - - if (this.props.onLongPress) { - e.persist(); - this.longPressTimeout = setTimeout(() => { - var _this$props$onLongPre, _this$props2; - - (_this$props$onLongPre = (_this$props2 = this.props).onLongPress) === null || _this$props$onLongPre === void 0 ? void 0 : _this$props$onLongPre.call(_this$props2, e, gestureState, this._getZoomableViewEventObject()); - this.longPressTimeout = null; - }, this.props.longPressDuration); - } - - (_this$props$onPanResp = (_this$props3 = this.props).onPanResponderGrant) === null || _this$props$onPanResp === void 0 ? void 0 : _this$props$onPanResp.call(_this$props3, e, gestureState, this._getZoomableViewEventObject()); - this.panAnim.stopAnimation(); - this.zoomAnim.stopAnimation(); - this.gestureStarted = true; - this.raisePin(); - }); - - _defineProperty(this, "_handlePanResponderEnd", (e, gestureState) => { - var _this$props$onPanResp2, _this$props4; - - if (!this.gestureType) { - this._resolveAndHandleTap(e); - } - - this.setState({ - debugPoints: [] - }); - this.lastGestureCenterPosition = null; - const disableMomentum = this.props.disableMomentum || this.props.panEnabled && this.gestureType === 'shift' && this.props.disablePanOnInitialZoom && this.zoomLevel === this.props.initialZoom; // Trigger final shift animation unless disablePanOnInitialZoom is set and we're on the initial zoom level - // or disableMomentum - - if (!disableMomentum) { - getPanMomentumDecayAnim(this.panAnim, { - x: gestureState.vx / this.zoomLevel, - y: gestureState.vy / this.zoomLevel - }).start(); - } - - if (this.longPressTimeout) { - clearTimeout(this.longPressTimeout); - this.longPressTimeout = null; - } - - (_this$props$onPanResp2 = (_this$props4 = this.props).onPanResponderEnd) === null || _this$props$onPanResp2 === void 0 ? void 0 : _this$props$onPanResp2.call(_this$props4, e, gestureState, this._getZoomableViewEventObject()); - - if (this.gestureType === 'pinch') { - var _this$props$onZoomEnd, _this$props5; - - (_this$props$onZoomEnd = (_this$props5 = this.props).onZoomEnd) === null || _this$props$onZoomEnd === void 0 ? void 0 : _this$props$onZoomEnd.call(_this$props5, e, gestureState, this._getZoomableViewEventObject()); - } else if (this.gestureType === 'shift') { - var _this$props$onShiftin, _this$props6; - - (_this$props$onShiftin = (_this$props6 = this.props).onShiftingEnd) === null || _this$props$onShiftin === void 0 ? void 0 : _this$props$onShiftin.call(_this$props6, e, gestureState, this._getZoomableViewEventObject()); - } - - if (this.props.staticPinPosition) { - this._updateStaticPin(); - } - - this.dropPin(); - this.gestureType = null; - this.gestureStarted = false; - }); - - _defineProperty(this, "_handlePanResponderMove", (e, gestureState) => { - if (this.props.onPanResponderMove) { - if (this.props.onPanResponderMove(e, gestureState, this._getZoomableViewEventObject())) { - return false; - } - } // Only supports 2 touches and below, - // any invalid number will cause the gesture to end. - - - if (gestureState.numberActiveTouches <= 2) { - if (!this.gestureStarted) { - this._handlePanResponderGrant(e, gestureState); - } - } else { - if (this.gestureStarted) { - this._handlePanResponderEnd(e, gestureState); - } - - return true; - } - - if (gestureState.numberActiveTouches === 2) { - if (this.longPressTimeout) { - clearTimeout(this.longPressTimeout); - this.longPressTimeout = null; - } // change some measurement states when switching gesture to ensure a smooth transition - - - if (this.gestureType !== 'pinch') { - this.lastGestureCenterPosition = calcGestureCenterPoint(e, gestureState); - this.lastGestureTouchDistance = calcGestureTouchDistance(e, gestureState); - } - - this.gestureType = 'pinch'; - - this._handlePinching(e, gestureState); - } else if (gestureState.numberActiveTouches === 1) { - if (this.longPressTimeout && (Math.abs(gestureState.dx) > 5 || Math.abs(gestureState.dy) > 5)) { - clearTimeout(this.longPressTimeout); - this.longPressTimeout = null; - } // change some measurement states when switching gesture to ensure a smooth transition - - - if (this.gestureType !== 'shift') { - this.lastGestureCenterPosition = calcGestureCenterPoint(e, gestureState); - } - - const { - dx, - dy - } = gestureState; - const isShiftGesture = Math.abs(dx) > 2 || Math.abs(dy) > 2; - - if (isShiftGesture) { - this.gestureType = 'shift'; - - this._handleShifting(gestureState); - } - } - }); - - _defineProperty(this, "_resolveAndHandleTap", e => { - const now = Date.now(); - - if (this.doubleTapFirstTapReleaseTimestamp && this.props.doubleTapDelay && now - this.doubleTapFirstTapReleaseTimestamp < this.props.doubleTapDelay) { - this.doubleTapFirstTap && this._addTouch({ ...this.doubleTapFirstTap, - id: now.toString(), - isSecondTap: true - }); - this.singleTapTimeoutId && clearTimeout(this.singleTapTimeoutId); - delete this.doubleTapFirstTapReleaseTimestamp; - delete this.singleTapTimeoutId; - delete this.doubleTapFirstTap; - - this._handleDoubleTap(e); - } else { - this.doubleTapFirstTapReleaseTimestamp = now; - this.doubleTapFirstTap = { - id: now.toString(), - x: e.nativeEvent.pageX - this.state.originalPageX, - y: e.nativeEvent.pageY - this.state.originalPageY - }; - - this._addTouch(this.doubleTapFirstTap); // persist event so e.nativeEvent is preserved after a timeout delay - - - e.persist(); - this.singleTapTimeoutId = setTimeout(() => { - var _this$props$onSingleT, _this$props7; - - delete this.doubleTapFirstTapReleaseTimestamp; - delete this.singleTapTimeoutId; // Pan to the tapped location - - if (this.props.staticPinPosition && this.doubleTapFirstTap) { - const tapX = this.props.staticPinPosition.x - this.doubleTapFirstTap.x; - const tapY = this.props.staticPinPosition.y - this.doubleTapFirstTap.y; - Animated.timing(this.panAnim, { - toValue: { - x: this.offsetX + tapX / this.zoomLevel, - y: this.offsetY + tapY / this.zoomLevel - }, - useNativeDriver: true, - duration: 200 - }).start(() => { - this._updateStaticPin(); - }); - } - - (_this$props$onSingleT = (_this$props7 = this.props).onSingleTap) === null || _this$props$onSingleT === void 0 ? void 0 : _this$props$onSingleT.call(_this$props7, e, this._getZoomableViewEventObject()); - }, this.props.doubleTapDelay); - } - }); - - _defineProperty(this, "moveStaticPinTo", (position, duration) => { - const { - originalWidth, - originalHeight - } = this.state; - const { - staticPinPosition, - contentWidth, - contentHeight - } = this.props; - if (!staticPinPosition) return; - if (!originalWidth || !originalHeight) return; - if (!contentWidth || !contentHeight) return; // Offset for the static pin - - const pinX = staticPinPosition.x - originalWidth / 2; - const pinY = staticPinPosition.y - originalHeight / 2; - this.offsetX = contentWidth / 2 - position.x + pinX / this.zoomLevel; - this.offsetY = contentHeight / 2 - position.y + pinY / this.zoomLevel; - - if (duration) { - Animated.timing(this.panAnim, { - toValue: { - x: this.offsetX, - y: this.offsetY - }, - useNativeDriver: true, - duration - }).start(); - } else { - this.panAnim.setValue({ - x: this.offsetX, - y: this.offsetY - }); - } - }); - - _defineProperty(this, "_staticPinPosition", () => { - if (!this.props.staticPinPosition) return; - if (!this.props.contentWidth || !this.props.contentHeight) return; - return viewportPositionToImagePosition({ - viewportPosition: { - x: this.props.staticPinPosition.x, - y: this.props.staticPinPosition.y - }, - imageSize: { - height: this.props.contentHeight, - width: this.props.contentWidth - }, - zoomableEvent: { ...this._getZoomableViewEventObject(), - offsetX: this.offsetX, - offsetY: this.offsetY, - zoomLevel: this.zoomLevel - } - }); - }); - - _defineProperty(this, "_updateStaticPin", () => { - var _this$props$onStaticP2, _this$props8; - - const position = this._staticPinPosition(); - - if (!position) return; - (_this$props$onStaticP2 = (_this$props8 = this.props).onStaticPinPositionChange) === null || _this$props$onStaticP2 === void 0 ? void 0 : _this$props$onStaticP2.call(_this$props8, position); - }); - - this.state = { ...initialState + this.state = { + ...initialState }; this.gestureHandlers = PanResponder.create({ onStartShouldSetPanResponder: this._handleStartShouldSetPanResponder, @@ -404,8 +101,6 @@ class ReactNativeZoomableView extends Component { onPanResponderMove: this._handlePanResponderMove, onPanResponderRelease: this._handlePanResponderEnd, onPanResponderTerminate: (evt, gestureState) => { - var _this$props$onPanResp3, _this$props9; - // We should also call _handlePanResponderEnd // to properly perform cleanups when the gesture is terminated // (aka gesture handling responsibility is taken over by another component). @@ -413,30 +108,13 @@ class ReactNativeZoomableView extends Component { // on real device, sometimes onPanResponderRelease is not called when you lift 2 fingers up, // but onPanResponderTerminate is called instead for no apparent reason. this._handlePanResponderEnd(evt, gestureState); - - (_this$props$onPanResp3 = (_this$props9 = this.props).onPanResponderTerminate) === null || _this$props$onPanResp3 === void 0 ? void 0 : _this$props$onPanResp3.call(_this$props9, evt, gestureState, this._getZoomableViewEventObject()); - }, - onPanResponderTerminationRequest: (evt, gestureState) => { - var _this$props$onPanResp4, _this$props10; - - return !!((_this$props$onPanResp4 = (_this$props10 = this.props).onPanResponderTerminationRequest) !== null && _this$props$onPanResp4 !== void 0 && _this$props$onPanResp4.call(_this$props10, evt, gestureState, this._getZoomableViewEventObject())); + this.props.onPanResponderTerminate?.(evt, gestureState, this._getZoomableViewEventObject()); }, + onPanResponderTerminationRequest: (evt, gestureState) => !!this.props.onPanResponderTerminationRequest?.(evt, gestureState, this._getZoomableViewEventObject()), // Defaults to true to prevent parent components, such as React Navigation's tab view, from taking over as responder. - onShouldBlockNativeResponder: (evt, gestureState) => { - var _this$props$onShouldB, _this$props$onShouldB2, _this$props11; - - return (_this$props$onShouldB = (_this$props$onShouldB2 = (_this$props11 = this.props).onShouldBlockNativeResponder) === null || _this$props$onShouldB2 === void 0 ? void 0 : _this$props$onShouldB2.call(_this$props11, evt, gestureState, this._getZoomableViewEventObject())) !== null && _this$props$onShouldB !== void 0 ? _this$props$onShouldB : true; - }, - onStartShouldSetPanResponderCapture: (evt, gestureState) => { - var _this$props$onStartSh, _this$props12; - - return !!((_this$props$onStartSh = (_this$props12 = this.props).onStartShouldSetPanResponderCapture) !== null && _this$props$onStartSh !== void 0 && _this$props$onStartSh.call(_this$props12, evt, gestureState)); - }, - onMoveShouldSetPanResponderCapture: (evt, gestureState) => { - var _this$props$onMoveSho, _this$props13; - - return !!((_this$props$onMoveSho = (_this$props13 = this.props).onMoveShouldSetPanResponderCapture) !== null && _this$props$onMoveSho !== void 0 && _this$props$onMoveSho.call(_this$props13, evt, gestureState)); - } + onShouldBlockNativeResponder: (evt, gestureState) => this.props.onShouldBlockNativeResponder?.(evt, gestureState, this._getZoomableViewEventObject()) ?? true, + onStartShouldSetPanResponderCapture: (evt, gestureState) => !!this.props.onStartShouldSetPanResponderCapture?.(evt, gestureState), + onMoveShouldSetPanResponderCapture: (evt, gestureState) => !!this.props.onMoveShouldSetPanResponderCapture?.(evt, gestureState) }); this.zoomSubjectWrapperRef = /*#__PURE__*/createRef(); if (this.props.zoomAnimatedValue) this.zoomAnim = this.props.zoomAnimatedValue; @@ -464,7 +142,6 @@ class ReactNativeZoomableView extends Component { this.lastGestureTouchDistance = 150; this.gestureType = null; } - raisePin() { if (!this.props.animatePin) return; Animated.timing(this.pinAnim, { @@ -477,7 +154,6 @@ class ReactNativeZoomableView extends Component { duration: 100 }).start(); } - dropPin() { if (!this.props.animatePin) return; Animated.timing(this.pinAnim, { @@ -490,34 +166,26 @@ class ReactNativeZoomableView extends Component { duration: 100 }).start(); } - set offsetX(x) { this.__setOffset('x', x); } - set offsetY(y) { this.__setOffset('y', y); } - get offsetX() { return this.__getOffset('x'); } - get offsetY() { return this.__getOffset('y'); } - __setOffset(axis, offset) { const offsetState = this.__offsets[axis]; - if (this.props.bindToBorders) { const containerSize = axis === 'x' ? this.state.originalWidth : this.state.originalHeight; const contentSize = axis === 'x' ? this.props.contentWidth || this.state.originalWidth : this.props.contentHeight || this.state.originalHeight; const boundOffset = contentSize && containerSize && this.props.panBoundaryPadding != null ? applyPanBoundariesToOffset(offset, containerSize, contentSize, this.zoomLevel, this.props.panBoundaryPadding) : offset; - if (!this.gestureType && !offsetState.boundaryCrossedAnimInEffect) { const boundariesApplied = boundOffset !== offset && boundOffset.toFixed(3) !== offset.toFixed(3); - if (boundariesApplied) { offsetState.boundaryCrossedAnimInEffect = true; getBoundaryCrossedAnim(this.panAnim[axis], boundOffset).start(() => { @@ -527,111 +195,91 @@ class ReactNativeZoomableView extends Component { } } } - offsetState.value = offset; } - __getOffset(axis) { return this.__offsets[axis].value; } - componentDidUpdate(prevProps, prevState) { - var _prevProps$staticPinP, _this$props$staticPin, _prevProps$staticPinP2, _this$props$staticPin2; - const { zoomEnabled, initialZoom } = this.props; - if (prevProps.zoomEnabled && !zoomEnabled && initialZoom) { this.zoomLevel = initialZoom; this.zoomAnim.setValue(this.zoomLevel); } - if (!this.onTransformInvocationInitialized && this._invokeOnTransform().successful) { this.panAnim.addListener(() => this._invokeOnTransform()); this.zoomAnim.addListener(() => this._invokeOnTransform()); this.onTransformInvocationInitialized = true; } - const currState = this.state; const originalMeasurementsChanged = currState.originalHeight !== prevState.originalHeight || currState.originalWidth !== prevState.originalWidth || currState.originalPageX !== prevState.originalPageX || currState.originalPageY !== prevState.originalPageY || currState.originalX !== prevState.originalX || currState.originalY !== prevState.originalY; - const staticPinPositionChanged = ((_prevProps$staticPinP = prevProps.staticPinPosition) === null || _prevProps$staticPinP === void 0 ? void 0 : _prevProps$staticPinP.x) !== ((_this$props$staticPin = this.props.staticPinPosition) === null || _this$props$staticPin === void 0 ? void 0 : _this$props$staticPin.x) || ((_prevProps$staticPinP2 = prevProps.staticPinPosition) === null || _prevProps$staticPinP2 === void 0 ? void 0 : _prevProps$staticPinP2.y) !== ((_this$props$staticPin2 = this.props.staticPinPosition) === null || _this$props$staticPin2 === void 0 ? void 0 : _this$props$staticPin2.y); // We use a custom `onLayout` event, so the clients can stay in-sync + const staticPinPositionChanged = prevProps.staticPinPosition?.x !== this.props.staticPinPosition?.x || prevProps.staticPinPosition?.y !== this.props.staticPinPosition?.y; + + // We use a custom `onLayout` event, so the clients can stay in-sync // with when the internal measurements are actually saved to the state, // thus helping them apply transformations at more accurate timings - if (originalMeasurementsChanged) { - var _this$props$onLayout, _this$props14; - const layout = { width: currState.originalWidth, height: currState.originalHeight, x: currState.originalX, y: currState.originalY }; - (_this$props$onLayout = (_this$props14 = this.props).onLayout) === null || _this$props$onLayout === void 0 ? void 0 : _this$props$onLayout.call(_this$props14, { + this.props.onLayout?.({ nativeEvent: { layout } }); } - if (this.onTransformInvocationInitialized && (originalMeasurementsChanged || staticPinPositionChanged)) { this._invokeOnTransform(); } } - componentDidMount() { - this.measureZoomSubject(); // We've already run `grabZoomSubjectOriginalMeasurements` at various events + this.measureZoomSubject(); + // We've already run `grabZoomSubjectOriginalMeasurements` at various events // to make sure the measurements are promptly updated. // However, there might be cases we haven't accounted for, especially when // native processes are involved. To account for those cases, // we'll use an interval here to ensure we're always up-to-date. // The `setState` in `grabZoomSubjectOriginalMeasurements` won't trigger a rerender // if the values given haven't changed, so we're not running performance risk here. - this.measureZoomSubjectInterval = setInterval(this.measureZoomSubject, 1e3); } - componentWillUnmount() { this.measureZoomSubjectInterval && clearInterval(this.measureZoomSubjectInterval); } + debouncedOnStaticPinPositionChange = debounce(position => this.props.onStaticPinPositionChange?.(position), 100); /** * try to invoke onTransform * @private */ _invokeOnTransform() { - var _this$props$onTransfo, _this$props15; - const zoomableViewEvent = this._getZoomableViewEventObject(); - const position = this._staticPinPosition(); - if (!zoomableViewEvent.originalWidth || !zoomableViewEvent.originalHeight) return { successful: false }; - (_this$props$onTransfo = (_this$props15 = this.props).onTransform) === null || _this$props$onTransfo === void 0 ? void 0 : _this$props$onTransfo.call(_this$props15, zoomableViewEvent); - + this.props.onTransform?.(zoomableViewEvent); if (position) { - var _this$props$onStaticP3, _this$props16; - - (_this$props$onStaticP3 = (_this$props16 = this.props).onStaticPinPositionMove) === null || _this$props$onStaticP3 === void 0 ? void 0 : _this$props$onStaticP3.call(_this$props16, position); + this.props.onStaticPinPositionMove?.(position); this.debouncedOnStaticPinPositionChange(position); } - return { successful: true }; } + /** * Returns additional information about components current state for external event hooks * * @returns {{}} * @private */ - - _getZoomableViewEventObject(overwriteObj = {}) { return { zoomLevel: this.zoomLevel, @@ -644,13 +292,196 @@ class ReactNativeZoomableView extends Component { ...overwriteObj }; } + /** * Get the original box dimensions and save them for later use. * (They will be used to calculate boxBorders) * * @private */ + measureZoomSubject = () => { + // make sure we measure after animations are complete + requestAnimationFrame(() => { + // this setTimeout is here to fix a weird issue on iOS where the measurements are all `0` + // when navigating back (react-navigation stack) from another view + // while closing the keyboard at the same time + setTimeout(() => { + // In normal conditions, we're supposed to measure zoomSubject instead of its wrapper. + // However, our zoomSubject may have been transformed by an initial zoomLevel or offset, + // in which case these measurements will not represent the true "original" measurements. + // We just need to make sure the zoomSubjectWrapper perfectly aligns with the zoomSubject + // (no border, space, or anything between them) + this.zoomSubjectWrapperRef.current?.measure((x, y, width, height, pageX, pageY) => { + // When the component is off-screen, these become all 0s, so we don't set them + // to avoid messing up calculations, especially ones that are done right after + // the component transitions from hidden to visible. + if (!pageX && !pageY && !width && !height) return; + + // If these values are all the same, don't re-set them in state + // this way we don't re-render + if (this.state.originalX === x && this.state.originalY === y && this.state.originalWidth === width && this.state.originalHeight === height && this.state.originalPageX === pageX && this.state.originalPageY === pageY) { + return; + } + this.setState({ + originalX: x, + originalY: y, + originalWidth: width, + originalHeight: height, + originalPageX: pageX, + originalPageY: pageY + }); + }); + }); + }); + }; + + /** + * Handles the start of touch events and checks for taps + * + * @param e + * @param gestureState + * @returns {boolean} + * + * @private + */ + _handleStartShouldSetPanResponder = (e, gestureState) => { + if (this.props.onStartShouldSetPanResponder) { + this.props.onStartShouldSetPanResponder(e, gestureState, this._getZoomableViewEventObject(), false); + } + + // Always set pan responder on start + // of gesture so we can handle tap. + // "Pan threshold validation" will be handled + // in `onPanResponderMove` instead of in `onMoveShouldSetPanResponder` + return true; + }; + + /** + * Calculates pinch distance + * + * @param e + * @param gestureState + * @private + */ + _handlePanResponderGrant = (e, gestureState) => { + if (this.props.onLongPress) { + e.persist(); + this.longPressTimeout = setTimeout(() => { + this.props.onLongPress?.(e, gestureState, this._getZoomableViewEventObject()); + this.longPressTimeout = null; + }, this.props.longPressDuration); + } + this.props.onPanResponderGrant?.(e, gestureState, this._getZoomableViewEventObject()); + this.panAnim.stopAnimation(); + this.zoomAnim.stopAnimation(); + this.gestureStarted = true; + this.raisePin(); + }; + + /** + * Handles the end of touch events + * + * @param e + * @param gestureState + * + * @private + */ + _handlePanResponderEnd = (e, gestureState) => { + if (!this.gestureType) { + this._resolveAndHandleTap(e); + } + this.setState({ + debugPoints: [] + }); + this.lastGestureCenterPosition = null; + const disableMomentum = this.props.disableMomentum || this.props.panEnabled && this.gestureType === 'shift' && this.props.disablePanOnInitialZoom && this.zoomLevel === this.props.initialZoom; + + // Trigger final shift animation unless disablePanOnInitialZoom is set and we're on the initial zoom level + // or disableMomentum + if (!disableMomentum) { + getPanMomentumDecayAnim(this.panAnim, { + x: gestureState.vx / this.zoomLevel, + y: gestureState.vy / this.zoomLevel + }).start(); + } + if (this.longPressTimeout) { + clearTimeout(this.longPressTimeout); + this.longPressTimeout = null; + } + this.props.onPanResponderEnd?.(e, gestureState, this._getZoomableViewEventObject()); + if (this.gestureType === 'pinch') { + this.props.onZoomEnd?.(e, gestureState, this._getZoomableViewEventObject()); + } else if (this.gestureType === 'shift') { + this.props.onShiftingEnd?.(e, gestureState, this._getZoomableViewEventObject()); + } + if (this.props.staticPinPosition) { + this._updateStaticPin(); + } + this.dropPin(); + this.gestureType = null; + this.gestureStarted = false; + }; + + /** + * Handles the actual movement of our pan responder + * + * @param e + * @param gestureState + * + * @private + */ + _handlePanResponderMove = (e, gestureState) => { + if (this.props.onPanResponderMove) { + if (this.props.onPanResponderMove(e, gestureState, this._getZoomableViewEventObject())) { + return false; + } + } + // Only supports 2 touches and below, + // any invalid number will cause the gesture to end. + if (gestureState.numberActiveTouches <= 2) { + if (!this.gestureStarted) { + this._handlePanResponderGrant(e, gestureState); + } + } else { + if (this.gestureStarted) { + this._handlePanResponderEnd(e, gestureState); + } + return true; + } + if (gestureState.numberActiveTouches === 2) { + if (this.longPressTimeout) { + clearTimeout(this.longPressTimeout); + this.longPressTimeout = null; + } + + // change some measurement states when switching gesture to ensure a smooth transition + if (this.gestureType !== 'pinch') { + this.lastGestureCenterPosition = calcGestureCenterPoint(e, gestureState); + this.lastGestureTouchDistance = calcGestureTouchDistance(e, gestureState); + } + this.gestureType = 'pinch'; + this._handlePinching(e, gestureState); + } else if (gestureState.numberActiveTouches === 1) { + if (this.longPressTimeout && (Math.abs(gestureState.dx) > 5 || Math.abs(gestureState.dy) > 5)) { + clearTimeout(this.longPressTimeout); + this.longPressTimeout = null; + } + // change some measurement states when switching gesture to ensure a smooth transition + if (this.gestureType !== 'shift') { + this.lastGestureCenterPosition = calcGestureCenterPoint(e, gestureState); + } + const { + dx, + dy + } = gestureState; + const isShiftGesture = Math.abs(dx) > 2 || Math.abs(dy) > 2; + if (isShiftGesture) { + this.gestureType = 'shift'; + this._handleShifting(gestureState); + } + } + }; /** * Handles the pinch movement and zooming @@ -661,8 +492,6 @@ class ReactNativeZoomableView extends Component { * @private */ _handlePinching(e, gestureState) { - var _this$props$onZoomAft, _this$props17; - if (!this.props.zoomEnabled) return; const { maxZoom, @@ -671,39 +500,36 @@ class ReactNativeZoomableView extends Component { pinchToZoomOutSensitivity } = this.props; const distance = calcGestureTouchDistance(e, gestureState); - if (this.props.onZoomBefore && this.props.onZoomBefore(e, gestureState, this._getZoomableViewEventObject())) { return; } - if (!distance) return; - if (!this.lastGestureTouchDistance) return; // define the new zoom level and take zoom level sensitivity into consideration + if (!this.lastGestureTouchDistance) return; + // define the new zoom level and take zoom level sensitivity into consideration const zoomGrowthFromLastGestureState = distance / this.lastGestureTouchDistance; this.lastGestureTouchDistance = distance; const pinchToZoomSensitivity = zoomGrowthFromLastGestureState < 1 ? pinchToZoomOutSensitivity : pinchToZoomInSensitivity; if (pinchToZoomSensitivity == null) return; - const deltaGrowth = zoomGrowthFromLastGestureState - 1; // 0 - no resistance + const deltaGrowth = zoomGrowthFromLastGestureState - 1; + // 0 - no resistance // 10 - 90% resistance - const deltaGrowthAdjustedBySensitivity = deltaGrowth * (1 - pinchToZoomSensitivity * 9 / 100); - let newZoomLevel = this.zoomLevel * (1 + deltaGrowthAdjustedBySensitivity); // make sure max and min zoom levels are respected + let newZoomLevel = this.zoomLevel * (1 + deltaGrowthAdjustedBySensitivity); + // make sure max and min zoom levels are respected if (maxZoom != null && newZoomLevel > maxZoom) { newZoomLevel = maxZoom; } - if (minZoom != null && newZoomLevel < minZoom) { newZoomLevel = minZoom; } - const gestureCenterPoint = calcGestureCenterPoint(e, gestureState); if (!gestureCenterPoint) return; let zoomCenter = { x: gestureCenterPoint.x - this.state.originalPageX, y: gestureCenterPoint.y - this.state.originalPageY }; - if (this.props.staticPinPosition) { // When we use a static pin position, the zoom centre is the same as that position, // otherwise the pin moves around way too much while zooming. @@ -711,9 +537,9 @@ class ReactNativeZoomableView extends Component { x: this.props.staticPinPosition.x, y: this.props.staticPinPosition.y }; - } // Uncomment to debug - + } + // Uncomment to debug this.props.debug && this._setPinchDebugPoints(e, zoomCenter); const { originalHeight, @@ -726,14 +552,11 @@ class ReactNativeZoomableView extends Component { if (!originalHeight || !originalWidth) return; let offsetY = calcNewScaledOffsetForZoomCentering(oldOffsetY, originalHeight, oldScale, newScale, zoomCenter.y); let offsetX = calcNewScaledOffsetForZoomCentering(oldOffsetX, originalWidth, oldScale, newScale, zoomCenter.x); - const offsetShift = this._calcOffsetShiftSinceLastGestureState(gestureCenterPoint); - if (offsetShift) { offsetX += offsetShift.x; offsetY += offsetShift.y; } - this.offsetX = offsetX; this.offsetY = offsetY; this.zoomLevel = newScale; @@ -742,16 +565,15 @@ class ReactNativeZoomableView extends Component { y: this.offsetY }); this.zoomAnim.setValue(this.zoomLevel); - (_this$props$onZoomAft = (_this$props17 = this.props).onZoomAfter) === null || _this$props$onZoomAft === void 0 ? void 0 : _this$props$onZoomAft.call(_this$props17, e, gestureState, this._getZoomableViewEventObject()); + this.props.onZoomAfter?.(e, gestureState, this._getZoomableViewEventObject()); } + /** * Used to debug pinch events * @param gestureResponderEvent * @param zoomCenter * @param points */ - - _setPinchDebugPoints(gestureResponderEvent, zoomCenter, ...points) { const { touches @@ -770,6 +592,7 @@ class ReactNativeZoomableView extends Component { }, zoomCenter, ...points] }); } + /** * Calculates the amount the offset should shift since the last position during panning * @@ -777,14 +600,11 @@ class ReactNativeZoomableView extends Component { * * @private */ - - _calcOffsetShiftSinceLastGestureState(gestureCenterPoint) { const { movementSensibility } = this.props; let shift = null; - if (this.lastGestureCenterPosition && movementSensibility) { const dx = gestureCenterPoint.x - this.lastGestureCenterPosition.x; const dy = gestureCenterPoint.y - this.lastGestureCenterPosition.y; @@ -795,10 +615,10 @@ class ReactNativeZoomableView extends Component { y: shiftY }; } - this.lastGestureCenterPosition = gestureCenterPoint; return shift; } + /** * Handles movement by tap and move * @@ -806,23 +626,18 @@ class ReactNativeZoomableView extends Component { * * @private */ - - _handleShifting(gestureState) { // Skips shifting if panEnabled is false or disablePanOnInitialZoom is true and we're on the initial zoom level if (!this.props.panEnabled || this.props.disablePanOnInitialZoom && this.zoomLevel === this.props.initialZoom) { return; } - const shift = this._calcOffsetShiftSinceLastGestureState({ x: gestureState.moveX, y: gestureState.moveY }); - if (!shift) return; const offsetX = this.offsetX + shift.x; const offsetY = this.offsetY + shift.y; - if (this.props.debug && this.state.originalPageX && this.state.originalPageY) { const x = gestureState.moveX - this.state.originalPageX; const y = gestureState.moveY - this.state.originalPageY; @@ -833,11 +648,10 @@ class ReactNativeZoomableView extends Component { }] }); } - this._setNewOffsetPosition(offsetX, offsetY); - this.raisePin(); } + /** * Set the state to offset moved * @@ -845,18 +659,14 @@ class ReactNativeZoomableView extends Component { * @param {number} newOffsetY * @returns */ - - _setNewOffsetPosition(newOffsetX, newOffsetY) { const { onShiftingBefore, onShiftingAfter } = this.props; - - if (onShiftingBefore !== null && onShiftingBefore !== void 0 && onShiftingBefore(null, null, this._getZoomableViewEventObject())) { + if (onShiftingBefore?.(null, null, this._getZoomableViewEventObject())) { return; } - this.offsetX = newOffsetX; this.offsetY = newOffsetY; this.panAnim.setValue({ @@ -864,8 +674,9 @@ class ReactNativeZoomableView extends Component { y: this.offsetY }); this.zoomAnim.setValue(this.zoomLevel); - onShiftingAfter === null || onShiftingAfter === void 0 ? void 0 : onShiftingAfter(null, null, this._getZoomableViewEventObject()); + onShiftingAfter?.(null, null, this._getZoomableViewEventObject()); } + /** * Check whether the press event is double tap * or single tap and handle the event accordingly @@ -874,21 +685,126 @@ class ReactNativeZoomableView extends Component { * * @private */ + _resolveAndHandleTap = e => { + const now = Date.now(); + if (this.doubleTapFirstTapReleaseTimestamp && this.props.doubleTapDelay && now - this.doubleTapFirstTapReleaseTimestamp < this.props.doubleTapDelay) { + this.doubleTapFirstTap && this._addTouch({ + ...this.doubleTapFirstTap, + id: now.toString(), + isSecondTap: true + }); + this.singleTapTimeoutId && clearTimeout(this.singleTapTimeoutId); + delete this.doubleTapFirstTapReleaseTimestamp; + delete this.singleTapTimeoutId; + delete this.doubleTapFirstTap; + this._handleDoubleTap(e); + } else { + this.doubleTapFirstTapReleaseTimestamp = now; + this.doubleTapFirstTap = { + id: now.toString(), + x: e.nativeEvent.pageX - this.state.originalPageX, + y: e.nativeEvent.pageY - this.state.originalPageY + }; + this._addTouch(this.doubleTapFirstTap); + // persist event so e.nativeEvent is preserved after a timeout delay + e.persist(); + this.singleTapTimeoutId = setTimeout(() => { + delete this.doubleTapFirstTapReleaseTimestamp; + delete this.singleTapTimeoutId; + // Pan to the tapped location + if (this.props.staticPinPosition && this.doubleTapFirstTap) { + const tapX = this.props.staticPinPosition.x - this.doubleTapFirstTap.x; + const tapY = this.props.staticPinPosition.y - this.doubleTapFirstTap.y; + Animated.timing(this.panAnim, { + toValue: { + x: this.offsetX + tapX / this.zoomLevel, + y: this.offsetY + tapY / this.zoomLevel + }, + useNativeDriver: true, + duration: 200 + }).start(() => { + this._updateStaticPin(); + }); + } + this.props.onSingleTap?.(e, this._getZoomableViewEventObject()); + }, this.props.doubleTapDelay); + } + }; + moveStaticPinTo = (position, duration) => { + const { + originalWidth, + originalHeight + } = this.state; + const { + staticPinPosition, + contentWidth, + contentHeight + } = this.props; + if (!staticPinPosition) return; + if (!originalWidth || !originalHeight) return; + if (!contentWidth || !contentHeight) return; + + // Offset for the static pin + const pinX = staticPinPosition.x - originalWidth / 2; + const pinY = staticPinPosition.y - originalHeight / 2; + this.offsetX = contentWidth / 2 - position.x + pinX / this.zoomLevel; + this.offsetY = contentHeight / 2 - position.y + pinY / this.zoomLevel; + if (duration) { + Animated.timing(this.panAnim, { + toValue: { + x: this.offsetX, + y: this.offsetY + }, + useNativeDriver: true, + duration + }).start(); + } else { + this.panAnim.setValue({ + x: this.offsetX, + y: this.offsetY + }); + } + }; + _staticPinPosition = () => { + if (!this.props.staticPinPosition) return; + if (!this.props.contentWidth || !this.props.contentHeight) return; + return viewportPositionToImagePosition({ + viewportPosition: { + x: this.props.staticPinPosition.x, + y: this.props.staticPinPosition.y + }, + imageSize: { + height: this.props.contentHeight, + width: this.props.contentWidth + }, + zoomableEvent: { + ...this._getZoomableViewEventObject(), + offsetX: this.offsetX, + offsetY: this.offsetY, + zoomLevel: this.zoomLevel + } + }); + }; + _updateStaticPin = () => { + const position = this._staticPinPosition(); + if (!position) return; + this.props.onStaticPinPositionChange?.(position); + }; _addTouch(touch) { this.touches.push(touch); this.setState({ touches: [...this.touches] }); } - _removeTouch(touch) { this.touches.splice(this.touches.indexOf(touch), 1); this.setState({ touches: [...this.touches] }); } + /** * Handles the double tap event * @@ -896,47 +812,43 @@ class ReactNativeZoomableView extends Component { * * @private */ - - _handleDoubleTap(e) { const { onDoubleTapBefore, onDoubleTapAfter, doubleTapZoomToCenter } = this.props; - onDoubleTapBefore === null || onDoubleTapBefore === void 0 ? void 0 : onDoubleTapBefore(e, this._getZoomableViewEventObject()); - + onDoubleTapBefore?.(e, this._getZoomableViewEventObject()); const nextZoomStep = this._getNextZoomStep(); - if (nextZoomStep == null) return; const { originalPageX, originalPageY - } = this.state; // define new zoom position coordinates + } = this.state; + // define new zoom position coordinates const zoomPositionCoordinates = { x: e.nativeEvent.pageX - originalPageX, y: e.nativeEvent.pageY - originalPageY - }; // if doubleTapZoomToCenter enabled -> always zoom to center instead + }; + // if doubleTapZoomToCenter enabled -> always zoom to center instead if (doubleTapZoomToCenter) { zoomPositionCoordinates.x = 0; zoomPositionCoordinates.y = 0; } - this.zoomTo(nextZoomStep, zoomPositionCoordinates); - onDoubleTapAfter === null || onDoubleTapAfter === void 0 ? void 0 : onDoubleTapAfter(e, this._getZoomableViewEventObject({ + onDoubleTapAfter?.(e, this._getZoomableViewEventObject({ zoomLevel: nextZoomStep })); } + /** * Returns the next zoom step based on current step and zoomStep property. * If we are zoomed all the way in -> return to initialzoom * * @returns {*} */ - - _getNextZoomStep() { const { zoomStep, @@ -947,20 +859,17 @@ class ReactNativeZoomableView extends Component { zoomLevel } = this; if (maxZoom == null) return; - if (zoomLevel.toFixed(2) === maxZoom.toFixed(2)) { return initialZoom; } - if (zoomStep == null) return; const nextZoomStep = zoomLevel * (1 + zoomStep); - if (nextZoomStep > maxZoom) { return maxZoom; } - return nextZoomStep; } + /** * Zooms to a specific level. A "zoom center" can be provided, which specifies * the point that will remain in the same position on the screen after the zoom. @@ -970,25 +879,21 @@ class ReactNativeZoomableView extends Component { * @param newZoomLevel * @param zoomCenter - If not supplied, the container's center is the zoom center */ - - zoomTo(newZoomLevel, zoomCenter) { - var _this$props$onZoomBef, _this$props18, _this$props$onZoomAft2, _this$props19; - if (!this.props.zoomEnabled) return false; if (this.props.maxZoom && newZoomLevel > this.props.maxZoom) return false; if (this.props.minZoom && newZoomLevel < this.props.minZoom) return false; - (_this$props$onZoomBef = (_this$props18 = this.props).onZoomBefore) === null || _this$props$onZoomBef === void 0 ? void 0 : _this$props$onZoomBef.call(_this$props18, null, null, this._getZoomableViewEventObject()); // == Perform Pan Animation to preserve the zoom center while zooming == + this.props.onZoomBefore?.(null, null, this._getZoomableViewEventObject()); + // == Perform Pan Animation to preserve the zoom center while zooming == let listenerId = ''; - if (zoomCenter) { // Calculates panAnim values based on changes in zoomAnim. - let prevScale = this.zoomLevel; // Since zoomAnim is calculated in native driver, + let prevScale = this.zoomLevel; + // Since zoomAnim is calculated in native driver, // it will jitter panAnim once in a while, // because here panAnim is being calculated in js. // However the jittering should mostly occur in simulator. - listenerId = this.zoomAnim.addListener(({ value: newScale }) => { @@ -998,16 +903,18 @@ class ReactNativeZoomableView extends Component { }); prevScale = newScale; }); - } // == Perform Zoom Animation == - + } + // == Perform Zoom Animation == getZoomToAnimation(this.zoomAnim, newZoomLevel).start(() => { this.zoomAnim.removeListener(listenerId); - }); // == Zoom Animation Ends == + }); + // == Zoom Animation Ends == - (_this$props$onZoomAft2 = (_this$props19 = this.props).onZoomAfter) === null || _this$props$onZoomAft2 === void 0 ? void 0 : _this$props$onZoomAft2.call(_this$props19, null, null, this._getZoomableViewEventObject()); + this.props.onZoomAfter?.(null, null, this._getZoomableViewEventObject()); return true; } + /** * Zooms in or out by a specified change level * Use a positive number for `zoomLevelChange` to zoom in @@ -1019,13 +926,12 @@ class ReactNativeZoomableView extends Component { * * @return {bool} */ - - zoomBy(zoomLevelChange) { // if no zoom level Change given -> just use zoom step - zoomLevelChange || (zoomLevelChange = this.props.zoomStep || 0); + zoomLevelChange ||= this.props.zoomStep || 0; return this.zoomTo(this.zoomLevel + zoomLevelChange); } + /** * Moves the zoomed view to a specified position * Returns a promise when finished @@ -1035,8 +941,6 @@ class ReactNativeZoomableView extends Component { * * @return {bool} */ - - moveTo(newOffsetX, newOffsetY) { const { originalWidth, @@ -1045,9 +949,9 @@ class ReactNativeZoomableView extends Component { if (!originalWidth || !originalHeight) return; const offsetX = (newOffsetX - originalWidth / 2) / this.zoomLevel; const offsetY = (newOffsetY - originalHeight / 2) / this.zoomLevel; - this._setNewOffsetPosition(-offsetX, -offsetY); } + /** * Moves the zoomed view by a certain amount. * @@ -1058,15 +962,11 @@ class ReactNativeZoomableView extends Component { * * @return {bool} */ - - moveBy(offsetChangeX, offsetChangeY) { const offsetX = (this.offsetX * this.zoomLevel - offsetChangeX) / this.zoomLevel; const offsetY = (this.offsetY * this.zoomLevel - offsetChangeY) / this.zoomLevel; - this._setNewOffsetPosition(offsetX, offsetY); } - render() { const { staticPinIcon, @@ -1083,85 +983,56 @@ class ReactNativeZoomableView extends Component { touches, debugPoints = [] } = this.state; - return /*#__PURE__*/React.createElement(View, _extends({ - style: styles.container - }, this.gestureHandlers.panHandlers, { + return /*#__PURE__*/_jsxs(View, { + style: styles.container, + ...this.gestureHandlers.panHandlers, ref: this.zoomSubjectWrapperRef, - onLayout: this.measureZoomSubject - }), /*#__PURE__*/React.createElement(Animated.View, { - style: [styles.zoomSubject, this.props.style, { - transform: [// In RN79, we need to split the scale into X and Y to avoid - // the content getting pixelated when zooming in - { - scaleX: this.zoomAnim - }, { - scaleY: this.zoomAnim - }, ...this.panAnim.getTranslateTransform()] - }] - }, children), visualTouchFeedbackEnabled && (touches === null || touches === void 0 ? void 0 : touches.map(touch => doubleTapDelay && /*#__PURE__*/React.createElement(AnimatedTouchFeedback, { - x: touch.x, - y: touch.y, - key: touch.id, - animationDuration: doubleTapDelay, - onAnimationDone: () => { - this._removeTouch(touch); - } - }))), debugPoints.map(({ - x, - y - }, index) => { - return /*#__PURE__*/React.createElement(DebugTouchPoint, { - key: index, - x: x, - y: y - }); - }), staticPinPosition && /*#__PURE__*/React.createElement(StaticPin, { - staticPinIcon: staticPinIcon, - staticPinPosition: staticPinPosition, - pinSize: pinSize, - onPress: onStaticPinPress, - onLongPress: onStaticPinLongPress, - onParentMove: this._handlePanResponderMove, - pinAnim: this.pinAnim, - setPinSize: size => { - this.setState({ - pinSize: size - }); - }, - pinProps: pinProps - })); + onLayout: this.measureZoomSubject, + children: [/*#__PURE__*/_jsx(Animated.View, { + style: [styles.zoomSubject, this.props.style, { + transform: [ + // In RN79, we need to split the scale into X and Y to avoid + // the content getting pixelated when zooming in + { + scaleX: this.zoomAnim + }, { + scaleY: this.zoomAnim + }, ...this.panAnim.getTranslateTransform()] + }], + children: children + }), visualTouchFeedbackEnabled && touches?.map(touch => doubleTapDelay && /*#__PURE__*/_jsx(AnimatedTouchFeedback, { + x: touch.x, + y: touch.y, + animationDuration: doubleTapDelay, + onAnimationDone: () => { + this._removeTouch(touch); + } + }, touch.id)), debugPoints.map(({ + x, + y + }, index) => { + return /*#__PURE__*/_jsx(DebugTouchPoint, { + x: x, + y: y + }, index); + }), staticPinPosition && /*#__PURE__*/_jsx(StaticPin, { + staticPinIcon: staticPinIcon, + staticPinPosition: staticPinPosition, + pinSize: pinSize, + onPress: onStaticPinPress, + onLongPress: onStaticPinLongPress, + onParentMove: this._handlePanResponderMove, + pinAnim: this.pinAnim, + setPinSize: size => { + this.setState({ + pinSize: size + }); + }, + pinProps: pinProps + })] + }); } - } - -_defineProperty(ReactNativeZoomableView, "defaultProps", { - zoomEnabled: true, - panEnabled: true, - initialZoom: 1, - initialOffsetX: 0, - initialOffsetY: 0, - maxZoom: 1.5, - minZoom: 0.5, - pinchToZoomInSensitivity: 1, - pinchToZoomOutSensitivity: 1, - movementSensibility: 1, - doubleTapDelay: 300, - bindToBorders: true, - zoomStep: 0.5, - onLongPress: null, - longPressDuration: 700, - contentWidth: undefined, - contentHeight: undefined, - panBoundaryPadding: 0, - visualTouchFeedbackEnabled: true, - staticPinPosition: undefined, - staticPinIcon: undefined, - onStaticPinPositionChange: undefined, - onStaticPinPositionMove: undefined, - animatePin: true, - disablePanOnInitialZoom: false -}); - const styles = StyleSheet.create({ container: { alignItems: 'center', diff --git a/lib/module/ReactNativeZoomableView.js.map b/lib/module/ReactNativeZoomableView.js.map index 6728b50f..f0dfbe7b 100644 --- a/lib/module/ReactNativeZoomableView.js.map +++ b/lib/module/ReactNativeZoomableView.js.map @@ -1 +1 @@ -{"version":3,"sources":["ReactNativeZoomableView.tsx"],"names":["debounce","React","Component","createRef","Animated","Easing","PanResponder","StyleSheet","View","getBoundaryCrossedAnim","getPanMomentumDecayAnim","getZoomToAnimation","AnimatedTouchFeedback","StaticPin","DebugTouchPoint","calcGestureCenterPoint","calcGestureTouchDistance","calcNewScaledOffsetForZoomCentering","applyPanBoundariesToOffset","viewportPositionToImagePosition","initialState","originalWidth","originalHeight","originalPageX","originalPageY","originalX","originalY","pinSize","width","height","ReactNativeZoomableView","gestureStarted","v","_gestureStarted","constructor","props","ValueXY","x","y","Value","value","boundaryCrossedAnimInEffect","position","onStaticPinPositionChange","requestAnimationFrame","setTimeout","zoomSubjectWrapperRef","current","measure","pageX","pageY","state","setState","e","gestureState","onStartShouldSetPanResponder","_getZoomableViewEventObject","onLongPress","persist","longPressTimeout","longPressDuration","onPanResponderGrant","panAnim","stopAnimation","zoomAnim","raisePin","gestureType","_resolveAndHandleTap","debugPoints","lastGestureCenterPosition","disableMomentum","panEnabled","disablePanOnInitialZoom","zoomLevel","initialZoom","vx","vy","start","clearTimeout","onPanResponderEnd","onZoomEnd","onShiftingEnd","staticPinPosition","_updateStaticPin","dropPin","onPanResponderMove","numberActiveTouches","_handlePanResponderGrant","_handlePanResponderEnd","lastGestureTouchDistance","_handlePinching","Math","abs","dx","dy","isShiftGesture","_handleShifting","now","Date","doubleTapFirstTapReleaseTimestamp","doubleTapDelay","doubleTapFirstTap","_addTouch","id","toString","isSecondTap","singleTapTimeoutId","_handleDoubleTap","nativeEvent","tapX","tapY","timing","toValue","offsetX","offsetY","useNativeDriver","duration","onSingleTap","contentWidth","contentHeight","pinX","pinY","setValue","viewportPosition","imageSize","zoomableEvent","_staticPinPosition","gestureHandlers","create","_handleStartShouldSetPanResponder","_handlePanResponderMove","onPanResponderRelease","onPanResponderTerminate","evt","onPanResponderTerminationRequest","onShouldBlockNativeResponder","onStartShouldSetPanResponderCapture","onMoveShouldSetPanResponderCapture","zoomAnimatedValue","panAnimatedValueXY","initialOffsetX","initialOffsetY","addListener","animatePin","pinAnim","easing","out","ease","__setOffset","__getOffset","axis","offset","offsetState","__offsets","bindToBorders","containerSize","contentSize","boundOffset","panBoundaryPadding","boundariesApplied","toFixed","componentDidUpdate","prevProps","prevState","zoomEnabled","onTransformInvocationInitialized","_invokeOnTransform","successful","currState","originalMeasurementsChanged","staticPinPositionChanged","layout","onLayout","componentDidMount","measureZoomSubject","measureZoomSubjectInterval","setInterval","componentWillUnmount","clearInterval","zoomableViewEvent","onTransform","onStaticPinPositionMove","debouncedOnStaticPinPositionChange","overwriteObj","maxZoom","minZoom","pinchToZoomInSensitivity","pinchToZoomOutSensitivity","distance","onZoomBefore","zoomGrowthFromLastGestureState","pinchToZoomSensitivity","deltaGrowth","deltaGrowthAdjustedBySensitivity","newZoomLevel","gestureCenterPoint","zoomCenter","debug","_setPinchDebugPoints","oldOffsetX","oldOffsetY","oldScale","newScale","offsetShift","_calcOffsetShiftSinceLastGestureState","onZoomAfter","gestureResponderEvent","points","touches","movementSensibility","shift","shiftX","shiftY","moveX","moveY","_setNewOffsetPosition","newOffsetX","newOffsetY","onShiftingBefore","onShiftingAfter","touch","push","_removeTouch","splice","indexOf","onDoubleTapBefore","onDoubleTapAfter","doubleTapZoomToCenter","nextZoomStep","_getNextZoomStep","zoomPositionCoordinates","zoomTo","zoomStep","listenerId","prevScale","removeListener","zoomBy","zoomLevelChange","moveTo","moveBy","offsetChangeX","offsetChangeY","render","staticPinIcon","children","visualTouchFeedbackEnabled","onStaticPinLongPress","onStaticPinPress","pinProps","styles","container","panHandlers","zoomSubject","style","transform","scaleX","scaleY","getTranslateTransform","map","index","size","undefined","alignItems","flex","justifyContent","overflow"],"mappings":";;;;AAAA,SAASA,QAAT,QAAyB,QAAzB;AACA,OAAOC,KAAP,IAAgBC,SAAhB,EAA2BC,SAA3B,QAAuD,OAAvD;AACA,SACEC,QADF,EAEEC,MAFF,EAIEC,YAJF,EAQEC,UARF,EASEC,IATF,QAUO,cAVP;AAYA,SACEC,sBADF,EAEEC,uBAFF,EAGEC,kBAHF,QAIO,cAJP;AAKA,SAASC,qBAAT,QAAsC,cAAtC;AACA,SAASC,SAAT,QAA0B,wBAA1B;AACA,SAASC,eAAT,QAAgC,eAAhC;AACA,SACEC,sBADF,EAEEC,wBAFF,EAGEC,mCAHF,QAIO,UAJP;AAKA,SAASC,0BAAT,QAA2C,qCAA3C;AACA,SAASC,+BAAT,QAAgD,+BAAhD;AAUA,MAAMC,YAA0C,GAAG;AACjDC,EAAAA,aAAa,EAAE,CADkC;AAEjDC,EAAAA,cAAc,EAAE,CAFiC;AAGjDC,EAAAA,aAAa,EAAE,CAHkC;AAIjDC,EAAAA,aAAa,EAAE,CAJkC;AAKjDC,EAAAA,SAAS,EAAE,CALsC;AAMjDC,EAAAA,SAAS,EAAE,CANsC;AAOjDC,EAAAA,OAAO,EAAE;AAAEC,IAAAA,KAAK,EAAE,CAAT;AAAYC,IAAAA,MAAM,EAAE;AAApB;AAPwC,CAAnD;;AAUA,MAAMC,uBAAN,SAAsC5B,SAAtC,CAGE;AAsD0B,MAAd6B,cAAc,CAACC,CAAD,EAAa;AACrC,SAAKC,eAAL,GAAuBD,CAAvB;AACD;;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AfC;AAgBpB0D,EAAAA,YAAY,EAAE+I,SAhBM;AAiBpB9I,EAAAA,aAAa,EAAE8I,SAjBK;AAkBpBvG,EAAAA,kBAAkB,EAAE,CAlBA;AAmBpBuF,EAAAA,0BAA0B,EAAE,IAnBR;AAoBpBnK,EAAAA,iBAAiB,EAAEmL,SApBC;AAqBpBlB,EAAAA,aAAa,EAAEkB,SArBK;AAsBpB1N,EAAAA,yBAAyB,EAAE0N,SAtBP;AAuBpBhF,EAAAA,uBAAuB,EAAEgF,SAvBL;AAwBpBtH,EAAAA,UAAU,EAAE,IAxBQ;AAyBpBvE,EAAAA,uBAAuB,EAAE;AAzBL,C;;AAutCxB,MAAMiL,MAAM,GAAGlP,UAAU,CAACyH,MAAX,CAAkB;AAC/B0H,EAAAA,SAAS,EAAE;AACTY,IAAAA,UAAU,EAAE,QADH;AAETC,IAAAA,IAAI,EAAE,CAFG;AAGTC,IAAAA,cAAc,EAAE,QAHP;AAITC,IAAAA,QAAQ,EAAE,QAJD;AAKT/N,IAAAA,QAAQ,EAAE;AALD,GADoB;AAQ/BkN,EAAAA,WAAW,EAAE;AACXU,IAAAA,UAAU,EAAE,QADD;AAEXC,IAAAA,IAAI,EAAE,CAFK;AAGXC,IAAAA,cAAc,EAAE,QAHL;AAIX5O,IAAAA,KAAK,EAAE;AAJI;AARkB,CAAlB,CAAf;AAgBA,eAAeE,uBAAf;AAEA,SAASA,uBAAT","sourcesContent":["import { debounce } from 'lodash';\nimport React, { Component, createRef, RefObject } from 'react';\nimport {\n Animated,\n Easing,\n GestureResponderEvent,\n PanResponder,\n PanResponderCallbacks,\n PanResponderGestureState,\n PanResponderInstance,\n StyleSheet,\n View,\n} from 'react-native';\n\nimport {\n getBoundaryCrossedAnim,\n getPanMomentumDecayAnim,\n getZoomToAnimation,\n} from './animations';\nimport { AnimatedTouchFeedback } from './components';\nimport { StaticPin } from './components/StaticPin';\nimport { DebugTouchPoint } from './debugHelper';\nimport {\n calcGestureCenterPoint,\n calcGestureTouchDistance,\n calcNewScaledOffsetForZoomCentering,\n} from './helper';\nimport { applyPanBoundariesToOffset } from './helper/applyPanBoundariesToOffset';\nimport { viewportPositionToImagePosition } from './helper/coordinateConversion';\nimport {\n ReactNativeZoomableViewProps,\n ReactNativeZoomableViewState,\n Size2D,\n TouchPoint,\n Vec2D,\n ZoomableViewEvent,\n} from './typings';\n\nconst initialState: ReactNativeZoomableViewState = {\n originalWidth: 0,\n originalHeight: 0,\n originalPageX: 0,\n originalPageY: 0,\n originalX: 0,\n originalY: 0,\n pinSize: { width: 0, height: 0 },\n};\n\nclass ReactNativeZoomableView extends Component<\n ReactNativeZoomableViewProps,\n ReactNativeZoomableViewState\n> {\n zoomSubjectWrapperRef: RefObject;\n gestureHandlers: PanResponderInstance;\n doubleTapFirstTapReleaseTimestamp: number | undefined;\n\n static defaultProps = {\n zoomEnabled: true,\n panEnabled: true,\n initialZoom: 1,\n initialOffsetX: 0,\n initialOffsetY: 0,\n maxZoom: 1.5,\n minZoom: 0.5,\n pinchToZoomInSensitivity: 1,\n pinchToZoomOutSensitivity: 1,\n movementSensibility: 1,\n doubleTapDelay: 300,\n bindToBorders: true,\n zoomStep: 0.5,\n onLongPress: null,\n longPressDuration: 700,\n contentWidth: undefined,\n contentHeight: undefined,\n panBoundaryPadding: 0,\n visualTouchFeedbackEnabled: true,\n staticPinPosition: undefined,\n staticPinIcon: undefined,\n onStaticPinPositionChange: undefined,\n onStaticPinPositionMove: undefined,\n animatePin: true,\n disablePanOnInitialZoom: false,\n };\n\n private panAnim = new Animated.ValueXY({ x: 0, y: 0 });\n private zoomAnim = new Animated.Value(1);\n private pinAnim = new Animated.ValueXY({ x: 0, y: 0 });\n\n private __offsets = {\n x: {\n value: 0,\n boundaryCrossedAnimInEffect: false,\n },\n y: {\n value: 0,\n boundaryCrossedAnimInEffect: false,\n },\n };\n\n private zoomLevel = 1;\n private lastGestureCenterPosition: { x: number; y: number } | null = null;\n private lastGestureTouchDistance: number | null = null;\n private gestureType: 'pinch' | 'shift' | null;\n\n private _gestureStarted = false;\n private set gestureStarted(v: boolean) {\n this._gestureStarted = v;\n }\n\n public get gestureStarted() {\n return this._gestureStarted;\n }\n\n /**\n * Last press time (used to evaluate whether user double tapped)\n * @type {number}\n */\n private longPressTimeout: NodeJS.Timeout | null = null;\n private onTransformInvocationInitialized: boolean | undefined;\n private singleTapTimeoutId: NodeJS.Timeout | undefined;\n private touches: TouchPoint[] = [];\n private doubleTapFirstTap: TouchPoint | undefined;\n private measureZoomSubjectInterval: NodeJS.Timer | undefined;\n\n constructor(props: ReactNativeZoomableViewProps) {\n super(props);\n // This needs to be done before anything else to initialize the state.\n // Otherwise, the logic below may reference the state when it's undefined,\n // causing runtime errors.\n this.state = { ...initialState };\n\n this.gestureHandlers = PanResponder.create({\n onStartShouldSetPanResponder: this._handleStartShouldSetPanResponder,\n onPanResponderGrant: this._handlePanResponderGrant,\n onPanResponderMove: this._handlePanResponderMove,\n onPanResponderRelease: this._handlePanResponderEnd,\n onPanResponderTerminate: (evt, gestureState) => {\n // We should also call _handlePanResponderEnd\n // to properly perform cleanups when the gesture is terminated\n // (aka gesture handling responsibility is taken over by another component).\n // This also fixes a weird issue where\n // on real device, sometimes onPanResponderRelease is not called when you lift 2 fingers up,\n // but onPanResponderTerminate is called instead for no apparent reason.\n this._handlePanResponderEnd(evt, gestureState);\n this.props.onPanResponderTerminate?.(\n evt,\n gestureState,\n this._getZoomableViewEventObject()\n );\n },\n onPanResponderTerminationRequest: (evt, gestureState) =>\n !!this.props.onPanResponderTerminationRequest?.(\n evt,\n gestureState,\n this._getZoomableViewEventObject()\n ),\n // Defaults to true to prevent parent components, such as React Navigation's tab view, from taking over as responder.\n onShouldBlockNativeResponder: (evt, gestureState) =>\n this.props.onShouldBlockNativeResponder?.(\n evt,\n gestureState,\n this._getZoomableViewEventObject()\n ) ?? true,\n onStartShouldSetPanResponderCapture: (evt, gestureState) =>\n !!this.props.onStartShouldSetPanResponderCapture?.(evt, gestureState),\n onMoveShouldSetPanResponderCapture: (evt, gestureState) =>\n !!this.props.onMoveShouldSetPanResponderCapture?.(evt, gestureState),\n });\n\n this.zoomSubjectWrapperRef = createRef();\n\n if (this.props.zoomAnimatedValue)\n this.zoomAnim = this.props.zoomAnimatedValue;\n if (this.props.panAnimatedValueXY)\n this.panAnim = this.props.panAnimatedValueXY;\n\n if (this.props.initialZoom) this.zoomLevel = this.props.initialZoom;\n if (this.props.initialOffsetX != null)\n this.offsetX = this.props.initialOffsetX;\n if (this.props.initialOffsetY != null)\n this.offsetY = this.props.initialOffsetY;\n\n this.panAnim.setValue({ x: this.offsetX, y: this.offsetY });\n this.zoomAnim.setValue(this.zoomLevel);\n this.panAnim.addListener(({ x, y }) => {\n this.offsetX = x;\n this.offsetY = y;\n });\n this.zoomAnim.addListener(({ value }) => {\n this.zoomLevel = value;\n });\n\n this.lastGestureTouchDistance = 150;\n\n this.gestureType = null;\n }\n\n private raisePin() {\n if (!this.props.animatePin) return;\n Animated.timing(this.pinAnim, {\n toValue: { x: 0, y: -10 },\n useNativeDriver: true,\n easing: Easing.out(Easing.ease),\n duration: 100,\n }).start();\n }\n\n private dropPin() {\n if (!this.props.animatePin) return;\n Animated.timing(this.pinAnim, {\n toValue: { x: 0, y: 0 },\n useNativeDriver: true,\n easing: Easing.out(Easing.ease),\n duration: 100,\n }).start();\n }\n\n private set offsetX(x: number) {\n this.__setOffset('x', x);\n }\n\n private set offsetY(y: number) {\n this.__setOffset('y', y);\n }\n\n private get offsetX() {\n return this.__getOffset('x');\n }\n\n private get offsetY() {\n return this.__getOffset('y');\n }\n\n private __setOffset(axis: 'x' | 'y', offset: number) {\n const offsetState = this.__offsets[axis];\n\n if (this.props.bindToBorders) {\n const containerSize =\n axis === 'x' ? this.state.originalWidth : this.state.originalHeight;\n const contentSize =\n axis === 'x'\n ? this.props.contentWidth || this.state.originalWidth\n : this.props.contentHeight || this.state.originalHeight;\n\n const boundOffset =\n contentSize && containerSize && this.props.panBoundaryPadding != null\n ? applyPanBoundariesToOffset(\n offset,\n containerSize,\n contentSize,\n this.zoomLevel,\n this.props.panBoundaryPadding\n )\n : offset;\n\n if (!this.gestureType && !offsetState.boundaryCrossedAnimInEffect) {\n const boundariesApplied =\n boundOffset !== offset &&\n boundOffset.toFixed(3) !== offset.toFixed(3);\n if (boundariesApplied) {\n offsetState.boundaryCrossedAnimInEffect = true;\n getBoundaryCrossedAnim(this.panAnim[axis], boundOffset).start(() => {\n offsetState.boundaryCrossedAnimInEffect = false;\n });\n return;\n }\n }\n }\n\n offsetState.value = offset;\n }\n\n private __getOffset(axis: 'x' | 'y') {\n return this.__offsets[axis].value;\n }\n\n componentDidUpdate(\n prevProps: ReactNativeZoomableViewProps,\n prevState: ReactNativeZoomableViewState\n ) {\n const { zoomEnabled, initialZoom } = this.props;\n if (prevProps.zoomEnabled && !zoomEnabled && initialZoom) {\n this.zoomLevel = initialZoom;\n this.zoomAnim.setValue(this.zoomLevel);\n }\n if (\n !this.onTransformInvocationInitialized &&\n this._invokeOnTransform().successful\n ) {\n this.panAnim.addListener(() => this._invokeOnTransform());\n this.zoomAnim.addListener(() => this._invokeOnTransform());\n this.onTransformInvocationInitialized = true;\n }\n\n const currState = this.state;\n const originalMeasurementsChanged =\n currState.originalHeight !== prevState.originalHeight ||\n currState.originalWidth !== prevState.originalWidth ||\n currState.originalPageX !== prevState.originalPageX ||\n currState.originalPageY !== prevState.originalPageY ||\n currState.originalX !== prevState.originalX ||\n currState.originalY !== prevState.originalY;\n\n const staticPinPositionChanged =\n prevProps.staticPinPosition?.x !== this.props.staticPinPosition?.x ||\n prevProps.staticPinPosition?.y !== this.props.staticPinPosition?.y;\n\n // We use a custom `onLayout` event, so the clients can stay in-sync\n // with when the internal measurements are actually saved to the state,\n // thus helping them apply transformations at more accurate timings\n if (originalMeasurementsChanged) {\n const layout = {\n width: currState.originalWidth,\n height: currState.originalHeight,\n x: currState.originalX,\n y: currState.originalY,\n };\n this.props.onLayout?.({ nativeEvent: { layout } });\n }\n\n if (\n this.onTransformInvocationInitialized &&\n (originalMeasurementsChanged || staticPinPositionChanged)\n ) {\n this._invokeOnTransform();\n }\n }\n\n componentDidMount() {\n this.measureZoomSubject();\n // We've already run `grabZoomSubjectOriginalMeasurements` at various events\n // to make sure the measurements are promptly updated.\n // However, there might be cases we haven't accounted for, especially when\n // native processes are involved. To account for those cases,\n // we'll use an interval here to ensure we're always up-to-date.\n // The `setState` in `grabZoomSubjectOriginalMeasurements` won't trigger a rerender\n // if the values given haven't changed, so we're not running performance risk here.\n this.measureZoomSubjectInterval = setInterval(this.measureZoomSubject, 1e3);\n }\n\n componentWillUnmount() {\n this.measureZoomSubjectInterval &&\n clearInterval(this.measureZoomSubjectInterval);\n }\n\n debouncedOnStaticPinPositionChange = debounce(\n (position: Vec2D) => this.props.onStaticPinPositionChange?.(position),\n 100\n );\n\n /**\n * try to invoke onTransform\n * @private\n */\n _invokeOnTransform() {\n const zoomableViewEvent = this._getZoomableViewEventObject();\n const position = this._staticPinPosition();\n\n if (!zoomableViewEvent.originalWidth || !zoomableViewEvent.originalHeight)\n return { successful: false };\n\n this.props.onTransform?.(zoomableViewEvent);\n\n if (position) {\n this.props.onStaticPinPositionMove?.(position);\n this.debouncedOnStaticPinPositionChange(position);\n }\n\n return { successful: true };\n }\n\n /**\n * Returns additional information about components current state for external event hooks\n *\n * @returns {{}}\n * @private\n */\n _getZoomableViewEventObject(overwriteObj = {}): ZoomableViewEvent {\n return {\n zoomLevel: this.zoomLevel,\n offsetX: this.offsetX,\n offsetY: this.offsetY,\n originalHeight: this.state.originalHeight,\n originalWidth: this.state.originalWidth,\n originalPageX: this.state.originalPageX,\n originalPageY: this.state.originalPageY,\n ...overwriteObj,\n } as ZoomableViewEvent;\n }\n\n /**\n * Get the original box dimensions and save them for later use.\n * (They will be used to calculate boxBorders)\n *\n * @private\n */\n private measureZoomSubject = () => {\n // make sure we measure after animations are complete\n requestAnimationFrame(() => {\n // this setTimeout is here to fix a weird issue on iOS where the measurements are all `0`\n // when navigating back (react-navigation stack) from another view\n // while closing the keyboard at the same time\n setTimeout(() => {\n // In normal conditions, we're supposed to measure zoomSubject instead of its wrapper.\n // However, our zoomSubject may have been transformed by an initial zoomLevel or offset,\n // in which case these measurements will not represent the true \"original\" measurements.\n // We just need to make sure the zoomSubjectWrapper perfectly aligns with the zoomSubject\n // (no border, space, or anything between them)\n this.zoomSubjectWrapperRef.current?.measure(\n (x, y, width, height, pageX, pageY) => {\n // When the component is off-screen, these become all 0s, so we don't set them\n // to avoid messing up calculations, especially ones that are done right after\n // the component transitions from hidden to visible.\n if (!pageX && !pageY && !width && !height) return;\n\n // If these values are all the same, don't re-set them in state\n // this way we don't re-render\n if (\n this.state.originalX === x &&\n this.state.originalY === y &&\n this.state.originalWidth === width &&\n this.state.originalHeight === height &&\n this.state.originalPageX === pageX &&\n this.state.originalPageY === pageY\n ) {\n return;\n }\n\n this.setState({\n originalX: x,\n originalY: y,\n originalWidth: width,\n originalHeight: height,\n originalPageX: pageX,\n originalPageY: pageY,\n });\n }\n );\n });\n });\n };\n\n /**\n * Handles the start of touch events and checks for taps\n *\n * @param e\n * @param gestureState\n * @returns {boolean}\n *\n * @private\n */\n _handleStartShouldSetPanResponder = (\n e: GestureResponderEvent,\n gestureState: PanResponderGestureState\n ) => {\n if (this.props.onStartShouldSetPanResponder) {\n this.props.onStartShouldSetPanResponder(\n e,\n gestureState,\n this._getZoomableViewEventObject(),\n false\n );\n }\n\n // Always set pan responder on start\n // of gesture so we can handle tap.\n // \"Pan threshold validation\" will be handled\n // in `onPanResponderMove` instead of in `onMoveShouldSetPanResponder`\n return true;\n };\n\n /**\n * Calculates pinch distance\n *\n * @param e\n * @param gestureState\n * @private\n */\n _handlePanResponderGrant: NonNullable<\n PanResponderCallbacks['onPanResponderGrant']\n > = (e, gestureState) => {\n if (this.props.onLongPress) {\n e.persist();\n this.longPressTimeout = setTimeout(() => {\n this.props.onLongPress?.(\n e,\n gestureState,\n this._getZoomableViewEventObject()\n );\n this.longPressTimeout = null;\n }, this.props.longPressDuration);\n }\n\n this.props.onPanResponderGrant?.(\n e,\n gestureState,\n this._getZoomableViewEventObject()\n );\n\n this.panAnim.stopAnimation();\n this.zoomAnim.stopAnimation();\n this.gestureStarted = true;\n\n this.raisePin();\n };\n\n /**\n * Handles the end of touch events\n *\n * @param e\n * @param gestureState\n *\n * @private\n */\n _handlePanResponderEnd: NonNullable<\n PanResponderCallbacks['onPanResponderEnd']\n > = (e, gestureState) => {\n if (!this.gestureType) {\n this._resolveAndHandleTap(e);\n }\n\n this.setState({ debugPoints: [] });\n\n this.lastGestureCenterPosition = null;\n\n const disableMomentum =\n this.props.disableMomentum ||\n (this.props.panEnabled &&\n this.gestureType === 'shift' &&\n this.props.disablePanOnInitialZoom &&\n this.zoomLevel === this.props.initialZoom);\n\n // Trigger final shift animation unless disablePanOnInitialZoom is set and we're on the initial zoom level\n // or disableMomentum\n if (!disableMomentum) {\n getPanMomentumDecayAnim(this.panAnim, {\n x: gestureState.vx / this.zoomLevel,\n y: gestureState.vy / this.zoomLevel,\n }).start();\n }\n\n if (this.longPressTimeout) {\n clearTimeout(this.longPressTimeout);\n this.longPressTimeout = null;\n }\n\n this.props.onPanResponderEnd?.(\n e,\n gestureState,\n this._getZoomableViewEventObject()\n );\n\n if (this.gestureType === 'pinch') {\n this.props.onZoomEnd?.(\n e,\n gestureState,\n this._getZoomableViewEventObject()\n );\n } else if (this.gestureType === 'shift') {\n this.props.onShiftingEnd?.(\n e,\n gestureState,\n this._getZoomableViewEventObject()\n );\n }\n\n if (this.props.staticPinPosition) {\n this._updateStaticPin();\n }\n\n this.dropPin();\n\n this.gestureType = null;\n this.gestureStarted = false;\n };\n\n /**\n * Handles the actual movement of our pan responder\n *\n * @param e\n * @param gestureState\n *\n * @private\n */\n _handlePanResponderMove = (\n e: GestureResponderEvent,\n gestureState: PanResponderGestureState\n ) => {\n if (this.props.onPanResponderMove) {\n if (\n this.props.onPanResponderMove(\n e,\n gestureState,\n this._getZoomableViewEventObject()\n )\n ) {\n return false;\n }\n }\n\n // Only supports 2 touches and below,\n // any invalid number will cause the gesture to end.\n if (gestureState.numberActiveTouches <= 2) {\n if (!this.gestureStarted) {\n this._handlePanResponderGrant(e, gestureState);\n }\n } else {\n if (this.gestureStarted) {\n this._handlePanResponderEnd(e, gestureState);\n }\n return true;\n }\n\n if (gestureState.numberActiveTouches === 2) {\n if (this.longPressTimeout) {\n clearTimeout(this.longPressTimeout);\n this.longPressTimeout = null;\n }\n\n // change some measurement states when switching gesture to ensure a smooth transition\n if (this.gestureType !== 'pinch') {\n this.lastGestureCenterPosition = calcGestureCenterPoint(\n e,\n gestureState\n );\n this.lastGestureTouchDistance = calcGestureTouchDistance(\n e,\n gestureState\n );\n }\n this.gestureType = 'pinch';\n this._handlePinching(e, gestureState);\n } else if (gestureState.numberActiveTouches === 1) {\n if (\n this.longPressTimeout &&\n (Math.abs(gestureState.dx) > 5 || Math.abs(gestureState.dy) > 5)\n ) {\n clearTimeout(this.longPressTimeout);\n this.longPressTimeout = null;\n }\n // change some measurement states when switching gesture to ensure a smooth transition\n if (this.gestureType !== 'shift') {\n this.lastGestureCenterPosition = calcGestureCenterPoint(\n e,\n gestureState\n );\n }\n\n const { dx, dy } = gestureState;\n const isShiftGesture = Math.abs(dx) > 2 || Math.abs(dy) > 2;\n if (isShiftGesture) {\n this.gestureType = 'shift';\n this._handleShifting(gestureState);\n }\n }\n };\n\n /**\n * Handles the pinch movement and zooming\n *\n * @param e\n * @param gestureState\n *\n * @private\n */\n _handlePinching(\n e: GestureResponderEvent,\n gestureState: PanResponderGestureState\n ) {\n if (!this.props.zoomEnabled) return;\n\n const {\n maxZoom,\n minZoom,\n pinchToZoomInSensitivity,\n pinchToZoomOutSensitivity,\n } = this.props;\n\n const distance = calcGestureTouchDistance(e, gestureState);\n\n if (\n this.props.onZoomBefore &&\n this.props.onZoomBefore(\n e,\n gestureState,\n this._getZoomableViewEventObject()\n )\n ) {\n return;\n }\n\n if (!distance) return;\n if (!this.lastGestureTouchDistance) return;\n\n // define the new zoom level and take zoom level sensitivity into consideration\n const zoomGrowthFromLastGestureState =\n distance / this.lastGestureTouchDistance;\n this.lastGestureTouchDistance = distance;\n\n const pinchToZoomSensitivity =\n zoomGrowthFromLastGestureState < 1\n ? pinchToZoomOutSensitivity\n : pinchToZoomInSensitivity;\n\n if (pinchToZoomSensitivity == null) return;\n const deltaGrowth = zoomGrowthFromLastGestureState - 1;\n // 0 - no resistance\n // 10 - 90% resistance\n const deltaGrowthAdjustedBySensitivity =\n deltaGrowth * (1 - (pinchToZoomSensitivity * 9) / 100);\n\n let newZoomLevel = this.zoomLevel * (1 + deltaGrowthAdjustedBySensitivity);\n\n // make sure max and min zoom levels are respected\n if (maxZoom != null && newZoomLevel > maxZoom) {\n newZoomLevel = maxZoom;\n }\n\n if (minZoom != null && newZoomLevel < minZoom) {\n newZoomLevel = minZoom;\n }\n\n const gestureCenterPoint = calcGestureCenterPoint(e, gestureState);\n\n if (!gestureCenterPoint) return;\n\n let zoomCenter = {\n x: gestureCenterPoint.x - this.state.originalPageX,\n y: gestureCenterPoint.y - this.state.originalPageY,\n };\n\n if (this.props.staticPinPosition) {\n // When we use a static pin position, the zoom centre is the same as that position,\n // otherwise the pin moves around way too much while zooming.\n zoomCenter = {\n x: this.props.staticPinPosition.x,\n y: this.props.staticPinPosition.y,\n };\n }\n\n // Uncomment to debug\n this.props.debug && this._setPinchDebugPoints(e, zoomCenter);\n\n const { originalHeight, originalWidth } = this.state;\n\n const oldOffsetX = this.offsetX;\n const oldOffsetY = this.offsetY;\n const oldScale = this.zoomLevel;\n const newScale = newZoomLevel;\n\n if (!originalHeight || !originalWidth) return;\n\n let offsetY = calcNewScaledOffsetForZoomCentering(\n oldOffsetY,\n originalHeight,\n oldScale,\n newScale,\n zoomCenter.y\n );\n let offsetX = calcNewScaledOffsetForZoomCentering(\n oldOffsetX,\n originalWidth,\n oldScale,\n newScale,\n zoomCenter.x\n );\n\n const offsetShift =\n this._calcOffsetShiftSinceLastGestureState(gestureCenterPoint);\n if (offsetShift) {\n offsetX += offsetShift.x;\n offsetY += offsetShift.y;\n }\n\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n this.zoomLevel = newScale;\n\n this.panAnim.setValue({ x: this.offsetX, y: this.offsetY });\n this.zoomAnim.setValue(this.zoomLevel);\n\n this.props.onZoomAfter?.(\n e,\n gestureState,\n this._getZoomableViewEventObject()\n );\n }\n\n /**\n * Used to debug pinch events\n * @param gestureResponderEvent\n * @param zoomCenter\n * @param points\n */\n _setPinchDebugPoints(\n gestureResponderEvent: GestureResponderEvent,\n zoomCenter: Vec2D,\n ...points: Vec2D[]\n ) {\n const { touches } = gestureResponderEvent.nativeEvent;\n const { originalPageY, originalPageX } = this.state;\n\n this.setState({\n debugPoints: [\n {\n x: touches[0].pageX - originalPageX,\n y: touches[0].pageY - originalPageY,\n },\n {\n x: touches[1].pageX - originalPageX,\n y: touches[1].pageY - originalPageY,\n },\n zoomCenter,\n ...points,\n ],\n });\n }\n\n /**\n * Calculates the amount the offset should shift since the last position during panning\n *\n * @param {Vec2D} gestureCenterPoint\n *\n * @private\n */\n _calcOffsetShiftSinceLastGestureState(gestureCenterPoint: Vec2D) {\n const { movementSensibility } = this.props;\n\n let shift = null;\n\n if (this.lastGestureCenterPosition && movementSensibility) {\n const dx = gestureCenterPoint.x - this.lastGestureCenterPosition.x;\n const dy = gestureCenterPoint.y - this.lastGestureCenterPosition.y;\n\n const shiftX = dx / this.zoomLevel / movementSensibility;\n const shiftY = dy / this.zoomLevel / movementSensibility;\n\n shift = {\n x: shiftX,\n y: shiftY,\n };\n }\n\n this.lastGestureCenterPosition = gestureCenterPoint;\n\n return shift;\n }\n\n /**\n * Handles movement by tap and move\n *\n * @param gestureState\n *\n * @private\n */\n _handleShifting(gestureState: PanResponderGestureState) {\n // Skips shifting if panEnabled is false or disablePanOnInitialZoom is true and we're on the initial zoom level\n if (\n !this.props.panEnabled ||\n (this.props.disablePanOnInitialZoom &&\n this.zoomLevel === this.props.initialZoom)\n ) {\n return;\n }\n const shift = this._calcOffsetShiftSinceLastGestureState({\n x: gestureState.moveX,\n y: gestureState.moveY,\n });\n if (!shift) return;\n\n const offsetX = this.offsetX + shift.x;\n const offsetY = this.offsetY + shift.y;\n\n if (\n this.props.debug &&\n this.state.originalPageX &&\n this.state.originalPageY\n ) {\n const x = gestureState.moveX - this.state.originalPageX;\n const y = gestureState.moveY - this.state.originalPageY;\n this.setState({ debugPoints: [{ x, y }] });\n }\n\n this._setNewOffsetPosition(offsetX, offsetY);\n\n this.raisePin();\n }\n\n /**\n * Set the state to offset moved\n *\n * @param {number} newOffsetX\n * @param {number} newOffsetY\n * @returns\n */\n _setNewOffsetPosition(newOffsetX: number, newOffsetY: number) {\n const { onShiftingBefore, onShiftingAfter } = this.props;\n\n if (onShiftingBefore?.(null, null, this._getZoomableViewEventObject())) {\n return;\n }\n\n this.offsetX = newOffsetX;\n this.offsetY = newOffsetY;\n\n this.panAnim.setValue({ x: this.offsetX, y: this.offsetY });\n this.zoomAnim.setValue(this.zoomLevel);\n\n onShiftingAfter?.(null, null, this._getZoomableViewEventObject());\n }\n\n /**\n * Check whether the press event is double tap\n * or single tap and handle the event accordingly\n *\n * @param e\n *\n * @private\n */\n private _resolveAndHandleTap = (e: GestureResponderEvent) => {\n const now = Date.now();\n if (\n this.doubleTapFirstTapReleaseTimestamp &&\n this.props.doubleTapDelay &&\n now - this.doubleTapFirstTapReleaseTimestamp < this.props.doubleTapDelay\n ) {\n this.doubleTapFirstTap &&\n this._addTouch({\n ...this.doubleTapFirstTap,\n id: now.toString(),\n isSecondTap: true,\n });\n this.singleTapTimeoutId && clearTimeout(this.singleTapTimeoutId);\n delete this.doubleTapFirstTapReleaseTimestamp;\n delete this.singleTapTimeoutId;\n delete this.doubleTapFirstTap;\n this._handleDoubleTap(e);\n } else {\n this.doubleTapFirstTapReleaseTimestamp = now;\n this.doubleTapFirstTap = {\n id: now.toString(),\n x: e.nativeEvent.pageX - this.state.originalPageX,\n y: e.nativeEvent.pageY - this.state.originalPageY,\n };\n this._addTouch(this.doubleTapFirstTap);\n\n // persist event so e.nativeEvent is preserved after a timeout delay\n e.persist();\n this.singleTapTimeoutId = setTimeout(() => {\n delete this.doubleTapFirstTapReleaseTimestamp;\n delete this.singleTapTimeoutId;\n\n // Pan to the tapped location\n if (this.props.staticPinPosition && this.doubleTapFirstTap) {\n const tapX =\n this.props.staticPinPosition.x - this.doubleTapFirstTap.x;\n const tapY =\n this.props.staticPinPosition.y - this.doubleTapFirstTap.y;\n\n Animated.timing(this.panAnim, {\n toValue: {\n x: this.offsetX + tapX / this.zoomLevel,\n y: this.offsetY + tapY / this.zoomLevel,\n },\n useNativeDriver: true,\n duration: 200,\n }).start(() => {\n this._updateStaticPin();\n });\n }\n\n this.props.onSingleTap?.(e, this._getZoomableViewEventObject());\n }, this.props.doubleTapDelay);\n }\n };\n\n moveStaticPinTo = (position: Vec2D, duration?: number) => {\n const { originalWidth, originalHeight } = this.state;\n const { staticPinPosition, contentWidth, contentHeight } = this.props;\n\n if (!staticPinPosition) return;\n if (!originalWidth || !originalHeight) return;\n if (!contentWidth || !contentHeight) return;\n\n // Offset for the static pin\n const pinX = staticPinPosition.x - originalWidth / 2;\n const pinY = staticPinPosition.y - originalHeight / 2;\n\n this.offsetX = contentWidth / 2 - position.x + pinX / this.zoomLevel;\n this.offsetY = contentHeight / 2 - position.y + pinY / this.zoomLevel;\n\n if (duration) {\n Animated.timing(this.panAnim, {\n toValue: { x: this.offsetX, y: this.offsetY },\n useNativeDriver: true,\n duration,\n }).start();\n } else {\n this.panAnim.setValue({ x: this.offsetX, y: this.offsetY });\n }\n };\n\n private _staticPinPosition = () => {\n if (!this.props.staticPinPosition) return;\n if (!this.props.contentWidth || !this.props.contentHeight) return;\n\n return viewportPositionToImagePosition({\n viewportPosition: {\n x: this.props.staticPinPosition.x,\n y: this.props.staticPinPosition.y,\n },\n imageSize: {\n height: this.props.contentHeight,\n width: this.props.contentWidth,\n },\n zoomableEvent: {\n ...this._getZoomableViewEventObject(),\n offsetX: this.offsetX,\n offsetY: this.offsetY,\n zoomLevel: this.zoomLevel,\n },\n });\n };\n\n private _updateStaticPin = () => {\n const position = this._staticPinPosition();\n if (!position) return;\n this.props.onStaticPinPositionChange?.(position);\n };\n\n private _addTouch(touch: TouchPoint) {\n this.touches.push(touch);\n this.setState({ touches: [...this.touches] });\n }\n\n private _removeTouch(touch: TouchPoint) {\n this.touches.splice(this.touches.indexOf(touch), 1);\n this.setState({ touches: [...this.touches] });\n }\n\n /**\n * Handles the double tap event\n *\n * @param e\n *\n * @private\n */\n _handleDoubleTap(e: GestureResponderEvent) {\n const { onDoubleTapBefore, onDoubleTapAfter, doubleTapZoomToCenter } =\n this.props;\n\n onDoubleTapBefore?.(e, this._getZoomableViewEventObject());\n\n const nextZoomStep = this._getNextZoomStep();\n if (nextZoomStep == null) return;\n\n const { originalPageX, originalPageY } = this.state;\n\n // define new zoom position coordinates\n const zoomPositionCoordinates = {\n x: e.nativeEvent.pageX - originalPageX,\n y: e.nativeEvent.pageY - originalPageY,\n };\n\n // if doubleTapZoomToCenter enabled -> always zoom to center instead\n if (doubleTapZoomToCenter) {\n zoomPositionCoordinates.x = 0;\n zoomPositionCoordinates.y = 0;\n }\n\n this.zoomTo(nextZoomStep, zoomPositionCoordinates);\n\n onDoubleTapAfter?.(\n e,\n this._getZoomableViewEventObject({ zoomLevel: nextZoomStep })\n );\n }\n\n /**\n * Returns the next zoom step based on current step and zoomStep property.\n * If we are zoomed all the way in -> return to initialzoom\n *\n * @returns {*}\n */\n _getNextZoomStep() {\n const { zoomStep, maxZoom, initialZoom } = this.props;\n const { zoomLevel } = this;\n\n if (maxZoom == null) return;\n\n if (zoomLevel.toFixed(2) === maxZoom.toFixed(2)) {\n return initialZoom;\n }\n\n if (zoomStep == null) return;\n\n const nextZoomStep = zoomLevel * (1 + zoomStep);\n if (nextZoomStep > maxZoom) {\n return maxZoom;\n }\n\n return nextZoomStep;\n }\n\n /**\n * Zooms to a specific level. A \"zoom center\" can be provided, which specifies\n * the point that will remain in the same position on the screen after the zoom.\n * The coordinates of the zoom center is relative to the zoom subject.\n * { x: 0, y: 0 } is the very center of the zoom subject.\n *\n * @param newZoomLevel\n * @param zoomCenter - If not supplied, the container's center is the zoom center\n */\n zoomTo(newZoomLevel: number, zoomCenter?: Vec2D) {\n if (!this.props.zoomEnabled) return false;\n if (this.props.maxZoom && newZoomLevel > this.props.maxZoom) return false;\n if (this.props.minZoom && newZoomLevel < this.props.minZoom) return false;\n\n this.props.onZoomBefore?.(null, null, this._getZoomableViewEventObject());\n\n // == Perform Pan Animation to preserve the zoom center while zooming ==\n let listenerId = '';\n if (zoomCenter) {\n // Calculates panAnim values based on changes in zoomAnim.\n let prevScale = this.zoomLevel;\n // Since zoomAnim is calculated in native driver,\n // it will jitter panAnim once in a while,\n // because here panAnim is being calculated in js.\n // However the jittering should mostly occur in simulator.\n listenerId = this.zoomAnim.addListener(({ value: newScale }) => {\n this.panAnim.setValue({\n x: calcNewScaledOffsetForZoomCentering(\n this.offsetX,\n this.state.originalWidth,\n prevScale,\n newScale,\n zoomCenter.x\n ),\n y: calcNewScaledOffsetForZoomCentering(\n this.offsetY,\n this.state.originalHeight,\n prevScale,\n newScale,\n zoomCenter.y\n ),\n });\n prevScale = newScale;\n });\n }\n\n // == Perform Zoom Animation ==\n getZoomToAnimation(this.zoomAnim, newZoomLevel).start(() => {\n this.zoomAnim.removeListener(listenerId);\n });\n // == Zoom Animation Ends ==\n\n this.props.onZoomAfter?.(null, null, this._getZoomableViewEventObject());\n return true;\n }\n\n /**\n * Zooms in or out by a specified change level\n * Use a positive number for `zoomLevelChange` to zoom in\n * Use a negative number for `zoomLevelChange` to zoom out\n *\n * Returns a promise if everything was updated and a boolean, whether it could be updated or if it exceeded the min/max zoom limits.\n *\n * @param {number | null} zoomLevelChange\n *\n * @return {bool}\n */\n zoomBy(zoomLevelChange: number) {\n // if no zoom level Change given -> just use zoom step\n zoomLevelChange ||= this.props.zoomStep || 0;\n return this.zoomTo(this.zoomLevel + zoomLevelChange);\n }\n\n /**\n * Moves the zoomed view to a specified position\n * Returns a promise when finished\n *\n * @param {number} newOffsetX the new position we want to move it to (x-axis)\n * @param {number} newOffsetY the new position we want to move it to (y-axis)\n *\n * @return {bool}\n */\n moveTo(newOffsetX: number, newOffsetY: number) {\n const { originalWidth, originalHeight } = this.state;\n if (!originalWidth || !originalHeight) return;\n\n const offsetX = (newOffsetX - originalWidth / 2) / this.zoomLevel;\n const offsetY = (newOffsetY - originalHeight / 2) / this.zoomLevel;\n\n this._setNewOffsetPosition(-offsetX, -offsetY);\n }\n\n /**\n * Moves the zoomed view by a certain amount.\n *\n * Returns a promise when finished\n *\n * @param {number} offsetChangeX the amount we want to move the offset by (x-axis)\n * @param {number} offsetChangeY the amount we want to move the offset by (y-axis)\n *\n * @return {bool}\n */\n moveBy(offsetChangeX: number, offsetChangeY: number) {\n const offsetX =\n (this.offsetX * this.zoomLevel - offsetChangeX) / this.zoomLevel;\n const offsetY =\n (this.offsetY * this.zoomLevel - offsetChangeY) / this.zoomLevel;\n\n this._setNewOffsetPosition(offsetX, offsetY);\n }\n\n render() {\n const {\n staticPinIcon,\n children,\n visualTouchFeedbackEnabled,\n doubleTapDelay,\n staticPinPosition,\n onStaticPinLongPress,\n onStaticPinPress,\n pinProps,\n } = this.props;\n\n const { pinSize, touches, debugPoints = [] } = this.state;\n\n return (\n \n \n {children}\n \n\n {visualTouchFeedbackEnabled &&\n touches?.map(\n (touch) =>\n doubleTapDelay && (\n {\n this._removeTouch(touch);\n }}\n />\n )\n )}\n\n {/* For Debugging Only */}\n {debugPoints.map(({ x, y }, index) => {\n return ;\n })}\n\n {staticPinPosition && (\n {\n this.setState({ pinSize: size });\n }}\n pinProps={pinProps}\n />\n )}\n \n );\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n alignItems: 'center',\n flex: 1,\n justifyContent: 'center',\n overflow: 'hidden',\n position: 'relative',\n },\n zoomSubject: {\n alignItems: 'center',\n flex: 1,\n justifyContent: 'center',\n width: '100%',\n },\n});\n\nexport default ReactNativeZoomableView;\n\nexport { ReactNativeZoomableView };\n"]} \ No newline at end of file +{"version":3,"names":["debounce","React","Component","createRef","Animated","Easing","PanResponder","StyleSheet","View","getBoundaryCrossedAnim","getPanMomentumDecayAnim","getZoomToAnimation","AnimatedTouchFeedback","StaticPin","DebugTouchPoint","calcGestureCenterPoint","calcGestureTouchDistance","calcNewScaledOffsetForZoomCentering","applyPanBoundariesToOffset","viewportPositionToImagePosition","jsx","_jsx","jsxs","_jsxs","initialState","originalWidth","originalHeight","originalPageX","originalPageY","originalX","originalY","pinSize","width","height","ReactNativeZoomableView","defaultProps","zoomEnabled","panEnabled","initialZoom","initialOffsetX","initialOffsetY","maxZoom","minZoom","pinchToZoomInSensitivity","pinchToZoomOutSensitivity","movementSensibility","doubleTapDelay","bindToBorders","zoomStep","onLongPress","longPressDuration","contentWidth","undefined","contentHeight","panBoundaryPadding","visualTouchFeedbackEnabled","staticPinPosition","staticPinIcon","onStaticPinPositionChange","onStaticPinPositionMove","animatePin","disablePanOnInitialZoom","panAnim","ValueXY","x","y","zoomAnim","Value","pinAnim","__offsets","value","boundaryCrossedAnimInEffect","zoomLevel","lastGestureCenterPosition","lastGestureTouchDistance","_gestureStarted","gestureStarted","v","longPressTimeout","touches","constructor","props","state","gestureHandlers","create","onStartShouldSetPanResponder","_handleStartShouldSetPanResponder","onPanResponderGrant","_handlePanResponderGrant","onPanResponderMove","_handlePanResponderMove","onPanResponderRelease","_handlePanResponderEnd","onPanResponderTerminate","evt","gestureState","_getZoomableViewEventObject","onPanResponderTerminationRequest","onShouldBlockNativeResponder","onStartShouldSetPanResponderCapture","onMoveShouldSetPanResponderCapture","zoomSubjectWrapperRef","zoomAnimatedValue","panAnimatedValueXY","offsetX","offsetY","setValue","addListener","gestureType","raisePin","timing","toValue","useNativeDriver","easing","out","ease","duration","start","dropPin","__setOffset","__getOffset","axis","offset","offsetState","containerSize","contentSize","boundOffset","boundariesApplied","toFixed","componentDidUpdate","prevProps","prevState","onTransformInvocationInitialized","_invokeOnTransform","successful","currState","originalMeasurementsChanged","staticPinPositionChanged","layout","onLayout","nativeEvent","componentDidMount","measureZoomSubject","measureZoomSubjectInterval","setInterval","componentWillUnmount","clearInterval","debouncedOnStaticPinPositionChange","position","zoomableViewEvent","_staticPinPosition","onTransform","overwriteObj","requestAnimationFrame","setTimeout","current","measure","pageX","pageY","setState","e","persist","stopAnimation","_resolveAndHandleTap","debugPoints","disableMomentum","vx","vy","clearTimeout","onPanResponderEnd","onZoomEnd","onShiftingEnd","_updateStaticPin","numberActiveTouches","_handlePinching","Math","abs","dx","dy","isShiftGesture","_handleShifting","distance","onZoomBefore","zoomGrowthFromLastGestureState","pinchToZoomSensitivity","deltaGrowth","deltaGrowthAdjustedBySensitivity","newZoomLevel","gestureCenterPoint","zoomCenter","debug","_setPinchDebugPoints","oldOffsetX","oldOffsetY","oldScale","newScale","offsetShift","_calcOffsetShiftSinceLastGestureState","onZoomAfter","gestureResponderEvent","points","shift","shiftX","shiftY","moveX","moveY","_setNewOffsetPosition","newOffsetX","newOffsetY","onShiftingBefore","onShiftingAfter","now","Date","doubleTapFirstTapReleaseTimestamp","doubleTapFirstTap","_addTouch","id","toString","isSecondTap","singleTapTimeoutId","_handleDoubleTap","tapX","tapY","onSingleTap","moveStaticPinTo","pinX","pinY","viewportPosition","imageSize","zoomableEvent","touch","push","_removeTouch","splice","indexOf","onDoubleTapBefore","onDoubleTapAfter","doubleTapZoomToCenter","nextZoomStep","_getNextZoomStep","zoomPositionCoordinates","zoomTo","listenerId","prevScale","removeListener","zoomBy","zoomLevelChange","moveTo","moveBy","offsetChangeX","offsetChangeY","render","children","onStaticPinLongPress","onStaticPinPress","pinProps","style","styles","container","panHandlers","ref","zoomSubject","transform","scaleX","scaleY","getTranslateTransform","map","animationDuration","onAnimationDone","index","onPress","onParentMove","setPinSize","size","alignItems","flex","justifyContent","over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P,UAAU,CAAC6E,MAAM,CAAC;EAC/B8K,SAAS,EAAE;IACTgB,UAAU,EAAE,QAAQ;IACpBC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBC,QAAQ,EAAE,QAAQ;IAClBjI,QAAQ,EAAE;EACZ,CAAC;EACDiH,WAAW,EAAE;IACXa,UAAU,EAAE,QAAQ;IACpBC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBpP,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,eAAeE,uBAAuB;AAEtC,SAASA,uBAAuB","ignoreList":[]} diff --git a/lib/module/animations/index.js b/lib/module/animations/index.js index 1a2cfb18..8aae9b51 100644 --- a/lib/module/animations/index.js +++ b/lib/module/animations/index.js @@ -1,3 +1,5 @@ +"use strict"; + import { Animated, Easing } from 'react-native'; export function getBoundaryCrossedAnim(animValue, toValue) { return Animated.spring(animValue, { diff --git a/lib/module/animations/index.js.map b/lib/module/animations/index.js.map index 0dd60d40..7902608d 100644 --- a/lib/module/animations/index.js.map +++ b/lib/module/animations/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["index.ts"],"names":["Animated","Easing","getBoundaryCrossedAnim","animValue","toValue","spring","overshootClamping","useNativeDriver","getPanMomentumDecayAnim","velocity","decay","deceleration","getZoomToAnimation","timing","easing","out","ease"],"mappings":"AAAA,SAASA,QAAT,EAAmBC,MAAnB,QAAiC,cAAjC;AAIA,OAAO,SAASC,sBAAT,CACLC,SADK,EAELC,OAFK,EAGL;AACA,SAAOJ,QAAQ,CAACK,MAAT,CAAgBF,SAAhB,EAA2B;AAChCG,IAAAA,iBAAiB,EAAE,IADa;AAEhCF,IAAAA,OAFgC;AAGhCG,IAAAA,eAAe,EAAE;AAHe,GAA3B,CAAP;AAKD;AAED,OAAO,SAASC,uBAAT,CACLL,SADK,EAELM,QAFK,EAGL;AACA,SAAOT,QAAQ,CAACU,KAAT,CAAeP,SAAf,EAA0B;AAC/BM,IAAAA,QAD+B;AAE/BE,IAAAA,YAAY,EAAE,KAFiB;AAG/BJ,IAAAA,eAAe,EAAE;AAHc,GAA1B,CAAP;AAKD;AAED,OAAO,SAASK,kBAAT,CAA4BT,SAA5B,EAAuDC,OAAvD,EAAwE;AAC7E,SAAOJ,QAAQ,CAACa,MAAT,CAAgBV,SAAhB,EAA2B;AAChCW,IAAAA,MAAM,EAAEb,MAAM,CAACc,GAAP,CAAWd,MAAM,CAACe,IAAlB,CADwB;AAEhCZ,IAAAA,OAFgC;AAGhCG,IAAAA,eAAe,EAAE;AAHe,GAA3B,CAAP;AAKD","sourcesContent":["import { Animated, Easing } from 'react-native';\n\nimport { Vec2D } from '../typings';\n\nexport function getBoundaryCrossedAnim(\n animValue: Animated.Value,\n toValue: number\n) {\n return Animated.spring(animValue, {\n overshootClamping: true,\n toValue,\n useNativeDriver: true,\n });\n}\n\nexport function getPanMomentumDecayAnim(\n animValue: Animated.Value | Animated.ValueXY,\n velocity: number | Vec2D\n) {\n return Animated.decay(animValue, {\n velocity,\n deceleration: 0.994,\n useNativeDriver: true,\n });\n}\n\nexport function getZoomToAnimation(animValue: Animated.Value, toValue: number) {\n return Animated.timing(animValue, {\n easing: Easing.out(Easing.ease),\n toValue,\n useNativeDriver: true,\n });\n}\n"]} \ No newline at end of file +{"version":3,"names":["Animated","Easing","getBoundaryCrossedAnim","animValue","toValue","spring","overshootClamping","useNativeDriver","getPanMomentumDecayAnim","velocity","decay","deceleration","getZoomToAnimation","timing","easing","out","ease"],"sourceRoot":"../../../src","sources":["animations/index.ts"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,MAAM,QAAQ,cAAc;AAI/C,OAAO,SAASC,sBAAsBA,CACpCC,SAAyB,EACzBC,OAAe,EACf;EACA,OAAOJ,QAAQ,CAACK,MAAM,CAACF,SAAS,EAAE;IAChCG,iBAAiB,EAAE,IAAI;IACvBF,OAAO;IACPG,eAAe,EAAE;EACnB,CAAC,CAAC;AACJ;AAEA,OAAO,SAASC,uBAAuBA,CACrCL,SAA4C,EAC5CM,QAAwB,EACxB;EACA,OAAOT,QAAQ,CAACU,KAAK,CAACP,SAAS,EAAE;IAC/BM,QAAQ;IACRE,YAAY,EAAE,KAAK;IACnBJ,eAAe,EAAE;EACnB,CAAC,CAAC;AACJ;AAEA,OAAO,SAASK,kBAAkBA,CAACT,SAAyB,EAAEC,OAAe,EAAE;EAC7E,OAAOJ,QAAQ,CAACa,MAAM,CAACV,SAAS,EAAE;IAChCW,MAAM,EAAEb,MAAM,CAACc,GAAG,CAACd,MAAM,CAACe,IAAI,CAAC;IAC/BZ,OAAO;IACPG,eAAe,EAAE;EACnB,CAAC,CAAC;AACJ","ignoreList":[]} diff --git a/lib/module/components/AnimatedTouchFeedback.js b/lib/module/components/AnimatedTouchFeedback.js index 58b3558f..391b2e1c 100644 --- a/lib/module/components/AnimatedTouchFeedback.js +++ b/lib/module/components/AnimatedTouchFeedback.js @@ -1,5 +1,8 @@ +"use strict"; + import React, { useEffect, useRef } from 'react'; import { Animated, Easing, StyleSheet } from 'react-native'; +import { jsx as _jsx } from "react/jsx-runtime"; export const AnimatedTouchFeedback = ({ x, y, @@ -25,13 +28,9 @@ export const AnimatedTouchFeedback = ({ duration: outDuration, easing: Easing.out(Easing.ease), useNativeDriver: true - })]).start(() => { - var _onAnimationDoneRef$c; - - return (_onAnimationDoneRef$c = onAnimationDoneRef.current) === null || _onAnimationDoneRef$c === void 0 ? void 0 : _onAnimationDoneRef$c.call(onAnimationDoneRef); - }); + })]).start(() => onAnimationDoneRef.current?.()); }, [animationDelay, animationDuration]); - return /*#__PURE__*/React.createElement(Animated.View, { + return /*#__PURE__*/_jsx(Animated.View, { pointerEvents: "none", style: [styles.animatedTouchFeedback, { opacity: appearDisappearAnimRef.current.interpolate({ diff --git a/lib/module/components/AnimatedTouchFeedback.js.map b/lib/module/components/AnimatedTouchFeedback.js.map index 853ac5ef..0f745d8a 100644 --- a/lib/module/components/AnimatedTouchFeedback.js.map +++ b/lib/module/components/AnimatedTouchFeedback.js.map @@ -1 +1 @@ -{"version":3,"sources":["AnimatedTouchFeedback.tsx"],"names":["React","useEffect","useRef","Animated","Easing","StyleSheet","AnimatedTouchFeedback","x","y","animationDelay","animationDuration","onAnimationDone","appearDisappearAnimRef","Value","onAnimationDoneRef","current","setValue","inDuration","outDuration","sequence","timing","delay","toValue","duration","easing","linear","useNativeDriver","out","ease","start","styles","animatedTouchFeedback","opacity","interpolate","inputRange","outputRange","left","top","transform","scale","create","backgroundColor","borderRadius","height","position","width"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,MAA3B,QAAyC,OAAzC;AACA,SAASC,QAAT,EAAmBC,MAAnB,EAA2BC,UAA3B,QAA6C,cAA7C;AAEA,OAAO,MAAMC,qBAAqB,GAAG,CAAC;AACpCC,EAAAA,CADoC;AAEpCC,EAAAA,CAFoC;AAGpCC,EAAAA,cAHoC;AAIpCC,EAAAA,iBAJoC;AAKpCC,EAAAA;AALoC,CAAD,KAY/B;AACJ,QAAMC,sBAAsB,GAAGV,MAAM,CAAiB,IAAIC,QAAQ,CAACU,KAAb,CAAmB,CAAnB,CAAjB,CAArC;AACA,QAAMC,kBAAkB,GAAGZ,MAAM,CAACS,eAAD,CAAjC;AACAG,EAAAA,kBAAkB,CAACC,OAAnB,GAA6BJ,eAA7B;AAEAV,EAAAA,SAAS,CAAC,MAAM;AACdW,IAAAA,sBAAsB,CAACG,OAAvB,CAA+BC,QAA/B,CAAwC,CAAxC;AACA,UAAMC,UAAU,GAAGP,iBAAiB,GAAG,GAAvC;AACA,UAAMQ,WAAW,GAAGR,iBAAiB,GAAGO,UAAxC;AACAd,IAAAA,QAAQ,CAACgB,QAAT,CAAkB,CAChBhB,QAAQ,CAACiB,MAAT,CAAgBR,sBAAsB,CAACG,OAAvC,EAAgD;AAC9CM,MAAAA,KAAK,EAAEZ,cAAc,IAAI,CADqB;AAE9Ca,MAAAA,OAAO,EAAE,CAFqC;AAG9CC,MAAAA,QAAQ,EA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AFT,IADF;AAwBD,CA9DM;AAgEP,MAAML,MAAM,GAAGzB,UAAU,CAACmC,MAAX,CAAkB;AAC/BT,EAAAA,qBAAqB,EAAE;AACrBU,IAAAA,eAAe,EAAE,WADI;AAErBC,IAAAA,YAAY,EAAE,EAFO;AAGrBC,IAAAA,MAAM,EAAE,EAHa;AAIrBC,IAAAA,QAAQ,EAAE,UAJW;AAKrBC,IAAAA,KAAK,EAAE;AALc;AADQ,CAAlB,CAAf","sourcesContent":["import React, { useEffect, useRef } from 'react';\nimport { Animated, Easing, StyleSheet } from 'react-native';\n\nexport const AnimatedTouchFeedback = ({\n x,\n y,\n animationDelay,\n animationDuration,\n onAnimationDone,\n}: {\n x: number;\n y: number;\n animationDuration: number;\n animationDelay?: number;\n onAnimationDone?: () => void;\n}) => {\n const appearDisappearAnimRef = useRef(new Animated.Value(0));\n const onAnimationDoneRef = useRef(onAnimationDone);\n onAnimationDoneRef.current = onAnimationDone;\n\n useEffect(() => {\n appearDisappearAnimRef.current.setValue(0);\n const inDuration = animationDuration * 0.8;\n const outDuration = animationDuration - inDuration;\n Animated.sequence([\n Animated.timing(appearDisappearAnimRef.current, {\n delay: animationDelay || 0,\n toValue: 1,\n duration: inDuration,\n easing: Easing.linear,\n useNativeDriver: true,\n }),\n Animated.timing(appearDisappearAnimRef.current, {\n toValue: 0,\n duration: outDuration,\n easing: Easing.out(Easing.ease),\n useNativeDriver: true,\n }),\n ]).start(() => onAnimationDoneRef.current?.());\n }, [animationDelay, animationDuration]);\n\n return (\n \n );\n};\n\nconst styles = StyleSheet.create({\n animatedTouchFeedback: {\n backgroundColor: 'lightgray',\n borderRadius: 40,\n height: 40,\n position: 'absolute',\n width: 40,\n },\n});\n"]} \ No newline at end of file +{"version":3,"names":["React","useEffect","useRef","Animated","Easing","StyleSheet","jsx","_jsx","AnimatedTouchFeedback","x","y","animationDelay","animationDuration","onAnimationDone","appearDisappearAnimRef","Value","onAnimationDoneRef","current","setValue","inDuration","outDuration","sequence","timing","delay","toValue","duration","easing","linear","useNativeDriver","out","ease","start","View","pointerEvents","style","styles","animatedTouchFeedback","opacity","interpolate","inputRange","outputRange","left","top","transform","scale","create","backgroundColor","borderRadius","height","position","width"],"sourceRoot":"../../../src","sources":["components/AnimatedTouchFeedback.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAChD,SAASC,QAAQ,EAAEC,MAAM,EAAEC,UAAU,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE5D,OAAO,MAAMC,qBAAqB,GAAGA,CAAC;EACpCC,CAAC;EACDC,CAAC;EACDC,cAAc;EACdC,iBAAiB;EACjBC;AAOF,CAAC,KAAK;EACJ,MAAMC,sBAAsB,GAAGZ,MAAM,CAAiB,IAAIC,QAAQ,CAACY,KAAK,CAAC,CAAC,CAAC,CAAC;EAC5E,MAAMC,kBAAkB,GAAGd,MAAM,CAACW,eAAe,CAAC;EAClDG,kBAAkB,CAACC,OAAO,GAAGJ,eAAe;EAE5CZ,SAAS,CAAC,MAAM;IACda,sBAAsB,CAACG,OAAO,CAACC,QAAQ,CAAC,CAAC,CAAC;IAC1C,MAAMC,UAAU,GAAGP,iBAAiB,GAAG,GAAG;IAC1C,MAAMQ,WAAW,GAAGR,iBAAiB,GAAGO,UAAU;IAClDhB,QAAQ,CAACkB,QAAQ,CAAC,CAChBlB,QAAQ,CAACmB,MAAM,CAACR,sBAAsB,CAACG,OAAO,EAAE;MAC9CM,KAAK,EAAEZ,cAAc,IAAI,CAAC;MAC1Ba,OAAO,EAAE,CAAC;MACVC,QAAQ,EAAEN,UAAU;MACpBO,MAAM,EAAEtB,MAAM,CAACuB,MAAM;MACrBC,eAAe,EAAE;IACnB,CAAC,CAAC,EACFzB,QAAQ,CAACmB,MAAM,CAACR,sBAAsB,CAACG,OAAO,EAAE;MAC9CO,OAAO,EAAE,CAAC;MACVC,QAAQ,EAAEL,WAAW;MACrBM,MAAM,EAAEtB,MAAM,CAACyB,GAAG,CAACzB,MAAM,CAAC0B,IAAI,CAAC;MAC/BF,eAAe,EAAE;IACnB,CAAC,CAAC,CACH,CAAC,CAACG,KAAK,CAAC,MAAMf,kBAAkB,CAACC,OAAO,GAAG,CAAC,CAAC;EAChD,CAAC,EAAE,CAACN,cAAc,EAAEC,iBAAiB,CAAC,CAAC;EAEvC,oBACEL,IAAA,CAACJ,QAAQ,CAAC6B,IAAI;IACZC,aAAa,EAAC,MAAM;IACpBC,KAAK,EAAE,CACLC,MAAM,CAACC,qBAAqB,EAC5B;MACEC,OAAO,EAAEvB,sBAAsB,CAACG,OAAO,CAACqB,WAAW,CAAC;QAClDC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QAClBC,WAAW,EAAE,CAAC,CAAC,EAAE,GAAG;MACtB,CAAC,CAAC;MACFC,IAAI,EAAEhC,CAAC,GAAG,EAAE;MACZiC,GAAG,EAAEhC,CAAC,GAAG,EAAE;MACXiC,SAAS,EAAE,CACT;QACEC,KAAK,EAAE9B,sBAAsB,CAACG,OAAO,CAACqB,WAAW,CAAC;UAChDC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;UAClBC,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC;QACtB,CAAC;MACH,CAAC;IAEL,CAAC;EACD,CACH,CAAC;AAEN,CAAC;AAED,MAAML,MAAM,GAAG9B,UAAU,CAACwC,MAAM,CAAC;EAC/BT,qBAAqB,EAAE;IACrBU,eAAe,EAAE,WAAW;IAC5BC,YAAY,EAAE,EAAE;IAChBC,MAAM,EAAE,EAAE;IACVC,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]} diff --git a/lib/module/components/StaticPin.js b/lib/module/components/StaticPin.js index e22eb94e..c34c1084 100644 --- a/lib/module/components/StaticPin.js +++ b/lib/module/components/StaticPin.js @@ -1,7 +1,8 @@ -function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +"use strict"; import React from 'react'; import { Animated, Image, PanResponder, StyleSheet, View } from 'react-native'; +import { jsx as _jsx } from "react/jsx-runtime"; export const StaticPin = ({ staticPinPosition, pinAnim, @@ -22,8 +23,9 @@ export const StaticPin = ({ const opacity = pinSize.width && pinSize.height ? 1 : 0; const panResponder = React.useRef(PanResponder.create({ onStartShouldSetPanResponder: () => { - tapTime.current = Date.now(); // We want to handle tap on this so set true + tapTime.current = Date.now(); + // We want to handle tap on this so set true return true; }, onPanResponderMove: (evt, gestureState) => { @@ -34,40 +36,42 @@ export const StaticPin = ({ onPanResponderRelease: (evt, gestureState) => { if (Math.abs(gestureState.dx) > 5 || Math.abs(gestureState.dy) > 5) return; const dt = Date.now() - tapTime.current; - if (onPress && dt < 500) { onPress(evt); } - if (onLongPress && dt > 500) { // RN long press is 500ms onLongPress(evt); } } })).current; - return /*#__PURE__*/React.createElement(Animated.View, _extends({ + return /*#__PURE__*/_jsx(Animated.View, { style: [{ left: staticPinPosition.x, top: staticPinPosition.y }, styles.pinWrapper, { opacity, transform - }] - }, pinProps), /*#__PURE__*/React.createElement(View, _extends({ - onLayout: ({ - nativeEvent: { - layout - } - }) => { - setPinSize(layout); - } - }, panResponder.panHandlers), staticPinIcon || - /*#__PURE__*/ - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - React.createElement(Image, { - source: require('../assets/pin.png'), - style: styles.pin - }))); + }], + ...pinProps, + children: /*#__PURE__*/_jsx(View, { + onLayout: ({ + nativeEvent: { + layout + } + }) => { + setPinSize(layout); + }, + ...panResponder.panHandlers, + children: staticPinIcon || + /*#__PURE__*/ + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + _jsx(Image, { + source: require('../assets/pin.png'), + style: styles.pin + }) + }) + }); }; const styles = StyleSheet.create({ pin: { diff --git a/lib/module/components/StaticPin.js.map b/lib/module/components/StaticPin.js.map index cc269ddc..06eaba8a 100644 --- a/lib/module/components/StaticPin.js.map +++ b/lib/module/components/StaticPin.js.map @@ -1 +1 @@ -{"version":3,"sources":["StaticPin.tsx"],"names":["React","Animated","Image","PanResponder","StyleSheet","View","StaticPin","staticPinPosition","pinAnim","staticPinIcon","pinSize","onParentMove","onPress","onLongPress","setPinSize","pinProps","tapTime","useRef","transform","translateY","height","translateX","width","getTranslateTransform","opacity","panResponder","create","onStartShouldSetPanResponder","current","Date","now","onPanResponderMove","evt","gestureState","Math","abs","dx","dy","onPanResponderRelease","dt","left","x","top","y","styles","pinWrapper","nativeEvent","layout","panHandlers","require","pin","position"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SACEC,QADF,EAGEC,KAHF,EAIEC,YAJF,EAMEC,UANF,EAOEC,IAPF,QASO,cATP;AAYA,OAAO,MAAMC,SAAS,GAAG,CAAC;AACxBC,EAAAA,iBADwB;AAExBC,EAAAA,OAFwB;AAGxBC,EAAAA,aAHwB;AAIxBC,EAAAA,OAJwB;AAKxBC,EAAAA,YALwB;AAMxBC,EAAAA,OANwB;AAOxBC,EAAAA,WAPwB;AAQxBC,EAAAA,UARwB;AASxBC,EAAAA,QAAQ,GAAG;AATa,CAAD,KAwBnB;AACJ,QAAMC,OAAO,GAAGhB,KAAK,CAACiB,MAAN,CAAa,CAAb,CAAhB;AACA,QAAMC,SAAS,GAAG,CAChB;AAAEC,IAAAA,UAAU,EAAE,CAACT,OAAO,CAACU;AAAvB,GADgB,EAEhB;AAAEC,IAAAA,UAAU,EAAE,CAACX,OAAO,CAACY,KAAT,GAAiB;AAA/B,GAFgB,EAGhB,GAAGd,OAAO,CAACe,qBAAR,EAHa,CAAlB;AAMA,QAAMC,OAAO,GAAGd,OAAO,CAACY,KAAR,IAAiBZ,OAAO,CAACU,MAAzB,GAAkC,CAAlC,GAAsC,CAAtD;AAEA,QAAMK,YAAY,GAAGzB,KAAK,CAACiB,MAAN,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AWE,oBAAC,IAAD;AACE,IAAA,QAAQ,EAAE,CAAC;AAAE+B,MAAAA,WAAW,EAAE;AAAEC,QAAAA;AAAF;AAAf,KAAD,KAAiC;AACzCjC,MAAAA,UAAU,CAACiC,MAAD,CAAV;AACD;AAHH,KAIMtB,YAAY,CAACuB,WAJnB,GAMGvC,aAAa;AAAA;AACZ;AACA,sBAAC,KAAD;AAAO,IAAA,MAAM,EAAEwC,OAAO,CAAC,mBAAD,CAAtB;AAA6C,IAAA,KAAK,EAAEL,MAAM,CAACM;AAA3D,IARJ,CAXF,CADF;AAyBD,CAxFM;AA0FP,MAAMN,MAAM,GAAGxC,UAAU,CAACsB,MAAX,CAAkB;AAC/BwB,EAAAA,GAAG,EAAE;AACH9B,IAAAA,MAAM,EAAE,EADL;AAEHE,IAAAA,KAAK,EAAE;AAFJ,GAD0B;AAK/BuB,EAAAA,UAAU,EAAE;AACVM,IAAAA,QAAQ,EAAE;AADA;AALmB,CAAlB,CAAf","sourcesContent":["import React from 'react';\nimport {\n Animated,\n GestureResponderEvent,\n Image,\n PanResponder,\n PanResponderGestureState,\n StyleSheet,\n View,\n ViewProps,\n} from 'react-native';\nimport { Size2D } from 'src/typings';\n\nexport const StaticPin = ({\n staticPinPosition,\n pinAnim,\n staticPinIcon,\n pinSize,\n onParentMove,\n onPress,\n onLongPress,\n setPinSize,\n pinProps = {},\n}: {\n staticPinPosition: { x: number; y: number };\n pinAnim: Animated.ValueXY;\n staticPinIcon: React.ReactNode;\n pinSize: Size2D;\n /** Internal handler for passing move event to parent */\n onParentMove: (\n evt: GestureResponderEvent,\n gestureState: PanResponderGestureState\n ) => boolean | undefined;\n onPress?: (evt: GestureResponderEvent) => void;\n onLongPress?: (evt: GestureResponderEvent) => void;\n setPinSize: (size: Size2D) => void;\n pinProps?: ViewProps;\n}) => {\n const tapTime = React.useRef(0);\n const transform = [\n { translateY: -pinSize.height },\n { translateX: -pinSize.width / 2 },\n ...pinAnim.getTranslateTransform(),\n ];\n\n const opacity = pinSize.width && pinSize.height ? 1 : 0;\n\n const panResponder = React.useRef(\n PanResponder.create({\n onStartShouldSetPanResponder: () => {\n tapTime.current = Date.now();\n\n // We want to handle tap on this so set true\n return true;\n },\n onPanResponderMove: (evt, gestureState) => {\n // However if the user moves finger we want to pass this evt to parent\n // to handle panning (tap not recognized)\n if (Math.abs(gestureState.dx) > 5 && Math.abs(gestureState.dy) > 5)\n onParentMove(evt, gestureState);\n },\n onPanResponderRelease: (evt, gestureState) => {\n if (Math.abs(gestureState.dx) > 5 || Math.abs(gestureState.dy) > 5)\n return;\n const dt = Date.now() - tapTime.current;\n if (onPress && dt < 500) {\n onPress(evt);\n }\n if (onLongPress && dt > 500) {\n // RN long press is 500ms\n onLongPress(evt);\n }\n },\n })\n ).current;\n\n return (\n \n {\n setPinSize(layout);\n }}\n {...panResponder.panHandlers}\n >\n {staticPinIcon || (\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n \n )}\n \n \n );\n};\n\nconst styles = StyleSheet.create({\n pin: {\n height: 64,\n width: 48,\n },\n pinWrapper: {\n position: 'absolute',\n },\n});\n"]} \ No newline at end of file +{"version":3,"names":["React","Animated","Image","PanResponder","StyleSheet","View","jsx","_jsx","StaticPin","staticPinPosition","pinAnim","staticPinIcon","pinSize","onParentMove","onPress","onLongPress","setPinSize","pinProps","tapTime","useRef","transform","translateY","height","translateX","width","getTranslateTransform","opacity","panResponder","create","onStartShouldSetPanResponder","current","Date","now","onPanResponderMove","evt","gestureState","Math","abs","dx","dy","onPanResponderRelease","dt","style","left","x","top","y","styles","pinWrapper","children","onLayout","nativeEvent","layout","panHandlers","source","require","pin","position"],"sourceRoot":"../../../src","sources":["components/StaticPin.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,QAAQ,EAERC,KAAK,EACLC,YAAY,EAEZC,UAAU,EACVC,IAAI,QAEC,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGtB,OAAO,MAAMC,SA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AACC,GAAG,CAAC,CAAC,GAAGd,OAAO,CAACY,OAAO;MACvC,IAAIhB,OAAO,IAAI2B,EAAE,GAAG,GAAG,EAAE;QACvB3B,OAAO,CAACoB,GAAG,CAAC;MACd;MACA,IAAInB,WAAW,IAAI0B,EAAE,GAAG,GAAG,EAAE;QAC3B;QACA1B,WAAW,CAACmB,GAAG,CAAC;MAClB;IACF;EACF,CAAC,CACH,CAAC,CAACJ,OAAO;EAET,oBACEvB,IAAA,CAACN,QAAQ,CAACI,IAAI;IACZqC,KAAK,EAAE,CACL;MACEC,IAAI,EAAElC,iBAAiB,CAACmC,CAAC;MACzBC,GAAG,EAAEpC,iBAAiB,CAACqC;IACzB,CAAC,EACDC,MAAM,CAACC,UAAU,EACjB;MAAEtB,OAAO;MAAEN;IAAU,CAAC,CACtB;IAAA,GACEH,QAAQ;IAAAgC,QAAA,eAEZ1C,IAAA,CAACF,IAAI;MACH6C,QAAQ,EAAEA,CAAC;QAAEC,WAAW,EAAE;UAAEC;QAAO;MAAE,CAAC,KAAK;QACzCpC,UAAU,CAACoC,MAAM,CAAC;MACpB,CAAE;MAAA,GACEzB,YAAY,CAAC0B,WAAW;MAAAJ,QAAA,EAE3BtC,aAAa;MAAA;MACZ;MACAJ,IAAA,CAACL,KAAK;QAACoD,MAAM,EAAEC,OAAO,CAAC,mBAAmB,CAAE;QAACb,KAAK,EAAEK,MAAM,CAACS;MAAI,CAAE;IAClE,CACG;EAAC,CACM,CAAC;AAEpB,CAAC;AAED,MAAMT,MAAM,GAAG3C,UAAU,CAACwB,MAAM,CAAC;EAC/B4B,GAAG,EAAE;IACHlC,MAAM,EAAE,EAAE;IACVE,KAAK,EAAE;EACT,CAAC;EACDwB,UAAU,EAAE;IACVS,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]} diff --git a/lib/module/components/index.js b/lib/module/components/index.js index 8d08b102..040fe359 100644 --- a/lib/module/components/index.js +++ b/lib/module/components/index.js @@ -1,2 +1,4 @@ +"use strict"; + export { AnimatedTouchFeedback } from './AnimatedTouchFeedback'; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/module/components/index.js.map b/lib/module/components/index.js.map index f0db2229..16f3c604 100644 --- a/lib/module/components/index.js.map +++ b/lib/module/components/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["index.tsx"],"names":["AnimatedTouchFeedback"],"mappings":"AAAA,SAASA,qBAAT,QAAsC,yBAAtC","sourcesContent":["export { AnimatedTouchFeedback } from './AnimatedTouchFeedback';\n"]} \ No newline at end of file +{"version":3,"names":["AnimatedTouchFeedback"],"sourceRoot":"../../../src","sources":["components/index.tsx"],"mappings":";;AAAA,SAASA,qBAAqB,QAAQ,yBAAyB","ignoreList":[]} diff --git a/lib/module/debugHelper/index.js b/lib/module/debugHelper/index.js index 8f4ba2e5..f689e53a 100644 --- a/lib/module/debugHelper/index.js +++ b/lib/module/debugHelper/index.js @@ -1,5 +1,8 @@ +"use strict"; + import React from 'react'; import { StyleSheet, View } from 'react-native'; +import { jsx as _jsx } from "react/jsx-runtime"; export const DebugTouchPoint = ({ diameter = 20, x = 0, @@ -7,7 +10,7 @@ export const DebugTouchPoint = ({ color = 'yellow' }) => { const radius = diameter / 2; - return /*#__PURE__*/React.createElement(View, { + return /*#__PURE__*/_jsx(View, { style: [styles.debugPoint, { width: diameter, height: diameter, @@ -26,7 +29,7 @@ export const DebugRect = ({ color = 'yellow' }) => { const width = 5; - return /*#__PURE__*/React.createElement(View, { + return /*#__PURE__*/_jsx(View, { style: [styles.debugRect, { width, height, diff --git a/lib/module/debugHelper/index.js.map b/lib/module/debugHelper/index.js.map index 4228b217..c87cf2bc 100644 --- a/lib/module/debugHelper/index.js.map +++ b/lib/module/debugHelper/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["index.tsx"],"names":["React","StyleSheet","View","DebugTouchPoint","diameter","x","y","color","radius","styles","debugPoint","width","height","borderRadius","backgroundColor","left","top","DebugRect","debugRect","create","opacity","position"],"mappings":"AAAA,O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CAAkB;AAC/BT,EAAAA,UAAU,EAAE;AACVU,IAAAA,OAAO,EAAE,GADC;AAEVC,IAAAA,QAAQ,EAAE;AAFA,GADmB;AAK/BH,EAAAA,SAAS,EAAE;AACTE,IAAAA,OAAO,EAAE,GADA;AAETC,IAAAA,QAAQ,EAAE;AAFD;AALoB,CAAlB,CAAf","sourcesContent":["import React from 'react';\nimport { StyleSheet, View } from 'react-native';\n\nexport const DebugTouchPoint = ({\n diameter = 20,\n x = 0,\n y = 0,\n color = 'yellow',\n}) => {\n const radius = diameter / 2;\n return (\n \n );\n};\nexport const DebugRect = ({\n height,\n x = 0,\n y = 0,\n color = 'yellow',\n}: {\n height: number;\n x: number;\n y: number;\n color: string;\n}) => {\n const width = 5;\n return (\n \n );\n};\n\nconst styles = StyleSheet.create({\n debugPoint: {\n opacity: 0.7,\n position: 'absolute',\n },\n debugRect: {\n opacity: 0.5,\n position: 'absolute',\n },\n});\n"]} \ No newline at end of file +{"version":3,"names":["React","StyleSheet","View","jsx","_jsx","DebugTouchPoint","diameter","x","y","color","radius","style","styles","debugPoint","width","height","borderRadius","backgroundColor","left","top","pointerEvents","DebugRect","debugRect","create","opacity","position"],"sourceRoot":"../../../src","sources":["debugHelper/index.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEhD,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAC9BC,QAAQ,GAAG,EAAE;EACbC,CAAC,GAAG,CAAC;EACLC,CAAC,GAAG,CAAC;EACLC,KAAK,GAAG;AACV,CAAC,KAAK;EACJ,MAAMC,MAAM,GAAGJ,QAAQ,GAAG,CAAC;EAC3B,oBACEF,IAAA,CAACF,IAAI;IACHS,KAAK,EAAE,CACLC,MAAM,CAACC,UAAU,EACjB;MACEC,KAAK,EAAER,QAAQ;MACfS,MAAM,EAAET,QAAQ;MAChBU,YAAY,EAAEV,QAAQ;MACtBW,eAAe,EAAER,KAAK;MACtBS,IAAI,EAAEX,CAAC,GAAGG,MAAM;MAChBS,GAAG,EAAEX,CAAC,GAAGE;IACX,CAAC,CACD;IACFU,aAAa,EAAC;EAAM,CACrB,CAAC;AAEN,CAAC;AACD,OAAO,MAAMC,SAAS,GAAGA,CAAC;EACxBN,MAAM;EACNR,CAAC,GAAG,CAAC;EACLC,CAAC,GAAG,CAAC;EACLC,KAAK,GAAG;AAMV,CAAC,KAAK;EACJ,MAAMK,KAAK,GAAG,CAAC;EACf,oBACEV,IAAA,CAACF,IAAI;IACHS,KAAK,EAAE,CACLC,MAAM,CAACU,SAAS,EAChB;MACER,KAAK;MACLC,MAAM;MACNE,eAAe,EAAER,KAAK;MACtBS,IAAI,EAAEX,CAAC,GAAGO,KAAK,GAAG,CAAC;MACnBK,GAAG,EAAEX;IACP,CAAC,CACD;IACFY,aAAa,EAAC;EAAM,CACrB,CAAC;AAEN,CAAC;AAED,MAAMR,MAAM,GAAGX,UAAU,CAACsB,MAAM,CAAC;EAC/BV,UAAU,EAAE;IACVW,OAAO,EAAE,GAAG;IACZC,QAAQ,EAAE;EACZ,CAAC;EACDH,SAAS,EAAE;IACTE,OAAO,EAAE,GAAG;IACZC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]} diff --git a/lib/module/helper/applyPanBoundariesToOffset.js b/lib/module/helper/applyPanBoundariesToOffset.js index 4c90ed03..35276c0c 100644 --- a/lib/module/helper/applyPanBoundariesToOffset.js +++ b/lib/module/helper/applyPanBoundariesToOffset.js @@ -1,3 +1,5 @@ +"use strict"; + /** * Takes a single offset value and calculates the correct offset value * to make sure it's within the pan boundaries @@ -17,38 +19,41 @@ export function applyPanBoundariesToOffset(offsetScaled, containerSize, contentS const contentStartBorderUnscaled = containerSize / 2 + offsetUnscaled - contentSizeUnscaled / 2; const contentEndBorderUnscaled = contentStartBorderUnscaled + contentSizeUnscaled; const containerStartBorder = 0; - const containerEndBorder = containerStartBorder + containerSize; // do not let boundary padding be greater than the container size or less than 0 + const containerEndBorder = containerStartBorder + containerSize; + // do not let boundary padding be greater than the container size or less than 0 if (!boundaryPadding || boundaryPadding < 0) boundaryPadding = 0; - if (boundaryPadding > containerSize) boundaryPadding = containerSize; // Calculate container's measurements with boundary padding applied. + if (boundaryPadding > containerSize) boundaryPadding = containerSize; + + // Calculate container's measurements with boundary padding applied. // this should shrink the container's size by the amount of the boundary padding, // so that the content inside can be panned a bit further away from the original container's boundaries. - const paddedContainerSize = containerSize - boundaryPadding * 2; const paddedContainerStartBorder = containerStartBorder + boundaryPadding; - const paddedContainerEndBorder = containerEndBorder - boundaryPadding; // if content is smaller than the padded container, - // don't let the content move + const paddedContainerEndBorder = containerEndBorder - boundaryPadding; + // if content is smaller than the padded container, + // don't let the content move if (contentSizeUnscaled < paddedContainerSize) { return 0; - } // if content is larger than the padded container, + } + + // if content is larger than the padded container, // don't let the padded container go outside of content + // maximum distance the content's center can move from its original position. // assuming the content original center is the container's center. - - const contentMaxOffsetScaled = (paddedContainerSize / 2 - contentSizeUnscaled / 2) / scale; - - if ( // content reaching the end boundary + if ( + // content reaching the end boundary contentEndBorderUnscaled < paddedContainerEndBorder) { return contentMaxOffsetScaled; } - - if ( // content reaching the start boundary + if ( + // content reaching the start boundary contentStartBorderUnscaled > paddedContainerStartBorder) { return -contentMaxOffsetScaled; } - return offsetScaled; } //# sourceMappingURL=applyPanBoundariesToOffset.js.map \ No newline at end of file diff --git a/lib/module/helper/applyPanBoundariesToOffset.js.map b/lib/module/helper/applyPanBoundariesToOffset.js.map index 56c30584..a7debcbf 100644 --- a/lib/module/helper/applyPanBoundariesToOffset.js.map +++ b/lib/module/helper/applyPanBoundariesToOffset.js.map @@ -1 +1 @@ -{"version":3,"sources":["applyPanBoundariesToOffset.ts"],"names":["applyPanBoundariesToOffset","offsetScaled","containerSize","contentSize","scale","boundaryPadding","contentSizeUnscaled","offsetUnscaled","contentStartBorderUnscaled","contentEndBorderUnscaled","containerStartBorder","containerEndBorder","paddedContainerSize","paddedContainerStartBorder","paddedContainerEndBorder","contentMaxOffsetScaled"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,0BAAT,CACLC,YADK,EAELC,aAFK,EAGLC,WAHK,EAILC,KAJK,EAKLC,eALK,EAML;AACA,QAAMC,mBAAmB,GAAGH,WAAW,GAAGC,KAA1C;AACA,QAAMG,cAAc,GAAGN,YAAY,GAAGG,KAAtC;AAEA,QAAMI,0BAA0B,GAC9BN,aAAa,GAAG,CAAhB,GAAoBK,cAApB,GAAqCD,mBAAmB,GAAG,CAD7D;AAEA,QAAMG,wBAAwB,GAC5BD,0BAA0B,GAAGF,mBAD/B;AAGA,QAAMI,oBAAoB,GAAG,CAA7B;AACA,QAAMC,kBAAkB,GAAGD,oBAAoB,GAAGR,aAAlD,CAVA,CAYA;;AACA,MAAI,CAACG,eAAD,IAAoBA,eAAe,GAAG,CAA1C,EAA6CA,eAAe,GAAG,CAAlB;AAC7C,MAAIA,eAAe,GAAGH,aAAtB,EAAqCG,eAAe,GAAGH,aAAlB,CAdrC,CAgBA;AACA;AACA;;AACA,QAAMU,mBAAmB,GAAGV,aAAa,GAAGG,eAAe,GAAG,CAA9D;AACA,QAAMQ,0BAA0B,GAAGH,oBAAoB,GAAGL,eAA1D;AACA,QAAMS,wBAAwB,GAAGH,kBAAkB,GAAGN,eAAtD,CArBA,CAuBA;AACA;;AACA,MAAIC,mBAAmB,GAAGM,mBAA1B,EAA+C;AAC7C,WAAO,CAAP;AACD,GA3BD,CA6BA;AACA;AAEA;AACA;;;AACA,QAAMG,sBAAsB,GAC1B,CAACH,mBAAmB,GAAG,CAAtB,GAA0BN,mBAAmB,GAAG,CAAjD,IAAsDF,KADxD;;AAGA,OACE;AACAK,EAAAA,wBAAwB,GAAGK,wBAF7B,EAGE;AACA,WAAOC,sBAAP;AACD;;AACD,OACE;AACAP,EAAAA,0BAA0B,GAAGK,0BAF/B,EAGE;AACA,WAAO,CAACE,sBAAR;AACD;;AAED,SAAOd,YAAP;AACD","sourcesContent":["/**\n * Takes a single offset value and calculates the correct offset value\n * to make sure it's within the pan boundaries\n *\n *\n * @param offsetScaled\n * @param containerSize\n * @param contentSize\n * @param scale\n * @param boundaryPadding - see README\n *\n * @returns {number}\n */\nexport function applyPanBoundariesToOffset(\n offsetScaled: number,\n containerSize: number,\n contentSize: number,\n scale: number,\n boundaryPadding: number\n) {\n const contentSizeUnscaled = contentSize * scale;\n const offsetUnscaled = offsetScaled * scale;\n\n const contentStartBorderUnscaled =\n containerSize / 2 + offsetUnscaled - contentSizeUnscaled / 2;\n const contentEndBorderUnscaled =\n contentStartBorderUnscaled + contentSizeUnscaled;\n\n const containerStartBorder = 0;\n const containerEndBorder = containerStartBorder + containerSize;\n\n // do not let boundary padding be greater than the container size or less than 0\n if (!boundaryPadding || boundaryPadding < 0) boundaryPadding = 0;\n if (boundaryPadding > containerSize) boundaryPadding = containerSize;\n\n // Calculate container's measurements with boundary padding applied.\n // this should shrink the container's size by the amount of the boundary padding,\n // so that the content inside can be panned a bit further away from the original container's boundaries.\n const paddedContainerSize = containerSize - boundaryPadding * 2;\n const paddedContainerStartBorder = containerStartBorder + boundaryPadding;\n const paddedContainerEndBorder = containerEndBorder - boundaryPadding;\n\n // if content is smaller than the padded container,\n // don't let the content move\n if (contentSizeUnscaled < paddedContainerSize) {\n return 0;\n }\n\n // if content is larger than the padded container,\n // don't let the padded container go outside of content\n\n // maximum distance the content's center can move from its original position.\n // assuming the content original center is the container's center.\n const contentMaxOffsetScaled =\n (paddedContainerSize / 2 - contentSizeUnscaled / 2) / scale;\n\n if (\n // content reaching the end boundary\n contentEndBorderUnscaled < paddedContainerEndBorder\n ) {\n return contentMaxOffsetScaled;\n }\n if (\n // content reaching the start boundary\n contentStartBorderUnscaled > paddedContainerStartBorder\n ) {\n return -contentMaxOffsetScaled;\n }\n\n return offsetScaled;\n}\n"]} \ No newline at end of file +{"version":3,"names":["applyPanBoundariesToOffset","offsetScaled","containerSize","contentSize","scale","boundaryPadding","contentSizeUnscaled","offsetUnscaled","contentStartBorderUnscaled","contentEndBorderUnscaled","containerStartBorder","containerEndBorder","paddedContainerSize","paddedContainerStartBorder","paddedContainerEndBorder","contentMaxOffsetScaled"],"sourceRoot":"../../../src","sources":["helper/applyPanBoundariesToOffset.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,0BAA0BA,CACxCC,YAAoB,EACpBC,aAAqB,EACrBC,WAAmB,EACnBC,KAAa,EACbC,eAAuB,EACvB;EACA,MAAMC,mBAAmB,GAAGH,WAAW,GAAGC,KAAK;EAC/C,MAAMG,cAAc,GAAGN,YAAY,GAAGG,KAAK;EAE3C,MAAMI,0BAA0B,GAC9BN,aAAa,GAAG,CAAC,GAAGK,cAAc,GAAGD,mBAAmB,GAAG,CAAC;EAC9D,MAAMG,wBAAwB,GAC5BD,0BAA0B,GAAGF,mBAAmB;EAElD,MAAMI,oBAAoB,GAAG,CAAC;EAC9B,MAAMC,kBAAkB,GAAGD,oBAAoB,GAAGR,aAAa;;EAE/D;EACA,IAAI,CAACG,eAAe,IAAIA,eAAe,GAAG,CAAC,EAAEA,eAAe,GAAG,CAAC;EAChE,IAAIA,eAAe,GAAGH,aAAa,EAAEG,eAAe,GAAGH,aAAa;;EAEpE;EACA;EACA;EACA,MAAMU,mBAAmB,GAAGV,aAAa,GAAGG,eAAe,GAAG,CAAC;EAC/D,MAAMQ,0BAA0B,GAAGH,oBAAoB,GAAGL,eAAe;EACzE,MAAMS,wBAAwB,GAAGH,kBAAkB,GAAGN,eAAe;;EAErE;EACA;EACA,IAAIC,mBAAmB,GAAGM,mBAAmB,EAAE;IAC7C,OAAO,CAAC;EACV;;EAEA;EACA;;EAEA;EACA;EACA,MAAMG,sBAAsB,GAC1B,CAACH,mBAAmB,GAAG,CAAC,GAAGN,mBAAmB,GAAG,CAAC,IAAIF,KAAK;EAE7D;EACE;EACAK,wBAAwB,GAAGK,wBAAwB,EACnD;IACA,OAAOC,sBAAsB;EAC/B;EACA;EACE;EACAP,0BAA0B,GAAGK,0BAA0B,EACvD;IACA,OAAO,CAACE,sBAAsB;EAChC;EAEA,OAAOd,YAAY;AACrB","ignoreList":[]} diff --git a/lib/module/helper/calcNewScaledOffsetForZoomCentering.js b/lib/module/helper/calcNewScaledOffsetForZoomCentering.js index 398a3144..7ac687ea 100644 --- a/lib/module/helper/calcNewScaledOffsetForZoomCentering.js +++ b/lib/module/helper/calcNewScaledOffsetForZoomCentering.js @@ -1,3 +1,5 @@ +"use strict"; + /** * Calculates the new offset for the zoomSubject to ensure zoom center position is retained after zooming. * Parameters should correspond to whether we need the offset for the X or Y axis @@ -50,8 +52,9 @@ */ export function calcNewScaledOffsetForZoomCentering(oldOffsetXOrYScaled, zoomSubjectOriginalWidthOrHeight, oldScale, newScale, zoomCenterXOrY) { const oldOffSetUnscaled = oldOffsetXOrYScaled * oldScale; - const growthRate = newScale / oldScale; // these act like namespaces just for the sake of readability + const growthRate = newScale / oldScale; + // these act like namespaces just for the sake of readability const zoomSubjectOriginalCenter = {}; const zoomSubjectCurrentCenter = {}; const zoomSubjectNewCenter = {}; diff --git a/lib/module/helper/calcNewScaledOffsetForZoomCentering.js.map b/lib/module/helper/calcNewScaledOffsetForZoomCentering.js.map index de88ce6f..a84ce62f 100644 --- a/lib/module/helper/calcNewScaledOffsetForZoomCentering.js.map +++ b/lib/module/helper/calcNewScaledOffsetForZoomCentering.js.map @@ -1 +1 @@ -{"version":3,"sources":["calcNewScaledOffsetForZoomCentering.ts"],"names":["calcNewScaledOffsetForZoomCentering","oldOffsetXOrYScaled","zoomSubjectOriginalWidthOrHeight","oldScale","newScale","zoomCenterXOrY","oldOffSetUnscaled","growthRate","zoomSubjectOriginalCenter","zoomSubjectCurrentCenter","zoomSubjectNewCenter","xOrY","distanceToZoomCenter","newOffsetUnscaled"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,mCAAT,CACLC,mBADK,EAELC,gCAFK,EAGLC,QAHK,EAILC,QAJK,EAKLC,cALK,EAML;AACA,QAAMC,iBAAiB,GAAGL,mBAAmB,GAAGE,QAAhD;AACA,QAAMI,UAAU,GAAGH,QAAQ,GAAGD,QAA9B,CAFA,CAIA;;AACA,QAAMK,yBAAyB,GAAG,EAAlC;AACA,QAAMC,wBAAwB,GAAG,EAAjC;AACA,QAAMC,oBAAoB,GAAG,EAA7B;AAEAF,EAAAA,yBAAyB,CAACG,IAA1B,GAAiCT,gCAAgC,GAAG,CAApE;AACAO,EAAAA,wBAAwB,CAACE,IAAzB,GACEH,yBAAyB,CAACG,IAA1B,GAAiCL,iBADnC;AAEAG,EAAAA,wBAAwB,CAACG,oBAAzB,GACEH,wBAAwB,CAACE,IAAzB,GAAgCN,cADlC;AAGAK,EAAAA,oBAAoB,CAACE,oBAArB,GACEH,wBAAwB,CAACG,oBAAzB,GAAgDL,UADlD;AAEAG,EAAAA,oBAAoB,CAACC,IAArB,GACED,oBAAoB,CAACE,oBAArB,GAA4CP,cAD9C;AAGA,QAAMQ,iBAAiB,GACrBH,oBAAoB,CAACC,IAArB,GAA4BH,yBAAyB,CAACG,IADxD;AAGA,SAAOE,iBAAiB,GAAGT,QAA3B;AACD","sourcesContent":["/**\n * Calculates the new offset for the zoomSubject to ensure zoom center position is retained after zooming.\n * Parameters should correspond to whether we need the offset for the X or Y axis\n *\n * ## Terms Used:\n *\n * - Zoom Subject: the view that's being zoomed and panned\n * - Zoom Center: the point whose relative position to the window is retained\n * - Unscaled: a measurement in pixels denoting the true size as observed by the users' eyes\n * - Scaled: a measurement in pixels scaled to the \"scale transformation\" of the zoom subject to match with its true size.\n * *For example:*\n * If the scale on the zoom subject is 0.5,\n * then to draw an actual 4px line on the zoom subject, we need to scale it to 4px / 0.5 = 8px\n * 8px is the scaled measurement\n *\n * ## Overall idea of this algorithm:\n *\n * When users perform zooming by pinching the screen,\n * we need to shift the zoom subject so that the position of the zoom center is always the same.\n * The offset amount to shift the layer is the returned value.\n *\n *\n * ## How we achieve our goal:\n *\n * To retain, the zoom center position, whenever a zoom action is performed,\n * we just need to make sure the distances from all the points in the zoom subject\n * to the zoom center increases or decreases by the growth rate of the scale.\n *\n * ```\n * newDistanceAnyPointToZoomCenter = oldDistanceAnyPointToZoomCenter * (newScale/oldScale)\n * ```\n *\n * We can't calculate that for all the points because there are unlimited points on a plain.\n * However, due to the way `transform` works in RN, every point is scaled from the zoom subject center.\n * Therefore, it's sufficient to base our calculation on the distance from the zoom subject center to the zoom center.\n *\n * ```\n * newDistanceZoomSubjectCenterToZoomCenter = oldDistanceZoomSubjectCenterToZoomCenter * (newScale/oldScale)\n * ```\n *\n * Once we have `newDistanceZoomSubjectCenterToZoomCenter`,\n * we can easily calculate the position of the new center, which leads us to the offset amount.\n * Refer to the code for more details\n *\n * @param oldOffsetXOrYScaled\n * @param zoomSubjectOriginalWidthOrHeight\n * @param oldScale\n * @param newScale\n * @param zoomCenterXOrY\n */\nexport function calcNewScaledOffsetForZoomCentering(\n oldOffsetXOrYScaled: number,\n zoomSubjectOriginalWidthOrHeight: number,\n oldScale: number,\n newScale: number,\n zoomCenterXOrY: number\n) {\n const oldOffSetUnscaled = oldOffsetXOrYScaled * oldScale;\n const growthRate = newScale / oldScale;\n\n // these act like namespaces just for the sake of readability\n const zoomSubjectOriginalCenter = {} as Center;\n const zoomSubjectCurrentCenter = {} as Center;\n const zoomSubjectNewCenter = {} as Center;\n\n zoomSubjectOriginalCenter.xOrY = zoomSubjectOriginalWidthOrHeight / 2;\n zoomSubjectCurrentCenter.xOrY =\n zoomSubjectOriginalCenter.xOrY + oldOffSetUnscaled;\n zoomSubjectCurrentCenter.distanceToZoomCenter =\n zoomSubjectCurrentCenter.xOrY - zoomCenterXOrY;\n\n zoomSubjectNewCenter.distanceToZoomCenter =\n zoomSubjectCurrentCenter.distanceToZoomCenter * growthRate;\n zoomSubjectNewCenter.xOrY =\n zoomSubjectNewCenter.distanceToZoomCenter + zoomCenterXOrY;\n\n const newOffsetUnscaled =\n zoomSubjectNewCenter.xOrY - zoomSubjectOriginalCenter.xOrY;\n\n return newOffsetUnscaled / newScale;\n}\n\ninterface Center {\n xOrY: number;\n distanceToZoomCenter: number;\n}\n"]} \ No newline at end of file +{"version":3,"names":["calcNewScaledOffsetForZoomCentering","oldOffsetXOrYScaled","zoomSubjectOriginalWidthOrHeight","oldScale","newScale","zoomCenterXOrY","oldOffSetUnscaled","growthRate","zoomSubjectOriginalCenter","zoomSubjectCurrentCenter","zoomSubjectNewCenter","xOrY","distanceToZoomCenter","newOffsetUnscaled"],"sourceRoot":"../../../src","sources":["helper/calcNewScaledOffsetForZoomCentering.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,mCAAmCA,CACjDC,mBAA2B,EAC3BC,gCAAwC,EACxCC,QAAgB,EAChBC,QAAgB,EAChBC,cAAsB,EACtB;EACA,MAAMC,iBAAiB,GAAGL,mBAAmB,GAAGE,QAAQ;EACxD,MAAMI,UAAU,GAAGH,QAAQ,GAAGD,QAAQ;;EAEtC;EACA,MAAMK,yBAAyB,GAAG,CAAC,CAAW;EAC9C,MAAMC,wBAAwB,GAAG,CAAC,CAAW;EAC7C,MAAMC,oBAAoB,GAAG,CAAC,CAAW;EAEzCF,yBAAyB,CAACG,IAAI,GAAGT,gCAAgC,GAAG,CAAC;EACrEO,wBAAwB,CAACE,IAAI,GAC3BH,yBAAyB,CAACG,IAAI,GAAGL,iBAAiB;EACpDG,wBAAwB,CAACG,oBAAoB,GAC3CH,wBAAwB,CAACE,IAAI,GAAGN,cAAc;EAEhDK,oBAAoB,CAACE,oBAAoB,GACvCH,wBAAwB,CAACG,oBAAoB,GAAGL,UAAU;EAC5DG,oBAAoB,CAACC,IAAI,GACvBD,oBAAoB,CAACE,oBAAoB,GAAGP,cAAc;EAE5D,MAAMQ,iBAAiB,GACrBH,oBAAoB,CAACC,IAAI,GAAGH,yBAAyB,CAACG,IAAI;EAE5D,OAAOE,iBAAiB,GAAGT,QAAQ;AACrC","ignoreList":[]} diff --git a/lib/module/helper/coordinateConversion.js b/lib/module/helper/coordinateConversion.js index 3a0e7f47..97c2442c 100644 --- a/lib/module/helper/coordinateConversion.js +++ b/lib/module/helper/coordinateConversion.js @@ -1,3 +1,5 @@ +"use strict"; + export const defaultTransformSubjectData = { offsetX: 0, offsetY: 0, @@ -7,6 +9,7 @@ export const defaultTransformSubjectData = { originalPageX: 0, originalPageY: 0 }; + /** * Assuming you have an image that's being resized to fit into a container * using the "contain" resize mode. You can use this function to calculate the @@ -18,7 +21,6 @@ export const defaultTransformSubjectData = { * @param imgSize * @param containerSize */ - export function applyContainResizeMode(imgSize, containerSize) { const { width: imageWidth, @@ -31,7 +33,6 @@ export function applyContainResizeMode(imgSize, containerSize) { const imageAspect = imageWidth / imageHeight; const areaAspect = areaWidth / areaHeight; let newSize; - if (imageAspect >= areaAspect) { // longest edge is horizontal newSize = { @@ -45,7 +46,6 @@ export function applyContainResizeMode(imgSize, containerSize) { height: areaHeight }; } - if (isNaN(newSize.height)) newSize.height = areaHeight; if (isNaN(newSize.width)) newSize.width = areaWidth; const scale = imageWidth ? newSize.width / imageWidth : newSize.height / imageHeight; @@ -58,12 +58,12 @@ export function applyContainResizeMode(imgSize, containerSize) { scale }; } + /** * get the coord of image's origin relative to the transformSubject * @param resizedImageSize * @param transformSubject */ - export function getImageOriginOnTransformSubject(resizedImageSize, transformSubject) { const { offsetX, @@ -77,6 +77,7 @@ export function getImageOriginOnTransformSubject(resizedImageSize, transformSubj y: offsetY * zoomLevel + originalHeight / 2 - resizedImageSize.height / 2 * zoomLevel }; } + /** * Translates the coord system of a point from the viewport's space to the image's space * @@ -86,7 +87,6 @@ export function getImageOriginOnTransformSubject(resizedImageSize, transformSubj * * @return {Vec2D} returns null if point is out of the sheet's bound */ - export function viewportPositionToImagePosition({ viewportPosition, imageSize, diff --git a/lib/module/helper/coordinateConversion.js.map b/lib/module/helper/coordinateConversion.js.map index a16bcd97..b6b0ab80 100644 --- a/lib/module/helper/coordinateConversion.js.map +++ b/lib/module/helper/coordinateConversion.js.map @@ -1 +1 @@ -{"version":3,"sources":["coordinateConversion.ts"],"names":["defaultTransformSubjectData","offsetX","offsetY","zoomLevel","originalWidth","originalHeight","originalPageX","originalPageY","applyContainResizeMode","imgSize","containerSize","width","imageWidth","height","imageHeight","areaWidth","areaHeight","imageAspect","areaAspect","newSize","isNaN","scale","isFinite","size","getImageOriginOnTransformSubject","resizedImageSize","transformSubject","x","y","viewportPositionToImagePosition","viewportPosition","imageSize","zoomableEvent","resizedImgSize","resizedImgScale","sheetOriginOnContainer","pointOnSheet"],"mappings":"AAEA,OAAO,MAAMA,2BAA8C,GAAG;AAC5DC,EAAAA,OAAO,EAAE,CADmD;AAE5DC,EAAAA,OAAO,EAAE,CAFmD;AAG5DC,EAAAA,SAAS,EAAE,CAHiD;AAI5DC,EAAAA,aAAa,EAAE,CAJ6C;AAK5DC,EAAAA,cAAc,EAAE,CAL4C;AAM5DC,EAAAA,aAAa,EAAE,CAN6C;AAO5DC,EAAAA,aAAa,EAAE;AAP6C,CAAvD;AAUP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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EA+B;AARiB,GAArB;AAWA,SAAOE,YAAP;AACD","sourcesContent":["import { Size2D, Vec2D, ZoomableViewEvent } from 'src/typings';\n\nexport const defaultTransformSubjectData: ZoomableViewEvent = {\n offsetX: 0,\n offsetY: 0,\n zoomLevel: 0,\n originalWidth: 0,\n originalHeight: 0,\n originalPageX: 0,\n originalPageY: 0,\n};\n\n/**\n * Assuming you have an image that's being resized to fit into a container\n * using the \"contain\" resize mode. You can use this function to calculate the\n * size of the image after fitting.\n *\n * Since our sheet is resized in this manner, we need this function\n * for things like pan boundaries and marker placement\n *\n * @param imgSize\n * @param containerSize\n */\nexport function applyContainResizeMode(\n imgSize: Size2D,\n containerSize: Size2D\n): { size: Size2D; scale: number } | { size: null; scale: null } {\n const { width: imageWidth, height: imageHeight } = imgSize;\n const { width: areaWidth, height: areaHeight } = containerSize;\n const imageAspect = imageWidth / imageHeight;\n const areaAspect = areaWidth / areaHeight;\n\n let newSize;\n if (imageAspect >= areaAspect) {\n // longest edge is horizontal\n newSize = { width: areaWidth, height: areaWidth / imageAspect };\n } else {\n // longest edge is vertical\n newSize = { width: areaHeight * imageAspect, height: areaHeight };\n }\n\n if (isNaN(newSize.height)) newSize.height = areaHeight;\n if (isNaN(newSize.width)) newSize.width = areaWidth;\n\n const scale = imageWidth\n ? newSize.width / imageWidth\n : newSize.height / imageHeight;\n\n if (!isFinite(scale)) return { size: null, scale: null };\n\n return {\n size: newSize,\n scale,\n };\n}\n\n/**\n * get the coord of image's origin relative to the transformSubject\n * @param resizedImageSize\n * @param transformSubject\n */\nexport function getImageOriginOnTransformSubject(\n resizedImageSize: Size2D,\n transformSubject: ZoomableViewEvent\n) {\n const { offsetX, offsetY, zoomLevel, originalWidth, originalHeight } =\n transformSubject;\n return {\n x:\n offsetX * zoomLevel +\n originalWidth / 2 -\n (resizedImageSize.width / 2) * zoomLevel,\n y:\n offsetY * zoomLevel +\n originalHeight / 2 -\n (resizedImageSize.height / 2) * zoomLevel,\n };\n}\n\n/**\n * Translates the coord system of a point from the viewport's space to the image's space\n *\n * @param pointOnContainer\n * @param sheetImageSize\n * @param transformSubject\n *\n * @return {Vec2D} returns null if point is out of the sheet's bound\n */\nexport function viewportPositionToImagePosition({\n viewportPosition,\n imageSize,\n zoomableEvent,\n}: {\n viewportPosition: Vec2D;\n imageSize: Size2D;\n zoomableEvent: ZoomableViewEvent;\n}): Vec2D | null {\n const { size: resizedImgSize, scale: resizedImgScale } =\n applyContainResizeMode(imageSize, {\n width: zoomableEvent.originalWidth,\n height: zoomableEvent.originalHeight,\n });\n\n if (resizedImgScale == null) return null;\n\n const sheetOriginOnContainer = getImageOriginOnTransformSubject(\n resizedImgSize,\n zoomableEvent\n );\n\n const pointOnSheet = {\n x:\n (viewportPosition.x - sheetOriginOnContainer.x) /\n zoomableEvent.zoomLevel /\n resizedImgScale,\n y:\n (viewportPosition.y - sheetOriginOnContainer.y) /\n zoomableEvent.zoomLevel /\n resizedImgScale,\n };\n\n return pointOnSheet;\n}\n"]} \ No newline at end of file +{"version":3,"names":["defaultTransformSubjectData","offsetX","offsetY","zoomLevel","originalWidth","originalHeight","originalPageX","originalPageY","applyContainResizeMode","imgSize","containerSize","width","imageWidth","height","imageHeight","areaWidth","areaHeight","imageAspect","areaAspect","newSize","isNaN","scale","isFinite","size","getImageOriginOnTransformSubject","resizedImageSize","transformSubject","x","y","viewportPositionToImagePosition","viewportPosition","imageSize","zoomableEvent","resizedImgSize","resizedImgScale","sheetOriginOnContainer","pointOnSheet"],"sourceRoot":"../../../src","sources":["helper/coordinateConversion.ts"],"mappings":";;AAEA,OAAO,MAAMA,2BAA8C,GAAG;EAC5DC,OAAO,EAAE,CAAC;EACVC,OAAO,EAAE,CAAC;EACVC,SAAS,EAAE,CAAC;EACZC,aAAa,EAAE,CAAC;EAChBC,cAAc,EAAE,CAAC;EACjBC,aAAa,EAAE,CAAC;EAChBC,aAAa,EAAE;AACjB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,CAAC,GAClEqB,gBAAgB;EAClB,OAAO;IACLC,CAAC,EACC1B,OAAO,GAAGE,SAAS,GACnBC,aAAa,GAAG,CAAC,GAChBqB,gBAAgB,CAACd,KAAK,GAAG,CAAC,GAAIR,SAAS;IAC1CyB,CAAC,EACC1B,OAAO,GAAGC,SAAS,GACnBE,cAAc,GAAG,CAAC,GACjBoB,gBAAgB,CAACZ,MAAM,GAAG,CAAC,GAAIV;EACpC,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS0B,+BAA+BA,CAAC;EAC9CC,gBAAgB;EAChBC,SAAS;EACTC;AAKF,CAAC,EAAgB;EACf,MAAM;IAAET,IAAI,EAAEU,cAAc;IAAEZ,KAAK,EAAEa;EAAgB,CAAC,GACpD1B,sBAAsB,CAACuB,SAAS,EAAE;IAChCpB,KAAK,EAAEqB,aAAa,CAAC5B,aAAa;IAClCS,MAAM,EAAEmB,aAAa,CAAC3B;EACxB,CAAC,CAAC;EAEJ,IAAI6B,eAAe,IAAI,IAAI,EAAE,OAAO,IAAI;EAExC,MAAMC,sBAAsB,GAAGX,gCAAgC,CAC7DS,cAAc,EACdD,aACF,CAAC;EAED,MAAMI,YAAY,GAAG;IACnBT,CAAC,EACC,CAACG,gBAAgB,CAACH,CAAC,GAAGQ,sBAAsB,CAACR,CAAC,IAC9CK,aAAa,CAAC7B,SAAS,GACvB+B,eAAe;IACjBN,CAAC,EACC,CAACE,gBAAgB,CAACF,CAAC,GAAGO,sBAAsB,CAACP,CAAC,IAC9CI,aAAa,CAAC7B,SAAS,GACvB+B;EACJ,CAAC;EAED,OAAOE,YAAY;AACrB","ignoreList":[]} diff --git a/lib/module/helper/index.js b/lib/module/helper/index.js index 10c2ca94..bdce1d5c 100644 --- a/lib/module/helper/index.js +++ b/lib/module/helper/index.js @@ -1,4 +1,7 @@ +"use strict"; + export { calcNewScaledOffsetForZoomCentering } from './calcNewScaledOffsetForZoomCentering'; + /** * Calculates the gesture center point relative to the page coordinate system * @@ -10,11 +13,9 @@ export { calcNewScaledOffsetForZoomCentering } from './calcNewScaledOffsetForZoo * because gestureState.moveX/Y is messed up on real device * (Sometimes it's the center point, but sometimes it randomly takes the position of one of the touches) */ - export function calcGestureCenterPoint(e, gestureState) { const touches = e.nativeEvent.touches; if (!touches[0]) return null; - if (gestureState.numberActiveTouches === 2) { if (!touches[1]) return null; return { @@ -22,14 +23,12 @@ export function calcGestureCenterPoint(e, gestureState) { y: (touches[0].pageY + touches[1].pageY) / 2 }; } - if (gestureState.numberActiveTouches === 1) { return { x: touches[0].pageX, y: touches[0].pageY }; } - return null; } export function calcGestureTouchDistance(e, gestureState) { diff --git a/lib/module/helper/index.js.map b/lib/module/helper/index.js.map index f60fb21d..0631c9e1 100644 --- a/lib/module/helper/index.js.map +++ b/lib/module/helper/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["index.ts"],"names":["calcNewScaledOffsetForZoomCentering","calcGestureCenterPoint","e","gestureState","touches","nativeEvent","numberActiveTouches","x","pageX","y","pageY","calcGestureTouchDistance","dx","Math","abs","dy","sqrt"],"mappings":"AAIA,SAASA,mCAAT,QAAoD,uCAApD;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,sBAAT,CACLC,CADK,EAELC,YAFK,EAGS;AACd,QAAMC,OAAO,GAAGF,CAAC,CAACG,WAAF,CAAcD,OAA9B;AACA,MAAI,CAACA,OAAO,CAAC,CAAD,CAAZ,EAAiB,OAAO,IAAP;;AAEjB,MAAID,YAAY,CAACG,mBAAb,KAAqC,CAAzC,EAA4C;AAC1C,QAAI,CAACF,OAAO,CAAC,CAAD,CAAZ,EAAiB,OAAO,IAAP;AACjB,WAAO;AACLG,MAAAA,CAAC,EAAE,CAACH,OAAO,CAAC,CAAD,CAAP,CAAWI,KAAX,GAAmBJ,OAAO,CAAC,CAAD,CAAP,CAAWI,KAA/B,IAAwC,CADtC;AAELC,MAAAA,CAAC,EAAE,CAACL,OAAO,CAAC,CAAD,CAAP,CAAWM,KAAX,GAAmBN,OAAO,CAAC,CAAD,CAAP,CAAWM,KAA/B,IAAwC;AAFtC,KAAP;AAID;;AACD,MAAIP,YAAY,CAACG,mBAAb,KAAqC,CAAzC,EAA4C;AAC1C,WAAO;AACLC,MAAAA,CAAC,EAAEH,OAAO,CAAC,CAAD,CAAP,CAAWI,KADT;AAELC,MAAAA,CAAC,EAAEL,OAAO,CAAC,CAAD,CAAP,CAAWM;AAFT,KAAP;AAID;;AAED,SAAO,IAAP;AACD;AAED,OAAO,SAASC,wBAAT,CACLT,CADK,EAELC,YAFK,EAGU;AACf,QAAMC,OAAO,GAAGF,CAAC,CAACG,WAAF,CAAcD,OAA9B;AACA,MAAID,YAAY,CAACG,mBAAb,KAAqC,CAArC,IAA0C,CAACF,OAAO,CAAC,CAAD,CAAlD,IAAyD,CAACA,OAAO,CAAC,CAAD,CAArE,EACE,OAAO,IAAP;AAEF,QAAMQ,EAAE,GAAGC,IAAI,CAACC,GAAL,CAASV,OAAO,CAAC,CAAD,CAAP,CAAWI,KAAX,GAAmBJ,OAAO,CAAC,CAAD,CAAP,CAAWI,KAAvC,CAAX;AACA,QAAMO,EAAE,GAAGF,IAAI,CAACC,GAAL,CAASV,OAAO,CAAC,CAAD,CAAP,CAAWM,KAAX,GAAmBN,OAAO,CAAC,CAAD,CAAP,CAAWM,KAAvC,CAAX;AACA,SAAOG,IAAI,CAACG,IAAL,CAAUJ,EAAE,GAAGA,EAAL,GAAUG,EAAE,GAAGA,EAAzB,CAAP;AACD","sourcesContent":["import { GestureResponderEvent, PanResponderGestureState } from 'react-native';\n\nimport { Vec2D } from '../typings';\n\nexport { calcNewScaledOffsetForZoomCentering } from './calcNewScaledOffsetForZoomCentering';\n\n/**\n * Calculates the gesture center point relative to the page coordinate system\n *\n * We're unable to use touch.locationX/Y\n * because locationX uses the axis system of the leaf element that the touch occurs on,\n * which makes it even more complicated to translate into our container's axis system.\n *\n * We're also unable to use gestureState.moveX/Y\n * because gestureState.moveX/Y is messed up on real device\n * (Sometimes it's the center point, but sometimes it randomly takes the position of one of the touches)\n */\nexport function calcGestureCenterPoint(\n e: GestureResponderEvent,\n gestureState: PanResponderGestureState\n): Vec2D | null {\n const touches = e.nativeEvent.touches;\n if (!touches[0]) return null;\n\n if (gestureState.numberActiveTouches === 2) {\n if (!touches[1]) return null;\n return {\n x: (touches[0].pageX + touches[1].pageX) / 2,\n y: (touches[0].pageY + touches[1].pageY) / 2,\n };\n }\n if (gestureState.numberActiveTouches === 1) {\n return {\n x: touches[0].pageX,\n y: touches[0].pageY,\n };\n }\n\n return null;\n}\n\nexport function calcGestureTouchDistance(\n e: GestureResponderEvent,\n gestureState: PanResponderGestureState\n): number | null {\n const touches = e.nativeEvent.touches;\n if (gestureState.numberActiveTouches !== 2 || !touches[0] || !touches[1])\n return null;\n\n const dx = Math.abs(touches[0].pageX - touches[1].pageX);\n const dy = Math.abs(touches[0].pageY - touches[1].pageY);\n return Math.sqrt(dx * dx + dy * dy);\n}\n"]} \ No newline at end of file +{"version":3,"names":["calcNewScaledOffsetForZoomCentering","calcGestureCenterPoint","e","gestureState","touches","nativeEvent","numberActiveTouches","x","pageX","y","pageY","calcGestureTouchDistance","dx","Math","abs","dy","sqrt"],"sourceRoot":"../../../src","sources":["helper/index.ts"],"mappings":";;AAIA,SAASA,mCAAmC,QAAQ,uCAAuC;;AAE3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CACpCC,CAAwB,EACxBC,YAAsC,EACxB;EACd,MAAMC,OAAO,GAAGF,CAAC,CAACG,WAAW,CAACD,OAAO;EACrC,IAAI,CAACA,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,IAAI;EAE5B,IAAID,YAAY,CAACG,mBAAmB,KAAK,CAAC,EAAE;IAC1C,IAAI,CAACF,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,IAAI;IAC5B,OAAO;MACLG,CAAC,EAAE,CAACH,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK,GAAGJ,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK,IAAI,CAAC;MAC5CC,CAAC,EAAE,CAACL,OAAO,CAAC,CAAC,CAAC,CAACM,KAAK,GAAGN,OAAO,CAAC,CAAC,CAAC,CAACM,KAAK,IAAI;IAC7C,CAAC;EACH;EACA,IAAIP,YAAY,CAACG,mBAAmB,KAAK,CAAC,EAAE;IAC1C,OAAO;MACLC,CAAC,EAAEH,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK;MACnBC,CAAC,EAAEL,OAAO,CAAC,CAAC,CAAC,CAACM;IAChB,CAAC;EACH;EAEA,OAAO,IAAI;AACb;AAEA,OAAO,SAASC,wBAAwBA,CACtCT,CAAwB,EACxBC,YAAsC,EACvB;EACf,MAAMC,OAAO,GAAGF,CAAC,CAACG,WAAW,CAACD,OAAO;EACrC,IAAID,YAAY,CAACG,mBAAmB,KAAK,CAAC,IAAI,CAACF,OAAO,CAAC,CAAC,CAAC,IAAI,CAACA,OAAO,CAAC,CAAC,CAAC,EACtE,OAAO,IAAI;EAEb,MAAMQ,EAAE,GAAGC,IAAI,CAACC,GAAG,CAACV,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK,GAAGJ,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK,CAAC;EACxD,MAAMO,EAAE,GAAGF,IAAI,CAACC,GAAG,CAACV,OAAO,CAAC,CAAC,CAAC,CAACM,KAAK,GAAGN,OAAO,CAAC,CAAC,CAAC,CAACM,KAAK,CAAC;EACxD,OAAOG,IAAI,CAACG,IAAI,CAACJ,EAAE,GAAGA,EAAE,GAAGG,EAAE,GAAGA,EAAE,CAAC;AACrC","ignoreList":[]} diff --git a/lib/module/index.js b/lib/module/index.js index 432f0528..bd05c56b 100644 --- a/lib/module/index.js +++ b/lib/module/index.js @@ -1,5 +1,8 @@ +"use strict"; + import { applyContainResizeMode, getImageOriginOnTransformSubject, viewportPositionToImagePosition } from './helper/coordinateConversion'; import ReactNativeZoomableView from './ReactNativeZoomableView'; -export { // Helper functions for coordinate conversion +export { +// Helper functions for coordinate conversion applyContainResizeMode, getImageOriginOnTransformSubject, ReactNativeZoomableView, viewportPositionToImagePosition }; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/module/index.js.map b/lib/module/index.js.map index 747eb366..add721ff 100644 --- a/lib/module/index.js.map +++ b/lib/module/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["index.tsx"],"names":["applyContainResizeMode","getImageOriginOnTransformSubject","viewportPositionToImagePosition","ReactNativeZoomableView"],"mappings":"AAAA,SACEA,sBADF,EAEEC,gCAFF,EAGEC,+BAHF,QAIO,+BAJP;AAKA,OAAOC,uBAAP,MAAoC,2BAApC;AAMA,SACE;AACAH,sBAFF,EAGEC,gCAHF,EAIEE,uBAJF,EAMED,+BANF","sourcesContent":["import {\n applyContainResizeMode,\n getImageOriginOnTransformSubject,\n viewportPositionToImagePosition,\n} from './helper/coordinateConversion';\nimport ReactNativeZoomableView from './ReactNativeZoomableView';\nimport type {\n ReactNativeZoomableViewProps,\n ZoomableViewEvent,\n} from './typings';\n\nexport {\n // Helper functions for coordinate conversion\n applyContainResizeMode,\n getImageOriginOnTransformSubject,\n ReactNativeZoomableView,\n ReactNativeZoomableViewProps,\n viewportPositionToImagePosition,\n ZoomableViewEvent,\n};\n"]} \ No newline at end of file +{"version":3,"names":["applyContainResizeMode","getImageOriginOnTransformSubject","viewportPositionToImagePosition","ReactNativeZoomableView"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SACEA,sBAAsB,EACtBC,gCAAgC,EAChCC,+BAA+B,QAC1B,+BAA+B;AACtC,OAAOC,uBAAuB,MAAM,2BAA2B;AAM/D;AACE;AACAH,sBAAsB,EACtBC,gCAAgC,EAChCE,uBAAuB,EAEvBD,+BAA+B","ignoreList":[]} diff --git a/lib/module/package.json b/lib/module/package.json new file mode 100644 index 00000000..089153bc --- /dev/null +++ b/lib/module/package.json @@ -0,0 +1 @@ +{"type":"module"} diff --git a/lib/module/typings/index.js b/lib/module/typings/index.js index 12922c4f..f9391cf7 100644 --- a/lib/module/typings/index.js +++ b/lib/module/typings/index.js @@ -1,9 +1,10 @@ -export let SwipeDirection; +"use strict"; -(function (SwipeDirection) { +export let SwipeDirection = /*#__PURE__*/function (SwipeDirection) { SwipeDirection["SWIPE_UP"] = "SWIPE_UP"; SwipeDirection["SWIPE_DOWN"] = "SWIPE_DOWN"; SwipeDirection["SWIPE_LEFT"] = "SWIPE_LEFT"; SwipeDirection["SWIPE_RIGHT"] = "SWIPE_RIGHT"; -})(SwipeDirection || (SwipeDirection = {})); + return SwipeDirection; +}({}); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/module/typings/index.js.map b/lib/module/typings/index.js.map index 377f5d5f..533f3a90 100644 --- a/lib/module/typings/index.js.map +++ b/lib/module/typings/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["index.ts"],"names":["SwipeDirection"],"mappings":"AASA,WAAYA,cAAZ;;WAAYA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;GAAAA,c,KAAAA,c","sourcesContent":["import { ReactNode } from 'react';\nimport {\n Animated,\n GestureResponderEvent,\n LayoutChangeEvent,\n PanResponderGestureState,\n ViewProps,\n} from 'react-native';\n\nexport enum SwipeDirection {\n SWIPE_UP = 'SWIPE_UP',\n SWIPE_DOWN = 'SWIPE_DOWN',\n SWIPE_LEFT = 'SWIPE_LEFT',\n SWIPE_RIGHT = 'SWIPE_RIGHT',\n}\n\nexport interface ZoomableViewEvent {\n zoomLevel: number;\n offsetX: number;\n offsetY: number;\n originalHeight: number;\n originalWidth: number;\n originalPageX: number;\n originalPageY: number;\n}\n\nexport interface ReactNativeZoomableViewProps {\n // options\n style?: ViewProps['style'];\n children?: ReactNode;\n zoomEnabled?: boolean;\n panEnabled?: boolean;\n initialZoom?: number;\n initialOffsetX?: number;\n initialOffsetY?: number;\n contentWidth?: number;\n contentHeight?: number;\n panBoundaryPadding?: number;\n maxZoom?: number;\n minZoom?: number;\n doubleTapDelay?: number;\n doubleTapZoomToCenter?: boolean;\n bindToBorders?: boolean;\n zoomStep?: number;\n pinchToZoomInSensitivity?: number;\n pinchToZoomOutSensitivity?: number;\n movementSensibility?: number;\n longPressDuration?: number;\n visualTouchFeedbackEnabled?: boolean;\n disablePanOnInitialZoom?: boolean;\n\n // Zoom animated value ref\n zoomAnimatedValue?: Animated.Value;\n panAnimatedValueXY?: Animated.ValueXY;\n\n // debug\n debug?: boolean;\n\n // callbacks\n onLayout?: (event: Pick) => void;\n onTransform?: (zoomableViewEventObject: ZoomableViewEvent) => void;\n onSingleTap?: (\n event: GestureResponderEvent,\n zoomableViewEventObject: ZoomableViewEvent\n ) => void;\n onDoubleTapBefore?: (\n event: GestureResponderEvent,\n zoomableViewEventObject: ZoomableViewEvent\n ) => void;\n onDoubleTapAfter?: (\n event: GestureResponderEvent,\n zoomableViewEventObject: ZoomableViewEvent\n ) => void;\n onShiftingBefore?: (\n event: GestureResponderEvent | null,\n gestureState: PanResponderGestureState | null,\n zoomableViewEventObject: ZoomableViewEvent\n ) => boolean;\n onShiftingAfter?: (\n event: GestureResponderEvent | null,\n gestureState: PanResponderGestureState | null,\n zoomableViewEventObject: ZoomableViewEvent\n ) => boolean;\n onShiftingEnd?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState,\n zoomableViewEventObject: ZoomableViewEvent\n ) => void;\n onZoomBefore?: (\n event: GestureResponderEvent | null,\n gestureState: PanResponderGestureState | null,\n zoomableViewEventObject: ZoomableViewEvent\n ) => boolean | undefined;\n onZoomAfter?: (\n event: GestureResponderEvent | null,\n gestureState: PanResponderGestureState | null,\n zoomableViewEventObject: ZoomableViewEvent\n ) => void;\n onZoomEnd?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState,\n zoomableViewEventObject: ZoomableViewEvent\n ) => void;\n onLongPress?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState,\n zoomableViewEventObject: ZoomableViewEvent\n ) => void;\n onStartShouldSetPanResponder?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState,\n zoomableViewEventObject: ZoomableViewEvent,\n baseComponentResult: boolean\n ) => boolean;\n onPanResponderGrant?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState,\n zoomableViewEventObject: ZoomableViewEvent\n ) => void;\n onPanResponderEnd?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState,\n zoomableViewEventObject: ZoomableViewEvent\n ) => void;\n onPanResponderMove?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState,\n zoomableViewEventObject: ZoomableViewEvent\n ) => boolean;\n onPanResponderTerminate?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState,\n zoomableViewEventObject: ZoomableViewEvent\n ) => void;\n onPanResponderTerminationRequest?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState,\n zoomableViewEventObject: ZoomableViewEvent\n ) => boolean;\n onShouldBlockNativeResponder?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState,\n zoomableViewEventObject: ZoomableViewEvent\n ) => boolean;\n onStartShouldSetPanResponderCapture?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState\n ) => boolean;\n onMoveShouldSetPanResponderCapture?: (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState\n ) => boolean;\n onStaticPinPress?: (event: GestureResponderEvent) => void;\n onStaticPinLongPress?: (event: GestureResponderEvent) => void;\n staticPinPosition?: Vec2D;\n staticPinIcon?: React.ReactElement;\n onStaticPinPositionChange?: (position: Vec2D) => void;\n onStaticPinPositionMove?: (position: Vec2D) => void;\n animatePin: boolean;\n pinProps?: ViewProps;\n disableMomentum?: boolean;\n}\n\nexport interface Vec2D {\n x: number;\n y: number;\n}\n\nexport interface Size2D {\n width: number;\n height: number;\n}\n\nexport interface TouchPoint extends Vec2D {\n id: string;\n isSecondTap?: boolean;\n}\n\nexport interface ReactNativeZoomableViewState {\n touches?: TouchPoint[];\n originalWidth: number;\n originalHeight: number;\n originalPageX: number;\n originalPageY: number;\n originalX: number;\n originalY: number;\n debugPoints?: undefined | Vec2D[];\n pinSize: Size2D;\n}\n\nexport interface ReactNativeZoomableViewWithGesturesProps\n extends ReactNativeZoomableViewProps {\n swipeLengthThreshold?: number;\n swipeVelocityThreshold?: number;\n swipeDirectionalThreshold?: number;\n swipeMinZoom?: number;\n swipeMaxZoom?: number;\n swipeDisabled?: boolean;\n onSwipe?: (\n swipeDirection: SwipeDirection,\n gestureState: PanResponderGestureState\n ) => void;\n onSwipeUp?: (gestureState: PanResponderGestureState) => void;\n onSwipeDown?: (gestureState: PanResponderGestureState) => void;\n onSwipeLeft?: (gestureState: PanResponderGestureState) => void;\n onSwipeRight?: (gestureState: PanResponderGestureState) => void;\n}\n"]} \ No newline at end of file +{"version":3,"names":["SwipeDirection"],"sourceRoot":"../../../src","sources":["typings/index.ts"],"mappings":";;AASA,WAAYA,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]} diff --git a/lib/typescript/ReactNativeZoomableView.d.ts b/lib/typescript/ReactNativeZoomableView.d.ts index 92b47330..26d70039 100644 --- a/lib/typescript/ReactNativeZoomableView.d.ts +++ b/lib/typescript/ReactNativeZoomableView.d.ts @@ -243,3 +243,4 @@ declare class ReactNativeZoomableView extends Component void) | undefined; }) => JSX.Element; +//# sourceMappingURL=AnimatedTouchFeedback.d.ts.map \ No newline at end of file diff --git a/lib/typescript/components/AnimatedTouchFeedback.d.ts.map b/lib/typescript/components/AnimatedTouchFeedback.d.ts.map new file mode 100644 index 00000000..e169ac3c --- /dev/null +++ b/lib/typescript/components/AnimatedTouchFeedback.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"AnimatedTouchFeedback.d.ts","sourceRoot":"","sources":["../../../src/components/AnimatedTouchFeedback.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB;OAO7B,MAAM;OACN,MAAM;uBACU,MAAM;;6BAED,IAAI;iBAmD7B,CAAC"} \ No newline at end of file diff --git a/lib/typescript/components/StaticPin.d.ts b/lib/typescript/components/StaticPin.d.ts index f9f2e293..5668d3d2 100644 --- a/lib/typescript/components/StaticPin.d.ts +++ b/lib/typescript/components/StaticPin.d.ts @@ -16,3 +16,4 @@ export declare const StaticPin: ({ staticPinPosition, pinAnim, staticPinIcon, pi setPinSize: (size: Size2D) => void; pinProps?: ViewProps | undefined; }) => JSX.Element; +//# sourceMappingURL=StaticPin.d.ts.map \ No newline at end of file diff --git a/lib/typescript/components/StaticPin.d.ts.map b/lib/typescript/components/StaticPin.d.ts.map new file mode 100644 index 00000000..f02c857e --- /dev/null +++ b/lib/typescript/components/StaticPin.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"StaticPin.d.ts","sourceRoot":"","sources":["../../../src/components/StaticPin.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,QAAQ,EACR,qBAAqB,EAGrB,wBAAwB,EAGxB,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,eAAO,MAAM,SAAS;uBAWD;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;aAClC,SAAS,OAAO;mBACV,MAAM,SAAS;aACrB,MAAM;IACf,wDAAwD;wBAEjD,qBAAqB,gBACZ,wBAAwB,KACnC,OAAO,GAAG,SAAS;qBACR,qBAAqB,KAAK,IAAI;yBAC1B,qBAAqB,KAAK,IAAI;uBAC/B,MAAM,KAAK,IAAI;;iBAkEnC,CAAC"} \ No newline at end of file diff --git a/lib/typescript/components/index.d.ts b/lib/typescript/components/index.d.ts index da7df192..dbcaedec 100644 --- a/lib/typescript/components/index.d.ts +++ b/lib/typescript/components/index.d.ts @@ -1 +1,2 @@ export { AnimatedTouchFeedback } from './AnimatedTouchFeedback'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/lib/typescript/components/index.d.ts.map b/lib/typescript/components/index.d.ts.map new file mode 100644 index 00000000..7c9cccd5 --- /dev/null +++ b/lib/typescript/components/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"} \ No newline at end of file diff --git a/lib/typescript/debugHelper/index.d.ts b/lib/typescript/debugHelper/index.d.ts index b2bc7b03..3d20405e 100644 --- a/lib/typescript/debugHelper/index.d.ts +++ b/lib/typescript/debugHelper/index.d.ts @@ -10,3 +10,4 @@ export declare const DebugRect: ({ height, x, y, color, }: { y: number; color: string; }) => JSX.Element; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/lib/typescript/debugHelper/index.d.ts.map b/lib/typescript/debugHelper/index.d.ts.map new file mode 100644 index 00000000..a2a282f7 --- /dev/null +++ b/lib/typescript/debugHelper/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/debugHelper/index.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe;;;;;iBAuB3B,CAAC;AACF,eAAO,MAAM,SAAS;YAMZ,MAAM;OACX,MAAM;OACN,MAAM;WACF,MAAM;iBAkBd,CAAC"} \ No newline at end of file diff --git a/lib/typescript/helper/applyPanBoundariesToOffset.d.ts b/lib/typescript/helper/applyPanBoundariesToOffset.d.ts index e735ca88..1fdb93d2 100644 --- a/lib/typescript/helper/applyPanBoundariesToOffset.d.ts +++ b/lib/typescript/helper/applyPanBoundariesToOffset.d.ts @@ -12,3 +12,4 @@ * @returns {number} */ export declare function applyPanBoundariesToOffset(offsetScaled: number, containerSize: number, contentSize: number, scale: number, boundaryPadding: number): number; +//# sourceMappingURL=applyPanBoundariesToOffset.d.ts.map \ No newline at end of file diff --git a/lib/typescript/helper/applyPanBoundariesToOffset.d.ts.map b/lib/typescript/helper/applyPanBoundariesToOffset.d.ts.map new file mode 100644 index 00000000..89a116ff --- /dev/null +++ b/lib/typescript/helper/applyPanBoundariesToOffset.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"applyPanBoundariesToOffset.d.ts","sourceRoot":"","sources":["../../../src/helper/applyPanBoundariesToOffset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,CACxC,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,eAAe,EAAE,MAAM,UAoDxB"} \ No newline at end of file diff --git a/lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts b/lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts index a6f4d7fe..7503b339 100644 --- a/lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts +++ b/lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts @@ -49,3 +49,4 @@ * @param zoomCenterXOrY */ export declare function calcNewScaledOffsetForZoomCentering(oldOffsetXOrYScaled: number, zoomSubjectOriginalWidthOrHeight: number, oldScale: number, newScale: number, zoomCenterXOrY: number): number; +//# sourceMappingURL=calcNewScaledOffsetForZoomCentering.d.ts.map \ No newline at end of file diff --git a/lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts.map b/lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts.map new file mode 100644 index 00000000..4ffc3f50 --- /dev/null +++ b/lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"calcNewScaledOffsetForZoomCentering.d.ts","sourceRoot":"","sources":["../../../src/helper/calcNewScaledOffsetForZoomCentering.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAgB,mCAAmC,CACjD,mBAAmB,EAAE,MAAM,EAC3B,gCAAgC,EAAE,MAAM,EACxC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,UAyBvB"} \ No newline at end of file diff --git a/lib/typescript/helper/coordinateConversion.d.ts b/lib/typescript/helper/coordinateConversion.d.ts index edfd8842..c8bfdc0b 100644 --- a/lib/typescript/helper/coordinateConversion.d.ts +++ b/lib/typescript/helper/coordinateConversion.d.ts @@ -41,3 +41,4 @@ export declare function viewportPositionToImagePosition({ viewportPosition, imag imageSize: Size2D; zoomableEvent: ZoomableViewEvent; }): Vec2D | null; +//# sourceMappingURL=coordinateConversion.d.ts.map \ No newline at end of file diff --git a/lib/typescript/helper/coordinateConversion.d.ts.map b/lib/typescript/helper/coordinateConversion.d.ts.map new file mode 100644 index 00000000..c43dfee5 --- /dev/null +++ b/lib/typescript/helper/coordinateConversion.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"coordinateConversion.d.ts","sourceRoot":"","sources":["../../../src/helper/coordinateConversion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE/D,eAAO,MAAM,2BAA2B,EAAE,iBAQzC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,GACpB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,IAAI,CAAA;CAAE,CA4B/D;AAED;;;;GAIG;AACH,wBAAgB,gCAAgC,CAC9C,gBAAgB,EAAE,MAAM,EACxB,gBAAgB,EAAE,iBAAiB;;;EAcpC;AAED;;;;;;;;GAQG;AACH,wBAAgB,+BAA+B,CAAC,EAC9C,gBAAgB,EAChB,SAAS,EACT,aAAa,GACd,EAAE;IACD,gBAAgB,EAAE,KAAK,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,iBAAiB,CAAC;CAClC,GAAG,KAAK,GAAG,IAAI,CA0Bf"} \ No newline at end of file diff --git a/lib/typescript/helper/index.d.ts b/lib/typescript/helper/index.d.ts index a0164410..bc85ca36 100644 --- a/lib/typescript/helper/index.d.ts +++ b/lib/typescript/helper/index.d.ts @@ -14,3 +14,4 @@ export { calcNewScaledOffsetForZoomCentering } from './calcNewScaledOffsetForZoo */ export declare function calcGestureCenterPoint(e: GestureResponderEvent, gestureState: PanResponderGestureState): Vec2D | null; export declare function calcGestureTouchDistance(e: GestureResponderEvent, gestureState: PanResponderGestureState): number | null; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/lib/typescript/helper/index.d.ts.map b/lib/typescript/helper/index.d.ts.map new file mode 100644 index 00000000..fe427587 --- /dev/null +++ b/lib/typescript/helper/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAE/E,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAE5F;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACpC,CAAC,EAAE,qBAAqB,EACxB,YAAY,EAAE,wBAAwB,GACrC,KAAK,GAAG,IAAI,CAmBd;AAED,wBAAgB,wBAAwB,CACtC,CAAC,EAAE,qBAAqB,EACxB,YAAY,EAAE,wBAAwB,GACrC,MAAM,GAAG,IAAI,CAQf"} \ No newline at end of file diff --git a/lib/typescript/index.d.ts b/lib/typescript/index.d.ts index a4f55710..7b02103f 100644 --- a/lib/typescript/index.d.ts +++ b/lib/typescript/index.d.ts @@ -2,3 +2,4 @@ import { applyContainResizeMode, getImageOriginOnTransformSubject, viewportPosit import ReactNativeZoomableView from './ReactNativeZoomableView'; import type { ReactNativeZoomableViewProps, ZoomableViewEvent } from './typings'; export { applyContainResizeMode, getImageOriginOnTransformSubject, ReactNativeZoomableView, ReactNativeZoomableViewProps, viewportPositionToImagePosition, ZoomableViewEvent, }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/lib/typescript/index.d.ts.map b/lib/typescript/index.d.ts.map new file mode 100644 index 00000000..2a3655b0 --- /dev/null +++ b/lib/typescript/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EAChC,+BAA+B,EAChC,MAAM,+BAA+B,CAAC;AACvC,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EACV,4BAA4B,EAC5B,iBAAiB,EAClB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAEL,sBAAsB,EACtB,gCAAgC,EAChC,uBAAuB,EACvB,4BAA4B,EAC5B,+BAA+B,EAC/B,iBAAiB,GAClB,CAAC"} \ No newline at end of file diff --git a/lib/typescript/typings/index.d.ts b/lib/typescript/typings/index.d.ts index 32e2b035..62d2b238 100644 --- a/lib/typescript/typings/index.d.ts +++ b/lib/typescript/typings/index.d.ts @@ -108,3 +108,4 @@ export interface ReactNativeZoomableViewWithGesturesProps extends ReactNativeZoo onSwipeLeft?: (gestureState: PanResponderGestureState) => void; onSwipeRight?: (gestureState: PanResponderGestureState) => void; } +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/lib/typescript/typings/index.d.ts.map b/lib/typescript/typings/index.d.ts.map new file mode 100644 index 00000000..6023f500 --- /dev/null +++ b/lib/typescript/typings/index.d.ts.map @@ -0,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,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,GAAG,KAAK,EAAE,CAAC;IAClC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,wCACf,SAAQ,4BAA4B;IACpC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,CACR,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,wBAAwB,KACnC,IAAI,CAAC;IACV,SAAS,CAAC,EAAE,CAAC,YAAY,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC7D,WAAW,CAAC,EAAE,CAAC,YAAY,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC/D,WAAW,CAAC,EAAE,CAAC,YAAY,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC/D,YAAY,CAAC,EAAE,CAAC,YAAY,EAAE,wBAAwB,KAAK,IAAI,CAAC;CACjE"} \ No newline at end of file From 73a701b961840bf97780dba7d15dd7f12100db07 Mon Sep 17 00:00:00 2001 From: thomasvo Date: Mon, 5 Jan 2026 09:26:33 -0800 Subject: [PATCH 05/20] improve readability of label extraction pipeline --- .github/workflows/pr-labels.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index cef7bced..9c2a1d79 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -13,8 +13,12 @@ jobs: - name: Extract valid labels from release.yml id: extract-labels run: | - # Extract labels from release.yml, excluding wildcards - labels=$(yq eval '.changelog.categories[].labels[]' .github/release.yml | grep -v '^\*$' | tr '\n' ',' | sed 's/,$//') + labels=$( + yq eval '.changelog.categories[].labels[]' .github/release.yml \ + | grep -v '^\*$' \ # Remove wildcard entries (*) + | tr '\n' ',' \ # Convert newlines to commas + | sed 's/,$//' # Remove trailing comma + ) echo "labels=$labels" >> $GITHUB_OUTPUT echo "Extracted labels: $labels" From d08843b94434c9f5835e71524f0437b4cea666ef Mon Sep 17 00:00:00 2001 From: thomasvo Date: Mon, 5 Jan 2026 09:32:33 -0800 Subject: [PATCH 06/20] fix bash syntax - remove inline comments after line continuations --- .github/workflows/pr-labels.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index 9c2a1d79..755f8293 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -13,12 +13,10 @@ jobs: - name: Extract valid labels from release.yml id: extract-labels run: | - labels=$( - yq eval '.changelog.categories[].labels[]' .github/release.yml \ - | grep -v '^\*$' \ # Remove wildcard entries (*) - | tr '\n' ',' \ # Convert newlines to commas - | sed 's/,$//' # Remove trailing comma - ) + labels=$(yq eval '.changelog.categories[].labels[]' .github/release.yml) + labels=$(echo "$labels" | grep -v '^\*$') # Remove wildcard entries (*) + labels=$(echo "$labels" | tr '\n' ',') # Convert newlines to commas + labels=$(echo "$labels" | sed 's/,$//') # Remove trailing comma echo "labels=$labels" >> $GITHUB_OUTPUT echo "Extracted labels: $labels" From ae88a40d60aaa63967048dc1d6783f23fea3d44a Mon Sep 17 00:00:00 2001 From: thomasvo Date: Tue, 31 Mar 2026 17:54:00 -0700 Subject: [PATCH 07/20] Remove lib/ build artifacts from tracking and add to .gitignore - Remove lib/commonjs/, lib/module/, lib/typescript/ from git tracking - Add lib/ to .gitignore - Remove bob build and git add lib from pre-commit hook (lib/ is built at publish time via react-native-builder-bob, not needed in repo) Co-Authored-By: Claude Opus 4.6 --- .gitignore | 3 + lib/commonjs/ReactNativeZoomableView.js | 1058 ----------------- lib/commonjs/ReactNativeZoomableView.js.map | 1 - lib/commonjs/animations/index.js | 31 - lib/commonjs/animations/index.js.map | 1 - lib/commonjs/assets/pin.png | Bin 10710 -> 0 bytes .../components/AnimatedTouchFeedback.js | 66 - .../components/AnimatedTouchFeedback.js.map | 1 - lib/commonjs/components/StaticPin.js | 91 -- lib/commonjs/components/StaticPin.js.map | 1 - lib/commonjs/components/index.js | 13 - lib/commonjs/components/index.js.map | 1 - lib/commonjs/debugHelper/index.js | 60 - lib/commonjs/debugHelper/index.js.map | 1 - .../helper/applyPanBoundariesToOffset.js | 63 - .../helper/applyPanBoundariesToOffset.js.map | 1 - .../calcNewScaledOffsetForZoomCentering.js | 73 -- ...calcNewScaledOffsetForZoomCentering.js.map | 1 - lib/commonjs/helper/coordinateConversion.js | 117 -- .../helper/coordinateConversion.js.map | 1 - lib/commonjs/helper/index.js | 51 - lib/commonjs/helper/index.js.map | 1 - lib/commonjs/index.js | 33 - lib/commonjs/index.js.map | 1 - lib/commonjs/package.json | 1 - lib/commonjs/typings/index.js | 14 - lib/commonjs/typings/index.js.map | 1 - lib/module/ReactNativeZoomableView.js | 1053 ---------------- lib/module/ReactNativeZoomableView.js.map | 1 - lib/module/animations/index.js | 25 - lib/module/animations/index.js.map | 1 - lib/module/assets/pin.png | Bin 10710 -> 0 bytes .../components/AnimatedTouchFeedback.js | 60 - .../components/AnimatedTouchFeedback.js.map | 1 - lib/module/components/StaticPin.js | 85 -- lib/module/components/StaticPin.js.map | 1 - lib/module/components/index.js | 4 - lib/module/components/index.js.map | 1 - lib/module/debugHelper/index.js | 53 - lib/module/debugHelper/index.js.map | 1 - .../helper/applyPanBoundariesToOffset.js | 59 - .../helper/applyPanBoundariesToOffset.js.map | 1 - .../calcNewScaledOffsetForZoomCentering.js | 69 -- ...calcNewScaledOffsetForZoomCentering.js.map | 1 - lib/module/helper/coordinateConversion.js | 110 -- lib/module/helper/coordinateConversion.js.map | 1 - lib/module/helper/index.js | 41 - lib/module/helper/index.js.map | 1 - lib/module/index.js | 8 - lib/module/index.js.map | 1 - lib/module/package.json | 1 - lib/module/typings/index.js | 10 - lib/module/typings/index.js.map | 1 - lib/typescript/ReactNativeZoomableView.d.ts | 246 ---- .../ReactNativeZoomableView.d.ts.map | 1 - lib/typescript/animations/index.d.ts | 6 - lib/typescript/animations/index.d.ts.map | 1 - .../components/AnimatedTouchFeedback.d.ts | 8 - .../components/AnimatedTouchFeedback.d.ts.map | 1 - lib/typescript/components/StaticPin.d.ts | 19 - lib/typescript/components/StaticPin.d.ts.map | 1 - lib/typescript/components/index.d.ts | 2 - lib/typescript/components/index.d.ts.map | 1 - lib/typescript/debugHelper/index.d.ts | 13 - lib/typescript/debugHelper/index.d.ts.map | 1 - .../helper/applyPanBoundariesToOffset.d.ts | 15 - .../applyPanBoundariesToOffset.d.ts.map | 1 - .../calcNewScaledOffsetForZoomCentering.d.ts | 52 - ...lcNewScaledOffsetForZoomCentering.d.ts.map | 1 - .../helper/coordinateConversion.d.ts | 44 - .../helper/coordinateConversion.d.ts.map | 1 - lib/typescript/helper/index.d.ts | 17 - lib/typescript/helper/index.d.ts.map | 1 - lib/typescript/index.d.ts | 5 - lib/typescript/index.d.ts.map | 1 - lib/typescript/typings/index.d.ts | 111 -- lib/typescript/typings/index.d.ts.map | 1 - package.json | 2 +- 78 files changed, 4 insertions(+), 3824 deletions(-) delete mode 100644 lib/commonjs/ReactNativeZoomableView.js delete mode 100644 lib/commonjs/ReactNativeZoomableView.js.map delete mode 100644 lib/commonjs/animations/index.js delete mode 100644 lib/commonjs/animations/index.js.map delete mode 100644 lib/commonjs/assets/pin.png delete mode 100644 lib/commonjs/components/AnimatedTouchFeedback.js delete mode 100644 lib/commonjs/components/AnimatedTouchFeedback.js.map delete mode 100644 lib/commonjs/components/StaticPin.js delete mode 100644 lib/commonjs/components/StaticPin.js.map delete mode 100644 lib/commonjs/components/index.js delete mode 100644 lib/commonjs/components/index.js.map delete mode 100644 lib/commonjs/debugHelper/index.js delete mode 100644 lib/commonjs/debugHelper/index.js.map delete mode 100644 lib/commonjs/helper/applyPanBoundariesToOffset.js delete mode 100644 lib/commonjs/helper/applyPanBoundariesToOffset.js.map delete mode 100644 lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js delete mode 100644 lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js.map delete mode 100644 lib/commonjs/helper/coordinateConversion.js delete mode 100644 lib/commonjs/helper/coordinateConversion.js.map delete mode 100644 lib/commonjs/helper/index.js delete mode 100644 lib/commonjs/helper/index.js.map delete mode 100644 lib/commonjs/index.js delete mode 100644 lib/commonjs/index.js.map delete mode 100644 lib/commonjs/package.json delete mode 100644 lib/commonjs/typings/index.js delete mode 100644 lib/commonjs/typings/index.js.map delete mode 100644 lib/module/ReactNativeZoomableView.js delete mode 100644 lib/module/ReactNativeZoomableView.js.map delete mode 100644 lib/module/animations/index.js delete mode 100644 lib/module/animations/index.js.map delete mode 100644 lib/module/assets/pin.png delete mode 100644 lib/module/components/AnimatedTouchFeedback.js delete mode 100644 lib/module/components/AnimatedTouchFeedback.js.map delete mode 100644 lib/module/components/StaticPin.js delete mode 100644 lib/module/components/StaticPin.js.map delete mode 100644 lib/module/components/index.js delete mode 100644 lib/module/components/index.js.map delete mode 100644 lib/module/debugHelper/index.js delete mode 100644 lib/module/debugHelper/index.js.map delete mode 100644 lib/module/helper/applyPanBoundariesToOffset.js delete mode 100644 lib/module/helper/applyPanBoundariesToOffset.js.map delete mode 100644 lib/module/helper/calcNewScaledOffsetForZoomCentering.js delete mode 100644 lib/module/helper/calcNewScaledOffsetForZoomCentering.js.map delete mode 100644 lib/module/helper/coordinateConversion.js delete mode 100644 lib/module/helper/coordinateConversion.js.map delete mode 100644 lib/module/helper/index.js delete mode 100644 lib/module/helper/index.js.map delete mode 100644 lib/module/index.js delete mode 100644 lib/module/index.js.map delete mode 100644 lib/module/package.json delete mode 100644 lib/module/typings/index.js delete mode 100644 lib/module/typings/index.js.map delete mode 100644 lib/typescript/ReactNativeZoomableView.d.ts delete mode 100644 lib/typescript/ReactNativeZoomableView.d.ts.map delete mode 100644 lib/typescript/animations/index.d.ts delete mode 100644 lib/typescript/animations/index.d.ts.map delete mode 100644 lib/typescript/components/AnimatedTouchFeedback.d.ts delete mode 100644 lib/typescript/components/AnimatedTouchFeedback.d.ts.map delete mode 100644 lib/typescript/components/StaticPin.d.ts delete mode 100644 lib/typescript/components/StaticPin.d.ts.map delete mode 100644 lib/typescript/components/index.d.ts delete mode 100644 lib/typescript/components/index.d.ts.map delete mode 100644 lib/typescript/debugHelper/index.d.ts delete mode 100644 lib/typescript/debugHelper/index.d.ts.map delete mode 100644 lib/typescript/helper/applyPanBoundariesToOffset.d.ts delete mode 100644 lib/typescript/helper/applyPanBoundariesToOffset.d.ts.map delete mode 100644 lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts delete mode 100644 lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts.map delete mode 100644 lib/typescript/helper/coordinateConversion.d.ts delete mode 100644 lib/typescript/helper/coordinateConversion.d.ts.map delete mode 100644 lib/typescript/helper/index.d.ts delete mode 100644 lib/typescript/helper/index.d.ts.map delete mode 100644 lib/typescript/index.d.ts delete mode 100644 lib/typescript/index.d.ts.map delete mode 100644 lib/typescript/typings/index.d.ts delete mode 100644 lib/typescript/typings/index.d.ts.map diff --git a/.gitignore b/.gitignore index 9da62398..77e6f42c 100644 --- a/.gitignore +++ b/.gitignore @@ -53,5 +53,8 @@ buck-out/ android/app/libs android/keystores/debug.keystore +# Build output +lib/ + # Expo .expo/* diff --git a/lib/commonjs/ReactNativeZoomableView.js b/lib/commonjs/ReactNativeZoomableView.js deleted file mode 100644 index a682c4bf..00000000 --- a/lib/commonjs/ReactNativeZoomableView.js +++ /dev/null @@ -1,1058 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = exports.ReactNativeZoomableView = void 0; -var _lodash = require("lodash"); -var _react = _interopRequireWildcard(require("react")); -var _reactNative = require("react-native"); -var _animations = require("./animations"); -var _components = require("./components"); -var _StaticPin = require("./components/StaticPin"); -var _debugHelper = require("./debugHelper"); -var _helper = require("./helper"); -var _applyPanBoundariesToOffset = require("./helper/applyPanBoundariesToOffset"); -var _coordinateConversion = require("./helper/coordinateConversion"); -var _jsxRuntime = require("react/jsx-runtime"); -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } -const initialState = { - originalWidth: 0, - originalHeight: 0, - originalPageX: 0, - originalPageY: 0, - originalX: 0, - originalY: 0, - pinSize: { - width: 0, - height: 0 - } -}; -class ReactNativeZoomableView extends _react.Component { - static defaultProps = { - zoomEnabled: true, - panEnabled: true, - initialZoom: 1, - initialOffsetX: 0, - initialOffsetY: 0, - maxZoom: 1.5, - minZoom: 0.5, - pinchToZoomInSensitivity: 1, - pinchToZoomOutSensitivity: 1, - movementSensibility: 1, - doubleTapDelay: 300, - bindToBorders: true, - zoomStep: 0.5, - onLongPress: null, - longPressDuration: 700, - contentWidth: undefined, - contentHeight: undefined, - panBoundaryPadding: 0, - visualTouchFeedbackEnabled: true, - staticPinPosition: undefined, - staticPinIcon: undefined, - onStaticPinPositionChange: undefined, - onStaticPinPositionMove: undefined, - animatePin: true, - disablePanOnInitialZoom: false - }; - panAnim = new _reactNative.Animated.ValueXY({ - x: 0, - y: 0 - }); - zoomAnim = new _reactNative.Animated.Value(1); - pinAnim = new _reactNative.Animated.ValueXY({ - x: 0, - y: 0 - }); - __offsets = { - x: { - value: 0, - boundaryCrossedAnimInEffect: false - }, - y: { - value: 0, - boundaryCrossedAnimInEffect: false - } - }; - zoomLevel = 1; - lastGestureCenterPosition = null; - lastGestureTouchDistance = null; - _gestureStarted = false; - set gestureStarted(v) { - this._gestureStarted = v; - } - get gestureStarted() { - return this._gestureStarted; - } - - /** - * Last press time (used to evaluate whether user double tapped) - * @type {number} - */ - longPressTimeout = null; - touches = []; - constructor(props) { - super(props); - // This needs to be done before anything else to initialize the state. - // Otherwise, the logic below may reference the state when it's undefined, - // causing runtime errors. - this.state = { - ...initialState - }; - this.gestureHandlers = _reactNative.PanResponder.create({ - onStartShouldSetPanResponder: this._handleStartShouldSetPanResponder, - onPanResponderGrant: this._handlePanResponderGrant, - onPanResponderMove: this._handlePanResponderMove, - onPanResponderRelease: this._handlePanResponderEnd, - onPanResponderTerminate: (evt, gestureState) => { - // We should also call _handlePanResponderEnd - // to properly perform cleanups when the gesture is terminated - // (aka gesture handling responsibility is taken over by another component). - // This also fixes a weird issue where - // on real device, sometimes onPanResponderRelease is not called when you lift 2 fingers up, - // but onPanResponderTerminate is called instead for no apparent reason. - this._handlePanResponderEnd(evt, gestureState); - this.props.onPanResponderTerminate?.(evt, gestureState, this._getZoomableViewEventObject()); - }, - onPanResponderTerminationRequest: (evt, gestureState) => !!this.props.onPanResponderTerminationRequest?.(evt, gestureState, this._getZoomableViewEventObject()), - // Defaults to true to prevent parent components, such as React Navigation's tab view, from taking over as responder. - onShouldBlockNativeResponder: (evt, gestureState) => this.props.onShouldBlockNativeResponder?.(evt, gestureState, this._getZoomableViewEventObject()) ?? true, - onStartShouldSetPanResponderCapture: (evt, gestureState) => !!this.props.onStartShouldSetPanResponderCapture?.(evt, gestureState), - onMoveShouldSetPanResponderCapture: (evt, gestureState) => !!this.props.onMoveShouldSetPanResponderCapture?.(evt, gestureState) - }); - this.zoomSubjectWrapperRef = /*#__PURE__*/(0, _react.createRef)(); - if (this.props.zoomAnimatedValue) this.zoomAnim = this.props.zoomAnimatedValue; - if (this.props.panAnimatedValueXY) this.panAnim = this.props.panAnimatedValueXY; - if (this.props.initialZoom) this.zoomLevel = this.props.initialZoom; - if (this.props.initialOffsetX != null) this.offsetX = this.props.initialOffsetX; - if (this.props.initialOffsetY != null) this.offsetY = this.props.initialOffsetY; - this.panAnim.setValue({ - x: this.offsetX, - y: this.offsetY - }); - this.zoomAnim.setValue(this.zoomLevel); - this.panAnim.addListener(({ - x, - y - }) => { - this.offsetX = x; - this.offsetY = y; - }); - this.zoomAnim.addListener(({ - value - }) => { - this.zoomLevel = value; - }); - this.lastGestureTouchDistance = 150; - this.gestureType = null; - } - raisePin() { - if (!this.props.animatePin) return; - _reactNative.Animated.timing(this.pinAnim, { - toValue: { - x: 0, - y: -10 - }, - useNativeDriver: true, - easing: _reactNative.Easing.out(_reactNative.Easing.ease), - duration: 100 - }).start(); - } - dropPin() { - if (!this.props.animatePin) return; - _reactNative.Animated.timing(this.pinAnim, { - toValue: { - x: 0, - y: 0 - }, - useNativeDriver: true, - easing: _reactNative.Easing.out(_reactNative.Easing.ease), - duration: 100 - }).start(); - } - set offsetX(x) { - this.__setOffset('x', x); - } - set offsetY(y) { - this.__setOffset('y', y); - } - get offsetX() { - return this.__getOffset('x'); - } - get offsetY() { - return this.__getOffset('y'); - } - __setOffset(axis, offset) { - const offsetState = this.__offsets[axis]; - if (this.props.bindToBorders) { - const containerSize = axis === 'x' ? this.state.originalWidth : this.state.originalHeight; - const contentSize = axis === 'x' ? this.props.contentWidth || this.state.originalWidth : this.props.contentHeight || this.state.originalHeight; - const boundOffset = contentSize && containerSize && this.props.panBoundaryPadding != null ? (0, _applyPanBoundariesToOffset.applyPanBoundariesToOffset)(offset, containerSize, contentSize, this.zoomLevel, this.props.panBoundaryPadding) : offset; - if (!this.gestureType && !offsetState.boundaryCrossedAnimInEffect) { - const boundariesApplied = boundOffset !== offset && boundOffset.toFixed(3) !== offset.toFixed(3); - if (boundariesApplied) { - offsetState.boundaryCrossedAnimInEffect = true; - (0, _animations.getBoundaryCrossedAnim)(this.panAnim[axis], boundOffset).start(() => { - offsetState.boundaryCrossedAnimInEffect = false; - }); - return; - } - } - } - offsetState.value = offset; - } - __getOffset(axis) { - return this.__offsets[axis].value; - } - componentDidUpdate(prevProps, prevState) { - const { - zoomEnabled, - initialZoom - } = this.props; - if (prevProps.zoomEnabled && !zoomEnabled && initialZoom) { - this.zoomLevel = initialZoom; - this.zoomAnim.setValue(this.zoomLevel); - } - if (!this.onTransformInvocationInitialized && this._invokeOnTransform().successful) { - this.panAnim.addListener(() => this._invokeOnTransform()); - this.zoomAnim.addListener(() => this._invokeOnTransform()); - this.onTransformInvocationInitialized = true; - } - const currState = this.state; - const originalMeasurementsChanged = currState.originalHeight !== prevState.originalHeight || currState.originalWidth !== prevState.originalWidth || currState.originalPageX !== prevState.originalPageX || currState.originalPageY !== prevState.originalPageY || currState.originalX !== prevState.originalX || currState.originalY !== prevState.originalY; - const staticPinPositionChanged = prevProps.staticPinPosition?.x !== this.props.staticPinPosition?.x || prevProps.staticPinPosition?.y !== this.props.staticPinPosition?.y; - - // We use a custom `onLayout` event, so the clients can stay in-sync - // with when the internal measurements are actually saved to the state, - // thus helping them apply transformations at more accurate timings - if (originalMeasurementsChanged) { - const layout = { - width: currState.originalWidth, - height: currState.originalHeight, - x: currState.originalX, - y: currState.originalY - }; - this.props.onLayout?.({ - nativeEvent: { - layout - } - }); - } - if (this.onTransformInvocationInitialized && (originalMeasurementsChanged || staticPinPositionChanged)) { - this._invokeOnTransform(); - } - } - componentDidMount() { - this.measureZoomSubject(); - // We've already run `grabZoomSubjectOriginalMeasurements` at various events - // to make sure the measurements are promptly updated. - // However, there might be cases we haven't accounted for, especially when - // native processes are involved. To account for those cases, - // we'll use an interval here to ensure we're always up-to-date. - // The `setState` in `grabZoomSubjectOriginalMeasurements` won't trigger a rerender - // if the values given haven't changed, so we're not running performance risk here. - this.measureZoomSubjectInterval = setInterval(this.measureZoomSubject, 1e3); - } - componentWillUnmount() { - this.measureZoomSubjectInterval && clearInterval(this.measureZoomSubjectInterval); - } - debouncedOnStaticPinPositionChange = (0, _lodash.debounce)(position => this.props.onStaticPinPositionChange?.(position), 100); - - /** - * try to invoke onTransform - * @private - */ - _invokeOnTransform() { - const zoomableViewEvent = this._getZoomableViewEventObject(); - const position = this._staticPinPosition(); - if (!zoomableViewEvent.originalWidth || !zoomableViewEvent.originalHeight) return { - successful: false - }; - this.props.onTransform?.(zoomableViewEvent); - if (position) { - this.props.onStaticPinPositionMove?.(position); - this.debouncedOnStaticPinPositionChange(position); - } - return { - successful: true - }; - } - - /** - * Returns additional information about components current state for external event hooks - * - * @returns {{}} - * @private - */ - _getZoomableViewEventObject(overwriteObj = {}) { - return { - zoomLevel: this.zoomLevel, - offsetX: this.offsetX, - offsetY: this.offsetY, - originalHeight: this.state.originalHeight, - originalWidth: this.state.originalWidth, - originalPageX: this.state.originalPageX, - originalPageY: this.state.originalPageY, - ...overwriteObj - }; - } - - /** - * Get the original box dimensions and save them for later use. - * (They will be used to calculate boxBorders) - * - * @private - */ - measureZoomSubject = () => { - // make sure we measure after animations are complete - requestAnimationFrame(() => { - // this setTimeout is here to fix a weird issue on iOS where the measurements are all `0` - // when navigating back (react-navigation stack) from another view - // while closing the keyboard at the same time - setTimeout(() => { - // In normal conditions, we're supposed to measure zoomSubject instead of its wrapper. - // However, our zoomSubject may have been transformed by an initial zoomLevel or offset, - // in which case these measurements will not represent the true "original" measurements. - // We just need to make sure the zoomSubjectWrapper perfectly aligns with the zoomSubject - // (no border, space, or anything between them) - this.zoomSubjectWrapperRef.current?.measure((x, y, width, height, pageX, pageY) => { - // When the component is off-screen, these become all 0s, so we don't set them - // to avoid messing up calculations, especially ones that are done right after - // the component transitions from hidden to visible. - if (!pageX && !pageY && !width && !height) return; - - // If these values are all the same, don't re-set them in state - // this way we don't re-render - if (this.state.originalX === x && this.state.originalY === y && this.state.originalWidth === width && this.state.originalHeight === height && this.state.originalPageX === pageX && this.state.originalPageY === pageY) { - return; - } - this.setState({ - originalX: x, - originalY: y, - originalWidth: width, - originalHeight: height, - originalPageX: pageX, - originalPageY: pageY - }); - }); - }); - }); - }; - - /** - * Handles the start of touch events and checks for taps - * - * @param e - * @param gestureState - * @returns {boolean} - * - * @private - */ - _handleStartShouldSetPanResponder = (e, gestureState) => { - if (this.props.onStartShouldSetPanResponder) { - this.props.onStartShouldSetPanResponder(e, gestureState, this._getZoomableViewEventObject(), false); - } - - // Always set pan responder on start - // of gesture so we can handle tap. - // "Pan threshold validation" will be handled - // in `onPanResponderMove` instead of in `onMoveShouldSetPanResponder` - return true; - }; - - /** - * Calculates pinch distance - * - * @param e - * @param gestureState - * @private - */ - _handlePanResponderGrant = (e, gestureState) => { - if (this.props.onLongPress) { - e.persist(); - this.longPressTimeout = setTimeout(() => { - this.props.onLongPress?.(e, gestureState, this._getZoomableViewEventObject()); - this.longPressTimeout = null; - }, this.props.longPressDuration); - } - this.props.onPanResponderGrant?.(e, gestureState, this._getZoomableViewEventObject()); - this.panAnim.stopAnimation(); - this.zoomAnim.stopAnimation(); - this.gestureStarted = true; - this.raisePin(); - }; - - /** - * Handles the end of touch events - * - * @param e - * @param gestureState - * - * @private - */ - _handlePanResponderEnd = (e, gestureState) => { - if (!this.gestureType) { - this._resolveAndHandleTap(e); - } - this.setState({ - debugPoints: [] - }); - this.lastGestureCenterPosition = null; - const disableMomentum = this.props.disableMomentum || this.props.panEnabled && this.gestureType === 'shift' && this.props.disablePanOnInitialZoom && this.zoomLevel === this.props.initialZoom; - - // Trigger final shift animation unless disablePanOnInitialZoom is set and we're on the initial zoom level - // or disableMomentum - if (!disableMomentum) { - (0, _animations.getPanMomentumDecayAnim)(this.panAnim, { - x: gestureState.vx / this.zoomLevel, - y: gestureState.vy / this.zoomLevel - }).start(); - } - if (this.longPressTimeout) { - clearTimeout(this.longPressTimeout); - this.longPressTimeout = null; - } - this.props.onPanResponderEnd?.(e, gestureState, this._getZoomableViewEventObject()); - if (this.gestureType === 'pinch') { - this.props.onZoomEnd?.(e, gestureState, this._getZoomableViewEventObject()); - } else if (this.gestureType === 'shift') { - this.props.onShiftingEnd?.(e, gestureState, this._getZoomableViewEventObject()); - } - if (this.props.staticPinPosition) { - this._updateStaticPin(); - } - this.dropPin(); - this.gestureType = null; - this.gestureStarted = false; - }; - - /** - * Handles the actual movement of our pan responder - * - * @param e - * @param gestureState - * - * @private - */ - _handlePanResponderMove = (e, gestureState) => { - if (this.props.onPanResponderMove) { - if (this.props.onPanResponderMove(e, gestureState, this._getZoomableViewEventObject())) { - return false; - } - } - - // Only supports 2 touches and below, - // any invalid number will cause the gesture to end. - if (gestureState.numberActiveTouches <= 2) { - if (!this.gestureStarted) { - this._handlePanResponderGrant(e, gestureState); - } - } else { - if (this.gestureStarted) { - this._handlePanResponderEnd(e, gestureState); - } - return true; - } - if (gestureState.numberActiveTouches === 2) { - if (this.longPressTimeout) { - clearTimeout(this.longPressTimeout); - this.longPressTimeout = null; - } - - // change some measurement states when switching gesture to ensure a smooth transition - if (this.gestureType !== 'pinch') { - this.lastGestureCenterPosition = (0, _helper.calcGestureCenterPoint)(e, gestureState); - this.lastGestureTouchDistance = (0, _helper.calcGestureTouchDistance)(e, gestureState); - } - this.gestureType = 'pinch'; - this._handlePinching(e, gestureState); - } else if (gestureState.numberActiveTouches === 1) { - if (this.longPressTimeout && (Math.abs(gestureState.dx) > 5 || Math.abs(gestureState.dy) > 5)) { - clearTimeout(this.longPressTimeout); - this.longPressTimeout = null; - } - // change some measurement states when switching gesture to ensure a smooth transition - if (this.gestureType !== 'shift') { - this.lastGestureCenterPosition = (0, _helper.calcGestureCenterPoint)(e, gestureState); - } - const { - dx, - dy - } = gestureState; - const isShiftGesture = Math.abs(dx) > 2 || Math.abs(dy) > 2; - if (isShiftGesture) { - this.gestureType = 'shift'; - this._handleShifting(gestureState); - } - } - }; - - /** - * Handles the pinch movement and zooming - * - * @param e - * @param gestureState - * - * @private - */ - _handlePinching(e, gestureState) { - if (!this.props.zoomEnabled) return; - const { - maxZoom, - minZoom, - pinchToZoomInSensitivity, - pinchToZoomOutSensitivity - } = this.props; - const distance = (0, _helper.calcGestureTouchDistance)(e, gestureState); - if (this.props.onZoomBefore && this.props.onZoomBefore(e, gestureState, this._getZoomableViewEventObject())) { - return; - } - if (!distance) return; - if (!this.lastGestureTouchDistance) return; - - // define the new zoom level and take zoom level sensitivity into consideration - const zoomGrowthFromLastGestureState = distance / this.lastGestureTouchDistance; - this.lastGestureTouchDistance = distance; - const pinchToZoomSensitivity = zoomGrowthFromLastGestureState < 1 ? pinchToZoomOutSensitivity : pinchToZoomInSensitivity; - if (pinchToZoomSensitivity == null) return; - const deltaGrowth = zoomGrowthFromLastGestureState - 1; - // 0 - no resistance - // 10 - 90% resistance - const deltaGrowthAdjustedBySensitivity = deltaGrowth * (1 - pinchToZoomSensitivity * 9 / 100); - let newZoomLevel = this.zoomLevel * (1 + deltaGrowthAdjustedBySensitivity); - - // make sure max and min zoom levels are respected - if (maxZoom != null && newZoomLevel > maxZoom) { - newZoomLevel = maxZoom; - } - if (minZoom != null && newZoomLevel < minZoom) { - newZoomLevel = minZoom; - } - const gestureCenterPoint = (0, _helper.calcGestureCenterPoint)(e, gestureState); - if (!gestureCenterPoint) return; - let zoomCenter = { - x: gestureCenterPoint.x - this.state.originalPageX, - y: gestureCenterPoint.y - this.state.originalPageY - }; - if (this.props.staticPinPosition) { - // When we use a static pin position, the zoom centre is the same as that position, - // otherwise the pin moves around way too much while zooming. - zoomCenter = { - x: this.props.staticPinPosition.x, - y: this.props.staticPinPosition.y - }; - } - - // Uncomment to debug - this.props.debug && this._setPinchDebugPoints(e, zoomCenter); - const { - originalHeight, - originalWidth - } = this.state; - const oldOffsetX = this.offsetX; - const oldOffsetY = this.offsetY; - const oldScale = this.zoomLevel; - const newScale = newZoomLevel; - if (!originalHeight || !originalWidth) return; - let offsetY = (0, _helper.calcNewScaledOffsetForZoomCentering)(oldOffsetY, originalHeight, oldScale, newScale, zoomCenter.y); - let offsetX = (0, _helper.calcNewScaledOffsetForZoomCentering)(oldOffsetX, originalWidth, oldScale, newScale, zoomCenter.x); - const offsetShift = this._calcOffsetShiftSinceLastGestureState(gestureCenterPoint); - if (offsetShift) { - offsetX += offsetShift.x; - offsetY += offsetShift.y; - } - this.offsetX = offsetX; - this.offsetY = offsetY; - this.zoomLevel = newScale; - this.panAnim.setValue({ - x: this.offsetX, - y: this.offsetY - }); - this.zoomAnim.setValue(this.zoomLevel); - this.props.onZoomAfter?.(e, gestureState, this._getZoomableViewEventObject()); - } - - /** - * Used to debug pinch events - * @param gestureResponderEvent - * @param zoomCenter - * @param points - */ - _setPinchDebugPoints(gestureResponderEvent, zoomCenter, ...points) { - const { - touches - } = gestureResponderEvent.nativeEvent; - const { - originalPageY, - originalPageX - } = this.state; - this.setState({ - debugPoints: [{ - x: touches[0].pageX - originalPageX, - y: touches[0].pageY - originalPageY - }, { - x: touches[1].pageX - originalPageX, - y: touches[1].pageY - originalPageY - }, zoomCenter, ...points] - }); - } - - /** - * Calculates the amount the offset should shift since the last position during panning - * - * @param {Vec2D} gestureCenterPoint - * - * @private - */ - _calcOffsetShiftSinceLastGestureState(gestureCenterPoint) { - const { - movementSensibility - } = this.props; - let shift = null; - if (this.lastGestureCenterPosition && movementSensibility) { - const dx = gestureCenterPoint.x - this.lastGestureCenterPosition.x; - const dy = gestureCenterPoint.y - this.lastGestureCenterPosition.y; - const shiftX = dx / this.zoomLevel / movementSensibility; - const shiftY = dy / this.zoomLevel / movementSensibility; - shift = { - x: shiftX, - y: shiftY - }; - } - this.lastGestureCenterPosition = gestureCenterPoint; - return shift; - } - - /** - * Handles movement by tap and move - * - * @param gestureState - * - * @private - */ - _handleShifting(gestureState) { - // Skips shifting if panEnabled is false or disablePanOnInitialZoom is true and we're on the initial zoom level - if (!this.props.panEnabled || this.props.disablePanOnInitialZoom && this.zoomLevel === this.props.initialZoom) { - return; - } - const shift = this._calcOffsetShiftSinceLastGestureState({ - x: gestureState.moveX, - y: gestureState.moveY - }); - if (!shift) return; - const offsetX = this.offsetX + shift.x; - const offsetY = this.offsetY + shift.y; - if (this.props.debug && this.state.originalPageX && this.state.originalPageY) { - const x = gestureState.moveX - this.state.originalPageX; - const y = gestureState.moveY - this.state.originalPageY; - this.setState({ - debugPoints: [{ - x, - y - }] - }); - } - this._setNewOffsetPosition(offsetX, offsetY); - this.raisePin(); - } - - /** - * Set the state to offset moved - * - * @param {number} newOffsetX - * @param {number} newOffsetY - * @returns - */ - _setNewOffsetPosition(newOffsetX, newOffsetY) { - const { - onShiftingBefore, - onShiftingAfter - } = this.props; - if (onShiftingBefore?.(null, null, this._getZoomableViewEventObject())) { - return; - } - this.offsetX = newOffsetX; - this.offsetY = newOffsetY; - this.panAnim.setValue({ - x: this.offsetX, - y: this.offsetY - }); - this.zoomAnim.setValue(this.zoomLevel); - onShiftingAfter?.(null, null, this._getZoomableViewEventObject()); - } - - /** - * Check whether the press event is double tap - * or single tap and handle the event accordingly - * - * @param e - * - * @private - */ - _resolveAndHandleTap = e => { - const now = Date.now(); - if (this.doubleTapFirstTapReleaseTimestamp && this.props.doubleTapDelay && now - this.doubleTapFirstTapReleaseTimestamp < this.props.doubleTapDelay) { - this.doubleTapFirstTap && this._addTouch({ - ...this.doubleTapFirstTap, - id: now.toString(), - isSecondTap: true - }); - this.singleTapTimeoutId && clearTimeout(this.singleTapTimeoutId); - delete this.doubleTapFirstTapReleaseTimestamp; - delete this.singleTapTimeoutId; - delete this.doubleTapFirstTap; - this._handleDoubleTap(e); - } else { - this.doubleTapFirstTapReleaseTimestamp = now; - this.doubleTapFirstTap = { - id: now.toString(), - x: e.nativeEvent.pageX - this.state.originalPageX, - y: e.nativeEvent.pageY - this.state.originalPageY - }; - this._addTouch(this.doubleTapFirstTap); - - // persist event so e.nativeEvent is preserved after a timeout delay - e.persist(); - this.singleTapTimeoutId = setTimeout(() => { - delete this.doubleTapFirstTapReleaseTimestamp; - delete this.singleTapTimeoutId; - - // Pan to the tapped location - if (this.props.staticPinPosition && this.doubleTapFirstTap) { - const tapX = this.props.staticPinPosition.x - this.doubleTapFirstTap.x; - const tapY = this.props.staticPinPosition.y - this.doubleTapFirstTap.y; - _reactNative.Animated.timing(this.panAnim, { - toValue: { - x: this.offsetX + tapX / this.zoomLevel, - y: this.offsetY + tapY / this.zoomLevel - }, - useNativeDriver: true, - duration: 200 - }).start(() => { - this._updateStaticPin(); - }); - } - this.props.onSingleTap?.(e, this._getZoomableViewEventObject()); - }, this.props.doubleTapDelay); - } - }; - moveStaticPinTo = (position, duration) => { - const { - originalWidth, - originalHeight - } = this.state; - const { - staticPinPosition, - contentWidth, - contentHeight - } = this.props; - if (!staticPinPosition) return; - if (!originalWidth || !originalHeight) return; - if (!contentWidth || !contentHeight) return; - - // Offset for the static pin - const pinX = staticPinPosition.x - originalWidth / 2; - const pinY = staticPinPosition.y - originalHeight / 2; - this.offsetX = contentWidth / 2 - position.x + pinX / this.zoomLevel; - this.offsetY = contentHeight / 2 - position.y + pinY / this.zoomLevel; - if (duration) { - _reactNative.Animated.timing(this.panAnim, { - toValue: { - x: this.offsetX, - y: this.offsetY - }, - useNativeDriver: true, - duration - }).start(); - } else { - this.panAnim.setValue({ - x: this.offsetX, - y: this.offsetY - }); - } - }; - _staticPinPosition = () => { - if (!this.props.staticPinPosition) return; - if (!this.props.contentWidth || !this.props.contentHeight) return; - return (0, _coordinateConversion.viewportPositionToImagePosition)({ - viewportPosition: { - x: this.props.staticPinPosition.x, - y: this.props.staticPinPosition.y - }, - imageSize: { - height: this.props.contentHeight, - width: this.props.contentWidth - }, - zoomableEvent: { - ...this._getZoomableViewEventObject(), - offsetX: this.offsetX, - offsetY: this.offsetY, - zoomLevel: this.zoomLevel - } - }); - }; - _updateStaticPin = () => { - const position = this._staticPinPosition(); - if (!position) return; - this.props.onStaticPinPositionChange?.(position); - }; - _addTouch(touch) { - this.touches.push(touch); - this.setState({ - touches: [...this.touches] - }); - } - _removeTouch(touch) { - this.touches.splice(this.touches.indexOf(touch), 1); - this.setState({ - touches: [...this.touches] - }); - } - - /** - * Handles the double tap event - * - * @param e - * - * @private - */ - _handleDoubleTap(e) { - const { - onDoubleTapBefore, - onDoubleTapAfter, - doubleTapZoomToCenter - } = this.props; - onDoubleTapBefore?.(e, this._getZoomableViewEventObject()); - const nextZoomStep = this._getNextZoomStep(); - if (nextZoomStep == null) return; - const { - originalPageX, - originalPageY - } = this.state; - - // define new zoom position coordinates - const zoomPositionCoordinates = { - x: e.nativeEvent.pageX - originalPageX, - y: e.nativeEvent.pageY - originalPageY - }; - - // if doubleTapZoomToCenter enabled -> always zoom to center instead - if (doubleTapZoomToCenter) { - zoomPositionCoordinates.x = 0; - zoomPositionCoordinates.y = 0; - } - this.zoomTo(nextZoomStep, zoomPositionCoordinates); - onDoubleTapAfter?.(e, this._getZoomableViewEventObject({ - zoomLevel: nextZoomStep - })); - } - - /** - * Returns the next zoom step based on current step and zoomStep property. - * If we are zoomed all the way in -> return to initialzoom - * - * @returns {*} - */ - _getNextZoomStep() { - const { - zoomStep, - maxZoom, - initialZoom - } = this.props; - const { - zoomLevel - } = this; - if (maxZoom == null) return; - if (zoomLevel.toFixed(2) === maxZoom.toFixed(2)) { - return initialZoom; - } - if (zoomStep == null) return; - const nextZoomStep = zoomLevel * (1 + zoomStep); - if (nextZoomStep > maxZoom) { - return maxZoom; - } - return nextZoomStep; - } - - /** - * Zooms to a specific level. A "zoom center" can be provided, which specifies - * the point that will remain in the same position on the screen after the zoom. - * The coordinates of the zoom center is relative to the zoom subject. - * { x: 0, y: 0 } is the very center of the zoom subject. - * - * @param newZoomLevel - * @param zoomCenter - If not supplied, the container's center is the zoom center - */ - zoomTo(newZoomLevel, zoomCenter) { - if (!this.props.zoomEnabled) return false; - if (this.props.maxZoom && newZoomLevel > this.props.maxZoom) return false; - if (this.props.minZoom && newZoomLevel < this.props.minZoom) return false; - this.props.onZoomBefore?.(null, null, this._getZoomableViewEventObject()); - - // == Perform Pan Animation to preserve the zoom center while zooming == - let listenerId = ''; - if (zoomCenter) { - // Calculates panAnim values based on changes in zoomAnim. - let prevScale = this.zoomLevel; - // Since zoomAnim is calculated in native driver, - // it will jitter panAnim once in a while, - // because here panAnim is being calculated in js. - // However the jittering should mostly occur in simulator. - listenerId = this.zoomAnim.addListener(({ - value: newScale - }) => { - this.panAnim.setValue({ - x: (0, _helper.calcNewScaledOffsetForZoomCentering)(this.offsetX, this.state.originalWidth, prevScale, newScale, zoomCenter.x), - y: (0, _helper.calcNewScaledOffsetForZoomCentering)(this.offsetY, this.state.originalHeight, prevScale, newScale, zoomCenter.y) - }); - prevScale = newScale; - }); - } - - // == Perform Zoom Animation == - (0, _animations.getZoomToAnimation)(this.zoomAnim, newZoomLevel).start(() => { - this.zoomAnim.removeListener(listenerId); - }); - // == Zoom Animation Ends == - - this.props.onZoomAfter?.(null, null, this._getZoomableViewEventObject()); - return true; - } - - /** - * Zooms in or out by a specified change level - * Use a positive number for `zoomLevelChange` to zoom in - * Use a negative number for `zoomLevelChange` to zoom out - * - * Returns a promise if everything was updated and a boolean, whether it could be updated or if it exceeded the min/max zoom limits. - * - * @param {number | null} zoomLevelChange - * - * @return {bool} - */ - zoomBy(zoomLevelChange) { - // if no zoom level Change given -> just use zoom step - zoomLevelChange ||= this.props.zoomStep || 0; - return this.zoomTo(this.zoomLevel + zoomLevelChange); - } - - /** - * Moves the zoomed view to a specified position - * Returns a promise when finished - * - * @param {number} newOffsetX the new position we want to move it to (x-axis) - * @param {number} newOffsetY the new position we want to move it to (y-axis) - * - * @return {bool} - */ - moveTo(newOffsetX, newOffsetY) { - const { - originalWidth, - originalHeight - } = this.state; - if (!originalWidth || !originalHeight) return; - const offsetX = (newOffsetX - originalWidth / 2) / this.zoomLevel; - const offsetY = (newOffsetY - originalHeight / 2) / this.zoomLevel; - this._setNewOffsetPosition(-offsetX, -offsetY); - } - - /** - * Moves the zoomed view by a certain amount. - * - * Returns a promise when finished - * - * @param {number} offsetChangeX the amount we want to move the offset by (x-axis) - * @param {number} offsetChangeY the amount we want to move the offset by (y-axis) - * - * @return {bool} - */ - moveBy(offsetChangeX, offsetChangeY) { - const offsetX = (this.offsetX * this.zoomLevel - offsetChangeX) / this.zoomLevel; - const offsetY = (this.offsetY * this.zoomLevel - offsetChangeY) / this.zoomLevel; - this._setNewOffsetPosition(offsetX, offsetY); - } - render() { - const { - staticPinIcon, - children, - visualTouchFeedbackEnabled, - doubleTapDelay, - staticPinPosition, - onStaticPinLongPress, - onStaticPinPress, - pinProps - } = this.props; - const { - pinSize, - touches, - debugPoints = [] - } = this.state; - return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, { - style: styles.container, - ...this.gestureHandlers.panHandlers, - ref: this.zoomSubjectWrapperRef, - onLayout: this.measureZoomSubject, - children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, { - style: [styles.zoomSubject, this.props.style, { - transform: [ - // In RN79, we need to split the scale into X and Y to avoid - // the content getting pixelated when zooming in - { - scaleX: this.zoomAnim - }, { - scaleY: this.zoomAnim - }, ...this.panAnim.getTranslateTransform()] - }], - children: children - }), visualTouchFeedbackEnabled && touches?.map(touch => doubleTapDelay && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.AnimatedTouchFeedback, { - x: touch.x, - y: touch.y, - animationDuration: doubleTapDelay, - onAnimationDone: () => { - this._removeTouch(touch); - } - }, touch.id)), debugPoints.map(({ - x, - y - }, index) => { - return /*#__PURE__*/(0, _jsxRuntime.jsx)(_debugHelper.DebugTouchPoint, { - x: x, - y: y - }, index); - }), staticPinPosition && /*#__PURE__*/(0, _jsxRuntime.jsx)(_StaticPin.StaticPin, { - staticPinIcon: staticPinIcon, - staticPinPosition: staticPinPosition, - pinSize: pinSize, - onPress: onStaticPinPress, - onLongPress: onStaticPinLongPress, - onParentMove: this._handlePanResponderMove, - pinAnim: this.pinAnim, - setPinSize: size => { - this.setState({ - pinSize: size - }); - }, - pinProps: pinProps - })] - }); - } -} -exports.ReactNativeZoomableView = ReactNativeZoomableView; -const styles = _reactNative.StyleSheet.create({ - container: { - alignItems: 'center', - flex: 1, - justifyContent: 'center', - overflow: 'hidden', - position: 'relative' - }, - zoomSubject: { - alignItems: 'center', - flex: 1, - justifyContent: 'center', - width: '100%' - } -}); -var _default = exports.default = ReactNativeZoomableView; -//# sourceMappingURL=ReactNativeZoomableView.js.map \ No newline at end of file diff --git a/lib/commonjs/ReactNativeZoomableView.js.map b/lib/commonjs/ReactNativeZoomableView.js.map deleted file mode 100644 index 54e8037d..00000000 --- a/lib/commonjs/ReactNativeZoomableView.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_lodash","require","_react","_interopRequireWildcard","_reactNative","_animations","_components","_StaticPin","_debugHelper","_helper","_applyPanBoundariesToOffset","_coordinateConversion","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","initialState","originalWidth","originalHeight","originalPageX","originalPageY","originalX","originalY","pinSize","width","height","ReactNativeZoomableView","Component","defaultProps","zoomEnabled","panEnabled","initialZoom","initialOffsetX","initialOffsetY","maxZoom","minZoom","pinchToZoomInSensitivity","pinchToZoomOutSensitivity","movementSensibility","doubleTapDelay","bindToBorders","zoomStep","onLongPress","longPressDuration","contentWidth","undefined","contentHeight","panBoundaryPadding","visualTouchFeedbackEnabled","staticPinPosition","staticPinIcon","onStaticPinPositionChange","onStaticPinPositionMove","animatePin","disablePanOnInitialZoom","panAnim","Animated","ValueXY","x","y","zoomAnim","Value","pinAnim","__offsets","value","boundaryCrossedAnimInEffect","zoomLevel","lastGestureCenterPosition","lastGestureTouchDistance","_gestureStarted","gestureStarted","v","longPressTimeout","touches","constructor","props","state","gestureHandlers","PanResponder","create","onStartShouldSetPanResponder","_handleStartShouldSetPanResponder","onPanResponderGrant","_handlePanResponderGrant","onPanResponderMove","_handlePanResponderMove","onPanResponderRelease","_handlePanResponderEnd","onPanResponderTerminate","evt","gestureState","_getZoomableViewEventObject","onPanResponderTerminationRequest","onShouldBlockNativeResponder","onStartShouldSetPanResponderCapture","onMoveShouldSetPanResponderCapture","zoomSubjectWrapperRef","createRef","zoomAnimatedValue","panAnimatedValueXY","offsetX","offsetY","setValue","addListener","gestureType","raisePin","timing","toValue","useNativeDriver","easing","Easing","out","ease","duration","start","dropPin","__setOffset","__getOffset","axis","offset","offsetState","containerSize","contentSize","boundOffset","applyPanBoundariesToOffset","boundariesApplied","toFixed","getBoundaryCrossedAnim","componentDidUpdate","prevProps","prevState","onTransformInvocationInitialized","_invokeOnTransform","successful","currState","originalMeasurementsChanged","staticPinPositionChanged","layout","onLayout","nativeEvent","componentDidMount","measureZoomSubject","measureZoomSubjectInterval","setInterval","componentWillUnmount","clearInterval","debouncedOnStaticPinPositionChange","debounce","position","zoomableViewEvent","_staticPinPosition","onTransform","overwriteObj","requestAnimationFrame","setTimeout","current","measure","pageX","pageY","setState","persist","stopAnimation","_resolveAndHandleTap","debugPoints","disableMomentum","getPanMomentumDecayAnim","vx","vy","clearTimeout","onPanResponderEnd","onZoomEnd","onShiftingEnd","_updateStaticPin","numberActiveTouches","calcGestureCenterPoint","calcGestureTouchDistance","_handlePinching","Math","abs","dx","dy","isShiftGesture","_handleShifting","distance","onZoomBefore","zoomGrowthFromLastGestureState","pinchToZoomSensitivity","deltaGrowth","deltaGrowthAdjustedBySensitivity","newZoomLevel","gestureCenterPoint","zoomCenter","debug","_setPinchDebugPoints","oldOffsetX","oldOffsetY","oldScale","newScale","calcNewScaledOffsetForZoomCentering","offsetShift","_calcOffsetShiftSinceLastGestureState","onZoomAfter","gestureResponderEvent","points","shift","shiftX","shiftY","moveX","moveY","_setNewOffsetPosition","newOffsetX","newOffsetY","onShiftingBefore","onShiftingAfter","now","Date","doubleTapFirstTapReleaseTimestamp","doubleTapFirstTap","_addTouch","id","toString","isSecondTap","singleTapTimeoutId","_handleDoubleTap","tapX","tapY","onSingleTap","moveStaticPinTo","pinX","pinY","viewportPositionToImagePosition","viewportPosition","imageSize","zoomableEvent","touch","push","_removeTouch","splice","indexOf","onDoubleTapBefore","onDoubleTapAfter","doubleTapZoomToCenter","nextZoomStep","_getNextZoomStep","zoomPositionCoordinates","zoomTo","listenerId","prevScale","getZoomToAnimation","removeListener","zoomBy","zoomLevelChange","moveTo","moveBy","offsetChangeX","offsetChangeY","render","children","onStaticPinLongPress","onStaticPinPress","pinProps","jsxs","View","style","styles","container","panHandlers","ref","jsx","zoomSubject","transform","scaleX","scaleY","getTranslateTransform","map","AnimatedTouchFeedback","animationDuration","onAnimationDone","index","DebugTouchPoint","StaticPin","onPress","onParentMove","setPinSize","size","exports","StyleSheet","alignItems","flex","justifyContent","overflow","_default"],"sourceRoot":"../../src","sources":["ReactNativeZoomableView.tsx"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAYA,IAAAI,WAAA,GAAAJ,OAAA;AAKA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AAKA,IAAAS,2BAAA,GAAAT,OAAA;AACA,IAAAU,qBAAA,GAAAV,OAAA;AAAgF,IAAAW,WAAA,GAAAX,OAAA;AAAA,SAAAE,wBAAAU,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAZ,uBAAA,YAAAA,CAAAU,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAA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,aAAa,EAAEA,aAAc;QAC7BD,iBAAiB,EAAEA,iBAAkB;QACrC1B,OAAO,EAAEA,OAAQ;QACjBkQ,OAAO,EAAEtB,gBAAiB;QAC1BzN,WAAW,EAAEwN,oBAAqB;QAClCwB,YAAY,EAAE,IAAI,CAACrM,uBAAwB;QAC3CvB,OAAO,EAAE,IAAI,CAACA,OAAQ;QACtB6N,UAAU,EAAGC,IAAY,IAAK;UAC5B,IAAI,CAAC7H,QAAQ,CAAC;YAAExI,OAAO,EAAEqQ;UAAK,CAAC,CAAC;QAClC,CAAE;QACFxB,QAAQ,EAAEA;MAAS,CACpB,CACF;IAAA,CACG,CAAC;EAEX;AACF;AAACyB,OAAA,CAAAnQ,uBAAA,GAAAA,uBAAA;AAED,MAAM8O,MAAM,GAAGsB,uBAAU,CAAC/M,MAAM,CAAC;EAC/B0L,SAAS,EAAE;IACTsB,UAAU,EAAE,QAAQ;IACpBC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBC,QAAQ,EAAE,QAAQ;IAClB9I,QAAQ,EAAE;EACZ,CAAC;EACDyH,WAAW,EAAE;IACXkB,UAAU,EAAE,QAAQ;IACpBC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBzQ,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAAC,IAAA2Q,QAAA,GAAAN,OAAA,CAAAtR,OAAA,GAEYmB,uBAAuB","ignoreList":[]} diff --git a/lib/commonjs/animations/index.js b/lib/commonjs/animations/index.js deleted file mode 100644 index 83bff6a3..00000000 --- a/lib/commonjs/animations/index.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getBoundaryCrossedAnim = getBoundaryCrossedAnim; -exports.getPanMomentumDecayAnim = getPanMomentumDecayAnim; -exports.getZoomToAnimation = getZoomToAnimation; -var _reactNative = require("react-native"); -function getBoundaryCrossedAnim(animValue, toValue) { - return _reactNative.Animated.spring(animValue, { - overshootClamping: true, - toValue, - useNativeDriver: true - }); -} -function getPanMomentumDecayAnim(animValue, velocity) { - return _reactNative.Animated.decay(animValue, { - velocity, - deceleration: 0.994, - useNativeDriver: true - }); -} -function getZoomToAnimation(animValue, toValue) { - return _reactNative.Animated.timing(animValue, { - easing: _reactNative.Easing.out(_reactNative.Easing.ease), - toValue, - useNativeDriver: true - }); -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/commonjs/animations/index.js.map b/lib/commonjs/animations/index.js.map deleted file mode 100644 index fd01704c..00000000 --- a/lib/commonjs/animations/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_reactNative","require","getBoundaryCrossedAnim","animValue","toValue","Animated","spring","overshootClamping","useNativeDriver","getPanMomentumDecayAnim","velocity","decay","deceleration","getZoomToAnimation","timing","easing","Easing","out","ease"],"sourceRoot":"../../../src","sources":["animations/index.ts"],"mappings":";;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIO,SAASC,sBAAsBA,CACpCC,SAAyB,EACzBC,OAAe,EACf;EACA,OAAOC,qBAAQ,CAACC,MAAM,CAACH,SAAS,EAAE;IAChCI,iBAAiB,EAAE,IAAI;IACvBH,OAAO;IACPI,eAAe,EAAE;EACnB,CAAC,CAAC;AACJ;AAEO,SAASC,uBAAuBA,CACrCN,SAA4C,EAC5CO,QAAwB,EACxB;EACA,OAAOL,qBAAQ,CAACM,KAAK,CAACR,SAAS,EAAE;IAC/BO,QAAQ;IACRE,YAAY,EAAE,KAAK;IACnBJ,eAAe,EAAE;EACnB,CAAC,CAAC;AACJ;AAEO,SAASK,kBAAkBA,CAACV,SAAyB,EAAEC,OAAe,EAAE;EAC7E,OAAOC,qBAAQ,CAACS,MAAM,CAACX,SAAS,EAAE;IAChCY,MAAM,EAAEC,mBAAM,CAACC,GAAG,CAACD,mBAAM,CAACE,IAAI,CAAC;IAC/Bd,OAAO;IACPI,eAAe,EAAE;EACnB,CAAC,CAAC;AACJ","ignoreList":[]} diff --git a/lib/commonjs/assets/pin.png b/lib/commonjs/assets/pin.png deleted file mode 100644 index 471a7584fbc63178b49f408a62f1f82e36eeb604..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10710 zcmW++Wk6GJ7au(Y>6Vso~i0042(claXor05H-wVILw z;PJnIad%Z30Kg1TQF#5%KmV{GDA-i5{W5HFsl|Z7Q1~RQ$!_CI16)t z`=k^>${jiIIWG{g{X^q(=-Z@fNMv7K&shI+;563gv-C_@1xUl#5u^QGj9dwYs#B`S zW&7cIR~SrPB4?Q+t^1nN@nj$s0`XQMWd)bwi3v6DG~TbV zByZ;>Q_S~-rF59@W#91vvTXTS`d;@<7Z*qWygWOyGQJ zw_H!?`?chP&<@b(D`a3MybV?`?c5ZGLyPU8f3IuQv^l;gm)Q#5YGbF8x2G}D% z<5@?3v=YsRL#}s85Y9xno%PN97B2$(-A#MCRA}0DC3}hRn9c^vJD;KtM zngpS`&imAmYjZ$GxX_Dnqih?J4ZMF?cs)>mcw6-fQvHo)yui+O6bn-fy4CC)&w=EV2M0OtAM+tUV&ntFSk$FIE9=~bM~gMIeL1AEaVeBdIY4KWc^GaRdtNxNewflLoB@6?ZK!z*Mq8^cwJ-i4slYxe=bTD=vVz^M< zbQ~>{FNGhCYg>Z*z4}4R~NmKXNwsoD<(ch$?&fwpvJRnKbF_B4IFke zsg@|kXReKzX!jiSF>|*;*x+NG7$4}U{xBqLa-^6BTPl>L=p>Q)h_J;p>`Dk{5#;{L zxFp8JkRMt$d+S{+Muj3g`6;1MB?z9+URXe zxfz6KXGxHxNBfFzUYfv=BrLY6wWs^uPVM$vX_~CAZo3lX9FSRVI9E8Nm zWdn6mKu@LDoHNgBI-+EC)8?NKkpuM0y>nX74#{OPg`BZ|1 zcVd13K6q`BwkXG1YX@|($Q>cXSkLkVclIT0ujJoXWJc~3xaY}uS_n)f*_ zb`VHRGyvJ&o`cn+&&3CdsA?775lJLHMJ~w}OLwP#uL-Gk6xM#u0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Q%v*yne#3}^pPtN7|d+j?*VxSZDo#@Nr0h)w0z7X(JJ2+i_S1h>aVz&9}79^JDr zTPUr4O4>DQW_Y4GL{U~WJVu{EqB6JZ0;O`cy85iYYtil16SC4@PZSSiBY>gDZLZq# zGd+aG^KK?jo**seZ-c{H;eleRv$*gr7?gXZ4T){xn59XorVJ0p(JqW2L4Gt>^s z5FmdC`$AyQ3hlLlg1A72=zT(ycjy2Cz4UH4*mvL2pKY{mYeA0vMc;f~vm*$AVwO-| z@rg>3Q(oU^Rya7k{s2SdWpBR%by@i4bdIcSR*I*d7nr66PR0GgAAQp9$x8!F&mOMK zr(klkeB}Y|C-HJ9S=Ke&zm4!D)5z?j`pfIWW;hWyh_0U>O^&$A?@H5TWaN|}*KqU> zFBPBrGZ)HCDo~sF9E1?fFnk)0=Wx@isKzD+oJ+6il5F^P9yXFv!7M;$*B5awB+y%$ z$q&8PP{p)HSn8o=@bD*mmQQh{_pRgpav)$Vp{SS{l?Qt$(A)m@7JXr z`u(!92EtS(dIukZxRMa$Jjd6CSla7l`y1keHg@U{l6PW%px?R)kl|fY zuhsue$Z2SJip|(k+8~G46rm9na9JsQX+RU!YlyzBX-#JBC+))jb8{~mbv+-Sd)bbb zT>Fpj)H-k#8;Dr(LYgYV9$h_W;4!0KJuRHGlKD<5qGyGZiI5c8BX}59L zpO<72a-2$U7?M63{D{A}m^Xq5;V%^RA5MC{IBQ5+nB4%H3&cGE7I9cwmIgrr3=GF6 z=lpz;H~IrzqoiFpe{e8Ovah|cqerhl@Z%plak9YZ==)6+LYNUz=@#B;%a&c;3Lq}@TEcCSF^ANsy n(WLr%?-LvP|NqoCAF*n { - const appearDisappearAnimRef = (0, _react.useRef)(new _reactNative.Animated.Value(0)); - const onAnimationDoneRef = (0, _react.useRef)(onAnimationDone); - onAnimationDoneRef.current = onAnimationDone; - (0, _react.useEffect)(() => { - appearDisappearAnimRef.current.setValue(0); - const inDuration = animationDuration * 0.8; - const outDuration = animationDuration - inDuration; - _reactNative.Animated.sequence([_reactNative.Animated.timing(appearDisappearAnimRef.current, { - delay: animationDelay || 0, - toValue: 1, - duration: inDuration, - easing: _reactNative.Easing.linear, - useNativeDriver: true - }), _reactNative.Animated.timing(appearDisappearAnimRef.current, { - toValue: 0, - duration: outDuration, - easing: _reactNative.Easing.out(_reactNative.Easing.ease), - useNativeDriver: true - })]).start(() => onAnimationDoneRef.current?.()); - }, [animationDelay, animationDuration]); - return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, { - pointerEvents: "none", - style: [styles.animatedTouchFeedback, { - opacity: appearDisappearAnimRef.current.interpolate({ - inputRange: [0, 1], - outputRange: [0, 0.3] - }), - left: x - 20, - top: y - 20, - transform: [{ - scale: appearDisappearAnimRef.current.interpolate({ - inputRange: [0, 1], - outputRange: [0.5, 1] - }) - }] - }] - }); -}; -exports.AnimatedTouchFeedback = AnimatedTouchFeedback; -const styles = _reactNative.StyleSheet.create({ - animatedTouchFeedback: { - backgroundColor: 'lightgray', - borderRadius: 40, - height: 40, - position: 'absolute', - width: 40 - } -}); -//# sourceMappingURL=AnimatedTouchFeedback.js.map \ No newline at end of file diff --git a/lib/commonjs/components/AnimatedTouchFeedback.js.map b/lib/commonjs/components/AnimatedTouchFeedback.js.map deleted file mode 100644 index b33e7fbd..00000000 --- a/lib/commonjs/components/AnimatedTouchFeedback.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AnimatedTouchFeedback","x","y","animationDelay","animationDuration","onAnimationDone","appearDisappearAnimRef","useRef","Animated","Value","onAnimationDoneRef","current","useEffect","setValue","inDuration","outDuration","sequence","timing","delay","toValue","duration","easing","Easing","linear","useNativeDriver","out","ease","start","jsx","View","pointerEvents","style","styles","animatedTouchFeedback","opacity","interpolate","inputRange","outputRange","left","top","transform","scale","exports","StyleSheet","create","backgroundColor","borderRadius","height","position","width"],"sourceRoot":"../../../src","sources":["components/AnimatedTouchFeedback.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAA4D,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAErD,MAAMkB,qBAAqB,GAAGA,CAAC;EACpCC,CAAC;EACDC,CAAC;EACDC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O,EAAE5B,sBAAsB,CAACK,OAAO,CAACwB,WAAW,CAAC;QAClDC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QAClBC,WAAW,EAAE,CAAC,CAAC,EAAE,GAAG;MACtB,CAAC,CAAC;MACFC,IAAI,EAAErC,CAAC,GAAG,EAAE;MACZsC,GAAG,EAAErC,CAAC,GAAG,EAAE;MACXsC,SAAS,EAAE,CACT;QACEC,KAAK,EAAEnC,sBAAsB,CAACK,OAAO,CAACwB,WAAW,CAAC;UAChDC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;UAClBC,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC;QACtB,CAAC;MACH,CAAC;IAEL,CAAC;EACD,CACH,CAAC;AAEN,CAAC;AAACK,OAAA,CAAA1C,qBAAA,GAAAA,qBAAA;AAEF,MAAMgC,MAAM,GAAGW,uBAAU,CAACC,MAAM,CAAC;EAC/BX,qBAAqB,EAAE;IACrBY,eAAe,EAAE,WAAW;IAC5BC,YAAY,EAAE,EAAE;IAChBC,MAAM,EAAE,EAAE;IACVC,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]} diff --git a/lib/commonjs/components/StaticPin.js b/lib/commonjs/components/StaticPin.js deleted file mode 100644 index 0edb95b6..00000000 --- a/lib/commonjs/components/StaticPin.js +++ /dev/null @@ -1,91 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.StaticPin = void 0; -var _react = _interopRequireDefault(require("react")); -var _reactNative = require("react-native"); -var _jsxRuntime = require("react/jsx-runtime"); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } -const StaticPin = ({ - staticPinPosition, - pinAnim, - staticPinIcon, - pinSize, - onParentMove, - onPress, - onLongPress, - setPinSize, - pinProps = {} -}) => { - const tapTime = _react.default.useRef(0); - const transform = [{ - translateY: -pinSize.height - }, { - translateX: -pinSize.width / 2 - }, ...pinAnim.getTranslateTransform()]; - const opacity = pinSize.width && pinSize.height ? 1 : 0; - const panResponder = _react.default.useRef(_reactNative.PanResponder.create({ - onStartShouldSetPanResponder: () => { - tapTime.current = Date.now(); - - // We want to handle tap on this so set true - return true; - }, - onPanResponderMove: (evt, gestureState) => { - // However if the user moves finger we want to pass this evt to parent - // to handle panning (tap not recognized) - if (Math.abs(gestureState.dx) > 5 && Math.abs(gestureState.dy) > 5) onParentMove(evt, gestureState); - }, - onPanResponderRelease: (evt, gestureState) => { - if (Math.abs(gestureState.dx) > 5 || Math.abs(gestureState.dy) > 5) return; - const dt = Date.now() - tapTime.current; - if (onPress && dt < 500) { - onPress(evt); - } - if (onLongPress && dt > 500) { - // RN long press is 500ms - onLongPress(evt); - } - } - })).current; - return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, { - style: [{ - left: staticPinPosition.x, - top: staticPinPosition.y - }, styles.pinWrapper, { - opacity, - transform - }], - ...pinProps, - children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, { - onLayout: ({ - nativeEvent: { - layout - } - }) => { - setPinSize(layout); - }, - ...panResponder.panHandlers, - children: staticPinIcon || - /*#__PURE__*/ - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - (0, _jsxRuntime.jsx)(_reactNative.Image, { - source: require('../assets/pin.png'), - style: styles.pin - }) - }) - }); -}; -exports.StaticPin = StaticPin; -const styles = _reactNative.StyleSheet.create({ - pin: { - height: 64, - width: 48 - }, - pinWrapper: { - position: 'absolute' - } -}); -//# sourceMappingURL=StaticPin.js.map \ No newline at end of file diff --git a/lib/commonjs/components/StaticPin.js.map b/lib/commonjs/components/StaticPin.js.map deleted file mode 100644 index 8e3d3ade..00000000 --- a/lib/commonjs/components/StaticPin.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","e","__esModule","default","StaticPin","staticPinPosition","pinAnim","staticPinIcon","pinSize","onParentMove","onPress","onLongPress","setPinSize","pinProps","tapTime","React","useRef","transform","translateY","height","translateX","width","getTranslateTransform","opacity","panResponder","PanResponder","create","onStartShouldSetPanResponder","current","Date","now","onPanResponderMove","evt","gestureState","Math","abs","dx","dy","onPanResponderRelease","dt","jsx","Animated","View","style","left","x","top","y","styles","pinWrapper","children","onLayout","nativeEvent","layout","panHandlers","Image","source","pin","exports","StyleSheet","position"],"sourceRoot":"../../../src","sources":["components/StaticPin.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AASsB,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGf,MAAMG,SAAS,GAAGA,CAAC;EACxBC,iBAAiB;EACjBC,OAAO;EACPC,aAAa;EACbC,OAAO;EACPC,YAAY;EACZC,OAAO;EACPC,WAAW;EACXC,UAAU;EACVC,QAAQ,GAAG,CAAC;AAed,CAAC,KAAK;EACJ,MAAMC,OAAO,GAAGC,cAAK,CAACC,MAAM,CAAC,CAAC,CAAC;EAC/B,MAAMC,SAAS,GAAG,CAChB;IAAEC,UAAU,EAAE,CAACV,OAAO,CAACW;EAAO,CAAC,EAC/B;IAAEC,UAAU,EAAE,CAACZ,OAAO,CAACa,KAAK,GAAG;EAAE,CAAC,EAClC,GAAGf,OAAO,CAACgB,qBAAqB,CAAC,CAAC,CACnC;EAED,MAAMC,OAAO,GAAGf,OAAO,CAACa,KAAK,IAAIb,OAAO,CAACW,MAAM,GAAG,CAAC,GAAG,CAAC;EAEvD,MAAMK,YAAY,GAAGT,cAAK,CAACC,MAAM,CAC/BS,yBAAY,CAACC,MAAM,CAAC;IAClBC,4BAA4B,EAAEA,CAAA,KAAM;MAClCb,OAAO,CAACc,OAAO,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC;;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AAE,CAAC,KAAK;QACzCzC,UAAU,CAACyC,MAAM,CAAC;MACpB,CAAE;MAAA,GACE7B,YAAY,CAAC8B,WAAW;MAAAJ,QAAA,EAE3B3C,aAAa;MAAA;MACZ;MACA,IAAAP,WAAA,CAAAwC,GAAA,EAACzC,YAAA,CAAAwD,KAAK;QAACC,MAAM,EAAE1D,OAAO,CAAC,mBAAmB,CAAE;QAAC6C,KAAK,EAAEK,MAAM,CAACS;MAAI,CAAE;IAClE,CACG;EAAC,CACM,CAAC;AAEpB,CAAC;AAACC,OAAA,CAAAtD,SAAA,GAAAA,SAAA;AAEF,MAAM4C,MAAM,GAAGW,uBAAU,CAACjC,MAAM,CAAC;EAC/B+B,GAAG,EAAE;IACHtC,MAAM,EAAE,EAAE;IACVE,KAAK,EAAE;EACT,CAAC;EACD4B,UAAU,EAAE;IACVW,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]} diff --git a/lib/commonjs/components/index.js b/lib/commonjs/components/index.js deleted file mode 100644 index 00f88b3c..00000000 --- a/lib/commonjs/components/index.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "AnimatedTouchFeedback", { - enumerable: true, - get: function () { - return _AnimatedTouchFeedback.AnimatedTouchFeedback; - } -}); -var _AnimatedTouchFeedback = require("./AnimatedTouchFeedback"); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/commonjs/components/index.js.map b/lib/commonjs/components/index.js.map deleted file mode 100644 index 2f768078..00000000 --- a/lib/commonjs/components/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_AnimatedTouchFeedback","require"],"sourceRoot":"../../../src","sources":["components/index.tsx"],"mappings":";;;;;;;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA","ignoreList":[]} diff --git a/lib/commonjs/debugHelper/index.js b/lib/commonjs/debugHelper/index.js deleted file mode 100644 index 75beac3d..00000000 --- a/lib/commonjs/debugHelper/index.js +++ /dev/null @@ -1,60 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.DebugTouchPoint = exports.DebugRect = void 0; -var _react = _interopRequireDefault(require("react")); -var _reactNative = require("react-native"); -var _jsxRuntime = require("react/jsx-runtime"); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } -const DebugTouchPoint = ({ - diameter = 20, - x = 0, - y = 0, - color = 'yellow' -}) => { - const radius = diameter / 2; - return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, { - style: [styles.debugPoint, { - width: diameter, - height: diameter, - borderRadius: diameter, - backgroundColor: color, - left: x - radius, - top: y - radius - }], - pointerEvents: "none" - }); -}; -exports.DebugTouchPoint = DebugTouchPoint; -const DebugRect = ({ - height, - x = 0, - y = 0, - color = 'yellow' -}) => { - const width = 5; - return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, { - style: [styles.debugRect, { - width, - height, - backgroundColor: color, - left: x - width / 2, - top: y - }], - pointerEvents: "none" - }); -}; -exports.DebugRect = DebugRect; -const styles = _reactNative.StyleSheet.create({ - debugPoint: { - opacity: 0.7, - position: 'absolute' - }, - debugRect: { - opacity: 0.5, - position: 'absolute' - } -}); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/commonjs/debugHelper/index.js.map b/lib/commonjs/debugHelper/index.js.map deleted file mode 100644 index 8e476675..00000000 --- a/lib/commonjs/debugHelper/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","e","__esModule","default","DebugTouchPoint","diameter","x","y","color","radius","jsx","View","style","styles","debugPoint","width","height","borderRadius","backgroundColor","left","top","pointerEvents","exports","DebugRect","debugRect","StyleSheet","create","opacity","position"],"sourceRoot":"../../../src","sources":["debugHelper/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,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AAAA,SAAA;AAEF,MAAMV,MAAM,GAAGY,uBAAU,CAACC,MAAM,CAAC;EAC/BZ,UAAU,EAAE;IACVa,OAAO,EAAE,GAAG;IACZC,QAAQ,EAAE;EACZ,CAAC;EACDJ,SAAS,EAAE;IACTG,OAAO,EAAE,GAAG;IACZC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]} diff --git a/lib/commonjs/helper/applyPanBoundariesToOffset.js b/lib/commonjs/helper/applyPanBoundariesToOffset.js deleted file mode 100644 index 1b474daa..00000000 --- a/lib/commonjs/helper/applyPanBoundariesToOffset.js +++ /dev/null @@ -1,63 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.applyPanBoundariesToOffset = applyPanBoundariesToOffset; -/** - * Takes a single offset value and calculates the correct offset value - * to make sure it's within the pan boundaries - * - * - * @param offsetScaled - * @param containerSize - * @param contentSize - * @param scale - * @param boundaryPadding - see README - * - * @returns {number} - */ -function applyPanBoundariesToOffset(offsetScaled, containerSize, contentSize, scale, boundaryPadding) { - const contentSizeUnscaled = contentSize * scale; - const offsetUnscaled = offsetScaled * scale; - const contentStartBorderUnscaled = containerSize / 2 + offsetUnscaled - contentSizeUnscaled / 2; - const contentEndBorderUnscaled = contentStartBorderUnscaled + contentSizeUnscaled; - const containerStartBorder = 0; - const containerEndBorder = containerStartBorder + containerSize; - - // do not let boundary padding be greater than the container size or less than 0 - if (!boundaryPadding || boundaryPadding < 0) boundaryPadding = 0; - if (boundaryPadding > containerSize) boundaryPadding = containerSize; - - // Calculate container's measurements with boundary padding applied. - // this should shrink the container's size by the amount of the boundary padding, - // so that the content inside can be panned a bit further away from the original container's boundaries. - const paddedContainerSize = containerSize - boundaryPadding * 2; - const paddedContainerStartBorder = containerStartBorder + boundaryPadding; - const paddedContainerEndBorder = containerEndBorder - boundaryPadding; - - // if content is smaller than the padded container, - // don't let the content move - if (contentSizeUnscaled < paddedContainerSize) { - return 0; - } - - // if content is larger than the padded container, - // don't let the padded container go outside of content - - // maximum distance the content's center can move from its original position. - // assuming the content original center is the container's center. - const contentMaxOffsetScaled = (paddedContainerSize / 2 - contentSizeUnscaled / 2) / scale; - if ( - // content reaching the end boundary - contentEndBorderUnscaled < paddedContainerEndBorder) { - return contentMaxOffsetScaled; - } - if ( - // content reaching the start boundary - contentStartBorderUnscaled > paddedContainerStartBorder) { - return -contentMaxOffsetScaled; - } - return offsetScaled; -} -//# sourceMappingURL=applyPanBoundariesToOffset.js.map \ No newline at end of file diff --git a/lib/commonjs/helper/applyPanBoundariesToOffset.js.map b/lib/commonjs/helper/applyPanBoundariesToOffset.js.map deleted file mode 100644 index e8b91629..00000000 --- a/lib/commonjs/helper/applyPanBoundariesToOffset.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["applyPanBoundariesToOffset","offsetScaled","containerSize","contentSize","scale","boundaryPadding","contentSizeUnscaled","offsetUnscaled","contentStartBorderUnscaled","contentEndBorderUnscaled","containerStartBorder","containerEndBorder","paddedContainerSize","paddedContainerStartBorder","paddedContainerEndBorder","contentMaxOffsetScaled"],"sourceRoot":"../../../src","sources":["helper/applyPanBoundariesToOffset.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,0BAA0BA,CACxCC,YAAoB,EACpBC,aAAqB,EACrBC,WAAmB,EACnBC,KAAa,EACbC,eAAuB,EACvB;EACA,MAAMC,mBAAmB,GAAGH,WAAW,GAAGC,KAAK;EAC/C,MAAMG,cAAc,GAAGN,YAAY,GAAGG,KAAK;EAE3C,MAAMI,0BAA0B,GAC9BN,aAAa,GAAG,CAAC,GAAGK,cAAc,GAAGD,mBAAmB,GAAG,CAAC;EAC9D,MAAMG,wBAAwB,GAC5BD,0BAA0B,GAAGF,mBAAmB;EAElD,MAAMI,oBAAoB,GAAG,CAAC;EAC9B,MAAMC,kBAAkB,GAAGD,oBAAoB,GAAGR,aAAa;;EAE/D;EACA,IAAI,CAACG,eAAe,IAAIA,eAAe,GAAG,CAAC,EAAEA,eAAe,GAAG,CAAC;EAChE,IAAIA,eAAe,GAAGH,aAAa,EAAEG,eAAe,GAAGH,aAAa;;EAEpE;EACA;EACA;EACA,MAAMU,mBAAmB,GAAGV,aAAa,GAAGG,eAAe,GAAG,CAAC;EAC/D,MAAMQ,0BAA0B,GAAGH,oBAAoB,GAAGL,eAAe;EACzE,MAAMS,wBAAwB,GAAGH,kBAAkB,GAAGN,eAAe;;EAErE;EACA;EACA,IAAIC,mBAAmB,GAAGM,mBAAmB,EAAE;IAC7C,OAAO,CAAC;EACV;;EAEA;EACA;;EAEA;EACA;EACA,MAAMG,sBAAsB,GAC1B,CAACH,mBAAmB,GAAG,CAAC,GAAGN,mBAAmB,GAAG,CAAC,IAAIF,KAAK;EAE7D;EACE;EACAK,wBAAwB,GAAGK,wBAAwB,EACnD;IACA,OAAOC,sBAAsB;EAC/B;EACA;EACE;EACAP,0BAA0B,GAAGK,0BAA0B,EACvD;IACA,OAAO,CAACE,sBAAsB;EAChC;EAEA,OAAOd,YAAY;AACrB","ignoreList":[]} diff --git a/lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js b/lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js deleted file mode 100644 index cdf9a308..00000000 --- a/lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js +++ /dev/null @@ -1,73 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.calcNewScaledOffsetForZoomCentering = calcNewScaledOffsetForZoomCentering; -/** - * Calculates the new offset for the zoomSubject to ensure zoom center position is retained after zooming. - * Parameters should correspond to whether we need the offset for the X or Y axis - * - * ## Terms Used: - * - * - Zoom Subject: the view that's being zoomed and panned - * - Zoom Center: the point whose relative position to the window is retained - * - Unscaled: a measurement in pixels denoting the true size as observed by the users' eyes - * - Scaled: a measurement in pixels scaled to the "scale transformation" of the zoom subject to match with its true size. - * *For example:* - * If the scale on the zoom subject is 0.5, - * then to draw an actual 4px line on the zoom subject, we need to scale it to 4px / 0.5 = 8px - * 8px is the scaled measurement - * - * ## Overall idea of this algorithm: - * - * When users perform zooming by pinching the screen, - * we need to shift the zoom subject so that the position of the zoom center is always the same. - * The offset amount to shift the layer is the returned value. - * - * - * ## How we achieve our goal: - * - * To retain, the zoom center position, whenever a zoom action is performed, - * we just need to make sure the distances from all the points in the zoom subject - * to the zoom center increases or decreases by the growth rate of the scale. - * - * ``` - * newDistanceAnyPointToZoomCenter = oldDistanceAnyPointToZoomCenter * (newScale/oldScale) - * ``` - * - * We can't calculate that for all the points because there are unlimited points on a plain. - * However, due to the way `transform` works in RN, every point is scaled from the zoom subject center. - * Therefore, it's sufficient to base our calculation on the distance from the zoom subject center to the zoom center. - * - * ``` - * newDistanceZoomSubjectCenterToZoomCenter = oldDistanceZoomSubjectCenterToZoomCenter * (newScale/oldScale) - * ``` - * - * Once we have `newDistanceZoomSubjectCenterToZoomCenter`, - * we can easily calculate the position of the new center, which leads us to the offset amount. - * Refer to the code for more details - * - * @param oldOffsetXOrYScaled - * @param zoomSubjectOriginalWidthOrHeight - * @param oldScale - * @param newScale - * @param zoomCenterXOrY - */ -function calcNewScaledOffsetForZoomCentering(oldOffsetXOrYScaled, zoomSubjectOriginalWidthOrHeight, oldScale, newScale, zoomCenterXOrY) { - const oldOffSetUnscaled = oldOffsetXOrYScaled * oldScale; - const growthRate = newScale / oldScale; - - // these act like namespaces just for the sake of readability - const zoomSubjectOriginalCenter = {}; - const zoomSubjectCurrentCenter = {}; - const zoomSubjectNewCenter = {}; - zoomSubjectOriginalCenter.xOrY = zoomSubjectOriginalWidthOrHeight / 2; - zoomSubjectCurrentCenter.xOrY = zoomSubjectOriginalCenter.xOrY + oldOffSetUnscaled; - zoomSubjectCurrentCenter.distanceToZoomCenter = zoomSubjectCurrentCenter.xOrY - zoomCenterXOrY; - zoomSubjectNewCenter.distanceToZoomCenter = zoomSubjectCurrentCenter.distanceToZoomCenter * growthRate; - zoomSubjectNewCenter.xOrY = zoomSubjectNewCenter.distanceToZoomCenter + zoomCenterXOrY; - const newOffsetUnscaled = zoomSubjectNewCenter.xOrY - zoomSubjectOriginalCenter.xOrY; - return newOffsetUnscaled / newScale; -} -//# sourceMappingURL=calcNewScaledOffsetForZoomCentering.js.map \ No newline at end of file diff --git a/lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js.map b/lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js.map deleted file mode 100644 index 0b6bb9c3..00000000 --- a/lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["calcNewScaledOffsetForZoomCentering","oldOffsetXOrYScaled","zoomSubjectOriginalWidthOrHeight","oldScale","newScale","zoomCenterXOrY","oldOffSetUnscaled","growthRate","zoomSubjectOriginalCenter","zoomSubjectCurrentCenter","zoomSubjectNewCenter","xOrY","distanceToZoomCenter","newOffsetUnscaled"],"sourceRoot":"../../../src","sources":["helper/calcNewScaledOffsetForZoomCentering.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,mCAAmCA,CACjDC,mBAA2B,EAC3BC,gCAAwC,EACxCC,QAAgB,EAChBC,QAAgB,EAChBC,cAAsB,EACtB;EACA,MAAMC,iBAAiB,GAAGL,mBAAmB,GAAGE,QAAQ;EACxD,MAAMI,UAAU,GAAGH,QAAQ,GAAGD,QAAQ;;EAEtC;EACA,MAAMK,yBAAyB,GAAG,CAAC,CAAW;EAC9C,MAAMC,wBAAwB,GAAG,CAAC,CAAW;EAC7C,MAAMC,oBAAoB,GAAG,CAAC,CAAW;EAEzCF,yBAAyB,CAACG,IAAI,GAAGT,gCAAgC,GAAG,CAAC;EACrEO,wBAAwB,CAACE,IAAI,GAC3BH,yBAAyB,CAACG,IAAI,GAAGL,iBAAiB;EACpDG,wBAAwB,CAACG,oBAAoB,GAC3CH,wBAAwB,CAACE,IAAI,GAAGN,cAAc;EAEhDK,oBAAoB,CAACE,oBAAoB,GACvCH,wBAAwB,CAACG,oBAAoB,GAAGL,UAAU;EAC5DG,oBAAoB,CAACC,IAAI,GACvBD,oBAAoB,CAACE,oBAAoB,GAAGP,cAAc;EAE5D,MAAMQ,iBAAiB,GACrBH,oBAAoB,CAACC,IAAI,GAAGH,yBAAyB,CAACG,IAAI;EAE5D,OAAOE,iBAAiB,GAAGT,QAAQ;AACrC","ignoreList":[]} diff --git a/lib/commonjs/helper/coordinateConversion.js b/lib/commonjs/helper/coordinateConversion.js deleted file mode 100644 index c49c2092..00000000 --- a/lib/commonjs/helper/coordinateConversion.js +++ /dev/null @@ -1,117 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.applyContainResizeMode = applyContainResizeMode; -exports.defaultTransformSubjectData = void 0; -exports.getImageOriginOnTransformSubject = getImageOriginOnTransformSubject; -exports.viewportPositionToImagePosition = viewportPositionToImagePosition; -const defaultTransformSubjectData = exports.defaultTransformSubjectData = { - offsetX: 0, - offsetY: 0, - zoomLevel: 0, - originalWidth: 0, - originalHeight: 0, - originalPageX: 0, - originalPageY: 0 -}; - -/** - * Assuming you have an image that's being resized to fit into a container - * using the "contain" resize mode. You can use this function to calculate the - * size of the image after fitting. - * - * Since our sheet is resized in this manner, we need this function - * for things like pan boundaries and marker placement - * - * @param imgSize - * @param containerSize - */ -function applyContainResizeMode(imgSize, containerSize) { - const { - width: imageWidth, - height: imageHeight - } = imgSize; - const { - width: areaWidth, - height: areaHeight - } = containerSize; - const imageAspect = imageWidth / imageHeight; - const areaAspect = areaWidth / areaHeight; - let newSize; - if (imageAspect >= areaAspect) { - // longest edge is horizontal - newSize = { - width: areaWidth, - height: areaWidth / imageAspect - }; - } else { - // longest edge is vertical - newSize = { - width: areaHeight * imageAspect, - height: areaHeight - }; - } - if (isNaN(newSize.height)) newSize.height = areaHeight; - if (isNaN(newSize.width)) newSize.width = areaWidth; - const scale = imageWidth ? newSize.width / imageWidth : newSize.height / imageHeight; - if (!isFinite(scale)) return { - size: null, - scale: null - }; - return { - size: newSize, - scale - }; -} - -/** - * get the coord of image's origin relative to the transformSubject - * @param resizedImageSize - * @param transformSubject - */ -function getImageOriginOnTransformSubject(resizedImageSize, transformSubject) { - const { - offsetX, - offsetY, - zoomLevel, - originalWidth, - originalHeight - } = transformSubject; - return { - x: offsetX * zoomLevel + originalWidth / 2 - resizedImageSize.width / 2 * zoomLevel, - y: offsetY * zoomLevel + originalHeight / 2 - resizedImageSize.height / 2 * zoomLevel - }; -} - -/** - * Translates the coord system of a point from the viewport's space to the image's space - * - * @param pointOnContainer - * @param sheetImageSize - * @param transformSubject - * - * @return {Vec2D} returns null if point is out of the sheet's bound - */ -function viewportPositionToImagePosition({ - viewportPosition, - imageSize, - zoomableEvent -}) { - const { - size: resizedImgSize, - scale: resizedImgScale - } = applyContainResizeMode(imageSize, { - width: zoomableEvent.originalWidth, - height: zoomableEvent.originalHeight - }); - if (resizedImgScale == null) return null; - const sheetOriginOnContainer = getImageOriginOnTransformSubject(resizedImgSize, zoomableEvent); - const pointOnSheet = { - x: (viewportPosition.x - sheetOriginOnContainer.x) / zoomableEvent.zoomLevel / resizedImgScale, - y: (viewportPosition.y - sheetOriginOnContainer.y) / zoomableEvent.zoomLevel / resizedImgScale - }; - return pointOnSheet; -} -//# sourceMappingURL=coordinateConversion.js.map \ No newline at end of file diff --git a/lib/commonjs/helper/coordinateConversion.js.map b/lib/commonjs/helper/coordinateConversion.js.map deleted file mode 100644 index 88b61d95..00000000 --- a/lib/commonjs/helper/coordinateConversion.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["defaultTransformSubjectData","exports","offsetX","offsetY","zoomLevel","originalWidth","originalHeight","originalPageX","originalPageY","applyContainResizeMode","imgSize","containerSize","width","imageWidth","height","imageHeight","areaWidth","areaHeight","imageAspect","areaAspect","newSize","isNaN","scale","isFinite","size","getImageOriginOnTransformSubject","resizedImageSize","transformSubject","x","y","viewportPositionToImagePosition","viewportPosition","imageSize","zoomableEvent","resizedImgSize","resizedImgScale","sheetOriginOnContainer","pointOnSheet"],"sourceRoot":"../../../src","sources":["helper/coordinateConversion.ts"],"mappings":";;;;;;;;;AAEO,MAAMA,2BAA8C,GAAAC,OAAA,CAAAD,2BAAA,GAAG;EAC5DE,OAAO,EAAE,CAAC;EACVC,OAAO,EAAE,CAAC;EACVC,SAAS,EAAE,CAAC;EACZC,aAAa,EAAE,CAAC;EAChBC,cAAc,EAAE,CAAC;EACjBC,aAAa,EAAE,CAAC;EAChBC,aAAa,EAAE;AACjB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,sBAAsBA,CACpCC,OAAe,EACfC,aAAqB,EAC0C;EAC/D,MAAM;IAAEC,KAAK,EAAEC,UAAU;IAAEC,MAAM,EAAEC;EAAY,CAAC,GAAGL,OAAO;EAC1D,MAAM;IAAEE,KAAK,EAAEI,SAAS;IAAEF,MAAM,EAAEG;EAAW,CAAC,GAAGN,aAAa;EAC9D,MAAMO,WAAW,GAAGL,UAAU,GAAGE,WAAW;EAC5C,MAAMI,UAAU,GAAGH,SAAS,GAAGC,UAAU;EAEzC,IAAIG,OAAO;EACX,IAAIF,WAAW,IAAIC,UAAU,EAAE;IAC7B;IACAC,OAAO,GAAG;MAAER,KAAK,EAAEI,SAAS;MAAEF,MAAM,EAAEE,SAAS,GAAGE;IAAY,CAAC;EACjE,CAAC,MAAM;IACL;IACAE,OAAO,GAAG;MAAER,KAAK,EAAEK,UAAU,GAAGC,WAAW;MAAEJ,MAAM,EAAEG;IAAW,CAAC;EACnE;EAEA,IAAII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C;EAEJ,IAAI6B,eAAe,IAAI,IAAI,EAAE,OAAO,IAAI;EAExC,MAAMC,sBAAsB,GAAGX,gCAAgC,CAC7DS,cAAc,EACdD,aACF,CAAC;EAED,MAAMI,YAAY,GAAG;IACnBT,CAAC,EACC,CAACG,gBAAgB,CAACH,CAAC,GAAGQ,sBAAsB,CAACR,CAAC,IAC9CK,aAAa,CAAC7B,SAAS,GACvB+B,eAAe;IACjBN,CAAC,EACC,CAACE,gBAAgB,CAACF,CAAC,GAAGO,sBAAsB,CAACP,CAAC,IAC9CI,aAAa,CAAC7B,SAAS,GACvB+B;EACJ,CAAC;EAED,OAAOE,YAAY;AACrB","ignoreList":[]} diff --git a/lib/commonjs/helper/index.js b/lib/commonjs/helper/index.js deleted file mode 100644 index 5d28b872..00000000 --- a/lib/commonjs/helper/index.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.calcGestureCenterPoint = calcGestureCenterPoint; -exports.calcGestureTouchDistance = calcGestureTouchDistance; -Object.defineProperty(exports, "calcNewScaledOffsetForZoomCentering", { - enumerable: true, - get: function () { - return _calcNewScaledOffsetForZoomCentering.calcNewScaledOffsetForZoomCentering; - } -}); -var _calcNewScaledOffsetForZoomCentering = require("./calcNewScaledOffsetForZoomCentering"); -/** - * Calculates the gesture center point relative to the page coordinate system - * - * We're unable to use touch.locationX/Y - * because locationX uses the axis system of the leaf element that the touch occurs on, - * which makes it even more complicated to translate into our container's axis system. - * - * We're also unable to use gestureState.moveX/Y - * because gestureState.moveX/Y is messed up on real device - * (Sometimes it's the center point, but sometimes it randomly takes the position of one of the touches) - */ -function calcGestureCenterPoint(e, gestureState) { - const touches = e.nativeEvent.touches; - if (!touches[0]) return null; - if (gestureState.numberActiveTouches === 2) { - if (!touches[1]) return null; - return { - x: (touches[0].pageX + touches[1].pageX) / 2, - y: (touches[0].pageY + touches[1].pageY) / 2 - }; - } - if (gestureState.numberActiveTouches === 1) { - return { - x: touches[0].pageX, - y: touches[0].pageY - }; - } - return null; -} -function calcGestureTouchDistance(e, gestureState) { - const touches = e.nativeEvent.touches; - if (gestureState.numberActiveTouches !== 2 || !touches[0] || !touches[1]) return null; - const dx = Math.abs(touches[0].pageX - touches[1].pageX); - const dy = Math.abs(touches[0].pageY - touches[1].pageY); - return Math.sqrt(dx * dx + dy * dy); -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/commonjs/helper/index.js.map b/lib/commonjs/helper/index.js.map deleted file mode 100644 index 53f40f3c..00000000 --- a/lib/commonjs/helper/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_calcNewScaledOffsetForZoomCentering","require","calcGestureCenterPoint","e","gestureState","touches","nativeEvent","numberActiveTouches","x","pageX","y","pageY","calcGestureTouchDistance","dx","Math","abs","dy","sqrt"],"sourceRoot":"../../../src","sources":["helper/index.ts"],"mappings":";;;;;;;;;;;;;AAIA,IAAAA,oCAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,sBAAsBA,CACpCC,CAAwB,EACxBC,YAAsC,EACxB;EACd,MAAMC,OAAO,GAAGF,CAAC,CAACG,WAAW,CAACD,OAAO;EACrC,IAAI,CAACA,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,IAAI;EAE5B,IAAID,YAAY,CAACG,mBAAmB,KAAK,CAAC,EAAE;IAC1C,IAAI,CAACF,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,IAAI;IAC5B,OAAO;MACLG,CAAC,EAAE,CAACH,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK,GAAGJ,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK,IAAI,CAAC;MAC5CC,CAAC,EAAE,CAACL,OAAO,CAAC,CAAC,CAAC,CAACM,KAAK,GAAGN,OAAO,CAAC,CAAC,CAAC,CAACM,KAAK,IAAI;IAC7C,CAAC;EACH;EACA,IAAIP,YAAY,CAACG,mBAAmB,KAAK,CAAC,EAAE;IAC1C,OAAO;MACLC,CAAC,EAAEH,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK;MACnBC,CAAC,EAAEL,OAAO,CAAC,CAAC,CAAC,CAACM;IAChB,CAAC;EACH;EAEA,OAAO,IAAI;AACb;AAEO,SAASC,wBAAwBA,CACtCT,CAAwB,EACxBC,YAAsC,EACvB;EACf,MAAMC,OAAO,GAAGF,CAAC,CAACG,WAAW,CAACD,OAAO;EACrC,IAAID,YAAY,CAACG,mBAAmB,KAAK,CAAC,IAAI,CAACF,OAAO,CAAC,CAAC,CAAC,IAAI,CAACA,OAAO,CAAC,CAAC,CAAC,EACtE,OAAO,IAAI;EAEb,MAAMQ,EAAE,GAAGC,IAAI,CAACC,GAAG,CAACV,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK,GAAGJ,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK,CAAC;EACxD,MAAMO,EAAE,GAAGF,IAAI,CAACC,GAAG,CAACV,OAAO,CAAC,CAAC,CAAC,CAACM,KAAK,GAAGN,OAAO,CAAC,CAAC,CAAC,CAACM,KAAK,CAAC;EACxD,OAAOG,IAAI,CAACG,IAAI,CAACJ,EAAE,GAAGA,EAAE,GAAGG,EAAE,GAAGA,EAAE,CAAC;AACrC","ignoreList":[]} diff --git a/lib/commonjs/index.js b/lib/commonjs/index.js deleted file mode 100644 index 39cbcac4..00000000 --- a/lib/commonjs/index.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "ReactNativeZoomableView", { - enumerable: true, - get: function () { - return _ReactNativeZoomableView.default; - } -}); -Object.defineProperty(exports, "applyContainResizeMode", { - enumerable: true, - get: function () { - return _coordinateConversion.applyContainResizeMode; - } -}); -Object.defineProperty(exports, "getImageOriginOnTransformSubject", { - enumerable: true, - get: function () { - return _coordinateConversion.getImageOriginOnTransformSubject; - } -}); -Object.defineProperty(exports, "viewportPositionToImagePosition", { - enumerable: true, - get: function () { - return _coordinateConversion.viewportPositionToImagePosition; - } -}); -var _coordinateConversion = require("./helper/coordinateConversion"); -var _ReactNativeZoomableView = _interopRequireDefault(require("./ReactNativeZoomableView")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/commonjs/index.js.map b/lib/commonjs/index.js.map deleted file mode 100644 index 631e5134..00000000 --- a/lib/commonjs/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_coordinateConversion","require","_ReactNativeZoomableView","_interopRequireDefault","e","__esModule","default"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,qBAAA,GAAAC,OAAA;AAKA,IAAAC,wBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAgE,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]} diff --git a/lib/commonjs/package.json b/lib/commonjs/package.json deleted file mode 100644 index 729ac4d9..00000000 --- a/lib/commonjs/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"commonjs"} diff --git a/lib/commonjs/typings/index.js b/lib/commonjs/typings/index.js deleted file mode 100644 index 4907bab3..00000000 --- a/lib/commonjs/typings/index.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.SwipeDirection = void 0; -let SwipeDirection = exports.SwipeDirection = /*#__PURE__*/function (SwipeDirection) { - SwipeDirection["SWIPE_UP"] = "SWIPE_UP"; - SwipeDirection["SWIPE_DOWN"] = "SWIPE_DOWN"; - SwipeDirection["SWIPE_LEFT"] = "SWIPE_LEFT"; - SwipeDirection["SWIPE_RIGHT"] = "SWIPE_RIGHT"; - return SwipeDirection; -}({}); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/commonjs/typings/index.js.map b/lib/commonjs/typings/index.js.map deleted file mode 100644 index 1b6eb0df..00000000 --- a/lib/commonjs/typings/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["SwipeDirection","exports"],"sourceRoot":"../../../src","sources":["typings/index.ts"],"mappings":";;;;;;IASYA,cAAc,GAAAC,OAAA,CAAAD,cAAA,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]} diff --git a/lib/module/ReactNativeZoomableView.js b/lib/module/ReactNativeZoomableView.js deleted file mode 100644 index 8ac51081..00000000 --- a/lib/module/ReactNativeZoomableView.js +++ /dev/null @@ -1,1053 +0,0 @@ -"use strict"; - -import { debounce } from 'lodash'; -import React, { Component, createRef } from 'react'; -import { Animated, Easing, PanResponder, StyleSheet, View } from 'react-native'; -import { getBoundaryCrossedAnim, getPanMomentumDecayAnim, getZoomToAnimation } from './animations'; -import { AnimatedTouchFeedback } from './components'; -import { StaticPin } from './components/StaticPin'; -import { DebugTouchPoint } from './debugHelper'; -import { calcGestureCenterPoint, calcGestureTouchDistance, calcNewScaledOffsetForZoomCentering } from './helper'; -import { applyPanBoundariesToOffset } from './helper/applyPanBoundariesToOffset'; -import { viewportPositionToImagePosition } from './helper/coordinateConversion'; -import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; -const initialState = { - originalWidth: 0, - originalHeight: 0, - originalPageX: 0, - originalPageY: 0, - originalX: 0, - originalY: 0, - pinSize: { - width: 0, - height: 0 - } -}; -class ReactNativeZoomableView extends Component { - static defaultProps = { - zoomEnabled: true, - panEnabled: true, - initialZoom: 1, - initialOffsetX: 0, - initialOffsetY: 0, - maxZoom: 1.5, - minZoom: 0.5, - pinchToZoomInSensitivity: 1, - pinchToZoomOutSensitivity: 1, - movementSensibility: 1, - doubleTapDelay: 300, - bindToBorders: true, - zoomStep: 0.5, - onLongPress: null, - longPressDuration: 700, - contentWidth: undefined, - contentHeight: undefined, - panBoundaryPadding: 0, - visualTouchFeedbackEnabled: true, - staticPinPosition: undefined, - staticPinIcon: undefined, - onStaticPinPositionChange: undefined, - onStaticPinPositionMove: undefined, - animatePin: true, - disablePanOnInitialZoom: false - }; - panAnim = new Animated.ValueXY({ - x: 0, - y: 0 - }); - zoomAnim = new Animated.Value(1); - pinAnim = new Animated.ValueXY({ - x: 0, - y: 0 - }); - __offsets = { - x: { - value: 0, - boundaryCrossedAnimInEffect: false - }, - y: { - value: 0, - boundaryCrossedAnimInEffect: false - } - }; - zoomLevel = 1; - lastGestureCenterPosition = null; - lastGestureTouchDistance = null; - _gestureStarted = false; - set gestureStarted(v) { - this._gestureStarted = v; - } - get gestureStarted() { - return this._gestureStarted; - } - - /** - * Last press time (used to evaluate whether user double tapped) - * @type {number} - */ - longPressTimeout = null; - touches = []; - constructor(props) { - super(props); - // This needs to be done before anything else to initialize the state. - // Otherwise, the logic below may reference the state when it's undefined, - // causing runtime errors. - this.state = { - ...initialState - }; - this.gestureHandlers = PanResponder.create({ - onStartShouldSetPanResponder: this._handleStartShouldSetPanResponder, - onPanResponderGrant: this._handlePanResponderGrant, - onPanResponderMove: this._handlePanResponderMove, - onPanResponderRelease: this._handlePanResponderEnd, - onPanResponderTerminate: (evt, gestureState) => { - // We should also call _handlePanResponderEnd - // to properly perform cleanups when the gesture is terminated - // (aka gesture handling responsibility is taken over by another component). - // This also fixes a weird issue where - // on real device, sometimes onPanResponderRelease is not called when you lift 2 fingers up, - // but onPanResponderTerminate is called instead for no apparent reason. - this._handlePanResponderEnd(evt, gestureState); - this.props.onPanResponderTerminate?.(evt, gestureState, this._getZoomableViewEventObject()); - }, - onPanResponderTerminationRequest: (evt, gestureState) => !!this.props.onPanResponderTerminationRequest?.(evt, gestureState, this._getZoomableViewEventObject()), - // Defaults to true to prevent parent components, such as React Navigation's tab view, from taking over as responder. - onShouldBlockNativeResponder: (evt, gestureState) => this.props.onShouldBlockNativeResponder?.(evt, gestureState, this._getZoomableViewEventObject()) ?? true, - onStartShouldSetPanResponderCapture: (evt, gestureState) => !!this.props.onStartShouldSetPanResponderCapture?.(evt, gestureState), - onMoveShouldSetPanResponderCapture: (evt, gestureState) => !!this.props.onMoveShouldSetPanResponderCapture?.(evt, gestureState) - }); - this.zoomSubjectWrapperRef = /*#__PURE__*/createRef(); - if (this.props.zoomAnimatedValue) this.zoomAnim = this.props.zoomAnimatedValue; - if (this.props.panAnimatedValueXY) this.panAnim = this.props.panAnimatedValueXY; - if (this.props.initialZoom) this.zoomLevel = this.props.initialZoom; - if (this.props.initialOffsetX != null) this.offsetX = this.props.initialOffsetX; - if (this.props.initialOffsetY != null) this.offsetY = this.props.initialOffsetY; - this.panAnim.setValue({ - x: this.offsetX, - y: this.offsetY - }); - this.zoomAnim.setValue(this.zoomLevel); - this.panAnim.addListener(({ - x, - y - }) => { - this.offsetX = x; - this.offsetY = y; - }); - this.zoomAnim.addListener(({ - value - }) => { - this.zoomLevel = value; - }); - this.lastGestureTouchDistance = 150; - this.gestureType = null; - } - raisePin() { - if (!this.props.animatePin) return; - Animated.timing(this.pinAnim, { - toValue: { - x: 0, - y: -10 - }, - useNativeDriver: true, - easing: Easing.out(Easing.ease), - duration: 100 - }).start(); - } - dropPin() { - if (!this.props.animatePin) return; - Animated.timing(this.pinAnim, { - toValue: { - x: 0, - y: 0 - }, - useNativeDriver: true, - easing: Easing.out(Easing.ease), - duration: 100 - }).start(); - } - set offsetX(x) { - this.__setOffset('x', x); - } - set offsetY(y) { - this.__setOffset('y', y); - } - get offsetX() { - return this.__getOffset('x'); - } - get offsetY() { - return this.__getOffset('y'); - } - __setOffset(axis, offset) { - const offsetState = this.__offsets[axis]; - if (this.props.bindToBorders) { - const containerSize = axis === 'x' ? this.state.originalWidth : this.state.originalHeight; - const contentSize = axis === 'x' ? this.props.contentWidth || this.state.originalWidth : this.props.contentHeight || this.state.originalHeight; - const boundOffset = contentSize && containerSize && this.props.panBoundaryPadding != null ? applyPanBoundariesToOffset(offset, containerSize, contentSize, this.zoomLevel, this.props.panBoundaryPadding) : offset; - if (!this.gestureType && !offsetState.boundaryCrossedAnimInEffect) { - const boundariesApplied = boundOffset !== offset && boundOffset.toFixed(3) !== offset.toFixed(3); - if (boundariesApplied) { - offsetState.boundaryCrossedAnimInEffect = true; - getBoundaryCrossedAnim(this.panAnim[axis], boundOffset).start(() => { - offsetState.boundaryCrossedAnimInEffect = false; - }); - return; - } - } - } - offsetState.value = offset; - } - __getOffset(axis) { - return this.__offsets[axis].value; - } - componentDidUpdate(prevProps, prevState) { - const { - zoomEnabled, - initialZoom - } = this.props; - if (prevProps.zoomEnabled && !zoomEnabled && initialZoom) { - this.zoomLevel = initialZoom; - this.zoomAnim.setValue(this.zoomLevel); - } - if (!this.onTransformInvocationInitialized && this._invokeOnTransform().successful) { - this.panAnim.addListener(() => this._invokeOnTransform()); - this.zoomAnim.addListener(() => this._invokeOnTransform()); - this.onTransformInvocationInitialized = true; - } - const currState = this.state; - const originalMeasurementsChanged = currState.originalHeight !== prevState.originalHeight || currState.originalWidth !== prevState.originalWidth || currState.originalPageX !== prevState.originalPageX || currState.originalPageY !== prevState.originalPageY || currState.originalX !== prevState.originalX || currState.originalY !== prevState.originalY; - const staticPinPositionChanged = prevProps.staticPinPosition?.x !== this.props.staticPinPosition?.x || prevProps.staticPinPosition?.y !== this.props.staticPinPosition?.y; - - // We use a custom `onLayout` event, so the clients can stay in-sync - // with when the internal measurements are actually saved to the state, - // thus helping them apply transformations at more accurate timings - if (originalMeasurementsChanged) { - const layout = { - width: currState.originalWidth, - height: currState.originalHeight, - x: currState.originalX, - y: currState.originalY - }; - this.props.onLayout?.({ - nativeEvent: { - layout - } - }); - } - if (this.onTransformInvocationInitialized && (originalMeasurementsChanged || staticPinPositionChanged)) { - this._invokeOnTransform(); - } - } - componentDidMount() { - this.measureZoomSubject(); - // We've already run `grabZoomSubjectOriginalMeasurements` at various events - // to make sure the measurements are promptly updated. - // However, there might be cases we haven't accounted for, especially when - // native processes are involved. To account for those cases, - // we'll use an interval here to ensure we're always up-to-date. - // The `setState` in `grabZoomSubjectOriginalMeasurements` won't trigger a rerender - // if the values given haven't changed, so we're not running performance risk here. - this.measureZoomSubjectInterval = setInterval(this.measureZoomSubject, 1e3); - } - componentWillUnmount() { - this.measureZoomSubjectInterval && clearInterval(this.measureZoomSubjectInterval); - } - debouncedOnStaticPinPositionChange = debounce(position => this.props.onStaticPinPositionChange?.(position), 100); - - /** - * try to invoke onTransform - * @private - */ - _invokeOnTransform() { - const zoomableViewEvent = this._getZoomableViewEventObject(); - const position = this._staticPinPosition(); - if (!zoomableViewEvent.originalWidth || !zoomableViewEvent.originalHeight) return { - successful: false - }; - this.props.onTransform?.(zoomableViewEvent); - if (position) { - this.props.onStaticPinPositionMove?.(position); - this.debouncedOnStaticPinPositionChange(position); - } - return { - successful: true - }; - } - - /** - * Returns additional information about components current state for external event hooks - * - * @returns {{}} - * @private - */ - _getZoomableViewEventObject(overwriteObj = {}) { - return { - zoomLevel: this.zoomLevel, - offsetX: this.offsetX, - offsetY: this.offsetY, - originalHeight: this.state.originalHeight, - originalWidth: this.state.originalWidth, - originalPageX: this.state.originalPageX, - originalPageY: this.state.originalPageY, - ...overwriteObj - }; - } - - /** - * Get the original box dimensions and save them for later use. - * (They will be used to calculate boxBorders) - * - * @private - */ - measureZoomSubject = () => { - // make sure we measure after animations are complete - requestAnimationFrame(() => { - // this setTimeout is here to fix a weird issue on iOS where the measurements are all `0` - // when navigating back (react-navigation stack) from another view - // while closing the keyboard at the same time - setTimeout(() => { - // In normal conditions, we're supposed to measure zoomSubject instead of its wrapper. - // However, our zoomSubject may have been transformed by an initial zoomLevel or offset, - // in which case these measurements will not represent the true "original" measurements. - // We just need to make sure the zoomSubjectWrapper perfectly aligns with the zoomSubject - // (no border, space, or anything between them) - this.zoomSubjectWrapperRef.current?.measure((x, y, width, height, pageX, pageY) => { - // When the component is off-screen, these become all 0s, so we don't set them - // to avoid messing up calculations, especially ones that are done right after - // the component transitions from hidden to visible. - if (!pageX && !pageY && !width && !height) return; - - // If these values are all the same, don't re-set them in state - // this way we don't re-render - if (this.state.originalX === x && this.state.originalY === y && this.state.originalWidth === width && this.state.originalHeight === height && this.state.originalPageX === pageX && this.state.originalPageY === pageY) { - return; - } - this.setState({ - originalX: x, - originalY: y, - originalWidth: width, - originalHeight: height, - originalPageX: pageX, - originalPageY: pageY - }); - }); - }); - }); - }; - - /** - * Handles the start of touch events and checks for taps - * - * @param e - * @param gestureState - * @returns {boolean} - * - * @private - */ - _handleStartShouldSetPanResponder = (e, gestureState) => { - if (this.props.onStartShouldSetPanResponder) { - this.props.onStartShouldSetPanResponder(e, gestureState, this._getZoomableViewEventObject(), false); - } - - // Always set pan responder on start - // of gesture so we can handle tap. - // "Pan threshold validation" will be handled - // in `onPanResponderMove` instead of in `onMoveShouldSetPanResponder` - return true; - }; - - /** - * Calculates pinch distance - * - * @param e - * @param gestureState - * @private - */ - _handlePanResponderGrant = (e, gestureState) => { - if (this.props.onLongPress) { - e.persist(); - this.longPressTimeout = setTimeout(() => { - this.props.onLongPress?.(e, gestureState, this._getZoomableViewEventObject()); - this.longPressTimeout = null; - }, this.props.longPressDuration); - } - this.props.onPanResponderGrant?.(e, gestureState, this._getZoomableViewEventObject()); - this.panAnim.stopAnimation(); - this.zoomAnim.stopAnimation(); - this.gestureStarted = true; - this.raisePin(); - }; - - /** - * Handles the end of touch events - * - * @param e - * @param gestureState - * - * @private - */ - _handlePanResponderEnd = (e, gestureState) => { - if (!this.gestureType) { - this._resolveAndHandleTap(e); - } - this.setState({ - debugPoints: [] - }); - this.lastGestureCenterPosition = null; - const disableMomentum = this.props.disableMomentum || this.props.panEnabled && this.gestureType === 'shift' && this.props.disablePanOnInitialZoom && this.zoomLevel === this.props.initialZoom; - - // Trigger final shift animation unless disablePanOnInitialZoom is set and we're on the initial zoom level - // or disableMomentum - if (!disableMomentum) { - getPanMomentumDecayAnim(this.panAnim, { - x: gestureState.vx / this.zoomLevel, - y: gestureState.vy / this.zoomLevel - }).start(); - } - if (this.longPressTimeout) { - clearTimeout(this.longPressTimeout); - this.longPressTimeout = null; - } - this.props.onPanResponderEnd?.(e, gestureState, this._getZoomableViewEventObject()); - if (this.gestureType === 'pinch') { - this.props.onZoomEnd?.(e, gestureState, this._getZoomableViewEventObject()); - } else if (this.gestureType === 'shift') { - this.props.onShiftingEnd?.(e, gestureState, this._getZoomableViewEventObject()); - } - if (this.props.staticPinPosition) { - this._updateStaticPin(); - } - this.dropPin(); - this.gestureType = null; - this.gestureStarted = false; - }; - - /** - * Handles the actual movement of our pan responder - * - * @param e - * @param gestureState - * - * @private - */ - _handlePanResponderMove = (e, gestureState) => { - if (this.props.onPanResponderMove) { - if (this.props.onPanResponderMove(e, gestureState, this._getZoomableViewEventObject())) { - return false; - } - } - - // Only supports 2 touches and below, - // any invalid number will cause the gesture to end. - if (gestureState.numberActiveTouches <= 2) { - if (!this.gestureStarted) { - this._handlePanResponderGrant(e, gestureState); - } - } else { - if (this.gestureStarted) { - this._handlePanResponderEnd(e, gestureState); - } - return true; - } - if (gestureState.numberActiveTouches === 2) { - if (this.longPressTimeout) { - clearTimeout(this.longPressTimeout); - this.longPressTimeout = null; - } - - // change some measurement states when switching gesture to ensure a smooth transition - if (this.gestureType !== 'pinch') { - this.lastGestureCenterPosition = calcGestureCenterPoint(e, gestureState); - this.lastGestureTouchDistance = calcGestureTouchDistance(e, gestureState); - } - this.gestureType = 'pinch'; - this._handlePinching(e, gestureState); - } else if (gestureState.numberActiveTouches === 1) { - if (this.longPressTimeout && (Math.abs(gestureState.dx) > 5 || Math.abs(gestureState.dy) > 5)) { - clearTimeout(this.longPressTimeout); - this.longPressTimeout = null; - } - // change some measurement states when switching gesture to ensure a smooth transition - if (this.gestureType !== 'shift') { - this.lastGestureCenterPosition = calcGestureCenterPoint(e, gestureState); - } - const { - dx, - dy - } = gestureState; - const isShiftGesture = Math.abs(dx) > 2 || Math.abs(dy) > 2; - if (isShiftGesture) { - this.gestureType = 'shift'; - this._handleShifting(gestureState); - } - } - }; - - /** - * Handles the pinch movement and zooming - * - * @param e - * @param gestureState - * - * @private - */ - _handlePinching(e, gestureState) { - if (!this.props.zoomEnabled) return; - const { - maxZoom, - minZoom, - pinchToZoomInSensitivity, - pinchToZoomOutSensitivity - } = this.props; - const distance = calcGestureTouchDistance(e, gestureState); - if (this.props.onZoomBefore && this.props.onZoomBefore(e, gestureState, this._getZoomableViewEventObject())) { - return; - } - if (!distance) return; - if (!this.lastGestureTouchDistance) return; - - // define the new zoom level and take zoom level sensitivity into consideration - const zoomGrowthFromLastGestureState = distance / this.lastGestureTouchDistance; - this.lastGestureTouchDistance = distance; - const pinchToZoomSensitivity = zoomGrowthFromLastGestureState < 1 ? pinchToZoomOutSensitivity : pinchToZoomInSensitivity; - if (pinchToZoomSensitivity == null) return; - const deltaGrowth = zoomGrowthFromLastGestureState - 1; - // 0 - no resistance - // 10 - 90% resistance - const deltaGrowthAdjustedBySensitivity = deltaGrowth * (1 - pinchToZoomSensitivity * 9 / 100); - let newZoomLevel = this.zoomLevel * (1 + deltaGrowthAdjustedBySensitivity); - - // make sure max and min zoom levels are respected - if (maxZoom != null && newZoomLevel > maxZoom) { - newZoomLevel = maxZoom; - } - if (minZoom != null && newZoomLevel < minZoom) { - newZoomLevel = minZoom; - } - const gestureCenterPoint = calcGestureCenterPoint(e, gestureState); - if (!gestureCenterPoint) return; - let zoomCenter = { - x: gestureCenterPoint.x - this.state.originalPageX, - y: gestureCenterPoint.y - this.state.originalPageY - }; - if (this.props.staticPinPosition) { - // When we use a static pin position, the zoom centre is the same as that position, - // otherwise the pin moves around way too much while zooming. - zoomCenter = { - x: this.props.staticPinPosition.x, - y: this.props.staticPinPosition.y - }; - } - - // Uncomment to debug - this.props.debug && this._setPinchDebugPoints(e, zoomCenter); - const { - originalHeight, - originalWidth - } = this.state; - const oldOffsetX = this.offsetX; - const oldOffsetY = this.offsetY; - const oldScale = this.zoomLevel; - const newScale = newZoomLevel; - if (!originalHeight || !originalWidth) return; - let offsetY = calcNewScaledOffsetForZoomCentering(oldOffsetY, originalHeight, oldScale, newScale, zoomCenter.y); - let offsetX = calcNewScaledOffsetForZoomCentering(oldOffsetX, originalWidth, oldScale, newScale, zoomCenter.x); - const offsetShift = this._calcOffsetShiftSinceLastGestureState(gestureCenterPoint); - if (offsetShift) { - offsetX += offsetShift.x; - offsetY += offsetShift.y; - } - this.offsetX = offsetX; - this.offsetY = offsetY; - this.zoomLevel = newScale; - this.panAnim.setValue({ - x: this.offsetX, - y: this.offsetY - }); - this.zoomAnim.setValue(this.zoomLevel); - this.props.onZoomAfter?.(e, gestureState, this._getZoomableViewEventObject()); - } - - /** - * Used to debug pinch events - * @param gestureResponderEvent - * @param zoomCenter - * @param points - */ - _setPinchDebugPoints(gestureResponderEvent, zoomCenter, ...points) { - const { - touches - } = gestureResponderEvent.nativeEvent; - const { - originalPageY, - originalPageX - } = this.state; - this.setState({ - debugPoints: [{ - x: touches[0].pageX - originalPageX, - y: touches[0].pageY - originalPageY - }, { - x: touches[1].pageX - originalPageX, - y: touches[1].pageY - originalPageY - }, zoomCenter, ...points] - }); - } - - /** - * Calculates the amount the offset should shift since the last position during panning - * - * @param {Vec2D} gestureCenterPoint - * - * @private - */ - _calcOffsetShiftSinceLastGestureState(gestureCenterPoint) { - const { - movementSensibility - } = this.props; - let shift = null; - if (this.lastGestureCenterPosition && movementSensibility) { - const dx = gestureCenterPoint.x - this.lastGestureCenterPosition.x; - const dy = gestureCenterPoint.y - this.lastGestureCenterPosition.y; - const shiftX = dx / this.zoomLevel / movementSensibility; - const shiftY = dy / this.zoomLevel / movementSensibility; - shift = { - x: shiftX, - y: shiftY - }; - } - this.lastGestureCenterPosition = gestureCenterPoint; - return shift; - } - - /** - * Handles movement by tap and move - * - * @param gestureState - * - * @private - */ - _handleShifting(gestureState) { - // Skips shifting if panEnabled is false or disablePanOnInitialZoom is true and we're on the initial zoom level - if (!this.props.panEnabled || this.props.disablePanOnInitialZoom && this.zoomLevel === this.props.initialZoom) { - return; - } - const shift = this._calcOffsetShiftSinceLastGestureState({ - x: gestureState.moveX, - y: gestureState.moveY - }); - if (!shift) return; - const offsetX = this.offsetX + shift.x; - const offsetY = this.offsetY + shift.y; - if (this.props.debug && this.state.originalPageX && this.state.originalPageY) { - const x = gestureState.moveX - this.state.originalPageX; - const y = gestureState.moveY - this.state.originalPageY; - this.setState({ - debugPoints: [{ - x, - y - }] - }); - } - this._setNewOffsetPosition(offsetX, offsetY); - this.raisePin(); - } - - /** - * Set the state to offset moved - * - * @param {number} newOffsetX - * @param {number} newOffsetY - * @returns - */ - _setNewOffsetPosition(newOffsetX, newOffsetY) { - const { - onShiftingBefore, - onShiftingAfter - } = this.props; - if (onShiftingBefore?.(null, null, this._getZoomableViewEventObject())) { - return; - } - this.offsetX = newOffsetX; - this.offsetY = newOffsetY; - this.panAnim.setValue({ - x: this.offsetX, - y: this.offsetY - }); - this.zoomAnim.setValue(this.zoomLevel); - onShiftingAfter?.(null, null, this._getZoomableViewEventObject()); - } - - /** - * Check whether the press event is double tap - * or single tap and handle the event accordingly - * - * @param e - * - * @private - */ - _resolveAndHandleTap = e => { - const now = Date.now(); - if (this.doubleTapFirstTapReleaseTimestamp && this.props.doubleTapDelay && now - this.doubleTapFirstTapReleaseTimestamp < this.props.doubleTapDelay) { - this.doubleTapFirstTap && this._addTouch({ - ...this.doubleTapFirstTap, - id: now.toString(), - isSecondTap: true - }); - this.singleTapTimeoutId && clearTimeout(this.singleTapTimeoutId); - delete this.doubleTapFirstTapReleaseTimestamp; - delete this.singleTapTimeoutId; - delete this.doubleTapFirstTap; - this._handleDoubleTap(e); - } else { - this.doubleTapFirstTapReleaseTimestamp = now; - this.doubleTapFirstTap = { - id: now.toString(), - x: e.nativeEvent.pageX - this.state.originalPageX, - y: e.nativeEvent.pageY - this.state.originalPageY - }; - this._addTouch(this.doubleTapFirstTap); - - // persist event so e.nativeEvent is preserved after a timeout delay - e.persist(); - this.singleTapTimeoutId = setTimeout(() => { - delete this.doubleTapFirstTapReleaseTimestamp; - delete this.singleTapTimeoutId; - - // Pan to the tapped location - if (this.props.staticPinPosition && this.doubleTapFirstTap) { - const tapX = this.props.staticPinPosition.x - this.doubleTapFirstTap.x; - const tapY = this.props.staticPinPosition.y - this.doubleTapFirstTap.y; - Animated.timing(this.panAnim, { - toValue: { - x: this.offsetX + tapX / this.zoomLevel, - y: this.offsetY + tapY / this.zoomLevel - }, - useNativeDriver: true, - duration: 200 - }).start(() => { - this._updateStaticPin(); - }); - } - this.props.onSingleTap?.(e, this._getZoomableViewEventObject()); - }, this.props.doubleTapDelay); - } - }; - moveStaticPinTo = (position, duration) => { - const { - originalWidth, - originalHeight - } = this.state; - const { - staticPinPosition, - contentWidth, - contentHeight - } = this.props; - if (!staticPinPosition) return; - if (!originalWidth || !originalHeight) return; - if (!contentWidth || !contentHeight) return; - - // Offset for the static pin - const pinX = staticPinPosition.x - originalWidth / 2; - const pinY = staticPinPosition.y - originalHeight / 2; - this.offsetX = contentWidth / 2 - position.x + pinX / this.zoomLevel; - this.offsetY = contentHeight / 2 - position.y + pinY / this.zoomLevel; - if (duration) { - Animated.timing(this.panAnim, { - toValue: { - x: this.offsetX, - y: this.offsetY - }, - useNativeDriver: true, - duration - }).start(); - } else { - this.panAnim.setValue({ - x: this.offsetX, - y: this.offsetY - }); - } - }; - _staticPinPosition = () => { - if (!this.props.staticPinPosition) return; - if (!this.props.contentWidth || !this.props.contentHeight) return; - return viewportPositionToImagePosition({ - viewportPosition: { - x: this.props.staticPinPosition.x, - y: this.props.staticPinPosition.y - }, - imageSize: { - height: this.props.contentHeight, - width: this.props.contentWidth - }, - zoomableEvent: { - ...this._getZoomableViewEventObject(), - offsetX: this.offsetX, - offsetY: this.offsetY, - zoomLevel: this.zoomLevel - } - }); - }; - _updateStaticPin = () => { - const position = this._staticPinPosition(); - if (!position) return; - this.props.onStaticPinPositionChange?.(position); - }; - _addTouch(touch) { - this.touches.push(touch); - this.setState({ - touches: [...this.touches] - }); - } - _removeTouch(touch) { - this.touches.splice(this.touches.indexOf(touch), 1); - this.setState({ - touches: [...this.touches] - }); - } - - /** - * Handles the double tap event - * - * @param e - * - * @private - */ - _handleDoubleTap(e) { - const { - onDoubleTapBefore, - onDoubleTapAfter, - doubleTapZoomToCenter - } = this.props; - onDoubleTapBefore?.(e, this._getZoomableViewEventObject()); - const nextZoomStep = this._getNextZoomStep(); - if (nextZoomStep == null) return; - const { - originalPageX, - originalPageY - } = this.state; - - // define new zoom position coordinates - const zoomPositionCoordinates = { - x: e.nativeEvent.pageX - originalPageX, - y: e.nativeEvent.pageY - originalPageY - }; - - // if doubleTapZoomToCenter enabled -> always zoom to center instead - if (doubleTapZoomToCenter) { - zoomPositionCoordinates.x = 0; - zoomPositionCoordinates.y = 0; - } - this.zoomTo(nextZoomStep, zoomPositionCoordinates); - onDoubleTapAfter?.(e, this._getZoomableViewEventObject({ - zoomLevel: nextZoomStep - })); - } - - /** - * Returns the next zoom step based on current step and zoomStep property. - * If we are zoomed all the way in -> return to initialzoom - * - * @returns {*} - */ - _getNextZoomStep() { - const { - zoomStep, - maxZoom, - initialZoom - } = this.props; - const { - zoomLevel - } = this; - if (maxZoom == null) return; - if (zoomLevel.toFixed(2) === maxZoom.toFixed(2)) { - return initialZoom; - } - if (zoomStep == null) return; - const nextZoomStep = zoomLevel * (1 + zoomStep); - if (nextZoomStep > maxZoom) { - return maxZoom; - } - return nextZoomStep; - } - - /** - * Zooms to a specific level. A "zoom center" can be provided, which specifies - * the point that will remain in the same position on the screen after the zoom. - * The coordinates of the zoom center is relative to the zoom subject. - * { x: 0, y: 0 } is the very center of the zoom subject. - * - * @param newZoomLevel - * @param zoomCenter - If not supplied, the container's center is the zoom center - */ - zoomTo(newZoomLevel, zoomCenter) { - if (!this.props.zoomEnabled) return false; - if (this.props.maxZoom && newZoomLevel > this.props.maxZoom) return false; - if (this.props.minZoom && newZoomLevel < this.props.minZoom) return false; - this.props.onZoomBefore?.(null, null, this._getZoomableViewEventObject()); - - // == Perform Pan Animation to preserve the zoom center while zooming == - let listenerId = ''; - if (zoomCenter) { - // Calculates panAnim values based on changes in zoomAnim. - let prevScale = this.zoomLevel; - // Since zoomAnim is calculated in native driver, - // it will jitter panAnim once in a while, - // because here panAnim is being calculated in js. - // However the jittering should mostly occur in simulator. - listenerId = this.zoomAnim.addListener(({ - value: newScale - }) => { - this.panAnim.setValue({ - x: calcNewScaledOffsetForZoomCentering(this.offsetX, this.state.originalWidth, prevScale, newScale, zoomCenter.x), - y: calcNewScaledOffsetForZoomCentering(this.offsetY, this.state.originalHeight, prevScale, newScale, zoomCenter.y) - }); - prevScale = newScale; - }); - } - - // == Perform Zoom Animation == - getZoomToAnimation(this.zoomAnim, newZoomLevel).start(() => { - this.zoomAnim.removeListener(listenerId); - }); - // == Zoom Animation Ends == - - this.props.onZoomAfter?.(null, null, this._getZoomableViewEventObject()); - return true; - } - - /** - * Zooms in or out by a specified change level - * Use a positive number for `zoomLevelChange` to zoom in - * Use a negative number for `zoomLevelChange` to zoom out - * - * Returns a promise if everything was updated and a boolean, whether it could be updated or if it exceeded the min/max zoom limits. - * - * @param {number | null} zoomLevelChange - * - * @return {bool} - */ - zoomBy(zoomLevelChange) { - // if no zoom level Change given -> just use zoom step - zoomLevelChange ||= this.props.zoomStep || 0; - return this.zoomTo(this.zoomLevel + zoomLevelChange); - } - - /** - * Moves the zoomed view to a specified position - * Returns a promise when finished - * - * @param {number} newOffsetX the new position we want to move it to (x-axis) - * @param {number} newOffsetY the new position we want to move it to (y-axis) - * - * @return {bool} - */ - moveTo(newOffsetX, newOffsetY) { - const { - originalWidth, - originalHeight - } = this.state; - if (!originalWidth || !originalHeight) return; - const offsetX = (newOffsetX - originalWidth / 2) / this.zoomLevel; - const offsetY = (newOffsetY - originalHeight / 2) / this.zoomLevel; - this._setNewOffsetPosition(-offsetX, -offsetY); - } - - /** - * Moves the zoomed view by a certain amount. - * - * Returns a promise when finished - * - * @param {number} offsetChangeX the amount we want to move the offset by (x-axis) - * @param {number} offsetChangeY the amount we want to move the offset by (y-axis) - * - * @return {bool} - */ - moveBy(offsetChangeX, offsetChangeY) { - const offsetX = (this.offsetX * this.zoomLevel - offsetChangeX) / this.zoomLevel; - const offsetY = (this.offsetY * this.zoomLevel - offsetChangeY) / this.zoomLevel; - this._setNewOffsetPosition(offsetX, offsetY); - } - render() { - const { - staticPinIcon, - children, - visualTouchFeedbackEnabled, - doubleTapDelay, - staticPinPosition, - onStaticPinLongPress, - onStaticPinPress, - pinProps - } = this.props; - const { - pinSize, - touches, - debugPoints = [] - } = this.state; - return /*#__PURE__*/_jsxs(View, { - style: styles.container, - ...this.gestureHandlers.panHandlers, - ref: this.zoomSubjectWrapperRef, - onLayout: this.measureZoomSubject, - children: [/*#__PURE__*/_jsx(Animated.View, { - style: [styles.zoomSubject, this.props.style, { - transform: [ - // In RN79, we need to split the scale into X and Y to avoid - // the content getting pixelated when zooming in - { - scaleX: this.zoomAnim - }, { - scaleY: this.zoomAnim - }, ...this.panAnim.getTranslateTransform()] - }], - children: children - }), visualTouchFeedbackEnabled && touches?.map(touch => doubleTapDelay && /*#__PURE__*/_jsx(AnimatedTouchFeedback, { - x: touch.x, - y: touch.y, - animationDuration: doubleTapDelay, - onAnimationDone: () => { - this._removeTouch(touch); - } - }, touch.id)), debugPoints.map(({ - x, - y - }, index) => { - return /*#__PURE__*/_jsx(DebugTouchPoint, { - x: x, - y: y - }, index); - }), staticPinPosition && /*#__PURE__*/_jsx(StaticPin, { - staticPinIcon: staticPinIcon, - staticPinPosition: staticPinPosition, - pinSize: pinSize, - onPress: onStaticPinPress, - onLongPress: onStaticPinLongPress, - onParentMove: this._handlePanResponderMove, - pinAnim: this.pinAnim, - setPinSize: size => { - this.setState({ - pinSize: size - }); - }, - pinProps: pinProps - })] - }); - } -} -const styles = StyleSheet.create({ - container: { - alignItems: 'center', - flex: 1, - justifyContent: 'center', - overflow: 'hidden', - position: 'relative' - }, - zoomSubject: { - alignItems: 'center', - flex: 1, - justifyContent: 'center', - width: '100%' - } -}); -export default ReactNativeZoomableView; -export { ReactNativeZoomableView }; -//# sourceMappingURL=ReactNativeZoomableView.js.map \ No newline at end of file diff --git a/lib/module/ReactNativeZoomableView.js.map b/lib/module/ReactNativeZoomableView.js.map deleted file mode 100644 index f0dfbe7b..00000000 --- a/lib/module/ReactNativeZoomableView.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["debounce","React","Component","createRef","Animated","Easing","PanResponder","StyleSheet","View","getBoundaryCrossedAnim","getPanMomentumDecayAnim","getZoomToAnimation","AnimatedTouchFeedback","StaticPin","DebugTouchPoint","calcGestureCenterPoint","calcGestureTouchDistance","calcNewScaledOffsetForZoomCentering","applyPanBoundariesToOffset","viewportPositionToImagePosition","jsx","_jsx","jsxs","_jsxs","initialState","originalWidth","originalHeight","originalPageX","originalPageY","originalX","originalY","pinSize","width","height","ReactNativeZoomableView","defaultProps","zoomEnabled","panEnabled","initialZoom","initialOffsetX","initialOffsetY","maxZoom","minZoom","pinchToZoomInSensitivity","pinchToZoomOutSensitivity","movementSensibility","doubleTapDelay","bindToBorders","zoomStep","onLongPress","longPressDuration","contentWidth","undefined","contentHeight","panBoundaryPadding","visualTouchFeedbackEnabled","staticPinPosition","staticPinIcon","onStaticPinPositionChange","onStaticPinPositionMove","animatePin","disablePanOnInitialZoom","panAnim","ValueXY","x","y","zoomAnim","Value","pinAnim","__offsets","value","boundaryCrossedAnimInEffect","zoomLevel","lastGestureCenterPosition","lastGestureTouchDistance","_gestureStarted","gestureStarted","v","longPressTimeout","touches","constructor","props","state","gestureHandlers","create","onStartShouldSetPanResponder","_handleStartShouldSetPanResponder","onPanResponderGrant","_handlePanResponderGrant","onPanResponderMove","_handlePanResponderMove","onPanResponderRelease","_handlePanResponderEnd","onPanResponderTerminate","evt","gestureState","_getZoomableViewEventObject","onPanResponderTerminationRequest","onShouldBlockNativeResponder","onStartShouldSetPanResponderCapture","onMoveShouldSetPanResponderCapture","zoomSubjectWrapperRef","zoomAnimatedValue","panAnimatedValueXY","offsetX","offsetY","setValue","addListener","gestureType","raisePin","timing","toValue","useNativeDriver","easing","out","ease","duration","start","dropPin","__setOffset","__getOffset","axis","offset","offsetState","containerSize","contentSize","boundOffset","boundariesApplied","toFixed","componentDidUpdate","prevProps","prevState","onTransformInvocationInitialized","_invokeOnTransform","successful","currState","originalMeasurementsChanged","staticPinPositionChanged","layout","onLayout","nativeEvent","componentDidMount","measureZoomSubject","measureZoomSubjectInterval","setInterval","componentWillUnmount","clearInterval","debouncedOnStaticPinPositionChange","position","zoomableViewEvent","_staticPinPosition","onTransform","overwriteObj","requestAnimationFrame","setTimeout","current","measure","pageX","pageY","setState","e","persist","stopAnimation","_resolveAndHandleTap","debugPoints","disableMomentum","vx","vy","clearTimeout","onPanResponderEnd","onZoomEnd","onShiftingEnd","_updateStaticPin","numberActiveTouches","_handlePinching","Math","abs","dx","dy","isShiftGesture","_handleShifting","distance","onZoomBefore","zoomGrowthFromLastGestureState","pinchToZoomSensitivity","deltaGrowth","deltaGrowthAdjustedBySensitivity","newZoomLevel","gestureCenterPoint","zoomCenter","debug","_setPinchDebugPoints","oldOffsetX","oldOffsetY","oldScale","newScale","offsetShift","_calcOffsetShiftSinceLastGestureState","onZoomAfter","gestureResponderEvent","points","shift","shiftX","shiftY","moveX","moveY","_setNewOffsetPosition","newOffsetX","newOffsetY","onShiftingBefore","onShiftingAfter","now","Date","doubleTapFirstTapReleaseTimestamp","doubleTapFirstTap","_addTouch","id","toString","isSecondTap","singleTapTimeoutId","_handleDoubleTap","tapX","tapY","onSingleTap","moveStaticPinTo","pinX","pinY","viewportPosition","imageSize","zoomableEvent","touch","push","_removeTouch","splice","indexOf","onDoubleTapBefore","onDoubleTapAfter","doubleTapZoomToCenter","nextZoomStep","_getNextZoomStep","zoomPositionCoordinates","zoomTo","listenerId","prevScale","removeListener","zoomBy","zoomLevelChange","moveTo","moveBy","offsetChangeX","offsetChangeY","render","children","onStaticPinLongPress","onStaticPinPress","pinProps","style","styles","container","panHandlers","ref","zoomSubject","transform","scaleX","scaleY","getTranslateTransform","map","animationDuration","onAnimationDone","index","onPress","onParentMove","setPinSize","size","alignItems","flex","justifyContent","overflow"],"sourceRoot":"../../src","sources":["ReactNativeZoomableView.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,QAAQ;AACjC,OAAOC,KAAK,IAAIC,SAAS,EAAEC,SAAS,QAAmB,OAAO;AAC9D,SACEC,QAAQ,EACRC,MAAM,EAENC,YAAY,EAIZC,UAAU,EACVC,IAAI,QACC,cAAc;AAErB,SACEC,sBAAsB,EACtBC,uBAAuB,EACvBC,kBAAkB,QACb,cAAc;AACrB,SAASC,qBAAqB,QAAQ,cAAc;AACpD,SAASC,SAAS,QAAQ,wBAAwB;AAClD,SAASC,eAAe,QAAQ,eAAe;AAC/C,SACEC,sBAAsB,EACtBC,wBAAwB,EACxBC,mCAAmC,QAC9B,UAAU;AACjB,SAASC,0BAA0B,QAAQ,qCAAqC;AAChF,SAASC,+BAA+B,QAAQ,+BAA+B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAUhF,MAAMC,YAA0C,GAAG;EACjDC,aAAa,EAAE,CAAC;EAChBC,cAAc,EAAE,CAAC;EACjBC,aAAa,EAAE,CAAC;EAChBC,aAAa,EAAE,CAAC;EAChBC,SAAS,EAAE,CAAC;EACZC,SAAS,EAAE,CAAC;EACZC,OAAO,EAAE;IAAEC,KAAK,EAAE,CAAC;IAAEC,MAAM,EAAE;EAAE;AACjC,CAAC;AAED,MAAMC,uBAAuB,SAAShC,SAAS,CAG7C;EAKA,OAAOiC,YAAY,GAAG;IACpBC,WAAW,EAAE,IAAI;IACjBC,UAAU,EAAE,IAAI;IAChBC,WAAW,EAAE,CAAC;IACdC,cAAc,EAAE,CAAC;IACjBC,cAAc,EAAE,CAAC;IACjBC,OAAO,EAAE,GAAG;IACZC,OAAO,EAA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AQ,CAAC;YAAEhI,OAAO,EAAEkP;UAAK,CAAC,CAAC;QAClC,CAAE;QACFlB,QAAQ,EAAEA;MAAS,CACpB,CACF;IAAA,CACG,CAAC;EAEX;AACF;AAEA,MAAME,MAAM,GAAG1P,UAAU,CAAC6E,MAAM,CAAC;EAC/B8K,SAAS,EAAE;IACTgB,UAAU,EAAE,QAAQ;IACpBC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBC,QAAQ,EAAE,QAAQ;IAClBjI,QAAQ,EAAE;EACZ,CAAC;EACDiH,WAAW,EAAE;IACXa,UAAU,EAAE,QAAQ;IACpBC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBpP,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,eAAeE,uBAAuB;AAEtC,SAASA,uBAAuB","ignoreList":[]} diff --git a/lib/module/animations/index.js b/lib/module/animations/index.js deleted file mode 100644 index 8aae9b51..00000000 --- a/lib/module/animations/index.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; - -import { Animated, Easing } from 'react-native'; -export function getBoundaryCrossedAnim(animValue, toValue) { - return Animated.spring(animValue, { - overshootClamping: true, - toValue, - useNativeDriver: true - }); -} -export function getPanMomentumDecayAnim(animValue, velocity) { - return Animated.decay(animValue, { - velocity, - deceleration: 0.994, - useNativeDriver: true - }); -} -export function getZoomToAnimation(animValue, toValue) { - return Animated.timing(animValue, { - easing: Easing.out(Easing.ease), - toValue, - useNativeDriver: true - }); -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/module/animations/index.js.map b/lib/module/animations/index.js.map deleted file mode 100644 index 7902608d..00000000 --- a/lib/module/animations/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["Animated","Easing","getBoundaryCrossedAnim","animValue","toValue","spring","overshootClamping","useNativeDriver","getPanMomentumDecayAnim","velocity","decay","deceleration","getZoomToAnimation","timing","easing","out","ease"],"sourceRoot":"../../../src","sources":["animations/index.ts"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,MAAM,QAAQ,cAAc;AAI/C,OAAO,SAASC,sBAAsBA,CACpCC,SAAyB,EACzBC,OAAe,EACf;EACA,OAAOJ,QAAQ,CAACK,MAAM,CAACF,SAAS,EAAE;IAChCG,iBAAiB,EAAE,IAAI;IACvBF,OAAO;IACPG,eAAe,EAAE;EACnB,CAAC,CAAC;AACJ;AAEA,OAAO,SAASC,uBAAuBA,CACrCL,SAA4C,EAC5CM,QAAwB,EACxB;EACA,OAAOT,QAAQ,CAACU,KAAK,CAACP,SAAS,EAAE;IAC/BM,QAAQ;IACRE,YAAY,EAAE,KAAK;IACnBJ,eAAe,EAAE;EACnB,CAAC,CAAC;AACJ;AAEA,OAAO,SAASK,kBAAkBA,CAACT,SAAyB,EAAEC,OAAe,EAAE;EAC7E,OAAOJ,QAAQ,CAACa,MAAM,CAACV,SAAS,EAAE;IAChCW,MAAM,EAAEb,MAAM,CAACc,GAAG,CAACd,MAAM,CAACe,IAAI,CAAC;IAC/BZ,OAAO;IACPG,eAAe,EAAE;EACnB,CAAC,CAAC;AACJ","ignoreList":[]} diff --git a/lib/module/assets/pin.png b/lib/module/assets/pin.png deleted file mode 100644 index 471a7584fbc63178b49f408a62f1f82e36eeb604..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10710 zcmW++Wk6GJ7au(Y>6Vso~i0042(claXor05H-wVILw z;PJnIad%Z30Kg1TQF#5%KmV{GDA-i5{W5HFsl|Z7Q1~RQ$!_CI16)t z`=k^>${jiIIWG{g{X^q(=-Z@fNMv7K&shI+;563gv-C_@1xUl#5u^QGj9dwYs#B`S zW&7cIR~SrPB4?Q+t^1nN@nj$s0`XQMWd)bwi3v6DG~TbV zByZ;>Q_S~-rF59@W#91vvTXTS`d;@<7Z*qWygWOyGQJ zw_H!?`?chP&<@b(D`a3MybV?`?c5ZGLyPU8f3IuQv^l;gm)Q#5YGbF8x2G}D% z<5@?3v=YsRL#}s85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B+y%$ z$q&8PP{p)HSn8o=@bD*mmQQh{_pRgpav)$Vp{SS{l?Qt$(A)m@7JXr z`u(!92EtS(dIukZxRMa$Jjd6CSla7l`y1keHg@U{l6PW%px?R)kl|fY zuhsue$Z2SJip|(k+8~G46rm9na9JsQX+RU!YlyzBX-#JBC+))jb8{~mbv+-Sd)bbb zT>Fpj)H-k#8;Dr(LYgYV9$h_W;4!0KJuRHGlKD<5qGyGZiI5c8BX}59L zpO<72a-2$U7?M63{D{A}m^Xq5;V%^RA5MC{IBQ5+nB4%H3&cGE7I9cwmIgrr3=GF6 z=lpz;H~IrzqoiFpe{e8Ovah|cqerhl@Z%plak9YZ==)6+LYNUz=@#B;%a&c;3Lq}@TEcCSF^ANsy n(WLr%?-LvP|NqoCAF*n { - const appearDisappearAnimRef = useRef(new Animated.Value(0)); - const onAnimationDoneRef = useRef(onAnimationDone); - onAnimationDoneRef.current = onAnimationDone; - useEffect(() => { - appearDisappearAnimRef.current.setValue(0); - const inDuration = animationDuration * 0.8; - const outDuration = animationDuration - inDuration; - Animated.sequence([Animated.timing(appearDisappearAnimRef.current, { - delay: animationDelay || 0, - toValue: 1, - duration: inDuration, - easing: Easing.linear, - useNativeDriver: true - }), Animated.timing(appearDisappearAnimRef.current, { - toValue: 0, - duration: outDuration, - easing: Easing.out(Easing.ease), - useNativeDriver: true - })]).start(() => onAnimationDoneRef.current?.()); - }, [animationDelay, animationDuration]); - return /*#__PURE__*/_jsx(Animated.View, { - pointerEvents: "none", - style: [styles.animatedTouchFeedback, { - opacity: appearDisappearAnimRef.current.interpolate({ - inputRange: [0, 1], - outputRange: [0, 0.3] - }), - left: x - 20, - top: y - 20, - transform: [{ - scale: appearDisappearAnimRef.current.interpolate({ - inputRange: [0, 1], - outputRange: [0.5, 1] - }) - }] - }] - }); -}; -const styles = StyleSheet.create({ - animatedTouchFeedback: { - backgroundColor: 'lightgray', - borderRadius: 40, - height: 40, - position: 'absolute', - width: 40 - } -}); -//# sourceMappingURL=AnimatedTouchFeedback.js.map \ No newline at end of file diff --git a/lib/module/components/AnimatedTouchFeedback.js.map b/lib/module/components/AnimatedTouchFeedback.js.map deleted file mode 100644 index 0f745d8a..00000000 --- a/lib/module/components/AnimatedTouchFeedback.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["React","useEffect","useRef","Animated","Easing","StyleSheet","jsx","_jsx","AnimatedTouchFeedback","x","y","animationDelay","animationDuration","onAnimationDone","appearDisappearAnimRef","Value","onAnimationDoneRef","current","setValue","inDuration","outDuration","sequence","timing","delay","toValue","duration","easing","linear","useNativeDriver","out","ease","start","View","pointerEvents","style","styles","animatedTouchFeedback","opacity","interpolate","inputRange","outputRange","left","top","transform","scale","create","backgroundColor","borderRadius","height","position","width"],"sourceRoot":"../../../src","sources":["components/AnimatedTouchFeedback.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAChD,SAASC,QAAQ,EAAEC,MAAM,EAAEC,UAAU,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE5D,OAAO,MAAMC,qBAAqB,GAAGA,CAAC;EACpCC,CAAC;EACDC,CAAC;EACDC,cAAc;EACdC,iBAAiB;EACjBC;AAOF,CAAC,KAAK;EACJ,MAAMC,sBAAsB,GAAGZ,MAAM,CAAiB,IAAIC,QAAQ,CAACY,KAAK,CAAC,CAAC,CAAC,CAAC;EAC5E,MAAMC,kBAAkB,GAAGd,MAAM,CAACW,eAAe,CAAC;EAClDG,kBAAkB,CAACC,OAAO,GAAGJ,eAAe;EAE5CZ,SAAS,CAAC,MAAM;IACda,sBAAsB,CAACG,OAAO,CAACC,QAAQ,CAAC,CAAC,CAAC;IAC1C,MAAMC,UAAU,GAAGP,iBAAiB,GAAG,GAAG;IAC1C,MAAMQ,WAAW,GAAGR,iBAAiB,GAAGO,UAAU;IAClDhB,QAAQ,CAACkB,QAAQ,CAAC,CAChBlB,QAAQ,CAACmB,MAAM,CAACR,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qBAAqB,EAAE;IACrBU,eAAe,EAAE,WAAW;IAC5BC,YAAY,EAAE,EAAE;IAChBC,MAAM,EAAE,EAAE;IACVC,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]} diff --git a/lib/module/components/StaticPin.js b/lib/module/components/StaticPin.js deleted file mode 100644 index c34c1084..00000000 --- a/lib/module/components/StaticPin.js +++ /dev/null @@ -1,85 +0,0 @@ -"use strict"; - -import React from 'react'; -import { Animated, Image, PanResponder, StyleSheet, View } from 'react-native'; -import { jsx as _jsx } from "react/jsx-runtime"; -export const StaticPin = ({ - staticPinPosition, - pinAnim, - staticPinIcon, - pinSize, - onParentMove, - onPress, - onLongPress, - setPinSize, - pinProps = {} -}) => { - const tapTime = React.useRef(0); - const transform = [{ - translateY: -pinSize.height - }, { - translateX: -pinSize.width / 2 - }, ...pinAnim.getTranslateTransform()]; - const opacity = pinSize.width && pinSize.height ? 1 : 0; - const panResponder = React.useRef(PanResponder.create({ - onStartShouldSetPanResponder: () => { - tapTime.current = Date.now(); - - // We want to handle tap on this so set true - return true; - }, - onPanResponderMove: (evt, gestureState) => { - // However if the user moves finger we want to pass this evt to parent - // to handle panning (tap not recognized) - if (Math.abs(gestureState.dx) > 5 && Math.abs(gestureState.dy) > 5) onParentMove(evt, gestureState); - }, - onPanResponderRelease: (evt, gestureState) => { - if (Math.abs(gestureState.dx) > 5 || Math.abs(gestureState.dy) > 5) return; - const dt = Date.now() - tapTime.current; - if (onPress && dt < 500) { - onPress(evt); - } - if (onLongPress && dt > 500) { - // RN long press is 500ms - onLongPress(evt); - } - } - })).current; - return /*#__PURE__*/_jsx(Animated.View, { - style: [{ - left: staticPinPosition.x, - top: staticPinPosition.y - }, styles.pinWrapper, { - opacity, - transform - }], - ...pinProps, - children: /*#__PURE__*/_jsx(View, { - onLayout: ({ - nativeEvent: { - layout - } - }) => { - setPinSize(layout); - }, - ...panResponder.panHandlers, - children: staticPinIcon || - /*#__PURE__*/ - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - _jsx(Image, { - source: require('../assets/pin.png'), - style: styles.pin - }) - }) - }); -}; -const styles = StyleSheet.create({ - pin: { - height: 64, - width: 48 - }, - pinWrapper: { - position: 'absolute' - } -}); -//# sourceMappingURL=StaticPin.js.map \ No newline at end of file diff --git a/lib/module/components/StaticPin.js.map b/lib/module/components/StaticPin.js.map deleted file mode 100644 index 06eaba8a..00000000 --- a/lib/module/components/StaticPin.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["React","Animated","Image","PanResponder","StyleSheet","View","jsx","_jsx","StaticPin","staticPinPosition","pinAnim","staticPinIcon","pinSize","onParentMove","onPress","onLongPress","setPinSize","pinProps","tapTime","useRef","transform","translateY","height","translateX","width","getTranslateTransform","opacity","panResponder","create","onStartShouldSetPanResponder","current","Date","now","onPanResponderMove","evt","gestureState","Math","abs","dx","dy","onPanResponderRelease","dt","style","left","x","top","y","styles","pinWrapper","children","onLayout","nativeEvent","layout","panHandlers","source","require","pin","position"],"sourceRoot":"../../../src","sources":["components/StaticPin.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,QAAQ,EAERC,KAAK,EACLC,YAAY,EAEZC,UAAU,EACVC,IAAI,QAEC,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGtB,OAAO,MAAMC,SAAS,GAAGA,CAAC;EACxBC,iBAAiB;EACjBC,OAAO;EACPC,aAAa;EACbC,OAAO;EACPC,YAAY;EACZC,OAAO;EACPC,WAAW;EACXC,UAAU;EACVC,QAAQ,GAAG,CAAC;AAed,CAAC,KAAK;EACJ,MAAMC,OAAO,GAAGlB,KAAK,CAACmB,MAAM,CAAC,CAAC,CAAC;EAC/B,MAAMC,SAAS,GAAG,CAChB;IAAEC,UAAU,EAAE,CAACT,OAAO,CAACU;EAAO,CAAC,EAC/B;IAAEC,UAAU,EAAE,CAACX,OAAO,CAACY,KAAK,GAAG;EAAE,C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,CAACmC,CAAC;MACzBC,GAAG,EAAEpC,iBAAiB,CAACqC;IACzB,CAAC,EACDC,MAAM,CAACC,UAAU,EACjB;MAAEtB,OAAO;MAAEN;IAAU,CAAC,CACtB;IAAA,GACEH,QAAQ;IAAAgC,QAAA,eAEZ1C,IAAA,CAACF,IAAI;MACH6C,QAAQ,EAAEA,CAAC;QAAEC,WAAW,EAAE;UAAEC;QAAO;MAAE,CAAC,KAAK;QACzCpC,UAAU,CAACoC,MAAM,CAAC;MACpB,CAAE;MAAA,GACEzB,YAAY,CAAC0B,WAAW;MAAAJ,QAAA,EAE3BtC,aAAa;MAAA;MACZ;MACAJ,IAAA,CAACL,KAAK;QAACoD,MAAM,EAAEC,OAAO,CAAC,mBAAmB,CAAE;QAACb,KAAK,EAAEK,MAAM,CAACS;MAAI,CAAE;IAClE,CACG;EAAC,CACM,CAAC;AAEpB,CAAC;AAED,MAAMT,MAAM,GAAG3C,UAAU,CAACwB,MAAM,CAAC;EAC/B4B,GAAG,EAAE;IACHlC,MAAM,EAAE,EAAE;IACVE,KAAK,EAAE;EACT,CAAC;EACDwB,UAAU,EAAE;IACVS,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]} diff --git a/lib/module/components/index.js b/lib/module/components/index.js deleted file mode 100644 index 040fe359..00000000 --- a/lib/module/components/index.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; - -export { AnimatedTouchFeedback } from './AnimatedTouchFeedback'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/module/components/index.js.map b/lib/module/components/index.js.map deleted file mode 100644 index 16f3c604..00000000 --- a/lib/module/components/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["AnimatedTouchFeedback"],"sourceRoot":"../../../src","sources":["components/index.tsx"],"mappings":";;AAAA,SAASA,qBAAqB,QAAQ,yBAAyB","ignoreList":[]} diff --git a/lib/module/debugHelper/index.js b/lib/module/debugHelper/index.js deleted file mode 100644 index f689e53a..00000000 --- a/lib/module/debugHelper/index.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; - -import React from 'react'; -import { StyleSheet, View } from 'react-native'; -import { jsx as _jsx } from "react/jsx-runtime"; -export const DebugTouchPoint = ({ - diameter = 20, - x = 0, - y = 0, - color = 'yellow' -}) => { - const radius = diameter / 2; - return /*#__PURE__*/_jsx(View, { - style: [styles.debugPoint, { - width: diameter, - height: diameter, - borderRadius: diameter, - backgroundColor: color, - left: x - radius, - top: y - radius - }], - pointerEvents: "none" - }); -}; -export const DebugRect = ({ - height, - x = 0, - y = 0, - color = 'yellow' -}) => { - const width = 5; - return /*#__PURE__*/_jsx(View, { - style: [styles.debugRect, { - width, - height, - backgroundColor: color, - left: x - width / 2, - top: y - }], - pointerEvents: "none" - }); -}; -const styles = StyleSheet.create({ - debugPoint: { - opacity: 0.7, - position: 'absolute' - }, - debugRect: { - opacity: 0.5, - position: 'absolute' - } -}); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/module/debugHelper/index.js.map b/lib/module/debugHelper/index.js.map deleted file mode 100644 index c87cf2bc..00000000 --- a/lib/module/debugHelper/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["React","StyleSheet","View","jsx","_jsx","DebugTouchPoint","diameter","x","y","color","radius","style","styles","debugPoint","width","height","borderRadius","backgroundColor","left","top","pointerEvents","DebugRect","debugRect","create","opacity","position"],"sourceRoot":"../../../src","sources":["debugHelper/index.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEhD,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAC9BC,QAAQ,GAAG,EAAE;EACbC,CAAC,GAAG,CAAC;EACLC,CAAC,GAAG,CAAC;EACLC,KAAK,GAAG;AACV,CAAC,KAAK;EACJ,MAAMC,MAAM,GAAGJ,QAAQ,GAAG,CAAC;EAC3B,oBACEF,IAAA,CAACF,IAAI;IACHS,KAAK,EAAE,CACLC,MAAM,CAACC,UAAU,EACjB;MACEC,KAAK,EAAER,QAAQ;MACfS,MAAM,EAAET,QAAQ;MAChBU,YAAY,EAAEV,QAAQ;MACtBW,eAAe,EAAER,KAAK;MACtBS,IAAI,EAAEX,CAAC,GAAGG,MAAM;MAChBS,GAAG,EAAEX,CAAC,GAAGE;IACX,CAAC,CACD;IACFU,aAAa,EAAC;EAAM,CACrB,CAAC;AAEN,CAAC;AACD,OAAO,MAAMC,SAAS,GAAGA,CAAC;EACxBN,MAAM;EACNR,CAAC,GAAG,CAAC;EACLC,CAAC,GAAG,CAAC;EACLC,KAAK,GAAG;AAMV,CAAC,KAAK;EACJ,MAAMK,KAAK,GAAG,CAAC;EACf,oBACEV,IAAA,CAACF,IAAI;IACHS,KAAK,EAAE,CACLC,MAAM,CAACU,SAAS,EAChB;MACER,KAAK;MACLC,MAAM;MACNE,eAAe,EAAER,KAAK;MACtBS,IAAI,EAAEX,CAAC,GAAGO,KAAK,GAAG,CAAC;MACnBK,GAAG,EAAEX;IACP,CAAC,CACD;IACFY,aAAa,EAAC;EAAM,CACrB,CAAC;AAEN,CAAC;AAED,MAAMR,MAAM,GAAGX,UAAU,CAACsB,MAAM,CAAC;EAC/BV,UAAU,EAAE;IACVW,OAAO,EAAE,GAAG;IACZC,QAAQ,EAAE;EACZ,CAAC;EACDH,SAAS,EAAE;IACTE,OAAO,EAAE,GAAG;IACZC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]} diff --git a/lib/module/helper/applyPanBoundariesToOffset.js b/lib/module/helper/applyPanBoundariesToOffset.js deleted file mode 100644 index 35276c0c..00000000 --- a/lib/module/helper/applyPanBoundariesToOffset.js +++ /dev/null @@ -1,59 +0,0 @@ -"use strict"; - -/** - * Takes a single offset value and calculates the correct offset value - * to make sure it's within the pan boundaries - * - * - * @param offsetScaled - * @param containerSize - * @param contentSize - * @param scale - * @param boundaryPadding - see README - * - * @returns {number} - */ -export function applyPanBoundariesToOffset(offsetScaled, containerSize, contentSize, scale, boundaryPadding) { - const contentSizeUnscaled = contentSize * scale; - const offsetUnscaled = offsetScaled * scale; - const contentStartBorderUnscaled = containerSize / 2 + offsetUnscaled - contentSizeUnscaled / 2; - const contentEndBorderUnscaled = contentStartBorderUnscaled + contentSizeUnscaled; - const containerStartBorder = 0; - const containerEndBorder = containerStartBorder + containerSize; - - // do not let boundary padding be greater than the container size or less than 0 - if (!boundaryPadding || boundaryPadding < 0) boundaryPadding = 0; - if (boundaryPadding > containerSize) boundaryPadding = containerSize; - - // Calculate container's measurements with boundary padding applied. - // this should shrink the container's size by the amount of the boundary padding, - // so that the content inside can be panned a bit further away from the original container's boundaries. - const paddedContainerSize = containerSize - boundaryPadding * 2; - const paddedContainerStartBorder = containerStartBorder + boundaryPadding; - const paddedContainerEndBorder = containerEndBorder - boundaryPadding; - - // if content is smaller than the padded container, - // don't let the content move - if (contentSizeUnscaled < paddedContainerSize) { - return 0; - } - - // if content is larger than the padded container, - // don't let the padded container go outside of content - - // maximum distance the content's center can move from its original position. - // assuming the content original center is the container's center. - const contentMaxOffsetScaled = (paddedContainerSize / 2 - contentSizeUnscaled / 2) / scale; - if ( - // content reaching the end boundary - contentEndBorderUnscaled < paddedContainerEndBorder) { - return contentMaxOffsetScaled; - } - if ( - // content reaching the start boundary - contentStartBorderUnscaled > paddedContainerStartBorder) { - return -contentMaxOffsetScaled; - } - return offsetScaled; -} -//# sourceMappingURL=applyPanBoundariesToOffset.js.map \ No newline at end of file diff --git a/lib/module/helper/applyPanBoundariesToOffset.js.map b/lib/module/helper/applyPanBoundariesToOffset.js.map deleted file mode 100644 index a7debcbf..00000000 --- a/lib/module/helper/applyPanBoundariesToOffset.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["applyPanBoundariesToOffset","offsetScaled","containerSize","contentSize","scale","boundaryPadding","contentSizeUnscaled","offsetUnscaled","contentStartBorderUnscaled","contentEndBorderUnscaled","containerStartBorder","containerEndBorder","paddedContainerSize","paddedContainerStartBorder","paddedContainerEndBorder","contentMaxOffsetScaled"],"sourceRoot":"../../../src","sources":["helper/applyPanBoundariesToOffset.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,0BAA0BA,CACxCC,YAAoB,EACpBC,aAAqB,EACrBC,WAAmB,EACnBC,KAAa,EACbC,eAAuB,EACvB;EACA,MAAMC,mBAAmB,GAAGH,WAAW,GAAGC,KAAK;EAC/C,MAAMG,cAAc,GAAGN,YAAY,GAAGG,KAAK;EAE3C,MAAMI,0BAA0B,GAC9BN,aAAa,GAAG,CAAC,GAAGK,cAAc,GAAGD,mBAAmB,GAAG,CAAC;EAC9D,MAAMG,wBAAwB,GAC5BD,0BAA0B,GAAGF,mBAAmB;EAElD,MAAMI,oBAAoB,GAAG,CAAC;EAC9B,MAAMC,kBAAkB,GAAGD,oBAAoB,GAAGR,aAAa;;EAE/D;EACA,IAAI,CAACG,eAAe,IAAIA,eAAe,GAAG,CAAC,EAAEA,eAAe,GAAG,CAAC;EAChE,IAAIA,eAAe,GAAGH,aAAa,EAAEG,eAAe,GAAGH,aAAa;;EAEpE;EACA;EACA;EACA,MAAMU,mBAAmB,GAAGV,aAAa,GAAGG,eAAe,GAAG,CAAC;EAC/D,MAAMQ,0BAA0B,GAAGH,oBAAoB,GAAGL,eAAe;EACzE,MAAMS,wBAAwB,GAAGH,kBAAkB,GAAGN,eAAe;;EAErE;EACA;EACA,IAAIC,mBAAmB,GAAGM,mBAAmB,EAAE;IAC7C,OAAO,CAAC;EACV;;EAEA;EACA;;EAEA;EACA;EACA,MAAMG,sBAAsB,GAC1B,CAACH,mBAAmB,GAAG,CAAC,GAAGN,mBAAmB,GAAG,CAAC,IAAIF,KAAK;EAE7D;EACE;EACAK,wBAAwB,GAAGK,wBAAwB,EACnD;IACA,OAAOC,sBAAsB;EAC/B;EACA;EACE;EACAP,0BAA0B,GAAGK,0BAA0B,EACvD;IACA,OAAO,CAACE,sBAAsB;EAChC;EAEA,OAAOd,YAAY;AACrB","ignoreList":[]} diff --git a/lib/module/helper/calcNewScaledOffsetForZoomCentering.js b/lib/module/helper/calcNewScaledOffsetForZoomCentering.js deleted file mode 100644 index 7ac687ea..00000000 --- a/lib/module/helper/calcNewScaledOffsetForZoomCentering.js +++ /dev/null @@ -1,69 +0,0 @@ -"use strict"; - -/** - * Calculates the new offset for the zoomSubject to ensure zoom center position is retained after zooming. - * Parameters should correspond to whether we need the offset for the X or Y axis - * - * ## Terms Used: - * - * - Zoom Subject: the view that's being zoomed and panned - * - Zoom Center: the point whose relative position to the window is retained - * - Unscaled: a measurement in pixels denoting the true size as observed by the users' eyes - * - Scaled: a measurement in pixels scaled to the "scale transformation" of the zoom subject to match with its true size. - * *For example:* - * If the scale on the zoom subject is 0.5, - * then to draw an actual 4px line on the zoom subject, we need to scale it to 4px / 0.5 = 8px - * 8px is the scaled measurement - * - * ## Overall idea of this algorithm: - * - * When users perform zooming by pinching the screen, - * we need to shift the zoom subject so that the position of the zoom center is always the same. - * The offset amount to shift the layer is the returned value. - * - * - * ## How we achieve our goal: - * - * To retain, the zoom center position, whenever a zoom action is performed, - * we just need to make sure the distances from all the points in the zoom subject - * to the zoom center increases or decreases by the growth rate of the scale. - * - * ``` - * newDistanceAnyPointToZoomCenter = oldDistanceAnyPointToZoomCenter * (newScale/oldScale) - * ``` - * - * We can't calculate that for all the points because there are unlimited points on a plain. - * However, due to the way `transform` works in RN, every point is scaled from the zoom subject center. - * Therefore, it's sufficient to base our calculation on the distance from the zoom subject center to the zoom center. - * - * ``` - * newDistanceZoomSubjectCenterToZoomCenter = oldDistanceZoomSubjectCenterToZoomCenter * (newScale/oldScale) - * ``` - * - * Once we have `newDistanceZoomSubjectCenterToZoomCenter`, - * we can easily calculate the position of the new center, which leads us to the offset amount. - * Refer to the code for more details - * - * @param oldOffsetXOrYScaled - * @param zoomSubjectOriginalWidthOrHeight - * @param oldScale - * @param newScale - * @param zoomCenterXOrY - */ -export function calcNewScaledOffsetForZoomCentering(oldOffsetXOrYScaled, zoomSubjectOriginalWidthOrHeight, oldScale, newScale, zoomCenterXOrY) { - const oldOffSetUnscaled = oldOffsetXOrYScaled * oldScale; - const growthRate = newScale / oldScale; - - // these act like namespaces just for the sake of readability - const zoomSubjectOriginalCenter = {}; - const zoomSubjectCurrentCenter = {}; - const zoomSubjectNewCenter = {}; - zoomSubjectOriginalCenter.xOrY = zoomSubjectOriginalWidthOrHeight / 2; - zoomSubjectCurrentCenter.xOrY = zoomSubjectOriginalCenter.xOrY + oldOffSetUnscaled; - zoomSubjectCurrentCenter.distanceToZoomCenter = zoomSubjectCurrentCenter.xOrY - zoomCenterXOrY; - zoomSubjectNewCenter.distanceToZoomCenter = zoomSubjectCurrentCenter.distanceToZoomCenter * growthRate; - zoomSubjectNewCenter.xOrY = zoomSubjectNewCenter.distanceToZoomCenter + zoomCenterXOrY; - const newOffsetUnscaled = zoomSubjectNewCenter.xOrY - zoomSubjectOriginalCenter.xOrY; - return newOffsetUnscaled / newScale; -} -//# sourceMappingURL=calcNewScaledOffsetForZoomCentering.js.map \ No newline at end of file diff --git a/lib/module/helper/calcNewScaledOffsetForZoomCentering.js.map b/lib/module/helper/calcNewScaledOffsetForZoomCentering.js.map deleted file mode 100644 index a84ce62f..00000000 --- a/lib/module/helper/calcNewScaledOffsetForZoomCentering.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["calcNewScaledOffsetForZoomCentering","oldOffsetXOrYScaled","zoomSubjectOriginalWidthOrHeight","oldScale","newScale","zoomCenterXOrY","oldOffSetUnscaled","growthRate","zoomSubjectOriginalCenter","zoomSubjectCurrentCenter","zoomSubjectNewCenter","xOrY","distanceToZoomCenter","newOffsetUnscaled"],"sourceRoot":"../../../src","sources":["helper/calcNewScaledOffsetForZoomCentering.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,mCAAmCA,CACjDC,mBAA2B,EAC3BC,gCAAwC,EACxCC,QAAgB,EAChBC,QAAgB,EAChBC,cAAsB,EACtB;EACA,MAAMC,iBAAiB,GAAGL,mBAAmB,GAAGE,QAAQ;EACxD,MAAMI,UAAU,GAAGH,QAAQ,GAAGD,QAAQ;;EAEtC;EACA,MAAMK,yBAAyB,GAAG,CAAC,CAAW;EAC9C,MAAMC,wBAAwB,GAAG,CAAC,CAAW;EAC7C,MAAMC,oBAAoB,GAAG,CAAC,CAAW;EAEzCF,yBAAyB,CAACG,IAAI,GAAGT,gCAAgC,GAAG,CAAC;EACrEO,wBAAwB,CAACE,IAAI,GAC3BH,yBAAyB,CAACG,IAAI,GAAGL,iBAAiB;EACpDG,wBAAwB,CAACG,oBAAoB,GAC3CH,wBAAwB,CAACE,IAAI,GAAGN,cAAc;EAEhDK,oBAAoB,CAACE,oBAAoB,GACvCH,wBAAwB,CAACG,oBAAoB,GAAGL,UAAU;EAC5DG,oBAAoB,CAACC,IAAI,GACvBD,oBAAoB,CAACE,oBAAoB,GAAGP,cAAc;EAE5D,MAAMQ,iBAAiB,GACrBH,oBAAoB,CAACC,IAAI,GAAGH,yBAAyB,CAACG,IAAI;EAE5D,OAAOE,iBAAiB,GAAGT,QAAQ;AACrC","ignoreList":[]} diff --git a/lib/module/helper/coordinateConversion.js b/lib/module/helper/coordinateConversion.js deleted file mode 100644 index 97c2442c..00000000 --- a/lib/module/helper/coordinateConversion.js +++ /dev/null @@ -1,110 +0,0 @@ -"use strict"; - -export const defaultTransformSubjectData = { - offsetX: 0, - offsetY: 0, - zoomLevel: 0, - originalWidth: 0, - originalHeight: 0, - originalPageX: 0, - originalPageY: 0 -}; - -/** - * Assuming you have an image that's being resized to fit into a container - * using the "contain" resize mode. You can use this function to calculate the - * size of the image after fitting. - * - * Since our sheet is resized in this manner, we need this function - * for things like pan boundaries and marker placement - * - * @param imgSize - * @param containerSize - */ -export function applyContainResizeMode(imgSize, containerSize) { - const { - width: imageWidth, - height: imageHeight - } = imgSize; - const { - width: areaWidth, - height: areaHeight - } = containerSize; - const imageAspect = imageWidth / imageHeight; - const areaAspect = areaWidth / areaHeight; - let newSize; - if (imageAspect >= areaAspect) { - // longest edge is horizontal - newSize = { - width: areaWidth, - height: areaWidth / imageAspect - }; - } else { - // longest edge is vertical - newSize = { - width: areaHeight * imageAspect, - height: areaHeight - }; - } - if (isNaN(newSize.height)) newSize.height = areaHeight; - if (isNaN(newSize.width)) newSize.width = areaWidth; - const scale = imageWidth ? newSize.width / imageWidth : newSize.height / imageHeight; - if (!isFinite(scale)) return { - size: null, - scale: null - }; - return { - size: newSize, - scale - }; -} - -/** - * get the coord of image's origin relative to the transformSubject - * @param resizedImageSize - * @param transformSubject - */ -export function getImageOriginOnTransformSubject(resizedImageSize, transformSubject) { - const { - offsetX, - offsetY, - zoomLevel, - originalWidth, - originalHeight - } = transformSubject; - return { - x: offsetX * zoomLevel + originalWidth / 2 - resizedImageSize.width / 2 * zoomLevel, - y: offsetY * zoomLevel + originalHeight / 2 - resizedImageSize.height / 2 * zoomLevel - }; -} - -/** - * Translates the coord system of a point from the viewport's space to the image's space - * - * @param pointOnContainer - * @param sheetImageSize - * @param transformSubject - * - * @return {Vec2D} returns null if point is out of the sheet's bound - */ -export function viewportPositionToImagePosition({ - viewportPosition, - imageSize, - zoomableEvent -}) { - const { - size: resizedImgSize, - scale: resizedImgScale - } = applyContainResizeMode(imageSize, { - width: zoomableEvent.originalWidth, - height: zoomableEvent.originalHeight - }); - if (resizedImgScale == null) return null; - const sheetOriginOnContainer = getImageOriginOnTransformSubject(resizedImgSize, zoomableEvent); - const pointOnSheet = { - x: (viewportPosition.x - sheetOriginOnContainer.x) / zoomableEvent.zoomLevel / resizedImgScale, - y: (viewportPosition.y - sheetOriginOnContainer.y) / zoomableEvent.zoomLevel / resizedImgScale - }; - return pointOnSheet; -} -//# sourceMappingURL=coordinateConversion.js.map \ No newline at end of file diff --git a/lib/module/helper/coordinateConversion.js.map b/lib/module/helper/coordinateConversion.js.map deleted file mode 100644 index b6b0ab80..00000000 --- a/lib/module/helper/coordinateConversion.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["defaultTransformSubjectData","offsetX","offsetY","zoomLevel","originalWidth","originalHeight","originalPageX","originalPageY","applyContainResizeMode","imgSize","containerSize","width","imageWidth","height","imageHeight","areaWidth","areaHeight","imageAspect","areaAspect","newSize","isNaN","scale","isFinite","size","getImageOriginOnTransformSubject","resizedImageSize","transformSubject","x","y","viewportPositionToImagePosition","viewportPosition","imageSize","zoomableEvent","resizedImgSize","resizedImgScale","sheetOriginOnContainer","pointOnSheet"],"sourceRoot":"../../../src","sources":["helper/coordinateConversion.ts"],"mappings":";;AAEA,OAAO,MAAMA,2BAA8C,GAAG;EAC5DC,OAAO,EAAE,CAAC;EACVC,OAAO,EAAE,CAAC;EACVC,SAAS,EAAE,CAAC;EACZC,aAAa,EAAE,CAAC;EAChBC,cAAc,EAAE,CAAC;EACjBC,aAAa,EAAE,CAAC;EAChBC,aAAa,EAAE;AACjB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CACpCC,OAAe,EACfC,aAAqB,EAC0C;EAC/D,MAAM;IAAEC,KAAK,EAAEC,UAAU;IAAEC,MAAM,EAAEC;EAAY,CAAC,GAAGL,OAAO;EAC1D,MAAM;IAAEE,KAAK,EAAEI,SAAS;IAAEF,MAAM,EAAEG;EAAW,CAAC,GAAGN,aAAa;EAC9D,MAAMO,WAAW,GAAGL,UAAU,GAAGE,WAAW;EAC5C,MAAMI,UAAU,GAAGH,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ACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS0B,+BAA+BA,CAAC;EAC9CC,gBAAgB;EAChBC,SAAS;EACTC;AAKF,CAAC,EAAgB;EACf,MAAM;IAAET,IAAI,EAAEU,cAAc;IAAEZ,KAAK,EAAEa;EAAgB,CAAC,GACpD1B,sBAAsB,CAACuB,SAAS,EAAE;IAChCpB,KAAK,EAAEqB,aAAa,CAAC5B,aAAa;IAClCS,MAAM,EAAEmB,aAAa,CAAC3B;EACxB,CAAC,CAAC;EAEJ,IAAI6B,eAAe,IAAI,IAAI,EAAE,OAAO,IAAI;EAExC,MAAMC,sBAAsB,GAAGX,gCAAgC,CAC7DS,cAAc,EACdD,aACF,CAAC;EAED,MAAMI,YAAY,GAAG;IACnBT,CAAC,EACC,CAACG,gBAAgB,CAACH,CAAC,GAAGQ,sBAAsB,CAACR,CAAC,IAC9CK,aAAa,CAAC7B,SAAS,GACvB+B,eAAe;IACjBN,CAAC,EACC,CAACE,gBAAgB,CAACF,CAAC,GAAGO,sBAAsB,CAACP,CAAC,IAC9CI,aAAa,CAAC7B,SAAS,GACvB+B;EACJ,CAAC;EAED,OAAOE,YAAY;AACrB","ignoreList":[]} diff --git a/lib/module/helper/index.js b/lib/module/helper/index.js deleted file mode 100644 index bdce1d5c..00000000 --- a/lib/module/helper/index.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; - -export { calcNewScaledOffsetForZoomCentering } from './calcNewScaledOffsetForZoomCentering'; - -/** - * Calculates the gesture center point relative to the page coordinate system - * - * We're unable to use touch.locationX/Y - * because locationX uses the axis system of the leaf element that the touch occurs on, - * which makes it even more complicated to translate into our container's axis system. - * - * We're also unable to use gestureState.moveX/Y - * because gestureState.moveX/Y is messed up on real device - * (Sometimes it's the center point, but sometimes it randomly takes the position of one of the touches) - */ -export function calcGestureCenterPoint(e, gestureState) { - const touches = e.nativeEvent.touches; - if (!touches[0]) return null; - if (gestureState.numberActiveTouches === 2) { - if (!touches[1]) return null; - return { - x: (touches[0].pageX + touches[1].pageX) / 2, - y: (touches[0].pageY + touches[1].pageY) / 2 - }; - } - if (gestureState.numberActiveTouches === 1) { - return { - x: touches[0].pageX, - y: touches[0].pageY - }; - } - return null; -} -export function calcGestureTouchDistance(e, gestureState) { - const touches = e.nativeEvent.touches; - if (gestureState.numberActiveTouches !== 2 || !touches[0] || !touches[1]) return null; - const dx = Math.abs(touches[0].pageX - touches[1].pageX); - const dy = Math.abs(touches[0].pageY - touches[1].pageY); - return Math.sqrt(dx * dx + dy * dy); -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/module/helper/index.js.map b/lib/module/helper/index.js.map deleted file mode 100644 index 0631c9e1..00000000 --- a/lib/module/helper/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["calcNewScaledOffsetForZoomCentering","calcGestureCenterPoint","e","gestureState","touches","nativeEvent","numberActiveTouches","x","pageX","y","pageY","calcGestureTouchDistance","dx","Math","abs","dy","sqrt"],"sourceRoot":"../../../src","sources":["helper/index.ts"],"mappings":";;AAIA,SAASA,mCAAmC,QAAQ,uCAAuC;;AAE3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CACpCC,CAAwB,EACxBC,YAAsC,EACxB;EACd,MAAMC,OAAO,GAAGF,CAAC,CAACG,WAAW,CAACD,OAAO;EACrC,IAAI,CAACA,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,IAAI;EAE5B,IAAID,YAAY,CAACG,mBAAmB,KAAK,CAAC,EAAE;IAC1C,IAAI,CAACF,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,IAAI;IAC5B,OAAO;MACLG,CAAC,EAAE,CAACH,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK,GAAGJ,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK,IAAI,CAAC;MAC5CC,CAAC,EAAE,CAACL,OAAO,CAAC,CAAC,CAAC,CAACM,KAAK,GAAGN,OAAO,CAAC,CAAC,CAAC,CAACM,KAAK,IAAI;IAC7C,CAAC;EACH;EACA,IAAIP,YAAY,CAACG,mBAAmB,KAAK,CAAC,EAAE;IAC1C,OAAO;MACLC,CAAC,EAAEH,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK;MACnBC,CAAC,EAAEL,OAAO,CAAC,CAAC,CAAC,CAACM;IAChB,CAAC;EACH;EAEA,OAAO,IAAI;AACb;AAEA,OAAO,SAASC,wBAAwBA,CACtCT,CAAwB,EACxBC,YAAsC,EACvB;EACf,MAAMC,OAAO,GAAGF,CAAC,CAACG,WAAW,CAACD,OAAO;EACrC,IAAID,YAAY,CAACG,mBAAmB,KAAK,CAAC,IAAI,CAACF,OAAO,CAAC,CAAC,CAAC,IAAI,CAACA,OAAO,CAAC,CAAC,CAAC,EACtE,OAAO,IAAI;EAEb,MAAMQ,EAAE,GAAGC,IAAI,CAACC,GAAG,CAACV,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK,GAAGJ,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK,CAAC;EACxD,MAAMO,EAAE,GAAGF,IAAI,CAACC,GAAG,CAACV,OAAO,CAAC,CAAC,CAAC,CAACM,KAAK,GAAGN,OAAO,CAAC,CAAC,CAAC,CAACM,KAAK,CAAC;EACxD,OAAOG,IAAI,CAACG,IAAI,CAACJ,EAAE,GAAGA,EAAE,GAAGG,EAAE,GAAGA,EAAE,CAAC;AACrC","ignoreList":[]} diff --git a/lib/module/index.js b/lib/module/index.js deleted file mode 100644 index bd05c56b..00000000 --- a/lib/module/index.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -import { applyContainResizeMode, getImageOriginOnTransformSubject, viewportPositionToImagePosition } from './helper/coordinateConversion'; -import ReactNativeZoomableView from './ReactNativeZoomableView'; -export { -// Helper functions for coordinate conversion -applyContainResizeMode, getImageOriginOnTransformSubject, ReactNativeZoomableView, viewportPositionToImagePosition }; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/module/index.js.map b/lib/module/index.js.map deleted file mode 100644 index add721ff..00000000 --- a/lib/module/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["applyContainResizeMode","getImageOriginOnTransformSubject","viewportPositionToImagePosition","ReactNativeZoomableView"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SACEA,sBAAsB,EACtBC,gCAAgC,EAChCC,+BAA+B,QAC1B,+BAA+B;AACtC,OAAOC,uBAAuB,MAAM,2BAA2B;AAM/D;AACE;AACAH,sBAAsB,EACtBC,gCAAgC,EAChCE,uBAAuB,EAEvBD,+BAA+B","ignoreList":[]} diff --git a/lib/module/package.json b/lib/module/package.json deleted file mode 100644 index 089153bc..00000000 --- a/lib/module/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"module"} diff --git a/lib/module/typings/index.js b/lib/module/typings/index.js deleted file mode 100644 index f9391cf7..00000000 --- a/lib/module/typings/index.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -export let SwipeDirection = /*#__PURE__*/function (SwipeDirection) { - SwipeDirection["SWIPE_UP"] = "SWIPE_UP"; - SwipeDirection["SWIPE_DOWN"] = "SWIPE_DOWN"; - SwipeDirection["SWIPE_LEFT"] = "SWIPE_LEFT"; - SwipeDirection["SWIPE_RIGHT"] = "SWIPE_RIGHT"; - return SwipeDirection; -}({}); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/module/typings/index.js.map b/lib/module/typings/index.js.map deleted file mode 100644 index 533f3a90..00000000 --- a/lib/module/typings/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["SwipeDirection"],"sourceRoot":"../../../src","sources":["typings/index.ts"],"mappings":";;AASA,WAAYA,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]} diff --git a/lib/typescript/ReactNativeZoomableView.d.ts b/lib/typescript/ReactNativeZoomableView.d.ts deleted file mode 100644 index 26d70039..00000000 --- a/lib/typescript/ReactNativeZoomableView.d.ts +++ /dev/null @@ -1,246 +0,0 @@ -/// -import { Component, RefObject } from 'react'; -import { GestureResponderEvent, PanResponderCallbacks, PanResponderGestureState, PanResponderInstance, View } from 'react-native'; -import { ReactNativeZoomableViewProps, ReactNativeZoomableViewState, Vec2D, ZoomableViewEvent } from './typings'; -declare class ReactNativeZoomableView extends Component { - zoomSubjectWrapperRef: RefObject; - gestureHandlers: PanResponderInstance; - doubleTapFirstTapReleaseTimestamp: number | undefined; - static defaultProps: { - zoomEnabled: boolean; - panEnabled: boolean; - initialZoom: number; - initialOffsetX: number; - initialOffsetY: number; - maxZoom: number; - minZoom: number; - pinchToZoomInSensitivity: number; - pinchToZoomOutSensitivity: number; - movementSensibility: number; - doubleTapDelay: number; - bindToBorders: boolean; - zoomStep: number; - onLongPress: null; - longPressDuration: number; - contentWidth: undefined; - contentHeight: undefined; - panBoundaryPadding: number; - visualTouchFeedbackEnabled: boolean; - staticPinPosition: undefined; - staticPinIcon: undefined; - onStaticPinPositionChange: undefined; - onStaticPinPositionMove: undefined; - animatePin: boolean; - disablePanOnInitialZoom: boolean; - }; - private panAnim; - private zoomAnim; - private pinAnim; - private __offsets; - private zoomLevel; - private lastGestureCenterPosition; - private lastGestureTouchDistance; - private gestureType; - private _gestureStarted; - private set gestureStarted(value); - get gestureStarted(): boolean; - /** - * Last press time (used to evaluate whether user double tapped) - * @type {number} - */ - private longPressTimeout; - private onTransformInvocationInitialized; - private singleTapTimeoutId; - private touches; - private doubleTapFirstTap; - private measureZoomSubjectInterval; - constructor(props: ReactNativeZoomableViewProps); - private raisePin; - private dropPin; - private set offsetX(value); - private set offsetY(value); - private get offsetX(); - private get offsetY(); - private __setOffset; - private __getOffset; - componentDidUpdate(prevProps: ReactNativeZoomableViewProps, prevState: ReactNativeZoomableViewState): void; - componentDidMount(): void; - componentWillUnmount(): void; - debouncedOnStaticPinPositionChange: import("lodash").DebouncedFunc<(position: Vec2D) => void | undefined>; - /** - * try to invoke onTransform - * @private - */ - _invokeOnTransform(): { - successful: boolean; - }; - /** - * Returns additional information about components current state for external event hooks - * - * @returns {{}} - * @private - */ - _getZoomableViewEventObject(overwriteObj?: {}): ZoomableViewEvent; - /** - * Get the original box dimensions and save them for later use. - * (They will be used to calculate boxBorders) - * - * @private - */ - private measureZoomSubject; - /** - * Handles the start of touch events and checks for taps - * - * @param e - * @param gestureState - * @returns {boolean} - * - * @private - */ - _handleStartShouldSetPanResponder: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => boolean; - /** - * Calculates pinch distance - * - * @param e - * @param gestureState - * @private - */ - _handlePanResponderGrant: NonNullable; - /** - * Handles the end of touch events - * - * @param e - * @param gestureState - * - * @private - */ - _handlePanResponderEnd: NonNullable; - /** - * Handles the actual movement of our pan responder - * - * @param e - * @param gestureState - * - * @private - */ - _handlePanResponderMove: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => boolean | undefined; - /** - * Handles the pinch movement and zooming - * - * @param e - * @param gestureState - * - * @private - */ - _handlePinching(e: GestureResponderEvent, gestureState: PanResponderGestureState): void; - /** - * Used to debug pinch events - * @param gestureResponderEvent - * @param zoomCenter - * @param points - */ - _setPinchDebugPoints(gestureResponderEvent: GestureResponderEvent, zoomCenter: Vec2D, ...points: Vec2D[]): void; - /** - * Calculates the amount the offset should shift since the last position during panning - * - * @param {Vec2D} gestureCenterPoint - * - * @private - */ - _calcOffsetShiftSinceLastGestureState(gestureCenterPoint: Vec2D): { - x: number; - y: number; - } | null; - /** - * Handles movement by tap and move - * - * @param gestureState - * - * @private - */ - _handleShifting(gestureState: PanResponderGestureState): void; - /** - * Set the state to offset moved - * - * @param {number} newOffsetX - * @param {number} newOffsetY - * @returns - */ - _setNewOffsetPosition(newOffsetX: number, newOffsetY: number): void; - /** - * Check whether the press event is double tap - * or single tap and handle the event accordingly - * - * @param e - * - * @private - */ - private _resolveAndHandleTap; - moveStaticPinTo: (position: Vec2D, duration?: number) => void; - private _staticPinPosition; - private _updateStaticPin; - private _addTouch; - private _removeTouch; - /** - * Handles the double tap event - * - * @param e - * - * @private - */ - _handleDoubleTap(e: GestureResponderEvent): void; - /** - * Returns the next zoom step based on current step and zoomStep property. - * If we are zoomed all the way in -> return to initialzoom - * - * @returns {*} - */ - _getNextZoomStep(): number | undefined; - /** - * Zooms to a specific level. A "zoom center" can be provided, which specifies - * the point that will remain in the same position on the screen after the zoom. - * The coordinates of the zoom center is relative to the zoom subject. - * { x: 0, y: 0 } is the very center of the zoom subject. - * - * @param newZoomLevel - * @param zoomCenter - If not supplied, the container's center is the zoom center - */ - zoomTo(newZoomLevel: number, zoomCenter?: Vec2D): boolean; - /** - * Zooms in or out by a specified change level - * Use a positive number for `zoomLevelChange` to zoom in - * Use a negative number for `zoomLevelChange` to zoom out - * - * Returns a promise if everything was updated and a boolean, whether it could be updated or if it exceeded the min/max zoom limits. - * - * @param {number | null} zoomLevelChange - * - * @return {bool} - */ - zoomBy(zoomLevelChange: number): boolean; - /** - * Moves the zoomed view to a specified position - * Returns a promise when finished - * - * @param {number} newOffsetX the new position we want to move it to (x-axis) - * @param {number} newOffsetY the new position we want to move it to (y-axis) - * - * @return {bool} - */ - moveTo(newOffsetX: number, newOffsetY: number): void; - /** - * Moves the zoomed view by a certain amount. - * - * Returns a promise when finished - * - * @param {number} offsetChangeX the amount we want to move the offset by (x-axis) - * @param {number} offsetChangeY the amount we want to move the offset by (y-axis) - * - * @return {bool} - */ - moveBy(offsetChangeX: number, offsetChangeY: number): void; - render(): JSX.Element; -} -export default ReactNativeZoomableView; -export { ReactNativeZoomableView }; -//# sourceMappingURL=ReactNativeZoomableView.d.ts.map \ No newline at end of file diff --git a/lib/typescript/ReactNativeZoomableView.d.ts.map b/lib/typescript/ReactNativeZoomableView.d.ts.map deleted file mode 100644 index 16895c24..00000000 --- a/lib/typescript/ReactNativeZoomableView.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ReactNativeZo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AAoB,CAuD1B;IAEF,eAAe,aAAc,KAAK,aAAa,MAAM,UAwBnD;IAEF,OAAO,CAAC,kBAAkB,CAoBxB;IAEF,OAAO,CAAC,gBAAgB,CAItB;IAEF,OAAO,CAAC,SAAS;IAKjB,OAAO,CAAC,YAAY;IAKpB;;;;;;OAMG;IACH,gBAAgB,CAAC,CAAC,EAAE,qBAAqB;IA+BzC;;;;;OAKG;IACH,gBAAgB;IAoBhB;;;;;;;;OAQG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,KAAK;IA+C/C;;;;;;;;;;OAUG;IACH,MAAM,CAAC,eAAe,EAAE,MAAM;IAM9B;;;;;;;;OAQG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAU7C;;;;;;;;;OASG;IACH,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM;IASnD,MAAM;CA8EP;AAkBD,eAAe,uBAAuB,CAAC;AAEvC,OAAO,EAAE,uBAAuB,EAAE,CAAC"} \ No newline at end of file diff --git a/lib/typescript/animations/index.d.ts b/lib/typescript/animations/index.d.ts deleted file mode 100644 index b787c1a4..00000000 --- a/lib/typescript/animations/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Animated } from 'react-native'; -import { Vec2D } from '../typings'; -export declare function getBoundaryCrossedAnim(animValue: Animated.Value, toValue: number): Animated.CompositeAnimation; -export declare function getPanMomentumDecayAnim(animValue: Animated.Value | Animated.ValueXY, velocity: number | Vec2D): Animated.CompositeAnimation; -export declare function getZoomToAnimation(animValue: Animated.Value, toValue: number): Animated.CompositeAnimation; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/lib/typescript/animations/index.d.ts.map b/lib/typescript/animations/index.d.ts.map deleted file mode 100644 index 74cb9256..00000000 --- a/lib/typescript/animations/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/animations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAU,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,QAAQ,CAAC,KAAK,EACzB,OAAO,EAAE,MAAM,+BAOhB;AAED,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,OAAO,EAC5C,QAAQ,EAAE,MAAM,GAAG,KAAK,+BAOzB;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,+BAM5E"} \ No newline at end of file diff --git a/lib/typescript/components/AnimatedTouchFeedback.d.ts b/lib/typescript/components/AnimatedTouchFeedback.d.ts deleted file mode 100644 index f0323bfa..00000000 --- a/lib/typescript/components/AnimatedTouchFeedback.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare const AnimatedTouchFeedback: ({ x, y, animationDelay, animationDuration, onAnimationDone, }: { - x: number; - y: number; - animationDuration: number; - animationDelay?: number | undefined; - onAnimationDone?: (() => void) | undefined; -}) => JSX.Element; -//# sourceMappingURL=AnimatedTouchFeedback.d.ts.map \ No newline at end of file diff --git a/lib/typescript/components/AnimatedTouchFeedback.d.ts.map b/lib/typescript/components/AnimatedTouchFeedback.d.ts.map deleted file mode 100644 index e169ac3c..00000000 --- a/lib/typescript/components/AnimatedTouchFeedback.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AnimatedTouchFeedback.d.ts","sourceRoot":"","sources":["../../../src/components/AnimatedTouchFeedback.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB;OAO7B,MAAM;OACN,MAAM;uBACU,MAAM;;6BAED,IAAI;iBAmD7B,CAAC"} \ No newline at end of file diff --git a/lib/typescript/components/StaticPin.d.ts b/lib/typescript/components/StaticPin.d.ts deleted file mode 100644 index 5668d3d2..00000000 --- a/lib/typescript/components/StaticPin.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react'; -import { Animated, GestureResponderEvent, PanResponderGestureState, ViewProps } from 'react-native'; -import { Size2D } from 'src/typings'; -export declare const StaticPin: ({ staticPinPosition, pinAnim, staticPinIcon, pinSize, onParentMove, onPress, onLongPress, setPinSize, pinProps, }: { - staticPinPosition: { - x: number; - y: number; - }; - pinAnim: Animated.ValueXY; - staticPinIcon: React.ReactNode; - pinSize: Size2D; - /** Internal handler for passing move event to parent */ - onParentMove: (evt: GestureResponderEvent, gestureState: PanResponderGestureState) => boolean | undefined; - onPress?: ((evt: GestureResponderEvent) => void) | undefined; - onLongPress?: ((evt: GestureResponderEvent) => void) | undefined; - setPinSize: (size: Size2D) => void; - pinProps?: ViewProps | undefined; -}) => JSX.Element; -//# sourceMappingURL=StaticPin.d.ts.map \ No newline at end of file diff --git a/lib/typescript/components/StaticPin.d.ts.map b/lib/typescript/components/StaticPin.d.ts.map deleted file mode 100644 index f02c857e..00000000 --- a/lib/typescript/components/StaticPin.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StaticPin.d.ts","sourceRoot":"","sources":["../../../src/components/StaticPin.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,QAAQ,EACR,qBAAqB,EAGrB,wBAAwB,EAGxB,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,eAAO,MAAM,SAAS;uBAWD;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;aAClC,SAAS,OAAO;mBACV,MAAM,SAAS;aACrB,MAAM;IACf,wDAAwD;wBAEjD,qBAAqB,gBACZ,wBAAwB,KACnC,OAAO,GAAG,SAAS;qBACR,qBAAqB,KAAK,IAAI;yBAC1B,qBAAqB,KAAK,IAAI;uBAC/B,MAAM,KAAK,IAAI;;iBAkEnC,CAAC"} \ No newline at end of file diff --git a/lib/typescript/components/index.d.ts b/lib/typescript/components/index.d.ts deleted file mode 100644 index dbcaedec..00000000 --- a/lib/typescript/components/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { AnimatedTouchFeedback } from './AnimatedTouchFeedback'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/lib/typescript/components/index.d.ts.map b/lib/typescript/components/index.d.ts.map deleted file mode 100644 index 7c9cccd5..00000000 --- a/lib/typescript/components/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"} \ No newline at end of file diff --git a/lib/typescript/debugHelper/index.d.ts b/lib/typescript/debugHelper/index.d.ts deleted file mode 100644 index 3d20405e..00000000 --- a/lib/typescript/debugHelper/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export declare const DebugTouchPoint: ({ diameter, x, y, color, }: { - diameter?: number | undefined; - x?: number | undefined; - y?: number | undefined; - color?: string | undefined; -}) => JSX.Element; -export declare const DebugRect: ({ height, x, y, color, }: { - height: number; - x: number; - y: number; - color: string; -}) => JSX.Element; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/lib/typescript/debugHelper/index.d.ts.map b/lib/typescript/debugHelper/index.d.ts.map deleted file mode 100644 index a2a282f7..00000000 --- a/lib/typescript/debugHelper/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/debugHelper/index.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe;;;;;iBAuB3B,CAAC;AACF,eAAO,MAAM,SAAS;YAMZ,MAAM;OACX,MAAM;OACN,MAAM;WACF,MAAM;iBAkBd,CAAC"} \ No newline at end of file diff --git a/lib/typescript/helper/applyPanBoundariesToOffset.d.ts b/lib/typescript/helper/applyPanBoundariesToOffset.d.ts deleted file mode 100644 index 1fdb93d2..00000000 --- a/lib/typescript/helper/applyPanBoundariesToOffset.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Takes a single offset value and calculates the correct offset value - * to make sure it's within the pan boundaries - * - * - * @param offsetScaled - * @param containerSize - * @param contentSize - * @param scale - * @param boundaryPadding - see README - * - * @returns {number} - */ -export declare function applyPanBoundariesToOffset(offsetScaled: number, containerSize: number, contentSize: number, scale: number, boundaryPadding: number): number; -//# sourceMappingURL=applyPanBoundariesToOffset.d.ts.map \ No newline at end of file diff --git a/lib/typescript/helper/applyPanBoundariesToOffset.d.ts.map b/lib/typescript/helper/applyPanBoundariesToOffset.d.ts.map deleted file mode 100644 index 89a116ff..00000000 --- a/lib/typescript/helper/applyPanBoundariesToOffset.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"applyPanBoundariesToOffset.d.ts","sourceRoot":"","sources":["../../../src/helper/applyPanBoundariesToOffset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,CACxC,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,eAAe,EAAE,MAAM,UAoDxB"} \ No newline at end of file diff --git a/lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts b/lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts deleted file mode 100644 index 7503b339..00000000 --- a/lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Calculates the new offset for the zoomSubject to ensure zoom center position is retained after zooming. - * Parameters should correspond to whether we need the offset for the X or Y axis - * - * ## Terms Used: - * - * - Zoom Subject: the view that's being zoomed and panned - * - Zoom Center: the point whose relative position to the window is retained - * - Unscaled: a measurement in pixels denoting the true size as observed by the users' eyes - * - Scaled: a measurement in pixels scaled to the "scale transformation" of the zoom subject to match with its true size. - * *For example:* - * If the scale on the zoom subject is 0.5, - * then to draw an actual 4px line on the zoom subject, we need to scale it to 4px / 0.5 = 8px - * 8px is the scaled measurement - * - * ## Overall idea of this algorithm: - * - * When users perform zooming by pinching the screen, - * we need to shift the zoom subject so that the position of the zoom center is always the same. - * The offset amount to shift the layer is the returned value. - * - * - * ## How we achieve our goal: - * - * To retain, the zoom center position, whenever a zoom action is performed, - * we just need to make sure the distances from all the points in the zoom subject - * to the zoom center increases or decreases by the growth rate of the scale. - * - * ``` - * newDistanceAnyPointToZoomCenter = oldDistanceAnyPointToZoomCenter * (newScale/oldScale) - * ``` - * - * We can't calculate that for all the points because there are unlimited points on a plain. - * However, due to the way `transform` works in RN, every point is scaled from the zoom subject center. - * Therefore, it's sufficient to base our calculation on the distance from the zoom subject center to the zoom center. - * - * ``` - * newDistanceZoomSubjectCenterToZoomCenter = oldDistanceZoomSubjectCenterToZoomCenter * (newScale/oldScale) - * ``` - * - * Once we have `newDistanceZoomSubjectCenterToZoomCenter`, - * we can easily calculate the position of the new center, which leads us to the offset amount. - * Refer to the code for more details - * - * @param oldOffsetXOrYScaled - * @param zoomSubjectOriginalWidthOrHeight - * @param oldScale - * @param newScale - * @param zoomCenterXOrY - */ -export declare function calcNewScaledOffsetForZoomCentering(oldOffsetXOrYScaled: number, zoomSubjectOriginalWidthOrHeight: number, oldScale: number, newScale: number, zoomCenterXOrY: number): number; -//# sourceMappingURL=calcNewScaledOffsetForZoomCentering.d.ts.map \ No newline at end of file diff --git a/lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts.map b/lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts.map deleted file mode 100644 index 4ffc3f50..00000000 --- a/lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"calcNewScaledOffsetForZoomCentering.d.ts","sourceRoot":"","sources":["../../../src/helper/calcNewScaledOffsetForZoomCentering.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAgB,mCAAmC,CACjD,mBAAmB,EAAE,MAAM,EAC3B,gCAAgC,EAAE,MAAM,EACxC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,UAyBvB"} \ No newline at end of file diff --git a/lib/typescript/helper/coordinateConversion.d.ts b/lib/typescript/helper/coordinateConversion.d.ts deleted file mode 100644 index c8bfdc0b..00000000 --- a/lib/typescript/helper/coordinateConversion.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Size2D, Vec2D, ZoomableViewEvent } from 'src/typings'; -export declare const defaultTransformSubjectData: ZoomableViewEvent; -/** - * Assuming you have an image that's being resized to fit into a container - * using the "contain" resize mode. You can use this function to calculate the - * size of the image after fitting. - * - * Since our sheet is resized in this manner, we need this function - * for things like pan boundaries and marker placement - * - * @param imgSize - * @param containerSize - */ -export declare function applyContainResizeMode(imgSize: Size2D, containerSize: Size2D): { - size: Size2D; - scale: number; -} | { - size: null; - scale: null; -}; -/** - * get the coord of image's origin relative to the transformSubject - * @param resizedImageSize - * @param transformSubject - */ -export declare function getImageOriginOnTransformSubject(resizedImageSize: Size2D, transformSubject: ZoomableViewEvent): { - x: number; - y: number; -}; -/** - * Translates the coord system of a point from the viewport's space to the image's space - * - * @param pointOnContainer - * @param sheetImageSize - * @param transformSubject - * - * @return {Vec2D} returns null if point is out of the sheet's bound - */ -export declare function viewportPositionToImagePosition({ viewportPosition, imageSize, zoomableEvent, }: { - viewportPosition: Vec2D; - imageSize: Size2D; - zoomableEvent: ZoomableViewEvent; -}): Vec2D | null; -//# sourceMappingURL=coordinateConversion.d.ts.map \ No newline at end of file diff --git a/lib/typescript/helper/coordinateConversion.d.ts.map b/lib/typescript/helper/coordinateConversion.d.ts.map deleted file mode 100644 index c43dfee5..00000000 --- a/lib/typescript/helper/coordinateConversion.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"coordinateConversion.d.ts","sourceRoot":"","sources":["../../../src/helper/coordinateConversion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE/D,eAAO,MAAM,2BAA2B,EAAE,iBAQzC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,GACpB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,IAAI,CAAA;CAAE,CA4B/D;AAED;;;;GAIG;AACH,wBAAgB,gCAAgC,CAC9C,gBAAgB,EAAE,MAAM,EACxB,gBAAgB,EAAE,iBAAiB;;;EAcpC;AAED;;;;;;;;GAQG;AACH,wBAAgB,+BAA+B,CAAC,EAC9C,gBAAgB,EAChB,SAAS,EACT,aAAa,GACd,EAAE;IACD,gBAAgB,EAAE,KAAK,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,iBAAiB,CAAC;CAClC,GAAG,KAAK,GAAG,IAAI,CA0Bf"} \ No newline at end of file diff --git a/lib/typescript/helper/index.d.ts b/lib/typescript/helper/index.d.ts deleted file mode 100644 index bc85ca36..00000000 --- a/lib/typescript/helper/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { GestureResponderEvent, PanResponderGestureState } from 'react-native'; -import { Vec2D } from '../typings'; -export { calcNewScaledOffsetForZoomCentering } from './calcNewScaledOffsetForZoomCentering'; -/** - * Calculates the gesture center point relative to the page coordinate system - * - * We're unable to use touch.locationX/Y - * because locationX uses the axis system of the leaf element that the touch occurs on, - * which makes it even more complicated to translate into our container's axis system. - * - * We're also unable to use gestureState.moveX/Y - * because gestureState.moveX/Y is messed up on real device - * (Sometimes it's the center point, but sometimes it randomly takes the position of one of the touches) - */ -export declare function calcGestureCenterPoint(e: GestureResponderEvent, gestureState: PanResponderGestureState): Vec2D | null; -export declare function calcGestureTouchDistance(e: GestureResponderEvent, gestureState: PanResponderGestureState): number | null; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/lib/typescript/helper/index.d.ts.map b/lib/typescript/helper/index.d.ts.map deleted file mode 100644 index fe427587..00000000 --- a/lib/typescript/helper/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAE/E,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAE5F;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACpC,CAAC,EAAE,qBAAqB,EACxB,YAAY,EAAE,wBAAwB,GACrC,KAAK,GAAG,IAAI,CAmBd;AAED,wBAAgB,wBAAwB,CACtC,CAAC,EAAE,qBAAqB,EACxB,YAAY,EAAE,wBAAwB,GACrC,MAAM,GAAG,IAAI,CAQf"} \ No newline at end of file diff --git a/lib/typescript/index.d.ts b/lib/typescript/index.d.ts deleted file mode 100644 index 7b02103f..00000000 --- a/lib/typescript/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { applyContainResizeMode, getImageOriginOnTransformSubject, viewportPositionToImagePosition } from './helper/coordinateConversion'; -import ReactNativeZoomableView from './ReactNativeZoomableView'; -import type { ReactNativeZoomableViewProps, ZoomableViewEvent } from './typings'; -export { applyContainResizeMode, getImageOriginOnTransformSubject, ReactNativeZoomableView, ReactNativeZoomableViewProps, viewportPositionToImagePosition, ZoomableViewEvent, }; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/lib/typescript/index.d.ts.map b/lib/typescript/index.d.ts.map deleted file mode 100644 index 2a3655b0..00000000 --- a/lib/typescript/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EAChC,+BAA+B,EAChC,MAAM,+BAA+B,CAAC;AACvC,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EACV,4BAA4B,EAC5B,iBAAiB,EAClB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAEL,sBAAsB,EACtB,gCAAgC,EAChC,uBAAuB,EACvB,4BAA4B,EAC5B,+BAA+B,EAC/B,iBAAiB,GAClB,CAAC"} \ No newline at end of file diff --git a/lib/typescript/typings/index.d.ts b/lib/typescript/typings/index.d.ts deleted file mode 100644 index 62d2b238..00000000 --- a/lib/typescript/typings/index.d.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { ReactNode } from 'react'; -import { Animated, GestureResponderEvent, LayoutChangeEvent, PanResponderGestureState, ViewProps } from 'react-native'; -export declare enum SwipeDirection { - SWIPE_UP = "SWIPE_UP", - SWIPE_DOWN = "SWIPE_DOWN", - SWIPE_LEFT = "SWIPE_LEFT", - SWIPE_RIGHT = "SWIPE_RIGHT" -} -export interface ZoomableViewEvent { - zoomLevel: number; - offsetX: number; - offsetY: number; - originalHeight: number; - originalWidth: number; - originalPageX: number; - originalPageY: number; -} -export interface ReactNativeZoomableViewProps { - style?: ViewProps['style']; - children?: ReactNode; - zoomEnabled?: boolean; - panEnabled?: boolean; - initialZoom?: number; - initialOffsetX?: number; - initialOffsetY?: number; - contentWidth?: number; - contentHeight?: number; - panBoundaryPadding?: number; - maxZoom?: number; - minZoom?: number; - doubleTapDelay?: number; - doubleTapZoomToCenter?: boolean; - bindToBorders?: boolean; - zoomStep?: number; - pinchToZoomInSensitivity?: number; - pinchToZoomOutSensitivity?: number; - movementSensibility?: number; - longPressDuration?: number; - visualTouchFeedbackEnabled?: boolean; - disablePanOnInitialZoom?: boolean; - zoomAnimatedValue?: Animated.Value; - panAnimatedValueXY?: Animated.ValueXY; - debug?: boolean; - onLayout?: (event: Pick) => void; - onTransform?: (zoomableViewEventObject: ZoomableViewEvent) => void; - onSingleTap?: (event: GestureResponderEvent, zoomableViewEventObject: ZoomableViewEvent) => void; - onDoubleTapBefore?: (event: GestureResponderEvent, zoomableViewEventObject: ZoomableViewEvent) => void; - onDoubleTapAfter?: (event: GestureResponderEvent, zoomableViewEventObject: ZoomableViewEvent) => void; - onShiftingBefore?: (event: GestureResponderEvent | null, gestureState: PanResponderGestureState | null, zoomableViewEventObject: ZoomableViewEvent) => boolean; - onShiftingAfter?: (event: GestureResponderEvent | null, gestureState: PanResponderGestureState | null, zoomableViewEventObject: ZoomableViewEvent) => boolean; - onShiftingEnd?: (event: GestureResponderEvent, gestureState: PanResponderGestureState, zoomableViewEventObject: ZoomableViewEvent) => void; - onZoomBefore?: (event: GestureResponderEvent | null, gestureState: PanResponderGestureState | null, zoomableViewEventObject: ZoomableViewEvent) => boolean | undefined; - onZoomAfter?: (event: GestureResponderEvent | null, gestureState: PanResponderGestureState | null, zoomableViewEventObject: ZoomableViewEvent) => void; - onZoomEnd?: (event: GestureResponderEvent, gestureState: PanResponderGestureState, zoomableViewEventObject: ZoomableViewEvent) => void; - onLongPress?: (event: GestureResponderEvent, gestureState: PanResponderGestureState, zoomableViewEventObject: ZoomableViewEvent) => void; - onStartShouldSetPanResponder?: (event: GestureResponderEvent, gestureState: PanResponderGestureState, zoomableViewEventObject: ZoomableViewEvent, baseComponentResult: boolean) => boolean; - onPanResponderGrant?: (event: GestureResponderEvent, gestureState: PanResponderGestureState, zoomableViewEventObject: ZoomableViewEvent) => void; - onPanResponderEnd?: (event: GestureResponderEvent, gestureState: PanResponderGestureState, zoomableViewEventObject: ZoomableViewEvent) => void; - onPanResponderMove?: (event: GestureResponderEvent, gestureState: PanResponderGestureState, zoomableViewEventObject: ZoomableViewEvent) => boolean; - onPanResponderTerminate?: (event: GestureResponderEvent, gestureState: PanResponderGestureState, zoomableViewEventObject: ZoomableViewEvent) => void; - onPanResponderTerminationRequest?: (event: GestureResponderEvent, gestureState: PanResponderGestureState, zoomableViewEventObject: ZoomableViewEvent) => boolean; - onShouldBlockNativeResponder?: (event: GestureResponderEvent, gestureState: PanResponderGestureState, zoomableViewEventObject: ZoomableViewEvent) => boolean; - onStartShouldSetPanResponderCapture?: (event: GestureResponderEvent, gestureState: PanResponderGestureState) => boolean; - onMoveShouldSetPanResponderCapture?: (event: GestureResponderEvent, gestureState: PanResponderGestureState) => boolean; - onStaticPinPress?: (event: GestureResponderEvent) => void; - onStaticPinLongPress?: (event: GestureResponderEvent) => void; - staticPinPosition?: Vec2D; - staticPinIcon?: React.ReactElement; - onStaticPinPositionChange?: (position: Vec2D) => void; - onStaticPinPositionMove?: (position: Vec2D) => void; - animatePin: boolean; - pinProps?: ViewProps; - disableMomentum?: boolean; -} -export interface Vec2D { - x: number; - y: number; -} -export interface Size2D { - width: number; - height: number; -} -export interface TouchPoint extends Vec2D { - id: string; - isSecondTap?: boolean; -} -export interface ReactNativeZoomableViewState { - touches?: TouchPoint[]; - originalWidth: number; - originalHeight: number; - originalPageX: number; - originalPageY: number; - originalX: number; - originalY: number; - debugPoints?: undefined | Vec2D[]; - pinSize: Size2D; -} -export interface ReactNativeZoomableViewWithGesturesProps extends ReactNativeZoomableViewProps { - swipeLengthThreshold?: number; - swipeVelocityThreshold?: number; - swipeDirectionalThreshold?: number; - swipeMinZoom?: number; - swipeMaxZoom?: number; - swipeDisabled?: boolean; - onSwipe?: (swipeDirection: SwipeDirection, gestureState: PanResponderGestureState) => void; - onSwipeUp?: (gestureState: PanResponderGestureState) => void; - onSwipeDown?: (gestureState: PanResponderGestureState) => void; - onSwipeLeft?: (gestureState: PanResponderGestureState) => void; - onSwipeRight?: (gestureState: PanResponderGestureState) => void; -} -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/lib/typescript/typings/index.d.ts.map b/lib/typescript/typings/index.d.ts.map deleted file mode 100644 index 6023f500..00000000 --- a/lib/typescript/typings/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/typings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EACL,QAAQ,EACR,qBAAqB,EACrB,iBAAiB,EACjB,wBAAwB,EACxB,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,oBAAY,cAAc;IACxB,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,WAAW,gBAAgB;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,4BAA4B;IAE3C,KAAK,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAA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AAC;CAChB;AAED,MAAM,WAAW,UAAW,SAAQ,KAAK;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,4BAA4B;IAC3C,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,GAAG,KAAK,EAAE,CAAC;IAClC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,wCACf,SAAQ,4BAA4B;IACpC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,CACR,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,wBAAwB,KACnC,IAAI,CAAC;IACV,SAAS,CAAC,EAAE,CAAC,YAAY,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC7D,WAAW,CAAC,EAAE,CAAC,YAAY,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC/D,WAAW,CAAC,EAAE,CAAC,YAAY,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC/D,YAAY,CAAC,EAAE,CAAC,YAAY,EAAE,wBAAwB,KAAK,IAAI,CAAC;CACjE"} \ No newline at end of file diff --git a/package.json b/package.json index cb0f7c38..32ce095e 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ }, "husky": { "hooks": { - "pre-commit": "yarn lint && yarn typescript && bob build && git add lib" + "pre-commit": "yarn lint && yarn typescript" } }, "commitlint": { From db49218f579e021f47a6dbec234157b6b5ac6366 Mon Sep 17 00:00:00 2001 From: thomasvo Date: Tue, 31 Mar 2026 18:10:28 -0700 Subject: [PATCH 08/20] Add prepare script for npm publish and skip label check for Dependabot - Add prepare script (bob build) so lib/ is built before npm publish - Skip pr-labels check for dependabot[bot] actor Co-Authored-By: Claude Opus 4.6 --- .github/workflows/pr-labels.yml | 1 + package.json | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index 755f8293..b3ae5efd 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -7,6 +7,7 @@ on: jobs: check-labels: runs-on: ubuntu-latest + if: github.actor != 'dependabot[bot]' steps: - uses: actions/checkout@v4 diff --git a/package.json b/package.json index 32ce095e..c857e464 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "!**/__mocks__" ], "scripts": { + "prepare": "bob build", "test": "jest", "typescript": "tsc --noEmit", "lint": "eslint \"**/*.{js,ts,tsx}\"", From 4cb37f752f3ff12ddc8354346e7da5e2f845321f Mon Sep 17 00:00:00 2001 From: thomasvo Date: Tue, 31 Mar 2026 18:38:03 -0700 Subject: [PATCH 09/20] Revert "Add prepare script for npm publish and skip label check for Dependabot" This reverts commit db49218f579e021f47a6dbec234157b6b5ac6366. --- .github/workflows/pr-labels.yml | 1 - package.json | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index b3ae5efd..755f8293 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -7,7 +7,6 @@ on: jobs: check-labels: runs-on: ubuntu-latest - if: github.actor != 'dependabot[bot]' steps: - uses: actions/checkout@v4 diff --git a/package.json b/package.json index c857e464..32ce095e 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "!**/__mocks__" ], "scripts": { - "prepare": "bob build", "test": "jest", "typescript": "tsc --noEmit", "lint": "eslint \"**/*.{js,ts,tsx}\"", From 98733eda623551260b222e4440784b81ec20275b Mon Sep 17 00:00:00 2001 From: thomasvo Date: Tue, 31 Mar 2026 18:38:07 -0700 Subject: [PATCH 10/20] Revert "Remove lib/ build artifacts from tracking and add to .gitignore" This reverts commit ae88a40d60aaa63967048dc1d6783f23fea3d44a. --- .gitignore | 3 - lib/commonjs/ReactNativeZoomableView.js | 1058 +++++++++++++++++ lib/commonjs/ReactNativeZoomableView.js.map | 1 + lib/commonjs/animations/index.js | 31 + lib/commonjs/animations/index.js.map | 1 + lib/commonjs/assets/pin.png | Bin 0 -> 10710 bytes .../components/AnimatedTouchFeedback.js | 66 + .../components/AnimatedTouchFeedback.js.map | 1 + lib/commonjs/components/StaticPin.js | 91 ++ lib/commonjs/components/StaticPin.js.map | 1 + lib/commonjs/components/index.js | 13 + lib/commonjs/components/index.js.map | 1 + lib/commonjs/debugHelper/index.js | 60 + lib/commonjs/debugHelper/index.js.map | 1 + .../helper/applyPanBoundariesToOffset.js | 63 + .../helper/applyPanBoundariesToOffset.js.map | 1 + .../calcNewScaledOffsetForZoomCentering.js | 73 ++ ...calcNewScaledOffsetForZoomCentering.js.map | 1 + lib/commonjs/helper/coordinateConversion.js | 117 ++ .../helper/coordinateConversion.js.map | 1 + lib/commonjs/helper/index.js | 51 + lib/commonjs/helper/index.js.map | 1 + lib/commonjs/index.js | 33 + lib/commonjs/index.js.map | 1 + lib/commonjs/package.json | 1 + lib/commonjs/typings/index.js | 14 + lib/commonjs/typings/index.js.map | 1 + lib/module/ReactNativeZoomableView.js | 1053 ++++++++++++++++ lib/module/ReactNativeZoomableView.js.map | 1 + lib/module/animations/index.js | 25 + lib/module/animations/index.js.map | 1 + lib/module/assets/pin.png | Bin 0 -> 10710 bytes .../components/AnimatedTouchFeedback.js | 60 + .../components/AnimatedTouchFeedback.js.map | 1 + lib/module/components/StaticPin.js | 85 ++ lib/module/components/StaticPin.js.map | 1 + lib/module/components/index.js | 4 + lib/module/components/index.js.map | 1 + lib/module/debugHelper/index.js | 53 + lib/module/debugHelper/index.js.map | 1 + .../helper/applyPanBoundariesToOffset.js | 59 + .../helper/applyPanBoundariesToOffset.js.map | 1 + .../calcNewScaledOffsetForZoomCentering.js | 69 ++ ...calcNewScaledOffsetForZoomCentering.js.map | 1 + lib/module/helper/coordinateConversion.js | 110 ++ lib/module/helper/coordinateConversion.js.map | 1 + lib/module/helper/index.js | 41 + lib/module/helper/index.js.map | 1 + lib/module/index.js | 8 + lib/module/index.js.map | 1 + lib/module/package.json | 1 + lib/module/typings/index.js | 10 + lib/module/typings/index.js.map | 1 + lib/typescript/ReactNativeZoomableView.d.ts | 246 ++++ .../ReactNativeZoomableView.d.ts.map | 1 + lib/typescript/animations/index.d.ts | 6 + lib/typescript/animations/index.d.ts.map | 1 + .../components/AnimatedTouchFeedback.d.ts | 8 + .../components/AnimatedTouchFeedback.d.ts.map | 1 + lib/typescript/components/StaticPin.d.ts | 19 + lib/typescript/components/StaticPin.d.ts.map | 1 + lib/typescript/components/index.d.ts | 2 + lib/typescript/components/index.d.ts.map | 1 + lib/typescript/debugHelper/index.d.ts | 13 + lib/typescript/debugHelper/index.d.ts.map | 1 + .../helper/applyPanBoundariesToOffset.d.ts | 15 + .../applyPanBoundariesToOffset.d.ts.map | 1 + .../calcNewScaledOffsetForZoomCentering.d.ts | 52 + ...lcNewScaledOffsetForZoomCentering.d.ts.map | 1 + .../helper/coordinateConversion.d.ts | 44 + .../helper/coordinateConversion.d.ts.map | 1 + lib/typescript/helper/index.d.ts | 17 + lib/typescript/helper/index.d.ts.map | 1 + lib/typescript/index.d.ts | 5 + lib/typescript/index.d.ts.map | 1 + lib/typescript/typings/index.d.ts | 111 ++ lib/typescript/typings/index.d.ts.map | 1 + package.json | 2 +- 78 files changed, 3824 insertions(+), 4 deletions(-) create mode 100644 lib/commonjs/ReactNativeZoomableView.js create mode 100644 lib/commonjs/ReactNativeZoomableView.js.map create mode 100644 lib/commonjs/animations/index.js create mode 100644 lib/commonjs/animations/index.js.map create mode 100644 lib/commonjs/assets/pin.png create mode 100644 lib/commonjs/components/AnimatedTouchFeedback.js create mode 100644 lib/commonjs/components/AnimatedTouchFeedback.js.map create mode 100644 lib/commonjs/components/StaticPin.js create mode 100644 lib/commonjs/components/StaticPin.js.map create mode 100644 lib/commonjs/components/index.js create mode 100644 lib/commonjs/components/index.js.map create mode 100644 lib/commonjs/debugHelper/index.js create mode 100644 lib/commonjs/debugHelper/index.js.map create mode 100644 lib/commonjs/helper/applyPanBoundariesToOffset.js create mode 100644 lib/commonjs/helper/applyPanBoundariesToOffset.js.map create mode 100644 lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js create mode 100644 lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js.map create mode 100644 lib/commonjs/helper/coordinateConversion.js create mode 100644 lib/commonjs/helper/coordinateConversion.js.map create mode 100644 lib/commonjs/helper/index.js create mode 100644 lib/commonjs/helper/index.js.map create mode 100644 lib/commonjs/index.js create mode 100644 lib/commonjs/index.js.map create mode 100644 lib/commonjs/package.json create mode 100644 lib/commonjs/typings/index.js create mode 100644 lib/commonjs/typings/index.js.map create mode 100644 lib/module/ReactNativeZoomableView.js create mode 100644 lib/module/ReactNativeZoomableView.js.map create mode 100644 lib/module/animations/index.js create mode 100644 lib/module/animations/index.js.map create mode 100644 lib/module/assets/pin.png create mode 100644 lib/module/components/AnimatedTouchFeedback.js create mode 100644 lib/module/components/AnimatedTouchFeedback.js.map create mode 100644 lib/module/components/StaticPin.js create mode 100644 lib/module/components/StaticPin.js.map create mode 100644 lib/module/components/index.js create mode 100644 lib/module/components/index.js.map create mode 100644 lib/module/debugHelper/index.js create mode 100644 lib/module/debugHelper/index.js.map create mode 100644 lib/module/helper/applyPanBoundariesToOffset.js create mode 100644 lib/module/helper/applyPanBoundariesToOffset.js.map create mode 100644 lib/module/helper/calcNewScaledOffsetForZoomCentering.js create mode 100644 lib/module/helper/calcNewScaledOffsetForZoomCentering.js.map create mode 100644 lib/module/helper/coordinateConversion.js create mode 100644 lib/module/helper/coordinateConversion.js.map create mode 100644 lib/module/helper/index.js create mode 100644 lib/module/helper/index.js.map create mode 100644 lib/module/index.js create mode 100644 lib/module/index.js.map create mode 100644 lib/module/package.json create mode 100644 lib/module/typings/index.js create mode 100644 lib/module/typings/index.js.map create mode 100644 lib/typescript/ReactNativeZoomableView.d.ts create mode 100644 lib/typescript/ReactNativeZoomableView.d.ts.map create mode 100644 lib/typescript/animations/index.d.ts create mode 100644 lib/typescript/animations/index.d.ts.map create mode 100644 lib/typescript/components/AnimatedTouchFeedback.d.ts create mode 100644 lib/typescript/components/AnimatedTouchFeedback.d.ts.map create mode 100644 lib/typescript/components/StaticPin.d.ts create mode 100644 lib/typescript/components/StaticPin.d.ts.map create mode 100644 lib/typescript/components/index.d.ts create mode 100644 lib/typescript/components/index.d.ts.map create mode 100644 lib/typescript/debugHelper/index.d.ts create mode 100644 lib/typescript/debugHelper/index.d.ts.map create mode 100644 lib/typescript/helper/applyPanBoundariesToOffset.d.ts create mode 100644 lib/typescript/helper/applyPanBoundariesToOffset.d.ts.map create mode 100644 lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts create mode 100644 lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts.map create mode 100644 lib/typescript/helper/coordinateConversion.d.ts create mode 100644 lib/typescript/helper/coordinateConversion.d.ts.map create mode 100644 lib/typescript/helper/index.d.ts create mode 100644 lib/typescript/helper/index.d.ts.map create mode 100644 lib/typescript/index.d.ts create mode 100644 lib/typescript/index.d.ts.map create mode 100644 lib/typescript/typings/index.d.ts create mode 100644 lib/typescript/typings/index.d.ts.map diff --git a/.gitignore b/.gitignore index 77e6f42c..9da62398 100644 --- a/.gitignore +++ b/.gitignore @@ -53,8 +53,5 @@ buck-out/ android/app/libs android/keystores/debug.keystore -# Build output -lib/ - # Expo .expo/* diff --git a/lib/commonjs/ReactNativeZoomableView.js b/lib/commonjs/ReactNativeZoomableView.js new file mode 100644 index 00000000..a682c4bf --- /dev/null +++ b/lib/commonjs/ReactNativeZoomableView.js @@ -0,0 +1,1058 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.ReactNativeZoomableView = void 0; +var _lodash = require("lodash"); +var _react = _interopRequireWildcard(require("react")); +var _reactNative = require("react-native"); +var _animations = require("./animations"); +var _components = require("./components"); +var _StaticPin = require("./components/StaticPin"); +var _debugHelper = require("./debugHelper"); +var _helper = require("./helper"); +var _applyPanBoundariesToOffset = require("./helper/applyPanBoundariesToOffset"); +var _coordinateConversion = require("./helper/coordinateConversion"); +var _jsxRuntime = require("react/jsx-runtime"); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +const initialState = { + originalWidth: 0, + originalHeight: 0, + originalPageX: 0, + originalPageY: 0, + originalX: 0, + originalY: 0, + pinSize: { + width: 0, + height: 0 + } +}; +class ReactNativeZoomableView extends _react.Component { + static defaultProps = { + zoomEnabled: true, + panEnabled: true, + initialZoom: 1, + initialOffsetX: 0, + initialOffsetY: 0, + maxZoom: 1.5, + minZoom: 0.5, + pinchToZoomInSensitivity: 1, + pinchToZoomOutSensitivity: 1, + movementSensibility: 1, + doubleTapDelay: 300, + bindToBorders: true, + zoomStep: 0.5, + onLongPress: null, + longPressDuration: 700, + contentWidth: undefined, + contentHeight: undefined, + panBoundaryPadding: 0, + visualTouchFeedbackEnabled: true, + staticPinPosition: undefined, + staticPinIcon: undefined, + onStaticPinPositionChange: undefined, + onStaticPinPositionMove: undefined, + animatePin: true, + disablePanOnInitialZoom: false + }; + panAnim = new _reactNative.Animated.ValueXY({ + x: 0, + y: 0 + }); + zoomAnim = new _reactNative.Animated.Value(1); + pinAnim = new _reactNative.Animated.ValueXY({ + x: 0, + y: 0 + }); + __offsets = { + x: { + value: 0, + boundaryCrossedAnimInEffect: false + }, + y: { + value: 0, + boundaryCrossedAnimInEffect: false + } + }; + zoomLevel = 1; + lastGestureCenterPosition = null; + lastGestureTouchDistance = null; + _gestureStarted = false; + set gestureStarted(v) { + this._gestureStarted = v; + } + get gestureStarted() { + return this._gestureStarted; + } + + /** + * Last press time (used to evaluate whether user double tapped) + * @type {number} + */ + longPressTimeout = null; + touches = []; + constructor(props) { + super(props); + // This needs to be done before anything else to initialize the state. + // Otherwise, the logic below may reference the state when it's undefined, + // causing runtime errors. + this.state = { + ...initialState + }; + this.gestureHandlers = _reactNative.PanResponder.create({ + onStartShouldSetPanResponder: this._handleStartShouldSetPanResponder, + onPanResponderGrant: this._handlePanResponderGrant, + onPanResponderMove: this._handlePanResponderMove, + onPanResponderRelease: this._handlePanResponderEnd, + onPanResponderTerminate: (evt, gestureState) => { + // We should also call _handlePanResponderEnd + // to properly perform cleanups when the gesture is terminated + // (aka gesture handling responsibility is taken over by another component). + // This also fixes a weird issue where + // on real device, sometimes onPanResponderRelease is not called when you lift 2 fingers up, + // but onPanResponderTerminate is called instead for no apparent reason. + this._handlePanResponderEnd(evt, gestureState); + this.props.onPanResponderTerminate?.(evt, gestureState, this._getZoomableViewEventObject()); + }, + onPanResponderTerminationRequest: (evt, gestureState) => !!this.props.onPanResponderTerminationRequest?.(evt, gestureState, this._getZoomableViewEventObject()), + // Defaults to true to prevent parent components, such as React Navigation's tab view, from taking over as responder. + onShouldBlockNativeResponder: (evt, gestureState) => this.props.onShouldBlockNativeResponder?.(evt, gestureState, this._getZoomableViewEventObject()) ?? true, + onStartShouldSetPanResponderCapture: (evt, gestureState) => !!this.props.onStartShouldSetPanResponderCapture?.(evt, gestureState), + onMoveShouldSetPanResponderCapture: (evt, gestureState) => !!this.props.onMoveShouldSetPanResponderCapture?.(evt, gestureState) + }); + this.zoomSubjectWrapperRef = /*#__PURE__*/(0, _react.createRef)(); + if (this.props.zoomAnimatedValue) this.zoomAnim = this.props.zoomAnimatedValue; + if (this.props.panAnimatedValueXY) this.panAnim = this.props.panAnimatedValueXY; + if (this.props.initialZoom) this.zoomLevel = this.props.initialZoom; + if (this.props.initialOffsetX != null) this.offsetX = this.props.initialOffsetX; + if (this.props.initialOffsetY != null) this.offsetY = this.props.initialOffsetY; + this.panAnim.setValue({ + x: this.offsetX, + y: this.offsetY + }); + this.zoomAnim.setValue(this.zoomLevel); + this.panAnim.addListener(({ + x, + y + }) => { + this.offsetX = x; + this.offsetY = y; + }); + this.zoomAnim.addListener(({ + value + }) => { + this.zoomLevel = value; + }); + this.lastGestureTouchDistance = 150; + this.gestureType = null; + } + raisePin() { + if (!this.props.animatePin) return; + _reactNative.Animated.timing(this.pinAnim, { + toValue: { + x: 0, + y: -10 + }, + useNativeDriver: true, + easing: _reactNative.Easing.out(_reactNative.Easing.ease), + duration: 100 + }).start(); + } + dropPin() { + if (!this.props.animatePin) return; + _reactNative.Animated.timing(this.pinAnim, { + toValue: { + x: 0, + y: 0 + }, + useNativeDriver: true, + easing: _reactNative.Easing.out(_reactNative.Easing.ease), + duration: 100 + }).start(); + } + set offsetX(x) { + this.__setOffset('x', x); + } + set offsetY(y) { + this.__setOffset('y', y); + } + get offsetX() { + return this.__getOffset('x'); + } + get offsetY() { + return this.__getOffset('y'); + } + __setOffset(axis, offset) { + const offsetState = this.__offsets[axis]; + if (this.props.bindToBorders) { + const containerSize = axis === 'x' ? this.state.originalWidth : this.state.originalHeight; + const contentSize = axis === 'x' ? this.props.contentWidth || this.state.originalWidth : this.props.contentHeight || this.state.originalHeight; + const boundOffset = contentSize && containerSize && this.props.panBoundaryPadding != null ? (0, _applyPanBoundariesToOffset.applyPanBoundariesToOffset)(offset, containerSize, contentSize, this.zoomLevel, this.props.panBoundaryPadding) : offset; + if (!this.gestureType && !offsetState.boundaryCrossedAnimInEffect) { + const boundariesApplied = boundOffset !== offset && boundOffset.toFixed(3) !== offset.toFixed(3); + if (boundariesApplied) { + offsetState.boundaryCrossedAnimInEffect = true; + (0, _animations.getBoundaryCrossedAnim)(this.panAnim[axis], boundOffset).start(() => { + offsetState.boundaryCrossedAnimInEffect = false; + }); + return; + } + } + } + offsetState.value = offset; + } + __getOffset(axis) { + return this.__offsets[axis].value; + } + componentDidUpdate(prevProps, prevState) { + const { + zoomEnabled, + initialZoom + } = this.props; + if (prevProps.zoomEnabled && !zoomEnabled && initialZoom) { + this.zoomLevel = initialZoom; + this.zoomAnim.setValue(this.zoomLevel); + } + if (!this.onTransformInvocationInitialized && this._invokeOnTransform().successful) { + this.panAnim.addListener(() => this._invokeOnTransform()); + this.zoomAnim.addListener(() => this._invokeOnTransform()); + this.onTransformInvocationInitialized = true; + } + const currState = this.state; + const originalMeasurementsChanged = currState.originalHeight !== prevState.originalHeight || currState.originalWidth !== prevState.originalWidth || currState.originalPageX !== prevState.originalPageX || currState.originalPageY !== prevState.originalPageY || currState.originalX !== prevState.originalX || currState.originalY !== prevState.originalY; + const staticPinPositionChanged = prevProps.staticPinPosition?.x !== this.props.staticPinPosition?.x || prevProps.staticPinPosition?.y !== this.props.staticPinPosition?.y; + + // We use a custom `onLayout` event, so the clients can stay in-sync + // with when the internal measurements are actually saved to the state, + // thus helping them apply transformations at more accurate timings + if (originalMeasurementsChanged) { + const layout = { + width: currState.originalWidth, + height: currState.originalHeight, + x: currState.originalX, + y: currState.originalY + }; + this.props.onLayout?.({ + nativeEvent: { + layout + } + }); + } + if (this.onTransformInvocationInitialized && (originalMeasurementsChanged || staticPinPositionChanged)) { + this._invokeOnTransform(); + } + } + componentDidMount() { + this.measureZoomSubject(); + // We've already run `grabZoomSubjectOriginalMeasurements` at various events + // to make sure the measurements are promptly updated. + // However, there might be cases we haven't accounted for, especially when + // native processes are involved. To account for those cases, + // we'll use an interval here to ensure we're always up-to-date. + // The `setState` in `grabZoomSubjectOriginalMeasurements` won't trigger a rerender + // if the values given haven't changed, so we're not running performance risk here. + this.measureZoomSubjectInterval = setInterval(this.measureZoomSubject, 1e3); + } + componentWillUnmount() { + this.measureZoomSubjectInterval && clearInterval(this.measureZoomSubjectInterval); + } + debouncedOnStaticPinPositionChange = (0, _lodash.debounce)(position => this.props.onStaticPinPositionChange?.(position), 100); + + /** + * try to invoke onTransform + * @private + */ + _invokeOnTransform() { + const zoomableViewEvent = this._getZoomableViewEventObject(); + const position = this._staticPinPosition(); + if (!zoomableViewEvent.originalWidth || !zoomableViewEvent.originalHeight) return { + successful: false + }; + this.props.onTransform?.(zoomableViewEvent); + if (position) { + this.props.onStaticPinPositionMove?.(position); + this.debouncedOnStaticPinPositionChange(position); + } + return { + successful: true + }; + } + + /** + * Returns additional information about components current state for external event hooks + * + * @returns {{}} + * @private + */ + _getZoomableViewEventObject(overwriteObj = {}) { + return { + zoomLevel: this.zoomLevel, + offsetX: this.offsetX, + offsetY: this.offsetY, + originalHeight: this.state.originalHeight, + originalWidth: this.state.originalWidth, + originalPageX: this.state.originalPageX, + originalPageY: this.state.originalPageY, + ...overwriteObj + }; + } + + /** + * Get the original box dimensions and save them for later use. + * (They will be used to calculate boxBorders) + * + * @private + */ + measureZoomSubject = () => { + // make sure we measure after animations are complete + requestAnimationFrame(() => { + // this setTimeout is here to fix a weird issue on iOS where the measurements are all `0` + // when navigating back (react-navigation stack) from another view + // while closing the keyboard at the same time + setTimeout(() => { + // In normal conditions, we're supposed to measure zoomSubject instead of its wrapper. + // However, our zoomSubject may have been transformed by an initial zoomLevel or offset, + // in which case these measurements will not represent the true "original" measurements. + // We just need to make sure the zoomSubjectWrapper perfectly aligns with the zoomSubject + // (no border, space, or anything between them) + this.zoomSubjectWrapperRef.current?.measure((x, y, width, height, pageX, pageY) => { + // When the component is off-screen, these become all 0s, so we don't set them + // to avoid messing up calculations, especially ones that are done right after + // the component transitions from hidden to visible. + if (!pageX && !pageY && !width && !height) return; + + // If these values are all the same, don't re-set them in state + // this way we don't re-render + if (this.state.originalX === x && this.state.originalY === y && this.state.originalWidth === width && this.state.originalHeight === height && this.state.originalPageX === pageX && this.state.originalPageY === pageY) { + return; + } + this.setState({ + originalX: x, + originalY: y, + originalWidth: width, + originalHeight: height, + originalPageX: pageX, + originalPageY: pageY + }); + }); + }); + }); + }; + + /** + * Handles the start of touch events and checks for taps + * + * @param e + * @param gestureState + * @returns {boolean} + * + * @private + */ + _handleStartShouldSetPanResponder = (e, gestureState) => { + if (this.props.onStartShouldSetPanResponder) { + this.props.onStartShouldSetPanResponder(e, gestureState, this._getZoomableViewEventObject(), false); + } + + // Always set pan responder on start + // of gesture so we can handle tap. + // "Pan threshold validation" will be handled + // in `onPanResponderMove` instead of in `onMoveShouldSetPanResponder` + return true; + }; + + /** + * Calculates pinch distance + * + * @param e + * @param gestureState + * @private + */ + _handlePanResponderGrant = (e, gestureState) => { + if (this.props.onLongPress) { + e.persist(); + this.longPressTimeout = setTimeout(() => { + this.props.onLongPress?.(e, gestureState, this._getZoomableViewEventObject()); + this.longPressTimeout = null; + }, this.props.longPressDuration); + } + this.props.onPanResponderGrant?.(e, gestureState, this._getZoomableViewEventObject()); + this.panAnim.stopAnimation(); + this.zoomAnim.stopAnimation(); + this.gestureStarted = true; + this.raisePin(); + }; + + /** + * Handles the end of touch events + * + * @param e + * @param gestureState + * + * @private + */ + _handlePanResponderEnd = (e, gestureState) => { + if (!this.gestureType) { + this._resolveAndHandleTap(e); + } + this.setState({ + debugPoints: [] + }); + this.lastGestureCenterPosition = null; + const disableMomentum = this.props.disableMomentum || this.props.panEnabled && this.gestureType === 'shift' && this.props.disablePanOnInitialZoom && this.zoomLevel === this.props.initialZoom; + + // Trigger final shift animation unless disablePanOnInitialZoom is set and we're on the initial zoom level + // or disableMomentum + if (!disableMomentum) { + (0, _animations.getPanMomentumDecayAnim)(this.panAnim, { + x: gestureState.vx / this.zoomLevel, + y: gestureState.vy / this.zoomLevel + }).start(); + } + if (this.longPressTimeout) { + clearTimeout(this.longPressTimeout); + this.longPressTimeout = null; + } + this.props.onPanResponderEnd?.(e, gestureState, this._getZoomableViewEventObject()); + if (this.gestureType === 'pinch') { + this.props.onZoomEnd?.(e, gestureState, this._getZoomableViewEventObject()); + } else if (this.gestureType === 'shift') { + this.props.onShiftingEnd?.(e, gestureState, this._getZoomableViewEventObject()); + } + if (this.props.staticPinPosition) { + this._updateStaticPin(); + } + this.dropPin(); + this.gestureType = null; + this.gestureStarted = false; + }; + + /** + * Handles the actual movement of our pan responder + * + * @param e + * @param gestureState + * + * @private + */ + _handlePanResponderMove = (e, gestureState) => { + if (this.props.onPanResponderMove) { + if (this.props.onPanResponderMove(e, gestureState, this._getZoomableViewEventObject())) { + return false; + } + } + + // Only supports 2 touches and below, + // any invalid number will cause the gesture to end. + if (gestureState.numberActiveTouches <= 2) { + if (!this.gestureStarted) { + this._handlePanResponderGrant(e, gestureState); + } + } else { + if (this.gestureStarted) { + this._handlePanResponderEnd(e, gestureState); + } + return true; + } + if (gestureState.numberActiveTouches === 2) { + if (this.longPressTimeout) { + clearTimeout(this.longPressTimeout); + this.longPressTimeout = null; + } + + // change some measurement states when switching gesture to ensure a smooth transition + if (this.gestureType !== 'pinch') { + this.lastGestureCenterPosition = (0, _helper.calcGestureCenterPoint)(e, gestureState); + this.lastGestureTouchDistance = (0, _helper.calcGestureTouchDistance)(e, gestureState); + } + this.gestureType = 'pinch'; + this._handlePinching(e, gestureState); + } else if (gestureState.numberActiveTouches === 1) { + if (this.longPressTimeout && (Math.abs(gestureState.dx) > 5 || Math.abs(gestureState.dy) > 5)) { + clearTimeout(this.longPressTimeout); + this.longPressTimeout = null; + } + // change some measurement states when switching gesture to ensure a smooth transition + if (this.gestureType !== 'shift') { + this.lastGestureCenterPosition = (0, _helper.calcGestureCenterPoint)(e, gestureState); + } + const { + dx, + dy + } = gestureState; + const isShiftGesture = Math.abs(dx) > 2 || Math.abs(dy) > 2; + if (isShiftGesture) { + this.gestureType = 'shift'; + this._handleShifting(gestureState); + } + } + }; + + /** + * Handles the pinch movement and zooming + * + * @param e + * @param gestureState + * + * @private + */ + _handlePinching(e, gestureState) { + if (!this.props.zoomEnabled) return; + const { + maxZoom, + minZoom, + pinchToZoomInSensitivity, + pinchToZoomOutSensitivity + } = this.props; + const distance = (0, _helper.calcGestureTouchDistance)(e, gestureState); + if (this.props.onZoomBefore && this.props.onZoomBefore(e, gestureState, this._getZoomableViewEventObject())) { + return; + } + if (!distance) return; + if (!this.lastGestureTouchDistance) return; + + // define the new zoom level and take zoom level sensitivity into consideration + const zoomGrowthFromLastGestureState = distance / this.lastGestureTouchDistance; + this.lastGestureTouchDistance = distance; + const pinchToZoomSensitivity = zoomGrowthFromLastGestureState < 1 ? pinchToZoomOutSensitivity : pinchToZoomInSensitivity; + if (pinchToZoomSensitivity == null) return; + const deltaGrowth = zoomGrowthFromLastGestureState - 1; + // 0 - no resistance + // 10 - 90% resistance + const deltaGrowthAdjustedBySensitivity = deltaGrowth * (1 - pinchToZoomSensitivity * 9 / 100); + let newZoomLevel = this.zoomLevel * (1 + deltaGrowthAdjustedBySensitivity); + + // make sure max and min zoom levels are respected + if (maxZoom != null && newZoomLevel > maxZoom) { + newZoomLevel = maxZoom; + } + if (minZoom != null && newZoomLevel < minZoom) { + newZoomLevel = minZoom; + } + const gestureCenterPoint = (0, _helper.calcGestureCenterPoint)(e, gestureState); + if (!gestureCenterPoint) return; + let zoomCenter = { + x: gestureCenterPoint.x - this.state.originalPageX, + y: gestureCenterPoint.y - this.state.originalPageY + }; + if (this.props.staticPinPosition) { + // When we use a static pin position, the zoom centre is the same as that position, + // otherwise the pin moves around way too much while zooming. + zoomCenter = { + x: this.props.staticPinPosition.x, + y: this.props.staticPinPosition.y + }; + } + + // Uncomment to debug + this.props.debug && this._setPinchDebugPoints(e, zoomCenter); + const { + originalHeight, + originalWidth + } = this.state; + const oldOffsetX = this.offsetX; + const oldOffsetY = this.offsetY; + const oldScale = this.zoomLevel; + const newScale = newZoomLevel; + if (!originalHeight || !originalWidth) return; + let offsetY = (0, _helper.calcNewScaledOffsetForZoomCentering)(oldOffsetY, originalHeight, oldScale, newScale, zoomCenter.y); + let offsetX = (0, _helper.calcNewScaledOffsetForZoomCentering)(oldOffsetX, originalWidth, oldScale, newScale, zoomCenter.x); + const offsetShift = this._calcOffsetShiftSinceLastGestureState(gestureCenterPoint); + if (offsetShift) { + offsetX += offsetShift.x; + offsetY += offsetShift.y; + } + this.offsetX = offsetX; + this.offsetY = offsetY; + this.zoomLevel = newScale; + this.panAnim.setValue({ + x: this.offsetX, + y: this.offsetY + }); + this.zoomAnim.setValue(this.zoomLevel); + this.props.onZoomAfter?.(e, gestureState, this._getZoomableViewEventObject()); + } + + /** + * Used to debug pinch events + * @param gestureResponderEvent + * @param zoomCenter + * @param points + */ + _setPinchDebugPoints(gestureResponderEvent, zoomCenter, ...points) { + const { + touches + } = gestureResponderEvent.nativeEvent; + const { + originalPageY, + originalPageX + } = this.state; + this.setState({ + debugPoints: [{ + x: touches[0].pageX - originalPageX, + y: touches[0].pageY - originalPageY + }, { + x: touches[1].pageX - originalPageX, + y: touches[1].pageY - originalPageY + }, zoomCenter, ...points] + }); + } + + /** + * Calculates the amount the offset should shift since the last position during panning + * + * @param {Vec2D} gestureCenterPoint + * + * @private + */ + _calcOffsetShiftSinceLastGestureState(gestureCenterPoint) { + const { + movementSensibility + } = this.props; + let shift = null; + if (this.lastGestureCenterPosition && movementSensibility) { + const dx = gestureCenterPoint.x - this.lastGestureCenterPosition.x; + const dy = gestureCenterPoint.y - this.lastGestureCenterPosition.y; + const shiftX = dx / this.zoomLevel / movementSensibility; + const shiftY = dy / this.zoomLevel / movementSensibility; + shift = { + x: shiftX, + y: shiftY + }; + } + this.lastGestureCenterPosition = gestureCenterPoint; + return shift; + } + + /** + * Handles movement by tap and move + * + * @param gestureState + * + * @private + */ + _handleShifting(gestureState) { + // Skips shifting if panEnabled is false or disablePanOnInitialZoom is true and we're on the initial zoom level + if (!this.props.panEnabled || this.props.disablePanOnInitialZoom && this.zoomLevel === this.props.initialZoom) { + return; + } + const shift = this._calcOffsetShiftSinceLastGestureState({ + x: gestureState.moveX, + y: gestureState.moveY + }); + if (!shift) return; + const offsetX = this.offsetX + shift.x; + const offsetY = this.offsetY + shift.y; + if (this.props.debug && this.state.originalPageX && this.state.originalPageY) { + const x = gestureState.moveX - this.state.originalPageX; + const y = gestureState.moveY - this.state.originalPageY; + this.setState({ + debugPoints: [{ + x, + y + }] + }); + } + this._setNewOffsetPosition(offsetX, offsetY); + this.raisePin(); + } + + /** + * Set the state to offset moved + * + * @param {number} newOffsetX + * @param {number} newOffsetY + * @returns + */ + _setNewOffsetPosition(newOffsetX, newOffsetY) { + const { + onShiftingBefore, + onShiftingAfter + } = this.props; + if (onShiftingBefore?.(null, null, this._getZoomableViewEventObject())) { + return; + } + this.offsetX = newOffsetX; + this.offsetY = newOffsetY; + this.panAnim.setValue({ + x: this.offsetX, + y: this.offsetY + }); + this.zoomAnim.setValue(this.zoomLevel); + onShiftingAfter?.(null, null, this._getZoomableViewEventObject()); + } + + /** + * Check whether the press event is double tap + * or single tap and handle the event accordingly + * + * @param e + * + * @private + */ + _resolveAndHandleTap = e => { + const now = Date.now(); + if (this.doubleTapFirstTapReleaseTimestamp && this.props.doubleTapDelay && now - this.doubleTapFirstTapReleaseTimestamp < this.props.doubleTapDelay) { + this.doubleTapFirstTap && this._addTouch({ + ...this.doubleTapFirstTap, + id: now.toString(), + isSecondTap: true + }); + this.singleTapTimeoutId && clearTimeout(this.singleTapTimeoutId); + delete this.doubleTapFirstTapReleaseTimestamp; + delete this.singleTapTimeoutId; + delete this.doubleTapFirstTap; + this._handleDoubleTap(e); + } else { + this.doubleTapFirstTapReleaseTimestamp = now; + this.doubleTapFirstTap = { + id: now.toString(), + x: e.nativeEvent.pageX - this.state.originalPageX, + y: e.nativeEvent.pageY - this.state.originalPageY + }; + this._addTouch(this.doubleTapFirstTap); + + // persist event so e.nativeEvent is preserved after a timeout delay + e.persist(); + this.singleTapTimeoutId = setTimeout(() => { + delete this.doubleTapFirstTapReleaseTimestamp; + delete this.singleTapTimeoutId; + + // Pan to the tapped location + if (this.props.staticPinPosition && this.doubleTapFirstTap) { + const tapX = this.props.staticPinPosition.x - this.doubleTapFirstTap.x; + const tapY = this.props.staticPinPosition.y - this.doubleTapFirstTap.y; + _reactNative.Animated.timing(this.panAnim, { + toValue: { + x: this.offsetX + tapX / this.zoomLevel, + y: this.offsetY + tapY / this.zoomLevel + }, + useNativeDriver: true, + duration: 200 + }).start(() => { + this._updateStaticPin(); + }); + } + this.props.onSingleTap?.(e, this._getZoomableViewEventObject()); + }, this.props.doubleTapDelay); + } + }; + moveStaticPinTo = (position, duration) => { + const { + originalWidth, + originalHeight + } = this.state; + const { + staticPinPosition, + contentWidth, + contentHeight + } = this.props; + if (!staticPinPosition) return; + if (!originalWidth || !originalHeight) return; + if (!contentWidth || !contentHeight) return; + + // Offset for the static pin + const pinX = staticPinPosition.x - originalWidth / 2; + const pinY = staticPinPosition.y - originalHeight / 2; + this.offsetX = contentWidth / 2 - position.x + pinX / this.zoomLevel; + this.offsetY = contentHeight / 2 - position.y + pinY / this.zoomLevel; + if (duration) { + _reactNative.Animated.timing(this.panAnim, { + toValue: { + x: this.offsetX, + y: this.offsetY + }, + useNativeDriver: true, + duration + }).start(); + } else { + this.panAnim.setValue({ + x: this.offsetX, + y: this.offsetY + }); + } + }; + _staticPinPosition = () => { + if (!this.props.staticPinPosition) return; + if (!this.props.contentWidth || !this.props.contentHeight) return; + return (0, _coordinateConversion.viewportPositionToImagePosition)({ + viewportPosition: { + x: this.props.staticPinPosition.x, + y: this.props.staticPinPosition.y + }, + imageSize: { + height: this.props.contentHeight, + width: this.props.contentWidth + }, + zoomableEvent: { + ...this._getZoomableViewEventObject(), + offsetX: this.offsetX, + offsetY: this.offsetY, + zoomLevel: this.zoomLevel + } + }); + }; + _updateStaticPin = () => { + const position = this._staticPinPosition(); + if (!position) return; + this.props.onStaticPinPositionChange?.(position); + }; + _addTouch(touch) { + this.touches.push(touch); + this.setState({ + touches: [...this.touches] + }); + } + _removeTouch(touch) { + this.touches.splice(this.touches.indexOf(touch), 1); + this.setState({ + touches: [...this.touches] + }); + } + + /** + * Handles the double tap event + * + * @param e + * + * @private + */ + _handleDoubleTap(e) { + const { + onDoubleTapBefore, + onDoubleTapAfter, + doubleTapZoomToCenter + } = this.props; + onDoubleTapBefore?.(e, this._getZoomableViewEventObject()); + const nextZoomStep = this._getNextZoomStep(); + if (nextZoomStep == null) return; + const { + originalPageX, + originalPageY + } = this.state; + + // define new zoom position coordinates + const zoomPositionCoordinates = { + x: e.nativeEvent.pageX - originalPageX, + y: e.nativeEvent.pageY - originalPageY + }; + + // if doubleTapZoomToCenter enabled -> always zoom to center instead + if (doubleTapZoomToCenter) { + zoomPositionCoordinates.x = 0; + zoomPositionCoordinates.y = 0; + } + this.zoomTo(nextZoomStep, zoomPositionCoordinates); + onDoubleTapAfter?.(e, this._getZoomableViewEventObject({ + zoomLevel: nextZoomStep + })); + } + + /** + * Returns the next zoom step based on current step and zoomStep property. + * If we are zoomed all the way in -> return to initialzoom + * + * @returns {*} + */ + _getNextZoomStep() { + const { + zoomStep, + maxZoom, + initialZoom + } = this.props; + const { + zoomLevel + } = this; + if (maxZoom == null) return; + if (zoomLevel.toFixed(2) === maxZoom.toFixed(2)) { + return initialZoom; + } + if (zoomStep == null) return; + const nextZoomStep = zoomLevel * (1 + zoomStep); + if (nextZoomStep > maxZoom) { + return maxZoom; + } + return nextZoomStep; + } + + /** + * Zooms to a specific level. A "zoom center" can be provided, which specifies + * the point that will remain in the same position on the screen after the zoom. + * The coordinates of the zoom center is relative to the zoom subject. + * { x: 0, y: 0 } is the very center of the zoom subject. + * + * @param newZoomLevel + * @param zoomCenter - If not supplied, the container's center is the zoom center + */ + zoomTo(newZoomLevel, zoomCenter) { + if (!this.props.zoomEnabled) return false; + if (this.props.maxZoom && newZoomLevel > this.props.maxZoom) return false; + if (this.props.minZoom && newZoomLevel < this.props.minZoom) return false; + this.props.onZoomBefore?.(null, null, this._getZoomableViewEventObject()); + + // == Perform Pan Animation to preserve the zoom center while zooming == + let listenerId = ''; + if (zoomCenter) { + // Calculates panAnim values based on changes in zoomAnim. + let prevScale = this.zoomLevel; + // Since zoomAnim is calculated in native driver, + // it will jitter panAnim once in a while, + // because here panAnim is being calculated in js. + // However the jittering should mostly occur in simulator. + listenerId = this.zoomAnim.addListener(({ + value: newScale + }) => { + this.panAnim.setValue({ + x: (0, _helper.calcNewScaledOffsetForZoomCentering)(this.offsetX, this.state.originalWidth, prevScale, newScale, zoomCenter.x), + y: (0, _helper.calcNewScaledOffsetForZoomCentering)(this.offsetY, this.state.originalHeight, prevScale, newScale, zoomCenter.y) + }); + prevScale = newScale; + }); + } + + // == Perform Zoom Animation == + (0, _animations.getZoomToAnimation)(this.zoomAnim, newZoomLevel).start(() => { + this.zoomAnim.removeListener(listenerId); + }); + // == Zoom Animation Ends == + + this.props.onZoomAfter?.(null, null, this._getZoomableViewEventObject()); + return true; + } + + /** + * Zooms in or out by a specified change level + * Use a positive number for `zoomLevelChange` to zoom in + * Use a negative number for `zoomLevelChange` to zoom out + * + * Returns a promise if everything was updated and a boolean, whether it could be updated or if it exceeded the min/max zoom limits. + * + * @param {number | null} zoomLevelChange + * + * @return {bool} + */ + zoomBy(zoomLevelChange) { + // if no zoom level Change given -> just use zoom step + zoomLevelChange ||= this.props.zoomStep || 0; + return this.zoomTo(this.zoomLevel + zoomLevelChange); + } + + /** + * Moves the zoomed view to a specified position + * Returns a promise when finished + * + * @param {number} newOffsetX the new position we want to move it to (x-axis) + * @param {number} newOffsetY the new position we want to move it to (y-axis) + * + * @return {bool} + */ + moveTo(newOffsetX, newOffsetY) { + const { + originalWidth, + originalHeight + } = this.state; + if (!originalWidth || !originalHeight) return; + const offsetX = (newOffsetX - originalWidth / 2) / this.zoomLevel; + const offsetY = (newOffsetY - originalHeight / 2) / this.zoomLevel; + this._setNewOffsetPosition(-offsetX, -offsetY); + } + + /** + * Moves the zoomed view by a certain amount. + * + * Returns a promise when finished + * + * @param {number} offsetChangeX the amount we want to move the offset by (x-axis) + * @param {number} offsetChangeY the amount we want to move the offset by (y-axis) + * + * @return {bool} + */ + moveBy(offsetChangeX, offsetChangeY) { + const offsetX = (this.offsetX * this.zoomLevel - offsetChangeX) / this.zoomLevel; + const offsetY = (this.offsetY * this.zoomLevel - offsetChangeY) / this.zoomLevel; + this._setNewOffsetPosition(offsetX, offsetY); + } + render() { + const { + staticPinIcon, + children, + visualTouchFeedbackEnabled, + doubleTapDelay, + staticPinPosition, + onStaticPinLongPress, + onStaticPinPress, + pinProps + } = this.props; + const { + pinSize, + touches, + debugPoints = [] + } = this.state; + return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, { + style: styles.container, + ...this.gestureHandlers.panHandlers, + ref: this.zoomSubjectWrapperRef, + onLayout: this.measureZoomSubject, + children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, { + style: [styles.zoomSubject, this.props.style, { + transform: [ + // In RN79, we need to split the scale into X and Y to avoid + // the content getting pixelated when zooming in + { + scaleX: this.zoomAnim + }, { + scaleY: this.zoomAnim + }, ...this.panAnim.getTranslateTransform()] + }], + children: children + }), visualTouchFeedbackEnabled && touches?.map(touch => doubleTapDelay && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.AnimatedTouchFeedback, { + x: touch.x, + y: touch.y, + animationDuration: doubleTapDelay, + onAnimationDone: () => { + this._removeTouch(touch); + } + }, touch.id)), debugPoints.map(({ + x, + y + }, index) => { + return /*#__PURE__*/(0, _jsxRuntime.jsx)(_debugHelper.DebugTouchPoint, { + x: x, + y: y + }, index); + }), staticPinPosition && /*#__PURE__*/(0, _jsxRuntime.jsx)(_StaticPin.StaticPin, { + staticPinIcon: staticPinIcon, + staticPinPosition: staticPinPosition, + pinSize: pinSize, + onPress: onStaticPinPress, + onLongPress: onStaticPinLongPress, + onParentMove: this._handlePanResponderMove, + pinAnim: this.pinAnim, + setPinSize: size => { + this.setState({ + pinSize: size + }); + }, + pinProps: pinProps + })] + }); + } +} +exports.ReactNativeZoomableView = ReactNativeZoomableView; +const styles = _reactNative.StyleSheet.create({ + container: { + alignItems: 'center', + flex: 1, + justifyContent: 'center', + overflow: 'hidden', + position: 'relative' + }, + zoomSubject: { + alignItems: 'center', + flex: 1, + justifyContent: 'center', + width: '100%' + } +}); +var _default = exports.default = ReactNativeZoomableView; +//# sourceMappingURL=ReactNativeZoomableView.js.map \ No newline at end of file diff --git a/lib/commonjs/ReactNativeZoomableView.js.map b/lib/commonjs/ReactNativeZoomableView.js.map new file mode 100644 index 00000000..54e8037d --- /dev/null +++ b/lib/commonjs/ReactNativeZoomableView.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_lodash","require","_react","_interopRequireWildcard","_reactNative","_animations","_components","_StaticPin","_debugHelper","_helper","_applyPanBoundariesToOffset","_coordinateConversion","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","initialState","originalWidth","originalHeight","originalPageX","originalPageY","originalX","originalY","pinSize","width","height","ReactNativeZoomableView","Component","defaultProps","zoomEnabled","panEnabled","initialZoom","initialOffsetX","initialOffsetY","maxZoom","minZoom","pinchToZoomInSensitivity","pinchToZoomOutSensitivity","movementSensibility","doubleTapDelay","bindToBorders","zoomStep","onLongPress","longPressDuration","contentWidth","undefined","contentHeight","panBoundaryPadding","visualTouchFeedbackEnabled","staticPinPosition","staticPinIcon","onStaticPinPositionChange","onStaticPinPositionMove","animatePin","disablePanOnInitialZoom","panAnim","Animated","ValueXY","x","y","zoomAnim","Value","pinAnim","__offsets","value","boundaryCrossedAnimInEffect","zoomLevel","lastGestureCenterPosition","lastGestureTouchDistance","_gestureStarted","gestureStarted","v","longPressTimeout","touches","constructor","props","state","gestureHandlers","PanResponder","create","onStartShouldSetPanResponder","_handleStartShouldSetPanResponder","onPanResponderGrant","_handlePanResponderGrant","onPanResponderMove","_handlePanResponderMove","onPanResponderRelease","_handlePanResponderEnd","onPanResponderTerminate","evt","gestureState","_getZoomableViewEventObject","onPanResponderTerminationRequest","onShouldBlockNativeResponder","onStartShouldSetPanResponderCapture","onMoveShouldSetPanResponderCapture","zoomSubjectWrapperRef","createRef","zoomAnimatedValue","panAnimatedValueXY","offsetX","offsetY","setValue","addListener","gestureType","raisePin","timing","toValue","useNativeDriver","easing","Easing","out","ease","duration","start","dropPin","__setOffset","__getOffset","axis","offset","offsetState","containerSize","contentSize","boundOffset","applyPanBoundariesToOffset","boundariesApplied","toFixed","getBoundaryCrossedAnim","componentDidUpdate","prevProps","prevState","onTransformInvocationInitialized","_invokeOnTransform","successful","currState","originalMeasurementsChanged","staticPinPositionChanged","layout","onLayout","nativeEvent","componentDidMount","measureZoomSubject","measureZoomSubjectInterval","setInterval","componentWillUnmount","clearInterval","debouncedOnStaticPinPositionChange","debounce","position","zoomableViewEvent","_staticPinPosition","onTransform","overwriteObj","requestAnimationFrame","setTimeout","current","measure","pageX","pageY","setState","persist","stopAnimation","_resolveAndHandleTap","debugPoints","disableMomentum","getPanMomentumDecayAnim","vx","vy","clearTimeout","onPanResponderEnd","onZoomEnd","onShiftingEnd","_updateStaticPin","numberActiveTouches","calcGestureCenterPoint","calcGestureTouchDistance","_handlePinching","Math","abs","dx","dy","isShiftGesture","_handleShifting","distance","onZoomBefore","zoomGrowthFromLastGestureState","pinchToZoomSensitivity","deltaGrowth","deltaGrowthAdjustedBySensitivity","newZoomLevel","gestureCenterPoint","zoomCenter","debug","_setPinchDebugPoints","oldOffsetX","oldOffsetY","oldScale","newScale","calcNewScaledOffsetForZoomCentering","offsetShift","_calcOffsetShiftSinceLastGestureState","onZoomAfter","gestureResponderEvent","points","shift","shiftX","shiftY","moveX","moveY","_setNewOffsetPosition","newOffsetX","newOffsetY","onShiftingBefore","onShiftingAfter","now","Date","doubleTapFirstTapReleaseTimestamp","doubleTapFirstTap","_addTouch","id","toString","isSecondTap","singleTapTimeoutId","_handleDoubleTap","tapX","tapY","onSingleTap","moveStaticPinTo","pinX","pinY","viewportPositionToImagePosition","viewportPosition","imageSize","zoomableEvent","touch","push","_removeTouch","splice","indexOf","onDoubleTapBefore","onDoubleTapAfter","doubleTapZoomToCenter","nextZoomStep","_getNextZoomStep","zoomPositionCoordinates","zoomTo","listenerId","prevScale","getZoomToAnimation","removeListener","zoomBy","zoomLevelChange","moveTo","moveBy","offsetChangeX","offsetChangeY","render","children","onStaticPinLongPress","onStaticPinPress","pinProps","jsxs","View","style","styles","container","panHandlers","ref","jsx","zoomSubject","transform","scaleX","scaleY","getTranslateTransform","map","AnimatedTouchFeedback","animationDuration","onAnimationDone","index","DebugTouchPoint","StaticPin","onPress","onParentMove","setPinSize","size","exports","StyleSheet","alignItems","flex","justifyContent","overflow","_default"],"sourceRoot":"../../src","sources":["ReactNativeZoomableView.tsx"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAYA,IAAAI,WAAA,GAAAJ,OAAA;AAKA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AAKA,IAAAS,2BAAA,GAAAT,OAAA;AACA,IAAAU,qBAAA,GAAAV,OAAA;AAAgF,IAAAW,WAAA,GAAAX,OAAA;AAAA,SAAAE,wBAAAU,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAZ,uBAAA,YAAAA,CAAAU,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,C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IAAArD,WAAA,CAAAgR,GAAA,EAACrR,UAAA,CAAAiS,SAAS;QACRtO,aAAa,EAAEA,aAAc;QAC7BD,iBAAiB,EAAEA,iBAAkB;QACrC1B,OAAO,EAAEA,OAAQ;QACjBkQ,OAAO,EAAEtB,gBAAiB;QAC1BzN,WAAW,EAAEwN,oBAAqB;QAClCwB,YAAY,EAAE,IAAI,CAACrM,uBAAwB;QAC3CvB,OAAO,EAAE,IAAI,CAACA,OAAQ;QACtB6N,UAAU,EAAGC,IAAY,IAAK;UAC5B,IAAI,CAAC7H,QAAQ,CAAC;YAAExI,OAAO,EAAEqQ;UAAK,CAAC,CAAC;QAClC,CAAE;QACFxB,QAAQ,EAAEA;MAAS,CACpB,CACF;IAAA,CACG,CAAC;EAEX;AACF;AAACyB,OAAA,CAAAnQ,uBAAA,GAAAA,uBAAA;AAED,MAAM8O,MAAM,GAAGsB,uBAAU,CAAC/M,MAAM,CAAC;EAC/B0L,SAAS,EAAE;IACTsB,UAAU,EAAE,QAAQ;IACpBC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBC,QAAQ,EAAE,QAAQ;IAClB9I,QAAQ,EAAE;EACZ,CAAC;EACDyH,WAAW,EAAE;IACXkB,UAAU,EAAE,QAAQ;IACpBC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBzQ,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAAC,IAAA2Q,QAAA,GAAAN,OAAA,CAAAtR,OAAA,GAEYmB,uBAAuB","ignoreList":[]} diff --git a/lib/commonjs/animations/index.js b/lib/commonjs/animations/index.js new file mode 100644 index 00000000..83bff6a3 --- /dev/null +++ b/lib/commonjs/animations/index.js @@ -0,0 +1,31 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getBoundaryCrossedAnim = getBoundaryCrossedAnim; +exports.getPanMomentumDecayAnim = getPanMomentumDecayAnim; +exports.getZoomToAnimation = getZoomToAnimation; +var _reactNative = require("react-native"); +function getBoundaryCrossedAnim(animValue, toValue) { + return _reactNative.Animated.spring(animValue, { + overshootClamping: true, + toValue, + useNativeDriver: true + }); +} +function getPanMomentumDecayAnim(animValue, velocity) { + return _reactNative.Animated.decay(animValue, { + velocity, + deceleration: 0.994, + useNativeDriver: true + }); +} +function getZoomToAnimation(animValue, toValue) { + return _reactNative.Animated.timing(animValue, { + easing: _reactNative.Easing.out(_reactNative.Easing.ease), + toValue, + useNativeDriver: true + }); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/commonjs/animations/index.js.map b/lib/commonjs/animations/index.js.map new file mode 100644 index 00000000..fd01704c --- /dev/null +++ b/lib/commonjs/animations/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_reactNative","require","getBoundaryCrossedAnim","animValue","toValue","Animated","spring","overshootClamping","useNativeDriver","getPanMomentumDecayAnim","velocity","decay","deceleration","getZoomToAnimation","timing","easing","Easing","out","ease"],"sourceRoot":"../../../src","sources":["animations/index.ts"],"mappings":";;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIO,SAASC,sBAAsBA,CACpCC,SAAyB,EACzBC,OAAe,EACf;EACA,OAAOC,qBAAQ,CAACC,MAAM,CAACH,SAAS,EAAE;IAChCI,iBAAiB,EAAE,IAAI;IACvBH,OAAO;IACPI,eAAe,EAAE;EACnB,CAAC,CAAC;AACJ;AAEO,SAASC,uBAAuBA,CACrCN,SAA4C,EAC5CO,QAAwB,EACxB;EACA,OAAOL,qBAAQ,CAACM,KAAK,CAACR,SAAS,EAAE;IAC/BO,QAAQ;IACRE,YAAY,EAAE,KAAK;IACnBJ,eAAe,EAAE;EACnB,CAAC,CAAC;AACJ;AAEO,SAASK,kBAAkBA,CAACV,SAAyB,EAAEC,OAAe,EAAE;EAC7E,OAAOC,qBAAQ,CAACS,MAAM,CAACX,SAAS,EAAE;IAChCY,MAAM,EAAEC,mBAAM,CAACC,GAAG,CAACD,mBAAM,CAACE,IAAI,CAAC;IAC/Bd,OAAO;IACPI,eAAe,EAAE;EACnB,CAAC,CAAC;AACJ","ignoreList":[]} diff --git a/lib/commonjs/assets/pin.png b/lib/commonjs/assets/pin.png new file mode 100644 index 0000000000000000000000000000000000000000..471a7584fbc63178b49f408a62f1f82e36eeb604 GIT binary patch literal 10710 zcmW++Wk6GJ7au(Y>6Vso~i0042(claXor05H-wVILw z;PJnIad%Z30Kg1TQF#5%KmV{GDA-i5{W5HFsl|Z7Q1~RQ$!_CI16)t z`=k^>${jiIIWG{g{X^q(=-Z@fNMv7K&shI+;563gv-C_@1xUl#5u^QGj9dwYs#B`S zW&7cIR~SrPB4?Q+t^1nN@nj$s0`XQMWd)bwi3v6DG~TbV zByZ;>Q_S~-rF59@W#91vvTXTS`d;@<7Z*qWygWOyGQJ zw_H!?`?chP&<@b(D`a3MybV?`?c5ZGLyPU8f3IuQv^l;gm)Q#5YGbF8x2G}D% z<5@?3v=YsRL#}s85Y9xno%PN97B2$(-A#MCRA}0DC3}hRn9c^vJD;KtM zngpS`&imAmYjZ$GxX_Dnqih?J4ZMF?cs)>mcw6-fQvHo)yui+O6bn-fy4CC)&w=EV2M0OtAM+tUV&ntFSk$FIE9=~bM~gMIeL1AEaVeBdIY4KWc^GaRdtNxNewflLoB@6?ZK!z*Mq8^cwJ-i4slYxe=bTD=vVz^M< zbQ~>{FNGhCYg>Z*z4}4R~NmKXNwsoD<(ch$?&fwpvJRnKbF_B4IFke zsg@|kXReKzX!jiSF>|*;*x+NG7$4}U{xBqLa-^6BTPl>L=p>Q)h_J;p>`Dk{5#;{L zxFp8JkRMt$d+S{+Muj3g`6;1MB?z9+URXe zxfz6KXGxHxNBfFzUYfv=BrLY6wWs^uPVM$vX_~CAZo3lX9FSRVI9E8Nm zWdn6mKu@LDoHNgBI-+EC)8?NKkpuM0y>nX74#{OPg`BZ|1 zcVd13K6q`BwkXG1YX@|($Q>cXSkLkVclIT0ujJoXWJc~3xaY}uS_n)f*_ zb`VHRGyvJ&o`cn+&&3Cd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zVaYtFw_#{4E~fgS?PnL!M~;2>+wE2SQ%v*yne#3}^pPtN7|d+j?*VxSZDo#@Nr0h)w0z7X(JJ2+i_S1h>aVz&9}79^JDr zTPUr4O4>DQW_Y4GL{U~WJVu{EqB6JZ0;O`cy85iYYtil16SC4@PZSSiBY>gDZLZq# zGd+aG^KK?jo**seZ-c{H;eleRv$*gr7?gXZ4T){xn59XorVJ0p(JqW2L4Gt>^s z5FmdC`$AyQ3hlLlg1A72=zT(ycjy2Cz4UH4*mvL2pKY{mYeA0vMc;f~vm*$AVwO-| z@rg>3Q(oU^Rya7k{s2SdWpBR%by@i4bdIcSR*I*d7nr66PR0GgAAQp9$x8!F&mOMK zr(klkeB}Y|C-HJ9S=Ke&zm4!D)5z?j`pfIWW;hWyh_0U>O^&$A?@H5TWaN|}*KqU> zFBPBrGZ)HCDo~sF9E1?fFnk)0=Wx@isKzD+oJ+6il5F^P9yXFv!7M;$*B5awB+y%$ z$q&8PP{p)HSn8o=@bD*mmQQh{_pRgpav)$Vp{SS{l?Qt$(A)m@7JXr z`u(!92EtS(dIukZxRMa$Jjd6CSla7l`y1keHg@U{l6PW%px?R)kl|fY zuhsue$Z2SJip|(k+8~G46rm9na9JsQX+RU!YlyzBX-#JBC+))jb8{~mbv+-Sd)bbb zT>Fpj)H-k#8;Dr(LYgYV9$h_W;4!0KJuRHGlKD<5qGyGZiI5c8BX}59L zpO<72a-2$U7?M63{D{A}m^Xq5;V%^RA5MC{IBQ5+nB4%H3&cGE7I9cwmIgrr3=GF6 z=lpz;H~IrzqoiFpe{e8Ovah|cqerhl@Z%plak9YZ==)6+LYNUz=@#B;%a&c;3Lq}@TEcCSF^ANsy n(WLr%?-LvP|NqoCAF*n { + const appearDisappearAnimRef = (0, _react.useRef)(new _reactNative.Animated.Value(0)); + const onAnimationDoneRef = (0, _react.useRef)(onAnimationDone); + onAnimationDoneRef.current = onAnimationDone; + (0, _react.useEffect)(() => { + appearDisappearAnimRef.current.setValue(0); + const inDuration = animationDuration * 0.8; + const outDuration = animationDuration - inDuration; + _reactNative.Animated.sequence([_reactNative.Animated.timing(appearDisappearAnimRef.current, { + delay: animationDelay || 0, + toValue: 1, + duration: inDuration, + easing: _reactNative.Easing.linear, + useNativeDriver: true + }), _reactNative.Animated.timing(appearDisappearAnimRef.current, { + toValue: 0, + duration: outDuration, + easing: _reactNative.Easing.out(_reactNative.Easing.ease), + useNativeDriver: true + })]).start(() => onAnimationDoneRef.current?.()); + }, [animationDelay, animationDuration]); + return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, { + pointerEvents: "none", + style: [styles.animatedTouchFeedback, { + opacity: appearDisappearAnimRef.current.interpolate({ + inputRange: [0, 1], + outputRange: [0, 0.3] + }), + left: x - 20, + top: y - 20, + transform: [{ + scale: appearDisappearAnimRef.current.interpolate({ + inputRange: [0, 1], + outputRange: [0.5, 1] + }) + }] + }] + }); +}; +exports.AnimatedTouchFeedback = AnimatedTouchFeedback; +const styles = _reactNative.StyleSheet.create({ + animatedTouchFeedback: { + backgroundColor: 'lightgray', + borderRadius: 40, + height: 40, + position: 'absolute', + width: 40 + } +}); +//# sourceMappingURL=AnimatedTouchFeedback.js.map \ No newline at end of file diff --git a/lib/commonjs/components/AnimatedTouchFeedback.js.map b/lib/commonjs/components/AnimatedTouchFeedback.js.map new file mode 100644 index 00000000..b33e7fbd --- /dev/null +++ b/lib/commonjs/components/AnimatedTouchFeedback.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AnimatedTouchFeedback","x","y","animationDelay","animationDuration","onAnimationDone","appearDisappearAnimRef","useRef","Animated","Value","onAnimationDoneRef","current","useEffect","setValue","inDuration","outDuration","sequence","timing","delay","toValue","duration","easing","Easing","linear","useNativeDriver","out","ease","start","jsx","View","pointerEvents","style","styles","animatedTouchFeedback","opacity","interpolate","inputRange","outputRange","left","top","transform","scale","exports","StyleSheet","create","backgroundColor","borderRadius","height","position","width"],"sourceRoot":"../../../src","sources":["components/AnimatedTouchFeedback.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAA4D,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAErD,MAAMkB,qBAAqB,GAAGA,C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AM,CAACC,qBAAqB,EAC5B;MACEC,OAAO,EAAE5B,sBAAsB,CAACK,OAAO,CAACwB,WAAW,CAAC;QAClDC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QAClBC,WAAW,EAAE,CAAC,CAAC,EAAE,GAAG;MACtB,CAAC,CAAC;MACFC,IAAI,EAAErC,CAAC,GAAG,EAAE;MACZsC,GAAG,EAAErC,CAAC,GAAG,EAAE;MACXsC,SAAS,EAAE,CACT;QACEC,KAAK,EAAEnC,sBAAsB,CAACK,OAAO,CAACwB,WAAW,CAAC;UAChDC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;UAClBC,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC;QACtB,CAAC;MACH,CAAC;IAEL,CAAC;EACD,CACH,CAAC;AAEN,CAAC;AAACK,OAAA,CAAA1C,qBAAA,GAAAA,qBAAA;AAEF,MAAMgC,MAAM,GAAGW,uBAAU,CAACC,MAAM,CAAC;EAC/BX,qBAAqB,EAAE;IACrBY,eAAe,EAAE,WAAW;IAC5BC,YAAY,EAAE,EAAE;IAChBC,MAAM,EAAE,EAAE;IACVC,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]} diff --git a/lib/commonjs/components/StaticPin.js b/lib/commonjs/components/StaticPin.js new file mode 100644 index 00000000..0edb95b6 --- /dev/null +++ b/lib/commonjs/components/StaticPin.js @@ -0,0 +1,91 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.StaticPin = void 0; +var _react = _interopRequireDefault(require("react")); +var _reactNative = require("react-native"); +var _jsxRuntime = require("react/jsx-runtime"); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +const StaticPin = ({ + staticPinPosition, + pinAnim, + staticPinIcon, + pinSize, + onParentMove, + onPress, + onLongPress, + setPinSize, + pinProps = {} +}) => { + const tapTime = _react.default.useRef(0); + const transform = [{ + translateY: -pinSize.height + }, { + translateX: -pinSize.width / 2 + }, ...pinAnim.getTranslateTransform()]; + const opacity = pinSize.width && pinSize.height ? 1 : 0; + const panResponder = _react.default.useRef(_reactNative.PanResponder.create({ + onStartShouldSetPanResponder: () => { + tapTime.current = Date.now(); + + // We want to handle tap on this so set true + return true; + }, + onPanResponderMove: (evt, gestureState) => { + // However if the user moves finger we want to pass this evt to parent + // to handle panning (tap not recognized) + if (Math.abs(gestureState.dx) > 5 && Math.abs(gestureState.dy) > 5) onParentMove(evt, gestureState); + }, + onPanResponderRelease: (evt, gestureState) => { + if (Math.abs(gestureState.dx) > 5 || Math.abs(gestureState.dy) > 5) return; + const dt = Date.now() - tapTime.current; + if (onPress && dt < 500) { + onPress(evt); + } + if (onLongPress && dt > 500) { + // RN long press is 500ms + onLongPress(evt); + } + } + })).current; + return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, { + style: [{ + left: staticPinPosition.x, + top: staticPinPosition.y + }, styles.pinWrapper, { + opacity, + transform + }], + ...pinProps, + children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, { + onLayout: ({ + nativeEvent: { + layout + } + }) => { + setPinSize(layout); + }, + ...panResponder.panHandlers, + children: staticPinIcon || + /*#__PURE__*/ + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + (0, _jsxRuntime.jsx)(_reactNative.Image, { + source: require('../assets/pin.png'), + style: styles.pin + }) + }) + }); +}; +exports.StaticPin = StaticPin; +const styles = _reactNative.StyleSheet.create({ + pin: { + height: 64, + width: 48 + }, + pinWrapper: { + position: 'absolute' + } +}); +//# sourceMappingURL=StaticPin.js.map \ No newline at end of file diff --git a/lib/commonjs/components/StaticPin.js.map b/lib/commonjs/components/StaticPin.js.map new file mode 100644 index 00000000..8e3d3ade --- /dev/null +++ b/lib/commonjs/components/StaticPin.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","e","__esModule","default","StaticPin","staticPinPosition","pinAnim","staticPinIcon","pinSize","onParentMove","onPress","onLongPress","setPinSize","pinProps","tapTime","React","useRef","transform","translateY","height","translateX","width","getTranslateTransform","opacity","panResponder","PanResponder","create","onStartShouldSetPanResponder","current","Date","now","onPanResponderMove","evt","gestureState","Math","abs","dx","dy","onPanResponderRelease","dt","jsx","Animated","View","style","left","x","top","y","styles","pinWrapper","children","onLayout","nativeEvent","layout","panHandlers","Image","source","pin","exports","StyleSheet","position"],"sourceRoot":"../../../src","sources":["components/StaticPin.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AASsB,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGf,MAAMG,SAAS,GAAGA,CAAC;EACxBC,iBAAiB;EACjBC,OAAO;EACPC,aAAa;EACbC,OAAO;EACPC,YAAY;EACZC,OAAO;EACPC,WAAW;EACXC,UAAU;EACVC,QAAQ,GAAG,CAAC;AAed,CAAC,KAAK;EACJ,MAAMC,OAAO,GAAGC,cAAK,CAACC,MAAM,CAAC,CAAC,CAAC;EAC/B,MAAMC,SAAS,GAAG,CAChB;IAAEC,UAAU,EAAE,CAACV,OAAO,CAACW;EAAO,CAAC,EAC/B;IAAEC,UAAU,EAAE,CAACZ,OAAO,CAACa,KAAK,GAAG;EAAE,CAAC,EAClC,GAAGf,OAAO,CAACgB,qBAAqB,CAAC,CAAC,CACnC;EAED,MAAMC,OAAO,GAAGf,OAAO,CAACa,KAAK,IAAIb,OAAO,CAACW,MAAM,GAAG,CAAC,GAAG,CAAC;EAEvD,MAAMK,YAAY,GAAGT,cAAK,CAACC,MAAM,CAC/BS,yBAAY,CAACC,MAAM,CAAC;IAClBC,4BAA4B,EAAEA,CAAA,KAAM;MAClCb,OAAO,CAACc,OAAO,GAAGC,IA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C,WAAW,EAAE;UAAEC;QAAO;MAAE,CAAC,KAAK;QACzCzC,UAAU,CAACyC,MAAM,CAAC;MACpB,CAAE;MAAA,GACE7B,YAAY,CAAC8B,WAAW;MAAAJ,QAAA,EAE3B3C,aAAa;MAAA;MACZ;MACA,IAAAP,WAAA,CAAAwC,GAAA,EAACzC,YAAA,CAAAwD,KAAK;QAACC,MAAM,EAAE1D,OAAO,CAAC,mBAAmB,CAAE;QAAC6C,KAAK,EAAEK,MAAM,CAACS;MAAI,CAAE;IAClE,CACG;EAAC,CACM,CAAC;AAEpB,CAAC;AAACC,OAAA,CAAAtD,SAAA,GAAAA,SAAA;AAEF,MAAM4C,MAAM,GAAGW,uBAAU,CAACjC,MAAM,CAAC;EAC/B+B,GAAG,EAAE;IACHtC,MAAM,EAAE,EAAE;IACVE,KAAK,EAAE;EACT,CAAC;EACD4B,UAAU,EAAE;IACVW,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]} diff --git a/lib/commonjs/components/index.js b/lib/commonjs/components/index.js new file mode 100644 index 00000000..00f88b3c --- /dev/null +++ b/lib/commonjs/components/index.js @@ -0,0 +1,13 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "AnimatedTouchFeedback", { + enumerable: true, + get: function () { + return _AnimatedTouchFeedback.AnimatedTouchFeedback; + } +}); +var _AnimatedTouchFeedback = require("./AnimatedTouchFeedback"); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/commonjs/components/index.js.map b/lib/commonjs/components/index.js.map new file mode 100644 index 00000000..2f768078 --- /dev/null +++ b/lib/commonjs/components/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_AnimatedTouchFeedback","require"],"sourceRoot":"../../../src","sources":["components/index.tsx"],"mappings":";;;;;;;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA","ignoreList":[]} diff --git a/lib/commonjs/debugHelper/index.js b/lib/commonjs/debugHelper/index.js new file mode 100644 index 00000000..75beac3d --- /dev/null +++ b/lib/commonjs/debugHelper/index.js @@ -0,0 +1,60 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.DebugTouchPoint = exports.DebugRect = void 0; +var _react = _interopRequireDefault(require("react")); +var _reactNative = require("react-native"); +var _jsxRuntime = require("react/jsx-runtime"); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +const DebugTouchPoint = ({ + diameter = 20, + x = 0, + y = 0, + color = 'yellow' +}) => { + const radius = diameter / 2; + return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, { + style: [styles.debugPoint, { + width: diameter, + height: diameter, + borderRadius: diameter, + backgroundColor: color, + left: x - radius, + top: y - radius + }], + pointerEvents: "none" + }); +}; +exports.DebugTouchPoint = DebugTouchPoint; +const DebugRect = ({ + height, + x = 0, + y = 0, + color = 'yellow' +}) => { + const width = 5; + return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, { + style: [styles.debugRect, { + width, + height, + backgroundColor: color, + left: x - width / 2, + top: y + }], + pointerEvents: "none" + }); +}; +exports.DebugRect = DebugRect; +const styles = _reactNative.StyleSheet.create({ + debugPoint: { + opacity: 0.7, + position: 'absolute' + }, + debugRect: { + opacity: 0.5, + position: 'absolute' + } +}); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/commonjs/debugHelper/index.js.map b/lib/commonjs/debugHelper/index.js.map new file mode 100644 index 00000000..8e476675 --- /dev/null +++ b/lib/commonjs/debugHelper/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","e","__esModule","default","DebugTouchPoint","diameter","x","y","color","radius","jsx","View","style","styles","debugPoint","width","height","borderRadius","backgroundColor","left","top","pointerEvents","exports","DebugRect","debugRect","StyleSheet","create","opacity","position"],"sourceRoot":"../../../src","sources":["debugHelper/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,O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A,CAAAC,SAAA,GAAAA,SAAA;AAEF,MAAMV,MAAM,GAAGY,uBAAU,CAACC,MAAM,CAAC;EAC/BZ,UAAU,EAAE;IACVa,OAAO,EAAE,GAAG;IACZC,QAAQ,EAAE;EACZ,CAAC;EACDJ,SAAS,EAAE;IACTG,OAAO,EAAE,GAAG;IACZC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]} diff --git a/lib/commonjs/helper/applyPanBoundariesToOffset.js b/lib/commonjs/helper/applyPanBoundariesToOffset.js new file mode 100644 index 00000000..1b474daa --- /dev/null +++ b/lib/commonjs/helper/applyPanBoundariesToOffset.js @@ -0,0 +1,63 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.applyPanBoundariesToOffset = applyPanBoundariesToOffset; +/** + * Takes a single offset value and calculates the correct offset value + * to make sure it's within the pan boundaries + * + * + * @param offsetScaled + * @param containerSize + * @param contentSize + * @param scale + * @param boundaryPadding - see README + * + * @returns {number} + */ +function applyPanBoundariesToOffset(offsetScaled, containerSize, contentSize, scale, boundaryPadding) { + const contentSizeUnscaled = contentSize * scale; + const offsetUnscaled = offsetScaled * scale; + const contentStartBorderUnscaled = containerSize / 2 + offsetUnscaled - contentSizeUnscaled / 2; + const contentEndBorderUnscaled = contentStartBorderUnscaled + contentSizeUnscaled; + const containerStartBorder = 0; + const containerEndBorder = containerStartBorder + containerSize; + + // do not let boundary padding be greater than the container size or less than 0 + if (!boundaryPadding || boundaryPadding < 0) boundaryPadding = 0; + if (boundaryPadding > containerSize) boundaryPadding = containerSize; + + // Calculate container's measurements with boundary padding applied. + // this should shrink the container's size by the amount of the boundary padding, + // so that the content inside can be panned a bit further away from the original container's boundaries. + const paddedContainerSize = containerSize - boundaryPadding * 2; + const paddedContainerStartBorder = containerStartBorder + boundaryPadding; + const paddedContainerEndBorder = containerEndBorder - boundaryPadding; + + // if content is smaller than the padded container, + // don't let the content move + if (contentSizeUnscaled < paddedContainerSize) { + return 0; + } + + // if content is larger than the padded container, + // don't let the padded container go outside of content + + // maximum distance the content's center can move from its original position. + // assuming the content original center is the container's center. + const contentMaxOffsetScaled = (paddedContainerSize / 2 - contentSizeUnscaled / 2) / scale; + if ( + // content reaching the end boundary + contentEndBorderUnscaled < paddedContainerEndBorder) { + return contentMaxOffsetScaled; + } + if ( + // content reaching the start boundary + contentStartBorderUnscaled > paddedContainerStartBorder) { + return -contentMaxOffsetScaled; + } + return offsetScaled; +} +//# sourceMappingURL=applyPanBoundariesToOffset.js.map \ No newline at end of file diff --git a/lib/commonjs/helper/applyPanBoundariesToOffset.js.map b/lib/commonjs/helper/applyPanBoundariesToOffset.js.map new file mode 100644 index 00000000..e8b91629 --- /dev/null +++ b/lib/commonjs/helper/applyPanBoundariesToOffset.js.map @@ -0,0 +1 @@ +{"version":3,"names":["applyPanBoundariesToOffset","offsetScaled","containerSize","contentSize","scale","boundaryPadding","contentSizeUnscaled","offsetUnscaled","contentStartBorderUnscaled","contentEndBorderUnscaled","containerStartBorder","containerEndBorder","paddedContainerSize","paddedContainerStartBorder","paddedContainerEndBorder","contentMaxOffsetScaled"],"sourceRoot":"../../../src","sources":["helper/applyPanBoundariesToOffset.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,0BAA0BA,CACxCC,YAAoB,EACpBC,aAAqB,EACrBC,WAAmB,EACnBC,KAAa,EACbC,eAAuB,EACvB;EACA,MAAMC,mBAAmB,GAAGH,WAAW,GAAGC,KAAK;EAC/C,MAAMG,cAAc,GAAGN,YAAY,GAAGG,KAAK;EAE3C,MAAMI,0BAA0B,GAC9BN,aAAa,GAAG,CAAC,GAAGK,cAAc,GAAGD,mBAAmB,GAAG,CAAC;EAC9D,MAAMG,wBAAwB,GAC5BD,0BAA0B,GAAGF,mBAAmB;EAElD,MAAMI,oBAAoB,GAAG,CAAC;EAC9B,MAAMC,kBAAkB,GAAGD,oBAAoB,GAAGR,aAAa;;EAE/D;EACA,IAAI,CAACG,eAAe,IAAIA,eAAe,GAAG,CAAC,EAAEA,eAAe,GAAG,CAAC;EAChE,IAAIA,eAAe,GAAGH,aAAa,EAAEG,eAAe,GAAGH,aAAa;;EAEpE;EACA;EACA;EACA,MAAMU,mBAAmB,GAAGV,aAAa,GAAGG,eAAe,GAAG,CAAC;EAC/D,MAAMQ,0BAA0B,GAAGH,oBAAoB,GAAGL,eAAe;EACzE,MAAMS,wBAAwB,GAAGH,kBAAkB,GAAGN,eAAe;;EAErE;EACA;EACA,IAAIC,mBAAmB,GAAGM,mBAAmB,EAAE;IAC7C,OAAO,CAAC;EACV;;EAEA;EACA;;EAEA;EACA;EACA,MAAMG,sBAAsB,GAC1B,CAACH,mBAAmB,GAAG,CAAC,GAAGN,mBAAmB,GAAG,CAAC,IAAIF,KAAK;EAE7D;EACE;EACAK,wBAAwB,GAAGK,wBAAwB,EACnD;IACA,OAAOC,sBAAsB;EAC/B;EACA;EACE;EACAP,0BAA0B,GAAGK,0BAA0B,EACvD;IACA,OAAO,CAACE,sBAAsB;EAChC;EAEA,OAAOd,YAAY;AACrB","ignoreList":[]} diff --git a/lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js b/lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js new file mode 100644 index 00000000..cdf9a308 --- /dev/null +++ b/lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js @@ -0,0 +1,73 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.calcNewScaledOffsetForZoomCentering = calcNewScaledOffsetForZoomCentering; +/** + * Calculates the new offset for the zoomSubject to ensure zoom center position is retained after zooming. + * Parameters should correspond to whether we need the offset for the X or Y axis + * + * ## Terms Used: + * + * - Zoom Subject: the view that's being zoomed and panned + * - Zoom Center: the point whose relative position to the window is retained + * - Unscaled: a measurement in pixels denoting the true size as observed by the users' eyes + * - Scaled: a measurement in pixels scaled to the "scale transformation" of the zoom subject to match with its true size. + * *For example:* + * If the scale on the zoom subject is 0.5, + * then to draw an actual 4px line on the zoom subject, we need to scale it to 4px / 0.5 = 8px + * 8px is the scaled measurement + * + * ## Overall idea of this algorithm: + * + * When users perform zooming by pinching the screen, + * we need to shift the zoom subject so that the position of the zoom center is always the same. + * The offset amount to shift the layer is the returned value. + * + * + * ## How we achieve our goal: + * + * To retain, the zoom center position, whenever a zoom action is performed, + * we just need to make sure the distances from all the points in the zoom subject + * to the zoom center increases or decreases by the growth rate of the scale. + * + * ``` + * newDistanceAnyPointToZoomCenter = oldDistanceAnyPointToZoomCenter * (newScale/oldScale) + * ``` + * + * We can't calculate that for all the points because there are unlimited points on a plain. + * However, due to the way `transform` works in RN, every point is scaled from the zoom subject center. + * Therefore, it's sufficient to base our calculation on the distance from the zoom subject center to the zoom center. + * + * ``` + * newDistanceZoomSubjectCenterToZoomCenter = oldDistanceZoomSubjectCenterToZoomCenter * (newScale/oldScale) + * ``` + * + * Once we have `newDistanceZoomSubjectCenterToZoomCenter`, + * we can easily calculate the position of the new center, which leads us to the offset amount. + * Refer to the code for more details + * + * @param oldOffsetXOrYScaled + * @param zoomSubjectOriginalWidthOrHeight + * @param oldScale + * @param newScale + * @param zoomCenterXOrY + */ +function calcNewScaledOffsetForZoomCentering(oldOffsetXOrYScaled, zoomSubjectOriginalWidthOrHeight, oldScale, newScale, zoomCenterXOrY) { + const oldOffSetUnscaled = oldOffsetXOrYScaled * oldScale; + const growthRate = newScale / oldScale; + + // these act like namespaces just for the sake of readability + const zoomSubjectOriginalCenter = {}; + const zoomSubjectCurrentCenter = {}; + const zoomSubjectNewCenter = {}; + zoomSubjectOriginalCenter.xOrY = zoomSubjectOriginalWidthOrHeight / 2; + zoomSubjectCurrentCenter.xOrY = zoomSubjectOriginalCenter.xOrY + oldOffSetUnscaled; + zoomSubjectCurrentCenter.distanceToZoomCenter = zoomSubjectCurrentCenter.xOrY - zoomCenterXOrY; + zoomSubjectNewCenter.distanceToZoomCenter = zoomSubjectCurrentCenter.distanceToZoomCenter * growthRate; + zoomSubjectNewCenter.xOrY = zoomSubjectNewCenter.distanceToZoomCenter + zoomCenterXOrY; + const newOffsetUnscaled = zoomSubjectNewCenter.xOrY - zoomSubjectOriginalCenter.xOrY; + return newOffsetUnscaled / newScale; +} +//# sourceMappingURL=calcNewScaledOffsetForZoomCentering.js.map \ No newline at end of file diff --git a/lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js.map b/lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js.map new file mode 100644 index 00000000..0b6bb9c3 --- /dev/null +++ b/lib/commonjs/helper/calcNewScaledOffsetForZoomCentering.js.map @@ -0,0 +1 @@ +{"version":3,"names":["calcNewScaledOffsetForZoomCentering","oldOffsetXOrYScaled","zoomSubjectOriginalWidthOrHeight","oldScale","newScale","zoomCenterXOrY","oldOffSetUnscaled","growthRate","zoomSubjectOriginalCenter","zoomSubjectCurrentCenter","zoomSubjectNewCenter","xOrY","distanceToZoomCenter","newOffsetUnscaled"],"sourceRoot":"../../../src","sources":["helper/calcNewScaledOffsetForZoomCentering.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,mCAAmCA,CACjDC,mBAA2B,EAC3BC,gCAAwC,EACxCC,QAAgB,EAChBC,QAAgB,EAChBC,cAAsB,EACtB;EACA,MAAMC,iBAAiB,GAAGL,mBAAmB,GAAGE,QAAQ;EACxD,MAAMI,UAAU,GAAGH,QAAQ,GAAGD,QAAQ;;EAEtC;EACA,MAAMK,yBAAyB,GAAG,CAAC,CAAW;EAC9C,MAAMC,wBAAwB,GAAG,CAAC,CAAW;EAC7C,MAAMC,oBAAoB,GAAG,CAAC,CAAW;EAEzCF,yBAAyB,CAACG,IAAI,GAAGT,gCAAgC,GAAG,CAAC;EACrEO,wBAAwB,CAACE,IAAI,GAC3BH,yBAAyB,CAACG,IAAI,GAAGL,iBAAiB;EACpDG,wBAAwB,CAACG,oBAAoB,GAC3CH,wBAAwB,CAACE,IAAI,GAAGN,cAAc;EAEhDK,oBAAoB,CAACE,oBAAoB,GACvCH,wBAAwB,CAACG,oBAAoB,GAAGL,UAAU;EAC5DG,oBAAoB,CAACC,IAAI,GACvBD,oBAAoB,CAACE,oBAAoB,GAAGP,cAAc;EAE5D,MAAMQ,iBAAiB,GACrBH,oBAAoB,CAACC,IAAI,GAAGH,yBAAyB,CAACG,IAAI;EAE5D,OAAOE,iBAAiB,GAAGT,QAAQ;AACrC","ignoreList":[]} diff --git a/lib/commonjs/helper/coordinateConversion.js b/lib/commonjs/helper/coordinateConversion.js new file mode 100644 index 00000000..c49c2092 --- /dev/null +++ b/lib/commonjs/helper/coordinateConversion.js @@ -0,0 +1,117 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.applyContainResizeMode = applyContainResizeMode; +exports.defaultTransformSubjectData = void 0; +exports.getImageOriginOnTransformSubject = getImageOriginOnTransformSubject; +exports.viewportPositionToImagePosition = viewportPositionToImagePosition; +const defaultTransformSubjectData = exports.defaultTransformSubjectData = { + offsetX: 0, + offsetY: 0, + zoomLevel: 0, + originalWidth: 0, + originalHeight: 0, + originalPageX: 0, + originalPageY: 0 +}; + +/** + * Assuming you have an image that's being resized to fit into a container + * using the "contain" resize mode. You can use this function to calculate the + * size of the image after fitting. + * + * Since our sheet is resized in this manner, we need this function + * for things like pan boundaries and marker placement + * + * @param imgSize + * @param containerSize + */ +function applyContainResizeMode(imgSize, containerSize) { + const { + width: imageWidth, + height: imageHeight + } = imgSize; + const { + width: areaWidth, + height: areaHeight + } = containerSize; + const imageAspect = imageWidth / imageHeight; + const areaAspect = areaWidth / areaHeight; + let newSize; + if (imageAspect >= areaAspect) { + // longest edge is horizontal + newSize = { + width: areaWidth, + height: areaWidth / imageAspect + }; + } else { + // longest edge is vertical + newSize = { + width: areaHeight * imageAspect, + height: areaHeight + }; + } + if (isNaN(newSize.height)) newSize.height = areaHeight; + if (isNaN(newSize.width)) newSize.width = areaWidth; + const scale = imageWidth ? newSize.width / imageWidth : newSize.height / imageHeight; + if (!isFinite(scale)) return { + size: null, + scale: null + }; + return { + size: newSize, + scale + }; +} + +/** + * get the coord of image's origin relative to the transformSubject + * @param resizedImageSize + * @param transformSubject + */ +function getImageOriginOnTransformSubject(resizedImageSize, transformSubject) { + const { + offsetX, + offsetY, + zoomLevel, + originalWidth, + originalHeight + } = transformSubject; + return { + x: offsetX * zoomLevel + originalWidth / 2 - resizedImageSize.width / 2 * zoomLevel, + y: offsetY * zoomLevel + originalHeight / 2 - resizedImageSize.height / 2 * zoomLevel + }; +} + +/** + * Translates the coord system of a point from the viewport's space to the image's space + * + * @param pointOnContainer + * @param sheetImageSize + * @param transformSubject + * + * @return {Vec2D} returns null if point is out of the sheet's bound + */ +function viewportPositionToImagePosition({ + viewportPosition, + imageSize, + zoomableEvent +}) { + const { + size: resizedImgSize, + scale: resizedImgScale + } = applyContainResizeMode(imageSize, { + width: zoomableEvent.originalWidth, + height: zoomableEvent.originalHeight + }); + if (resizedImgScale == null) return null; + const sheetOriginOnContainer = getImageOriginOnTransformSubject(resizedImgSize, zoomableEvent); + const pointOnSheet = { + x: (viewportPosition.x - sheetOriginOnContainer.x) / zoomableEvent.zoomLevel / resizedImgScale, + y: (viewportPosition.y - sheetOriginOnContainer.y) / zoomableEvent.zoomLevel / resizedImgScale + }; + return pointOnSheet; +} +//# sourceMappingURL=coordinateConversion.js.map \ No newline at end of file diff --git a/lib/commonjs/helper/coordinateConversion.js.map b/lib/commonjs/helper/coordinateConversion.js.map new file mode 100644 index 00000000..88b61d95 --- /dev/null +++ b/lib/commonjs/helper/coordinateConversion.js.map @@ -0,0 +1 @@ +{"version":3,"names":["defaultTransformSubjectData","exports","offsetX","offsetY","zoomLevel","originalWidth","originalHeight","originalPageX","originalPageY","applyContainResizeMode","imgSize","containerSize","width","imageWidth","height","imageHeight","areaWidth","areaHeight","imageAspect","areaAspect","newSize","isNaN","scale","isFinite","size","getImageOriginOnTransformSubject","resizedImageSize","transformSubject","x","y","viewportPositionToImagePosition","viewportPosition","imageSize","zoomableEvent","resizedImgSize","resizedImgScale","sheetOriginOnContainer","pointOnSheet"],"sourceRoot":"../../../src","sources":["helper/coordinateConversion.ts"],"mappings":";;;;;;;;;AAEO,MAAMA,2BAA8C,GAAAC,OAAA,CAAAD,2BAAA,GAAG;EAC5DE,OAAO,EAAE,CAAC;EACVC,OAAO,EAAE,CAAC;EACVC,SAAS,EAAE,CAAC;EACZC,aAAa,EAAE,CAAC;EAChBC,cAAc,EAAE,CAAC;EACjBC,aAAa,EAAE,CAAC;EAChBC,aAAa,EAAE;AACjB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,sBAAsBA,CACpCC,OAAe,EACfC,aAAqB,EAC0C;EAC/D,MAAM;IAAEC,KAAK,EAAEC,UAAU;IAAEC,MAAM,EAAEC;EAAY,CAAC,GAAGL,OAAO;EAC1D,MAAM;IAAEE,KAAK,EAAEI,SAAS;IAAEF,MAAM,EAAEG;EAAW,CAAC,GAAGN,aAAa;EAC9D,MAAMO,WAAW,GAAGL,UAAU,GAAGE,WAAW;EAC5C,MAAMI,UAAU,GAAGH,SAAS,GAAGC,UAAU;EAEzC,IAAIG,OAAO;EACX,IAAIF,WAAW,IAAIC,UAAU,EAAE;IAC7B;IACAC,OAAO,GAAG;MAAER,KAAK,EAAEI,SAAS;MAAEF,MAAM,EAAEE,SAAS,GAAGE;IAAY,CAAC;EACjE,CAAC,MAAM;IACL;IACAE,OAAO,GAAG;MAAER,KAAK,EAAEK,UAAU,GAAGC,WAAW;MAAEJ,MAAM,EAAEG;IAAW,CAAC;EACnE;EAEA,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,CAAC;EAEJ,IAAI6B,eAAe,IAAI,IAAI,EAAE,OAAO,IAAI;EAExC,MAAMC,sBAAsB,GAAGX,gCAAgC,CAC7DS,cAAc,EACdD,aACF,CAAC;EAED,MAAMI,YAAY,GAAG;IACnBT,CAAC,EACC,CAACG,gBAAgB,CAACH,CAAC,GAAGQ,sBAAsB,CAACR,CAAC,IAC9CK,aAAa,CAAC7B,SAAS,GACvB+B,eAAe;IACjBN,CAAC,EACC,CAACE,gBAAgB,CAACF,CAAC,GAAGO,sBAAsB,CAACP,CAAC,IAC9CI,aAAa,CAAC7B,SAAS,GACvB+B;EACJ,CAAC;EAED,OAAOE,YAAY;AACrB","ignoreList":[]} diff --git a/lib/commonjs/helper/index.js b/lib/commonjs/helper/index.js new file mode 100644 index 00000000..5d28b872 --- /dev/null +++ b/lib/commonjs/helper/index.js @@ -0,0 +1,51 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.calcGestureCenterPoint = calcGestureCenterPoint; +exports.calcGestureTouchDistance = calcGestureTouchDistance; +Object.defineProperty(exports, "calcNewScaledOffsetForZoomCentering", { + enumerable: true, + get: function () { + return _calcNewScaledOffsetForZoomCentering.calcNewScaledOffsetForZoomCentering; + } +}); +var _calcNewScaledOffsetForZoomCentering = require("./calcNewScaledOffsetForZoomCentering"); +/** + * Calculates the gesture center point relative to the page coordinate system + * + * We're unable to use touch.locationX/Y + * because locationX uses the axis system of the leaf element that the touch occurs on, + * which makes it even more complicated to translate into our container's axis system. + * + * We're also unable to use gestureState.moveX/Y + * because gestureState.moveX/Y is messed up on real device + * (Sometimes it's the center point, but sometimes it randomly takes the position of one of the touches) + */ +function calcGestureCenterPoint(e, gestureState) { + const touches = e.nativeEvent.touches; + if (!touches[0]) return null; + if (gestureState.numberActiveTouches === 2) { + if (!touches[1]) return null; + return { + x: (touches[0].pageX + touches[1].pageX) / 2, + y: (touches[0].pageY + touches[1].pageY) / 2 + }; + } + if (gestureState.numberActiveTouches === 1) { + return { + x: touches[0].pageX, + y: touches[0].pageY + }; + } + return null; +} +function calcGestureTouchDistance(e, gestureState) { + const touches = e.nativeEvent.touches; + if (gestureState.numberActiveTouches !== 2 || !touches[0] || !touches[1]) return null; + const dx = Math.abs(touches[0].pageX - touches[1].pageX); + const dy = Math.abs(touches[0].pageY - touches[1].pageY); + return Math.sqrt(dx * dx + dy * dy); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/commonjs/helper/index.js.map b/lib/commonjs/helper/index.js.map new file mode 100644 index 00000000..53f40f3c --- /dev/null +++ b/lib/commonjs/helper/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_calcNewScaledOffsetForZoomCentering","require","calcGestureCenterPoint","e","gestureState","touches","nativeEvent","numberActiveTouches","x","pageX","y","pageY","calcGestureTouchDistance","dx","Math","abs","dy","sqrt"],"sourceRoot":"../../../src","sources":["helper/index.ts"],"mappings":";;;;;;;;;;;;;AAIA,IAAAA,oCAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,sBAAsBA,CACpCC,CAAwB,EACxBC,YAAsC,EACxB;EACd,MAAMC,OAAO,GAAGF,CAAC,CAACG,WAAW,CAACD,OAAO;EACrC,IAAI,CAACA,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,IAAI;EAE5B,IAAID,YAAY,CAACG,mBAAmB,KAAK,CAAC,EAAE;IAC1C,IAAI,CAACF,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,IAAI;IAC5B,OAAO;MACLG,CAAC,EAAE,CAACH,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK,GAAGJ,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK,IAAI,CAAC;MAC5CC,CAAC,EAAE,CAACL,OAAO,CAAC,CAAC,CAAC,CAACM,KAAK,GAAGN,OAAO,CAAC,CAAC,CAAC,CAACM,KAAK,IAAI;IAC7C,CAAC;EACH;EACA,IAAIP,YAAY,CAACG,mBAAmB,KAAK,CAAC,EAAE;IAC1C,OAAO;MACLC,CAAC,EAAEH,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK;MACnBC,CAAC,EAAEL,OAAO,CAAC,CAAC,CAAC,CAACM;IAChB,CAAC;EACH;EAEA,OAAO,IAAI;AACb;AAEO,SAASC,wBAAwBA,CACtCT,CAAwB,EACxBC,YAAsC,EACvB;EACf,MAAMC,OAAO,GAAGF,CAAC,CAACG,WAAW,CAACD,OAAO;EACrC,IAAID,YAAY,CAACG,mBAAmB,KAAK,CAAC,IAAI,CAACF,OAAO,CAAC,CAAC,CAAC,IAAI,CAACA,OAAO,CAAC,CAAC,CAAC,EACtE,OAAO,IAAI;EAEb,MAAMQ,EAAE,GAAGC,IAAI,CAACC,GAAG,CAACV,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK,GAAGJ,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK,CAAC;EACxD,MAAMO,EAAE,GAAGF,IAAI,CAACC,GAAG,CAACV,OAAO,CAAC,CAAC,CAAC,CAACM,KAAK,GAAGN,OAAO,CAAC,CAAC,CAAC,CAACM,KAAK,CAAC;EACxD,OAAOG,IAAI,CAACG,IAAI,CAACJ,EAAE,GAAGA,EAAE,GAAGG,EAAE,GAAGA,EAAE,CAAC;AACrC","ignoreList":[]} diff --git a/lib/commonjs/index.js b/lib/commonjs/index.js new file mode 100644 index 00000000..39cbcac4 --- /dev/null +++ b/lib/commonjs/index.js @@ -0,0 +1,33 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "ReactNativeZoomableView", { + enumerable: true, + get: function () { + return _ReactNativeZoomableView.default; + } +}); +Object.defineProperty(exports, "applyContainResizeMode", { + enumerable: true, + get: function () { + return _coordinateConversion.applyContainResizeMode; + } +}); +Object.defineProperty(exports, "getImageOriginOnTransformSubject", { + enumerable: true, + get: function () { + return _coordinateConversion.getImageOriginOnTransformSubject; + } +}); +Object.defineProperty(exports, "viewportPositionToImagePosition", { + enumerable: true, + get: function () { + return _coordinateConversion.viewportPositionToImagePosition; + } +}); +var _coordinateConversion = require("./helper/coordinateConversion"); +var _ReactNativeZoomableView = _interopRequireDefault(require("./ReactNativeZoomableView")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/commonjs/index.js.map b/lib/commonjs/index.js.map new file mode 100644 index 00000000..631e5134 --- /dev/null +++ b/lib/commonjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_coordinateConversion","require","_ReactNativeZoomableView","_interopRequireDefault","e","__esModule","default"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,qBAAA,GAAAC,OAAA;AAKA,IAAAC,wBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAgE,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]} diff --git a/lib/commonjs/package.json b/lib/commonjs/package.json new file mode 100644 index 00000000..729ac4d9 --- /dev/null +++ b/lib/commonjs/package.json @@ -0,0 +1 @@ +{"type":"commonjs"} diff --git a/lib/commonjs/typings/index.js b/lib/commonjs/typings/index.js new file mode 100644 index 00000000..4907bab3 --- /dev/null +++ b/lib/commonjs/typings/index.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SwipeDirection = void 0; +let SwipeDirection = exports.SwipeDirection = /*#__PURE__*/function (SwipeDirection) { + SwipeDirection["SWIPE_UP"] = "SWIPE_UP"; + SwipeDirection["SWIPE_DOWN"] = "SWIPE_DOWN"; + SwipeDirection["SWIPE_LEFT"] = "SWIPE_LEFT"; + SwipeDirection["SWIPE_RIGHT"] = "SWIPE_RIGHT"; + return SwipeDirection; +}({}); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/commonjs/typings/index.js.map b/lib/commonjs/typings/index.js.map new file mode 100644 index 00000000..1b6eb0df --- /dev/null +++ b/lib/commonjs/typings/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["SwipeDirection","exports"],"sourceRoot":"../../../src","sources":["typings/index.ts"],"mappings":";;;;;;IASYA,cAAc,GAAAC,OAAA,CAAAD,cAAA,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]} diff --git a/lib/module/ReactNativeZoomableView.js b/lib/module/ReactNativeZoomableView.js new file mode 100644 index 00000000..8ac51081 --- /dev/null +++ b/lib/module/ReactNativeZoomableView.js @@ -0,0 +1,1053 @@ +"use strict"; + +import { debounce } from 'lodash'; +import React, { Component, createRef } from 'react'; +import { Animated, Easing, PanResponder, StyleSheet, View } from 'react-native'; +import { getBoundaryCrossedAnim, getPanMomentumDecayAnim, getZoomToAnimation } from './animations'; +import { AnimatedTouchFeedback } from './components'; +import { StaticPin } from './components/StaticPin'; +import { DebugTouchPoint } from './debugHelper'; +import { calcGestureCenterPoint, calcGestureTouchDistance, calcNewScaledOffsetForZoomCentering } from './helper'; +import { applyPanBoundariesToOffset } from './helper/applyPanBoundariesToOffset'; +import { viewportPositionToImagePosition } from './helper/coordinateConversion'; +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +const initialState = { + originalWidth: 0, + originalHeight: 0, + originalPageX: 0, + originalPageY: 0, + originalX: 0, + originalY: 0, + pinSize: { + width: 0, + height: 0 + } +}; +class ReactNativeZoomableView extends Component { + static defaultProps = { + zoomEnabled: true, + panEnabled: true, + initialZoom: 1, + initialOffsetX: 0, + initialOffsetY: 0, + maxZoom: 1.5, + minZoom: 0.5, + pinchToZoomInSensitivity: 1, + pinchToZoomOutSensitivity: 1, + movementSensibility: 1, + doubleTapDelay: 300, + bindToBorders: true, + zoomStep: 0.5, + onLongPress: null, + longPressDuration: 700, + contentWidth: undefined, + contentHeight: undefined, + panBoundaryPadding: 0, + visualTouchFeedbackEnabled: true, + staticPinPosition: undefined, + staticPinIcon: undefined, + onStaticPinPositionChange: undefined, + onStaticPinPositionMove: undefined, + animatePin: true, + disablePanOnInitialZoom: false + }; + panAnim = new Animated.ValueXY({ + x: 0, + y: 0 + }); + zoomAnim = new Animated.Value(1); + pinAnim = new Animated.ValueXY({ + x: 0, + y: 0 + }); + __offsets = { + x: { + value: 0, + boundaryCrossedAnimInEffect: false + }, + y: { + value: 0, + boundaryCrossedAnimInEffect: false + } + }; + zoomLevel = 1; + lastGestureCenterPosition = null; + lastGestureTouchDistance = null; + _gestureStarted = false; + set gestureStarted(v) { + this._gestureStarted = v; + } + get gestureStarted() { + return this._gestureStarted; + } + + /** + * Last press time (used to evaluate whether user double tapped) + * @type {number} + */ + longPressTimeout = null; + touches = []; + constructor(props) { + super(props); + // This needs to be done before anything else to initialize the state. + // Otherwise, the logic below may reference the state when it's undefined, + // causing runtime errors. + this.state = { + ...initialState + }; + this.gestureHandlers = PanResponder.create({ + onStartShouldSetPanResponder: this._handleStartShouldSetPanResponder, + onPanResponderGrant: this._handlePanResponderGrant, + onPanResponderMove: this._handlePanResponderMove, + onPanResponderRelease: this._handlePanResponderEnd, + onPanResponderTerminate: (evt, gestureState) => { + // We should also call _handlePanResponderEnd + // to properly perform cleanups when the gesture is terminated + // (aka gesture handling responsibility is taken over by another component). + // This also fixes a weird issue where + // on real device, sometimes onPanResponderRelease is not called when you lift 2 fingers up, + // but onPanResponderTerminate is called instead for no apparent reason. + this._handlePanResponderEnd(evt, gestureState); + this.props.onPanResponderTerminate?.(evt, gestureState, this._getZoomableViewEventObject()); + }, + onPanResponderTerminationRequest: (evt, gestureState) => !!this.props.onPanResponderTerminationRequest?.(evt, gestureState, this._getZoomableViewEventObject()), + // Defaults to true to prevent parent components, such as React Navigation's tab view, from taking over as responder. + onShouldBlockNativeResponder: (evt, gestureState) => this.props.onShouldBlockNativeResponder?.(evt, gestureState, this._getZoomableViewEventObject()) ?? true, + onStartShouldSetPanResponderCapture: (evt, gestureState) => !!this.props.onStartShouldSetPanResponderCapture?.(evt, gestureState), + onMoveShouldSetPanResponderCapture: (evt, gestureState) => !!this.props.onMoveShouldSetPanResponderCapture?.(evt, gestureState) + }); + this.zoomSubjectWrapperRef = /*#__PURE__*/createRef(); + if (this.props.zoomAnimatedValue) this.zoomAnim = this.props.zoomAnimatedValue; + if (this.props.panAnimatedValueXY) this.panAnim = this.props.panAnimatedValueXY; + if (this.props.initialZoom) this.zoomLevel = this.props.initialZoom; + if (this.props.initialOffsetX != null) this.offsetX = this.props.initialOffsetX; + if (this.props.initialOffsetY != null) this.offsetY = this.props.initialOffsetY; + this.panAnim.setValue({ + x: this.offsetX, + y: this.offsetY + }); + this.zoomAnim.setValue(this.zoomLevel); + this.panAnim.addListener(({ + x, + y + }) => { + this.offsetX = x; + this.offsetY = y; + }); + this.zoomAnim.addListener(({ + value + }) => { + this.zoomLevel = value; + }); + this.lastGestureTouchDistance = 150; + this.gestureType = null; + } + raisePin() { + if (!this.props.animatePin) return; + Animated.timing(this.pinAnim, { + toValue: { + x: 0, + y: -10 + }, + useNativeDriver: true, + easing: Easing.out(Easing.ease), + duration: 100 + }).start(); + } + dropPin() { + if (!this.props.animatePin) return; + Animated.timing(this.pinAnim, { + toValue: { + x: 0, + y: 0 + }, + useNativeDriver: true, + easing: Easing.out(Easing.ease), + duration: 100 + }).start(); + } + set offsetX(x) { + this.__setOffset('x', x); + } + set offsetY(y) { + this.__setOffset('y', y); + } + get offsetX() { + return this.__getOffset('x'); + } + get offsetY() { + return this.__getOffset('y'); + } + __setOffset(axis, offset) { + const offsetState = this.__offsets[axis]; + if (this.props.bindToBorders) { + const containerSize = axis === 'x' ? this.state.originalWidth : this.state.originalHeight; + const contentSize = axis === 'x' ? this.props.contentWidth || this.state.originalWidth : this.props.contentHeight || this.state.originalHeight; + const boundOffset = contentSize && containerSize && this.props.panBoundaryPadding != null ? applyPanBoundariesToOffset(offset, containerSize, contentSize, this.zoomLevel, this.props.panBoundaryPadding) : offset; + if (!this.gestureType && !offsetState.boundaryCrossedAnimInEffect) { + const boundariesApplied = boundOffset !== offset && boundOffset.toFixed(3) !== offset.toFixed(3); + if (boundariesApplied) { + offsetState.boundaryCrossedAnimInEffect = true; + getBoundaryCrossedAnim(this.panAnim[axis], boundOffset).start(() => { + offsetState.boundaryCrossedAnimInEffect = false; + }); + return; + } + } + } + offsetState.value = offset; + } + __getOffset(axis) { + return this.__offsets[axis].value; + } + componentDidUpdate(prevProps, prevState) { + const { + zoomEnabled, + initialZoom + } = this.props; + if (prevProps.zoomEnabled && !zoomEnabled && initialZoom) { + this.zoomLevel = initialZoom; + this.zoomAnim.setValue(this.zoomLevel); + } + if (!this.onTransformInvocationInitialized && this._invokeOnTransform().successful) { + this.panAnim.addListener(() => this._invokeOnTransform()); + this.zoomAnim.addListener(() => this._invokeOnTransform()); + this.onTransformInvocationInitialized = true; + } + const currState = this.state; + const originalMeasurementsChanged = currState.originalHeight !== prevState.originalHeight || currState.originalWidth !== prevState.originalWidth || currState.originalPageX !== prevState.originalPageX || currState.originalPageY !== prevState.originalPageY || currState.originalX !== prevState.originalX || currState.originalY !== prevState.originalY; + const staticPinPositionChanged = prevProps.staticPinPosition?.x !== this.props.staticPinPosition?.x || prevProps.staticPinPosition?.y !== this.props.staticPinPosition?.y; + + // We use a custom `onLayout` event, so the clients can stay in-sync + // with when the internal measurements are actually saved to the state, + // thus helping them apply transformations at more accurate timings + if (originalMeasurementsChanged) { + const layout = { + width: currState.originalWidth, + height: currState.originalHeight, + x: currState.originalX, + y: currState.originalY + }; + this.props.onLayout?.({ + nativeEvent: { + layout + } + }); + } + if (this.onTransformInvocationInitialized && (originalMeasurementsChanged || staticPinPositionChanged)) { + this._invokeOnTransform(); + } + } + componentDidMount() { + this.measureZoomSubject(); + // We've already run `grabZoomSubjectOriginalMeasurements` at various events + // to make sure the measurements are promptly updated. + // However, there might be cases we haven't accounted for, especially when + // native processes are involved. To account for those cases, + // we'll use an interval here to ensure we're always up-to-date. + // The `setState` in `grabZoomSubjectOriginalMeasurements` won't trigger a rerender + // if the values given haven't changed, so we're not running performance risk here. + this.measureZoomSubjectInterval = setInterval(this.measureZoomSubject, 1e3); + } + componentWillUnmount() { + this.measureZoomSubjectInterval && clearInterval(this.measureZoomSubjectInterval); + } + debouncedOnStaticPinPositionChange = debounce(position => this.props.onStaticPinPositionChange?.(position), 100); + + /** + * try to invoke onTransform + * @private + */ + _invokeOnTransform() { + const zoomableViewEvent = this._getZoomableViewEventObject(); + const position = this._staticPinPosition(); + if (!zoomableViewEvent.originalWidth || !zoomableViewEvent.originalHeight) return { + successful: false + }; + this.props.onTransform?.(zoomableViewEvent); + if (position) { + this.props.onStaticPinPositionMove?.(position); + this.debouncedOnStaticPinPositionChange(position); + } + return { + successful: true + }; + } + + /** + * Returns additional information about components current state for external event hooks + * + * @returns {{}} + * @private + */ + _getZoomableViewEventObject(overwriteObj = {}) { + return { + zoomLevel: this.zoomLevel, + offsetX: this.offsetX, + offsetY: this.offsetY, + originalHeight: this.state.originalHeight, + originalWidth: this.state.originalWidth, + originalPageX: this.state.originalPageX, + originalPageY: this.state.originalPageY, + ...overwriteObj + }; + } + + /** + * Get the original box dimensions and save them for later use. + * (They will be used to calculate boxBorders) + * + * @private + */ + measureZoomSubject = () => { + // make sure we measure after animations are complete + requestAnimationFrame(() => { + // this setTimeout is here to fix a weird issue on iOS where the measurements are all `0` + // when navigating back (react-navigation stack) from another view + // while closing the keyboard at the same time + setTimeout(() => { + // In normal conditions, we're supposed to measure zoomSubject instead of its wrapper. + // However, our zoomSubject may have been transformed by an initial zoomLevel or offset, + // in which case these measurements will not represent the true "original" measurements. + // We just need to make sure the zoomSubjectWrapper perfectly aligns with the zoomSubject + // (no border, space, or anything between them) + this.zoomSubjectWrapperRef.current?.measure((x, y, width, height, pageX, pageY) => { + // When the component is off-screen, these become all 0s, so we don't set them + // to avoid messing up calculations, especially ones that are done right after + // the component transitions from hidden to visible. + if (!pageX && !pageY && !width && !height) return; + + // If these values are all the same, don't re-set them in state + // this way we don't re-render + if (this.state.originalX === x && this.state.originalY === y && this.state.originalWidth === width && this.state.originalHeight === height && this.state.originalPageX === pageX && this.state.originalPageY === pageY) { + return; + } + this.setState({ + originalX: x, + originalY: y, + originalWidth: width, + originalHeight: height, + originalPageX: pageX, + originalPageY: pageY + }); + }); + }); + }); + }; + + /** + * Handles the start of touch events and checks for taps + * + * @param e + * @param gestureState + * @returns {boolean} + * + * @private + */ + _handleStartShouldSetPanResponder = (e, gestureState) => { + if (this.props.onStartShouldSetPanResponder) { + this.props.onStartShouldSetPanResponder(e, gestureState, this._getZoomableViewEventObject(), false); + } + + // Always set pan responder on start + // of gesture so we can handle tap. + // "Pan threshold validation" will be handled + // in `onPanResponderMove` instead of in `onMoveShouldSetPanResponder` + return true; + }; + + /** + * Calculates pinch distance + * + * @param e + * @param gestureState + * @private + */ + _handlePanResponderGrant = (e, gestureState) => { + if (this.props.onLongPress) { + e.persist(); + this.longPressTimeout = setTimeout(() => { + this.props.onLongPress?.(e, gestureState, this._getZoomableViewEventObject()); + this.longPressTimeout = null; + }, this.props.longPressDuration); + } + this.props.onPanResponderGrant?.(e, gestureState, this._getZoomableViewEventObject()); + this.panAnim.stopAnimation(); + this.zoomAnim.stopAnimation(); + this.gestureStarted = true; + this.raisePin(); + }; + + /** + * Handles the end of touch events + * + * @param e + * @param gestureState + * + * @private + */ + _handlePanResponderEnd = (e, gestureState) => { + if (!this.gestureType) { + this._resolveAndHandleTap(e); + } + this.setState({ + debugPoints: [] + }); + this.lastGestureCenterPosition = null; + const disableMomentum = this.props.disableMomentum || this.props.panEnabled && this.gestureType === 'shift' && this.props.disablePanOnInitialZoom && this.zoomLevel === this.props.initialZoom; + + // Trigger final shift animation unless disablePanOnInitialZoom is set and we're on the initial zoom level + // or disableMomentum + if (!disableMomentum) { + getPanMomentumDecayAnim(this.panAnim, { + x: gestureState.vx / this.zoomLevel, + y: gestureState.vy / this.zoomLevel + }).start(); + } + if (this.longPressTimeout) { + clearTimeout(this.longPressTimeout); + this.longPressTimeout = null; + } + this.props.onPanResponderEnd?.(e, gestureState, this._getZoomableViewEventObject()); + if (this.gestureType === 'pinch') { + this.props.onZoomEnd?.(e, gestureState, this._getZoomableViewEventObject()); + } else if (this.gestureType === 'shift') { + this.props.onShiftingEnd?.(e, gestureState, this._getZoomableViewEventObject()); + } + if (this.props.staticPinPosition) { + this._updateStaticPin(); + } + this.dropPin(); + this.gestureType = null; + this.gestureStarted = false; + }; + + /** + * Handles the actual movement of our pan responder + * + * @param e + * @param gestureState + * + * @private + */ + _handlePanResponderMove = (e, gestureState) => { + if (this.props.onPanResponderMove) { + if (this.props.onPanResponderMove(e, gestureState, this._getZoomableViewEventObject())) { + return false; + } + } + + // Only supports 2 touches and below, + // any invalid number will cause the gesture to end. + if (gestureState.numberActiveTouches <= 2) { + if (!this.gestureStarted) { + this._handlePanResponderGrant(e, gestureState); + } + } else { + if (this.gestureStarted) { + this._handlePanResponderEnd(e, gestureState); + } + return true; + } + if (gestureState.numberActiveTouches === 2) { + if (this.longPressTimeout) { + clearTimeout(this.longPressTimeout); + this.longPressTimeout = null; + } + + // change some measurement states when switching gesture to ensure a smooth transition + if (this.gestureType !== 'pinch') { + this.lastGestureCenterPosition = calcGestureCenterPoint(e, gestureState); + this.lastGestureTouchDistance = calcGestureTouchDistance(e, gestureState); + } + this.gestureType = 'pinch'; + this._handlePinching(e, gestureState); + } else if (gestureState.numberActiveTouches === 1) { + if (this.longPressTimeout && (Math.abs(gestureState.dx) > 5 || Math.abs(gestureState.dy) > 5)) { + clearTimeout(this.longPressTimeout); + this.longPressTimeout = null; + } + // change some measurement states when switching gesture to ensure a smooth transition + if (this.gestureType !== 'shift') { + this.lastGestureCenterPosition = calcGestureCenterPoint(e, gestureState); + } + const { + dx, + dy + } = gestureState; + const isShiftGesture = Math.abs(dx) > 2 || Math.abs(dy) > 2; + if (isShiftGesture) { + this.gestureType = 'shift'; + this._handleShifting(gestureState); + } + } + }; + + /** + * Handles the pinch movement and zooming + * + * @param e + * @param gestureState + * + * @private + */ + _handlePinching(e, gestureState) { + if (!this.props.zoomEnabled) return; + const { + maxZoom, + minZoom, + pinchToZoomInSensitivity, + pinchToZoomOutSensitivity + } = this.props; + const distance = calcGestureTouchDistance(e, gestureState); + if (this.props.onZoomBefore && this.props.onZoomBefore(e, gestureState, this._getZoomableViewEventObject())) { + return; + } + if (!distance) return; + if (!this.lastGestureTouchDistance) return; + + // define the new zoom level and take zoom level sensitivity into consideration + const zoomGrowthFromLastGestureState = distance / this.lastGestureTouchDistance; + this.lastGestureTouchDistance = distance; + const pinchToZoomSensitivity = zoomGrowthFromLastGestureState < 1 ? pinchToZoomOutSensitivity : pinchToZoomInSensitivity; + if (pinchToZoomSensitivity == null) return; + const deltaGrowth = zoomGrowthFromLastGestureState - 1; + // 0 - no resistance + // 10 - 90% resistance + const deltaGrowthAdjustedBySensitivity = deltaGrowth * (1 - pinchToZoomSensitivity * 9 / 100); + let newZoomLevel = this.zoomLevel * (1 + deltaGrowthAdjustedBySensitivity); + + // make sure max and min zoom levels are respected + if (maxZoom != null && newZoomLevel > maxZoom) { + newZoomLevel = maxZoom; + } + if (minZoom != null && newZoomLevel < minZoom) { + newZoomLevel = minZoom; + } + const gestureCenterPoint = calcGestureCenterPoint(e, gestureState); + if (!gestureCenterPoint) return; + let zoomCenter = { + x: gestureCenterPoint.x - this.state.originalPageX, + y: gestureCenterPoint.y - this.state.originalPageY + }; + if (this.props.staticPinPosition) { + // When we use a static pin position, the zoom centre is the same as that position, + // otherwise the pin moves around way too much while zooming. + zoomCenter = { + x: this.props.staticPinPosition.x, + y: this.props.staticPinPosition.y + }; + } + + // Uncomment to debug + this.props.debug && this._setPinchDebugPoints(e, zoomCenter); + const { + originalHeight, + originalWidth + } = this.state; + const oldOffsetX = this.offsetX; + const oldOffsetY = this.offsetY; + const oldScale = this.zoomLevel; + const newScale = newZoomLevel; + if (!originalHeight || !originalWidth) return; + let offsetY = calcNewScaledOffsetForZoomCentering(oldOffsetY, originalHeight, oldScale, newScale, zoomCenter.y); + let offsetX = calcNewScaledOffsetForZoomCentering(oldOffsetX, originalWidth, oldScale, newScale, zoomCenter.x); + const offsetShift = this._calcOffsetShiftSinceLastGestureState(gestureCenterPoint); + if (offsetShift) { + offsetX += offsetShift.x; + offsetY += offsetShift.y; + } + this.offsetX = offsetX; + this.offsetY = offsetY; + this.zoomLevel = newScale; + this.panAnim.setValue({ + x: this.offsetX, + y: this.offsetY + }); + this.zoomAnim.setValue(this.zoomLevel); + this.props.onZoomAfter?.(e, gestureState, this._getZoomableViewEventObject()); + } + + /** + * Used to debug pinch events + * @param gestureResponderEvent + * @param zoomCenter + * @param points + */ + _setPinchDebugPoints(gestureResponderEvent, zoomCenter, ...points) { + const { + touches + } = gestureResponderEvent.nativeEvent; + const { + originalPageY, + originalPageX + } = this.state; + this.setState({ + debugPoints: [{ + x: touches[0].pageX - originalPageX, + y: touches[0].pageY - originalPageY + }, { + x: touches[1].pageX - originalPageX, + y: touches[1].pageY - originalPageY + }, zoomCenter, ...points] + }); + } + + /** + * Calculates the amount the offset should shift since the last position during panning + * + * @param {Vec2D} gestureCenterPoint + * + * @private + */ + _calcOffsetShiftSinceLastGestureState(gestureCenterPoint) { + const { + movementSensibility + } = this.props; + let shift = null; + if (this.lastGestureCenterPosition && movementSensibility) { + const dx = gestureCenterPoint.x - this.lastGestureCenterPosition.x; + const dy = gestureCenterPoint.y - this.lastGestureCenterPosition.y; + const shiftX = dx / this.zoomLevel / movementSensibility; + const shiftY = dy / this.zoomLevel / movementSensibility; + shift = { + x: shiftX, + y: shiftY + }; + } + this.lastGestureCenterPosition = gestureCenterPoint; + return shift; + } + + /** + * Handles movement by tap and move + * + * @param gestureState + * + * @private + */ + _handleShifting(gestureState) { + // Skips shifting if panEnabled is false or disablePanOnInitialZoom is true and we're on the initial zoom level + if (!this.props.panEnabled || this.props.disablePanOnInitialZoom && this.zoomLevel === this.props.initialZoom) { + return; + } + const shift = this._calcOffsetShiftSinceLastGestureState({ + x: gestureState.moveX, + y: gestureState.moveY + }); + if (!shift) return; + const offsetX = this.offsetX + shift.x; + const offsetY = this.offsetY + shift.y; + if (this.props.debug && this.state.originalPageX && this.state.originalPageY) { + const x = gestureState.moveX - this.state.originalPageX; + const y = gestureState.moveY - this.state.originalPageY; + this.setState({ + debugPoints: [{ + x, + y + }] + }); + } + this._setNewOffsetPosition(offsetX, offsetY); + this.raisePin(); + } + + /** + * Set the state to offset moved + * + * @param {number} newOffsetX + * @param {number} newOffsetY + * @returns + */ + _setNewOffsetPosition(newOffsetX, newOffsetY) { + const { + onShiftingBefore, + onShiftingAfter + } = this.props; + if (onShiftingBefore?.(null, null, this._getZoomableViewEventObject())) { + return; + } + this.offsetX = newOffsetX; + this.offsetY = newOffsetY; + this.panAnim.setValue({ + x: this.offsetX, + y: this.offsetY + }); + this.zoomAnim.setValue(this.zoomLevel); + onShiftingAfter?.(null, null, this._getZoomableViewEventObject()); + } + + /** + * Check whether the press event is double tap + * or single tap and handle the event accordingly + * + * @param e + * + * @private + */ + _resolveAndHandleTap = e => { + const now = Date.now(); + if (this.doubleTapFirstTapReleaseTimestamp && this.props.doubleTapDelay && now - this.doubleTapFirstTapReleaseTimestamp < this.props.doubleTapDelay) { + this.doubleTapFirstTap && this._addTouch({ + ...this.doubleTapFirstTap, + id: now.toString(), + isSecondTap: true + }); + this.singleTapTimeoutId && clearTimeout(this.singleTapTimeoutId); + delete this.doubleTapFirstTapReleaseTimestamp; + delete this.singleTapTimeoutId; + delete this.doubleTapFirstTap; + this._handleDoubleTap(e); + } else { + this.doubleTapFirstTapReleaseTimestamp = now; + this.doubleTapFirstTap = { + id: now.toString(), + x: e.nativeEvent.pageX - this.state.originalPageX, + y: e.nativeEvent.pageY - this.state.originalPageY + }; + this._addTouch(this.doubleTapFirstTap); + + // persist event so e.nativeEvent is preserved after a timeout delay + e.persist(); + this.singleTapTimeoutId = setTimeout(() => { + delete this.doubleTapFirstTapReleaseTimestamp; + delete this.singleTapTimeoutId; + + // Pan to the tapped location + if (this.props.staticPinPosition && this.doubleTapFirstTap) { + const tapX = this.props.staticPinPosition.x - this.doubleTapFirstTap.x; + const tapY = this.props.staticPinPosition.y - this.doubleTapFirstTap.y; + Animated.timing(this.panAnim, { + toValue: { + x: this.offsetX + tapX / this.zoomLevel, + y: this.offsetY + tapY / this.zoomLevel + }, + useNativeDriver: true, + duration: 200 + }).start(() => { + this._updateStaticPin(); + }); + } + this.props.onSingleTap?.(e, this._getZoomableViewEventObject()); + }, this.props.doubleTapDelay); + } + }; + moveStaticPinTo = (position, duration) => { + const { + originalWidth, + originalHeight + } = this.state; + const { + staticPinPosition, + contentWidth, + contentHeight + } = this.props; + if (!staticPinPosition) return; + if (!originalWidth || !originalHeight) return; + if (!contentWidth || !contentHeight) return; + + // Offset for the static pin + const pinX = staticPinPosition.x - originalWidth / 2; + const pinY = staticPinPosition.y - originalHeight / 2; + this.offsetX = contentWidth / 2 - position.x + pinX / this.zoomLevel; + this.offsetY = contentHeight / 2 - position.y + pinY / this.zoomLevel; + if (duration) { + Animated.timing(this.panAnim, { + toValue: { + x: this.offsetX, + y: this.offsetY + }, + useNativeDriver: true, + duration + }).start(); + } else { + this.panAnim.setValue({ + x: this.offsetX, + y: this.offsetY + }); + } + }; + _staticPinPosition = () => { + if (!this.props.staticPinPosition) return; + if (!this.props.contentWidth || !this.props.contentHeight) return; + return viewportPositionToImagePosition({ + viewportPosition: { + x: this.props.staticPinPosition.x, + y: this.props.staticPinPosition.y + }, + imageSize: { + height: this.props.contentHeight, + width: this.props.contentWidth + }, + zoomableEvent: { + ...this._getZoomableViewEventObject(), + offsetX: this.offsetX, + offsetY: this.offsetY, + zoomLevel: this.zoomLevel + } + }); + }; + _updateStaticPin = () => { + const position = this._staticPinPosition(); + if (!position) return; + this.props.onStaticPinPositionChange?.(position); + }; + _addTouch(touch) { + this.touches.push(touch); + this.setState({ + touches: [...this.touches] + }); + } + _removeTouch(touch) { + this.touches.splice(this.touches.indexOf(touch), 1); + this.setState({ + touches: [...this.touches] + }); + } + + /** + * Handles the double tap event + * + * @param e + * + * @private + */ + _handleDoubleTap(e) { + const { + onDoubleTapBefore, + onDoubleTapAfter, + doubleTapZoomToCenter + } = this.props; + onDoubleTapBefore?.(e, this._getZoomableViewEventObject()); + const nextZoomStep = this._getNextZoomStep(); + if (nextZoomStep == null) return; + const { + originalPageX, + originalPageY + } = this.state; + + // define new zoom position coordinates + const zoomPositionCoordinates = { + x: e.nativeEvent.pageX - originalPageX, + y: e.nativeEvent.pageY - originalPageY + }; + + // if doubleTapZoomToCenter enabled -> always zoom to center instead + if (doubleTapZoomToCenter) { + zoomPositionCoordinates.x = 0; + zoomPositionCoordinates.y = 0; + } + this.zoomTo(nextZoomStep, zoomPositionCoordinates); + onDoubleTapAfter?.(e, this._getZoomableViewEventObject({ + zoomLevel: nextZoomStep + })); + } + + /** + * Returns the next zoom step based on current step and zoomStep property. + * If we are zoomed all the way in -> return to initialzoom + * + * @returns {*} + */ + _getNextZoomStep() { + const { + zoomStep, + maxZoom, + initialZoom + } = this.props; + const { + zoomLevel + } = this; + if (maxZoom == null) return; + if (zoomLevel.toFixed(2) === maxZoom.toFixed(2)) { + return initialZoom; + } + if (zoomStep == null) return; + const nextZoomStep = zoomLevel * (1 + zoomStep); + if (nextZoomStep > maxZoom) { + return maxZoom; + } + return nextZoomStep; + } + + /** + * Zooms to a specific level. A "zoom center" can be provided, which specifies + * the point that will remain in the same position on the screen after the zoom. + * The coordinates of the zoom center is relative to the zoom subject. + * { x: 0, y: 0 } is the very center of the zoom subject. + * + * @param newZoomLevel + * @param zoomCenter - If not supplied, the container's center is the zoom center + */ + zoomTo(newZoomLevel, zoomCenter) { + if (!this.props.zoomEnabled) return false; + if (this.props.maxZoom && newZoomLevel > this.props.maxZoom) return false; + if (this.props.minZoom && newZoomLevel < this.props.minZoom) return false; + this.props.onZoomBefore?.(null, null, this._getZoomableViewEventObject()); + + // == Perform Pan Animation to preserve the zoom center while zooming == + let listenerId = ''; + if (zoomCenter) { + // Calculates panAnim values based on changes in zoomAnim. + let prevScale = this.zoomLevel; + // Since zoomAnim is calculated in native driver, + // it will jitter panAnim once in a while, + // because here panAnim is being calculated in js. + // However the jittering should mostly occur in simulator. + listenerId = this.zoomAnim.addListener(({ + value: newScale + }) => { + this.panAnim.setValue({ + x: calcNewScaledOffsetForZoomCentering(this.offsetX, this.state.originalWidth, prevScale, newScale, zoomCenter.x), + y: calcNewScaledOffsetForZoomCentering(this.offsetY, this.state.originalHeight, prevScale, newScale, zoomCenter.y) + }); + prevScale = newScale; + }); + } + + // == Perform Zoom Animation == + getZoomToAnimation(this.zoomAnim, newZoomLevel).start(() => { + this.zoomAnim.removeListener(listenerId); + }); + // == Zoom Animation Ends == + + this.props.onZoomAfter?.(null, null, this._getZoomableViewEventObject()); + return true; + } + + /** + * Zooms in or out by a specified change level + * Use a positive number for `zoomLevelChange` to zoom in + * Use a negative number for `zoomLevelChange` to zoom out + * + * Returns a promise if everything was updated and a boolean, whether it could be updated or if it exceeded the min/max zoom limits. + * + * @param {number | null} zoomLevelChange + * + * @return {bool} + */ + zoomBy(zoomLevelChange) { + // if no zoom level Change given -> just use zoom step + zoomLevelChange ||= this.props.zoomStep || 0; + return this.zoomTo(this.zoomLevel + zoomLevelChange); + } + + /** + * Moves the zoomed view to a specified position + * Returns a promise when finished + * + * @param {number} newOffsetX the new position we want to move it to (x-axis) + * @param {number} newOffsetY the new position we want to move it to (y-axis) + * + * @return {bool} + */ + moveTo(newOffsetX, newOffsetY) { + const { + originalWidth, + originalHeight + } = this.state; + if (!originalWidth || !originalHeight) return; + const offsetX = (newOffsetX - originalWidth / 2) / this.zoomLevel; + const offsetY = (newOffsetY - originalHeight / 2) / this.zoomLevel; + this._setNewOffsetPosition(-offsetX, -offsetY); + } + + /** + * Moves the zoomed view by a certain amount. + * + * Returns a promise when finished + * + * @param {number} offsetChangeX the amount we want to move the offset by (x-axis) + * @param {number} offsetChangeY the amount we want to move the offset by (y-axis) + * + * @return {bool} + */ + moveBy(offsetChangeX, offsetChangeY) { + const offsetX = (this.offsetX * this.zoomLevel - offsetChangeX) / this.zoomLevel; + const offsetY = (this.offsetY * this.zoomLevel - offsetChangeY) / this.zoomLevel; + this._setNewOffsetPosition(offsetX, offsetY); + } + render() { + const { + staticPinIcon, + children, + visualTouchFeedbackEnabled, + doubleTapDelay, + staticPinPosition, + onStaticPinLongPress, + onStaticPinPress, + pinProps + } = this.props; + const { + pinSize, + touches, + debugPoints = [] + } = this.state; + return /*#__PURE__*/_jsxs(View, { + style: styles.container, + ...this.gestureHandlers.panHandlers, + ref: this.zoomSubjectWrapperRef, + onLayout: this.measureZoomSubject, + children: [/*#__PURE__*/_jsx(Animated.View, { + style: [styles.zoomSubject, this.props.style, { + transform: [ + // In RN79, we need to split the scale into X and Y to avoid + // the content getting pixelated when zooming in + { + scaleX: this.zoomAnim + }, { + scaleY: this.zoomAnim + }, ...this.panAnim.getTranslateTransform()] + }], + children: children + }), visualTouchFeedbackEnabled && touches?.map(touch => doubleTapDelay && /*#__PURE__*/_jsx(AnimatedTouchFeedback, { + x: touch.x, + y: touch.y, + animationDuration: doubleTapDelay, + onAnimationDone: () => { + this._removeTouch(touch); + } + }, touch.id)), debugPoints.map(({ + x, + y + }, index) => { + return /*#__PURE__*/_jsx(DebugTouchPoint, { + x: x, + y: y + }, index); + }), staticPinPosition && /*#__PURE__*/_jsx(StaticPin, { + staticPinIcon: staticPinIcon, + staticPinPosition: staticPinPosition, + pinSize: pinSize, + onPress: onStaticPinPress, + onLongPress: onStaticPinLongPress, + onParentMove: this._handlePanResponderMove, + pinAnim: this.pinAnim, + setPinSize: size => { + this.setState({ + pinSize: size + }); + }, + pinProps: pinProps + })] + }); + } +} +const styles = StyleSheet.create({ + container: { + alignItems: 'center', + flex: 1, + justifyContent: 'center', + overflow: 'hidden', + position: 'relative' + }, + zoomSubject: { + alignItems: 'center', + flex: 1, + justifyContent: 'center', + width: '100%' + } +}); +export default ReactNativeZoomableView; +export { ReactNativeZoomableView }; +//# sourceMappingURL=ReactNativeZoomableView.js.map \ No newline at end of file diff --git a/lib/module/ReactNativeZoomableView.js.map b/lib/module/ReactNativeZoomableView.js.map new file mode 100644 index 00000000..f0dfbe7b --- /dev/null +++ b/lib/module/ReactNativeZoomableView.js.map @@ -0,0 +1 @@ +{"version":3,"names":["debounce","React","Component","createRef","Animated","Easing","PanResponder","StyleSheet","View","getBoundaryCrossedAnim","getPanMomentumDecayAnim","getZoomToAnimation","AnimatedTouchFeedback","StaticPin","DebugTouchPoint","calcGestureCenterPoint","calcGestureTouchDistance","calcNewScaledOffsetForZoomCentering","applyPanBoundariesToOffset","viewportPositionToImagePosition","jsx","_jsx","jsxs","_jsxs","initialState","originalWidth","originalHeight","originalPageX","originalPageY","originalX","originalY","pinSize","width","height","ReactNativeZoomableView","defaultProps","zoomEnabled","panEnabled","initialZoom","initialOffsetX","initialOffsetY","maxZoom","minZoom","pinchToZoomInSensitivity","pinchToZoomOutSensitivity","movementSensibility","doubleTapDelay","bindToBorders","zoomStep","onLongPress","longPressDuration","contentWidth","undefined","contentHeight","panBoundaryPadding","visualTouchFeedbackEnabled","staticPinPosition","staticPinIcon","onStaticPinPositionChange","onStaticPinPositionMove","animatePin","disablePanOnInitialZoom","panAnim","ValueXY","x","y","zoomAnim","Value","pinAnim","__offsets","value","boundaryCrossedAnimInEffect","zoomLevel","lastGestureCenterPosition","lastGestureTouchDistance","_gestureStarted","gestureStarted","v","longPressTimeout","touches","constructor","props","state","gestureHandlers","create","onStartShouldSetPanResponder","_handleStartShouldSetPanResponder","onPanResponderGrant","_handlePanResponderGrant","onPanResponderMove","_handlePanResponderMove","onPanResponderRelease","_handlePanResponderEnd","onPanResponderTerminate","evt","gestureState","_getZoomableViewEventObject","onPanResponderTerminationRequest","onShouldBlockNativeResponder","onStartShouldSetPanResponderCapture","onMoveShouldSetPanResponderCapture","zoomSubjectWrapperRef","zoomAnimatedValue","panAnimatedValueXY","offsetX","offsetY","setValue","addListener","gestureType","raisePin","timing","toValue","useNativeDriver","easing","out","ease","duration","start","dropPin","__setOffset","__getOffset","axis","offset","offsetState","containerSize","contentSize","boundOffset","boundariesApplied","toFixed","componentDidUpdate","prevProps","prevState","onTransformInvocationInitialized","_invokeOnTransform","successful","currState","originalMeasurementsChanged","staticPinPositionChanged","layout","onLayout","nativeEvent","componentDidMount","measureZoomSubject","measureZoomSubjectInterval","setInterval","componentWillUnmount","clearInterval","debouncedOnStaticPinPositionChange","position","zoomableViewEvent","_staticPinPosition","onTransform","overwriteObj","requestAnimationFrame","setTimeout","current","measure","pageX","pageY","setState","e","persist","stopAnimation","_resolveAndHandleTap","debugPoints","disableMomentum","vx","vy","clearTimeout","onPanResponderEnd","onZoomEnd","onShiftingEnd","_updateStaticPin","numberActiveTouches","_handlePinching","Math","abs","dx","dy","isShiftGesture","_handleShifting","distance","onZoomBefore","zoomGrowthFromLastGestureState","pinchToZoomSensitivity","deltaGrowth","deltaGrowthAdjustedBySensitivity","newZoomLevel","gestureCenterPoint","zoomCenter","debug","_setPinchDebugPoints","oldOffsetX","oldOffsetY","oldScale","newScale","offsetShift","_calcOffsetShiftSinceLastGestureState","onZoomAfter","gestureResponderEvent","points","shift","shiftX","shiftY","moveX","moveY","_setNewOffsetPosition","newOffsetX","newOffsetY","onShiftingBefore","onShiftingAfter","now","Date","doubleTapFirstTapReleaseTimestamp","doubleTapFirstTap","_addTouch","id","toString","isSecondTap","singleTapTimeoutId","_handleDoubleTap","tapX","tapY","onSingleTap","moveStaticPinTo","pinX","pinY","viewportPosition","imageSize","zoomableEvent","touch","push","_removeTouch","splice","indexOf","onDoubleTapBefore","onDoubleTapAfter","doubleTapZoomToCenter","nextZoomStep","_getNextZoomStep","zoomPositionCoordinates","zoomTo","listenerId","prevScale","removeListener","zoomBy","zoomLevelChange","moveTo","moveBy","offsetChangeX","offsetChangeY","render","children","onStaticPinLongPress","onStaticPinPress","pinProps","style","styles","container","panHandlers","ref","zoomSubject","transform","scaleX","scaleY","getTranslateTransform","map","animationDuration","onAnimationDone","index","onPress","onParentMove","setPinSize","size","alignItems","flex","justifyContent","overflow"],"sourceRoot":"../../src","sources":["ReactNativeZoomableView.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,QAAQ;AACjC,OAAOC,KAAK,IAAIC,SAAS,EAAEC,SAAS,QAAmB,OAAO;AAC9D,SACEC,QAAQ,EACRC,MAAM,EAENC,YAAY,EAIZC,UAAU,EACVC,IAAI,QACC,cAAc;AAErB,SACEC,sBAAsB,EACtBC,uBAAuB,EACvBC,kBAAkB,QACb,cAAc;AACrB,SAASC,qBAAqB,QAAQ,cAAc;AACpD,SAASC,SAAS,QAAQ,wBAAwB;AAClD,SAASC,eAAe,QAAQ,eAAe;AAC/C,SACEC,sBAAsB,EACtBC,wBAAwB,EACxBC,mCAAmC,QAC9B,UAAU;AACjB,SAASC,0BAA0B,QAAQ,qCAAqC;AAChF,SAASC,+BAA+B,QAAQ,+BAA+B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAUhF,MAAMC,YAA0C,GAAG;EACjDC,aAAa,EAAE,CAAC;EAChBC,cAAc,EAAE,CAAC;EACjBC,aAAa,EAAE,CAAC;EAChBC,aAAa,EAAE,CAAC;EAChBC,SAAS,EAAE,CAAC;EACZC,SAAS,EAAE,CAAC;EACZC,OAAO,EAAE;IAAEC,KAAK,EAAE,CAAC;IAAEC,MAAM,EAAE;EAAE;AACjC,CAAC;AAED,MAAMC,uBAAuB,SAAShC,SAAS,CAG7C;EAKA,OAAOiC,YAAY,GAAG;IACpBC,WAAW,EAAE,IAAI;IACjBC,UAAU,EAAE,IAAI;IAChBC,WAAW,EAAE,CAAC;IACdC,cAAc,EAAE,CAAC;IACjBC,cAAc,EAAE,CAAC;IACjBC,OAAO,EAAE,GAAG;IACZC,OAAO,EAAE,GAAG;IACZC,wBAA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OAAO,EAAEkP;UAAK,CAAC,CAAC;QAClC,CAAE;QACFlB,QAAQ,EAAEA;MAAS,CACpB,CACF;IAAA,CACG,CAAC;EAEX;AACF;AAEA,MAAME,MAAM,GAAG1P,UAAU,CAAC6E,MAAM,CAAC;EAC/B8K,SAAS,EAAE;IACTgB,UAAU,EAAE,QAAQ;IACpBC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBC,QAAQ,EAAE,QAAQ;IAClBjI,QAAQ,EAAE;EACZ,CAAC;EACDiH,WAAW,EAAE;IACXa,UAAU,EAAE,QAAQ;IACpBC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBpP,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,eAAeE,uBAAuB;AAEtC,SAASA,uBAAuB","ignoreList":[]} diff --git a/lib/module/animations/index.js b/lib/module/animations/index.js new file mode 100644 index 00000000..8aae9b51 --- /dev/null +++ b/lib/module/animations/index.js @@ -0,0 +1,25 @@ +"use strict"; + +import { Animated, Easing } from 'react-native'; +export function getBoundaryCrossedAnim(animValue, toValue) { + return Animated.spring(animValue, { + overshootClamping: true, + toValue, + useNativeDriver: true + }); +} +export function getPanMomentumDecayAnim(animValue, velocity) { + return Animated.decay(animValue, { + velocity, + deceleration: 0.994, + useNativeDriver: true + }); +} +export function getZoomToAnimation(animValue, toValue) { + return Animated.timing(animValue, { + easing: Easing.out(Easing.ease), + toValue, + useNativeDriver: true + }); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/module/animations/index.js.map b/lib/module/animations/index.js.map new file mode 100644 index 00000000..7902608d --- /dev/null +++ b/lib/module/animations/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Animated","Easing","getBoundaryCrossedAnim","animValue","toValue","spring","overshootClamping","useNativeDriver","getPanMomentumDecayAnim","velocity","decay","deceleration","getZoomToAnimation","timing","easing","out","ease"],"sourceRoot":"../../../src","sources":["animations/index.ts"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,MAAM,QAAQ,cAAc;AAI/C,OAAO,SAASC,sBAAsBA,CACpCC,SAAyB,EACzBC,OAAe,EACf;EACA,OAAOJ,QAAQ,CAACK,MAAM,CAACF,SAAS,EAAE;IAChCG,iBAAiB,EAAE,IAAI;IACvBF,OAAO;IACPG,eAAe,EAAE;EACnB,CAAC,CAAC;AACJ;AAEA,OAAO,SAASC,uBAAuBA,CACrCL,SAA4C,EAC5CM,QAAwB,EACxB;EACA,OAAOT,QAAQ,CAACU,KAAK,CAACP,SAAS,EAAE;IAC/BM,QAAQ;IACRE,YAAY,EAAE,KAAK;IACnBJ,eAAe,EAAE;EACnB,CAAC,CAAC;AACJ;AAEA,OAAO,SAASK,kBAAkBA,CAACT,SAAyB,EAAEC,OAAe,EAAE;EAC7E,OAAOJ,QAAQ,CAACa,MAAM,CAACV,SAAS,EAAE;IAChCW,MAAM,EAAEb,MAAM,CAACc,GAAG,CAACd,MAAM,CAACe,IAAI,CAAC;IAC/BZ,OAAO;IACPG,eAAe,EAAE;EACnB,CAAC,CAAC;AACJ","ignoreList":[]} diff --git a/lib/module/assets/pin.png b/lib/module/assets/pin.png new file mode 100644 index 0000000000000000000000000000000000000000..471a7584fbc63178b49f408a62f1f82e36eeb604 GIT binary patch literal 10710 zcmW++Wk6GJ7au(Y>6Vso~i0042(claXor05H-wVILw z;PJnIad%Z30Kg1TQF#5%KmV{GDA-i5{W5HFsl|Z7Q1~RQ$!_CI16)t z`=k^>${jiIIWG{g{X^q(=-Z@fNMv7K&shI+;563gv-C_@1xUl#5u^QGj9dwYs#B`S zW&7cIR~SrPB4?Q+t^1nN@nj$s0`XQMWd)bwi3v6DG~TbV zByZ;>Q_S~-rF59@W#91vvTXTS`d;@<7Z*qWygWOyGQJ zw_H!?`?chP&<@b(D`a3MybV?`?c5ZGLyPU8f3IuQv^l;gm)Q#5YGbF8x2G}D% z<5@?3v=YsRL#}s85Y9xno%PN97B2$(-A#MCRA}0DC3}hRn9c^vJD;K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av)$Vp{SS{l?Qt$(A)m@7JXr z`u(!92EtS(dIukZxRMa$Jjd6CSla7l`y1keHg@U{l6PW%px?R)kl|fY zuhsue$Z2SJip|(k+8~G46rm9na9JsQX+RU!YlyzBX-#JBC+))jb8{~mbv+-Sd)bbb zT>Fpj)H-k#8;Dr(LYgYV9$h_W;4!0KJuRHGlKD<5qGyGZiI5c8BX}59L zpO<72a-2$U7?M63{D{A}m^Xq5;V%^RA5MC{IBQ5+nB4%H3&cGE7I9cwmIgrr3=GF6 z=lpz;H~IrzqoiFpe{e8Ovah|cqerhl@Z%plak9YZ==)6+LYNUz=@#B;%a&c;3Lq}@TEcCSF^ANsy n(WLr%?-LvP|NqoCAF*n { + const appearDisappearAnimRef = useRef(new Animated.Value(0)); + const onAnimationDoneRef = useRef(onAnimationDone); + onAnimationDoneRef.current = onAnimationDone; + useEffect(() => { + appearDisappearAnimRef.current.setValue(0); + const inDuration = animationDuration * 0.8; + const outDuration = animationDuration - inDuration; + Animated.sequence([Animated.timing(appearDisappearAnimRef.current, { + delay: animationDelay || 0, + toValue: 1, + duration: inDuration, + easing: Easing.linear, + useNativeDriver: true + }), Animated.timing(appearDisappearAnimRef.current, { + toValue: 0, + duration: outDuration, + easing: Easing.out(Easing.ease), + useNativeDriver: true + })]).start(() => onAnimationDoneRef.current?.()); + }, [animationDelay, animationDuration]); + return /*#__PURE__*/_jsx(Animated.View, { + pointerEvents: "none", + style: [styles.animatedTouchFeedback, { + opacity: appearDisappearAnimRef.current.interpolate({ + inputRange: [0, 1], + outputRange: [0, 0.3] + }), + left: x - 20, + top: y - 20, + transform: [{ + scale: appearDisappearAnimRef.current.interpolate({ + inputRange: [0, 1], + outputRange: [0.5, 1] + }) + }] + }] + }); +}; +const styles = StyleSheet.create({ + animatedTouchFeedback: { + backgroundColor: 'lightgray', + borderRadius: 40, + height: 40, + position: 'absolute', + width: 40 + } +}); +//# sourceMappingURL=AnimatedTouchFeedback.js.map \ No newline at end of file diff --git a/lib/module/components/AnimatedTouchFeedback.js.map b/lib/module/components/AnimatedTouchFeedback.js.map new file mode 100644 index 00000000..0f745d8a --- /dev/null +++ b/lib/module/components/AnimatedTouchFeedback.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","useEffect","useRef","Animated","Easing","StyleSheet","jsx","_jsx","AnimatedTouchFeedback","x","y","animationDelay","animationDuration","onAnimationDone","appearDisappearAnimRef","Value","onAnimationDoneRef","current","setValue","inDuration","outDuration","sequence","timing","delay","toValue","duration","easing","linear","useNativeDriver","out","ease","start","View","pointerEvents","style","styles","animatedTouchFeedback","opacity","interpolate","inputRange","outputRange","left","top","transform","scale","create","backgroundColor","borderRadius","height","position","width"],"sourceRoot":"../../../src","sources":["components/AnimatedTouchFeedback.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAChD,SAASC,QAAQ,EAAEC,MAAM,EAAEC,UAAU,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE5D,OAAO,MAAMC,qBAAqB,GAAGA,CAAC;EACpCC,CAAC;EACDC,CAAC;EACDC,cAAc;EACdC,iBAAiB;EACjBC;AAOF,CAAC,KAAK;EACJ,MAAMC,sBAAsB,GAAGZ,MAAM,CAAiB,IAAIC,QAAQ,CAACY,KAAK,CAAC,CAAC,CAAC,CAAC;EAC5E,MAAMC,kBAAkB,GAAGd,MAAM,CAACW,eAAe,CAAC;EAClDG,kBAAkB,CAACC,OAAO,GAAGJ,eAAe;EAE5CZ,SAAS,CAAC,MAAM;IACda,sBAAsB,CAACG,OAAO,CAACC,QAAQ,CAAC,CAAC,CAAC;IAC1C,MAAMC,UAAU,GAAGP,iBAAiB,GAAG,GAAG;IAC1C,MAAMQ,WAAW,GAAGR,iBAAiB,GAAGO,UAAU;IAClDhB,QAAQ,CAACkB,QAAQ,CAAC,CAChBlB,QAAQ,CAACmB,MAAM,CAACR,sBAAsB,CAACG,OAAO,EAAE;MAC9CM,KAAK,EAAEZ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YAAY,EAAE,EAAE;IAChBC,MAAM,EAAE,EAAE;IACVC,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]} diff --git a/lib/module/components/StaticPin.js b/lib/module/components/StaticPin.js new file mode 100644 index 00000000..c34c1084 --- /dev/null +++ b/lib/module/components/StaticPin.js @@ -0,0 +1,85 @@ +"use strict"; + +import React from 'react'; +import { Animated, Image, PanResponder, StyleSheet, View } from 'react-native'; +import { jsx as _jsx } from "react/jsx-runtime"; +export const StaticPin = ({ + staticPinPosition, + pinAnim, + staticPinIcon, + pinSize, + onParentMove, + onPress, + onLongPress, + setPinSize, + pinProps = {} +}) => { + const tapTime = React.useRef(0); + const transform = [{ + translateY: -pinSize.height + }, { + translateX: -pinSize.width / 2 + }, ...pinAnim.getTranslateTransform()]; + const opacity = pinSize.width && pinSize.height ? 1 : 0; + const panResponder = React.useRef(PanResponder.create({ + onStartShouldSetPanResponder: () => { + tapTime.current = Date.now(); + + // We want to handle tap on this so set true + return true; + }, + onPanResponderMove: (evt, gestureState) => { + // However if the user moves finger we want to pass this evt to parent + // to handle panning (tap not recognized) + if (Math.abs(gestureState.dx) > 5 && Math.abs(gestureState.dy) > 5) onParentMove(evt, gestureState); + }, + onPanResponderRelease: (evt, gestureState) => { + if (Math.abs(gestureState.dx) > 5 || Math.abs(gestureState.dy) > 5) return; + const dt = Date.now() - tapTime.current; + if (onPress && dt < 500) { + onPress(evt); + } + if (onLongPress && dt > 500) { + // RN long press is 500ms + onLongPress(evt); + } + } + })).current; + return /*#__PURE__*/_jsx(Animated.View, { + style: [{ + left: staticPinPosition.x, + top: staticPinPosition.y + }, styles.pinWrapper, { + opacity, + transform + }], + ...pinProps, + children: /*#__PURE__*/_jsx(View, { + onLayout: ({ + nativeEvent: { + layout + } + }) => { + setPinSize(layout); + }, + ...panResponder.panHandlers, + children: staticPinIcon || + /*#__PURE__*/ + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + _jsx(Image, { + source: require('../assets/pin.png'), + style: styles.pin + }) + }) + }); +}; +const styles = StyleSheet.create({ + pin: { + height: 64, + width: 48 + }, + pinWrapper: { + position: 'absolute' + } +}); +//# sourceMappingURL=StaticPin.js.map \ No newline at end of file diff --git a/lib/module/components/StaticPin.js.map b/lib/module/components/StaticPin.js.map new file mode 100644 index 00000000..06eaba8a --- /dev/null +++ b/lib/module/components/StaticPin.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","Animated","Image","PanResponder","StyleSheet","View","jsx","_jsx","StaticPin","staticPinPosition","pinAnim","staticPinIcon","pinSize","onParentMove","onPress","onLongPress","setPinSize","pinProps","tapTime","useRef","transform","translateY","height","translateX","width","getTranslateTransform","opacity","panResponder","create","onStartShouldSetPanResponder","current","Date","now","onPanResponderMove","evt","gestureState","Math","abs","dx","dy","onPanResponderRelease","dt","style","left","x","top","y","styles","pinWrapper","children","onLayout","nativeEvent","layout","panHandlers","source","require","pin","position"],"sourceRoot":"../../../src","sources":["components/StaticPin.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,QAAQ,EAERC,KAAK,EACLC,YAAY,EAEZC,UAAU,EACVC,IAAI,QAEC,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGtB,OAAO,MAAMC,SAAS,GAAGA,CAAC;EACxBC,iBAAiB;EACjBC,OAAO;EACPC,aAAa;EACbC,OAAO;EACPC,YAAY;EACZC,OAAO;EACPC,WAAW;EACXC,UAAU;EACVC,QAAQ,GAAG,CAAC;AAed,CAAC,KAAK;EACJ,MAAMC,OAAO,GAAGlB,KAAK,CAACmB,MAAM,CAAC,CAAC,CAAC;EAC/B,MAAMC,SAAS,GAAG,CAChB;IAAEC,UAAU,EAAE,CAACT,OAAO,CAACU;EAAO,CAAC,EAC/B;IAAEC,UAAU,EAAE,CAACX,OAAO,CAACY,KAAK,GAAG;EAAE,CAAC,EAClC,GAAGd,OAAO,CAACe,qBAAqB,CAAC,CAAC,CAC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ACzB,CAAC,EACDC,MAAM,CAACC,UAAU,EACjB;MAAEtB,OAAO;MAAEN;IAAU,CAAC,CACtB;IAAA,GACEH,QAAQ;IAAAgC,QAAA,eAEZ1C,IAAA,CAACF,IAAI;MACH6C,QAAQ,EAAEA,CAAC;QAAEC,WAAW,EAAE;UAAEC;QAAO;MAAE,CAAC,KAAK;QACzCpC,UAAU,CAACoC,MAAM,CAAC;MACpB,CAAE;MAAA,GACEzB,YAAY,CAAC0B,WAAW;MAAAJ,QAAA,EAE3BtC,aAAa;MAAA;MACZ;MACAJ,IAAA,CAACL,KAAK;QAACoD,MAAM,EAAEC,OAAO,CAAC,mBAAmB,CAAE;QAACb,KAAK,EAAEK,MAAM,CAACS;MAAI,CAAE;IAClE,CACG;EAAC,CACM,CAAC;AAEpB,CAAC;AAED,MAAMT,MAAM,GAAG3C,UAAU,CAACwB,MAAM,CAAC;EAC/B4B,GAAG,EAAE;IACHlC,MAAM,EAAE,EAAE;IACVE,KAAK,EAAE;EACT,CAAC;EACDwB,UAAU,EAAE;IACVS,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]} diff --git a/lib/module/components/index.js b/lib/module/components/index.js new file mode 100644 index 00000000..040fe359 --- /dev/null +++ b/lib/module/components/index.js @@ -0,0 +1,4 @@ +"use strict"; + +export { AnimatedTouchFeedback } from './AnimatedTouchFeedback'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/module/components/index.js.map b/lib/module/components/index.js.map new file mode 100644 index 00000000..16f3c604 --- /dev/null +++ b/lib/module/components/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["AnimatedTouchFeedback"],"sourceRoot":"../../../src","sources":["components/index.tsx"],"mappings":";;AAAA,SAASA,qBAAqB,QAAQ,yBAAyB","ignoreList":[]} diff --git a/lib/module/debugHelper/index.js b/lib/module/debugHelper/index.js new file mode 100644 index 00000000..f689e53a --- /dev/null +++ b/lib/module/debugHelper/index.js @@ -0,0 +1,53 @@ +"use strict"; + +import React from 'react'; +import { StyleSheet, View } from 'react-native'; +import { jsx as _jsx } from "react/jsx-runtime"; +export const DebugTouchPoint = ({ + diameter = 20, + x = 0, + y = 0, + color = 'yellow' +}) => { + const radius = diameter / 2; + return /*#__PURE__*/_jsx(View, { + style: [styles.debugPoint, { + width: diameter, + height: diameter, + borderRadius: diameter, + backgroundColor: color, + left: x - radius, + top: y - radius + }], + pointerEvents: "none" + }); +}; +export const DebugRect = ({ + height, + x = 0, + y = 0, + color = 'yellow' +}) => { + const width = 5; + return /*#__PURE__*/_jsx(View, { + style: [styles.debugRect, { + width, + height, + backgroundColor: color, + left: x - width / 2, + top: y + }], + pointerEvents: "none" + }); +}; +const styles = StyleSheet.create({ + debugPoint: { + opacity: 0.7, + position: 'absolute' + }, + debugRect: { + opacity: 0.5, + position: 'absolute' + } +}); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/module/debugHelper/index.js.map b/lib/module/debugHelper/index.js.map new file mode 100644 index 00000000..c87cf2bc --- /dev/null +++ b/lib/module/debugHelper/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","StyleSheet","View","jsx","_jsx","DebugTouchPoint","diameter","x","y","color","radius","style","styles","debugPoint","width","height","borderRadius","backgroundColor","left","top","pointerEvents","DebugRect","debugRect","create","opacity","position"],"sourceRoot":"../../../src","sources":["debugHelper/index.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEhD,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAC9BC,QAAQ,GAAG,EAAE;EACbC,CAAC,GAAG,CAAC;EACLC,CAAC,GAAG,CAAC;EACLC,KAAK,GAAG;AACV,CAAC,KAAK;EACJ,MAAMC,MAAM,GAAGJ,QAAQ,GAAG,CAAC;EAC3B,oBACEF,IAAA,CAACF,IAAI;IACHS,KAAK,EAAE,CACLC,MAAM,CAACC,UAAU,EACjB;MACEC,KAAK,EAAER,QAAQ;MACfS,MAAM,EAAET,QAAQ;MAChBU,YAAY,EAAEV,QAAQ;MACtBW,eAAe,EAAER,KAAK;MACtBS,IAAI,EAAEX,CAAC,GAAGG,MAAM;MAChBS,GAAG,EAAEX,CAAC,GAAGE;IACX,CAAC,CACD;IACFU,aAAa,EAAC;EAAM,CACrB,CAAC;AAEN,CAAC;AACD,OAAO,MAAMC,SAAS,GAAGA,CAAC;EACxBN,MAAM;EACNR,CAAC,GAAG,CAAC;EACLC,CAAC,GAAG,CAAC;EACLC,KAAK,GAAG;AAMV,CAAC,KAAK;EACJ,MAAMK,KAAK,GAAG,CAAC;EACf,oBACEV,IAAA,CAACF,IAAI;IACHS,KAAK,EAAE,CACLC,MAAM,CAACU,SAAS,EAChB;MACER,KAAK;MACLC,MAAM;MACNE,eAAe,EAAER,KAAK;MACtBS,IAAI,EAAEX,CAAC,GAAGO,KAAK,GAAG,CAAC;MACnBK,GAAG,EAAEX;IACP,CAAC,CACD;IACFY,aAAa,EAAC;EAAM,CACrB,CAAC;AAEN,CAAC;AAED,MAAMR,MAAM,GAAGX,UAAU,CAACsB,MAAM,CAAC;EAC/BV,UAAU,EAAE;IACVW,OAAO,EAAE,GAAG;IACZC,QAAQ,EAAE;EACZ,CAAC;EACDH,SAAS,EAAE;IACTE,OAAO,EAAE,GAAG;IACZC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]} diff --git a/lib/module/helper/applyPanBoundariesToOffset.js b/lib/module/helper/applyPanBoundariesToOffset.js new file mode 100644 index 00000000..35276c0c --- /dev/null +++ b/lib/module/helper/applyPanBoundariesToOffset.js @@ -0,0 +1,59 @@ +"use strict"; + +/** + * Takes a single offset value and calculates the correct offset value + * to make sure it's within the pan boundaries + * + * + * @param offsetScaled + * @param containerSize + * @param contentSize + * @param scale + * @param boundaryPadding - see README + * + * @returns {number} + */ +export function applyPanBoundariesToOffset(offsetScaled, containerSize, contentSize, scale, boundaryPadding) { + const contentSizeUnscaled = contentSize * scale; + const offsetUnscaled = offsetScaled * scale; + const contentStartBorderUnscaled = containerSize / 2 + offsetUnscaled - contentSizeUnscaled / 2; + const contentEndBorderUnscaled = contentStartBorderUnscaled + contentSizeUnscaled; + const containerStartBorder = 0; + const containerEndBorder = containerStartBorder + containerSize; + + // do not let boundary padding be greater than the container size or less than 0 + if (!boundaryPadding || boundaryPadding < 0) boundaryPadding = 0; + if (boundaryPadding > containerSize) boundaryPadding = containerSize; + + // Calculate container's measurements with boundary padding applied. + // this should shrink the container's size by the amount of the boundary padding, + // so that the content inside can be panned a bit further away from the original container's boundaries. + const paddedContainerSize = containerSize - boundaryPadding * 2; + const paddedContainerStartBorder = containerStartBorder + boundaryPadding; + const paddedContainerEndBorder = containerEndBorder - boundaryPadding; + + // if content is smaller than the padded container, + // don't let the content move + if (contentSizeUnscaled < paddedContainerSize) { + return 0; + } + + // if content is larger than the padded container, + // don't let the padded container go outside of content + + // maximum distance the content's center can move from its original position. + // assuming the content original center is the container's center. + const contentMaxOffsetScaled = (paddedContainerSize / 2 - contentSizeUnscaled / 2) / scale; + if ( + // content reaching the end boundary + contentEndBorderUnscaled < paddedContainerEndBorder) { + return contentMaxOffsetScaled; + } + if ( + // content reaching the start boundary + contentStartBorderUnscaled > paddedContainerStartBorder) { + return -contentMaxOffsetScaled; + } + return offsetScaled; +} +//# sourceMappingURL=applyPanBoundariesToOffset.js.map \ No newline at end of file diff --git a/lib/module/helper/applyPanBoundariesToOffset.js.map b/lib/module/helper/applyPanBoundariesToOffset.js.map new file mode 100644 index 00000000..a7debcbf --- /dev/null +++ b/lib/module/helper/applyPanBoundariesToOffset.js.map @@ -0,0 +1 @@ +{"version":3,"names":["applyPanBoundariesToOffset","offsetScaled","containerSize","contentSize","scale","boundaryPadding","contentSizeUnscaled","offsetUnscaled","contentStartBorderUnscaled","contentEndBorderUnscaled","containerStartBorder","containerEndBorder","paddedContainerSize","paddedContainerStartBorder","paddedContainerEndBorder","contentMaxOffs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AAOd,YAAY;AACrB","ignoreList":[]} diff --git a/lib/module/helper/calcNewScaledOffsetForZoomCentering.js b/lib/module/helper/calcNewScaledOffsetForZoomCentering.js new file mode 100644 index 00000000..7ac687ea --- /dev/null +++ b/lib/module/helper/calcNewScaledOffsetForZoomCentering.js @@ -0,0 +1,69 @@ +"use strict"; + +/** + * Calculates the new offset for the zoomSubject to ensure zoom center position is retained after zooming. + * Parameters should correspond to whether we need the offset for the X or Y axis + * + * ## Terms Used: + * + * - Zoom Subject: the view that's being zoomed and panned + * - Zoom Center: the point whose relative position to the window is retained + * - Unscaled: a measurement in pixels denoting the true size as observed by the users' eyes + * - Scaled: a measurement in pixels scaled to the "scale transformation" of the zoom subject to match with its true size. + * *For example:* + * If the scale on the zoom subject is 0.5, + * then to draw an actual 4px line on the zoom subject, we need to scale it to 4px / 0.5 = 8px + * 8px is the scaled measurement + * + * ## Overall idea of this algorithm: + * + * When users perform zooming by pinching the screen, + * we need to shift the zoom subject so that the position of the zoom center is always the same. + * The offset amount to shift the layer is the returned value. + * + * + * ## How we achieve our goal: + * + * To retain, the zoom center position, whenever a zoom action is performed, + * we just need to make sure the distances from all the points in the zoom subject + * to the zoom center increases or decreases by the growth rate of the scale. + * + * ``` + * newDistanceAnyPointToZoomCenter = oldDistanceAnyPointToZoomCenter * (newScale/oldScale) + * ``` + * + * We can't calculate that for all the points because there are unlimited points on a plain. + * However, due to the way `transform` works in RN, every point is scaled from the zoom subject center. + * Therefore, it's sufficient to base our calculation on the distance from the zoom subject center to the zoom center. + * + * ``` + * newDistanceZoomSubjectCenterToZoomCenter = oldDistanceZoomSubjectCenterToZoomCenter * (newScale/oldScale) + * ``` + * + * Once we have `newDistanceZoomSubjectCenterToZoomCenter`, + * we can easily calculate the position of the new center, which leads us to the offset amount. + * Refer to the code for more details + * + * @param oldOffsetXOrYScaled + * @param zoomSubjectOriginalWidthOrHeight + * @param oldScale + * @param newScale + * @param zoomCenterXOrY + */ +export function calcNewScaledOffsetForZoomCentering(oldOffsetXOrYScaled, zoomSubjectOriginalWidthOrHeight, oldScale, newScale, zoomCenterXOrY) { + const oldOffSetUnscaled = oldOffsetXOrYScaled * oldScale; + const growthRate = newScale / oldScale; + + // these act like namespaces just for the sake of readability + const zoomSubjectOriginalCenter = {}; + const zoomSubjectCurrentCenter = {}; + const zoomSubjectNewCenter = {}; + zoomSubjectOriginalCenter.xOrY = zoomSubjectOriginalWidthOrHeight / 2; + zoomSubjectCurrentCenter.xOrY = zoomSubjectOriginalCenter.xOrY + oldOffSetUnscaled; + zoomSubjectCurrentCenter.distanceToZoomCenter = zoomSubjectCurrentCenter.xOrY - zoomCenterXOrY; + zoomSubjectNewCenter.distanceToZoomCenter = zoomSubjectCurrentCenter.distanceToZoomCenter * growthRate; + zoomSubjectNewCenter.xOrY = zoomSubjectNewCenter.distanceToZoomCenter + zoomCenterXOrY; + const newOffsetUnscaled = zoomSubjectNewCenter.xOrY - zoomSubjectOriginalCenter.xOrY; + return newOffsetUnscaled / newScale; +} +//# sourceMappingURL=calcNewScaledOffsetForZoomCentering.js.map \ No newline at end of file diff --git a/lib/module/helper/calcNewScaledOffsetForZoomCentering.js.map b/lib/module/helper/calcNewScaledOffsetForZoomCentering.js.map new file mode 100644 index 00000000..a84ce62f --- /dev/null +++ b/lib/module/helper/calcNewScaledOffsetForZoomCentering.js.map @@ -0,0 +1 @@ +{"version":3,"names":["calcNewScaledOffsetForZoomCentering","oldOffsetXOrYScaled","zoomSubjectOriginalWidthOrHeight","oldScale","newScale","zoomCenterXOrY","oldOffSetUnscaled","growthRate","zoomSubjectOriginalCenter","zoomSubjectCurrentCenter","zoomSubjectNewCenter","xOrY","distanceToZoomCenter","newOffsetUnscaled"],"sourceRoot":"../../../src","sources":["helper/calcNewScaledOffsetForZoomCentering.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,mCAAmCA,CACjDC,mBAA2B,EAC3BC,gCAAwC,EACxCC,QAAgB,EAChBC,QAAgB,EAChBC,cAAsB,EACtB;EACA,MAAMC,iBAAiB,GAAGL,mBAAmB,GAAGE,QAAQ;EACxD,MAAMI,UAAU,GAAGH,QAAQ,GAAGD,QAAQ;;EAEtC;EACA,MAAMK,yBAAyB,GAAG,CAAC,CAAW;EAC9C,MAAMC,wBAAwB,GAAG,CAAC,CAAW;EAC7C,MAAMC,oBAAoB,GAAG,CAAC,CAAW;EAEzCF,yBAAyB,CAACG,IAAI,GAAGT,gCAAgC,GAAG,CAAC;EACrEO,wBAAwB,CAACE,IAAI,GAC3BH,yBAAyB,CAACG,IAAI,GAAGL,iBAAiB;EACpDG,wBAAwB,CAACG,oBAAoB,GAC3CH,wBAAwB,CAACE,IAAI,GAAGN,cAAc;EAEhDK,oBAAoB,CAACE,oBAAoB,GACvCH,wBAAwB,CAACG,oBAAoB,GAAGL,UAAU;EAC5DG,oBAAoB,CAACC,IAAI,GACvBD,oBAAoB,CAACE,oBAAoB,GAAGP,cAAc;EAE5D,MAAMQ,iBAAiB,GACrBH,oBAAoB,CAACC,IAAI,GAAGH,yBAAyB,CAACG,IAAI;EAE5D,OAAOE,iBAAiB,GAAGT,QAAQ;AACrC","ignoreList":[]} diff --git a/lib/module/helper/coordinateConversion.js b/lib/module/helper/coordinateConversion.js new file mode 100644 index 00000000..97c2442c --- /dev/null +++ b/lib/module/helper/coordinateConversion.js @@ -0,0 +1,110 @@ +"use strict"; + +export const defaultTransformSubjectData = { + offsetX: 0, + offsetY: 0, + zoomLevel: 0, + originalWidth: 0, + originalHeight: 0, + originalPageX: 0, + originalPageY: 0 +}; + +/** + * Assuming you have an image that's being resized to fit into a container + * using the "contain" resize mode. You can use this function to calculate the + * size of the image after fitting. + * + * Since our sheet is resized in this manner, we need this function + * for things like pan boundaries and marker placement + * + * @param imgSize + * @param containerSize + */ +export function applyContainResizeMode(imgSize, containerSize) { + const { + width: imageWidth, + height: imageHeight + } = imgSize; + const { + width: areaWidth, + height: areaHeight + } = containerSize; + const imageAspect = imageWidth / imageHeight; + const areaAspect = areaWidth / areaHeight; + let newSize; + if (imageAspect >= areaAspect) { + // longest edge is horizontal + newSize = { + width: areaWidth, + height: areaWidth / imageAspect + }; + } else { + // longest edge is vertical + newSize = { + width: areaHeight * imageAspect, + height: areaHeight + }; + } + if (isNaN(newSize.height)) newSize.height = areaHeight; + if (isNaN(newSize.width)) newSize.width = areaWidth; + const scale = imageWidth ? newSize.width / imageWidth : newSize.height / imageHeight; + if (!isFinite(scale)) return { + size: null, + scale: null + }; + return { + size: newSize, + scale + }; +} + +/** + * get the coord of image's origin relative to the transformSubject + * @param resizedImageSize + * @param transformSubject + */ +export function getImageOriginOnTransformSubject(resizedImageSize, transformSubject) { + const { + offsetX, + offsetY, + zoomLevel, + originalWidth, + originalHeight + } = transformSubject; + return { + x: offsetX * zoomLevel + originalWidth / 2 - resizedImageSize.width / 2 * zoomLevel, + y: offsetY * zoomLevel + originalHeight / 2 - resizedImageSize.height / 2 * zoomLevel + }; +} + +/** + * Translates the coord system of a point from the viewport's space to the image's space + * + * @param pointOnContainer + * @param sheetImageSize + * @param transformSubject + * + * @return {Vec2D} returns null if point is out of the sheet's bound + */ +export function viewportPositionToImagePosition({ + viewportPosition, + imageSize, + zoomableEvent +}) { + const { + size: resizedImgSize, + scale: resizedImgScale + } = applyContainResizeMode(imageSize, { + width: zoomableEvent.originalWidth, + height: zoomableEvent.originalHeight + }); + if (resizedImgScale == null) return null; + const sheetOriginOnContainer = getImageOriginOnTransformSubject(resizedImgSize, zoomableEvent); + const pointOnSheet = { + x: (viewportPosition.x - sheetOriginOnContainer.x) / zoomableEvent.zoomLevel / resizedImgScale, + y: (viewportPosition.y - sheetOriginOnContainer.y) / zoomableEvent.zoomLevel / resizedImgScale + }; + return pointOnSheet; +} +//# sourceMappingURL=coordinateConversion.js.map \ No newline at end of file diff --git a/lib/module/helper/coordinateConversion.js.map b/lib/module/helper/coordinateConversion.js.map new file mode 100644 index 00000000..b6b0ab80 --- /dev/null +++ b/lib/module/helper/coordinateConversion.js.map @@ -0,0 +1 @@ +{"version":3,"names":["defaultTransformSubjectData","offsetX","offsetY","zoomLevel","originalWidth","originalHeight","originalPageX","originalPageY","applyContainResizeMode","imgSize","containerSize","width","imageWidth","height","imageHeight","areaWidth","areaHeight","imageAspect","areaAspect","newSize","isNaN","scale","isFinite","size","getImageOriginOnTransformSubject","resizedImageSize","transformSubject","x","y","viewportPositionToImagePosition","viewportPosition","imageSize","zoomableEvent","resizedImgSize","resizedImgScale","sheetOriginOnContainer","pointOnSheet"],"sourceRoot":"../../../src","sources":["helper/coordinateConversion.ts"],"mappings":";;AAEA,OAAO,MAAMA,2BAA8C,GAAG;EAC5DC,OAAO,EAAE,CAAC;EACVC,OAAO,EAAE,CAAC;EACVC,SAAS,EAAE,CAAC;EACZC,aAAa,EAAE,CAAC;EAChBC,cAAc,EAAE,CAAC;EACjBC,aAAa,EAAE,CAAC;EAChBC,aAAa,EAAE;AACjB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CACpCC,OAAe,EACfC,aAAqB,EAC0C;EAC/D,MAAM;IAAEC,KAAK,EAAEC,UAAU;IAAEC,MAAM,EAAEC;EAAY,CAAC,GAAGL,OAAO;EAC1D,MAAM;IAAEE,KAAK,EAAEI,SAAS;IAAEF,MAAM,EAAEG;EAAW,CAAC,GAAGN,aAAa;EAC9D,MAAMO,WAAW,GAAGL,UAAU,GAAGE,WAAW;EAC5C,MAAMI,UAAU,GAAGH,SAAS,GAAGC,UAAU;EAEzC,IAAIG,OAAO;EACX,IAAIF,WAAW,IAAIC,UAAU,EAAE;IA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C,SAAS;EACTC;AAKF,CAAC,EAAgB;EACf,MAAM;IAAET,IAAI,EAAEU,cAAc;IAAEZ,KAAK,EAAEa;EAAgB,CAAC,GACpD1B,sBAAsB,CAACuB,SAAS,EAAE;IAChCpB,KAAK,EAAEqB,aAAa,CAAC5B,aAAa;IAClCS,MAAM,EAAEmB,aAAa,CAAC3B;EACxB,CAAC,CAAC;EAEJ,IAAI6B,eAAe,IAAI,IAAI,EAAE,OAAO,IAAI;EAExC,MAAMC,sBAAsB,GAAGX,gCAAgC,CAC7DS,cAAc,EACdD,aACF,CAAC;EAED,MAAMI,YAAY,GAAG;IACnBT,CAAC,EACC,CAACG,gBAAgB,CAACH,CAAC,GAAGQ,sBAAsB,CAACR,CAAC,IAC9CK,aAAa,CAAC7B,SAAS,GACvB+B,eAAe;IACjBN,CAAC,EACC,CAACE,gBAAgB,CAACF,CAAC,GAAGO,sBAAsB,CAACP,CAAC,IAC9CI,aAAa,CAAC7B,SAAS,GACvB+B;EACJ,CAAC;EAED,OAAOE,YAAY;AACrB","ignoreList":[]} diff --git a/lib/module/helper/index.js b/lib/module/helper/index.js new file mode 100644 index 00000000..bdce1d5c --- /dev/null +++ b/lib/module/helper/index.js @@ -0,0 +1,41 @@ +"use strict"; + +export { calcNewScaledOffsetForZoomCentering } from './calcNewScaledOffsetForZoomCentering'; + +/** + * Calculates the gesture center point relative to the page coordinate system + * + * We're unable to use touch.locationX/Y + * because locationX uses the axis system of the leaf element that the touch occurs on, + * which makes it even more complicated to translate into our container's axis system. + * + * We're also unable to use gestureState.moveX/Y + * because gestureState.moveX/Y is messed up on real device + * (Sometimes it's the center point, but sometimes it randomly takes the position of one of the touches) + */ +export function calcGestureCenterPoint(e, gestureState) { + const touches = e.nativeEvent.touches; + if (!touches[0]) return null; + if (gestureState.numberActiveTouches === 2) { + if (!touches[1]) return null; + return { + x: (touches[0].pageX + touches[1].pageX) / 2, + y: (touches[0].pageY + touches[1].pageY) / 2 + }; + } + if (gestureState.numberActiveTouches === 1) { + return { + x: touches[0].pageX, + y: touches[0].pageY + }; + } + return null; +} +export function calcGestureTouchDistance(e, gestureState) { + const touches = e.nativeEvent.touches; + if (gestureState.numberActiveTouches !== 2 || !touches[0] || !touches[1]) return null; + const dx = Math.abs(touches[0].pageX - touches[1].pageX); + const dy = Math.abs(touches[0].pageY - touches[1].pageY); + return Math.sqrt(dx * dx + dy * dy); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/module/helper/index.js.map b/lib/module/helper/index.js.map new file mode 100644 index 00000000..0631c9e1 --- /dev/null +++ b/lib/module/helper/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["calcNewScaledOffsetForZoomCentering","calcGestureCenterPoint","e","gestureState","touches","nativeEvent","numberActiveTouches","x","pageX","y","pageY","calcGestureTouchDistance","dx","Math","abs","dy","sqrt"],"sourceRoot":"../../../src","sources":["helper/index.ts"],"mappings":";;AAIA,SAASA,mCAAmC,QAAQ,uCAAuC;;AAE3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CACpCC,CAAwB,EACxBC,YAAsC,EACxB;EACd,MAAMC,OAAO,GAAGF,CAAC,CAACG,WAAW,CAACD,OAAO;EACrC,IAAI,CAACA,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,IAAI;EAE5B,IAAID,YAAY,CAACG,mBAAmB,KAAK,CAAC,EAAE;IAC1C,IAAI,CAACF,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,IAAI;IAC5B,OAAO;MACLG,CAAC,EAAE,CAACH,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK,GAAGJ,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK,IAAI,CAAC;MAC5CC,CAAC,EAAE,CAACL,OAAO,CAAC,CAAC,CAAC,CAACM,KAAK,GAAGN,OAAO,CAAC,CAAC,CAAC,CAACM,KAAK,IAAI;IAC7C,CAAC;EACH;EACA,IAAIP,YAAY,CAACG,mBAAmB,KAAK,CAAC,EAAE;IAC1C,OAAO;MACLC,CAAC,EAAEH,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK;MACnBC,CAAC,EAAEL,OAAO,CAAC,CAAC,CAAC,CAACM;IAChB,CAAC;EACH;EAEA,OAAO,IAAI;AACb;AAEA,OAAO,SAASC,wBAAwBA,CACtCT,CAAwB,EACxBC,YAAsC,EACvB;EACf,MAAMC,OAAO,GAAGF,CAAC,CAACG,WAAW,CAACD,OAAO;EACrC,IAAID,YAAY,CAACG,mBAAmB,KAAK,CAAC,IAAI,CAACF,OAAO,CAAC,CAAC,CAAC,IAAI,CAACA,OAAO,CAAC,CAAC,CAAC,EACtE,OAAO,IAAI;EAEb,MAAMQ,EAAE,GAAGC,IAAI,CAACC,GAAG,CAACV,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK,GAAGJ,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK,CAAC;EACxD,MAAMO,EAAE,GAAGF,IAAI,CAACC,GAAG,CAACV,OAAO,CAAC,CAAC,CAAC,CAACM,KAAK,GAAGN,OAAO,CAAC,CAAC,CAAC,CAACM,KAAK,CAAC;EACxD,OAAOG,IAAI,CAACG,IAAI,CAACJ,EAAE,GAAGA,EAAE,GAAGG,EAAE,GAAGA,EAAE,CAAC;AACrC","ignoreList":[]} diff --git a/lib/module/index.js b/lib/module/index.js new file mode 100644 index 00000000..bd05c56b --- /dev/null +++ b/lib/module/index.js @@ -0,0 +1,8 @@ +"use strict"; + +import { applyContainResizeMode, getImageOriginOnTransformSubject, viewportPositionToImagePosition } from './helper/coordinateConversion'; +import ReactNativeZoomableView from './ReactNativeZoomableView'; +export { +// Helper functions for coordinate conversion +applyContainResizeMode, getImageOriginOnTransformSubject, ReactNativeZoomableView, viewportPositionToImagePosition }; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/module/index.js.map b/lib/module/index.js.map new file mode 100644 index 00000000..add721ff --- /dev/null +++ b/lib/module/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["applyContainResizeMode","getImageOriginOnTransformSubject","viewportPositionToImagePosition","ReactNativeZoomableView"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SACEA,sBAAsB,EACtBC,gCAAgC,EAChCC,+BAA+B,QAC1B,+BAA+B;AACtC,OAAOC,uBAAuB,MAAM,2BAA2B;AAM/D;AACE;AACAH,sBAAsB,EACtBC,gCAAgC,EAChCE,uBAAuB,EAEvBD,+BAA+B","ignoreList":[]} diff --git a/lib/module/package.json b/lib/module/package.json new file mode 100644 index 00000000..089153bc --- /dev/null +++ b/lib/module/package.json @@ -0,0 +1 @@ +{"type":"module"} diff --git a/lib/module/typings/index.js b/lib/module/typings/index.js new file mode 100644 index 00000000..f9391cf7 --- /dev/null +++ b/lib/module/typings/index.js @@ -0,0 +1,10 @@ +"use strict"; + +export let SwipeDirection = /*#__PURE__*/function (SwipeDirection) { + SwipeDirection["SWIPE_UP"] = "SWIPE_UP"; + SwipeDirection["SWIPE_DOWN"] = "SWIPE_DOWN"; + SwipeDirection["SWIPE_LEFT"] = "SWIPE_LEFT"; + SwipeDirection["SWIPE_RIGHT"] = "SWIPE_RIGHT"; + return SwipeDirection; +}({}); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/module/typings/index.js.map b/lib/module/typings/index.js.map new file mode 100644 index 00000000..533f3a90 --- /dev/null +++ b/lib/module/typings/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["SwipeDirection"],"sourceRoot":"../../../src","sources":["typings/index.ts"],"mappings":";;AASA,WAAYA,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]} diff --git a/lib/typescript/ReactNativeZoomableView.d.ts b/lib/typescript/ReactNativeZoomableView.d.ts new file mode 100644 index 00000000..26d70039 --- /dev/null +++ b/lib/typescript/ReactNativeZoomableView.d.ts @@ -0,0 +1,246 @@ +/// +import { Component, RefObject } from 'react'; +import { GestureResponderEvent, PanResponderCallbacks, PanResponderGestureState, PanResponderInstance, View } from 'react-native'; +import { ReactNativeZoomableViewProps, ReactNativeZoomableViewState, Vec2D, ZoomableViewEvent } from './typings'; +declare class ReactNativeZoomableView extends Component { + zoomSubjectWrapperRef: RefObject; + gestureHandlers: PanResponderInstance; + doubleTapFirstTapReleaseTimestamp: number | undefined; + static defaultProps: { + zoomEnabled: boolean; + panEnabled: boolean; + initialZoom: number; + initialOffsetX: number; + initialOffsetY: number; + maxZoom: number; + minZoom: number; + pinchToZoomInSensitivity: number; + pinchToZoomOutSensitivity: number; + movementSensibility: number; + doubleTapDelay: number; + bindToBorders: boolean; + zoomStep: number; + onLongPress: null; + longPressDuration: number; + contentWidth: undefined; + contentHeight: undefined; + panBoundaryPadding: number; + visualTouchFeedbackEnabled: boolean; + staticPinPosition: undefined; + staticPinIcon: undefined; + onStaticPinPositionChange: undefined; + onStaticPinPositionMove: undefined; + animatePin: boolean; + disablePanOnInitialZoom: boolean; + }; + private panAnim; + private zoomAnim; + private pinAnim; + private __offsets; + private zoomLevel; + private lastGestureCenterPosition; + private lastGestureTouchDistance; + private gestureType; + private _gestureStarted; + private set gestureStarted(value); + get gestureStarted(): boolean; + /** + * Last press time (used to evaluate whether user double tapped) + * @type {number} + */ + private longPressTimeout; + private onTransformInvocationInitialized; + private singleTapTimeoutId; + private touches; + private doubleTapFirstTap; + private measureZoomSubjectInterval; + constructor(props: ReactNativeZoomableViewProps); + private raisePin; + private dropPin; + private set offsetX(value); + private set offsetY(value); + private get offsetX(); + private get offsetY(); + private __setOffset; + private __getOffset; + componentDidUpdate(prevProps: ReactNativeZoomableViewProps, prevState: ReactNativeZoomableViewState): void; + componentDidMount(): void; + componentWillUnmount(): void; + debouncedOnStaticPinPositionChange: import("lodash").DebouncedFunc<(position: Vec2D) => void | undefined>; + /** + * try to invoke onTransform + * @private + */ + _invokeOnTransform(): { + successful: boolean; + }; + /** + * Returns additional information about components current state for external event hooks + * + * @returns {{}} + * @private + */ + _getZoomableViewEventObject(overwriteObj?: {}): ZoomableViewEvent; + /** + * Get the original box dimensions and save them for later use. + * (They will be used to calculate boxBorders) + * + * @private + */ + private measureZoomSubject; + /** + * Handles the start of touch events and checks for taps + * + * @param e + * @param gestureState + * @returns {boolean} + * + * @private + */ + _handleStartShouldSetPanResponder: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => boolean; + /** + * Calculates pinch distance + * + * @param e + * @param gestureState + * @private + */ + _handlePanResponderGrant: NonNullable; + /** + * Handles the end of touch events + * + * @param e + * @param gestureState + * + * @private + */ + _handlePanResponderEnd: NonNullable; + /** + * Handles the actual movement of our pan responder + * + * @param e + * @param gestureState + * + * @private + */ + _handlePanResponderMove: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => boolean | undefined; + /** + * Handles the pinch movement and zooming + * + * @param e + * @param gestureState + * + * @private + */ + _handlePinching(e: GestureResponderEvent, gestureState: PanResponderGestureState): void; + /** + * Used to debug pinch events + * @param gestureResponderEvent + * @param zoomCenter + * @param points + */ + _setPinchDebugPoints(gestureResponderEvent: GestureResponderEvent, zoomCenter: Vec2D, ...points: Vec2D[]): void; + /** + * Calculates the amount the offset should shift since the last position during panning + * + * @param {Vec2D} gestureCenterPoint + * + * @private + */ + _calcOffsetShiftSinceLastGestureState(gestureCenterPoint: Vec2D): { + x: number; + y: number; + } | null; + /** + * Handles movement by tap and move + * + * @param gestureState + * + * @private + */ + _handleShifting(gestureState: PanResponderGestureState): void; + /** + * Set the state to offset moved + * + * @param {number} newOffsetX + * @param {number} newOffsetY + * @returns + */ + _setNewOffsetPosition(newOffsetX: number, newOffsetY: number): void; + /** + * Check whether the press event is double tap + * or single tap and handle the event accordingly + * + * @param e + * + * @private + */ + private _resolveAndHandleTap; + moveStaticPinTo: (position: Vec2D, duration?: number) => void; + private _staticPinPosition; + private _updateStaticPin; + private _addTouch; + private _removeTouch; + /** + * Handles the double tap event + * + * @param e + * + * @private + */ + _handleDoubleTap(e: GestureResponderEvent): void; + /** + * Returns the next zoom step based on current step and zoomStep property. + * If we are zoomed all the way in -> return to initialzoom + * + * @returns {*} + */ + _getNextZoomStep(): number | undefined; + /** + * Zooms to a specific level. A "zoom center" can be provided, which specifies + * the point that will remain in the same position on the screen after the zoom. + * The coordinates of the zoom center is relative to the zoom subject. + * { x: 0, y: 0 } is the very center of the zoom subject. + * + * @param newZoomLevel + * @param zoomCenter - If not supplied, the container's center is the zoom center + */ + zoomTo(newZoomLevel: number, zoomCenter?: Vec2D): boolean; + /** + * Zooms in or out by a specified change level + * Use a positive number for `zoomLevelChange` to zoom in + * Use a negative number for `zoomLevelChange` to zoom out + * + * Returns a promise if everything was updated and a boolean, whether it could be updated or if it exceeded the min/max zoom limits. + * + * @param {number | null} zoomLevelChange + * + * @return {bool} + */ + zoomBy(zoomLevelChange: number): boolean; + /** + * Moves the zoomed view to a specified position + * Returns a promise when finished + * + * @param {number} newOffsetX the new position we want to move it to (x-axis) + * @param {number} newOffsetY the new position we want to move it to (y-axis) + * + * @return {bool} + */ + moveTo(newOffsetX: number, newOffsetY: number): void; + /** + * Moves the zoomed view by a certain amount. + * + * Returns a promise when finished + * + * @param {number} offsetChangeX the amount we want to move the offset by (x-axis) + * @param {number} offsetChangeY the amount we want to move the offset by (y-axis) + * + * @return {bool} + */ + moveBy(offsetChangeX: number, offsetChangeY: number): void; + render(): JSX.Element; +} +export default ReactNativeZoomableView; +export { ReactNativeZoomableView }; +//# sourceMappingURL=ReactNativeZoomableView.d.ts.map \ No newline at end of file diff --git a/lib/typescript/ReactNativeZoomableView.d.ts.map b/lib/typescript/ReactNativeZoomableView.d.ts.map new file mode 100644 index 00000000..16895c24 --- /dev/null +++ b/lib/typescript/ReactNativeZoomableView.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ReactNativeZoomableView.d.ts","sourceRoot":"","sources":["../../src/ReactNativeZoomableView.tsx"],"names":[],"mappings":";AACA,OAAc,EAAE,SAAS,EAAa,SAAS,E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AAO,CAAC,gBAAgB,CAItB;IAEF,OAAO,CAAC,SAAS;IAKjB,OAAO,CAAC,YAAY;IAKpB;;;;;;OAMG;IACH,gBAAgB,CAAC,CAAC,EAAE,qBAAqB;IA+BzC;;;;;OAKG;IACH,gBAAgB;IAoBhB;;;;;;;;OAQG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,KAAK;IA+C/C;;;;;;;;;;OAUG;IACH,MAAM,CAAC,eAAe,EAAE,MAAM;IAM9B;;;;;;;;OAQG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAU7C;;;;;;;;;OASG;IACH,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM;IASnD,MAAM;CA8EP;AAkBD,eAAe,uBAAuB,CAAC;AAEvC,OAAO,EAAE,uBAAuB,EAAE,CAAC"} \ No newline at end of file diff --git a/lib/typescript/animations/index.d.ts b/lib/typescript/animations/index.d.ts new file mode 100644 index 00000000..b787c1a4 --- /dev/null +++ b/lib/typescript/animations/index.d.ts @@ -0,0 +1,6 @@ +import { Animated } from 'react-native'; +import { Vec2D } from '../typings'; +export declare function getBoundaryCrossedAnim(animValue: Animated.Value, toValue: number): Animated.CompositeAnimation; +export declare function getPanMomentumDecayAnim(animValue: Animated.Value | Animated.ValueXY, velocity: number | Vec2D): Animated.CompositeAnimation; +export declare function getZoomToAnimation(animValue: Animated.Value, toValue: number): Animated.CompositeAnimation; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/lib/typescript/animations/index.d.ts.map b/lib/typescript/animations/index.d.ts.map new file mode 100644 index 00000000..74cb9256 --- /dev/null +++ b/lib/typescript/animations/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/animations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAU,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,QAAQ,CAAC,KAAK,EACzB,OAAO,EAAE,MAAM,+BAOhB;AAED,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,OAAO,EAC5C,QAAQ,EAAE,MAAM,GAAG,KAAK,+BAOzB;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,+BAM5E"} \ No newline at end of file diff --git a/lib/typescript/components/AnimatedTouchFeedback.d.ts b/lib/typescript/components/AnimatedTouchFeedback.d.ts new file mode 100644 index 00000000..f0323bfa --- /dev/null +++ b/lib/typescript/components/AnimatedTouchFeedback.d.ts @@ -0,0 +1,8 @@ +export declare const AnimatedTouchFeedback: ({ x, y, animationDelay, animationDuration, onAnimationDone, }: { + x: number; + y: number; + animationDuration: number; + animationDelay?: number | undefined; + onAnimationDone?: (() => void) | undefined; +}) => JSX.Element; +//# sourceMappingURL=AnimatedTouchFeedback.d.ts.map \ No newline at end of file diff --git a/lib/typescript/components/AnimatedTouchFeedback.d.ts.map b/lib/typescript/components/AnimatedTouchFeedback.d.ts.map new file mode 100644 index 00000000..e169ac3c --- /dev/null +++ b/lib/typescript/components/AnimatedTouchFeedback.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"AnimatedTouchFeedback.d.ts","sourceRoot":"","sources":["../../../src/components/AnimatedTouchFeedback.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB;OAO7B,MAAM;OACN,MAAM;uBACU,MAAM;;6BAED,IAAI;iBAmD7B,CAAC"} \ No newline at end of file diff --git a/lib/typescript/components/StaticPin.d.ts b/lib/typescript/components/StaticPin.d.ts new file mode 100644 index 00000000..5668d3d2 --- /dev/null +++ b/lib/typescript/components/StaticPin.d.ts @@ -0,0 +1,19 @@ +import React from 'react'; +import { Animated, GestureResponderEvent, PanResponderGestureState, ViewProps } from 'react-native'; +import { Size2D } from 'src/typings'; +export declare const StaticPin: ({ staticPinPosition, pinAnim, staticPinIcon, pinSize, onParentMove, onPress, onLongPress, setPinSize, pinProps, }: { + staticPinPosition: { + x: number; + y: number; + }; + pinAnim: Animated.ValueXY; + staticPinIcon: React.ReactNode; + pinSize: Size2D; + /** Internal handler for passing move event to parent */ + onParentMove: (evt: GestureResponderEvent, gestureState: PanResponderGestureState) => boolean | undefined; + onPress?: ((evt: GestureResponderEvent) => void) | undefined; + onLongPress?: ((evt: GestureResponderEvent) => void) | undefined; + setPinSize: (size: Size2D) => void; + pinProps?: ViewProps | undefined; +}) => JSX.Element; +//# sourceMappingURL=StaticPin.d.ts.map \ No newline at end of file diff --git a/lib/typescript/components/StaticPin.d.ts.map b/lib/typescript/components/StaticPin.d.ts.map new file mode 100644 index 00000000..f02c857e --- /dev/null +++ b/lib/typescript/components/StaticPin.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"StaticPin.d.ts","sourceRoot":"","sources":["../../../src/components/StaticPin.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,QAAQ,EACR,qBAAqB,EAGrB,wBAAwB,EAGxB,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,eAAO,MAAM,SAAS;uBAWD;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;aAClC,SAAS,OAAO;mBACV,MAAM,SAAS;aACrB,MAAM;IACf,wDAAwD;wBAEjD,qBAAqB,gBACZ,wBAAwB,KACnC,OAAO,GAAG,SAAS;qBACR,qBAAqB,KAAK,IAAI;yBAC1B,qBAAqB,KAAK,IAAI;uBAC/B,MAAM,KAAK,IAAI;;iBAkEnC,CAAC"} \ No newline at end of file diff --git a/lib/typescript/components/index.d.ts b/lib/typescript/components/index.d.ts new file mode 100644 index 00000000..dbcaedec --- /dev/null +++ b/lib/typescript/components/index.d.ts @@ -0,0 +1,2 @@ +export { AnimatedTouchFeedback } from './AnimatedTouchFeedback'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/lib/typescript/components/index.d.ts.map b/lib/typescript/components/index.d.ts.map new file mode 100644 index 00000000..7c9cccd5 --- /dev/null +++ b/lib/typescript/components/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"} \ No newline at end of file diff --git a/lib/typescript/debugHelper/index.d.ts b/lib/typescript/debugHelper/index.d.ts new file mode 100644 index 00000000..3d20405e --- /dev/null +++ b/lib/typescript/debugHelper/index.d.ts @@ -0,0 +1,13 @@ +export declare const DebugTouchPoint: ({ diameter, x, y, color, }: { + diameter?: number | undefined; + x?: number | undefined; + y?: number | undefined; + color?: string | undefined; +}) => JSX.Element; +export declare const DebugRect: ({ height, x, y, color, }: { + height: number; + x: number; + y: number; + color: string; +}) => JSX.Element; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/lib/typescript/debugHelper/index.d.ts.map b/lib/typescript/debugHelper/index.d.ts.map new file mode 100644 index 00000000..a2a282f7 --- /dev/null +++ b/lib/typescript/debugHelper/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/debugHelper/index.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe;;;;;iBAuB3B,CAAC;AACF,eAAO,MAAM,SAAS;YAMZ,MAAM;OACX,MAAM;OACN,MAAM;WACF,MAAM;iBAkBd,CAAC"} \ No newline at end of file diff --git a/lib/typescript/helper/applyPanBoundariesToOffset.d.ts b/lib/typescript/helper/applyPanBoundariesToOffset.d.ts new file mode 100644 index 00000000..1fdb93d2 --- /dev/null +++ b/lib/typescript/helper/applyPanBoundariesToOffset.d.ts @@ -0,0 +1,15 @@ +/** + * Takes a single offset value and calculates the correct offset value + * to make sure it's within the pan boundaries + * + * + * @param offsetScaled + * @param containerSize + * @param contentSize + * @param scale + * @param boundaryPadding - see README + * + * @returns {number} + */ +export declare function applyPanBoundariesToOffset(offsetScaled: number, containerSize: number, contentSize: number, scale: number, boundaryPadding: number): number; +//# sourceMappingURL=applyPanBoundariesToOffset.d.ts.map \ No newline at end of file diff --git a/lib/typescript/helper/applyPanBoundariesToOffset.d.ts.map b/lib/typescript/helper/applyPanBoundariesToOffset.d.ts.map new file mode 100644 index 00000000..89a116ff --- /dev/null +++ b/lib/typescript/helper/applyPanBoundariesToOffset.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"applyPanBoundariesToOffset.d.ts","sourceRoot":"","sources":["../../../src/helper/applyPanBoundariesToOffset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,CACxC,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,eAAe,EAAE,MAAM,UAoDxB"} \ No newline at end of file diff --git a/lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts b/lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts new file mode 100644 index 00000000..7503b339 --- /dev/null +++ b/lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts @@ -0,0 +1,52 @@ +/** + * Calculates the new offset for the zoomSubject to ensure zoom center position is retained after zooming. + * Parameters should correspond to whether we need the offset for the X or Y axis + * + * ## Terms Used: + * + * - Zoom Subject: the view that's being zoomed and panned + * - Zoom Center: the point whose relative position to the window is retained + * - Unscaled: a measurement in pixels denoting the true size as observed by the users' eyes + * - Scaled: a measurement in pixels scaled to the "scale transformation" of the zoom subject to match with its true size. + * *For example:* + * If the scale on the zoom subject is 0.5, + * then to draw an actual 4px line on the zoom subject, we need to scale it to 4px / 0.5 = 8px + * 8px is the scaled measurement + * + * ## Overall idea of this algorithm: + * + * When users perform zooming by pinching the screen, + * we need to shift the zoom subject so that the position of the zoom center is always the same. + * The offset amount to shift the layer is the returned value. + * + * + * ## How we achieve our goal: + * + * To retain, the zoom center position, whenever a zoom action is performed, + * we just need to make sure the distances from all the points in the zoom subject + * to the zoom center increases or decreases by the growth rate of the scale. + * + * ``` + * newDistanceAnyPointToZoomCenter = oldDistanceAnyPointToZoomCenter * (newScale/oldScale) + * ``` + * + * We can't calculate that for all the points because there are unlimited points on a plain. + * However, due to the way `transform` works in RN, every point is scaled from the zoom subject center. + * Therefore, it's sufficient to base our calculation on the distance from the zoom subject center to the zoom center. + * + * ``` + * newDistanceZoomSubjectCenterToZoomCenter = oldDistanceZoomSubjectCenterToZoomCenter * (newScale/oldScale) + * ``` + * + * Once we have `newDistanceZoomSubjectCenterToZoomCenter`, + * we can easily calculate the position of the new center, which leads us to the offset amount. + * Refer to the code for more details + * + * @param oldOffsetXOrYScaled + * @param zoomSubjectOriginalWidthOrHeight + * @param oldScale + * @param newScale + * @param zoomCenterXOrY + */ +export declare function calcNewScaledOffsetForZoomCentering(oldOffsetXOrYScaled: number, zoomSubjectOriginalWidthOrHeight: number, oldScale: number, newScale: number, zoomCenterXOrY: number): number; +//# sourceMappingURL=calcNewScaledOffsetForZoomCentering.d.ts.map \ No newline at end of file diff --git a/lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts.map b/lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts.map new file mode 100644 index 00000000..4ffc3f50 --- /dev/null +++ b/lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"calcNewScaledOffsetForZoomCentering.d.ts","sourceRoot":"","sources":["../../../src/helper/calcNewScaledOffsetForZoomCentering.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAgB,mCAAmC,CACjD,mBAAmB,EAAE,MAAM,EAC3B,gCAAgC,EAAE,MAAM,EACxC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,UAyBvB"} \ No newline at end of file diff --git a/lib/typescript/helper/coordinateConversion.d.ts b/lib/typescript/helper/coordinateConversion.d.ts new file mode 100644 index 00000000..c8bfdc0b --- /dev/null +++ b/lib/typescript/helper/coordinateConversion.d.ts @@ -0,0 +1,44 @@ +import { Size2D, Vec2D, ZoomableViewEvent } from 'src/typings'; +export declare const defaultTransformSubjectData: ZoomableViewEvent; +/** + * Assuming you have an image that's being resized to fit into a container + * using the "contain" resize mode. You can use this function to calculate the + * size of the image after fitting. + * + * Since our sheet is resized in this manner, we need this function + * for things like pan boundaries and marker placement + * + * @param imgSize + * @param containerSize + */ +export declare function applyContainResizeMode(imgSize: Size2D, containerSize: Size2D): { + size: Size2D; + scale: number; +} | { + size: null; + scale: null; +}; +/** + * get the coord of image's origin relative to the transformSubject + * @param resizedImageSize + * @param transformSubject + */ +export declare function getImageOriginOnTransformSubject(resizedImageSize: Size2D, transformSubject: ZoomableViewEvent): { + x: number; + y: number; +}; +/** + * Translates the coord system of a point from the viewport's space to the image's space + * + * @param pointOnContainer + * @param sheetImageSize + * @param transformSubject + * + * @return {Vec2D} returns null if point is out of the sheet's bound + */ +export declare function viewportPositionToImagePosition({ viewportPosition, imageSize, zoomableEvent, }: { + viewportPosition: Vec2D; + imageSize: Size2D; + zoomableEvent: ZoomableViewEvent; +}): Vec2D | null; +//# sourceMappingURL=coordinateConversion.d.ts.map \ No newline at end of file diff --git a/lib/typescript/helper/coordinateConversion.d.ts.map b/lib/typescript/helper/coordinateConversion.d.ts.map new file mode 100644 index 00000000..c43dfee5 --- /dev/null +++ b/lib/typescript/helper/coordinateConversion.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"coordinateConversion.d.ts","sourceRoot":"","sources":["../../../src/helper/coordinateConversion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE/D,eAAO,MAAM,2BAA2B,EAAE,iBAQzC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,GACpB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,IAAI,CAAA;CAAE,CA4B/D;AAED;;;;GAIG;AACH,wBAAgB,gCAAgC,CAC9C,gBAAgB,EAAE,MAAM,EACxB,gBAAgB,EAAE,iBAAiB;;;EAcpC;AAED;;;;;;;;GAQG;AACH,wBAAgB,+BAA+B,CAAC,EAC9C,gBAAgB,EAChB,SAAS,EACT,aAAa,GACd,EAAE;IACD,gBAAgB,EAAE,KAAK,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,iBAAiB,CAAC;CAClC,GAAG,KAAK,GAAG,IAAI,CA0Bf"} \ No newline at end of file diff --git a/lib/typescript/helper/index.d.ts b/lib/typescript/helper/index.d.ts new file mode 100644 index 00000000..bc85ca36 --- /dev/null +++ b/lib/typescript/helper/index.d.ts @@ -0,0 +1,17 @@ +import { GestureResponderEvent, PanResponderGestureState } from 'react-native'; +import { Vec2D } from '../typings'; +export { calcNewScaledOffsetForZoomCentering } from './calcNewScaledOffsetForZoomCentering'; +/** + * Calculates the gesture center point relative to the page coordinate system + * + * We're unable to use touch.locationX/Y + * because locationX uses the axis system of the leaf element that the touch occurs on, + * which makes it even more complicated to translate into our container's axis system. + * + * We're also unable to use gestureState.moveX/Y + * because gestureState.moveX/Y is messed up on real device + * (Sometimes it's the center point, but sometimes it randomly takes the position of one of the touches) + */ +export declare function calcGestureCenterPoint(e: GestureResponderEvent, gestureState: PanResponderGestureState): Vec2D | null; +export declare function calcGestureTouchDistance(e: GestureResponderEvent, gestureState: PanResponderGestureState): number | null; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/lib/typescript/helper/index.d.ts.map b/lib/typescript/helper/index.d.ts.map new file mode 100644 index 00000000..fe427587 --- /dev/null +++ b/lib/typescript/helper/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAE/E,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAE5F;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACpC,CAAC,EAAE,qBAAqB,EACxB,YAAY,EAAE,wBAAwB,GACrC,KAAK,GAAG,IAAI,CAmBd;AAED,wBAAgB,wBAAwB,CACtC,CAAC,EAAE,qBAAqB,EACxB,YAAY,EAAE,wBAAwB,GACrC,MAAM,GAAG,IAAI,CAQf"} \ No newline at end of file diff --git a/lib/typescript/index.d.ts b/lib/typescript/index.d.ts new file mode 100644 index 00000000..7b02103f --- /dev/null +++ b/lib/typescript/index.d.ts @@ -0,0 +1,5 @@ +import { applyContainResizeMode, getImageOriginOnTransformSubject, viewportPositionToImagePosition } from './helper/coordinateConversion'; +import ReactNativeZoomableView from './ReactNativeZoomableView'; +import type { ReactNativeZoomableViewProps, ZoomableViewEvent } from './typings'; +export { applyContainResizeMode, getImageOriginOnTransformSubject, ReactNativeZoomableView, ReactNativeZoomableViewProps, viewportPositionToImagePosition, ZoomableViewEvent, }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/lib/typescript/index.d.ts.map b/lib/typescript/index.d.ts.map new file mode 100644 index 00000000..2a3655b0 --- /dev/null +++ b/lib/typescript/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EAChC,+BAA+B,EAChC,MAAM,+BAA+B,CAAC;AACvC,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EACV,4BAA4B,EAC5B,iBAAiB,EAClB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAEL,sBAAsB,EACtB,gCAAgC,EAChC,uBAAuB,EACvB,4BAA4B,EAC5B,+BAA+B,EAC/B,iBAAiB,GAClB,CAAC"} \ No newline at end of file diff --git a/lib/typescript/typings/index.d.ts b/lib/typescript/typings/index.d.ts new file mode 100644 index 00000000..62d2b238 --- /dev/null +++ b/lib/typescript/typings/index.d.ts @@ -0,0 +1,111 @@ +import { ReactNode } from 'react'; +import { Animated, GestureResponderEvent, LayoutChangeEvent, PanResponderGestureState, ViewProps } from 'react-native'; +export declare enum SwipeDirection { + SWIPE_UP = "SWIPE_UP", + SWIPE_DOWN = "SWIPE_DOWN", + SWIPE_LEFT = "SWIPE_LEFT", + SWIPE_RIGHT = "SWIPE_RIGHT" +} +export interface ZoomableViewEvent { + zoomLevel: number; + offsetX: number; + offsetY: number; + originalHeight: number; + originalWidth: number; + originalPageX: number; + originalPageY: number; +} +export interface ReactNativeZoomableViewProps { + style?: ViewProps['style']; + children?: ReactNode; + zoomEnabled?: boolean; + panEnabled?: boolean; + initialZoom?: number; + initialOffsetX?: number; + initialOffsetY?: number; + contentWidth?: number; + contentHeight?: number; + panBoundaryPadding?: number; + maxZoom?: number; + minZoom?: number; + doubleTapDelay?: number; + doubleTapZoomToCenter?: boolean; + bindToBorders?: boolean; + zoomStep?: number; + pinchToZoomInSensitivity?: number; + pinchToZoomOutSensitivity?: number; + movementSensibility?: number; + longPressDuration?: number; + visualTouchFeedbackEnabled?: boolean; + disablePanOnInitialZoom?: boolean; + zoomAnimatedValue?: Animated.Value; + panAnimatedValueXY?: Animated.ValueXY; + debug?: boolean; + onLayout?: (event: Pick) => void; + onTransform?: (zoomableViewEventObject: ZoomableViewEvent) => void; + onSingleTap?: (event: GestureResponderEvent, zoomableViewEventObject: ZoomableViewEvent) => void; + onDoubleTapBefore?: (event: GestureResponderEvent, zoomableViewEventObject: ZoomableViewEvent) => void; + onDoubleTapAfter?: (event: GestureResponderEvent, zoomableViewEventObject: ZoomableViewEvent) => void; + onShiftingBefore?: (event: GestureResponderEvent | null, gestureState: PanResponderGestureState | null, zoomableViewEventObject: ZoomableViewEvent) => boolean; + onShiftingAfter?: (event: GestureResponderEvent | null, gestureState: PanResponderGestureState | null, zoomableViewEventObject: ZoomableViewEvent) => boolean; + onShiftingEnd?: (event: GestureResponderEvent, gestureState: PanResponderGestureState, zoomableViewEventObject: ZoomableViewEvent) => void; + onZoomBefore?: (event: GestureResponderEvent | null, gestureState: PanResponderGestureState | null, zoomableViewEventObject: ZoomableViewEvent) => boolean | undefined; + onZoomAfter?: (event: GestureResponderEvent | null, gestureState: PanResponderGestureState | null, zoomableViewEventObject: ZoomableViewEvent) => void; + onZoomEnd?: (event: GestureResponderEvent, gestureState: PanResponderGestureState, zoomableViewEventObject: ZoomableViewEvent) => void; + onLongPress?: (event: GestureResponderEvent, gestureState: PanResponderGestureState, zoomableViewEventObject: ZoomableViewEvent) => void; + onStartShouldSetPanResponder?: (event: GestureResponderEvent, gestureState: PanResponderGestureState, zoomableViewEventObject: ZoomableViewEvent, baseComponentResult: boolean) => boolean; + onPanResponderGrant?: (event: GestureResponderEvent, gestureState: PanResponderGestureState, zoomableViewEventObject: ZoomableViewEvent) => void; + onPanResponderEnd?: (event: GestureResponderEvent, gestureState: PanResponderGestureState, zoomableViewEventObject: ZoomableViewEvent) => void; + onPanResponderMove?: (event: GestureResponderEvent, gestureState: PanResponderGestureState, zoomableViewEventObject: ZoomableViewEvent) => boolean; + onPanResponderTerminate?: (event: GestureResponderEvent, gestureState: PanResponderGestureState, zoomableViewEventObject: ZoomableViewEvent) => void; + onPanResponderTerminationRequest?: (event: GestureResponderEvent, gestureState: PanResponderGestureState, zoomableViewEventObject: ZoomableViewEvent) => boolean; + onShouldBlockNativeResponder?: (event: GestureResponderEvent, gestureState: PanResponderGestureState, zoomableViewEventObject: ZoomableViewEvent) => boolean; + onStartShouldSetPanResponderCapture?: (event: GestureResponderEvent, gestureState: PanResponderGestureState) => boolean; + onMoveShouldSetPanResponderCapture?: (event: GestureResponderEvent, gestureState: PanResponderGestureState) => boolean; + onStaticPinPress?: (event: GestureResponderEvent) => void; + onStaticPinLongPress?: (event: GestureResponderEvent) => void; + staticPinPosition?: Vec2D; + staticPinIcon?: React.ReactElement; + onStaticPinPositionChange?: (position: Vec2D) => void; + onStaticPinPositionMove?: (position: Vec2D) => void; + animatePin: boolean; + pinProps?: ViewProps; + disableMomentum?: boolean; +} +export interface Vec2D { + x: number; + y: number; +} +export interface Size2D { + width: number; + height: number; +} +export interface TouchPoint extends Vec2D { + id: string; + isSecondTap?: boolean; +} +export interface ReactNativeZoomableViewState { + touches?: TouchPoint[]; + originalWidth: number; + originalHeight: number; + originalPageX: number; + originalPageY: number; + originalX: number; + originalY: number; + debugPoints?: undefined | Vec2D[]; + pinSize: Size2D; +} +export interface ReactNativeZoomableViewWithGesturesProps extends ReactNativeZoomableViewProps { + swipeLengthThreshold?: number; + swipeVelocityThreshold?: number; + swipeDirectionalThreshold?: number; + swipeMinZoom?: number; + swipeMaxZoom?: number; + swipeDisabled?: boolean; + onSwipe?: (swipeDirection: SwipeDirection, gestureState: PanResponderGestureState) => void; + onSwipeUp?: (gestureState: PanResponderGestureState) => void; + onSwipeDown?: (gestureState: PanResponderGestureState) => void; + onSwipeLeft?: (gestureState: PanResponderGestureState) => void; + onSwipeRight?: (gestureState: PanResponderGestureState) => void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/lib/typescript/typings/index.d.ts.map b/lib/typescript/typings/index.d.ts.map new file mode 100644 index 00000000..6023f500 --- /dev/null +++ b/lib/typescript/typings/index.d.ts.map @@ -0,0 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AAO,CAAC,EAAE,UAAU,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,GAAG,KAAK,EAAE,CAAC;IAClC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,wCACf,SAAQ,4BAA4B;IACpC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,CACR,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,wBAAwB,KACnC,IAAI,CAAC;IACV,SAAS,CAAC,EAAE,CAAC,YAAY,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC7D,WAAW,CAAC,EAAE,CAAC,YAAY,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC/D,WAAW,CAAC,EAAE,CAAC,YAAY,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC/D,YAAY,CAAC,EAAE,CAAC,YAAY,EAAE,wBAAwB,KAAK,IAAI,CAAC;CACjE"} \ No newline at end of file diff --git a/package.json b/package.json index 32ce095e..cb0f7c38 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ }, "husky": { "hooks": { - "pre-commit": "yarn lint && yarn typescript" + "pre-commit": "yarn lint && yarn typescript && bob build && git add lib" } }, "commitlint": { From 2fbd1810a569eecba7e2b57f3a6768ac8f857e36 Mon Sep 17 00:00:00 2001 From: thomasvo Date: Tue, 31 Mar 2026 18:38:29 -0700 Subject: [PATCH 11/20] Skip PR label check for Dependabot PRs Dependabot PRs are excluded from release notes via release.yml authors field, so they don't need changelog labels. Without this, Dependabot PRs would be blocked by the required-labels check. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/pr-labels.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index 755f8293..b3ae5efd 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -7,6 +7,7 @@ on: jobs: check-labels: runs-on: ubuntu-latest + if: github.actor != 'dependabot[bot]' steps: - uses: actions/checkout@v4 From 828869dd13352f401c296b6dd5f0eea2b8b6b1ae Mon Sep 17 00:00:00 2001 From: thomasvo Date: Mon, 13 Apr 2026 15:23:18 -0700 Subject: [PATCH 12/20] Strip lib/ build artifacts made redundant by #158 PR #158 removed checked-in lib/ and added it to .gitignore. These remaining tracked files are now redundant. --- lib/commonjs/package.json | 1 - lib/module/package.json | 1 - lib/typescript/ReactNativeZoomableView.d.ts.map | 1 - lib/typescript/animations/index.d.ts.map | 1 - lib/typescript/components/AnimatedTouchFeedback.d.ts.map | 1 - lib/typescript/components/StaticPin.d.ts.map | 1 - lib/typescript/components/index.d.ts.map | 1 - lib/typescript/debugHelper/index.d.ts.map | 1 - lib/typescript/helper/applyPanBoundariesToOffset.d.ts.map | 1 - .../helper/calcNewScaledOffsetForZoomCentering.d.ts.map | 1 - lib/typescript/helper/coordinateConversion.d.ts.map | 1 - lib/typescript/helper/index.d.ts.map | 1 - lib/typescript/index.d.ts.map | 1 - lib/typescript/typings/index.d.ts.map | 1 - 14 files changed, 14 deletions(-) delete mode 100644 lib/commonjs/package.json delete mode 100644 lib/module/package.json delete mode 100644 lib/typescript/ReactNativeZoomableView.d.ts.map delete mode 100644 lib/typescript/animations/index.d.ts.map delete mode 100644 lib/typescript/components/AnimatedTouchFeedback.d.ts.map delete mode 100644 lib/typescript/components/StaticPin.d.ts.map delete mode 100644 lib/typescript/components/index.d.ts.map delete mode 100644 lib/typescript/debugHelper/index.d.ts.map delete mode 100644 lib/typescript/helper/applyPanBoundariesToOffset.d.ts.map delete mode 100644 lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts.map delete mode 100644 lib/typescript/helper/coordinateConversion.d.ts.map delete mode 100644 lib/typescript/helper/index.d.ts.map delete mode 100644 lib/typescript/index.d.ts.map delete mode 100644 lib/typescript/typings/index.d.ts.map diff --git a/lib/commonjs/package.json b/lib/commonjs/package.json deleted file mode 100644 index 729ac4d9..00000000 --- a/lib/commonjs/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"commonjs"} diff --git a/lib/module/package.json b/lib/module/package.json deleted file mode 100644 index 089153bc..00000000 --- a/lib/module/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"module"} diff --git a/lib/typescript/ReactNativeZoomableView.d.ts.map b/lib/typescript/ReactNativeZoomableView.d.ts.map deleted file mode 100644 index 16895c24..00000000 --- a/lib/typescript/ReactNativeZoomableView.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ReactNativeZoomableView.d.ts","sourceRoot":"","sources":["../../src/ReactNativeZoomableView.tsx"],"names":[],"mappings":";AACA,OAAc,EAAE,SAAS,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAGL,qBAAqB,EAErB,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EAEpB,IAAI,EACL,MAAM,cAAc,CAAC;AAiBtB,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAG5B,KAAK,EACL,iBAAiB,EAClB,MAAM,WAAW,CAAC;AAYnB,cAAM,uBAAwB,SAAQ,SAAS,CAC7C,4BAA4B,EAC5B,4BAA4B,CAC7B;IACC,qBAAqB,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;IACvC,eAAe,EAAE,oBAAoB,CAAC;IACtC,iCAAiC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEtD,MAAM,CAAC,YAAY;;;;;;;;;;;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a,EAAE,MAAM;IASnD,MAAM;CA8EP;AAkBD,eAAe,uBAAuB,CAAC;AAEvC,OAAO,EAAE,uBAAuB,EAAE,CAAC"} \ No newline at end of file diff --git a/lib/typescript/animations/index.d.ts.map b/lib/typescript/animations/index.d.ts.map deleted file mode 100644 index 74cb9256..00000000 --- a/lib/typescript/animations/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/animations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAU,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,QAAQ,CAAC,KAAK,EACzB,OAAO,EAAE,MAAM,+BAOhB;AAED,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,OAAO,EAC5C,QAAQ,EAAE,MAAM,GAAG,KAAK,+BAOzB;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,+BAM5E"} \ No newline at end of file diff --git a/lib/typescript/components/AnimatedTouchFeedback.d.ts.map b/lib/typescript/components/AnimatedTouchFeedback.d.ts.map deleted file mode 100644 index e169ac3c..00000000 --- a/lib/typescript/components/AnimatedTouchFeedback.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AnimatedTouchFeedback.d.ts","sourceRoot":"","sources":["../../../src/components/AnimatedTouchFeedback.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB;OAO7B,MAAM;OACN,MAAM;uBACU,MAAM;;6BAED,IAAI;iBAmD7B,CAAC"} \ No newline at end of file diff --git a/lib/typescript/components/StaticPin.d.ts.map b/lib/typescript/components/StaticPin.d.ts.map deleted file mode 100644 index f02c857e..00000000 --- a/lib/typescript/components/StaticPin.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StaticPin.d.ts","sourceRoot":"","sources":["../../../src/components/StaticPin.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,QAAQ,EACR,qBAAqB,EAGrB,wBAAwB,EAGxB,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,eAAO,MAAM,SAAS;uBAWD;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;aAClC,SAAS,OAAO;mBACV,MAAM,SAAS;aACrB,MAAM;IACf,wDAAwD;wBAEjD,qBAAqB,gBACZ,wBAAwB,KACnC,OAAO,GAAG,SAAS;qBACR,qBAAqB,KAAK,IAAI;yBAC1B,qBAAqB,KAAK,IAAI;uBAC/B,MAAM,KAAK,IAAI;;iBAkEnC,CAAC"} \ No newline at end of file diff --git a/lib/typescript/components/index.d.ts.map b/lib/typescript/components/index.d.ts.map deleted file mode 100644 index 7c9cccd5..00000000 --- a/lib/typescript/components/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"} \ No newline at end of file diff --git a/lib/typescript/debugHelper/index.d.ts.map b/lib/typescript/debugHelper/index.d.ts.map deleted file mode 100644 index a2a282f7..00000000 --- a/lib/typescript/debugHelper/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/debugHelper/index.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe;;;;;iBAuB3B,CAAC;AACF,eAAO,MAAM,SAAS;YAMZ,MAAM;OACX,MAAM;OACN,MAAM;WACF,MAAM;iBAkBd,CAAC"} \ No newline at end of file diff --git a/lib/typescript/helper/applyPanBoundariesToOffset.d.ts.map b/lib/typescript/helper/applyPanBoundariesToOffset.d.ts.map deleted file mode 100644 index 89a116ff..00000000 --- a/lib/typescript/helper/applyPanBoundariesToOffset.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"applyPanBoundariesToOffset.d.ts","sourceRoot":"","sources":["../../../src/helper/applyPanBoundariesToOffset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,CACxC,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,eAAe,EAAE,MAAM,UAoDxB"} \ No newline at end of file diff --git a/lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts.map b/lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts.map deleted file mode 100644 index 4ffc3f50..00000000 --- a/lib/typescript/helper/calcNewScaledOffsetForZoomCentering.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"calcNewScaledOffsetForZoomCentering.d.ts","sourceRoot":"","sources":["../../../src/helper/calcNewScaledOffsetForZoomCentering.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAgB,mCAAmC,CACjD,mBAAmB,EAAE,MAAM,EAC3B,gCAAgC,EAAE,MAAM,EACxC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,UAyBvB"} \ No newline at end of file diff --git a/lib/typescript/helper/coordinateConversion.d.ts.map b/lib/typescript/helper/coordinateConversion.d.ts.map deleted file mode 100644 index c43dfee5..00000000 --- a/lib/typescript/helper/coordinateConversion.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"coordinateConversion.d.ts","sourceRoot":"","sources":["../../../src/helper/coordinateConversion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE/D,eAAO,MAAM,2BAA2B,EAAE,iBAQzC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,GACpB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,IAAI,CAAA;CAAE,CA4B/D;AAED;;;;GAIG;AACH,wBAAgB,gCAAgC,CAC9C,gBAAgB,EAAE,MAAM,EACxB,gBAAgB,EAAE,iBAAiB;;;EAcpC;AAED;;;;;;;;GAQG;AACH,wBAAgB,+BAA+B,CAAC,EAC9C,gBAAgB,EAChB,SAAS,EACT,aAAa,GACd,EAAE;IACD,gBAAgB,EAAE,KAAK,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,iBAAiB,CAAC;CAClC,GAAG,KAAK,GAAG,IAAI,CA0Bf"} \ No newline at end of file diff --git a/lib/typescript/helper/index.d.ts.map b/lib/typescript/helper/index.d.ts.map deleted file mode 100644 index fe427587..00000000 --- a/lib/typescript/helper/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAE/E,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAE5F;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACpC,CAAC,EAAE,qBAAqB,EACxB,YAAY,EAAE,wBAAwB,GACrC,KAAK,GAAG,IAAI,CAmBd;AAED,wBAAgB,wBAAwB,CACtC,CAAC,EAAE,qBAAqB,EACxB,YAAY,EAAE,wBAAwB,GACrC,MAAM,GAAG,IAAI,CAQf"} \ No newline at end of file diff --git a/lib/typescript/index.d.ts.map b/lib/typescript/index.d.ts.map deleted file mode 100644 index 2a3655b0..00000000 --- a/lib/typescript/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EAChC,+BAA+B,EAChC,MAAM,+BAA+B,CAAC;AACvC,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EACV,4BAA4B,EAC5B,iBAAiB,EAClB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAEL,sBAAsB,EACtB,gCAAgC,EAChC,uBAAuB,EACvB,4BAA4B,EAC5B,+BAA+B,EAC/B,iBAAiB,GAClB,CAAC"} \ No newline at end of file diff --git a/lib/typescript/typings/index.d.ts.map b/lib/typescript/typings/index.d.ts.map deleted file mode 100644 index 6023f500..00000000 --- a/lib/typescript/typings/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/typings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EACL,QAAQ,EACR,qBAAqB,EACrB,iBAAiB,EACjB,wBAAwB,EACxB,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,oBAAY,cAAc;IACxB,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,WAAW,gBAAgB;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAA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M,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,CACR,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,wBAAwB,KACnC,IAAI,CAAC;IACV,SAAS,CAAC,EAAE,CAAC,YAAY,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC7D,WAAW,CAAC,EAAE,CAAC,YAAY,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC/D,WAAW,CAAC,EAAE,CAAC,YAAY,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC/D,YAAY,CAAC,EAAE,CAAC,YAAY,EAAE,wBAAwB,KAAK,IAAI,CAAC;CACjE"} \ No newline at end of file From a7e7c1ba71b06fdc2a096d19ff64dd172c16069b Mon Sep 17 00:00:00 2001 From: thomasvo Date: Mon, 13 Apr 2026 15:42:10 -0700 Subject: [PATCH 13/20] fix: upgrade release-it to v15+ for autoGenerate support and include exclude labels in PR check - Upgrade release-it from ^14.2.2 to ^15.0.0 so the autoGenerate option is recognized and passes generate_release_notes to the GitHub API - Extract exclude labels (ignore-for-release, dependencies) in pr-labels workflow so PRs with those labels pass the required-labels check Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/pr-labels.yml | 7 +- package.json | 2 +- yarn.lock | 2641 ++++++++++++++++++++++--------- 3 files changed, 1889 insertions(+), 761 deletions(-) diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index b3ae5efd..d69ed703 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -14,8 +14,13 @@ jobs: - name: Extract valid labels from release.yml id: extract-labels run: | - labels=$(yq eval '.changelog.categories[].labels[]' .github/release.yml) + # Extract category labels and exclude labels so PRs labeled with + # ignore-for-release or dependencies also pass the check + category_labels=$(yq eval '.changelog.categories[].labels[]' .github/release.yml) + exclude_labels=$(yq eval '.changelog.exclude.labels[]' .github/release.yml 2>/dev/null) + labels=$(printf '%s\n%s' "$category_labels" "$exclude_labels") labels=$(echo "$labels" | grep -v '^\*$') # Remove wildcard entries (*) + labels=$(echo "$labels" | grep -v '^$') # Remove empty lines labels=$(echo "$labels" | tr '\n' ',') # Convert newlines to commas labels=$(echo "$labels" | sed 's/,$//') # Remove trailing comma echo "labels=$labels" >> $GITHUB_OUTPUT diff --git a/package.json b/package.json index 81090fe9..6a0b6f34 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "react": "17.0.2", "react-native": "0.79.7", "react-native-builder-bob": "^0.30.0", - "release-it": "^14.2.2", + "release-it": "^15.0.0", "typescript": "^4.9.5" }, "peerDependencies": { diff --git a/yarn.lock b/yarn.lock index 36346fca..158cb412 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1762,106 +1762,137 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@octokit/auth-token@^2.4.4": - version "2.5.0" - resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.5.0.tgz#27c37ea26c205f28443402477ffd261311f21e36" - integrity sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g== - dependencies: - "@octokit/types" "^6.0.3" - -"@octokit/core@^3.5.1": - version "3.5.1" - resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.5.1.tgz#8601ceeb1ec0e1b1b8217b960a413ed8e947809b" - integrity sha512-omncwpLVxMP+GLpLPgeGJBF6IWJFjXDS5flY5VbppePYX9XehevbDykRH9PdCdvqt9TS5AOTiDide7h0qrkHjw== - dependencies: - "@octokit/auth-token" "^2.4.4" - "@octokit/graphql" "^4.5.8" - "@octokit/request" "^5.6.0" - "@octokit/request-error" "^2.0.5" - "@octokit/types" "^6.0.3" +"@octokit/auth-token@^3.0.0": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-3.0.4.tgz#70e941ba742bdd2b49bdb7393e821dea8520a3db" + integrity sha512-TWFX7cZF2LXoCvdmJWY7XVPi74aSY0+FfBZNSXEXFkMpjcqsQwDSYVv5FhRFaI0V1ECnwbz4j59T/G+rXNWaIQ== + +"@octokit/core@^4.2.1": + version "4.2.4" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-4.2.4.tgz#d8769ec2b43ff37cc3ea89ec4681a20ba58ef907" + integrity sha512-rYKilwgzQ7/imScn3M9/pFfUf4I1AZEH3KhyJmtPdE2zfaXAn2mFfUy4FbKewzc2We5y/LlKLj36fWJLKC2SIQ== + dependencies: + "@octokit/auth-token" "^3.0.0" + "@octokit/graphql" "^5.0.0" + "@octokit/request" "^6.0.0" + "@octokit/request-error" "^3.0.0" + "@octokit/types" "^9.0.0" before-after-hook "^2.2.0" universal-user-agent "^6.0.0" -"@octokit/endpoint@^6.0.1": - version "6.0.12" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.12.tgz#3b4d47a4b0e79b1027fb8d75d4221928b2d05658" - integrity sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA== +"@octokit/endpoint@^7.0.0": + version "7.0.6" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-7.0.6.tgz#791f65d3937555141fb6c08f91d618a7d645f1e2" + integrity sha512-5L4fseVRUsDFGR00tMWD/Trdeeihn999rTMGRMC1G/Ldi1uWlWJzI98H4Iak5DB/RVvQuyMYKqSK/R6mbSOQyg== dependencies: - "@octokit/types" "^6.0.3" + "@octokit/types" "^9.0.0" is-plain-object "^5.0.0" universal-user-agent "^6.0.0" -"@octokit/graphql@^4.5.8": - version "4.8.0" - resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.8.0.tgz#664d9b11c0e12112cbf78e10f49a05959aa22cc3" - integrity sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg== +"@octokit/graphql@^5.0.0": + version "5.0.6" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-5.0.6.tgz#9eac411ac4353ccc5d3fca7d76736e6888c5d248" + integrity sha512-Fxyxdy/JH0MnIB5h+UQ3yCoh1FG4kWXfFKkpWqjZHw/p+Kc8Y44Hu/kCgNBT6nU1shNumEchmW/sUO1JuQnPcw== dependencies: - "@octokit/request" "^5.6.0" - "@octokit/types" "^6.0.3" + "@octokit/request" "^6.0.0" + "@octokit/types" "^9.0.0" universal-user-agent "^6.0.0" -"@octokit/openapi-types@^11.2.0": - version "11.2.0" - resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-11.2.0.tgz#b38d7fc3736d52a1e96b230c1ccd4a58a2f400a6" - integrity sha512-PBsVO+15KSlGmiI8QAzaqvsNlZlrDlyAJYcrXBCvVUxCp7VnXjkwPoFHgjEJXx3WF9BAwkA6nfCUA7i9sODzKA== +"@octokit/openapi-types@^18.0.0": + version "18.1.1" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-18.1.1.tgz#09bdfdabfd8e16d16324326da5148010d765f009" + integrity sha512-VRaeH8nCDtF5aXWnjPuEMIYf1itK/s3JYyJcWFJT8X9pSNnBtriDf7wlEWsGuhPLl4QIH4xM8fqTXDwJ3Mu6sw== -"@octokit/plugin-paginate-rest@^2.16.0": - version "2.17.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.17.0.tgz#32e9c7cab2a374421d3d0de239102287d791bce7" - integrity sha512-tzMbrbnam2Mt4AhuyCHvpRkS0oZ5MvwwcQPYGtMv4tUa5kkzG58SVB0fcsLulOZQeRnOgdkZWkRUiyBlh0Bkyw== +"@octokit/plugin-paginate-rest@^6.1.2": + version "6.1.2" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.1.2.tgz#f86456a7a1fe9e58fec6385a85cf1b34072341f8" + integrity sha512-qhrmtQeHU/IivxucOV1bbI/xZyC/iOBhclokv7Sut5vnejAIAEXVcGQeRpQlU39E0WwK9lNvJHphHri/DB6lbQ== dependencies: - "@octokit/types" "^6.34.0" + "@octokit/tsconfig" "^1.0.2" + "@octokit/types" "^9.2.3" "@octokit/plugin-request-log@^1.0.4": version "1.0.4" resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz#5e50ed7083a613816b1e4a28aeec5fb7f1462e85" integrity sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA== -"@octokit/plugin-rest-endpoint-methods@^5.9.0": - version "5.13.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.13.0.tgz#8c46109021a3412233f6f50d28786f8e552427ba" - integrity sha512-uJjMTkN1KaOIgNtUPMtIXDOjx6dGYysdIFhgA52x4xSadQCz3b/zJexvITDVpANnfKPW/+E0xkOvLntqMYpviA== +"@octokit/plugin-rest-endpoint-methods@^7.1.2": + version "7.2.3" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-7.2.3.tgz#37a84b171a6cb6658816c82c4082ac3512021797" + integrity sha512-I5Gml6kTAkzVlN7KCtjOM+Ruwe/rQppp0QU372K1GP7kNOYEKe8Xn5BW4sE62JAHdwpq95OQK/qGNyKQMUzVgA== dependencies: - "@octokit/types" "^6.34.0" - deprecation "^2.3.1" + "@octokit/types" "^10.0.0" -"@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.1.0.tgz#9e150357831bfc788d13a4fd4b1913d60c74d677" - integrity sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg== +"@octokit/request-error@^3.0.0": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-3.0.3.tgz#ef3dd08b8e964e53e55d471acfe00baa892b9c69" + integrity sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ== dependencies: - "@octokit/types" "^6.0.3" + "@octokit/types" "^9.0.0" deprecation "^2.0.0" once "^1.4.0" -"@octokit/request@^5.6.0": - version "5.6.2" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.6.2.tgz#1aa74d5da7b9e04ac60ef232edd9a7438dcf32d8" - integrity sha512-je66CvSEVf0jCpRISxkUcCa0UkxmFs6eGDRSbfJtAVwbLH5ceqF+YEyC8lj8ystKyZTy8adWr0qmkY52EfOeLA== +"@octokit/request@^6.0.0": + version "6.2.8" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-6.2.8.tgz#aaf480b32ab2b210e9dadd8271d187c93171d8eb" + integrity sha512-ow4+pkVQ+6XVVsekSYBzJC0VTVvh/FCTUUgTsboGq+DTeWdyIFV8WSCdo0RIxk6wSkBTHqIK1mYuY7nOBXOchw== dependencies: - "@octokit/endpoint" "^6.0.1" - "@octokit/request-error" "^2.1.0" - "@octokit/types" "^6.16.1" + "@octokit/endpoint" "^7.0.0" + "@octokit/request-error" "^3.0.0" + "@octokit/types" "^9.0.0" is-plain-object "^5.0.0" - node-fetch "^2.6.1" + node-fetch "^2.6.7" universal-user-agent "^6.0.0" -"@octokit/rest@18.10.0": - version "18.10.0" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.10.0.tgz#8a0add9611253e0e31d3ed5b4bc941a3795a7648" - integrity sha512-esHR5OKy38bccL/sajHqZudZCvmv4yjovMJzyXlphaUo7xykmtOdILGJ3aAm0mFHmMLmPFmDMJXf39cAjNJsrw== +"@octokit/rest@19.0.11": + version "19.0.11" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-19.0.11.tgz#2ae01634fed4bd1fca5b642767205ed3fd36177c" + integrity sha512-m2a9VhaP5/tUw8FwfnW2ICXlXpLPIqxtg3XcAiGMLj/Xhw3RSBfZ8le/466ktO1Gcjr8oXudGnHhxV1TXJgFxw== dependencies: - "@octokit/core" "^3.5.1" - "@octokit/plugin-paginate-rest" "^2.16.0" + "@octokit/core" "^4.2.1" + "@octokit/plugin-paginate-rest" "^6.1.2" "@octokit/plugin-request-log" "^1.0.4" - "@octokit/plugin-rest-endpoint-methods" "^5.9.0" + "@octokit/plugin-rest-endpoint-methods" "^7.1.2" + +"@octokit/tsconfig@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@octokit/tsconfig/-/tsconfig-1.0.2.tgz#59b024d6f3c0ed82f00d08ead5b3750469125af7" + integrity sha512-I0vDR0rdtP8p2lGMzvsJzbhdOWy405HcGovrspJ8RRibHnyRgggUSNO5AIox5LmqiwmatHKYsvj6VGFHkqS7lA== + +"@octokit/types@^10.0.0": + version "10.0.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-10.0.0.tgz#7ee19c464ea4ada306c43f1a45d444000f419a4a" + integrity sha512-Vm8IddVmhCgU1fxC1eyinpwqzXPEYu0NrYzD3YZjlGjyftdLBTeqNblRC0jmJmgxbJIsQlyogVeGnrNaaMVzIg== + dependencies: + "@octokit/openapi-types" "^18.0.0" + +"@octokit/types@^9.0.0", "@octokit/types@^9.2.3": + version "9.3.2" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-9.3.2.tgz#3f5f89903b69f6a2d196d78ec35f888c0013cac5" + integrity sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA== + dependencies: + "@octokit/openapi-types" "^18.0.0" + +"@pnpm/config.env-replace@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz#ab29da53df41e8948a00f2433f085f54de8b3a4c" + integrity sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w== + +"@pnpm/network.ca-file@^1.0.1": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz#2ab05e09c1af0cdf2fcf5035bea1484e222f7983" + integrity sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA== + dependencies: + graceful-fs "4.2.10" -"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.34.0": - version "6.34.0" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.34.0.tgz#c6021333334d1ecfb5d370a8798162ddf1ae8218" - integrity sha512-s1zLBjWhdEI2zwaoSgyOFoKSl109CUcVBCc7biPJ3aAf6LGLU6szDvi31JPU7bxfla2lqfhjbbg/5DdFNxOwHw== +"@pnpm/npm-conf@^3.0.2": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@pnpm/npm-conf/-/npm-conf-3.0.2.tgz#857622421aa9bbf254e557b8a022c216a7928f47" + integrity sha512-h104Kh26rR8tm+a3Qkc5S4VLYint3FE48as7+/5oCEcKR2idC/pF1G6AhIXKI+eHPJa/3J9i5z0Al47IeGHPkA== dependencies: - "@octokit/openapi-types" "^11.2.0" + "@pnpm/config.env-replace" "^1.1.0" + "@pnpm/network.ca-file" "^1.0.1" + config-chain "^1.1.11" "@react-native/assets-registry@0.79.7": version "0.79.7" @@ -1969,15 +2000,10 @@ resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== -"@sindresorhus/is@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" - integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== - -"@sindresorhus/is@^4.0.0": - version "4.2.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.2.0.tgz#667bfc6186ae7c9e0b45a08960c551437176e1ca" - integrity sha512-VkE3KLBmJwcCaVARtQpfuKcKv8gcBmUubrfHGF84dXuuW6jgsRYxPtzcIhPyK9WAPpRt2/xY6zkD9MnRaJzSyw== +"@sindresorhus/is@^5.2.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-5.6.0.tgz#41dd6093d34652cddb5d5bdeee04eafc33826668" + integrity sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g== "@sinonjs/commons@^3.0.0": version "3.0.1" @@ -1993,19 +2019,12 @@ dependencies: "@sinonjs/commons" "^3.0.0" -"@szmarczak/http-timer@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" - integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== - dependencies: - defer-to-connect "^1.0.1" - -"@szmarczak/http-timer@^4.0.5": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807" - integrity sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w== +"@szmarczak/http-timer@^5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-5.0.1.tgz#c7c1bf1141cdd4751b0399c8fc7b8b664cd5be3a" + integrity sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw== dependencies: - defer-to-connect "^2.0.0" + defer-to-connect "^2.0.1" "@types/babel__core@^7.1.14": version "7.20.5" @@ -2040,16 +2059,6 @@ dependencies: "@babel/types" "^7.3.0" -"@types/cacheable-request@^6.0.1": - version "6.0.2" - resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.2.tgz#c324da0197de0a98a2312156536ae262429ff6b9" - integrity sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA== - dependencies: - "@types/http-cache-semantics" "*" - "@types/keyv" "*" - "@types/node" "*" - "@types/responselike" "*" - "@types/graceful-fs@^4.1.3": version "4.1.9" resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4" @@ -2057,10 +2066,10 @@ dependencies: "@types/node" "*" -"@types/http-cache-semantics@*": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812" - integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ== +"@types/http-cache-semantics@^4.0.2": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz#f6a7788f438cbfde15f29acad46512b4c01913b3" + integrity sha512-L3LgimLHXtGkWikKnsPg0/VFx9OGZaC+eN1u4r+OB1XRqH3meBIAVC2zr1WdMH+RHmnRkqliQAOHNJ/E0j/e0Q== "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": version "2.0.3" @@ -2086,13 +2095,6 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== -"@types/keyv@*": - version "3.1.3" - resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.3.tgz#1c9aae32872ec1f20dcdaee89a9f3ba88f465e41" - integrity sha512-FXCJgyyN3ivVgRoml4h94G/p3kY+u/B86La+QptcqJaWtBWtmc6TtkNfS40n9bIvyLteHh7zXOtgbobORKPbDg== - dependencies: - "@types/node" "*" - "@types/lodash@^4.17.7": version "4.17.7" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.7.tgz#2f776bcb53adc9e13b2c0dfd493dfcbd7de43612" @@ -2148,13 +2150,6 @@ "@types/scheduler" "*" csstype "^3.0.2" -"@types/responselike@*", "@types/responselike@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" - integrity sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA== - dependencies: - "@types/node" "*" - "@types/scheduler@*": version "0.16.2" resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" @@ -2380,6 +2375,18 @@ acorn-jsx@^5.3.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== +acorn-walk@^8.3.4: + version "8.3.5" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.5.tgz#8a6b8ca8fc5b34685af15dabb44118663c296496" + integrity sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw== + dependencies: + acorn "^8.11.0" + +acorn@^8.11.0: + version "8.16.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.16.0.tgz#4ce79c89be40afe7afe8f3adb902a1f1ce9ac08a" + integrity sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw== + acorn@^8.15.0: version "8.15.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816" @@ -2390,7 +2397,7 @@ acorn@^8.9.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== -agent-base@^7.1.2: +agent-base@^7.0.2, agent-base@^7.1.0, agent-base@^7.1.2: version "7.1.4" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.4.tgz#e3cd76d4c548ee895d3c3fd8dc1f6c5b9032e7a8" integrity sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ== @@ -2418,14 +2425,14 @@ anser@^1.4.9: resolved "https://registry.yarnpkg.com/anser/-/anser-1.4.10.tgz#befa3eddf282684bd03b63dcda3927aef8c2e35b" integrity sha512-hCv9AqTQ8ycjpSd3upOJd7vFwW1JaoYQ7tpham03GJ1ca8/65rqn0RpaWpItOAd6ylW9wAw6luXYPJIyPFVOww== -ansi-align@^3.0.0: +ansi-align@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.1.tgz#0cdf12e111ace773a86e9a1fad1225c43cb19a59" integrity sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w== dependencies: string-width "^4.1.0" -ansi-escapes@^4.2.1: +ansi-escapes@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== @@ -2437,6 +2444,11 @@ ansi-regex@^5.0.0, ansi-regex@^5.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== +ansi-regex@^6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.2.2.tgz#60216eea464d864597ce2832000738a0589650c1" + integrity sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg== + ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -2456,6 +2468,11 @@ ansi-styles@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== +ansi-styles@^6.1.0: + version "6.2.3" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.3.tgz#c044d5dcc521a076413472597a1acb1f103c4041" + integrity sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg== + anymatch@^3.0.3: version "3.1.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" @@ -2484,6 +2501,14 @@ array-buffer-byte-length@^1.0.1: call-bind "^1.0.5" is-array-buffer "^3.0.4" +array-buffer-byte-length@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz#384d12a37295aec3769ab022ad323a18a51ccf8b" + integrity sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw== + dependencies: + call-bound "^1.0.3" + is-array-buffer "^3.0.5" + array-ify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" @@ -2539,6 +2564,19 @@ array.prototype.flatmap@^1.3.2: es-abstract "^1.22.1" es-shim-unscopables "^1.0.0" +array.prototype.map@^1.0.5: + version "1.0.8" + resolved "https://registry.yarnpkg.com/array.prototype.map/-/array.prototype.map-1.0.8.tgz#22f4aae44d3081ce3cd1dd6fd37532e7a3433451" + integrity sha512-YocPM7bYYu2hXGxWpb5vwZ8cMeudNHYtYBcUDY4Z1GWa53qcnQMWSl25jeBHNzitjl9HW2AWW4ro/S/nftUaOQ== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + define-properties "^1.2.1" + es-abstract "^1.23.6" + es-array-method-boxes-properly "^1.0.0" + es-object-atoms "^1.0.0" + is-string "^1.1.1" + array.prototype.tosorted@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz#fe954678ff53034e717ea3352a03f0b0b86f7ffc" @@ -2564,6 +2602,19 @@ arraybuffer.prototype.slice@^1.0.3: is-array-buffer "^3.0.4" is-shared-array-buffer "^1.0.2" +arraybuffer.prototype.slice@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz#9d760d84dbdd06d0cbf92c8849615a1a7ab3183c" + integrity sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ== + dependencies: + array-buffer-byte-length "^1.0.1" + call-bind "^1.0.8" + define-properties "^1.2.1" + es-abstract "^1.23.5" + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + is-array-buffer "^3.0.4" + arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -2574,6 +2625,13 @@ asap@~2.0.6: resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= +ast-types@^0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.4.tgz#ee0d77b343263965ecc3fb62da16e7222b2b6782" + integrity sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w== + dependencies: + tslib "^2.0.1" + async-limiter@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" @@ -2586,11 +2644,6 @@ async-retry@1.3.3: dependencies: retry "0.13.1" -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= - at-least-node@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" @@ -2720,11 +2773,21 @@ baseline-browser-mapping@^2.9.0: resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.9.11.tgz#53724708c8db5f97206517ecfe362dbe5181deea" integrity sha512-Sg0xJUNDU1sJNGdfGWhVHX0kkZ+HWcvmVymJbj6NSgZZmW/8S9Y2HQ5euytnIgakgxN6papOAWiwDo1ctFDcoQ== +basic-ftp@^5.0.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/basic-ftp/-/basic-ftp-5.2.2.tgz#4cb2422deddf432896bdb3c9b8f13b944ad4842c" + integrity sha512-1tDrzKsdCg70WGvbFss/ulVAxupNauGnOlgpyjKzeQxzyllBLS0CGLV7tjIXTK3ZQA9/FBEm9qyFFN1bciA6pw== + before-after-hook@^2.2.0: version "2.2.2" resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.2.tgz#a6e8ca41028d90ee2c24222f201c90956091613e" integrity sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ== +big-integer@^1.6.44: + version "1.6.52" + resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.52.tgz#60a887f3047614a8e1bffe5d7173490a97dc8c85" + integrity sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg== + bl@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" @@ -2734,19 +2797,35 @@ bl@^4.1.0: inherits "^2.0.4" readable-stream "^3.4.0" -boxen@^5.0.0: - version "5.1.2" - resolved "https://registry.yarnpkg.com/boxen/-/boxen-5.1.2.tgz#788cb686fc83c1f486dfa8a40c68fc2b831d2b50" - integrity sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ== +bl@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-5.1.0.tgz#183715f678c7188ecef9fe475d90209400624273" + integrity sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ== dependencies: - ansi-align "^3.0.0" - camelcase "^6.2.0" - chalk "^4.1.0" - cli-boxes "^2.2.1" - string-width "^4.2.2" - type-fest "^0.20.2" - widest-line "^3.1.0" - wrap-ansi "^7.0.0" + buffer "^6.0.3" + inherits "^2.0.4" + readable-stream "^3.4.0" + +boxen@^7.0.0: + version "7.1.1" + resolved "https://registry.yarnpkg.com/boxen/-/boxen-7.1.1.tgz#f9ba525413c2fec9cdb88987d835c4f7cad9c8f4" + integrity sha512-2hCgjEmP8YLWQ130n2FerGv7rYpfBmnmp9Uy2Le1vge6X3gZIfSmEzP5QTDElFxcvVcXlEn8Aq6MU/PZygIOog== + dependencies: + ansi-align "^3.0.1" + camelcase "^7.0.1" + chalk "^5.2.0" + cli-boxes "^3.0.0" + string-width "^5.1.2" + type-fest "^2.13.0" + widest-line "^4.0.1" + wrap-ansi "^8.1.0" + +bplist-parser@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.2.0.tgz#43a9d183e5bf9d545200ceac3e712f79ebbe8d0e" + integrity sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw== + dependencies: + big-integer "^1.6.44" brace-expansion@^1.1.7: version "1.1.11" @@ -2770,6 +2849,13 @@ braces@^3.0.1: dependencies: fill-range "^7.0.1" +braces@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + browserslist@^4.16.6: version "4.17.4" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.17.4.tgz#72e2508af2a403aec0a49847ef31bd823c57ead4" @@ -2822,36 +2908,46 @@ buffer@^5.5.0: base64-js "^1.3.1" ieee754 "^1.1.13" -cacheable-lookup@^5.0.3: - version "5.0.4" - resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" - integrity sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA== +buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" -cacheable-request@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" - integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg== - dependencies: - clone-response "^1.0.2" - get-stream "^5.1.0" - http-cache-semantics "^4.0.0" - keyv "^3.0.0" - lowercase-keys "^2.0.0" - normalize-url "^4.1.0" - responselike "^1.0.2" - -cacheable-request@^7.0.1: - version "7.0.2" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.2.tgz#ea0d0b889364a25854757301ca12b2da77f91d27" - integrity sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew== +bundle-name@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-3.0.0.tgz#ba59bcc9ac785fb67ccdbf104a2bf60c099f0e1a" + integrity sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw== + dependencies: + run-applescript "^5.0.0" + +cacheable-lookup@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz#3476a8215d046e5a3202a9209dd13fec1f933a27" + integrity sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w== + +cacheable-request@^10.2.8: + version "10.2.14" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-10.2.14.tgz#eb915b665fda41b79652782df3f553449c406b9d" + integrity sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ== + dependencies: + "@types/http-cache-semantics" "^4.0.2" + get-stream "^6.0.1" + http-cache-semantics "^4.1.1" + keyv "^4.5.3" + mimic-response "^4.0.0" + normalize-url "^8.0.0" + responselike "^3.0.0" + +call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6" + integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== dependencies: - clone-response "^1.0.2" - get-stream "^5.1.0" - http-cache-semantics "^4.0.0" - keyv "^4.0.0" - lowercase-keys "^2.0.0" - normalize-url "^6.0.1" - responselike "^2.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" @@ -2872,6 +2968,24 @@ call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: get-intrinsic "^1.2.4" set-function-length "^1.2.1" +call-bind@^1.0.8: + version "1.0.9" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.9.tgz#39a644700c80bc7d0ca9102fc6d1d43b2fd7eee7" + integrity sha512-a/hy+pNsFUTR+Iz8TCJvXudKVLAnz/DyeSUo10I5yvFDQJBFU2s9uqQpoSrJlroHUKoKqzg+epxyP9lqFdzfBQ== + dependencies: + call-bind-apply-helpers "^1.0.2" + es-define-property "^1.0.1" + get-intrinsic "^1.3.0" + set-function-length "^1.2.2" + +call-bound@^1.0.2, call-bound@^1.0.3, call-bound@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.4.tgz#238de935d2a2a692928c538c7ccfa91067fd062a" + integrity sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg== + dependencies: + call-bind-apply-helpers "^1.0.2" + get-intrinsic "^1.3.0" + caller-callsite@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" @@ -2915,6 +3029,11 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== +camelcase@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-7.0.1.tgz#f02e50af9fd7782bc8b88a3558c32fd3a388f048" + integrity sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw== + caniuse-lite@^1.0.30001265: version "1.0.30001267" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001267.tgz#b1cf2937175afc0570e4615fc2d2f9069fa0ed30" @@ -2938,13 +3057,10 @@ 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: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" +chalk@5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.2.0.tgz#249623b7d66869c673699fb66d65723e54dfcfb3" + integrity sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA== chalk@^2.0.0, chalk@^2.4.2: version "2.4.2" @@ -2955,6 +3071,19 @@ chalk@^2.0.0, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^4.0.0, chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chalk@^5.0.0, chalk@^5.0.1, chalk@^5.2.0: + version "5.6.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.6.2.tgz#b1238b6e23ea337af71c7f8a295db5af0c158aea" + integrity sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA== + chardet@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" @@ -2987,11 +3116,6 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== -ci-info@^3.1.1: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.2.0.tgz#2876cb948a498797b5236f0095bc057d0dca38b6" - integrity sha512-dVqRX7fLUm8J6FgHJ418XuIgDLZDkYcDFTeL6TA2gt5WlIZUQrrH6EZrNClwT/H0FateUsZkGIOPRrLbP+PR9A== - ci-info@^3.2.0: version "3.3.1" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.1.tgz#58331f6f472a25fe3a50a351ae3052936c2c7f32" @@ -3002,10 +3126,10 @@ clean-stack@^2.0.0: resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== -cli-boxes@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f" - integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== +cli-boxes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-3.0.0.tgz#71a10c716feeba005e4504f36329ef0b17cf3145" + integrity sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g== cli-cursor@^3.1.0: version "3.1.0" @@ -3014,15 +3138,27 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" +cli-cursor@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-4.0.0.tgz#3cecfe3734bf4fe02a8361cbdc0f6fe28c6a57ea" + integrity sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg== + dependencies: + restore-cursor "^4.0.0" + cli-spinners@^2.5.0: version "2.6.1" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d" integrity sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g== -cli-width@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" - integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== +cli-spinners@^2.6.1: + version "2.9.2" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41" + integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg== + +cli-width@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-4.1.0.tgz#42daac41d3c254ef38ad8ac037672130173691c5" + integrity sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ== cliui@^6.0.0: version "6.0.0" @@ -3042,13 +3178,6 @@ cliui@^8.0.1: strip-ansi "^6.0.1" wrap-ansi "^7.0.0" -clone-response@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" - integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= - dependencies: - mimic-response "^1.0.0" - clone@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" @@ -3078,13 +3207,6 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -combined-stream@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - commander@^12.0.0: version "12.1.0" resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3" @@ -3120,17 +3242,24 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -configstore@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/configstore/-/configstore-5.0.1.tgz#d365021b5df4b98cdd187d6a3b0e3f6a7cc5ed96" - integrity sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA== +config-chain@^1.1.11: + version "1.1.13" + resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4" + integrity sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ== + dependencies: + ini "^1.3.4" + proto-list "~1.2.1" + +configstore@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/configstore/-/configstore-6.0.0.tgz#49eca2ebc80983f77e09394a1a56e0aca8235566" + integrity sha512-cD31W1v3GqUlQvbBCGcXmd2Nj9SvLDOP1oQ0YFuLETufzSPaKp11rYBsSOm7rCsW3OnIRAFM3OxRhceaXNYHkA== dependencies: - dot-prop "^5.2.0" - graceful-fs "^4.1.2" - make-dir "^3.0.0" - unique-string "^2.0.0" - write-file-atomic "^3.0.0" - xdg-basedir "^4.0.0" + dot-prop "^6.0.1" + graceful-fs "^4.2.6" + unique-string "^3.0.0" + write-file-atomic "^3.0.3" + xdg-basedir "^5.0.1" connect@^3.6.5: version "3.7.0" @@ -3200,16 +3329,15 @@ core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== -cosmiconfig@7.0.1, cosmiconfig@^7.0.0: - version "7.0.1" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.1.tgz#714d756522cace867867ccb4474c5d01bbae5d6d" - integrity sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ== +cosmiconfig@8.1.3: + version "8.1.3" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.1.3.tgz#0e614a118fcc2d9e5afc2f87d53cd09931015689" + integrity sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw== dependencies: - "@types/parse-json" "^4.0.0" import-fresh "^3.2.1" + js-yaml "^4.1.0" parse-json "^5.0.0" path-type "^4.0.0" - yaml "^1.10.0" cosmiconfig@^5.0.5: version "5.2.1" @@ -3221,6 +3349,17 @@ cosmiconfig@^5.0.5: js-yaml "^3.13.1" parse-json "^4.0.0" +cosmiconfig@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.1.tgz#714d756522cace867867ccb4474c5d01bbae5d6d" + integrity sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ== + dependencies: + "@types/parse-json" "^4.0.0" + import-fresh "^3.2.1" + parse-json "^5.0.0" + path-type "^4.0.0" + yaml "^1.10.0" + cosmiconfig@^9.0.0: version "9.0.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-9.0.0.tgz#34c3fc58287b915f3ae905ab6dc3de258b55ad9d" @@ -3240,10 +3379,12 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -crypto-random-string@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" - integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== +crypto-random-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-4.0.0.tgz#5a3cc53d7dd86183df5da0312816ceeeb5bb1fc2" + integrity sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA== + dependencies: + type-fest "^1.0.1" csstype@^3.0.2: version "3.0.9" @@ -3255,6 +3396,16 @@ dargs@^7.0.0: resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc" integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg== +data-uri-to-buffer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" + integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== + +data-uri-to-buffer@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz#8a58bb67384b261a38ef18bea1810cb01badd28b" + integrity sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw== + data-view-buffer@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.1.tgz#8ea6326efec17a2e42620696e671d7d5a8bc66b2" @@ -3264,6 +3415,15 @@ data-view-buffer@^1.0.1: es-errors "^1.3.0" is-data-view "^1.0.1" +data-view-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.2.tgz#211a03ba95ecaf7798a8c7198d79536211f88570" + integrity sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ== + dependencies: + call-bound "^1.0.3" + es-errors "^1.3.0" + is-data-view "^1.0.2" + data-view-byte-length@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz#90721ca95ff280677eb793749fce1011347669e2" @@ -3273,6 +3433,15 @@ data-view-byte-length@^1.0.1: es-errors "^1.3.0" is-data-view "^1.0.1" +data-view-byte-length@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz#9e80f7ca52453ce3e93d25a35318767ea7704735" + integrity sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ== + dependencies: + call-bound "^1.0.3" + es-errors "^1.3.0" + is-data-view "^1.0.2" + data-view-byte-offset@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz#5e0bbfb4828ed2d1b9b400cd8a7d119bca0ff18a" @@ -3282,6 +3451,15 @@ data-view-byte-offset@^1.0.0: es-errors "^1.3.0" is-data-view "^1.0.1" +data-view-byte-offset@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz#068307f9b71ab76dbbe10291389e020856606191" + integrity sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + is-data-view "^1.0.1" + debug@2.6.9, debug@^2.2.0, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -3289,7 +3467,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.6.9: dependencies: ms "2.0.0" -debug@4, debug@4.3.2, debug@^4.1.0: +debug@4, debug@^4.1.0: version "4.3.2" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== @@ -3323,18 +3501,6 @@ decamelize@^1.1.0, decamelize@^1.2.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= - -decompress-response@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" - integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= - dependencies: - mimic-response "^1.0.0" - decompress-response@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" @@ -3352,11 +3518,29 @@ deep-extend@^0.6.0: resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== -deep-is@^0.1.3: +deep-is@^0.1.3, deep-is@~0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== +default-browser-id@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-3.0.0.tgz#bee7bbbef1f4e75d31f98f4d3f1556a14cea790c" + integrity sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA== + dependencies: + bplist-parser "^0.2.0" + untildify "^4.0.0" + +default-browser@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/default-browser/-/default-browser-4.0.0.tgz#53c9894f8810bf86696de117a6ce9085a3cbc7da" + integrity sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA== + dependencies: + bundle-name "^3.0.0" + default-browser-id "^3.0.0" + execa "^7.1.1" + titleize "^3.0.0" + defaults@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" @@ -3364,12 +3548,7 @@ defaults@^1.0.3: dependencies: clone "^1.0.2" -defer-to-connect@^1.0.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" - integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== - -defer-to-connect@^2.0.0: +defer-to-connect@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg== @@ -3383,6 +3562,11 @@ define-data-property@^1.0.1, define-data-property@^1.1.4: es-errors "^1.3.0" gopd "^1.0.1" +define-lazy-prop@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz#dbb19adfb746d7fc6d734a06b72f4a00d021255f" + integrity sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg== + define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -3390,7 +3574,7 @@ define-properties@^1.1.3: dependencies: object-keys "^1.0.12" -define-properties@^1.2.0, define-properties@^1.2.1: +define-properties@^1.1.4, define-properties@^1.2.0, define-properties@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== @@ -3399,6 +3583,16 @@ define-properties@^1.2.0, define-properties@^1.2.1: has-property-descriptors "^1.0.0" object-keys "^1.1.1" +degenerator@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/degenerator/-/degenerator-4.0.4.tgz#dbeeb602c64ce543c1f17e2c681d1d0cc9d4a0ac" + integrity sha512-MTZdZsuNxSBL92rsjx3VFWe57OpRlikyLbcx2B5Dmdv6oScqpMrvpY7zHLMymrUxo3U5+suPUMsNgW/+SZB1lg== + dependencies: + ast-types "^0.13.4" + escodegen "^1.14.3" + esprima "^4.0.1" + vm2 "^3.9.19" + del@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/del/-/del-6.1.1.tgz#3b70314f1ec0aa325c6b14eb36b95786671edb7a" @@ -3413,11 +3607,6 @@ del@^6.1.1: rimraf "^3.0.2" slash "^3.0.0" -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= - denodeify@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/denodeify/-/denodeify-1.2.1.tgz#3a36287f5034e699e7577901052c2e6c94251631" @@ -3428,15 +3617,7 @@ depd@2.0.0, depd@~2.0.0: resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== -deprecated-obj@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/deprecated-obj/-/deprecated-obj-2.0.0.tgz#e6ba93a3989f6ed18d685e7d99fb8d469b4beffc" - integrity sha512-CkdywZC2rJ8RGh+y3MM1fw1EJ4oO/oNExGbRFv0AQoMS+faTd3nO7slYjkj/6t8OnIMUE+wxh6G97YHhK1ytrw== - dependencies: - flat "^5.0.2" - lodash "^4.17.20" - -deprecation@^2.0.0, deprecation@^2.3.1: +deprecation@^2.0.0: version "2.3.1" resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== @@ -3467,17 +3648,33 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -dot-prop@^5.1.0, dot-prop@^5.2.0: +dot-prop@^5.1.0: version "5.3.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== dependencies: is-obj "^2.0.0" -duplexer3@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" - integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= +dot-prop@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-6.0.1.tgz#fc26b3cf142b9e59b74dbd39ed66ce620c681083" + integrity sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA== + dependencies: + is-obj "^2.0.0" + +dunder-proto@^1.0.0, dunder-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" + integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== + dependencies: + call-bind-apply-helpers "^1.0.1" + es-errors "^1.3.0" + gopd "^1.2.0" + +eastasianwidth@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" + integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== ee-first@1.1.1: version "1.1.1" @@ -3504,6 +3701,11 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== +emoji-regex@^9.2.2: + version "9.2.2" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" + integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== + encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" @@ -3618,6 +3820,71 @@ es-abstract@^1.19.1: string.prototype.trimstart "^1.0.4" unbox-primitive "^1.0.1" +es-abstract@^1.20.4, es-abstract@^1.23.5, es-abstract@^1.23.6, es-abstract@^1.23.9: + version "1.24.2" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.24.2.tgz#2dbd38c180735ee983f77585140a2706a963ed9a" + integrity sha512-2FpH9Q5i2RRwyEP1AylXe6nYLR5OhaJTZwmlcP0dL/+JCbgg7yyEo/sEK6HeGZRf3dFpWwThaRHVApXSkW3xeg== + dependencies: + array-buffer-byte-length "^1.0.2" + arraybuffer.prototype.slice "^1.0.4" + available-typed-arrays "^1.0.7" + call-bind "^1.0.8" + call-bound "^1.0.4" + data-view-buffer "^1.0.2" + data-view-byte-length "^1.0.2" + data-view-byte-offset "^1.0.1" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.1.1" + es-set-tostringtag "^2.1.0" + es-to-primitive "^1.3.0" + function.prototype.name "^1.1.8" + get-intrinsic "^1.3.0" + get-proto "^1.0.1" + get-symbol-description "^1.1.0" + globalthis "^1.0.4" + gopd "^1.2.0" + has-property-descriptors "^1.0.2" + has-proto "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + internal-slot "^1.1.0" + is-array-buffer "^3.0.5" + is-callable "^1.2.7" + is-data-view "^1.0.2" + is-negative-zero "^2.0.3" + is-regex "^1.2.1" + is-set "^2.0.3" + is-shared-array-buffer "^1.0.4" + is-string "^1.1.1" + is-typed-array "^1.1.15" + is-weakref "^1.1.1" + math-intrinsics "^1.1.0" + object-inspect "^1.13.4" + object-keys "^1.1.1" + object.assign "^4.1.7" + own-keys "^1.0.1" + regexp.prototype.flags "^1.5.4" + safe-array-concat "^1.1.3" + safe-push-apply "^1.0.0" + safe-regex-test "^1.1.0" + set-proto "^1.0.0" + stop-iteration-iterator "^1.1.0" + string.prototype.trim "^1.2.10" + string.prototype.trimend "^1.0.9" + string.prototype.trimstart "^1.0.8" + typed-array-buffer "^1.0.3" + typed-array-byte-length "^1.0.3" + typed-array-byte-offset "^1.0.4" + typed-array-length "^1.0.7" + unbox-primitive "^1.1.0" + which-typed-array "^1.1.19" + +es-array-method-boxes-properly@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" + integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== + es-define-property@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" @@ -3625,11 +3892,31 @@ es-define-property@^1.0.0: dependencies: get-intrinsic "^1.2.4" +es-define-property@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" + integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== + es-errors@^1.2.1, es-errors@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== +es-get-iterator@^1.0.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.3.tgz#3ef87523c5d464d41084b2c3c9c214f1199763d6" + integrity sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.3" + has-symbols "^1.0.3" + is-arguments "^1.1.1" + is-map "^2.0.2" + is-set "^2.0.2" + is-string "^1.0.7" + isarray "^2.0.5" + stop-iteration-iterator "^1.0.0" + es-iterator-helpers@^1.0.19: version "1.0.19" resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.0.19.tgz#117003d0e5fec237b4b5c08aded722e0c6d50ca8" @@ -3657,6 +3944,13 @@ es-object-atoms@^1.0.0: dependencies: es-errors "^1.3.0" +es-object-atoms@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1" + integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA== + dependencies: + es-errors "^1.3.0" + es-set-tostringtag@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz#8bb60f0a440c2e4281962428438d58545af39777" @@ -3666,6 +3960,16 @@ es-set-tostringtag@^2.0.3: has-tostringtag "^1.0.2" hasown "^2.0.1" +es-set-tostringtag@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz#f31dbbe0c183b00a6d26eb6325c810c0fd18bd4d" + integrity sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA== + dependencies: + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + has-tostringtag "^1.0.2" + hasown "^2.0.2" + es-shim-unscopables@^1.0.0, es-shim-unscopables@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" @@ -3682,6 +3986,15 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es-to-primitive@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.3.0.tgz#96c89c82cc49fd8794a24835ba3e1ff87f214e18" + integrity sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g== + dependencies: + is-callable "^1.2.7" + is-date-object "^1.0.5" + is-symbol "^1.0.4" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -3692,10 +4005,10 @@ escalade@^3.1.2, escalade@^3.2.0: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== -escape-goat@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-2.1.1.tgz#1b2dc77003676c457ec760b2dc68edb648188675" - integrity sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q== +escape-goat@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-4.0.0.tgz#9424820331b510b0666b98f7873fe11ac4aa8081" + integrity sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg== escape-html@~1.0.3: version "1.0.3" @@ -3717,10 +4030,27 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-config-prettier@^7.0.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-7.2.0.tgz#f4a4bd2832e810e8cc7c1411ec85b3e85c0c53f9" - integrity sha512-rV4Qu0C3nfJKPOAhFujFxB7RMP+URFyQqqOZW9DMRD7ZDTFyjaIlETU3xzHELt++4ugC0+Jm084HQYkkJe+Ivg== +escape-string-regexp@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz#4683126b500b61762f2dbebace1806e8be31b1c8" + integrity sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw== + +escodegen@^1.14.3: + version "1.14.3" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" + integrity sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw== + dependencies: + esprima "^4.0.1" + estraverse "^4.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + +eslint-config-prettier@^7.0.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-7.2.0.tgz#f4a4bd2832e810e8cc7c1411ec85b3e85c0c53f9" + integrity sha512-rV4Qu0C3nfJKPOAhFujFxB7RMP+URFyQqqOZW9DMRD7ZDTFyjaIlETU3xzHELt++4ugC0+Jm084HQYkkJe+Ivg== eslint-config-prettier@^8.5.0: version "8.10.0" @@ -3889,7 +4219,7 @@ espree@^9.6.0, espree@^9.6.1: acorn-jsx "^5.3.2" eslint-visitor-keys "^3.4.1" -esprima@^4.0.0: +esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== @@ -3908,7 +4238,7 @@ esrecurse@^4.3.0: dependencies: estraverse "^5.2.0" -estraverse@^4.1.1: +estraverse@^4.1.1, estraverse@^4.2.0: version "4.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== @@ -3938,22 +4268,22 @@ event-target-shim@^5.0.0, event-target-shim@^5.0.1: resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== -execa@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== +execa@7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-7.1.1.tgz#3eb3c83d239488e7b409d48e8813b76bb55c9c43" + integrity sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q== dependencies: cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" + get-stream "^6.0.1" + human-signals "^4.3.0" + is-stream "^3.0.0" merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" + npm-run-path "^5.1.0" + onetime "^6.0.0" + signal-exit "^3.0.7" + strip-final-newline "^3.0.0" -execa@^4.0.2, execa@^4.0.3: +execa@^4.0.3: version "4.1.0" resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== @@ -3968,6 +4298,36 @@ execa@^4.0.2, execa@^4.0.3: signal-exit "^3.0.2" strip-final-newline "^2.0.0" +execa@^5.0.0, execa@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + +execa@^7.1.1: + version "7.2.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-7.2.0.tgz#657e75ba984f42a70f38928cedc87d6f2d4fe4e9" + integrity sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.1" + human-signals "^4.3.0" + is-stream "^3.0.0" + merge-stream "^2.0.0" + npm-run-path "^5.1.0" + onetime "^6.0.0" + signal-exit "^3.0.7" + strip-final-newline "^3.0.0" + exponential-backoff@^3.1.1: version "3.1.3" resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.3.tgz#51cf92c1c0493c766053f9d3abee4434c244d2f6" @@ -4003,6 +4363,17 @@ fast-glob@^3.1.1: merge2 "^1.3.0" micromatch "^4.0.4" +fast-glob@^3.2.11: + version "3.3.3" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.3.tgz#d06d585ce8dba90a16b0505c543c3ccfb3aeb818" + integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.8" + fast-glob@^3.2.9: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" @@ -4019,7 +4390,7 @@ fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== -fast-levenshtein@^2.0.6: +fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= @@ -4038,12 +4409,21 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" -figures@^3.0.0: +fetch-blob@^3.1.2, fetch-blob@^3.1.4: version "3.2.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" - integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== + resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9" + integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== dependencies: - escape-string-regexp "^1.0.5" + node-domexception "^1.0.0" + web-streams-polyfill "^3.0.3" + +figures@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-5.0.0.tgz#126cd055052dea699f8a54e8c9450e6ecfc44d5f" + integrity sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg== + dependencies: + escape-string-regexp "^5.0.0" + is-unicode-supported "^1.2.0" file-entry-cache@^6.0.1: version "6.0.1" @@ -4059,10 +4439,12 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -filter-obj@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" - integrity sha1-mzERErxsYSehbgFsbF1/GeCAXFs= +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" finalhandler@1.1.2: version "1.1.2" @@ -4122,11 +4504,6 @@ flat-cache@^3.0.4: flatted "^3.1.0" rimraf "^3.0.2" -flat@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" - integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== - flatted@^3.1.0: version "3.2.2" resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.2.tgz#64bfed5cb68fe3ca78b3eb214ad97b63bedce561" @@ -4144,14 +4521,24 @@ for-each@^0.3.3: dependencies: is-callable "^1.1.3" -form-data@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== +for-each@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.5.tgz#d650688027826920feeb0af747ee7b9421a41d47" + integrity sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg== + dependencies: + is-callable "^1.2.7" + +form-data-encoder@^2.1.2: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-2.1.4.tgz#261ea35d2a70d48d30ec7a9603130fa5515e9cd5" + integrity sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw== + +formdata-polyfill@^4.0.10: + version "4.0.10" + resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" + integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" + fetch-blob "^3.1.2" fresh@~0.5.2: version "0.5.2" @@ -4207,6 +4594,18 @@ function.prototype.name@^1.1.6: es-abstract "^1.22.1" functions-have-names "^1.2.3" +function.prototype.name@^1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.8.tgz#e68e1df7b259a5c949eeef95cdbde53edffabb78" + integrity sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + define-properties "^1.2.1" + functions-have-names "^1.2.3" + hasown "^2.0.2" + is-callable "^1.2.7" + functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" @@ -4242,31 +4641,48 @@ get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@ has-symbols "^1.0.3" hasown "^2.0.0" +get-intrinsic@^1.2.5, get-intrinsic@^1.2.6, get-intrinsic@^1.2.7, get-intrinsic@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01" + integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ== + dependencies: + call-bind-apply-helpers "^1.0.2" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.1.1" + function-bind "^1.1.2" + get-proto "^1.0.1" + gopd "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + math-intrinsics "^1.1.0" + get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== +get-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" + integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== + dependencies: + dunder-proto "^1.0.1" + es-object-atoms "^1.0.0" + get-stdin@8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg== -get-stream@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" - integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== - dependencies: - pump "^3.0.0" - -get-stream@^5.0.0, get-stream@^5.1.0: +get-stream@^5.0.0: version "5.2.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== dependencies: pump "^3.0.0" -get-stream@^6.0.0: +get-stream@^6.0.0, get-stream@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== @@ -4288,6 +4704,24 @@ get-symbol-description@^1.0.2: es-errors "^1.3.0" get-intrinsic "^1.2.4" +get-symbol-description@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.1.0.tgz#7bdd54e0befe8ffc9f3b4e203220d9f1e881b6ee" + integrity sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg== + dependencies: + call-bound "^1.0.3" + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + +get-uri@^6.0.1: + version "6.0.5" + resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-6.0.5.tgz#714892aa4a871db671abc5395e5e9447bc306a16" + integrity sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg== + dependencies: + basic-ftp "^5.0.2" + data-uri-to-buffer "^6.0.2" + debug "^4.3.4" + git-raw-commits@^2.0.0: version "2.0.10" resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.10.tgz#e2255ed9563b1c9c3ea6bd05806410290297bbc1" @@ -4299,20 +4733,20 @@ git-raw-commits@^2.0.0: split2 "^3.0.0" through2 "^4.0.0" -git-up@^4.0.0: - version "4.0.5" - resolved "https://registry.yarnpkg.com/git-up/-/git-up-4.0.5.tgz#e7bb70981a37ea2fb8fe049669800a1f9a01d759" - integrity sha512-YUvVDg/vX3d0syBsk/CKUTib0srcQME0JyHkL5BaYdwLsiCslPWmDSi8PUMo9pXYjrryMcmsCoCgsTpSCJEQaA== +git-up@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/git-up/-/git-up-7.0.0.tgz#bace30786e36f56ea341b6f69adfd83286337467" + integrity sha512-ONdIrbBCFusq1Oy0sC71F5azx8bVkvtZtMJAsv+a6lz5YAmbNnLD6HAB4gptHZVLPR8S2/kVN6Gab7lryq5+lQ== dependencies: - is-ssh "^1.3.0" - parse-url "^6.0.0" + is-ssh "^1.4.0" + parse-url "^8.1.0" -git-url-parse@11.6.0: - version "11.6.0" - resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.6.0.tgz#c634b8de7faa66498a2b88932df31702c67df605" - integrity sha512-WWUxvJs5HsyHL6L08wOusa/IXYtMuCAhrMmnTjQPpBU0TTHyDhnOATNH3xNQz7YOQUsqIIPTGr4xiVti1Hsk5g== +git-url-parse@13.1.0: + version "13.1.0" + resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-13.1.0.tgz#07e136b5baa08d59fabdf0e33170de425adf07b4" + integrity sha512-5FvPJP/70WkIprlUZ33bm4UAaFdjcLkJLpWft1BeZKqwR0uhhNGoKwlUaPtVb4LxCSQ++erHapRak9kWGj+FCA== dependencies: - git-up "^4.0.0" + git-up "^7.0.0" glob-parent@^5.1.2: version "5.1.2" @@ -4387,7 +4821,7 @@ globals@^13.19.0: dependencies: type-fest "^0.20.2" -globalthis@^1.0.3: +globalthis@^1.0.3, globalthis@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.4.tgz#7430ed3a975d97bfb59bcce41f5cabbafa651236" integrity sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ== @@ -4395,7 +4829,18 @@ globalthis@^1.0.3: define-properties "^1.2.1" gopd "^1.0.1" -globby@11.0.4, globby@^11.0.1: +globby@13.1.4: + version "13.1.4" + resolved "https://registry.yarnpkg.com/globby/-/globby-13.1.4.tgz#2f91c116066bcec152465ba36e5caa4a13c01317" + integrity sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g== + dependencies: + dir-glob "^3.0.1" + fast-glob "^3.2.11" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^4.0.0" + +globby@^11.0.1: version "11.0.4" resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz#2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5" integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg== @@ -4426,49 +4871,42 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -got@11.8.2: - version "11.8.2" - resolved "https://registry.yarnpkg.com/got/-/got-11.8.2.tgz#7abb3959ea28c31f3576f1576c1effce23f33599" - integrity sha512-D0QywKgIe30ODs+fm8wMZiAcZjypcCodPNuMz5H9Mny7RJ+IjJ10BdmGW7OM7fHXP+O7r6ZwapQ/YQmMSvB0UQ== - dependencies: - "@sindresorhus/is" "^4.0.0" - "@szmarczak/http-timer" "^4.0.5" - "@types/cacheable-request" "^6.0.1" - "@types/responselike" "^1.0.0" - cacheable-lookup "^5.0.3" - cacheable-request "^7.0.1" +gopd@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== + +got@12.6.1, got@^12.1.0: + version "12.6.1" + resolved "https://registry.yarnpkg.com/got/-/got-12.6.1.tgz#8869560d1383353204b5a9435f782df9c091f549" + integrity sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ== + dependencies: + "@sindresorhus/is" "^5.2.0" + "@szmarczak/http-timer" "^5.0.1" + cacheable-lookup "^7.0.0" + cacheable-request "^10.2.8" decompress-response "^6.0.0" - http2-wrapper "^1.0.0-beta.5.2" - lowercase-keys "^2.0.0" - p-cancelable "^2.0.0" - responselike "^2.0.0" - -got@^9.6.0: - version "9.6.0" - resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" - integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== - dependencies: - "@sindresorhus/is" "^0.14.0" - "@szmarczak/http-timer" "^1.1.2" - cacheable-request "^6.0.0" - decompress-response "^3.3.0" - duplexer3 "^0.1.4" - get-stream "^4.1.0" - lowercase-keys "^1.0.1" - mimic-response "^1.0.1" - p-cancelable "^1.0.0" - to-readable-stream "^1.0.0" - url-parse-lax "^3.0.0" - -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4: + form-data-encoder "^2.1.2" + get-stream "^6.0.1" + http2-wrapper "^2.1.10" + lowercase-keys "^3.0.0" + p-cancelable "^3.0.0" + responselike "^3.0.0" + +graceful-fs@4.2.10, graceful-fs@^4.2.9: + version "4.2.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== + +graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4: version "4.2.8" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== -graceful-fs@^4.2.9: - version "4.2.10" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" - integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== +graceful-fs@^4.2.6: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== graphemer@^1.4.0: version "1.4.0" @@ -4512,6 +4950,13 @@ has-proto@^1.0.1, has-proto@^1.0.3: resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== +has-proto@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.2.0.tgz#5de5a6eabd95fdffd9818b43055e8065e39fe9d5" + integrity sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ== + dependencies: + dunder-proto "^1.0.0" + has-symbols@^1.0.1, has-symbols@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" @@ -4522,6 +4967,11 @@ has-symbols@^1.0.3: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== +has-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== + has-tostringtag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" @@ -4536,10 +4986,10 @@ has-tostringtag@^1.0.2: dependencies: has-symbols "^1.0.3" -has-yarn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77" - integrity sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw== +has-yarn@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-3.0.0.tgz#c3c21e559730d1d3b57e28af1f30d06fac38147d" + integrity sha512-IrsVwUHhEULx3R8f/aA8AHuEzAorplsab/v8HBzEiIukwq5i/EC+xmOW+HfP1OaDP+2JkgT1yILHN2O3UFIbcA== has@^1.0.3: version "1.0.3" @@ -4603,10 +5053,10 @@ hosted-git-info@^4.0.1: dependencies: lru-cache "^6.0.0" -http-cache-semantics@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" - integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== +http-cache-semantics@^4.1.1: + version "4.2.0" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz#205f4db64f8562b76a4ff9235aa5279839a09dd5" + integrity sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ== http-errors@~2.0.1: version "2.0.1" @@ -4619,15 +5069,23 @@ http-errors@~2.0.1: statuses "~2.0.2" toidentifier "~1.0.1" -http2-wrapper@^1.0.0-beta.5.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.3.tgz#b8f55e0c1f25d4ebd08b3b0c2c079f9590800b3d" - integrity sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg== +http-proxy-agent@^7.0.0: + version "7.0.2" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e" + integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== + dependencies: + agent-base "^7.1.0" + debug "^4.3.4" + +http2-wrapper@^2.1.10: + version "2.2.1" + resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-2.2.1.tgz#310968153dcdedb160d8b72114363ef5fce1f64a" + integrity sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ== dependencies: quick-lru "^5.1.1" - resolve-alpn "^1.0.0" + resolve-alpn "^1.2.0" -https-proxy-agent@^7.0.5: +https-proxy-agent@^7.0.0, https-proxy-agent@^7.0.5: version "7.0.6" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz#da8dfeac7da130b05c2ba4b59c9b6cd66611a6b9" integrity sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw== @@ -4645,6 +5103,11 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== +human-signals@^4.3.0: + version "4.3.1" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-4.3.1.tgz#ab7f811e851fca97ffbd2c1fe9a958964de321b2" + integrity sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ== + husky@^4.2.5: version "4.3.8" resolved "https://registry.yarnpkg.com/husky/-/husky-4.3.8.tgz#31144060be963fd6850e5cc8f019a1dfe194296d" @@ -4668,7 +5131,7 @@ iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -ieee754@^1.1.13: +ieee754@^1.1.13, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -4690,13 +5153,6 @@ image-size@^1.0.2: dependencies: queue "6.0.2" -import-cwd@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/import-cwd/-/import-cwd-3.0.0.tgz#20845547718015126ea9b3676b7592fb8bd4cf92" - integrity sha512-4pnzH16plW+hgvRECbDWpQl3cqtvSofHWh44met7ESfZ8UZOWWddm8hEyDTqREJ9RbYHY8gi8DqmaelApoOGMg== - dependencies: - import-from "^3.0.0" - import-fresh@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" @@ -4721,17 +5177,10 @@ import-fresh@^3.3.0: parent-module "^1.0.0" resolve-from "^4.0.0" -import-from@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/import-from/-/import-from-3.0.0.tgz#055cfec38cd5a27d8057ca51376d7d3bf0891966" - integrity sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ== - dependencies: - resolve-from "^5.0.0" - -import-lazy@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" - integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM= +import-lazy@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-4.0.0.tgz#e8eb627483a0a43da3c03f3e35548be5cb0cc153" + integrity sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw== imurmurhash@^0.1.4: version "0.1.4" @@ -4766,25 +5215,26 @@ ini@^1.3.4, ini@~1.3.0: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -inquirer@8.1.5: - version "8.1.5" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.1.5.tgz#2dc5159203c826d654915b5fe6990fd17f54a150" - integrity sha512-G6/9xUqmt/r+UvufSyrPpt84NYwhKZ9jLsgMbQzlx804XErNupor8WQdBnBRrXmBfTPpuwf1sV+ss2ovjgdXIg== +inquirer@9.2.6: + version "9.2.6" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-9.2.6.tgz#802a61ee3eefbf1cb82a7fb6c2ae95a106050e01" + integrity sha512-y71l237eJJKS4rl7sQcEUiMhrR0pB/ZnRMMTxLpjJhWL4hdWCT03a6jJnC1w6qIPSRZWEozuieGt3v7XaEJYFw== dependencies: - ansi-escapes "^4.2.1" - chalk "^4.1.1" + ansi-escapes "^4.3.2" + chalk "^5.2.0" cli-cursor "^3.1.0" - cli-width "^3.0.0" + cli-width "^4.0.0" external-editor "^3.0.3" - figures "^3.0.0" + figures "^5.0.0" lodash "^4.17.21" - mute-stream "0.0.8" + mute-stream "1.0.0" ora "^5.4.1" - run-async "^2.4.0" - rxjs "^7.2.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" + run-async "^3.0.0" + rxjs "^7.8.1" + string-width "^4.2.3" + strip-ansi "^6.0.1" through "^2.3.6" + wrap-ansi "^6.0.1" internal-slot@^1.0.3: version "1.0.3" @@ -4804,6 +5254,15 @@ internal-slot@^1.0.7: hasown "^2.0.0" side-channel "^1.0.4" +internal-slot@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.1.0.tgz#1eac91762947d2f7056bc838d93e13b2e9604961" + integrity sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw== + dependencies: + es-errors "^1.3.0" + hasown "^2.0.2" + side-channel "^1.1.0" + interpret@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" @@ -4816,6 +5275,16 @@ invariant@^2.2.4: dependencies: loose-envify "^1.0.0" +ip-address@^10.0.1: + version "10.1.0" + resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-10.1.0.tgz#d8dcffb34d0e02eb241427444a6e23f5b0595aa4" + integrity sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q== + +ip@^1.1.8: + version "1.1.9" + resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.9.tgz#8dfbcc99a754d07f425310b86a99546b1151e396" + integrity sha512-cyRxvOEpNHNtchU3Ln9KC/auJgup87llfQpQ+t5ghoC/UhL16SWzbueiCsdTnWmqAWl7LadfuwhlqmtOaqMHdQ== + is-absolute@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576" @@ -4824,6 +5293,14 @@ is-absolute@^1.0.0: is-relative "^1.0.0" is-windows "^1.0.1" +is-arguments@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.2.0.tgz#ad58c6aecf563b78ef2bf04df540da8f5d7d8e1b" + integrity sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA== + dependencies: + call-bound "^1.0.2" + has-tostringtag "^1.0.2" + is-array-buffer@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.4.tgz#7a1f92b3d61edd2bc65d24f130530ea93d7fae98" @@ -4832,6 +5309,15 @@ is-array-buffer@^3.0.4: call-bind "^1.0.2" get-intrinsic "^1.2.1" +is-array-buffer@^3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.5.tgz#65742e1e687bd2cc666253068fd8707fe4d44280" + integrity sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + get-intrinsic "^1.2.6" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -4851,6 +5337,13 @@ is-bigint@^1.0.1: dependencies: has-bigints "^1.0.1" +is-bigint@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.1.0.tgz#dda7a3445df57a42583db4228682eba7c4170672" + integrity sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ== + dependencies: + has-bigints "^1.0.2" + is-boolean-object@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" @@ -4859,6 +5352,14 @@ is-boolean-object@^1.1.0: call-bind "^1.0.2" has-tostringtag "^1.0.0" +is-boolean-object@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.2.2.tgz#7067f47709809a393c71ff5bb3e135d8a9215d9e" + integrity sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A== + dependencies: + call-bound "^1.0.3" + has-tostringtag "^1.0.2" + is-callable@^1.1.3, is-callable@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" @@ -4869,19 +5370,12 @@ is-callable@^1.1.4, is-callable@^1.2.4: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== -is-ci@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.0.tgz#c7e7be3c9d8eef7d0fa144390bd1e4b88dc4c994" - integrity sha512-kDXyttuLeslKAHYL/K28F2YkM3x5jvFPEw3yXbRptXydjD9rpLEz+C5K5iutY9ZiUu6AP41JdvRQwF4Iqs4ZCQ== - dependencies: - ci-info "^3.1.1" - -is-ci@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" - integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== +is-ci@3.0.1, is-ci@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867" + integrity sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ== dependencies: - ci-info "^2.0.0" + ci-info "^3.2.0" is-core-module@^2.13.0: version "2.15.1" @@ -4911,6 +5405,15 @@ is-data-view@^1.0.1: dependencies: is-typed-array "^1.1.13" +is-data-view@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-data-view/-/is-data-view-1.0.2.tgz#bae0a41b9688986c2188dda6657e56b8f9e63b8e" + integrity sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw== + dependencies: + call-bound "^1.0.2" + get-intrinsic "^1.2.6" + is-typed-array "^1.1.13" + is-date-object@^1.0.1, is-date-object@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" @@ -4918,6 +5421,14 @@ is-date-object@^1.0.1, is-date-object@^1.0.5: dependencies: has-tostringtag "^1.0.0" +is-date-object@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.1.0.tgz#ad85541996fc7aa8b2729701d27b7319f95d82f7" + integrity sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg== + dependencies: + call-bound "^1.0.2" + has-tostringtag "^1.0.2" + is-directory@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" @@ -4928,6 +5439,11 @@ is-docker@^2.0.0: resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== +is-docker@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200" + integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ== + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -4940,6 +5456,13 @@ is-finalizationregistry@^1.0.2: dependencies: call-bind "^1.0.2" +is-finalizationregistry@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz#eefdcdc6c94ddd0674d9c85887bf93f944a97c90" + integrity sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg== + dependencies: + call-bound "^1.0.3" + is-fullwidth-code-point@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" @@ -4975,6 +5498,13 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: dependencies: is-extglob "^2.1.1" +is-inside-container@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-inside-container/-/is-inside-container-1.0.0.tgz#e81fba699662eb31dbdaf26766a61d4814717ea4" + integrity sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA== + dependencies: + is-docker "^3.0.0" + is-installed-globally@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.4.0.tgz#9a0fd407949c30f86eb6959ef1b7994ed0b7b520" @@ -4988,7 +5518,12 @@ is-interactive@^1.0.0: resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== -is-map@^2.0.3: +is-interactive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-2.0.0.tgz#40c57614593826da1100ade6059778d597f16e90" + integrity sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ== + +is-map@^2.0.2, is-map@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.3.tgz#ede96b7fe1e270b3c4465e3a465658764926d62e" integrity sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw== @@ -5003,10 +5538,10 @@ is-negative-zero@^2.0.3: resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747" integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== -is-npm@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-5.0.0.tgz#43e8d65cc56e1b67f8d47262cf667099193f45a8" - integrity sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA== +is-npm@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-6.1.0.tgz#f70e0b6c132dfc817ac97d3badc0134945b098d3" + integrity sha512-O2z4/kNgyjhQwVR1Wpkbfc19JIhggF97NZNCpWTnjH7kVcZMUrnut9XSN7txI7VdyIYk5ZatOq3zvSuWpU8hoA== is-number-object@^1.0.4: version "1.0.6" @@ -5015,6 +5550,14 @@ is-number-object@^1.0.4: dependencies: has-tostringtag "^1.0.0" +is-number-object@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.1.1.tgz#144b21e95a1bc148205dcc2814a9134ec41b2541" + integrity sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw== + dependencies: + call-bound "^1.0.3" + has-tostringtag "^1.0.2" + is-number@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" @@ -5053,6 +5596,16 @@ is-regex@^1.1.4: call-bind "^1.0.2" has-tostringtag "^1.0.0" +is-regex@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.2.1.tgz#76d70a3ed10ef9be48eb577887d74205bf0cad22" + integrity sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g== + dependencies: + call-bound "^1.0.2" + gopd "^1.2.0" + has-tostringtag "^1.0.2" + hasown "^2.0.2" + is-relative@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d" @@ -5060,7 +5613,7 @@ is-relative@^1.0.0: dependencies: is-unc-path "^1.0.0" -is-set@^2.0.3: +is-set@^2.0.2, is-set@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.3.tgz#8ab209ea424608141372ded6e0cb200ef1d9d01d" integrity sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg== @@ -5077,18 +5630,30 @@ is-shared-array-buffer@^1.0.2, is-shared-array-buffer@^1.0.3: dependencies: call-bind "^1.0.7" -is-ssh@^1.3.0: - version "1.3.3" - resolved "https://registry.yarnpkg.com/is-ssh/-/is-ssh-1.3.3.tgz#7f133285ccd7f2c2c7fc897b771b53d95a2b2c7e" - integrity sha512-NKzJmQzJfEEma3w5cJNcUMxoXfDjz0Zj0eyCalHn2E6VOwlzjZo0yuO2fcBSf8zhFuVCL/82/r5gRcoi6aEPVQ== +is-shared-array-buffer@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz#9b67844bd9b7f246ba0708c3a93e34269c774f6f" + integrity sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A== + dependencies: + call-bound "^1.0.3" + +is-ssh@^1.4.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/is-ssh/-/is-ssh-1.4.1.tgz#76de1cdbe8f92a8b905d1a172b6bc09704c20396" + integrity sha512-JNeu1wQsHjyHgn9NcWTaXq6zWSR6hqE0++zhfZlkFBbScNkyvxCdeV8sRkSBaeLKxmbpR21brail63ACNxJ0Tg== dependencies: - protocols "^1.1.0" + protocols "^2.0.1" is-stream@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== +is-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" + integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== + is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" @@ -5096,6 +5661,14 @@ is-string@^1.0.5, is-string@^1.0.7: dependencies: has-tostringtag "^1.0.0" +is-string@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.1.1.tgz#92ea3f3d5c5b6e039ca8677e5ac8d07ea773cbb9" + integrity sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA== + dependencies: + call-bound "^1.0.3" + has-tostringtag "^1.0.2" + is-symbol@^1.0.2, is-symbol@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" @@ -5103,6 +5676,15 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" +is-symbol@^1.0.4, is-symbol@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.1.1.tgz#f47761279f532e2b05a7024a7506dbbedacd0634" + integrity sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w== + dependencies: + call-bound "^1.0.2" + has-symbols "^1.1.0" + safe-regex-test "^1.1.0" + is-text-path@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e" @@ -5117,6 +5699,13 @@ is-typed-array@^1.1.13: dependencies: which-typed-array "^1.1.14" +is-typed-array@^1.1.14, is-typed-array@^1.1.15: + version "1.1.15" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.15.tgz#4bfb4a45b61cee83a5a46fba778e4e8d59c0ce0b" + integrity sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ== + dependencies: + which-typed-array "^1.1.16" + is-typedarray@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -5134,6 +5723,11 @@ is-unicode-supported@^0.1.0: resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== +is-unicode-supported@^1.1.0, is-unicode-supported@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz#d824984b616c292a2e198207d4a609983842f714" + integrity sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ== + is-weakmap@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.2.tgz#bf72615d649dfe5f699079c54b83e47d1ae19cfd" @@ -5153,6 +5747,13 @@ is-weakref@^1.0.2: dependencies: call-bind "^1.0.2" +is-weakref@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.1.1.tgz#eea430182be8d64174bd96bffbc46f21bf3f9293" + integrity sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew== + dependencies: + call-bound "^1.0.3" + is-weakset@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.3.tgz#e801519df8c0c43e12ff2834eead84ec9e624007" @@ -5173,10 +5774,10 @@ is-wsl@^2.1.1, is-wsl@^2.2.0: dependencies: is-docker "^2.0.0" -is-yarn-global@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.3.0.tgz#d502d3382590ea3004893746754c89139973e232" - integrity sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw== +is-yarn-global@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.4.1.tgz#b312d902b313f81e4eaf98b6361ba2b45cd694bb" + integrity sha512-/kppl+R+LO5VmhYSEWARUFjodS25D68gvj8W7z0I7OWhUla5xWu8KL6CtB2V0R6yqhnRgbcaREMr4EEM6htLPQ== isarray@^2.0.5: version "2.0.5" @@ -5193,6 +5794,17 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= +issue-parser@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/issue-parser/-/issue-parser-6.0.0.tgz#b1edd06315d4f2044a9755daf85fdafde9b4014a" + integrity sha512-zKa/Dxq2lGsBIXQ7CUZWTHfvxPC2ej0KfO7fIPqLlHB9J2hJ7rGhZ5rilhuufylr4RXYPzJUeFjKxz305OsNlA== + dependencies: + lodash.capitalize "^4.2.1" + lodash.escaperegexp "^4.1.2" + lodash.isplainobject "^4.0.6" + lodash.isstring "^4.0.1" + lodash.uniqby "^4.7.0" + istanbul-lib-coverage@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.2.tgz#36786d4d82aad2ea5911007e255e2da6b5f80d86" @@ -5209,6 +5821,19 @@ istanbul-lib-instrument@^5.0.4: istanbul-lib-coverage "^3.0.0" semver "^6.3.0" +iterate-iterator@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/iterate-iterator/-/iterate-iterator-1.0.2.tgz#551b804c9eaa15b847ea6a7cdc2f5bf1ec150f91" + integrity sha512-t91HubM4ZDQ70M9wqp+pcNpu8OyJ9UAtXntT/Bcsvp5tZMnz9vRa+IunKXeI8AnfZMTv0jNuVEmGeLSMjVvfPw== + +iterate-value@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/iterate-value/-/iterate-value-1.0.2.tgz#935115bd37d006a52046535ebc8d07e9c9337f57" + integrity sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ== + dependencies: + es-get-iterator "^1.0.2" + iterate-iterator "^1.0.1" + iterator.prototype@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/iterator.prototype/-/iterator.prototype-1.1.2.tgz#5e29c8924f01916cb9335f1ff80619dcff22b0c0" @@ -5354,11 +5979,6 @@ jsesc@^3.0.2, jsesc@~3.1.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d" integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== -json-buffer@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" - integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= - json-buffer@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" @@ -5418,17 +6038,10 @@ jsonparse@^1.2.0: array-includes "^3.1.3" object.assign "^4.1.2" -keyv@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" - integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== - dependencies: - json-buffer "3.0.0" - -keyv@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.0.3.tgz#4f3aa98de254803cafcd2896734108daa35e4254" - integrity sha512-zdGa2TOpSZPq5mU6iowDARnMBZgtCqJ11dJROFi6tg6kTn4nuUdU09lFyLFSaHrWqpIJ+EBq4E8/Dc0Vx5vLdA== +keyv@^4.5.3: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== dependencies: json-buffer "3.0.1" @@ -5447,12 +6060,12 @@ kleur@^4.1.4: resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.5.tgz#95106101795f7050c6c650f350c683febddb1780" integrity sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ== -latest-version@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-5.1.0.tgz#119dfe908fe38d15dfa43ecd13fa12ec8832face" - integrity sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA== +latest-version@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-7.0.0.tgz#843201591ea81a4d404932eeb61240fe04e9e5da" + integrity sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg== dependencies: - package-json "^6.3.0" + package-json "^8.1.0" leven@^3.1.0: version "3.1.0" @@ -5467,6 +6080,14 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + lighthouse-logger@^1.0.0: version "1.4.2" resolved "https://registry.yarnpkg.com/lighthouse-logger/-/lighthouse-logger-1.4.2.tgz#aef90f9e97cd81db367c7634292ee22079280aaa" @@ -5502,11 +6123,31 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" +lodash.capitalize@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/lodash.capitalize/-/lodash.capitalize-4.2.1.tgz#f826c9b4e2a8511d84e3aca29db05e1a4f3b72a9" + integrity sha512-kZzYOKspf8XVX5AvmQF94gQW0lejFVgb80G85bU4ZWzoJ6C03PQg3coYAUpSTpQWelrZELd3XWgHzw4Ck5kaIw== + lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= +lodash.escaperegexp@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz#64762c48618082518ac3df4ccf5d5886dae20347" + integrity sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw== + +lodash.isplainobject@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== + +lodash.isstring@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + integrity sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw== + lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" @@ -5517,7 +6158,12 @@ lodash.throttle@^4.1.1: resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4" integrity sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ= -lodash@4.17.21, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21: +lodash.uniqby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz#d99c07a669e9e6d24e1362dfe266c67616af1302" + integrity sha512-e/zcLx6CSbmaEgFHCA7BnoQKyCtKMxnuWrJygbwPs/AIn+IMKl66L8/s+wBUn5LRw2pZx3bUHibiV1b6aTWIww== + +lodash@4.17.21, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -5530,6 +6176,14 @@ log-symbols@^4.1.0: chalk "^4.1.0" is-unicode-supported "^0.1.0" +log-symbols@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-5.1.0.tgz#a20e3b9a5f53fac6aeb8e2bb22c07cf2c8f16d93" + integrity sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA== + dependencies: + chalk "^5.0.0" + is-unicode-supported "^1.1.0" + loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -5537,15 +6191,10 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" -lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" - integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== - -lowercase-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" - integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== +lowercase-keys@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-3.0.0.tgz#c5e7d442e37ead247ae9db117a9d0a467c89d4f2" + integrity sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ== lru-cache@^10.2.0: version "10.4.3" @@ -5566,17 +6215,15 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -macos-release@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.5.0.tgz#067c2c88b5f3fb3c56a375b2ec93826220fa1ff2" - integrity sha512-EIgv+QZ9r+814gjJj0Bt5vSLJLzswGmSUbUpbi9AIr/fsN2IWFBl2NucV9PAiek+U1STK468tEkxmVYUtuAN3g== +lru-cache@^7.14.1: + version "7.18.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" + integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== -make-dir@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" +macos-release@^3.1.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-3.4.0.tgz#1b223706b13106c158e2b40cb81ba35dd74d7856" + integrity sha512-wpGPwyg/xrSp4H4Db4xYSeAr6+cFQGHfspHzDUdYxswDnUW0L5Ov63UuJiSr8NMSpyaChO4u1n0MXUvVPtrN6A== makeerror@1.0.12: version "1.0.12" @@ -5607,6 +6254,11 @@ marky@^1.2.2: resolved "https://registry.yarnpkg.com/marky/-/marky-1.3.0.tgz#422b63b0baf65022f02eda61a238eccdbbc14997" integrity sha512-ocnPZQLNpvbedwTy9kNrQEsknEfgvcLMvOtz3sFeWApDq1MXH1TqkCIx58xlpESsfwQOnuBO9beyQuNGzVvuhQ== +math-intrinsics@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" + integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== + memoize-one@^5.0.0: version "5.2.1" resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e" @@ -6038,24 +6690,32 @@ micromatch@^4.0.4: braces "^3.0.1" picomatch "^2.2.3" -mime-db@1.49.0: - version "1.49.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.49.0.tgz#f3dfde60c99e9cf3bc9701d687778f537001cbed" - integrity sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA== +micromatch@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== + dependencies: + braces "^3.0.3" + picomatch "^2.3.1" mime-db@1.50.0: version "1.50.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.50.0.tgz#abd4ac94e98d3c0e185016c67ab45d5fde40c11f" integrity sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A== -mime-types@2.1.32: - version "2.1.32" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.32.tgz#1d00e89e7de7fe02008db61001d9e02852670fd5" - integrity sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A== +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@2.1.35: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: - mime-db "1.49.0" + mime-db "1.52.0" -mime-types@^2.1.12, mime-types@^2.1.27, mime-types@~2.1.24: +mime-types@^2.1.27, mime-types@~2.1.24: version "2.1.33" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.33.tgz#1fa12a904472fafd068e48d9e8401f74d3f70edb" integrity sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g== @@ -6072,16 +6732,21 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -mimic-response@^1.0.0, mimic-response@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" - integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== +mimic-fn@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" + integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== mimic-response@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== +mimic-response@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-4.0.0.tgz#35468b19e7c75d10f5165ea25e75a5ceea7cf70f" + integrity sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg== + min-indent@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" @@ -6166,10 +6831,10 @@ ms@2.1.3, ms@^2.1.3: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -mute-stream@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" - integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== +mute-stream@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-1.0.0.tgz#e31bd9fe62f0aed23520aa4324ea6671531e013e" + integrity sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA== natural-compare-lite@^1.4.0: version "1.4.0" @@ -6186,22 +6851,41 @@ negotiator@0.6.2: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== -new-github-release-url@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/new-github-release-url/-/new-github-release-url-1.0.0.tgz#493847e6fecce39c247e9d89929be773d2e7f777" - integrity sha512-dle7yf655IMjyFUqn6Nxkb18r4AOAkzRcgcZv6WZ0IqrOH4QCEZ8Sm6I7XX21zvHdBeeMeTkhR9qT2Z0EJDx6A== +netmask@^2.0.2: + version "2.1.1" + resolved "https://registry.yarnpkg.com/netmask/-/netmask-2.1.1.tgz#80043d265b53aa521b3bd01e8fcdf353f9e1e81e" + integrity sha512-eonl3sLUha+S1GzTPxychyhnUzKyeQkZ7jLjKrBagJgPla13F+uQ71HgpFefyHgqrjEbCPkDArxYsjY8/+gLKA== + +new-github-release-url@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/new-github-release-url/-/new-github-release-url-2.0.0.tgz#335189b91f52bbb9569042a7485900a205a0500b" + integrity sha512-NHDDGYudnvRutt/VhKFlX26IotXe1w0cmkDm6JGquh5bz/bDTw0LufSmH/GxTjEdpHEO+bVKFTwdrcGa/9XlKQ== dependencies: - type-fest "^0.4.1" + type-fest "^2.5.1" node-abort-controller@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/node-abort-controller/-/node-abort-controller-3.1.1.tgz#a94377e964a9a37ac3976d848cb5c765833b8548" integrity sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ== -node-fetch@^2.6.1: - version "2.6.5" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.5.tgz#42735537d7f080a7e5f78b6c549b7146be1742fd" - integrity sha512-mmlIVHJEu5rnIxgEgez6b9GgWXbkZj5YZ7fx+2r94a2E+Uirsp6HsPTPlomfdHtpt/B0cdKviwkoaM6pyvUOpQ== +node-domexception@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" + integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== + +node-fetch@3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.1.tgz#b3eea7b54b3a48020e46f4f88b9c5a7430d20b2e" + integrity sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow== + dependencies: + data-uri-to-buffer "^4.0.0" + fetch-blob "^3.1.4" + formdata-polyfill "^4.0.10" + +node-fetch@^2.6.7: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== dependencies: whatwg-url "^5.0.0" @@ -6250,15 +6934,10 @@ normalize-path@^3.0.0: resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -normalize-url@^4.1.0: - version "4.5.1" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a" - integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA== - -normalize-url@^6.0.1, normalize-url@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" - integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== +normalize-url@^8.0.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-8.1.1.tgz#751a20c8520e5725404c06015fea21d7567f25ef" + integrity sha512-JYc0DPlpGWB40kH5g07gGTrYuMqV653k3uBKY6uITPWds3M0ov3GaWGp9lbE3Bzngx8+XkfzgvASb9vk9JDFXQ== npm-run-path@^4.0.0, npm-run-path@^4.0.1: version "4.0.1" @@ -6267,6 +6946,13 @@ npm-run-path@^4.0.0, npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" +npm-run-path@^5.1.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.3.0.tgz#e23353d0ebb9317f174e93417e4a4d82d0249e9f" + integrity sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ== + dependencies: + path-key "^4.0.0" + nullthrows@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/nullthrows/-/nullthrows-1.1.1.tgz#7818258843856ae971eae4208ad7d7eb19a431b1" @@ -6301,6 +6987,11 @@ object-inspect@^1.13.1: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff" integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g== +object-inspect@^1.13.3, object-inspect@^1.13.4: + version "1.13.4" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.4.tgz#8375265e21bc20d0fa582c22e1b13485d6e00213" + integrity sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew== + object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" @@ -6326,6 +7017,18 @@ object.assign@^4.1.5: has-symbols "^1.0.3" object-keys "^1.1.1" +object.assign@^4.1.7: + version "4.1.7" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.7.tgz#8c14ca1a424c6a561b0bb2a22f66f5049a945d3d" + integrity sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + has-symbols "^1.1.0" + object-keys "^1.1.1" + object.entries@^1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.8.tgz#bffe6f282e01f4d17807204a24f8edd823599c41" @@ -6382,7 +7085,24 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -open@7.4.2, open@^7.0.3: +onetime@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" + integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== + dependencies: + mimic-fn "^4.0.0" + +open@9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/open/-/open-9.1.0.tgz#684934359c90ad25742f5a26151970ff8c6c80b6" + integrity sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg== + dependencies: + default-browser "^4.0.0" + define-lazy-prop "^3.0.0" + is-inside-container "^1.0.0" + is-wsl "^2.2.0" + +open@^7.0.3: version "7.4.2" resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== @@ -6395,6 +7115,18 @@ opencollective-postinstall@^2.0.2: resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259" integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q== +optionator@^0.8.1: + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" + optionator@^0.9.3: version "0.9.4" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" @@ -6407,7 +7139,22 @@ optionator@^0.9.3: type-check "^0.4.0" word-wrap "^1.2.5" -ora@5.4.1, ora@^5.4.1: +ora@6.3.1: + version "6.3.1" + resolved "https://registry.yarnpkg.com/ora/-/ora-6.3.1.tgz#a4e9e5c2cf5ee73c259e8b410273e706a2ad3ed6" + integrity sha512-ERAyNnZOfqM+Ao3RAvIXkYh5joP220yf59gVe2X/cI6SiCxIdi4c9HZKZD8R6q/RDXEje1THBju6iExiSsgJaQ== + dependencies: + chalk "^5.0.0" + cli-cursor "^4.0.0" + cli-spinners "^2.6.1" + is-interactive "^2.0.0" + is-unicode-supported "^1.1.0" + log-symbols "^5.1.0" + stdin-discarder "^0.1.0" + strip-ansi "^7.0.1" + wcwidth "^1.0.1" + +ora@^5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== @@ -6422,28 +7169,32 @@ ora@5.4.1, ora@^5.4.1: strip-ansi "^6.0.0" wcwidth "^1.0.1" -os-name@4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/os-name/-/os-name-4.0.1.tgz#32cee7823de85a8897647ba4d76db46bf845e555" - integrity sha512-xl9MAoU97MH1Xt5K9ERft2YfCAoaO6msy1OBA0ozxEC0x0TmIoE6K3QvgJMMZA9yKGLmHXNY/YZoDbiGDj4zYw== +os-name@5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/os-name/-/os-name-5.1.0.tgz#4f5ab5edfa6938b590112714f1570fe79f1d957a" + integrity sha512-YEIoAnM6zFmzw3PQ201gCVCIWbXNyKObGlVvpAVvraAeOHnlYVKFssbA/riRX5R40WA6kKrZ7Dr7dWzO3nKSeQ== dependencies: - macos-release "^2.5.0" - windows-release "^4.0.0" + macos-release "^3.1.0" + windows-release "^5.0.1" os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= -p-cancelable@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" - integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== +own-keys@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/own-keys/-/own-keys-1.0.1.tgz#e4006910a2bf913585289676eebd6f390cf51358" + integrity sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg== + dependencies: + get-intrinsic "^1.2.6" + object-keys "^1.1.1" + safe-push-apply "^1.0.0" -p-cancelable@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf" - integrity sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg== +p-cancelable@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-3.0.0.tgz#63826694b54d61ca1c20ebcb6d3ecf5e14cd8050" + integrity sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw== p-limit@^2.0.0, p-limit@^2.2.0: version "2.3.0" @@ -6492,15 +7243,37 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== -package-json@^6.3.0: - version "6.5.0" - resolved "https://registry.yarnpkg.com/package-json/-/package-json-6.5.0.tgz#6feedaca35e75725876d0b0e64974697fed145b0" - integrity sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ== +pac-proxy-agent@^6.0.3: + version "6.0.4" + resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-6.0.4.tgz#f90d066808974cd6813dfcdac69a2aa483b18ba1" + integrity sha512-FbJYeusBOZNe6bmrC2/+r/HljwExryon16lNKEU82gWiwIPMCEktUPSEAcTkO9K3jd/YPGuX/azZel1ltmo6nQ== dependencies: - got "^9.6.0" - registry-auth-token "^4.0.0" - registry-url "^5.0.0" - semver "^6.2.0" + agent-base "^7.0.2" + debug "^4.3.4" + get-uri "^6.0.1" + http-proxy-agent "^7.0.0" + https-proxy-agent "^7.0.0" + pac-resolver "^6.0.1" + socks-proxy-agent "^8.0.1" + +pac-resolver@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/pac-resolver/-/pac-resolver-6.0.2.tgz#742ef24d2805b18c0a684ac02bcb0b5ce9644648" + integrity sha512-EQpuJ2ifOjpZY5sg1Q1ZeAxvtLwR7Mj3RgY8cysPGbsRu3RBXyJFWxnMus9PScjxya/0LzvVDxNh/gl0eXBU4w== + dependencies: + degenerator "^4.0.4" + ip "^1.1.8" + netmask "^2.0.2" + +package-json@^8.1.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/package-json/-/package-json-8.1.1.tgz#3e9948e43df40d1e8e78a85485f1070bf8f03dc8" + integrity sha512-cbH9IAIJHNj9uXi196JVsRlt7cHKak6u/e6AkL/bkRelZ7rlL3X1YKxsZwa36xipOEKAsdtmaG6aAJoM1fx2zA== + dependencies: + got "^12.1.0" + registry-auth-token "^5.0.1" + registry-url "^6.0.0" + semver "^7.3.7" parent-module@^1.0.0: version "1.0.1" @@ -6509,7 +7282,15 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-json@5.2.0, parse-json@^5.0.0, parse-json@^5.2.0: +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + +parse-json@^5.0.0, parse-json@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== @@ -6519,33 +7300,19 @@ parse-json@5.2.0, parse-json@^5.0.0, parse-json@^5.2.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" -parse-json@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" - integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= +parse-path@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-7.1.0.tgz#41fb513cb122831807a4c7b29c8727947a09d8c6" + integrity sha512-EuCycjZtfPcjWk7KTksnJ5xPMvWGA/6i4zrLYhRG0hGvC3GPU/jGUj3Cy+ZR0v30duV3e23R95T1lE2+lsndSw== dependencies: - error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" - -parse-path@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-4.0.3.tgz#82d81ec3e071dcc4ab49aa9f2c9c0b8966bb22bf" - integrity sha512-9Cepbp2asKnWTJ9x2kpw6Fe8y9JDbqwahGCTvklzd/cEq5C5JC59x2Xb0Kx+x0QZ8bvNquGO8/BWP0cwBHzSAA== - dependencies: - is-ssh "^1.3.0" - protocols "^1.4.0" - qs "^6.9.4" - query-string "^6.13.8" + protocols "^2.0.0" -parse-url@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-6.0.0.tgz#f5dd262a7de9ec00914939220410b66cff09107d" - integrity sha512-cYyojeX7yIIwuJzledIHeLUBVJ6COVLeT4eF+2P6aKVzwvgKQPndCBv3+yQ7pcWjqToYwaligxzSYNNmGoMAvw== +parse-url@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-8.1.0.tgz#972e0827ed4b57fc85f0ea6b0d839f0d8a57a57d" + integrity sha512-xDvOoLU5XRrcOZvnI6b8zA6n9O9ejNk/GExuz1yBuWUGn9KA97GI6HTs6u02wKara1CeVmZhH+0TZFdWScR89w== dependencies: - is-ssh "^1.3.0" - normalize-url "^6.1.0" - parse-path "^4.0.0" - protocols "^1.4.0" + parse-path "^7.0.0" parseurl@~1.3.3: version "1.3.3" @@ -6572,6 +7339,11 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== +path-key@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" + integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== + path-parse@^1.0.6, path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" @@ -6610,6 +7382,11 @@ picomatch@^2.0.4, picomatch@^2.2.3: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== +picomatch@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.2.tgz#5a942915e26b372dc0f0e6753149a16e6b1c5601" + integrity sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA== + pirates@^4.0.4: version "4.0.7" resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.7.tgz#643b4a18c4257c8a65104b73f3049ce9a0a15e22" @@ -6651,10 +7428,10 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prepend-http@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" - integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== prettier-linter-helpers@^1.0.0: version "1.0.0" @@ -6682,6 +7459,18 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== +promise.allsettled@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/promise.allsettled/-/promise.allsettled-1.0.6.tgz#8dc8ba8edf429feb60f8e81335b920e109c94b6e" + integrity sha512-22wJUOD3zswWFqgwjNHa1965LvqTX87WPu/lreY2KSd7SVcERfuZ4GfUaOnJNnvtoIv2yXT/W00YIGMetXtFXg== + dependencies: + array.prototype.map "^1.0.5" + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + get-intrinsic "^1.1.3" + iterate-value "^1.0.2" + promise@^8.3.0: version "8.3.0" resolved "https://registry.yarnpkg.com/promise/-/promise-8.3.0.tgz#8cb333d1edeb61ef23869fbb8a4ea0279ab60e0a" @@ -6715,10 +7504,34 @@ prop-types@^15.8.1: object-assign "^4.1.1" react-is "^16.13.1" -protocols@^1.1.0, protocols@^1.4.0: - version "1.4.8" - resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.8.tgz#48eea2d8f58d9644a4a32caae5d5db290a075ce8" - integrity sha512-IgjKyaUSjsROSO8/D49Ab7hP8mJgTYcqApOqdPhLoPxAplXmkp+zRvsrSQjFn5by0rhm4VH0GAUELIPpx7B1yg== +proto-list@~1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" + integrity sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA== + +protocols@^2.0.0, protocols@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/protocols/-/protocols-2.0.2.tgz#822e8fcdcb3df5356538b3e91bfd890b067fd0a4" + integrity sha512-hHVTzba3wboROl0/aWRRG9dMytgH6ow//STBZh43l/wQgmMhYhOFi0EHWAPtoCz9IAUymsyP0TSBHkhgMEGNnQ== + +proxy-agent@6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-6.2.1.tgz#062df6609a4012fd1c108974865599b61e77abde" + integrity sha512-OIbBKlRAT+ycCm6wAYIzMwPejzRtjy8F3QiDX0eKOA3e4pe3U9F/IvzcHP42bmgQxVv97juG+J8/gx+JIeCX/Q== + dependencies: + agent-base "^7.0.2" + debug "^4.3.4" + http-proxy-agent "^7.0.0" + https-proxy-agent "^7.0.0" + lru-cache "^7.14.1" + pac-proxy-agent "^6.0.3" + proxy-from-env "^1.1.0" + socks-proxy-agent "^8.0.1" + +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== pump@^3.0.0: version "3.0.0" @@ -6733,35 +7546,18 @@ punycode@^2.1.0: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -pupa@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/pupa/-/pupa-2.1.1.tgz#f5e8fd4afc2c5d97828faa523549ed8744a20d62" - integrity sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A== +pupa@^3.1.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/pupa/-/pupa-3.3.0.tgz#bc4036f9e8920c08ad472bc18fb600067cb83810" + integrity sha512-LjgDO2zPtoXP2wJpDjZrGdojii1uqO0cnwKoIoUzkfS98HDmbeiGmYiXo3lXeFlq2xvne1QFQhwYXSUCLKtEuA== dependencies: - escape-goat "^2.0.0" + escape-goat "^4.0.0" q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= -qs@^6.9.4: - version "6.10.1" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.1.tgz#4931482fa8d647a5aab799c5271d2133b981fb6a" - integrity sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg== - dependencies: - side-channel "^1.0.4" - -query-string@^6.13.8: - version "6.14.1" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.14.1.tgz#7ac2dca46da7f309449ba0f86b1fd28255b0c86a" - integrity sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw== - dependencies: - decode-uri-component "^0.2.0" - filter-obj "^1.1.0" - split-on-first "^1.0.0" - strict-uri-encode "^2.0.0" - queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -6789,7 +7585,7 @@ range-parser@~1.2.1: resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== -rc@^1.2.8: +rc@1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== @@ -6969,6 +7765,20 @@ reflect.getprototypeof@^1.0.4: globalthis "^1.0.3" which-builtin-type "^1.1.3" +reflect.getprototypeof@^1.0.6, reflect.getprototypeof@^1.0.9: + version "1.0.10" + resolved "https://registry.yarnpkg.com/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz#c629219e78a3316d8b604c765ef68996964e7bf9" + integrity sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw== + dependencies: + call-bind "^1.0.8" + define-properties "^1.2.1" + es-abstract "^1.23.9" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + get-intrinsic "^1.2.7" + get-proto "^1.0.1" + which-builtin-type "^1.2.1" + regenerate-unicode-properties@^10.2.2: version "10.2.2" resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.2.tgz#aa113812ba899b630658c7623466be71e1f86f66" @@ -6996,6 +7806,18 @@ regexp.prototype.flags@^1.5.2: es-errors "^1.3.0" set-function-name "^2.0.1" +regexp.prototype.flags@^1.5.4: + version "1.5.4" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz#1ad6c62d44a259007e55b3970e00f746efbcaa19" + integrity sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA== + dependencies: + call-bind "^1.0.8" + define-properties "^1.2.1" + es-errors "^1.3.0" + get-proto "^1.0.1" + gopd "^1.2.0" + set-function-name "^2.0.2" + regexpu-core@^6.3.1: version "6.4.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-6.4.0.tgz#3580ce0c4faedef599eccb146612436b62a176e5" @@ -7008,19 +7830,19 @@ regexpu-core@^6.3.1: unicode-match-property-ecmascript "^2.0.0" unicode-match-property-value-ecmascript "^2.2.1" -registry-auth-token@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.2.1.tgz#6d7b4006441918972ccd5fedcd41dc322c79b250" - integrity sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw== +registry-auth-token@^5.0.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-5.1.1.tgz#f1ff69c8e492e7edee07110b4752dd0a8aa82853" + integrity sha512-P7B4+jq8DeD2nMsAcdfaqHbssgHtZ7Z5+++a5ask90fvmJ8p5je4mOa+wzu+DB4vQ5tdJV/xywY+UnVFeQLV5Q== dependencies: - rc "^1.2.8" + "@pnpm/npm-conf" "^3.0.2" -registry-url@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-5.1.0.tgz#e98334b50d5434b81136b44ec638d9c2009c5009" - integrity sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw== +registry-url@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-6.0.1.tgz#056d9343680f2f64400032b1e199faa692286c58" + integrity sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q== dependencies: - rc "^1.2.8" + rc "1.2.8" regjsgen@^0.8.0: version "0.8.0" @@ -7034,40 +7856,38 @@ regjsparser@^0.13.0: dependencies: jsesc "~3.1.0" -release-it@^14.2.2: - version "14.11.6" - resolved "https://registry.yarnpkg.com/release-it/-/release-it-14.11.6.tgz#a285eaac25f9f3a6d47e688911e539af53a74446" - integrity sha512-6BNcuzFZHThBUBJ/xYw/bxZ+58CAwrwf1zgmjq2Ibl3nlDZbjphHG6iqxkJu7mZ8TIWs6NjloEAhqpjeXoN//Q== +release-it@^15.0.0: + version "15.11.0" + resolved "https://registry.yarnpkg.com/release-it/-/release-it-15.11.0.tgz#389cf1e8f367b51f3f3bc4dc3e01046b6bdb166c" + integrity sha512-lZwoGEnKYKwGnfxxlA7vtR7vvozPrOSsIgQaHO4bgQ5ARbG3IA6Dmo0IVusv6nR1KmnjH70QIeNAgsWs6Ji/tw== dependencies: "@iarna/toml" "2.2.5" - "@octokit/rest" "18.10.0" + "@octokit/rest" "19.0.11" async-retry "1.3.3" - chalk "4.1.2" - cosmiconfig "7.0.1" - debug "4.3.2" - deprecated-obj "2.0.0" - execa "5.1.1" - form-data "4.0.0" - git-url-parse "11.6.0" - globby "11.0.4" - got "11.8.2" - import-cwd "3.0.0" - inquirer "8.1.5" - is-ci "3.0.0" + chalk "5.2.0" + cosmiconfig "8.1.3" + execa "7.1.1" + git-url-parse "13.1.0" + globby "13.1.4" + got "12.6.1" + inquirer "9.2.6" + is-ci "3.0.1" + issue-parser "6.0.0" lodash "4.17.21" - mime-types "2.1.32" - new-github-release-url "1.0.0" - open "7.4.2" - ora "5.4.1" - os-name "4.0.1" - parse-json "5.2.0" - semver "7.3.5" - shelljs "0.8.4" - update-notifier "5.1.0" - url-join "4.0.1" - uuid "8.3.2" - yaml "1.10.2" - yargs-parser "20.2.9" + mime-types "2.1.35" + new-github-release-url "2.0.0" + node-fetch "3.3.1" + open "9.1.0" + ora "6.3.1" + os-name "5.1.0" + promise.allsettled "1.0.6" + proxy-agent "6.2.1" + semver "7.5.1" + shelljs "0.8.5" + update-notifier "6.0.2" + url-join "5.0.0" + wildcard-match "5.1.2" + yargs-parser "21.1.1" require-directory@^2.1.1: version "2.1.1" @@ -7084,7 +7904,7 @@ reselect@^4.1.7: resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.1.8.tgz#3f5dc671ea168dccdeb3e141236f69f02eaec524" integrity sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ== -resolve-alpn@^1.0.0: +resolve-alpn@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" integrity sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g== @@ -7137,19 +7957,12 @@ resolve@^2.0.0-next.5: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -responselike@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" - integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= - dependencies: - lowercase-keys "^1.0.0" - -responselike@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.0.tgz#26391bcc3174f750f9a79eacc40a12a5c42d7723" - integrity sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw== +responselike@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/responselike/-/responselike-3.0.0.tgz#20decb6c298aff0dbee1c355ca95461d42823626" + integrity sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg== dependencies: - lowercase-keys "^2.0.0" + lowercase-keys "^3.0.0" restore-cursor@^3.1.0: version "3.1.0" @@ -7159,6 +7972,14 @@ restore-cursor@^3.1.0: onetime "^5.1.0" signal-exit "^3.0.2" +restore-cursor@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-4.0.0.tgz#519560a4318975096def6e609d44100edaa4ccb9" + integrity sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + retry@0.13.1: version "0.13.1" resolved "https://registry.yarnpkg.com/retry/-/retry-0.13.1.tgz#185b1587acf67919d63b357349e03537b2484658" @@ -7176,10 +7997,17 @@ rimraf@^3.0.2: dependencies: glob "^7.1.3" -run-async@^2.4.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" - integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== +run-applescript@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-5.0.0.tgz#e11e1c932e055d5c6b40d98374e0268d9b11899c" + integrity sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg== + dependencies: + execa "^5.0.0" + +run-async@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-3.0.0.tgz#42a432f6d76c689522058984384df28be379daad" + integrity sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q== run-parallel@^1.1.9: version "1.2.0" @@ -7188,12 +8016,12 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -rxjs@^7.2.0: - version "7.4.0" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.4.0.tgz#a12a44d7eebf016f5ff2441b87f28c9a51cebc68" - integrity sha512-7SQDi7xeTMCJpqViXh8gL/lebcwlp3d831F05+9B44A4B0WfsEwUQHR64gsH1kvJ+Ep/J9K2+n1hVl1CsGN23w== +rxjs@^7.8.1: + version "7.8.2" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.2.tgz#955bc473ed8af11a002a2be52071bf475638607b" + integrity sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA== dependencies: - tslib "~2.1.0" + tslib "^2.1.0" safe-array-concat@^1.1.2: version "1.1.2" @@ -7205,6 +8033,17 @@ safe-array-concat@^1.1.2: has-symbols "^1.0.3" isarray "^2.0.5" +safe-array-concat@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.3.tgz#c9e54ec4f603b0bbb8e7e5007a5ee7aecd1538c3" + integrity sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.2" + get-intrinsic "^1.2.6" + has-symbols "^1.1.0" + isarray "^2.0.5" + safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -7215,6 +8054,14 @@ safe-buffer@~5.2.0: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +safe-push-apply@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/safe-push-apply/-/safe-push-apply-1.0.0.tgz#01850e981c1602d398c85081f360e4e6d03d27f5" + integrity sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA== + dependencies: + es-errors "^1.3.0" + isarray "^2.0.5" + safe-regex-test@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.3.tgz#a5b4c0f06e0ab50ea2c395c14d8371232924c377" @@ -7224,6 +8071,15 @@ safe-regex-test@^1.0.3: es-errors "^1.3.0" is-regex "^1.1.4" +safe-regex-test@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.1.0.tgz#7f87dfb67a3150782eaaf18583ff5d1711ac10c1" + integrity sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + is-regex "^1.2.1" + "safer-buffer@>= 2.1.2 < 3": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -7239,12 +8095,12 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= -semver-diff@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-3.1.1.tgz#05f77ce59f325e00e2706afd67bb506ddb1ca32b" - integrity sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg== +semver-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-4.0.0.tgz#3afcf5ed6d62259f5c72d0d5d50dffbdc9680df5" + integrity sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA== dependencies: - semver "^6.3.0" + semver "^7.3.5" semver-regex@^3.1.2: version "3.1.3" @@ -7261,14 +8117,14 @@ semver@7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -semver@7.3.5, semver@^7.3.4: - version "7.3.5" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" - integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== +semver@7.5.1: + version "7.5.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.1.tgz#c90c4d631cf74720e46b21c1d37ea07edfab91ec" + integrity sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw== dependencies: lru-cache "^6.0.0" -semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: +semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -7283,6 +8139,18 @@ semver@^7.1.3: resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946" integrity sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q== +semver@^7.3.4: + version "7.3.5" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== + dependencies: + lru-cache "^6.0.0" + +semver@^7.3.5: + version "7.7.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.4.tgz#28464e36060e991fa7a11d0279d2d3f3b57a7e8a" + integrity sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA== + semver@^7.3.7, semver@^7.6.0: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" @@ -7327,7 +8195,7 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= -set-function-length@^1.2.1: +set-function-length@^1.2.1, set-function-length@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== @@ -7349,6 +8217,15 @@ set-function-name@^2.0.1, set-function-name@^2.0.2: functions-have-names "^1.2.3" has-property-descriptors "^1.0.2" +set-proto@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/set-proto/-/set-proto-1.0.0.tgz#0760dbcff30b2d7e801fd6e19983e56da337565e" + integrity sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw== + dependencies: + dunder-proto "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + setprototypeof@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" @@ -7371,15 +8248,44 @@ shell-quote@^1.6.1: resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2" integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg== -shelljs@0.8.4: - version "0.8.4" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2" - integrity sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ== +shelljs@0.8.5: + version "0.8.5" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" + integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== dependencies: glob "^7.0.0" interpret "^1.0.0" rechoir "^0.6.2" +side-channel-list@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/side-channel-list/-/side-channel-list-1.0.1.tgz#c2e0b5a14a540aebee3bbc6c3f8666cc9b509127" + integrity sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w== + dependencies: + es-errors "^1.3.0" + object-inspect "^1.13.4" + +side-channel-map@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/side-channel-map/-/side-channel-map-1.0.1.tgz#d6bb6b37902c6fef5174e5f533fab4c732a26f42" + integrity sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + get-intrinsic "^1.2.5" + object-inspect "^1.13.3" + +side-channel-weakmap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz#11dda19d5368e40ce9ec2bdc1fb0ecbc0790ecea" + integrity sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + get-intrinsic "^1.2.5" + object-inspect "^1.13.3" + side-channel-map "^1.0.1" + side-channel@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" @@ -7399,6 +8305,17 @@ side-channel@^1.0.6: get-intrinsic "^1.2.4" object-inspect "^1.13.1" +side-channel@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.1.0.tgz#c3fcff9c4da932784873335ec9765fa94ff66bc9" + integrity sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw== + dependencies: + es-errors "^1.3.0" + object-inspect "^1.13.3" + side-channel-list "^1.0.0" + side-channel-map "^1.0.1" + side-channel-weakmap "^1.0.2" + signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.5" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.5.tgz#9e3e8cc0c75a99472b44321033a7702e7738252f" @@ -7419,6 +8336,33 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== +slash@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7" + integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== + +smart-buffer@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" + integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== + +socks-proxy-agent@^8.0.1: + version "8.0.5" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz#b9cdb4e7e998509d7659d689ce7697ac21645bee" + integrity sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw== + dependencies: + agent-base "^7.1.2" + debug "^4.3.4" + socks "^2.8.3" + +socks@^2.8.3: + version "2.8.7" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.7.tgz#e2fb1d9a603add75050a2067db8c381a0b5669ea" + integrity sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A== + dependencies: + ip-address "^10.0.1" + smart-buffer "^4.2.0" + source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" @@ -7432,7 +8376,7 @@ source-map@^0.5.0, source-map@^0.5.6: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= -source-map@^0.6.0: +source-map@^0.6.0, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== @@ -7463,11 +8407,6 @@ spdx-license-ids@^3.0.0: resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz#0d9becccde7003d6c658d487dd48a32f0bf3014b" integrity sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA== -split-on-first@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" - integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== - split2@^3.0.0: version "3.2.2" resolved "https://registry.yarnpkg.com/split2/-/split2-3.2.2.tgz#bf2cf2a37d838312c249c89206fd7a17dd12365f" @@ -7509,17 +8448,27 @@ statuses@~2.0.2: resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.2.tgz#8f75eecef765b5e1cfcdc080da59409ed424e382" integrity sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw== -strict-uri-encode@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" - integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY= +stdin-discarder@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/stdin-discarder/-/stdin-discarder-0.1.0.tgz#22b3e400393a8e28ebf53f9958f3880622efde21" + integrity sha512-xhV7w8S+bUwlPTb4bAOUQhv8/cSS5offJuX8GQGq32ONF0ZtDWKfkdomM3HMRA+LhX6um/FZ0COqlwsjD53LeQ== + dependencies: + bl "^5.0.0" + +stop-iteration-iterator@^1.0.0, stop-iteration-iterator@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz#f481ff70a548f6124d0312c3aa14cbfa7aa542ad" + integrity sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ== + dependencies: + es-errors "^1.3.0" + internal-slot "^1.1.0" string-natural-compare@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4" integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw== -string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -7528,6 +8477,15 @@ string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2 is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" +string-width@^5.0.1, string-width@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" + integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== + dependencies: + eastasianwidth "^0.2.0" + emoji-regex "^9.2.2" + strip-ansi "^7.0.1" + string.prototype.matchall@^4.0.11: version "4.0.11" resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz#1092a72c59268d2abaad76582dccc687c0297e0a" @@ -7554,6 +8512,19 @@ string.prototype.repeat@^1.0.0: define-properties "^1.1.3" es-abstract "^1.17.5" +string.prototype.trim@^1.2.10: + version "1.2.10" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz#40b2dd5ee94c959b4dcfb1d65ce72e90da480c81" + integrity sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.2" + define-data-property "^1.1.4" + define-properties "^1.2.1" + es-abstract "^1.23.5" + es-object-atoms "^1.0.0" + has-property-descriptors "^1.0.2" + string.prototype.trim@^1.2.9: version "1.2.9" resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz#b6fa326d72d2c78b6df02f7759c73f8f6274faa4" @@ -7581,6 +8552,16 @@ string.prototype.trimend@^1.0.8: define-properties "^1.2.1" es-object-atoms "^1.0.0" +string.prototype.trimend@^1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz#62e2731272cd285041b36596054e9f66569b6942" + integrity sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.2" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + string.prototype.trimstart@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" @@ -7619,11 +8600,23 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" +strip-ansi@^7.0.1: + version "7.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.2.0.tgz#d22a269522836a627af8d04b5c3fd2c7fa3e32e3" + integrity sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w== + dependencies: + ansi-regex "^6.2.2" + strip-final-newline@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== +strip-final-newline@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" + integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== + strip-indent@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" @@ -7721,6 +8714,11 @@ through2@^4.0.0: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= +titleize@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/titleize/-/titleize-3.0.0.tgz#71c12eb7fdd2558aa8a44b0be83b8a76694acd53" + integrity sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ== + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -7738,11 +8736,6 @@ to-fast-properties@^2.0.0: resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= -to-readable-stream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771" - integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== - to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -7775,10 +8768,10 @@ tslib@^1.8.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" - integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A== +tslib@^2.0.1, tslib@^2.1.0: + version "2.8.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" + integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== tsutils@^3.21.0: version "3.21.0" @@ -7794,6 +8787,13 @@ type-check@^0.4.0, type-check@~0.4.0: dependencies: prelude-ls "^1.2.1" +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== + dependencies: + prelude-ls "~1.1.2" + type-detect@4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" @@ -7814,11 +8814,6 @@ type-fest@^0.21.3: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== -type-fest@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.4.1.tgz#8bdf77743385d8a4f13ba95f610f5ccd68c728f8" - integrity sha512-IwzA/LSfD2vC1/YDYMv/zHP4rDF1usCwllsDpbolT3D4fUepIO7f9K70jjmUewU/LmGUKJcwcVtDCpnKk4BPMw== - type-fest@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" @@ -7834,6 +8829,16 @@ type-fest@^0.8.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== +type-fest@^1.0.1: + version "1.4.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" + integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== + +type-fest@^2.13.0, type-fest@^2.5.1: + version "2.19.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b" + integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== + typed-array-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz#1867c5d83b20fcb5ccf32649e5e2fc7424474ff3" @@ -7843,6 +8848,15 @@ typed-array-buffer@^1.0.2: es-errors "^1.3.0" is-typed-array "^1.1.13" +typed-array-buffer@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz#a72395450a4869ec033fd549371b47af3a2ee536" + integrity sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw== + dependencies: + call-bound "^1.0.3" + es-errors "^1.3.0" + is-typed-array "^1.1.14" + typed-array-byte-length@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz#d92972d3cff99a3fa2e765a28fcdc0f1d89dec67" @@ -7854,6 +8868,17 @@ typed-array-byte-length@^1.0.1: has-proto "^1.0.3" is-typed-array "^1.1.13" +typed-array-byte-length@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz#8407a04f7d78684f3d252aa1a143d2b77b4160ce" + integrity sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg== + dependencies: + call-bind "^1.0.8" + for-each "^0.3.3" + gopd "^1.2.0" + has-proto "^1.2.0" + is-typed-array "^1.1.14" + typed-array-byte-offset@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz#f9ec1acb9259f395093e4567eb3c28a580d02063" @@ -7866,6 +8891,19 @@ typed-array-byte-offset@^1.0.2: has-proto "^1.0.3" is-typed-array "^1.1.13" +typed-array-byte-offset@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz#ae3698b8ec91a8ab945016108aef00d5bff12355" + integrity sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.8" + for-each "^0.3.3" + gopd "^1.2.0" + has-proto "^1.2.0" + is-typed-array "^1.1.15" + reflect.getprototypeof "^1.0.9" + typed-array-length@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.6.tgz#57155207c76e64a3457482dfdc1c9d1d3c4c73a3" @@ -7878,6 +8916,18 @@ typed-array-length@^1.0.6: is-typed-array "^1.1.13" possible-typed-array-names "^1.0.0" +typed-array-length@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.7.tgz#ee4deff984b64be1e118b0de8c9c877d5ce73d3d" + integrity sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg== + dependencies: + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + is-typed-array "^1.1.13" + possible-typed-array-names "^1.0.0" + reflect.getprototypeof "^1.0.6" + typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" @@ -7910,6 +8960,16 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" +unbox-primitive@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.1.0.tgz#8d9d2c9edeea8460c7f35033a88867944934d1e2" + integrity sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw== + dependencies: + call-bound "^1.0.3" + has-bigints "^1.0.2" + has-symbols "^1.1.0" + which-boxed-primitive "^1.1.1" + unc-path-regex@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" @@ -7938,12 +8998,12 @@ unicode-property-aliases-ecmascript@^2.0.0: resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz#0a36cb9a585c4f6abd51ad1deddb285c165297c8" integrity sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ== -unique-string@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d" - integrity sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg== +unique-string@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-3.0.0.tgz#84a1c377aff5fd7a8bc6b55d8244b2bd90d75b9a" + integrity sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ== dependencies: - crypto-random-string "^2.0.0" + crypto-random-string "^4.0.0" universal-user-agent@^6.0.0: version "6.0.0" @@ -7960,6 +9020,11 @@ unpipe@~1.0.0: resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= +untildify@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" + integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== + update-browserslist-db@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz#7ca61c0d8650766090728046e416a8cde682859e" @@ -7976,25 +9041,25 @@ update-browserslist-db@^1.2.0: escalade "^3.2.0" picocolors "^1.1.1" -update-notifier@5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-5.1.0.tgz#4ab0d7c7f36a231dd7316cf7729313f0214d9ad9" - integrity sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw== - dependencies: - boxen "^5.0.0" - chalk "^4.1.0" - configstore "^5.0.1" - has-yarn "^2.1.0" - import-lazy "^2.1.0" - is-ci "^2.0.0" +update-notifier@6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-6.0.2.tgz#a6990253dfe6d5a02bd04fbb6a61543f55026b60" + integrity sha512-EDxhTEVPZZRLWYcJ4ZXjGFN0oP7qYvbXWzEgRm/Yql4dHX5wDbvh89YHP6PK1lzZJYrMtXUuZZz8XGK+U6U1og== + dependencies: + boxen "^7.0.0" + chalk "^5.0.1" + configstore "^6.0.0" + has-yarn "^3.0.0" + import-lazy "^4.0.0" + is-ci "^3.0.1" is-installed-globally "^0.4.0" - is-npm "^5.0.0" - is-yarn-global "^0.3.0" - latest-version "^5.1.0" - pupa "^2.1.1" - semver "^7.3.4" - semver-diff "^3.1.1" - xdg-basedir "^4.0.0" + is-npm "^6.0.0" + is-yarn-global "^0.4.0" + latest-version "^7.0.0" + pupa "^3.1.0" + semver "^7.3.7" + semver-diff "^4.0.0" + xdg-basedir "^5.1.0" uri-js@^4.2.2: version "4.4.1" @@ -8003,17 +9068,10 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -url-join@4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.1.tgz#b642e21a2646808ffa178c4c5fda39844e12cde7" - integrity sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA== - -url-parse-lax@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" - integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= - dependencies: - prepend-http "^2.0.0" +url-join@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/url-join/-/url-join-5.0.0.tgz#c2f1e5cbd95fa91082a93b58a1f42fecb4bdbcf1" + integrity sha512-n2huDr9h9yzd6exQVnH/jU5mr+Pfx08LRXXZhkLLetAMESRj+anQsTAh940iMrIetKAmry9coFuZQ2jY8/p3WA== util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" @@ -8025,11 +9083,6 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@8.3.2: - version "8.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" - integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== - validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -8043,6 +9096,14 @@ vlq@^1.0.0: resolved "https://registry.yarnpkg.com/vlq/-/vlq-1.0.1.tgz#c003f6e7c0b4c1edd623fd6ee50bbc0d6a1de468" integrity sha512-gQpnTgkubC6hQgdIcRdYGDSDc+SaujOdyesZQMv6JlfQee/9Mp0Qhnys6WxDWvQnL5WZdT7o2Ul187aSt0Rq+w== +vm2@^3.9.19: + version "3.10.5" + resolved "https://registry.yarnpkg.com/vm2/-/vm2-3.10.5.tgz#cc79e75bc344805bc9796a28dc91baa388dc944f" + integrity sha512-3P/2QDccVFBcujfCOeP8vVNuGfuBJHEuvGR8eMmI10p/iwLL2UwF5PDaNaoOS2pRGQEDmJRyeEcc8kmm2Z59RA== + dependencies: + acorn "^8.15.0" + acorn-walk "^8.3.4" + walker@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" @@ -8064,6 +9125,11 @@ wcwidth@^1.0.1: dependencies: defaults "^1.0.3" +web-streams-polyfill@^3.0.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz#2073b91a2fdb1fbfbd401e7de0ac9f8214cecb4b" + integrity sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw== + webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" @@ -8093,6 +9159,17 @@ which-boxed-primitive@^1.0.2: is-string "^1.0.5" is-symbol "^1.0.3" +which-boxed-primitive@^1.1.0, which-boxed-primitive@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz#d76ec27df7fa165f18d5808374a5fe23c29b176e" + integrity sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA== + dependencies: + is-bigint "^1.1.0" + is-boolean-object "^1.2.1" + is-number-object "^1.1.1" + is-string "^1.1.1" + is-symbol "^1.1.1" + which-builtin-type@^1.1.3: version "1.1.4" resolved "https://registry.yarnpkg.com/which-builtin-type/-/which-builtin-type-1.1.4.tgz#592796260602fc3514a1b5ee7fa29319b72380c3" @@ -8111,6 +9188,25 @@ which-builtin-type@^1.1.3: which-collection "^1.0.2" which-typed-array "^1.1.15" +which-builtin-type@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/which-builtin-type/-/which-builtin-type-1.2.1.tgz#89183da1b4907ab089a6b02029cc5d8d6574270e" + integrity sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q== + dependencies: + call-bound "^1.0.2" + function.prototype.name "^1.1.6" + has-tostringtag "^1.0.2" + is-async-function "^2.0.0" + is-date-object "^1.1.0" + is-finalizationregistry "^1.1.0" + is-generator-function "^1.0.10" + is-regex "^1.2.1" + is-weakref "^1.0.2" + isarray "^2.0.5" + which-boxed-primitive "^1.1.0" + which-collection "^1.0.2" + which-typed-array "^1.1.16" + which-collection@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.2.tgz#627ef76243920a107e7ce8e96191debe4b16c2a0" @@ -8142,6 +9238,19 @@ which-typed-array@^1.1.14, which-typed-array@^1.1.15: gopd "^1.0.1" has-tostringtag "^1.0.2" +which-typed-array@^1.1.16, which-typed-array@^1.1.19: + version "1.1.20" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.20.tgz#3fdb7adfafe0ea69157b1509f3a1cd892bd1d122" + integrity sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.8" + call-bound "^1.0.4" + for-each "^0.3.5" + get-proto "^1.0.1" + gopd "^1.2.0" + has-tostringtag "^1.0.2" + which@^2.0.1, which@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" @@ -8149,26 +9258,31 @@ which@^2.0.1, which@^2.0.2: dependencies: isexe "^2.0.0" -widest-line@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca" - integrity sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg== +widest-line@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-4.0.1.tgz#a0fc673aaba1ea6f0a0d35b3c2795c9a9cc2ebf2" + integrity sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig== dependencies: - string-width "^4.0.0" + string-width "^5.0.1" -windows-release@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/windows-release/-/windows-release-4.0.0.tgz#4725ec70217d1bf6e02c7772413b29cdde9ec377" - integrity sha512-OxmV4wzDKB1x7AZaZgXMVsdJ1qER1ed83ZrTYd5Bwq2HfJVg3DJS8nqlAG4sMoJ7mu8cuRmLEYyU13BKwctRAg== +wildcard-match@5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/wildcard-match/-/wildcard-match-5.1.2.tgz#66b438001391674d8599b45da051e0bd9f33cd2a" + integrity sha512-qNXwI591Z88c8bWxp+yjV60Ch4F8Riawe3iGxbzquhy8Xs9m+0+SLFBGb/0yCTIDElawtaImC37fYZ+dr32KqQ== + +windows-release@^5.0.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/windows-release/-/windows-release-5.1.1.tgz#7ac7019f9baeaea6c00ec889b11824f46c12ee8d" + integrity sha512-NMD00arvqcq2nwqc5Q6KtrSRHK+fVD31erE5FEMahAw5PmVCgD7MUXodq3pdZSUkqA9Cda2iWx6s1XYwiJWRmw== dependencies: - execa "^4.0.2" + execa "^5.1.1" -word-wrap@^1.2.5: +word-wrap@^1.2.5, word-wrap@~1.2.3: version "1.2.5" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== -wrap-ansi@^6.2.0: +wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== @@ -8186,12 +9300,21 @@ wrap-ansi@^7.0.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" + integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== + dependencies: + ansi-styles "^6.1.0" + string-width "^5.0.1" + strip-ansi "^7.0.1" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= -write-file-atomic@^3.0.0: +write-file-atomic@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== @@ -8226,10 +9349,10 @@ ws@^7.5.10: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== -xdg-basedir@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13" - integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== +xdg-basedir@^5.0.1, xdg-basedir@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-5.1.0.tgz#1efba19425e73be1bc6f2a6ceb52a3d2c884c0c9" + integrity sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ== xtend@~4.0.1: version "4.0.2" @@ -8256,15 +9379,15 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@1.10.2, yaml@^1.10.0: +yaml@^1.10.0: version "1.10.2" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== -yargs-parser@20.2.9, yargs-parser@^20.2.3: - version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== +yargs-parser@21.1.1, yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== yargs-parser@^18.1.2: version "18.1.3" @@ -8274,10 +9397,10 @@ yargs-parser@^18.1.2: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^21.1.1: - version "21.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" - integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== +yargs-parser@^20.2.3: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== yargs@^15.1.0: version "15.4.1" From 83c500e18de59717db9f1525e17bf59890a513b1 Mon Sep 17 00:00:00 2001 From: thomasvo Date: Mon, 13 Apr 2026 15:52:50 -0700 Subject: [PATCH 14/20] docs: clarify that PR labels control release note categories, not version bumps - Remove parenthetical version bump claims from label descriptions since version is chosen interactively by maintainer during yarn release - Add ignore-for-release to the list of excluded labels alongside dependencies Co-Authored-By: Claude Opus 4.6 (1M context) --- CONTRIBUTING.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cb68835b..7dbfec69 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -103,16 +103,18 @@ Only maintainers with permission to create releases can publish. The repository ### Changelog and Release Notes -Release notes are automatically generated from merged pull requests. Please label your PRs with: +Release notes are automatically generated from merged pull requests using GitHub's release notes feature. Labels control which category a PR appears under in the release notes โ€” they do not affect version numbering. The maintainer chooses the version (major/minor/patch) interactively when running `yarn release`. -- `breaking`: Breaking changes (major version bump) -- `enhancement`: New features (minor version bump) -- `bug`: Bug fixes (patch version bump) +Please label your PRs with: + +- `breaking`: Breaking changes +- `enhancement`: New features +- `bug`: Bug fixes - `documentation`: Documentation updates -PRs labeled with `dependencies` are excluded from release notes. +PRs labeled with `ignore-for-release` or `dependencies` are excluded from release notes. -Release notes are organized by category based on labels (see `.github/release.yml`). +Release notes categories are configured in `.github/release.yml`. ### Scripts From 69f9ef1083793053e4273c65bdb50b8c1240dcad Mon Sep 17 00:00:00 2001 From: thomasvo Date: Tue, 12 May 2026 11:23:27 -0700 Subject: [PATCH 15/20] fix: address PR #156 review findings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - package.json: add `prepare: bob build` so git URL installs (e.g. `npm install github:openspacelabs/react-native-zoomable-view`) build `lib/` themselves. Without it, gitignored `lib/` leaves a broken package after install โ€” `main`/`module`/`types` all point into a directory that no lifecycle hook creates (`prepublishOnly` only runs on `npm publish`/`pack`, not git installs). - .github/release.yml: `dependabot` โ†’ `dependabot[bot]` so the exclude-authors filter actually matches Dependabot's real bot login and stays consistent with pr-labels.yml. - .github/workflows/pr-labels.yml: pin `mheap/github-action-required-labels` to its v5 commit SHA instead of the mutable `@v5` tag (GitHub security hardening guide for Actions). Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/release.yml | 2 +- .github/workflows/pr-labels.yml | 2 +- package.json | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/release.yml b/.github/release.yml index 2493a1b4..e71af138 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -4,7 +4,7 @@ changelog: - ignore-for-release - dependencies authors: - - dependabot + - dependabot[bot] categories: - title: Breaking Changes ๐Ÿ›  labels: diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index d69ed703..d4e08073 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -26,7 +26,7 @@ jobs: echo "labels=$labels" >> $GITHUB_OUTPUT echo "Extracted labels: $labels" - - uses: mheap/github-action-required-labels@v5 + - uses: mheap/github-action-required-labels@0ac283b4e65c1fb28ce6079dea5546ceca98ccbe # v5 with: mode: minimum count: 1 diff --git a/package.json b/package.json index 6a0b6f34..db997fb0 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "!**/__mocks__" ], "scripts": { + "prepare": "bob build", "prepublishOnly": "yarn build", "test": "jest", "typescript": "tsc --noEmit", From bc6d812821eeff9c4d1e13a1ca6695cd4d54691d Mon Sep 17 00:00:00 2001 From: thomasvo Date: Tue, 12 May 2026 11:53:10 -0700 Subject: [PATCH 16/20] docs: document the actual gh-based release flow in CONTRIBUTING MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous instructions said to run `yarn release` end-to-end, but in practice releases since v2.3.0 have been cut via `gh release create --generate-notes` against a manual `chore: release X.Y.Z` bump commit โ€” release-it's `github.release` step isn't used. Document the real flow: bump on master, `gh release create --generate-notes` (which now reads the categorized `.github/release.yml` introduced in this PR), and let the release workflow publish to npm via OIDC + `--provenance`. Also call out the pr-labels enforcement workflow and clarify how pre-releases skip the publish step. Co-Authored-By: Claude Opus 4.7 (1M context) --- CONTRIBUTING.md | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7dbfec69..df13c7ad 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -90,31 +90,34 @@ You don't need to run build commands locally unless testing the built output. ### Publishing to npm -We use [release-it](https://github.com/release-it/release-it) to create releases and [GitHub Actions](.github/workflows/release.yml) to build and publish to npm. +Releases are cut by creating a GitHub Release. Publishing to npm is handled automatically by [`.github/workflows/release.yml`](.github/workflows/release.yml), which is triggered by the `release: published` event. -To publish new versions: +End-to-end flow: -1. Run `yarn release` locally (creates git tag and GitHub release) -2. GitHub Actions automatically builds and publishes to npm +1. **Bump the version** on `master`. Edit `package.json` `version` to the new `X.Y.Z`, commit as `chore: release X.Y.Z`, and push. +2. **Create the GitHub Release** against the bump commit: + ```sh + gh release create vX.Y.Z --title "Release X.Y.Z" --generate-notes --target master + ``` + `--generate-notes` builds the release body from merged PRs using the categories and exclusions in [`.github/release.yml`](.github/release.yml). Review the generated draft (add `--draft` above if you want to edit before publishing) and publish when it looks right. +3. **CI publishes to npm.** The `release: published` event triggers the release workflow, which runs `yarn install` (which builds `lib/` via the `prepare` script), then `npm publish --access public --provenance`. The `--provenance` flag signs the publish with a GitHub OIDC attestation; this is why the workflow needs `permissions: id-token: write`. Only maintainers with permission to create releases can publish. The repository must have an `NPM_TOKEN` secret configured (Settings โ†’ Secrets and variables โ†’ Actions) for CI to publish to npm. -> **Note:** GitHub pre-releases (e.g. `v3.0.0-beta.1`) intentionally skip the npm publish step to prevent beta versions from being tagged as `latest`. The CI job will show as "Skipped" โ€” this is expected. To publish a pre-release manually, build locally and run `npm publish --tag beta --access public`. +> **Pre-releases:** Tag pre-releases as `vX.Y.Z-beta.N` (or similar) and check the "Set as a pre-release" box (or pass `--prerelease` to `gh release create`). The publish workflow has `if: ${{ !github.event.release.prerelease }}` so it skips pre-releases โ€” the CI job will show as "Skipped", which is expected. To publish a pre-release manually, build locally and run `npm publish --tag beta --access public`. ### Changelog and Release Notes -Release notes are automatically generated from merged pull requests using GitHub's release notes feature. Labels control which category a PR appears under in the release notes โ€” they do not affect version numbering. The maintainer chooses the version (major/minor/patch) interactively when running `yarn release`. +Release notes are auto-generated from merged pull requests by GitHub's release notes feature, driven by [`.github/release.yml`](.github/release.yml). PR labels control which category a PR appears under โ€” they do **not** affect version numbering. The version is chosen by the maintainer at bump time (step 1 above). -Please label your PRs with: +Please label your PRs with one of: - `breaking`: Breaking changes - `enhancement`: New features - `bug`: Bug fixes - `documentation`: Documentation updates -PRs labeled with `ignore-for-release` or `dependencies` are excluded from release notes. - -Release notes categories are configured in `.github/release.yml`. +PRs labeled `ignore-for-release` or `dependencies` are excluded from release notes entirely. The [`.github/workflows/pr-labels.yml`](.github/workflows/pr-labels.yml) workflow enforces that every PR carries at least one of these labels. ### Scripts From 41c1ba109a4a5366a8fc62ad212ac2f2c3437bad Mon Sep 17 00:00:00 2001 From: thomasvo Date: Tue, 12 May 2026 11:55:37 -0700 Subject: [PATCH 17/20] =?UTF-8?q?docs:=20correct=20release=20flow=20?= =?UTF-8?q?=E2=80=94=20yarn=20release=20is=20the=20entry=20point,=20not=20?= =?UTF-8?q?gh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previous commit bc6d812 wrongly documented `gh release create --generate-notes` as the manual entry point, based on misreading release-it's defaults: release-it's default `releaseName` is `Release ${version}` (matches the observed "Release X.Y.Z" titles), and `github.autoGenerate: true` asks GitHub to render the body from `.github/release.yml` โ€” producing the same `## What's Changed` shape that `--generate-notes` does. The intended flow is the one already encoded in the release-it config: `yarn release` bumps + commits + tags + pushes + creates the GitHub Release in one pass, and the release-published workflow handles npm. Keeping the OIDC / --provenance / pre-release skip / label-enforcement details that were correct. Co-Authored-By: Claude Opus 4.7 (1M context) --- CONTRIBUTING.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index df13c7ad..4e014718 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -90,25 +90,29 @@ You don't need to run build commands locally unless testing the built output. ### Publishing to npm -Releases are cut by creating a GitHub Release. Publishing to npm is handled automatically by [`.github/workflows/release.yml`](.github/workflows/release.yml), which is triggered by the `release: published` event. +Releases are cut with [release-it](https://github.com/release-it/release-it) locally; publishing to npm is handled automatically by [`.github/workflows/release.yml`](.github/workflows/release.yml). End-to-end flow: -1. **Bump the version** on `master`. Edit `package.json` `version` to the new `X.Y.Z`, commit as `chore: release X.Y.Z`, and push. -2. **Create the GitHub Release** against the bump commit: +1. **Cut the release locally:** ```sh - gh release create vX.Y.Z --title "Release X.Y.Z" --generate-notes --target master + yarn release ``` - `--generate-notes` builds the release body from merged PRs using the categories and exclusions in [`.github/release.yml`](.github/release.yml). Review the generated draft (add `--draft` above if you want to edit before publishing) and publish when it looks right. -3. **CI publishes to npm.** The `release: published` event triggers the release workflow, which runs `yarn install` (which builds `lib/` via the `prepare` script), then `npm publish --access public --provenance`. The `--provenance` flag signs the publish with a GitHub OIDC attestation; this is why the workflow needs `permissions: id-token: write`. + release-it (configured in `package.json` under `"release-it"`) interactively prompts for the next version (major/minor/patch), then in one pass: + - bumps `package.json`, commits as `chore: release X.Y.Z`, tags `vX.Y.Z`, and pushes, + - creates the GitHub Release via the GitHub API with `autoGenerate: true`, which asks GitHub to build the release body from merged PRs using the categories and exclusions in [`.github/release.yml`](.github/release.yml). + + `npm.publish` is set to `false` in the release-it config โ€” release-it itself does **not** publish to npm. The next step does. + +2. **CI publishes to npm.** When release-it creates the GitHub Release, GitHub fires a `release: published` event that triggers the release workflow. The job runs `yarn install` (which builds `lib/` via the `prepare` script), then `npm publish --access public --provenance`. The `--provenance` flag signs the publish with a GitHub OIDC attestation; that is why the workflow declares `permissions: id-token: write`. Only maintainers with permission to create releases can publish. The repository must have an `NPM_TOKEN` secret configured (Settings โ†’ Secrets and variables โ†’ Actions) for CI to publish to npm. -> **Pre-releases:** Tag pre-releases as `vX.Y.Z-beta.N` (or similar) and check the "Set as a pre-release" box (or pass `--prerelease` to `gh release create`). The publish workflow has `if: ${{ !github.event.release.prerelease }}` so it skips pre-releases โ€” the CI job will show as "Skipped", which is expected. To publish a pre-release manually, build locally and run `npm publish --tag beta --access public`. +> **Pre-releases:** Pass a pre-release identifier to release-it, e.g. `yarn release --preRelease=beta` to produce `vX.Y.Z-beta.N`. The publish workflow gates on `if: ${{ !github.event.release.prerelease }}`, so the npm publish step is skipped for pre-releases โ€” the CI job will show as "Skipped", which is expected. To publish a pre-release manually, build locally and run `npm publish --tag beta --access public`. ### Changelog and Release Notes -Release notes are auto-generated from merged pull requests by GitHub's release notes feature, driven by [`.github/release.yml`](.github/release.yml). PR labels control which category a PR appears under โ€” they do **not** affect version numbering. The version is chosen by the maintainer at bump time (step 1 above). +Release notes are auto-generated from merged pull requests by GitHub's release notes feature, driven by [`.github/release.yml`](.github/release.yml) โ€” release-it sets `github.autoGenerate: true` so GitHub itself builds the body when the release is created. PR labels control which category a PR appears under in the notes; they do **not** affect version numbering. The version is chosen interactively by the maintainer when running `yarn release`. Please label your PRs with one of: From 771f8d8539b3731acd32938e4a4608725dc4422f Mon Sep 17 00:00:00 2001 From: thomasvo Date: Tue, 12 May 2026 12:01:17 -0700 Subject: [PATCH 18/20] docs: document major/minor/patch bump decision in release flow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous version only said "release-it prompts for the version" without telling the maintainer how to answer. Add a semver decision table tied to the PR labels we already use for changelog categorization: `breaking` โ†’ major, `enhancement` โ†’ minor, otherwise โ†’ patch. Include the non-interactive `yarn release patch|minor|major` form and a one-liner for listing PRs in the unreleased range. Co-Authored-By: Claude Opus 4.7 (1M context) --- CONTRIBUTING.md | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4e014718..36ef4631 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -94,17 +94,35 @@ Releases are cut with [release-it](https://github.com/release-it/release-it) loc End-to-end flow: -1. **Cut the release locally:** +1. **Decide the bump type** based on what merged since the previous release. We follow [semver](https://semver.org/) and the decision tracks the PR labels we already use for changelog categorization: + + | Bump | When to pick it | Trigger | + |---|---|---| + | **major** (`X+1.0.0`) | Any backwards-incompatible change to the public API of `ReactNativeZoomableView` / `StaticPin` โ€” removed/renamed props, removed methods, changed callback signatures, raised peer-dep floors. | At least one PR labeled `breaking`. | + | **minor** (`X.Y+1.0`) | New backwards-compatible feature โ€” new prop, new method, new optional callback, new export. | No `breaking` PRs, but at least one labeled `enhancement`. | + | **patch** (`X.Y.Z+1`) | Bug fixes, internal refactors, docs, dependency bumps, build/CI changes โ€” anything that doesn't change observable consumer behavior outside fixing a bug. | Only `bug`, `documentation`, `dependencies`, or `ignore-for-release` PRs in the range. | + + Quick way to see what's in the range: + ```sh + gh pr list --repo openspacelabs/react-native-zoomable-view \ + --state merged --search "merged:>$(gh release view --json publishedAt --jq .publishedAt)" \ + --json number,title,labels + ``` + +2. **Cut the release locally:** ```sh - yarn release + yarn release # prompts for the bump; pick per the table above + yarn release patch # or pass it non-interactively + yarn release minor + yarn release major ``` - release-it (configured in `package.json` under `"release-it"`) interactively prompts for the next version (major/minor/patch), then in one pass: + release-it (configured in `package.json` under `"release-it"`) then does the rest in one pass: - bumps `package.json`, commits as `chore: release X.Y.Z`, tags `vX.Y.Z`, and pushes, - creates the GitHub Release via the GitHub API with `autoGenerate: true`, which asks GitHub to build the release body from merged PRs using the categories and exclusions in [`.github/release.yml`](.github/release.yml). `npm.publish` is set to `false` in the release-it config โ€” release-it itself does **not** publish to npm. The next step does. -2. **CI publishes to npm.** When release-it creates the GitHub Release, GitHub fires a `release: published` event that triggers the release workflow. The job runs `yarn install` (which builds `lib/` via the `prepare` script), then `npm publish --access public --provenance`. The `--provenance` flag signs the publish with a GitHub OIDC attestation; that is why the workflow declares `permissions: id-token: write`. +3. **CI publishes to npm.** When release-it creates the GitHub Release, GitHub fires a `release: published` event that triggers the release workflow. The job runs `yarn install` (which builds `lib/` via the `prepare` script), then `npm publish --access public --provenance`. The `--provenance` flag signs the publish with a GitHub OIDC attestation; that is why the workflow declares `permissions: id-token: write`. Only maintainers with permission to create releases can publish. The repository must have an `NPM_TOKEN` secret configured (Settings โ†’ Secrets and variables โ†’ Actions) for CI to publish to npm. From 44927562458249ba6451930fd137a78bdcffc65b Mon Sep 17 00:00:00 2001 From: thomasvo Date: Tue, 12 May 2026 12:03:13 -0700 Subject: [PATCH 19/20] docs: cut release section down to the essentials Was a wall of tables, OIDC explanations, and step-by-step prose. Now: run `yarn release`, pick the bump per three bullets, done. Co-Authored-By: Claude Opus 4.7 (1M context) --- CONTRIBUTING.md | 49 +++++++++---------------------------------------- 1 file changed, 9 insertions(+), 40 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 36ef4631..cd1ebb5f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -90,54 +90,23 @@ You don't need to run build commands locally unless testing the built output. ### Publishing to npm -Releases are cut with [release-it](https://github.com/release-it/release-it) locally; publishing to npm is handled automatically by [`.github/workflows/release.yml`](.github/workflows/release.yml). +Run `yarn release`. Pick the bump: -End-to-end flow: +- **major** โ€” any merged PR labeled `breaking` +- **minor** โ€” any merged PR labeled `enhancement` (and no `breaking`) +- **patch** โ€” anything else -1. **Decide the bump type** based on what merged since the previous release. We follow [semver](https://semver.org/) and the decision tracks the PR labels we already use for changelog categorization: +That's it. release-it bumps `package.json`, tags, pushes, and creates a GitHub Release. The release-published event triggers [`.github/workflows/release.yml`](.github/workflows/release.yml), which publishes to npm. - | Bump | When to pick it | Trigger | - |---|---|---| - | **major** (`X+1.0.0`) | Any backwards-incompatible change to the public API of `ReactNativeZoomableView` / `StaticPin` โ€” removed/renamed props, removed methods, changed callback signatures, raised peer-dep floors. | At least one PR labeled `breaking`. | - | **minor** (`X.Y+1.0`) | New backwards-compatible feature โ€” new prop, new method, new optional callback, new export. | No `breaking` PRs, but at least one labeled `enhancement`. | - | **patch** (`X.Y.Z+1`) | Bug fixes, internal refactors, docs, dependency bumps, build/CI changes โ€” anything that doesn't change observable consumer behavior outside fixing a bug. | Only `bug`, `documentation`, `dependencies`, or `ignore-for-release` PRs in the range. | +Pre-releases: `yarn release --preRelease=beta`. The publish workflow skips them โ€” to ship a beta, run `npm publish --tag beta --access public` manually. - Quick way to see what's in the range: - ```sh - gh pr list --repo openspacelabs/react-native-zoomable-view \ - --state merged --search "merged:>$(gh release view --json publishedAt --jq .publishedAt)" \ - --json number,title,labels - ``` - -2. **Cut the release locally:** - ```sh - yarn release # prompts for the bump; pick per the table above - yarn release patch # or pass it non-interactively - yarn release minor - yarn release major - ``` - release-it (configured in `package.json` under `"release-it"`) then does the rest in one pass: - - bumps `package.json`, commits as `chore: release X.Y.Z`, tags `vX.Y.Z`, and pushes, - - creates the GitHub Release via the GitHub API with `autoGenerate: true`, which asks GitHub to build the release body from merged PRs using the categories and exclusions in [`.github/release.yml`](.github/release.yml). - - `npm.publish` is set to `false` in the release-it config โ€” release-it itself does **not** publish to npm. The next step does. - -3. **CI publishes to npm.** When release-it creates the GitHub Release, GitHub fires a `release: published` event that triggers the release workflow. The job runs `yarn install` (which builds `lib/` via the `prepare` script), then `npm publish --access public --provenance`. The `--provenance` flag signs the publish with a GitHub OIDC attestation; that is why the workflow declares `permissions: id-token: write`. - -Only maintainers with permission to create releases can publish. The repository must have an `NPM_TOKEN` secret configured (Settings โ†’ Secrets and variables โ†’ Actions) for CI to publish to npm. - -> **Pre-releases:** Pass a pre-release identifier to release-it, e.g. `yarn release --preRelease=beta` to produce `vX.Y.Z-beta.N`. The publish workflow gates on `if: ${{ !github.event.release.prerelease }}`, so the npm publish step is skipped for pre-releases โ€” the CI job will show as "Skipped", which is expected. To publish a pre-release manually, build locally and run `npm publish --tag beta --access public`. +Needs `NPM_TOKEN` configured in repo secrets. ### Changelog and Release Notes -Release notes are auto-generated from merged pull requests by GitHub's release notes feature, driven by [`.github/release.yml`](.github/release.yml) โ€” release-it sets `github.autoGenerate: true` so GitHub itself builds the body when the release is created. PR labels control which category a PR appears under in the notes; they do **not** affect version numbering. The version is chosen interactively by the maintainer when running `yarn release`. - -Please label your PRs with one of: +Auto-generated by GitHub from merged PR labels per [`.github/release.yml`](.github/release.yml). Label your PRs: -- `breaking`: Breaking changes -- `enhancement`: New features -- `bug`: Bug fixes -- `documentation`: Documentation updates +- `breaking` ยท `enhancement` ยท `bug` ยท `documentation` PRs labeled `ignore-for-release` or `dependencies` are excluded from release notes entirely. The [`.github/workflows/pr-labels.yml`](.github/workflows/pr-labels.yml) workflow enforces that every PR carries at least one of these labels. From d6cbb11c61529dbfcbe3655de1f840d46b55ea84 Mon Sep 17 00:00:00 2001 From: thomasvo Date: Tue, 12 May 2026 12:14:55 -0700 Subject: [PATCH 20/20] docs: restore NPM_TOKEN + maintainer-permission note MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dropped this in the trim โ€” useful for someone setting up the repo fresh or wondering why their publish failed. Co-Authored-By: Claude Opus 4.7 (1M context) --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cd1ebb5f..b37228cf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -100,7 +100,7 @@ That's it. release-it bumps `package.json`, tags, pushes, and creates a GitHub R Pre-releases: `yarn release --preRelease=beta`. The publish workflow skips them โ€” to ship a beta, run `npm publish --tag beta --access public` manually. -Needs `NPM_TOKEN` configured in repo secrets. +Only maintainers with permission to create releases can publish. Requires `NPM_TOKEN` configured in repo secrets (Settings โ†’ Secrets and variables โ†’ Actions). ### Changelog and Release Notes