diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json deleted file mode 100644 index 3ae1fdb933..0000000000 --- a/.codesandbox/ci.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "packages": [ - "packages/react-native-web", - "packages/babel-plugin-react-native-web" - ], - "buildCommand": "build", - "sandboxes": ["/packages/react-native-web-examples/"], - "node": "20" -} diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000000..0295e01bed --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,154 @@ +module.exports = { + settings: { + react: { + version: '19.0', + flowVersion: '0.336.0' + } + }, + // hermes parser to support Flow syntax + parser: 'hermes-eslint', + parserOptions: { + sourceType: 'module' + }, + extends: ['prettier'], + plugins: ['react', 'react-hooks'], + env: { + browser: true, + es2021: true, + jest: true, + node: true + }, + ignorePatterns: [ + 'coverage', + 'dist', + 'flow-typed', + 'node_modules', + 'packages/**/vendor/*', + 'packages/**/.next' + ], + // Flow built-in types + globals: { + ClientRect: 'readonly', + Readonly: 'readonly', + ReadonlyArray: 'readonly' + }, + rules: { + camelcase: 'off', + 'constructor-super': 'error', + 'default-case': ['error', { commentPattern: '^no default$' }], + eqeqeq: ['error', 'allow-null'], + 'handle-callback-err': ['error', '^(err|error)$'], + 'new-cap': ['error', { newIsCap: true, capIsNew: false }], + 'no-alert': 'warn', + 'no-array-constructor': 'error', + 'no-caller': 'error', + 'no-case-declarations': 'error', + 'no-class-assign': 'error', + 'no-cond-assign': 'error', + 'no-const-assign': 'error', + 'no-control-regex': 'error', + 'no-debugger': 'error', + 'no-delete-var': 'error', + 'no-dupe-args': 'error', + 'no-dupe-class-members': 'error', + 'no-dupe-keys': 'error', + 'no-duplicate-case': 'error', + 'no-empty-character-class': 'error', + 'no-empty-pattern': 'error', + 'no-eval': 'error', + 'no-ex-assign': 'error', + 'no-extend-native': 'error', + 'no-extra-bind': 'error', + 'no-extra-boolean-cast': 'error', + 'no-fallthrough': 'error', + 'no-floating-decimal': 'error', + 'no-func-assign': 'error', + 'no-implied-eval': 'error', + 'no-inner-declarations': ['error', 'functions'], + 'no-invalid-regexp': 'error', + 'no-irregular-whitespace': 'error', + 'no-iterator': 'error', + 'no-label-var': 'error', + 'no-labels': ['error', { allowLoop: false, allowSwitch: false }], + 'no-lone-blocks': 'error', + 'no-loop-func': 'error', + 'no-multi-str': 'error', + 'no-native-reassign': 'error', + 'no-negated-in-lhs': 'error', + 'no-new': 'error', + 'no-new-func': 'error', + 'no-new-object': 'error', + 'no-new-require': 'error', + 'no-new-symbol': 'error', + 'no-new-wrappers': 'error', + 'no-obj-calls': 'error', + 'no-octal': 'error', + 'no-octal-escape': 'error', + 'no-path-concat': 'error', + 'no-proto': 'error', + 'no-redeclare': 'error', + 'no-regex-spaces': 'error', + 'no-return-assign': ['error', 'except-parens'], + 'no-script-url': 'error', + 'no-self-assign': 'error', + 'no-self-compare': 'error', + 'no-sequences': 'error', + 'no-shadow-restricted-names': 'error', + 'no-sparse-arrays': 'error', + 'no-this-before-super': 'error', + 'no-throw-literal': 'error', + 'no-undef': 'error', + 'no-undef-init': 'error', + 'no-unexpected-multiline': 'error', + 'no-unmodified-loop-condition': 'error', + 'no-unneeded-ternary': ['error', { defaultAssignment: false }], + 'no-unreachable': 'error', + 'no-unsafe-finally': 'error', + 'no-unused-vars': ['error', { vars: 'all', args: 'none' }], + 'no-useless-call': 'error', + 'no-useless-computed-key': 'error', + 'no-useless-concat': 'error', + 'no-useless-constructor': 'error', + 'no-useless-escape': 'error', + 'no-var': 'error', + 'no-with': 'error', + 'prefer-const': 'error', + 'prefer-rest-params': 'error', + quotes: [ + 'error', + 'single', + { avoidEscape: true, allowTemplateLiterals: true } + ], + radix: 'error', + 'use-isnan': 'error', + 'valid-typeof': 'error', + yoda: ['error', 'never'], + + // react + 'react/display-name': 'off', + 'react/jsx-no-bind': 'off', + 'react/jsx-no-duplicate-props': 'error', + 'react/jsx-no-undef': 'error', + 'react/jsx-pascal-case': 'error', + 'react/jsx-sort-props': 'error', + 'react/jsx-uses-react': 'error', + 'react/jsx-uses-vars': 'error', + 'react/no-did-mount-set-state': 'off', + 'react/no-did-update-set-state': 'error', + 'react/no-direct-mutation-state': 'error', + 'react/no-multi-comp': 'off', + 'react/no-string-refs': 'error', + 'react/no-unknown-property': 'error', + 'react/prefer-es6-class': 'error', + 'react/prop-types': 'off', + 'react/react-in-jsx-scope': 'off', + 'react/self-closing-comp': 'error', + 'react/sort-comp': 'off', + 'react/sort-prop-types': 'error', + 'react/wrap-multilines': 'off', + + // react-hooks + 'react-hooks/rules-of-hooks': 'error', + 'react-hooks/exhaustive-deps': 'warn' + } +}; diff --git a/.flowconfig b/.flowconfig new file mode 100644 index 0000000000..03b110db84 --- /dev/null +++ b/.flowconfig @@ -0,0 +1,19 @@ +[version] +0.336.0 + +[ignore] +**/__tests__/** +packages/*/dist/** +packages/benchmarks/** +packages/react-native-web-docs/** +packages/react-native-web-examples/** + +[include] + +[declarations] +.*/node_modules/.* + +[libs] + +[options] +munge_underscores=true diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index 18d80b5388..000bf0ba8e 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -5,7 +5,7 @@ body: - type: markdown attributes: value: | - Thank you for reporting an issue! Create a test case for your issue by forking this template https://codesandbox.io/s/6lx6ql1w5r + Thank you for reporting an issue! Create a minimal repository that reproduces the issue and link it below. - type: checkboxes attributes: label: Is there an existing issue for this? @@ -38,8 +38,8 @@ body: - type: input attributes: label: Test case - description: Please provide a link to a reduced test case that reproduces the issue. - placeholder: 'https://codesandbox.io/s/6lx6ql1w5r' + description: Please provide a link to a repository with a reduced test case that reproduces the issue. + placeholder: 'https://github.com/your-username/your-repro-repo' validations: required: true - type: textarea diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 1fcb434bb4..bb1b381436 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -11,6 +11,5 @@ jobs: with: build-script: 'compile' omit-unchanged: 'true' - exclude: './packages/react-native-web/dist/cjs/{index.js,**/*.js}' pattern: './packages/react-native-web/dist/{index.js,**/*.js}' repo-token: '${{ secrets.GITHUB_TOKEN }}' diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000000..c27d8893a9 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +lint-staged diff --git a/.watchmanconfig b/.watchmanconfig deleted file mode 100644 index 0967ef424b..0000000000 --- a/.watchmanconfig +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/README.md b/README.md index 88569b9804..389e353313 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,6 @@ This is the development monorepo for "React Native for Web" and related projects - `.github` - Contains workflows used by GitHub Actions. - Contains issue templates. -- `configs` - - Contains configuration files used by the monorepo tooling (compiling, linting, testing, etc.) - `packages` - [react-native-web](https://github.com/necolas/react-native-web/blob/master/packages/react-native-web) - Contains the individual packages managed in the monorepo. diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 0000000000..9cc83c0ad1 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,35 @@ +export default function (api) { + return { + plugins: [ + ['babel-plugin-syntax-hermes-parser', { parseLangTypes: 'flow' }], + '@babel/plugin-transform-flow-strip-types', + + ...(api.env('test') + ? // Jest resolves paths without extensions. The extensions depend on other + // files on disk, which Jest's transform cache does not track. + [] + : // Output is published as "type": "module", which requires fully specified + // import paths (e.g. './View/index.js', 'fbjs/lib/invariant.js') + // Only list packages without an "exports" field in `includePackages` + [ + [ + 'babel-plugin-fully-specified', + { includePackages: ['fbjs/', 'styleq/'] } + ] + ]) + ], + presets: [ + ['@babel/preset-react', { useSpread: true }], + [ + '@babel/preset-env', + { + loose: true, + modules: false, + targets: { + browsers: ['chrome 96', 'firefox 94', 'safari 15.1', 'ios_saf 15.1'] + } + } + ] + ] + }; +} diff --git a/configs/.eslintignore b/configs/.eslintignore deleted file mode 100644 index 9db25e1da0..0000000000 --- a/configs/.eslintignore +++ /dev/null @@ -1,6 +0,0 @@ -coverage -dist -flow-typed -node_modules -packages/**/vendor/* -packages/**/.next diff --git a/configs/.eslintrc b/configs/.eslintrc deleted file mode 100644 index 22c86c6723..0000000000 --- a/configs/.eslintrc +++ /dev/null @@ -1,163 +0,0 @@ -{ - "settings": { - "react": { - "pragma": "React", - "version": "18.0", - "flowVersion": "0.148.0" // Flow version - } - }, - // babel parser to support ES6/7 features - "parser": "@babel/eslint-parser", - "parserOptions": { - "ecmaVersion": 7, - "ecmaFeatures": { - "experimentalObjectRestSpread": true, - "jsx": true - }, - "requireConfigFile": false, - "sourceType": "module" - }, - "extends": ["plugin:flowtype/recommended", "prettier"], - "plugins": ["flowtype", "promise", "react", "react-hooks"], - "env": { - "browser": true, - "es2021": true, - "jest": true, - "node": true - }, - "ignorePatterns": [ - "coverage", - "dist", - "flow-typed", - "node_modules", - "packages/**/vendor/*", - "packages/**/.next" - ], - "globals": {}, - "rules": { - "camelcase": 0, - "constructor-super": 2, - "default-case": [2, { "commentPattern": "^no default$" }], - "eqeqeq": [2, "allow-null"], - "handle-callback-err": [2, "^(err|error)$"], - "new-cap": [2, { "newIsCap": true, "capIsNew": false }], - "no-alert": 1, - "no-array-constructor": 2, - "no-caller": 2, - "no-case-declarations": 2, - "no-class-assign": 2, - "no-cond-assign": 2, - "no-const-assign": 2, - "no-control-regex": 2, - "no-debugger": 2, - "no-delete-var": 2, - "no-dupe-args": 2, - "no-dupe-class-members": 2, - "no-dupe-keys": 2, - "no-duplicate-case": 2, - "no-empty-character-class": 2, - "no-empty-pattern": 2, - "no-eval": 2, - "no-ex-assign": 2, - "no-extend-native": 2, - "no-extra-bind": 2, - "no-extra-boolean-cast": 2, - "no-fallthrough": 2, - "no-floating-decimal": 2, - "no-func-assign": 2, - "no-implied-eval": 2, - "no-inner-declarations": [2, "functions"], - "no-invalid-regexp": 2, - "no-irregular-whitespace": 2, - "no-iterator": 2, - "no-label-var": 2, - "no-labels": [2, { "allowLoop": false, "allowSwitch": false }], - "no-lone-blocks": 2, - "no-loop-func": 2, - "no-multi-str": 2, - "no-native-reassign": 2, - "no-negated-in-lhs": 2, - "no-new": 2, - "no-new-func": 2, - "no-new-object": 2, - "no-new-require": 2, - "no-new-symbol": 2, - "no-new-wrappers": 2, - "no-obj-calls": 2, - "no-octal": 2, - "no-octal-escape": 2, - "no-path-concat": 2, - "no-proto": 2, - "no-redeclare": 2, - "no-regex-spaces": 2, - "no-return-assign": [2, "except-parens"], - "no-script-url": 2, - "no-self-assign": 2, - "no-self-compare": 2, - "no-sequences": 2, - "no-shadow-restricted-names": 2, - "no-sparse-arrays": 2, - "no-this-before-super": 2, - "no-throw-literal": 2, - "no-undef": 2, - "no-undef-init": 2, - "no-unexpected-multiline": 2, - "no-unmodified-loop-condition": 2, - "no-unneeded-ternary": [2, { "defaultAssignment": false }], - "no-unreachable": 2, - "no-unsafe-finally": 2, - "no-unused-vars": [2, { "vars": "all", "args": "none" }], - "no-useless-call": 2, - "no-useless-computed-key": 2, - "no-useless-concat": 2, - "no-useless-constructor": 2, - "no-useless-escape": 2, - "no-var": 2, - "no-with": 2, - "prefer-const": 2, - "prefer-rest-params": 2, - "quotes": [ - 2, - "single", - { "avoidEscape": true, "allowTemplateLiterals": true } - ], - "radix": 2, - "use-isnan": 2, - "valid-typeof": 2, - "yoda": [2, "never"], - - // flow - "flowtype/generic-spacing": 0, - "flowtype/space-after-type-colon": 0, - - // promise - "promise/param-names": 2, - - // react - "react/display-name": 0, - "react/jsx-no-bind": 0, - "react/jsx-no-duplicate-props": 2, - "react/jsx-no-undef": 2, - "react/jsx-pascal-case": 2, - "react/jsx-sort-props": 2, - "react/jsx-uses-react": 2, - "react/jsx-uses-vars": 2, - "react/no-did-mount-set-state": 0, - "react/no-did-update-set-state": 2, - "react/no-direct-mutation-state": 2, - "react/no-multi-comp": 0, - "react/no-string-refs": 2, - "react/no-unknown-property": 2, - "react/prefer-es6-class": 2, - "react/prop-types": 0, - "react/react-in-jsx-scope": 0, - "react/self-closing-comp": 2, - "react/sort-comp": 0, - "react/sort-prop-types": 2, - "react/wrap-multilines": 0, - - // react-hooks - "react-hooks/rules-of-hooks": "error", - "react-hooks/exhaustive-deps": "warn" - } -} diff --git a/configs/.flowconfig b/configs/.flowconfig deleted file mode 100644 index 303c45a0fb..0000000000 --- a/configs/.flowconfig +++ /dev/null @@ -1,19 +0,0 @@ -[version] -0.148.0 - -[ignore] -/.*/__tests__/.* -/packages/.*/dist/.* -/packages/react-native-web-docs/.* -/packages/react-native-web-examples/.* - -[include] - -[declarations] -.*/node_modules/.* - -[libs] - -[options] -indexed_access=true -munge_underscores=true diff --git a/configs/babel.config.js b/configs/babel.config.js deleted file mode 100644 index ae0b9d693c..0000000000 --- a/configs/babel.config.js +++ /dev/null @@ -1,56 +0,0 @@ -const createConfig = ({ modules }) => { - const plugins = [ - '@babel/plugin-transform-flow-strip-types', - ['@babel/plugin-proposal-class-properties', { loose: true }], - ['@babel/plugin-proposal-object-rest-spread', { useBuiltIns: true }], - '@babel/plugin-proposal-nullish-coalescing-operator', - [ - '@babel/plugin-transform-runtime', - { - version: '7.18.6' - } - ] - ].concat(modules ? ['babel-plugin-add-module-exports'] : []); - - return { - assumptions: { - iterableIsArray: true - }, - comments: true, - presets: [ - [ - '@babel/preset-env', - { - loose: true, - modules, - exclude: ['transform-typeof-symbol'], - targets: { - browsers: [ - 'chrome 49', - // https://www.mozilla.org/en-US/firefox/all/#product-desktop-esr - 'firefox 91', - 'ios_saf 10', - 'safari 10', - // https://docs.microsoft.com/en-us/DeployEdge/microsoft-edge-support-lifecycle - 'edge 94', - 'opera 36' - ] - } - } - ], - '@babel/preset-react', - '@babel/preset-flow' - ], - plugins: plugins - }; -}; - -module.exports = function (api) { - if (api) { - api.cache(true); - } - - return process.env.BABEL_ENV === 'commonjs' || process.env.NODE_ENV === 'test' - ? createConfig({ modules: 'commonjs' }) - : createConfig({ modules: false }); -}; diff --git a/configs/husky/pre-commit b/configs/husky/pre-commit deleted file mode 100755 index 41ae0d5cdf..0000000000 --- a/configs/husky/pre-commit +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - -npx --no lint-staged diff --git a/configs/jest.config.js b/configs/jest.config.js deleted file mode 100644 index d4dce9eea0..0000000000 --- a/configs/jest.config.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -const babelConfig = require('./babel.config.js'); - -module.exports = { - coveragePathIgnorePatterns: [ - '/node_modules/', - '/packages/react-native-web/src/vendor/' - ], - fakeTimers: { - enableGlobally: true - }, - modulePathIgnorePatterns: [ - '/packages/benchmarks/', - '/packages/react-native-web-docs/', - '/packages/react-native-web-examples/', - '/packages/react-native-web/dist/' - ], - rootDir: process.cwd(), - roots: ['/packages'], - setupFiles: [require.resolve('./jest-setupFiles.dom.js')], - snapshotFormat: { - printBasicPrototype: false - }, - testEnvironment: 'jsdom', - testMatch: ['**/__tests__/**/?(*-)+(spec|test).[jt]s?(x)'], - transform: { - '\\.[jt]sx?$': ['babel-jest', babelConfig()] - } -}; diff --git a/configs/jest.config.node.js b/configs/jest.config.node.js deleted file mode 100644 index 89eb0899b5..0000000000 --- a/configs/jest.config.node.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -const babelConfig = require('./babel.config.js'); - -module.exports = { - coveragePathIgnorePatterns: [ - '/node_modules/', - '/packages/react-native-web/src/vendor/' - ], - fakeTimers: { - enableGlobally: true - }, - modulePathIgnorePatterns: [ - '/packages/benchmarks/', - '/packages/react-native-web-docs/', - '/packages/react-native-web-examples/', - '/packages/react-native-web/dist/' - ], - rootDir: process.cwd(), - roots: ['/packages'], - snapshotFormat: { - printBasicPrototype: false - }, - testEnvironment: 'node', - testMatch: ['**/__tests__/**/?(*-)+(spec|test).node.[jt]s?(x)'], - transform: { - '\\.[jt]sx?$': ['babel-jest', babelConfig()] - } -}; diff --git a/flow-typed/environment.js b/flow-typed/environment.js new file mode 100644 index 0000000000..da79e485c2 --- /dev/null +++ b/flow-typed/environment.js @@ -0,0 +1,13 @@ +// @flow + +declare var process: { + env: { [string]: ?string, ... }, + ... +}; + +declare function setImmediate( + callback: (...args: Array) => unknown, + ...args: Array +): unknown; + +declare function clearImmediate(immediate: unknown): void; diff --git a/flow-typed/npm/create-react-class_v15.x.x.js b/flow-typed/npm/create-react-class_v15.x.x.js deleted file mode 100644 index 04d7dc6f31..0000000000 --- a/flow-typed/npm/create-react-class_v15.x.x.js +++ /dev/null @@ -1,6 +0,0 @@ -// flow-typed signature: 59a949eac1b23f4800e93fe3c647f055 -// flow-typed version: c6154227d1/create-react-class_v15.x.x/flow_>=v0.104.x - -declare module "create-react-class" { - declare module.exports: React$CreateClass; -} diff --git a/flow-typed/npm/prop-types_v15.x.x.js b/flow-typed/npm/prop-types_v15.x.x.js deleted file mode 100644 index 1c4e25c093..0000000000 --- a/flow-typed/npm/prop-types_v15.x.x.js +++ /dev/null @@ -1,38 +0,0 @@ -// flow-typed signature: c93a723cbeb4d2f95d6a472157f6052f -// flow-typed version: 61b795e5b6/prop-types_v15.x.x/flow_>=v0.104.x - -type $npm$propTypes$ReactPropsCheckType = ( - props: any, - propName: string, - componentName: string, - href?: string -) => ?Error; - -// Copied from: https://github.com/facebook/flow/blob/0938da8d7293d0077fbe95c3a3e0eebadb57b012/lib/react.js#L433-L449 -declare module 'prop-types' { - declare var array: React$PropType$Primitive>; - declare var bool: React$PropType$Primitive; - declare var func: React$PropType$Primitive<(...a: Array) => mixed>; - declare var number: React$PropType$Primitive; - declare var object: React$PropType$Primitive<{ +[string]: mixed, ... }>; - declare var string: React$PropType$Primitive; - declare var symbol: React$PropType$Primitive; - declare var any: React$PropType$Primitive; - declare var arrayOf: React$PropType$ArrayOf; - declare var element: React$PropType$Primitive; - declare var elementType: React$PropType$Primitive; - declare var instanceOf: React$PropType$InstanceOf; - declare var node: React$PropType$Primitive; - declare var objectOf: React$PropType$ObjectOf; - declare var oneOf: React$PropType$OneOf; - declare var oneOfType: React$PropType$OneOfType; - declare var shape: React$PropType$Shape; - - declare function checkPropTypes( - propTypes: { [key: $Keys]: $npm$propTypes$ReactPropsCheckType, ... }, - values: V, - location: string, - componentName: string, - getStack: ?() => ?string - ): void; -} diff --git a/flow-typed/npm/styleq.js b/flow-typed/npm/styleq.js index c3715dc900..3f3f3cb8d7 100644 --- a/flow-typed/npm/styleq.js +++ b/flow-typed/npm/styleq.js @@ -4,14 +4,14 @@ type CompiledStyle = { }; type InlineStyle = { - [key: string]: mixed, + [key: string]: unknown, }; type EitherStyle = CompiledStyle | InlineStyle; -type StylesArray<+T> = T | $ReadOnlyArray>; +type StylesArray = T | ReadonlyArray>; type Styles = StylesArray; -type Style<+T = EitherStyle> = StylesArray; +type Style = StylesArray; type StyleqOptions = { disableCache?: boolean, @@ -23,7 +23,7 @@ type StyleqResult = [string, InlineStyle | null]; type Styleq = (styles: Styles) => StyleqResult; type IStyleq = { - (...styles: $ReadOnlyArray): StyleqResult, + (...styles: ReadonlyArray): StyleqResult, factory: (options?: StyleqOptions) => Styleq, }; diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000000..6be0057cdd --- /dev/null +++ b/jest.config.js @@ -0,0 +1,45 @@ +const shared = { + coveragePathIgnorePatterns: [ + '/node_modules/', + '/packages/react-native-web/src/vendor/' + ], + fakeTimers: { + enableGlobally: true + }, + modulePathIgnorePatterns: [ + '/packages/benchmarks/', + '/packages/react-native-web-docs/', + '/packages/react-native-web-examples/', + '/packages/react-native-web/dist/' + ], + rootDir: process.cwd(), + roots: ['/packages'], + snapshotFormat: { + printBasicPrototype: false + }, + transform: { + '\\.[jt]sx?$': 'babel-jest' + } +}; + +export default { + projects: [ + { + ...shared, + displayName: 'dom', + setupFiles: [ + '/jest.setup.globals.js', + '/jest.setup.dom.js' + ], + testEnvironment: 'jsdom', + testMatch: ['**/__tests__/**/?(*-)+(spec|test).[jt]s?(x)'] + }, + { + ...shared, + displayName: 'node', + setupFiles: ['/jest.setup.globals.js'], + testEnvironment: 'node', + testMatch: ['**/__tests__/**/?(*-)+(spec|test).node.[jt]s?(x)'] + } + ] +}; diff --git a/configs/jest-setupFiles.dom.js b/jest.setup.dom.js similarity index 100% rename from configs/jest-setupFiles.dom.js rename to jest.setup.dom.js diff --git a/jest.setup.globals.js b/jest.setup.globals.js new file mode 100644 index 0000000000..878cc25f58 --- /dev/null +++ b/jest.setup.globals.js @@ -0,0 +1,2 @@ +// Jest does not add the `jest` global when tests run as native ES modules +globalThis.jest = import.meta.jest; diff --git a/package-lock.json b/package-lock.json index 1b4d1d8070..8a3ba90581 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,40 +13,161 @@ "packages/*" ], "devDependencies": { - "@babel/cli": "^7.18.6", - "@babel/core": "^7.18.6", - "@babel/eslint-parser": "^7.18.2", - "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", - "@babel/plugin-proposal-object-rest-spread": "^7.18.6", - "@babel/plugin-transform-runtime": "^7.18.6", - "@babel/preset-env": "^7.18.6", - "@babel/preset-flow": "^7.18.6", - "@babel/preset-react": "^7.18.6", - "@testing-library/react": "^16.3.0", - "babel-eslint": "^10.1.0", + "@babel/cli": "^7.29.7", + "@babel/core": "^7.29.7", + "@babel/plugin-transform-flow-strip-types": "^7.29.7", + "@babel/preset-env": "^7.29.7", + "@babel/preset-react": "^7.29.7", + "@testing-library/react": "^16.3.3", "babel-jest": "^30.5.2", - "babel-plugin-add-module-exports": "^1.0.4", - "babel-plugin-transform-react-remove-prop-types": "^0.4.24", - "caniuse-api": "^3.0.0", - "cross-env": "^7.0.3", - "del-cli": "^4.0.1", - "eslint": "^8.19.0", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-flowtype": "^8.0.3", - "eslint-plugin-promise": "^6.0.0", - "eslint-plugin-react": "^7.30.1", - "eslint-plugin-react-hooks": "^4.6.0", - "flow-bin": "0.148.0", - "gen-flow-files": "^0.4.11", - "glob": "^8.0.3", - "husky": "^8.0.0", + "babel-plugin-fully-specified": "^1.3.1", + "babel-plugin-syntax-hermes-parser": "0.37.0", + "cross-env": "^10.1.0", + "del-cli": "^8.0.1", + "eslint": "^8.57.1", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-react": "^7.37.5", + "eslint-plugin-react-hooks": "^7.1.1", + "flow-bin": "0.336.0", + "hermes-eslint": "0.37.0", + "husky": "^9.1.7", "jest": "^30.5.2", "jest-environment-jsdom": "^30.5.2", - "lint-staged": "^13.0.3", - "minimist": "^1.2.6", - "npm-run-all": "^4.1.3", - "prettier": "^2.7.1" + "lint-staged": "^17.6.0", + "prettier": "^3.9.10", + "prettier-plugin-hermes-parser": "0.37.0" + } + }, + "node_modules/@-xun/debug": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@-xun/debug/-/debug-2.0.2.tgz", + "integrity": "sha512-qGaZ4bUZJuWc+YzndcaeOudFmHu4plOcjQGdod/8gafcZY+9oHkrsZNmA1tWrEpQwJV9AJ4QkYgfpreZp9W/Hg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/debug": "^4.1.12", + "debug": "^4.4.1", + "supports-color": "^8.1.1", + "type-fest": "^4.41.0" + }, + "engines": { + "node": "^20.18.0 || ^22.12.0 || >=23.3.0" + } + }, + "node_modules/@-xun/debug/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/@-xun/debug/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@-xun/fs": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@-xun/fs/-/fs-2.0.0.tgz", + "integrity": "sha512-252CZ4OJRszsbP0n+vQRrhdFyDyEzt4NqYvJ/P2Iha4dw/jtmQvAF0wYqARPDZe7uuUG6Og0uQxMUfXFO2BQ7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^4.41.0" + }, + "engines": { + "node": "^20.18.0 || ^22.12.0 || >=23.3.0" + } + }, + "node_modules/@-xun/fs/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@11ty/chokidar-with-glob-support": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@11ty/chokidar-with-glob-support/-/chokidar-with-glob-support-1.1.0.tgz", + "integrity": "sha512-B4X9ZPBHG3j/HCT64A8a0PZMkxOj8cUSPto0L61J4KRuwX4EIuUWerggHcWc3RdUx3ih4xtvK8WGjJ4Ak7S/fQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^4.0.3", + "picomatch": "^4.0.7" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/11ty" + } + }, + "node_modules/@11ty/chokidar-with-glob-support/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@11ty/chokidar-with-glob-support/node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/@11ty/chokidar-with-glob-support/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" } }, "node_modules/@11ty/dependency-tree": { @@ -73,15 +194,16 @@ } }, "node_modules/@11ty/eleventy": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/@11ty/eleventy/-/eleventy-3.1.6.tgz", - "integrity": "sha512-ZlSiR1PLdS2lv7TelBgWAhcvMiLNZkPBlLEb+lh7kGYZ+Mk0bo9qcYgVsewvw9W7Em0RH3wd01h5fAstNDh0zA==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@11ty/eleventy/-/eleventy-3.1.7.tgz", + "integrity": "sha512-ioyq2V884tmKDxVH80OPq5cCn4IJqfV4p2BzznxNDn7o7LbA/g5RDl7zYLk5B/TUgoFyLO+dFbIawBWpAHxlyA==", "dev": true, "license": "MIT", "dependencies": { + "@11ty/chokidar-with-glob-support": "^1.1.0", "@11ty/dependency-tree": "^4.0.2", "@11ty/dependency-tree-esm": "^2.0.4", - "@11ty/eleventy-dev-server": "^2.0.8", + "@11ty/eleventy-dev-server": "^2.1.2", "@11ty/eleventy-plugin-bundle": "^3.0.7", "@11ty/eleventy-utils": "^2.0.7", "@11ty/lodash-custom": "^4.17.21", @@ -89,27 +211,26 @@ "@11ty/recursive-copy": "^4.0.4", "@sindresorhus/slugify": "^2.2.1", "bcp-47-normalize": "^2.3.0", - "chokidar": "^3.6.0", "debug": "^4.4.3", "dependency-graph": "^1.0.0", "entities": "^6.0.1", "filesize": "^10.1.6", - "gray-matter": "^4.0.3", - "iso-639-1": "^3.1.5", + "gray-matter": "npm:@11ty/gray-matter@^1.0.0", + "iso-639-1": "^3.1.6", "js-yaml": "^4.1.1", "kleur": "^4.1.5", - "liquidjs": "^10.27.0", + "liquidjs": "^10.30.0", "luxon": "^3.7.2", "markdown-it": "^14.2.0", "minimist": "^1.2.8", "moo": "0.5.2", "node-retrieve-globals": "^6.0.1", - "nunjucks": "^3.2.4", - "picomatch": "^4.0.4", + "nunjucks": "npm:@11ty/nunjucks@^3.3.0", + "picomatch": "^4.0.7", "please-upgrade-node": "^3.2.0", "posthtml": "^0.16.7", "posthtml-match-helper": "^2.0.3", - "semver": "^7.8.1", + "semver": "^7.8.5", "slugify": "^1.6.9", "tinyglobby": "^0.2.16" }, @@ -125,14 +246,14 @@ } }, "node_modules/@11ty/eleventy-dev-server": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@11ty/eleventy-dev-server/-/eleventy-dev-server-2.0.8.tgz", - "integrity": "sha512-15oC5M1DQlCaOMUq4limKRYmWiGecDaGwryr7fTE/oM9Ix8siqMvWi+I8VjsfrGr+iViDvWcH/TVI6D12d93mA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@11ty/eleventy-dev-server/-/eleventy-dev-server-2.1.2.tgz", + "integrity": "sha512-cwReJlQtIZsFuwMhm2fXwwjj+uUVvRkuoESgDtR5Mg9tY2qRj8UbNC8xhYRBuYVpACd3E09CxGPkk/Qj15Zo+A==", "dev": true, "license": "MIT", "dependencies": { + "@11ty/chokidar-with-glob-support": "^1.1.0", "@11ty/eleventy-utils": "^2.0.1", - "chokidar": "^3.6.0", "debug": "^4.4.0", "finalhandler": "^1.3.1", "mime": "^3.0.0", @@ -246,6 +367,67 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/@11ty/eleventy/node_modules/linkify-it": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.2.tgz", + "integrity": "sha512-ONTm2jCMAVZjgQa/Fy1kScXsuOoF5NPTsoFBdE1KVIZ2vAh/r9+Bqo+0jINCBYnavTPQZz38QzFTme79ENoN3Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/markdown-it" + } + ], + "license": "MIT", + "dependencies": { + "uc.micro": "^2.0.0" + } + }, + "node_modules/@11ty/eleventy/node_modules/markdown-it": { + "version": "14.3.3", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.3.3.tgz", + "integrity": "sha512-L//tDAkjTjJCU6pBUSBTgs3Kg4InVaZuUZog/b6V12UKhcDQ7S78877ibbCanRExwPuYP1CZD7Gd2dxSy1GXRg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/markdown-it" + } + ], + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1", + "entities": "^4.5.0", + "linkify-it": "^5.0.2", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" + }, + "bin": { + "markdown-it": "bin/markdown-it.mjs" + } + }, + "node_modules/@11ty/eleventy/node_modules/markdown-it/node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/@11ty/eleventy/node_modules/picomatch": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", @@ -261,6 +443,8 @@ }, "node_modules/@11ty/eleventy/node_modules/semver": { "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "dev": true, "license": "ISC", "bin": { @@ -270,6 +454,13 @@ "node": ">=10" } }, + "node_modules/@11ty/eleventy/node_modules/uc.micro": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", + "dev": true, + "license": "MIT" + }, "node_modules/@11ty/lodash-custom": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/@11ty/lodash-custom/-/lodash-custom-4.17.21.tgz", @@ -328,6 +519,8 @@ }, "node_modules/@asamuzakjp/css-color": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-3.2.0.tgz", + "integrity": "sha512-K1A6z8tS3XsmCMM86xoWdn7Fkdn9m6RSVtocUrJYIwZnFVkng/PvkEoWtOWmP+Scc6saYWHWZYbndEEXxl24jw==", "dev": true, "license": "MIT", "dependencies": { @@ -340,11 +533,15 @@ }, "node_modules/@asamuzakjp/css-color/node_modules/lru-cache": { "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", "dev": true, "license": "ISC" }, "node_modules/@babel/cli": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.29.7.tgz", + "integrity": "sha512-/75HwRbAYPqXv/Ax1h7Fg3IZfXgdU98jnA8H93/m/QBaPV3Hp5ICoLqzGYye1yHBCgpmXvtqgSUN8oOKX5tojQ==", "dev": true, "license": "MIT", "dependencies": { @@ -371,27 +568,10 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/cli/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@babel/code-frame": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", "dev": true, "license": "MIT", "dependencies": { @@ -405,6 +585,8 @@ }, "node_modules/@babel/compat-data": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz", + "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", "dev": true, "license": "MIT", "engines": { @@ -413,6 +595,8 @@ }, "node_modules/@babel/core": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz", + "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==", "dev": true, "license": "MIT", "dependencies": { @@ -440,25 +624,10 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@babel/eslint-parser": { - "version": "7.29.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1", - "eslint-visitor-keys": "^2.1.0", - "semver": "^6.3.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || >=14.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.11.0", - "eslint": "^7.5.0 || ^8.0.0 || ^9.0.0" - } - }, "node_modules/@babel/generator": { "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.8.tgz", + "integrity": "sha512-gZbepsdh3WDtgZKWL+vTPh71LSBrm/Y4/QDZBVCcYfmeTEEuoOYwlSy+G1StfJg+/Zy550u/3TATbm7qDbbMtg==", "dev": true, "license": "MIT", "dependencies": { @@ -474,6 +643,8 @@ }, "node_modules/@babel/helper-annotate-as-pure": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.29.7.tgz", + "integrity": "sha512-OoK6239jHPuSQOoS0kfTVKn0b/rVTk0seKq4Gd2UMLtmOVLjDC0ki3e+c90Trqv2gMfvJFqkiljrr568+qddiw==", "dev": true, "license": "MIT", "dependencies": { @@ -485,6 +656,8 @@ }, "node_modules/@babel/helper-compilation-targets": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz", + "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==", "dev": true, "license": "MIT", "dependencies": { @@ -500,6 +673,8 @@ }, "node_modules/@babel/helper-create-class-features-plugin": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.29.7.tgz", + "integrity": "sha512-IY3ZD9Tmooqr3TUhc3DUWxiuo8xx1DWLhd5M7hQ+ZWJamqM2BbalrBJb2MisSLoYorOj75U03qULCxQTY9r3hg==", "dev": true, "license": "MIT", "dependencies": { @@ -520,6 +695,8 @@ }, "node_modules/@babel/helper-create-regexp-features-plugin": { "version": "7.29.10", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.29.10.tgz", + "integrity": "sha512-/YY9soQuWa8TURtHXHT+GbklpbAA+dZErxFGHIr6qgDg96xuGWrTAs1+MfjgVJPF0YLQsOVsOYs8lhgsPbOinQ==", "dev": true, "license": "MIT", "dependencies": { @@ -536,6 +713,8 @@ }, "node_modules/@babel/helper-define-polyfill-provider": { "version": "0.6.8", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.8.tgz", + "integrity": "sha512-47UwBLPpQi1NoWzLuHNjRoHlYXMwIJoBf7MFou6viC/sIHWYygpvr0B6IAyh5sBdA2nr2LPIRww8lfaUVQINBA==", "dev": true, "license": "MIT", "dependencies": { @@ -551,6 +730,8 @@ }, "node_modules/@babel/helper-globals": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz", + "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", "dev": true, "license": "MIT", "engines": { @@ -559,6 +740,8 @@ }, "node_modules/@babel/helper-member-expression-to-functions": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.29.7.tgz", + "integrity": "sha512-j+7JYmk1JYDtACIGj0QJqqWZjoUpMoEikQGADMaHgCMCSDqd2+P32rfcibUNrGOMWrlzK1WJBdxrB3JJQZwWtg==", "dev": true, "license": "MIT", "dependencies": { @@ -571,6 +754,8 @@ }, "node_modules/@babel/helper-module-imports": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", + "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", "dev": true, "license": "MIT", "dependencies": { @@ -583,6 +768,8 @@ }, "node_modules/@babel/helper-module-transforms": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz", + "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==", "dev": true, "license": "MIT", "dependencies": { @@ -599,6 +786,8 @@ }, "node_modules/@babel/helper-optimise-call-expression": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.29.7.tgz", + "integrity": "sha512-+kmGVjcT9RGYzoDwdwEqEvGgKe3BYq+O1iGzjFubaNgZHwYHP6lsF2Yghf4kEuv9BV7tYDZ913aBW9am6YKong==", "dev": true, "license": "MIT", "dependencies": { @@ -610,6 +799,8 @@ }, "node_modules/@babel/helper-plugin-utils": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz", + "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==", "dev": true, "license": "MIT", "engines": { @@ -618,6 +809,8 @@ }, "node_modules/@babel/helper-remap-async-to-generator": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.29.7.tgz", + "integrity": "sha512-16AMiW26DbXWBbr3B8wNozKM0ydMLB892vaOaJW/fPJdnT8vJk5sdkQcU/isqUxyCE0cEoa8wZOcbgDuC4b6Og==", "dev": true, "license": "MIT", "dependencies": { @@ -634,6 +827,8 @@ }, "node_modules/@babel/helper-replace-supers": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.29.7.tgz", + "integrity": "sha512-atfGXWSeCiF4DnKZIfmJfQRkSw9b9gNNXR1kqKjbhG4pGYCOnkp8OcTB8E3NXjBu8NpheSnOeNKz8KT7UNFTmQ==", "dev": true, "license": "MIT", "dependencies": { @@ -650,6 +845,8 @@ }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.29.7.tgz", + "integrity": "sha512-brcMGQaVzIeUb+6/bs1Av0f8YuNNjKY2JyvfRCsFuFsdKccEQ5Ges2y74D74NZ1Rz8lKJ9ksJkfqwQFJ/iNEyQ==", "dev": true, "license": "MIT", "dependencies": { @@ -662,6 +859,8 @@ }, "node_modules/@babel/helper-string-parser": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", + "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", "dev": true, "license": "MIT", "engines": { @@ -670,6 +869,8 @@ }, "node_modules/@babel/helper-validator-identifier": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", "dev": true, "license": "MIT", "engines": { @@ -678,6 +879,8 @@ }, "node_modules/@babel/helper-validator-option": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", + "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", "dev": true, "license": "MIT", "engines": { @@ -686,6 +889,8 @@ }, "node_modules/@babel/helper-wrap-function": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.29.7.tgz", + "integrity": "sha512-iES0Skag9ERIF68aXadpO6dbXa03mNWK3sEqJaMnLNs/eC3l0lkImdfoy6Y09/SfkpawdAB4RjQ7PVA7TcVGdw==", "dev": true, "license": "MIT", "dependencies": { @@ -699,6 +904,8 @@ }, "node_modules/@babel/helpers": { "version": "7.29.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.10.tgz", + "integrity": "sha512-EMCx3AGZ3WfAl6ht7AyQoPm2Lh+BGYEMdc4Q6Hf7uSCDOZFuLq44qNwL+iaim8VlyYhRAo4X43+weadK8ZB4Yg==", "dev": true, "license": "MIT", "dependencies": { @@ -711,6 +918,8 @@ }, "node_modules/@babel/parser": { "version": "7.29.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.9.tgz", + "integrity": "sha512-CjXrNHTnvqBVqHgdBysY3vk2T8tpJHb5/RMeHJBTyVa9xgugCB0CJTx/3oO8RV2QRQP391RWpB7D6hLjm8V9uA==", "dev": true, "license": "MIT", "dependencies": { @@ -725,6 +934,8 @@ }, "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.29.7.tgz", + "integrity": "sha512-j8SrR0zLZrRsC09DlszEx8FpMiwukKffYXMK0d5LmOglO7vGG6sz/BR/20yHqWH+Lnn31JTt2PE3hIWNgM2J6w==", "dev": true, "license": "MIT", "dependencies": { @@ -740,6 +951,8 @@ }, "node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.29.7.tgz", + "integrity": "sha512-r8j8escF+U2FUHo0KOhPUdMzUO+jp9fInva6+ACVAF3Y97Ev+5iNZwiqTghmzNeWwDkOPlYuTcfb1vDaoZKmAQ==", "dev": true, "license": "MIT", "dependencies": { @@ -754,6 +967,8 @@ }, "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.29.7.tgz", + "integrity": "sha512-GE1TFSiuFeGsCxmYXZl8HwoPrVlwe4rHPFE8weieGKZqnDORK+Ar3vgWMgW+AOxQ6/2TgLSKx9p6W7O4rC6qgQ==", "dev": true, "license": "MIT", "dependencies": { @@ -768,6 +983,8 @@ }, "node_modules/@babel/plugin-bugfix-safari-rest-destructuring-rhs-array": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-rest-destructuring-rhs-array/-/plugin-bugfix-safari-rest-destructuring-rhs-array-7.29.7.tgz", + "integrity": "sha512-oBNVCvnO5tND+xSopWvV8WNGfpTfgP4Zr/YXXSj8zfmcPktp5Ku/aZlsIowgSD4fjmgHn6sGmB9APVsU5zOdhA==", "dev": true, "license": "MIT", "dependencies": { @@ -783,6 +1000,8 @@ }, "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.29.7.tgz", + "integrity": "sha512-QQt9qKHZ2sg/kivaLr7lnQr8HVrQDdBNSfCsTjiDxRuX/K5ORyKq+Bu8Xr0cDE3Dfkv0cw28Ve0EKyKMvulkOw==", "dev": true, "license": "MIT", "dependencies": { @@ -799,6 +1018,8 @@ }, "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.29.7.tgz", + "integrity": "sha512-pn6QacGLgvCcwc+syUhKE/qSjV2D1IHDB84RNxWYSt1mW3K/SCtjinZ2p0cETJxAWBjPy3K/1lHwG5BjjPxNlw==", "dev": true, "license": "MIT", "dependencies": { @@ -812,56 +1033,10 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/plugin-proposal-class-properties": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-object-rest-spread": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-proposal-private-property-in-object": { "version": "7.21.0-placeholder-for-preset-env.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", + "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", "dev": true, "license": "MIT", "engines": { @@ -871,22 +1046,10 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-throw-expressions": { - "version": "7.29.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-async-generators": { "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, "license": "MIT", "dependencies": { @@ -898,6 +1061,8 @@ }, "node_modules/@babel/plugin-syntax-bigint": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", "dev": true, "license": "MIT", "dependencies": { @@ -909,6 +1074,8 @@ }, "node_modules/@babel/plugin-syntax-class-properties": { "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, "license": "MIT", "dependencies": { @@ -920,6 +1087,8 @@ }, "node_modules/@babel/plugin-syntax-class-static-block": { "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", "dev": true, "license": "MIT", "dependencies": { @@ -934,6 +1103,8 @@ }, "node_modules/@babel/plugin-syntax-flow": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.29.7.tgz", + "integrity": "sha512-ajMX6QPcyomotqwpzhkYGxcK2i/us0rs1Qo9QvUpa+Fca0FTmqrzKrctoIYLMxcOhGZldGT/BAVkRGTWBiR8gQ==", "dev": true, "license": "MIT", "dependencies": { @@ -948,6 +1119,8 @@ }, "node_modules/@babel/plugin-syntax-import-assertions": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.29.7.tgz", + "integrity": "sha512-/An1OCBN93thpBAGyfsK2pcf0jvju1SAtKkL2Ny++B5Sy6sqgzXDQH1cZxWbF96Wuk+bn41MDA9bLd4VVAw6rw==", "dev": true, "license": "MIT", "dependencies": { @@ -962,6 +1135,8 @@ }, "node_modules/@babel/plugin-syntax-import-attributes": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.29.7.tgz", + "integrity": "sha512-zGYcYfq/WmZ4V+kBIXQon9dSSc8ircGZqw9ZaNhhGj9nZkeBu1jHLBDQqYYi5WA9uawvA2sIMbry2nCFhf5Djg==", "dev": true, "license": "MIT", "dependencies": { @@ -976,6 +1151,8 @@ }, "node_modules/@babel/plugin-syntax-import-meta": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", "dev": true, "license": "MIT", "dependencies": { @@ -987,6 +1164,8 @@ }, "node_modules/@babel/plugin-syntax-json-strings": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, "license": "MIT", "dependencies": { @@ -998,6 +1177,8 @@ }, "node_modules/@babel/plugin-syntax-jsx": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.29.7.tgz", + "integrity": "sha512-TSu8+mHCoEaaCDEZ0I3+6mvTBYR4PCxQwf2z9/r5Tbztv6NaLR3B9thGTTxX2WGuGHJqRiAbKPeGTJ5XWXVg6A==", "dev": true, "license": "MIT", "dependencies": { @@ -1012,6 +1193,8 @@ }, "node_modules/@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, "license": "MIT", "dependencies": { @@ -1023,6 +1206,8 @@ }, "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1034,6 +1219,8 @@ }, "node_modules/@babel/plugin-syntax-numeric-separator": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, "license": "MIT", "dependencies": { @@ -1045,6 +1232,8 @@ }, "node_modules/@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, "license": "MIT", "dependencies": { @@ -1056,6 +1245,8 @@ }, "node_modules/@babel/plugin-syntax-optional-catch-binding": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, "license": "MIT", "dependencies": { @@ -1067,6 +1258,8 @@ }, "node_modules/@babel/plugin-syntax-optional-chaining": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "dev": true, "license": "MIT", "dependencies": { @@ -1078,6 +1271,8 @@ }, "node_modules/@babel/plugin-syntax-private-property-in-object": { "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", "dev": true, "license": "MIT", "dependencies": { @@ -1092,6 +1287,8 @@ }, "node_modules/@babel/plugin-syntax-top-level-await": { "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "dev": true, "license": "MIT", "dependencies": { @@ -1106,6 +1303,8 @@ }, "node_modules/@babel/plugin-syntax-typescript": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.29.7.tgz", + "integrity": "sha512-ngr+82Sh0xMz25TPCZi+nC2iTzjfCdWS2ONXTp/PtSCHCgaCNBpdMqgvJ2ccdLlClVZ7sisIgB914j/JFe+RZA==", "dev": true, "license": "MIT", "dependencies": { @@ -1120,6 +1319,8 @@ }, "node_modules/@babel/plugin-syntax-unicode-sets-regex": { "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", + "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", "dev": true, "license": "MIT", "dependencies": { @@ -1135,6 +1336,8 @@ }, "node_modules/@babel/plugin-transform-arrow-functions": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.29.7.tgz", + "integrity": "sha512-N7zArUXWzAMzm+/N0uPBeVB3Fam5lMxtUwMmDK5f/IBBS7a7p1qeUoxd/6CckXoxUdgsntq1Dh8xNW06maZbDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1149,6 +1352,8 @@ }, "node_modules/@babel/plugin-transform-async-generator-functions": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.29.7.tgz", + "integrity": "sha512-d98gXZkgswvkyohMBABkhm3GeXhYj8psWfwQ2C7gtfrKGTykQa/iOIi+JJhwMjPlZ6Vm2XN+DCf3Es1EoG4ZLA==", "dev": true, "license": "MIT", "dependencies": { @@ -1165,6 +1370,8 @@ }, "node_modules/@babel/plugin-transform-async-to-generator": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.29.7.tgz", + "integrity": "sha512-pcUb2SS+RMo9TWVBwKGI5ShtoG7R+zBsFmCKDa6fe8c+hPr3XJlZgoE5j6i8W7gDjhyvy+85vmYexanvXh3d1w==", "dev": true, "license": "MIT", "dependencies": { @@ -1181,6 +1388,8 @@ }, "node_modules/@babel/plugin-transform-block-scoped-functions": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.29.7.tgz", + "integrity": "sha512-cUSmjh72N+rN4PrkFlN1dJwNCwjVp5d38/CQrEsFggkD10UiFlBFgdH3tv5dNsLuHY+3S8db2xCHjhZcv5WgvA==", "dev": true, "license": "MIT", "dependencies": { @@ -1195,6 +1404,8 @@ }, "node_modules/@babel/plugin-transform-block-scoping": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.29.7.tgz", + "integrity": "sha512-ONyr4+AZhKh8yKWInVxU9AXA9EbsyeLcL6V0dJy6M2/62vuvpGm29zzuymbTpdc451GEpDIdAyPLP3r+P61yKQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1209,6 +1420,8 @@ }, "node_modules/@babel/plugin-transform-class-properties": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.29.7.tgz", + "integrity": "sha512-GtcpjFvanPfzNQi3eTitsCqtRRmmqzpy/A+yhTR1HaZo1Ly3EA8ZXxlPyHdR8/IuRMYc3E4wdGBewB2QKQjAaA==", "dev": true, "license": "MIT", "dependencies": { @@ -1224,6 +1437,8 @@ }, "node_modules/@babel/plugin-transform-class-static-block": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.29.7.tgz", + "integrity": "sha512-kibJgmEdX2iMwsHY2tSZNDgj8PwIlCQz7FK9KuGKO8zsuoUwSEhoNnNVp/emKWrbY4HeO6kkXfdMqRKKKXBm2A==", "dev": true, "license": "MIT", "dependencies": { @@ -1239,6 +1454,8 @@ }, "node_modules/@babel/plugin-transform-classes": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.29.7.tgz", + "integrity": "sha512-qV0OGGBVacduzQHE649JyCneOFI/maT+YKsO+K4Yi3xv2wTPNjM/W2o2gdzMwEAZz7fXNTHAe0NcSg30bIN69g==", "dev": true, "license": "MIT", "dependencies": { @@ -1258,6 +1475,8 @@ }, "node_modules/@babel/plugin-transform-computed-properties": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.29.7.tgz", + "integrity": "sha512-RK7/IyU5phpuCdBAuig5VkzG/EnbDaui5SQGdU9BFrHdV+mV4cUjLMQ9lJDjLNtWHsqtiefpGZUXQP2BiTYMsA==", "dev": true, "license": "MIT", "dependencies": { @@ -1273,6 +1492,8 @@ }, "node_modules/@babel/plugin-transform-destructuring": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.29.7.tgz", + "integrity": "sha512-iPX8aD6H9zV5s7ZsqTdNocPN/MGQ5sSMnElKrktxjJRMnB2jN/1p2+R7GkfD6CAYoVFqy5A4XnSIUeGgJzIWpg==", "dev": true, "license": "MIT", "dependencies": { @@ -1288,6 +1509,8 @@ }, "node_modules/@babel/plugin-transform-dotall-regex": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.29.7.tgz", + "integrity": "sha512-3qc18hsD2RdZiyJNDNc7HQpv6xbncwh8FYtxNFFzclSyh/trPD9KkVR9BDECUjDLvb7yJVF15GfYUuC+LMkkiQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1303,6 +1526,8 @@ }, "node_modules/@babel/plugin-transform-duplicate-keys": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.29.7.tgz", + "integrity": "sha512-6IvRRriEMqnBwD6chtxdLpMYCHWEzN+oL5cyQtjykya19UgzbmKhxmhZgKC/LHxS2nYr9Q/qYPZ5Lr6jOL9+yQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1317,6 +1542,8 @@ }, "node_modules/@babel/plugin-transform-duplicate-named-capturing-groups-regex": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.29.7.tgz", + "integrity": "sha512-2wiIyo2BjtgU7HufSeDnL9L2O7zr8jmhFKuSr65VpRkUiRKRNpb0mdlk56+XPPKoIrfHqzbMuglDvZun0RISsA==", "dev": true, "license": "MIT", "dependencies": { @@ -1332,6 +1559,8 @@ }, "node_modules/@babel/plugin-transform-dynamic-import": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.29.7.tgz", + "integrity": "sha512-giOlEm/EFjfjr+te9NsdjkUo2v4f8rS/SXPumRVHAtbNcyNlvtREkU1dZzaIDclNpnaVhlCqRdFKhJBjBikzLg==", "dev": true, "license": "MIT", "dependencies": { @@ -1346,6 +1575,8 @@ }, "node_modules/@babel/plugin-transform-explicit-resource-management": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-explicit-resource-management/-/plugin-transform-explicit-resource-management-7.29.7.tgz", + "integrity": "sha512-Rstj7coNz8sE+7Ju7ihpHLI564lsK5pUpNNlvptCIC/16E/S5hbl6n3kESPKdNRmqEWlpn5xpS5Q2dvXBsySLw==", "dev": true, "license": "MIT", "dependencies": { @@ -1361,6 +1592,8 @@ }, "node_modules/@babel/plugin-transform-exponentiation-operator": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.29.7.tgz", + "integrity": "sha512-zFpMOTLZBdW5LfObqcSbL6kefg4R4eLdmvS0wbN9M6D5Mym/sKm9toOoWyVOa+xDjvCnuWcHls2YonXwHvH3CQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1375,6 +1608,8 @@ }, "node_modules/@babel/plugin-transform-export-namespace-from": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.29.7.tgz", + "integrity": "sha512-24B2nOy2TeJSMheqwPD4DDQOV/elLSIlKxjZt4i05H5AgdPdWR3n18HnNrcJ+j76WJd9gbwb9jPjNYUy6RautA==", "dev": true, "license": "MIT", "dependencies": { @@ -1389,6 +1624,8 @@ }, "node_modules/@babel/plugin-transform-flow-strip-types": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.29.7.tgz", + "integrity": "sha512-wRHeUjUjCZnMHmiO5bRgjFLcoEh7JyTdByOW11ahhwNa4V0bmeGEaIvt51yq0zQp2yWIpqfxXXPyUP6GFJZHOQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1404,6 +1641,8 @@ }, "node_modules/@babel/plugin-transform-for-of": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.29.7.tgz", + "integrity": "sha512-zeSIHh0+E1Um1WJRXCFlHQYu2ieJNdivLLjlBEp+dIBu3S51n+SZZmIXjxnItw6pz56Cn+KvK68BIBVsxq2JiQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1419,6 +1658,8 @@ }, "node_modules/@babel/plugin-transform-function-name": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.29.7.tgz", + "integrity": "sha512-otRWaHXE6fbAGkePvaj/kvs3HsqXfPhlnzwSOlnFgbqCPMd975dW+4wZ00WFBt+/YlBGcJwNrARQTOJOb4ZrIg==", "dev": true, "license": "MIT", "dependencies": { @@ -1435,6 +1676,8 @@ }, "node_modules/@babel/plugin-transform-json-strings": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.29.7.tgz", + "integrity": "sha512-RRnE2+eon1rJAq8MnoF1b5kTpY1vU88twHcvcKMrsqP/jxIRqDVs9iJB5fqPuqyeFAW0wJo4MlUIPpQCq/aRsg==", "dev": true, "license": "MIT", "dependencies": { @@ -1449,6 +1692,8 @@ }, "node_modules/@babel/plugin-transform-literals": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.29.7.tgz", + "integrity": "sha512-DZ/oLP21ZuWx1vKqnoNv6/tvEK48AQOBRai40CX9dTjGluvT/YZCyY3rryDtyUqCEoyNroy5KKPwX2iQCiRvyw==", "dev": true, "license": "MIT", "dependencies": { @@ -1463,6 +1708,8 @@ }, "node_modules/@babel/plugin-transform-logical-assignment-operators": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.29.7.tgz", + "integrity": "sha512-A0H91hh6W8MFRkp5TqJmMr39jzGD1A1E1Ysiv2O06Sfbhkapm+XyIzxWCEh5kqwOZ1/8QZ0dY3SeQ7XBqfJd5Q==", "dev": true, "license": "MIT", "dependencies": { @@ -1477,6 +1724,8 @@ }, "node_modules/@babel/plugin-transform-member-expression-literals": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.29.7.tgz", + "integrity": "sha512-hl1kwFZCCiDyfH25Xmco9jTrkPgnS9pmOzSG7W5I4SaGbLeqKv417hcU2RKmaxoPEgsoJh7ZPOrnPGq99bHoUg==", "dev": true, "license": "MIT", "dependencies": { @@ -1491,6 +1740,8 @@ }, "node_modules/@babel/plugin-transform-modules-amd": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.29.7.tgz", + "integrity": "sha512-fxtQoH3m5ywUSIfaH0FGCzWu4McsYon5bD3K4XnskC7f+OyQMj7rsOMi4NvvmJ83WwBAg4UCe+ov4VZlqEvyew==", "dev": true, "license": "MIT", "dependencies": { @@ -1506,6 +1757,8 @@ }, "node_modules/@babel/plugin-transform-modules-commonjs": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.29.7.tgz", + "integrity": "sha512-j0vCldybPC5b5dwCQOJ21uKtHzt7hxLygJTg9eF1ScfaikEDNfzn94XoW5Fi+seBR0nCyL23xaBFFkq7dTM8XQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1521,6 +1774,8 @@ }, "node_modules/@babel/plugin-transform-modules-systemjs": { "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.29.8.tgz", + "integrity": "sha512-6iSnEK0zlkLKU4heofK/AdmRD4e2SHVpJMtrwnTCzhnaM98ria4rTrOXBBi45BTTYnJtO8txnPsX4fChYXkmeA==", "dev": true, "license": "MIT", "dependencies": { @@ -1538,6 +1793,8 @@ }, "node_modules/@babel/plugin-transform-modules-umd": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.29.7.tgz", + "integrity": "sha512-B4UkaTK3QpgCwJnrxKfMPKdo92CN7OKXAlpAAnM3UPu0Q0lCCk57ylA9AJbRy2v8dDKOPAAWcoR6CMyeoHwRCA==", "dev": true, "license": "MIT", "dependencies": { @@ -1553,6 +1810,8 @@ }, "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.29.7.tgz", + "integrity": "sha512-vuFoLwr4qnv2xbZ16SQd6uPcH5FNrLHhk/Jzo++0XJFcaDsr4gjJVg6j398oMHiC+83k/GiBzviwF5KBJkPUtQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1568,6 +1827,8 @@ }, "node_modules/@babel/plugin-transform-new-target": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.29.7.tgz", + "integrity": "sha512-fEo41GmsOUhOBlw8ioo6zvjX5Xc2Lqkzlyfqbpsk3eB6TReV18uhxZ0esfEokVbY2+PVJAQHNKxER6lGrzNd3A==", "dev": true, "license": "MIT", "dependencies": { @@ -1582,6 +1843,8 @@ }, "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.29.7.tgz", + "integrity": "sha512-idmp1dFaekP9GbcMvG24Kvw2BfhFZjHnNJCkV4WuIY4PskJzwI3f1N5OdgYke38T7rftO6ERulFRn2cFeZwRkg==", "dev": true, "license": "MIT", "dependencies": { @@ -1596,6 +1859,8 @@ }, "node_modules/@babel/plugin-transform-numeric-separator": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.29.7.tgz", + "integrity": "sha512-zR7fv/z14OjgHl4AgRtkDBvBMhIzCxqV/qN/2BCRC7LjFwvuzjYe7gDWxC4Wl/SNsLM6SE1IWvRPYMgSJaUvNw==", "dev": true, "license": "MIT", "dependencies": { @@ -1610,6 +1875,8 @@ }, "node_modules/@babel/plugin-transform-object-rest-spread": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.29.7.tgz", + "integrity": "sha512-Ld98jn4c0smUywL57m7SgsHq3OpThOa6LqZJif3G6jYOovPleoFhVrBJ1WegRApSFB2wu4+RelAj9AC9G08Z4A==", "dev": true, "license": "MIT", "dependencies": { @@ -1628,6 +1895,8 @@ }, "node_modules/@babel/plugin-transform-object-super": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.29.7.tgz", + "integrity": "sha512-Ea/diGcw0twB5IlZPO5sgET6fJsLJqPABqTuFWIR+iMPGPZJkATEIWx0wa+aEQ5UY1CBQyP/gkAiLEqn1vBiQA==", "dev": true, "license": "MIT", "dependencies": { @@ -1643,6 +1912,8 @@ }, "node_modules/@babel/plugin-transform-optional-catch-binding": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.29.7.tgz", + "integrity": "sha512-sLsyndxK2VwX6yNUOakMb7Sh553ZTe/vVM1XJ+9Z5aW1ytsc8xOIwmyk05NNjN60vkc5/KqoTH6hB4V41LJhng==", "dev": true, "license": "MIT", "dependencies": { @@ -1657,6 +1928,8 @@ }, "node_modules/@babel/plugin-transform-optional-chaining": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.29.7.tgz", + "integrity": "sha512-6GM1dhvK3gNODkXcEcMCOLEDCLSoZ/sBbro2Ax8HURyasQ4NshagQixkRFdh5niI6E4gmA/jYI/4aT7rRos3ZQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1672,6 +1945,8 @@ }, "node_modules/@babel/plugin-transform-parameters": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.29.7.tgz", + "integrity": "sha512-ZDOBqV/qLYJI0YElr8DcENEyARsFQeESqWXH6gZlghYXuPPjvweuDhP4VyEi4BlUBlLRFZVjxoZDMjxhLW766g==", "dev": true, "license": "MIT", "dependencies": { @@ -1686,6 +1961,8 @@ }, "node_modules/@babel/plugin-transform-private-methods": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.29.7.tgz", + "integrity": "sha512-/6Rz4DK1ETDEM/bWHsPHcaEe7ZaT1EqSXjtSP/L0DijOYuaUhiRiOKcwpZ8P7zR4xXEHc2ITdiCgBm9Tpyv9ug==", "dev": true, "license": "MIT", "dependencies": { @@ -1701,6 +1978,8 @@ }, "node_modules/@babel/plugin-transform-private-property-in-object": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.29.7.tgz", + "integrity": "sha512-+BNo06dnrzdNNqCm1X6YUaVv0DKk8Q+JYcoZfOkLhYWNCXzlwTSRq8zGWayT1csjcpNXV9CQTBRRbmTLZac5cA==", "dev": true, "license": "MIT", "dependencies": { @@ -1717,6 +1996,8 @@ }, "node_modules/@babel/plugin-transform-property-literals": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.29.7.tgz", + "integrity": "sha512-bOMRLQuI0A5ZqHq3OWJ89/rXpJ/NJrbVhXiP4zwPGMs6kpcVsuTUNjwoE30K0Qm3mf48a/TnRYYD6vPNqcg6jA==", "dev": true, "license": "MIT", "dependencies": { @@ -1731,6 +2012,8 @@ }, "node_modules/@babel/plugin-transform-react-display-name": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.29.7.tgz", + "integrity": "sha512-+1wdDMGNb4UPeY3Q4L5yLiYe6TXPXubs4NjrgRFw13hPRLJfEMw2Q5OXkee6/IfdqePIeW4Jjwe3aBh7SdKz4Q==", "dev": true, "license": "MIT", "dependencies": { @@ -1745,6 +2028,8 @@ }, "node_modules/@babel/plugin-transform-react-jsx": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.29.7.tgz", + "integrity": "sha512-WsZulLVBUHXVj2cUcPVx6UE21TpalB6bHbSFErKT0Ib++ax24jjXe73FqlWvdylFOjiuPHYi6VCcgRad1ItN+A==", "dev": true, "license": "MIT", "dependencies": { @@ -1763,6 +2048,8 @@ }, "node_modules/@babel/plugin-transform-react-jsx-development": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.29.7.tgz", + "integrity": "sha512-Xfy3UVMF04+ypnFbkhvfqtmvwfe92qwQdbGZVonhE+6v35GzlofmOnA1szaZqzb9xYWr0nl1e5EMmzi0DNON1g==", "dev": true, "license": "MIT", "dependencies": { @@ -1777,6 +2064,8 @@ }, "node_modules/@babel/plugin-transform-react-pure-annotations": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.29.7.tgz", + "integrity": "sha512-H5E+HBgDpr6Q5t+Aj11tL7XkIui1jhbIoArVQnqjgXo5/3YxkN7ZEBcWF4RQlB0T4rrxJQbXS6kiFV6B7XTqUA==", "dev": true, "license": "MIT", "dependencies": { @@ -1792,6 +2081,8 @@ }, "node_modules/@babel/plugin-transform-regenerator": { "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.29.8.tgz", + "integrity": "sha512-0UpIXPtdDtMXfnV2OJAVMLpj3H/92vmkA6lpSRakmycJvj3VUy6Xs1dM8tXRugupykr5WB+LpiVl0J8LMVg2mg==", "dev": true, "license": "MIT", "dependencies": { @@ -1806,6 +2097,8 @@ }, "node_modules/@babel/plugin-transform-regexp-modifiers": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regexp-modifiers/-/plugin-transform-regexp-modifiers-7.29.7.tgz", + "integrity": "sha512-mB5Fs0VWrJ42ZCmc8114v60qetdaUVNkj9PmSZRmanCZM3S9hm0CFRLjRmYIsuXav14l2jvZ+4T8iiCGnhj3nQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1821,6 +2114,8 @@ }, "node_modules/@babel/plugin-transform-reserved-words": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.29.7.tgz", + "integrity": "sha512-5+YhdpVgmfSmwZyLMftfaiffLRMHjzIRHFHHLdibcSyJm2pasMrKHrO3Ptrt2DRshjvpgjEJJ1zVW14WPq/6QA==", "dev": true, "license": "MIT", "dependencies": { @@ -1833,27 +2128,10 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-runtime": { - "version": "7.29.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7", - "babel-plugin-polyfill-corejs2": "^0.4.14", - "babel-plugin-polyfill-corejs3": "^0.13.0", - "babel-plugin-polyfill-regenerator": "^0.6.5", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-transform-shorthand-properties": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.29.7.tgz", + "integrity": "sha512-I+WYbGBAiCn7nA6xBrlgPH+MB7HWb4u8pv5S0Pv7OtwNvIFvCCb24YlttKEeUFVurfBCEaOTnuhlqsb7f0Z5Dg==", "dev": true, "license": "MIT", "dependencies": { @@ -1868,6 +2146,8 @@ }, "node_modules/@babel/plugin-transform-spread": { "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.29.8.tgz", + "integrity": "sha512-4S9ksMGVWUshvgK0mKfvZky7leuG5/uoFVwMpAomJ8bMoDJiNHRVmc1EglwW/CmGVSqqWpEbXm9FmbRit22qoA==", "dev": true, "license": "MIT", "dependencies": { @@ -1883,6 +2163,8 @@ }, "node_modules/@babel/plugin-transform-sticky-regex": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.29.7.tgz", + "integrity": "sha512-BCHzNYJGe9l7EpwwDBN/ztlL2NYFFq8hp9ddjtUEM9f2O7S7kKV/lL6Fwo7IF7NSkYhPK2vO+86nIGltA90MsA==", "dev": true, "license": "MIT", "dependencies": { @@ -1897,6 +2179,8 @@ }, "node_modules/@babel/plugin-transform-template-literals": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.29.7.tgz", + "integrity": "sha512-NCSEJ4sLFU2gqAub45HYh4fus2yQ36rr6ei6vpU7NdoJqCpxvEG8E6eJpscGyXP3VHD2Ny+fSXr04k1hoUrFqA==", "dev": true, "license": "MIT", "dependencies": { @@ -1911,6 +2195,8 @@ }, "node_modules/@babel/plugin-transform-typeof-symbol": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.29.7.tgz", + "integrity": "sha512-223mNGoTkBiTEWFoK+Q6Go3tueMRclO8vxxxxquNCYuNI4jWOofFKJRRDu6SDrB8Sgo1UEGW9T4GAQ8ZyRso1A==", "dev": true, "license": "MIT", "dependencies": { @@ -1925,6 +2211,8 @@ }, "node_modules/@babel/plugin-transform-unicode-escapes": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.29.7.tgz", + "integrity": "sha512-jCfXxSjf94lf4E0hKE0AByxF6F3/pVFqRdUUNkDJhsY0m1ZKjnN6ZYyMeHNpzflxb/0q5b7t3p+BE+SLF1WOtA==", "dev": true, "license": "MIT", "dependencies": { @@ -1939,6 +2227,8 @@ }, "node_modules/@babel/plugin-transform-unicode-property-regex": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.29.7.tgz", + "integrity": "sha512-OgZ+zoAJgZLUCunsTRQ5LAjOywDv5zzZ2/hQ5aMw1pGXyY2rtE8/chXYUmu3AlVHKpm10KEdG9aMwbI/K76ZGw==", "dev": true, "license": "MIT", "dependencies": { @@ -1954,6 +2244,8 @@ }, "node_modules/@babel/plugin-transform-unicode-regex": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.29.7.tgz", + "integrity": "sha512-7D/x/23/d/3VqZ0QA+LGbZMlGwZjztBygSWWWsfTPoQ1oQ6Q1P6Mr3d0kk42XabyUVw+fha3LqdRsFqeKqvCyA==", "dev": true, "license": "MIT", "dependencies": { @@ -1969,6 +2261,8 @@ }, "node_modules/@babel/plugin-transform-unicode-sets-regex": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.29.7.tgz", + "integrity": "sha512-BLOhLht9DOJwIxlmp91wHvkXv1lguuHS3/FwUO8HL1H0u8s4hR1gASVFyilu9iGtcTRYqjTZmlsFFeQletntEg==", "dev": true, "license": "MIT", "dependencies": { @@ -1984,6 +2278,8 @@ }, "node_modules/@babel/preset-env": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.29.7.tgz", + "integrity": "sha512-GYzX36n1nsciIb0uyH0GHwxwtNwPQIcpxSeiVLDtG/B7jB5xXgchnmL1f/jCX5o+pwnaDBtO60ONSJhEBJfxYA==", "dev": true, "license": "MIT", "dependencies": { @@ -2066,36 +2362,10 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/preset-env/node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.14.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.8", - "core-js-compat": "^3.48.0" - }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/@babel/preset-flow": { - "version": "7.29.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/helper-validator-option": "^7.29.7", - "@babel/plugin-transform-flow-strip-types": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-modules": { - "version": "0.1.6-no-external-plugins", + "node_modules/@babel/preset-modules": { + "version": "0.1.6-no-external-plugins", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz", + "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==", "dev": true, "license": "MIT", "dependencies": { @@ -2109,6 +2379,8 @@ }, "node_modules/@babel/preset-react": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.29.7.tgz", + "integrity": "sha512-C+PV1TFUPTmBQGoPBL8j2QmLpZ117YTCwxIZeJOM96GbYMFSc7/pOXU5lVykwnZxyTqQxRsvoRk6f2FktZgGHA==", "dev": true, "license": "MIT", "dependencies": { @@ -2128,6 +2400,9 @@ }, "node_modules/@babel/runtime": { "version": "7.29.10", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.10.tgz", + "integrity": "sha512-NpugTzbKgGrNe45Ui32cN8vCFFMxVtP/9rtfwv0nP5FRDAjvYBxJcLVpYA9mr1jxP6cnIT7x9LUzuDTbWYYNRA==", + "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -2135,6 +2410,8 @@ }, "node_modules/@babel/template": { "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", + "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", "dev": true, "license": "MIT", "dependencies": { @@ -2148,6 +2425,8 @@ }, "node_modules/@babel/traverse": { "version": "7.29.10", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.10.tgz", + "integrity": "sha512-B3lYAs2nkKskbgQ1nfy8Ma9ao9Q1rntTAQHrzzyDuj+TSO+X3le6PfWwqDvodsb+OumE10eMFfuMCTQSQ5iuIQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2165,6 +2444,8 @@ }, "node_modules/@babel/types": { "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.8.tgz", + "integrity": "sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==", "dev": true, "license": "MIT", "dependencies": { @@ -2177,11 +2458,15 @@ }, "node_modules/@bcoe/v8-coverage": { "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true, "license": "MIT" }, "node_modules/@csstools/color-helpers": { "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.1.0.tgz", + "integrity": "sha512-S11EXWJyy0Mz5SYvRmY8nJYTFFd1LCNV+7cXyAgQtOOuzb4EsgfqDufL+9esx72/eLhsRdGZwaldu/h+E4t4BA==", "dev": true, "funding": [ { @@ -2200,6 +2485,8 @@ }, "node_modules/@csstools/css-calc": { "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-2.1.4.tgz", + "integrity": "sha512-3N8oaj+0juUw/1H3YwmDDJXCgTB1gKU6Hc/bB502u9zR0q2vd786XJH9QfrKIEgFlZmhZiq6epXl4rHqhzsIgQ==", "dev": true, "funding": [ { @@ -2222,6 +2509,8 @@ }, "node_modules/@csstools/css-color-parser": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.1.0.tgz", + "integrity": "sha512-nbtKwh3a6xNVIp/VRuXV64yTKnb1IjTAEEh3irzS+HkKjAOYLTGNb9pmVNntZ8iVBHcWDA2Dof0QtPgFI1BaTA==", "dev": true, "funding": [ { @@ -2248,6 +2537,8 @@ }, "node_modules/@csstools/css-parser-algorithms": { "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.5.tgz", + "integrity": "sha512-DaDeUkXZKjdGhgYaHNJTV9pV7Y9B3b644jCLs9Upc3VeNGg6LWARAT6O+Q+/COo+2gg/bM5rhpMAtf70WqfBdQ==", "dev": true, "funding": [ { @@ -2269,6 +2560,8 @@ }, "node_modules/@csstools/css-tokenizer": { "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.4.tgz", + "integrity": "sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==", "dev": true, "funding": [ { @@ -2286,11 +2579,13 @@ } }, "node_modules/@discoveryjs/json-ext": { - "version": "0.5.7", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.6.3.tgz", + "integrity": "sha512-4B4OijXeVNOPZlYA2oEwWOTkzyltLao+xbotHQeqN++Rv27Y6s818+n2Qkp8q+Fxhn0t/5lA5X1Mxktud8eayQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=10.0.0" + "node": ">=14.17.0" } }, "node_modules/@emnapi/core": { @@ -2327,8 +2622,17 @@ "tslib": "^2.4.0" } }, + "node_modules/@epic-web/invariant": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@epic-web/invariant/-/invariant-1.0.0.tgz", + "integrity": "sha512-lrTPqgvfFQtR/eY/qkIzp98OGdNJu0m5ji3q/nJI8v3SXkRKEnWiOxMmbvcSoAIzv/cGiuvRy57k4suKQSAdwA==", + "dev": true, + "license": "MIT" + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz", + "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==", "dev": true, "license": "MIT", "dependencies": { @@ -2344,19 +2648,10 @@ "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, - "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/@eslint-community/regexpp": { "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", "dev": true, "license": "MIT", "engines": { @@ -2365,6 +2660,8 @@ }, "node_modules/@eslint/eslintrc": { "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2387,11 +2684,15 @@ }, "node_modules/@eslint/eslintrc/node_modules/argparse": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true, "license": "Python-2.0" }, "node_modules/@eslint/eslintrc/node_modules/js-yaml": { "version": "4.3.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz", + "integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==", "dev": true, "funding": [ { @@ -2413,6 +2714,8 @@ }, "node_modules/@eslint/js": { "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", "dev": true, "license": "MIT", "engines": { @@ -2421,6 +2724,9 @@ }, "node_modules/@humanwhocodes/config-array": { "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -2434,6 +2740,8 @@ }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -2446,11 +2754,16 @@ }, "node_modules/@humanwhocodes/object-schema": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", "dev": true, "license": "BSD-3-Clause" }, "node_modules/@img/colour": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz", + "integrity": "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==", "license": "MIT", "optional": true, "engines": { @@ -2459,6 +2772,8 @@ }, "node_modules/@img/sharp-darwin-arm64": { "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.35.5.tgz", + "integrity": "sha512-QRUlFQ0WxvdWyqqG/WtI3iupfD5rBzmCHXSdPsY91sAtVtTo7Q4cb6zOccZ3gqEqkr0f1As1ehLqmEpDsRf+lg==", "cpu": [ "arm64" ], @@ -2477,156 +2792,743 @@ "@img/sharp-libvips-darwin-arm64": "1.3.4" } }, - "node_modules/@img/sharp-libvips-darwin-arm64": { - "version": "1.3.4", + "node_modules/@img/sharp-darwin-x64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.35.5.tgz", + "integrity": "sha512-+BR255RhDlpygUpOc/Jdt1nT6DQ3XG/ERo5wbcdOf5Q320dKtPCKPLR1LJs9VGXRaMa8l1uUa0tkCNOXiAxZUw==", "cpu": [ - "arm64" + "x64" ], - "license": "LGPL-3.0-or-later", + "license": "Apache-2.0", "optional": true, "os": [ "darwin" ], + "engines": { + "node": ">=20.9.0" + }, "funding": { "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-x64": "1.3.4" } }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "dev": true, - "license": "ISC", + "node_modules/@img/sharp-freebsd-wasm32": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-freebsd-wasm32/-/sharp-freebsd-wasm32-0.35.5.tgz", + "integrity": "sha512-Y/z91nEZ4uIBX5X3nfTovjU9lHNKFYbL2lpHCLVNmXQK03VIZvXBBt0KxbPGp2SdGSF+2mQU4e+hQaWOt86iAw==", + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + "@img/sharp-wasm32": "0.35.5" }, "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.4.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" + "node": ">=20.9.0" }, "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" + "url": "https://opencollective.com/libvips" } }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.2.2" - }, - "engines": { - "node": ">=12" - }, + "node_modules/@img/sharp-libvips-darwin-arm64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.3.4.tgz", + "integrity": "sha512-5R89nBYiRdUlSWJxPhO+GVtaXzXSxKnRu/xqMn3KTA3L9EB9Oy/P+Nn2f2vlhPuUdy/Zusb2DarbyTpGCfEDuw==", + "cpu": [ + "arm64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "url": "https://opencollective.com/libvips" } }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" + "node_modules/@img/sharp-libvips-darwin-x64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.3.4.tgz", + "integrity": "sha512-iR2OKH80yi0U+dUplyh3/xdpFvps6YkCwsXenIJxqxR1v9o+xtKTGbS9H7cps+2Vxjc8B1j96p75NmTGjIhtpQ==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" } }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" + "node_modules/@img/sharp-libvips-linux-arm": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.3.4.tgz", + "integrity": "sha512-LmRtTsOHuvM2+wlO2Db37dx5MiZhB0FvSunciw48YjdOkZz9KAiRbm8ujeMOA1INqmei5NapFxYEK1D1ZSidmw==", + "cpu": [ + "arm" + ], + "libc": [ + "glibc" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" } }, - "node_modules/@jest/console": { - "version": "30.5.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.5.1", - "@types/node": "*", - "chalk": "^4.1.2", - "jest-message-util": "30.5.1", - "jest-util": "30.5.1", - "slash": "^3.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + "node_modules/@img/sharp-libvips-linux-arm64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.3.4.tgz", + "integrity": "sha512-Y3dgX/6lE2QhQb+Gxy0WZxfg9MEm/JBjamZpS2IklP7xIQoKN4hzAm7KcMVGtaVDt3neE9OKBC7vAfonA/Lr1A==", + "cpu": [ + "arm64" + ], + "libc": [ + "glibc" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" } }, - "node_modules/@jest/console/node_modules/slash": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" + "node_modules/@img/sharp-libvips-linux-ppc64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.3.4.tgz", + "integrity": "sha512-Le6boB8Tai0Nis+gIxIpKx68UDVVIqdR8Tin5Yf1z2LJJQLDJvCDRqRu+jC2qCoD+eIomonmOwB4smBRxfVpYQ==", + "cpu": [ + "ppc64" + ], + "libc": [ + "glibc" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" } }, - "node_modules/@jest/core": { - "version": "30.5.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "30.5.2", - "@jest/pattern": "30.5.0", - "@jest/reporters": "30.5.2", - "@jest/test-result": "30.5.2", - "@jest/transform": "30.5.2", - "@jest/types": "30.5.1", - "@types/node": "*", - "ansi-escapes": "^4.3.2", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "exit-x": "^0.2.2", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.11", - "jest-changed-files": "30.5.1", - "jest-config": "30.5.2", - "jest-haste-map": "30.5.1", - "jest-message-util": "30.5.1", - "jest-regex-util": "30.5.0", - "jest-resolve": "30.5.1", - "jest-resolve-dependencies": "30.5.2", - "jest-runner": "30.5.2", - "jest-runtime": "30.5.2", - "jest-snapshot": "30.5.2", - "jest-util": "30.5.1", - "jest-validate": "30.5.1", - "jest-watcher": "30.5.2", - "pretty-format": "30.5.1", - "slash": "^3.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } + "node_modules/@img/sharp-libvips-linux-riscv64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.3.4.tgz", + "integrity": "sha512-aHkkIEHPRdQEegJN20MLmGtxYD9R2wQr3Cwpddnu5+YKMt6Uzax7S9h5gpZTo8wyrGuZSlfQ63OevL5mTyOC7Q==", + "cpu": [ + "riscv64" + ], + "libc": [ + "glibc" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-s390x": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.3.4.tgz", + "integrity": "sha512-ra/mB6MikESDUO7Yg+Mi95bFBb9GsObURuhnOv3OqknjGe9sZrG8tCe9q0xSIGrtLgvgw0gKnFWcK4blSgQOuQ==", + "cpu": [ + "s390x" + ], + "libc": [ + "glibc" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-x64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.3.4.tgz", + "integrity": "sha512-GJ//SSXbnwSDes02umB3nDJLFcQzw8a18V8fyhqr6tV515tOEMdImjjxj1AoafMRz56F3PHgftnj1QEKSU1zkw==", + "cpu": [ + "x64" + ], + "libc": [ + "glibc" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-arm64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.3.4.tgz", + "integrity": "sha512-hvulFwtjUcagsis6BBxHwGFwWoNZjgYmULGVrZcyfNbjA8hKILbRxGg15/7w5HDyXHXUos/j6baAWqnCyQ2DWA==", + "cpu": [ + "arm64" + ], + "libc": [ + "musl" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-x64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.3.4.tgz", + "integrity": "sha512-6zXKeE/p39I1AmA3cJG35eyBGNqNddLnUXjhwBnsGjFPWqf5VKkDBEqaEkPDoTEtkxwi2vv8Tcr2mDyP4So7Fg==", + "cpu": [ + "x64" + ], + "libc": [ + "musl" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-linux-arm": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.35.5.tgz", + "integrity": "sha512-LEaXK2WdXVK5ykcw0buWyPMsmLLL2vpHLD6yrNSW+JGEL3BZPA4tpKN6iaMc4AxTTAoaX/sU1rOL51lcIz48ZQ==", + "cpu": [ + "arm" + ], + "libc": [ + "glibc" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm": "1.3.4" + } + }, + "node_modules/@img/sharp-linux-arm64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.35.5.tgz", + "integrity": "sha512-LYVx5JTsOM2CBzmxreh+nl64/3H6Xb09iSLknqH47z2T2DFFxDeFLP5y4dJwe6H7uGQlHPyEEtIqyo3DYsRwdQ==", + "cpu": [ + "arm64" + ], + "libc": [ + "glibc" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm64": "1.3.4" + } + }, + "node_modules/@img/sharp-linux-ppc64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.35.5.tgz", + "integrity": "sha512-QVxAAq8evVRI9ia2vqgwrmWucn5Dfv+JdWzj75pD8omHLPSP7f8p20O8jxzjCcuCEQEOtYOZUmX1hkiZ0kdevA==", + "cpu": [ + "ppc64" + ], + "libc": [ + "glibc" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-ppc64": "1.3.4" + } + }, + "node_modules/@img/sharp-linux-riscv64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.35.5.tgz", + "integrity": "sha512-LtdreXguaavKODPIfzJ4kffx7UNt1omwtK0rch4EBbbSTXPnxWmYSayXdLJw0fJzQ97kHt1gL/yh4tvU+nCyRQ==", + "cpu": [ + "riscv64" + ], + "libc": [ + "glibc" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-riscv64": "1.3.4" + } + }, + "node_modules/@img/sharp-linux-s390x": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.35.5.tgz", + "integrity": "sha512-UZasTOFiYzotTsGOCu42BfUzP6Tu6Do/947iRm1RsLKvlllxwGcn4RN27LibGWceix4Y+Pmw3jsnTcCQIgWjqA==", + "cpu": [ + "s390x" + ], + "libc": [ + "glibc" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-s390x": "1.3.4" + } + }, + "node_modules/@img/sharp-linux-x64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.35.5.tgz", + "integrity": "sha512-SxFtLTeJInhAA9Q836kux2vZNeOBQEx658qvbboZScr0wIARym3IcGmW7KpVD5sbVg0Ojy+udFQdayYIZyoNog==", + "cpu": [ + "x64" + ], + "libc": [ + "glibc" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-x64": "1.3.4" + } + }, + "node_modules/@img/sharp-linuxmusl-arm64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.35.5.tgz", + "integrity": "sha512-9HbMclmI1zlNkFRs3z9/eBtDjfD0sGlrX1z6b1qwmiFY5ElDLh4BC0LPBdVp7z1DXFiKlIcznf+ZlsuZzLxQqg==", + "cpu": [ + "arm64" + ], + "libc": [ + "musl" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-arm64": "1.3.4" + } + }, + "node_modules/@img/sharp-linuxmusl-x64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.35.5.tgz", + "integrity": "sha512-4KOphqB035HrVdqLZfCgMzzERrQkkzOwRhl4OAkRO1YCldbaFjySXMaK534Mo0V+LndnlJk+sbUyLeU0ULyD1A==", + "cpu": [ + "x64" + ], + "libc": [ + "musl" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-x64": "1.3.4" + } + }, + "node_modules/@img/sharp-wasm32": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.35.5.tgz", + "integrity": "sha512-Ptsga1su4tQx+LLF1ECS9U6nz5kmrXKo6XVbtR48Ke3ZRxxgaWBu7IDtEe1quo8hiupwm6WFqxVlXaSf7IINGQ==", + "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", + "optional": true, + "dependencies": { + "@emnapi/runtime": "^1.11.3" + }, + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-wasm32/node_modules/@emnapi/runtime": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz", + "integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==", + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@img/sharp-webcontainers-wasm32": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-webcontainers-wasm32/-/sharp-webcontainers-wasm32-0.35.5.tgz", + "integrity": "sha512-hfhF/FmoQyTUkA0bIKFOtw536BQSeBMe6BF6QyWlrPxT754+TFLaZ7sKKTfvvM0yJgKgaYTwnFCIZ/GuDw5SUA==", + "cpu": [ + "wasm32" + ], + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@img/sharp-wasm32": "0.35.5" + }, + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-arm64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.35.5.tgz", + "integrity": "sha512-X4t7g+7ZA5DKblCBEXGjUqqemj4vczING/5viFwAL8h4N3qYeyjwdCvRLHi4EdOUI+2Z7UFlp1VM+p/AuEtm6Q==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-ia32": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.35.5.tgz", + "integrity": "sha512-5Zm82LoBc43nhwNybZlG7Y1KO//Zhsn306fQl29ZOuStHLGTo3BWL83q3cznX0poxSAMuYL1On/BHBxkBeKr6A==", + "cpu": [ + "ia32" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-x64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.35.5.tgz", + "integrity": "sha512-x76eH0vEiHlcMQu8Y8IenntaACtddpT6W0wmXtWrnKcnKI7ME5DdgqhAD6SEWOEl1v2zDvkZDhFA9KnURwpfqg==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.4.0.tgz", + "integrity": "sha512-KzTVk2tCWAHtYrvvvaP8bJKJq2pVinhLcGEQdtLIYPbmNGNyYe8QwNaTUYQp2J7/vIsUKt5QCqAfUkYyG9DkOw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.6.tgz", + "integrity": "sha512-+Sg6GCR/wy1oSmQDFq4LQDAhm3ETKnorxN+y5nbLULOR3P0c14f2Wurzj3/xqPXtasLFfHd5iRFQ7AJt4KH2cw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-30.5.2.tgz", + "integrity": "sha512-e8sQC4pCMHPBrPX7Hk8TJr+DM5dkUnImSTNag8SEWFAFAF6xIz4AJvCKapnrdHnZxep4bxw4PhG+ZbimYBMyKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "30.5.1", + "@types/node": "*", + "chalk": "^4.1.2", + "jest-message-util": "30.5.1", + "jest-util": "30.5.1", + "slash": "^3.0.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/console/node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/core": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-30.5.2.tgz", + "integrity": "sha512-/jqvFWoJF7LV1a6AUpYMbMm+2yIYsHJfR474H0SCzr9k8tnO/jl9wRg6zSG6lxgf6EozNlCG4amFzWsbZSvvZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "30.5.2", + "@jest/pattern": "30.5.0", + "@jest/reporters": "30.5.2", + "@jest/test-result": "30.5.2", + "@jest/transform": "30.5.2", + "@jest/types": "30.5.1", + "@types/node": "*", + "ansi-escapes": "^4.3.2", + "chalk": "^4.1.2", + "ci-info": "^4.2.0", + "exit-x": "^0.2.2", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.11", + "jest-changed-files": "30.5.1", + "jest-config": "30.5.2", + "jest-haste-map": "30.5.1", + "jest-message-util": "30.5.1", + "jest-regex-util": "30.5.0", + "jest-resolve": "30.5.1", + "jest-resolve-dependencies": "30.5.2", + "jest-runner": "30.5.2", + "jest-runtime": "30.5.2", + "jest-snapshot": "30.5.2", + "jest-util": "30.5.1", + "jest-validate": "30.5.1", + "jest-watcher": "30.5.2", + "pretty-format": "30.5.1", + "slash": "^3.0.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, "node_modules/@jest/core/node_modules/ansi-styles": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "license": "MIT", "engines": { @@ -2638,6 +3540,8 @@ }, "node_modules/@jest/core/node_modules/pretty-format": { "version": "30.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.5.1.tgz", + "integrity": "sha512-byhRAPguVKMQIj4kjJwJ5lAskVhfuiSdiYl/aLTWpgkGEmic2jYhJh1yE9ih8Ox44Xg9ccCT11/S6QrzSJuNrg==", "dev": true, "license": "MIT", "dependencies": { @@ -2652,6 +3556,8 @@ }, "node_modules/@jest/core/node_modules/slash": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, "license": "MIT", "engines": { @@ -2660,6 +3566,8 @@ }, "node_modules/@jest/diff-sequences": { "version": "30.5.0", + "resolved": "https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.5.0.tgz", + "integrity": "sha512-OsqBjHXCn8cadasoAZBP6nWYvMsRhpMzGXTpxJ5aO04NlbdhIz+FVe3q49l0AwVhsz/cEmIpBes6gAFl1/dWQg==", "dev": true, "license": "MIT", "engines": { @@ -2668,6 +3576,8 @@ }, "node_modules/@jest/environment": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-30.5.2.tgz", + "integrity": "sha512-nwFPOUMbmsjNNRCpnJpB9HbSZu4C07wDDds++5j+j1MezzPLxMPDdbdUVjr2o4RULDOValnDd70taPFI1EtxAg==", "dev": true, "license": "MIT", "dependencies": { @@ -2682,6 +3592,8 @@ }, "node_modules/@jest/environment-jsdom-abstract": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/environment-jsdom-abstract/-/environment-jsdom-abstract-30.5.2.tgz", + "integrity": "sha512-8/P+8hKv7L4mhFoB6gpYLj/fuzXk8PWrde7TDHh8tJz5pE1ktlMbg0y6hDY/V8MfAnispFlPl/vPifowLy3JGQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2708,6 +3620,8 @@ }, "node_modules/@jest/expect": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-30.5.2.tgz", + "integrity": "sha512-2E+1Pg6jJxbRjLNLpciC71iri/3qsKJL222/aXJEFwC0VdUSvfS+JZQQLEVjUYYc8t8pQu2MGE3cF2+bNTYRsg==", "dev": true, "license": "MIT", "dependencies": { @@ -2720,6 +3634,8 @@ }, "node_modules/@jest/expect-utils": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.5.2.tgz", + "integrity": "sha512-d/HOLSrJUlBIl6n3LzOa7cjW3xdePm5H5gQw2lixZ/0h157l9sw3mLblzFqnPcTbhDzhRQdBOX3A3KcG73nm5Q==", "dev": true, "license": "MIT", "dependencies": { @@ -2731,6 +3647,8 @@ }, "node_modules/@jest/fake-timers": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-30.5.2.tgz", + "integrity": "sha512-GKk0h0tKT5SpDPxDhPg3r9mm5s8/YCBzVNMOGdRiQXwUiMsjU10mVPlMaQstH6/cu50vOb8N9oQUMETHuwwxKw==", "dev": true, "license": "MIT", "dependencies": { @@ -2747,6 +3665,8 @@ }, "node_modules/@jest/get-type": { "version": "30.5.0", + "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.5.0.tgz", + "integrity": "sha512-9/2VUPitAjmBzbvDvqrxmvB7BzWsBW0WmkkojX1ODuxX1NLGxx9gfaZpHB0z8DtJ9uhGNmZG/VXBhf8uO0OV8Q==", "dev": true, "license": "MIT", "engines": { @@ -2755,6 +3675,8 @@ }, "node_modules/@jest/globals": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-30.5.2.tgz", + "integrity": "sha512-62zfS+dL+M5aTNHXCNLyqD+j4oqxTIzDYrZbpqMP8Yn+gvlAGyzC6BSPNb1ZmFOakV1RtFYX/O3FCQXSWmQdgg==", "dev": true, "license": "MIT", "dependencies": { @@ -2769,6 +3691,8 @@ }, "node_modules/@jest/pattern": { "version": "30.5.0", + "resolved": "https://registry.npmjs.org/@jest/pattern/-/pattern-30.5.0.tgz", + "integrity": "sha512-HdNQYSdRTEBNrginaqzQtTjG0HRMfrra/z6Ok7uL3S87vSlarIVohEsJsSj5edu3MiHoHjAkvPROz5ZjoKai+w==", "dev": true, "license": "MIT", "dependencies": { @@ -2782,17 +3706,23 @@ "node_modules/@jest/react-is-18": { "name": "react-is", "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true, "license": "MIT" }, "node_modules/@jest/react-is-19": { "name": "react-is", - "version": "19.3.0", + "version": "19.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.3.1.tgz", + "integrity": "sha512-RRieF6IyxQBkcK6pP8xOHprLTPW6QjRkbGdImtqNme+/hYVwCZkLQLdlZGOhUqXwkS9IEynaGvPJtv6XB/cz0Q==", "dev": true, "license": "MIT" }, "node_modules/@jest/reporters": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-30.5.2.tgz", + "integrity": "sha512-ev6E9iG73twQcfAfoTnviuYkr3yOrYbzAtMFCimv2fxHXPIp9PBt2u1wNMt0aYWgl8FPwIcS8oqRJg6alnht4Q==", "dev": true, "license": "MIT", "dependencies": { @@ -2834,6 +3764,8 @@ }, "node_modules/@jest/reporters/node_modules/balanced-match": { "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", "dev": true, "license": "MIT", "engines": { @@ -2842,6 +3774,8 @@ }, "node_modules/@jest/reporters/node_modules/brace-expansion": { "version": "5.0.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", + "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2853,6 +3787,8 @@ }, "node_modules/@jest/reporters/node_modules/glob": { "version": "13.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", + "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -2869,6 +3805,8 @@ }, "node_modules/@jest/reporters/node_modules/minimatch": { "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -2883,6 +3821,8 @@ }, "node_modules/@jest/reporters/node_modules/slash": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, "license": "MIT", "engines": { @@ -2891,6 +3831,8 @@ }, "node_modules/@jest/schemas": { "version": "30.5.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.5.0.tgz", + "integrity": "sha512-/hunigyNpc4RCjC0VaW3f5RCUZVM2+WQ65qP7z083Gmvac7or2LI50XVNOtE4YPgBpV0yxYiAgorAPGniCoJmg==", "dev": true, "license": "MIT", "dependencies": { @@ -2902,6 +3844,8 @@ }, "node_modules/@jest/snapshot-utils": { "version": "30.5.1", + "resolved": "https://registry.npmjs.org/@jest/snapshot-utils/-/snapshot-utils-30.5.1.tgz", + "integrity": "sha512-V3wnxNtiVmw5PPVg433Cn3VdXnsOeu/ofLw3KC04Bn2y1wIlU5kozXQn48rhrgj/02LrCVtntTEF1yBha0XSUw==", "dev": true, "license": "MIT", "dependencies": { @@ -2916,6 +3860,8 @@ }, "node_modules/@jest/source-map": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-30.5.2.tgz", + "integrity": "sha512-c5CehvkbfHX6yyNg7bMn2ylqlp9AHXuZ/3hPH/Lh5bxD/vefd/lV9HBjMqXef9yQNqkdwyZvkLSVSwB38hy8Qw==", "dev": true, "license": "MIT", "dependencies": { @@ -2930,6 +3876,8 @@ }, "node_modules/@jest/test-result": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-30.5.2.tgz", + "integrity": "sha512-eO6YU5rsLfs60ne694e0IAmRgeBnoA8mu0nlxXDbl/1j5km0o2vO9/VbbUIKIH+WRKKEI+ELgwraRGn2Lhep8g==", "dev": true, "license": "MIT", "dependencies": { @@ -2944,6 +3892,8 @@ }, "node_modules/@jest/test-sequencer": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-30.5.2.tgz", + "integrity": "sha512-bmij8jZyYAC47ExT2GeP7PcrlwSNS+Bp3KeRuBH88gpcxqDv6fljN8PemS4J/lLZ79xb6mpaennQTTq0zUAVVg==", "dev": true, "license": "MIT", "dependencies": { @@ -2958,6 +3908,8 @@ }, "node_modules/@jest/test-sequencer/node_modules/slash": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, "license": "MIT", "engines": { @@ -2966,6 +3918,8 @@ }, "node_modules/@jest/transform": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-30.5.2.tgz", + "integrity": "sha512-LBGwmaE886C41jDZ65eqR1YbXM7642MK3ZhTowZd5+xDlrDLuf4ePuDdDmVSvcr8NTVJ3MqxLkMbUCzuigUaoQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2990,6 +3944,8 @@ }, "node_modules/@jest/transform/node_modules/slash": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, "license": "MIT", "engines": { @@ -2998,6 +3954,8 @@ }, "node_modules/@jest/types": { "version": "30.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.5.1.tgz", + "integrity": "sha512-LvVYn83nnXPl+Rg98nvcFgjx6nRMTArhSn6RAX/w3ELn54S8A42TYZvsCMdGUqTM8S0wyXbtlQdU6Hi6dykj9g==", "dev": true, "license": "MIT", "dependencies": { @@ -3015,6 +3973,8 @@ }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", "dev": true, "license": "MIT", "dependencies": { @@ -3024,6 +3984,8 @@ }, "node_modules/@jridgewell/remapping": { "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3033,6 +3995,8 @@ }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, "license": "MIT", "engines": { @@ -3041,6 +4005,8 @@ }, "node_modules/@jridgewell/source-map": { "version": "0.3.11", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.11.tgz", + "integrity": "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==", "dev": true, "license": "MIT", "dependencies": { @@ -3050,11 +4016,15 @@ }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", "dev": true, "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", "dev": true, "license": "MIT", "dependencies": { @@ -3085,11 +4055,15 @@ } }, "node_modules/@next/env": { - "version": "16.4.0", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@next/env/-/env-16.4.2.tgz", + "integrity": "sha512-nTUTFH7G5/J/fmpkjVLegOkqyKOP0CEsJcMsyO4UCYeN1su+YMW/MfaSErnJskL7XM+UDK6aTvslxsRCyya/sA==", "license": "MIT" }, "node_modules/@next/swc-darwin-arm64": { - "version": "16.4.0", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-16.4.2.tgz", + "integrity": "sha512-ONkhFvZNFWlsEHOM/81AtxdyuJP2KRYKYR0JxPwvcu1AuPMMMgcL+wW2luldJvMtZwKtUxoSkCychW5wIeoYSw==", "cpu": [ "arm64" ], @@ -3102,22 +4076,142 @@ "node": ">= 10" } }, + "node_modules/@next/swc-darwin-x64": { + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-16.4.2.tgz", + "integrity": "sha512-luPCMbOsCoaF+kXJEUjmjmOZg1lC3BflhmUu+ZmW4tBu2vW/4AXak8JBFvePizGkxVmNiAw/r9ra+6UviCWtWQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-gnu": { + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-16.4.2.tgz", + "integrity": "sha512-xhwFTAncJyaCNy5KqKKuKaIIdCy1/1ZV1s5S1G0hhT7wGMkDTlfJ6aQbfRFnIG/s3/kDrxQ8aycVe+c5QnP8ow==", + "cpu": [ + "arm64" + ], + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-musl": { + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-16.4.2.tgz", + "integrity": "sha512-T1PNmfbPcxr5ndtWUL/3wQtLXsz808lq6sc2GrNT5k2oquF7UyqZddHSuAewHVsWsGXe6nsl9HoN1YNriVjuSg==", + "cpu": [ + "arm64" + ], + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-gnu": { + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-16.4.2.tgz", + "integrity": "sha512-N9cDUOCGtkJG5PNKDFZUF3xXndrJJcpLp121uAGjIGvO/U2p9tfdNOM9htj7+5f72l0m8rMw/cvYacUJBQoudg==", + "cpu": [ + "x64" + ], + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-musl": { + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-16.4.2.tgz", + "integrity": "sha512-yY2uh1YhX6ufuYy2FCbw1dqblbhI57GLYAJfCkqD9auTv6pLrH67Uccjc3QMKBeCYAG6lkgu08ExmX1bbjejjQ==", + "cpu": [ + "x64" + ], + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-arm64-msvc": { + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-16.4.2.tgz", + "integrity": "sha512-j/ArWRIHpMMB6wYLMhr2puTguBt70lNU/Cmjl9p6dTDE8DGknYJMP9PdwPk2dqpCNL/KIX9yfngDvIesxJPmsg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-x64-msvc": { + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-16.4.2.tgz", + "integrity": "sha512-AA4edyWHDko3NCSo0x6GomsdgFb0oR1J3MXU1b5xt6FRFg4AucrMPW3S0hCe/9onU0O1BbpGQBsqo1r0Gneu1g==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, "node_modules/@nicolo-ribaudo/chokidar-2": { "version": "2.1.8-no-fsevents.3", + "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz", + "integrity": "sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==", "dev": true, "license": "MIT", "optional": true }, - "node_modules/@nicolo-ribaudo/eslint-scope-5-internals": { - "version": "5.1.1-v1", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-scope": "5.1.1" - } - }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "license": "MIT", "dependencies": { @@ -3130,6 +4224,8 @@ }, "node_modules/@nodelib/fs.stat": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, "license": "MIT", "engines": { @@ -3138,6 +4234,8 @@ }, "node_modules/@nodelib/fs.walk": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "license": "MIT", "dependencies": { @@ -3150,6 +4248,8 @@ }, "node_modules/@parcel/watcher": { "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.6.0.tgz", + "integrity": "sha512-7FNeNl8NCE7aINx7WXiKQrPYZWC/hvrTsmk6zmxbI7LTXE7hVek/n8AfVgpe2y82zl3w0HvCHN0bVKMBoJcC0w==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -3204,6 +4304,8 @@ }, "node_modules/@parcel/watcher-darwin-arm64": { "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.6.0.tgz", + "integrity": "sha512-Y3QV0gl7Q1zbfueunkWIERICbEojQFCgpyG7YqOGNFLsckXyI1xu9mAIUpKY9QBYzBtSkN8dBPwd3yiAO9ovMw==", "cpu": [ "arm64" ], @@ -3451,6 +4553,8 @@ }, "node_modules/@parcel/watcher/node_modules/picomatch": { "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", "dev": true, "license": "MIT", "engines": { @@ -3462,6 +4566,8 @@ }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", "dev": true, "license": "MIT", "optional": true, @@ -3471,6 +4577,8 @@ }, "node_modules/@pkgr/core": { "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.3.6.tgz", + "integrity": "sha512-SEeaJLb3qBNF/OaXnaR1NmmBbFYk1zC0ZH/52fATcRPLFg/p791YrcyFFy44Bo9sLaGuSuLp5Q6axbb/O+v/RA==", "dev": true, "license": "MIT", "engines": { @@ -3482,18 +4590,37 @@ }, "node_modules/@polka/url": { "version": "1.0.0-next.29", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.29.tgz", + "integrity": "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==", "dev": true, "license": "MIT" }, "node_modules/@react-native/normalize-colors": { - "version": "0.74.89", + "version": "0.88.0", + "resolved": "https://registry.npmjs.org/@react-native/normalize-colors/-/normalize-colors-0.88.0.tgz", + "integrity": "sha512-eZCu3tGAQCfvMCPQJVY4dmoMX8ZZYBvqIGHX7lwOYyzNK+Dl8e5ky7ZoXub1Rq75oSrQXNNmSP2CDjNNXXZpFQ==", "license": "MIT" }, "node_modules/@sinclair/typebox": { "version": "0.34.52", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.52.tgz", + "integrity": "sha512-XiMQh7qqVlxZzcVD+kkGMNGMzcTrDMLWI7S4x7z1MkCkbDPrekpZXEUK0eZqZFMuHQg2a2DZOcDIh9o5v3Gonw==", "dev": true, "license": "MIT" }, + "node_modules/@sindresorhus/merge-streams": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz", + "integrity": "sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@sindresorhus/slugify": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@sindresorhus/slugify/-/slugify-2.2.1.tgz", @@ -3555,6 +4682,8 @@ }, "node_modules/@sinonjs/commons": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -3563,6 +4692,8 @@ }, "node_modules/@sinonjs/fake-timers": { "version": "15.4.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-15.4.0.tgz", + "integrity": "sha512-DsG+8/LscQIQg68J6Ef3dv10u6nVyetYn923s3/sus5eaGfTo1of5WMZSLf0UJc9KDuKPilPH0UDJCjvNbDNCA==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -3571,6 +4702,8 @@ }, "node_modules/@swc/helpers": { "version": "0.5.23", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.23.tgz", + "integrity": "sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.8.0" @@ -3578,6 +4711,8 @@ }, "node_modules/@testing-library/dom": { "version": "10.4.2", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.2.tgz", + "integrity": "sha512-yzr2S9HyAIdhz2/6qHgbs665Q7PKVcDF05vsOlHPxG1mo36gKVesdYVeDLnXgfjJ03CrKRk08knc6+E/9m8v2Q==", "dev": true, "license": "MIT", "peer": true, @@ -3597,6 +4732,8 @@ }, "node_modules/@testing-library/react": { "version": "16.3.3", + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-16.3.3.tgz", + "integrity": "sha512-Uo193NgQbPMz6lrrhtRQQFcMC6Re/ELLFbbuVL30WDlZxlpZf9/lMHTAVxPRLw1q1iu9OJmR1c2BLiENRstdBg==", "dev": true, "license": "MIT", "dependencies": { @@ -3634,12 +4771,16 @@ }, "node_modules/@types/aria-query": { "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", + "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", "dev": true, "license": "MIT", "peer": true }, "node_modules/@types/babel__core": { "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, "license": "MIT", "dependencies": { @@ -3652,6 +4793,8 @@ }, "node_modules/@types/babel__generator": { "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", "dev": true, "license": "MIT", "dependencies": { @@ -3660,6 +4803,8 @@ }, "node_modules/@types/babel__template": { "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", "dev": true, "license": "MIT", "dependencies": { @@ -3669,33 +4814,42 @@ }, "node_modules/@types/babel__traverse": { "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.28.2" } }, - "node_modules/@types/babel-plugin-tester": { - "version": "9.0.10", + "node_modules/@types/debug": { + "version": "4.1.13", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.13.tgz", + "integrity": "sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==", "dev": true, "license": "MIT", "dependencies": { - "@types/babel__core": "*", - "@types/prettier": "^2.0.0" + "@types/ms": "*" } }, "node_modules/@types/estree": { "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", "dev": true, "license": "MIT" }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true, "license": "MIT" }, "node_modules/@types/istanbul-lib-report": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", "dev": true, "license": "MIT", "dependencies": { @@ -3704,6 +4858,8 @@ }, "node_modules/@types/istanbul-reports": { "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3712,6 +4868,8 @@ }, "node_modules/@types/jsdom": { "version": "21.1.7", + "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-21.1.7.tgz", + "integrity": "sha512-yOriVnggzrnQ3a9OKOCxaVuSug3w3/SbOj5i7VwXWZEyUNl3bLF9V3MfxGbZKuwqJOQyRfqXyROBB1CoZLFWzA==", "dev": true, "license": "MIT", "dependencies": { @@ -3722,17 +4880,23 @@ }, "node_modules/@types/json-schema": { "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true, "license": "MIT" }, "node_modules/@types/linkify-it": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==", "dev": true, "license": "MIT", "peer": true }, "node_modules/@types/markdown-it": { "version": "14.2.0", + "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.2.0.tgz", + "integrity": "sha512-NoQ2yGlLWj4wpxMs+TYmRKk3thDrQ97agr7sFqfLsAlvoS8SNQuTrlObhFqG9iugdTtgOE9jpJ6FNM4ZGsa5xQ==", "dev": true, "license": "MIT", "peer": true, @@ -3743,45 +4907,47 @@ }, "node_modules/@types/mdurl": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==", "dev": true, "license": "MIT", "peer": true }, - "node_modules/@types/minimist": { - "version": "1.2.5", + "node_modules/@types/ms": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", + "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==", "dev": true, "license": "MIT" }, "node_modules/@types/node": { - "version": "26.6.4", + "version": "26.6.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.5.tgz", + "integrity": "sha512-uMzsv9stDdofIZBx4UGh4Z9ZgXnGC9seRDscilBcTHAeOFk67MZg/k9bWVfO+bk4qZmG+l52hRnLwUiH2LnJTg==", "dev": true, "license": "MIT", "dependencies": { "undici-types": "~8.9.0" } }, - "node_modules/@types/normalize-package-data": { - "version": "2.4.4", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/prettier": { - "version": "2.7.3", - "dev": true, - "license": "MIT" - }, "node_modules/@types/stack-utils": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", "dev": true, "license": "MIT" }, "node_modules/@types/tough-cookie": { "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", + "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", "dev": true, "license": "MIT" }, "node_modules/@types/yargs": { "version": "17.0.35", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.35.tgz", + "integrity": "sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==", "dev": true, "license": "MIT", "dependencies": { @@ -3790,11 +4956,15 @@ }, "node_modules/@types/yargs-parser": { "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", "dev": true, "license": "MIT" }, "node_modules/@ungap/structured-clone": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.4.0.tgz", + "integrity": "sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==", "dev": true, "license": "ISC" }, @@ -3828,6 +4998,8 @@ }, "node_modules/@unrs/resolver-binding-darwin-arm64": { "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.12.2.tgz", + "integrity": "sha512-u9DiNT1auQMO20A9SyTuG3wUgQWB9Z7KjAg0uFuCDR1FsAY8A0CG2S6JpHS1xwm/w1G08bjXZDcyOCjv1WAm2w==", "cpu": [ "arm64" ], @@ -4141,6 +5313,8 @@ }, "node_modules/@webassemblyjs/ast": { "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", + "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4150,21 +5324,29 @@ }, "node_modules/@webassemblyjs/floating-point-hex-parser": { "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", + "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", "dev": true, "license": "MIT" }, "node_modules/@webassemblyjs/helper-api-error": { "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", + "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", "dev": true, "license": "MIT" }, "node_modules/@webassemblyjs/helper-buffer": { "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", + "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", "dev": true, "license": "MIT" }, "node_modules/@webassemblyjs/helper-numbers": { "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", + "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", "dev": true, "license": "MIT", "dependencies": { @@ -4175,11 +5357,15 @@ }, "node_modules/@webassemblyjs/helper-wasm-bytecode": { "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", + "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", "dev": true, "license": "MIT" }, "node_modules/@webassemblyjs/helper-wasm-section": { "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", + "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", "dev": true, "license": "MIT", "dependencies": { @@ -4191,6 +5377,8 @@ }, "node_modules/@webassemblyjs/ieee754": { "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", + "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", "dev": true, "license": "MIT", "dependencies": { @@ -4199,6 +5387,8 @@ }, "node_modules/@webassemblyjs/leb128": { "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", + "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -4207,11 +5397,15 @@ }, "node_modules/@webassemblyjs/utf8": { "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", + "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", "dev": true, "license": "MIT" }, "node_modules/@webassemblyjs/wasm-edit": { "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", + "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4227,6 +5421,8 @@ }, "node_modules/@webassemblyjs/wasm-gen": { "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", + "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", "dev": true, "license": "MIT", "dependencies": { @@ -4239,6 +5435,8 @@ }, "node_modules/@webassemblyjs/wasm-opt": { "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", + "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", "dev": true, "license": "MIT", "dependencies": { @@ -4250,6 +5448,8 @@ }, "node_modules/@webassemblyjs/wasm-parser": { "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", + "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4261,65 +5461,42 @@ "@webassemblyjs/utf8": "1.13.2" } }, - "node_modules/@webassemblyjs/wast-printer": { - "version": "1.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.14.1", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webpack-cli/configtest": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "peerDependencies": { - "webpack": "4.x.x || 5.x.x", - "webpack-cli": "4.x.x" - } - }, - "node_modules/@webpack-cli/info": { - "version": "1.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "envinfo": "^7.7.3" - }, - "peerDependencies": { - "webpack-cli": "4.x.x" - } - }, - "node_modules/@webpack-cli/serve": { - "version": "1.7.0", + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", + "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", "dev": true, "license": "MIT", - "peerDependencies": { - "webpack-cli": "4.x.x" - }, - "peerDependenciesMeta": { - "webpack-dev-server": { - "optional": true - } + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@xtuc/long": "4.2.2" } }, "node_modules/@xtuc/ieee754": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", "dev": true, "license": "BSD-3-Clause" }, "node_modules/@xtuc/long": { "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", "dev": true, "license": "Apache-2.0" }, "node_modules/a-sync-waterfall": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz", + "integrity": "sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA==", "dev": true, "license": "MIT" }, "node_modules/acorn": { "version": "8.19.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.19.0.tgz", + "integrity": "sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==", "dev": true, "license": "MIT", "bin": { @@ -4331,6 +5508,8 @@ }, "node_modules/acorn-jsx": { "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, "license": "MIT", "peerDependencies": { @@ -4339,6 +5518,8 @@ }, "node_modules/acorn-walk": { "version": "8.3.5", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.5.tgz", + "integrity": "sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==", "dev": true, "license": "MIT", "dependencies": { @@ -4350,26 +5531,18 @@ }, "node_modules/agent-base": { "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", "dev": true, "license": "MIT", "engines": { "node": ">= 14" } }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/ajv": { "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", "dev": true, "license": "MIT", "dependencies": { @@ -4385,6 +5558,8 @@ }, "node_modules/ajv-formats": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4401,6 +5576,8 @@ }, "node_modules/ajv-formats/node_modules/ajv": { "version": "8.20.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", "dev": true, "license": "MIT", "dependencies": { @@ -4416,19 +5593,15 @@ }, "node_modules/ajv-formats/node_modules/json-schema-traverse": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true, "license": "MIT" }, - "node_modules/ajv-keywords": { - "version": "3.5.2", - "dev": true, - "license": "MIT", - "peerDependencies": { - "ajv": "^6.9.1" - } - }, "node_modules/ansi-escapes": { "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4443,6 +5616,8 @@ }, "node_modules/ansi-escapes/node_modules/type-fest": { "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { @@ -4454,6 +5629,8 @@ }, "node_modules/ansi-regex": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "license": "MIT", "engines": { @@ -4462,6 +5639,8 @@ }, "node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "license": "MIT", "dependencies": { @@ -4476,6 +5655,8 @@ }, "node_modules/anymatch": { "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "license": "ISC", "dependencies": { @@ -4488,6 +5669,8 @@ }, "node_modules/argparse": { "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "license": "MIT", "dependencies": { @@ -4496,6 +5679,8 @@ }, "node_modules/aria-query": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", "dev": true, "license": "Apache-2.0", "peer": true, @@ -4505,6 +5690,8 @@ }, "node_modules/array-buffer-byte-length": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", + "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", "dev": true, "license": "MIT", "dependencies": { @@ -4520,6 +5707,8 @@ }, "node_modules/array-includes": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.2.0.tgz", + "integrity": "sha512-VXY5eFRarnXcYxwBjJzPmEhH55+rmP79/+ueDhi0F+TuqfHCItagIHqxeUZrmgrOPa31QTh9H85DjX3FfJ0FTg==", "dev": true, "license": "MIT", "dependencies": { @@ -4539,16 +5728,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array-union": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/array.prototype.findlast": { "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", + "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4568,6 +5751,8 @@ }, "node_modules/array.prototype.flat": { "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", + "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", "dev": true, "license": "MIT", "dependencies": { @@ -4585,6 +5770,8 @@ }, "node_modules/array.prototype.flatmap": { "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", + "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", "dev": true, "license": "MIT", "dependencies": { @@ -4602,6 +5789,8 @@ }, "node_modules/array.prototype.tosorted": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz", + "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==", "dev": true, "license": "MIT", "dependencies": { @@ -4617,6 +5806,8 @@ }, "node_modules/arraybuffer.prototype.slice": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", + "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4635,20 +5826,16 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/arrify": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/asap": { "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", "license": "MIT" }, "node_modules/async-function": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", + "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", "dev": true, "license": "MIT", "engines": { @@ -4657,6 +5844,8 @@ }, "node_modules/available-typed-arrays": { "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4669,35 +5858,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/babel-eslint": { - "version": "10.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.0", - "@babel/traverse": "^7.7.0", - "@babel/types": "^7.7.0", - "eslint-visitor-keys": "^1.0.0", - "resolve": "^1.12.0" - }, - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "eslint": ">= 4.12.1" - } - }, - "node_modules/babel-eslint/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=4" - } - }, "node_modules/babel-jest": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-30.5.2.tgz", + "integrity": "sha512-ES8WeJ2fNWPEDunyAtUfJ12nHyaWUloCHdkfK2oW5uSoQSUmjNKdWiGaXJITJwvFEWoD/evHEg/QoCXAvLaQqQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4718,6 +5882,8 @@ }, "node_modules/babel-jest/node_modules/slash": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, "license": "MIT", "engines": { @@ -4725,44 +5891,94 @@ } }, "node_modules/babel-loader": { - "version": "8.4.1", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-10.1.1.tgz", + "integrity": "sha512-JwKSzk2kjIe7mgPK+/lyZ2QAaJcpahNAdM+hgR2HI8D0OJVkdj8Rl6J3kaLYki9pwF7P2iWnD8qVv80Lq1ABtg==", "dev": true, "license": "MIT", "dependencies": { - "find-cache-dir": "^3.3.1", - "loader-utils": "^2.0.4", - "make-dir": "^3.1.0", - "schema-utils": "^2.6.5" + "find-up": "^5.0.0" }, "engines": { - "node": ">= 8.9" + "node": "^18.20.0 || ^20.10.0 || >=22.0.0" }, "peerDependencies": { - "@babel/core": "^7.0.0", - "webpack": ">=2" + "@babel/core": "^7.12.0 || ^8.0.0-beta.1", + "@rspack/core": "^1.0.0 || ^2.0.0-0", + "webpack": ">=5.61.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "webpack": { + "optional": true + } } }, - "node_modules/babel-loader/node_modules/make-dir": { - "version": "3.1.0", + "node_modules/babel-loader/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "license": "MIT", "dependencies": { - "semver": "^6.0.0" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/babel-plugin-add-module-exports": { - "version": "1.0.4", + "node_modules/babel-loader/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/babel-loader/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/babel-plugin-fully-specified": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/babel-plugin-fully-specified/-/babel-plugin-fully-specified-1.3.1.tgz", + "integrity": "sha512-f2N7F2SLqeG/UuLxYxjwToHUUYEq0ed5PcThIqPWmARxOU3bDaXd8ynL8+rf67y/O7ZSWcCIxgacKTJ38JKJwQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@babel/core": "*" + } }, "node_modules/babel-plugin-istanbul": { "version": "8.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-8.0.0.tgz", + "integrity": "sha512-18wCskrN3DgbuBmp1gr7LBGT8xdz5xhQQqFvFhVxbkl8VBCrMKQ2YtqBWtUal1Zrc1HTuX0011+Brjw78TCFkg==", "dev": true, "license": "BSD-3-Clause", "workspaces": [ @@ -4781,6 +5997,8 @@ }, "node_modules/babel-plugin-jest-hoist": { "version": "30.5.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-30.5.0.tgz", + "integrity": "sha512-gtGo1B+u14jrZQv6TdSWIWkTqclboo7Qn+dFAGUOIuXLFuJKAdg3U5MIWzZnW4vfUb4dX9skmAMiby86e/SF4A==", "dev": true, "license": "MIT", "dependencies": { @@ -4792,6 +6010,8 @@ }, "node_modules/babel-plugin-polyfill-corejs2": { "version": "0.4.17", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.17.tgz", + "integrity": "sha512-aTyf30K/rqAsNwN76zYrdtx8obu0E4KoUME29B1xj+B3WxgvWkp943vYQ+z8Mv3lw9xHXMHpvSPOBxzAkIa94w==", "dev": true, "license": "MIT", "dependencies": { @@ -4804,12 +6024,14 @@ } }, "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.13.0", + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.14.2.tgz", + "integrity": "sha512-coWpDLJ410R781Npmn/SIBZEsAetR4xVi0SxLMXPaMO4lSf1MwnkGYMtkFxew0Dn8B3/CpbpYxN0JCgg8mn67g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.5", - "core-js-compat": "^3.43.0" + "@babel/helper-define-polyfill-provider": "^0.6.8", + "core-js-compat": "^3.48.0" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" @@ -4817,6 +6039,8 @@ }, "node_modules/babel-plugin-polyfill-regenerator": { "version": "0.6.8", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.8.tgz", + "integrity": "sha512-M762rNHfSF1EV3SLtnCJXFoQbbIIz0OyRwnCmV0KPC7qosSfCO0QLTSuJX3ayAebubhE6oYBAYPrBA5ljowaZg==", "dev": true, "license": "MIT", "dependencies": { @@ -4830,42 +6054,85 @@ "resolved": "packages/babel-plugin-react-native-web", "link": true }, + "node_modules/babel-plugin-syntax-hermes-parser": { + "version": "0.37.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-hermes-parser/-/babel-plugin-syntax-hermes-parser-0.37.0.tgz", + "integrity": "sha512-7I9T16lJTjHG6JhHOmM/iqO/UGGQwAcAAD4/tsk+GSjPf9bbusBsPlz1scyGehImMfH1Yopbj0aQYxhTAHdcdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "hermes-parser": "0.37.0" + } + }, "node_modules/babel-plugin-tester": { - "version": "10.1.0", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-tester/-/babel-plugin-tester-12.0.0.tgz", + "integrity": "sha512-V3ZFYmXPV9fm3ArpLHbvh0R5IfwnyFwlvdZ2FFQ49af4seC10U0JDWssjhXInuDDli6hyQsoOybGFSTCovrGyA==", "dev": true, "license": "MIT", "dependencies": { - "@types/babel-plugin-tester": "^9.0.0", + "@-xun/fs": "^2.0.0", + "core-js": "^3.43.0", "lodash.mergewith": "^4.6.2", - "prettier": "^2.0.1", - "strip-indent": "^3.0.0" + "prettier": "^3.5.3", + "pretty-format": "^30.0.0", + "rejoinder": "^2.0.1", + "strip-indent~3": "npm:strip-indent@^3.0.0", + "type-fest": "^4.41.0" }, "engines": { - "node": ">=10.13", - "npm": ">=6" + "node": "^20.18.0 || ^22.12.0 || >=23.3.0" }, "peerDependencies": { - "@babel/core": "^7.11.6" + "@babel/core": ">=7.22.0" } }, - "node_modules/babel-plugin-tester/node_modules/strip-indent": { - "version": "3.0.0", + "node_modules/babel-plugin-tester/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/babel-plugin-tester/node_modules/pretty-format": { + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.5.1.tgz", + "integrity": "sha512-byhRAPguVKMQIj4kjJwJ5lAskVhfuiSdiYl/aLTWpgkGEmic2jYhJh1yE9ih8Ox44Xg9ccCT11/S6QrzSJuNrg==", "dev": true, "license": "MIT", "dependencies": { - "min-indent": "^1.0.0" + "@jest/react-is-18": "npm:react-is@^18.3.1", + "@jest/react-is-19": "npm:react-is@^19.2.5", + "@jest/schemas": "30.5.0", + "ansi-styles": "^5.2.0" }, "engines": { - "node": ">=8" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/babel-plugin-transform-react-remove-prop-types": { - "version": "0.4.24", + "node_modules/babel-plugin-tester/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", "dev": true, - "license": "MIT" + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/babel-preset-current-node-syntax": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz", + "integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==", "dev": true, "license": "MIT", "dependencies": { @@ -4891,6 +6158,8 @@ }, "node_modules/babel-preset-jest": { "version": "30.5.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-30.5.0.tgz", + "integrity": "sha512-ZGPn5ClP4lBDpuOK8W1yQIOy359HmbnZv3suucAlIe+SEE9yDsxV4S2PjSbH2Vc97U+WmzYD7vw3kr8NsQ/i6w==", "dev": true, "license": "MIT", "dependencies": { @@ -4906,11 +6175,15 @@ }, "node_modules/balanced-match": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true, "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.11.27", + "version": "2.11.29", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.29.tgz", + "integrity": "sha512-YeesxhUmR4h5y5V8KF8iBCqJb8YFrBJ++XBTeGcWIaQOYXGN19JM0FoiOjAhwuDoln8owMgXcWBmgHtYSkky2w==", "license": "Apache-2.0", "bin": { "baseline-browser-mapping": "dist/cli.cjs" @@ -4965,18 +6238,13 @@ "resolved": "packages/benchmarks", "link": true }, - "node_modules/big.js": { - "version": "5.2.2", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, "node_modules/binary-extensions": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, "license": "MIT", + "optional": true, "engines": { "node": ">=8" }, @@ -4986,11 +6254,15 @@ }, "node_modules/boolbase": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", "dev": true, "license": "ISC" }, "node_modules/brace-expansion": { "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", "dev": true, "license": "MIT", "dependencies": { @@ -5000,6 +6272,8 @@ }, "node_modules/braces": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "license": "MIT", "dependencies": { @@ -5011,6 +6285,8 @@ }, "node_modules/browserslist": { "version": "4.29.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.29.3.tgz", + "integrity": "sha512-1R4kiYKXGViqEN0CnoDrXc1StD9niAwu+j2dukWzrD4bJgsD4lDmEp0CRbc6E/vYJIfTHwPmwyaKtVSudICdPA==", "dev": true, "funding": [ { @@ -5042,20 +6318,26 @@ } }, "node_modules/bser": { - "version": "2.1.1", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.2.tgz", + "integrity": "sha512-V2o8YS2EhrKMO9AumnkK0ynynfFlsajpYupwq7S46H5mhcanwxDkNTw3K67wPIcKTH1ffkA4vhMOtAc7gRmPZw==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "dependencies": { "node-int64": "^0.4.0" } }, "node_modules/buffer-from": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true, "license": "MIT" }, "node_modules/call-bind": { "version": "1.0.9", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.9.tgz", + "integrity": "sha512-a/hy+pNsFUTR+Iz8TCJvXudKVLAnz/DyeSUo10I5yvFDQJBFU2s9uqQpoSrJlroHUKoKqzg+epxyP9lqFdzfBQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5073,6 +6355,8 @@ }, "node_modules/call-bind-apply-helpers": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5085,6 +6369,8 @@ }, "node_modules/call-bound": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", "dev": true, "license": "MIT", "dependencies": { @@ -5100,6 +6386,8 @@ }, "node_modules/callsites": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, "license": "MIT", "engines": { @@ -5107,74 +6395,30 @@ } }, "node_modules/camel-case": { - "version": "3.0.0", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz", + "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==", "dev": true, "license": "MIT", "dependencies": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" + "pascal-case": "^3.1.2", + "tslib": "^2.0.3" } }, "node_modules/camelcase": { "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, - "node_modules/camelcase-keys": { - "version": "7.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "camelcase": "^6.3.0", - "map-obj": "^4.1.0", - "quick-lru": "^5.1.1", - "type-fest": "^1.2.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/camelcase-keys/node_modules/camelcase": { - "version": "6.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/camelcase-keys/node_modules/type-fest": { - "version": "1.4.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/caniuse-api": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "browserslist": "^4.0.0", - "caniuse-lite": "^1.0.0", - "lodash.memoize": "^4.1.2", - "lodash.uniq": "^4.5.0" - } - }, "node_modules/caniuse-lite": { - "version": "1.0.30001815", + "version": "1.0.30001816", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001816.tgz", + "integrity": "sha512-+8Yx7BXCoqk6IF8yTicjfUR6D/ldJzdlsodlEOiOSPmhK844WIgk67/zIQaGAOxNkZyyvBlrRFnLvqKIoqbAFw==", "funding": [ { "type": "opencollective", @@ -5193,6 +6437,8 @@ }, "node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "license": "MIT", "dependencies": { @@ -5208,6 +6454,8 @@ }, "node_modules/char-regex": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true, "license": "MIT", "engines": { @@ -5216,6 +6464,8 @@ }, "node_modules/cheerio": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.2.0.tgz", + "integrity": "sha512-WDrybc/gKFpTYQutKIK6UvfcuxijIZfMfXaYm8NMsPQxSYvf+13fXUJ4rztGGbJcBQ/GF55gvrZ0Bc0bj/mqvg==", "dev": true, "license": "MIT", "dependencies": { @@ -5240,6 +6490,8 @@ }, "node_modules/cheerio-select": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -5256,8 +6508,11 @@ }, "node_modules/chokidar": { "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, "license": "MIT", + "optional": true, "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -5277,140 +6532,83 @@ "fsevents": "~2.3.2" } }, - "node_modules/chrome-trace-event": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0" - } - }, - "node_modules/ci-info": { - "version": "4.4.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cjs-module-lexer": { - "version": "2.3.0", - "dev": true, - "license": "MIT" - }, - "node_modules/classnames": { - "version": "2.5.1", - "license": "MIT" - }, - "node_modules/clean-css": { - "version": "4.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "source-map": "~0.6.0" - }, - "engines": { - "node": ">= 4.0" - } - }, - "node_modules/clean-stack": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/cli-cursor": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "restore-cursor": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-truncate": { - "version": "3.1.0", + "node_modules/chrome-trace-event": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", "dev": true, "license": "MIT", - "dependencies": { - "slice-ansi": "^5.0.0", - "string-width": "^5.0.0" - }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=6.0" } }, - "node_modules/client-only": { - "version": "0.0.1", - "license": "MIT" - }, - "node_modules/cliui": { - "version": "6.0.0", + "node_modules/ci-info": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.4.0.tgz", + "integrity": "sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg==", "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" } }, - "node_modules/cliui/node_modules/emoji-regex": { - "version": "8.0.0", + "node_modules/cjs-module-lexer": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.3.0.tgz", + "integrity": "sha512-lmNyBzi6iYiqyrExTctfmjd8tInx+dHu9PBomTfH5RXS53c27JMFJgzNv5TyAnm3PgGf+MLy0+Ws41/HlVxdKQ==", "dev": true, "license": "MIT" }, - "node_modules/cliui/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } + "node_modules/classnames": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==", + "license": "MIT" }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.3", + "node_modules/clean-css": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.3.tgz", + "integrity": "sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==", "dev": true, "license": "MIT", "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "source-map": "~0.6.0" }, "engines": { - "node": ">=8" + "node": ">= 10.0" } }, - "node_modules/cliui/node_modules/wrap-ansi": { - "version": "6.2.0", + "node_modules/client-only": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", + "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==", + "license": "MIT" + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" }, "engines": { - "node": ">=8" + "node": ">=12" } }, "node_modules/clone-deep": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5424,6 +6622,8 @@ }, "node_modules/co": { "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", "dev": true, "license": "MIT", "engines": { @@ -5433,11 +6633,15 @@ }, "node_modules/collect-v8-coverage": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz", + "integrity": "sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw==", "dev": true, "license": "MIT" }, "node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5449,39 +6653,54 @@ }, "node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/colorette": { - "version": "2.0.20", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true, "license": "MIT" }, "node_modules/commander": { "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", "dev": true, "license": "MIT", "engines": { "node": ">= 6" } }, - "node_modules/commondir": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, "node_modules/concat-map": { "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true, "license": "MIT" }, "node_modules/convert-source-map": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true, "license": "MIT" }, + "node_modules/core-js": { + "version": "3.50.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.50.0.tgz", + "integrity": "sha512-BRWgOLKkFeCgRudR6zrs8p9XJZcE14grzKMMssoYrk6krtuEZ7MTKPIY5RzOnqsEKIR9kst7wNzphttraT+Yqw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "engines": { + "node": "*" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, "node_modules/core-js-compat": { "version": "3.50.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.50.0.tgz", + "integrity": "sha512-XGpFGbMLHwSt74YLTKho7Ib242qi6O8MSX+sRokV4oz7iKXvQWGYZthjIhjRGMxjzVkAubBO512dKGYcefmX3Q==", "dev": true, "license": "MIT", "dependencies": { @@ -5496,24 +6715,27 @@ } }, "node_modules/cross-env": { - "version": "7.0.3", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-10.1.0.tgz", + "integrity": "sha512-GsYosgnACZTADcmEyJctkJIoqAhHjttw7RsFrVoJNXbsWWqaq6Ym+7kZjq6mS45O0jij6vtiReppKQEtqWy6Dw==", "dev": true, "license": "MIT", "dependencies": { - "cross-spawn": "^7.0.1" + "@epic-web/invariant": "^1.0.0", + "cross-spawn": "^7.0.6" }, "bin": { - "cross-env": "src/bin/cross-env.js", - "cross-env-shell": "src/bin/cross-env-shell.js" + "cross-env": "dist/bin/cross-env.js", + "cross-env-shell": "dist/bin/cross-env-shell.js" }, "engines": { - "node": ">=10.14", - "npm": ">=6", - "yarn": ">=1" + "node": ">=20" } }, "node_modules/cross-fetch": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.2.0.tgz", + "integrity": "sha512-Q+xVJLoGOeIMXZmbUK4HYk+69cQH6LudR0Vu/pRm2YlU/hDV9CiS0gKUMaWY5f2NeUH9C1nV3bsTlCo0FsTV1Q==", "license": "MIT", "dependencies": { "node-fetch": "^2.7.0" @@ -5521,6 +6743,8 @@ }, "node_modules/cross-spawn": { "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "license": "MIT", "dependencies": { @@ -5532,37 +6756,32 @@ "node": ">= 8" } }, - "node_modules/css-in-js-utils": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "hyphenate-style-name": "^1.0.3" - } - }, "node_modules/css-loader": { - "version": "6.11.0", + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-7.1.5.tgz", + "integrity": "sha512-Q7iAfQkU2twNBryKX/vGAlE+GAmkF7quhSzAGNK8fBimxk3+tqg245rH52UPb9dioBolBc8rP0ihmHBaDTJQBA==", "dev": true, "license": "MIT", "dependencies": { "icss-utils": "^5.1.0", - "postcss": "^8.4.33", + "postcss": "^8.4.40", "postcss-modules-extract-imports": "^3.1.0", "postcss-modules-local-by-default": "^4.0.5", "postcss-modules-scope": "^3.2.0", "postcss-modules-values": "^4.0.0", "postcss-value-parser": "^4.2.0", - "semver": "^7.5.4" + "semver": "^7.6.3" }, "engines": { - "node": ">= 12.13.0" + "node": ">= 18.12.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" }, "peerDependencies": { - "@rspack/core": "0.x || 1.x", - "webpack": "^5.0.0" + "@rspack/core": "0.x || ^1.0.0 || ^2.0.0-0", + "webpack": "^5.27.0" }, "peerDependenciesMeta": { "@rspack/core": { @@ -5575,6 +6794,8 @@ }, "node_modules/css-loader/node_modules/semver": { "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "dev": true, "license": "ISC", "bin": { @@ -5586,6 +6807,8 @@ }, "node_modules/css-select": { "version": "5.2.2", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.2.2.tgz", + "integrity": "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -5601,6 +6824,8 @@ }, "node_modules/css-tree": { "version": "2.2.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz", + "integrity": "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==", "dev": true, "license": "MIT", "dependencies": { @@ -5614,6 +6839,8 @@ }, "node_modules/css-what": { "version": "6.2.2", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz", + "integrity": "sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -5625,6 +6852,8 @@ }, "node_modules/cssesc": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "dev": true, "license": "MIT", "bin": { @@ -5636,6 +6865,8 @@ }, "node_modules/csso": { "version": "5.0.5", + "resolved": "https://registry.npmjs.org/csso/-/csso-5.0.5.tgz", + "integrity": "sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5648,6 +6879,8 @@ }, "node_modules/cssstyle": { "version": "4.6.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.6.0.tgz", + "integrity": "sha512-2z+rWdzbbSZv6/rhtvzvqeZQHrBaqgogqt85sqFNbabZOuFbCVFb8kPeEtZjiKkbrm395irpNKiYeFeLiQnFPg==", "dev": true, "license": "MIT", "dependencies": { @@ -5660,6 +6893,8 @@ }, "node_modules/d3-color": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", "license": "ISC", "engines": { "node": ">=12" @@ -5667,6 +6902,8 @@ }, "node_modules/d3-interpolate": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", "license": "ISC", "dependencies": { "d3-color": "1 - 3" @@ -5677,6 +6914,8 @@ }, "node_modules/d3-scale-chromatic": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz", + "integrity": "sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==", "license": "ISC", "dependencies": { "d3-color": "1 - 3", @@ -5688,6 +6927,8 @@ }, "node_modules/data-urls": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz", + "integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==", "dev": true, "license": "MIT", "dependencies": { @@ -5700,6 +6941,8 @@ }, "node_modules/data-view-buffer": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", + "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5716,6 +6959,8 @@ }, "node_modules/data-view-byte-length": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", + "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5732,6 +6977,8 @@ }, "node_modules/data-view-byte-offset": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", + "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5746,13 +6993,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/debounce": { - "version": "1.2.1", - "dev": true, - "license": "MIT" - }, "node_modules/debug": { "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, "license": "MIT", "dependencies": { @@ -5767,55 +7011,17 @@ } } }, - "node_modules/decamelize": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/decamelize-keys": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "decamelize": "^1.1.0", - "map-obj": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/decamelize-keys/node_modules/decamelize": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/decamelize-keys/node_modules/map-obj": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/decimal.js": { "version": "10.6.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", + "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==", "dev": true, "license": "MIT" }, "node_modules/dedent": { "version": "1.7.2", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.2.tgz", + "integrity": "sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA==", "dev": true, "license": "MIT", "peerDependencies": { @@ -5829,11 +7035,15 @@ }, "node_modules/deep-is": { "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true, "license": "MIT" }, "node_modules/deepmerge": { "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true, "license": "MIT", "engines": { @@ -5842,6 +7052,8 @@ }, "node_modules/define-data-property": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dev": true, "license": "MIT", "dependencies": { @@ -5858,6 +7070,8 @@ }, "node_modules/define-properties": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, "license": "MIT", "dependencies": { @@ -5873,51 +7087,60 @@ } }, "node_modules/del": { - "version": "6.1.1", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/del/-/del-9.0.1.tgz", + "integrity": "sha512-1B11d2d8AJcTcbvXtF5a9NWVoE7G12eJPcadRGdLik38WxgsAyDQO5ZdjHoeIlAIhAhbgnD/AZVBWf9xQze+0w==", "dev": true, "license": "MIT", "dependencies": { - "globby": "^11.0.1", - "graceful-fs": "^4.2.4", - "is-glob": "^4.0.1", - "is-path-cwd": "^2.2.0", - "is-path-inside": "^3.0.2", - "p-map": "^4.0.0", - "rimraf": "^3.0.2", - "slash": "^3.0.0" + "globby": "^16.2.4", + "is-glob": "^4.0.3", + "is-path-cwd": "^4.0.1", + "is-path-inside": "^4.0.0", + "p-map": "^7.0.8", + "presentable-error": "^0.0.1", + "slash": "^5.1.0" }, "engines": { - "node": ">=10" + "node": ">=22" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/del-cli": { - "version": "4.0.1", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/del-cli/-/del-cli-8.0.1.tgz", + "integrity": "sha512-Z4+xLjVJs9dMN4gDMRfY/7b7WItNOB5EOKu9BenbJD63olx9YM5SU/DEuDFWvN0B1BdGIzejCJFgPt2vIGwj1A==", "dev": true, "license": "MIT", "dependencies": { - "del": "^6.0.0", - "meow": "^10.1.0" + "del": "^9.0.1", + "meow": "^14.1.0", + "presentable-error": "^0.0.1" }, "bin": { - "del": "cli.js", + "del": "del.js", "del-cli": "cli.js" }, "engines": { - "node": ">=12.20" + "node": ">=22" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/del/node_modules/slash": { - "version": "3.0.0", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/depd": { @@ -5942,6 +7165,8 @@ }, "node_modules/dequal": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", "dev": true, "license": "MIT", "peer": true, @@ -5951,6 +7176,8 @@ }, "node_modules/detect-libc": { "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", "devOptional": true, "license": "Apache-2.0", "engines": { @@ -5959,25 +7186,18 @@ }, "node_modules/detect-newline": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/dir-glob": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/doctrine": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -5989,6 +7209,8 @@ }, "node_modules/dom-accessibility-api": { "version": "0.5.16", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", + "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", "dev": true, "license": "MIT", "peer": true @@ -5999,6 +7221,8 @@ }, "node_modules/dom-serializer": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", "dev": true, "license": "MIT", "dependencies": { @@ -6012,6 +7236,8 @@ }, "node_modules/dom-serializer/node_modules/entities": { "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -6023,6 +7249,8 @@ }, "node_modules/domelementtype": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", "dev": true, "funding": [ { @@ -6034,6 +7262,8 @@ }, "node_modules/domhandler": { "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -6048,6 +7278,8 @@ }, "node_modules/domutils": { "version": "3.2.2", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", + "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -6059,8 +7291,21 @@ "url": "https://github.com/fb55/domutils?sponsor=1" } }, + "node_modules/dot-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", + "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "node_modules/dunder-proto": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", "dev": true, "license": "MIT", "dependencies": { @@ -6072,13 +7317,10 @@ "node": ">= 0.4" } }, - "node_modules/duplexer": { - "version": "0.1.2", - "dev": true, - "license": "MIT" - }, "node_modules/eastasianwidth": { "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true, "license": "MIT" }, @@ -6090,28 +7332,26 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.449", + "version": "1.5.458", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.458.tgz", + "integrity": "sha512-/hIH2gRSmxrf4/X4Nw/t/Wc8PVS22l8/3HnWjWTWsTOM5dsnMUPZF/+u+yr3LqweNuTBJE1rq6qAQzKkZVwMfA==", "dev": true, "license": "ISC" }, "node_modules/eleventy-plugin-svg-contents": { "version": "0.7.0", + "resolved": "https://registry.npmjs.org/eleventy-plugin-svg-contents/-/eleventy-plugin-svg-contents-0.7.0.tgz", + "integrity": "sha512-Hx91YJLWhi1WGsUnjndee5xH5nKN9IxyKp7obp9ANVpejGPWc/fFENn6WzOOvFHNwcItGJbLtEB2TebmjahjHg==", "dev": true, "license": "MIT", "dependencies": { "cheerio": "^1.0.0-rc.3" } }, - "node_modules/eleventy-plugin-toc": { - "version": "1.1.5", - "dev": true, - "license": "ISC", - "dependencies": { - "cheerio": "^1.0.0-rc.10" - } - }, "node_modules/emittery": { "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true, "license": "MIT", "engines": { @@ -6122,18 +7362,12 @@ } }, "node_modules/emoji-regex": { - "version": "9.2.2", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true, "license": "MIT" }, - "node_modules/emojis-list": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, "node_modules/encodeurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", @@ -6146,6 +7380,8 @@ }, "node_modules/encoding-sniffer": { "version": "0.2.1", + "resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.1.tgz", + "integrity": "sha512-5gvq20T6vfpekVtqrYQsSCFZ1wEg5+wW0/QaZMWkFr6BqD3NfKs0rLCx4rrVlSWJeZb5NBJgVLswK/w2MWU+Gw==", "dev": true, "license": "MIT", "dependencies": { @@ -6158,6 +7394,8 @@ }, "node_modules/enhanced-resolve": { "version": "5.26.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.26.0.tgz", + "integrity": "sha512-9vhedylFonb2YGogzUKX6+Ja72gOJbN1QHAqdrvqLwhdl/QWbKopzoUC9EbQNVsAns/bx/4uyqalrQAoy1IByw==", "dev": true, "license": "MIT", "dependencies": { @@ -6170,6 +7408,8 @@ }, "node_modules/entities": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -6181,6 +7421,8 @@ }, "node_modules/envinfo": { "version": "7.21.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.21.0.tgz", + "integrity": "sha512-Lw7I8Zp5YKHFCXL7+Dz95g4CcbMEpgvqZNNq3AmlT5XAV6CgAAk6gyAMqn2zjw08K9BHfcNuKrMiCPLByGafow==", "dev": true, "license": "MIT", "bin": { @@ -6205,6 +7447,8 @@ }, "node_modules/error-ex": { "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -6213,6 +7457,8 @@ }, "node_modules/es-abstract": { "version": "1.24.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.2.tgz", + "integrity": "sha512-2FpH9Q5i2RRwyEP1AylXe6nYLR5OhaJTZwmlcP0dL/+JCbgg7yyEo/sEK6HeGZRf3dFpWwThaRHVApXSkW3xeg==", "dev": true, "license": "MIT", "dependencies": { @@ -6280,6 +7526,8 @@ }, "node_modules/es-abstract-get": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-abstract-get/-/es-abstract-get-1.0.0.tgz", + "integrity": "sha512-6PMWXpdhshVvFp+FoWYs1EvG1Nj0tvk0dZM+XcK0xMEM1czRVcP6ohqPWHy6qPagSpC8j4+p89WXlT+xXJs/fg==", "dev": true, "license": "MIT", "dependencies": { @@ -6297,6 +7545,8 @@ }, "node_modules/es-define-property": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "dev": true, "license": "MIT", "engines": { @@ -6305,6 +7555,8 @@ }, "node_modules/es-errors": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", "dev": true, "license": "MIT", "engines": { @@ -6313,6 +7565,8 @@ }, "node_modules/es-iterator-helpers": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.4.0.tgz", + "integrity": "sha512-c/A0P0oxkACDc+cKWw8evLXK83oBKgn0qPOqCYT4x9uolpCIJAcYvJC9QYKNDRPsTeGyCrQ326jrvgZWdCdK5Q==", "dev": true, "license": "MIT", "dependencies": { @@ -6339,11 +7593,15 @@ }, "node_modules/es-module-lexer": { "version": "2.3.2", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz", + "integrity": "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==", "dev": true, "license": "MIT" }, "node_modules/es-object-atoms": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", "dev": true, "license": "MIT", "dependencies": { @@ -6355,6 +7613,8 @@ }, "node_modules/es-set-tostringtag": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", "dev": true, "license": "MIT", "dependencies": { @@ -6369,6 +7629,8 @@ }, "node_modules/es-shim-unscopables": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz", + "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==", "dev": true, "license": "MIT", "dependencies": { @@ -6380,6 +7642,8 @@ }, "node_modules/es-to-primitive": { "version": "1.3.4", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.4.tgz", + "integrity": "sha512-yPDz7wqpg1/mmHLmS3tcfTfbw5f1eryXvyghYBffGdERwe+mV7ZcWzTR8LR17Kvqt3qfPurjlonmnq3MKXIOXw==", "dev": true, "license": "MIT", "dependencies": { @@ -6399,6 +7663,8 @@ }, "node_modules/escalade": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, "license": "MIT", "engines": { @@ -6414,6 +7680,8 @@ }, "node_modules/escape-string-regexp": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, "license": "MIT", "engines": { @@ -6425,6 +7693,9 @@ }, "node_modules/eslint": { "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "license": "MIT", "dependencies": { @@ -6478,49 +7749,25 @@ } }, "node_modules/eslint-config-prettier": { - "version": "8.10.2", + "version": "10.1.8", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz", + "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==", "dev": true, "license": "MIT", "bin": { "eslint-config-prettier": "bin/cli.js" }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "node_modules/eslint-plugin-flowtype": { - "version": "8.0.3", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "lodash": "^4.17.21", - "string-natural-compare": "^3.0.1" - }, - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "@babel/plugin-syntax-flow": "^7.14.5", - "@babel/plugin-transform-react-jsx": "^7.14.9", - "eslint": "^8.1.0" - } - }, - "node_modules/eslint-plugin-promise": { - "version": "6.6.0", - "dev": true, - "license": "ISC", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://opencollective.com/eslint-config-prettier" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" + "eslint": ">=7.0.0" } }, "node_modules/eslint-plugin-react": { "version": "7.37.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz", + "integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==", "dev": true, "license": "MIT", "dependencies": { @@ -6551,84 +7798,83 @@ } }, "node_modules/eslint-plugin-react-hooks": { - "version": "4.6.2", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-7.1.1.tgz", + "integrity": "sha512-f2I7Gw6JbvCexzIInuSbZpfdQ44D7iqdWX01FKLvrPgqxoE7oMj8clOfto8U6vYiz4yd5oKu39rRSVOe1zRu0g==", "dev": true, "license": "MIT", + "dependencies": { + "@babel/core": "^7.24.4", + "@babel/parser": "^7.24.4", + "hermes-parser": "^0.25.1", + "zod": "^3.25.0 || ^4.0.0", + "zod-validation-error": "^3.5.0 || ^4.0.0" + }, "engines": { - "node": ">=10" + "node": ">=18" }, "peerDependencies": { - "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 || ^10.0.0" } }, - "node_modules/eslint-plugin-react/node_modules/doctrine": { - "version": "2.1.0", + "node_modules/eslint-plugin-react-hooks/node_modules/hermes-estree": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.25.1.tgz", + "integrity": "sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==", "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } + "license": "MIT" }, - "node_modules/eslint-plugin-react/node_modules/resolve": { - "version": "2.0.0-next.7", + "node_modules/eslint-plugin-react-hooks/node_modules/hermes-parser": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.25.1.tgz", + "integrity": "sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==", "dev": true, "license": "MIT", "dependencies": { - "es-errors": "^1.3.0", - "is-core-module": "^2.16.2", - "node-exports-info": "^1.6.0", - "object-keys": "^1.1.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/eslint-scope/node_modules/estraverse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" + "hermes-estree": "0.25.1" } }, - "node_modules/eslint-visitor-keys": { + "node_modules/eslint-plugin-react/node_modules/doctrine": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, "engines": { - "node": ">=10" + "node": ">=0.10.0" } }, - "node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", + "node_modules/eslint-plugin-react/node_modules/resolve": { + "version": "2.0.0-next.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.7.tgz", + "integrity": "sha512-tqt+NBWwyaMgw3zDsnygx4CByWjQEJHOPMdslYhppaQSJUtL/D4JO9CcBBlhPoI8lz9oJIDXkwXfhF4aWqP8xQ==", "dev": true, - "license": "Python-2.0" + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "is-core-module": "^2.16.2", + "node-exports-info": "^1.6.0", + "object-keys": "^1.1.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "node_modules/eslint/node_modules/eslint-scope": { + "node_modules/eslint-scope": { "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -6642,8 +7888,10 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { + "node_modules/eslint-visitor-keys": { "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, "license": "Apache-2.0", "engines": { @@ -6653,8 +7901,17 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, "node_modules/eslint/node_modules/find-up": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "license": "MIT", "dependencies": { @@ -6670,6 +7927,8 @@ }, "node_modules/eslint/node_modules/glob-parent": { "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "license": "ISC", "dependencies": { @@ -6679,8 +7938,20 @@ "node": ">=10.13.0" } }, + "node_modules/eslint/node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/eslint/node_modules/js-yaml": { "version": "4.3.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz", + "integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==", "dev": true, "funding": [ { @@ -6702,6 +7973,8 @@ }, "node_modules/eslint/node_modules/locate-path": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "license": "MIT", "dependencies": { @@ -6716,6 +7989,8 @@ }, "node_modules/eslint/node_modules/p-locate": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "license": "MIT", "dependencies": { @@ -6740,6 +8015,8 @@ }, "node_modules/espree": { "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -6754,19 +8031,10 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/esprima": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, "license": "BSD-2-Clause", "bin": { @@ -6779,6 +8047,8 @@ }, "node_modules/esquery": { "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -6790,6 +8060,8 @@ }, "node_modules/esrecurse": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -6801,6 +8073,8 @@ }, "node_modules/estraverse": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -6809,6 +8083,8 @@ }, "node_modules/esutils": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -6835,13 +8111,10 @@ "node": ">= 8" } }, - "node_modules/eventemitter3": { - "version": "5.0.4", - "dev": true, - "license": "MIT" - }, "node_modules/events": { "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", "dev": true, "license": "MIT", "engines": { @@ -6850,6 +8123,8 @@ }, "node_modules/execa": { "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, "license": "MIT", "dependencies": { @@ -6870,8 +8145,23 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/exit-hook": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-4.0.0.tgz", + "integrity": "sha512-Fqs7ChZm72y40wKjOFXBKg7nJZvQJmewP5/7LtePDdnah/+FH9Hp5sgMujSCMPXlxOAW2//1jrW9pnsY7o20vQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/exit-x": { "version": "0.2.2", + "resolved": "https://registry.npmjs.org/exit-x/-/exit-x-0.2.2.tgz", + "integrity": "sha512-+I6B/IkJc1o/2tiURyz/ivu/O0nKNEArIUB5O7zBrlDVJr22SCLH3xTeEry428LvFhRzIA1g8izguxJ/gbNcVQ==", "dev": true, "license": "MIT", "engines": { @@ -6880,6 +8170,8 @@ }, "node_modules/expect": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/expect/-/expect-30.5.2.tgz", + "integrity": "sha512-0LNuMvs8/5mRYhnCR4k+lGV7fqPMs6Bnksda4S3zsCUmdxBpAn4zU4NNzXdq1pMKe/H4W5t/zVIDSJ/H3e0vDA==", "dev": true, "license": "MIT", "dependencies": { @@ -6896,6 +8188,8 @@ }, "node_modules/extend-shallow": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", "dev": true, "license": "MIT", "dependencies": { @@ -6907,11 +8201,15 @@ }, "node_modules/fast-deep-equal": { "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true, "license": "MIT" }, "node_modules/fast-glob": { "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, "license": "MIT", "dependencies": { @@ -6927,16 +8225,22 @@ }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true, "license": "MIT" }, "node_modules/fast-levenshtein": { "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true, "license": "MIT" }, "node_modules/fast-uri": { "version": "3.1.8", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.8.tgz", + "integrity": "sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg==", "dev": true, "funding": [ { @@ -6950,16 +8254,10 @@ ], "license": "BSD-3-Clause" }, - "node_modules/fastest-levenshtein": { - "version": "1.0.16", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.9.1" - } - }, "node_modules/fastq": { "version": "1.20.3", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.3.tgz", + "integrity": "sha512-XKv5nnLs6nLF71NgiKJLIZFLkPyIEuOselLG7ujZnGrRfQK8HpvY+WqKhAJUAdLomwVHErVS4LfxFlPq0/FTAw==", "dev": true, "license": "ISC", "dependencies": { @@ -6967,15 +8265,19 @@ } }, "node_modules/fb-watchman": { - "version": "2.0.2", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.4.tgz", + "integrity": "sha512-tGQtaoYisPDriJBN0mT5yZSyNETnJGA1gTYxaVRAE5KUO3LI9kPUc9WIu8JXcxaIci+faIKlzXqXyPgrmubtBQ==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "dependencies": { - "bser": "2.1.1" + "bser": "2.1.2" } }, "node_modules/fbjs": { "version": "3.0.5", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-3.0.5.tgz", + "integrity": "sha512-ztsSx77JBtkuMrEypfhgc3cI0+0h+svqeie7xHbh1k/IKdcydnvadp/mUaGgjAOXQmQSxsqgaRhS3q9fy+1kxg==", "license": "MIT", "dependencies": { "cross-fetch": "^3.1.5", @@ -6989,10 +8291,14 @@ }, "node_modules/fbjs-css-vars": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz", + "integrity": "sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ==", "license": "MIT" }, "node_modules/file-entry-cache": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "license": "MIT", "dependencies": { @@ -7014,6 +8320,8 @@ }, "node_modules/fill-range": { "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "license": "MIT", "dependencies": { @@ -7059,38 +8367,10 @@ "dev": true, "license": "MIT" }, - "node_modules/find-cache-dir": { - "version": "3.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, - "node_modules/find-cache-dir/node_modules/make-dir": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/find-up": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "license": "MIT", "dependencies": { @@ -7103,6 +8383,8 @@ }, "node_modules/flat": { "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true, "license": "BSD-3-Clause", "bin": { @@ -7111,6 +8393,8 @@ }, "node_modules/flat-cache": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, "license": "MIT", "dependencies": { @@ -7124,11 +8408,15 @@ }, "node_modules/flatted": { "version": "3.4.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz", + "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==", "dev": true, "license": "ISC" }, "node_modules/flow-bin": { - "version": "0.148.0", + "version": "0.336.0", + "resolved": "https://registry.npmjs.org/flow-bin/-/flow-bin-0.336.0.tgz", + "integrity": "sha512-I5sPg/GISpXH4W14eGWgiIsrDKY0uvvvXjlEDOI2t0pguEwbMgpnaYzMMMBoHZcYYtNJIF/0eGsbPnN7uP2zOQ==", "dev": true, "license": "MIT", "bin": { @@ -7140,6 +8428,8 @@ }, "node_modules/for-each": { "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", "dev": true, "license": "MIT", "dependencies": { @@ -7154,6 +8444,8 @@ }, "node_modules/foreground-child": { "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", "dev": true, "license": "ISC", "dependencies": { @@ -7169,6 +8461,8 @@ }, "node_modules/foreground-child/node_modules/signal-exit": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, "license": "ISC", "engines": { @@ -7190,11 +8484,15 @@ }, "node_modules/fs-readdir-recursive": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", "dev": true, "license": "MIT" }, "node_modules/fs.realpath": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true, "license": "ISC" }, @@ -7215,6 +8513,8 @@ }, "node_modules/function-bind": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "dev": true, "license": "MIT", "funding": { @@ -7223,6 +8523,8 @@ }, "node_modules/function.prototype.name": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.2.0.tgz", + "integrity": "sha512-jObKIik1P2QjPHP5nz5BaOtUlfgS0fWo8IUByNXkM+o+02sJOi94em77GwJKQSJ3gfPHdgzLNrHc1uokV4P/ew==", "dev": true, "license": "MIT", "dependencies": { @@ -7245,53 +8547,18 @@ }, "node_modules/functions-have-names": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/gen-flow-files": { - "version": "0.4.11", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.7.5", - "@babel/generator": "^7.7.4", - "@babel/parser": "^7.7.5", - "@babel/plugin-proposal-throw-expressions": "^7.7.4", - "@babel/plugin-syntax-flow": "^7.7.4", - "@babel/traverse": "^7.7.4", - "@babel/types": "^7.7.4", - "glob": "^7.1.6", - "mkdirp": "^0.5.1", - "yargs": "^15.0.2" - }, - "bin": { - "gen-flow-files": "bin/gen-flow-files.js" - } - }, - "node_modules/gen-flow-files/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/generator-function": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", + "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", "dev": true, "license": "MIT", "engines": { @@ -7300,6 +8567,8 @@ }, "node_modules/gensync": { "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true, "license": "MIT", "engines": { @@ -7308,6 +8577,8 @@ }, "node_modules/get-caller-file": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, "license": "ISC", "engines": { @@ -7316,6 +8587,8 @@ }, "node_modules/get-intrinsic": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", "dev": true, "license": "MIT", "dependencies": { @@ -7339,6 +8612,8 @@ }, "node_modules/get-package-type": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true, "license": "MIT", "engines": { @@ -7347,6 +8622,8 @@ }, "node_modules/get-proto": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", "dev": true, "license": "MIT", "dependencies": { @@ -7359,6 +8636,8 @@ }, "node_modules/get-stream": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, "license": "MIT", "engines": { @@ -7370,6 +8649,8 @@ }, "node_modules/get-symbol-description": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", + "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", "dev": true, "license": "MIT", "dependencies": { @@ -7385,18 +8666,22 @@ } }, "node_modules/glob": { - "version": "8.1.0", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">=12" + "node": "*" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -7404,6 +8689,8 @@ }, "node_modules/glob-parent": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "license": "ISC", "dependencies": { @@ -7413,27 +8700,10 @@ "node": ">= 6" } }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "2.1.7", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "5.1.9", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/globals": { "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "license": "MIT", "dependencies": { @@ -7448,6 +8718,8 @@ }, "node_modules/globalthis": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -7462,34 +8734,54 @@ } }, "node_modules/globby": { - "version": "11.1.0", + "version": "16.2.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-16.2.4.tgz", + "integrity": "sha512-c8B/VNLmxRcmqqenRA9t+9IyOjf9+V6lTxPaUJLqOCONdQkWZ0ETYgX0qbtJqPsgCNusT9MZ5Jeidw8Eb9tn2g==", "dev": true, "license": "MIT", "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" + "@sindresorhus/merge-streams": "^4.0.0", + "fast-glob": "^3.3.3", + "ignore": "^7.0.5", + "is-path-inside": "^4.0.0", + "micromatch": "^4.0.8", + "slash": "^5.1.0", + "unicorn-magic": "^0.4.0" }, "engines": { - "node": ">=10" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globby/node_modules/ignore": { + "version": "7.0.12", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.12.tgz", + "integrity": "sha512-/8UvqAPU9DGTI9k4mxtf49U37Isfwr8Uts96+SBHIkFxPJnHS0Ew4f00sM4Scd8V8EjM0jUNtVDdv1kPdt35lg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/globby/node_modules/slash": { - "version": "3.0.0", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/gopd": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", "dev": true, "license": "MIT", "engines": { @@ -7501,52 +8793,69 @@ }, "node_modules/graceful-fs": { "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true, "license": "ISC" }, "node_modules/graphemer": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true, "license": "MIT" }, "node_modules/gray-matter": { - "version": "4.0.3", + "name": "@11ty/gray-matter", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@11ty/gray-matter/-/gray-matter-1.0.0.tgz", + "integrity": "sha512-7mJJl+wf1AByoT0PknQiQfOPnVNT4fevGrUBVWO4HXsnYn1aQPyRyrELYrNUFleUBM++KzMKN6QaxHPk0t/6/g==", "dev": true, "license": "MIT", "dependencies": { - "js-yaml": "^3.13.1", - "kind-of": "^6.0.2", + "js-yaml": "^4.1.0", + "kind-of": "^6.0.3", "section-matter": "^1.0.0", "strip-bom-string": "^1.0.0" }, "engines": { - "node": ">=6.0" + "node": ">=11" } }, - "node_modules/gzip-size": { - "version": "6.0.0", + "node_modules/gray-matter/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true, - "license": "MIT", - "dependencies": { - "duplexer": "^0.1.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "license": "Python-2.0" }, - "node_modules/hard-rejection": { - "version": "2.1.0", + "node_modules/gray-matter/node_modules/js-yaml": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz", + "integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], "license": "MIT", - "engines": { - "node": ">=6" + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, "node_modules/has-bigints": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", + "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", "dev": true, "license": "MIT", "engines": { @@ -7558,6 +8867,8 @@ }, "node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "license": "MIT", "engines": { @@ -7566,6 +8877,8 @@ }, "node_modules/has-property-descriptors": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, "license": "MIT", "dependencies": { @@ -7577,6 +8890,8 @@ }, "node_modules/has-proto": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", + "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", "dev": true, "license": "MIT", "dependencies": { @@ -7591,6 +8906,8 @@ }, "node_modules/has-symbols": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "dev": true, "license": "MIT", "engines": { @@ -7602,6 +8919,8 @@ }, "node_modules/has-tostringtag": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, "license": "MIT", "dependencies": { @@ -7616,6 +8935,8 @@ }, "node_modules/hasown": { "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", "dev": true, "license": "MIT", "dependencies": { @@ -7625,43 +8946,46 @@ "node": ">= 0.4" } }, - "node_modules/he": { - "version": "1.2.0", + "node_modules/hermes-eslint": { + "version": "0.37.0", + "resolved": "https://registry.npmjs.org/hermes-eslint/-/hermes-eslint-0.37.0.tgz", + "integrity": "sha512-GOZ2xpOe28u7hN5e4NMBCEVZ9KwmigPtFZDXoSRgUWL6sFlppxB5T7WBiLRO00c+sW5R0YM4cbOmnWtTK+DQcQ==", "dev": true, "license": "MIT", - "bin": { - "he": "bin/he" - } - }, - "node_modules/hosted-git-info": { - "version": "4.1.0", - "dev": true, - "license": "ISC", "dependencies": { - "lru-cache": "^6.0.0" + "hermes-estree": "0.37.0", + "hermes-parser": "0.37.0" }, - "engines": { - "node": ">=10" + "peerDependencies": { + "eslint": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } } }, - "node_modules/hosted-git-info/node_modules/lru-cache": { - "version": "6.0.0", + "node_modules/hermes-estree": { + "version": "0.37.0", + "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.37.0.tgz", + "integrity": "sha512-Frp4+A518C4zZgB2+Qo1srlM3y6nbrFbNNzBF3g7tEuQXHXTb2h39V25JQLNHotxclkD+AZTN/JCCpiTFlhIGg==", "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } + "license": "MIT" }, - "node_modules/hosted-git-info/node_modules/yallist": { - "version": "4.0.0", + "node_modules/hermes-parser": { + "version": "0.37.0", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.37.0.tgz", + "integrity": "sha512-8PuWcyaF6VHQHL2dbU+QEIkbtHYQrTX/6+ep4VcBLJ3f/ehevowr5Zj8LQfYXQQGFG2O+df7hIMtt4PkkhfK3Q==", "dev": true, - "license": "ISC" + "license": "MIT", + "dependencies": { + "hermes-estree": "0.37.0" + } }, "node_modules/html-encoding-sniffer": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz", + "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==", "dev": true, "license": "MIT", "dependencies": { @@ -7673,36 +8997,60 @@ }, "node_modules/html-escaper": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true, "license": "MIT" }, - "node_modules/html-minifier": { - "version": "4.0.0", + "node_modules/html-minifier-terser": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-7.2.0.tgz", + "integrity": "sha512-tXgn3QfqPIpGl9o+K5tpcj3/MN4SfLtsx2GWwBC3SSd0tXQGyF3gsSqad8loJgKZGM3ZxbYDd5yhiBIdWpmvLA==", "dev": true, "license": "MIT", "dependencies": { - "camel-case": "^3.0.0", - "clean-css": "^4.2.1", - "commander": "^2.19.0", - "he": "^1.2.0", - "param-case": "^2.1.1", + "camel-case": "^4.1.2", + "clean-css": "~5.3.2", + "commander": "^10.0.0", + "entities": "^4.4.0", + "param-case": "^3.0.4", "relateurl": "^0.2.7", - "uglify-js": "^3.5.1" + "terser": "^5.15.1" }, "bin": { - "html-minifier": "cli.js" + "html-minifier-terser": "cli.js" }, "engines": { - "node": ">=6" + "node": "^14.13.1 || >=16.0.0" } }, - "node_modules/html-minifier/node_modules/commander": { - "version": "2.20.3", + "node_modules/html-minifier-terser/node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/html-minifier-terser/node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } }, "node_modules/htmlparser2": { "version": "10.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.1.0.tgz", + "integrity": "sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==", "dev": true, "funding": [ "https://github.com/fb55/htmlparser2?sponsor=1", @@ -7721,6 +9069,8 @@ }, "node_modules/htmlparser2/node_modules/entities": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -7763,6 +9113,8 @@ }, "node_modules/http-proxy-agent": { "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "dev": true, "license": "MIT", "dependencies": { @@ -7775,6 +9127,8 @@ }, "node_modules/https-proxy-agent": { "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", "dev": true, "license": "MIT", "dependencies": { @@ -7787,6 +9141,8 @@ }, "node_modules/human-signals": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true, "license": "Apache-2.0", "engines": { @@ -7794,25 +9150,25 @@ } }, "node_modules/husky": { - "version": "8.0.3", + "version": "9.1.7", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz", + "integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==", "dev": true, "license": "MIT", "bin": { - "husky": "lib/bin.js" + "husky": "bin.js" }, "engines": { - "node": ">=14" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/typicode" - } - }, - "node_modules/hyphenate-style-name": { - "version": "1.1.0", - "license": "BSD-3-Clause" + } }, "node_modules/iconv-lite": { "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, "license": "MIT", "dependencies": { @@ -7824,6 +9180,8 @@ }, "node_modules/icss-utils": { "version": "5.1.0", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", + "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", "dev": true, "license": "ISC", "engines": { @@ -7835,6 +9193,8 @@ }, "node_modules/ignore": { "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "license": "MIT", "engines": { @@ -7843,6 +9203,8 @@ }, "node_modules/import-fresh": { "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", "dev": true, "license": "MIT", "dependencies": { @@ -7858,6 +9220,8 @@ }, "node_modules/import-fresh/node_modules/resolve-from": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, "license": "MIT", "engines": { @@ -7866,6 +9230,8 @@ }, "node_modules/import-local": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", "dev": true, "license": "MIT", "dependencies": { @@ -7884,22 +9250,19 @@ }, "node_modules/imurmurhash": { "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, "license": "MIT", "engines": { "node": ">=0.8.19" } }, - "node_modules/indent-string": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/inflight": { "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, "license": "ISC", "dependencies": { @@ -7909,18 +9272,15 @@ }, "node_modules/inherits": { "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true, "license": "ISC" }, - "node_modules/inline-style-prefixer": { - "version": "7.0.1", - "license": "MIT", - "dependencies": { - "css-in-js-utils": "^3.1.0" - } - }, "node_modules/internal-slot": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", + "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", "dev": true, "license": "MIT", "dependencies": { @@ -7933,11 +9293,13 @@ } }, "node_modules/interpret": { - "version": "2.2.0", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", + "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.10" + "node": ">=10.13.0" } }, "node_modules/is-alphabetical": { @@ -7968,6 +9330,8 @@ }, "node_modules/is-array-buffer": { "version": "3.0.5", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", + "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", "dev": true, "license": "MIT", "dependencies": { @@ -7984,11 +9348,15 @@ }, "node_modules/is-arrayish": { "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "dev": true, "license": "MIT" }, "node_modules/is-async-function": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", + "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", "dev": true, "license": "MIT", "dependencies": { @@ -8007,6 +9375,8 @@ }, "node_modules/is-bigint": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", + "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", "dev": true, "license": "MIT", "dependencies": { @@ -8021,8 +9391,11 @@ }, "node_modules/is-binary-path": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "license": "MIT", + "optional": true, "dependencies": { "binary-extensions": "^2.0.0" }, @@ -8032,6 +9405,8 @@ }, "node_modules/is-boolean-object": { "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", + "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", "dev": true, "license": "MIT", "dependencies": { @@ -8047,6 +9422,8 @@ }, "node_modules/is-callable": { "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, "license": "MIT", "engines": { @@ -8058,6 +9435,8 @@ }, "node_modules/is-core-module": { "version": "2.17.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.17.0.tgz", + "integrity": "sha512-J/vG0zBCbIKOQFfufSwyXdMrsohyJIUNkrnmo6WZGzoM7tr/lsbfW5b2BvisL6zsyMzK9UxV9L6c7AoFbyXHOA==", "dev": true, "license": "MIT", "dependencies": { @@ -8072,6 +9451,8 @@ }, "node_modules/is-data-view": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", + "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", "dev": true, "license": "MIT", "dependencies": { @@ -8088,6 +9469,8 @@ }, "node_modules/is-date-object": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", + "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", "dev": true, "license": "MIT", "dependencies": { @@ -8114,6 +9497,8 @@ }, "node_modules/is-document.all": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-document.all/-/is-document.all-1.0.0.tgz", + "integrity": "sha512-+XSoyS05OdBbhFuELhgTCpFNHkpBOJqtsZfUFFpe5QTw+9Sjbh8zitxhQkYAo6wV7e1Vb8cAPvpCk9jGam/82g==", "dev": true, "license": "MIT", "dependencies": { @@ -8128,6 +9513,8 @@ }, "node_modules/is-extendable": { "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", "dev": true, "license": "MIT", "engines": { @@ -8136,6 +9523,8 @@ }, "node_modules/is-extglob": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, "license": "MIT", "engines": { @@ -8144,6 +9533,8 @@ }, "node_modules/is-finalizationregistry": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", + "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", "dev": true, "license": "MIT", "dependencies": { @@ -8157,18 +9548,19 @@ } }, "node_modules/is-fullwidth-code-point": { - "version": "4.0.0", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "license": "MIT", "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/is-generator-fn": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", "dev": true, "license": "MIT", "engines": { @@ -8177,6 +9569,8 @@ }, "node_modules/is-generator-function": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", + "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", "dev": true, "license": "MIT", "dependencies": { @@ -8195,6 +9589,8 @@ }, "node_modules/is-glob": { "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "license": "MIT", "dependencies": { @@ -8213,6 +9609,8 @@ }, "node_modules/is-map": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", "dev": true, "license": "MIT", "engines": { @@ -8224,6 +9622,8 @@ }, "node_modules/is-negative-zero": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", "dev": true, "license": "MIT", "engines": { @@ -8235,6 +9635,8 @@ }, "node_modules/is-number": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, "license": "MIT", "engines": { @@ -8243,6 +9645,8 @@ }, "node_modules/is-number-object": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", + "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", "dev": true, "license": "MIT", "dependencies": { @@ -8257,31 +9661,35 @@ } }, "node_modules/is-path-cwd": { - "version": "2.2.0", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-4.0.1.tgz", + "integrity": "sha512-w3upMc5m1LfTkA4VvUcMo764hWF1uuo2NPHtLkLrlhw/tiCLxD5gIhvl72oZIY8oFVpZ/xG2JnqbibZAfSQ3Ww==", "dev": true, "license": "MIT", "engines": { - "node": ">=6" + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-path-inside": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-plain-obj": { - "version": "1.1.0", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz", + "integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==", "dev": true, "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-plain-object": { "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "license": "MIT", "dependencies": { @@ -8293,11 +9701,15 @@ }, "node_modules/is-potential-custom-element-name": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", "dev": true, "license": "MIT" }, "node_modules/is-regex": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", "dev": true, "license": "MIT", "dependencies": { @@ -8315,6 +9727,8 @@ }, "node_modules/is-set": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", "dev": true, "license": "MIT", "engines": { @@ -8326,6 +9740,8 @@ }, "node_modules/is-shared-array-buffer": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", + "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", "dev": true, "license": "MIT", "dependencies": { @@ -8340,6 +9756,8 @@ }, "node_modules/is-stream": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, "license": "MIT", "engines": { @@ -8351,6 +9769,8 @@ }, "node_modules/is-string": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", + "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", "dev": true, "license": "MIT", "dependencies": { @@ -8366,6 +9786,8 @@ }, "node_modules/is-symbol": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", + "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", "dev": true, "license": "MIT", "dependencies": { @@ -8382,6 +9804,8 @@ }, "node_modules/is-typed-array": { "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", "dev": true, "license": "MIT", "dependencies": { @@ -8396,6 +9820,8 @@ }, "node_modules/is-weakmap": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", "dev": true, "license": "MIT", "engines": { @@ -8407,6 +9833,8 @@ }, "node_modules/is-weakref": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", + "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", "dev": true, "license": "MIT", "dependencies": { @@ -8421,6 +9849,8 @@ }, "node_modules/is-weakset": { "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", + "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", "dev": true, "license": "MIT", "dependencies": { @@ -8436,11 +9866,15 @@ }, "node_modules/isarray": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "dev": true, "license": "MIT" }, "node_modules/isexe": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true, "license": "ISC" }, @@ -8456,6 +9890,8 @@ }, "node_modules/isobject": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", "dev": true, "license": "MIT", "engines": { @@ -8464,6 +9900,8 @@ }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -8472,6 +9910,8 @@ }, "node_modules/istanbul-lib-instrument": { "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -8487,6 +9927,8 @@ }, "node_modules/istanbul-lib-instrument/node_modules/semver": { "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "dev": true, "license": "ISC", "bin": { @@ -8498,6 +9940,8 @@ }, "node_modules/istanbul-lib-report": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -8511,6 +9955,8 @@ }, "node_modules/istanbul-lib-report/node_modules/make-dir": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, "license": "MIT", "dependencies": { @@ -8525,6 +9971,8 @@ }, "node_modules/istanbul-lib-report/node_modules/semver": { "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "dev": true, "license": "ISC", "bin": { @@ -8536,6 +9984,8 @@ }, "node_modules/istanbul-lib-source-maps": { "version": "5.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", + "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -8549,6 +9999,8 @@ }, "node_modules/istanbul-reports": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -8561,6 +10013,8 @@ }, "node_modules/iterator.prototype": { "version": "1.1.5", + "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz", + "integrity": "sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==", "dev": true, "license": "MIT", "dependencies": { @@ -8577,6 +10031,8 @@ }, "node_modules/jackspeak": { "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -8591,6 +10047,8 @@ }, "node_modules/jest": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest/-/jest-30.5.2.tgz", + "integrity": "sha512-3gnpdBIza8ijCl3iMV9ChE3hSt1+46865qqod863gQtJr1DixOkAU5DoGbi3u+XlRcw++BhZQMu/y4xBdHBvSQ==", "dev": true, "license": "MIT", "dependencies": { @@ -8616,6 +10074,8 @@ }, "node_modules/jest-changed-files": { "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-30.5.1.tgz", + "integrity": "sha512-0+bvMM/ENhDI29Z8q1r4HxiDIi4G5tnBmSw4esfPQoj9q8Nik7KIyuxHkTVnnniJQf05SxpGaKDQ+4h28ynGPg==", "dev": true, "license": "MIT", "dependencies": { @@ -8629,6 +10089,8 @@ }, "node_modules/jest-circus": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-30.5.2.tgz", + "integrity": "sha512-vffFgjs5JSJ9q4ds1vNW3klKYPJfYfIY61LT/zaZgvTeASJOWZUt8LBfHgIcV4rwxlPBLl/ePBGccHEclS4PlQ==", "dev": true, "license": "MIT", "dependencies": { @@ -8659,6 +10121,8 @@ }, "node_modules/jest-circus/node_modules/ansi-styles": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "license": "MIT", "engines": { @@ -8670,6 +10134,8 @@ }, "node_modules/jest-circus/node_modules/pretty-format": { "version": "30.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.5.1.tgz", + "integrity": "sha512-byhRAPguVKMQIj4kjJwJ5lAskVhfuiSdiYl/aLTWpgkGEmic2jYhJh1yE9ih8Ox44Xg9ccCT11/S6QrzSJuNrg==", "dev": true, "license": "MIT", "dependencies": { @@ -8684,6 +10150,8 @@ }, "node_modules/jest-circus/node_modules/slash": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, "license": "MIT", "engines": { @@ -8692,6 +10160,8 @@ }, "node_modules/jest-cli": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-30.5.2.tgz", + "integrity": "sha512-YYYxUUVjFgPvgEleKNKMaYGIFgR3l3832Cl0kRL/oCiDZ03v7wImUtquHl2OOBCCNgprjZgBN5bczS/JklPBDg==", "dev": true, "license": "MIT", "dependencies": { @@ -8721,96 +10191,10 @@ } } }, - "node_modules/jest-cli/node_modules/cliui": { - "version": "8.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/jest-cli/node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-cli/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-cli/node_modules/string-width": { - "version": "4.2.3", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-cli/node_modules/wrap-ansi": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/jest-cli/node_modules/y18n": { - "version": "5.0.8", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/jest-cli/node_modules/yargs": { - "version": "17.7.3", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/jest-cli/node_modules/yargs-parser": { - "version": "21.1.1", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, "node_modules/jest-config": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-30.5.2.tgz", + "integrity": "sha512-U6221OZekabePvGcGPf4raIBKMvYQWFHvhobDJRojOYaFMj2HaGytAdknjDhYc6JTz2fdHW9+6k0wWUDaNeOFQ==", "dev": true, "license": "MIT", "dependencies": { @@ -8860,6 +10244,8 @@ }, "node_modules/jest-config/node_modules/ansi-styles": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "license": "MIT", "engines": { @@ -8871,6 +10257,8 @@ }, "node_modules/jest-config/node_modules/balanced-match": { "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", "dev": true, "license": "MIT", "engines": { @@ -8879,6 +10267,8 @@ }, "node_modules/jest-config/node_modules/brace-expansion": { "version": "5.0.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", + "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", "dev": true, "license": "MIT", "dependencies": { @@ -8890,6 +10280,8 @@ }, "node_modules/jest-config/node_modules/glob": { "version": "13.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", + "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -8906,6 +10298,8 @@ }, "node_modules/jest-config/node_modules/minimatch": { "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -8920,6 +10314,8 @@ }, "node_modules/jest-config/node_modules/pretty-format": { "version": "30.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.5.1.tgz", + "integrity": "sha512-byhRAPguVKMQIj4kjJwJ5lAskVhfuiSdiYl/aLTWpgkGEmic2jYhJh1yE9ih8Ox44Xg9ccCT11/S6QrzSJuNrg==", "dev": true, "license": "MIT", "dependencies": { @@ -8934,6 +10330,8 @@ }, "node_modules/jest-config/node_modules/slash": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, "license": "MIT", "engines": { @@ -8942,6 +10340,8 @@ }, "node_modules/jest-diff": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.5.2.tgz", + "integrity": "sha512-rBtHnI6BWTiWj3lM7fOLVfChx7R9B0u9VV3PRHawKs79x6ZjW1QoSrKenaigNGWlvhtoi2BqvDbABDie+Os3xQ==", "dev": true, "license": "MIT", "dependencies": { @@ -8956,6 +10356,8 @@ }, "node_modules/jest-diff/node_modules/ansi-styles": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "license": "MIT", "engines": { @@ -8967,6 +10369,8 @@ }, "node_modules/jest-diff/node_modules/pretty-format": { "version": "30.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.5.1.tgz", + "integrity": "sha512-byhRAPguVKMQIj4kjJwJ5lAskVhfuiSdiYl/aLTWpgkGEmic2jYhJh1yE9ih8Ox44Xg9ccCT11/S6QrzSJuNrg==", "dev": true, "license": "MIT", "dependencies": { @@ -8981,6 +10385,8 @@ }, "node_modules/jest-docblock": { "version": "30.5.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-30.5.0.tgz", + "integrity": "sha512-NwDqcxtoZi33RhuW+zJS/RVA3rmheQ8BnwpYZuc/Eruaz6seQb7+aoCeDZu/3X7W2XmD8DbSo9Pn72DbKsBFYw==", "dev": true, "license": "MIT", "dependencies": { @@ -8992,6 +10398,8 @@ }, "node_modules/jest-each": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-30.5.2.tgz", + "integrity": "sha512-GRrW+7fmmgmkvyfEBqc1QFdWnF1Ex5yG6Y6AWL4TTxnkWlKIT98dsKh3P3UuWm6v4XsQwVE6DEzXIPMzWJ3ZbA==", "dev": true, "license": "MIT", "dependencies": { @@ -9008,6 +10416,8 @@ }, "node_modules/jest-each/node_modules/ansi-styles": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "license": "MIT", "engines": { @@ -9019,6 +10429,8 @@ }, "node_modules/jest-each/node_modules/pretty-format": { "version": "30.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.5.1.tgz", + "integrity": "sha512-byhRAPguVKMQIj4kjJwJ5lAskVhfuiSdiYl/aLTWpgkGEmic2jYhJh1yE9ih8Ox44Xg9ccCT11/S6QrzSJuNrg==", "dev": true, "license": "MIT", "dependencies": { @@ -9033,6 +10445,8 @@ }, "node_modules/jest-environment-jsdom": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-30.5.2.tgz", + "integrity": "sha512-6NOZjEP+WNi4WXjbxb/1ROnfaMxn6Dhqu6uSC22o0H28z+uppejs/jZ9KCVoLepqqoCjcNZujtzQqC9jSV15jg==", "dev": true, "license": "MIT", "dependencies": { @@ -9055,6 +10469,8 @@ }, "node_modules/jest-environment-node": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-30.5.2.tgz", + "integrity": "sha512-Ciz4KgTGIbojxSKpuFImgWJj5EyqfE8xMq9NxWmOXnQywHHS03H9Mv+vaCB29J5pr3JBrY27WbRV18rBdjh8Dg==", "dev": true, "license": "MIT", "dependencies": { @@ -9072,6 +10488,8 @@ }, "node_modules/jest-haste-map": { "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-30.5.1.tgz", + "integrity": "sha512-VIFgt67jW480YDxKfEv9IYQKrFpYt7bOCMn3VsnjK7AK9qo7p6acpnA1DHwsVOULE3dTaYew/6JaTD/d0VDHoQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9093,6 +10511,8 @@ }, "node_modules/jest-haste-map/node_modules/fdir": { "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", "engines": { @@ -9109,6 +10529,8 @@ }, "node_modules/jest-haste-map/node_modules/picomatch": { "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", "dev": true, "license": "MIT", "engines": { @@ -9120,6 +10542,8 @@ }, "node_modules/jest-leak-detector": { "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-30.5.1.tgz", + "integrity": "sha512-gt4GT2aWgEoCNTcBe4rqS74xTIUJxi+UD9SNSu9aOk5LmTEd6fS5KSTmAKAfitCCktQHNN+upUuL6EkBfFbMDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9132,6 +10556,8 @@ }, "node_modules/jest-leak-detector/node_modules/ansi-styles": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "license": "MIT", "engines": { @@ -9143,6 +10569,8 @@ }, "node_modules/jest-leak-detector/node_modules/pretty-format": { "version": "30.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.5.1.tgz", + "integrity": "sha512-byhRAPguVKMQIj4kjJwJ5lAskVhfuiSdiYl/aLTWpgkGEmic2jYhJh1yE9ih8Ox44Xg9ccCT11/S6QrzSJuNrg==", "dev": true, "license": "MIT", "dependencies": { @@ -9157,6 +10585,8 @@ }, "node_modules/jest-matcher-utils": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.5.2.tgz", + "integrity": "sha512-lFkB365PTIHOhPzwrb9T6gvlDnPpOZ7/c3ewOKKB7bzztqjVrtlyRL2MkyfJXpyY2u2SKw001JKrTx14fBUFcQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9171,6 +10601,8 @@ }, "node_modules/jest-matcher-utils/node_modules/ansi-styles": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "license": "MIT", "engines": { @@ -9182,6 +10614,8 @@ }, "node_modules/jest-matcher-utils/node_modules/pretty-format": { "version": "30.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.5.1.tgz", + "integrity": "sha512-byhRAPguVKMQIj4kjJwJ5lAskVhfuiSdiYl/aLTWpgkGEmic2jYhJh1yE9ih8Ox44Xg9ccCT11/S6QrzSJuNrg==", "dev": true, "license": "MIT", "dependencies": { @@ -9196,6 +10630,8 @@ }, "node_modules/jest-message-util": { "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.5.1.tgz", + "integrity": "sha512-UdQlLdd9wL/Ys7xRErckqwD6wPlSZYueosSWuHc1r2ztGLwlgPvtSJq2+BPEgaEY13WLvfFbmhTj8pba0Sd1jg==", "dev": true, "license": "MIT", "dependencies": { @@ -9216,6 +10652,8 @@ }, "node_modules/jest-message-util/node_modules/ansi-styles": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "license": "MIT", "engines": { @@ -9227,6 +10665,8 @@ }, "node_modules/jest-message-util/node_modules/picomatch": { "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", "dev": true, "license": "MIT", "engines": { @@ -9238,6 +10678,8 @@ }, "node_modules/jest-message-util/node_modules/pretty-format": { "version": "30.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.5.1.tgz", + "integrity": "sha512-byhRAPguVKMQIj4kjJwJ5lAskVhfuiSdiYl/aLTWpgkGEmic2jYhJh1yE9ih8Ox44Xg9ccCT11/S6QrzSJuNrg==", "dev": true, "license": "MIT", "dependencies": { @@ -9252,6 +10694,8 @@ }, "node_modules/jest-message-util/node_modules/slash": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, "license": "MIT", "engines": { @@ -9260,6 +10704,8 @@ }, "node_modules/jest-mock": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.5.2.tgz", + "integrity": "sha512-KTHb37Fhj8xY8qPFvTFaFJHcdsumQp+ExsUlgoX232Agmc706gagBs53+CYvulV7MVQo9AgXOUxsqzzVBoJlrA==", "dev": true, "license": "MIT", "dependencies": { @@ -9274,6 +10720,8 @@ }, "node_modules/jest-regex-util": { "version": "30.5.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-30.5.0.tgz", + "integrity": "sha512-Mg0WK7A6xRHLSA1udJ8y9f3lM0uUhFTBnLKzwPmqB9AylvpleJ6BLemR8K9dK27DY+cesDryoA7yLZCAHsPG1A==", "dev": true, "license": "MIT", "engines": { @@ -9282,6 +10730,8 @@ }, "node_modules/jest-resolve": { "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-30.5.1.tgz", + "integrity": "sha512-wprhLejRtwN6h8ZgaqC0eYjGJ1uMdGPT/+b3eFncbG4NWuuP9QL+vWwRinu9waw7hkOLcpMJGVJAMgBwsPssMQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9299,6 +10749,8 @@ }, "node_modules/jest-resolve-dependencies": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-30.5.2.tgz", + "integrity": "sha512-GMI0DP5enX9Z2qW2zFy1bOkrCfWAOPRJQ7qHt0pdfrxBPsgWxglMPrRSK2TX/wRWYxcPRSLFg3Z88qPOzHx7FQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9311,6 +10763,8 @@ }, "node_modules/jest-resolve/node_modules/slash": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, "license": "MIT", "engines": { @@ -9319,6 +10773,8 @@ }, "node_modules/jest-runner": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-30.5.2.tgz", + "integrity": "sha512-/B6px7hiiNhVSRwuv9AGn0nawYvwsHeQZ3ItTd5Gp2diFd0EOKaWVeWqcbw3L88vx1GfpCKjQkxWItZCTl11Rw==", "dev": true, "license": "MIT", "dependencies": { @@ -9351,6 +10807,8 @@ }, "node_modules/jest-runtime": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-30.5.2.tgz", + "integrity": "sha512-0paUAHBlheai10A3XSy9Xh+YBG0IROy+/qzcDPzQ/nbbXrznQzeWy5qniICWK6d3W3scaRQCVAbXdcK0ibBq4w==", "dev": true, "license": "MIT", "dependencies": { @@ -9384,6 +10842,8 @@ }, "node_modules/jest-runtime/node_modules/balanced-match": { "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", "dev": true, "license": "MIT", "engines": { @@ -9392,6 +10852,8 @@ }, "node_modules/jest-runtime/node_modules/brace-expansion": { "version": "5.0.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", + "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9403,6 +10865,8 @@ }, "node_modules/jest-runtime/node_modules/glob": { "version": "13.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", + "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -9419,6 +10883,8 @@ }, "node_modules/jest-runtime/node_modules/minimatch": { "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -9433,6 +10899,8 @@ }, "node_modules/jest-runtime/node_modules/slash": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, "license": "MIT", "engines": { @@ -9441,6 +10909,8 @@ }, "node_modules/jest-snapshot": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-30.5.2.tgz", + "integrity": "sha512-jKIdes25AnAH73dOCi2qE6J6vHJ6L2vyBS11M89kT50DVJcLTf2AOjvcc+2vVaN8lUbY5v2R83aqXo3Ro9fqYA==", "dev": true, "license": "MIT", "dependencies": { @@ -9472,6 +10942,8 @@ }, "node_modules/jest-snapshot/node_modules/ansi-styles": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "license": "MIT", "engines": { @@ -9483,6 +10955,8 @@ }, "node_modules/jest-snapshot/node_modules/pretty-format": { "version": "30.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.5.1.tgz", + "integrity": "sha512-byhRAPguVKMQIj4kjJwJ5lAskVhfuiSdiYl/aLTWpgkGEmic2jYhJh1yE9ih8Ox44Xg9ccCT11/S6QrzSJuNrg==", "dev": true, "license": "MIT", "dependencies": { @@ -9497,6 +10971,8 @@ }, "node_modules/jest-snapshot/node_modules/semver": { "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "dev": true, "license": "ISC", "bin": { @@ -9508,6 +10984,8 @@ }, "node_modules/jest-util": { "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.5.1.tgz", + "integrity": "sha512-yKuxmNy2rSbTXw+3SIPanJo+nV4/BS1p26v44IYBFMsswSQySfMMcPHErnOncda7i9HEz0q605rIhSTBVgrZTg==", "dev": true, "license": "MIT", "dependencies": { @@ -9524,6 +11002,8 @@ }, "node_modules/jest-util/node_modules/picomatch": { "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", "dev": true, "license": "MIT", "engines": { @@ -9535,6 +11015,8 @@ }, "node_modules/jest-validate": { "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-30.5.1.tgz", + "integrity": "sha512-i/buJ56wTpxihE93hQYNMfdOThS87+HGvLZzZJmU4xggPcdTYQq051iwALLCHp3q+SkCGH+EFejQZz5EbBSkkg==", "dev": true, "license": "MIT", "dependencies": { @@ -9551,6 +11033,8 @@ }, "node_modules/jest-validate/node_modules/ansi-styles": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "license": "MIT", "engines": { @@ -9562,6 +11046,8 @@ }, "node_modules/jest-validate/node_modules/camelcase": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, "license": "MIT", "engines": { @@ -9573,6 +11059,8 @@ }, "node_modules/jest-validate/node_modules/pretty-format": { "version": "30.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.5.1.tgz", + "integrity": "sha512-byhRAPguVKMQIj4kjJwJ5lAskVhfuiSdiYl/aLTWpgkGEmic2jYhJh1yE9ih8Ox44Xg9ccCT11/S6QrzSJuNrg==", "dev": true, "license": "MIT", "dependencies": { @@ -9587,6 +11075,8 @@ }, "node_modules/jest-watcher": { "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-30.5.2.tgz", + "integrity": "sha512-rqRgg4R11GA9m1UsEZwQeixHsgZReCn6TOHAHtIH33yXrIvoX0OGPA20Yzzjkz7X40fZvcRSxEpQppYPcWzmcQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9605,6 +11095,8 @@ }, "node_modules/jest-worker": { "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-30.5.1.tgz", + "integrity": "sha512-Cbxh5v7AoLuFRmFJSM4/aHdQ68rjXvUWr716EE0Dh3I7T+T/3FgFKhOERGXHcU2Meftq9+9zxPM3TSNyI9D+HA==", "dev": true, "license": "MIT", "dependencies": { @@ -9620,6 +11112,8 @@ }, "node_modules/jest-worker/node_modules/supports-color": { "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "license": "MIT", "dependencies": { @@ -9634,10 +11128,14 @@ }, "node_modules/js-tokens": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "license": "MIT" }, "node_modules/js-yaml": { "version": "3.15.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.2.tgz", + "integrity": "sha512-6EuL879VkRA+1Cz578mKMiKvjPNEuk6+r1JaFzoSWejZmtf7xWbIyw1e3KkxlkzTIt9Taw6JBhEppG7utc1P+w==", "dev": true, "license": "MIT", "dependencies": { @@ -9650,6 +11148,8 @@ }, "node_modules/jsdom": { "version": "26.1.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-26.1.0.tgz", + "integrity": "sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==", "dev": true, "license": "MIT", "dependencies": { @@ -9688,6 +11188,8 @@ }, "node_modules/jsesc": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "dev": true, "license": "MIT", "bin": { @@ -9699,31 +11201,36 @@ }, "node_modules/json-buffer": { "version": "3.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/json-parse-better-errors": { - "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true, "license": "MIT" }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true, "license": "MIT" }, "node_modules/json-schema-traverse": { "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true, "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true, "license": "MIT" }, "node_modules/json5": { "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, "license": "MIT", "bin": { @@ -9735,6 +11242,8 @@ }, "node_modules/jsx-ast-utils": { "version": "3.3.5", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", + "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9750,268 +11259,129 @@ "node_modules/junk": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/junk/-/junk-3.1.0.tgz", - "integrity": "sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/keyv": { - "version": "4.5.4", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/kind-of": { - "version": "6.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/kleur": { - "version": "4.1.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/leven": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/lilconfig": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "dev": true, - "license": "MIT" - }, - "node_modules/linkify-it": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.2.tgz", - "integrity": "sha512-ONTm2jCMAVZjgQa/Fy1kScXsuOoF5NPTsoFBdE1KVIZ2vAh/r9+Bqo+0jINCBYnavTPQZz38QzFTme79ENoN3Q==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/puzrin" - }, - { - "type": "github", - "url": "https://github.com/sponsors/markdown-it" - } - ], - "license": "MIT", - "dependencies": { - "uc.micro": "^2.0.0" - } - }, - "node_modules/lint-staged": { - "version": "13.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "5.3.0", - "commander": "11.0.0", - "debug": "4.3.4", - "execa": "7.2.0", - "lilconfig": "2.1.0", - "listr2": "6.6.1", - "micromatch": "4.0.5", - "pidtree": "0.6.0", - "string-argv": "0.3.2", - "yaml": "2.3.1" - }, - "bin": { - "lint-staged": "bin/lint-staged.js" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "funding": { - "url": "https://opencollective.com/lint-staged" - } - }, - "node_modules/lint-staged/node_modules/chalk": { - "version": "5.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/lint-staged/node_modules/commander": { - "version": "11.0.0", + "integrity": "sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=16" + "node": ">=8" } }, - "node_modules/lint-staged/node_modules/debug": { - "version": "4.3.4", + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "json-buffer": "3.0.1" } }, - "node_modules/lint-staged/node_modules/execa": { - "version": "7.2.0", + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true, "license": "MIT", - "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" - }, "engines": { - "node": "^14.18.0 || ^16.14.0 || >=18.0.0" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" + "node": ">=0.10.0" } }, - "node_modules/lint-staged/node_modules/human-signals": { - "version": "4.3.1", + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "engines": { - "node": ">=14.18.0" + "node": ">=6" } }, - "node_modules/lint-staged/node_modules/is-stream": { - "version": "3.0.0", + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", "dev": true, "license": "MIT", "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=6" } }, - "node_modules/lint-staged/node_modules/micromatch": { - "version": "4.0.5", + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "license": "MIT", "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" }, "engines": { - "node": ">=8.6" - } - }, - "node_modules/lint-staged/node_modules/mimic-fn": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 0.8.0" } }, - "node_modules/lint-staged/node_modules/ms": { - "version": "2.1.2", + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true, "license": "MIT" }, - "node_modules/lint-staged/node_modules/npm-run-path": { - "version": "5.3.0", + "node_modules/linkify-it": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-6.1.0.tgz", + "integrity": "sha512-wJ/TwpSDTLepCrQoYWYIExIKg5Zchex2Nn5yk2mFnB+6PtdkHtyLx742md9csRjjOnGkKIS/RrbY7l8D6gT9Vw==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/markdown-it" + } + ], "license": "MIT", "dependencies": { - "path-key": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "uc.micro": "^3.0.0" } }, - "node_modules/lint-staged/node_modules/onetime": { - "version": "6.0.0", + "node_modules/lint-staged": { + "version": "17.6.0", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-17.6.0.tgz", + "integrity": "sha512-nOhBfYkZEwkFtNzD5pK9s9LkcWoxJ+whLzEnhqi9nl7zTB5n7tg8+9iYgMGx2Wm3VlLu8cbNj0RACzY+nWi5iQ==", "dev": true, "license": "MIT", "dependencies": { - "mimic-fn": "^4.0.0" + "picomatch": "^4.0.7", + "string-argv": "^0.3.2", + "tinyexec": "^1.3.1" }, - "engines": { - "node": ">=12" + "bin": { + "lint-staged": "bin/lint-staged.js" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lint-staged/node_modules/path-key": { - "version": "4.0.0", - "dev": true, - "license": "MIT", "engines": { - "node": ">=12" + "node": ">=22.22.1" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://opencollective.com/lint-staged" + }, + "optionalDependencies": { + "yaml": "^2.9.1" } }, - "node_modules/lint-staged/node_modules/strip-final-newline": { - "version": "3.0.0", + "node_modules/lint-staged/node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", "dev": true, "license": "MIT", "engines": { "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/jonschlinkert" } }, "node_modules/liquidjs": { @@ -10052,87 +11422,10 @@ "dev": true, "license": "MIT" }, - "node_modules/listr2": { - "version": "6.6.1", - "dev": true, - "license": "MIT", - "dependencies": { - "cli-truncate": "^3.1.0", - "colorette": "^2.0.20", - "eventemitter3": "^5.0.1", - "log-update": "^5.0.1", - "rfdc": "^1.3.0", - "wrap-ansi": "^8.1.0" - }, - "engines": { - "node": ">=16.0.0" - }, - "peerDependencies": { - "enquirer": ">= 2.3.0 < 3" - }, - "peerDependenciesMeta": { - "enquirer": { - "optional": true - } - } - }, - "node_modules/load-json-file": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/load-json-file/node_modules/parse-json": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/load-json-file/node_modules/pify": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/load-json-file/node_modules/strip-bom": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/loader-utils": { - "version": "2.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - }, - "engines": { - "node": ">=8.9.0" - } - }, "node_modules/locate-path": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "license": "MIT", "dependencies": { @@ -10142,106 +11435,31 @@ "node": ">=8" } }, - "node_modules/lodash": { - "version": "4.18.1", - "dev": true, - "license": "MIT" - }, "node_modules/lodash.debounce": { "version": "4.0.8", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.memoize": { - "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", "dev": true, "license": "MIT" }, "node_modules/lodash.merge": { "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true, "license": "MIT" }, "node_modules/lodash.mergewith": { "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz", + "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==", "dev": true, "license": "MIT" }, - "node_modules/lodash.uniq": { - "version": "4.5.0", - "dev": true, - "license": "MIT" - }, - "node_modules/log-update": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-escapes": "^5.0.0", - "cli-cursor": "^4.0.0", - "slice-ansi": "^5.0.0", - "strip-ansi": "^7.0.1", - "wrap-ansi": "^8.0.1" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-update/node_modules/ansi-escapes": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^1.0.2" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-update/node_modules/ansi-regex": { - "version": "6.4.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/log-update/node_modules/strip-ansi": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.2.2" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/log-update/node_modules/type-fest": { - "version": "1.4.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/loose-envify": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "license": "MIT", "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" @@ -10251,12 +11469,19 @@ } }, "node_modules/lower-case": { - "version": "1.1.4", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", + "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } }, "node_modules/lru-cache": { "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, "license": "ISC", "dependencies": { @@ -10275,6 +11500,8 @@ }, "node_modules/lz-string": { "version": "1.5.0", + "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", + "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", "dev": true, "license": "MIT", "peer": true, @@ -10284,6 +11511,8 @@ }, "node_modules/make-dir": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "dev": true, "license": "MIT", "dependencies": { @@ -10296,27 +11525,18 @@ }, "node_modules/make-dir/node_modules/semver": { "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "license": "ISC", "bin": { "semver": "bin/semver" } }, - "node_modules/map-obj": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/markdown-it": { - "version": "14.3.2", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.3.2.tgz", - "integrity": "sha512-sHHjZ5fJKlgrG4qns2YwVcdNep35h5fERrfkD2YNsb9UFk0UIHarbiTaHKVMlPuWAoiilyK8Fv/jAm11slsY7Q==", + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-15.0.3.tgz", + "integrity": "sha512-+Az7Ojz3iRGu8KYMvJ6xVhvrxP3eE+vEtJX75Ow88XBpcQNV/0lGX5ZynIIBftREo4DC2jsveAMDaeltmm8QvQ==", "dev": true, "funding": [ { @@ -10330,12 +11550,12 @@ ], "license": "MIT", "dependencies": { - "argparse": "^2.0.1", - "entities": "^4.5.0", - "linkify-it": "^5.0.2", - "mdurl": "^2.0.0", + "argparse": "^3.0.3", + "entities": "^8.1.0", + "linkify-it": "^6.1.0", + "mdurl": "^2.1.0", "punycode.js": "^2.3.1", - "uc.micro": "^2.1.0" + "uc.micro": "^3.0.0" }, "bin": { "markdown-it": "bin/markdown-it.mjs" @@ -10386,31 +11606,38 @@ "dev": true, "license": "MIT" }, - "node_modules/markdown-it-for-inline": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/markdown-it-for-inline/-/markdown-it-for-inline-2.0.1.tgz", - "integrity": "sha512-JGOi3/Ohhzehs+1qSA4CkDydmVBtiYi2q2BD//YtTbSK+75InrGJX2MtPq1AdMeC4BV7rwEhq1+3pLnwGbsgzA==", - "dev": true, - "license": "MIT" - }, "node_modules/markdown-it-task-lists": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/markdown-it-task-lists/-/markdown-it-task-lists-2.1.1.tgz", + "integrity": "sha512-TxFAc76Jnhb2OUu+n3yz9RMu4CwGfaT788br6HhEDlvWfdeJcLUsxk1Hgw2yJio0OXsxv7pyIPmvECY7bMbluA==", "dev": true, "license": "ISC" }, "node_modules/markdown-it/node_modules/argparse": { - "version": "2.0.1", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-3.0.3.tgz", + "integrity": "sha512-Sn98ftV3KfsO8xfLPHG6oT8y+b0yvbrLgZjgPDXsharNY15tTAjqIsIju4S32nl6/iEUNNE4v+yL2Zhm8ooP3w==", "dev": true, - "license": "Python-2.0" + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], + "license": "PSF-2.0" }, "node_modules/markdown-it/node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-8.1.0.tgz", + "integrity": "sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA==", "dev": true, "license": "BSD-2-Clause", "engines": { - "node": ">=0.12" + "node": ">=20.19.0" }, "funding": { "url": "https://github.com/fb55/entities?sponsor=1" @@ -10418,6 +11645,8 @@ }, "node_modules/math-intrinsics": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", "dev": true, "license": "MIT", "engines": { @@ -10426,6 +11655,8 @@ }, "node_modules/mdn-data": { "version": "2.0.28", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.28.tgz", + "integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==", "dev": true, "license": "CC0-1.0" }, @@ -10438,46 +11669,18 @@ }, "node_modules/memoize-one": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-6.0.0.tgz", + "integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==", "license": "MIT" }, - "node_modules/memorystream": { - "version": "0.3.1", - "dev": true, - "engines": { - "node": ">= 0.10.0" - } - }, "node_modules/meow": { - "version": "10.1.5", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-14.1.0.tgz", + "integrity": "sha512-EDYo6VlmtnumlcBCbh1gLJ//9jvM/ndXHfVXIFrZVr6fGcwTUyCTFNTLCKuY3ffbK8L/+3Mzqnd58RojiZqHVw==", "dev": true, "license": "MIT", - "dependencies": { - "@types/minimist": "^1.2.2", - "camelcase-keys": "^7.0.0", - "decamelize": "^5.0.0", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "4.1.0", - "normalize-package-data": "^3.0.2", - "read-pkg-up": "^8.0.0", - "redent": "^4.0.0", - "trim-newlines": "^4.0.2", - "type-fest": "^1.2.2", - "yargs-parser": "^20.2.9" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/meow/node_modules/type-fest": { - "version": "1.4.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", "engines": { - "node": ">=10" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -10485,11 +11688,15 @@ }, "node_modules/merge-stream": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true, "license": "MIT" }, "node_modules/merge2": { "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, "license": "MIT", "engines": { @@ -10498,6 +11705,8 @@ }, "node_modules/micromatch": { "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "license": "MIT", "dependencies": { @@ -10522,7 +11731,9 @@ } }, "node_modules/mime-db": { - "version": "1.52.0", + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", "dev": true, "license": "MIT", "engines": { @@ -10530,18 +11741,26 @@ } }, "node_modules/mime-types": { - "version": "2.1.35", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", + "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", "dev": true, "license": "MIT", "dependencies": { - "mime-db": "1.52.0" + "mime-db": "^1.54.0" }, "engines": { - "node": ">= 0.6" + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/mimic-fn": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, "license": "MIT", "engines": { @@ -10550,6 +11769,8 @@ }, "node_modules/min-indent": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", "dev": true, "license": "MIT", "engines": { @@ -10558,6 +11779,8 @@ }, "node_modules/minimatch": { "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", "dev": true, "license": "ISC", "dependencies": { @@ -10569,27 +11792,18 @@ }, "node_modules/minimist": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/minimist-options": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0", - "kind-of": "^6.0.3" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/minimizer-webpack-plugin": { "version": "5.13.0", + "resolved": "https://registry.npmjs.org/minimizer-webpack-plugin/-/minimizer-webpack-plugin-5.13.0.tgz", + "integrity": "sha512-OO1NF2zHj6sf4CNv2AsUWYcS8WEwkVKQDXxxKzlOxx1Xl+WlqYtVC+oNlGNwGkLAOnpj277BSHypWwRtd9w4JQ==", "dev": true, "license": "MIT", "dependencies": { @@ -10659,34 +11873,10 @@ } } }, - "node_modules/minimizer-webpack-plugin/node_modules/ajv": { - "version": "8.20.0", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/minimizer-webpack-plugin/node_modules/ajv-keywords": { - "version": "5.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, "node_modules/minimizer-webpack-plugin/node_modules/jest-worker": { "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", "dev": true, "license": "MIT", "dependencies": { @@ -10698,31 +11888,10 @@ "node": ">= 10.13.0" } }, - "node_modules/minimizer-webpack-plugin/node_modules/json-schema-traverse": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/minimizer-webpack-plugin/node_modules/schema-utils": { - "version": "4.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.15", - "ajv": "^8.20.0", - "ajv-formats": "^3.0.1", - "ajv-keywords": "^5.1.0" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/minimizer-webpack-plugin/node_modules/supports-color": { "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "license": "MIT", "dependencies": { @@ -10737,23 +11906,14 @@ }, "node_modules/minipass": { "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", "dev": true, "license": "BlueOak-1.0.0", "engines": { "node": ">=16 || 14 >=14.17" } }, - "node_modules/mkdirp": { - "version": "0.5.6", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, "node_modules/moo": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.2.tgz", @@ -10770,6 +11930,8 @@ }, "node_modules/mrmime": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz", + "integrity": "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==", "dev": true, "license": "MIT", "engines": { @@ -10778,11 +11940,15 @@ }, "node_modules/ms": { "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, "license": "MIT" }, "node_modules/nanoid": { "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", "funding": [ { "type": "github", @@ -10799,6 +11965,8 @@ }, "node_modules/napi-postinstall": { "version": "0.3.4", + "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz", + "integrity": "sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==", "dev": true, "license": "MIT", "bin": { @@ -10813,14 +11981,18 @@ }, "node_modules/natural-compare": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true, "license": "MIT" }, "node_modules/next": { - "version": "16.4.0", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/next/-/next-16.4.2.tgz", + "integrity": "sha512-r+oBJojfefUjOiWkBhXgLS+igxX/7BWyK59uHnyOyplMSLtBZ+QLP3okrdYTbrfrbrmNTVWLBPaHDX9KRaIt3w==", "license": "MIT", "dependencies": { - "@next/env": "16.4.0", + "@next/env": "16.4.2", "@swc/helpers": "0.5.23", "baseline-browser-mapping": "^2.9.19", "caniuse-lite": "^1.0.30001579", @@ -10834,15 +12006,15 @@ "node": ">=20.9.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "16.4.0", - "@next/swc-darwin-x64": "16.4.0", - "@next/swc-linux-arm64-gnu": "16.4.0", - "@next/swc-linux-arm64-musl": "16.4.0", - "@next/swc-linux-x64-gnu": "16.4.0", - "@next/swc-linux-x64-musl": "16.4.0", - "@next/swc-win32-arm64-msvc": "16.4.0", - "@next/swc-win32-x64-msvc": "16.4.0", - "sharp": "^0.35.4" + "@next/swc-darwin-arm64": "16.4.2", + "@next/swc-darwin-x64": "16.4.2", + "@next/swc-linux-arm64-gnu": "16.4.2", + "@next/swc-linux-arm64-musl": "16.4.2", + "@next/swc-linux-x64-gnu": "16.4.2", + "@next/swc-linux-x64-musl": "16.4.2", + "@next/swc-win32-arm64-msvc": "16.4.2", + "@next/swc-win32-x64-msvc": "16.4.2", + "sharp": "^0.35.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", @@ -10869,6 +12041,8 @@ }, "node_modules/next/node_modules/postcss": { "version": "8.5.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.23.tgz", + "integrity": "sha512-g50586zr4bZmwFiTlflMu8E0bDTb5I5gertgwAKmsdUlTQIhZtunzUlD1WSzwcVWPoAVpsrA6vlfCD7oXvRwgg==", "funding": [ { "type": "opencollective", @@ -10893,26 +12067,28 @@ "node": "^10 || ^12 || >=14" } }, - "node_modules/nice-try": { - "version": "1.0.5", - "dev": true, - "license": "MIT" - }, "node_modules/no-case": { - "version": "2.3.2", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", "dev": true, "license": "MIT", "dependencies": { - "lower-case": "^1.1.1" + "lower-case": "^2.0.2", + "tslib": "^2.0.3" } }, "node_modules/node-addon-api": { "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", "dev": true, "license": "MIT" }, "node_modules/node-exports-info": { "version": "1.6.2", + "resolved": "https://registry.npmjs.org/node-exports-info/-/node-exports-info-1.6.2.tgz", + "integrity": "sha512-kXs9Go0cah0qHVV2v389IXQLdLCeE1xfFtjOAF+iobu0OIoG1pje8At2vMHyaPMiPMnG/LWP50twML21eMcAag==", "dev": true, "license": "MIT", "dependencies": { @@ -10930,6 +12106,8 @@ }, "node_modules/node-fetch": { "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "license": "MIT", "dependencies": { "whatwg-url": "^5.0.0" @@ -10941,247 +12119,76 @@ "encoding": "^0.1.0" }, "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/node-fetch/node_modules/tr46": { - "version": "0.0.3", - "license": "MIT" - }, - "node_modules/node-fetch/node_modules/webidl-conversions": { - "version": "3.0.1", - "license": "BSD-2-Clause" - }, - "node_modules/node-fetch/node_modules/whatwg-url": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/node-int64": { - "version": "0.4.0", - "dev": true, - "license": "MIT" - }, - "node_modules/node-releases": { - "version": "2.0.57", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/node-retrieve-globals": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/node-retrieve-globals/-/node-retrieve-globals-6.0.1.tgz", - "integrity": "sha512-j0DeFuZ/Wg3VlklfbxUgZF/mdHMTEiEipBb3q0SpMMbHaV3AVfoUQF8UGxh1s/yjqO0TgRZd4Pi/x2yRqoQ4Eg==", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^8.14.1", - "acorn-walk": "^8.3.4", - "esm-import-transformer": "^3.0.3" - } - }, - "node_modules/normalize-package-data": { - "version": "3.0.3", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "hosted-git-info": "^4.0.1", - "is-core-module": "^2.5.0", - "semver": "^7.3.4", - "validate-npm-package-license": "^3.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "7.8.5", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-run-all": { - "version": "4.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "chalk": "^2.4.1", - "cross-spawn": "^6.0.5", - "memorystream": "^0.3.1", - "minimatch": "^3.0.4", - "pidtree": "^0.3.0", - "read-pkg": "^3.0.0", - "shell-quote": "^1.6.1", - "string.prototype.padend": "^3.0.0" - }, - "bin": { - "npm-run-all": "bin/npm-run-all/index.js", - "run-p": "bin/run-p/index.js", - "run-s": "bin/run-s/index.js" - }, - "engines": { - "node": ">= 4" - } - }, - "node_modules/npm-run-all/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/npm-run-all/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/npm-run-all/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/npm-run-all/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "node_modules/npm-run-all/node_modules/cross-spawn": { - "version": "6.0.6", - "dev": true, - "license": "MIT", - "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "engines": { - "node": ">=4.8" - } - }, - "node_modules/npm-run-all/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/npm-run-all/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/npm-run-all/node_modules/path-key": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/npm-run-all/node_modules/pidtree": { - "version": "0.3.1", - "dev": true, - "license": "MIT", - "bin": { - "pidtree": "bin/pidtree.js" - }, - "engines": { - "node": ">=0.10" + "encoding": { + "optional": true + } } }, - "node_modules/npm-run-all/node_modules/semver": { - "version": "5.7.2", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } + "node_modules/node-fetch/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" }, - "node_modules/npm-run-all/node_modules/shebang-command": { - "version": "1.2.0", - "dev": true, + "node_modules/node-fetch/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/node-fetch/node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "license": "MIT", "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" } }, - "node_modules/npm-run-all/node_modules/shebang-regex": { - "version": "1.0.0", + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-releases": { + "version": "2.0.59", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.59.tgz", + "integrity": "sha512-5qr2okC4ItAI0hG5SaV0HoYMpnM/Y6+Oqr7AmPYy/2uEoGvS+GbSKLeRxSS1uAdu59yz0ouzcuXievSgg///WA==", "dev": true, "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">=18" } }, - "node_modules/npm-run-all/node_modules/supports-color": { - "version": "5.5.0", + "node_modules/node-retrieve-globals": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/node-retrieve-globals/-/node-retrieve-globals-6.0.1.tgz", + "integrity": "sha512-j0DeFuZ/Wg3VlklfbxUgZF/mdHMTEiEipBb3q0SpMMbHaV3AVfoUQF8UGxh1s/yjqO0TgRZd4Pi/x2yRqoQ4Eg==", "dev": true, "license": "MIT", "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" + "acorn": "^8.14.1", + "acorn-walk": "^8.3.4", + "esm-import-transformer": "^3.0.3" } }, - "node_modules/npm-run-all/node_modules/which": { - "version": "1.3.1", + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" + "license": "MIT", + "engines": { + "node": ">=0.10.0" } }, "node_modules/npm-run-path": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, "license": "MIT", "dependencies": { @@ -11193,6 +12200,8 @@ }, "node_modules/nth-check": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -11204,10 +12213,15 @@ }, "node_modules/nullthrows": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/nullthrows/-/nullthrows-1.1.1.tgz", + "integrity": "sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==", "license": "MIT" }, "node_modules/nunjucks": { - "version": "3.2.4", + "name": "@11ty/nunjucks", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@11ty/nunjucks/-/nunjucks-3.3.0.tgz", + "integrity": "sha512-kmMWFLcTMVeniw5G/pYV/uvPL/rN3Nm4WjRtkL9gZoXYh4cbME09ubVTHVJFr/G/h6wR89qJ8jULVqYJ4HI3yg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -11218,20 +12232,19 @@ "bin": { "nunjucks-precompile": "bin/precompile" }, - "engines": { - "node": ">= 6.9.0" - }, "peerDependencies": { - "chokidar": "^3.3.0" + "@11ty/chokidar-with-glob-support": "^1.1.0" }, "peerDependenciesMeta": { - "chokidar": { + "@11ty/chokidar-with-glob-support": { "optional": true } } }, "node_modules/nunjucks/node_modules/commander": { "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", "dev": true, "license": "MIT", "engines": { @@ -11240,11 +12253,15 @@ }, "node_modules/nwsapi": { "version": "2.2.28", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.28.tgz", + "integrity": "sha512-IlVB7OS7qrOsVYlpnFIkETjMwT9jwvmocJmmM+GZU/PAB3uGi9Ezd7vcWhWBUnSc0ya4ppmQITOyP1ez9gg8cg==", "dev": true, "license": "MIT" }, "node_modules/object-assign": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "license": "MIT", "engines": { "node": ">=0.10.0" @@ -11252,6 +12269,8 @@ }, "node_modules/object-inspect": { "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", "dev": true, "license": "MIT", "engines": { @@ -11263,6 +12282,8 @@ }, "node_modules/object-keys": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true, "license": "MIT", "engines": { @@ -11271,6 +12292,8 @@ }, "node_modules/object.assign": { "version": "4.1.7", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", + "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", "dev": true, "license": "MIT", "dependencies": { @@ -11290,6 +12313,8 @@ }, "node_modules/object.entries": { "version": "1.1.9", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz", + "integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==", "dev": true, "license": "MIT", "dependencies": { @@ -11304,6 +12329,8 @@ }, "node_modules/object.fromentries": { "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", "dev": true, "license": "MIT", "dependencies": { @@ -11321,6 +12348,8 @@ }, "node_modules/object.values": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", + "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", "dev": true, "license": "MIT", "dependencies": { @@ -11351,6 +12380,8 @@ }, "node_modules/once": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "license": "ISC", "dependencies": { @@ -11359,6 +12390,8 @@ }, "node_modules/onetime": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, "license": "MIT", "dependencies": { @@ -11373,6 +12406,8 @@ }, "node_modules/opener": { "version": "1.5.2", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", + "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", "dev": true, "license": "(WTFPL OR MIT)", "bin": { @@ -11381,6 +12416,8 @@ }, "node_modules/optionator": { "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, "license": "MIT", "dependencies": { @@ -11397,6 +12434,8 @@ }, "node_modules/own-keys": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.2.tgz", + "integrity": "sha512-19YVAg7T+WTrxggPukVq7DjTv6+PJ867TmhCvBsYwmbFCsZd344rq2Ld1p0wo8f8Qrrhgp82c6FJRqdXWtSEhg==", "dev": true, "license": "MIT", "dependencies": { @@ -11414,6 +12453,8 @@ }, "node_modules/p-limit": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "license": "MIT", "dependencies": { @@ -11428,6 +12469,8 @@ }, "node_modules/p-locate": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "license": "MIT", "dependencies": { @@ -11439,6 +12482,8 @@ }, "node_modules/p-locate/node_modules/p-limit": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "license": "MIT", "dependencies": { @@ -11452,14 +12497,13 @@ } }, "node_modules/p-map": { - "version": "4.0.0", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-7.1.1.tgz", + "integrity": "sha512-6Lh3jQPLthYujSrlw6ccWXBGZTkoTCz27Hd92g79LH/kjAbgoEu0t442cCCNbegPSJsA0lwDX8z0bcKtkpA32g==", "dev": true, "license": "MIT", - "dependencies": { - "aggregate-error": "^3.0.0" - }, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -11467,6 +12511,8 @@ }, "node_modules/p-try": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, "license": "MIT", "engines": { @@ -11475,19 +12521,26 @@ }, "node_modules/package-json-from-dist": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "dev": true, "license": "BlueOak-1.0.0" }, "node_modules/param-case": { - "version": "2.1.1", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", + "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==", "dev": true, "license": "MIT", "dependencies": { - "no-case": "^2.2.0" + "dot-case": "^3.0.4", + "tslib": "^2.0.3" } }, "node_modules/parent-module": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "license": "MIT", "dependencies": { @@ -11499,6 +12552,8 @@ }, "node_modules/parse-json": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, "license": "MIT", "dependencies": { @@ -11523,6 +12578,8 @@ }, "node_modules/parse5": { "version": "7.3.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", + "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", "dev": true, "license": "MIT", "dependencies": { @@ -11534,6 +12591,8 @@ }, "node_modules/parse5-htmlparser2-tree-adapter": { "version": "7.1.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz", + "integrity": "sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==", "dev": true, "license": "MIT", "dependencies": { @@ -11546,6 +12605,8 @@ }, "node_modules/parse5-parser-stream": { "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz", + "integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==", "dev": true, "license": "MIT", "dependencies": { @@ -11565,8 +12626,21 @@ "node": ">= 0.8" } }, + "node_modules/pascal-case": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", + "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", + "dev": true, + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "node_modules/path-exists": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, "license": "MIT", "engines": { @@ -11575,6 +12649,8 @@ }, "node_modules/path-is-absolute": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, "license": "MIT", "engines": { @@ -11583,6 +12659,8 @@ }, "node_modules/path-key": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, "license": "MIT", "engines": { @@ -11591,11 +12669,15 @@ }, "node_modules/path-parse": { "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true, "license": "MIT" }, "node_modules/path-scurry": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", + "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -11611,26 +12693,24 @@ }, "node_modules/path-scurry/node_modules/lru-cache": { "version": "11.5.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.3.tgz", + "integrity": "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==", "dev": true, "license": "BlueOak-1.0.0", "engines": { "node": "20 || >=22" } }, - "node_modules/path-type": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/picocolors": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", "dev": true, "license": "MIT", "engines": { @@ -11640,19 +12720,10 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pidtree": { - "version": "0.6.0", - "dev": true, - "license": "MIT", - "bin": { - "pidtree": "bin/pidtree.js" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/pify": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true, "license": "MIT", "engines": { @@ -11661,6 +12732,8 @@ }, "node_modules/pirates": { "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", "dev": true, "license": "MIT", "engines": { @@ -11669,6 +12742,8 @@ }, "node_modules/pkg-dir": { "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, "license": "MIT", "dependencies": { @@ -11680,6 +12755,8 @@ }, "node_modules/please-upgrade-node": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", + "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", "dev": true, "license": "MIT", "dependencies": { @@ -11688,6 +12765,8 @@ }, "node_modules/possible-typed-array-names": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", "dev": true, "license": "MIT", "engines": { @@ -11695,7 +12774,9 @@ } }, "node_modules/postcss": { - "version": "8.5.29", + "version": "8.5.30", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.30.tgz", + "integrity": "sha512-zkd+e9S1AQHhmaBKye9zlFHWjOwVgqXl1q3ECYy8561K7qxR2cREf/STLskulBFd78k6AOFeA+ff1TtEzk9bAA==", "dev": true, "funding": [ { @@ -11713,7 +12794,7 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.19", + "nanoid": "^3.3.20", "picocolors": "^1.1.1", "source-map-js": "^1.2.2" }, @@ -11723,6 +12804,8 @@ }, "node_modules/postcss-modules-extract-imports": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.1.0.tgz", + "integrity": "sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q==", "dev": true, "license": "ISC", "engines": { @@ -11734,6 +12817,8 @@ }, "node_modules/postcss-modules-local-by-default": { "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.2.0.tgz", + "integrity": "sha512-5kcJm/zk+GJDSfw+V/42fJ5fhjL5YbFDl8nVdXkJPLLW+Vf9mTD5Xe0wqIaDnLuL2U6cDNpTr+UQ+v2HWIBhzw==", "dev": true, "license": "MIT", "dependencies": { @@ -11750,6 +12835,8 @@ }, "node_modules/postcss-modules-scope": { "version": "3.2.1", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.1.tgz", + "integrity": "sha512-m9jZstCVaqGjTAuny8MdgE88scJnCiQSlSrOWcTQgM2t32UBe+MUmFSO5t7VMSfAf/FJKImAxBav8ooCHJXCJA==", "dev": true, "license": "ISC", "dependencies": { @@ -11764,6 +12851,8 @@ }, "node_modules/postcss-modules-values": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", + "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", "dev": true, "license": "ISC", "dependencies": { @@ -11778,6 +12867,8 @@ }, "node_modules/postcss-selector-parser": { "version": "7.1.6", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.6.tgz", + "integrity": "sha512-7qASPzhKF2l2KLboRZux8CCTRMdGiV08vWmyKzPz22qZ7ZjQBOeY7rNzNoCLSUiftJ7HUq0GERHmxw/t0dCdMw==", "dev": true, "license": "MIT", "dependencies": { @@ -11790,6 +12881,8 @@ }, "node_modules/postcss-value-parser": { "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "license": "MIT" }, "node_modules/posthtml": { @@ -11936,28 +13029,57 @@ }, "node_modules/prelude-ls": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, "license": "MIT", "engines": { "node": ">= 0.8.0" } }, + "node_modules/presentable-error": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/presentable-error/-/presentable-error-0.0.1.tgz", + "integrity": "sha512-E6rsNU1QNJgB3sjj7OANinGncFKuK+164sLXw1/CqBjj/EkXSoSdHCtWQGBNlREIGLnL7IEUEGa08YFVUbrhVg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/prettier": { - "version": "2.8.8", + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.10.tgz", + "integrity": "sha512-skGHTH1Yb9QvaTC4hWnRTzEYtCpApF0UMBPz+t/0ZPzP8ihefo/btKd+QA7pUE0fEwA1SbS/NmhyEcstdXOIdA==", "dev": true, "license": "MIT", "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/prettier-plugin-hermes-parser": { + "version": "0.37.0", + "resolved": "https://registry.npmjs.org/prettier-plugin-hermes-parser/-/prettier-plugin-hermes-parser-0.37.0.tgz", + "integrity": "sha512-qVPK/q4Unp9/sGBTiqkg5aPno7tKgHZK7SEvaWFpy8ircHiapeOM9PUPaS0uu2DvNjgPlINoJHGiHtgEEooT3w==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "prettier": "^3.0.0" + } + }, "node_modules/pretty-format": { "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", "dev": true, "license": "MIT", "peer": true, @@ -11972,6 +13094,8 @@ }, "node_modules/pretty-format/node_modules/ansi-styles": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "license": "MIT", "peer": true, @@ -11984,6 +13108,8 @@ }, "node_modules/prismjs": { "version": "1.30.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.30.0.tgz", + "integrity": "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==", "dev": true, "license": "MIT", "engines": { @@ -11992,6 +13118,8 @@ }, "node_modules/promise": { "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", "license": "MIT", "dependencies": { "asap": "~2.0.3" @@ -11999,6 +13127,9 @@ }, "node_modules/prop-types": { "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dev": true, "license": "MIT", "dependencies": { "loose-envify": "^1.4.0", @@ -12008,6 +13139,9 @@ }, "node_modules/prop-types/node_modules/react-is": { "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true, "license": "MIT" }, "node_modules/prr": { @@ -12019,6 +13153,8 @@ }, "node_modules/punycode": { "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, "license": "MIT", "engines": { @@ -12037,6 +13173,8 @@ }, "node_modules/pure-rand": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-7.0.1.tgz", + "integrity": "sha512-oTUZM/NAZS8p7ANR3SHh30kXB+zK2r2BPcEn/awJIbOvq82WoMN4p62AWWp3Hhw50G0xMsw1mhIBLqHw64EcNQ==", "dev": true, "funding": [ { @@ -12052,6 +13190,8 @@ }, "node_modules/queue-microtask": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, "funding": [ { @@ -12069,17 +13209,6 @@ ], "license": "MIT" }, - "node_modules/quick-lru": { - "version": "5.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/range-parser": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.3.0.tgz", @@ -12095,24 +13224,30 @@ } }, "node_modules/react": { - "version": "19.3.0", + "version": "19.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-19.3.1.tgz", + "integrity": "sha512-QNhWdt7nrgVWWQG58QuGsAR3jv3Hbe4mb4vz7w2csnHavciZJgda1CPNaldF6eVxv90ud3jUXpKlHL69gO38yw==", "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/react-dom": { - "version": "19.3.0", + "version": "19.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.3.1.tgz", + "integrity": "sha512-Y0bARz53lhEC1NMCASs0/j+faB/zqt3R8hpvg1e8+61ZVJ4UL0UdC4cBbXfZMcIuhrfgeILTLe+ZeBCavQPtKQ==", "license": "MIT", "dependencies": { "scheduler": "^0.28.0" }, "peerDependencies": { - "react": "^19.3.0" + "react": "^19.3.1" } }, "node_modules/react-is": { "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "dev": true, "license": "MIT", "peer": true @@ -12129,153 +13264,13 @@ "resolved": "packages/react-native-web-examples", "link": true }, - "node_modules/read-pkg": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up": { - "version": "8.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^5.0.0", - "read-pkg": "^6.0.0", - "type-fest": "^1.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/read-pkg": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^3.0.2", - "parse-json": "^5.2.0", - "type-fest": "^1.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/type-fest": { - "version": "1.4.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg/node_modules/hosted-git-info": { - "version": "2.8.9", - "dev": true, - "license": "ISC" - }, - "node_modules/read-pkg/node_modules/normalize-package-data": { - "version": "2.5.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/read-pkg/node_modules/path-type": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "pify": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg/node_modules/pify": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg/node_modules/semver": { - "version": "5.7.2", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, "node_modules/readdirp": { "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "license": "MIT", + "optional": true, "dependencies": { "picomatch": "^2.2.1" }, @@ -12283,45 +13278,23 @@ "node": ">=8.10.0" } }, - "node_modules/rechoir": { - "version": "0.7.1", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve": "^1.9.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/redent": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "indent-string": "^5.0.0", - "strip-indent": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/redent/node_modules/indent-string": { - "version": "5.0.0", + "node_modules/rechoir": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", "dev": true, "license": "MIT", - "engines": { - "node": ">=12" + "dependencies": { + "resolve": "^1.20.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">= 10.13.0" } }, "node_modules/reflect.getprototypeof": { "version": "1.0.10", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", + "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", "dev": true, "license": "MIT", "dependencies": { @@ -12343,11 +13316,15 @@ }, "node_modules/regenerate": { "version": "1.5.0", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.5.0.tgz", + "integrity": "sha512-1s+CxXjJ71i7LNVy8nYwg47XV4y6lAnOEhsMtSKq3WpmPfhl9LuKlTqKIn/3yUpE8lBz+W+TT88Bxyhnr0U4yw==", "dev": true, "license": "MIT" }, "node_modules/regenerate-unicode-properties": { "version": "10.3.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.3.0.tgz", + "integrity": "sha512-9ns8odR8e9q3otKeHj3DE80jZYKg6zVeZKE+zQmRKXFoVUcuiTGeO6iusDhPRoIQQPVPRvH+SfBhrTud4eczuw==", "dev": true, "license": "MIT", "dependencies": { @@ -12359,6 +13336,8 @@ }, "node_modules/regexp.prototype.flags": { "version": "1.5.4", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", + "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", "dev": true, "license": "MIT", "dependencies": { @@ -12378,6 +13357,8 @@ }, "node_modules/regexpu-core": { "version": "6.5.3", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.5.3.tgz", + "integrity": "sha512-E8VgUoSK+LMQrLboDxavm76MTBGrQhx9RiNuomRmYnZ10Uw12HrI8fkxOOncktb2hBpzIZ9SV/347euQHG5z+g==", "dev": true, "license": "MIT", "dependencies": { @@ -12394,11 +13375,15 @@ }, "node_modules/regjsgen": { "version": "0.8.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.8.0.tgz", + "integrity": "sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==", "dev": true, "license": "MIT" }, "node_modules/regjsparser": { "version": "0.13.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.13.4.tgz", + "integrity": "sha512-EWV80YgFaVgFrjGCAsV7oybp4GOxbls5RzBg8OB0nKEVXsBJR1JlV8Di1JhCROg3MzTfe1RI8yitIm1eOs68iA==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -12408,8 +13393,43 @@ "regjsparser": "bin/parser" } }, + "node_modules/rejoinder": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/rejoinder/-/rejoinder-2.1.0.tgz", + "integrity": "sha512-dLN0+SBPutC6bVFCH2+1o2VrHrvAj/PX6MzTemeaEKlCL10JKPMRlqszkitLQnHVgm90QQ94wxoBJRgfIEkstg==", + "dev": true, + "license": "MIT", + "workspaces": [ + "packages/*", + "!packages/*.ignore*" + ], + "dependencies": { + "@-xun/debug": "^2.0.2", + "chalk": "^5.6.0", + "core-js": "^3.45.1", + "exit-hook": "^4.0.0" + }, + "engines": { + "node": "^20.18.0 || ^22.12.0 || >=23.3.0" + } + }, + "node_modules/rejoinder/node_modules/chalk": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/relateurl": { "version": "0.2.7", + "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", + "integrity": "sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==", "dev": true, "license": "MIT", "engines": { @@ -12418,6 +13438,8 @@ }, "node_modules/require-directory": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, "license": "MIT", "engines": { @@ -12426,19 +13448,18 @@ }, "node_modules/require-from-string": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" } }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/resolve": { "version": "1.22.13", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.13.tgz", + "integrity": "sha512-Dj/cW9zBV2aRj6XzCxuGIs3ESZKv02jixne3q6jFZYZ3/Tg09gHHviSMDL4kObh9pqSahdRHEnDoaP2gn8YLhA==", "dev": true, "license": "MIT", "dependencies": { @@ -12459,6 +13480,8 @@ }, "node_modules/resolve-cwd": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", "dev": true, "license": "MIT", "dependencies": { @@ -12470,29 +13493,18 @@ }, "node_modules/resolve-from": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/restore-cursor": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/reusify": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", "dev": true, "license": "MIT", "engines": { @@ -12500,13 +13512,11 @@ "node": ">=0.10.0" } }, - "node_modules/rfdc": { - "version": "1.4.1", - "dev": true, - "license": "MIT" - }, "node_modules/rimraf": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, "license": "ISC", "dependencies": { @@ -12519,32 +13529,17 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/rrweb-cssom": { "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.8.0.tgz", + "integrity": "sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==", "dev": true, "license": "MIT" }, "node_modules/run-parallel": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "funding": [ { @@ -12567,6 +13562,8 @@ }, "node_modules/safe-array-concat": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.4.tgz", + "integrity": "sha512-wtZlHyOje6OZTGqAoaDKxFkgRtkF9CnHAVnCHKfuj200wAgL+bSJhdsCD2l0Qx/2ekEXjPWcyKkfGb5CPboslg==", "dev": true, "license": "MIT", "dependencies": { @@ -12585,6 +13582,8 @@ }, "node_modules/safe-push-apply": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", + "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", "dev": true, "license": "MIT", "dependencies": { @@ -12600,6 +13599,8 @@ }, "node_modules/safe-regex-test": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", "dev": true, "license": "MIT", "dependencies": { @@ -12616,11 +13617,15 @@ }, "node_modules/safer-buffer": { "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true, "license": "MIT" }, "node_modules/saxes": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", "dev": true, "license": "ISC", "dependencies": { @@ -12632,27 +13637,71 @@ }, "node_modules/scheduler": { "version": "0.28.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.28.0.tgz", + "integrity": "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==", "license": "MIT" }, "node_modules/schema-utils": { - "version": "2.7.1", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.5.0.tgz", + "integrity": "sha512-zJlMCZ0cAR5p/Y4oVpRoqioDMJcGxaXRrQ/4rP4WyR84vc5z/DolXdbvXeDpTwbtocDFr2rhPqHPErDCUtz2kA==", "dev": true, "license": "MIT", "dependencies": { - "@types/json-schema": "^7.0.5", - "ajv": "^6.12.4", - "ajv-keywords": "^3.5.2" + "@types/json-schema": "^7.0.15", + "ajv": "^8.20.0", + "ajv-formats": "^3.0.1", + "ajv-keywords": "^5.1.0" }, "engines": { - "node": ">= 8.9.0" + "node": ">= 10.13.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" } }, + "node_modules/schema-utils/node_modules/ajv": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/schema-utils/node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/schema-utils/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, "node_modules/section-matter": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", + "integrity": "sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==", "dev": true, "license": "MIT", "dependencies": { @@ -12665,6 +13714,8 @@ }, "node_modules/semver": { "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "license": "ISC", "bin": { @@ -12673,6 +13724,8 @@ }, "node_modules/semver-compare": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==", "dev": true, "license": "MIT" }, @@ -12703,40 +13756,10 @@ "url": "https://opencollective.com/express" } }, - "node_modules/send/node_modules/mime-db": { - "version": "1.54.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", - "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/send/node_modules/mime-types": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", - "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-db": "^1.54.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/set-function-length": { "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", "dev": true, "license": "MIT", "dependencies": { @@ -12753,6 +13776,8 @@ }, "node_modules/set-function-name": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", "dev": true, "license": "MIT", "dependencies": { @@ -12767,6 +13792,8 @@ }, "node_modules/set-proto": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", + "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", "dev": true, "license": "MIT", "dependencies": { @@ -12780,6 +13807,8 @@ }, "node_modules/setimmediate": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", "license": "MIT" }, "node_modules/setprototypeof": { @@ -12791,6 +13820,8 @@ }, "node_modules/shallow-clone": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", "dev": true, "license": "MIT", "dependencies": { @@ -12802,6 +13833,8 @@ }, "node_modules/sharp": { "version": "0.35.5", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.35.5.tgz", + "integrity": "sha512-Ywn4OnzGukp7CDMrp08RQ50YKmuwG47brZgIVPTvBaaAfQlRlygrRqSrxdCiL9M+LlzLBiJ68IR1QqvzHyjC7g==", "license": "Apache-2.0", "optional": true, "dependencies": { @@ -12850,6 +13883,8 @@ }, "node_modules/sharp/node_modules/semver": { "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "license": "ISC", "optional": true, "bin": { @@ -12861,6 +13896,8 @@ }, "node_modules/shebang-command": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "license": "MIT", "dependencies": { @@ -12872,25 +13909,18 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/shell-quote": { - "version": "1.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/side-channel": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz", + "integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==", "dev": true, "license": "MIT", "dependencies": { @@ -12909,6 +13939,8 @@ }, "node_modules/side-channel-list": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz", + "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==", "dev": true, "license": "MIT", "dependencies": { @@ -12924,6 +13956,8 @@ }, "node_modules/side-channel-map": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", "dev": true, "license": "MIT", "dependencies": { @@ -12941,6 +13975,8 @@ }, "node_modules/side-channel-weakmap": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", "dev": true, "license": "MIT", "dependencies": { @@ -12959,11 +13995,15 @@ }, "node_modules/signal-exit": { "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true, "license": "ISC" }, "node_modules/sirv": { - "version": "2.0.4", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.2.tgz", + "integrity": "sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g==", "dev": true, "license": "MIT", "dependencies": { @@ -12972,45 +14012,23 @@ "totalist": "^3.0.0" }, "engines": { - "node": ">= 10" + "node": ">=18" } }, "node_modules/slash": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, - "node_modules/slice-ansi": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.0.0", - "is-fullwidth-code-point": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "6.2.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/slugify": { "version": "1.6.9", + "resolved": "https://registry.npmjs.org/slugify/-/slugify-1.6.9.tgz", + "integrity": "sha512-vZ7rfeehZui7wQs438JXBckYLkIIdfHOXsaVEUMyS5fHo1483l1bMdo0EDSWYclY0yZKFOipDy4KHuKs6ssvdg==", "dev": true, "license": "MIT", "engines": { @@ -13019,6 +14037,8 @@ }, "node_modules/source-map": { "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -13027,6 +14047,8 @@ }, "node_modules/source-map-js": { "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -13034,6 +14056,8 @@ }, "node_modules/source-map-support": { "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, "license": "MIT", "dependencies": { @@ -13041,36 +14065,10 @@ "source-map": "^0.6.0" } }, - "node_modules/spdx-correct": { - "version": "3.2.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.5.0", - "dev": true, - "license": "CC-BY-3.0" - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.24", - "dev": true, - "license": "CC0-1.0" - }, "node_modules/sprintf-js": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true, "license": "BSD-3-Clause" }, @@ -13089,6 +14087,8 @@ }, "node_modules/stack-utils": { "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, "license": "MIT", "dependencies": { @@ -13100,6 +14100,8 @@ }, "node_modules/stack-utils/node_modules/escape-string-regexp": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", "dev": true, "license": "MIT", "engines": { @@ -13118,6 +14120,8 @@ }, "node_modules/stop-iteration-iterator": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", + "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==", "dev": true, "license": "MIT", "dependencies": { @@ -13130,6 +14134,8 @@ }, "node_modules/string-argv": { "version": "0.3.2", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", + "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", "dev": true, "license": "MIT", "engines": { @@ -13138,6 +14144,8 @@ }, "node_modules/string-length": { "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", "dev": true, "license": "MIT", "dependencies": { @@ -13148,30 +14156,26 @@ "node": ">=10" } }, - "node_modules/string-natural-compare": { - "version": "3.0.1", - "dev": true, - "license": "MIT" - }, "node_modules/string-width": { - "version": "5.1.2", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "license": "MIT", "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/string-width-cjs": { "name": "string-width", "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "license": "MIT", "dependencies": { @@ -13183,46 +14187,10 @@ "node": ">=8" } }, - "node_modules/string-width-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "6.4.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.2.2" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/string.prototype.matchall": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.1.0.tgz", + "integrity": "sha512-tHNHTxInrYLCga9O9YGxWA3G9/nnzQw8UGAyqGx3Ar1pSTTzIuM4woFSq4SowkXCjJIwq5sIiQvEfRI9tCH1qQ==", "dev": true, "license": "MIT", "dependencies": { @@ -13247,25 +14215,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/string.prototype.padend": { - "version": "3.1.6", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/string.prototype.repeat": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz", + "integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==", "dev": true, "license": "MIT", "dependencies": { @@ -13275,6 +14228,8 @@ }, "node_modules/string.prototype.trim": { "version": "1.2.11", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.11.tgz", + "integrity": "sha512-PwvK7BU+CMTJGYQCTZb5RWXIML92lftJLhQz1tBzgKiqGxJaMlBAa48POXaNAC2s4y8jr3EFqrkF9+44neS46w==", "dev": true, "license": "MIT", "dependencies": { @@ -13296,6 +14251,8 @@ }, "node_modules/string.prototype.trimend": { "version": "1.0.10", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.10.tgz", + "integrity": "sha512-2+3aDAOmPTmuFwjDnmJG2ctEkQKVki7vOSqaxkv42Mowj1V6PnvuwFCRrR5lChUux1TBskPjfkeTOhqczDMxTw==", "dev": true, "license": "MIT", "dependencies": { @@ -13313,6 +14270,8 @@ }, "node_modules/string.prototype.trimstart": { "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", "dev": true, "license": "MIT", "dependencies": { @@ -13329,6 +14288,8 @@ }, "node_modules/strip-ansi": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "license": "MIT", "dependencies": { @@ -13341,6 +14302,8 @@ "node_modules/strip-ansi-cjs": { "name": "strip-ansi", "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "license": "MIT", "dependencies": { @@ -13352,6 +14315,8 @@ }, "node_modules/strip-bom": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true, "license": "MIT", "engines": { @@ -13360,6 +14325,8 @@ }, "node_modules/strip-bom-string": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", + "integrity": "sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==", "dev": true, "license": "MIT", "engines": { @@ -13368,25 +14335,32 @@ }, "node_modules/strip-final-newline": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, - "node_modules/strip-indent": { - "version": "4.1.1", + "node_modules/strip-indent~3": { + "name": "strip-indent", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", "dev": true, "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" } }, "node_modules/strip-json-comments": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, "license": "MIT", "engines": { @@ -13397,22 +14371,26 @@ } }, "node_modules/style-loader": { - "version": "3.3.4", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-4.0.0.tgz", + "integrity": "sha512-1V4WqhhZZgjVAVJyt7TdDPZoPBPNHbekX4fWnCJL1yQukhCeZhJySUL+gL9y6sNdN95uEOS83Y55SqHcP7MzLA==", "dev": true, "license": "MIT", "engines": { - "node": ">= 12.13.0" + "node": ">= 18.12.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" }, "peerDependencies": { - "webpack": "^5.0.0" + "webpack": "^5.27.0" } }, "node_modules/styled-jsx": { "version": "5.1.6", + "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.6.tgz", + "integrity": "sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==", "license": "MIT", "dependencies": { "client-only": "0.0.1" @@ -13434,10 +14412,14 @@ }, "node_modules/styleq": { "version": "0.1.3", + "resolved": "https://registry.npmjs.org/styleq/-/styleq-0.1.3.tgz", + "integrity": "sha512-3ZUifmCDCQanjeej1f6kyl/BeP/Vae5EYkQ9iJfUm/QwZvlgnZzyflqAsAWYURdtea8Vkvswu2GrC57h3qffcA==", "license": "MIT" }, "node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "license": "MIT", "dependencies": { @@ -13449,6 +14431,8 @@ }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, "license": "MIT", "engines": { @@ -13460,11 +14444,15 @@ }, "node_modules/symbol-tree": { "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true, "license": "MIT" }, "node_modules/synckit": { "version": "0.11.13", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.13.tgz", + "integrity": "sha512-eNRKgb3z66Yp3D2CixVujOUvXLFUTij/zVnV8KRyvFdQwpz7I5DS8UfRkTeLzb64u+dkzDSdelE24izu+zSSUg==", "dev": true, "license": "MIT", "dependencies": { @@ -13479,6 +14467,8 @@ }, "node_modules/tapable": { "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", + "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", "dev": true, "license": "MIT", "engines": { @@ -13491,6 +14481,8 @@ }, "node_modules/terser": { "version": "5.51.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.51.2.tgz", + "integrity": "sha512-bWnjSNscmuI+GJze6ZupnHP8G/cTcsJF+bXCeQknk2SHQsgbNJnLrqiH9jZ2W4STPVXH2mDKKRX3iwPhc9Cn/Q==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -13508,11 +14500,15 @@ }, "node_modules/terser/node_modules/commander": { "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true, "license": "MIT" }, "node_modules/test-exclude": { "version": "7.0.2", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.2.tgz", + "integrity": "sha512-u9E6A+ZDYdp7a4WnarkXPZOx8Ilz46+kby6p1yZ8zsGTz9gYa6FIS7lj2oezzNKmtdyyJNNmmXDppga5GB7kSw==", "dev": true, "license": "ISC", "dependencies": { @@ -13526,6 +14522,8 @@ }, "node_modules/test-exclude/node_modules/balanced-match": { "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", "dev": true, "license": "MIT", "engines": { @@ -13534,6 +14532,8 @@ }, "node_modules/test-exclude/node_modules/brace-expansion": { "version": "5.0.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", + "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", "dev": true, "license": "MIT", "dependencies": { @@ -13545,6 +14545,9 @@ }, "node_modules/test-exclude/node_modules/glob": { "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, "license": "ISC", "dependencies": { @@ -13564,11 +14567,15 @@ }, "node_modules/test-exclude/node_modules/glob/node_modules/balanced-match": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true, "license": "MIT" }, "node_modules/test-exclude/node_modules/glob/node_modules/brace-expansion": { "version": "2.1.7", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.7.tgz", + "integrity": "sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==", "dev": true, "license": "MIT", "dependencies": { @@ -13577,6 +14584,8 @@ }, "node_modules/test-exclude/node_modules/glob/node_modules/minimatch": { "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", "dev": true, "license": "ISC", "dependencies": { @@ -13591,11 +14600,15 @@ }, "node_modules/test-exclude/node_modules/lru-cache": { "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", "dev": true, "license": "ISC" }, "node_modules/test-exclude/node_modules/minimatch": { "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -13610,6 +14623,8 @@ }, "node_modules/test-exclude/node_modules/path-scurry": { "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -13625,9 +14640,21 @@ }, "node_modules/text-table": { "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true, "license": "MIT" }, + "node_modules/tinyexec": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.1.tgz", + "integrity": "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/tinyglobby": { "version": "0.2.17", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", @@ -13678,6 +14705,8 @@ }, "node_modules/tldts": { "version": "6.1.86", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.86.tgz", + "integrity": "sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==", "dev": true, "license": "MIT", "dependencies": { @@ -13689,11 +14718,15 @@ }, "node_modules/tldts-core": { "version": "6.1.86", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.86.tgz", + "integrity": "sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==", "dev": true, "license": "MIT" }, "node_modules/to-regex-range": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "license": "MIT", "dependencies": { @@ -13715,6 +14748,8 @@ }, "node_modules/totalist": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", + "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", "dev": true, "license": "MIT", "engines": { @@ -13723,6 +14758,8 @@ }, "node_modules/tough-cookie": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.1.2.tgz", + "integrity": "sha512-FVDYdxtnj0G6Qm/DhNPSb8Ju59ULcup3tuJxkFb5K8Bv2pUXILbf0xZWU8PX8Ov19OXljbUyveOFwRMwkXzO+A==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -13734,6 +14771,8 @@ }, "node_modules/tr46": { "version": "5.1.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.1.1.tgz", + "integrity": "sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw==", "dev": true, "license": "MIT", "dependencies": { @@ -13743,23 +14782,16 @@ "node": ">=18" } }, - "node_modules/trim-newlines": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/tslib": { "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, "node_modules/type-check": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "license": "MIT", "dependencies": { @@ -13771,6 +14803,8 @@ }, "node_modules/type-detect": { "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true, "license": "MIT", "engines": { @@ -13779,6 +14813,8 @@ }, "node_modules/type-fest": { "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { @@ -13790,6 +14826,8 @@ }, "node_modules/typed-array-buffer": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", "dev": true, "license": "MIT", "dependencies": { @@ -13803,6 +14841,8 @@ }, "node_modules/typed-array-byte-length": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", + "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", "dev": true, "license": "MIT", "dependencies": { @@ -13821,6 +14861,8 @@ }, "node_modules/typed-array-byte-offset": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.5.tgz", + "integrity": "sha512-0FHJvLPqZ7KJzp17O13jfsAjsqazgrxBu2zEK95PmUz8lv2+GjRuxUInCr2Rk9Dms3ihN21zJ929ZO43yJ95QQ==", "dev": true, "license": "MIT", "dependencies": { @@ -13840,6 +14882,8 @@ }, "node_modules/typed-array-length": { "version": "1.0.8", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.8.tgz", + "integrity": "sha512-phPGCwqr2+Qo0fwniCE8e4pKnGu/yFb5nD5Y8bf0EEeiI5GklnACYA9GFy/DrAeRrKHXvHn+1SUsOWgJp6RO+g==", "dev": true, "license": "MIT", "dependencies": { @@ -13859,6 +14903,8 @@ }, "node_modules/ua-parser-js": { "version": "1.0.41", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.41.tgz", + "integrity": "sha512-LbBDqdIC5s8iROCUjMbW1f5dJQTEFB1+KO9ogbvlb3nm9n4YHa5p4KTvFPWvh2Hs8gZMBuiB1/8+pdfe/tDPug==", "funding": [ { "type": "opencollective", @@ -13882,45 +14928,16 @@ } }, "node_modules/uc.micro": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", - "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", - "dev": true, - "license": "MIT" - }, - "node_modules/uglify-es": { - "version": "3.3.10", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "commander": "~2.14.1", - "source-map": "~0.6.1" - }, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/uglify-es/node_modules/commander": { - "version": "2.14.1", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-3.0.0.tgz", + "integrity": "sha512-U3PppEkleoTnIfi8BozMx3yju3qc/L6SwqWo2Sw+54PX+PX0q9I+r1Um5HCmqD7n9VDX5/v3vQH/AjA6deDdtw==", "dev": true, "license": "MIT" }, - "node_modules/uglify-js": { - "version": "3.19.3", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/unbox-primitive": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", + "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", "dev": true, "license": "MIT", "dependencies": { @@ -13937,7 +14954,9 @@ } }, "node_modules/undici": { - "version": "7.30.0", + "version": "7.30.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.30.1.tgz", + "integrity": "sha512-03KrMbjIFDWQR5RNPrSw3bd1r12JpyFQl9/yxjUbJtqkjmllqC5lFjZh6ujeuJCKr8EOQvRW872Oy/az+nLYxg==", "dev": true, "license": "MIT", "engines": { @@ -13946,11 +14965,15 @@ }, "node_modules/undici-types": { "version": "8.9.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz", + "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==", "dev": true, "license": "MIT" }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", + "integrity": "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==", "dev": true, "license": "MIT", "engines": { @@ -13959,6 +14982,8 @@ }, "node_modules/unicode-match-property-ecmascript": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", "dev": true, "license": "MIT", "dependencies": { @@ -13971,6 +14996,8 @@ }, "node_modules/unicode-match-property-value-ecmascript": { "version": "2.2.1", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.1.tgz", + "integrity": "sha512-JQ84qTuMg4nVkx8ga4A16a1epI9H6uTXAknqxkGF/aFfRLw1xC/Bp24HNLaZhHSkWd3+84t8iXnp1J0kYcZHhg==", "dev": true, "license": "MIT", "engines": { @@ -13979,12 +15006,27 @@ }, "node_modules/unicode-property-aliases-ecmascript": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.2.0.tgz", + "integrity": "sha512-hpbDzxUY9BFwX+UeBnxv3Sh1q7HFxj48DTmXchNgRa46lO8uj3/1iEn3MiNUYTg1g9ctIqXCCERn8gYZhHC5lQ==", "dev": true, "license": "MIT", "engines": { "node": ">=4" } }, + "node_modules/unicorn-magic": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.4.1.tgz", + "integrity": "sha512-lzlXPoVB0Uy/FvTaUgX39RbixYiSKoc3JSoSf01+0c2B6FR3qdYIPN7Qjo/AV7n6sqLCk0509cT3LRj1oSZ1+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -13997,6 +15039,8 @@ }, "node_modules/unrs-resolver": { "version": "1.12.2", + "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.12.2.tgz", + "integrity": "sha512-dmlRxBJJayXjqTwC+JtF1HhJmgf3ftQ3YejFcZrf4+KKtJv0qDsK1pjqaaVjG7wJ5NJ6UVP1OqRMQ71Z4C3rxQ==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -14032,7 +15076,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.3.3", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.4.tgz", + "integrity": "sha512-t8wonIOdQyOjtPd2VktlBu6QjTVTks6v8bSi7kd0r2Vll8TK1JYDZtRRdbmCHOAMphkZgrzK+L+vXK4pyZ8t4A==", "dev": true, "funding": [ { @@ -14060,62 +15106,16 @@ "browserslist": ">= 4.21.0" } }, - "node_modules/upper-case": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, "node_modules/uri-js": { "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } }, - "node_modules/url-loader": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "loader-utils": "^2.0.0", - "mime-types": "^2.1.27", - "schema-utils": "^3.0.0" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "file-loader": "*", - "webpack": "^4.0.0 || ^5.0.0" - }, - "peerDependenciesMeta": { - "file-loader": { - "optional": true - } - } - }, - "node_modules/url-loader/node_modules/schema-utils": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/urlpattern-polyfill": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.1.0.tgz", @@ -14125,11 +15125,15 @@ }, "node_modules/util-deprecate": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true, "license": "MIT" }, "node_modules/v8-to-istanbul": { "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", "dev": true, "license": "ISC", "dependencies": { @@ -14141,17 +15145,10 @@ "node": ">=10.12.0" } }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, "node_modules/w3c-xmlserializer": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", + "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", "dev": true, "license": "MIT", "dependencies": { @@ -14162,7 +15159,9 @@ } }, "node_modules/watchpack": { - "version": "2.5.2", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.6.1.tgz", + "integrity": "sha512-8mk/LnXpQAiM2xKZhTkxikwly5GhL2Z+DWiLTkMa/E1Nfv9zURhHgiFyWvM4BWqW+LjIgL2AIS7JntEUx6v3vQ==", "dev": true, "license": "MIT", "dependencies": { @@ -14174,6 +15173,8 @@ }, "node_modules/webidl-conversions": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -14181,7 +15182,9 @@ } }, "node_modules/webpack": { - "version": "5.111.1", + "version": "5.112.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.112.0.tgz", + "integrity": "sha512-NIBpsRuCll036haDDt/CfcTDfsWNR9Z782nMRMI9D377BsGcYzZDTNU5TyzhCJzPIcihAxMBaMAhq2WSaDrH8Q==", "dev": true, "license": "MIT", "dependencies": { @@ -14192,16 +15195,16 @@ "@webassemblyjs/wasm-parser": "^1.14.1", "browserslist": "^4.28.1", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.25.0", + "enhanced-resolve": "^5.26.0", "es-module-lexer": "^2.1.0", "events": "^3.2.0", "graceful-fs": "^4.2.11", "mime-db": "^1.54.0", - "minimizer-webpack-plugin": "^5.7.0", + "minimizer-webpack-plugin": "^5.13.0", "schema-utils": "^4.5.0", "tapable": "^2.3.0", - "watchpack": "^2.5.2", - "webpack-sources": "^3.5.1" + "watchpack": "^2.6.1", + "webpack-sources": "^3.6.0" }, "bin": { "webpack": "bin/webpack.js" @@ -14220,192 +15223,90 @@ } }, "node_modules/webpack-bundle-analyzer": { - "version": "4.10.2", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-5.4.0.tgz", + "integrity": "sha512-6OjsEFQIwcRT1nId/O7OyHjDvrE0JSFAef/XCwGarrf9MF5/CaD0lhDvoySbus57dYEdJ3vrRVj5F3i30c4ozw==", "dev": true, "license": "MIT", "dependencies": { - "@discoveryjs/json-ext": "0.5.7", + "@discoveryjs/json-ext": "^0.6.3", "acorn": "^8.0.4", "acorn-walk": "^8.0.0", - "commander": "^7.2.0", - "debounce": "^1.2.1", - "escape-string-regexp": "^4.0.0", - "gzip-size": "^6.0.0", - "html-escaper": "^2.0.2", + "commander": "^14.0.2", + "escape-string-regexp": "^5.0.0", + "html-escaper": "^3.0.3", "opener": "^1.5.2", "picocolors": "^1.0.0", - "sirv": "^2.0.3", - "ws": "^7.3.1" + "sirv": "^3.0.2", + "ws": "^8.19.0" }, "bin": { "webpack-bundle-analyzer": "lib/bin/analyzer.js" }, "engines": { - "node": ">= 10.13.0" + "node": ">= 20.9.0" } }, "node_modules/webpack-bundle-analyzer/node_modules/commander": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/ws": { - "version": "7.5.13", + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.3.tgz", + "integrity": "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==", "dev": true, "license": "MIT", "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } + "node": ">=20" } }, - "node_modules/webpack-cli": { - "version": "4.10.0", + "node_modules/webpack-bundle-analyzer/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", "dev": true, "license": "MIT", - "dependencies": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^1.2.0", - "@webpack-cli/info": "^1.5.0", - "@webpack-cli/serve": "^1.7.0", - "colorette": "^2.0.14", - "commander": "^7.0.0", - "cross-spawn": "^7.0.3", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^2.2.0", - "rechoir": "^0.7.0", - "webpack-merge": "^5.7.3" - }, - "bin": { - "webpack-cli": "bin/cli.js" - }, "engines": { - "node": ">=10.13.0" + "node": ">=12" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "4.x.x || 5.x.x" - }, - "peerDependenciesMeta": { - "@webpack-cli/generators": { - "optional": true - }, - "@webpack-cli/migrate": { - "optional": true - }, - "webpack-bundle-analyzer": { - "optional": true - }, - "webpack-dev-server": { - "optional": true - } + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/webpack-cli/node_modules/commander": { - "version": "7.2.0", + "node_modules/webpack-bundle-analyzer/node_modules/html-escaper": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-3.0.3.tgz", + "integrity": "sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==", "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10" - } + "license": "MIT" }, "node_modules/webpack-merge": { - "version": "5.10.0", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-6.0.1.tgz", + "integrity": "sha512-hXXvrjtx2PLYx4qruKl+kyRSLc52V+cCvMxRjmKwoA+CBbbF5GfIBtR6kCvl0fYGqTUPKB+1ktVmTHqMOzgCBg==", "dev": true, "license": "MIT", "dependencies": { "clone-deep": "^4.0.1", "flat": "^5.0.2", - "wildcard": "^2.0.0" + "wildcard": "^2.0.1" }, "engines": { - "node": ">=10.0.0" + "node": ">=18.0.0" } }, "node_modules/webpack-sources": { "version": "3.6.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.6.0.tgz", + "integrity": "sha512-EIMmPVvNI0CYXyRPp34F2Qk7W37/BZVZIofS6LAUnrNjCVahS+hO4mxwFJDjQjODTGZDtVzLYoN2+1dYkhk9qA==", "dev": true, "license": "MIT", "engines": { "node": ">=10.13.0" } }, - "node_modules/webpack/node_modules/ajv": { - "version": "8.20.0", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/webpack/node_modules/ajv-keywords": { - "version": "5.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, - "node_modules/webpack/node_modules/json-schema-traverse": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/webpack/node_modules/mime-db": { - "version": "1.54.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/webpack/node_modules/schema-utils": { - "version": "4.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.15", - "ajv": "^8.20.0", - "ajv-formats": "^3.0.1", - "ajv-keywords": "^5.1.0" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/whatwg-encoding": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "deprecated": "Use @exodus/bytes instead for a more spec-conformant and faster implementation", "dev": true, "license": "MIT", "dependencies": { @@ -14417,6 +15318,8 @@ }, "node_modules/whatwg-mimetype": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", "dev": true, "license": "MIT", "engines": { @@ -14425,6 +15328,8 @@ }, "node_modules/whatwg-url": { "version": "14.2.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.2.0.tgz", + "integrity": "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==", "dev": true, "license": "MIT", "dependencies": { @@ -14437,6 +15342,8 @@ }, "node_modules/which": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "license": "ISC", "dependencies": { @@ -14451,6 +15358,8 @@ }, "node_modules/which-boxed-primitive": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", + "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", "dev": true, "license": "MIT", "dependencies": { @@ -14469,6 +15378,8 @@ }, "node_modules/which-builtin-type": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", + "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", "dev": true, "license": "MIT", "dependencies": { @@ -14495,6 +15406,8 @@ }, "node_modules/which-collection": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", "dev": true, "license": "MIT", "dependencies": { @@ -14510,13 +15423,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/which-module": { - "version": "2.0.1", - "dev": true, - "license": "ISC" - }, "node_modules/which-typed-array": { "version": "1.1.24", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.24.tgz", + "integrity": "sha512-wk4Mf4pR5mRP7eYuuTBCIQ9d0ud2Fv2jRLQpfgnRjbOxAFHmjKFValgTpitVKzJJS8ajnYQV2Du1SZ8j6b/EUQ==", "dev": true, "license": "MIT", "dependencies": { @@ -14537,119 +15447,69 @@ }, "node_modules/wildcard": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", + "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", "dev": true, "license": "MIT" }, - "node_modules/word-wrap": { - "version": "1.2.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrap-ansi": { - "version": "8.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "license": "MIT", "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.4.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.3", - "dev": true, - "license": "MIT", "engines": { - "node": ">=12" + "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.2.0", + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "license": "MIT", "dependencies": { - "ansi-regex": "^6.2.2" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=12" + "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/wrappy": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true, "license": "ISC" }, "node_modules/write-file-atomic": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", + "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", "dev": true, "license": "ISC", "dependencies": { @@ -14662,6 +15522,8 @@ }, "node_modules/write-file-atomic/node_modules/signal-exit": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, "license": "ISC", "engines": { @@ -14673,6 +15535,8 @@ }, "node_modules/ws": { "version": "8.22.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.22.0.tgz", + "integrity": "sha512-Ydggc987+RO0AnWtZ/7Wq9FtNvcrL1b/RO0ud9mWjUPgDrsAAwQSF51sm2hm1XofbU/4jkpGEsLFsZZxU+1DOg==", "dev": true, "license": "MIT", "engines": { @@ -14693,6 +15557,8 @@ }, "node_modules/xml-name-validator": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", "dev": true, "license": "Apache-2.0", "engines": { @@ -14701,166 +15567,200 @@ }, "node_modules/xmlchars": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true, "license": "MIT" }, "node_modules/y18n": { - "version": "4.0.3", + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, - "license": "ISC" + "license": "ISC", + "engines": { + "node": ">=10" + } }, "node_modules/yallist": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true, "license": "ISC" }, "node_modules/yaml": { - "version": "2.3.1", + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.1.tgz", + "integrity": "sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==", "dev": true, "license": "ISC", + "optional": true, + "bin": { + "yaml": "bin.mjs" + }, "engines": { - "node": ">= 14" + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" } }, "node_modules/yargs": { - "version": "15.4.1", + "version": "17.7.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.3.tgz", + "integrity": "sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==", "dev": true, "license": "MIT", "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" }, "engines": { - "node": ">=8" + "node": ">=12" } }, "node_modules/yargs-parser": { - "version": "20.2.9", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, "license": "ISC", "engines": { - "node": ">=10" - } - }, - "node_modules/yargs/node_modules/decamelize": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" + "node": ">=12" } }, - "node_modules/yargs/node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/yargs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/string-width": { - "version": "4.2.3", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "node": ">=10" }, - "engines": { - "node": ">=8" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/yargs/node_modules/yargs-parser": { - "version": "18.1.3", + "node_modules/zod": { + "version": "4.6.7", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.7.tgz", + "integrity": "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==", "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "engines": { - "node": ">=6" + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" } }, - "node_modules/yocto-queue": { - "version": "0.1.0", + "node_modules/zod-validation-error": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-4.0.2.tgz", + "integrity": "sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=10" + "node": ">=18.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "zod": "^3.25.0 || ^4.0.0" } }, "packages/babel-plugin-react-native-web": { "version": "0.21.4", "license": "MIT", "devDependencies": { - "babel-plugin-tester": "^10.1.0" + "babel-plugin-tester": "^12.0.0" } }, "packages/benchmarks": { "version": "0.0.0", "dependencies": { - "classnames": "^2.3.1", - "d3-scale-chromatic": "^3.0.0", - "prop-types": "^15.6.0", + "classnames": "^2.5.1", + "d3-scale-chromatic": "^3.1.0", "react": "^19.0.0", "react-dom": "^19.0.0", - "react-native-web": "0.21.3" + "react-native-web": "0.21.4" }, "devDependencies": { - "babel-loader": "^8.2.5", - "babel-plugin-react-native-web": "0.21.3", - "css-loader": "^6.7.1", - "style-loader": "^3.3.1", - "url-loader": "^4.1.1", - "webpack": "^5.94.0", - "webpack-bundle-analyzer": "^4.5.0", - "webpack-cli": "^4.10.0" + "babel-loader": "^10.1.1", + "css-loader": "^7.1.5", + "del-cli": "^8.0.1", + "style-loader": "^4.0.0", + "webpack": "^5.111.1", + "webpack-bundle-analyzer": "^5.4.0", + "webpack-cli": "^7.2.3" } }, - "packages/benchmarks/node_modules/babel-plugin-react-native-web": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/babel-plugin-react-native-web/-/babel-plugin-react-native-web-0.21.3.tgz", - "integrity": "sha512-e4fG8NbyRvk5GwU/7G2U9WxzPYtpC4IQN28AyRDzKE0kvywgohq8vT2x0/xBfg8a0RfSkXLlHAtUAGlSy3VhAw==", + "packages/benchmarks/node_modules/@discoveryjs/json-ext": { + "version": "1.1.0", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=14.17.0" + } }, - "packages/benchmarks/node_modules/react-native-web": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/react-native-web/-/react-native-web-0.21.3.tgz", - "integrity": "sha512-ozvZM0z8UWfduoKnYx03KUccM2LdHNaW8nNJu4Md0glyqWL+Ysa6dRZzMOO6Yp/hhTYT9yluwjknpd9l04uvDw==", + "packages/benchmarks/node_modules/commander": { + "version": "14.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + } + }, + "packages/benchmarks/node_modules/webpack-cli": { + "version": "7.2.3", + "dev": true, "license": "MIT", "dependencies": { - "@babel/runtime": "^7.18.6", - "@react-native/normalize-colors": "^0.74.1", - "fbjs": "^3.0.4", - "inline-style-prefixer": "^7.0.1", - "memoize-one": "^6.0.0", - "nullthrows": "^1.1.1", - "postcss-value-parser": "^4.2.0", - "styleq": "^0.1.3" + "@discoveryjs/json-ext": "^1.1.0", + "commander": "^14.0.3", + "cross-spawn": "^7.0.6", + "envinfo": "^7.21.0", + "import-local": "^3.2.0", + "interpret": "^3.1.1", + "rechoir": "^0.8.0", + "webpack-merge": "^6.0.1" + }, + "bin": { + "webpack-cli": "bin/cli.js" + }, + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" }, "peerDependencies": { - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" + "js-yaml": "^4.0.0 || ^5.0.0", + "json5": "^2.2.3", + "toml": "^3.0.0 || ^4.0.0 || ^5.0.0", + "webpack": "^5.101.0", + "webpack-bundle-analyzer": "^4.0.0 || ^5.0.0", + "webpack-dev-server": "^5.0.0 || ^6.0.0" + }, + "peerDependenciesMeta": { + "js-yaml": { + "optional": true + }, + "json5": { + "optional": true + }, + "toml": { + "optional": true + }, + "webpack-bundle-analyzer": { + "optional": true + }, + "webpack-dev-server": { + "optional": true + } } }, "packages/dom-event-testing-library": { @@ -14871,18 +15771,33 @@ "version": "0.21.4", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.18.6", - "@react-native/normalize-colors": "^0.74.1", - "fbjs": "^3.0.4", - "inline-style-prefixer": "^7.0.1", + "@react-native/normalize-colors": "^0.88.0", + "fbjs": "^3.0.5", "memoize-one": "^6.0.0", "nullthrows": "^1.1.1", "postcss-value-parser": "^4.2.0", "styleq": "^0.1.3" }, + "devDependencies": { + "del-cli": "^8.0.1" + }, "peerDependencies": { - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" + "@types/react": "^19.0.0", + "@types/react-dom": "^19.0.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "react-native": "*" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + }, + "react-native": { + "optional": true + } } }, "packages/react-native-web-docs": { @@ -14893,117 +15808,26 @@ "@11ty/eleventy-plugin-syntaxhighlight": "^5.0.2", "csso": "^5.0.5", "eleventy-plugin-svg-contents": "^0.7.0", - "eleventy-plugin-toc": "^1.1.5", - "html-minifier": "^4.0.0", + "html-minifier-terser": "^7.2.0", "markdown-it": "^15.0.2", "markdown-it-anchor": "^10.0.0", "markdown-it-attrs": "^5.0.1", "markdown-it-container": "^4.0.0", "markdown-it-emoji": "^3.1.0", "markdown-it-footnote": "^4.0.0", - "markdown-it-for-inline": "^2.0.1", "markdown-it-task-lists": "^2.1.1", - "uglify-es": "^3.3.9" - } - }, - "packages/react-native-web-docs/node_modules/argparse": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-3.0.2.tgz", - "integrity": "sha512-mFdDM6WqWKraGLsVb+C9CahPnzTXOefAOLq3jYcca2YZ8bEWpr++Tzj+zSaKW9+X9L5uSxcm1AZ3Y6aZJ09OhQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/puzrin" - }, - { - "type": "github", - "url": "https://github.com/sponsors/nodeca" - } - ], - "license": "PSF-2.0" - }, - "packages/react-native-web-docs/node_modules/entities": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-8.1.0.tgz", - "integrity": "sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=20.19.0" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "packages/react-native-web-docs/node_modules/linkify-it": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-6.1.0.tgz", - "integrity": "sha512-wJ/TwpSDTLepCrQoYWYIExIKg5Zchex2Nn5yk2mFnB+6PtdkHtyLx742md9csRjjOnGkKIS/RrbY7l8D6gT9Vw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/puzrin" - }, - { - "type": "github", - "url": "https://github.com/sponsors/markdown-it" - } - ], - "license": "MIT", - "dependencies": { - "uc.micro": "^3.0.0" - } - }, - "packages/react-native-web-docs/node_modules/markdown-it": { - "version": "15.0.2", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-15.0.2.tgz", - "integrity": "sha512-q4IGxMv56jCqT4OCRCADBoDP3LO4MhmTXjFbphHPXs4g3j9Xg5RDnxqN8IF/3vIWEU+VCnUq+7JUg/cfy2E6Qw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/puzrin" - }, - { - "type": "github", - "url": "https://github.com/sponsors/markdown-it" - } - ], - "license": "MIT", - "dependencies": { - "argparse": "^3.0.0", - "entities": "^8.0.0", - "linkify-it": "^6.0.0", - "mdurl": "^2.1.0", - "punycode.js": "^2.3.1", - "uc.micro": "^3.0.0" - }, - "bin": { - "markdown-it": "bin/markdown-it.mjs" + "terser": "^5.51.2" } }, - "packages/react-native-web-docs/node_modules/uc.micro": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-3.0.0.tgz", - "integrity": "sha512-U3PppEkleoTnIfi8BozMx3yju3qc/L6SwqWo2Sw+54PX+PX0q9I+r1Um5HCmqD7n9VDX5/v3vQH/AjA6deDdtw==", - "dev": true, - "license": "MIT" - }, "packages/react-native-web-examples": { "version": "0.21.4", "license": "MIT", "dependencies": { "babel-plugin-react-native-web": "0.21.4", - "next": "^16.4.0", + "next": "^16.4.1", "react": "^19.0.0", "react-dom": "^19.0.0", "react-native-web": "0.21.4" - }, - "devDependencies": { - "@babel/core": "^7.18.6", - "@babel/preset-flow": "^7.18.6" } } } diff --git a/package.json b/package.json index d11e78ed48..aeea421286 100644 --- a/package.json +++ b/package.json @@ -1,86 +1,92 @@ { "private": true, "version": "0.0.0", + "type": "module", "name": "react-ui-monorepo", "scripts": { "clean": "del-cli ./packages/*/dist", "build": "npm run clean && npm run build --workspaces --if-present", "compile": "npm run build", "dev": "npm run dev --workspaces --if-present", - "flow": "flow --flowconfig-name ./configs/.flowconfig", + "flow": "flow", "format": "prettier --check --ignore-unknown .", "format:fix": "prettier --write --ignore-unknown .", - "lint": "eslint configs packages scripts --config ./configs/.eslintrc", + "lint": "eslint .", "lint:fix": "npm run lint -- --fix", + "module-map": "node ./scripts/createModuleMap.js --write", "prerelease": "npm run test && npm run build", - "release": "node ./scripts/releaseReactNativeWebPackages.js", + "release": "node ./scripts/releasePackages.js", "release:benchmarks": "git checkout gh-pages && rm -rf ./docs/benchmarks && mv packages/benchmarks/dist ./docs/benchmarks && git add -A && git commit -m \"Deploy benchmarks\" && git push origin gh-pages && git checkout -", "release:react-native-web-docs": "git checkout gh-pages && rm -rf ./docs && mv packages/react-native-web-docs/dist ./docs && git add ./docs && git commit -m \"Deploy documentation\" && git push origin gh-pages && git checkout -", "postrelease": "npm run release:react-native-web-docs && npm run release:benchmarks", - "prepare": "husky install configs/husky", - "test": "npm run flow && npm run format && npm run lint && npm run unit --runInBand", - "unit": "npm-run-all \"unit:* {@}\" --", - "unit:dom": "jest --config ./configs/jest.config.js", - "unit:node": "jest --config ./configs/jest.config.node.js" + "prepare": "husky", + "test": "npm run flow && npm run format && npm run lint && npm run unit -- --runInBand", + "unit": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --disable-warning=ExperimentalWarning\" jest", + "unit:dom": "npm run unit -- --selectProjects dom", + "unit:node": "npm run unit -- --selectProjects node" + }, + "allowScripts": { + "@parcel/watcher": false, + "core-js": false, + "fsevents": false, + "unrs-resolver@1.12.2": true }, "devDependencies": { - "@babel/cli": "^7.18.6", - "@babel/core": "^7.18.6", - "@babel/eslint-parser": "^7.18.2", - "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", - "@babel/plugin-proposal-object-rest-spread": "^7.18.6", - "@babel/plugin-transform-runtime": "^7.18.6", - "@babel/preset-env": "^7.18.6", - "@babel/preset-flow": "^7.18.6", - "@babel/preset-react": "^7.18.6", - "@testing-library/react": "^16.3.0", - "babel-eslint": "^10.1.0", + "@babel/cli": "^7.29.7", + "@babel/core": "^7.29.7", + "@babel/plugin-transform-flow-strip-types": "^7.29.7", + "@babel/preset-env": "^7.29.7", + "@babel/preset-react": "^7.29.7", + "@testing-library/react": "^16.3.3", "babel-jest": "^30.5.2", - "babel-plugin-add-module-exports": "^1.0.4", - "babel-plugin-transform-react-remove-prop-types": "^0.4.24", - "caniuse-api": "^3.0.0", - "cross-env": "^7.0.3", - "del-cli": "^4.0.1", - "eslint": "^8.19.0", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-flowtype": "^8.0.3", - "eslint-plugin-promise": "^6.0.0", - "eslint-plugin-react": "^7.30.1", - "eslint-plugin-react-hooks": "^4.6.0", - "flow-bin": "0.148.0", - "gen-flow-files": "^0.4.11", - "glob": "^8.0.3", - "husky": "^8.0.0", + "babel-plugin-fully-specified": "^1.3.1", + "babel-plugin-syntax-hermes-parser": "0.37.0", + "cross-env": "^10.1.0", + "del-cli": "^8.0.1", + "eslint": "^8.57.1", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-react": "^7.37.5", + "eslint-plugin-react-hooks": "^7.1.1", + "flow-bin": "0.336.0", + "hermes-eslint": "0.37.0", + "husky": "^9.1.7", "jest": "^30.5.2", "jest-environment-jsdom": "^30.5.2", - "lint-staged": "^13.0.3", - "minimist": "^1.2.6", - "npm-run-all": "^4.1.3", - "prettier": "^2.7.1" + "lint-staged": "^17.6.0", + "prettier": "^3.9.10", + "prettier-plugin-hermes-parser": "0.37.0" }, "workspaces": [ "packages/react-native-web", "packages/*" ], - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, "lint-staged": { - "packages/react-native-web/src/index.js": [ - "node ./scripts/createBabelReactNativeWebModuleMap.js", - "prettier --write ./packages/babel-plugin-react-native-web/src/moduleMap.js" + "packages/react-native-web/src/{index.js,exports/*/index.js}": [ + "node ./scripts/createModuleMap.js" ], "**/*.js": [ - "npm run format:fix", - "npm run lint:fix" + "prettier --write --ignore-unknown --no-error-on-unmatched-pattern", + "eslint --fix --no-error-on-unmatched-pattern" ] }, "prettier": { "singleQuote": true, - "trailingComma": "none" + "trailingComma": "none", + "plugins": [ + "prettier-plugin-hermes-parser" + ], + "overrides": [ + { + "files": [ + "*.js", + "*.jsx", + "*.flow" + ], + "options": { + "parser": "hermes" + } + } + ] }, "author": "Nicolas Gallagher", "license": "MIT" diff --git a/packages/babel-plugin-react-native-web/README.md b/packages/babel-plugin-react-native-web/README.md index 191d57dbfa..3f8e554ca6 100644 --- a/packages/babel-plugin-react-native-web/README.md +++ b/packages/babel-plugin-react-native-web/README.md @@ -2,8 +2,7 @@ [![npm version][package-badge]][package-url] [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://reactjs.org/docs/how-to-contribute.html#your-first-pull-request) -A Babel plugin that will alias `react-native` to `react-native-web` and exclude -any modules not required by your app (keeping bundle size down). +A Babel plugin that will alias `react-native` to `react-native-web` and exclude any modules not required by your app (keeping bundle size down). ## Installation @@ -15,25 +14,15 @@ npm install --save-dev babel-plugin-react-native-web **.babelrc** -``` +```json { - "plugins": [ - ["react-native-web", { commonjs: true }] - ] + "plugins": ["react-native-web"] } ``` -You should configure the plugin to match the module format used by your -bundler. Most modern bundlers will use a package's ES modules by default (i.e., -if `package.json` has a `module` field). But if you need the plugin to rewrite -import paths to point to CommonJS modules, you must set the `commonjs` option -to `true`. - ## Example -NOTE: `react-native-web` internal paths are _not stable_ and you must not rely -on them. Always use the Babel plugin to optimize your build. What follows is an -example of the rewrite performed by the plugin. +NOTE: `react-native-web` internal paths are _not stable_ and you must not rely on them. Always use the Babel plugin to optimize your build. What follows is an example of the rewrite performed by the plugin. **Before** @@ -44,8 +33,8 @@ import { StyleSheet, View } from 'react-native'; **After** ```js -import StyleSheet from 'react-native-web/dist/exports/StyleSheet'; -import View from 'react-native-web/dist/exports/View'; +import StyleSheet from 'react-native-web/dist/exports/StyleSheet/index.js'; +import View from 'react-native-web/dist/exports/View/index.js'; ``` [package-badge]: https://img.shields.io/npm/v/babel-plugin-react-native-web.svg?style=flat diff --git a/packages/babel-plugin-react-native-web/index.js b/packages/babel-plugin-react-native-web/index.js deleted file mode 100644 index 3fc779821a..0000000000 --- a/packages/babel-plugin-react-native-web/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./src'); diff --git a/packages/babel-plugin-react-native-web/package.json b/packages/babel-plugin-react-native-web/package.json index fbc92488fa..ce28ee3ee5 100644 --- a/packages/babel-plugin-react-native-web/package.json +++ b/packages/babel-plugin-react-native-web/package.json @@ -5,9 +5,13 @@ "name": "babel-plugin-react-native-web", "version": "0.21.4", "description": "Babel plugin for React Native for Web", - "main": "index.js", + "main": "src/index.js", + "files": [ + "src", + "!**/__tests__" + ], "devDependencies": { - "babel-plugin-tester": "^10.1.0" + "babel-plugin-tester": "^12.0.0" }, "author": "Nicolas Gallagher", "license": "MIT", diff --git a/packages/babel-plugin-react-native-web/src/__tests__/__snapshots__/index-test.js.snap b/packages/babel-plugin-react-native-web/src/__tests__/__snapshots__/index-test.js.snap index deca43cf80..6396b20c0d 100644 --- a/packages/babel-plugin-react-native-web/src/__tests__/__snapshots__/index-test.js.snap +++ b/packages/babel-plugin-react-native-web/src/__tests__/__snapshots__/index-test.js.snap @@ -1,36 +1,6 @@ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing -exports[`Rewrite react-native to react-native-web export from "react-native": export from "react-native" 1`] = ` - -export { View } from 'react-native'; -export { StyleSheet, Text, unstable_createElement } from 'react-native'; - - ↓ ↓ ↓ ↓ ↓ ↓ - -export { default as View } from 'react-native-web/dist/exports/View'; -export { default as StyleSheet } from 'react-native-web/dist/exports/StyleSheet'; -export { default as Text } from 'react-native-web/dist/exports/Text'; -export { default as unstable_createElement } from 'react-native-web/dist/exports/createElement'; - - -`; - -exports[`Rewrite react-native to react-native-web export from "react-native-web": export from "react-native-web" 1`] = ` - -export { View } from 'react-native-web'; -export { StyleSheet, Text, unstable_createElement } from 'react-native-web'; - - ↓ ↓ ↓ ↓ ↓ ↓ - -export { default as View } from 'react-native-web/dist/exports/View'; -export { default as StyleSheet } from 'react-native-web/dist/exports/StyleSheet'; -export { default as Text } from 'react-native-web/dist/exports/Text'; -export { default as unstable_createElement } from 'react-native-web/dist/exports/createElement'; - - -`; - -exports[`Rewrite react-native to react-native-web import from "react-native": import from "react-native" 1`] = ` +exports[`Rewrite react-native to react-native-web 1. import from "react-native": 1. import from "react-native" 1`] = ` import ReactNative from 'react-native'; import { View } from 'react-native'; @@ -40,69 +10,61 @@ import * as ReactNativeModules from 'react-native'; ↓ ↓ ↓ ↓ ↓ ↓ -import ReactNative from 'react-native-web/dist/index'; -import View from 'react-native-web/dist/exports/View'; -import { Invalid } from 'react-native-web/dist/index'; -import MyView from 'react-native-web/dist/exports/View'; -import useLocaleContext from 'react-native-web/dist/exports/useLocaleContext'; -import * as ReactNativeModules from 'react-native-web/dist/index'; - +import ReactNative from 'react-native-web/dist/index.js'; +import View from 'react-native-web/dist/exports/View/index.js'; +import { Invalid } from 'react-native-web/dist/index.js'; +import MyView from 'react-native-web/dist/exports/View/index.js'; +import useLocaleContext from 'react-native-web/dist/exports/useLocaleContext/index.js'; +import * as ReactNativeModules from 'react-native-web/dist/index.js'; `; -exports[`Rewrite react-native to react-native-web import from "react-native": import from "react-native" 2`] = ` +exports[`Rewrite react-native to react-native-web 2. import from "react-native-web": 2. import from "react-native-web" 1`] = ` -import ReactNative from 'react-native'; -import { View } from 'react-native'; -import { Invalid, View as MyView } from 'react-native'; -import * as ReactNativeModules from 'react-native'; +import { unstable_createElement } from 'react-native-web'; +import { StyleSheet, View, Pressable, processColor } from 'react-native-web'; +import * as ReactNativeModules from 'react-native-web'; ↓ ↓ ↓ ↓ ↓ ↓ -import ReactNative from 'react-native-web/dist/cjs/index'; -import View from 'react-native-web/dist/cjs/exports/View'; -import { Invalid } from 'react-native-web/dist/cjs/index'; -import MyView from 'react-native-web/dist/cjs/exports/View'; -import * as ReactNativeModules from 'react-native-web/dist/cjs/index'; - +import unstable_createElement from 'react-native-web/dist/exports/createElement/index.js'; +import StyleSheet from 'react-native-web/dist/exports/StyleSheet/index.js'; +import View from 'react-native-web/dist/exports/View/index.js'; +import Pressable from 'react-native-web/dist/exports/Pressable/index.js'; +import processColor from 'react-native-web/dist/exports/processColor/index.js'; +import * as ReactNativeModules from 'react-native-web/dist/index.js'; `; -exports[`Rewrite react-native to react-native-web import from "react-native-web": import from "react-native-web" 1`] = ` +exports[`Rewrite react-native to react-native-web 3. export from "react-native": 3. export from "react-native" 1`] = ` -import { unstable_createElement } from 'react-native-web'; -import { StyleSheet, View, Pressable, processColor } from 'react-native-web'; -import * as ReactNativeModules from 'react-native-web'; +export { View } from 'react-native'; +export { StyleSheet, Text, unstable_createElement } from 'react-native'; ↓ ↓ ↓ ↓ ↓ ↓ -import unstable_createElement from 'react-native-web/dist/exports/createElement'; -import StyleSheet from 'react-native-web/dist/exports/StyleSheet'; -import View from 'react-native-web/dist/exports/View'; -import Pressable from 'react-native-web/dist/exports/Pressable'; -import processColor from 'react-native-web/dist/exports/processColor'; -import * as ReactNativeModules from 'react-native-web/dist/index'; - +export { default as View } from 'react-native-web/dist/exports/View/index.js'; +export { default as StyleSheet } from 'react-native-web/dist/exports/StyleSheet/index.js'; +export { default as Text } from 'react-native-web/dist/exports/Text/index.js'; +export { default as unstable_createElement } from 'react-native-web/dist/exports/createElement/index.js'; `; -exports[`Rewrite react-native to react-native-web require "react-native": require "react-native" 1`] = ` +exports[`Rewrite react-native to react-native-web 4. export from "react-native-web": 4. export from "react-native-web" 1`] = ` -const ReactNative = require('react-native'); -const { View } = require('react-native'); -const { StyleSheet, Pressable } = require('react-native'); +export { View } from 'react-native-web'; +export { StyleSheet, Text, unstable_createElement } from 'react-native-web'; ↓ ↓ ↓ ↓ ↓ ↓ -const ReactNative = require('react-native-web/dist/index'); -const View = require('react-native-web/dist/exports/View').default; -const StyleSheet = require('react-native-web/dist/exports/StyleSheet').default; -const Pressable = require('react-native-web/dist/exports/Pressable').default; - +export { default as View } from 'react-native-web/dist/exports/View/index.js'; +export { default as StyleSheet } from 'react-native-web/dist/exports/StyleSheet/index.js'; +export { default as Text } from 'react-native-web/dist/exports/Text/index.js'; +export { default as unstable_createElement } from 'react-native-web/dist/exports/createElement/index.js'; `; -exports[`Rewrite react-native to react-native-web require "react-native": require "react-native" 2`] = ` +exports[`Rewrite react-native to react-native-web 5. require "react-native": 5. require "react-native" 1`] = ` const ReactNative = require('react-native'); const { View } = require('react-native'); @@ -110,17 +72,16 @@ const { StyleSheet, Pressable } = require('react-native'); ↓ ↓ ↓ ↓ ↓ ↓ -const ReactNative = require('react-native-web/dist/cjs/index'); -const View = require('react-native-web/dist/cjs/exports/View').default; +const ReactNative = require('react-native-web/dist/index.js'); +const View = require('react-native-web/dist/exports/View/index.js').default; const StyleSheet = - require('react-native-web/dist/cjs/exports/StyleSheet').default; + require('react-native-web/dist/exports/StyleSheet/index.js').default; const Pressable = - require('react-native-web/dist/cjs/exports/Pressable').default; - + require('react-native-web/dist/exports/Pressable/index.js').default; `; -exports[`Rewrite react-native to react-native-web require "react-native-web": require "react-native-web" 1`] = ` +exports[`Rewrite react-native to react-native-web 6. require "react-native-web": 6. require "react-native-web" 1`] = ` const ReactNative = require('react-native-web'); const { unstable_createElement } = require('react-native-web'); @@ -128,14 +89,15 @@ const { StyleSheet, View, Pressable, processColor } = require('react-native-web' ↓ ↓ ↓ ↓ ↓ ↓ -const ReactNative = require('react-native-web/dist/index'); +const ReactNative = require('react-native-web/dist/index.js'); const unstable_createElement = - require('react-native-web/dist/exports/createElement').default; -const StyleSheet = require('react-native-web/dist/exports/StyleSheet').default; -const View = require('react-native-web/dist/exports/View').default; -const Pressable = require('react-native-web/dist/exports/Pressable').default; + require('react-native-web/dist/exports/createElement/index.js').default; +const StyleSheet = + require('react-native-web/dist/exports/StyleSheet/index.js').default; +const View = require('react-native-web/dist/exports/View/index.js').default; +const Pressable = + require('react-native-web/dist/exports/Pressable/index.js').default; const processColor = - require('react-native-web/dist/exports/processColor').default; - + require('react-native-web/dist/exports/processColor/index.js').default; `; diff --git a/packages/babel-plugin-react-native-web/src/__tests__/index-test.js b/packages/babel-plugin-react-native-web/src/__tests__/index-test.js index 9ef0377913..bbf6958591 100644 --- a/packages/babel-plugin-react-native-web/src/__tests__/index-test.js +++ b/packages/babel-plugin-react-native-web/src/__tests__/index-test.js @@ -1,5 +1,5 @@ const plugin = require('..'); -const pluginTester = require('babel-plugin-tester').default; +const { pluginTester } = require('babel-plugin-tester'); const tests = [ // import react-native @@ -12,15 +12,6 @@ import { useLocaleContext } from 'react-native'; import * as ReactNativeModules from 'react-native';`, snapshot: true }, - { - title: 'import from "react-native"', - code: `import ReactNative from 'react-native'; -import { View } from 'react-native'; -import { Invalid, View as MyView } from 'react-native'; -import * as ReactNativeModules from 'react-native';`, - snapshot: true, - pluginOptions: { commonjs: true } - }, { title: 'import from "react-native-web"', code: `import { unstable_createElement } from 'react-native-web'; @@ -48,14 +39,6 @@ const { View } = require('react-native'); const { StyleSheet, Pressable } = require('react-native');`, snapshot: true }, - { - title: 'require "react-native"', - code: `const ReactNative = require('react-native'); -const { View } = require('react-native'); -const { StyleSheet, Pressable } = require('react-native');`, - snapshot: true, - pluginOptions: { commonjs: true } - }, { title: 'require "react-native-web"', code: `const ReactNative = require('react-native-web'); diff --git a/packages/babel-plugin-react-native-web/src/index.js b/packages/babel-plugin-react-native-web/src/index.js index 17230a85ab..f028aa15ce 100644 --- a/packages/babel-plugin-react-native-web/src/index.js +++ b/packages/babel-plugin-react-native-web/src/index.js @@ -1,15 +1,12 @@ const moduleMap = require('./moduleMap'); -const isCommonJS = (opts) => opts.commonjs === true; - -const getDistLocation = (importName, opts) => { - const format = isCommonJS(opts) ? 'cjs/' : ''; +const getDistLocation = (importName) => { const internalName = importName === 'unstable_createElement' ? 'createElement' : importName; if (internalName === 'index') { - return `react-native-web/dist/${format}index`; + return 'react-native-web/dist/index.js'; } else if (internalName && moduleMap[internalName]) { - return `react-native-web/dist/${format}exports/${internalName}`; + return `react-native-web/dist/exports/${internalName}/index.js`; } }; @@ -39,14 +36,14 @@ module.exports = function ({ types: t }) { return { name: 'Rewrite react-native to react-native-web', visitor: { - ImportDeclaration(path, state) { + ImportDeclaration(path) { const { specifiers } = path.node; if (isReactNativeModule(path.node)) { const imports = specifiers .map((specifier) => { if (t.isImportSpecifier(specifier)) { const importName = specifier.imported.name; - const distLocation = getDistLocation(importName, state.opts); + const distLocation = getDistLocation(importName); if (distLocation) { return t.importDeclaration( @@ -61,7 +58,7 @@ module.exports = function ({ types: t }) { } return t.importDeclaration( [specifier], - t.stringLiteral(getDistLocation('index', state.opts)) + t.stringLiteral(getDistLocation('index')) ); }) .filter(Boolean); @@ -69,7 +66,7 @@ module.exports = function ({ types: t }) { path.replaceWithMultiple(imports); } }, - ExportNamedDeclaration(path, state) { + ExportNamedDeclaration(path) { const { specifiers } = path.node; if (isReactNativeModule(path.node)) { const exports = specifiers @@ -77,7 +74,7 @@ module.exports = function ({ types: t }) { if (t.isExportSpecifier(specifier)) { const exportName = specifier.exported.name; const localName = specifier.local.name; - const distLocation = getDistLocation(localName, state.opts); + const distLocation = getDistLocation(localName); if (distLocation) { return t.exportNamedDeclaration( @@ -95,7 +92,7 @@ module.exports = function ({ types: t }) { return t.exportNamedDeclaration( null, [specifier], - t.stringLiteral(getDistLocation('index', state.opts)) + t.stringLiteral(getDistLocation('index')) ); }) .filter(Boolean); @@ -103,16 +100,13 @@ module.exports = function ({ types: t }) { path.replaceWithMultiple(exports); } }, - VariableDeclaration(path, state) { + VariableDeclaration(path) { if (isReactNativeRequire(t, path.node)) { const { id } = path.node.declarations[0]; if (t.isObjectPattern(id)) { const imports = id.properties .map((identifier) => { - const distLocation = getDistLocation( - identifier.key.name, - state.opts - ); + const distLocation = getDistLocation(identifier.key.name); if (distLocation) { return t.variableDeclaration(path.node.kind, [ t.variableDeclarator( @@ -136,7 +130,7 @@ module.exports = function ({ types: t }) { t.variableDeclarator( t.identifier(name), t.callExpression(t.identifier('require'), [ - t.stringLiteral(getDistLocation('index', state.opts)) + t.stringLiteral(getDistLocation('index')) ]) ) ]); diff --git a/packages/babel-plugin-react-native-web/src/moduleMap.js b/packages/babel-plugin-react-native-web/src/moduleMap.js index 838c9e8b16..b7b8d82355 100644 --- a/packages/babel-plugin-react-native-web/src/moduleMap.js +++ b/packages/babel-plugin-react-native-web/src/moduleMap.js @@ -10,7 +10,6 @@ module.exports = { AssetRegistry: true, BackHandler: true, Button: true, - CheckBox: true, Clipboard: true, DeviceEventEmitter: true, Dimensions: true, @@ -20,7 +19,6 @@ module.exports = { Image: true, ImageBackground: true, InputAccessoryView: true, - InteractionManager: true, Keyboard: true, KeyboardAvoidingView: true, LayoutAnimation: true, @@ -30,11 +28,9 @@ module.exports = { NativeEventEmitter: true, NativeModules: true, PanResponder: true, - Picker: true, PixelRatio: true, Platform: true, Pressable: true, - ProgressBar: true, RefreshControl: true, SafeAreaView: true, ScrollView: true, @@ -45,7 +41,6 @@ module.exports = { Switch: true, Text: true, TextInput: true, - Touchable: true, TouchableHighlight: true, TouchableNativeFeedback: true, TouchableOpacity: true, @@ -54,7 +49,6 @@ module.exports = { Vibration: true, View: true, VirtualizedList: true, - YellowBox: true, createElement: true, findNodeHandle: true, processColor: true, diff --git a/packages/benchmarks/package.json b/packages/benchmarks/package.json index 34594ac3af..294673d750 100644 --- a/packages/benchmarks/package.json +++ b/packages/benchmarks/package.json @@ -2,27 +2,26 @@ "private": true, "name": "benchmarks", "version": "0.0.0", + "type": "module", "scripts": { "clean": "del-cli ./dist", "build": "NODE_ENV=production npm run dev", - "dev": "npm run clean && mkdir -p dist && cp -f index.html dist/index.html && webpack --config ./webpack.config.js" + "dev": "npm run clean && mkdir -p dist && cp -f index.html dist/index.html && webpack-cli --config ./webpack.config.js" }, "dependencies": { - "classnames": "^2.3.1", - "d3-scale-chromatic": "^3.0.0", - "prop-types": "^15.6.0", + "classnames": "^2.5.1", + "d3-scale-chromatic": "^3.1.0", "react": "^19.0.0", "react-dom": "^19.0.0", - "react-native-web": "0.21.3" + "react-native-web": "0.21.4" }, "devDependencies": { - "babel-loader": "^8.2.5", - "babel-plugin-react-native-web": "0.21.3", - "css-loader": "^6.7.1", - "style-loader": "^3.3.1", - "url-loader": "^4.1.1", - "webpack": "^5.94.0", - "webpack-bundle-analyzer": "^4.5.0", - "webpack-cli": "^4.10.0" + "babel-loader": "^10.1.1", + "css-loader": "^7.1.5", + "del-cli": "^8.0.1", + "style-loader": "^4.0.0", + "webpack": "^5.111.1", + "webpack-bundle-analyzer": "^5.4.0", + "webpack-cli": "^7.2.3" } } diff --git a/packages/benchmarks/src/app/App.js b/packages/benchmarks/src/app/App.js index 1728c049e8..9d2e6025d9 100644 --- a/packages/benchmarks/src/app/App.js +++ b/packages/benchmarks/src/app/App.js @@ -1,5 +1,11 @@ import Benchmark from './Benchmark'; -import { Picker, StyleSheet, ScrollView, Pressable, View } from 'react-native'; +import { + StyleSheet, + ScrollView, + Pressable, + View, + unstable_createElement as createElement +} from 'react-native'; import React, { Component } from 'react'; import Button from './Button'; import { IconClear, IconEye } from './Icons'; @@ -10,6 +16,17 @@ import { colors } from './theme'; const Overlay = () => ; +const Select = ({ disabled, onValueChange, options, style, value }) => + createElement('select', { + disabled, + onChange: (e) => onValueChange(e.target.value), + style, + value, + children: options.map((option) => + createElement('option', { key: option, children: option, value: option }) + ) + }); + export default class App extends Component { static displayName = '@app/App'; @@ -42,37 +59,25 @@ export default class App extends Component { Library {currentLibraryName} - - {Object.keys(tests[currentBenchmarkName]).map( - (libraryName) => ( - - ) - )} - + value={currentLibraryName} + /> Benchmark {currentBenchmarkName} - - {Object.keys(tests).map((test) => ( - - ))} - + value={currentBenchmarkName} + /> @@ -103,7 +108,7 @@ export default class App extends Component { {results.map((r, i) => ( sample.elapsed.toFixed(1)).join('\n')); }; _handleClear = () => { @@ -293,7 +297,7 @@ const styles = StyleSheet.create({ color: colors.deepGray }, picker: { - ...StyleSheet.absoluteFillObject, + ...StyleSheet.absoluteFill, appearance: 'none', opacity: 0, width: '100%' diff --git a/packages/benchmarks/src/app/Benchmark/index.js b/packages/benchmarks/src/app/Benchmark/index.js index 4b9b72ed6b..1c3e5096e6 100644 --- a/packages/benchmarks/src/app/Benchmark/index.js +++ b/packages/benchmarks/src/app/Benchmark/index.js @@ -2,22 +2,45 @@ * The MIT License (MIT) * Copyright (c) 2017 Paul Armstrong * https://github.com/paularmstrong/react-component-benchmark - * @flow */ -/* global $Values */ - -import type { Node } from 'react'; - import * as Timing from './timing'; import React, { Component } from 'react'; import { getMean, getMedian, getStdDev } from './math'; -import type { - BenchResultsType, - FullSampleTimingType, - SampleTimingType -} from './types'; +/** + * @typedef {Object} BenchResultsType + * @property {number} startTime + * @property {number} endTime + * @property {number} runTime + * @property {number} sampleCount + * @property {Array} samples + * @property {number} max + * @property {number} min + * @property {number} median + * @property {number} mean + * @property {number} stdDev + * @property {number} meanLayout + * @property {number} meanScripting + */ + +/** + * @typedef {Object} SampleTimingType + * @property {number} scriptingStart + * @property {number} [scriptingEnd] + * @property {number} [layoutStart] + * @property {number} [layoutEnd] + */ + +/** + * @typedef {Object} FullSampleTimingType + * @property {number} start + * @property {number} end + * @property {number} scriptingStart + * @property {number} scriptingEnd + * @property {number} [layoutStart] + * @property {number} [layoutEnd] + */ export const BenchmarkType = { MOUNT: 'mount', @@ -25,10 +48,32 @@ export const BenchmarkType = { UNMOUNT: 'unmount' }; -const shouldRender = ( - cycle: number, - type: $Values -): boolean => { +/** @typedef {typeof BenchmarkType[keyof typeof BenchmarkType]} BenchmarkTypeValue */ + +/** + * @typedef {Object} BenchmarkPropsType + * @property {React.ComponentType} component + * @property {boolean} [forceLayout] + * @property {(x: { cycle: number }) => Object} getComponentProps + * @property {(x: BenchResultsType) => void} onComplete + * @property {number} sampleCount + * @property {number} timeout + * @property {BenchmarkTypeValue} type + */ + +/** + * @typedef {Object} BenchmarkStateType + * @property {Object} componentProps + * @property {number} cycle + * @property {boolean} running + */ + +/** + * @param {number} cycle + * @param {BenchmarkTypeValue} type + * @returns {boolean} + */ +const shouldRender = (cycle, type) => { switch (type) { // Render every odd iteration (first, third, etc) // Mounts and unmounts the component @@ -43,10 +88,12 @@ const shouldRender = ( } }; -const shouldRecord = ( - cycle: number, - type: $Values -): boolean => { +/** + * @param {number} cycle + * @param {BenchmarkTypeValue} type + * @returns {boolean} + */ +const shouldRecord = (cycle, type) => { switch (type) { // Record every odd iteration (when mounted: first, third, etc) case BenchmarkType.MOUNT: @@ -62,11 +109,13 @@ const shouldRecord = ( } }; -const isDone = ( - cycle: number, - sampleCount: number, - type: $Values -): boolean => { +/** + * @param {number} cycle + * @param {number} sampleCount + * @param {BenchmarkTypeValue} type + * @returns {boolean} + */ +const isDone = (cycle, sampleCount, type) => { switch (type) { case BenchmarkType.MOUNT: return cycle >= sampleCount * 2 - 1; @@ -79,51 +128,34 @@ const isDone = ( } }; -const sortNumbers = (a: number, b: number): number => a - b; - -type BenchmarkPropsType = { - component: typeof React.Component, - forceLayout?: boolean, - getComponentProps: Function, - onComplete: (x: BenchResultsType) => void, - sampleCount: number, - timeout: number, - type: $Values -}; - -type BenchmarkStateType = { - componentProps: Object, - cycle: number, - running: boolean -}; +/** + * @param {number} a + * @param {number} b + * @returns {number} + */ +const sortNumbers = (a, b) => a - b; /** * Benchmark * TODO: documentation + * @extends {Component} */ -export default class Benchmark extends Component< - BenchmarkPropsType, - BenchmarkStateType -> { - _raf: ?Function; - _startTime: number; - _samples: Array; - - static displayName: ?string = 'Benchmark'; - - static defaultProps: {| - sampleCount: number, - timeout: number, - type: $PropertyType - |} = { +export default class Benchmark extends Component { + static displayName = 'Benchmark'; + + static defaultProps = { sampleCount: 50, timeout: 10000, // 10 seconds type: BenchmarkType.MOUNT }; - static Type: typeof BenchmarkType = BenchmarkType; + static Type = BenchmarkType; - constructor(props: BenchmarkPropsType, context?: {}) { + /** + * @param {BenchmarkPropsType} props + * @param {Object} [context] + */ + constructor(props, context) { super(props, context); const cycle = 0; const componentProps = props.getComponentProps({ cycle }); @@ -132,11 +164,16 @@ export default class Benchmark extends Component< cycle, running: false }; + /** @type {?number} */ + this._raf = null; + /** @type {number} */ this._startTime = 0; + /** @type {Array} */ this._samples = []; } - componentWillReceiveProps(nextProps: BenchmarkPropsType) { + /** @param {BenchmarkPropsType} nextProps */ + componentWillReceiveProps(nextProps) { if (nextProps) { this.setState((state) => ({ componentProps: nextProps.getComponentProps(state.cycle) @@ -144,10 +181,11 @@ export default class Benchmark extends Component< } } - componentWillUpdate( - nextProps: BenchmarkPropsType, - nextState: BenchmarkStateType - ) { + /** + * @param {BenchmarkPropsType} nextProps + * @param {BenchmarkStateType} nextState + */ + componentWillUpdate(nextProps, nextState) { if (nextState.running && !this.state.running) { this._startTime = Timing.now(); } @@ -189,7 +227,8 @@ export default class Benchmark extends Component< } } - render(): Node { + /** @returns {React.ReactNode} */ + render() { const { component: Component, type } = this.props; const { componentProps, cycle, running } = this.state; if (running && shouldRecord(cycle, type)) { @@ -221,24 +260,17 @@ export default class Benchmark extends Component< } this._raf = window.requestAnimationFrame(() => { - this.setState((state: BenchmarkStateType) => ({ + this.setState((state) => ({ cycle: state.cycle + 1, componentProps })); }); } - getSamples(): Array { + /** @returns {Array} */ + getSamples() { return this._samples.reduce( - ( - memo: Array, - { - scriptingStart, - scriptingEnd, - layoutStart, - layoutEnd - }: SampleTimingType - ): Array => { + (memo, { scriptingStart, scriptingEnd, layoutStart, layoutEnd }) => { memo.push({ start: scriptingStart, end: layoutEnd || scriptingEnd || 0, @@ -253,7 +285,8 @@ export default class Benchmark extends Component< ); } - _handleComplete(endTime: number) { + /** @param {number} endTime */ + _handleComplete(endTime) { const { onComplete } = this.props; const samples = this.getSamples(); diff --git a/packages/benchmarks/src/app/Benchmark/math.js b/packages/benchmarks/src/app/Benchmark/math.js index 15ed1dd401..227b9f9f88 100644 --- a/packages/benchmarks/src/app/Benchmark/math.js +++ b/packages/benchmarks/src/app/Benchmark/math.js @@ -1,10 +1,11 @@ -// @flow -type ValuesType = Array; - -export const getStdDev = (values: ValuesType): number => { +/** + * @param {Array} values + * @returns {number} + */ +export const getStdDev = (values) => { const avg = getMean(values); - const squareDiffs = values.map((value: number) => { + const squareDiffs = values.map((value) => { const diff = value - avg; return diff * diff; }); @@ -12,17 +13,25 @@ export const getStdDev = (values: ValuesType): number => { return Math.sqrt(getMean(squareDiffs)); }; -export const getMean = (values: ValuesType): number => { - const sum = values.reduce((sum: number, value: number) => sum + value, 0); +/** + * @param {Array} values + * @returns {number} + */ +export const getMean = (values) => { + const sum = values.reduce((sum, value) => sum + value, 0); return sum / values.length; }; -export const getMedian = (values: ValuesType): number => { +/** + * @param {Array} values + * @returns {number} + */ +export const getMedian = (values) => { if (values.length === 1) { return values[0]; } - const numbers = values.sort((a: number, b: number) => a - b); + const numbers = values.sort((a, b) => a - b); return ( (numbers[(numbers.length - 1) >> 1] + numbers[numbers.length >> 1]) / 2 ); diff --git a/packages/benchmarks/src/app/Benchmark/timing.js b/packages/benchmarks/src/app/Benchmark/timing.js index e96c773984..31238d4f7c 100644 --- a/packages/benchmarks/src/app/Benchmark/timing.js +++ b/packages/benchmarks/src/app/Benchmark/timing.js @@ -1,7 +1,8 @@ -// @flow - -// Returns a high resolution time (if possible) in milliseconds -export function now(): number { +/** + * Returns a high resolution time (if possible) in milliseconds + * @returns {number} + */ +export function now() { if (window && window.performance) { return window.performance.now(); } else { diff --git a/packages/benchmarks/src/app/Benchmark/types.js b/packages/benchmarks/src/app/Benchmark/types.js deleted file mode 100644 index 4c4b89f6b8..0000000000 --- a/packages/benchmarks/src/app/Benchmark/types.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * @flow - */ -export type BenchResultsType = { - startTime: number, - endTime: number, - runTime: number, - sampleCount: number, - samples: Array, - max: number, - min: number, - median: number, - mean: number, - stdDev: number -}; - -export type SampleTimingType = { - scriptingStart: number, - scriptingEnd?: number, - layoutStart?: number, - layoutEnd?: number -}; - -export type FullSampleTimingType = { - start: number, - end: number, - scriptingStart: number, - scriptingEnd: number, - layoutStart?: number, - layoutEnd?: number -}; diff --git a/packages/benchmarks/src/app/Button.js b/packages/benchmarks/src/app/Button.js index 6794617136..3f478928a8 100644 --- a/packages/benchmarks/src/app/Button.js +++ b/packages/benchmarks/src/app/Button.js @@ -1,7 +1,7 @@ import { StyleSheet, TouchableHighlight, Text } from 'react-native'; import React, { Component } from 'react'; -export default class Button extends Component<*> { +export default class Button extends Component { static displayName = '@app/Button'; render() { diff --git a/packages/benchmarks/src/app/ReportCard.js b/packages/benchmarks/src/app/ReportCard.js index cff9859643..0117d2b596 100644 --- a/packages/benchmarks/src/app/ReportCard.js +++ b/packages/benchmarks/src/app/ReportCard.js @@ -1,10 +1,9 @@ -/* @noflow */ - import Text from './Text'; import { StyleSheet, View } from 'react-native'; import React, { Fragment } from 'react'; -const fmt = (time: number) => { +/** @param {number} time */ +const fmt = (time) => { const i = Number(Math.round(time + 'e2') + 'e-2').toFixed(2); return 10 / i > 1 ? `0${i}` : i; }; diff --git a/packages/benchmarks/src/app/Text.js b/packages/benchmarks/src/app/Text.js index 804b6d009d..9ecb25327c 100644 --- a/packages/benchmarks/src/app/Text.js +++ b/packages/benchmarks/src/app/Text.js @@ -1,21 +1,13 @@ import React from 'react'; import { StyleSheet, Text } from 'react-native'; -import { bool } from 'prop-types'; import { colors } from './theme'; class AppText extends React.Component { static displayName = '@app/Text'; - static contextTypes = { - isInAParentText: bool - }; - render() { const { style, ...rest } = this.props; - const { isInAParentText } = this.context; - return ( - - ); + return ; } } diff --git a/packages/benchmarks/src/impl.js b/packages/benchmarks/src/impl.js index fcf6226fd7..4ea37bc754 100644 --- a/packages/benchmarks/src/impl.js +++ b/packages/benchmarks/src/impl.js @@ -1,25 +1,28 @@ -/* @noflow */ - -import { type Component } from 'react'; import packageJson from '../package.json'; const context = require.context('./implementations/', true, /index\.js$/); const { dependencies } = packageJson; -type ComponentsType = { - Box: Component, - Dot: Component, - Provider: Component, - View: Component -}; - -type ImplementationType = { - components: ComponentsType, - name: string, - version: string -}; - -const toImplementations = (context: Object): Array => +/** + * @typedef {Object} ComponentsType + * @property {React.ComponentType} Box + * @property {React.ComponentType} Dot + * @property {React.ComponentType} Provider + * @property {React.ComponentType} View + */ + +/** + * @typedef {Object} ImplementationType + * @property {ComponentsType} components + * @property {string} name + * @property {string} version + */ + +/** + * @param {Object} context + * @returns {Array} + */ +const toImplementations = (context) => context.keys().map((path) => { const components = context(path).default; const name = path.split('/')[1]; @@ -27,7 +30,11 @@ const toImplementations = (context: Object): Array => return { components, name, version }; }); -const toObject = (impls: Array): Object => +/** + * @param {Array} impls + * @returns {Object} + */ +const toObject = (impls) => impls.reduce((acc, impl) => { acc[impl.name] = impl; return acc; diff --git a/packages/benchmarks/webpack.config.js b/packages/benchmarks/webpack.config.js index fad7114747..0c85b79611 100644 --- a/packages/benchmarks/webpack.config.js +++ b/packages/benchmarks/webpack.config.js @@ -1,12 +1,11 @@ -const BundleAnalyzerPlugin = - require('webpack-bundle-analyzer').BundleAnalyzerPlugin; -const path = require('path'); +import path from 'node:path'; +import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; -const appDirectory = path.resolve(__dirname); +const appDirectory = import.meta.dirname; -module.exports = { +export default { mode: 'production', - context: __dirname, + context: appDirectory, entry: './src/index', output: { path: path.resolve(appDirectory, 'dist'), @@ -25,6 +24,7 @@ module.exports = { loader: 'css-loader', options: { modules: { + namedExport: false, localIdentName: '[hash:base64:8]' } } @@ -38,7 +38,7 @@ module.exports = { loader: 'babel-loader', options: { cacheDirectory: false, - extends: path.resolve(appDirectory, '../../configs/babel.config') + extends: path.resolve(appDirectory, '../../babel.config.js') } } } diff --git a/packages/dom-event-testing-library/README.md b/packages/dom-event-testing-library/README.md index 94d4d611b4..760a8b45e6 100644 --- a/packages/dom-event-testing-library/README.md +++ b/packages/dom-event-testing-library/README.md @@ -4,11 +4,10 @@ A library for unit testing high-level interactions via simple pointer events, e. There are number of challenges involved in unit testing modules that work with DOM events. -1. Testing environments with and without support for the `PointerEvent` API. -2. Testing various user interaction modes including mouse, touch, and pen use. -3. Testing against the event sequences browsers actually produce (e.g., emulated touch and mouse events.) -4. Testing against the event properties DOM events include (i.e., more complete mock data) -5. Testing against "virtual" events produced by tools like screen-readers. +1. Testing various user interaction modes including mouse, touch, and pen use. +2. Testing against the event sequences browsers actually produce (e.g., emulated touch and mouse events.) +3. Testing against the event properties DOM events include (i.e., more complete mock data) +4. Testing against "virtual" events produced by tools like screen-readers. Writing unit tests to cover all these scenarios is tedious and error prone. This event testing library is designed to avoid these issues by allowing developers to more easily dispatch events in unit tests, and to more reliably test interactions while using an API based on `PointerEvent`. @@ -16,25 +15,18 @@ Writing unit tests to cover all these scenarios is tedious and error prone. This ```js import { - describeWithPointerEvent, - testWithPointerType, clearPointers, createEventTarget, - setPointerEvent + testWithPointerType } from 'dom-event-testing-library'; -describeWithPointerEvent('useTap', (hasPointerEvent) => { - beforeEach(() => { - // basic PointerEvent mock - setPointerEvent(hasPointerEvent); - }); - +describe('useTap', () => { afterEach(() => { // clear active pointers between test runs clearPointers(); }); - // test all the pointer types supported by the environment + // test all the supported pointer types testWithPointerType('pointer down', (pointerType) => { const ref = createRef(null); const onTapStart = jest.fn(); @@ -64,7 +56,7 @@ describeWithPointerEvent('useTap', (hasPointerEvent) => { }); ``` -The example above tests the interaction in multiple scenarios. In each case, a realistic DOM event sequence–with complete mock events–is produced. When running in a mock environment without the `PointerEvent` API, the test runs for both `mouse` and `touch` pointer types. When `touch` is the pointer type it produces emulated mouse events. When running in a mock environment with the `PointerEvent` API, the test runs for `mouse`, `touch`, and `pen` pointer types. +The example above runs the test for the `mouse`, `touch`, and `pen` pointer types. In each case, a realistic DOM event sequence–with complete mock events–is produced. When `touch` is the pointer type it also produces the emulated mouse events that browsers fire after a touch ends. It's important to cover all these scenarios because it's very easy to introduce bugs – e.g., double calling of callbacks – if not accounting for emulated mouse events, differences in target capturing between `touch` and `mouse` pointers, and the different semantics of `button` across event APIs. @@ -101,38 +93,37 @@ To create a new event target pass the DOM node to `createEventTarget(node)`. Thi - `blur` - `click` - `contextmenu` +- `error` - `focus` (includes the complete sequence of focus-related events) - `keydown` - `keyup` +- `load` - `pointercancel` - `pointerdown` - `pointerhover` (moves when pointer is not down) - `pointermove` (moves when pointer is down) - `pointerover` - `pointerout` +- `pointerup` - `scroll` - `select` - `selectionchange` - `tap` (equivalent to `pointerdown` followed by `pointerup`) - `virtualclick` -The target also has `node` property equal to the node that was used to create the target, and a `setBoundClientRect({x,y,width,height})` method that can be used to mock the return value of `getBoundingClientRect`. +The target also has `node` property equal to the node that was used to create the target, and a `setBoundingClientRect({x,y,width,height})` method that can be used to mock the return value of `getBoundingClientRect`. -### Jest helpers +### Pointer state -#### `describeWithPointerEvent` +#### `clearPointers` -This is just like `describe` but it will run the entire test suite twice, once in an environment with `PointerEvent` mocked and once without. +Touch and pen sequences record their active pointers so that `touches`, `targetTouches`, and `changedTouches` stay consistent across a gesture. Call `clearPointers()` after each test to release any pointers a test left active, e.g., because it failed or ran a partial gesture. Pointers left active leak into later tests, where they are counted as a multi-touch gesture and silently suppress the emulated mouse events. -```js -describeWithPointerEvent('useTap', (hasPointerEvent) => { - // test suite -}); -``` +### Jest helpers #### `testWithPointerType` -The is just like `test` but it will run the test for every pointer type supported by the environment. When `PointerEvent` is mocked, the pointer types will be `mouse`, `touch`, and `pen`; otherwise the pointer types will be `mouse` and `touch`. +This is just like `test` but it will run the test once for each pointer type: `mouse`, `touch`, and `pen`. ```js testWithPointerType('pointer down', (pointerType) => { @@ -145,7 +136,3 @@ testWithPointerType('pointer down', (pointerType) => { #### platform Interactions that account for Windows / macOS differences can change the platform by calling `platform.set(value)`, where `value` can be either `'mac'` or `'windows'`. To retreive the current platform call `platform.get()`, and the clear it call `platform.clear()`. - -#### hasPointerEvent / setPointerEvent - -Interactions implemented using `PointerEvent` can create a basic mock for jsdom by calling `setPointerEvent(true)` (disable with `setPointerEvent(false)`), and check whether `PointerEvent` is available by calling `hasPointerEvent()`. diff --git a/packages/dom-event-testing-library/index.js b/packages/dom-event-testing-library/index.js deleted file mode 100644 index cba1843545..0000000000 --- a/packages/dom-event-testing-library/index.js +++ /dev/null @@ -1 +0,0 @@ -export * from './src/index'; diff --git a/packages/dom-event-testing-library/package.json b/packages/dom-event-testing-library/package.json index 1c96ceb6e4..84e16707a1 100644 --- a/packages/dom-event-testing-library/package.json +++ b/packages/dom-event-testing-library/package.json @@ -2,8 +2,9 @@ "private": true, "name": "dom-event-testing-library", "version": "0.0.0", - "main": "index.js", + "main": "src/index.js", "description": "Browser event sequences for unit tests", + "type": "module", "author": "Nicolas Gallagher", "license": "MIT", "homepage": "https://github.com/necolas/react-native-web/tree/master/packages/dom-event-testing-library" diff --git a/packages/dom-event-testing-library/src/__tests__/__snapshots__/index-test.js.snap b/packages/dom-event-testing-library/src/__tests__/__snapshots__/index-test.js.snap index f8e20b59e4..e6e97c8f4a 100644 --- a/packages/dom-event-testing-library/src/__tests__/__snapshots__/index-test.js.snap +++ b/packages/dom-event-testing-library/src/__tests__/__snapshots__/index-test.js.snap @@ -1,15 +1,7 @@ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing -exports[`describeWithPointerEvent: MouseEvent/TouchEvent provides boolean to tests 1`] = `false`; +exports[`testWithPointerType: mouse 1`] = `"mouse"`; -exports[`describeWithPointerEvent: MouseEvent/TouchEvent testWithPointerType: mouse 1`] = `"mouse"`; +exports[`testWithPointerType: pen 1`] = `"pen"`; -exports[`describeWithPointerEvent: MouseEvent/TouchEvent testWithPointerType: touch 1`] = `"touch"`; - -exports[`describeWithPointerEvent: PointerEvent provides boolean to tests 1`] = `true`; - -exports[`describeWithPointerEvent: PointerEvent testWithPointerType: mouse 1`] = `"mouse"`; - -exports[`describeWithPointerEvent: PointerEvent testWithPointerType: pen 1`] = `"pen"`; - -exports[`describeWithPointerEvent: PointerEvent testWithPointerType: touch 1`] = `"touch"`; +exports[`testWithPointerType: touch 1`] = `"touch"`; diff --git a/packages/dom-event-testing-library/src/__tests__/index-test.js b/packages/dom-event-testing-library/src/__tests__/index-test.js index 350307563d..e72c2a78f8 100644 --- a/packages/dom-event-testing-library/src/__tests__/index-test.js +++ b/packages/dom-event-testing-library/src/__tests__/index-test.js @@ -12,21 +12,14 @@ import { defaultBrowserChromeSize } from '../constants'; import { clearPointers, createEventTarget, - describeWithPointerEvent, testWithPointerType } from '../index'; /** * Unit test helpers */ -describeWithPointerEvent('describeWithPointerEvent', (pointerEvent) => { - test('provides boolean to tests', () => { - expect(pointerEvent).toMatchSnapshot(); - }); - - testWithPointerType('testWithPointerType', (pointerType) => { - expect(pointerType).toMatchSnapshot(); - }); +testWithPointerType('testWithPointerType', (pointerType) => { + expect(pointerType).toMatchSnapshot(); }); /** diff --git a/packages/dom-event-testing-library/src/domEnvironment.js b/packages/dom-event-testing-library/src/domEnvironment.js index b9cec53929..47c8f82606 100644 --- a/packages/dom-event-testing-library/src/domEnvironment.js +++ b/packages/dom-event-testing-library/src/domEnvironment.js @@ -5,33 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -/** - * Change environment support for PointerEvent. - */ - -const emptyFunction = function () {}; - -export function hasPointerEvent() { - return global != null && global.PointerEvent != null; -} - -export function setPointerEvent(bool) { - const pointerCaptureFn = (name) => (id) => { - if (typeof id !== 'number') { - if (process.env.NODE_ENV !== 'production') { - console.error('A pointerId must be passed to "%s"', name); - } - } - }; - global.PointerEvent = bool ? emptyFunction : undefined; - global.HTMLElement.prototype.setPointerCapture = bool - ? pointerCaptureFn('setPointerCapture') - : undefined; - global.HTMLElement.prototype.releasePointerCapture = bool - ? pointerCaptureFn('releasePointerCapture') - : undefined; -} - /** * Change environment host platform. */ diff --git a/packages/dom-event-testing-library/src/domEventSequences.js b/packages/dom-event-testing-library/src/domEventSequences.js index b48782f41b..a8cc6fb34a 100644 --- a/packages/dom-event-testing-library/src/domEventSequences.js +++ b/packages/dom-event-testing-library/src/domEventSequences.js @@ -15,7 +15,7 @@ import { defaultBrowserChromeSize } from './constants'; import * as domEvents from './domEvents'; -import { hasPointerEvent, platform } from './domEnvironment'; +import { platform } from './domEnvironment'; import * as touchStore from './touchStore'; /** @@ -127,9 +127,7 @@ export function contextmenu(target, defaultPayload = {}) { const preventDefault = payload.preventDefault; if (pointerType === 'touch') { - if (hasPointerEvent()) { - dispatch(domEvents.pointerdown(payload)); - } + dispatch(domEvents.pointerdown(payload)); const touch = createTouch(target, payload); touchStore.addTouch(touch); const touchEventPayload = createTouchEventPayload(target, touch, payload); @@ -153,9 +151,7 @@ export function contextmenu(target, defaultPayload = {}) { } else if (pointerType === 'mouse') { if (ctrlKey === true) { const { button, buttons } = payload; - if (hasPointerEvent()) { - dispatch(domEvents.pointerdown({ ...payload, ctrlKey })); - } + dispatch(domEvents.pointerdown({ ...payload, ctrlKey })); dispatch(domEvents.mousedown({ ...payload, ctrlKey })); if (platform.get() === 'mac') { dispatch( @@ -165,9 +161,7 @@ export function contextmenu(target, defaultPayload = {}) { } else { const button = buttonType.secondary; const buttons = buttonsType.secondary; - if (hasPointerEvent()) { - dispatch(domEvents.pointerdown({ ...payload, button, buttons })); - } + dispatch(domEvents.pointerdown({ ...payload, button, buttons })); dispatch(domEvents.mousedown({ ...payload, button, buttons })); dispatch( domEvents.contextmenu({ ...payload, button, buttons, preventDefault }) @@ -201,9 +195,8 @@ export function pointercancel(target, defaultPayload) { ...defaultPayload }; - if (hasPointerEvent()) { - dispatchEvent(domEvents.pointercancel(payload)); - } + dispatchEvent(domEvents.pointercancel(payload)); + if (pointerType === 'mouse') { dispatchEvent(domEvents.dragstart(payload)); } else { @@ -227,30 +220,23 @@ export function pointerdown(target, defaultPayload) { }; if (pointerType === 'mouse') { - if (hasPointerEvent()) { - dispatch(domEvents.pointerover(payload)); - dispatch(domEvents.pointerenter(payload)); - } + dispatch(domEvents.pointerover(payload)); + dispatch(domEvents.pointerenter(payload)); dispatch(domEvents.mouseover(payload)); dispatch(domEvents.mouseenter(payload)); - if (hasPointerEvent()) { - dispatch(domEvents.pointerdown(payload)); - } + dispatch(domEvents.pointerdown(payload)); dispatch(domEvents.mousedown(payload)); focus(target); } else { - if (hasPointerEvent()) { - dispatch(domEvents.pointerover(payload)); - dispatch(domEvents.pointerenter(payload)); - dispatch(domEvents.pointerdown(payload)); - } + dispatch(domEvents.pointerover(payload)); + dispatch(domEvents.pointerenter(payload)); + dispatch(domEvents.pointerdown(payload)); + const touch = createTouch(target, payload); touchStore.addTouch(touch); const touchEventPayload = createTouchEventPayload(target, touch, payload); dispatch(domEvents.touchstart(touchEventPayload)); - if (hasPointerEvent()) { - dispatch(domEvents.gotpointercapture(payload)); - } + dispatch(domEvents.gotpointercapture(payload)); } } @@ -262,12 +248,10 @@ export function pointerover(target, defaultPayload) { ...defaultPayload }; - if (hasPointerEvent()) { - // Pointer must move before it can dispatch "over" - dispatch(domEvents.pointermove()); - dispatch(domEvents.pointerover(payload)); - dispatch(domEvents.pointerenter(payload)); - } + // Pointer must move before it can dispatch "over" + dispatch(domEvents.pointermove()); + dispatch(domEvents.pointerover(payload)); + dispatch(domEvents.pointerenter(payload)); dispatch(domEvents.mousemove()); dispatch(domEvents.mouseover(payload)); dispatch(domEvents.mouseenter(payload)); @@ -283,13 +267,12 @@ export function pointerout(target, defaultPayload) { const { relatedTarget } = payload; - if (hasPointerEvent()) { - dispatch(domEvents.pointerout(payload)); - // Only call the leave event if exiting the subtree - if (!target.contains(relatedTarget)) { - dispatch(domEvents.pointerleave(payload)); - } + dispatch(domEvents.pointerout(payload)); + // Only call the leave event if exiting the subtree + if (!target.contains(relatedTarget)) { + dispatch(domEvents.pointerleave(payload)); } + dispatch(domEvents.mouseout(payload)); if (!target.contains(relatedTarget)) { // Only call the leave event if exiting the subtree @@ -306,9 +289,7 @@ export function pointerhover(target, defaultPayload) { ...defaultPayload }; - if (hasPointerEvent()) { - dispatch(domEvents.pointermove(payload)); - } + dispatch(domEvents.pointermove(payload)); dispatch(domEvents.mousemove(payload)); } @@ -326,22 +307,17 @@ export function pointermove(target, defaultPayload) { }; if (pointerType === 'mouse') { - if (hasPointerEvent()) { - dispatch( - domEvents.pointermove({ pressure: 0.5, button: -1, ...payload }) - ); - } + dispatch(domEvents.pointermove({ pressure: 0.5, button: -1, ...payload })); dispatch(domEvents.mousemove(payload)); } else { - if (hasPointerEvent()) { - dispatch( - domEvents.pointermove({ - pressure: 1, - button: -1, - ...payload - }) - ); - } + dispatch( + domEvents.pointermove({ + pressure: 1, + button: -1, + ...payload + }) + ); + const touch = createTouch(target, payload); touchStore.updateTouch(touch); const touchEventPayload = createTouchEventPayload(target, touch, payload); @@ -364,20 +340,17 @@ export function pointerup(target, defaultPayload) { platform.get() === 'mac' && payload.ctrlKey === true; if (pointerType === 'mouse') { - if (hasPointerEvent()) { - dispatch(domEvents.pointerup(payload)); - } + dispatch(domEvents.pointerup(payload)); dispatch(domEvents.mouseup(payload)); if (isPrimaryButton && !isContextMenuAction) { dispatch(domEvents.click(payload)); } } else { - if (hasPointerEvent()) { - dispatch(domEvents.pointerup(payload)); - dispatch(domEvents.lostpointercapture(payload)); - dispatch(domEvents.pointerout(payload)); - dispatch(domEvents.pointerleave(payload)); - } + dispatch(domEvents.pointerup(payload)); + dispatch(domEvents.lostpointercapture(payload)); + dispatch(domEvents.pointerout(payload)); + dispatch(domEvents.pointerleave(payload)); + const touch = createTouch(target, payload); const isGesture = touchStore.removeTouch(touch); const touchEventPayload = createTouchEventPayload(target, touch, payload); diff --git a/packages/dom-event-testing-library/src/index.js b/packages/dom-event-testing-library/src/index.js index 9e4312691a..9cc8499080 100644 --- a/packages/dom-event-testing-library/src/index.js +++ b/packages/dom-event-testing-library/src/index.js @@ -10,8 +10,8 @@ import { buttonType, buttonsType } from './constants'; import * as domEvents from './domEvents'; import * as domEventSequences from './domEventSequences'; -import { hasPointerEvent, setPointerEvent, platform } from './domEnvironment'; -import { describeWithPointerEvent, testWithPointerType } from './testHelpers'; +import { platform } from './domEnvironment'; +import { testWithPointerType } from './testHelpers'; const createEventTarget = (node) => ({ node, @@ -91,8 +91,8 @@ const createEventTarget = (node) => ({ * target.tap({ pointerType: 'touch' }) */ tap(payload) { - domEventSequences.pointerdown(payload); - domEventSequences.pointerup(payload); + domEventSequences.pointerdown(node, payload); + domEventSequences.pointerup(node, payload); }, virtualclick(payload) { node.dispatchEvent(domEvents.virtualclick(payload)); @@ -123,9 +123,6 @@ export { buttonsType, clearPointers, createEventTarget, - describeWithPointerEvent, platform, - hasPointerEvent, - setPointerEvent, testWithPointerType }; diff --git a/packages/dom-event-testing-library/src/testHelpers.js b/packages/dom-event-testing-library/src/testHelpers.js index 28dce8a1b1..79f216f50c 100644 --- a/packages/dom-event-testing-library/src/testHelpers.js +++ b/packages/dom-event-testing-library/src/testHelpers.js @@ -7,26 +7,8 @@ 'use strict'; -import { hasPointerEvent, setPointerEvent } from './domEnvironment'; - -export function describeWithPointerEvent(message, describeFn) { - const pointerEvent = 'PointerEvent'; - const fallback = 'MouseEvent/TouchEvent'; - describe.each` - value | name - ${true} | ${pointerEvent} - ${false} | ${fallback} - `(`${message}: $name`, (entry) => { - const hasPointerEvents = entry.value; - setPointerEvent(hasPointerEvents); - describeFn(hasPointerEvents); - }); -} - export function testWithPointerType(message, testFn) { - const table = hasPointerEvent() - ? ['mouse', 'touch', 'pen'] - : ['mouse', 'touch']; + const table = ['mouse', 'touch', 'pen']; test.each(table)(`${message}: %s`, (pointerType) => { testFn(pointerType); }); diff --git a/packages/react-native-web-docs/eleventy.config.js b/packages/react-native-web-docs/eleventy.config.js index 41d33b444b..bc67824ed8 100644 --- a/packages/react-native-web-docs/eleventy.config.js +++ b/packages/react-native-web-docs/eleventy.config.js @@ -1,20 +1,18 @@ -'use strict'; - -const csso = require('csso'); -const eleventyNavigationPlugin = require('@11ty/eleventy-navigation'); -const eleventySvgContentsPlugin = require('eleventy-plugin-svg-contents'); -const eleventySyntaxHighlightPlugin = require('@11ty/eleventy-plugin-syntaxhighlight'); -const htmlmin = require('html-minifier'); -const markdown = require('markdown-it'); -const markdownAnchor = require('markdown-it-anchor'); -const markdownAttrs = require('markdown-it-attrs'); -const markdownContainer = require('markdown-it-container'); -const markdownEmoji = require('markdown-it-emoji'); -const markdownFootnote = require('markdown-it-footnote'); -const markdownTasks = require('markdown-it-task-lists'); -const UglifyJS = require('uglify-es'); - -module.exports = function (eleventyConfig) { +import eleventyNavigationPlugin from '@11ty/eleventy-navigation'; +import eleventySyntaxHighlightPlugin from '@11ty/eleventy-plugin-syntaxhighlight'; +import * as csso from 'csso'; +import eleventySvgContentsPlugin from 'eleventy-plugin-svg-contents'; +import htmlmin from 'html-minifier-terser'; +import markdown from 'markdown-it'; +import markdownAnchor from 'markdown-it-anchor'; +import markdownAttrs from 'markdown-it-attrs'; +import markdownContainer from 'markdown-it-container'; +import * as markdownEmoji from 'markdown-it-emoji'; +import markdownFootnote from 'markdown-it-footnote'; +import markdownTasks from 'markdown-it-task-lists'; +import * as terser from 'terser'; + +export default function (eleventyConfig) { // Merge data instead of overriding // https://www.11ty.dev/docs/data-deep-merge/ eleventyConfig.setDataDeepMerge(true); @@ -49,21 +47,20 @@ module.exports = function (eleventyConfig) { const options = { month: 'long', day: 'numeric', year: 'numeric' }; return new Intl.DateTimeFormat('en-US', options).format(dateObj); }); + // Date formatting (machine readable) eleventyConfig.addFilter('machineDate', (dateObj) => { return dateObj.toISOString(); }); + // Minify CSS eleventyConfig.addFilter('cssmin', function (code) { return csso.minify(code).css; }); + // Minify JS - eleventyConfig.addFilter('jsmin', function (code) { - const minified = UglifyJS.minify(code); - if (minified.error) { - console.log('UglifyJS error: ', minified.error); - return code; - } + eleventyConfig.addAsyncFilter('jsmin', async function (code) { + const minified = await terser.minify(code); return minified.code; }); @@ -76,6 +73,10 @@ module.exports = function (eleventyConfig) { // PASSTHROUGH ----- eleventyConfig.addPassthroughCopy('src/static'); + eleventyConfig.addPassthroughCopy({ + 'src/.nojekyll': '.nojekyll', + '../react-native-web-examples/dist': 'examples' + }); // COLLECTIONS ----- @@ -157,4 +158,4 @@ module.exports = function (eleventyConfig) { // Matches the GitHub Pages subdirectory of the site (necolas.github.io/react-native-web) pathPrefix: '/react-native-web/' }; -}; +} diff --git a/packages/react-native-web-docs/package.json b/packages/react-native-web-docs/package.json index 7fd51d1c1f..d3c8800030 100644 --- a/packages/react-native-web-docs/package.json +++ b/packages/react-native-web-docs/package.json @@ -3,9 +3,11 @@ "name": "react-native-web-docs", "version": "0.21.4", "description": "Documentation website for React Native for Web", + "type": "module", "scripts": { - "dev": "eleventy --serve", - "build": "ELEVENTY_PRODUCTION=true eleventy", + "build:examples": "BASE_PATH=/react-native-web/examples npm run build -w react-native-web-examples", + "dev": "npm run build:examples && eleventy --serve", + "build": "npm run build:examples && ELEVENTY_PRODUCTION=true eleventy", "debug": "DEBUG=* eleventy" }, "homepage": "https://github.com/necolas/react-native-web", @@ -15,16 +17,14 @@ "@11ty/eleventy-plugin-syntaxhighlight": "^5.0.2", "csso": "^5.0.5", "eleventy-plugin-svg-contents": "^0.7.0", - "eleventy-plugin-toc": "^1.1.5", - "html-minifier": "^4.0.0", + "html-minifier-terser": "^7.2.0", "markdown-it": "^15.0.2", "markdown-it-anchor": "^10.0.0", "markdown-it-attrs": "^5.0.1", "markdown-it-container": "^4.0.0", "markdown-it-emoji": "^3.1.0", "markdown-it-footnote": "^4.0.0", - "markdown-it-for-inline": "^2.0.1", "markdown-it-task-lists": "^2.1.1", - "uglify-es": "^3.3.9" + "terser": "^5.51.2" } } diff --git a/packages/react-native-web-docs/src/.nojekyll b/packages/react-native-web-docs/src/.nojekyll new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/react-native-web-docs/src/data/site.js b/packages/react-native-web-docs/src/data/site.js index 7847b376e9..2ee88f169f 100644 --- a/packages/react-native-web-docs/src/data/site.js +++ b/packages/react-native-web-docs/src/data/site.js @@ -1,6 +1,6 @@ -const packageJson = require('../../package.json'); +import packageJson from '../../package.json' with { type: 'json' }; -module.exports = { +export default { name: 'React Native for Web', description: '', footer: 'Copyright © Nicolas Gallagher and Meta Platforms, Inc.', diff --git a/packages/react-native-web-docs/src/includes/assets/inline.css b/packages/react-native-web-docs/src/includes/assets/inline.css index aac824175d..c47bb83b30 100644 --- a/packages/react-native-web-docs/src/includes/assets/inline.css +++ b/packages/react-native-web-docs/src/includes/assets/inline.css @@ -21,8 +21,9 @@ --docs-spacing-72: 18rem; --docs-spacing-80: 20rem; - --docs-font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, - Helvetica, Arial, sans-serif; + --docs-font-family: + -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, + sans-serif; --docs-font-size: 14px; --docs-heading-size: 2em; --docs-line-height: 1.5; @@ -63,8 +64,8 @@ --docs-ring-offset-shadow: 0 0 #0000; --docs-ring-shadow: 0 0 #0000; - --docs-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), - 0 2px 4px -1px rgba(0, 0, 0, 0.06); + --docs-shadow: + 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); } } @@ -87,8 +88,8 @@ --docs-ring-offset-shadow: 0 0 #0000; --docs-ring-shadow: 0 0 #0000; - --docs-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), - 0 2px 4px -1px rgba(0, 0, 0, 0.06); + --docs-shadow: + 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); } } @@ -115,8 +116,9 @@ select { } code, pre { - font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, - 'Liberation Mono', 'Courier New', monospace; + font-family: + ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', + 'Courier New', monospace; } hr { box-sizing: content-box; @@ -421,7 +423,7 @@ h6 { font-style: italic; border-left-width: 0.25rem; border-left-color: #e5e7eb; - quotes: '\201C''\201D''\2018''\2019'; + quotes: '\201C' '\201D' '\2018' '\2019'; margin-top: 1.6em; margin-bottom: 1.6em; padding-left: 1em; diff --git a/packages/react-native-web-docs/src/includes/fragments/macros.html b/packages/react-native-web-docs/src/includes/fragments/macros.html index cd3f5f3b61..c99e22e02d 100644 --- a/packages/react-native-web-docs/src/includes/fragments/macros.html +++ b/packages/react-native-web-docs/src/includes/fragments/macros.html @@ -28,11 +28,14 @@ {% endmacro %} -{% macro codesandbox(path = '/') %} +{% macro example(path) %} + {% endmacro %} diff --git a/packages/react-native-web-docs/src/includes/layouts/home.html b/packages/react-native-web-docs/src/includes/layouts/home.html index 537db990e4..bc04c36908 100644 --- a/packages/react-native-web-docs/src/includes/layouts/home.html +++ b/packages/react-native-web-docs/src/includes/layouts/home.html @@ -39,15 +39,13 @@

React Native Components and APIs on the Web

Try it out!

-

You can try {{ site.name }} from your browser using the official template on CodeSandbox.

- -

Fork the template and create your own app without leaving the browser.

+

You can try {{ site.name }} directly in your browser with the example app below.

diff --git a/packages/react-native-web-docs/src/pages/docs/apis/app-state.md b/packages/react-native-web-docs/src/pages/docs/apis/app-state.md index 9f5289df14..5609863afb 100644 --- a/packages/react-native-web-docs/src/pages/docs/apis/app-state.md +++ b/packages/react-native-web-docs/src/pages/docs/apis/app-state.md @@ -43,4 +43,4 @@ Add a listener to `AppState` changes. Listen to the `"change"` event type. The h ## Examples -{{ macro.codesandbox('app-state') }} +{{ macro.example('app-state') }} diff --git a/packages/react-native-web-docs/src/pages/docs/apis/clipboard.md b/packages/react-native-web-docs/src/pages/docs/apis/clipboard.md index e0551aade3..8148922e19 100644 --- a/packages/react-native-web-docs/src/pages/docs/apis/clipboard.md +++ b/packages/react-native-web-docs/src/pages/docs/apis/clipboard.md @@ -39,4 +39,4 @@ Not properly supported on Web. Returns a Promise of an empty string. ## Examples -{{ macro.codesandbox('clipboard') }} +{{ macro.example('clipboard') }} diff --git a/packages/react-native-web-docs/src/pages/docs/apis/dimensions.md b/packages/react-native-web-docs/src/pages/docs/apis/dimensions.md index f9995a3e4b..27b2ae73fd 100644 --- a/packages/react-native-web-docs/src/pages/docs/apis/dimensions.md +++ b/packages/react-native-web-docs/src/pages/docs/apis/dimensions.md @@ -55,4 +55,4 @@ The width of the dimension. ## Examples -{{ macro.codesandbox('dimensions') }} +{{ macro.example('dimensions') }} diff --git a/packages/react-native-web-docs/src/pages/docs/apis/linking.md b/packages/react-native-web-docs/src/pages/docs/apis/linking.md index 5437074230..1758ff8468 100644 --- a/packages/react-native-web-docs/src/pages/docs/apis/linking.md +++ b/packages/react-native-web-docs/src/pages/docs/apis/linking.md @@ -39,4 +39,4 @@ Try to open the given url in a secure fashion. The provided target (including `u ## Examples -{{ macro.codesandbox('linking') }} +{{ macro.example('linking') }} diff --git a/packages/react-native-web-docs/src/pages/docs/apis/pan-responder.md b/packages/react-native-web-docs/src/pages/docs/apis/pan-responder.md index bf35fde193..2178c688f2 100644 --- a/packages/react-native-web-docs/src/pages/docs/apis/pan-responder.md +++ b/packages/react-native-web-docs/src/pages/docs/apis/pan-responder.md @@ -25,4 +25,4 @@ Please refer to the React Native documentation below: ## Examples -{{ macro.codesandbox('pan-responder') }} +{{ macro.example('pan-responder') }} diff --git a/packages/react-native-web-docs/src/pages/docs/apis/style-sheet.md b/packages/react-native-web-docs/src/pages/docs/apis/style-sheet.md index 3b15ed7191..aada0065e0 100644 --- a/packages/react-native-web-docs/src/pages/docs/apis/style-sheet.md +++ b/packages/react-native-web-docs/src/pages/docs/apis/style-sheet.md @@ -33,10 +33,6 @@ import { StyleSheet } from 'react-native'; A very common pattern is to create overlays with position absolute and zero positioning, so `absoluteFill` can be used for convenience and to reduce duplication of these repeated styles. {% endcall %} -{% call macro.prop('absoluteFillObject', '?Object') %} -Sometimes you may want `absoluteFill` but with a couple tweaks - `absoluteFillObject` can be used to create a customized entry in a StyleSheet. -{% endcall %} - {% call macro.prop('hairlineWidth', '?Object') %} Equal to 1px. This is not implemented using screen density as browsers may round sub-pixel values down to `0`, causing the line not to be rendered. {% endcall %} diff --git a/packages/react-native-web-docs/src/pages/docs/components/activity-indicator.md b/packages/react-native-web-docs/src/pages/docs/components/activity-indicator.md index 6e3722f3a0..653a19898f 100644 --- a/packages/react-native-web-docs/src/pages/docs/components/activity-indicator.md +++ b/packages/react-native-web-docs/src/pages/docs/components/activity-indicator.md @@ -49,4 +49,4 @@ Default `"small"`. Set the size of the activity indicator. ## Examples -{{ macro.codesandbox('activity-indicator') }} +{{ macro.example('activity-indicator') }} diff --git a/packages/react-native-web-docs/src/pages/docs/components/checkbox.md b/packages/react-native-web-docs/src/pages/docs/components/checkbox.md deleted file mode 100644 index 2e857364b4..0000000000 --- a/packages/react-native-web-docs/src/pages/docs/components/checkbox.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: CheckBox -date: Last Modified -permalink: /docs/checkbox/index.html -eleventyNavigation: - key: CheckBox - parent: Components ---- - -{% import "fragments/macros.html" as macro with context %} - -:::lead -An accessible checkbox component with customizable appearance. -::: - -`CheckBox` is a controlled component. The `onValueChange` callback should be used to update the `value` prop to reflect user actions. If the `value` prop is not updated, the component will continue to render the supplied `value` prop instead of the expected result of any user actions. - -```jsx -import { CheckBox } from 'react-native-web'; - -; -``` - ---- - -## API - -### Props - -{% call macro.prop('...ViewProps', '?ViewProps') %} -All the props supported by [View]({{ '/docs/view' | url }}). -{% endcall %} - -{% call macro.prop('color', '?string = "#AAB8C2"') %} -Set the background color of the checkbox. -{% endcall %} - -{% call macro.prop('disabled', '?boolean') %} -Prevent all interactions with the checkbox. -{% endcall %} - -{% call macro.prop('onChange', '?(e: ChangeEvent) => void') %} -Called when the state of the native checkbox changes. -{% endcall %} - -{% call macro.prop('onValueChange', '?(value: boolean | "mixed") => void') %} -Called when the state of the native checkbox changes. -{% endcall %} - -{% call macro.prop('value', '?(boolean | "mixed") = false') %} -Set the value of the checkbox. -{% endcall %} - ---- - -## Examples - -Note that the size of the checkbox can be controlled by changing the `height` and `width` style properties. - -{{ macro.codesandbox('checkbox') }} diff --git a/packages/react-native-web-docs/src/pages/docs/components/image-background.md b/packages/react-native-web-docs/src/pages/docs/components/image-background.md index ea1146b55a..16369d0444 100644 --- a/packages/react-native-web-docs/src/pages/docs/components/image-background.md +++ b/packages/react-native-web-docs/src/pages/docs/components/image-background.md @@ -39,4 +39,4 @@ Styles to forward to the image component. ## Examples -{{ macro.codesandbox('image-background') }} +{{ macro.example('image-background') }} diff --git a/packages/react-native-web-docs/src/pages/docs/components/image.md b/packages/react-native-web-docs/src/pages/docs/components/image.md index 7c4137163c..9ad5ec7736 100644 --- a/packages/react-native-web-docs/src/pages/docs/components/image.md +++ b/packages/react-native-web-docs/src/pages/docs/components/image.md @@ -101,4 +101,4 @@ Performs cache interrogation. Returns a mapping from URL to cache status: "disk" ## Examples -{{ macro.codesandbox('image') }} +{{ macro.example('image') }} diff --git a/packages/react-native-web-docs/src/pages/docs/components/lists.md b/packages/react-native-web-docs/src/pages/docs/components/lists.md index 267f3d950f..a4849751b5 100644 --- a/packages/react-native-web-docs/src/pages/docs/components/lists.md +++ b/packages/react-native-web-docs/src/pages/docs/components/lists.md @@ -27,4 +27,4 @@ These components are the same JavaScript implementations as those found in React ## Examples -{{ macro.codesandbox('lists') }} +{{ macro.example('lists') }} diff --git a/packages/react-native-web-docs/src/pages/docs/components/modal.md b/packages/react-native-web-docs/src/pages/docs/components/modal.md index 34725956e9..b6ab31a15f 100644 --- a/packages/react-native-web-docs/src/pages/docs/components/modal.md +++ b/packages/react-native-web-docs/src/pages/docs/components/modal.md @@ -57,4 +57,4 @@ Determines if the modal and its content is rendered. ## Examples -{{ macro.codesandbox('modal') }} +{{ macro.example('modal') }} diff --git a/packages/react-native-web-docs/src/pages/docs/components/picker.md b/packages/react-native-web-docs/src/pages/docs/components/picker.md deleted file mode 100644 index 26cbbc74d1..0000000000 --- a/packages/react-native-web-docs/src/pages/docs/components/picker.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: Picker -date: Last Modified -permalink: /docs/picker/index.html -eleventyNavigation: - key: Picker - parent: Components ---- - -{% import "fragments/macros.html" as macro with context %} - -:::lead -Renders the native ` -
-`; - -exports[`CheckBox prop "accessibilityReadOnly" value is set 1`] = ` -
-
- -
-`; - -exports[`CheckBox prop "color" value is set 1`] = ` -
-
- -
-`; - -exports[`CheckBox prop "dataSet" value is set 1`] = ` -
-
- -
-`; - -exports[`CheckBox prop "nativeID" value is set 1`] = ` -
-
- -
-`; - -exports[`CheckBox prop "style" value is set 1`] = ` -
-
- -
-`; - -exports[`CheckBox prop "testID" value is set 1`] = ` -
-
- -
-`; diff --git a/packages/react-native-web/src/exports/CheckBox/__tests__/index-test.js b/packages/react-native-web/src/exports/CheckBox/__tests__/index-test.js deleted file mode 100644 index ddd8101ad4..0000000000 --- a/packages/react-native-web/src/exports/CheckBox/__tests__/index-test.js +++ /dev/null @@ -1,168 +0,0 @@ -/** - * Copyright (c) Nicolas Gallagher. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import CheckBox from '../'; -import React from 'react'; -import { createEventTarget } from 'dom-event-testing-library'; -import { act, render } from '@testing-library/react'; - -function findCheckbox(container) { - return container.firstChild.querySelector('input'); -} - -describe('CheckBox', () => { - describe('prop "accessibilityLabel"', () => { - test('value is set', () => { - const { container } = render( - - ); - expect(container.firstChild).toMatchSnapshot(); - }); - }); - - describe('prop "accessibilityReadOnly"', () => { - test('value is set', () => { - const { container } = render(); - expect(container.firstChild).toMatchSnapshot(); - }); - }); - - describe('prop "color"', () => { - test('value is set', () => { - const { container } = render(); - expect(container.firstChild).toMatchSnapshot(); - }); - }); - - describe('prop "dataSet"', () => { - test('value is set', () => { - const { container } = render( - - ); - expect(container.firstChild).toMatchSnapshot(); - }); - }); - - describe('prop "disabled"', () => { - test('when "false" a default checkbox is rendered', () => { - const { container } = render(); - expect(findCheckbox(container).disabled).toBe(false); - }); - - test('when "true" a disabled checkbox is rendered', () => { - const { container } = render(); - expect(findCheckbox(container).disabled).toBe(true); - }); - }); - - describe('prop "nativeID"', () => { - test('value is set', () => { - const { container } = render(); - expect(container.firstChild).toMatchSnapshot(); - }); - }); - - describe('prop "onBlur"', () => { - test('is called', () => { - const onBlur = jest.fn(); - const ref = React.createRef(); - act(() => { - render(); - }); - const target = createEventTarget(ref.current); - const body = createEventTarget(document.body); - act(() => { - target.focus(); - body.focus({ relatedTarget: target.node }); - }); - expect(onBlur).toHaveBeenCalled(); - }); - }); - - describe('prop "onChange"', () => { - test('is called with the event object', () => { - const onChange = jest.fn(); - const { container } = render( - - ); - const checkbox = findCheckbox(container); - checkbox.click(); // Needed to get ReactDOM to trigger 'change' event - expect(onChange).toHaveBeenCalled(); - }); - }); - - describe('prop "onFocus"', () => { - test('is called', () => { - const onFocus = jest.fn(); - const ref = React.createRef(); - act(() => { - render(); - }); - const target = createEventTarget(ref.current); - act(() => { - target.focus(); - }); - expect(onFocus).toHaveBeenCalled(); - }); - }); - - describe('prop "onValueChange"', () => { - test('when value is "false" it receives "true"', () => { - const onValueChange = jest.fn(); - const { container } = render( - - ); - const checkbox = findCheckbox(container); - checkbox.click(); // Needed to get ReactDOM to trigger 'change' event - expect(onValueChange).toHaveBeenCalledWith(true); - }); - - test('when value is "true" it receives "false"', () => { - const onValueChange = jest.fn(); - const { container } = render( - - ); - const checkbox = findCheckbox(container); - checkbox.click(); // Needed to get ReactDOM to trigger 'change' event - expect(onValueChange).toHaveBeenCalledWith(false); - }); - }); - - describe('prop "ref"', () => { - test('value is set', () => { - const ref = jest.fn(); - render(); - expect(ref).toHaveBeenCalled(); - }); - }); - - describe('prop "style"', () => { - test('value is set', () => { - const { container } = render(); - expect(container.firstChild).toMatchSnapshot(); - }); - }); - - describe('prop "testID"', () => { - test('value is set', () => { - const { container } = render(); - expect(container.firstChild).toMatchSnapshot(); - }); - }); - - describe('prop "value"', () => { - test('when "false" an unchecked checkbox is rendered', () => { - const { container } = render(); - expect(findCheckbox(container).checked).toBe(false); - }); - - test('when "true" a checked checkbox is rendered', () => { - const { container } = render(); - expect(findCheckbox(container).checked).toBe(true); - }); - }); -}); diff --git a/packages/react-native-web/src/exports/CheckBox/index.js b/packages/react-native-web/src/exports/CheckBox/index.js deleted file mode 100644 index 144eb90c3b..0000000000 --- a/packages/react-native-web/src/exports/CheckBox/index.js +++ /dev/null @@ -1,143 +0,0 @@ -/** - * Copyright (c) Nicolas Gallagher. - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -'use client'; - -import type { ColorValue } from '../../types'; -import type { ViewProps } from '../View'; - -import * as React from 'react'; -import createElement from '../createElement'; -import StyleSheet from '../StyleSheet'; -import View from '../View'; - -type CheckBoxProps = { - ...ViewProps, - color?: ?ColorValue, - disabled?: boolean, - onChange?: ?(e: any) => void, - onValueChange?: ?(e: any) => void, - readOnly?: boolean, - value?: boolean -}; - -const CheckBox: React.AbstractComponent< - CheckBoxProps, - React.ElementRef -> = React.forwardRef((props, forwardedRef) => { - const { - 'aria-readonly': ariaReadOnly, - color, - disabled, - onChange, - onValueChange, - readOnly, - style, - value, - ...other - } = props; - - function handleChange(event: Object) { - const value = event.nativeEvent.target.checked; - event.nativeEvent.value = value; - onChange && onChange(event); - onValueChange && onValueChange(value); - } - - const fakeControl = ( - - ); - - const nativeControl = createElement('input', { - checked: value, - disabled: disabled, - onChange: handleChange, - readOnly: - readOnly === true || - ariaReadOnly === true || - other.accessibilityReadOnly === true, - ref: forwardedRef, - style: [styles.nativeControl, styles.cursorInherit], - type: 'checkbox' - }); - - return ( - - {fakeControl} - {nativeControl} - - ); -}); - -CheckBox.displayName = 'CheckBox'; - -const styles = StyleSheet.create({ - root: { - cursor: 'pointer', - height: 16, - userSelect: 'none', - width: 16 - }, - cursorDefault: { - cursor: 'default' - }, - cursorInherit: { - cursor: 'inherit' - }, - fakeControl: { - alignItems: 'center', - backgroundColor: '#fff', - borderColor: '#657786', - borderRadius: 2, - borderStyle: 'solid', - borderWidth: 2, - height: '100%', - justifyContent: 'center', - width: '100%' - }, - fakeControlChecked: { - backgroundColor: '#009688', - backgroundImage: - 'url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmVyc2lvbj0iMS4xIgogICB2aWV3Qm94PSIwIDAgMSAxIgogICBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWluWU1pbiBtZWV0Ij4KICA8cGF0aAogICAgIGQ9Ik0gMC4wNDAzODA1OSwwLjYyNjc3NjcgMC4xNDY0NDY2MSwwLjUyMDcxMDY4IDAuNDI5Mjg5MzIsMC44MDM1NTMzOSAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IE0gMC4yMTcxNTcyOSwwLjgwMzU1MzM5IDAuODUzNTUzMzksMC4xNjcxNTcyOSAwLjk1OTYxOTQxLDAuMjczMjIzMyAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IgogICAgIGlkPSJyZWN0Mzc4MCIKICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L3N2Zz4K")', - backgroundRepeat: 'no-repeat', - borderColor: '#009688' - }, - fakeControlDisabled: { - borderColor: '#CCD6DD' - }, - fakeControlCheckedAndDisabled: { - backgroundColor: '#AAB8C2', - borderColor: '#AAB8C2' - }, - nativeControl: { - ...StyleSheet.absoluteFillObject, - height: '100%', - margin: 0, - appearance: 'none', - padding: 0, - width: '100%' - } -}); - -export default CheckBox; diff --git a/packages/react-native-web/src/exports/Clipboard/index.js b/packages/react-native-web/src/exports/Clipboard/index.js index 6ce3a988cd..7ec01f34b4 100644 --- a/packages/react-native-web/src/exports/Clipboard/index.js +++ b/packages/react-native-web/src/exports/Clipboard/index.js @@ -42,10 +42,10 @@ export default class Clipboard { // select the text const selection = window.getSelection(); - selection.removeAllRanges(); + selection?.removeAllRanges(); const range = document.createRange(); range.selectNodeContents(node); - selection.addRange(range); + selection?.addRange(range); // attempt to copy try { @@ -54,7 +54,7 @@ export default class Clipboard { } catch (e) {} // remove selection and node - selection.removeAllRanges(); + selection?.removeAllRanges(); body.removeChild(node); } diff --git a/packages/react-native-web/src/exports/Dimensions/index.js b/packages/react-native-web/src/exports/Dimensions/index.js index 45c9e519ee..00e57b7622 100644 --- a/packages/react-native-web/src/exports/Dimensions/index.js +++ b/packages/react-native-web/src/exports/Dimensions/index.js @@ -44,7 +44,7 @@ const dimensions = { width: 0 } }; -const listeners = {}; +const listeners: { [string]: Array<(DimensionsValue) => void> } = {}; let shouldInit = canUseDOM; diff --git a/packages/react-native-web/src/exports/Image/__tests__/index-test.js b/packages/react-native-web/src/exports/Image/__tests__/index-test.js index 597d9c27c2..c6c62f55e7 100644 --- a/packages/react-native-web/src/exports/Image/__tests__/index-test.js +++ b/packages/react-native-web/src/exports/Image/__tests__/index-test.js @@ -7,7 +7,7 @@ /* eslint-disable react/jsx-no-bind */ -import * as AssetRegistry from '../../../modules/AssetRegistry'; +import { registerAsset } from '../../../modules/AssetRegistry'; import Image from '../'; import ImageLoader, { ImageUriCache } from '../../../modules/ImageLoader'; import PixelRatio from '../../PixelRatio'; @@ -153,7 +153,7 @@ describe('components/Image', () => { onLoad={onLoadStub} onLoadEnd={onLoadEndStub} onLoadStart={onLoadStartStub} - source={'https://test.com/img.jpg'} + source="https://test.com/img.jpg" /> ); act(() => { @@ -162,7 +162,7 @@ describe('components/Image', () => { onLoad={onLoadStub} onLoadEnd={onLoadEndStub} onLoadStart={onLoadStartStub} - source={'https://blah.com/img.png'} + source="https://blah.com/img.png" /> ); }); @@ -179,7 +179,7 @@ describe('components/Image', () => { onLoad={onLoadStub} onLoadEnd={onLoadEndStub} onLoadStart={onLoadStartStub} - source={'https://test.com/img.jpg'} + source="https://test.com/img.jpg" /> ); act(() => { @@ -188,7 +188,7 @@ describe('components/Image', () => { onLoad={onLoadStub} onLoadEnd={onLoadEndStub} onLoadStart={onLoadStartStub} - source={'https://test.com/img.jpg'} + source="https://test.com/img.jpg" /> ); }); @@ -321,22 +321,22 @@ describe('components/Image', () => { }); test('it correctly selects the source scale', () => { - AssetRegistry.getAssetByID = jest.fn(() => ({ + const assetId = registerAsset({ httpServerLocation: 'static', name: 'img', scales: [1, 2, 3], type: 'png' - })); + }); PixelRatio.get = jest.fn(() => 1.0); - let { container } = render(); + let { container } = render(); expect(container.querySelector('img').src).toBe( 'http://localhost/static/img.png' ); act(() => { PixelRatio.get = jest.fn(() => 2.2); - ({ container } = render()); + ({ container } = render()); }); expect(container.querySelector('img').src).toBe( 'http://localhost/static/img@2x.png' @@ -378,7 +378,7 @@ describe('components/Image', () => { test('convert to filter', () => { const defaultSource = { uri: 'https://google.com/favicon.ico' }; const { container } = render( - + ); expect(container.firstChild).toMatchSnapshot(); }); @@ -418,12 +418,10 @@ describe('components/Image', () => { onLoadStart: jest.fn() }; const { rerender } = render( - + ); act(() => { - rerender( - - ); + rerender(); }); expect(ImageLoader.load.mock.calls.length).toBe(1); expect(ImageLoader.abort).not.toHaveBeenCalled(); @@ -451,12 +449,10 @@ describe('components/Image', () => { onLoadStart: jest.fn() }; const { rerender } = render( - + ); act(() => { - rerender( - - ); + rerender(); }); act(() => { resolveLoad(); diff --git a/packages/react-native-web/src/exports/Image/index.js b/packages/react-native-web/src/exports/Image/index.js index 4c7b91ccff..a648e582aa 100644 --- a/packages/react-native-web/src/exports/Image/index.js +++ b/packages/react-native-web/src/exports/Image/index.js @@ -10,7 +10,8 @@ 'use client'; -import type { ImageProps } from './types'; +import type { ImageProps, ResizeMode, Source } from './types'; +import type { ColorValue, LayoutEvent } from '../../types'; import * as React from 'react'; import createElement from '../createElement'; @@ -33,7 +34,7 @@ const IDLE = 'IDLE'; let _filterId = 0; const svgDataUriPattern = /^(data:image\/svg\+xml;utf8,)(.*)/; -function createTintColorSVG(tintColor, id) { +function createTintColorSVG(tintColor: ?ColorValue, id: ?number): React.Node { return tintColor && id != null ? ( void, - failure: () => void - ) => void; - prefetch: (uri: string) => Promise; - queryCache: ( - uris: Array - ) => Promise<{| [uri: string]: 'disk/memory' |}>; -} - -const Image: React.AbstractComponent< - ImageProps, - React.ElementRef -> = React.forwardRef((props, ref) => { +const Image = (props: { + ...ImageProps, + ref?: React.Ref> +}): React.Node => { const { 'aria-label': _ariaLabel, accessibilityLabel, @@ -175,8 +166,11 @@ const Image: React.AbstractComponent< onLoadEnd, onLoadStart, pointerEvents, + ref, + resizeMode: resizeModeProp, source, style, + tintColor: tintColorProp, ...rest } = props; const ariaLabel = _ariaLabel || accessibilityLabel; @@ -200,21 +194,25 @@ const Image: React.AbstractComponent< return IDLE; }); - const [layout, updateLayout] = React.useState({}); + const [layout, updateLayout] = React.useState<{ + readonly height?: number, + readonly width?: number, + ... + }>({}); const hasTextAncestor = React.useContext(TextAncestorContext); const hiddenImageRef = React.useRef(null); const filterRef = React.useRef(_filterId++); - const requestRef = React.useRef(null); + const requestRef = React.useRef(null); const shouldDisplaySource = state === LOADED || (state === LOADING && defaultSource == null); const [_resizeMode, filter, _tintColor] = extractNonStandardStyleProps( style, blurRadius, filterRef.current, - props.tintColor + tintColorProp ); - const resizeMode = props.resizeMode || _resizeMode || 'cover'; - const tintColor = props.tintColor || _tintColor; + const resizeMode = resizeModeProp || _resizeMode || 'cover'; + const tintColor = tintColorProp || _tintColor; const selectedSource = shouldDisplaySource ? source : defaultSource; const displayImageUri = resolveAssetUri(selectedSource); const imageSizeStyle = resolveAssetDimensions(selectedSource); @@ -252,7 +250,7 @@ const Image: React.AbstractComponent< } } - function handleLayout(e) { + function handleLayout(e: LayoutEvent) { if (resizeMode === 'center' || resizeMode === 'repeat' || onLayout) { const { layout } = e.nativeEvent; onLayout && onLayout(e); @@ -325,12 +323,14 @@ const Image: React.AbstractComponent< }, [uri, requestRef, updateState]); return ( + // $FlowFixMe[incompatible-type] Unsupported props are dropped by View ); -}); +}; Image.displayName = 'Image'; -// $FlowIgnore: This is the correct type, but casting makes it unhappy since the variables aren't defined yet -const ImageWithStatics = (Image: React.AbstractComponent< - ImageProps, - React.ElementRef -> & - ImageStatics); - -ImageWithStatics.getSize = function (uri, success, failure) { +Image.getSize = function ( + uri: string, + success: (width: number, height: number) => void, + failure: () => void +) { ImageLoader.getSize(uri, success, failure); }; -ImageWithStatics.prefetch = function (uri) { +Image.prefetch = function (uri: string): Promise { return ImageLoader.prefetch(uri); }; -ImageWithStatics.queryCache = function (uris) { +Image.queryCache = function ( + uris: Array +): Promise<{| [uri: string]: 'disk/memory' |}> { return ImageLoader.queryCache(uris); }; @@ -401,7 +400,7 @@ const styles = StyleSheet.create({ resizeMode: null }, image: { - ...StyleSheet.absoluteFillObject, + ...StyleSheet.absoluteFill, backgroundColor: 'transparent', backgroundPosition: 'center', backgroundRepeat: 'no-repeat', @@ -411,7 +410,7 @@ const styles = StyleSheet.create({ zIndex: -1 }, accessibilityImage$raw: { - ...StyleSheet.absoluteFillObject, + ...StyleSheet.absoluteFill, height: '100%', opacity: 0, width: '100%', @@ -443,4 +442,4 @@ const resizeModeStyles = StyleSheet.create({ } }); -export default ImageWithStatics; +export default Image; diff --git a/packages/react-native-web/src/exports/ImageBackground/index.js b/packages/react-native-web/src/exports/ImageBackground/index.js index 561dd33d18..e37c70df89 100644 --- a/packages/react-native-web/src/exports/ImageBackground/index.js +++ b/packages/react-native-web/src/exports/ImageBackground/index.js @@ -11,7 +11,6 @@ import type { ImageProps } from '../Image'; import type { ViewProps } from '../View'; import * as React from 'react'; -import { forwardRef } from 'react'; import Image from '../Image'; import StyleSheet from '../StyleSheet'; import View from '../View'; @@ -19,8 +18,9 @@ import View from '../View'; type ImageBackgroundProps = { ...ImageProps, imageRef?: any, - imageStyle?: $PropertyType, - style?: $PropertyType + imageStyle?: ImageProps['style'], + ref?: React.Ref>, + style?: ViewProps['style'] }; const emptyObject = {}; @@ -28,21 +28,19 @@ const emptyObject = {}; /** * Very simple drop-in replacement for which supports nesting views. */ -const ImageBackground: React.AbstractComponent< - ImageBackgroundProps, - React.ElementRef -> = forwardRef((props, forwardedRef) => { +const ImageBackground = (props: ImageBackgroundProps): React.Node => { const { children, style = emptyObject, imageStyle, imageRef, + ref, ...rest } = props; const { height, width } = StyleSheet.flatten(style); return ( - + ); -}); +}; ImageBackground.displayName = 'ImageBackground'; diff --git a/packages/react-native-web/src/exports/InteractionManager/TaskQueue.js b/packages/react-native-web/src/exports/InteractionManager/TaskQueue.js deleted file mode 100644 index 7381d52af6..0000000000 --- a/packages/react-native-web/src/exports/InteractionManager/TaskQueue.js +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Copyright (c) Nicolas Gallagher. - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -import invariant from 'fbjs/lib/invariant'; - -type SimpleTask = {| - name: string, - run: () => void -|}; -type PromiseTask = {| - name: string, - gen: () => Promise -|}; -export type Task = SimpleTask | PromiseTask | (() => void); - -class TaskQueue { - constructor({ onMoreTasks }: { onMoreTasks: () => void, ... }) { - this._onMoreTasks = onMoreTasks; - this._queueStack = [{ tasks: [], popable: true }]; - } - - enqueue(task: Task): void { - this._getCurrentQueue().push(task); - } - - enqueueTasks(tasks: Array): void { - tasks.forEach((task) => this.enqueue(task)); - } - - cancelTasks(tasksToCancel: Array): void { - this._queueStack = this._queueStack - .map((queue) => ({ - ...queue, - tasks: queue.tasks.filter((task) => tasksToCancel.indexOf(task) === -1) - })) - .filter((queue, idx) => queue.tasks.length > 0 || idx === 0); - } - - hasTasksToProcess(): boolean { - return this._getCurrentQueue().length > 0; - } - - /** - * Executes the next task in the queue. - */ - processNext(): void { - const queue = this._getCurrentQueue(); - if (queue.length) { - const task = queue.shift(); - try { - if (typeof task === 'object' && task.gen) { - this._genPromise(task); - } else if (typeof task === 'object' && task.run) { - task.run(); - } else { - invariant( - typeof task === 'function', - 'Expected Function, SimpleTask, or PromiseTask, but got:\n' + - JSON.stringify(task, null, 2) - ); - task(); - } - } catch (e) { - e.message = - 'TaskQueue: Error with task ' + (task.name || '') + ': ' + e.message; - throw e; - } - } - } - - _queueStack: Array<{ - tasks: Array, - popable: boolean, - ... - }>; - _onMoreTasks: () => void; - - _getCurrentQueue(): Array { - const stackIdx = this._queueStack.length - 1; - const queue = this._queueStack[stackIdx]; - if (queue.popable && queue.tasks.length === 0 && stackIdx > 0) { - this._queueStack.pop(); - return this._getCurrentQueue(); - } else { - return queue.tasks; - } - } - - _genPromise(task: PromiseTask) { - const length = this._queueStack.push({ tasks: [], popable: false }); - const stackIdx = length - 1; - const stackItem = this._queueStack[stackIdx]; - task - .gen() - .then(() => { - stackItem.popable = true; - this.hasTasksToProcess() && this._onMoreTasks(); - }) - .catch((ex) => { - setTimeout(() => { - ex.message = `TaskQueue: Error resolving Promise in task ${task.name}: ${ex.message}`; - throw ex; - }, 0); - }); - } -} - -export default TaskQueue; diff --git a/packages/react-native-web/src/exports/InteractionManager/__tests__/TaskQueue-test.js b/packages/react-native-web/src/exports/InteractionManager/__tests__/TaskQueue-test.js deleted file mode 100644 index 3251fef550..0000000000 --- a/packages/react-native-web/src/exports/InteractionManager/__tests__/TaskQueue-test.js +++ /dev/null @@ -1,185 +0,0 @@ -/** - * Copyright (c) Nicolas Gallagher. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -function expectToHaveBeenCalledOnce(fn) { - expect(fn.mock.calls.length).toBe(1); -} - -function clearTaskQueue(taskQueue) { - do { - jest.runAllTimers(); - taskQueue.processNext(); - jest.runAllTimers(); - } while (taskQueue.hasTasksToProcess()); -} - -describe('TaskQueue', () => { - let taskQueue; - let onMoreTasks; - let sequenceId; - - function createSequenceTask(expectedSequenceId) { - return jest.fn(() => { - expect(++sequenceId).toBe(expectedSequenceId); - }); - } - - beforeEach(() => { - jest.resetModules(); - onMoreTasks = jest.fn(); - const TaskQueue = require('../TaskQueue'); - taskQueue = new TaskQueue({ onMoreTasks }); - sequenceId = 0; - }); - - it('should run a basic task', () => { - const task1 = createSequenceTask(1); - taskQueue.enqueue({ run: task1, name: 'run1' }); - expect(taskQueue.hasTasksToProcess()).toBe(true); - taskQueue.processNext(); - expectToHaveBeenCalledOnce(task1); - }); - - it('should handle blocking promise task', () => { - onMoreTasks.mockImplementation(() => { - taskQueue.processNext(); - jest.runAllTimers(); - }); - - const task1 = jest.fn(() => { - return new Promise((resolve) => { - setTimeout(() => { - expect(++sequenceId).toBe(1); - resolve(); - }, 1); - }); - }); - const task2 = createSequenceTask(2); - taskQueue.enqueue({ gen: task1, name: 'gen1' }); - taskQueue.enqueue({ run: task2, name: 'run2' }); - - taskQueue.processNext(); - - expectToHaveBeenCalledOnce(task1); - expect(task2).not.toHaveBeenCalled(); - expect(onMoreTasks).not.toHaveBeenCalled(); - expect(taskQueue.hasTasksToProcess()).toBe(false); - - clearTaskQueue(taskQueue); - - return new Promise((resolve) => { - setTimeout(() => { - resolve(); - }); - }).then(() => { - expectToHaveBeenCalledOnce(onMoreTasks); - expectToHaveBeenCalledOnce(task2); - }); - }); - - it('should handle nested simple tasks', () => { - const task1 = jest.fn(() => { - expect(++sequenceId).toBe(1); - taskQueue.enqueue({ run: task3, name: 'run3' }); - }); - const task2 = createSequenceTask(2); - const task3 = createSequenceTask(3); - taskQueue.enqueue({ run: task1, name: 'run1' }); - taskQueue.enqueue({ run: task2, name: 'run2' }); // not blocked by task 1 - - clearTaskQueue(taskQueue); - - expectToHaveBeenCalledOnce(task1); - expectToHaveBeenCalledOnce(task2); - expectToHaveBeenCalledOnce(task3); - }); - - it('should handle nested promises', () => { - onMoreTasks.mockImplementation(() => { - taskQueue.processNext(); - jest.runAllTimers(); - }); - - const task1 = jest.fn(() => { - return new Promise((resolve) => { - setTimeout(() => { - expect(++sequenceId).toBe(1); - taskQueue.enqueue({ gen: task2, name: 'gen2' }); - taskQueue.enqueue({ run: resolve, name: 'resolve1' }); - }, 1); - }); - }); - const task2 = jest.fn(() => { - return new Promise((resolve) => { - setTimeout(() => { - expect(++sequenceId).toBe(2); - taskQueue.enqueue({ run: task3, name: 'run3' }); - taskQueue.enqueue({ run: resolve, name: 'resolve2' }); - }, 1); - }); - }); - const task3 = createSequenceTask(3); - const task4 = createSequenceTask(4); - taskQueue.enqueue({ gen: task1, name: 'gen1' }); - taskQueue.enqueue({ run: task4, name: 'run4' }); // blocked by task 1 promise - - clearTaskQueue(taskQueue); - - return new Promise((resolve) => { - setTimeout(() => { - resolve(); - }); - }).then(() => { - expectToHaveBeenCalledOnce(task1); - expectToHaveBeenCalledOnce(task2); - expectToHaveBeenCalledOnce(task3); - expectToHaveBeenCalledOnce(task4); - }); - }); - - it('should be able to cancel tasks', () => { - const task1 = jest.fn(); - const task2 = createSequenceTask(1); - const task3 = jest.fn(); - const task4 = createSequenceTask(2); - taskQueue.enqueue(task1); - taskQueue.enqueue(task2); - taskQueue.enqueue(task3); - taskQueue.enqueue(task4); - taskQueue.cancelTasks([task1, task3]); - clearTaskQueue(taskQueue); - expect(task1).not.toHaveBeenCalled(); - expect(task3).not.toHaveBeenCalled(); - expectToHaveBeenCalledOnce(task2); - expectToHaveBeenCalledOnce(task4); - expect(taskQueue.hasTasksToProcess()).toBe(false); - }); - - it('should not crash when last task is cancelled', () => { - const task1 = jest.fn(); - taskQueue.enqueue(task1); - taskQueue.cancelTasks([task1]); - clearTaskQueue(taskQueue); - expect(task1).not.toHaveBeenCalled(); - expect(taskQueue.hasTasksToProcess()).toBe(false); - }); - - it('should not crash when task is cancelled between being started and resolved', () => { - const task1 = jest.fn(() => { - return new Promise((resolve) => { - setTimeout(() => { - resolve(); - }, 1); - }); - }); - - taskQueue.enqueue({ gen: task1, name: 'gen1' }); - taskQueue.processNext(); - taskQueue.cancelTasks([task1]); - jest.runAllTimers(); - }); -}); diff --git a/packages/react-native-web/src/exports/InteractionManager/__tests__/index-test.js b/packages/react-native-web/src/exports/InteractionManager/__tests__/index-test.js deleted file mode 100644 index 570cfc1efd..0000000000 --- a/packages/react-native-web/src/exports/InteractionManager/__tests__/index-test.js +++ /dev/null @@ -1,323 +0,0 @@ -/** - * Copyright (c) Nicolas Gallagher. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -function expectToHaveBeenCalledOnce(fn) { - expect(fn.mock.calls.length).toBe(1); -} - -describe('InteractionManager', () => { - let InteractionManager; - let interactionStart; - let interactionComplete; - - beforeEach(() => { - jest.resetModules(); - InteractionManager = require('..'); - - interactionStart = jest.fn(); - interactionComplete = jest.fn(); - - InteractionManager.addListener( - InteractionManager.Events.interactionStart, - interactionStart - ); - - InteractionManager.addListener( - InteractionManager.Events.interactionComplete, - interactionComplete - ); - }); - - it('throws when clearing an undefined handle', () => { - expect(() => InteractionManager.clearInteractionHandle()).toThrow(); - }); - - it('notifies asynchronously when interaction starts', () => { - InteractionManager.createInteractionHandle(); - expect(interactionStart).not.toHaveBeenCalled(); - - jest.runAllTimers(); - expect(interactionStart).toHaveBeenCalled(); - expect(interactionComplete).not.toHaveBeenCalled(); - }); - - it('notifies asynchronously when interaction stops', () => { - const handle = InteractionManager.createInteractionHandle(); - jest.runAllTimers(); - interactionStart.mockClear(); - InteractionManager.clearInteractionHandle(handle); - expect(interactionComplete).not.toHaveBeenCalled(); - - jest.runAllTimers(); - expect(interactionStart).not.toHaveBeenCalled(); - expect(interactionComplete).toHaveBeenCalled(); - }); - - it('does not notify when started & stoped in same event loop', () => { - const handle = InteractionManager.createInteractionHandle(); - InteractionManager.clearInteractionHandle(handle); - - jest.runAllTimers(); - expect(interactionStart).not.toHaveBeenCalled(); - expect(interactionComplete).not.toHaveBeenCalled(); - }); - - it('does not notify when going from two -> one active interactions', () => { - InteractionManager.createInteractionHandle(); - const handle = InteractionManager.createInteractionHandle(); - jest.runAllTimers(); - - interactionStart.mockClear(); - interactionComplete.mockClear(); - - InteractionManager.clearInteractionHandle(handle); - jest.runAllTimers(); - expect(interactionStart).not.toHaveBeenCalled(); - expect(interactionComplete).not.toHaveBeenCalled(); - }); - - it('run tasks asynchronously when there are interactions', () => { - const task = jest.fn(); - InteractionManager.runAfterInteractions(task); - expect(task).not.toHaveBeenCalled(); - - jest.runAllTimers(); - expect(task).toHaveBeenCalled(); - }); - - it('runs tasks when interactions complete', () => { - const task = jest.fn(); - const handle = InteractionManager.createInteractionHandle(); - InteractionManager.runAfterInteractions(task); - - jest.runAllTimers(); - InteractionManager.clearInteractionHandle(handle); - expect(task).not.toHaveBeenCalled(); - - jest.runAllTimers(); - expect(task).toHaveBeenCalled(); - }); - - it('does not run tasks twice', () => { - const task1 = jest.fn(); - const task2 = jest.fn(); - InteractionManager.runAfterInteractions(task1); - jest.runAllTimers(); - - InteractionManager.runAfterInteractions(task2); - jest.runAllTimers(); - - expectToHaveBeenCalledOnce(task1); - }); - - it('runs tasks added while processing previous tasks', () => { - const task1 = jest.fn(() => { - InteractionManager.runAfterInteractions(task2); - }); - const task2 = jest.fn(); - - InteractionManager.runAfterInteractions(task1); - expect(task2).not.toHaveBeenCalled(); - - jest.runAllTimers(); - - expect(task1).toHaveBeenCalled(); - expect(task2).toHaveBeenCalled(); - }); - - it('allows tasks to be cancelled', () => { - const task1 = jest.fn(); - const task2 = jest.fn(); - const promise1 = InteractionManager.runAfterInteractions(task1); - InteractionManager.runAfterInteractions(task2); - expect(task1).not.toHaveBeenCalled(); - expect(task2).not.toHaveBeenCalled(); - promise1.cancel(); - - jest.runAllTimers(); - expect(task1).not.toHaveBeenCalled(); - expect(task2).toHaveBeenCalled(); - }); - - it('should support promise variant', () => { - expect.assertions(1); - const task = jest.fn(); - const promise = InteractionManager.runAfterInteractions() - .done(task) - .then(() => { - expect(task).toHaveBeenCalled(); - }); - jest.runAllTimers(); - return promise; - }); -}); - -describe('promise tasks', () => { - let InteractionManager; - let sequenceId; - - function createSequenceTask(expectedSequenceId) { - return jest.fn(() => { - expect(++sequenceId).toBe(expectedSequenceId); - }); - } - - beforeEach(() => { - jest.resetModules(); - InteractionManager = require('..'); - sequenceId = 0; - }); - - it('should run a basic promise task', () => { - const task1 = jest.fn(() => { - expect(++sequenceId).toBe(1); - return new Promise((resolve) => resolve()); - }); - InteractionManager.runAfterInteractions({ gen: task1, name: 'gen1' }); - jest.runAllTimers(); - expectToHaveBeenCalledOnce(task1); - }); - - it('should handle nested promises', () => { - const task1 = jest.fn(() => { - expect(++sequenceId).toBe(1); - return new Promise((resolve) => { - InteractionManager.runAfterInteractions({ - gen: task2, - name: 'gen2' - }).then(resolve); - }); - }); - const task2 = jest.fn(() => { - expect(++sequenceId).toBe(2); - return new Promise((resolve) => resolve()); - }); - InteractionManager.runAfterInteractions({ gen: task1, name: 'gen1' }); - jest.runAllTimers(); - expectToHaveBeenCalledOnce(task1); - expectToHaveBeenCalledOnce(task2); - }); - - it('should pause promise tasks during interactions then resume', () => { - const task1 = createSequenceTask(1); - const task2 = jest.fn(() => { - expect(++sequenceId).toBe(2); - return new Promise((resolve) => { - setTimeout(() => { - InteractionManager.runAfterInteractions(task3).then(resolve); - }, 1); - }); - }); - const task3 = createSequenceTask(3); - InteractionManager.runAfterInteractions(task1); - InteractionManager.runAfterInteractions({ gen: task2, name: 'gen2' }); - jest.runOnlyPendingTimers(); - expectToHaveBeenCalledOnce(task1); - expectToHaveBeenCalledOnce(task2); - const handle = InteractionManager.createInteractionHandle(); - jest.runAllTimers(); - jest.runAllTimers(); // Just to be sure... - expect(task3).not.toHaveBeenCalled(); - InteractionManager.clearInteractionHandle(handle); - jest.runAllTimers(); - expectToHaveBeenCalledOnce(task3); - }); - - it('should execute tasks in loop within deadline', () => { - InteractionManager.setDeadline(100); - const task1 = createSequenceTask(1); - const task2 = createSequenceTask(2); - InteractionManager.runAfterInteractions(task1); - InteractionManager.runAfterInteractions(task2); - - jest.runOnlyPendingTimers(); - expectToHaveBeenCalledOnce(task1); - expectToHaveBeenCalledOnce(task2); - }); - - it('should execute tasks one at a time if deadline exceeded', () => { - InteractionManager.setDeadline(100); - const task1 = jest.fn(() => { - expect(++sequenceId).toBe(1); - jest.setSystemTime(Date.now() + 200); - }); - const task2 = createSequenceTask(2); - InteractionManager.runAfterInteractions(task1); - InteractionManager.runAfterInteractions(task2); - - jest.runOnlyPendingTimers(); - - expectToHaveBeenCalledOnce(task1); - expect(task2).not.toHaveBeenCalled(); - - jest.runOnlyPendingTimers(); - - expectToHaveBeenCalledOnce(task2); - }); - - const bigAsyncTest = (resolveTest) => { - const task1 = createSequenceTask(1); - const task2 = jest.fn(() => { - expect(++sequenceId).toBe(2); - return new Promise((resolve) => { - InteractionManager.runAfterInteractions(task3); - setTimeout(() => { - InteractionManager.runAfterInteractions({ - gen: task4, - name: 'gen4' - }) - .then(resolve) - .then(() => { - // Explicit exhaustion of the task queue is required - jest.runAllTimers(); - }); - }, 1); - }); - }); - const task3 = createSequenceTask(3); - const task4 = jest.fn(() => { - expect(++sequenceId).toBe(4); - return new Promise((resolve) => { - InteractionManager.runAfterInteractions(task5) - .then(resolve) - .then(() => { - // Explicit exhaustion of the task queue is required - jest.runAllTimers(); - }); - }); - }); - const task5 = createSequenceTask(5); - const task6 = createSequenceTask(6); - - InteractionManager.runAfterInteractions(task1); - InteractionManager.runAfterInteractions({ gen: task2, name: 'gen2' }); - InteractionManager.runAfterInteractions(task6).then(() => { - expectToHaveBeenCalledOnce(task1); - expectToHaveBeenCalledOnce(task2); - expectToHaveBeenCalledOnce(task3); - expectToHaveBeenCalledOnce(task4); - expectToHaveBeenCalledOnce(task5); - expectToHaveBeenCalledOnce(task6); - resolveTest(); - }); - - jest.runAllTimers(); - }; - - it('resolves async tasks recursively before other queued tasks', () => { - return new Promise(bigAsyncTest); - }); - - it('should also work with a deadline', () => { - InteractionManager.setDeadline(100); - const task = jest.fn(() => { - jest.setSystemTime(Date.now() + 200); - }); - InteractionManager.runAfterInteractions(task); - return new Promise(bigAsyncTest); - }); -}); diff --git a/packages/react-native-web/src/exports/InteractionManager/index.js b/packages/react-native-web/src/exports/InteractionManager/index.js deleted file mode 100644 index d6a522f3cf..0000000000 --- a/packages/react-native-web/src/exports/InteractionManager/index.js +++ /dev/null @@ -1,142 +0,0 @@ -/** - * Copyright (c) Nicolas Gallagher. - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -import invariant from 'fbjs/lib/invariant'; -import type { Task } from './TaskQueue'; -import TaskQueue from './TaskQueue'; -import type { EventSubscription } from '../../vendor/react-native/vendor/emitter/EventEmitter'; -import EventEmitter from '../../vendor/react-native/vendor/emitter/EventEmitter'; -import requestIdleCallback from '../../modules/requestIdleCallback'; - -const _emitter = new EventEmitter<{ - interactionComplete: [], - interactionStart: [] -}>(); - -const InteractionManager = { - Events: { - interactionStart: 'interactionStart', - interactionComplete: 'interactionComplete' - }, - - /** - * Schedule a function to run after all interactions have completed. - */ - runAfterInteractions(task: ?Task): { - then: Function, - done: Function, - cancel: Function - } { - const tasks: Array = []; - const promise = new Promise((resolve) => { - _scheduleUpdate(); - if (task) { - tasks.push(task); - } - tasks.push({ - run: resolve, - name: 'resolve ' + ((task && task.name) || '?') - }); - _taskQueue.enqueueTasks(tasks); - }); - return { - then: promise.then.bind(promise), - done: promise.then.bind(promise), - cancel: () => { - _taskQueue.cancelTasks(tasks); - } - }; - }, - - /** - * Notify manager that an interaction has started. - */ - createInteractionHandle(): number { - _scheduleUpdate(); - const handle = ++_inc; - _addInteractionSet.add(handle); - return handle; - }, - - /** - * Notify manager that an interaction has completed. - */ - clearInteractionHandle(handle: number) { - invariant(!!handle, 'Must provide a handle to clear.'); - _scheduleUpdate(); - _addInteractionSet.delete(handle); - _deleteInteractionSet.add(handle); - }, - - addListener: (_emitter.addListener.bind(_emitter): EventSubscription), - - /** - * - * @param deadline - */ - setDeadline(deadline: number) { - _deadline = deadline; - } -}; - -const _interactionSet = new Set(); -const _addInteractionSet = new Set(); -const _deleteInteractionSet = new Set(); -const _taskQueue = new TaskQueue({ onMoreTasks: _scheduleUpdate }); -let _nextUpdateHandle: TimeoutID | number = 0; -let _inc = 0; -let _deadline = -1; - -/** - * Schedule an asynchronous update to the interaction state. - */ -function _scheduleUpdate() { - if (!_nextUpdateHandle) { - if (_deadline > 0) { - _nextUpdateHandle = setTimeout(_processUpdate); - } else { - _nextUpdateHandle = requestIdleCallback(_processUpdate); - } - } -} - -/** - * Notify listeners, process queue, etc - */ -function _processUpdate() { - _nextUpdateHandle = 0; - const interactionCount = _interactionSet.size; - _addInteractionSet.forEach((handle) => _interactionSet.add(handle)); - _deleteInteractionSet.forEach((handle) => _interactionSet.delete(handle)); - const nextInteractionCount = _interactionSet.size; - - if (interactionCount !== 0 && nextInteractionCount === 0) { - _emitter.emit(InteractionManager.Events.interactionComplete); - } else if (interactionCount === 0 && nextInteractionCount !== 0) { - _emitter.emit(InteractionManager.Events.interactionStart); - } - - if (nextInteractionCount === 0) { - // It seems that we can't know the running time of the current event loop, - // we can only calculate the running time of the current task queue. - const begin = Date.now(); - while (_taskQueue.hasTasksToProcess()) { - _taskQueue.processNext(); - if (_deadline > 0 && Date.now() - begin >= _deadline) { - _scheduleUpdate(); - break; - } - } - } - _addInteractionSet.clear(); - _deleteInteractionSet.clear(); -} - -export default InteractionManager; diff --git a/packages/react-native-web/src/exports/KeyboardAvoidingView/index.js b/packages/react-native-web/src/exports/KeyboardAvoidingView/index.js index 5beae81b87..fad983d011 100644 --- a/packages/react-native-web/src/exports/KeyboardAvoidingView/index.js +++ b/packages/react-native-web/src/exports/KeyboardAvoidingView/index.js @@ -19,7 +19,7 @@ import View from '../View'; type KeyboardAvoidingViewProps = { ...ViewProps, behavior?: 'height' | 'padding' | 'position', - contentContainerStyle?: $PropertyType, + contentContainerStyle?: ViewProps['style'], keyboardVerticalOffset: number }; diff --git a/packages/react-native-web/src/exports/Linking/__tests__/index-test.js b/packages/react-native-web/src/exports/Linking/__tests__/index-test.js index afba3983c9..9b366a5f2d 100644 --- a/packages/react-native-web/src/exports/Linking/__tests__/index-test.js +++ b/packages/react-native-web/src/exports/Linking/__tests__/index-test.js @@ -1,5 +1,3 @@ -/* eslint-env jasmine, jest */ - import Linking from '..'; describe('apis/Linking', () => { diff --git a/packages/react-native-web/src/exports/Linking/index.js b/packages/react-native-web/src/exports/Linking/index.js index ec365eb3e6..122f310a30 100644 --- a/packages/react-native-web/src/exports/Linking/index.js +++ b/packages/react-native-web/src/exports/Linking/index.js @@ -110,9 +110,9 @@ class Linking { } } -const open = (url, target) => { +const open = (url: string, target?: string) => { if (canUseDOM) { - const urlToOpen = new URL(url, window.location).toString(); + const urlToOpen = new URL(url, window.location.href).toString(); if (urlToOpen.indexOf('tel:') === 0) { window.location = urlToOpen; } else { @@ -121,4 +121,4 @@ const open = (url, target) => { } }; -export default (new Linking(): Linking); +export default new Linking() as Linking; diff --git a/packages/react-native-web/src/exports/Modal/ModalAnimation.js b/packages/react-native-web/src/exports/Modal/ModalAnimation.js index 2f76a7b98a..b720f42914 100644 --- a/packages/react-native-web/src/exports/Modal/ModalAnimation.js +++ b/packages/react-native-web/src/exports/Modal/ModalAnimation.js @@ -14,7 +14,10 @@ import createElement from '../createElement'; const ANIMATION_DURATION = 250; -function getAnimationStyle(animationType, visible) { +function getAnimationStyle( + animationType: ?('none' | 'slide' | 'fade'), + visible: ?boolean +): Object { if (animationType === 'slide') { return visible ? animatedSlideInStyles : animatedSlideOutStyles; } @@ -36,7 +39,7 @@ function ModalAnimation(props: ModalAnimationProps): React.Node { const { animationType, children, onDismiss, onShow, visible } = props; const [isRendering, setIsRendering] = React.useState(false); - const wasVisible = React.useRef(false); + const wasVisible = React.useRef(false); const wasRendering = React.useRef(false); const isAnimated = animationType && animationType !== 'none'; diff --git a/packages/react-native-web/src/exports/Modal/ModalContent.js b/packages/react-native-web/src/exports/Modal/ModalContent.js index 0ce3ee493c..b49d540921 100644 --- a/packages/react-native-web/src/exports/Modal/ModalContent.js +++ b/packages/react-native-web/src/exports/Modal/ModalContent.js @@ -20,14 +20,12 @@ export type ModalContentProps = { active?: ?(boolean | (() => boolean)), children?: any, onRequestClose?: ?() => void, + ref?: React.Ref>, transparent?: ?boolean }; -const ModalContent: React.AbstractComponent< - ModalContentProps, - React.ElementRef -> = React.forwardRef((props, forwardedRef) => { - const { active, children, onRequestClose, transparent, ...rest } = props; +const ModalContent = (props: ModalContentProps): React.Node => { + const { active, children, onRequestClose, ref, transparent, ...rest } = props; React.useEffect(() => { if (canUseDOM) { @@ -55,14 +53,14 @@ const ModalContent: React.AbstractComponent< {children} ); -}); +}; const styles = StyleSheet.create({ modal: { diff --git a/packages/react-native-web/src/exports/Modal/ModalFocusTrap.js b/packages/react-native-web/src/exports/Modal/ModalFocusTrap.js index f596bf60d2..ba1c7ba067 100644 --- a/packages/react-native-web/src/exports/Modal/ModalFocusTrap.js +++ b/packages/react-native-web/src/exports/Modal/ModalFocusTrap.js @@ -45,7 +45,7 @@ function attemptFocus(element: any) { return document.activeElement === element; } -function focusFirstDescendant(element: any) { +function focusFirstDescendant(element: any): boolean { for (let i = 0; i < element.childNodes.length; i++) { const child = element.childNodes[i]; if (attemptFocus(child) || focusFirstDescendant(child)) { @@ -55,7 +55,7 @@ function focusFirstDescendant(element: any) { return false; } -function focusLastDescendant(element: any) { +function focusLastDescendant(element: any): boolean { for (let i = element.childNodes.length - 1; i >= 0; i--) { const child = element.childNodes[i]; if (attemptFocus(child) || focusLastDescendant(child)) { @@ -77,7 +77,7 @@ const ModalFocusTrap = ({ const trapElementRef = React.useRef(); const focusRef = React.useRef<{ trapFocusInProgress: boolean, - lastFocusedElement: ?HTMLElement + lastFocusedElement: ?Element }>({ trapFocusInProgress: false, lastFocusedElement: null diff --git a/packages/react-native-web/src/exports/Modal/ModalPortal.js b/packages/react-native-web/src/exports/Modal/ModalPortal.js index 380e58693a..14ed889984 100644 --- a/packages/react-native-web/src/exports/Modal/ModalPortal.js +++ b/packages/react-native-web/src/exports/Modal/ModalPortal.js @@ -18,7 +18,7 @@ export type ModalPortalProps = {| function ModalPortal(props: ModalPortalProps): React.Node { const { children } = props; - const elementRef = React.useRef(null); + const elementRef = React.useRef(null); if (canUseDOM && !elementRef.current) { const element = document.createElement('div'); diff --git a/packages/react-native-web/src/exports/Modal/__tests__/index-test.js b/packages/react-native-web/src/exports/Modal/__tests__/index-test.js index f053074880..41a2d01c00 100644 --- a/packages/react-native-web/src/exports/Modal/__tests__/index-test.js +++ b/packages/react-native-web/src/exports/Modal/__tests__/index-test.js @@ -13,7 +13,7 @@ describe('components/Modal', () => { test('visible by default', () => { const { getByTestId } = render( - + Hello @@ -37,7 +37,7 @@ describe('components/Modal', () => { test('render children when visible', () => { const { getByTestId } = render( - + Hello @@ -50,7 +50,7 @@ describe('components/Modal', () => { test('does not render children when not visible', () => { const { container } = render( - + Hello @@ -61,13 +61,13 @@ describe('components/Modal', () => { test('invisible modals will not be the active modal', () => { const { getByTestId } = render( <> - - + + Hello - - + + Hello @@ -82,13 +82,13 @@ describe('components/Modal', () => { test('multiple modals will only mark one as active', () => { const { getByTestId } = render( <> - - + + Hello - - + + Hello @@ -103,13 +103,13 @@ describe('components/Modal', () => { test('modal active state changes propogate', () => { const { rerender, getByTestId } = render( <> - - + + Hello - - + + Hello @@ -118,13 +118,13 @@ describe('components/Modal', () => { rerender( <> - - + + Hello - - + + Hello @@ -140,13 +140,13 @@ describe('components/Modal', () => { test('removed modal sets others active state', () => { const { rerender, getByTestId } = render( <> - - + + Hello - - + + Hello @@ -154,8 +154,8 @@ describe('components/Modal', () => { ); rerender( - - + + Hello @@ -213,7 +213,7 @@ describe('components/Modal', () => { test('animationTypes none is the same as omitting', () => { const { rerender, baseElement } = render( - + ); const animationNoneElement = baseElement.lastChild.lastChild; const animationNoneStyle = window.getComputedStyle( @@ -244,7 +244,7 @@ describe('components/Modal', () => { test('creates view with role="dialog" when active', () => { const { baseElement } = render( - Hello + Hello ); const dialogElement = @@ -257,11 +257,11 @@ describe('components/Modal', () => { test('focus is trapped by default', () => { render( <> - + Outside - + Hello @@ -277,11 +277,11 @@ describe('components/Modal', () => { test('focus is trapped when active flag changes', () => { const { rerender } = render( <> - + Outside - + Hello @@ -294,11 +294,11 @@ describe('components/Modal', () => { rerender( <> - + Outside - + Hello @@ -312,7 +312,7 @@ describe('components/Modal', () => { test('focus is not trapped after closing modal', () => { const { rerender } = render( <> - + Outside @@ -324,7 +324,7 @@ describe('components/Modal', () => { rerender( <> - + Outside @@ -338,15 +338,15 @@ describe('components/Modal', () => { test('focus is brought back to the element that triggered modal after closing', () => { const { rerender } = render( <> - + Outside - + Hello - + Outside @@ -360,15 +360,15 @@ describe('components/Modal', () => { rerender( <> - + Outside - + Hello - + Outside @@ -379,15 +379,15 @@ describe('components/Modal', () => { rerender( <> - + Outside - + Hello - + Outside @@ -399,15 +399,15 @@ describe('components/Modal', () => { test('focus is brought back to the body when element that triggered modal is removed from the DOM after closing modal', () => { const { rerender } = render( <> - + Outside - + Hello - + Outside @@ -421,15 +421,15 @@ describe('components/Modal', () => { rerender( <> - + Outside - + Hello - + Outside @@ -440,11 +440,11 @@ describe('components/Modal', () => { rerender( <> - + Outside - + Hello @@ -457,11 +457,11 @@ describe('components/Modal', () => { test('focus is trapped when active', () => { render( <> - + Outside - + Hello @@ -478,13 +478,13 @@ describe('components/Modal', () => { render( <> - + Inside A - + Inside B - + Inside C @@ -507,13 +507,13 @@ describe('components/Modal', () => { render( <> - + Inside A - + Inside B - + Inside C @@ -535,7 +535,7 @@ describe('components/Modal', () => { test('focus is trapped without contents', () => { render( <> - + Outside @@ -552,11 +552,11 @@ describe('components/Modal', () => { test('focus is not trapped when inactive', () => { render( <> - + Outside - + Hello @@ -570,7 +570,7 @@ describe('components/Modal', () => { test('creates portal outside of the react container', () => { const { container, baseElement } = render( - + Hello World @@ -585,7 +585,7 @@ describe('components/Modal', () => { test('portal created is a div', () => { const { baseElement } = render( - + Hello World @@ -644,11 +644,11 @@ describe('components/Modal', () => { const { getByTestId, rerender } = render( <> - - + + - - + + @@ -656,11 +656,11 @@ describe('components/Modal', () => { rerender( <> - - + + - - + + diff --git a/packages/react-native-web/src/exports/Modal/index.js b/packages/react-native-web/src/exports/Modal/index.js index 89fffbc750..24400ef087 100644 --- a/packages/react-native-web/src/exports/Modal/index.js +++ b/packages/react-native-web/src/exports/Modal/index.js @@ -11,6 +11,7 @@ 'use client'; import type { ViewProps } from '../View'; +import typeof View from '../View'; import * as React from 'react'; import ModalPortal from './ModalPortal'; @@ -23,12 +24,13 @@ export type ModalProps = { animationType?: 'none' | 'slide' | 'fade', children: any, hardwareAccelerated?: ?boolean, - onDismiss?: ?() => mixed, + onDismiss?: ?() => unknown, onOrientationChange?: ?(e: {| orientation: 'portrait' | 'landscape' |}) => void, onRequestClose?: ?() => void, onShow?: ?() => void, + ref?: React.Ref>, presentationStyle?: ?( | 'fullScreen' | 'pageSheet' @@ -49,8 +51,8 @@ export type ModalProps = { let uniqueModalIdentifier = 0; -const activeModalStack = []; -const activeModalListeners = {}; +const activeModalStack: Array = []; +const activeModalListeners: { [number]: (active: boolean) => void } = {}; function notifyActiveModalListeners() { if (activeModalStack.length === 0) { @@ -64,7 +66,7 @@ function notifyActiveModalListeners() { }); } -function removeActiveModal(modalId) { +function removeActiveModal(modalId: number) { if (modalId in activeModalListeners) { // Before removing this listener we should probably tell it // that it's no longer the active modal for sure. @@ -78,23 +80,21 @@ function removeActiveModal(modalId) { } } -function addActiveModal(modalId, listener) { +function addActiveModal(modalId: number, listener: (active: boolean) => void) { removeActiveModal(modalId); activeModalStack.push(modalId); activeModalListeners[modalId] = listener; notifyActiveModalListeners(); } -const Modal: React.AbstractComponent< - ModalProps, - React.ElementRef -> = React.forwardRef((props, forwardedRef) => { +const Modal = (props: ModalProps): React.Node => { const { animationType, children, onDismiss, onRequestClose, onShow, + ref, transparent, visible = true, ...rest @@ -133,11 +133,12 @@ const Modal: React.AbstractComponent< visible={visible} > + {/* $FlowFixMe[incompatible-type] Unsupported props are dropped by View */} {children} @@ -146,6 +147,6 @@ const Modal: React.AbstractComponent< ); -}); +}; export default Modal; diff --git a/packages/react-native-web/src/exports/PanResponder/Alternative.js b/packages/react-native-web/src/exports/PanResponder/Alternative.js deleted file mode 100644 index 2f691e523f..0000000000 --- a/packages/react-native-web/src/exports/PanResponder/Alternative.js +++ /dev/null @@ -1,408 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - * @format - */ - -/** - * PAN RESPONDER - * - * `PanResponder` uses the Responder System to reconcile several touches into - * a single gesture. It makes single-touch gestures resilient to extra touches, - * and can be used to recognize simple multi-touch gestures. For each handler, - * it provides a `gestureState` object alongside the ResponderEvent object. - * - * By default, `PanResponder` holds an `InteractionManager` handle to block - * long-running JS events from interrupting active gestures. - * - * A graphical explanation of the touch data flow: - * - * +----------------------------+ +--------------------------------+ - * | ResponderTouchHistoryStore | |TouchHistoryMath | - * +----------------------------+ +----------+---------------------+ - * |Global store of touchHistory| |Allocation-less math util | - * |including activeness, start | |on touch history (centroids | - * |position, prev/cur position.| |and multitouch movement etc) | - * | | | | - * +----^-----------------------+ +----^---------------------------+ - * | | - * | (records relevant history | - * | of touches relevant for | - * | implementing higher level | - * | gestures) | - * | | - * +----+-----------------------+ +----|---------------------------+ - * | ResponderEventPlugin | | | Your App/Component | - * +----------------------------+ +----|---------------------------+ - * |Negotiates which view gets | Low level | | High level | - * |onResponderMove events. | events w/ | +-+-------+ events w/ | - * |Also records history into | touchHistory| | Pan | multitouch + | - * |ResponderTouchHistoryStore. +---------------->Responder+-----> accumulative| - * +----------------------------+ attached to | | | distance and | - * each event | +---------+ velocity. | - * | | - * | | - * +--------------------------------+ - */ - -'use strict'; - -import type { PressEvent } from '../../vendor/react-native/Types/CoreEventTypes'; - -import InteractionManager from '../InteractionManager'; -import TouchHistoryMath from '../../vendor/react-native/TouchHistoryMath'; - -export type GestureState = {| - // ID of the gestureState; persisted as long as there's a pointer on screen - stateID: number, - // The latest screen coordinates of the gesture - x: number, - // The latest screen coordinates of the gesture - y: number, - // The screen coordinates of the responder grant - initialX: number, - // The screen coordinates of the responder grant - initialY: number, - // Accumulated distance of the gesture since it started - deltaX: number, - // Accumulated distance of the gesture since it started - deltaY: number, - // Current velocity of the gesture - velocityX: number, - // Current velocity of the gesture - velocityY: number, - // Number of touches currently on screen - numberActiveTouches: number, - _accountsForMovesUpTo: number -|}; - -type ActiveCallback = ( - event: PressEvent, - gestureState: GestureState -) => boolean; -type PassiveCallback = (event: PressEvent, gestureState: GestureState) => void; - -type PanResponderConfig = $ReadOnly<{| - // Negotiate for the responder - onMoveShouldSetResponder?: ?ActiveCallback, - onMoveShouldSetResponderCapture?: ?ActiveCallback, - onStartShouldSetResponder?: ?ActiveCallback, - onStartShouldSetResponderCapture?: ?ActiveCallback, - onPanTerminationRequest?: ?ActiveCallback, - // Gesture started - onPanGrant?: ?PassiveCallback, - // Gesture rejected - onPanReject?: ?PassiveCallback, - // A pointer touched the screen - onPanStart?: ?PassiveCallback, - // A pointer moved - onPanMove?: ?PassiveCallback, - // A pointer was removed from the screen - onPanEnd?: ?PassiveCallback, - // All pointers removed, gesture successful - onPanRelease?: ?PassiveCallback, - // Gesture cancelled - onPanTerminate?: ?PassiveCallback -|}>; - -const { - currentCentroidX, - currentCentroidY, - currentCentroidXOfTouchesChangedAfter, - currentCentroidYOfTouchesChangedAfter, - previousCentroidXOfTouchesChangedAfter, - previousCentroidYOfTouchesChangedAfter -} = TouchHistoryMath; - -const PanResponder = { - _initializeGestureState(gestureState: GestureState) { - gestureState.x = 0; - gestureState.y = 0; - gestureState.initialX = 0; - gestureState.initialY = 0; - gestureState.deltaX = 0; - gestureState.deltaY = 0; - gestureState.velocityX = 0; - gestureState.velocityY = 0; - gestureState.numberActiveTouches = 0; - // All `gestureState` accounts for timeStamps up until: - gestureState._accountsForMovesUpTo = 0; - }, - - /** - * Take all recently moved touches, calculate how the centroid has changed just for those - * recently moved touches, and append that change to an accumulator. This is - * to (at least) handle the case where the user is moving three fingers, and - * then one of the fingers stops but the other two continue. - * - * This is very different than taking all of the recently moved touches and - * storing their centroid as `dx/dy`. For correctness, we must *accumulate - * changes* in the centroid of recently moved touches. - * - * There is also some nuance with how we handle multiple moved touches in a - * single event. Multiple touches generate two 'move' events, each of - * them triggering `onResponderMove`. But with the way `PanResponder` works, - * all of the gesture inference is performed on the first dispatch, since it - * looks at all of the touches. Therefore, `PanResponder` does not call - * `onResponderMove` passed the first dispatch. This diverges from the - * typical responder callback pattern (without using `PanResponder`), but - * avoids more dispatches than necessary. - * - * When moving two touches in opposite directions, the cumulative - * distance is zero in each dimension. When two touches move in parallel five - * pixels in the same direction, the cumulative distance is five, not ten. If - * two touches start, one moves five in a direction, then stops and the other - * touch moves fives in the same direction, the cumulative distance is ten. - * - * This logic requires a kind of processing of time "clusters" of touch events - * so that two touch moves that essentially occur in parallel but move every - * other frame respectively, are considered part of the same movement. - * - * x/y: If a move event has been observed, `(x, y)` is the centroid of the most - * recently moved "cluster" of active touches. - * deltaX/deltaY: Cumulative touch distance. Accounts for touch moves that are - * clustered together in time, moving the same direction. Only valid when - * currently responder (otherwise, it only represents the drag distance below - * the threshold). - */ - _updateGestureStateOnMove( - gestureState: GestureState, - touchHistory: $PropertyType - ) { - const movedAfter = gestureState._accountsForMovesUpTo; - const prevX = previousCentroidXOfTouchesChangedAfter( - touchHistory, - movedAfter - ); - const prevY = previousCentroidYOfTouchesChangedAfter( - touchHistory, - movedAfter - ); - const prevDeltaX = gestureState.deltaX; - const prevDeltaY = gestureState.deltaY; - - const x = currentCentroidXOfTouchesChangedAfter(touchHistory, movedAfter); - const y = currentCentroidYOfTouchesChangedAfter(touchHistory, movedAfter); - const deltaX = prevDeltaX + (x - prevX); - const deltaY = prevDeltaY + (y - prevY); - // TODO: This must be filtered intelligently. - const dt = - touchHistory.mostRecentTimeStamp - gestureState._accountsForMovesUpTo; - - gestureState.deltaX = deltaX; - gestureState.deltaY = deltaY; - gestureState.numberActiveTouches = touchHistory.numberActiveTouches; - gestureState.velocityX = (deltaX - prevDeltaX) / dt; - gestureState.velocityY = (deltaY - prevDeltaY) / dt; - gestureState.x = x; - gestureState.y = y; - gestureState._accountsForMovesUpTo = touchHistory.mostRecentTimeStamp; - }, - - /** - * Enhanced versions of all of the responder callbacks that provide not only - * the `ResponderEvent`, but also the `PanResponder` gesture state. - * - * In general, for events that have capture equivalents, we update the - * gestureState once in the capture phase and can use it in the bubble phase - * as well. - */ - create(config: PanResponderConfig): {| - getInteractionHandle: () => ?number, - panHandlers: {| - onMoveShouldSetResponder: (event: PressEvent) => boolean, - onMoveShouldSetResponderCapture: (event: PressEvent) => boolean, - onResponderEnd: (event: PressEvent) => void, - onResponderGrant: (event: PressEvent) => void, - onResponderMove: (event: PressEvent) => void, - onResponderReject: (event: PressEvent) => void, - onResponderRelease: (event: PressEvent) => void, - onResponderStart: (event: PressEvent) => void, - onResponderTerminate: (event: PressEvent) => void, - onResponderTerminationRequest: (event: PressEvent) => boolean, - onStartShouldSetResponder: (event: PressEvent) => boolean, - onStartShouldSetResponderCapture: (event: PressEvent) => boolean - |} - |} { - const interactionState = { - handle: (null: ?number) - }; - const gestureState: GestureState = { - // Useful for debugging - stateID: Math.random(), - x: 0, - y: 0, - initialX: 0, - initialY: 0, - deltaX: 0, - deltaY: 0, - velocityX: 0, - velocityY: 0, - numberActiveTouches: 0, - _accountsForMovesUpTo: 0 - }; - - const { - onStartShouldSetResponder, - onStartShouldSetResponderCapture, - onMoveShouldSetResponder, - onMoveShouldSetResponderCapture, - onPanGrant, - onPanStart, - onPanMove, - onPanEnd, - onPanRelease, - onPanReject, - onPanTerminate, - onPanTerminationRequest - } = config; - - const panHandlers = { - onStartShouldSetResponder(event: PressEvent): boolean { - return onStartShouldSetResponder != null - ? onStartShouldSetResponder(event, gestureState) - : false; - }, - onMoveShouldSetResponder(event: PressEvent): boolean { - return onMoveShouldSetResponder != null - ? onMoveShouldSetResponder(event, gestureState) - : false; - }, - onStartShouldSetResponderCapture(event: PressEvent): boolean { - // TODO: Actually, we should reinitialize the state any time - // touches.length increases from 0 active to > 0 active. - if (event.nativeEvent.touches.length === 1) { - PanResponder._initializeGestureState(gestureState); - } - gestureState.numberActiveTouches = - event.touchHistory.numberActiveTouches; - return onStartShouldSetResponderCapture != null - ? onStartShouldSetResponderCapture(event, gestureState) - : false; - }, - - onMoveShouldSetResponderCapture(event: PressEvent): boolean { - const touchHistory = event.touchHistory; - // Responder system incorrectly dispatches should* to current responder - // Filter out any touch moves past the first one - we would have - // already processed multi-touch geometry during the first event. - // NOTE: commented out because new responder system should get it right. - //if (gestureState._accountsForMovesUpTo === touchHistory.mostRecentTimeStamp) { - // return false; - //} - PanResponder._updateGestureStateOnMove(gestureState, touchHistory); - return onMoveShouldSetResponderCapture != null - ? onMoveShouldSetResponderCapture(event, gestureState) - : false; - }, - - onResponderGrant(event: PressEvent): void { - if (!interactionState.handle) { - interactionState.handle = - InteractionManager.createInteractionHandle(); - } - gestureState.initialX = currentCentroidX(event.touchHistory); - gestureState.initialY = currentCentroidY(event.touchHistory); - gestureState.deltaX = 0; - gestureState.deltaY = 0; - if (onPanGrant != null) { - onPanGrant(event, gestureState); - } - }, - - onResponderReject(event: PressEvent): void { - clearInteractionHandle( - interactionState, - onPanReject, - event, - gestureState - ); - }, - - onResponderStart(event: PressEvent): void { - const { numberActiveTouches } = event.touchHistory; - gestureState.numberActiveTouches = numberActiveTouches; - if (onPanStart != null) { - onPanStart(event, gestureState); - } - }, - - onResponderMove(event: PressEvent): void { - const touchHistory = event.touchHistory; - // Guard against the dispatch of two touch moves when there are two - // simultaneously changed touches. - if ( - gestureState._accountsForMovesUpTo === - touchHistory.mostRecentTimeStamp - ) { - return; - } - // Filter out any touch moves past the first one - we would have - // already processed multi-touch geometry during the first event. - PanResponder._updateGestureStateOnMove(gestureState, touchHistory); - if (onPanMove != null) { - onPanMove(event, gestureState); - } - }, - - onResponderEnd(event: PressEvent): void { - const { numberActiveTouches } = event.touchHistory; - gestureState.numberActiveTouches = numberActiveTouches; - clearInteractionHandle(interactionState, onPanEnd, event, gestureState); - }, - - onResponderRelease(event: PressEvent): void { - clearInteractionHandle( - interactionState, - onPanRelease, - event, - gestureState - ); - PanResponder._initializeGestureState(gestureState); - }, - - onResponderTerminate(event: PressEvent): void { - clearInteractionHandle( - interactionState, - onPanTerminate, - event, - gestureState - ); - PanResponder._initializeGestureState(gestureState); - }, - - onResponderTerminationRequest(event: PressEvent): boolean { - return onPanTerminationRequest != null - ? onPanTerminationRequest(event, gestureState) - : true; - } - }; - return { - panHandlers, - getInteractionHandle(): ?number { - return interactionState.handle; - } - }; - } -}; - -function clearInteractionHandle( - interactionState: { handle: ?number }, - callback: ?(ActiveCallback | PassiveCallback), - event: PressEvent, - gestureState: GestureState -) { - if (interactionState.handle) { - InteractionManager.clearInteractionHandle(interactionState.handle); - interactionState.handle = null; - } - if (callback) { - callback(event, gestureState); - } -} - -export default PanResponder; diff --git a/packages/react-native-web/src/exports/Picker/PickerItem.js b/packages/react-native-web/src/exports/Picker/PickerItem.js deleted file mode 100644 index 25ba2e1205..0000000000 --- a/packages/react-native-web/src/exports/Picker/PickerItem.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) Nicolas Gallagher. - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @noflow - */ - -import type { ColorValue } from '../../types'; - -import createElement from '../createElement'; - -type Props = { - color?: ColorValue, - label: string, - testID?: string, - value?: number | string -}; - -export default function PickerItem(props: Props) { - const { color, label, testID, value } = props; - const style = { color }; - return createElement('option', { children: label, style, testID, value }); -} diff --git a/packages/react-native-web/src/exports/Picker/__tests__/__snapshots__/index-test.js.snap b/packages/react-native-web/src/exports/Picker/__tests__/__snapshots__/index-test.js.snap deleted file mode 100644 index 9aa856717c..0000000000 --- a/packages/react-native-web/src/exports/Picker/__tests__/__snapshots__/index-test.js.snap +++ /dev/null @@ -1,17 +0,0 @@ -// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing - -exports[`components/Picker prop "children" items 1`] = ` - -`; - -exports[`components/Picker prop "children" renders items 1`] = ` - -`; diff --git a/packages/react-native-web/src/exports/Picker/__tests__/index-test.js b/packages/react-native-web/src/exports/Picker/__tests__/index-test.js deleted file mode 100644 index c16aba5f6d..0000000000 --- a/packages/react-native-web/src/exports/Picker/__tests__/index-test.js +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Copyright (c) Nicolas Gallagher. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import React from 'react'; -import { render } from '@testing-library/react'; -import Picker from '..'; - -function findSelect(container) { - return container.querySelector('select'); -} - -describe('components/Picker', () => { - describe('prop "children"', () => { - test('renders items', () => { - const picker = ( - - - - - ); - const { container } = render(picker); - expect(container.firstChild.firstChild).toMatchSnapshot(); - }); - - test('items', () => { - const pickerItem = ; - const { container } = render(pickerItem); - expect(container.firstChild).toMatchSnapshot(); - }); - }); - - describe('prop "enabled"', () => { - test('picker is disabled if false', () => { - const picker = ( - - - - - ); - const { container } = render(picker); - expect(findSelect(container).disabled).toBe(true); - }); - }); - - describe('prop "onValueChange"', () => { - test('is called with (value, index)', () => { - const onValueChange = jest.fn(); - const picker = ( - - - - - ); - const { container } = render(picker); - const select = findSelect(container); - // mock change event - select.selectedIndex = '1'; - select.value = 'value-2'; - select.dispatchEvent(new window.Event('change', { bubbles: true })); - - expect(onValueChange).toHaveBeenCalledWith('value-2', 1); - }); - }); - - describe('prop "selectedValue"', () => { - test('selects the correct item (string)', () => { - const picker = ( - - - - - ); - const { container } = render(picker); - expect(findSelect(container).value).toBe('value-2'); - }); - - test('selects the correct item (number)', () => { - const picker = ( - - - - - ); - const { container } = render(picker); - expect(findSelect(container).value).toBe('22'); - }); - }); -}); diff --git a/packages/react-native-web/src/exports/Picker/index.js b/packages/react-native-web/src/exports/Picker/index.js deleted file mode 100644 index 27fa5b1472..0000000000 --- a/packages/react-native-web/src/exports/Picker/index.js +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Nicolas Gallagher. - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -'use client'; - -import type { PlatformMethods } from '../../types'; -import type { ViewProps } from '../View'; - -import * as React from 'react'; -import createElement from '../createElement'; -import useMergeRefs from '../../modules/useMergeRefs'; -import usePlatformMethods from '../../modules/usePlatformMethods'; -import PickerItem from './PickerItem'; -import StyleSheet from '../StyleSheet'; - -type PickerProps = { - ...ViewProps, - children?: typeof PickerItem | Array, - enabled?: boolean, - onValueChange?: (number | string, number) => void, - selectedValue?: number | string, - style?: any, - /* compat */ - itemStyle?: any, - mode?: string, - prompt?: string -}; - -const Picker: React.AbstractComponent< - PickerProps, - HTMLElement & PlatformMethods -> = React.forwardRef((props, forwardedRef) => { - const { - children, - enabled, - onValueChange, - selectedValue, - style, - testID, - /* eslint-disable */ - itemStyle, - mode, - prompt, - /* eslint-enable */ - ...other - } = props; - - const hostRef = React.useRef(null); - - function handleChange(e: Object) { - const { selectedIndex, value } = e.target; - if (onValueChange) { - onValueChange(value, selectedIndex); - } - } - - // $FlowFixMe - const supportedProps: any = { - children, - disabled: enabled === false ? true : undefined, - onChange: handleChange, - style: [styles.initial, style], - testID, - value: selectedValue, - ...other - }; - - const platformMethodsRef = usePlatformMethods(supportedProps); - - const setRef = useMergeRefs(hostRef, platformMethodsRef, forwardedRef); - - supportedProps.ref = setRef; - - return createElement('select', supportedProps); -}); - -// $FlowFixMe -Picker.Item = PickerItem; - -const styles = StyleSheet.create({ - initial: { - fontFamily: 'System', - fontSize: 'inherit', - margin: 0 - } -}); - -export default Picker; diff --git a/packages/react-native-web/src/exports/Pressable/index.js b/packages/react-native-web/src/exports/Pressable/index.js index 28118ddcd0..7db90ffbbb 100644 --- a/packages/react-native-web/src/exports/Pressable/index.js +++ b/packages/react-native-web/src/exports/Pressable/index.js @@ -14,20 +14,20 @@ import type { PressResponderConfig } from '../../modules/usePressEvents/PressRes import type { ViewProps } from '../View'; import * as React from 'react'; -import { forwardRef, memo, useMemo, useState, useRef } from 'react'; +import { memo, useMemo, useState, useRef } from 'react'; import useMergeRefs from '../../modules/useMergeRefs'; import useHover from '../../modules/useHover'; import usePressEvents from '../../modules/usePressEvents'; import StyleSheet from '../StyleSheet'; import View from '../View'; -export type StateCallbackType = $ReadOnly<{| +export type StateCallbackType = Readonly<{| focused: boolean, hovered: boolean, pressed: boolean |}>; -type ViewStyleProp = $PropertyType; +type ViewStyleProp = ViewProps['style']; type Props = { ...ViewProps, @@ -41,21 +41,22 @@ type Props = { // Whether the press behavior is disabled. disabled?: ?boolean, // Called when the view is hovered - onHoverIn?: $PropertyType, + onHoverIn?: HoverEventsConfig['onHoverStart'], // Called when the view is no longer hovered - onHoverOut?: $PropertyType, + onHoverOut?: HoverEventsConfig['onHoverEnd'], // Called when this view's layout changes - onLayout?: $PropertyType, + onLayout?: ViewProps['onLayout'], // Called when a long-tap gesture is detected. - onLongPress?: $PropertyType, + onLongPress?: PressResponderConfig['onLongPress'], // Called when a single tap gesture is detected. - onPress?: $PropertyType, + onPress?: PressResponderConfig['onPress'], // Called when a touch is engaged, before `onPress`. - onPressIn?: $PropertyType, + onPressIn?: PressResponderConfig['onPressStart'], // Called when a touch is moving, after `onPressIn`. - onPressMove?: $PropertyType, + onPressMove?: PressResponderConfig['onPressMove'], // Called when a touch is released, before `onPress`. - onPressOut?: $PropertyType, + onPressOut?: PressResponderConfig['onPressEnd'], + ref?: React.Ref>, style?: ViewStyleProp | ((state: StateCallbackType) => ViewStyleProp), /** * Used only for documentation or testing (e.g. snapshot testing). @@ -68,7 +69,7 @@ type Props = { * Component used to build display components that should respond to whether the * component is currently pressed or not. */ -function Pressable(props: Props, forwardedRef): React.Node { +function Pressable(props: Props): React.Node { const { children, delayLongPress, @@ -86,6 +87,7 @@ function Pressable(props: Props, forwardedRef): React.Node { onPressMove, onPressIn, onPressOut, + ref, style, tabIndex, testOnly_hovered, @@ -98,7 +100,7 @@ function Pressable(props: Props, forwardedRef): React.Node { const [pressed, setPressed] = useForceableState(testOnly_pressed === true); const hostRef = useRef(null); - const setRef = useMergeRefs(forwardedRef, hostRef); + const setRef = useMergeRefs(ref, hostRef); const pressConfig = useMemo( () => ({ @@ -143,7 +145,7 @@ function Pressable(props: Props, forwardedRef): React.Node { const interactionState = { hovered, focused, pressed }; const blurHandler = React.useCallback( - (e) => { + (e: any) => { if (e.nativeEvent.target === hostRef.current) { setFocused(false); if (onBlur != null) { @@ -155,7 +157,7 @@ function Pressable(props: Props, forwardedRef): React.Node { ); const focusHandler = React.useCallback( - (e) => { + (e: any) => { if (e.nativeEvent.target === hostRef.current) { setFocused(true); if (onFocus != null) { @@ -167,7 +169,7 @@ function Pressable(props: Props, forwardedRef): React.Node { ); const contextMenuHandler = React.useCallback( - (e) => { + (e: any) => { if (onContextMenuPress != null) { onContextMenuPress(e); } @@ -179,7 +181,7 @@ function Pressable(props: Props, forwardedRef): React.Node { ); const keyDownHandler = React.useCallback( - (e) => { + (e: any) => { if (onKeyDownPress != null) { onKeyDownPress(e); } @@ -190,7 +192,7 @@ function Pressable(props: Props, forwardedRef): React.Node { [onKeyDown, onKeyDownPress] ); - let _tabIndex; + let _tabIndex: ViewProps['tabIndex']; if (tabIndex !== undefined) { _tabIndex = tabIndex; } else { @@ -233,10 +235,7 @@ const styles = StyleSheet.create({ } }); -const MemoedPressable = memo(forwardRef(Pressable)); +const MemoedPressable: component(...Props) = memo(Pressable); MemoedPressable.displayName = 'Pressable'; -export default (MemoedPressable: React.AbstractComponent< - Props, - React.ElementRef ->); +export default MemoedPressable; diff --git a/packages/react-native-web/src/exports/ProgressBar/__tests__/index-test.js b/packages/react-native-web/src/exports/ProgressBar/__tests__/index-test.js deleted file mode 100644 index b5058e8534..0000000000 --- a/packages/react-native-web/src/exports/ProgressBar/__tests__/index-test.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) Nicolas Gallagher. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import React from 'react'; -import { render } from '@testing-library/react'; -import ProgressBar from '..'; - -describe('components/ProgressBar', () => { - describe('progress', () => { - test('value as percentage is set to "aria-valuenow"', () => { - const { container } = render(); - expect(container.firstChild.getAttribute('aria-valuenow')).toBe('50'); - }); - - test('is ignored when "indeterminate" is "true"', () => { - const { container } = render( - - ); - expect(container.firstChild.getAttribute('aria-valuenow')).toBe(null); - }); - }); -}); diff --git a/packages/react-native-web/src/exports/ProgressBar/index.js b/packages/react-native-web/src/exports/ProgressBar/index.js deleted file mode 100644 index 25069e724b..0000000000 --- a/packages/react-native-web/src/exports/ProgressBar/index.js +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Copyright (c) Nicolas Gallagher. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -'use client'; - -import type { ColorValue } from '../../types'; -import type { ViewProps } from '../View'; - -import * as React from 'react'; -import StyleSheet from '../StyleSheet'; -import View from '../View'; - -type ProgressBarProps = { - ...ViewProps, - color?: ColorValue, - indeterminate?: boolean, - progress?: number, - trackColor?: ColorValue -}; - -const ProgressBar: React.AbstractComponent< - ProgressBarProps, - React.ElementRef -> = React.forwardRef((props, ref) => { - const { - color = '#1976D2', - indeterminate = false, - progress = 0, - trackColor = 'transparent', - style, - ...other - } = props; - - const percentageProgress = progress * 100; - const width = indeterminate ? '25%' : `${percentageProgress}%`; - - return ( - - - - ); -}); - -ProgressBar.displayName = 'ProgressBar'; - -const styles = StyleSheet.create({ - track: { - forcedColorAdjust: 'none', - height: 5, - overflow: 'hidden', - userSelect: 'none', - zIndex: 0 - }, - progress: { - forcedColorAdjust: 'none', - height: '100%', - zIndex: -1 - }, - animation: { - animationDuration: '1s', - animationKeyframes: [ - { - '0%': { transform: 'translateX(-100%)' }, - '100%': { transform: 'translateX(400%)' } - } - ], - animationTimingFunction: 'linear', - animationIterationCount: 'infinite' - } -}); - -export default ProgressBar; diff --git a/packages/react-native-web/src/exports/RefreshControl/index.js b/packages/react-native-web/src/exports/RefreshControl/index.js index 2c8b66aa1e..01a206b0c2 100644 --- a/packages/react-native-web/src/exports/RefreshControl/index.js +++ b/packages/react-native-web/src/exports/RefreshControl/index.js @@ -10,7 +10,7 @@ import type { ColorValue } from '../../types'; import type { ViewProps } from '../View'; -import type { Node } from 'React'; +import type { Node } from 'react'; import View from '../View'; import React from 'react'; diff --git a/packages/react-native-web/src/exports/SafeAreaView/index.js b/packages/react-native-web/src/exports/SafeAreaView/index.js index 5324c22fb9..a26c1cfebb 100644 --- a/packages/react-native-web/src/exports/SafeAreaView/index.js +++ b/packages/react-native-web/src/exports/SafeAreaView/index.js @@ -13,36 +13,25 @@ import type { ViewProps } from '../View'; import * as React from 'react'; import StyleSheet from '../StyleSheet'; import View from '../View'; -import canUseDOM from '../../modules/canUseDom'; -const cssFunction: 'constant' | 'env' = (function () { - if ( - canUseDOM && - window.CSS && - window.CSS.supports && - window.CSS.supports('top: constant(safe-area-inset-top)') - ) { - return 'constant'; - } - return 'env'; -})(); +type SafeAreaViewProps = { + ...ViewProps, + ref?: React.Ref> +}; -const SafeAreaView: React.AbstractComponent< - ViewProps, - React.ElementRef -> = React.forwardRef((props, ref) => { - const { style, ...rest } = props; +const SafeAreaView = (props: SafeAreaViewProps): React.Node => { + const { ref, style, ...rest } = props; return ; -}); +}; SafeAreaView.displayName = 'SafeAreaView'; const styles = StyleSheet.create({ root: { - paddingTop: `${cssFunction}(safe-area-inset-top)`, - paddingRight: `${cssFunction}(safe-area-inset-right)`, - paddingBottom: `${cssFunction}(safe-area-inset-bottom)`, - paddingLeft: `${cssFunction}(safe-area-inset-left)` + paddingTop: 'env(safe-area-inset-top)', + paddingRight: 'env(safe-area-inset-right)', + paddingBottom: 'env(safe-area-inset-bottom)', + paddingLeft: 'env(safe-area-inset-left)' } }); diff --git a/packages/react-native-web/src/exports/ScrollView/ScrollViewBase.js b/packages/react-native-web/src/exports/ScrollView/ScrollViewBase.js index a006d2b404..9f047b1ead 100644 --- a/packages/react-native-web/src/exports/ScrollView/ScrollViewBase.js +++ b/packages/react-native-web/src/exports/ScrollView/ScrollViewBase.js @@ -23,13 +23,14 @@ type Props = { onScrollEndDrag?: (e: any) => void, onTouchMove?: (e: any) => void, onWheel?: (e: any) => void, + ref?: React.Ref>, scrollEnabled?: boolean, scrollEventThrottle?: number, showsHorizontalScrollIndicator?: boolean, showsVerticalScrollIndicator?: boolean }; -function normalizeScrollEvent(e) { +function normalizeScrollEvent(e: any) { return { nativeEvent: { contentOffset: { @@ -69,14 +70,12 @@ function shouldEmitScrollEvent(lastTick: number, eventThrottle: number) { /** * Encapsulates the Web-specific scroll throttling and disabling logic */ -const ScrollViewBase: React.AbstractComponent< - Props, - React.ElementRef -> = React.forwardRef((props, forwardedRef) => { +const ScrollViewBase = (props: Props): React.Node => { const { onScroll, onTouchMove, onWheel, + ref, scrollEnabled = true, scrollEventThrottle = 0, showsHorizontalScrollIndicator, @@ -86,7 +85,7 @@ const ScrollViewBase: React.AbstractComponent< } = props; const scrollState = React.useRef({ isScrolling: false, scrollLastTick: 0 }); - const scrollTimeout = React.useRef(null); + const scrollTimeout = React.useRef(null); const scrollRef = React.useRef(null); function createPreventableScrollHandler(handler: Function) { @@ -151,12 +150,13 @@ const ScrollViewBase: React.AbstractComponent< showsVerticalScrollIndicator === false; return ( + // $FlowFixMe[incompatible-type] Unsupported props are dropped by View ); -}); +}; // Chrome doesn't support e.preventDefault in this case; touch-action must be // used to disable scrolling. diff --git a/packages/react-native-web/src/exports/ScrollView/__tests__/__snapshots__/index-test.js.snap b/packages/react-native-web/src/exports/ScrollView/__tests__/__snapshots__/index-test.js.snap index bc5bb9ea5f..5801b56cbc 100644 --- a/packages/react-native-web/src/exports/ScrollView/__tests__/__snapshots__/index-test.js.snap +++ b/packages/react-native-web/src/exports/ScrollView/__tests__/__snapshots__/index-test.js.snap @@ -2,7 +2,7 @@ exports[`components/ScrollView prop "centerContent" with 1`] = `
{ * Invoke this from an `onStartShouldSetResponderCapture` event. */ scrollResponderHandleStartShouldSetResponderCapture: boolean = (e: Event) => { - // First see if we want to eat taps while the keyboard is up - // var currentlyFocusedTextInput = TextInputState.currentlyFocusedField(); - // if (!this.props.keyboardShouldPersistTaps && - // currentlyFocusedTextInput != null && - // e.target !== currentlyFocusedTextInput) { - // return true; - // } return this.scrollResponderIsAnimating(); }; @@ -731,9 +724,7 @@ const commonStyle = { // Enable hardware compositing in modern browsers. // Creates a new layer with its own backing surface that can significantly // improve scroll performance. - transform: 'translateZ(0)', - // iOS native scrolling - WebkitOverflowScrolling: 'touch' + transform: 'translateZ(0)' }; const styles = StyleSheet.create({ @@ -772,12 +763,13 @@ const styles = StyleSheet.create({ } }); -const ForwardedScrollView: React.AbstractComponent< - React.ElementConfig, - React.ElementRef -> = React.forwardRef((props, forwardedRef) => { - return ; -}); +const ForwardedScrollView = (props: { + ...React.ComponentProps, + ref?: React.Ref> +}): React.Node => { + const { ref, ...rest } = props; + return ; +}; ForwardedScrollView.displayName = 'ScrollView'; diff --git a/packages/react-native-web/src/exports/Share/index.js b/packages/react-native-web/src/exports/Share/index.js index ffedec07af..dabe5fcf58 100644 --- a/packages/react-native-web/src/exports/Share/index.js +++ b/packages/react-native-web/src/exports/Share/index.js @@ -17,7 +17,7 @@ type Content = class Share { static share(content: Content, options: Object = {}): Promise { invariant( - typeof content === 'object' && content !== null, + typeof content === 'object' && content != null, 'Content to share must be a valid object' ); invariant( diff --git a/packages/react-native-web/src/exports/StyleSheet/__tests__/compiler-createReactDOMStyle-test.js b/packages/react-native-web/src/exports/StyleSheet/__tests__/compiler-createReactDOMStyle-test.js index 64e47e9aa5..9681bc6964 100644 --- a/packages/react-native-web/src/exports/StyleSheet/__tests__/compiler-createReactDOMStyle-test.js +++ b/packages/react-native-web/src/exports/StyleSheet/__tests__/compiler-createReactDOMStyle-test.js @@ -72,6 +72,16 @@ describe('compiler/createReactDOMStyle', () => { `); }); + describe('colors', () => { + test('rgb() with a slash alpha', () => { + expect( + createReactDOMStyle({ backgroundColor: 'rgb(10 20 30 / 0.4)' }) + ).toEqual({ + backgroundColor: 'rgba(10,20,30,0.40)' + }); + }); + }); + describe('flexbox styles', () => { test('flex: -1', () => { expect(createReactDOMStyle({ flex: -1 })).toEqual({ @@ -184,4 +194,94 @@ describe('compiler/createReactDOMStyle', () => { `); }); }); + + describe('prefixed values', () => { + test('unitless number', () => { + expect(createReactDOMStyle({ initialLetter: 2 })).toEqual({ + initialLetter: 2, + WebkitInitialLetter: 2 + }); + }); + + test('backgroundClip', () => { + expect(createReactDOMStyle({ backgroundClip: 'padding-box' })).toEqual({ + backgroundClip: 'padding-box' + }); + expect(createReactDOMStyle({ backgroundClip: 'text' })).toEqual({ + backgroundClip: 'text', + WebkitBackgroundClip: 'text' + }); + }); + + test('image-set', () => { + const backgroundImage = 'image-set("a.png" 1x, "b.png" 2x)'; + expect(createReactDOMStyle({ backgroundImage })).toEqual({ + backgroundImage: [ + '-webkit-image-set("a.png" 1x, "b.png" 2x)', + backgroundImage + ] + }); + expect(createReactDOMStyle({ backgroundImage }, true)).toEqual({ + backgroundImage + }); + expect( + createReactDOMStyle({ + backgroundImage: '-webkit-image-set("a.png" 1x)' + }) + ).toEqual({ backgroundImage: '-webkit-image-set("a.png" 1x)' }); + }); + + test('image-set and cross-fade', () => { + const backgroundImage = + 'image-set("a.png" 1x), cross-fade(url(a.png), url(b.png), 50%)'; + expect(createReactDOMStyle({ backgroundImage })).toEqual({ + backgroundImage: [ + '-webkit-image-set("a.png" 1x), -webkit-cross-fade(url(a.png), url(b.png), 50%)', + backgroundImage + ] + }); + }); + + test('sizing', () => { + expect(createReactDOMStyle({ width: 'fill-available' })).toEqual({ + width: ['-webkit-fill-available', 'fill-available'] + }); + }); + + test('transition', () => { + expect( + createReactDOMStyle({ + transition: 'opacity 1s cubic-bezier(0, 0, 1, 1), backdrop-filter 2s' + }) + ).toEqual({ + transition: + 'opacity 1s cubic-bezier(0, 0, 1, 1), -webkit-backdrop-filter 2s, backdrop-filter 2s' + }); + expect( + createReactDOMStyle({ transitionProperty: 'opacity,mask' }) + ).toEqual({ + transitionProperty: 'opacity,-webkit-mask,mask' + }); + expect( + createReactDOMStyle({ transitionProperty: 'opacity, transform' }) + ).toEqual({ + transitionProperty: 'opacity, transform' + }); + expect( + createReactDOMStyle({ + transitionProperty: 'mask-image, text-emphasis-color' + }) + ).toEqual({ + transitionProperty: + '-webkit-mask-image,mask-image, -webkit-text-emphasis-color, text-emphasis-color' + }); + expect( + createReactDOMStyle({ + transition: 'opacity 1s, -webkit-transform 1s, backdrop-filter 1s' + }) + ).toEqual({ + transition: 'opacity 1s, -webkit-transform 1s, backdrop-filter 1s' + }); + }); + }); }); diff --git a/packages/react-native-web/src/exports/StyleSheet/__tests__/compiler-test.js b/packages/react-native-web/src/exports/StyleSheet/__tests__/compiler-test.js index e47121b1b3..d64b687cc9 100644 --- a/packages/react-native-web/src/exports/StyleSheet/__tests__/compiler-test.js +++ b/packages/react-native-web/src/exports/StyleSheet/__tests__/compiler-test.js @@ -70,9 +70,7 @@ describe('StyleSheet/compile', () => { [ [ ".r-animationKeyframes-zacbmr{animation-name:r-animation-8jhqzh,r-animation-5azpl5;}", - "@-webkit-keyframes r-animation-8jhqzh{0%{top:0px;}50%{top:5px;}100%{top:10px;}}", "@keyframes r-animation-8jhqzh{0%{top:0px;}50%{top:5px;}100%{top:10px;}}", - "@-webkit-keyframes r-animation-5azpl5{from{left:0px;}to{left:10px;}}", "@keyframes r-animation-5azpl5{from{left:0px;}to{left:10px;}}", ], 3, @@ -133,9 +131,6 @@ describe('StyleSheet/compile', () => { ], [ [ - ".r-placeholderTextColor-1418aci::-webkit-input-placeholder{color:rgba(128,128,128,1.00);opacity:1;}", - ".r-placeholderTextColor-1418aci::-moz-placeholder{color:rgba(128,128,128,1.00);opacity:1;}", - ".r-placeholderTextColor-1418aci:-ms-input-placeholder{color:rgba(128,128,128,1.00);opacity:1;}", ".r-placeholderTextColor-1418aci::placeholder{color:rgba(128,128,128,1.00);opacity:1;}", ], 3, @@ -250,9 +245,7 @@ describe('StyleSheet/compile', () => { [ [ [ - "@-webkit-keyframes r-animation-8jhqzh{0%{top:0px;}50%{top:5px;}100%{top:10px;}}", "@keyframes r-animation-8jhqzh{0%{top:0px;}50%{top:5px;}100%{top:10px;}}", - "@-webkit-keyframes r-animation-5azpl5{from{left:0px;}to{left:10px;}}", "@keyframes r-animation-5azpl5{from{left:0px;}to{left:10px;}}", ".css-test-tbk4su{animation-direction:alternate,alternate-reverse;animation-name:r-animation-8jhqzh,r-animation-5azpl5;font:14px -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;margin-left:10px;margin-right:10px;transform:translateX(50px) scale(-1);}", ], diff --git a/packages/react-native-web/src/exports/StyleSheet/__tests__/dom-test.js b/packages/react-native-web/src/exports/StyleSheet/__tests__/dom-test.js index 533b2b8c7c..d3a5c557a5 100644 --- a/packages/react-native-web/src/exports/StyleSheet/__tests__/dom-test.js +++ b/packages/react-native-web/src/exports/StyleSheet/__tests__/dom-test.js @@ -50,7 +50,6 @@ describe('createSheet', () => { expect(sheet).not.toBe(shadowSheet); expect(shadowSheet.id).toMatchInlineSnapshot(`"react-native-stylesheet"`); expect(typeof shadowSheet.insert).toBe('function'); - // expect(shadowRoot.getElementById('react-native-stylesheet')).not.toBe(null); // Does the content match existing sheets? expect(shadowSheet.getTextContent().includes('test-sheet')).toBe(true); // Does the content update when other sheets are updated? diff --git a/packages/react-native-web/src/exports/StyleSheet/__tests__/dom-test.node.js b/packages/react-native-web/src/exports/StyleSheet/__tests__/dom-test.node.js index 2ad1015dd3..944c4971a5 100644 --- a/packages/react-native-web/src/exports/StyleSheet/__tests__/dom-test.node.js +++ b/packages/react-native-web/src/exports/StyleSheet/__tests__/dom-test.node.js @@ -16,7 +16,7 @@ describe('createSheet', () => { "[stylesheet-group="0"]{} body{margin:0;} button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;} - html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);} + html{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);} input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;}" `); @@ -25,7 +25,7 @@ describe('createSheet', () => { "[stylesheet-group="0"]{} body{margin:0;} button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;} - html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);} + html{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);} input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;} [stylesheet-group="1"]{} .test { opacity: 0 }" diff --git a/packages/react-native-web/src/exports/StyleSheet/__tests__/index-test.js b/packages/react-native-web/src/exports/StyleSheet/__tests__/index-test.js index 888de2624e..b2f899a63f 100644 --- a/packages/react-native-web/src/exports/StyleSheet/__tests__/index-test.js +++ b/packages/react-native-web/src/exports/StyleSheet/__tests__/index-test.js @@ -16,7 +16,7 @@ describe('StyleSheet', () => { "textContent": "[stylesheet-group="0"]{} body{margin:0;} button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;} - html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);} + html{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);} input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;} [stylesheet-group="3"]{} .r-bottom-1p0dtai{bottom:0px;} @@ -40,18 +40,6 @@ describe('StyleSheet', () => { `); }); - test('absoluteFillObject', () => { - expect(StyleSheet.absoluteFillObject).toMatchInlineSnapshot(` - { - "bottom": 0, - "left": 0, - "position": "absolute", - "right": 0, - "top": 0, - } - `); - }); - describe('create', () => { test('returns original style objects', () => { const style = StyleSheet.create({ root: { position: 'absolute' } }); diff --git a/packages/react-native-web/src/exports/StyleSheet/compiler/createReactDOMStyle.js b/packages/react-native-web/src/exports/StyleSheet/compiler/createReactDOMStyle.js index 6274527512..876ae3b345 100644 --- a/packages/react-native-web/src/exports/StyleSheet/compiler/createReactDOMStyle.js +++ b/packages/react-native-web/src/exports/StyleSheet/compiler/createReactDOMStyle.js @@ -7,8 +7,8 @@ * @flow */ +import hyphenateStyleName from './hyphenateStyleName'; import normalizeValueWithProperty from './normalizeValueWithProperty'; -import canUseDOM from '../../../modules/canUseDom'; type Style = { [key: string]: any }; @@ -25,19 +25,12 @@ type Style = { [key: string]: any }; const emptyObject = {}; -const supportsCSS3TextDecoration = - !canUseDOM || - (window.CSS != null && - window.CSS.supports != null && - (window.CSS.supports('text-decoration-line', 'none') || - window.CSS.supports('-webkit-text-decoration-line', 'none'))); - const MONOSPACE_FONT_STACK = 'monospace,monospace'; const SYSTEM_FONT_STACK = '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif'; -const STYLE_SHORT_FORM_EXPANSIONS = { +const STYLE_SHORT_FORM_EXPANSIONS: { [string]: Array } = { borderColor: [ 'borderTopColor', 'borderRightColor', @@ -106,6 +99,117 @@ const STYLE_SHORT_FORM_EXPANSIONS = { //paddingInlineEnd: ['marginRight'], }; +const PREFIXED_PROPERTIES = Object.fromEntries( + [ + 'appearance', + 'backdropFilter', + 'backfaceVisibility', + 'boxDecorationBreak', + 'hyphenateCharacter', + 'hyphens', + 'initialLetter', + 'lineClamp', + 'mask', + 'maskClip', + 'maskImage', + 'maskOrigin', + 'maskPosition', + 'maskRepeat', + 'maskSize', + 'printColorAdjust', + 'rubyPosition', + 'textEmphasis', + 'textEmphasisColor', + 'textEmphasisPosition', + 'textEmphasisStyle', + 'textSizeAdjust', + 'userSelect' + ].map((prop) => [ + prop, + 'Webkit' + prop.charAt(0).toUpperCase() + prop.substring(1) + ]) +); + +const PREFIXED_PROPERTY_NAMES = Object.keys(PREFIXED_PROPERTIES) + .map(hyphenateStyleName) + .join('|'); + +const PREFIXED_PROPERTY_TEST_PATTERN = new RegExp( + `(?:^|[\\s,])(?:${PREFIXED_PROPERTY_NAMES})(?=[\\s,]|$)` +); + +const PREFIXED_PROPERTY_REPLACE_PATTERN = new RegExp( + `(^|\\s)(${PREFIXED_PROPERTY_NAMES})(?=\\s|$)`, + 'g' +); + +const SIZING_PROPERTIES: Set = new Set([ + 'height', + 'width', + 'minHeight', + 'minWidth', + 'maxHeight', + 'maxWidth', + 'columnWidth' +]); + +const PREFIXED_SIZING_VALUES: Set = new Set([ + 'min-content', + 'max-content', + 'fill-available', + 'fit-content', + 'contain-floats' +]); + +const PREFIXED_FUNCTIONS_PATTERN = /(cross-fade|image-set)\(/g; + +// Only split multi values, not cubic beziers +const VALUE_SEPARATOR_PATTERN = /,(?![^()]*(?:\([^()]*\))?\))/g; + +const prefixTransitionValue = (value: string): string => { + if (!PREFIXED_PROPERTY_TEST_PATTERN.test(value)) { + return value; + } + + return value + .split(VALUE_SEPARATOR_PATTERN) + .map((singleValue) => { + const prefixedValue = singleValue.replace( + PREFIXED_PROPERTY_REPLACE_PATTERN, + '$1-webkit-$2' + ); + + return prefixedValue !== singleValue + ? `${prefixedValue},${singleValue}` + : singleValue; + }) + .join(','); +}; + +const prefixValue = (prop: string, value: any): any => { + if (typeof value !== 'string' || value.indexOf('-webkit-') > -1) { + return value; + } + + const prefixedValue = value.replace( + PREFIXED_FUNCTIONS_PATTERN, + '-webkit-$1(' + ); + + if (prefixedValue !== value) { + return [prefixedValue, value]; + } + + if (SIZING_PROPERTIES.has(prop) && PREFIXED_SIZING_VALUES.has(value)) { + return ['-webkit-' + value, value]; + } + if (prop === 'transition' || prop === 'transitionProperty') { + return prefixTransitionValue(value); + } + + return value; +}; + /** * Reducer */ @@ -115,7 +219,7 @@ const createReactDOMStyle = (style: Style, isInline?: boolean): Style => { return emptyObject; } - const resolvedStyle = {}; + const resolvedStyle: Style = {}; for (const prop in style) { const value = style[prop]; @@ -128,10 +232,8 @@ const createReactDOMStyle = (style: Style, isInline?: boolean): Style => { } if (prop === 'backgroundClip') { - // TODO: remove once this issue is fixed - // https://github.com/rofrischmann/inline-style-prefixer/issues/159 + resolvedStyle.backgroundClip = value; if (value === 'text') { - resolvedStyle.backgroundClip = value; resolvedStyle.WebkitBackgroundClip = value; } } else if (prop === 'flex') { @@ -154,14 +256,6 @@ const createReactDOMStyle = (style: Style, isInline?: boolean): Style => { } else { resolvedStyle[prop] = value; } - } else if (prop === 'textDecorationLine') { - // use 'text-decoration' for browsers that only support CSS2 - // text-decoration (e.g., IE, Edge) - if (!supportsCSS3TextDecoration) { - resolvedStyle.textDecoration = value; - } else { - resolvedStyle.textDecorationLine = value; - } } else if (prop === 'writingDirection') { resolvedStyle.direction = value; } else { @@ -195,15 +289,28 @@ const createReactDOMStyle = (style: Style, isInline?: boolean): Style => { resolvedStyle.paddingBottom = value; } } else if (longFormProperties) { - longFormProperties.forEach((longForm, i) => { + longFormProperties.forEach((longForm) => { // The value of any longform property in the original styles takes // precedence over the shortform's value. if (style[longForm] == null) { resolvedStyle[longForm] = value; } }); - } else { + } else if (isInline) { resolvedStyle[prop] = value; + } else { + const prefixedProp = PREFIXED_PROPERTIES[prop]; + const prefixedValue = prefixValue(prop, value); + resolvedStyle[prop] = prefixedValue; + + if (prefixedProp != null) { + resolvedStyle[prefixedProp] = prefixedValue; + } + + // Firefox < 97 + if (prop === 'printColorAdjust') { + resolvedStyle.colorAdjust = prefixedValue; + } } } } diff --git a/packages/react-native-web/src/exports/StyleSheet/compiler/hash.js b/packages/react-native-web/src/exports/StyleSheet/compiler/hash.js index 58766d68d6..85b8fea039 100644 --- a/packages/react-native-web/src/exports/StyleSheet/compiler/hash.js +++ b/packages/react-native-web/src/exports/StyleSheet/compiler/hash.js @@ -15,7 +15,7 @@ * @flow */ -function murmurhash2_32_gc(str, seed) { +function murmurhash2_32_gc(str: string, seed: number): number { var l = str.length, h = seed ^ l, i = 0, diff --git a/packages/react-native-web/src/exports/StyleSheet/compiler/hyphenateStyleName.js b/packages/react-native-web/src/exports/StyleSheet/compiler/hyphenateStyleName.js index d7ec58d5d9..6b3232393c 100644 --- a/packages/react-native-web/src/exports/StyleSheet/compiler/hyphenateStyleName.js +++ b/packages/react-native-web/src/exports/StyleSheet/compiler/hyphenateStyleName.js @@ -9,9 +9,9 @@ const uppercasePattern = /[A-Z]/g; const msPattern = /^ms-/; -const cache = {}; +const cache: { [string]: string } = {}; -function toHyphenLower(match) { +function toHyphenLower(match: string) { return '-' + match.toLowerCase(); } diff --git a/packages/react-native-web/src/exports/StyleSheet/compiler/index.js b/packages/react-native-web/src/exports/StyleSheet/compiler/index.js index 61f9f5c35a..a09e315d28 100644 --- a/packages/react-native-web/src/exports/StyleSheet/compiler/index.js +++ b/packages/react-native-web/src/exports/StyleSheet/compiler/index.js @@ -11,7 +11,6 @@ import createReactDOMStyle from './createReactDOMStyle'; import hash from './hash'; import hyphenateStyleName from './hyphenateStyleName'; import normalizeValueWithProperty from './normalizeValueWithProperty'; -import prefixStyles from '../../../modules/prefixStyles'; type Value = Object | Array | string | number; type Style = { [key: string]: Value }; @@ -25,7 +24,7 @@ type CompiledStyle = { }; type CompilerOutput = [CompiledStyle, Array]; -const cache = new Map(); +const cache = new Map(); const emptyObject = {}; const classicGroup = 1; @@ -141,7 +140,7 @@ export function atomic(style: Style): CompilerOutput { const compiledStyle: CompiledStyle = { $$css: true }; const compiledRules = []; - function atomicCompile(srcProp, prop, value) { + function atomicCompile(srcProp: string, prop: string, value: Value): string { const valueString = stringifyValueWithProperty(value, prop); const cacheKey = prop + valueString; const cachedResult = cache.get(cacheKey); @@ -166,7 +165,7 @@ export function atomic(style: Style): CompilerOutput { .forEach((srcProp) => { const value = style[srcProp]; if (value != null) { - let localizeableValue; + let localizeableValue: string | Array | void; // BiDi flip values if (PROPERTIES_VALUE.indexOf(srcProp) > -1) { const left = atomicCompile(srcProp, srcProp, 'left'); @@ -236,8 +235,8 @@ export function atomic(style: Style): CompilerOutput { * No support for 'placeholderTextColor', 'scrollbarWidth', or 'pointerEvents'. */ export function classic(style: Style, name: string): CompilerOutput { - const compiledStyle = { $$css: true }; - const compiledRules = []; + const compiledStyle: CompiledStyle = { $$css: true }; + const compiledRules: Rules = []; const { animationKeyframes, ...rest } = style; const identifier = createIdentifier('css', name, JSON.stringify(style)); @@ -263,10 +262,10 @@ export function classic(style: Style, name: string): CompilerOutput { export function inline( originalStyle: Style, isRTL?: boolean -): { [key: string]: mixed } { +): { [key: string]: unknown } { const style = originalStyle || emptyObject; - const frozenProps = {}; - const nextStyle = {}; + const frozenProps: { [string]: boolean } = {}; + const nextStyle: Style = {}; for (const originalProp in style) { const originalValue = style[originalProp]; @@ -274,6 +273,7 @@ export function inline( let value = originalValue; if ( + // $FlowFixMe[invalid-this-arg] !Object.prototype.hasOwnProperty.call(style, originalProp) || originalValue == null ) { @@ -295,7 +295,6 @@ export function inline( } // BiDi flip transitionProperty value if (originalProp === 'transitionProperty') { - // $FlowFixMe const originalValues = Array.isArray(originalValue) ? originalValue : [originalValue]; @@ -321,10 +320,6 @@ export function inline( if (prop === originalProp) { frozenProps[prop] = true; } - - // if (PROPERTIES_I18N.hasOwnProperty(originalProp)) { - // frozenProps[prop] = true; - //} } return createReactDOMStyle(nextStyle, true); @@ -334,10 +329,7 @@ export function inline( * Create a value string that normalizes different input values with a common * output. */ -export function stringifyValueWithProperty( - value: Value, - property: ?string -): string { +function stringifyValueWithProperty(value: Value, property: ?string): string { // e.g., 0 => '0px', 'black' => 'rgba(0,0,0,1)' const normalizedValue = normalizeValueWithProperty(value, property); return typeof normalizedValue !== 'string' @@ -349,8 +341,12 @@ export function stringifyValueWithProperty( * Create the Atomic CSS rules needed for a given StyleSheet rule. * Translates StyleSheet declarations to CSS. */ -function createAtomicRules(identifier: string, property, value): Rules { - const rules = []; +function createAtomicRules( + identifier: string, + property: string, + value: Value +): Rules { + const rules: Rules = []; const selector = `.${identifier}`; // Handle non-standard properties and object values that require multiple @@ -368,12 +364,7 @@ function createAtomicRules(identifier: string, property, value): Rules { // Equivalent to using '::placeholder' case 'placeholderTextColor': { const block = createDeclarationBlock({ color: value, opacity: 1 }); - rules.push( - `${selector}::-webkit-input-placeholder${block}`, - `${selector}::-moz-placeholder${block}`, - `${selector}:-ms-input-placeholder${block}`, - `${selector}::placeholder${block}` - ); + rules.push(`${selector}::placeholder${block}`); break; } @@ -427,15 +418,15 @@ function createAtomicRules(identifier: string, property, value): Rules { * Creates a CSS declaration block from a StyleSheet object. */ function createDeclarationBlock(style: Style): string { - const domStyle = prefixStyles(createReactDOMStyle(style)); + const domStyle = createReactDOMStyle(style); const declarationsString = Object.keys(domStyle) .map((property) => { const value = domStyle[property]; const prop = hyphenateStyleName(property); - // The prefixer may return an array of values: - // { display: [ '-webkit-flex', 'flex' ] } + // The prefixing function may return an array of values: + // { width: [ '-webkit-fill-available', 'fill-available' ] } // to represent "fallback" declarations - // { display: -webkit-flex; display: flex; } + // { width: -webkit-fill-available; width: fill-available; } if (Array.isArray(value)) { return value.map((v) => `${prop}:${v}`).join(';'); } else { @@ -464,7 +455,6 @@ function createIdentifier(prefix: string, name: string, key: string): string { * Create individual CSS keyframes rules. */ function createKeyframes(keyframes: Object): [string, Rules] { - const prefixes = ['-webkit-', '']; const identifier = createIdentifier( 'r', 'animation', @@ -482,22 +472,20 @@ function createKeyframes(keyframes: Object): [string, Rules] { .join('') + '}'; - const rules = prefixes.map((prefix) => { - return `@${prefix}keyframes ${identifier}${steps}`; - }); + const rules = [`@keyframes ${identifier}${steps}`]; return [identifier, rules]; } /** * Create CSS keyframes rules and names from a StyleSheet keyframes object. */ -function processKeyframesValue(keyframesValue) { +function processKeyframesValue(keyframesValue: Value): [Array, Rules] { if (typeof keyframesValue === 'number') { throw new Error(`Invalid CSS keyframes type: ${typeof keyframesValue}`); } - const animationNames = []; - const rules = []; + const animationNames: Array = []; + const rules: Rules = []; const value = Array.isArray(keyframesValue) ? keyframesValue : [keyframesValue]; diff --git a/packages/react-native-web/src/exports/StyleSheet/compiler/normalizeValueWithProperty.js b/packages/react-native-web/src/exports/StyleSheet/compiler/normalizeValueWithProperty.js index 1e89a977fe..1c629c1927 100644 --- a/packages/react-native-web/src/exports/StyleSheet/compiler/normalizeValueWithProperty.js +++ b/packages/react-native-web/src/exports/StyleSheet/compiler/normalizeValueWithProperty.js @@ -7,19 +7,20 @@ * @flow strict-local */ -import unitlessNumbers from './unitlessNumbers'; +import isUnitlessNumber from '../../../modules/isUnitlessNumber'; import normalizeColor from './normalizeColor'; -const colorProps = { +const colorProps: { [string]: boolean } = { backgroundColor: true, - borderColor: true, - borderTopColor: true, - borderRightColor: true, borderBottomColor: true, + borderColor: true, borderLeftColor: true, + borderRightColor: true, + borderTopColor: true, color: true, shadowColor: true, textDecorationColor: true, + textEmphasisColor: true, textShadowColor: true }; @@ -27,14 +28,13 @@ export default function normalizeValueWithProperty( value: any, property?: ?string ): any { - let returnValue = value; if ( - (property == null || !unitlessNumbers[property]) && - typeof value === 'number' + typeof value === 'number' && + (property == null || !isUnitlessNumber(property)) ) { - returnValue = `${value}px`; + return `${value}px`; } else if (property != null && colorProps[property]) { - returnValue = normalizeColor(value); + return normalizeColor(value); } - return returnValue; + return value; } diff --git a/packages/react-native-web/src/exports/StyleSheet/compiler/resolveShadowValue.js b/packages/react-native-web/src/exports/StyleSheet/compiler/resolveShadowValue.js deleted file mode 100644 index 6b1b965139..0000000000 --- a/packages/react-native-web/src/exports/StyleSheet/compiler/resolveShadowValue.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (c) Nicolas Gallagher. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -import normalizeColor from './normalizeColor'; -import normalizeValueWithProperty from './normalizeValueWithProperty'; - -const defaultOffset = { height: 0, width: 0 }; - -const resolveShadowValue = (style: Object): void | string => { - const { shadowColor, shadowOffset, shadowOpacity, shadowRadius } = style; - const { height, width } = shadowOffset || defaultOffset; - const offsetX = normalizeValueWithProperty(width); - const offsetY = normalizeValueWithProperty(height); - const blurRadius = normalizeValueWithProperty(shadowRadius || 0); - const color = normalizeColor(shadowColor || 'black', shadowOpacity); - if ( - color != null && - offsetX != null && - offsetY != null && - blurRadius != null - ) { - return `${offsetX} ${offsetY} ${blurRadius} ${color}`; - } -}; - -export default resolveShadowValue; diff --git a/packages/react-native-web/src/exports/StyleSheet/compiler/unitlessNumbers.js b/packages/react-native-web/src/exports/StyleSheet/compiler/unitlessNumbers.js deleted file mode 100644 index 43a980626a..0000000000 --- a/packages/react-native-web/src/exports/StyleSheet/compiler/unitlessNumbers.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Copyright (c) Nicolas Gallagher. - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -const unitlessNumbers = { - animationIterationCount: true, - aspectRatio: true, - borderImageOutset: true, - borderImageSlice: true, - borderImageWidth: true, - boxFlex: true, - boxFlexGroup: true, - boxOrdinalGroup: true, - columnCount: true, - flex: true, - flexGrow: true, - flexOrder: true, - flexPositive: true, - flexShrink: true, - flexNegative: true, - fontWeight: true, - gridRow: true, - gridRowEnd: true, - gridRowGap: true, - gridRowStart: true, - gridColumn: true, - gridColumnEnd: true, - gridColumnGap: true, - gridColumnStart: true, - lineClamp: true, - opacity: true, - order: true, - orphans: true, - tabSize: true, - widows: true, - zIndex: true, - zoom: true, - // SVG-related - fillOpacity: true, - floodOpacity: true, - stopOpacity: true, - strokeDasharray: true, - strokeDashoffset: true, - strokeMiterlimit: true, - strokeOpacity: true, - strokeWidth: true, - // transform types - scale: true, - scaleX: true, - scaleY: true, - scaleZ: true, - // RN properties - shadowOpacity: true -}; - -/** - * Support style names that may come passed in prefixed by adding permutations - * of vendor prefixes. - */ -const prefixes = ['ms', 'Moz', 'O', 'Webkit']; -const prefixKey = (prefix: string, key: string) => { - return prefix + key.charAt(0).toUpperCase() + key.substring(1); -}; -Object.keys(unitlessNumbers).forEach((prop) => { - prefixes.forEach((prefix) => { - unitlessNumbers[prefixKey(prefix, prop)] = unitlessNumbers[prop]; - }); -}); - -export default unitlessNumbers; diff --git a/packages/react-native-web/src/exports/StyleSheet/dom/createCSSStyleSheet.js b/packages/react-native-web/src/exports/StyleSheet/dom/createCSSStyleSheet.js index 93b961a14d..9eb8052870 100644 --- a/packages/react-native-web/src/exports/StyleSheet/dom/createCSSStyleSheet.js +++ b/packages/react-native-web/src/exports/StyleSheet/dom/createCSSStyleSheet.js @@ -8,7 +8,6 @@ */ import canUseDOM from '../../../modules/canUseDom'; -// $FlowFixMe: HTMLStyleElement is incorrectly typed - https://github.com/facebook/flow/issues/2696 export default function createCSSStyleSheet( id: string, rootNode?: Document | ShadowRoot, @@ -16,7 +15,7 @@ export default function createCSSStyleSheet( ): ?CSSStyleSheet { if (canUseDOM) { const root = rootNode != null ? rootNode : document; - let element = root.getElementById(id); + let element = root.querySelector(`style#${id}`); if (element == null) { element = document.createElement('style'); element.setAttribute('id', id); @@ -32,7 +31,6 @@ export default function createCSSStyleSheet( } } } - // $FlowFixMe: HTMLElement is incorrectly typed return element.sheet; } else { return null; diff --git a/packages/react-native-web/src/exports/StyleSheet/dom/createOrderedCSSStyleSheet.js b/packages/react-native-web/src/exports/StyleSheet/dom/createOrderedCSSStyleSheet.js index 3999ca08be..d270438506 100644 --- a/packages/react-native-web/src/exports/StyleSheet/dom/createOrderedCSSStyleSheet.js +++ b/packages/react-native-web/src/exports/StyleSheet/dom/createOrderedCSSStyleSheet.js @@ -11,12 +11,10 @@ type Groups = { [key: number]: { start: ?number, rules: Array } }; type Selectors = { [key: string]: boolean }; export type OrderedCSSStyleSheet = {| - getTextContent: () => string, - insert: (cssText: string, groupValue: number) => void + readonly getTextContent: () => string, + readonly insert: (cssText: string, groupValue: number) => void |}; -const slice = Array.prototype.slice; - /** * Order-based insertion of CSS. * @@ -43,7 +41,7 @@ export default function createOrderedCSSStyleSheet( */ if (sheet != null) { let group; - slice.call(sheet.cssRules).forEach((cssRule, i) => { + Array.from(sheet.cssRules).forEach((cssRule, i) => { const cssText = cssRule.cssText; // Create record of existing selectors and rules if (cssText.indexOf('stylesheet-group') > -1) { @@ -59,7 +57,7 @@ export default function createOrderedCSSStyleSheet( }); } - function sheetInsert(sheet, group, text) { + function sheetInsert(sheet: CSSStyleSheet, group: number, text: string) { const orderedGroups = getOrderedGroups(groups); const groupIndex = orderedGroups.indexOf(group); const nextGroupIndex = groupIndex + 1; @@ -99,7 +97,9 @@ export default function createOrderedCSSStyleSheet( // build-time extraction of the style sheet. const marker = rules.shift(); rules.sort(); - rules.unshift(marker); + if (marker != null) { + rules.unshift(marker); + } return rules.join('\n'); }) .join('\n'); @@ -150,12 +150,12 @@ export default function createOrderedCSSStyleSheet( * Helper functions */ -function encodeGroupRule(group) { +function encodeGroupRule(group: number) { return `[stylesheet-group="${group}"]{}`; } const groupPattern = /["']/g; -function decodeGroupRule(cssRule) { +function decodeGroupRule(cssRule: any) { return Number(cssRule.selectorText.split(groupPattern)[1]); } @@ -166,14 +166,17 @@ function getOrderedGroups(obj: { [key: number]: any }) { } const selectorPattern = /\s*([,])\s*/g; -function getSelectorText(cssText) { +function getSelectorText(cssText: string) { const selector = cssText.split('{')[0].trim(); return selector !== '' ? selector.replace(selectorPattern, '$1') : null; } -function insertRuleAt(root, cssText: string, position: number): boolean { +function insertRuleAt( + root: CSSStyleSheet, + cssText: string, + position: number +): boolean { try { - // $FlowFixMe: Flow is missing CSSOM types needed to type 'root'. root.insertRule(cssText, position); return true; } catch (e) { diff --git a/packages/react-native-web/src/exports/StyleSheet/dom/index.js b/packages/react-native-web/src/exports/StyleSheet/dom/index.js index c55fd5a382..614f0d4c31 100644 --- a/packages/react-native-web/src/exports/StyleSheet/dom/index.js +++ b/packages/react-native-web/src/exports/StyleSheet/dom/index.js @@ -19,11 +19,11 @@ type Sheet = { const defaultId = 'react-native-stylesheet'; const roots = new WeakMap(); -const sheets = []; +const sheets: Array = []; const initialRules = [ // minimal top-level reset - 'html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}', + 'html{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}', 'body{margin:0;}', // minimal form pseudo-element reset 'button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}', @@ -34,7 +34,7 @@ export function createSheet( root?: HTMLElement, id?: string = defaultId ): Sheet { - let sheet; + let sheet: OrderedCSSStyleSheet; if (canUseDOM) { const rootNode: Node = root != null ? root.getRootNode() : document; @@ -55,7 +55,7 @@ export function createSheet( initialSheet != null ? initialSheet.getTextContent() : ''; // Cast rootNode to 'any' because Flow types for getRootNode are wrong sheet = createOrderedCSSStyleSheet( - createCSSStyleSheet(id, (rootNode: any), textContent) + createCSSStyleSheet(id, rootNode as any, textContent) ); roots.set(rootNode, sheets.length); sheets.push(sheet); diff --git a/packages/react-native-web/src/exports/StyleSheet/index.js b/packages/react-native-web/src/exports/StyleSheet/index.js index a13393665b..48b541dee8 100644 --- a/packages/react-native-web/src/exports/StyleSheet/index.js +++ b/packages/react-native-web/src/exports/StyleSheet/index.js @@ -20,7 +20,7 @@ const sheet = createSheet(); const defaultPreprocessOptions = { shadow: true, textShadow: true }; -function customStyleq(styles, options: Options = {}) { +function customStyleq(styles: any, options: Options = {}) { const { writingDirection, ...preprocessOptions } = options; const isRTL = writingDirection === 'rtl'; return styleq.factory({ @@ -37,7 +37,7 @@ function customStyleq(styles, options: Options = {}) { })(styles); } -function insertRules(compiledOrderedRules) { +function insertRules(compiledOrderedRules: Array<[Array, number]>) { compiledOrderedRules.forEach(([rules, order]) => { if (sheet != null) { rules.forEach((rule) => { @@ -47,7 +47,7 @@ function insertRules(compiledOrderedRules) { }); } -function compileAndInsertAtomic(style) { +function compileAndInsertAtomic(style: { [key: string]: any }) { const [compiledStyle, compiledOrderedRules] = atomic( preprocess(style, defaultPreprocessOptions) ); @@ -55,7 +55,7 @@ function compileAndInsertAtomic(style) { return compiledStyle; } -function compileAndInsertReset(style, key) { +function compileAndInsertReset(style: { [key: string]: any }, key: string) { const [compiledStyle, compiledOrderedRules] = classic(style, key); insertRules(compiledOrderedRules); return compiledStyle; @@ -63,22 +63,17 @@ function compileAndInsertReset(style, key) { /* ----- API ----- */ -const absoluteFillObject = { - position: 'absolute', - left: 0, - right: 0, - top: 0, - bottom: 0 -}; - -const absoluteFill = create({ x: { ...absoluteFillObject } }).x; +const absoluteFill = create({ + x: { position: 'absolute', left: 0, right: 0, top: 0, bottom: 0 } +}).x; /** * create */ -function create(styles: T): $ReadOnly { - Object.keys(styles).forEach((key) => { - const styleObj = styles[key]; +function create(styles: T): Readonly { + const stylesMap: { [key: string]: any } = styles; + Object.keys(stylesMap).forEach((key) => { + const styleObj = stylesMap[key]; // Only compile at runtime if the style is not already compiled if (styleObj != null && styleObj.$$css !== true) { let compiledStyles; @@ -87,7 +82,7 @@ function create(styles: T): $ReadOnly { } else { if (process.env.NODE_ENV !== 'production') { validate(styleObj); - styles[key] = Object.freeze(styleObj); + stylesMap[key] = Object.freeze(styleObj); } compiledStyles = compileAndInsertAtomic(styleObj); } @@ -113,11 +108,6 @@ function compose(style1: any, style2: any): any { ); } /* eslint-enable prefer-rest-params */ - /* - console.warn( - 'StyleSheet.compose(a, b) is deprecated; use array syntax, i.e., [a,b].' - ); - */ } return [style1, style2]; } @@ -131,7 +121,7 @@ function flatten(...styles: any): { [key: string]: any } { for (let i = 0; i < flatArray.length; i++) { const style = flatArray[i]; if (style != null && typeof style === 'object') { - // $FlowFixMe + // $FlowFixMe[unsafe-object-assign] Object.assign(result, style); } } @@ -151,11 +141,11 @@ function getSheet(): { id: string, textContent: string } { /** * resolve */ -type StyleProps = [string, { [key: string]: mixed } | null]; +type StyleProps = [string, { [key: string]: unknown } | null]; type Options = { shadow?: boolean, textShadow?: boolean, - writingDirection: 'ltr' | 'rtl' + writingDirection?: 'ltr' | 'rtl' }; function StyleSheet(styles: any, options?: Options = {}): StyleProps { @@ -168,7 +158,6 @@ function StyleSheet(styles: any, options?: Options = {}): StyleProps { } StyleSheet.absoluteFill = absoluteFill; -StyleSheet.absoluteFillObject = absoluteFillObject; StyleSheet.create = create; StyleSheet.compose = compose; StyleSheet.flatten = flatten; @@ -177,19 +166,22 @@ StyleSheet.getSheet = getSheet; // round sub-pixel values down to `0`, causing the line not to be rendered. StyleSheet.hairlineWidth = 1; -if (canUseDOM && window.__REACT_DEVTOOLS_GLOBAL_HOOK__) { - window.__REACT_DEVTOOLS_GLOBAL_HOOK__.resolveRNStyle = StyleSheet.flatten; +// $FlowFixMe[incompatible-use] +const devToolsHook = canUseDOM ? window.__REACT_DEVTOOLS_GLOBAL_HOOK__ : null; + +if (devToolsHook) { + devToolsHook.resolveRNStyle = StyleSheet.flatten; } export type IStyleSheet = { - (styles: $ReadOnlyArray, options?: Options): StyleProps, + (styles: ReadonlyArray, options?: Options): StyleProps, absoluteFill: Object, - absoluteFillObject: Object, create: typeof create, compose: typeof compose, flatten: typeof flatten, getSheet: typeof getSheet, - hairlineWidth: number + hairlineWidth: number, + ... }; const stylesheet: IStyleSheet = StyleSheet; diff --git a/packages/react-native-web/src/exports/StyleSheet/preprocess.js b/packages/react-native-web/src/exports/StyleSheet/preprocess.js index 09469a8268..fb864adcb0 100644 --- a/packages/react-native-web/src/exports/StyleSheet/preprocess.js +++ b/packages/react-native-web/src/exports/StyleSheet/preprocess.js @@ -10,7 +10,7 @@ import normalizeColor from './compiler/normalizeColor'; import normalizeValueWithProperty from './compiler/normalizeValueWithProperty'; -const emptyObject = {}; +const emptyObject: { [string]: any } = {}; /** * Shadows @@ -121,7 +121,7 @@ const PROPERTIES_STANDARD: { [key: string]: string } = { start: 'insetInlineStart' }; -const ignoredProps = { +const ignoredProps: { [string]: boolean } = { elevation: true, overlayColor: true, resizeMode: true, @@ -131,12 +131,12 @@ const ignoredProps = { /** * Preprocess styles */ -export const preprocess = ( +export const preprocess = ( originalStyle: T, - options?: { shadow?: boolean, textShadow?: boolean } = {} + options?: { readonly shadow?: boolean, readonly textShadow?: boolean } = {} ): T => { const style = originalStyle || emptyObject; - const nextStyle = {}; + const nextStyle: { [string]: any } = {}; // Convert shadow styles if ( @@ -189,6 +189,7 @@ export const preprocess = ( let value = originalValue; if ( + // $FlowFixMe[invalid-this-arg] !Object.prototype.hasOwnProperty.call(style, originalProp) || (prop !== originalProp && style[prop] != null) ) { @@ -227,8 +228,7 @@ export const preprocess = ( } } - // $FlowIgnore - return nextStyle; + return nextStyle as any; }; export default preprocess; diff --git a/packages/react-native-web/src/exports/Switch/index.js b/packages/react-native-web/src/exports/Switch/index.js index 93282f621e..921a661e76 100644 --- a/packages/react-native-web/src/exports/Switch/index.js +++ b/packages/react-native-web/src/exports/Switch/index.js @@ -24,6 +24,7 @@ type SwitchProps = { activeTrackColor?: ColorValue, disabled?: boolean, onValueChange?: (e: any) => void, + ref?: React.Ref, thumbColor?: ColorValue, trackColor?: ColorValue | {| false: ColorValue, true: ColorValue |}, value?: boolean @@ -41,10 +42,7 @@ const defaultActiveThumbColor = '#009688'; const defaultThumbColor = '#FAFAFA'; const defaultDisabledThumbColor = '#BDBDBD'; -const Switch: React.AbstractComponent< - SwitchProps, - React.ElementRef -> = React.forwardRef((props, forwardedRef) => { +const Switch = (props: SwitchProps): React.Node => { const { 'aria-label': ariaLabel, accessibilityLabel, @@ -52,6 +50,7 @@ const Switch: React.AbstractComponent< activeTrackColor, disabled = false, onValueChange, + ref, style = emptyObject, thumbColor, trackColor, @@ -59,7 +58,7 @@ const Switch: React.AbstractComponent< ...other } = props; - const thumbRef = React.useRef(null); + const thumbRef = React.useRef>(null); function handleChange(event: Object) { if (onValueChange != null) { @@ -98,8 +97,8 @@ const Switch: React.AbstractComponent< })(); const thumbCurrentColor = value - ? activeThumbColor ?? defaultActiveThumbColor - : thumbColor ?? defaultThumbColor; + ? (activeThumbColor ?? defaultActiveThumbColor) + : (thumbColor ?? defaultThumbColor); const thumbHeight = height; const thumbWidth = thumbHeight; @@ -175,7 +174,7 @@ const Switch: React.AbstractComponent< onBlur: handleFocusState, onChange: handleChange, onFocus: handleFocusState, - ref: forwardedRef, + ref, style: [styles.nativeControl, styles.cursorInherit], type: 'checkbox', role: 'switch' @@ -188,7 +187,7 @@ const Switch: React.AbstractComponent< {nativeControl} ); -}); +}; Switch.displayName = 'Switch'; @@ -205,7 +204,7 @@ const styles = StyleSheet.create({ }, track: { forcedColorAdjust: 'none', - ...StyleSheet.absoluteFillObject, + ...StyleSheet.absoluteFill, height: '70%', margin: 'auto', transitionDuration: '0.1s', @@ -224,7 +223,7 @@ const styles = StyleSheet.create({ insetInlineStart: '100%' }, nativeControl: { - ...StyleSheet.absoluteFillObject, + ...StyleSheet.absoluteFill, height: '100%', margin: 0, appearance: 'none', diff --git a/packages/react-native-web/src/exports/Text/TextAncestorContext.js b/packages/react-native-web/src/exports/Text/TextAncestorContext.js index 164b271393..e0cec0bb7c 100644 --- a/packages/react-native-web/src/exports/Text/TextAncestorContext.js +++ b/packages/react-native-web/src/exports/Text/TextAncestorContext.js @@ -14,4 +14,4 @@ import type { Context } from 'react'; import { createContext } from 'react'; const TextAncestorContext = createContext(false); -export default (TextAncestorContext: Context); +export default TextAncestorContext as Context; diff --git a/packages/react-native-web/src/exports/Text/__tests__/index-test.js b/packages/react-native-web/src/exports/Text/__tests__/index-test.js index 21cc3a0992..5bb8dedd5c 100644 --- a/packages/react-native-web/src/exports/Text/__tests__/index-test.js +++ b/packages/react-native-web/src/exports/Text/__tests__/index-test.js @@ -9,7 +9,7 @@ import React from 'react'; import Text from '../'; -import { createEventTarget, setPointerEvent } from 'dom-event-testing-library'; +import { createEventTarget } from 'dom-event-testing-library'; import { act, render } from '@testing-library/react'; describe('components/Text', () => { @@ -231,13 +231,6 @@ describe('components/Text', () => { }); describe('prop "onPointerDown"', () => { - beforeEach(() => { - setPointerEvent(true); - }); - afterEach(() => { - setPointerEvent(false); - }); - test('is called', () => { const onPointerDown = jest.fn(); const ref = React.createRef(); diff --git a/packages/react-native-web/src/exports/Text/index.js b/packages/react-native-web/src/exports/Text/index.js index c00da5c566..f8d9769fe7 100644 --- a/packages/react-native-web/src/exports/Text/index.js +++ b/packages/react-native-web/src/exports/Text/index.js @@ -25,155 +25,155 @@ import StyleSheet from '../StyleSheet'; import TextAncestorContext from './TextAncestorContext'; import { useLocaleContext, getLocaleDirection } from '../../modules/useLocale'; -const forwardPropsList = Object.assign( - {}, - forwardedProps.defaultProps, - forwardedProps.accessibilityProps, - forwardedProps.clickProps, - forwardedProps.focusProps, - forwardedProps.keyboardProps, - forwardedProps.mouseProps, - forwardedProps.touchProps, - forwardedProps.styleProps, - { - href: true, - lang: true, - pointerEvents: true +const forwardPropsList = { + ...forwardedProps.defaultProps, + ...forwardedProps.accessibilityProps, + ...forwardedProps.clickProps, + ...forwardedProps.focusProps, + ...forwardedProps.keyboardProps, + ...forwardedProps.mouseProps, + ...forwardedProps.touchProps, + ...forwardedProps.styleProps, + href: true, + lang: true, + pointerEvents: true +}; + +const pickProps = (props: { ... }) => pick(props, forwardPropsList); + +const Text = (props: { + ...TextProps, + ref?: React.Ref +}): React.Node => { + const { + hrefAttrs, + numberOfLines, + onClick, + onLayout, + onPress, + onMoveShouldSetResponder, + onMoveShouldSetResponderCapture, + onResponderEnd, + onResponderGrant, + onResponderMove, + onResponderReject, + onResponderRelease, + onResponderStart, + onResponderTerminate, + onResponderTerminationRequest, + onScrollShouldSetResponder, + onScrollShouldSetResponderCapture, + onSelectionChangeShouldSetResponder, + onSelectionChangeShouldSetResponderCapture, + onStartShouldSetResponder, + onStartShouldSetResponderCapture, + ref, + selectable, + ...rest + } = props; + + const hasTextAncestor = React.useContext(TextAncestorContext); + const hostRef = React.useRef(null); + const { direction: contextDirection } = useLocaleContext(); + + useElementLayout(hostRef, onLayout); + useResponderEvents(hostRef, { + onMoveShouldSetResponder, + onMoveShouldSetResponderCapture, + onResponderEnd, + onResponderGrant, + onResponderMove, + onResponderReject, + onResponderRelease, + onResponderStart, + onResponderTerminate, + onResponderTerminationRequest, + onScrollShouldSetResponder, + onScrollShouldSetResponderCapture, + onSelectionChangeShouldSetResponder, + onSelectionChangeShouldSetResponderCapture, + onStartShouldSetResponder, + onStartShouldSetResponderCapture + }); + + const handleClick = React.useCallback( + (e: any) => { + if (onClick != null) { + onClick(e); + } else if (onPress != null) { + e.stopPropagation(); + onPress(e); + } + }, + [onClick, onPress] + ); + + let component = hasTextAncestor ? 'span' : 'div'; + + const langDirection = + props.lang != null ? getLocaleDirection(props.lang) : null; + const componentDirection = props.dir || langDirection; + const writingDirection = componentDirection || contextDirection; + + const supportedProps = pickProps(rest); + supportedProps.dir = componentDirection; + // 'auto' by default allows browsers to infer writing direction (root elements only) + if (!hasTextAncestor) { + supportedProps.dir = + componentDirection != null ? componentDirection : 'auto'; } -); - -const pickProps = (props) => pick(props, forwardPropsList); - -const Text: React.AbstractComponent = - React.forwardRef((props, forwardedRef) => { - const { - hrefAttrs, - numberOfLines, - onClick, - onLayout, - onPress, - onMoveShouldSetResponder, - onMoveShouldSetResponderCapture, - onResponderEnd, - onResponderGrant, - onResponderMove, - onResponderReject, - onResponderRelease, - onResponderStart, - onResponderTerminate, - onResponderTerminationRequest, - onScrollShouldSetResponder, - onScrollShouldSetResponderCapture, - onSelectionChangeShouldSetResponder, - onSelectionChangeShouldSetResponderCapture, - onStartShouldSetResponder, - onStartShouldSetResponderCapture, - selectable, - ...rest - } = props; - - const hasTextAncestor = React.useContext(TextAncestorContext); - const hostRef = React.useRef(null); - const { direction: contextDirection } = useLocaleContext(); - - useElementLayout(hostRef, onLayout); - useResponderEvents(hostRef, { - onMoveShouldSetResponder, - onMoveShouldSetResponderCapture, - onResponderEnd, - onResponderGrant, - onResponderMove, - onResponderReject, - onResponderRelease, - onResponderStart, - onResponderTerminate, - onResponderTerminationRequest, - onScrollShouldSetResponder, - onScrollShouldSetResponderCapture, - onSelectionChangeShouldSetResponder, - onSelectionChangeShouldSetResponderCapture, - onStartShouldSetResponder, - onStartShouldSetResponderCapture - }); - - const handleClick = React.useCallback( - (e) => { - if (onClick != null) { - onClick(e); - } else if (onPress != null) { - e.stopPropagation(); - onPress(e); - } - }, - [onClick, onPress] - ); - - let component = hasTextAncestor ? 'span' : 'div'; - - const langDirection = - props.lang != null ? getLocaleDirection(props.lang) : null; - const componentDirection = props.dir || langDirection; - const writingDirection = componentDirection || contextDirection; - - const supportedProps = pickProps(rest); - supportedProps.dir = componentDirection; - // 'auto' by default allows browsers to infer writing direction (root elements only) - if (!hasTextAncestor) { - supportedProps.dir = - componentDirection != null ? componentDirection : 'auto'; - } - if (onClick || onPress) { - supportedProps.onClick = handleClick; - } + if (onClick || onPress) { + supportedProps.onClick = handleClick; + } - supportedProps.style = [ - numberOfLines != null && - numberOfLines > 1 && { WebkitLineClamp: numberOfLines }, - hasTextAncestor === true ? styles.textHasAncestor$raw : styles.text$raw, - numberOfLines === 1 && styles.textOneLine, - numberOfLines != null && numberOfLines > 1 && styles.textMultiLine, - props.style, - selectable === true && styles.selectable, - selectable === false && styles.notSelectable, - onPress && styles.pressable - ]; - - if (props.href != null) { - component = 'a'; - if (hrefAttrs != null) { - const { download, rel, target } = hrefAttrs; - if (download != null) { - supportedProps.download = download; - } - if (rel != null) { - supportedProps.rel = rel; - } - if (typeof target === 'string') { - supportedProps.target = - target.charAt(0) !== '_' ? '_' + target : target; - } + supportedProps.style = [ + numberOfLines != null && + numberOfLines > 1 && { WebkitLineClamp: numberOfLines }, + hasTextAncestor === true ? styles.textHasAncestor$raw : styles.text$raw, + numberOfLines === 1 && styles.textOneLine, + numberOfLines != null && numberOfLines > 1 && styles.textMultiLine, + props.style, + selectable === true && styles.selectable, + selectable === false && styles.notSelectable, + onPress && styles.pressable + ]; + + if (props.href != null) { + component = 'a'; + if (hrefAttrs != null) { + const { download, rel, target } = hrefAttrs; + if (download != null) { + supportedProps.download = download; + } + if (rel != null) { + supportedProps.rel = rel; + } + if (typeof target === 'string') { + supportedProps.target = + target.charAt(0) !== '_' ? '_' + target : target; } } + } - const platformMethodsRef = usePlatformMethods(supportedProps); - const setRef = useMergeRefs(hostRef, platformMethodsRef, forwardedRef); - - supportedProps.ref = setRef; + const platformMethodsRef = usePlatformMethods(supportedProps); + const setRef = useMergeRefs(hostRef, platformMethodsRef, ref); - const element = createElement(component, supportedProps, { - writingDirection - }); + supportedProps.ref = setRef; - return hasTextAncestor ? ( - element - ) : ( - - {element} - - ); + const element = createElement(component, supportedProps, { + writingDirection }); + return hasTextAncestor ? ( + element + ) : ( + + {element} + + ); +}; + Text.displayName = 'Text'; const textStyle = { diff --git a/packages/react-native-web/src/exports/Text/types.js b/packages/react-native-web/src/exports/Text/types.js index ddf391c8b1..7b067e040c 100644 --- a/packages/react-native-web/src/exports/Text/types.js +++ b/packages/react-native-web/src/exports/Text/types.js @@ -34,15 +34,20 @@ export type TextStyle = { fontSize?: ?NumberOrString, fontStyle?: 'italic' | 'normal', fontWeight?: ?FontWeightValue, - fontVariant?: $ReadOnlyArray< + fontVariant?: ReadonlyArray< | 'small-caps' | 'oldstyle-nums' | 'lining-nums' | 'tabular-nums' | 'proportional-nums' >, + hyphenateCharacter?: ?string, + hyphens?: 'auto' | 'manual' | 'none', + initialLetter?: ?NumberOrString, letterSpacing?: ?NumberOrString, + lineClamp?: ?number, lineHeight?: ?NumberOrString, + rubyPosition?: 'alternate' | 'over' | 'under', textAlign?: | 'center' | 'end' @@ -59,6 +64,10 @@ export type TextStyle = { | 'line-through' | 'underline line-through', textDecorationStyle?: 'solid' | 'double' | 'dotted' | 'dashed', + textEmphasis?: ?string, + textEmphasisColor?: ?ColorValue, + textEmphasisPosition?: ?string, + textEmphasisStyle?: ?string, textIndent?: ?NumberOrString, textOverflow?: ?string, textRendering?: @@ -70,6 +79,7 @@ export type TextStyle = { textShadowColor?: ?ColorValue, textShadowOffset?: {| width?: number, height?: number |}, textShadowRadius?: ?number, + textSizeAdjust?: ?string, textTransform?: 'capitalize' | 'lowercase' | 'none' | 'uppercase', unicodeBidi?: | 'normal' diff --git a/packages/react-native-web/src/exports/TextInput/__tests__/index-test.js b/packages/react-native-web/src/exports/TextInput/__tests__/index-test.js index e8030c84c1..c2f03ea917 100644 --- a/packages/react-native-web/src/exports/TextInput/__tests__/index-test.js +++ b/packages/react-native-web/src/exports/TextInput/__tests__/index-test.js @@ -27,8 +27,7 @@ const testIfDocumentIsFocused = (message, fn) => { }; function createEvent(type, data = {}) { - const event = document.createEvent('CustomEvent'); - event.initCustomEvent(type, true, true); + const event = new CustomEvent(type, { bubbles: true, cancelable: true }); if (data != null) { Object.keys(data).forEach((key) => { const value = data[key]; @@ -677,19 +676,12 @@ describe('components/TextInput', () => { describe('prop "selectTextOnFocus"', () => { testIfDocumentIsFocused('value "false"', () => { - const { container } = render(); + const { container } = render(); const input = findInput(container); input.focus(); expect(input.selectionEnd).toEqual(4); expect(input.selectionStart).toEqual(4); }); - - // testIfDocumentIsFocused('value "true"', () => { - // const input = findNativeInput(mount()); - // input.node.focus() - // assert.equal(input.node.selectionEnd, 4) - // assert.equal(input.node.selectionStart, 0) - // }); }); describe('prop "selection"', () => { diff --git a/packages/react-native-web/src/exports/TextInput/index.js b/packages/react-native-web/src/exports/TextInput/index.js index a226ab05e7..5e98baded8 100644 --- a/packages/react-native-web/src/exports/TextInput/index.js +++ b/packages/react-native-web/src/exports/TextInput/index.js @@ -30,7 +30,11 @@ import TextInputState from '../../modules/TextInputState'; * Determines whether a 'selection' prop differs from a node's existing * selection state. */ -const isSelectionStale = (node, selection) => { +type Selection = { readonly start: number, readonly end?: number }; + +type TextInputElement = HTMLInputElement | HTMLTextAreaElement; + +const isSelectionStale = (node: TextInputElement, selection: Selection) => { const { selectionEnd, selectionStart } = node; const { start, end } = selection; return start !== selectionStart || end !== selectionEnd; @@ -40,7 +44,7 @@ const isSelectionStale = (node, selection) => { * Certain input types do no support 'selectSelectionRange' and will throw an * error. */ -const setSelection = (node, selection) => { +const setSelection = (node: TextInputElement, selection: Selection) => { if (isSelectionStale(node, selection)) { const { start, end } = selection; try { @@ -49,51 +53,48 @@ const setSelection = (node, selection) => { } }; -const forwardPropsList = Object.assign( - {}, - forwardedProps.defaultProps, - forwardedProps.accessibilityProps, - forwardedProps.clickProps, - forwardedProps.focusProps, - forwardedProps.keyboardProps, - forwardedProps.mouseProps, - forwardedProps.touchProps, - forwardedProps.styleProps, - { - autoCapitalize: true, - autoComplete: true, - autoCorrect: true, - autoFocus: true, - defaultValue: true, - disabled: true, - lang: true, - maxLength: true, - onChange: true, - onScroll: true, - placeholder: true, - pointerEvents: true, - readOnly: true, - rows: true, - spellCheck: true, - value: true, - type: true - } -); +const forwardPropsList = { + ...forwardedProps.defaultProps, + ...forwardedProps.accessibilityProps, + ...forwardedProps.clickProps, + ...forwardedProps.focusProps, + ...forwardedProps.keyboardProps, + ...forwardedProps.mouseProps, + ...forwardedProps.touchProps, + ...forwardedProps.styleProps, + autoCapitalize: true, + autoComplete: true, + autoCorrect: true, + autoFocus: true, + defaultValue: true, + disabled: true, + lang: true, + maxLength: true, + onChange: true, + onScroll: true, + placeholder: true, + pointerEvents: true, + readOnly: true, + rows: true, + spellCheck: true, + value: true, + type: true +}; -const pickProps = (props) => pick(props, forwardPropsList); +const pickProps = (props: { ... }) => pick(props, forwardPropsList); // If an Input Method Editor is processing key input, the 'keyCode' is 229. // https://www.w3.org/TR/uievents/#determine-keydown-keyup-keyCode -function isEventComposing(nativeEvent) { +function isEventComposing(nativeEvent: KeyboardEvent) { return nativeEvent.isComposing || nativeEvent.keyCode === 229; } -let focusTimeout: ?TimeoutID = null; +let focusTimeout: ?number = null; -const TextInput: React.AbstractComponent< - TextInputProps, - HTMLElement & PlatformMethods -> = React.forwardRef((props, forwardedRef) => { +const TextInput = (props: { + ...TextInputProps, + ref?: React.Ref +}): React.Node => { const { autoCapitalize = 'sentences', autoComplete, @@ -136,6 +137,7 @@ const TextInput: React.AbstractComponent< onSubmitEditing, placeholderTextColor, readOnly = false, + ref, returnKeyType, rows, secureTextEntry = false, @@ -192,10 +194,13 @@ const TextInput: React.AbstractComponent< type = 'password'; } - const dimensions = React.useRef({ height: null, width: null }); + const dimensions = React.useRef<{ height: ?number, width: ?number }>({ + height: null, + width: null + }); const hostRef = React.useRef(null); - const prevSelection = React.useRef(null); - const prevSecureTextEntry = React.useRef(false); + const prevSelection = React.useRef(null); + const prevSecureTextEntry = React.useRef(false); React.useEffect(() => { if (hostRef.current && prevSelection.current) { @@ -205,7 +210,7 @@ const TextInput: React.AbstractComponent< }, [secureTextEntry]); const handleContentSizeChange = React.useCallback( - (hostNode) => { + (hostNode: ?HTMLElement) => { if (multiline && onContentSizeChange && hostNode != null) { const newHeight = hostNode.scrollHeight; const newWidth = hostNode.scrollWidth; @@ -230,7 +235,7 @@ const TextInput: React.AbstractComponent< ); const imperativeRef = React.useMemo( - () => (hostNode) => { + () => (hostNode: any) => { // TextInput needs to add more methods to the hostNode in addition to those // added by `usePlatformMethods`. This is temporarily until an API like // `TextInput.clear(hostRef)` is added to React Native. @@ -252,7 +257,7 @@ const TextInput: React.AbstractComponent< [handleContentSizeChange] ); - function handleBlur(e) { + function handleBlur(e: any) { TextInputState._currentlyFocusedNode = null; if (onBlur) { e.nativeEvent.text = e.target.value; @@ -260,7 +265,7 @@ const TextInput: React.AbstractComponent< } } - function handleChange(e) { + function handleChange(e: any) { const hostNode = e.target; const text = hostNode.value; e.nativeEvent.text = text; @@ -273,7 +278,7 @@ const TextInput: React.AbstractComponent< } } - function handleFocus(e) { + function handleFocus(e: any) { const hostNode = e.target; if (onFocus) { e.nativeEvent.text = hostNode.value; @@ -300,7 +305,7 @@ const TextInput: React.AbstractComponent< } } - function handleKeyDown(e) { + function handleKeyDown(e: any) { const hostNode = e.target; // Prevent key events bubbling (see #612) e.stopPropagation(); @@ -335,7 +340,7 @@ const TextInput: React.AbstractComponent< } } - function handleSelectionChange(e) { + function handleSelectionChange(e: any) { try { const { selectionStart, selectionEnd } = e.target; const selection = { @@ -415,12 +420,7 @@ const TextInput: React.AbstractComponent< const platformMethodsRef = usePlatformMethods(supportedProps); - const setRef = useMergeRefs( - hostRef, - platformMethodsRef, - imperativeRef, - forwardedRef - ); + const setRef = useMergeRefs(hostRef, platformMethodsRef, imperativeRef, ref); supportedProps.ref = setRef; @@ -434,10 +434,9 @@ const TextInput: React.AbstractComponent< }); return element; -}); +}; TextInput.displayName = 'TextInput'; -// $FlowFixMe TextInput.State = TextInputState; const styles = StyleSheet.create({ diff --git a/packages/react-native-web/src/exports/TextInput/types.js b/packages/react-native-web/src/exports/TextInput/types.js index 9e4b4577ce..4bd23fe36c 100644 --- a/packages/react-native-web/src/exports/TextInput/types.js +++ b/packages/react-native-web/src/exports/TextInput/types.js @@ -77,6 +77,7 @@ export type TextInputProps = { editable?: ?boolean, keyboardType?: | 'default' + | 'decimal-pad' | 'email-address' | 'number-pad' | 'numbers-and-punctuation' diff --git a/packages/react-native-web/src/exports/Touchable/BoundingDimensions.js b/packages/react-native-web/src/exports/Touchable/BoundingDimensions.js deleted file mode 100644 index 10f90028c4..0000000000 --- a/packages/react-native-web/src/exports/Touchable/BoundingDimensions.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright (c) Nicolas Gallagher. - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -import PooledClass from '../../vendor/react-native/PooledClass'; - -const twoArgumentPooler = PooledClass.twoArgumentPooler; - -/** - * PooledClass representing the bounding rectangle of a region. - */ -function BoundingDimensions(width: number, height: number) { - this.width = width; - this.height = height; -} - -BoundingDimensions.prototype.destructor = function () { - this.width = null; - this.height = null; -}; - -BoundingDimensions.getPooledFromElement = function (element: HTMLElement): any { - return BoundingDimensions.getPooled( - element.offsetWidth, - element.offsetHeight - ); -}; - -PooledClass.addPoolingTo(BoundingDimensions, twoArgumentPooler); - -export default BoundingDimensions; diff --git a/packages/react-native-web/src/exports/Touchable/Position.js b/packages/react-native-web/src/exports/Touchable/Position.js deleted file mode 100644 index f87ac832fc..0000000000 --- a/packages/react-native-web/src/exports/Touchable/Position.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @noflow - */ - -import PooledClass from '../../vendor/react-native/PooledClass'; - -const twoArgumentPooler = PooledClass.twoArgumentPooler; - -function Position(left, top) { - this.left = left; - this.top = top; -} - -Position.prototype.destructor = function () { - this.left = null; - this.top = null; -}; - -PooledClass.addPoolingTo(Position, twoArgumentPooler); - -export default Position; diff --git a/packages/react-native-web/src/exports/Touchable/ensurePositiveDelayProps.js b/packages/react-native-web/src/exports/Touchable/ensurePositiveDelayProps.js deleted file mode 100644 index e6ee713f1f..0000000000 --- a/packages/react-native-web/src/exports/Touchable/ensurePositiveDelayProps.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -import invariant from 'fbjs/lib/invariant'; - -const ensurePositiveDelayProps = (props: any) => { - invariant( - !( - props.delayPressIn < 0 || - props.delayPressOut < 0 || - props.delayLongPress < 0 - ), - 'Touchable components cannot have negative delay properties' - ); -}; - -export default ensurePositiveDelayProps; diff --git a/packages/react-native-web/src/exports/Touchable/index.js b/packages/react-native-web/src/exports/Touchable/index.js deleted file mode 100644 index f70063bdf2..0000000000 --- a/packages/react-native-web/src/exports/Touchable/index.js +++ /dev/null @@ -1,1025 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - * @format - */ - -'use strict'; -import type { Node } from 'React'; - -import AccessibilityUtil from '../../modules/AccessibilityUtil'; -import BoundingDimensions from './BoundingDimensions'; -import normalizeColor from '@react-native/normalize-colors'; -import Position from './Position'; -import React from 'react'; -import UIManager from '../UIManager'; -import View from '../View'; - -type Event = Object; -type PressEvent = Object; -type EdgeInsetsProp = Object; - -const extractSingleTouch = (nativeEvent) => { - const touches = nativeEvent.touches; - const changedTouches = nativeEvent.changedTouches; - const hasTouches = touches && touches.length > 0; - const hasChangedTouches = changedTouches && changedTouches.length > 0; - - return !hasTouches && hasChangedTouches - ? changedTouches[0] - : hasTouches - ? touches[0] - : nativeEvent; -}; - -/** - * `Touchable`: Taps done right. - * - * You hook your `ResponderEventPlugin` events into `Touchable`. `Touchable` - * will measure time/geometry and tells you when to give feedback to the user. - * - * ====================== Touchable Tutorial =============================== - * The `Touchable` mixin helps you handle the "press" interaction. It analyzes - * the geometry of elements, and observes when another responder (scroll view - * etc) has stolen the touch lock. It notifies your component when it should - * give feedback to the user. (bouncing/highlighting/unhighlighting). - * - * - When a touch was activated (typically you highlight) - * - When a touch was deactivated (typically you unhighlight) - * - When a touch was "pressed" - a touch ended while still within the geometry - * of the element, and no other element (like scroller) has "stolen" touch - * lock ("responder") (Typically you bounce the element). - * - * A good tap interaction isn't as simple as you might think. There should be a - * slight delay before showing a highlight when starting a touch. If a - * subsequent touch move exceeds the boundary of the element, it should - * unhighlight, but if that same touch is brought back within the boundary, it - * should rehighlight again. A touch can move in and out of that boundary - * several times, each time toggling highlighting, but a "press" is only - * triggered if that touch ends while within the element's boundary and no - * scroller (or anything else) has stolen the lock on touches. - * - * To create a new type of component that handles interaction using the - * `Touchable` mixin, do the following: - * - * - Initialize the `Touchable` state. - * - * getInitialState: function() { - * return merge(this.touchableGetInitialState(), yourComponentState); - * } - * - * - Add a method to get your touchable component's node. - * getTouchableNode: function() { - * return this.touchableRef.current - * } - * - * - Choose the rendered component who's touches should start the interactive - * sequence. On that rendered node, forward all `Touchable` responder - * handlers. You can choose any rendered node you like. Choose a node whose - * hit target you'd like to instigate the interaction sequence: - * - * // In render function: - * return ( - * - * - * Even though the hit detection/interactions are triggered by the - * wrapping (typically larger) node, we usually end up implementing - * custom logic that highlights this inner one. - * - * - * ); - * - * - You may set up your own handlers for each of these events, so long as you - * also invoke the `touchable*` handlers inside of your custom handler. - * - * - Implement the handlers on your component class in order to provide - * feedback to the user. See documentation for each of these class methods - * that you should implement. - * - * touchableHandlePress: function() { - * this.performBounceAnimation(); // or whatever you want to do. - * }, - * touchableHandleActivePressIn: function() { - * this.beginHighlighting(...); // Whatever you like to convey activation - * }, - * touchableHandleActivePressOut: function() { - * this.endHighlighting(...); // Whatever you like to convey deactivation - * }, - * - * - There are more advanced methods you can implement (see documentation below): - * touchableGetHighlightDelayMS: function() { - * return 20; - * } - * // In practice, *always* use a predeclared constant (conserve memory). - * touchableGetPressRectOffset: function() { - * return {top: 20, left: 20, right: 20, bottom: 100}; - * } - */ - -/** - * Touchable states. - */ - -const States = { - NOT_RESPONDER: 'NOT_RESPONDER', // Not the responder - RESPONDER_INACTIVE_PRESS_IN: 'RESPONDER_INACTIVE_PRESS_IN', // Responder, inactive, in the `PressRect` - RESPONDER_INACTIVE_PRESS_OUT: 'RESPONDER_INACTIVE_PRESS_OUT', // Responder, inactive, out of `PressRect` - RESPONDER_ACTIVE_PRESS_IN: 'RESPONDER_ACTIVE_PRESS_IN', // Responder, active, in the `PressRect` - RESPONDER_ACTIVE_PRESS_OUT: 'RESPONDER_ACTIVE_PRESS_OUT', // Responder, active, out of `PressRect` - RESPONDER_ACTIVE_LONG_PRESS_IN: 'RESPONDER_ACTIVE_LONG_PRESS_IN', // Responder, active, in the `PressRect`, after long press threshold - RESPONDER_ACTIVE_LONG_PRESS_OUT: 'RESPONDER_ACTIVE_LONG_PRESS_OUT', // Responder, active, out of `PressRect`, after long press threshold - ERROR: 'ERROR' -}; - -type State = - | typeof States.NOT_RESPONDER - | typeof States.RESPONDER_INACTIVE_PRESS_IN - | typeof States.RESPONDER_INACTIVE_PRESS_OUT - | typeof States.RESPONDER_ACTIVE_PRESS_IN - | typeof States.RESPONDER_ACTIVE_PRESS_OUT - | typeof States.RESPONDER_ACTIVE_LONG_PRESS_IN - | typeof States.RESPONDER_ACTIVE_LONG_PRESS_OUT - | typeof States.ERROR; - -/* - * Quick lookup map for states that are considered to be "active" - */ - -const baseStatesConditions = { - NOT_RESPONDER: false, - RESPONDER_INACTIVE_PRESS_IN: false, - RESPONDER_INACTIVE_PRESS_OUT: false, - RESPONDER_ACTIVE_PRESS_IN: false, - RESPONDER_ACTIVE_PRESS_OUT: false, - RESPONDER_ACTIVE_LONG_PRESS_IN: false, - RESPONDER_ACTIVE_LONG_PRESS_OUT: false, - ERROR: false -}; - -const IsActive = { - ...baseStatesConditions, - RESPONDER_ACTIVE_PRESS_OUT: true, - RESPONDER_ACTIVE_PRESS_IN: true -}; - -/** - * Quick lookup for states that are considered to be "pressing" and are - * therefore eligible to result in a "selection" if the press stops. - */ -const IsPressingIn = { - ...baseStatesConditions, - RESPONDER_INACTIVE_PRESS_IN: true, - RESPONDER_ACTIVE_PRESS_IN: true, - RESPONDER_ACTIVE_LONG_PRESS_IN: true -}; - -const IsLongPressingIn = { - ...baseStatesConditions, - RESPONDER_ACTIVE_LONG_PRESS_IN: true -}; - -/** - * Inputs to the state machine. - */ -const Signals = { - DELAY: 'DELAY', - RESPONDER_GRANT: 'RESPONDER_GRANT', - RESPONDER_RELEASE: 'RESPONDER_RELEASE', - RESPONDER_TERMINATED: 'RESPONDER_TERMINATED', - ENTER_PRESS_RECT: 'ENTER_PRESS_RECT', - LEAVE_PRESS_RECT: 'LEAVE_PRESS_RECT', - LONG_PRESS_DETECTED: 'LONG_PRESS_DETECTED' -}; - -type Signal = - | typeof Signals.DELAY - | typeof Signals.RESPONDER_GRANT - | typeof Signals.RESPONDER_RELEASE - | typeof Signals.RESPONDER_TERMINATED - | typeof Signals.ENTER_PRESS_RECT - | typeof Signals.LEAVE_PRESS_RECT - | typeof Signals.LONG_PRESS_DETECTED; - -/** - * Mapping from States x Signals => States - */ -const Transitions = { - NOT_RESPONDER: { - DELAY: States.ERROR, - RESPONDER_GRANT: States.RESPONDER_INACTIVE_PRESS_IN, - RESPONDER_RELEASE: States.ERROR, - RESPONDER_TERMINATED: States.ERROR, - ENTER_PRESS_RECT: States.ERROR, - LEAVE_PRESS_RECT: States.ERROR, - LONG_PRESS_DETECTED: States.ERROR - }, - RESPONDER_INACTIVE_PRESS_IN: { - DELAY: States.RESPONDER_ACTIVE_PRESS_IN, - RESPONDER_GRANT: States.ERROR, - RESPONDER_RELEASE: States.NOT_RESPONDER, - RESPONDER_TERMINATED: States.NOT_RESPONDER, - ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN, - LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT, - LONG_PRESS_DETECTED: States.ERROR - }, - RESPONDER_INACTIVE_PRESS_OUT: { - DELAY: States.RESPONDER_ACTIVE_PRESS_OUT, - RESPONDER_GRANT: States.ERROR, - RESPONDER_RELEASE: States.NOT_RESPONDER, - RESPONDER_TERMINATED: States.NOT_RESPONDER, - ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN, - LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT, - LONG_PRESS_DETECTED: States.ERROR - }, - RESPONDER_ACTIVE_PRESS_IN: { - DELAY: States.ERROR, - RESPONDER_GRANT: States.ERROR, - RESPONDER_RELEASE: States.NOT_RESPONDER, - RESPONDER_TERMINATED: States.NOT_RESPONDER, - ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_IN, - LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_OUT, - LONG_PRESS_DETECTED: States.RESPONDER_ACTIVE_LONG_PRESS_IN - }, - RESPONDER_ACTIVE_PRESS_OUT: { - DELAY: States.ERROR, - RESPONDER_GRANT: States.ERROR, - RESPONDER_RELEASE: States.NOT_RESPONDER, - RESPONDER_TERMINATED: States.NOT_RESPONDER, - ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_IN, - LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_OUT, - LONG_PRESS_DETECTED: States.ERROR - }, - RESPONDER_ACTIVE_LONG_PRESS_IN: { - DELAY: States.ERROR, - RESPONDER_GRANT: States.ERROR, - RESPONDER_RELEASE: States.NOT_RESPONDER, - RESPONDER_TERMINATED: States.NOT_RESPONDER, - ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_IN, - LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_OUT, - LONG_PRESS_DETECTED: States.RESPONDER_ACTIVE_LONG_PRESS_IN - }, - RESPONDER_ACTIVE_LONG_PRESS_OUT: { - DELAY: States.ERROR, - RESPONDER_GRANT: States.ERROR, - RESPONDER_RELEASE: States.NOT_RESPONDER, - RESPONDER_TERMINATED: States.NOT_RESPONDER, - ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_IN, - LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_OUT, - LONG_PRESS_DETECTED: States.ERROR - }, - error: { - DELAY: States.NOT_RESPONDER, - RESPONDER_GRANT: States.RESPONDER_INACTIVE_PRESS_IN, - RESPONDER_RELEASE: States.NOT_RESPONDER, - RESPONDER_TERMINATED: States.NOT_RESPONDER, - ENTER_PRESS_RECT: States.NOT_RESPONDER, - LEAVE_PRESS_RECT: States.NOT_RESPONDER, - LONG_PRESS_DETECTED: States.NOT_RESPONDER - } -}; - -// ==== Typical Constants for integrating into UI components ==== -// var HIT_EXPAND_PX = 20; -// var HIT_VERT_OFFSET_PX = 10; -const HIGHLIGHT_DELAY_MS = 130; - -const PRESS_EXPAND_PX = 20; - -const LONG_PRESS_THRESHOLD = 500; - -const LONG_PRESS_DELAY_MS = LONG_PRESS_THRESHOLD - HIGHLIGHT_DELAY_MS; - -const LONG_PRESS_ALLOWED_MOVEMENT = 10; - -// Default amount "active" region protrudes beyond box - -/** - * By convention, methods prefixed with underscores are meant to be @private, - * and not @protected. Mixers shouldn't access them - not even to provide them - * as callback handlers. - * - * - * ========== Geometry ========= - * `Touchable` only assumes that there exists a `HitRect` node. The `PressRect` - * is an abstract box that is extended beyond the `HitRect`. - * - * +--------------------------+ - * | | - "Start" events in `HitRect` cause `HitRect` - * | +--------------------+ | to become the responder. - * | | +--------------+ | | - `HitRect` is typically expanded around - * | | | | | | the `VisualRect`, but shifted downward. - * | | | VisualRect | | | - After pressing down, after some delay, - * | | | | | | and before letting up, the Visual React - * | | +--------------+ | | will become "active". This makes it eligible - * | | HitRect | | for being highlighted (so long as the - * | +--------------------+ | press remains in the `PressRect`). - * | PressRect o | - * +----------------------|---+ - * Out Region | - * +-----+ This gap between the `HitRect` and - * `PressRect` allows a touch to move far away - * from the original hit rect, and remain - * highlighted, and eligible for a "Press". - * Customize this via - * `touchableGetPressRectOffset()`. - * - * - * - * ======= State Machine ======= - * - * +-------------+ <---+ RESPONDER_RELEASE - * |NOT_RESPONDER| - * +-------------+ <---+ RESPONDER_TERMINATED - * + - * | RESPONDER_GRANT (HitRect) - * v - * +---------------------------+ DELAY +-------------------------+ T + DELAY +------------------------------+ - * |RESPONDER_INACTIVE_PRESS_IN|+-------->|RESPONDER_ACTIVE_PRESS_IN| +------------> |RESPONDER_ACTIVE_LONG_PRESS_IN| - * +---------------------------+ +-------------------------+ +------------------------------+ - * + ^ + ^ + ^ - * |LEAVE_ |ENTER_ |LEAVE_ |ENTER_ |LEAVE_ |ENTER_ - * |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT - * | | | | | | - * v + v + v + - * +----------------------------+ DELAY +--------------------------+ +-------------------------------+ - * |RESPONDER_INACTIVE_PRESS_OUT|+------->|RESPONDER_ACTIVE_PRESS_OUT| |RESPONDER_ACTIVE_LONG_PRESS_OUT| - * +----------------------------+ +--------------------------+ +-------------------------------+ - * - * T + DELAY => LONG_PRESS_DELAY_MS + DELAY - * - * Not drawn are the side effects of each transition. The most important side - * effect is the `touchableHandlePress` abstract method invocation that occurs - * when a responder is released while in either of the "Press" states. - * - * The other important side effects are the highlight abstract method - * invocations (internal callbacks) to be implemented by the mixer. - * - * - * @lends Touchable.prototype - */ -const TouchableMixin = { - // HACK (part 1): basic support for touchable interactions using a keyboard - componentDidMount: function () { - const touchableNode = this.getTouchableNode && this.getTouchableNode(); - if (touchableNode && touchableNode.addEventListener) { - this._touchableBlurListener = (e) => { - if (this._isTouchableKeyboardActive) { - if ( - this.state.touchable.touchState && - this.state.touchable.touchState !== States.NOT_RESPONDER - ) { - this.touchableHandleResponderTerminate({ nativeEvent: e }); - } - this._isTouchableKeyboardActive = false; - } - }; - touchableNode.addEventListener('blur', this._touchableBlurListener); - } - }, - - /** - * Clear all timeouts on unmount - */ - componentWillUnmount: function () { - const touchableNode = this.getTouchableNode && this.getTouchableNode(); - if (touchableNode && touchableNode.addEventListener) { - touchableNode.removeEventListener('blur', this._touchableBlurListener); - } - this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout); - this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout); - this.pressOutDelayTimeout && clearTimeout(this.pressOutDelayTimeout); - // Clear DOM nodes - this.pressInLocation = null; - this.state.touchable.responderID = null; - }, - - /** - * It's prefer that mixins determine state in this way, having the class - * explicitly mix the state in the one and only `getInitialState` method. - * - * @return {object} State object to be placed inside of - * `this.state.touchable`. - */ - touchableGetInitialState: function (): {| - touchable: {| responderID: null, touchState: void |} - |} { - return { - touchable: { touchState: undefined, responderID: null } - }; - }, - - // ==== Hooks to Gesture Responder system ==== - /** - * Must return true if embedded in a native platform scroll view. - */ - touchableHandleResponderTerminationRequest: function (): boolean { - return !this.props.rejectResponderTermination; - }, - - /** - * Must return true to start the process of `Touchable`. - */ - touchableHandleStartShouldSetResponder: function (): boolean { - return !this.props.disabled; - }, - - /** - * Return true to cancel press on long press. - */ - touchableLongPressCancelsPress: function (): boolean { - return true; - }, - - /** - * Place as callback for a DOM element's `onResponderGrant` event. - * @param {SyntheticEvent} e Synthetic event from event system. - * - */ - touchableHandleResponderGrant: function (e: PressEvent) { - const dispatchID = e.currentTarget; - // Since e is used in a callback invoked on another event loop - // (as in setTimeout etc), we need to call e.persist() on the - // event to make sure it doesn't get reused in the event object pool. - e.persist(); - - this.pressOutDelayTimeout && clearTimeout(this.pressOutDelayTimeout); - this.pressOutDelayTimeout = null; - - this.state.touchable.touchState = States.NOT_RESPONDER; - this.state.touchable.responderID = dispatchID; - this._receiveSignal(Signals.RESPONDER_GRANT, e); - let delayMS = - this.touchableGetHighlightDelayMS !== undefined - ? Math.max(this.touchableGetHighlightDelayMS(), 0) - : HIGHLIGHT_DELAY_MS; - delayMS = isNaN(delayMS) ? HIGHLIGHT_DELAY_MS : delayMS; - if (delayMS !== 0) { - this.touchableDelayTimeout = setTimeout( - this._handleDelay.bind(this, e), - delayMS - ); - } else { - this._handleDelay(e); - } - - let longDelayMS = - this.touchableGetLongPressDelayMS !== undefined - ? Math.max(this.touchableGetLongPressDelayMS(), 10) - : LONG_PRESS_DELAY_MS; - longDelayMS = isNaN(longDelayMS) ? LONG_PRESS_DELAY_MS : longDelayMS; - this.longPressDelayTimeout = setTimeout( - this._handleLongDelay.bind(this, e), - longDelayMS + delayMS - ); - }, - - /** - * Place as callback for a DOM element's `onResponderRelease` event. - */ - touchableHandleResponderRelease: function (e: PressEvent) { - this.pressInLocation = null; - this._receiveSignal(Signals.RESPONDER_RELEASE, e); - }, - - /** - * Place as callback for a DOM element's `onResponderTerminate` event. - */ - touchableHandleResponderTerminate: function (e: PressEvent) { - this.pressInLocation = null; - this._receiveSignal(Signals.RESPONDER_TERMINATED, e); - }, - - /** - * Place as callback for a DOM element's `onResponderMove` event. - */ - touchableHandleResponderMove: function (e: PressEvent) { - // Measurement may not have returned yet. - if (!this.state.touchable.positionOnActivate) { - return; - } - - const positionOnActivate = this.state.touchable.positionOnActivate; - const dimensionsOnActivate = this.state.touchable.dimensionsOnActivate; - const pressRectOffset = this.touchableGetPressRectOffset - ? this.touchableGetPressRectOffset() - : { - left: PRESS_EXPAND_PX, - right: PRESS_EXPAND_PX, - top: PRESS_EXPAND_PX, - bottom: PRESS_EXPAND_PX - }; - - let pressExpandLeft = pressRectOffset.left; - let pressExpandTop = pressRectOffset.top; - let pressExpandRight = pressRectOffset.right; - let pressExpandBottom = pressRectOffset.bottom; - - const hitSlop = this.touchableGetHitSlop - ? this.touchableGetHitSlop() - : null; - - if (hitSlop) { - pressExpandLeft += hitSlop.left || 0; - pressExpandTop += hitSlop.top || 0; - pressExpandRight += hitSlop.right || 0; - pressExpandBottom += hitSlop.bottom || 0; - } - - const touch = extractSingleTouch(e.nativeEvent); - const pageX = touch && touch.pageX; - const pageY = touch && touch.pageY; - - if (this.pressInLocation) { - const movedDistance = this._getDistanceBetweenPoints( - pageX, - pageY, - this.pressInLocation.pageX, - this.pressInLocation.pageY - ); - if (movedDistance > LONG_PRESS_ALLOWED_MOVEMENT) { - this._cancelLongPressDelayTimeout(); - } - } - - const isTouchWithinActive = - pageX > positionOnActivate.left - pressExpandLeft && - pageY > positionOnActivate.top - pressExpandTop && - pageX < - positionOnActivate.left + - dimensionsOnActivate.width + - pressExpandRight && - pageY < - positionOnActivate.top + - dimensionsOnActivate.height + - pressExpandBottom; - if (isTouchWithinActive) { - const prevState = this.state.touchable.touchState; - this._receiveSignal(Signals.ENTER_PRESS_RECT, e); - const curState = this.state.touchable.touchState; - if ( - curState === States.RESPONDER_INACTIVE_PRESS_IN && - prevState !== States.RESPONDER_INACTIVE_PRESS_IN - ) { - // fix for t7967420 - this._cancelLongPressDelayTimeout(); - } - } else { - this._cancelLongPressDelayTimeout(); - this._receiveSignal(Signals.LEAVE_PRESS_RECT, e); - } - }, - - /** - * Invoked when the item receives focus. Mixers might override this to - * visually distinguish the `VisualRect` so that the user knows that it - * currently has the focus. Most platforms only support a single element being - * focused at a time, in which case there may have been a previously focused - * element that was blurred just prior to this. This can be overridden when - * using `Touchable.Mixin.withoutDefaultFocusAndBlur`. - */ - touchableHandleFocus: function (e: Event) { - this.props.onFocus && this.props.onFocus(e); - }, - - /** - * Invoked when the item loses focus. Mixers might override this to - * visually distinguish the `VisualRect` so that the user knows that it - * no longer has focus. Most platforms only support a single element being - * focused at a time, in which case the focus may have moved to another. - * This can be overridden when using - * `Touchable.Mixin.withoutDefaultFocusAndBlur`. - */ - touchableHandleBlur: function (e: Event) { - this.props.onBlur && this.props.onBlur(e); - }, - - // ==== Abstract Application Callbacks ==== - - /** - * Invoked when the item should be highlighted. Mixers should implement this - * to visually distinguish the `VisualRect` so that the user knows that - * releasing a touch will result in a "selection" (analog to click). - * - * @abstract - * touchableHandleActivePressIn: function, - */ - - /** - * Invoked when the item is "active" (in that it is still eligible to become - * a "select") but the touch has left the `PressRect`. Usually the mixer will - * want to unhighlight the `VisualRect`. If the user (while pressing) moves - * back into the `PressRect` `touchableHandleActivePressIn` will be invoked - * again and the mixer should probably highlight the `VisualRect` again. This - * event will not fire on an `touchEnd/mouseUp` event, only move events while - * the user is depressing the mouse/touch. - * - * @abstract - * touchableHandleActivePressOut: function - */ - - /** - * Invoked when the item is "selected" - meaning the interaction ended by - * letting up while the item was either in the state - * `RESPONDER_ACTIVE_PRESS_IN` or `RESPONDER_INACTIVE_PRESS_IN`. - * - * @abstract - * touchableHandlePress: function - */ - - /** - * Invoked when the item is long pressed - meaning the interaction ended by - * letting up while the item was in `RESPONDER_ACTIVE_LONG_PRESS_IN`. If - * `touchableHandleLongPress` is *not* provided, `touchableHandlePress` will - * be called as it normally is. If `touchableHandleLongPress` is provided, by - * default any `touchableHandlePress` callback will not be invoked. To - * override this default behavior, override `touchableLongPressCancelsPress` - * to return false. As a result, `touchableHandlePress` will be called when - * lifting up, even if `touchableHandleLongPress` has also been called. - * - * @abstract - * touchableHandleLongPress: function - */ - - /** - * Returns the number of millis to wait before triggering a highlight. - * - * @abstract - * touchableGetHighlightDelayMS: function - */ - - /** - * Returns the amount to extend the `HitRect` into the `PressRect`. Positive - * numbers mean the size expands outwards. - * - * @abstract - * touchableGetPressRectOffset: function - */ - - // ==== Internal Logic ==== - - /** - * Measures the `HitRect` node on activation. The Bounding rectangle is with - * respect to viewport - not page, so adding the `pageXOffset/pageYOffset` - * should result in points that are in the same coordinate system as an - * event's `globalX/globalY` data values. - * - * - Consider caching this for the lifetime of the component, or possibly - * being able to share this cache between any `ScrollMap` view. - * - * @sideeffects - * @private - */ - _remeasureMetricsOnActivation: function () { - const tag = this.state.touchable.responderID; - if (tag == null) { - return; - } - - UIManager.measure(tag, this._handleQueryLayout); - }, - - _handleQueryLayout: function ( - l: number, - t: number, - w: number, - h: number, - globalX: number, - globalY: number - ) { - //don't do anything UIManager failed to measure node - if (!l && !t && !w && !h && !globalX && !globalY) { - return; - } - this.state.touchable.positionOnActivate && - Position.release(this.state.touchable.positionOnActivate); - this.state.touchable.dimensionsOnActivate && - // $FlowFixMe - BoundingDimensions.release(this.state.touchable.dimensionsOnActivate); - this.state.touchable.positionOnActivate = Position.getPooled( - globalX, - globalY - ); - // $FlowFixMe - this.state.touchable.dimensionsOnActivate = BoundingDimensions.getPooled( - w, - h - ); - }, - - _handleDelay: function (e: PressEvent) { - this.touchableDelayTimeout = null; - this._receiveSignal(Signals.DELAY, e); - }, - - _handleLongDelay: function (e: PressEvent) { - this.longPressDelayTimeout = null; - const curState = this.state.touchable.touchState; - if ( - curState !== States.RESPONDER_ACTIVE_PRESS_IN && - curState !== States.RESPONDER_ACTIVE_LONG_PRESS_IN - ) { - console.error( - 'Attempted to transition from state `' + - curState + - '` to `' + - States.RESPONDER_ACTIVE_LONG_PRESS_IN + - '`, which is not supported. This is ' + - 'most likely due to `Touchable.longPressDelayTimeout` not being cancelled.' - ); - } else { - this._receiveSignal(Signals.LONG_PRESS_DETECTED, e); - } - }, - - /** - * Receives a state machine signal, performs side effects of the transition - * and stores the new state. Validates the transition as well. - * - * @param {Signals} signal State machine signal. - * @throws Error if invalid state transition or unrecognized signal. - * @sideeffects - */ - _receiveSignal: function (signal: Signal, e: PressEvent) { - const responderID = this.state.touchable.responderID; - const curState = this.state.touchable.touchState; - const nextState = Transitions[curState] && Transitions[curState][signal]; - if (!responderID && signal === Signals.RESPONDER_RELEASE) { - return; - } - if (!nextState) { - throw new Error( - 'Unrecognized signal `' + - signal + - '` or state `' + - curState + - '` for Touchable responder `' + - responderID + - '`' - ); - } - if (nextState === States.ERROR) { - throw new Error( - 'Touchable cannot transition from `' + - curState + - '` to `' + - signal + - '` for responder `' + - responderID + - '`' - ); - } - if (curState !== nextState) { - this._performSideEffectsForTransition(curState, nextState, signal, e); - this.state.touchable.touchState = nextState; - } - }, - - _cancelLongPressDelayTimeout: function () { - this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout); - this.longPressDelayTimeout = null; - }, - - _isHighlight: function (state: State): boolean { - return ( - state === States.RESPONDER_ACTIVE_PRESS_IN || - state === States.RESPONDER_ACTIVE_LONG_PRESS_IN - ); - }, - - _savePressInLocation: function (e: PressEvent) { - const touch = extractSingleTouch(e.nativeEvent); - const pageX = touch && touch.pageX; - const pageY = touch && touch.pageY; - const locationX = touch && touch.locationX; - const locationY = touch && touch.locationY; - this.pressInLocation = { pageX, pageY, locationX, locationY }; - }, - - _getDistanceBetweenPoints: function ( - aX: number, - aY: number, - bX: number, - bY: number - ): number { - const deltaX = aX - bX; - const deltaY = aY - bY; - return Math.sqrt(deltaX * deltaX + deltaY * deltaY); - }, - - /** - * Will perform a transition between touchable states, and identify any - * highlighting or unhighlighting that must be performed for this particular - * transition. - * - * @param {States} curState Current Touchable state. - * @param {States} nextState Next Touchable state. - * @param {Signal} signal Signal that triggered the transition. - * @param {Event} e Native event. - * @sideeffects - */ - _performSideEffectsForTransition: function ( - curState: State, - nextState: State, - signal: Signal, - e: PressEvent - ) { - const curIsHighlight = this._isHighlight(curState); - const newIsHighlight = this._isHighlight(nextState); - - const isFinalSignal = - signal === Signals.RESPONDER_TERMINATED || - signal === Signals.RESPONDER_RELEASE; - - if (isFinalSignal) { - this._cancelLongPressDelayTimeout(); - } - - const isInitialTransition = - curState === States.NOT_RESPONDER && - nextState === States.RESPONDER_INACTIVE_PRESS_IN; - - const isActiveTransition = !IsActive[curState] && IsActive[nextState]; - if (isInitialTransition || isActiveTransition) { - this._remeasureMetricsOnActivation(); - } - - if (IsPressingIn[curState] && signal === Signals.LONG_PRESS_DETECTED) { - this.touchableHandleLongPress && this.touchableHandleLongPress(e); - } - - if (newIsHighlight && !curIsHighlight) { - this._startHighlight(e); - } else if (!newIsHighlight && curIsHighlight) { - this._endHighlight(e); - } - - if (IsPressingIn[curState] && signal === Signals.RESPONDER_RELEASE) { - const hasLongPressHandler = !!this.props.onLongPress; - const pressIsLongButStillCallOnPress = - IsLongPressingIn[curState] && // We *are* long pressing.. // But either has no long handler - (!hasLongPressHandler || !this.touchableLongPressCancelsPress()); // or we're told to ignore it. - - const shouldInvokePress = - !IsLongPressingIn[curState] || pressIsLongButStillCallOnPress; - if (shouldInvokePress && this.touchableHandlePress) { - if (!newIsHighlight && !curIsHighlight) { - // we never highlighted because of delay, but we should highlight now - this._startHighlight(e); - this._endHighlight(e); - } - this.touchableHandlePress(e); - } - } - - this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout); - this.touchableDelayTimeout = null; - }, - - _playTouchSound: function () { - UIManager.playTouchSound(); - }, - - _startHighlight: function (e: PressEvent) { - this._savePressInLocation(e); - this.touchableHandleActivePressIn && this.touchableHandleActivePressIn(e); - }, - - _endHighlight: function (e: PressEvent) { - if (this.touchableHandleActivePressOut) { - if ( - this.touchableGetPressOutDelayMS && - this.touchableGetPressOutDelayMS() - ) { - this.pressOutDelayTimeout = setTimeout(() => { - this.touchableHandleActivePressOut(e); - }, this.touchableGetPressOutDelayMS()); - } else { - this.touchableHandleActivePressOut(e); - } - } - }, - - // HACK (part 2): basic support for touchable interactions using a keyboard (including - // delays and longPress) - touchableHandleKeyEvent: function (e: Event) { - const { type, key } = e; - if (key === 'Enter' || key === ' ') { - if (type === 'keydown') { - if (!this._isTouchableKeyboardActive) { - if ( - !this.state.touchable.touchState || - this.state.touchable.touchState === States.NOT_RESPONDER - ) { - this.touchableHandleResponderGrant(e); - this._isTouchableKeyboardActive = true; - } - } - } else if (type === 'keyup') { - if (this._isTouchableKeyboardActive) { - if ( - this.state.touchable.touchState && - this.state.touchable.touchState !== States.NOT_RESPONDER - ) { - this.touchableHandleResponderRelease(e); - this._isTouchableKeyboardActive = false; - } - } - } - e.stopPropagation(); - // prevent the default behaviour unless the Touchable functions as a link - // and Enter is pressed - if ( - !( - key === 'Enter' && - AccessibilityUtil.propsToAriaRole(this.props) === 'link' - ) - ) { - e.preventDefault(); - } - } - }, - - withoutDefaultFocusAndBlur: ({}: { ... }) -}; - -/** - * Provide an optional version of the mixin where `touchableHandleFocus` and - * `touchableHandleBlur` can be overridden. This allows appropriate defaults to - * be set on TV platforms, without breaking existing implementations of - * `Touchable`. - */ -const { - // eslint-disable-next-line no-unused-vars - touchableHandleFocus, - // eslint-disable-next-line no-unused-vars - touchableHandleBlur, - ...TouchableMixinWithoutDefaultFocusAndBlur -} = TouchableMixin; -TouchableMixin.withoutDefaultFocusAndBlur = - TouchableMixinWithoutDefaultFocusAndBlur; - -/** - * @deprecated `Touchable` has been removed from the React Native public API - * types. It remains exported at runtime because `react-native-svg` still uses - * it, and will be removed once `react-native-svg` is updated. - */ -const Touchable = { - Mixin: TouchableMixin, - TOUCH_TARGET_DEBUG: false, // Highlights all touchable targets. Toggle with Inspector. - /** - * Renders a debugging overlay to visualize touch target with hitSlop (might not work on Android). - */ - renderDebugView: ({ - color, - hitSlop - }: { - color: string | number, - hitSlop: EdgeInsetsProp - }): Node => { - if (!Touchable.TOUCH_TARGET_DEBUG) { - return null; - } - if (process.env.NODE_ENV !== 'production') { - throw Error( - 'Touchable.TOUCH_TARGET_DEBUG should not be enabled in prod!' - ); - } - const debugHitSlopStyle = {}; - hitSlop = hitSlop || { top: 0, bottom: 0, left: 0, right: 0 }; - for (const key in hitSlop) { - debugHitSlopStyle[key] = -hitSlop[key]; - } - const normalizedColor = normalizeColor(color); - if (typeof normalizedColor !== 'number') { - return null; - } - const hexColor = - '#' + ('00000000' + normalizedColor.toString(16)).substr(-8); - return ( - - ); - } -}; - -export default Touchable; diff --git a/packages/react-native-web/src/exports/TouchableHighlight/index.js b/packages/react-native-web/src/exports/TouchableHighlight/index.js index 225efa2c1d..dc990207ce 100644 --- a/packages/react-native-web/src/exports/TouchableHighlight/index.js +++ b/packages/react-native-web/src/exports/TouchableHighlight/index.js @@ -13,6 +13,7 @@ import type { ColorValue } from '../../types'; import type { Props as TouchableWithoutFeedbackProps } from '../TouchableWithoutFeedback'; import type { ViewProps } from '../View'; +import type { ResponderEvent } from '../../modules/useResponderEvents/createResponderEvent'; import * as React from 'react'; import { useCallback, useMemo, useState, useRef } from 'react'; @@ -21,9 +22,9 @@ import usePressEvents from '../../modules/usePressEvents'; import StyleSheet from '../StyleSheet'; import View from '../View'; -type ViewStyle = $PropertyType; +type ViewStyle = ViewProps['style']; -type Props = $ReadOnly<{| +type Props = Readonly<{| ...TouchableWithoutFeedbackProps, activeOpacity?: ?number, onHideUnderlay?: ?() => void, @@ -33,12 +34,15 @@ type Props = $ReadOnly<{| underlayColor?: ?ColorValue |}>; -type ExtraStyles = $ReadOnly<{| +type ExtraStyles = Readonly<{| child: ViewStyle, underlay: ViewStyle |}>; -function createExtraStyles(activeOpacity, underlayColor): ExtraStyles { +function createExtraStyles( + activeOpacity: ?number, + underlayColor: ?ColorValue +): ExtraStyles { return { child: { opacity: activeOpacity ?? 0.85 }, underlay: { @@ -47,7 +51,7 @@ function createExtraStyles(activeOpacity, underlayColor): ExtraStyles { }; } -function hasPressHandler(props): boolean { +function hasPressHandler(props: Props): boolean { return ( props.onPress != null || props.onPressIn != null || @@ -69,7 +73,7 @@ function hasPressHandler(props): boolean { * TouchableHighlight must have one child (not zero or more than one). * If you wish to have several child components, wrap them in a View. */ -function TouchableHighlight(props: Props, forwardedRef): React.Node { +function TouchableHighlight(props: Props): React.Node { const { activeOpacity, children, @@ -84,6 +88,7 @@ function TouchableHighlight(props: Props, forwardedRef): React.Node { onPressIn, onPressOut, onShowUnderlay, + ref, rejectResponderTermination, style, testOnly_pressed, @@ -92,7 +97,7 @@ function TouchableHighlight(props: Props, forwardedRef): React.Node { } = props; const hostRef = useRef(null); - const setRef = useMergeRefs(forwardedRef, hostRef); + const setRef = useMergeRefs(ref, hostRef); const [extraStyles, setExtraStyles] = useState( testOnly_pressed === true @@ -131,13 +136,13 @@ function TouchableHighlight(props: Props, forwardedRef): React.Node { delayPressEnd: delayPressOut, onLongPress, onPress, - onPressStart(event) { + onPressStart(event: ResponderEvent) { showUnderlay(); if (onPressIn != null) { onPressIn(event); } }, - onPressEnd(event) { + onPressEnd(event: ResponderEvent) { hideUnderlay(); if (onPressOut != null) { onPressOut(event); @@ -161,7 +166,7 @@ function TouchableHighlight(props: Props, forwardedRef): React.Node { const pressEventHandlers = usePressEvents(hostRef, pressConfig); - const child = React.Children.only(children); + const child: any = React.Children.only(children); return ( ->); +export default MemoedTouchableHighlight; diff --git a/packages/react-native-web/src/exports/TouchableOpacity/index.js b/packages/react-native-web/src/exports/TouchableOpacity/index.js index 65ef97942e..ab3e58f029 100644 --- a/packages/react-native-web/src/exports/TouchableOpacity/index.js +++ b/packages/react-native-web/src/exports/TouchableOpacity/index.js @@ -20,9 +20,9 @@ import usePressEvents from '../../modules/usePressEvents'; import StyleSheet from '../StyleSheet'; import View from '../View'; -type ViewStyle = $PropertyType; +type ViewStyle = ViewProps['style']; -type Props = $ReadOnly<{| +type Props = Readonly<{| ...TouchableWithoutFeedbackProps, activeOpacity?: ?number, style?: ?ViewStyle @@ -32,7 +32,7 @@ type Props = $ReadOnly<{| * A wrapper for making views respond properly to touches. * On press down, the opacity of the wrapped view is decreased, dimming it. */ -function TouchableOpacity(props: Props, forwardedRef): React.Node { +function TouchableOpacity(props: Props): React.Node { const { activeOpacity, delayPressIn, @@ -44,16 +44,17 @@ function TouchableOpacity(props: Props, forwardedRef): React.Node { onPress, onPressIn, onPressOut, + ref, rejectResponderTermination, style, ...rest } = props; const hostRef = useRef(null); - const setRef = useMergeRefs(forwardedRef, hostRef); + const setRef = useMergeRefs(ref, hostRef); const [duration, setDuration] = useState('0s'); - const [opacityOverride, setOpacityOverride] = useState(null); + const [opacityOverride, setOpacityOverride] = useState(null); const setOpacityTo = useCallback( (value: ?number, duration: number) => { @@ -86,7 +87,7 @@ function TouchableOpacity(props: Props, forwardedRef): React.Node { delayPressEnd: delayPressOut, onLongPress, onPress, - onPressStart(event) { + onPressStart(event: any) { const isGrant = event.dispatchConfig != null ? event.dispatchConfig.registrationName === 'onResponderGrant' @@ -96,7 +97,7 @@ function TouchableOpacity(props: Props, forwardedRef): React.Node { onPressIn(event); } }, - onPressEnd(event) { + onPressEnd(event: any) { setOpacityInactive(250); if (onPressOut != null) { onPressOut(event); @@ -151,10 +152,8 @@ const styles = StyleSheet.create({ } }); -const MemoedTouchableOpacity = React.memo(React.forwardRef(TouchableOpacity)); +const MemoedTouchableOpacity: component(...Props) = + React.memo(TouchableOpacity); MemoedTouchableOpacity.displayName = 'TouchableOpacity'; -export default (MemoedTouchableOpacity: React.AbstractComponent< - Props, - React.ElementRef ->); +export default MemoedTouchableOpacity; diff --git a/packages/react-native-web/src/exports/TouchableWithoutFeedback/index.js b/packages/react-native-web/src/exports/TouchableWithoutFeedback/index.js index 995b848002..cfa58dd9e5 100644 --- a/packages/react-native-web/src/exports/TouchableWithoutFeedback/index.js +++ b/packages/react-native-web/src/exports/TouchableWithoutFeedback/index.js @@ -19,26 +19,27 @@ import pick from '../../modules/pick'; import useMergeRefs from '../../modules/useMergeRefs'; import usePressEvents from '../../modules/usePressEvents'; -export type Props = $ReadOnly<{| - accessibilityLabel?: $PropertyType, - accessibilityLiveRegion?: $PropertyType, - accessibilityRole?: $PropertyType, +export type Props = Readonly<{| + accessibilityLabel?: ViewProps['accessibilityLabel'], + accessibilityLiveRegion?: ViewProps['accessibilityLiveRegion'], + accessibilityRole?: ViewProps['accessibilityRole'], children?: ?React.Node, delayLongPress?: ?number, delayPressIn?: ?number, delayPressOut?: ?number, disabled?: ?boolean, focusable?: ?boolean, - nativeID?: $PropertyType, - onBlur?: $PropertyType, - onFocus?: $PropertyType, - onLayout?: $PropertyType, - onLongPress?: $PropertyType, - onPress?: $PropertyType, - onPressIn?: $PropertyType, - onPressOut?: $PropertyType, + nativeID?: ViewProps['nativeID'], + onBlur?: ViewProps['onBlur'], + onFocus?: ViewProps['onFocus'], + onLayout?: ViewProps['onLayout'], + onLongPress?: PressResponderConfig['onLongPress'], + onPress?: PressResponderConfig['onPress'], + onPressIn?: PressResponderConfig['onPressStart'], + onPressOut?: PressResponderConfig['onPressEnd'], + ref?: React.Ref, rejectResponderTermination?: ?boolean, - testID?: $PropertyType + testID?: ViewProps['testID'] |}>; const forwardPropsList = { @@ -58,9 +59,9 @@ const forwardPropsList = { testID: true }; -const pickProps = (props) => pick(props, forwardPropsList); +const pickProps = (props: Props) => pick(props, forwardPropsList); -function TouchableWithoutFeedback(props: Props, forwardedRef): React.Node { +function TouchableWithoutFeedback(props: Props): React.Node { const { delayPressIn, delayPressOut, @@ -71,6 +72,7 @@ function TouchableWithoutFeedback(props: Props, forwardedRef): React.Node { onPress, onPressIn, onPressOut, + ref, rejectResponderTermination } = props; @@ -103,24 +105,21 @@ function TouchableWithoutFeedback(props: Props, forwardedRef): React.Node { const pressEventHandlers = usePressEvents(hostRef, pressConfig); - const element = React.Children.only(props.children); + const element: any = React.Children.only(props.children); const children = [element.props.children]; const supportedProps = pickProps(props); supportedProps.accessibilityDisabled = disabled; supportedProps.focusable = !disabled && focusable !== false; - supportedProps.ref = useMergeRefs(forwardedRef, hostRef, element.ref); + supportedProps.ref = useMergeRefs(ref, hostRef, element.props.ref); - const elementProps = Object.assign(supportedProps, pressEventHandlers); + const elementProps = { ...supportedProps, ...pressEventHandlers }; return React.cloneElement(element, elementProps, ...children); } -const MemoedTouchableWithoutFeedback = React.memo( - React.forwardRef(TouchableWithoutFeedback) +const MemoedTouchableWithoutFeedback: component(...Props) = React.memo( + TouchableWithoutFeedback ); MemoedTouchableWithoutFeedback.displayName = 'TouchableWithoutFeedback'; -export default (MemoedTouchableWithoutFeedback: React.AbstractComponent< - Props, - React.ElementRef ->); +export default MemoedTouchableWithoutFeedback; diff --git a/packages/react-native-web/src/exports/View/__tests__/index-test.js b/packages/react-native-web/src/exports/View/__tests__/index-test.js index 99bb70b689..49b0c958e3 100644 --- a/packages/react-native-web/src/exports/View/__tests__/index-test.js +++ b/packages/react-native-web/src/exports/View/__tests__/index-test.js @@ -7,7 +7,7 @@ import React from 'react'; import View from '../'; -import { createEventTarget, setPointerEvent } from 'dom-event-testing-library'; +import { createEventTarget } from 'dom-event-testing-library'; import { act, render } from '@testing-library/react'; describe('components/View', () => { @@ -234,13 +234,6 @@ describe('components/View', () => { }); describe('prop "onPointerDown"', () => { - beforeEach(() => { - setPointerEvent(true); - }); - afterEach(() => { - setPointerEvent(false); - }); - test('is called', () => { const onPointerDown = jest.fn(); const ref = React.createRef(); diff --git a/packages/react-native-web/src/exports/View/index.js b/packages/react-native-web/src/exports/View/index.js index cec4d58261..00bb13d09e 100644 --- a/packages/react-native-web/src/exports/View/index.js +++ b/packages/react-native-web/src/exports/View/index.js @@ -25,123 +25,123 @@ import StyleSheet from '../StyleSheet'; import TextAncestorContext from '../Text/TextAncestorContext'; import { useLocaleContext, getLocaleDirection } from '../../modules/useLocale'; -const forwardPropsList = Object.assign( - {}, - forwardedProps.defaultProps, - forwardedProps.accessibilityProps, - forwardedProps.clickProps, - forwardedProps.focusProps, - forwardedProps.keyboardProps, - forwardedProps.mouseProps, - forwardedProps.touchProps, - forwardedProps.styleProps, - { - href: true, - lang: true, - onScroll: true, - onWheel: true, - pointerEvents: true +const forwardPropsList = { + ...forwardedProps.defaultProps, + ...forwardedProps.accessibilityProps, + ...forwardedProps.clickProps, + ...forwardedProps.focusProps, + ...forwardedProps.keyboardProps, + ...forwardedProps.mouseProps, + ...forwardedProps.touchProps, + ...forwardedProps.styleProps, + href: true, + lang: true, + onScroll: true, + onWheel: true, + pointerEvents: true +}; + +const pickProps = (props: { ... }) => pick(props, forwardPropsList); + +const View = (props: { + ...ViewProps, + ref?: React.Ref +}): React.Node => { + const { + hrefAttrs, + onLayout, + onMoveShouldSetResponder, + onMoveShouldSetResponderCapture, + onResponderEnd, + onResponderGrant, + onResponderMove, + onResponderReject, + onResponderRelease, + onResponderStart, + onResponderTerminate, + onResponderTerminationRequest, + onScrollShouldSetResponder, + onScrollShouldSetResponderCapture, + onSelectionChangeShouldSetResponder, + onSelectionChangeShouldSetResponderCapture, + onStartShouldSetResponder, + onStartShouldSetResponderCapture, + ref, + ...rest + } = props; + + if (process.env.NODE_ENV !== 'production') { + React.Children.toArray(props.children).forEach((item) => { + if (typeof item === 'string') { + console.error( + `Unexpected text node: ${item}. A text node cannot be a child of a .` + ); + } + }); } -); - -const pickProps = (props) => pick(props, forwardPropsList); - -const View: React.AbstractComponent = - React.forwardRef((props, forwardedRef) => { - const { - hrefAttrs, - onLayout, - onMoveShouldSetResponder, - onMoveShouldSetResponderCapture, - onResponderEnd, - onResponderGrant, - onResponderMove, - onResponderReject, - onResponderRelease, - onResponderStart, - onResponderTerminate, - onResponderTerminationRequest, - onScrollShouldSetResponder, - onScrollShouldSetResponderCapture, - onSelectionChangeShouldSetResponder, - onSelectionChangeShouldSetResponderCapture, - onStartShouldSetResponder, - onStartShouldSetResponderCapture, - ...rest - } = props; - - if (process.env.NODE_ENV !== 'production') { - React.Children.toArray(props.children).forEach((item) => { - if (typeof item === 'string') { - console.error( - `Unexpected text node: ${item}. A text node cannot be a child of a .` - ); - } - }); - } - const hasTextAncestor = React.useContext(TextAncestorContext); - const hostRef = React.useRef(null); - const { direction: contextDirection } = useLocaleContext(); - - useElementLayout(hostRef, onLayout); - useResponderEvents(hostRef, { - onMoveShouldSetResponder, - onMoveShouldSetResponderCapture, - onResponderEnd, - onResponderGrant, - onResponderMove, - onResponderReject, - onResponderRelease, - onResponderStart, - onResponderTerminate, - onResponderTerminationRequest, - onScrollShouldSetResponder, - onScrollShouldSetResponderCapture, - onSelectionChangeShouldSetResponder, - onSelectionChangeShouldSetResponderCapture, - onStartShouldSetResponder, - onStartShouldSetResponderCapture - }); + const hasTextAncestor = React.useContext(TextAncestorContext); + const hostRef = React.useRef(null); + const { direction: contextDirection } = useLocaleContext(); + + useElementLayout(hostRef, onLayout); + useResponderEvents(hostRef, { + onMoveShouldSetResponder, + onMoveShouldSetResponderCapture, + onResponderEnd, + onResponderGrant, + onResponderMove, + onResponderReject, + onResponderRelease, + onResponderStart, + onResponderTerminate, + onResponderTerminationRequest, + onScrollShouldSetResponder, + onScrollShouldSetResponderCapture, + onSelectionChangeShouldSetResponder, + onSelectionChangeShouldSetResponderCapture, + onStartShouldSetResponder, + onStartShouldSetResponderCapture + }); - let component = 'div'; - - const langDirection = - props.lang != null ? getLocaleDirection(props.lang) : null; - const componentDirection = props.dir || langDirection; - const writingDirection = componentDirection || contextDirection; - - const supportedProps = pickProps(rest); - supportedProps.dir = componentDirection; - supportedProps.style = [ - styles.view$raw, - hasTextAncestor && styles.inline, - props.style - ]; - if (props.href != null) { - component = 'a'; - if (hrefAttrs != null) { - const { download, rel, target } = hrefAttrs; - if (download != null) { - supportedProps.download = download; - } - if (rel != null) { - supportedProps.rel = rel; - } - if (typeof target === 'string') { - supportedProps.target = - target.charAt(0) !== '_' ? '_' + target : target; - } + let component = 'div'; + + const langDirection = + props.lang != null ? getLocaleDirection(props.lang) : null; + const componentDirection = props.dir || langDirection; + const writingDirection = componentDirection || contextDirection; + + const supportedProps = pickProps(rest); + supportedProps.dir = componentDirection; + supportedProps.style = [ + styles.view$raw, + hasTextAncestor && styles.inline, + props.style + ]; + if (props.href != null) { + component = 'a'; + if (hrefAttrs != null) { + const { download, rel, target } = hrefAttrs; + if (download != null) { + supportedProps.download = download; + } + if (rel != null) { + supportedProps.rel = rel; + } + if (typeof target === 'string') { + supportedProps.target = + target.charAt(0) !== '_' ? '_' + target : target; } } + } - const platformMethodsRef = usePlatformMethods(supportedProps); - const setRef = useMergeRefs(hostRef, platformMethodsRef, forwardedRef); + const platformMethodsRef = usePlatformMethods(supportedProps); + const setRef = useMergeRefs(hostRef, platformMethodsRef, ref); - supportedProps.ref = setRef; + supportedProps.ref = setRef; - return createElement(component, supportedProps, { writingDirection }); - }); + return createElement(component, supportedProps, { writingDirection }); +}; View.displayName = 'View'; diff --git a/packages/react-native-web/src/exports/View/types.js b/packages/react-native-web/src/exports/View/types.js index 7dbf99c902..7e6ba99a0f 100644 --- a/packages/react-native-web/src/exports/View/types.js +++ b/packages/react-native-web/src/exports/View/types.js @@ -197,6 +197,7 @@ export type ViewStyle = { ...LayoutStyles, ...ShadowStyles, ...TransformStyles, + appearance?: ?string, backdropFilter?: ?string, backgroundAttachment?: ?string, backgroundBlendMode?: ?string, @@ -207,9 +208,19 @@ export type ViewStyle = { backgroundPosition?: ?string, backgroundRepeat?: ?string, backgroundSize?: ?string, + boxDecorationBreak?: 'clone' | 'slice', boxShadow?: ?string, clip?: ?string, filter?: ?string, + mask?: ?string, + maskClip?: ?string, + maskComposite?: ?string, + maskImage?: ?string, + maskOrigin?: ?string, + maskPosition?: ?string, + maskRepeat?: ?string, + maskSize?: ?string, + forcedColorAdjust?: 'auto' | 'none', opacity?: ?number, outlineColor?: ?ColorValue, outlineOffset?: ?NumberOrString, @@ -219,6 +230,7 @@ export type ViewStyle = { overscrollBehaviorX?: ?OverscrollBehaviorValue, overscrollBehaviorY?: ?OverscrollBehaviorValue, pointerEvents?: 'box-none' | 'none' | 'box-only' | 'auto', + printColorAdjust?: 'economy' | 'exact', scrollbarWidth?: 'auto' | 'none' | 'thin', scrollSnapAlign?: ?string, scrollSnapType?: ?string, @@ -236,6 +248,7 @@ export type ViewProps = { lang?: string, style?: GenericStyleProp, tabIndex?: ?(0 | -1), + suppressHydrationWarning?: ?boolean, testID?: ?string, // unstable href?: ?string, diff --git a/packages/react-native-web/src/exports/YellowBox/index.js b/packages/react-native-web/src/exports/YellowBox/index.js deleted file mode 100644 index 5adbec5c1f..0000000000 --- a/packages/react-native-web/src/exports/YellowBox/index.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (c) Nicolas Gallagher. - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -import type { Node } from 'React'; - -import React from 'react'; -import UnimplementedView from '../../modules/UnimplementedView'; - -function YellowBox(props: Object): Node { - return ; -} - -YellowBox.ignoreWarnings = () => {}; - -export default YellowBox; diff --git a/packages/react-native-web/src/exports/processColor/__tests__/index-test.js b/packages/react-native-web/src/exports/processColor/__tests__/index-test.js index 77fc8baa88..9d01085a7e 100644 --- a/packages/react-native-web/src/exports/processColor/__tests__/index-test.js +++ b/packages/react-native-web/src/exports/processColor/__tests__/index-test.js @@ -42,6 +42,12 @@ describe('processColor', () => { const expectedInt = 0xff0a141e; expect(colorFromString).toEqual(platformSpecific(expectedInt)); }); + + it('should convert rgb(x y z / a)', () => { + const colorFromString = processColor('rgb(10 20 30 / 0.4)'); + const expectedInt = 0x660a141e; + expect(colorFromString).toEqual(platformSpecific(expectedInt)); + }); }); describe('RGBA strings', () => { diff --git a/packages/react-native-web/src/exports/processColor/index.js b/packages/react-native-web/src/exports/processColor/index.js index 07e8cf253b..ffed40f579 100644 --- a/packages/react-native-web/src/exports/processColor/index.js +++ b/packages/react-native-web/src/exports/processColor/index.js @@ -11,7 +11,7 @@ import normalizeColor from '@react-native/normalize-colors'; const processColor = (color?: string | number): ?number => { - if (color === undefined || color === null) { + if (color == null) { return color; } diff --git a/packages/react-native-web/src/exports/useColorScheme/index.js b/packages/react-native-web/src/exports/useColorScheme/index.js index 5f08bdb116..b4d8d5fd28 100644 --- a/packages/react-native-web/src/exports/useColorScheme/index.js +++ b/packages/react-native-web/src/exports/useColorScheme/index.js @@ -11,7 +11,7 @@ 'use client'; import * as React from 'react'; -import type { ColorSchemeName } from '../Appearance'; +import type { AppearancePreferences, ColorSchemeName } from '../Appearance'; import Appearance from '../Appearance'; export default function useColorScheme(): ColorSchemeName { @@ -20,7 +20,7 @@ export default function useColorScheme(): ColorSchemeName { ); React.useEffect(() => { - function listener(appearance) { + function listener(appearance: AppearancePreferences) { setColorScheme(appearance.colorScheme); } const { remove } = Appearance.addChangeListener(listener); diff --git a/packages/react-native-web/src/exports/useWindowDimensions/index.js b/packages/react-native-web/src/exports/useWindowDimensions/index.js index 818dbe2d85..d97190b5d1 100644 --- a/packages/react-native-web/src/exports/useWindowDimensions/index.js +++ b/packages/react-native-web/src/exports/useWindowDimensions/index.js @@ -18,7 +18,12 @@ import { useEffect, useState } from 'react'; export default function useWindowDimensions(): DisplayMetrics { const [dims, setDims] = useState(() => Dimensions.get('window')); useEffect(() => { - function handleChange({ window }) { + function handleChange({ + window + }: { + readonly window: ?DisplayMetrics, + ... + }) { if (window != null) { setDims(window); } diff --git a/packages/react-native-web/src/index.js b/packages/react-native-web/src/index.js index 7bfb590ad8..8db609d9e0 100644 --- a/packages/react-native-web/src/index.js +++ b/packages/react-native-web/src/index.js @@ -20,7 +20,6 @@ export { default as Dimensions } from './exports/Dimensions'; export { default as Easing } from './exports/Easing'; export { default as I18nManager } from './exports/I18nManager'; export { default as Keyboard } from './exports/Keyboard'; -export { default as InteractionManager } from './exports/InteractionManager'; export { default as LayoutAnimation } from './exports/LayoutAnimation'; export { default as Linking } from './exports/Linking'; export { default as NativeEventEmitter } from './exports/NativeEventEmitter'; @@ -35,16 +34,13 @@ export { default as Vibration } from './exports/Vibration'; // components export { default as ActivityIndicator } from './exports/ActivityIndicator'; export { default as Button } from './exports/Button'; -export { default as CheckBox } from './exports/CheckBox'; export { default as FlatList } from './exports/FlatList'; export { default as Image } from './exports/Image'; export { default as ImageBackground } from './exports/ImageBackground'; export { default as InputAccessoryView } from './exports/InputAccessoryView'; export { default as KeyboardAvoidingView } from './exports/KeyboardAvoidingView'; export { default as Modal } from './exports/Modal'; -export { default as Picker } from './exports/Picker'; export { default as Pressable } from './exports/Pressable'; -export { default as ProgressBar } from './exports/ProgressBar'; export { default as RefreshControl } from './exports/RefreshControl'; export { default as SafeAreaView } from './exports/SafeAreaView'; export { default as ScrollView } from './exports/ScrollView'; @@ -53,14 +49,12 @@ export { default as StatusBar } from './exports/StatusBar'; export { default as Switch } from './exports/Switch'; export { default as Text } from './exports/Text'; export { default as TextInput } from './exports/TextInput'; -export { default as Touchable } from './exports/Touchable'; export { default as TouchableHighlight } from './exports/TouchableHighlight'; export { default as TouchableNativeFeedback } from './exports/TouchableNativeFeedback'; export { default as TouchableOpacity } from './exports/TouchableOpacity'; export { default as TouchableWithoutFeedback } from './exports/TouchableWithoutFeedback'; export { default as View } from './exports/View'; export { default as VirtualizedList } from './exports/VirtualizedList'; -export { default as YellowBox } from './exports/YellowBox'; export { default as LogBox } from './exports/LogBox'; // plugins diff --git a/packages/react-native-web/src/modules/AccessibilityUtil/propsToAccessibilityComponent.js b/packages/react-native-web/src/modules/AccessibilityUtil/propsToAccessibilityComponent.js index 6d4090468c..13e42df34e 100644 --- a/packages/react-native-web/src/modules/AccessibilityUtil/propsToAccessibilityComponent.js +++ b/packages/react-native-web/src/modules/AccessibilityUtil/propsToAccessibilityComponent.js @@ -9,7 +9,7 @@ import propsToAriaRole from './propsToAriaRole'; -const roleComponents = { +const roleComponents: { [string]: string } = { article: 'article', banner: 'header', blockquote: 'blockquote', diff --git a/packages/react-native-web/src/modules/AccessibilityUtil/propsToAriaRole.js b/packages/react-native-web/src/modules/AccessibilityUtil/propsToAriaRole.js index 7859890c72..201a7f7fed 100644 --- a/packages/react-native-web/src/modules/AccessibilityUtil/propsToAriaRole.js +++ b/packages/react-native-web/src/modules/AccessibilityUtil/propsToAriaRole.js @@ -7,7 +7,7 @@ * @flow */ -const accessibilityRoleToWebRole = { +const accessibilityRoleToWebRole: { [string]: ?string } = { adjustable: 'slider', button: 'button', header: 'heading', diff --git a/packages/react-native-web/src/modules/AssetRegistry/index.js b/packages/react-native-web/src/modules/AssetRegistry/index.js index 7fb67e8359..69d1ec492d 100644 --- a/packages/react-native-web/src/modules/AssetRegistry/index.js +++ b/packages/react-native-web/src/modules/AssetRegistry/index.js @@ -19,27 +19,7 @@ export type PackagerAsset = { type: string }; -// `globalThis` is missing in some of our browser targets (Chrome 49, Safari 10), so we fall back -// to `global` and `window`. Once the browser targets support `globalThis`, use it directly. -const globalObject: any = - // $FlowFixMe[cannot-resolve-name] Flow 0.148 doesn't know about `globalThis` - typeof globalThis !== 'undefined' - ? globalThis - : typeof global !== 'undefined' - ? global - : typeof window !== 'undefined' - ? window - : {}; - -// React Native Web exposes both CJS and ESM versions. -// This avoids duplicating the registry itself, returning the same data through either CJS or ESM. -const ASSET_REGISTRY = Symbol.for('react-native-web.AssetRegistry'); - -if (!globalObject[ASSET_REGISTRY]) { - globalObject[ASSET_REGISTRY] = []; -} - -const assets: Array = globalObject[ASSET_REGISTRY]; +const assets: Array = []; export function registerAsset(asset: PackagerAsset): number { // `push` returns new array length, so the first asset will diff --git a/packages/react-native-web/src/modules/ImageLoader/index.js b/packages/react-native-web/src/modules/ImageLoader/index.js index 892db99292..a35438c465 100644 --- a/packages/react-native-web/src/modules/ImageLoader/index.js +++ b/packages/react-native-web/src/modules/ImageLoader/index.js @@ -11,7 +11,9 @@ const dataUriPattern = /^data:/; export class ImageUriCache { static _maximumEntries: number = 256; - static _entries = {}; + static _entries: { + [uri: string]: { lastUsedTimestamp: number, refCount: number } + } = {}; static has(uri: string): boolean { const entries = ImageUriCache._entries; @@ -71,11 +73,11 @@ export class ImageUriCache { } let id = 0; -const requests = {}; +const requests: { [string]: HTMLImageElement } = {}; const ImageLoader = { abort(requestId: number) { - let image = requests[`${requestId}`]; + let image: ?HTMLImageElement = requests[`${requestId}`]; if (image) { image.onerror = null; image.onload = null; @@ -125,14 +127,10 @@ const ImageLoader = { image.onload = (e) => { // avoid blocking the main thread const onDecode = () => onLoad({ nativeEvent: e }); - if (typeof image.decode === 'function') { - // Safari currently throws exceptions when decoding svgs. - // We want to catch that error and allow the load handler - // to be forwarded to the onLoad handler in this case - image.decode().then(onDecode, onDecode); - } else { - setTimeout(onDecode, 0); - } + // Safari currently throws exceptions when decoding svgs. + // We want to catch that error and allow the load handler + // to be forwarded to the onLoad handler in this case + image.decode().then(onDecode, onDecode); }; image.src = uri; requests[`${id}`] = image; @@ -154,7 +152,7 @@ const ImageLoader = { }); }, queryCache(uris: Array): Promise<{| [uri: string]: 'disk/memory' |}> { - const result = {}; + const result: { [uri: string]: 'disk/memory' } = {}; uris.forEach((u) => { if (ImageUriCache.has(u)) { result[u] = 'disk/memory'; diff --git a/packages/react-native-web/src/modules/InteractionManager/TaskQueue.js b/packages/react-native-web/src/modules/InteractionManager/TaskQueue.js new file mode 100644 index 0000000000..b83852cc79 --- /dev/null +++ b/packages/react-native-web/src/modules/InteractionManager/TaskQueue.js @@ -0,0 +1,41 @@ +/** + * Copyright (c) Nicolas Gallagher. + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + */ + +export type Task = () => void; + +class TaskQueue { + _tasks: Array = []; + + enqueue(task: Task): void { + this._tasks.push(task); + } + + cancelTasks(tasksToCancel: Array): void { + this._tasks = this._tasks.filter( + (task) => tasksToCancel.indexOf(task) === -1 + ); + } + + hasTasksToProcess(): boolean { + return this._tasks.length > 0; + } + + /** + * Executes the next task in the queue. + */ + processNext(): void { + const task = this._tasks.shift(); + if (task) { + task(); + } + } +} + +export default TaskQueue; diff --git a/packages/react-native-web/src/modules/InteractionManager/__tests__/TaskQueue-test.js b/packages/react-native-web/src/modules/InteractionManager/__tests__/TaskQueue-test.js new file mode 100644 index 0000000000..4ee6167b62 --- /dev/null +++ b/packages/react-native-web/src/modules/InteractionManager/__tests__/TaskQueue-test.js @@ -0,0 +1,86 @@ +/** + * Copyright (c) Nicolas Gallagher. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +function expectToHaveBeenCalledOnce(fn) { + expect(fn.mock.calls.length).toBe(1); +} + +function clearTaskQueue(taskQueue) { + while (taskQueue.hasTasksToProcess()) { + taskQueue.processNext(); + } +} + +describe('TaskQueue', () => { + let taskQueue; + let sequenceId; + + function createSequenceTask(expectedSequenceId) { + return jest.fn(() => { + expect(++sequenceId).toBe(expectedSequenceId); + }); + } + + beforeEach(async () => { + jest.resetModules(); + const TaskQueue = (await import('../TaskQueue.js')).default; + taskQueue = new TaskQueue(); + sequenceId = 0; + }); + + it('should run a basic task', () => { + const task1 = createSequenceTask(1); + taskQueue.enqueue(task1); + expect(taskQueue.hasTasksToProcess()).toBe(true); + taskQueue.processNext(); + expectToHaveBeenCalledOnce(task1); + }); + + it('should handle nested tasks', () => { + const task1 = jest.fn(() => { + expect(++sequenceId).toBe(1); + taskQueue.enqueue(task3); + }); + const task2 = createSequenceTask(2); + const task3 = createSequenceTask(3); + taskQueue.enqueue(task1); + taskQueue.enqueue(task2); // not blocked by task 1 + + clearTaskQueue(taskQueue); + + expectToHaveBeenCalledOnce(task1); + expectToHaveBeenCalledOnce(task2); + expectToHaveBeenCalledOnce(task3); + }); + + it('should be able to cancel tasks', () => { + const task1 = jest.fn(); + const task2 = createSequenceTask(1); + const task3 = jest.fn(); + const task4 = createSequenceTask(2); + taskQueue.enqueue(task1); + taskQueue.enqueue(task2); + taskQueue.enqueue(task3); + taskQueue.enqueue(task4); + taskQueue.cancelTasks([task1, task3]); + clearTaskQueue(taskQueue); + expect(task1).not.toHaveBeenCalled(); + expect(task3).not.toHaveBeenCalled(); + expectToHaveBeenCalledOnce(task2); + expectToHaveBeenCalledOnce(task4); + expect(taskQueue.hasTasksToProcess()).toBe(false); + }); + + it('should not crash when last task is cancelled', () => { + const task1 = jest.fn(); + taskQueue.enqueue(task1); + taskQueue.cancelTasks([task1]); + clearTaskQueue(taskQueue); + expect(task1).not.toHaveBeenCalled(); + expect(taskQueue.hasTasksToProcess()).toBe(false); + }); +}); diff --git a/packages/react-native-web/src/modules/InteractionManager/__tests__/index-test.js b/packages/react-native-web/src/modules/InteractionManager/__tests__/index-test.js new file mode 100644 index 0000000000..fd747ccf43 --- /dev/null +++ b/packages/react-native-web/src/modules/InteractionManager/__tests__/index-test.js @@ -0,0 +1,92 @@ +/** + * Copyright (c) Nicolas Gallagher. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +function expectToHaveBeenCalledOnce(fn) { + expect(fn.mock.calls.length).toBe(1); +} + +describe('InteractionManager', () => { + let InteractionManager; + + beforeEach(async () => { + jest.resetModules(); + InteractionManager = (await import('../index.js')).default; + }); + + it('run tasks asynchronously when there are interactions', () => { + const task = jest.fn(); + InteractionManager.runAfterInteractions(task); + expect(task).not.toHaveBeenCalled(); + + jest.runAllTimers(); + expect(task).toHaveBeenCalled(); + }); + + it('runs tasks when interactions complete', () => { + const task = jest.fn(); + const handle = InteractionManager.createInteractionHandle(); + InteractionManager.runAfterInteractions(task); + + jest.runAllTimers(); + InteractionManager.clearInteractionHandle(handle); + expect(task).not.toHaveBeenCalled(); + + jest.runAllTimers(); + expect(task).toHaveBeenCalled(); + }); + + it('runs tasks when an interaction starts and ends before the update', () => { + const task = jest.fn(); + const handle = InteractionManager.createInteractionHandle(); + InteractionManager.runAfterInteractions(task); + InteractionManager.clearInteractionHandle(handle); + + jest.runAllTimers(); + expect(task).toHaveBeenCalled(); + }); + + it('does not run tasks twice', () => { + const task1 = jest.fn(); + const task2 = jest.fn(); + InteractionManager.runAfterInteractions(task1); + jest.runAllTimers(); + + InteractionManager.runAfterInteractions(task2); + jest.runAllTimers(); + + expectToHaveBeenCalledOnce(task1); + }); + + it('runs tasks added while processing previous tasks', () => { + const task1 = jest.fn(() => { + InteractionManager.runAfterInteractions(task2); + }); + const task2 = jest.fn(); + + InteractionManager.runAfterInteractions(task1); + expect(task2).not.toHaveBeenCalled(); + + jest.runAllTimers(); + + expect(task1).toHaveBeenCalled(); + expect(task2).toHaveBeenCalled(); + }); + + it('allows tasks to be cancelled', () => { + const task1 = jest.fn(); + const task2 = jest.fn(); + const pending1 = InteractionManager.runAfterInteractions(task1); + InteractionManager.runAfterInteractions(task2); + expect(task1).not.toHaveBeenCalled(); + expect(task2).not.toHaveBeenCalled(); + pending1.cancel(); + + jest.runAllTimers(); + expect(task1).not.toHaveBeenCalled(); + expect(task2).toHaveBeenCalled(); + }); +}); diff --git a/packages/react-native-web/src/modules/InteractionManager/index.js b/packages/react-native-web/src/modules/InteractionManager/index.js new file mode 100644 index 0000000000..682bb1f3cc --- /dev/null +++ b/packages/react-native-web/src/modules/InteractionManager/index.js @@ -0,0 +1,78 @@ +/** + * Copyright (c) Nicolas Gallagher. + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + */ + +import TaskQueue from './TaskQueue'; +import requestIdleCallback from '../requestIdleCallback'; + +/** + * Removed from React Native. Kept for internal use only. + * + * TODO: Delete this module once no internals rely on it. + */ +const InteractionManager = { + /** + * Schedule a function to run after all interactions have completed. + */ + runAfterInteractions(task: () => void): { cancel: () => void } { + _taskQueue.enqueue(task); + _scheduleUpdate(); + return { + cancel: () => { + _taskQueue.cancelTasks([task]); + } + }; + }, + + /** + * Notify manager that an interaction has started. + */ + createInteractionHandle(): number { + const handle = ++_inc; + _interactionSet.add(handle); + return handle; + }, + + /** + * Notify manager that an interaction has completed. + */ + clearInteractionHandle(handle: number) { + _interactionSet.delete(handle); + _scheduleUpdate(); + } +}; + +const _interactionSet = new Set(); +const _taskQueue = new TaskQueue(); +let _nextUpdateHandle: number = 0; +let _inc = 0; + +/** + * Schedule an asynchronous update to the interaction state. + */ +function _scheduleUpdate() { + if (!_nextUpdateHandle) { + _nextUpdateHandle = requestIdleCallback(_processUpdate); + } +} + +/** + * Process the queue. + */ +function _processUpdate() { + _nextUpdateHandle = 0; + + if (_interactionSet.size === 0) { + while (_taskQueue.hasTasksToProcess()) { + _taskQueue.processNext(); + } + } +} + +export default InteractionManager; diff --git a/packages/react-native-web/src/modules/TextInputState/index.js b/packages/react-native-web/src/modules/TextInputState/index.js index c6b9e58ce1..0c270068b4 100644 --- a/packages/react-native-web/src/modules/TextInputState/index.js +++ b/packages/react-native-web/src/modules/TextInputState/index.js @@ -19,17 +19,17 @@ const TextInputState = { /** * Internal state */ - _currentlyFocusedNode: (null: ?Object), + _currentlyFocusedNode: null as ?Object, /** * Returns the ID of the currently focused text field, if one exists * If no text field is focused it returns null */ currentlyFocusedField(): ?Object { - if (document.activeElement !== this._currentlyFocusedNode) { - this._currentlyFocusedNode = null; + if (document.activeElement !== TextInputState._currentlyFocusedNode) { + TextInputState._currentlyFocusedNode = null; } - return this._currentlyFocusedNode; + return TextInputState._currentlyFocusedNode; }, /** @@ -39,7 +39,7 @@ const TextInputState = { */ focusTextInput(textFieldNode: ?Object) { if (textFieldNode !== null) { - this._currentlyFocusedNode = textFieldNode; + TextInputState._currentlyFocusedNode = textFieldNode; if (document.activeElement !== textFieldNode) { UIManager.focus(textFieldNode); } @@ -53,7 +53,7 @@ const TextInputState = { */ blurTextInput(textFieldNode: ?Object) { if (textFieldNode !== null) { - this._currentlyFocusedNode = null; + TextInputState._currentlyFocusedNode = null; if (document.activeElement === textFieldNode) { UIManager.blur(textFieldNode); } diff --git a/packages/react-native-web/src/modules/UnimplementedView/index.js b/packages/react-native-web/src/modules/UnimplementedView/index.js index 1cabc94040..b2eae056f7 100644 --- a/packages/react-native-web/src/modules/UnimplementedView/index.js +++ b/packages/react-native-web/src/modules/UnimplementedView/index.js @@ -6,8 +6,8 @@ * * @flow */ -import type { Node } from 'React'; -import type { ViewProps } from '../../exports/View/types'; +import type { Node } from 'react'; +import type { ViewProps, ViewStyle } from '../../exports/View/types'; import View from '../../exports/View'; import React from 'react'; @@ -19,7 +19,7 @@ function UnimplementedView({ style, ...props }: ViewProps): Node { return ; } -const unimplementedViewStyles = +const unimplementedViewStyles: ViewStyle = process.env.NODE_ENV !== 'production' ? { alignSelf: 'flex-start', diff --git a/packages/react-native-web/src/modules/addEventListener/index.js b/packages/react-native-web/src/modules/addEventListener/index.js index 105486fc53..8f23404173 100644 --- a/packages/react-native-web/src/modules/addEventListener/index.js +++ b/packages/react-native-web/src/modules/addEventListener/index.js @@ -8,56 +8,26 @@ */ 'use strict'; -import canUseDOM from '../canUseDom'; type Listener = (e: any) => void; export type EventOptions = { - capture?: boolean, - passive?: boolean, - once?: boolean + readonly capture?: boolean, + readonly passive?: boolean, + readonly once?: boolean }; const emptyFunction = () => {}; -function supportsPassiveEvents(): boolean { - let supported = false; - // Check if browser supports event with passive listeners - // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support - if (canUseDOM) { - try { - const options = {}; - Object.defineProperty(options, 'passive', { - get() { - supported = true; - return false; - } - }); - window.addEventListener('test', null, options); - window.removeEventListener('test', null, options); - } catch (e) {} - } - return supported; -} - -const canUsePassiveEvents = supportsPassiveEvents(); - -function getOptions(options: ?EventOptions): EventOptions | boolean { - if (options == null) { - return false; - } - return canUsePassiveEvents ? options : Boolean(options.capture); -} - /** * Shim generic API compatibility with ReactDOM's synthetic events, without needing the * large amount of code ReactDOM uses to do this. Ideally we wouldn't use a synthetic * event wrapper at all. */ -function isPropagationStopped() { +function isPropagationStopped(this: Event) { return this.cancelBubble; } -function isDefaultPrevented() { +function isDefaultPrevented(this: Event) { return this.defaultPrevented; } function normalizeEvent(event: any) { @@ -77,7 +47,7 @@ export function addEventListener( listener: Listener, options: ?EventOptions ): () => void { - const opts = getOptions(options); + const opts = options ?? false; const compatListener = (e: any) => listener(normalizeEvent(e)); target.addEventListener(type, compatListener, opts); diff --git a/packages/react-native-web/src/modules/isSelectionValid/index.js b/packages/react-native-web/src/modules/isSelectionValid/index.js index 5d013bcb48..edaf946f01 100644 --- a/packages/react-native-web/src/modules/isSelectionValid/index.js +++ b/packages/react-native-web/src/modules/isSelectionValid/index.js @@ -9,11 +9,14 @@ export default function isSelectionValid(): boolean { const selection = window.getSelection(); + if (selection == null) { + return false; + } const string = selection.toString(); const anchorNode = selection.anchorNode; const focusNode = selection.focusNode; const isTextNode = (anchorNode && anchorNode.nodeType === window.Node.TEXT_NODE) || (focusNode && focusNode.nodeType === window.Node.TEXT_NODE); - return string.length >= 1 && string !== '\n' && isTextNode; + return string.length >= 1 && string !== '\n' && isTextNode === true; } diff --git a/packages/react-native-web/src/modules/isUnitlessNumber/index.js b/packages/react-native-web/src/modules/isUnitlessNumber/index.js new file mode 100644 index 0000000000..148a48c2f0 --- /dev/null +++ b/packages/react-native-web/src/modules/isUnitlessNumber/index.js @@ -0,0 +1,68 @@ +/** + * Copyright (c) Nicolas Gallagher. + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + * @see https://github.com/react/react/blob/v19.3.0/packages/react-dom-bindings/src/shared/isUnitlessNumber.js + */ + +const properties = [ + 'animationIterationCount', + 'aspectRatio', + 'borderImageOutset', + 'borderImageSlice', + 'borderImageWidth', + 'columnCount', + 'columns', + 'flex', + 'flexGrow', + 'flexShrink', + 'fontWeight', + 'gridArea', + 'gridColumn', + 'gridColumnEnd', + 'gridColumnStart', + 'gridRow', + 'gridRowEnd', + 'gridRowStart', + 'initialLetter', + 'lineClamp', + 'opacity', + 'order', + 'orphans', + 'scale', + 'tabSize', + 'widows', + 'zIndex', + 'zoom', + + // SVG-related properties + 'fillOpacity', + 'floodOpacity', + 'stopOpacity', + 'strokeDasharray', + 'strokeDashoffset', + 'strokeMiterlimit', + 'strokeOpacity', + 'strokeWidth', + + // RN-related + 'scaleX', + 'scaleY', + 'scaleZ', + 'shadowOpacity' +]; + +const unitlessNumbers: Set = new Set(properties); + +// Support style names prefixed with 'Webkit' (e.g. 'WebkitLineClamp') +for (const prop of properties) { + unitlessNumbers.add('Webkit' + prop.charAt(0).toUpperCase() + prop.slice(1)); +} + +export default function isUnitlessNumber(name: string): boolean { + return unitlessNumbers.has(name); +} diff --git a/packages/react-native-web/src/modules/mergeRefs/index.js b/packages/react-native-web/src/modules/mergeRefs/index.js index 13ec3e0a3c..5f6e20a0ed 100644 --- a/packages/react-native-web/src/modules/mergeRefs/index.js +++ b/packages/react-native-web/src/modules/mergeRefs/index.js @@ -10,9 +10,9 @@ import * as React from 'react'; export default function mergeRefs( - ...args: $ReadOnlyArray> + ...args: ReadonlyArray> ): (node: HTMLElement | null) => void { - return function forwardRef(node: HTMLElement | null) { + return (node: HTMLElement | null) => { args.forEach((ref: React.ElementRef) => { if (ref == null) { return; diff --git a/packages/react-native-web/src/modules/modality/__tests__/index-test.js b/packages/react-native-web/src/modules/modality/__tests__/index-test.js deleted file mode 100644 index 3c39c1e086..0000000000 --- a/packages/react-native-web/src/modules/modality/__tests__/index-test.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (c) Nicolas Gallagher. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import { - getModality, - getActiveModality, - testOnly_resetActiveModality -} from '..'; -import { - describeWithPointerEvent, - testWithPointerType, - clearPointers, - createEventTarget, - setPointerEvent -} from 'dom-event-testing-library'; - -describeWithPointerEvent('modules/modality', (hasPointerEvent) => { - let rootNode; - - beforeEach(() => { - setPointerEvent(hasPointerEvent); - rootNode = document.createElement('div'); - document.body.appendChild(rootNode); - }); - - afterEach(() => { - document.body.removeChild(rootNode); - rootNode = null; - clearPointers(); - testOnly_resetActiveModality(); - }); - - describe('getModality', () => { - testWithPointerType('reflects currently-in-use modality', (pointerType) => { - const target = createEventTarget(rootNode); - expect(getModality()).toBe('keyboard'); - target.pointerdown({ pointerType }); - expect(getModality()).toBe(pointerType); - target.pointerup({ pointerType }); - target.keydown(); - expect(getModality()).toBe('keyboard'); - if (pointerType !== 'touch') { - target.pointermove({ pointerType }); - expect(getModality()).toBe(pointerType); - target.keydown(); - expect(getModality()).toBe('keyboard'); - } - }); - }); - - describe('getActiveModality', () => { - testWithPointerType( - 'reflects last actively used modality', - (pointerType) => { - const target = createEventTarget(rootNode); - expect(getActiveModality()).toBe('keyboard'); - target.pointerdown({ pointerType }); - expect(getActiveModality()).toBe(pointerType); - target.pointerup({ pointerType }); - target.keydown(); - if (pointerType !== 'touch') { - target.pointermove({ pointerType }); - expect(getActiveModality()).toBe('keyboard'); - } - } - ); - }); -}); diff --git a/packages/react-native-web/src/modules/modality/index.js b/packages/react-native-web/src/modules/modality/index.js deleted file mode 100644 index dfdba393fe..0000000000 --- a/packages/react-native-web/src/modules/modality/index.js +++ /dev/null @@ -1,215 +0,0 @@ -/** - * Copyright (c) Nicolas Gallagher. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -import { addEventListener } from '../addEventListener'; -import canUseDOM from '../canUseDom'; - -export type Modality = 'keyboard' | 'mouse' | 'touch' | 'pen'; - -const supportsPointerEvent = () => - !!(typeof window !== 'undefined' && window.PointerEvent != null); - -let activeModality = 'keyboard'; -let modality = 'keyboard'; -let previousModality; -let previousActiveModality; -let isEmulatingMouseEvents = false; -const listeners = new Set(); - -const KEYBOARD = 'keyboard'; -const MOUSE = 'mouse'; -const TOUCH = 'touch'; - -const BLUR = 'blur'; -const CONTEXTMENU = 'contextmenu'; -const FOCUS = 'focus'; -const KEYDOWN = 'keydown'; -const MOUSEDOWN = 'mousedown'; -const MOUSEMOVE = 'mousemove'; -const MOUSEUP = 'mouseup'; -const POINTERDOWN = 'pointerdown'; -const POINTERMOVE = 'pointermove'; -const SCROLL = 'scroll'; -const SELECTIONCHANGE = 'selectionchange'; -const TOUCHCANCEL = 'touchcancel'; -const TOUCHMOVE = 'touchmove'; -const TOUCHSTART = 'touchstart'; -const VISIBILITYCHANGE = 'visibilitychange'; - -const bubbleOptions = { passive: true }; -const captureOptions = { capture: true, passive: true }; - -function restoreModality() { - if (previousModality != null || previousActiveModality != null) { - if (previousModality != null) { - modality = previousModality; - previousModality = null; - } - if (previousActiveModality != null) { - activeModality = previousActiveModality; - previousActiveModality = null; - } - callListeners(); - } -} - -function onBlurWindow() { - previousModality = modality; - previousActiveModality = activeModality; - activeModality = KEYBOARD; - modality = KEYBOARD; - callListeners(); - // for fallback events - isEmulatingMouseEvents = false; -} - -function onFocusWindow() { - restoreModality(); -} - -function onKeyDown(event) { - if (event.metaKey || event.altKey || event.ctrlKey) { - return; - } - if (modality !== KEYBOARD) { - modality = KEYBOARD; - activeModality = KEYBOARD; - callListeners(); - } -} - -function onVisibilityChange() { - if (document.visibilityState !== 'hidden') { - restoreModality(); - } -} - -function onPointerish(event: any) { - const eventType = event.type; - - if (supportsPointerEvent()) { - if (eventType === POINTERDOWN) { - if (activeModality !== event.pointerType) { - modality = event.pointerType; - activeModality = event.pointerType; - callListeners(); - } - return; - } - if (eventType === POINTERMOVE) { - if (modality !== event.pointerType) { - modality = event.pointerType; - callListeners(); - } - return; - } - } - // Fallback for non-PointerEvent environment - else { - if (!isEmulatingMouseEvents) { - if (eventType === MOUSEDOWN) { - if (activeModality !== MOUSE) { - modality = MOUSE; - activeModality = MOUSE; - callListeners(); - } - } - if (eventType === MOUSEMOVE) { - if (modality !== MOUSE) { - modality = MOUSE; - callListeners(); - } - } - } - - // Flag when browser may produce emulated events - if (eventType === TOUCHSTART) { - isEmulatingMouseEvents = true; - if (event.touches && event.touches.length > 1) { - isEmulatingMouseEvents = false; - } - if (activeModality !== TOUCH) { - modality = TOUCH; - activeModality = TOUCH; - callListeners(); - } - return; - } - - // Remove flag after emulated events are finished or cancelled, and if an - // event occurs that cuts short a touch event sequence. - if ( - eventType === CONTEXTMENU || - eventType === MOUSEUP || - eventType === SELECTIONCHANGE || - eventType === SCROLL || - eventType === TOUCHCANCEL || - eventType === TOUCHMOVE - ) { - isEmulatingMouseEvents = false; - } - } -} - -if (canUseDOM) { - // Window events - addEventListener(window, BLUR, onBlurWindow, bubbleOptions); - addEventListener(window, FOCUS, onFocusWindow, bubbleOptions); - // Must be capture phase because 'stopPropagation' might prevent these - // events bubbling to the document. - addEventListener(document, KEYDOWN, onKeyDown, captureOptions); - addEventListener( - document, - VISIBILITYCHANGE, - onVisibilityChange, - captureOptions - ); - addEventListener(document, POINTERDOWN, onPointerish, captureOptions); - addEventListener(document, POINTERMOVE, onPointerish, captureOptions); - // Fallback events - addEventListener(document, CONTEXTMENU, onPointerish, captureOptions); - addEventListener(document, MOUSEDOWN, onPointerish, captureOptions); - addEventListener(document, MOUSEMOVE, onPointerish, captureOptions); - addEventListener(document, MOUSEUP, onPointerish, captureOptions); - addEventListener(document, TOUCHCANCEL, onPointerish, captureOptions); - addEventListener(document, TOUCHMOVE, onPointerish, captureOptions); - addEventListener(document, TOUCHSTART, onPointerish, captureOptions); - addEventListener(document, SELECTIONCHANGE, onPointerish, captureOptions); - addEventListener(document, SCROLL, onPointerish, captureOptions); -} - -function callListeners() { - const value = { activeModality, modality }; - listeners.forEach((listener) => { - listener(value); - }); -} - -export function getActiveModality(): Modality { - return activeModality; -} - -export function getModality(): Modality { - return modality; -} - -export function addModalityListener( - listener: ({ activeModality: Modality, modality: Modality }) => void -): () => void { - listeners.add(listener); - return () => { - listeners.delete(listener); - }; -} - -export function testOnly_resetActiveModality() { - isEmulatingMouseEvents = false; - activeModality = KEYBOARD; - modality = KEYBOARD; -} diff --git a/packages/react-native-web/src/modules/normalizeColor/index.js b/packages/react-native-web/src/modules/normalizeColor/index.js deleted file mode 100644 index 90403f0569..0000000000 --- a/packages/react-native-web/src/modules/normalizeColor/index.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Copyright (c) Nicolas Gallagher. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -import isWebColor from '../isWebColor'; -import processColor from '../../exports/processColor'; - -const normalizeColor = ( - color?: number | string, - opacity?: number = 1 -): void | string => { - if (color == null) return; - - if (typeof color === 'string' && isWebColor(color)) { - return color; - } - - const colorInt = processColor(color); - if (colorInt != null) { - const r = (colorInt >> 16) & 255; - const g = (colorInt >> 8) & 255; - const b = colorInt & 255; - const a = ((colorInt >> 24) & 255) / 255; - const alpha = (a * opacity).toFixed(2); - return `rgba(${r},${g},${b},${alpha})`; - } -}; - -export default normalizeColor; diff --git a/packages/react-native-web/src/modules/pick/index.js b/packages/react-native-web/src/modules/pick/index.js index a53ad43682..e0cac0683a 100644 --- a/packages/react-native-web/src/modules/pick/index.js +++ b/packages/react-native-web/src/modules/pick/index.js @@ -8,7 +8,7 @@ */ export default function pick(obj: Object, list: { [string]: boolean }): Object { - const nextObj = {}; + const nextObj: { [string]: unknown } = {}; for (const key in obj) { if (obj.hasOwnProperty(key)) { if (list[key] === true) { diff --git a/packages/react-native-web/src/modules/prefixStyles/index.js b/packages/react-native-web/src/modules/prefixStyles/index.js deleted file mode 100644 index e184594525..0000000000 --- a/packages/react-native-web/src/modules/prefixStyles/index.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) Nicolas Gallagher. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -import createPrefixer from 'inline-style-prefixer/lib/createPrefixer'; -import staticData from './static'; - -type StyleModifier = (style: Object) => Object; - -const prefixAll: StyleModifier = createPrefixer(staticData); - -export default prefixAll; diff --git a/packages/react-native-web/src/modules/prefixStyles/static.js b/packages/react-native-web/src/modules/prefixStyles/static.js deleted file mode 100644 index 94a5d940e8..0000000000 --- a/packages/react-native-web/src/modules/prefixStyles/static.js +++ /dev/null @@ -1,69 +0,0 @@ -import crossFade from 'inline-style-prefixer/lib/plugins/crossFade'; -import imageSet from 'inline-style-prefixer/lib/plugins/imageSet'; -import logical from 'inline-style-prefixer/lib/plugins/logical'; -import position from 'inline-style-prefixer/lib/plugins/position'; -import sizing from 'inline-style-prefixer/lib/plugins/sizing'; -import transition from 'inline-style-prefixer/lib/plugins/transition'; -const w = ['Webkit']; -const m = ['Moz']; -const wm = ['Webkit', 'Moz']; -const wms = ['Webkit', 'ms']; -const wmms = ['Webkit', 'Moz', 'ms']; - -export default { - plugins: [crossFade, imageSet, logical, position, sizing, transition], - prefixMap: { - appearance: wmms, - userSelect: wm, - textEmphasisPosition: wms, - textEmphasis: wms, - textEmphasisStyle: wms, - textEmphasisColor: wms, - boxDecorationBreak: wms, - clipPath: w, - maskImage: wms, - maskMode: wms, - maskRepeat: wms, - maskPosition: wms, - maskClip: wms, - maskOrigin: wms, - maskSize: wms, - maskComposite: wms, - mask: wms, - maskBorderSource: wms, - maskBorderMode: wms, - maskBorderSlice: wms, - maskBorderWidth: wms, - maskBorderOutset: wms, - maskBorderRepeat: wms, - maskBorder: wms, - maskType: wms, - textDecorationStyle: w, - textDecorationSkip: w, - textDecorationLine: w, - textDecorationColor: w, - filter: w, - breakAfter: w, - breakBefore: w, - breakInside: w, - columnCount: w, - columnFill: w, - columnGap: w, - columnRule: w, - columnRuleColor: w, - columnRuleStyle: w, - columnRuleWidth: w, - columns: w, - columnSpan: w, - columnWidth: w, - backdropFilter: w, - hyphens: w, - flowInto: w, - flowFrom: w, - regionFragment: w, - textOrientation: w, - tabSize: m, - fontKerning: w, - textSizeAdjust: w - } -}; diff --git a/packages/react-native-web/src/modules/requestIdleCallback/index.js b/packages/react-native-web/src/modules/requestIdleCallback/index.js index 9bb536b907..667c296cfe 100644 --- a/packages/react-native-web/src/modules/requestIdleCallback/index.js +++ b/packages/react-native-web/src/modules/requestIdleCallback/index.js @@ -20,19 +20,11 @@ const _requestIdleCallback = function (cb: Function, options?: Object) { }, 1); }; -const _cancelIdleCallback = function (id) { - clearTimeout(id); -}; - const isSupported = canUseDOM && typeof window.requestIdleCallback !== 'undefined'; -const requestIdleCallback: (cb: any, options?: any) => TimeoutID = isSupported - ? window.requestIdleCallback +const requestIdleCallback: (cb: any, options?: any) => number = isSupported + ? (cb, options) => window.requestIdleCallback(cb, options) : _requestIdleCallback; -const cancelIdleCallback: (TimeoutID) => void = isSupported - ? window.cancelIdleCallback - : _cancelIdleCallback; export default requestIdleCallback; -export { cancelIdleCallback }; diff --git a/packages/react-native-web/src/modules/setValueForStyles/dangerousStyleValue.js b/packages/react-native-web/src/modules/setValueForStyles/dangerousStyleValue.js index 8d6985ed83..b52b359d0a 100644 --- a/packages/react-native-web/src/modules/setValueForStyles/dangerousStyleValue.js +++ b/packages/react-native-web/src/modules/setValueForStyles/dangerousStyleValue.js @@ -10,7 +10,7 @@ * @noflow */ -import isUnitlessNumber from '../unitlessNumbers'; +import isUnitlessNumber from '../isUnitlessNumber'; /** * Convert a value into the proper css writable value. The style name `name` @@ -41,7 +41,7 @@ function dangerousStyleValue(name, value, isCustomProperty) { !isCustomProperty && typeof value === 'number' && value !== 0 && - !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) + !isUnitlessNumber(name) ) { return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers } diff --git a/packages/react-native-web/src/modules/unitlessNumbers/index.js b/packages/react-native-web/src/modules/unitlessNumbers/index.js deleted file mode 100644 index 43a980626a..0000000000 --- a/packages/react-native-web/src/modules/unitlessNumbers/index.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Copyright (c) Nicolas Gallagher. - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -const unitlessNumbers = { - animationIterationCount: true, - aspectRatio: true, - borderImageOutset: true, - borderImageSlice: true, - borderImageWidth: true, - boxFlex: true, - boxFlexGroup: true, - boxOrdinalGroup: true, - columnCount: true, - flex: true, - flexGrow: true, - flexOrder: true, - flexPositive: true, - flexShrink: true, - flexNegative: true, - fontWeight: true, - gridRow: true, - gridRowEnd: true, - gridRowGap: true, - gridRowStart: true, - gridColumn: true, - gridColumnEnd: true, - gridColumnGap: true, - gridColumnStart: true, - lineClamp: true, - opacity: true, - order: true, - orphans: true, - tabSize: true, - widows: true, - zIndex: true, - zoom: true, - // SVG-related - fillOpacity: true, - floodOpacity: true, - stopOpacity: true, - strokeDasharray: true, - strokeDashoffset: true, - strokeMiterlimit: true, - strokeOpacity: true, - strokeWidth: true, - // transform types - scale: true, - scaleX: true, - scaleY: true, - scaleZ: true, - // RN properties - shadowOpacity: true -}; - -/** - * Support style names that may come passed in prefixed by adding permutations - * of vendor prefixes. - */ -const prefixes = ['ms', 'Moz', 'O', 'Webkit']; -const prefixKey = (prefix: string, key: string) => { - return prefix + key.charAt(0).toUpperCase() + key.substring(1); -}; -Object.keys(unitlessNumbers).forEach((prop) => { - prefixes.forEach((prefix) => { - unitlessNumbers[prefixKey(prefix, prop)] = unitlessNumbers[prop]; - }); -}); - -export default unitlessNumbers; diff --git a/packages/react-native-web/src/modules/useElementLayout/index.js b/packages/react-native-web/src/modules/useElementLayout/index.js index 6099899ca6..87363c1492 100644 --- a/packages/react-native-web/src/modules/useElementLayout/index.js +++ b/packages/react-native-web/src/modules/useElementLayout/index.js @@ -16,7 +16,6 @@ import canUseDOM from '../canUseDom'; const DOM_LAYOUT_HANDLER_NAME = '__reactLayoutHandler'; -let didWarn = !canUseDOM; let resizeObserver = null; function getResizeObserver(): ?ResizeObserver { @@ -25,13 +24,13 @@ function getResizeObserver(): ?ResizeObserver { resizeObserver = new window.ResizeObserver(function (entries) { entries.forEach((entry) => { const node = entry.target; + // $FlowFixMe[prop-missing] const onLayout = node[DOM_LAYOUT_HANDLER_NAME]; if (typeof onLayout === 'function') { // We still need to measure the view because browsers don't yet provide // border-box dimensions in the entry UIManager.measure(node, (x, y, width, height, left, top) => { const event: LayoutEvent = { - // $FlowFixMe nativeEvent: { layout: { x, y, width, height, left, top } }, @@ -47,17 +46,6 @@ function getResizeObserver(): ?ResizeObserver { }); }); } - } else if (!didWarn) { - if ( - process.env.NODE_ENV !== 'production' && - process.env.NODE_ENV !== 'test' - ) { - console.warn( - 'onLayout relies on ResizeObserver which is not supported by your browser. ' + - 'Please include a polyfill, e.g., https://github.com/que-etc/resize-observer-polyfill.' - ); - didWarn = true; - } } return resizeObserver; } diff --git a/packages/react-native-web/src/modules/useEvent/index.js b/packages/react-native-web/src/modules/useEvent/index.js index 3d726b35a7..fecb35b775 100644 --- a/packages/react-native-web/src/modules/useEvent/index.js +++ b/packages/react-native-web/src/modules/useEvent/index.js @@ -7,6 +7,8 @@ * @flow */ +import type { EventOptions } from '../addEventListener'; + import { addEventListener } from '../addEventListener'; import useLayoutEffect from '../useLayoutEffect'; import useStable from '../useStable'; @@ -28,13 +30,9 @@ type AddListener = ( */ export default function useEvent( eventType: string, - options?: ?{ - capture?: boolean, - passive?: boolean, - once?: boolean - } + options?: ?EventOptions ): AddListener { - const targetListeners = useStable(() => new Map()); + const targetListeners = useStable(() => new Map void>()); const addListener = useStable(() => { return (target: EventTarget, callback: Callback) => { @@ -43,6 +41,7 @@ export default function useEvent( removeTargetListener(); } if (callback == null) { + // $FlowFixMe[react-rule-hook-mutation] targetListeners.delete(target); callback = () => {}; } @@ -52,6 +51,7 @@ export default function useEvent( callback, options ); + // $FlowFixMe[react-rule-hook-mutation] targetListeners.set(target, removeEventListener); return removeEventListener; }; @@ -62,6 +62,7 @@ export default function useEvent( targetListeners.forEach((removeListener) => { removeListener(); }); + // $FlowFixMe[react-rule-hook-mutation] targetListeners.clear(); }; }, [targetListeners]); diff --git a/packages/react-native-web/src/modules/useHover/__tests__/index-test.js b/packages/react-native-web/src/modules/useHover/__tests__/index-test.js index e6f7305223..47c33dab6a 100644 --- a/packages/react-native-web/src/modules/useHover/__tests__/index-test.js +++ b/packages/react-native-web/src/modules/useHover/__tests__/index-test.js @@ -7,22 +7,11 @@ import { act, render } from '@testing-library/react'; import * as React from 'react'; -import { - describeWithPointerEvent, - clearPointers, - createEventTarget, - setPointerEvent -} from 'dom-event-testing-library'; +import { clearPointers, createEventTarget } from 'dom-event-testing-library'; import useHover from '..'; -import { testOnly_resetActiveModality } from '../../modality'; - -describeWithPointerEvent('useHover', (hasPointerEvents) => { - beforeEach(() => { - setPointerEvent(hasPointerEvents); - }); +describe('useHover', () => { afterEach(() => { - testOnly_resetActiveModality(); // make sure all tests reset state machine tracking pointers on the mock surface clearPointers(); }); diff --git a/packages/react-native-web/src/modules/useHover/index.js b/packages/react-native-web/src/modules/useHover/index.js index ac97e94016..16b049dbfd 100644 --- a/packages/react-native-web/src/modules/useHover/index.js +++ b/packages/react-native-web/src/modules/useHover/index.js @@ -7,7 +7,6 @@ * @flow */ -import { getModality } from '../modality'; import useEvent from '../useEvent'; import useLayoutEffect from '../useLayoutEffect'; @@ -19,7 +18,7 @@ export type HoverEventsConfig = { contain?: ?boolean, disabled?: ?boolean, onHoverStart?: ?(e: any) => void, - onHoverChange?: ?(bool: boolean) => void, + onHoverChange?: ?(boolean: boolean) => void, onHoverUpdate?: ?(e: any) => void, onHoverEnd?: ?(e: any) => void }; @@ -32,8 +31,6 @@ const emptyObject = {}; const opts = { passive: true }; const lockEventType = 'react-gui:hover:lock'; const unlockEventType = 'react-gui:hover:unlock'; -const supportsPointerEvent = () => - !!(typeof window !== 'undefined' && window.PointerEvent != null); function dispatchCustomEvent( target: EventTarget, @@ -41,21 +38,14 @@ function dispatchCustomEvent( payload?: { bubbles?: boolean, cancelable?: boolean, - detail?: { [key: string]: mixed } + detail?: { [key: string]: unknown } } ) { - const event = document.createEvent('CustomEvent'); const { bubbles = true, cancelable = true, detail } = payload || emptyObject; - event.initCustomEvent(type, bubbles, cancelable, detail); + const event = new CustomEvent(type, { bubbles, cancelable, detail }); target.dispatchEvent(event); } -// This accounts for the non-PointerEvent fallback events. -function getPointerType(event) { - const { pointerType } = event; - return pointerType != null ? pointerType : getModality(); -} - export default function useHover( targetRef: any, config: HoverEventsConfig @@ -69,20 +59,9 @@ export default function useHover( onHoverEnd } = config; - const canUsePE = supportsPointerEvent(); - - const addMoveListener = useEvent( - canUsePE ? 'pointermove' : 'mousemove', - opts - ); - const addEnterListener = useEvent( - canUsePE ? 'pointerenter' : 'mouseenter', - opts - ); - const addLeaveListener = useEvent( - canUsePE ? 'pointerleave' : 'mouseleave', - opts - ); + const addMoveListener = useEvent('pointermove', opts); + const addEnterListener = useEvent('pointerenter', opts); + const addLeaveListener = useEvent('pointerleave', opts); // These custom events are used to implement the "contain" prop. const addLockListener = useEvent(lockEventType, opts); const addUnlockListener = useEvent(unlockEventType, opts); @@ -93,7 +72,7 @@ export default function useHover( /** * End the hover gesture */ - const hoverEnd = function (e) { + const hoverEnd = function (e: any) { if (onHoverEnd != null) { onHoverEnd(e); } @@ -108,9 +87,9 @@ export default function useHover( /** * Leave element */ - const leaveListener = function (e) { + const leaveListener = function (e: any) { const target = targetRef.current; - if (target != null && getPointerType(e) !== 'touch') { + if (target != null && e.pointerType !== 'touch') { if (contain) { dispatchCustomEvent(target, unlockEventType); } @@ -121,16 +100,9 @@ export default function useHover( /** * Move within element */ - const moveListener = function (e) { - if (getPointerType(e) !== 'touch') { + const moveListener = function (e: any) { + if (e.pointerType !== 'touch') { if (onHoverUpdate != null) { - // Not all browsers have these properties - if (e.x == null) { - e.x = e.clientX; - } - if (e.y == null) { - e.y = e.clientY; - } onHoverUpdate(e); } } @@ -139,7 +111,7 @@ export default function useHover( /** * Start the hover gesture */ - const hoverStart = function (e) { + const hoverStart = function (e: any) { if (onHoverStart != null) { onHoverStart(e); } @@ -156,19 +128,19 @@ export default function useHover( /** * Enter element */ - const enterListener = function (e) { + const enterListener = function (e: any) { const target = targetRef.current; - if (target != null && getPointerType(e) !== 'touch') { + if (target != null && e.pointerType !== 'touch') { if (contain) { dispatchCustomEvent(target, lockEventType); } hoverStart(e); - const lockListener = function (lockEvent) { + const lockListener = function (lockEvent: Event) { if (lockEvent.target !== target) { hoverEnd(e); } }; - const unlockListener = function (lockEvent) { + const unlockListener = function (lockEvent: Event) { if (lockEvent.target !== target) { hoverStart(e); } diff --git a/packages/react-native-web/src/modules/useLocale/index.js b/packages/react-native-web/src/modules/useLocale/index.js index 11c51517b8..e735c03281 100644 --- a/packages/react-native-web/src/modules/useLocale/index.js +++ b/packages/react-native-web/src/modules/useLocale/index.js @@ -27,7 +27,7 @@ type ProviderProps = { children: any }; -const defaultLocale = { +const defaultLocale: LocaleValue = { direction: 'ltr', locale: 'en-US' }; diff --git a/packages/react-native-web/src/modules/useLocale/isLocaleRTL.js b/packages/react-native-web/src/modules/useLocale/isLocaleRTL.js index 612b38877b..d29a69a25d 100644 --- a/packages/react-native-web/src/modules/useLocale/isLocaleRTL.js +++ b/packages/react-native-web/src/modules/useLocale/isLocaleRTL.js @@ -46,7 +46,7 @@ const rtlLangs = new Set([ 'yi' // Yiddish ]); -const cache = new Map(); +const cache = new Map(); /** * Determine the writing direction of a locale @@ -58,19 +58,12 @@ export function isLocaleRTL(locale: string): boolean { } let isRTL = false; - // $FlowFixMe - if (Intl.Locale) { - try { - // $FlowFixMe - const script = new Intl.Locale(locale).maximize().script; - isRTL = rtlScripts.has(script); - } catch { - // RangeError: Incorrect locale information provided - // Fallback to inferring from language - const lang = locale.split('-')[0]; - isRTL = rtlLangs.has(lang); - } - } else { + + try { + const script = new Intl.Locale(locale).maximize().script; + isRTL = script != null && rtlScripts.has(script); + } catch { + // RangeError: Incorrect locale information provided // Fallback to inferring from language const lang = locale.split('-')[0]; isRTL = rtlLangs.has(lang); diff --git a/packages/react-native-web/src/modules/useMergeRefs/index.js b/packages/react-native-web/src/modules/useMergeRefs/index.js index 2b6b993b23..3bcb857dfc 100644 --- a/packages/react-native-web/src/modules/useMergeRefs/index.js +++ b/packages/react-native-web/src/modules/useMergeRefs/index.js @@ -11,7 +11,7 @@ import * as React from 'react'; import mergeRefs from '../mergeRefs'; export default function useMergeRefs( - ...args: $ReadOnlyArray> + ...args: ReadonlyArray> ): (node: HTMLElement | null) => void { return React.useMemo( () => mergeRefs(...args), diff --git a/packages/react-native-web/src/modules/usePlatformMethods/index.js b/packages/react-native-web/src/modules/usePlatformMethods/index.js index 606b08d0fe..d6e33b823e 100644 --- a/packages/react-native-web/src/modules/usePlatformMethods/index.js +++ b/packages/react-native-web/src/modules/usePlatformMethods/index.js @@ -21,8 +21,8 @@ export default function usePlatformMethods({ pointerEvents, style }: { - style?: GenericStyleProp<*>, - pointerEvents?: $PropertyType + style?: GenericStyleProp, + pointerEvents?: ViewProps['pointerEvents'] }): (hostNode: any) => void { // Avoid creating a new ref on every render. const ref = useStable(() => (hostNode: any) => { diff --git a/packages/react-native-web/src/modules/usePressEvents/PressResponder.js b/packages/react-native-web/src/modules/usePressEvents/PressResponder.js index fa9d26d79a..1d4a8ab6e3 100644 --- a/packages/react-native-web/src/modules/usePressEvents/PressResponder.js +++ b/packages/react-native-web/src/modules/usePressEvents/PressResponder.js @@ -14,7 +14,7 @@ type ClickEvent = any; type KeyboardEvent = any; type ResponderEvent = any; -export type PressResponderConfig = $ReadOnly<{| +export type PressResponderConfig = Readonly<{| // The gesture can be interrupted by a parent gesture, e.g., scroll. // Defaults to true. cancelable?: ?boolean, @@ -41,7 +41,7 @@ export type PressResponderConfig = $ReadOnly<{| onPressEnd?: ?(event: ResponderEvent) => void |}>; -export type EventHandlers = $ReadOnly<{| +export type EventHandlers = Readonly<{| onClick: (event: ClickEvent) => void, onContextMenu: (event: ClickEvent) => void, onKeyDown: (event: KeyboardEvent) => void, @@ -78,7 +78,9 @@ const RESPONDER_GRANT = 'RESPONDER_GRANT'; const RESPONDER_RELEASE = 'RESPONDER_RELEASE'; const RESPONDER_TERMINATED = 'RESPONDER_TERMINATED'; -const Transitions = Object.freeze({ +const Transitions: { + readonly [TouchState]: { readonly [TouchSignal]: TouchState } +} = Object.freeze({ NOT_RESPONDER: { DELAY: ERROR, RESPONDER_GRANT: RESPONDER_INACTIVE_PRESS_START, @@ -116,25 +118,25 @@ const Transitions = Object.freeze({ } }); -const getElementRole = (element) => element.getAttribute('role'); +const getElementRole = (element: Element) => element.getAttribute('role'); -const getElementType = (element) => element.tagName.toLowerCase(); +const getElementType = (element: Element) => element.tagName.toLowerCase(); -const isActiveSignal = (signal) => +const isActiveSignal = (signal: TouchState) => signal === RESPONDER_ACTIVE_PRESS_START || signal === RESPONDER_ACTIVE_LONG_PRESS_START; -const isButtonRole = (element) => getElementRole(element) === 'button'; +const isButtonRole = (element: Element) => getElementRole(element) === 'button'; -const isPressStartSignal = (signal) => +const isPressStartSignal = (signal: TouchState) => signal === RESPONDER_INACTIVE_PRESS_START || signal === RESPONDER_ACTIVE_PRESS_START || signal === RESPONDER_ACTIVE_LONG_PRESS_START; -const isTerminalSignal = (signal) => +const isTerminalSignal = (signal: TouchSignal) => signal === RESPONDER_TERMINATED || signal === RESPONDER_RELEASE; -const isValidKeyPress = (event) => { +const isValidKeyPress = (event: any) => { const { key, target } = event; const isSpacebar = key === ' ' || key === 'Spacebar'; const isButtonish = @@ -223,12 +225,12 @@ export default class PressResponder { _config: PressResponderConfig; _eventHandlers: ?EventHandlers = null; _isPointerTouch: ?boolean = false; - _longPressDelayTimeout: ?TimeoutID = null; + _longPressDelayTimeout: ?number = null; _longPressDispatched: ?boolean = false; - _pressDelayTimeout: ?TimeoutID = null; - _pressOutDelayTimeout: ?TimeoutID = null; + _pressDelayTimeout: ?number = null; + _pressOutDelayTimeout: ?number = null; _selectionTerminated: ?boolean; - _touchActivatePosition: ?$ReadOnly<{| + _touchActivatePosition: ?Readonly<{| pageX: number, pageY: number |}>; @@ -467,7 +469,7 @@ export default class PressResponder { */ _receiveSignal(signal: TouchSignal, event: ResponderEvent): void { const prevState = this._touchState; - let nextState = null; + let nextState: ?TouchState = null; if (Transitions[prevState] != null) { nextState = Transitions[prevState][signal]; } @@ -609,7 +611,11 @@ export default class PressResponder { } } -function normalizeDelay(delay: ?number, min = 0, fallback = 0): number { +function normalizeDelay( + delay: ?number, + min: number = 0, + fallback: number = 0 +): number { return Math.max(min, delay ?? fallback); } diff --git a/packages/react-native-web/src/modules/useResponderEvents/ResponderEventTypes.js b/packages/react-native-web/src/modules/useResponderEvents/ResponderEventTypes.js index 1a94c924ed..46e6967e21 100644 --- a/packages/react-native-web/src/modules/useResponderEvents/ResponderEventTypes.js +++ b/packages/react-native-web/src/modules/useResponderEvents/ResponderEventTypes.js @@ -38,12 +38,10 @@ export type TouchEvent = { // The timestamp has a lowercase "s" in the Responder system timestamp: number, // TouchList is an array in the Responder system - touches: Array + touches: Array, + type?: string }; -export const BLUR = 'blur'; -export const CONTEXT_MENU = 'contextmenu'; -export const FOCUS_OUT = 'focusout'; export const MOUSE_DOWN = 'mousedown'; export const MOUSE_MOVE = 'mousemove'; export const MOUSE_UP = 'mouseup'; @@ -56,28 +54,28 @@ export const SCROLL = 'scroll'; export const SELECT = 'select'; export const SELECTION_CHANGE = 'selectionchange'; -export function isStartish(eventType: mixed): boolean { +export function isStartish(eventType: unknown): boolean { return eventType === TOUCH_START || eventType === MOUSE_DOWN; } -export function isMoveish(eventType: mixed): boolean { +export function isMoveish(eventType: unknown): boolean { return eventType === TOUCH_MOVE || eventType === MOUSE_MOVE; } -export function isEndish(eventType: mixed): boolean { +export function isEndish(eventType: unknown): boolean { return ( eventType === TOUCH_END || eventType === MOUSE_UP || isCancelish(eventType) ); } -export function isCancelish(eventType: mixed): boolean { +export function isCancelish(eventType: unknown): boolean { return eventType === TOUCH_CANCEL || eventType === MOUSE_CANCEL; } -export function isScroll(eventType: mixed): boolean { +export function isScroll(eventType: unknown): boolean { return eventType === SCROLL; } -export function isSelectionChange(eventType: mixed): boolean { +export function isSelectionChange(eventType: unknown): boolean { return eventType === SELECT || eventType === SELECTION_CHANGE; } diff --git a/packages/react-native-web/src/modules/useResponderEvents/ResponderSystem.js b/packages/react-native-web/src/modules/useResponderEvents/ResponderSystem.js index 6b6c4da0c7..21d0488bb0 100644 --- a/packages/react-native-web/src/modules/useResponderEvents/ResponderSystem.js +++ b/packages/react-native-web/src/modules/useResponderEvents/ResponderSystem.js @@ -157,6 +157,11 @@ import canUseDOM from '../canUseDom'; type ResponderId = number; +type EventPaths = { + idPath: Array, + nodePath: Array +}; + type ActiveResponderInstance = { id: ResponderId, idPath: Array, @@ -195,21 +200,35 @@ export type ResponderConfig = { onSelectionChangeShouldSetResponderCapture?: ?(e: ResponderEvent) => boolean }; -const emptyObject = {}; +type ShouldSetCallbackName = + | 'onStartShouldSetResponder' + | 'onStartShouldSetResponderCapture' + | 'onMoveShouldSetResponder' + | 'onMoveShouldSetResponderCapture' + | 'onScrollShouldSetResponder' + | 'onScrollShouldSetResponderCapture'; + +type ShouldSetRegistration = [ + ShouldSetCallbackName, + ShouldSetCallbackName, + { bubbles: boolean } +]; + +const emptyObject: ResponderConfig = {}; /* ------------ IMPLEMENTATION ------------ */ -const startRegistration = [ +const startRegistration: ShouldSetRegistration = [ 'onStartShouldSetResponderCapture', 'onStartShouldSetResponder', { bubbles: true } ]; -const moveRegistration = [ +const moveRegistration: ShouldSetRegistration = [ 'onMoveShouldSetResponderCapture', 'onMoveShouldSetResponder', { bubbles: true } ]; -const scrollRegistration = [ +const scrollRegistration: ShouldSetRegistration = [ 'onScrollShouldSetResponderCapture', 'onScrollShouldSetResponder', { bubbles: false } @@ -223,7 +242,7 @@ const shouldSetResponderEvents = { }; const emptyResponder = { id: null, idPath: null, node: null }; -const responderListenersMap = new Map(); +const responderListenersMap = new Map(); let isEmulatingMouseEvents = false; let trackedTouchCount = 0; @@ -238,7 +257,7 @@ function changeCurrentResponder(responder: ResponderInstance) { currentResponder = responder; } -function getResponderConfig(id: ResponderId): ResponderConfig | Object { +function getResponderConfig(id: ResponderId): ResponderConfig { const config = responderListenersMap.get(id); return config != null ? config : emptyObject; } @@ -258,10 +277,8 @@ function eventListener(domEvent: any) { const eventTarget = domEvent.target; /** - * Manage emulated events and early bailout. - * Since PointerEvent is not used yet (lack of support in older Safari), it's - * necessary to manually manage the mess of browser touch/mouse events. - * And bailout early for termination events when there is no active responder. + * Ignore mouse events emulated after a touch. + * Bailout early for termination events when there is no active responder. */ // Flag when browser may produce emulated events @@ -324,7 +341,8 @@ function eventListener(domEvent: any) { * Responder System logic */ - let eventPaths = getResponderPaths(domEvent); + const responderPaths = getResponderPaths(domEvent); + let eventPaths: ?EventPaths = responderPaths; let wasNegotiated = false; let wantsResponder; @@ -333,7 +351,7 @@ function eventListener(domEvent: any) { // If there is already a responder, prune the event paths to the lowest common ancestor // of the existing responder and deepest target of the event. const currentResponderIdPath = currentResponder.idPath; - const eventIdPath = eventPaths.idPath; + const eventIdPath = responderPaths.idPath; if (currentResponderIdPath != null && eventIdPath != null) { const lowestCommonAncestor = getLowestCommonAncestor( @@ -349,7 +367,7 @@ function eventListener(domEvent: any) { (lowestCommonAncestor === currentResponder.id ? 1 : 0); eventPaths = { idPath: eventIdPath.slice(index), - nodePath: eventPaths.nodePath.slice(index) + nodePath: responderPaths.nodePath.slice(index) }; } else { eventPaths = null; @@ -476,8 +494,12 @@ function eventListener(domEvent: any) { * relevant "shouldSet" functions for the given event type. If any of those functions * call "stopPropagation" on the event, stop searching for a responder. */ -function findWantsResponder(eventPaths, domEvent, responderEvent) { - const shouldSetCallbacks = shouldSetResponderEvents[(domEvent.type: any)]; // for Flow +function findWantsResponder( + eventPaths: EventPaths, + domEvent: any, + responderEvent: ResponderEvent +) { + const shouldSetCallbacks = shouldSetResponderEvents[domEvent.type]; // for Flow if (shouldSetCallbacks != null) { const { idPath, nodePath } = eventPaths; @@ -486,7 +508,11 @@ function findWantsResponder(eventPaths, domEvent, responderEvent) { const shouldSetCallbackBubbleName = shouldSetCallbacks[1]; const { bubbles } = shouldSetCallbacks[2]; - const check = function (id, node, callbackName) { + const check = function ( + id: ResponderId, + node: any, + callbackName: ShouldSetCallbackName + ) { const config = getResponderConfig(id); const shouldSetCallback = config[callbackName]; if (shouldSetCallback != null) { @@ -627,6 +653,7 @@ const documentEventsBubblePhase = [ 'selectionchange' ]; export function attachListeners() { + // $FlowFixMe[incompatible-use] if (canUseDOM && window.__reactResponderSystemActive == null) { window.addEventListener('blur', eventListener); documentEventsBubblePhase.forEach((eventType) => { @@ -635,6 +662,7 @@ export function attachListeners() { documentEventsCapturePhase.forEach((eventType) => { document.addEventListener(eventType, eventListener, true); }); + // $FlowFixMe[incompatible-use] window.__reactResponderSystemActive = true; } } diff --git a/packages/react-native-web/src/modules/useResponderEvents/ResponderTouchHistoryStore.js b/packages/react-native-web/src/modules/useResponderEvents/ResponderTouchHistoryStore.js index 12f3a0246b..6b4f720d9b 100644 --- a/packages/react-native-web/src/modules/useResponderEvents/ResponderTouchHistoryStore.js +++ b/packages/react-native-web/src/modules/useResponderEvents/ResponderTouchHistoryStore.js @@ -23,12 +23,14 @@ type TouchRecord = {| touchActive: boolean |}; -export type TouchHistory = $ReadOnly<{| +type MutableTouchHistory = {| indexOfSingleActiveTouch: number, mostRecentTimeStamp: number, numberActiveTouches: number, touchBank: Array -|}>; +|}; + +export type TouchHistory = Readonly; /** * Tracks the position and time of each active touch by `touch.identifier`. We @@ -39,12 +41,6 @@ export type TouchHistory = $ReadOnly<{| const __DEV__ = process.env.NODE_ENV !== 'production'; const MAX_TOUCH_BANK = 20; -function timestampForTouch(touch: Touch): number { - // The legacy internal implementation provides "timeStamp", which has been - // renamed to "timestamp". - return (touch: any).timeStamp || touch.timestamp; -} - /** * TODO: Instead of making gestures recompute filtered velocity, we could * include a built in velocity computation that can be reused globally. @@ -54,13 +50,13 @@ function createTouchRecord(touch: Touch): TouchRecord { touchActive: true, startPageX: touch.pageX, startPageY: touch.pageY, - startTimeStamp: timestampForTouch(touch), + startTimeStamp: touch.timestamp, currentPageX: touch.pageX, currentPageY: touch.pageY, - currentTimeStamp: timestampForTouch(touch), + currentTimeStamp: touch.timestamp, previousPageX: touch.pageX, previousPageY: touch.pageY, - previousTimeStamp: timestampForTouch(touch) + previousTimeStamp: touch.timestamp }; } @@ -68,13 +64,13 @@ function resetTouchRecord(touchRecord: TouchRecord, touch: Touch): void { touchRecord.touchActive = true; touchRecord.startPageX = touch.pageX; touchRecord.startPageY = touch.pageY; - touchRecord.startTimeStamp = timestampForTouch(touch); + touchRecord.startTimeStamp = touch.timestamp; touchRecord.currentPageX = touch.pageX; touchRecord.currentPageY = touch.pageY; - touchRecord.currentTimeStamp = timestampForTouch(touch); + touchRecord.currentTimeStamp = touch.timestamp; touchRecord.previousPageX = touch.pageX; touchRecord.previousPageY = touch.pageY; - touchRecord.previousTimeStamp = timestampForTouch(touch); + touchRecord.previousTimeStamp = touch.timestamp; } function getTouchIdentifier({ identifier }: Touch): number { @@ -94,7 +90,10 @@ function getTouchIdentifier({ identifier }: Touch): number { return identifier; } -function recordTouchStart(touch: Touch, touchHistory): void { +function recordTouchStart( + touch: Touch, + touchHistory: MutableTouchHistory +): void { const identifier = getTouchIdentifier(touch); const touchRecord = touchHistory.touchBank[identifier]; if (touchRecord) { @@ -102,10 +101,13 @@ function recordTouchStart(touch: Touch, touchHistory): void { } else { touchHistory.touchBank[identifier] = createTouchRecord(touch); } - touchHistory.mostRecentTimeStamp = timestampForTouch(touch); + touchHistory.mostRecentTimeStamp = touch.timestamp; } -function recordTouchMove(touch: Touch, touchHistory): void { +function recordTouchMove( + touch: Touch, + touchHistory: MutableTouchHistory +): void { const touchRecord = touchHistory.touchBank[getTouchIdentifier(touch)]; if (touchRecord) { touchRecord.touchActive = true; @@ -114,8 +116,8 @@ function recordTouchMove(touch: Touch, touchHistory): void { touchRecord.previousTimeStamp = touchRecord.currentTimeStamp; touchRecord.currentPageX = touch.pageX; touchRecord.currentPageY = touch.pageY; - touchRecord.currentTimeStamp = timestampForTouch(touch); - touchHistory.mostRecentTimeStamp = timestampForTouch(touch); + touchRecord.currentTimeStamp = touch.timestamp; + touchHistory.mostRecentTimeStamp = touch.timestamp; } else { console.warn( 'Cannot record touch move without a touch start.\n', @@ -125,7 +127,7 @@ function recordTouchMove(touch: Touch, touchHistory): void { } } -function recordTouchEnd(touch: Touch, touchHistory): void { +function recordTouchEnd(touch: Touch, touchHistory: MutableTouchHistory): void { const touchRecord = touchHistory.touchBank[getTouchIdentifier(touch)]; if (touchRecord) { touchRecord.touchActive = false; @@ -134,8 +136,8 @@ function recordTouchEnd(touch: Touch, touchHistory): void { touchRecord.previousTimeStamp = touchRecord.currentTimeStamp; touchRecord.currentPageX = touch.pageX; touchRecord.currentPageY = touch.pageY; - touchRecord.currentTimeStamp = timestampForTouch(touch); - touchHistory.mostRecentTimeStamp = timestampForTouch(touch); + touchRecord.currentTimeStamp = touch.timestamp; + touchHistory.mostRecentTimeStamp = touch.timestamp; } else { console.warn( 'Cannot record touch end without a touch start.\n', @@ -150,11 +152,11 @@ function printTouch(touch: Touch): string { identifier: touch.identifier, pageX: touch.pageX, pageY: touch.pageY, - timestamp: timestampForTouch(touch) + timestamp: touch.timestamp }); } -function printTouchBank(touchHistory): string { +function printTouchBank(touchHistory: MutableTouchHistory): string { const { touchBank } = touchHistory; let printed = JSON.stringify(touchBank.slice(0, MAX_TOUCH_BANK)); if (touchBank.length > MAX_TOUCH_BANK) { @@ -164,7 +166,7 @@ function printTouchBank(touchHistory): string { } export class ResponderTouchHistoryStore { - _touchHistory = { + _touchHistory: MutableTouchHistory = { touchBank: [], //Array numberActiveTouches: 0, // If there is only one active touch, we remember its location. This prevents diff --git a/packages/react-native-web/src/modules/useResponderEvents/createResponderEvent.js b/packages/react-native-web/src/modules/useResponderEvents/createResponderEvent.js index ca06395588..90746968fd 100644 --- a/packages/react-native-web/src/modules/useResponderEvents/createResponderEvent.js +++ b/packages/react-native-web/src/modules/useResponderEvents/createResponderEvent.js @@ -11,7 +11,7 @@ import type { ResponderTouchHistoryStore, TouchHistory } from './ResponderTouchHistoryStore'; -import type { TouchEvent } from './ResponderEventTypes'; +import type { Touch, TouchEvent } from './ResponderEventTypes'; import getBoundingClientRect from '../../modules/getBoundingClientRect'; @@ -41,15 +41,15 @@ export type ResponderEvent = {| |}; const emptyFunction = () => {}; -const emptyObject = {}; -const emptyArray = []; +const emptyObject: ResponderEvent['dispatchConfig'] = {}; +const emptyArray: Array = []; /** * Safari produces very large identifiers that would cause the `touchBank` array * length to be so large as to crash the browser, if not normalized like this. * In the future the `touchBank` should use an object/map instead. */ -function normalizeIdentifier(identifier) { +function normalizeIdentifier(identifier: number): number { return identifier > 20 ? identifier % 20 : identifier; } @@ -61,10 +61,10 @@ export default function createResponderEvent( domEvent: any, responderTouchHistoryStore: ResponderTouchHistoryStore ): ResponderEvent { - let rect; + let rect: ?{ left: number, top: number, ... }; let propagationWasStopped = false; - let changedTouches; - let touches; + let changedTouches: Array; + let touches: Array; const domEventChangedTouches = domEvent.changedTouches; const domEventType = domEvent.type; @@ -94,8 +94,8 @@ export default function createResponderEvent( : emptyFunction; const timestamp = domEvent.timeStamp; - function normalizeTouches(touches) { - return Array.prototype.slice.call(touches).map((touch) => { + function normalizeTouches(touches: TouchList): Array { + return Array.from(touches).map((touch) => { return { force: touch.force, identifier: normalizeIdentifier(touch.identifier), @@ -117,7 +117,7 @@ export default function createResponderEvent( changedTouches = normalizeTouches(domEventChangedTouches); touches = normalizeTouches(domEvent.touches); } else { - const emulatedTouches = [ + const emulatedTouches: Array = [ { force, identifier, @@ -140,7 +140,7 @@ export default function createResponderEvent( : emulatedTouches; } - const responderEvent = { + const responderEvent: ResponderEvent = { bubbles: true, cancelable: true, // `currentTarget` is set before dispatch @@ -189,13 +189,13 @@ export default function createResponderEvent( // Using getters and functions serves two purposes: // 1) The value of `currentTarget` is not initially available. // 2) Measuring the clientRect may cause layout jank and should only be done on-demand. - function locationX(x) { + function locationX(x: number): number | void { rect = rect || getBoundingClientRect(responderEvent.currentTarget); if (rect) { return x - rect.left; } } - function locationY(y) { + function locationY(y: number): number | void { rect = rect || getBoundingClientRect(responderEvent.currentTarget); if (rect) { return y - rect.top; diff --git a/packages/react-native-web/src/modules/useResponderEvents/index.js b/packages/react-native-web/src/modules/useResponderEvents/index.js index d28eeeb4d5..ff1ff08fb7 100644 --- a/packages/react-native-web/src/modules/useResponderEvents/index.js +++ b/packages/react-native-web/src/modules/useResponderEvents/index.js @@ -22,7 +22,7 @@ import type { ResponderConfig } from './ResponderSystem'; import * as React from 'react'; import * as ResponderSystem from './ResponderSystem'; -const emptyObject = {}; +const emptyObject: ResponderConfig = {}; let idCounter = 0; function useStable(getInitialValue: () => T): T { diff --git a/packages/react-native-web/src/modules/useResponderEvents/utils.js b/packages/react-native-web/src/modules/useResponderEvents/utils.js index 37d9017dda..18289b2ef0 100644 --- a/packages/react-native-web/src/modules/useResponderEvents/utils.js +++ b/packages/react-native-web/src/modules/useResponderEvents/utils.js @@ -16,7 +16,7 @@ function getEventPath(domEvent: any): Array { // Use the anchor node as the initial target to reconstruct a path. // (We actually only need the first "responder" node in practice.) if (domEvent.type === 'selectionchange') { - const target = window.getSelection().anchorNode; + const target = window.getSelection()?.anchorNode; return composedPathFallback(target); } else { const path = @@ -129,7 +129,7 @@ export function getLowestCommonAncestor( /** * Determine whether any of the active touches are within the current responder. - * This cannot rely on W3C `targetTouches`, as neither IE11 nor Safari implement it. + * This cannot rely on W3C `targetTouches`, as Safari doesn't implement it. */ export function hasTargetTouches(target: any, touches: any): boolean { if (!touches || touches.length === 0) { diff --git a/packages/react-native-web/src/modules/useStable/index.js b/packages/react-native-web/src/modules/useStable/index.js index fe67ae305c..0a3690549d 100644 --- a/packages/react-native-web/src/modules/useStable/index.js +++ b/packages/react-native-web/src/modules/useStable/index.js @@ -15,10 +15,9 @@ const UNINITIALIZED = : Object.freeze({}); export default function useStable(getInitialValue: () => T): T { - const ref = React.useRef(UNINITIALIZED); + const ref = React.useRef(UNINITIALIZED); if (ref.current === UNINITIALIZED) { ref.current = getInitialValue(); } - // $FlowFixMe (#64650789) Trouble refining types where `Symbol` is concerned. return ref.current; } diff --git a/packages/react-native-web/src/types/index.js b/packages/react-native-web/src/types/index.js index 528a05db13..18f0c0c887 100644 --- a/packages/react-native-web/src/types/index.js +++ b/packages/react-native-web/src/types/index.js @@ -11,24 +11,19 @@ export type ColorValue = null | string; export type DimensionValue = null | number | string; -export type EdgeInsetsValue = {| - top: number, - left: number, - right: number, - bottom: number -|}; - -export type GenericStyleProp<+T> = +export type GenericStyleProp = | null | void - | $ReadOnly + | Readonly | false | '' - | $ReadOnlyArray>; + | ReadonlyArray>; export type LayoutValue = { x: number, y: number, + left: number, + top: number, width: number, height: number }; @@ -36,7 +31,7 @@ export type LayoutValue = { export type LayoutEvent = { nativeEvent: { layout: LayoutValue, - target: any + target?: any }, timeStamp: number }; diff --git a/packages/react-native-web/src/types/styles.js b/packages/react-native-web/src/types/styles.js index ab1c42e0b1..92221a2e4d 100644 --- a/packages/react-native-web/src/types/styles.js +++ b/packages/react-native-web/src/types/styles.js @@ -324,22 +324,22 @@ export type TransformStyles = {| transform?: | ?string | Array< - | {| +perspective: NumberOrString |} - | {| +rotate: string |} - | {| +rotateX: string |} - | {| +rotateY: string |} - | {| +rotateZ: string |} - | {| +scale: number |} - | {| +scaleX: number |} - | {| +scaleY: number |} - | {| +scaleZ: number |} - | {| +scale3d: string |} - | {| +skewX: string |} - | {| +skewY: string |} - | {| +translateX: NumberOrString |} - | {| +translateY: NumberOrString |} - | {| +translateZ: NumberOrString |} - | {| +translate3d: string |} + | {| readonly perspective: NumberOrString |} + | {| readonly rotate: string |} + | {| readonly rotateX: string |} + | {| readonly rotateY: string |} + | {| readonly rotateZ: string |} + | {| readonly scale: number |} + | {| readonly scaleX: number |} + | {| readonly scaleY: number |} + | {| readonly scaleZ: number |} + | {| readonly scale3d: string |} + | {| readonly skewX: string |} + | {| readonly skewY: string |} + | {| readonly translateX: NumberOrString |} + | {| readonly translateY: NumberOrString |} + | {| readonly translateZ: NumberOrString |} + | {| readonly translate3d: string |} >, transformOrigin?: ?string | Array, transformStyle?: ?('flat' | 'preserve-3d') diff --git a/packages/react-native-web/src/vendor/hash/index.js b/packages/react-native-web/src/vendor/hash/index.js deleted file mode 100644 index ab87d0d637..0000000000 --- a/packages/react-native-web/src/vendor/hash/index.js +++ /dev/null @@ -1,60 +0,0 @@ -/* eslint-disable */ - -/** - * JS Implementation of MurmurHash2 - * - * @author Gary Court - * @see http://github.com/garycourt/murmurhash-js - * @author Austin Appleby - * @see http://sites.google.com/site/murmurhash/ - * - * @param {string} str ASCII only - * @param {number} seed Positive integer only - * @return {number} 32-bit positive integer hash - * - * @flow - */ - -function murmurhash2_32_gc(str, seed) { - var l = str.length, - h = seed ^ l, - i = 0, - k; - - while (l >= 4) { - k = - (str.charCodeAt(i) & 0xff) | - ((str.charCodeAt(++i) & 0xff) << 8) | - ((str.charCodeAt(++i) & 0xff) << 16) | - ((str.charCodeAt(++i) & 0xff) << 24); - - k = (k & 0xffff) * 0x5bd1e995 + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16); - k ^= k >>> 24; - k = (k & 0xffff) * 0x5bd1e995 + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16); - - h = ((h & 0xffff) * 0x5bd1e995 + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16)) ^ k; - - l -= 4; - ++i; - } - - switch (l) { - case 3: - h ^= (str.charCodeAt(i + 2) & 0xff) << 16; - case 2: - h ^= (str.charCodeAt(i + 1) & 0xff) << 8; - case 1: - h ^= str.charCodeAt(i) & 0xff; - h = (h & 0xffff) * 0x5bd1e995 + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16); - } - - h ^= h >>> 13; - h = (h & 0xffff) * 0x5bd1e995 + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16); - h ^= h >>> 15; - - return h >>> 0; -} - -const hash = (str: string): string => murmurhash2_32_gc(str, 1).toString(36); - -export default hash; diff --git a/packages/react-native-web/src/vendor/react-native/Animated/Animated.js b/packages/react-native-web/src/vendor/react-native/Animated/Animated.js index c57060036a..3834322152 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/Animated.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/Animated.js @@ -26,9 +26,9 @@ import View from './components/AnimatedView'; import AnimatedMock from './AnimatedMock'; import AnimatedImplementation from './AnimatedImplementation'; -const Animated = ((Platform.isTesting +const Animated = (Platform.isTesting ? AnimatedMock - : AnimatedImplementation): typeof AnimatedMock); + : AnimatedImplementation) as typeof AnimatedMock; export default { FlatList, diff --git a/packages/react-native-web/src/vendor/react-native/Animated/AnimatedEvent.js b/packages/react-native-web/src/vendor/react-native/Animated/AnimatedEvent.js index 3d673ab6b8..3c71a9ceea 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/AnimatedEvent.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/AnimatedEvent.js @@ -10,6 +10,8 @@ 'use strict'; +import type {EventMapping} from './NativeAnimatedModule'; + import AnimatedValue from './nodes/AnimatedValue'; import NativeAnimatedHelper from './NativeAnimatedHelper'; @@ -28,13 +30,13 @@ const __DEV__ = process.env.NODE_ENV !== 'production'; export function attachNativeEvent( viewRef: any, eventName: string, - argMapping: $ReadOnlyArray, + argMapping: ReadonlyArray, ): {detach: () => void} { // Find animated values in `argMapping` and create an array representing their // key path inside the `nativeEvent` object. Ex.: ['contentOffset', 'x']. - const eventMappings = []; + const eventMappings: Array = []; - const traverse = (value, path) => { + const traverse = (value: unknown, path: Array) => { if (value instanceof AnimatedValue) { value.__makeNative(); @@ -74,7 +76,7 @@ export function attachNativeEvent( NativeAnimatedHelper.API.removeAnimatedEventFromView( viewRef, eventName, - // $FlowFixMe[incompatible-call] + // $FlowFixMe[incompatible-type] mapping.animatedValueTag, ); }); @@ -83,8 +85,8 @@ export function attachNativeEvent( }; } -function validateMapping(argMapping, args) { - const validate = (recMapping, recEvt, key) => { +function validateMapping(argMapping: ReadonlyArray, args: any) { + const validate = (recMapping: ?Mapping, recEvt: any, key: string) => { if (recMapping instanceof AnimatedValue) { invariant( typeof recEvt === 'number', @@ -129,13 +131,12 @@ function validateMapping(argMapping, args) { } export class AnimatedEvent { - _argMapping: $ReadOnlyArray; + _argMapping: ReadonlyArray; _listeners: Array = []; - _callListeners: Function; _attachedEvent: ?{detach: () => void, ...}; __isNative: boolean; - constructor(argMapping: $ReadOnlyArray, config: EventConfig) { + constructor(argMapping: ReadonlyArray, config: EventConfig) { this._argMapping = argMapping; if (config == null) { @@ -146,7 +147,6 @@ export class AnimatedEvent { if (config.listener) { this.__addListener(config.listener); } - this._callListeners = this._callListeners.bind(this); this._attachedEvent = null; this.__isNative = shouldUseNativeDriver(config); } @@ -204,16 +204,13 @@ export class AnimatedEvent { validatedMapping = true; } - const traverse = (recMapping, recEvt, key) => { + const traverse = (recMapping: ?Mapping, recEvt: any, key: string) => { if (recMapping instanceof AnimatedValue) { if (typeof recEvt === 'number') { recMapping.setValue(recEvt); } } else if (typeof recMapping === 'object') { for (const mappingKey in recMapping) { - /* $FlowFixMe(>=0.120.0) This comment suppresses an error found - * when Flow v0.120 was deployed. To see the error, delete this - * comment and run Flow. */ traverse(recMapping[mappingKey], recEvt[mappingKey], mappingKey); } } @@ -226,7 +223,7 @@ export class AnimatedEvent { }; } - _callListeners(...args: any) { + _callListeners = (...args: any) => { this._listeners.forEach(listener => listener(...args)); - } + }; } diff --git a/packages/react-native-web/src/vendor/react-native/Animated/AnimatedImplementation.js b/packages/react-native-web/src/vendor/react-native/Animated/AnimatedImplementation.js index aee7cbdc39..d3ab63db2d 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/AnimatedImplementation.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/AnimatedImplementation.js @@ -18,7 +18,6 @@ import AnimatedInterpolation from './nodes/AnimatedInterpolation'; import AnimatedModulo from './nodes/AnimatedModulo'; import AnimatedMultiplication from './nodes/AnimatedMultiplication'; import AnimatedNode from './nodes/AnimatedNode'; -import AnimatedProps from './nodes/AnimatedProps'; import AnimatedSubtraction from './nodes/AnimatedSubtraction'; import AnimatedTracking from './nodes/AnimatedTracking'; import AnimatedValue from './nodes/AnimatedValue'; @@ -92,12 +91,12 @@ const diffClamp = function ( const _combineCallbacks = function ( callback: ?EndCallback, - config: $ReadOnly<{...AnimationConfig, ...}>, + config: Readonly<{...AnimationConfig, ...}>, ) { if (callback && config.onComplete) { return (...args: Array) => { config.onComplete && config.onComplete(...args); - callback && callback(...args); + callback(...args); }; } else { return callback || config.onComplete; @@ -119,8 +118,8 @@ const maybeVectorAnim = function ( configY[key] = y; } } - const aX = anim((value: AnimatedValueXY).x, configX); - const aY = anim((value: AnimatedValueXY).y, configY); + const aX = anim((value as AnimatedValueXY).x, configX); + const aY = anim((value as AnimatedValueXY).y, configY); // We use `stopTogether: false` here because otherwise tracking will break // because the second animation will get stopped before it can update. return parallel([aX, aY], {stopTogether: false}); @@ -143,10 +142,10 @@ const maybeVectorAnim = function ( configA[key] = a; } } - const aR = anim((value: AnimatedColor).r, configR); - const aG = anim((value: AnimatedColor).g, configG); - const aB = anim((value: AnimatedColor).b, configB); - const aA = anim((value: AnimatedColor).a, configA); + const aR = anim((value as AnimatedColor).r, configR); + const aG = anim((value as AnimatedColor).g, configG); + const aB = anim((value as AnimatedColor).b, configB); + const aA = anim((value as AnimatedColor).a, configA); // We use `stopTogether: false` here because otherwise tracking will break // because the second animation will get stopped before it can update. return parallel([aR, aG, aB, aA], {stopTogether: false}); @@ -372,10 +371,10 @@ const parallel = function ( ): CompositeAnimation { let doneCount = 0; // Make sure we only call stop() at most once for each animation - const hasEnded = {}; + const hasEnded: {[number]: boolean} = {}; const stopTogether = !(config && config.stopTogether === false); - const result = { + const result: CompositeAnimation = { start: function (callback?: ?EndCallback) { if (doneCount === animations.length) { callback && callback({finished: true}); @@ -463,7 +462,7 @@ type LoopAnimationConfig = { const loop = function ( animation: CompositeAnimation, - // $FlowFixMe[prop-missing] + // $FlowFixMe[incompatible-type] {iterations = -1, resetBeforeIteration = true}: LoopAnimationConfig = {}, ): CompositeAnimation { let isFinished = false; @@ -544,7 +543,7 @@ function unforkEvent( } const event = function ( - argMapping: $ReadOnlyArray, + argMapping: ReadonlyArray, config: EventConfig, ): any { const animatedEvent = new AnimatedEvent(argMapping, config); diff --git a/packages/react-native-web/src/vendor/react-native/Animated/AnimatedMock.js b/packages/react-native-web/src/vendor/react-native/Animated/AnimatedMock.js index 28cc94bb48..5e6f36fba6 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/AnimatedMock.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/AnimatedMock.js @@ -160,7 +160,7 @@ type LoopAnimationConfig = { const loop = function ( animation: CompositeAnimation, - // $FlowFixMe[prop-missing] + // $FlowFixMe[incompatible-type] {iterations = -1}: LoopAnimationConfig = {}, ): CompositeAnimation { return emptyAnimation; diff --git a/packages/react-native-web/src/vendor/react-native/Animated/Easing.js b/packages/react-native-web/src/vendor/react-native/Animated/Easing.js index 33ef8dec1a..1f248de8bf 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/Easing.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/Easing.js @@ -12,7 +12,7 @@ import _bezier from './bezier'; -let ease; +let ease: ?(t: number) => number; /** * The `Easing` module implements common easing functions. This module is used diff --git a/packages/react-native-web/src/vendor/react-native/Animated/NativeAnimatedHelper.js b/packages/react-native-web/src/vendor/react-native/Animated/NativeAnimatedHelper.js index 5f3c39c05b..d3d5509b6b 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/NativeAnimatedHelper.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/NativeAnimatedHelper.js @@ -36,20 +36,16 @@ let __nativeAnimationIdCount = 1; /* used for started animations */ let nativeEventEmitter; -let waitingForQueuedOperations = new Set(); +let waitingForQueuedOperations = new Set(); let queueOperations = false; let queue: Array<() => void> = []; -// $FlowFixMe let singleOpQueue: Array = []; -const useSingleOpBatching = false; - Platform.OS === 'android' && - !!NativeAnimatedModule?.queueAndExecuteBatchedOperations && - ReactNativeFeatureFlags.animatedShouldUseSingleOp(); -let flushQueueTimeout = null; +const useSingleOpBatching: boolean = false; +let flushQueueTimeout: any = null; -const eventListenerGetValueCallbacks = {}; -const eventListenerAnimationFinishedCallbacks = {}; +const eventListenerGetValueCallbacks: {[number]: ?(value: number) => void} = {}; +const eventListenerAnimationFinishedCallbacks: {[number]: ?EndCallback} = {}; let globalEventEmitterGetValueListener: ?EventSubscription = null; let globalEventEmitterAnimationFinishedListener: ?EventSubscription = null; @@ -84,7 +80,7 @@ const nativeOps: ?typeof NativeAnimatedModule = useSingleOpBatching acc[functionName] = i + 1; return acc; }, {}); - })(): $FlowFixMe) + })() as $FlowFixMe) : NativeAnimatedModule; /** @@ -98,10 +94,10 @@ const API = { ): void { invariant(nativeOps, 'Native animated module is not available'); if (useSingleOpBatching) { - if (saveValueCallback) { + if (saveValueCallback != null) { eventListenerGetValueCallbacks[tag] = saveValueCallback; } - // $FlowFixMe + // $FlowFixMe[incompatible-type] API.queueOperation(nativeOps.getValue, tag); } else { API.queueOperation(nativeOps.getValue, tag, saveValueCallback); @@ -174,13 +170,12 @@ const API = { } */ }, - queueOperation: , Fn: (...Args) => void>( + queueOperation: , Fn extends (...Args) => void>( fn: Fn, ...args: Args ): void => { if (useSingleOpBatching) { // Get the command ID from the queued function, and push that ID and any arguments needed to execute the operation - // $FlowFixMe: surprise, fn is actually a number singleOpQueue.push(fn, ...args); return; } @@ -203,9 +198,6 @@ const API = { config: AnimatedNodeConfig, ): void { invariant(nativeOps, 'Native animated module is not available'); - //if (nativeOps.updateAnimatedNodeConfig) { - // API.queueOperation(nativeOps.updateAnimatedNodeConfig, tag, config); - //} }, startListeningToAnimatedNodeValue: function (tag: number) { invariant(nativeOps, 'Native animated module is not available'); @@ -234,11 +226,11 @@ const API = { ): void { invariant(nativeOps, 'Native animated module is not available'); if (useSingleOpBatching) { - if (endCallback) { + if (endCallback != null) { eventListenerAnimationFinishedCallbacks[animationId] = endCallback; } - // $FlowFixMe API.queueOperation( + // $FlowFixMe[incompatible-type] nativeOps.startAnimatingNode, animationId, nodeTag, @@ -375,7 +367,7 @@ const SUPPORTED_COLOR_STYLES = { tintColor: true, }; -const SUPPORTED_STYLES = { +const SUPPORTED_STYLES: {[string]: boolean} = { ...SUPPORTED_COLOR_STYLES, borderBottomEndRadius: true, borderBottomLeftRadius: true, @@ -400,7 +392,7 @@ const SUPPORTED_STYLES = { translateY: true, }; -const SUPPORTED_TRANSFORMS = { +const SUPPORTED_TRANSFORMS: {[string]: boolean} = { translateX: true, translateY: true, scale: true, @@ -413,7 +405,7 @@ const SUPPORTED_TRANSFORMS = { perspective: true, }; -const SUPPORTED_INTERPOLATION_PARAMS = { +const SUPPORTED_INTERPOLATION_PARAMS: {[string]: boolean} = { inputRange: true, outputRange: true, extrapolate: true, @@ -450,7 +442,7 @@ function isSupportedInterpolationParam(param: string): boolean { } function validateTransform( - configs: Array< + configs: ReadonlyArray< | { type: 'animated', property: string, @@ -484,7 +476,7 @@ function validateStyles(styles: {[key: string]: ?number, ...}): void { } } -function validateInterpolation( +function validateInterpolation( config: InterpolationConfigType, ): void { for (const key in config) { @@ -511,7 +503,7 @@ function assertNativeAnimatedModule(): void { let _warnedMissingNativeAnimated = false; function shouldUseNativeDriver( - config: $ReadOnly<{...AnimationConfig, ...}> | EventConfig, + config: Readonly<{...AnimationConfig, ...}> | EventConfig, ): boolean { if (config.useNativeDriver == null) { console.warn( @@ -588,13 +580,13 @@ export default { assertNativeAnimatedModule, shouldUseNativeDriver, transformDataType, - // $FlowExpectedError[unsafe-getters-setters] - unsafe getter lint suppresion // $FlowExpectedError[missing-type-arg] - unsafe getter lint suppresion get nativeEventEmitter(): NativeEventEmitter { if (!nativeEventEmitter) { nativeEventEmitter = new NativeEventEmitter( // T88715063: NativeEventEmitter only used this parameter on iOS. Now it uses it on all platforms, so this code was modified automatically to preserve its behavior // If you want to use the native module on other platforms, please remove this condition and test its behavior + // $FlowFixMe[class-object-subtyping] Platform.OS !== 'ios' ? null : NativeAnimatedModule, ); } diff --git a/packages/react-native-web/src/vendor/react-native/Animated/NativeAnimatedModule.js b/packages/react-native-web/src/vendor/react-native/Animated/NativeAnimatedModule.js index 73f3bb76f9..8c69dc5bb5 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/NativeAnimatedModule.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/NativeAnimatedModule.js @@ -26,47 +26,47 @@ export type AnimatedNodeConfig = Object; export type AnimatingNodeConfig = Object; export interface Spec extends TurboModule { - +startOperationBatch: () => void; - +finishOperationBatch: () => void; - +createAnimatedNode: (tag: number, config: AnimatedNodeConfig) => void; - +updateAnimatedNodeConfig?: (tag: number, config: AnimatedNodeConfig) => void; - +getValue: (tag: number, saveValueCallback: SaveValueCallback) => void; - +startListeningToAnimatedNodeValue: (tag: number) => void; - +stopListeningToAnimatedNodeValue: (tag: number) => void; - +connectAnimatedNodes: (parentTag: number, childTag: number) => void; - +disconnectAnimatedNodes: (parentTag: number, childTag: number) => void; - +startAnimatingNode: ( + readonly startOperationBatch: () => void; + readonly finishOperationBatch: () => void; + readonly createAnimatedNode: (tag: number, config: AnimatedNodeConfig) => void; + readonly updateAnimatedNodeConfig?: (tag: number, config: AnimatedNodeConfig) => void; + readonly getValue: (tag: number, saveValueCallback: SaveValueCallback) => void; + readonly startListeningToAnimatedNodeValue: (tag: number) => void; + readonly stopListeningToAnimatedNodeValue: (tag: number) => void; + readonly connectAnimatedNodes: (parentTag: number, childTag: number) => void; + readonly disconnectAnimatedNodes: (parentTag: number, childTag: number) => void; + readonly startAnimatingNode: ( animationId: number, nodeTag: number, config: AnimatingNodeConfig, endCallback: EndCallback, ) => void; - +stopAnimation: (animationId: number) => void; - +setAnimatedNodeValue: (nodeTag: number, value: number) => void; - +setAnimatedNodeOffset: (nodeTag: number, offset: number) => void; - +flattenAnimatedNodeOffset: (nodeTag: number) => void; - +extractAnimatedNodeOffset: (nodeTag: number) => void; - +connectAnimatedNodeToView: (nodeTag: number, viewTag: number) => void; - +disconnectAnimatedNodeFromView: (nodeTag: number, viewTag: number) => void; - +restoreDefaultValues: (nodeTag: number) => void; - +dropAnimatedNode: (tag: number) => void; - +addAnimatedEventToView: ( + readonly stopAnimation: (animationId: number) => void; + readonly setAnimatedNodeValue: (nodeTag: number, value: number) => void; + readonly setAnimatedNodeOffset: (nodeTag: number, offset: number) => void; + readonly flattenAnimatedNodeOffset: (nodeTag: number) => void; + readonly extractAnimatedNodeOffset: (nodeTag: number) => void; + readonly connectAnimatedNodeToView: (nodeTag: number, viewTag: number) => void; + readonly disconnectAnimatedNodeFromView: (nodeTag: number, viewTag: number) => void; + readonly restoreDefaultValues: (nodeTag: number) => void; + readonly dropAnimatedNode: (tag: number) => void; + readonly addAnimatedEventToView: ( viewTag: number, eventName: string, eventMapping: EventMapping, ) => void; - +removeAnimatedEventFromView: ( + readonly removeAnimatedEventFromView: ( viewTag: number, eventName: string, animatedNodeTag: number, ) => void; // Events - +addListener: (eventName: string) => void; - +removeListeners: (count: number) => void; + readonly addListener: (eventName: string) => void; + readonly removeListeners: (count: number) => void; // All of the above in a batched mode - +queueAndExecuteBatchedOperations?: (operationsAndArgs: Array) => void; + readonly queueAndExecuteBatchedOperations?: (operationsAndArgs: Array) => void; } -export default (TurboModuleRegistry.get('NativeAnimatedModule'): ?Spec); +export default TurboModuleRegistry.get('NativeAnimatedModule') as ?Spec; diff --git a/packages/react-native-web/src/vendor/react-native/Animated/NativeAnimatedTurboModule.js b/packages/react-native-web/src/vendor/react-native/Animated/NativeAnimatedTurboModule.js index b67fe15013..1ee73657b3 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/NativeAnimatedTurboModule.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/NativeAnimatedTurboModule.js @@ -26,45 +26,45 @@ export type AnimatedNodeConfig = Object; export type AnimatingNodeConfig = Object; export interface Spec extends TurboModule { - +startOperationBatch: () => void; - +finishOperationBatch: () => void; - +createAnimatedNode: (tag: number, config: AnimatedNodeConfig) => void; - +getValue: (tag: number, saveValueCallback: SaveValueCallback) => void; - +startListeningToAnimatedNodeValue: (tag: number) => void; - +stopListeningToAnimatedNodeValue: (tag: number) => void; - +connectAnimatedNodes: (parentTag: number, childTag: number) => void; - +disconnectAnimatedNodes: (parentTag: number, childTag: number) => void; - +startAnimatingNode: ( + readonly startOperationBatch: () => void; + readonly finishOperationBatch: () => void; + readonly createAnimatedNode: (tag: number, config: AnimatedNodeConfig) => void; + readonly getValue: (tag: number, saveValueCallback: SaveValueCallback) => void; + readonly startListeningToAnimatedNodeValue: (tag: number) => void; + readonly stopListeningToAnimatedNodeValue: (tag: number) => void; + readonly connectAnimatedNodes: (parentTag: number, childTag: number) => void; + readonly disconnectAnimatedNodes: (parentTag: number, childTag: number) => void; + readonly startAnimatingNode: ( animationId: number, nodeTag: number, config: AnimatingNodeConfig, endCallback: EndCallback, ) => void; - +stopAnimation: (animationId: number) => void; - +setAnimatedNodeValue: (nodeTag: number, value: number) => void; - +setAnimatedNodeOffset: (nodeTag: number, offset: number) => void; - +flattenAnimatedNodeOffset: (nodeTag: number) => void; - +extractAnimatedNodeOffset: (nodeTag: number) => void; - +connectAnimatedNodeToView: (nodeTag: number, viewTag: number) => void; - +disconnectAnimatedNodeFromView: (nodeTag: number, viewTag: number) => void; - +restoreDefaultValues: (nodeTag: number) => void; - +dropAnimatedNode: (tag: number) => void; - +addAnimatedEventToView: ( + readonly stopAnimation: (animationId: number) => void; + readonly setAnimatedNodeValue: (nodeTag: number, value: number) => void; + readonly setAnimatedNodeOffset: (nodeTag: number, offset: number) => void; + readonly flattenAnimatedNodeOffset: (nodeTag: number) => void; + readonly extractAnimatedNodeOffset: (nodeTag: number) => void; + readonly connectAnimatedNodeToView: (nodeTag: number, viewTag: number) => void; + readonly disconnectAnimatedNodeFromView: (nodeTag: number, viewTag: number) => void; + readonly restoreDefaultValues: (nodeTag: number) => void; + readonly dropAnimatedNode: (tag: number) => void; + readonly addAnimatedEventToView: ( viewTag: number, eventName: string, eventMapping: EventMapping, ) => void; - +removeAnimatedEventFromView: ( + readonly removeAnimatedEventFromView: ( viewTag: number, eventName: string, animatedNodeTag: number, ) => void; // Events - +addListener: (eventName: string) => void; - +removeListeners: (count: number) => void; + readonly addListener: (eventName: string) => void; + readonly removeListeners: (count: number) => void; } -export default (TurboModuleRegistry.get( +export default TurboModuleRegistry.get( 'NativeAnimatedTurboModule', -): ?Spec); +) as ?Spec; diff --git a/packages/react-native-web/src/vendor/react-native/Animated/SpringConfig.js b/packages/react-native-web/src/vendor/react-native/Animated/SpringConfig.js index 18e42f0cb3..d29ec019b4 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/SpringConfig.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/SpringConfig.js @@ -16,11 +16,11 @@ type SpringConfigType = { ... }; -function stiffnessFromOrigamiValue(oValue) { +function stiffnessFromOrigamiValue(oValue: number): number { return (oValue - 30) * 3.62 + 194; } -function dampingFromOrigamiValue(oValue) { +function dampingFromOrigamiValue(oValue: number): number { return (oValue - 8) * 3 + 25; } @@ -38,31 +38,31 @@ function fromBouncinessAndSpeed( bounciness: number, speed: number, ): SpringConfigType { - function normalize(value, startValue, endValue) { + function normalize(value: number, startValue: number, endValue: number): number { return (value - startValue) / (endValue - startValue); } - function projectNormal(n, start, end) { + function projectNormal(n: number, start: number, end: number): number { return start + n * (end - start); } - function linearInterpolation(t, start, end) { + function linearInterpolation(t: number, start: number, end: number): number { return t * end + (1 - t) * start; } - function quadraticOutInterpolation(t, start, end) { + function quadraticOutInterpolation(t: number, start: number, end: number): number { return linearInterpolation(2 * t - t * t, start, end); } - function b3Friction1(x) { + function b3Friction1(x: number): number { return 0.0007 * Math.pow(x, 3) - 0.031 * Math.pow(x, 2) + 0.64 * x + 1.28; } - function b3Friction2(x) { + function b3Friction2(x: number): number { return 0.000044 * Math.pow(x, 3) - 0.006 * Math.pow(x, 2) + 0.36 * x + 2; } - function b3Friction3(x) { + function b3Friction3(x: number): number { return ( 0.00000045 * Math.pow(x, 3) - 0.000332 * Math.pow(x, 2) + @@ -71,7 +71,7 @@ function fromBouncinessAndSpeed( ); } - function b3Nobounce(tension) { + function b3Nobounce(tension: number): number { if (tension <= 18) { return b3Friction1(tension); } else if (tension > 18 && tension <= 44) { diff --git a/packages/react-native-web/src/vendor/react-native/Animated/animations/Animation.js b/packages/react-native-web/src/vendor/react-native/Animated/animations/Animation.js index ce9176f937..a81ed3c547 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/animations/Animation.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/animations/Animation.js @@ -73,7 +73,6 @@ class Animation { this.__nativeId, animatedValue.__getNativeTag(), config, - // $FlowFixMe[method-unbinding] added when improving typing for this parameters this.__debouncedOnEnd.bind(this), ); } catch (e) { diff --git a/packages/react-native-web/src/vendor/react-native/Animated/animations/DecayAnimation.js b/packages/react-native-web/src/vendor/react-native/Animated/animations/DecayAnimation.js index 5a08c0fc4e..a3a260e601 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/animations/DecayAnimation.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/animations/DecayAnimation.js @@ -57,7 +57,7 @@ class DecayAnimation extends Animation { __getNativeAnimationConfig(): {| deceleration: number, iterations: number, - type: $TEMPORARY$string<'decay'>, + type: string, velocity: number, |} { return { diff --git a/packages/react-native-web/src/vendor/react-native/Animated/animations/SpringAnimation.js b/packages/react-native-web/src/vendor/react-native/Animated/animations/SpringAnimation.js index 07c0df0839..ffcbc75987 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/animations/SpringAnimation.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/animations/SpringAnimation.js @@ -182,7 +182,7 @@ class SpringAnimation extends Animation { restSpeedThreshold: number, stiffness: number, toValue: any, - type: $TEMPORARY$string<'spring'>, + type: string, |} { return { type: 'spring', @@ -360,7 +360,6 @@ class SpringAnimation extends Animation { this.__debouncedOnEnd({finished: true}); return; } - // $FlowFixMe[method-unbinding] added when improving typing for this parameters this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this)); } diff --git a/packages/react-native-web/src/vendor/react-native/Animated/animations/TimingAnimation.js b/packages/react-native-web/src/vendor/react-native/Animated/animations/TimingAnimation.js index d9f19cba4c..d909765966 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/animations/TimingAnimation.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/animations/TimingAnimation.js @@ -25,7 +25,7 @@ import type {RgbaValue} from '../nodes/AnimatedColor'; import AnimatedColor from '../nodes/AnimatedColor'; -export type TimingAnimationConfig = $ReadOnly<{ +export type TimingAnimationConfig = Readonly<{ ...AnimationConfig, toValue: | number @@ -44,7 +44,7 @@ export type TimingAnimationConfig = $ReadOnly<{ delay?: number, }>; -export type TimingAnimationConfigSingle = $ReadOnly<{ +export type TimingAnimationConfigSingle = Readonly<{ ...AnimationConfig, toValue: number, easing?: (value: number) => number, @@ -52,7 +52,7 @@ export type TimingAnimationConfigSingle = $ReadOnly<{ delay?: number, }>; -let _easeInOut; +let _easeInOut: ?(t: number) => number; function easeInOut() { if (!_easeInOut) { _easeInOut = Easing.inOut(Easing.ease); @@ -127,7 +127,6 @@ class TimingAnimation extends Animation { this.__startNativeAnimation(animatedValue); } else { this._animationFrame = requestAnimationFrame( - // $FlowFixMe[method-unbinding] added when improving typing for this parameters this.onUpdate.bind(this), ); } @@ -160,7 +159,6 @@ class TimingAnimation extends Animation { (this._toValue - this._fromValue), ); if (this.__active) { - // $FlowFixMe[method-unbinding] added when improving typing for this parameters this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this)); } } diff --git a/packages/react-native-web/src/vendor/react-native/Animated/bezier.js b/packages/react-native-web/src/vendor/react-native/Animated/bezier.js index c7c11f6c88..b9a0b0a939 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/bezier.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/bezier.js @@ -27,27 +27,33 @@ const kSampleStepSize = 1.0 / (kSplineTableSize - 1.0); const float32ArraySupported = typeof Float32Array === 'function'; -function A(aA1, aA2) { +function A(aA1: number, aA2: number): number { return 1.0 - 3.0 * aA2 + 3.0 * aA1; } -function B(aA1, aA2) { +function B(aA1: number, aA2: number): number { return 3.0 * aA2 - 6.0 * aA1; } -function C(aA1) { +function C(aA1: number): number { return 3.0 * aA1; } // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2. -function calcBezier(aT, aA1, aA2) { +function calcBezier(aT: number, aA1: number, aA2: number): number { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; } // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2. -function getSlope(aT, aA1, aA2) { +function getSlope(aT: number, aA1: number, aA2: number): number { return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); } -function binarySubdivide(aX, _aA, _aB, mX1, mX2) { +function binarySubdivide( + aX: number, + _aA: number, + _aB: number, + mX1: number, + mX2: number, +): number { let currentX, currentT, i = 0, @@ -68,7 +74,12 @@ function binarySubdivide(aX, _aA, _aB, mX1, mX2) { return currentT; } -function newtonRaphsonIterate(aX, _aGuessT, mX1, mX2) { +function newtonRaphsonIterate( + aX: number, + _aGuessT: number, + mX1: number, + mX2: number, +): number { let aGuessT = _aGuessT; for (let i = 0; i < NEWTON_ITERATIONS; ++i) { const currentSlope = getSlope(aGuessT, mX1, mX2); @@ -92,16 +103,16 @@ export default function bezier( } // Precompute samples table - const sampleValues = float32ArraySupported + const sampleValues: Float32Array | Array = float32ArraySupported ? new Float32Array(kSplineTableSize) - : new Array(kSplineTableSize); + : new Array(kSplineTableSize); if (mX1 !== mY1 || mX2 !== mY2) { for (let i = 0; i < kSplineTableSize; ++i) { sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2); } } - function getTForX(aX) { + function getTForX(aX: number): number { let intervalStart = 0.0; let currentSample = 1; const lastSample = kSplineTableSize - 1; diff --git a/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedFlatList.js b/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedFlatList.js index 9b34dd4ced..59dea7c3ab 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedFlatList.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedFlatList.js @@ -18,13 +18,12 @@ import type {AnimatedComponentType} from '../createAnimatedComponent'; /** * @see https://github.com/facebook/react-native/commit/b8c8562 */ -const FlatListWithEventThrottle = React.forwardRef((props, ref) => ( - -)); +// $FlowFixMe[underconstrained-implicit-instantiation] +const FlatListWithEventThrottle = (props: any) => ; -export default (createAnimatedComponent( +export default createAnimatedComponent( FlatListWithEventThrottle, -): AnimatedComponentType< - React.ElementConfig, +) as AnimatedComponentType< + React.ComponentProps, React.ElementRef, ->); +>; diff --git a/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedImage.js b/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedImage.js index c882a2d595..04cf52b064 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedImage.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedImage.js @@ -15,9 +15,9 @@ import createAnimatedComponent from '../createAnimatedComponent'; import type {AnimatedComponentType} from '../createAnimatedComponent'; -export default (createAnimatedComponent( - (Image: $FlowFixMe), -): AnimatedComponentType< - React.ElementConfig, +export default createAnimatedComponent( + Image as $FlowFixMe, +) as AnimatedComponentType< + Omit, 'ref'>, React.ElementRef, ->); +>; diff --git a/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedScrollView.js b/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedScrollView.js index e824586519..8194f82829 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedScrollView.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedScrollView.js @@ -18,13 +18,11 @@ import type {AnimatedComponentType} from '../createAnimatedComponent'; /** * @see https://github.com/facebook/react-native/commit/b8c8562 */ -const ScrollViewWithEventThrottle = React.forwardRef((props, ref) => ( - -)); +const ScrollViewWithEventThrottle = (props: React.ComponentProps) => ; -export default (createAnimatedComponent( +export default createAnimatedComponent( ScrollViewWithEventThrottle, -): AnimatedComponentType< - React.ElementConfig, +) as AnimatedComponentType< + React.ComponentProps, React.ElementRef, ->); +>; diff --git a/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedSectionList.js b/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedSectionList.js index 94a23b2eee..fc1093eb02 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedSectionList.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedSectionList.js @@ -18,13 +18,12 @@ import type {AnimatedComponentType} from '../createAnimatedComponent'; /** * @see https://github.com/facebook/react-native/commit/b8c8562 */ -const SectionListWithEventThrottle = React.forwardRef((props, ref) => ( - -)); +// $FlowFixMe[underconstrained-implicit-instantiation] +const SectionListWithEventThrottle = (props: any) => ; -export default (createAnimatedComponent( +export default createAnimatedComponent( SectionListWithEventThrottle, -): AnimatedComponentType< - React.ElementConfig, +) as AnimatedComponentType< + React.ComponentProps, React.ElementRef, ->); +>; diff --git a/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedText.js b/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedText.js index eb99e1af85..ce3a9bf35c 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedText.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedText.js @@ -15,9 +15,9 @@ import createAnimatedComponent from '../createAnimatedComponent'; import type {AnimatedComponentType} from '../createAnimatedComponent'; -export default (createAnimatedComponent( - (Text: $FlowFixMe), -): AnimatedComponentType< - React.ElementConfig, +export default createAnimatedComponent( + Text as $FlowFixMe, +) as AnimatedComponentType< + Omit, 'ref'>, React.ElementRef, ->); +>; diff --git a/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedView.js b/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedView.js index 40696abaed..112513bb82 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedView.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/components/AnimatedView.js @@ -15,7 +15,7 @@ import createAnimatedComponent from '../createAnimatedComponent'; import type {AnimatedComponentType} from '../createAnimatedComponent'; -export default (createAnimatedComponent(View): AnimatedComponentType< - React.ElementConfig, +export default createAnimatedComponent(View) as AnimatedComponentType< + Omit, 'ref'>, React.ElementRef, ->); +>; diff --git a/packages/react-native-web/src/vendor/react-native/Animated/createAnimatedComponent.js b/packages/react-native-web/src/vendor/react-native/Animated/createAnimatedComponent.js index 671aa75d50..eada89e92b 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/createAnimatedComponent.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/createAnimatedComponent.js @@ -10,34 +10,32 @@ import useAnimatedProps from './useAnimatedProps'; import useMergeRefs from '../Utilities/useMergeRefs'; -import StyleSheet from '../../../exports/StyleSheet'; import View from '../../../exports/View'; import * as React from 'react'; export type AnimatedComponentType< - -Props: {+[string]: mixed, ...}, - +Instance = mixed, -> = React.AbstractComponent< - $ObjMap< - Props & - $ReadOnly<{ - passthroughAnimatedPropExplicitValues?: React.ElementConfig< - typeof View, - >, - }>, - () => any, - >, - Instance, ->; + in Props extends {readonly [string]: unknown, ...}, + out Instance = unknown, +> = component( + ref?: React.Ref, + ...{ + [K in keyof { + ...Omit, + readonly passthroughAnimatedPropExplicitValues?: React.ComponentProps< + typeof View, + >, + }]: any, + } +); /** * Experimental implementation of `createAnimatedComponent` that is intended to * be compatible with concurrent rendering. */ -export default function createAnimatedComponent( - Component: React.AbstractComponent, -): React.AbstractComponent { - return React.forwardRef((props, forwardedRef) => { +export default function createAnimatedComponent( + Component: component(ref?: React.Ref, ...TProps), +): AnimatedComponentType { + const AnimatedComponent = ({ref: forwardedRef, ...props}: any) => { const [reducedProps, callbackRef] = useAnimatedProps( props, ); @@ -61,5 +59,6 @@ export default function createAnimatedComponent( ref={ref} /> ); - }); + }; + return AnimatedComponent as any; } diff --git a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedAddition.js b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedAddition.js index 2becf40678..79c8cabd08 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedAddition.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedAddition.js @@ -39,7 +39,7 @@ class AnimatedAddition extends AnimatedWithChildren { return this._a.__getValue() + this._b.__getValue(); } - interpolate( + interpolate( config: InterpolationConfigType, ): AnimatedInterpolation { return new AnimatedInterpolation(this, config); diff --git a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedColor.js b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedColor.js index 6c959102d9..74375085ee 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedColor.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedColor.js @@ -21,25 +21,25 @@ type ColorValue = any; type NativeColorValue = any; type ProcessedColorValue = any; -export type AnimatedColorConfig = $ReadOnly<{ +export type AnimatedColorConfig = Readonly<{ useNativeDriver: boolean, }>; -type ColorListenerCallback = (value: ColorValue) => mixed; +type ColorListenerCallback = (value: ColorValue) => unknown; export type RgbaValue = { - +r: number, - +g: number, - +b: number, - +a: number, + readonly r: number, + readonly g: number, + readonly b: number, + readonly a: number, ... }; type RgbaAnimatedValue = { - +r: AnimatedValue, - +g: AnimatedValue, - +b: AnimatedValue, - +a: AnimatedValue, + readonly r: AnimatedValue, + readonly g: AnimatedValue, + readonly b: AnimatedValue, + readonly a: AnimatedValue, ... }; @@ -64,12 +64,12 @@ function processColor( if (isRgbaValue(color)) { // $FlowIgnore[incompatible-cast] - Type is verified above - return (color: RgbaValue); + return color as RgbaValue; } let normalizedColor: ?ProcessedColorValue = normalizeColor( // $FlowIgnore[incompatible-cast] - Type is verified above - (color: ColorValue), + color as ColorValue, ); if (normalizedColor === undefined || normalizedColor === null) { return null; @@ -138,8 +138,8 @@ export default class AnimatedColor extends AnimatedWithChildren { let value: RgbaValue | RgbaAnimatedValue | ColorValue = valueIn ?? defaultColor; if (isRgbaAnimatedValue(value)) { - // $FlowIgnore[incompatible-cast] - Type is verified above - const rgbaAnimatedValue: RgbaAnimatedValue = (value: RgbaAnimatedValue); + // $FlowFixMe[incompatible-type] - Type is verified above + const rgbaAnimatedValue: RgbaAnimatedValue = value as RgbaAnimatedValue; this.r = rgbaAnimatedValue.r; this.g = rgbaAnimatedValue.g; this.b = rgbaAnimatedValue.b; @@ -147,14 +147,14 @@ export default class AnimatedColor extends AnimatedWithChildren { } else { const processedColor: RgbaValue | NativeColorValue = // $FlowIgnore[incompatible-cast] - Type is verified above - processColor((value: ColorValue | RgbaValue)) ?? defaultColor; + processColor(value as ColorValue | RgbaValue) ?? defaultColor; let initColor: RgbaValue = defaultColor; if (isRgbaValue(processedColor)) { // $FlowIgnore[incompatible-cast] - Type is verified above - initColor = (processedColor: RgbaValue); + initColor = processedColor as RgbaValue; } else { // $FlowIgnore[incompatible-cast] - Type is verified above - this.nativeColor = (processedColor: NativeColorValue); + this.nativeColor = processedColor as NativeColorValue; } this.r = new AnimatedValue(initColor.r); diff --git a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedDiffClamp.js b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedDiffClamp.js index 3cfe40b1ea..29ca2609a3 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedDiffClamp.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedDiffClamp.js @@ -39,7 +39,7 @@ class AnimatedDiffClamp extends AnimatedWithChildren { super.__makeNative(platformConfig); } - interpolate( + interpolate( config: InterpolationConfigType, ): AnimatedInterpolation { return new AnimatedInterpolation(this, config); diff --git a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedDivision.js b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedDivision.js index bf9c771382..a12660b3d1 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedDivision.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedDivision.js @@ -54,7 +54,7 @@ class AnimatedDivision extends AnimatedWithChildren { return a / b; } - interpolate( + interpolate( config: InterpolationConfigType, ): AnimatedInterpolation { return new AnimatedInterpolation(this, config); diff --git a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedInterpolation.js b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedInterpolation.js index 4e99e64fd5..7af0eccdb2 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedInterpolation.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedInterpolation.js @@ -26,9 +26,9 @@ const __DEV__ = process.env.NODE_ENV !== 'production'; type ExtrapolateType = 'extend' | 'identity' | 'clamp'; -export type InterpolationConfigType = $ReadOnly<{ - inputRange: $ReadOnlyArray, - outputRange: $ReadOnlyArray, +export type InterpolationConfigType = Readonly<{ + inputRange: ReadonlyArray, + outputRange: ReadonlyArray, easing?: (input: number) => number, extrapolate?: ExtrapolateType, extrapolateLeft?: ExtrapolateType, @@ -41,14 +41,14 @@ const linear = (t: number) => t; * Very handy helper to map input ranges to output ranges with an easing * function and custom behavior outside of the ranges. */ -function createInterpolation( +function createInterpolation( config: InterpolationConfigType, ): (input: number) => OutputT { if (config.outputRange && typeof config.outputRange[0] === 'string') { - return (createInterpolationFromStringOutputRange((config: any)): any); + return createInterpolationFromStringOutputRange(config as any) as any; } - const outputRange: $ReadOnlyArray = (config.outputRange: any); + const outputRange: ReadonlyArray = config.outputRange as any; const inputRange = config.inputRange; @@ -90,7 +90,7 @@ function createInterpolation( ); const range = findRange(input, inputRange); - return (interpolate( + return interpolate( input, inputRange[range], inputRange[range + 1], @@ -99,7 +99,7 @@ function createInterpolation( easing, extrapolateLeft, extrapolateRight, - ): any); + ) as any; }; } @@ -200,7 +200,7 @@ const stringShapeRegex = /[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?/g; function createInterpolationFromStringOutputRange( config: InterpolationConfigType, ): (input: number) => string { - let outputRange: Array = (config.outputRange: any); + let outputRange: Array = config.outputRange as any; invariant(outputRange.length >= 2, 'Bad output range'); outputRange = outputRange.map(colorToRgba); checkPattern(outputRange); @@ -215,7 +215,7 @@ function createInterpolationFromStringOutputRange( // ] /* $FlowFixMe[incompatible-use] (>=0.18.0): `outputRange[0].match()` can * return `null`. Need to guard against this possibility. */ - const outputRanges = outputRange[0].match(stringShapeRegex).map(() => []); + const outputRanges = outputRange[0].match(stringShapeRegex).map((): Array => []); outputRange.forEach(value => { /* $FlowFixMe[incompatible-use] (>=0.18.0): `value.match()` can return * `null`. Need to guard against this possibility. */ @@ -228,8 +228,6 @@ function createInterpolationFromStringOutputRange( .match(stringShapeRegex) /* $FlowFixMe[incompatible-use] (>=0.18.0): `outputRange[0].match()` can * return `null`. Need to guard against this possibility. */ - /* $FlowFixMe[incompatible-call] (>=0.18.0): `outputRange[0].match()` can - * return `null`. Need to guard against this possibility. */ .map((value, i) => { return createInterpolation({ ...config, @@ -260,7 +258,7 @@ function isRgbOrRgba(range: string) { return typeof range === 'string' && range.startsWith('rgb'); } -function checkPattern(arr: $ReadOnlyArray) { +function checkPattern(arr: ReadonlyArray) { const pattern = arr[0].replace(stringShapeRegex, ''); for (let i = 1; i < arr.length; ++i) { invariant( @@ -270,7 +268,7 @@ function checkPattern(arr: $ReadOnlyArray) { } } -function findRange(input: number, inputRange: $ReadOnlyArray) { +function findRange(input: number, inputRange: ReadonlyArray) { let i; for (i = 1; i < inputRange.length - 1; ++i) { if (inputRange[i] >= input) { @@ -280,7 +278,7 @@ function findRange(input: number, inputRange: $ReadOnlyArray) { return i - 1; } -function checkValidInputRange(arr: $ReadOnlyArray) { +function checkValidInputRange(arr: ReadonlyArray) { invariant(arr.length >= 2, 'inputRange must have at least 2 elements'); const message = 'inputRange must be monotonically non-decreasing ' + String(arr); @@ -289,21 +287,16 @@ function checkValidInputRange(arr: $ReadOnlyArray) { } } -function checkInfiniteRange(name: string, arr: $ReadOnlyArray) { +function checkInfiniteRange(name: string, arr: ReadonlyArray) { invariant(arr.length >= 2, name + ' must have at least 2 elements'); invariant( arr.length !== 2 || arr[0] !== -Infinity || arr[1] !== Infinity, - /* $FlowFixMe[incompatible-type] (>=0.13.0) - In the addition expression - * below this comment, one or both of the operands may be something that - * doesn't cleanly convert to a string, like undefined, null, and object, - * etc. If you really mean this implicit string conversion, you can do - * something like String(myThing) */ - name + 'cannot be ]-infinity;+infinity[ ' + arr, + name + 'cannot be ]-infinity;+infinity[ ' + String(arr), ); } class AnimatedInterpolation< - OutputT: number | string, + OutputT extends number | string, > extends AnimatedWithChildren { // Export for testing. static __createInterpolation: ( @@ -335,7 +328,7 @@ class AnimatedInterpolation< return this._interpolation(parentValue); } - interpolate( + interpolate( config: InterpolationConfigType, ): AnimatedInterpolation { return new AnimatedInterpolation(this, config); @@ -350,7 +343,7 @@ class AnimatedInterpolation< super.__detach(); } - __transformDataType(range: $ReadOnlyArray): Array { + __transformDataType(range: ReadonlyArray): Array { return range.map(NativeAnimatedHelper.transformDataType); } diff --git a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedModulo.js b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedModulo.js index 40a3caee5e..fdcde15ad4 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedModulo.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedModulo.js @@ -39,7 +39,7 @@ class AnimatedModulo extends AnimatedWithChildren { ); } - interpolate( + interpolate( config: InterpolationConfigType, ): AnimatedInterpolation { return new AnimatedInterpolation(this, config); diff --git a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedMultiplication.js b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedMultiplication.js index 37d7dcc095..4e69c582f2 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedMultiplication.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedMultiplication.js @@ -39,7 +39,7 @@ class AnimatedMultiplication extends AnimatedWithChildren { return this._a.__getValue() * this._b.__getValue(); } - interpolate( + interpolate( config: InterpolationConfigType, ): AnimatedInterpolation { return new AnimatedInterpolation(this, config); diff --git a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedNode.js b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedNode.js index 88bbdcc38e..ae76566daf 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedNode.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedNode.js @@ -17,7 +17,7 @@ import invariant from 'fbjs/lib/invariant'; import type {PlatformConfig} from '../AnimatedPlatformConfig'; -type ValueListenerCallback = (state: {value: number, ...}) => mixed; +type ValueListenerCallback = (state: {value: number, ...}) => unknown; let _uniqueId = 1; @@ -71,7 +71,7 @@ class AnimatedNode { * * See https://reactnative.dev/docs/animatedvalue#addlistener */ - addListener(callback: (value: any) => mixed): string { + addListener(callback: (value: any) => unknown): string { const id = String(_uniqueId++); this._listeners[id] = callback; if (this.__isNative) { diff --git a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedProps.js b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedProps.js index 132f977fa8..e7ffd4b15d 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedProps.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedProps.js @@ -35,7 +35,7 @@ class AnimatedProps extends AnimatedNode { } __getValue(): Object { - const props = {}; + const props: {[string]: unknown} = {}; for (const key in this._props) { const value = this._props[key]; if (value instanceof AnimatedNode) { @@ -54,7 +54,7 @@ class AnimatedProps extends AnimatedNode { } __getAnimatedValue(): Object { - const props = {}; + const props: {[string]: unknown} = {}; for (const key in this._props) { const value = this._props[key]; if (value instanceof AnimatedNode) { @@ -153,7 +153,7 @@ class AnimatedProps extends AnimatedNode { } __getNativeConfig(): Object { - const propsConfig = {}; + const propsConfig: {[string]: unknown} = {}; for (const propKey in this._props) { const value = this._props[propKey]; if (value instanceof AnimatedNode) { diff --git a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedStyle.js b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedStyle.js index fdfd2a78c5..bfd52b7ebc 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedStyle.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedStyle.js @@ -21,7 +21,7 @@ const flattenStyle = StyleSheet.flatten; function createAnimatedStyle(inputStyle: any): Object { const style = flattenStyle(inputStyle); - const animatedStyles = {} + const animatedStyles: {[string]: unknown} = {} for (const key in style) { const value = style[key]; if (key === 'transform' && Array.isArray(value)) { @@ -48,8 +48,8 @@ class AnimatedStyle extends AnimatedWithChildren { } // Recursively get values for nested styles (like iOS's shadowOffset) - _walkStyleAndGetValues(style) { - const updatedStyle = {}; + _walkStyleAndGetValues(style: {readonly [string]: unknown}): {[string]: unknown} { + const updatedStyle: {[string]: unknown} = {}; for (const key in style) { const value = style[key]; if (value instanceof AnimatedNode) { @@ -76,8 +76,8 @@ class AnimatedStyle extends AnimatedWithChildren { } // Recursively get animated values for nested styles (like iOS's shadowOffset) - _walkStyleAndGetAnimatedValues(style) { - const updatedStyle = {}; + _walkStyleAndGetAnimatedValues(style: {readonly [string]: unknown}): {[string]: unknown} { + const updatedStyle: {[string]: unknown} = {}; for (const key in style) { const value = style[key]; if (value instanceof AnimatedNode) { @@ -124,7 +124,7 @@ class AnimatedStyle extends AnimatedWithChildren { } __getNativeConfig(): Object { - const styleConfig = {}; + const styleConfig: {[string]: ?number} = {}; for (const styleKey in this._style) { if (this._style[styleKey] instanceof AnimatedNode) { const style = this._style[styleKey]; diff --git a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedSubtraction.js b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedSubtraction.js index 02d2058b53..92d5130303 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedSubtraction.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedSubtraction.js @@ -38,7 +38,7 @@ class AnimatedSubtraction extends AnimatedWithChildren { return this._a.__getValue() - this._b.__getValue(); } - interpolate( + interpolate( config: InterpolationConfigType, ): AnimatedInterpolation { return new AnimatedInterpolation(this, config); diff --git a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedTracking.js b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedTracking.js index be77e52ce0..31ee9cf001 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedTracking.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedTracking.js @@ -76,7 +76,7 @@ class AnimatedTracking extends AnimatedNode { this._value.animate( new this._animationClass({ ...this._animationConfig, - toValue: (this._animationConfig.toValue: any).__getValue(), + toValue: (this._animationConfig.toValue as any).__getValue(), }), this._callback, ); diff --git a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedTransform.js b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedTransform.js index f248dbff66..9d361bc938 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedTransform.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedTransform.js @@ -15,9 +15,9 @@ import AnimatedWithChildren from './AnimatedWithChildren'; import NativeAnimatedHelper from '../NativeAnimatedHelper'; class AnimatedTransform extends AnimatedWithChildren { - _transforms: $ReadOnlyArray; + _transforms: ReadonlyArray; - constructor(transforms: $ReadOnlyArray) { + constructor(transforms: ReadonlyArray) { super(); this._transforms = transforms; } @@ -34,9 +34,9 @@ class AnimatedTransform extends AnimatedWithChildren { super.__makeNative(); } - __getValue(): $ReadOnlyArray { + __getValue(): ReadonlyArray { return this._transforms.map(transform => { - const result = {}; + const result: {[string]: unknown} = {}; for (const key in transform) { const value = transform[key]; if (value instanceof AnimatedNode) { @@ -49,9 +49,9 @@ class AnimatedTransform extends AnimatedWithChildren { }); } - __getAnimatedValue(): $ReadOnlyArray { + __getAnimatedValue(): ReadonlyArray { return this._transforms.map(transform => { - const result = {}; + const result: {[string]: unknown} = {}; for (const key in transform) { const value = transform[key]; if (value instanceof AnimatedNode) { @@ -89,7 +89,10 @@ class AnimatedTransform extends AnimatedWithChildren { } __getNativeConfig(): any { - const transConfigs = []; + const transConfigs: Array< + | {type: 'animated', property: string, nodeTag: ?number} + | {type: 'static', property: string, value: number | string}, + > = []; this._transforms.forEach(transform => { for (const key in transform) { diff --git a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedValue.js b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedValue.js index f34371ccda..ecd2d16077 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedValue.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedValue.js @@ -12,7 +12,7 @@ import AnimatedInterpolation from './AnimatedInterpolation'; import AnimatedWithChildren from './AnimatedWithChildren'; -import InteractionManager from '../../../../exports/InteractionManager'; +import InteractionManager from '../../../../modules/InteractionManager'; import NativeAnimatedHelper from '../NativeAnimatedHelper'; import type AnimatedNode from './AnimatedNode'; @@ -20,7 +20,7 @@ import type Animation, {EndCallback} from '../animations/Animation'; import type {InterpolationConfigType} from './AnimatedInterpolation'; import type AnimatedTracking from './AnimatedTracking'; -export type AnimatedValueConfig = $ReadOnly<{ +export type AnimatedValueConfig = Readonly<{ useNativeDriver: boolean, }>; @@ -49,7 +49,7 @@ const NativeAnimatedAPI = NativeAnimatedHelper.API; * transform which can receive values from multiple parents. */ function _flush(rootNode: AnimatedValue): void { - const animatedStyles = new Set(); + const animatedStyles = new Set(); function findAnimatedStyles(node: AnimatedValue | AnimatedNode) { /* $FlowFixMe[prop-missing] (>=0.68.0 site=react_native_fb) This comment * suppresses an error found when Flow v0.68 was deployed. To see the error @@ -226,7 +226,7 @@ class AnimatedValue extends AnimatedWithChildren { * Interpolates the value before updating the property, e.g. mapping 0-1 to * 0-10. */ - interpolate( + interpolate( config: InterpolationConfigType, ): AnimatedInterpolation { return new AnimatedInterpolation(this, config); diff --git a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedValueXY.js b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedValueXY.js index f7d9787fb9..e9fc93e5f8 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedValueXY.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedValueXY.js @@ -19,7 +19,7 @@ type ValueXYListenerCallback = (value: { x: number, y: number, ... -}) => mixed; +}) => unknown; let _uniqueId = 1; @@ -43,8 +43,8 @@ class AnimatedValueXY extends AnimatedWithChildren { constructor( valueIn?: ?{ - +x: number | AnimatedValue, - +y: number | AnimatedValue, + readonly x: number | AnimatedValue, + readonly y: number | AnimatedValue, ... }, ) { @@ -168,7 +168,7 @@ class AnimatedValueXY extends AnimatedWithChildren { */ addListener(callback: ValueXYListenerCallback): string { const id = String(_uniqueId++); - const jointCallback = ({value: number}) => { + const jointCallback = ({value: number}: {value: number, ...}) => { callback(this.__getValue()); }; this._listeners[id] = { diff --git a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedWithChildren.js b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedWithChildren.js index 936e857700..eb492686f2 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedWithChildren.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedWithChildren.js @@ -78,7 +78,6 @@ class AnimatedWithChildren extends AnimatedNode { super.__callListeners(value); if (!this.__isNative) { for (const child of this._children) { - // $FlowFixMe[method-unbinding] added when improving typing for this parameters if (child.__getValue) { child.__callListeners(child.__getValue()); } diff --git a/packages/react-native-web/src/vendor/react-native/Animated/useAnimatedProps.js b/packages/react-native-web/src/vendor/react-native/Animated/useAnimatedProps.js index 64b31b03b4..402c9feb9f 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/useAnimatedProps.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/useAnimatedProps.js @@ -29,12 +29,12 @@ type ReducedProps = { collapsable: boolean, ... }; -type CallbackRef = T => mixed; +type CallbackRef = T => unknown; -export default function useAnimatedProps( +export default function useAnimatedProps( props: TProps, ): [ReducedProps, CallbackRef] { - const [, scheduleUpdate] = useReducer(count => count + 1, 0); + const [, scheduleUpdate] = useReducer((count: number) => count + 1, 0); const onUpdateRef = useRef void>(null); // TODO: Only invalidate `node` if animated props or `style` change. In the @@ -61,7 +61,7 @@ export default function useAnimatedProps( // But there is no way to transparently compose three separate callback refs, // so we just combine them all into one for now. const refEffect = useCallback( - instance => { + (instance: TInstance) => { // NOTE: This may be called more often than necessary (e.g. when `props` // changes), but `setNativeView` already optimizes for that. node.setNativeView(instance); @@ -78,7 +78,7 @@ export default function useAnimatedProps( const events = []; for (const propName in props) { - const propValue = props[propName]; + const propValue = (props as any)[propName]; if (propValue instanceof AnimatedEvent && propValue.__isNative) { propValue.__attach(target, propName); events.push([propName, propValue]); @@ -164,7 +164,6 @@ function getEventTarget(instance: TInstance): TInstance { : instance; } -// $FlowFixMe[unclear-type] - Legacy instance assumptions. function isFabricInstance(instance: any): boolean { return ( hasFabricHandle(instance) || @@ -181,7 +180,6 @@ function isFabricInstance(instance: any): boolean { ); } -// $FlowFixMe[unclear-type] - Legacy instance assumptions. function hasFabricHandle(instance: any): boolean { // eslint-disable-next-line dot-notation return instance?.['_internalInstanceHandle']?.stateNode?.canonical != null; diff --git a/packages/react-native-web/src/vendor/react-native/Batchinator/index.js b/packages/react-native-web/src/vendor/react-native/Batchinator/index.js index 4ed33030af..cbaa150768 100644 --- a/packages/react-native-web/src/vendor/react-native/Batchinator/index.js +++ b/packages/react-native-web/src/vendor/react-native/Batchinator/index.js @@ -10,7 +10,7 @@ 'use strict'; -import InteractionManager from '../../../exports/InteractionManager'; +import InteractionManager from '../../../modules/InteractionManager'; /** * A simple class for batching up invocations of a low-pri callback. A timeout is set to run the diff --git a/packages/react-native-web/src/vendor/react-native/EventEmitter/NativeEventEmitter.js b/packages/react-native-web/src/vendor/react-native/EventEmitter/NativeEventEmitter.js index f7f23ac00d..f0113b011f 100644 --- a/packages/react-native-web/src/vendor/react-native/EventEmitter/NativeEventEmitter.js +++ b/packages/react-native-web/src/vendor/react-native/EventEmitter/NativeEventEmitter.js @@ -18,7 +18,7 @@ import Platform from '../../../exports/Platform'; import RCTDeviceEventEmitter from './RCTDeviceEventEmitter'; import invariant from 'fbjs/lib/invariant'; -type NativeModule = $ReadOnly<{ +type NativeModule = Readonly<{ addListener: (eventType: string) => void, removeListeners: (count: number) => void, ... @@ -36,7 +36,7 @@ export type {EventSubscription}; * This means event names must be globally unique, and it means that call sites * can theoretically listen to `RCTDeviceEventEmitter` (although discouraged). */ -export default class NativeEventEmitter +export default class NativeEventEmitter implements IEventEmitter { _nativeModule: ?NativeModule; @@ -50,10 +50,10 @@ export default class NativeEventEmitter } } - addListener>( + addListener( eventType: TEvent, - listener: (...args: $ElementType) => mixed, - context?: mixed, + listener: (...args: TEventToArgsMap[TEvent]) => unknown, + context?: unknown, ): EventSubscription { this._nativeModule?.addListener(eventType); let subscription: ?EventSubscription = RCTDeviceEventEmitter.addListener( @@ -77,9 +77,9 @@ export default class NativeEventEmitter /** * @deprecated Use `remove` on the EventSubscription from `addListener`. */ - removeListener>( + removeListener( eventType: TEvent, - listener: (...args: $ElementType) => mixed, + listener: (...args: TEventToArgsMap[TEvent]) => unknown, ): void { this._nativeModule?.removeListeners(1); // NOTE: This will report a deprecation notice via `console.error`. @@ -87,16 +87,16 @@ export default class NativeEventEmitter RCTDeviceEventEmitter.removeListener(eventType, listener); } - emit>( + emit( eventType: TEvent, - ...args: $ElementType + ...args: TEventToArgsMap[TEvent] ): void { // Generally, `RCTDeviceEventEmitter` is directly invoked. But this is // included for completeness. RCTDeviceEventEmitter.emit(eventType, ...args); } - removeAllListeners>( + removeAllListeners( eventType?: ?TEvent, ): void { invariant( @@ -107,7 +107,7 @@ export default class NativeEventEmitter RCTDeviceEventEmitter.removeAllListeners(eventType); } - listenerCount>(eventType: TEvent): number { + listenerCount(eventType: TEvent): number { return RCTDeviceEventEmitter.listenerCount(eventType); } } diff --git a/packages/react-native-web/src/vendor/react-native/EventEmitter/RCTDeviceEventEmitter.js b/packages/react-native-web/src/vendor/react-native/EventEmitter/RCTDeviceEventEmitter.js index 4b41b2fa7c..c546291934 100644 --- a/packages/react-native-web/src/vendor/react-native/EventEmitter/RCTDeviceEventEmitter.js +++ b/packages/react-native-web/src/vendor/react-native/EventEmitter/RCTDeviceEventEmitter.js @@ -19,4 +19,4 @@ type RCTDeviceEventDefinitions = $FlowFixMe; * * NativeModules that emit events should instead subclass `NativeEventEmitter`. */ -export default (new EventEmitter(): IEventEmitter); +export default new EventEmitter() as IEventEmitter; diff --git a/packages/react-native-web/src/vendor/react-native/FillRateHelper/index.js b/packages/react-native-web/src/vendor/react-native/FillRateHelper/index.js index a0c78d2450..27b7412cf1 100644 --- a/packages/react-native-web/src/vendor/react-native/FillRateHelper/index.js +++ b/packages/react-native-web/src/vendor/react-native/FillRateHelper/index.js @@ -34,7 +34,7 @@ type FrameMetrics = { ... }; -const DEBUG = false; +const DEBUG: boolean = false; let _listeners: Array<(Info) => void> = []; let _minSampleCount = 10; @@ -115,7 +115,7 @@ class FillRateHelper { total_time_spent, }; if (DEBUG) { - const derived = { + const derived: {[string]: number} = { avg_blankness: this._info.pixels_blank / this._info.pixels_sampled, avg_speed: this._info.pixels_scrolled / (total_time_spent / 1000), avg_speed_when_any_blank: @@ -128,7 +128,6 @@ class FillRateHelper { mostly_blank_time_frac: this._info.mostly_blank_ms / total_time_spent, }; for (const key in derived) { - // $FlowFixMe[prop-missing] derived[key] = Math.round(1000 * derived[key]) / 1000; } console.debug('FillRateHelper deactivateAndFlush: ', {derived, info}); diff --git a/packages/react-native-web/src/vendor/react-native/FlatList/index.js b/packages/react-native-web/src/vendor/react-native/FlatList/index.js index eefb789425..026645d379 100644 --- a/packages/react-native-web/src/vendor/react-native/FlatList/index.js +++ b/packages/react-native-web/src/vendor/react-native/FlatList/index.js @@ -16,7 +16,7 @@ import invariant from 'fbjs/lib/invariant'; import * as React from 'react'; type ScrollViewNativeComponent = any; -type ViewStyleProp = $PropertyType; +type ViewStyleProp = ViewProps['style']; import type { ViewToken, ViewabilityConfigCallbackPair, @@ -165,7 +165,7 @@ function numColumnsOrDefault(numColumns: ?number) { return numColumns ?? 1; } -function isArrayLike(data: mixed): boolean { +function isArrayLike(data: unknown): boolean { // $FlowExpectedError[incompatible-use] return typeof Object(data).length === 'number'; } @@ -175,19 +175,12 @@ type FlatListProps = {| ...OptionalProps, |}; -type VirtualizedListProps = React.ElementConfig; +type VirtualizedListProps = React.ComponentProps; export type Props = { - ...$Diff< + ...Omit< VirtualizedListProps, - { - getItem: $PropertyType, - getItemCount: $PropertyType, - getItemLayout: $PropertyType, - renderItem: $PropertyType, - keyExtractor: $PropertyType, - ... - }, + 'getItem' | 'getItemCount' | 'getItemLayout' | 'renderItem' | 'keyExtractor', >, ...FlatListProps, ... @@ -399,8 +392,6 @@ class FlatList extends React.PureComponent, void> { | ?React.ElementRef | ?React.ElementRef { if (this._listRef) { - /* $FlowFixMe[incompatible-return] Suppresses errors found when fixing - * TextInput typing */ return this._listRef.getScrollRef(); } } @@ -424,9 +415,6 @@ class FlatList extends React.PureComponent, void> { })); } else if (this.props.onViewableItemsChanged) { this._virtualizedListPairs.push({ - /* $FlowFixMe[incompatible-call] (>=0.63.0 site=react_native_fb) This - * comment suppresses an error found when Flow v0.63 was deployed. To - * see the error delete this comment and run Flow. */ viewabilityConfig: this.props.viewabilityConfig, onViewableItemsChanged: this._createOnViewableItemsChanged( this.props.onViewableItemsChanged, @@ -435,7 +423,6 @@ class FlatList extends React.PureComponent, void> { } } - // $FlowFixMe[missing-local-annot] componentDidUpdate(prevProps: Props) { invariant( prevProps.numColumns === this.props.numColumns, @@ -466,12 +453,9 @@ class FlatList extends React.PureComponent, void> { this._listRef = ref; }; - // $FlowFixMe[missing-local-annot] _checkProps(props: Props) { const { - // $FlowFixMe[prop-missing] this prop doesn't exist, is only used for an invariant getItem, - // $FlowFixMe[prop-missing] this prop doesn't exist, is only used for an invariant getItemCount, horizontal, columnWrapperStyle, @@ -501,7 +485,7 @@ class FlatList extends React.PureComponent, void> { _getItem = ( data: $ArrayLike, index: number, - ): ?(ItemT | $ReadOnlyArray) => { + ): ?(ItemT | ReadonlyArray) => { const numColumns = numColumnsOrDefault(this.props.numColumns); if (numColumns > 1) { const ret = []; @@ -546,12 +530,11 @@ class FlatList extends React.PureComponent, void> { ); return items .map((item, kk) => - keyExtractor(((item: $FlowFixMe): ItemT), index * numColumns + kk), + keyExtractor(item as $FlowFixMe as ItemT, index * numColumns + kk), ) .join(':'); } - // $FlowFixMe[incompatible-call] Can't call keyExtractor with an array return keyExtractor(items, index); }; @@ -596,7 +579,7 @@ class FlatList extends React.PureComponent, void> { } _renderer = ( - ListItemComponent: ?(React.ComponentType | React.Element), + ListItemComponent: ?(React.ComponentType | React.MixedElement), renderItem: ?RenderItemType, columnWrapperStyle: ?ViewStyleProp, numColumns: ?number, @@ -608,11 +591,8 @@ class FlatList extends React.PureComponent, void> { const render = (props: RenderItemProps): React.Node => { if (ListItemComponent) { // $FlowFixMe[not-a-component] Component isn't valid - // $FlowFixMe[incompatible-type-arg] Component isn't valid - // $FlowFixMe[incompatible-return] Component isn't valid return ; } else if (renderItem) { - // $FlowFixMe[incompatible-call] return renderItem(props); } else { return null; @@ -630,7 +610,7 @@ class FlatList extends React.PureComponent, void> { {item.map((it, kk) => { const element = render({ - // $FlowFixMe[incompatible-call] + // $FlowFixMe[incompatible-type] item: it, index: index * cols + kk, separators: info.separators, @@ -666,7 +646,6 @@ class FlatList extends React.PureComponent, void> { const renderer = strictMode ? this._memoizedRenderer : this._renderer; return ( - // $FlowFixMe[incompatible-exact] - `restProps` (`Props`) is inexact. void, - onStall: (params: {lastInterval: number, busyTime: number}) => ?string, -}; - -/** - * A utility for tracking stalls in the JS event loop that prevent timers and - * other events from being processed in a timely manner. - * - * The "stall" time is defined as the amount of time in access of the acceptable - * threshold, which is typically around 100-200ms. So if the treshold is set to - * 100 and a timer fires 150 ms later than it was scheduled because the event - * loop was tied up, that would be considered a 50ms stall. - * - * By default, logs stall events to the console when installed. Can also be - * queried with `getStats`. - */ -const JSEventLoopWatchdog = { - getStats: function(): Object { - return {stallCount, totalStallTime, longestStall, acceptableBusyTime}; - }, - reset: function() { - infoLog('JSEventLoopWatchdog: reset'); - totalStallTime = 0; - stallCount = 0; - longestStall = 0; - lastInterval = window.performance.now(); - }, - addHandler: function(handler: Handler) { - handlers.push(handler); - }, - install: function({thresholdMS}: {thresholdMS: number}) { - acceptableBusyTime = thresholdMS; - if (installed) { - return; - } - installed = true; - lastInterval = window.performance.now(); - function iteration() { - const now = window.performance.now(); - const busyTime = now - lastInterval; - if (busyTime >= thresholdMS) { - const stallTime = busyTime - thresholdMS; - stallCount++; - totalStallTime += stallTime; - longestStall = Math.max(longestStall, stallTime); - let msg = - `JSEventLoopWatchdog: JS thread busy for ${busyTime}ms. ` + - `${totalStallTime}ms in ${stallCount} stalls so far. `; - handlers.forEach(handler => { - msg += handler.onStall({lastInterval, busyTime}) || ''; - }); - infoLog(msg); - } - handlers.forEach(handler => { - handler.onIterate && handler.onIterate(); - }); - lastInterval = now; - setTimeout(iteration, thresholdMS / 5); - } - iteration(); - }, -}; - -let acceptableBusyTime = 0; -let installed = false; -let totalStallTime = 0; -let stallCount = 0; -let longestStall = 0; -let lastInterval = 0; -const handlers: Array = []; - -export default JSEventLoopWatchdog; diff --git a/packages/react-native-web/src/vendor/react-native/LayoutAnimation/index.js b/packages/react-native-web/src/vendor/react-native/LayoutAnimation/index.js index 1cd385738e..044aed8108 100644 --- a/packages/react-native-web/src/vendor/react-native/LayoutAnimation/index.js +++ b/packages/react-native-web/src/vendor/react-native/LayoutAnimation/index.js @@ -25,7 +25,7 @@ type Type = type Property = 'opacity' | 'scaleX' | 'scaleY' | 'scaleXY'; -type AnimationConfig = $ReadOnly<{| +type AnimationConfig = Readonly<{| duration?: number, delay?: number, springDamping?: number, @@ -34,7 +34,7 @@ type AnimationConfig = $ReadOnly<{| property?: Property, |}>; -type LayoutAnimationConfig = $ReadOnly<{| +type LayoutAnimationConfig = Readonly<{| duration: number, create?: AnimationConfig, update?: AnimationConfig, @@ -67,9 +67,13 @@ function create( }; } -const Presets = { - easeInEaseOut: (create(300, 'easeInEaseOut', 'opacity'): LayoutAnimationConfig), - linear: (create(500, 'linear', 'opacity'): LayoutAnimationConfig), +const Presets: { + easeInEaseOut: LayoutAnimationConfig, + linear: LayoutAnimationConfig, + spring: LayoutAnimationConfig, +} = { + easeInEaseOut: create(300, 'easeInEaseOut', 'opacity') as LayoutAnimationConfig, + linear: create(500, 'linear', 'opacity') as LayoutAnimationConfig, spring: { duration: 700, create: { @@ -130,13 +134,13 @@ const LayoutAnimation = { scaleY: 'scaleY', scaleXY: 'scaleXY', }), - checkConfig(...args: Array) { + checkConfig(...args: Array) { console.error('LayoutAnimation.checkConfig(...) has been disabled.'); }, Presets, - easeInEaseOut: (configureNext.bind(null, Presets.easeInEaseOut): (onAnimationDidEnd?: any) => void), - linear: (configureNext.bind(null, Presets.linear): (onAnimationDidEnd?: any) => void), - spring: (configureNext.bind(null, Presets.spring): (onAnimationDidEnd?: any) => void), + easeInEaseOut: configureNext.bind(null, Presets.easeInEaseOut) as (onAnimationDidEnd?: any) => void, + linear: configureNext.bind(null, Presets.linear) as (onAnimationDidEnd?: any) => void, + spring: configureNext.bind(null, Presets.spring) as (onAnimationDidEnd?: any) => void, }; export default LayoutAnimation; diff --git a/packages/react-native-web/src/vendor/react-native/PanResponder/index.js b/packages/react-native-web/src/vendor/react-native/PanResponder/index.js index a7e4959775..f26dac7e35 100644 --- a/packages/react-native-web/src/vendor/react-native/PanResponder/index.js +++ b/packages/react-native-web/src/vendor/react-native/PanResponder/index.js @@ -10,7 +10,7 @@ 'use strict'; -import InteractionManager from '../../../exports/InteractionManager'; +import InteractionManager from '../../../modules/InteractionManager'; import TouchHistoryMath from '../TouchHistoryMath'; import type {PressEvent} from '../Types/CoreEventTypes'; @@ -188,11 +188,11 @@ type ActiveCallback = ( gestureState: GestureState, ) => boolean; -type InteractionState = {handle: ?number, shouldCancelClick: boolean, timeout: ?TimeoutID}; +type InteractionState = {handle: ?number, shouldCancelClick: boolean, timeout: ?number}; -type PassiveCallback = (event: PressEvent, gestureState: GestureState) => mixed; +type PassiveCallback = (event: PressEvent, gestureState: GestureState) => unknown; -type PanResponderConfig = $ReadOnly<{| +type PanResponderConfig = Readonly<{| onMoveShouldSetPanResponder?: ?ActiveCallback, onMoveShouldSetPanResponderCapture?: ?ActiveCallback, onStartShouldSetPanResponder?: ?ActiveCallback, @@ -317,7 +317,7 @@ const PanResponder = { */ _updateGestureStateOnMove( gestureState: GestureState, - touchHistory: $PropertyType, + touchHistory: PressEvent['touchHistory'], ) { gestureState.numberActiveTouches = touchHistory.numberActiveTouches; gestureState.moveX = currentCentroidXOfTouchesChangedAfter( @@ -423,7 +423,21 @@ const PanResponder = { numberActiveTouches: 0, _accountsForMovesUpTo: 0, }; - const panHandlers = { + const panHandlers: { + onClickCapture: (event: any) => void, + onMoveShouldSetResponder: (event: PressEvent) => boolean, + onMoveShouldSetResponderCapture: (event: PressEvent) => boolean, + onResponderEnd: (event: PressEvent) => void, + onResponderGrant: (event: PressEvent) => boolean, + onResponderMove: (event: PressEvent) => void, + onResponderReject: (event: PressEvent) => void, + onResponderRelease: (event: PressEvent) => void, + onResponderStart: (event: PressEvent) => void, + onResponderTerminate: (event: PressEvent) => void, + onResponderTerminationRequest: (event: PressEvent) => boolean, + onStartShouldSetResponder: (event: PressEvent) => boolean, + onStartShouldSetResponderCapture: (event: PressEvent) => boolean, + } = { onStartShouldSetResponder(event: PressEvent): boolean { return config.onStartShouldSetPanResponder == null ? false @@ -596,7 +610,9 @@ function clearInteractionHandle( } function clearInteractionTimeout(interactionState: InteractionState) { - clearTimeout(interactionState.timeout); + if (interactionState.timeout != null) { + clearTimeout(interactionState.timeout); + } } function setInteractionTimeout(interactionState: InteractionState) { @@ -605,9 +621,8 @@ function setInteractionTimeout(interactionState: InteractionState) { }, 250); } -export type PanResponderInstance = $Call< - $PropertyType, - PanResponderConfig, +export type PanResponderInstance = ReturnType< + (typeof PanResponder)['create'], >; export default PanResponder; diff --git a/packages/react-native-web/src/vendor/react-native/PooledClass/index.js b/packages/react-native-web/src/vendor/react-native/PooledClass/index.js deleted file mode 100644 index d310ab4497..0000000000 --- a/packages/react-native-web/src/vendor/react-native/PooledClass/index.js +++ /dev/null @@ -1,63 +0,0 @@ -/* eslint-disable */ - -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * From React 16.0.0 - */ - -import invariant from 'fbjs/lib/invariant'; - -var twoArgumentPooler = function(a1, a2) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, a1, a2); - return instance; - } else { - return new Klass(a1, a2); - } -}; - -var standardReleaser = function(instance) { - var Klass = this; - instance.destructor(); - if (Klass.instancePool.length < Klass.poolSize) { - Klass.instancePool.push(instance); - } -}; - -var DEFAULT_POOL_SIZE = 10; -var DEFAULT_POOLER = twoArgumentPooler; - -/** - * Augments `CopyConstructor` to be a poolable class, augmenting only the class - * itself (statically) not adding any prototypical fields. Any CopyConstructor - * you give this may have a `poolSize` property, and will look for a - * prototypical `destructor` on instances. - * - * @param {Function} CopyConstructor Constructor that can be used to reset. - * @param {Function} pooler Customizable pooler. - */ -var addPoolingTo = function(CopyConstructor, pooler) { - // Casting as any so that flow ignores the actual implementation and trusts - // it to match the type we declared - var NewKlass = CopyConstructor; - NewKlass.instancePool = []; - NewKlass.getPooled = pooler || DEFAULT_POOLER; - if (!NewKlass.poolSize) { - NewKlass.poolSize = DEFAULT_POOL_SIZE; - } - NewKlass.release = standardReleaser; - return NewKlass; -}; - -var PooledClass = { - addPoolingTo: addPoolingTo, - twoArgumentPooler: twoArgumentPooler -}; - -export default PooledClass; diff --git a/packages/react-native-web/src/vendor/react-native/SectionList/index.js b/packages/react-native-web/src/vendor/react-native/SectionList/index.js index 217fb488d7..8f7dc97646 100644 --- a/packages/react-native-web/src/vendor/react-native/SectionList/index.js +++ b/packages/react-native-web/src/vendor/react-native/SectionList/index.js @@ -25,7 +25,7 @@ type Item = any; export type SectionBase = _SectionBase; -type RequiredProps> = {| +type RequiredProps> = {| /** * The actual data to render, akin to the `data` prop in [``](https://reactnative.dev/docs/flatlist). * @@ -37,10 +37,10 @@ type RequiredProps> = {| * ItemSeparatorComponent?: ?ReactClass<{highlighted: boolean, ...}>, * }> */ - sections: $ReadOnlyArray, + sections: ReadonlyArray, |}; -type OptionalProps> = {| +type OptionalProps> = {| /** * Default renderer for every item in every section. Can be over-ridden on a per-section basis. */ @@ -55,7 +55,7 @@ type OptionalProps> = {| ... }, ... - }) => null | React.Element, + }) => null | React.MixedElement, /** * A marker property for telling the list to re-render (since it implements `PureComponent`). If * any of your `renderItem`, Header, Footer, etc. functions depend on anything outside of the @@ -93,24 +93,9 @@ type OptionalProps> = {| |}; export type Props = {| - ...$Diff< + ...Omit< VirtualizedSectionListProps, - { - getItem: $PropertyType, 'getItem'>, - getItemCount: $PropertyType< - VirtualizedSectionListProps, - 'getItemCount', - >, - renderItem: $PropertyType< - VirtualizedSectionListProps, - 'renderItem', - >, - keyExtractor: $PropertyType< - VirtualizedSectionListProps, - 'keyExtractor', - >, - ... - }, + 'getItem' | 'getItemCount' | 'renderItem' | 'keyExtractor', >, ...RequiredProps, ...OptionalProps, @@ -172,7 +157,7 @@ export type Props = {| * */ export default class SectionList< - SectionT: SectionBase, + SectionT extends SectionBase, > extends React.PureComponent, void> { props: Props; @@ -248,7 +233,7 @@ export default class SectionList< } _wrapperListRef: ?React.ElementRef; - _captureRef = ref => { + _captureRef = (ref: ?React.ElementRef) => { this._wrapperListRef = ref; }; } diff --git a/packages/react-native-web/src/vendor/react-native/StaticContainer/index.js b/packages/react-native-web/src/vendor/react-native/StaticContainer/index.js deleted file mode 100644 index b2495ab6e2..0000000000 --- a/packages/react-native-web/src/vendor/react-native/StaticContainer/index.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import * as React from 'react'; - -/** - * Renders static content efficiently by allowing React to short-circuit the - * reconciliation process. This component should be used when you know that a - * subtree of components will never need to be updated. - * - * const someValue = ...; // We know for certain this value will never change. - * return ( - * - * - * - * ); - * - * Typically, you will not need to use this component and should opt for normal - * React reconciliation. - */ - -type Props = $ReadOnly<{| - /** - * Whether or not this component should update. - */ - shouldUpdate: ?boolean, - /** - * Content short-circuited by React reconciliation process. - */ - children: React.Node, -|}>; -class StaticContainer extends React.Component { - shouldComponentUpdate(nextProps: Props): boolean { - return !!nextProps.shouldUpdate; - } - - render(): null | React.Node { - const child = this.props.children; - return child === null || child === false - ? null - : React.Children.only(child); - } -} - -export default StaticContainer; diff --git a/packages/react-native-web/src/vendor/react-native/StaticRenderer/index.js b/packages/react-native-web/src/vendor/react-native/StaticRenderer/index.js deleted file mode 100644 index de877a5f5a..0000000000 --- a/packages/react-native-web/src/vendor/react-native/StaticRenderer/index.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow - */ - -'use strict'; - -import * as React from 'react'; - -type Props = $ReadOnly<{| - /** - * Indicates whether the render function needs to be called again - */ - shouldUpdate: boolean, - /** - * () => renderable - * A function that returns a renderable component - */ - render: () => React.Node, -|}>; - -class StaticRenderer extends React.Component { - shouldComponentUpdate(nextProps: Props): boolean { - return nextProps.shouldUpdate; - } - - render(): React.Node { - return this.props.render(); - } -} - -export default StaticRenderer; diff --git a/packages/react-native-web/src/vendor/react-native/TurboModule/RCTExport.js b/packages/react-native-web/src/vendor/react-native/TurboModule/RCTExport.js index 68985ae62d..b568bd99a0 100644 --- a/packages/react-native-web/src/vendor/react-native/TurboModule/RCTExport.js +++ b/packages/react-native-web/src/vendor/react-native/TurboModule/RCTExport.js @@ -27,8 +27,8 @@ */ // eslint-disable-next-line no-unused-vars -export interface RCTExport { - +getConstants?: () => {}; +export interface RCTExport { + readonly getConstants?: () => {}; } // eslint-disable-next-line lint/react-native-modules diff --git a/packages/react-native-web/src/vendor/react-native/TurboModule/TurboModuleRegistry.js b/packages/react-native-web/src/vendor/react-native/TurboModule/TurboModuleRegistry.js index 4e3bba31b1..cf8a86d2a9 100644 --- a/packages/react-native-web/src/vendor/react-native/TurboModule/TurboModuleRegistry.js +++ b/packages/react-native-web/src/vendor/react-native/TurboModule/TurboModuleRegistry.js @@ -13,12 +13,12 @@ import type {TurboModule} from './RCTExport'; import invariant from 'fbjs/lib/invariant'; -export function get(name: string): ?T { +export function get(name: string): ?T { return null; } -export function getEnforcing(name: string): T { - const module = get(name); +export function getEnforcing(name: string): T { + const module = get(name); invariant( module != null, `TurboModuleRegistry.getEnforcing(...): '${name}' could not be found. ` + diff --git a/packages/react-native-web/src/vendor/react-native/Types/CoreEventTypes.js b/packages/react-native-web/src/vendor/react-native/Types/CoreEventTypes.js index c35d2d0303..8793349d6f 100644 --- a/packages/react-native-web/src/vendor/react-native/Types/CoreEventTypes.js +++ b/packages/react-native-web/src/vendor/react-native/Types/CoreEventTypes.js @@ -10,12 +10,12 @@ 'use strict'; -export type SyntheticEvent<+T> = $ReadOnly<{| +export type SyntheticEvent = Readonly<{| bubbles: ?boolean, cancelable: ?boolean, currentTarget: HTMLElement, defaultPrevented: ?boolean, - dispatchConfig: $ReadOnly<{| + dispatchConfig: Readonly<{| registrationName: string, |}>, eventPhase: ?number, @@ -31,14 +31,14 @@ export type SyntheticEvent<+T> = $ReadOnly<{| type: ?string, |}>; -export type ResponderSyntheticEvent = $ReadOnly<{| +export type ResponderSyntheticEvent = Readonly<{| ...SyntheticEvent, - touchHistory: $ReadOnly<{| + touchHistory: Readonly<{| indexOfSingleActiveTouch: number, mostRecentTimeStamp: number, numberActiveTouches: number, - touchBank: $ReadOnlyArray< - $ReadOnly<{| + touchBank: ReadonlyArray< + Readonly<{| touchActive: boolean, startPageX: number, startPageY: number, @@ -54,14 +54,14 @@ export type ResponderSyntheticEvent = $ReadOnly<{| |}>, |}>; -export type Layout = $ReadOnly<{| +export type Layout = Readonly<{| x: number, y: number, width: number, height: number, |}>; -export type TextLayout = $ReadOnly<{| +export type TextLayout = Readonly<{| ...Layout, ascender: number, capHeight: number, @@ -71,13 +71,13 @@ export type TextLayout = $ReadOnly<{| |}>; export type LayoutEvent = SyntheticEvent< - $ReadOnly<{| + Readonly<{| layout: Layout, |}>, >; export type TextLayoutEvent = SyntheticEvent< - $ReadOnly<{| + Readonly<{| lines: Array, |}>, >; @@ -89,7 +89,7 @@ export interface NativeUIEvent { /** * Returns a long with details about the event, depending on the event type. */ - +detail: number; + readonly detail: number; } /** @@ -99,72 +99,72 @@ export interface NativeMouseEvent extends NativeUIEvent { /** * The X coordinate of the mouse pointer in global (screen) coordinates. */ - +screenX: number; + readonly screenX: number; /** * The Y coordinate of the mouse pointer in global (screen) coordinates. */ - +screenY: number; + readonly screenY: number; /** * The X coordinate of the mouse pointer relative to the whole document. */ - +pageX: number; + readonly pageX: number; /** * The Y coordinate of the mouse pointer relative to the whole document. */ - +pageY: number; + readonly pageY: number; /** * The X coordinate of the mouse pointer in local (DOM content) coordinates. */ - +clientX: number; + readonly clientX: number; /** * The Y coordinate of the mouse pointer in local (DOM content) coordinates. */ - +clientY: number; + readonly clientY: number; /** * Alias for NativeMouseEvent.clientX */ - +x: number; + readonly x: number; /** * Alias for NativeMouseEvent.clientY */ - +y: number; + readonly y: number; /** * Returns true if the control key was down when the mouse event was fired. */ - +ctrlKey: boolean; + readonly ctrlKey: boolean; /** * Returns true if the shift key was down when the mouse event was fired. */ - +shiftKey: boolean; + readonly shiftKey: boolean; /** * Returns true if the alt key was down when the mouse event was fired. */ - +altKey: boolean; + readonly altKey: boolean; /** * Returns true if the meta key was down when the mouse event was fired. */ - +metaKey: boolean; + readonly metaKey: boolean; /** * The button number that was pressed (if applicable) when the mouse event was fired. */ - +button: number; + readonly button: number; /** * The buttons being depressed (if any) when the mouse event was fired. */ - +buttons: number; + readonly buttons: number; /** * The secondary target for the event, if there is one. */ - +relatedTarget: HTMLElement; + readonly relatedTarget: HTMLElement; // offset is proposed: https://drafts.csswg.org/cssom-view/#extensions-to-the-mouseevent-interface /** * The X coordinate of the mouse pointer between that event and the padding edge of the target node */ - +offsetX: number; + readonly offsetX: number; /** * The Y coordinate of the mouse pointer between that event and the padding edge of the target node */ - +offsetY: number; + readonly offsetY: number; } /** @@ -174,55 +174,55 @@ export interface NativePointerEvent extends NativeMouseEvent { /** * A unique identifier for the pointer causing the event. */ - +pointerId: number; + readonly pointerId: number; /** * The width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer */ - +width: number; + readonly width: number; /** * The height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer. */ - +height: number; + readonly height: number; /** * The normalized pressure of the pointer input in the range 0 to 1, where 0 and 1 represent * the minimum and maximum pressure the hardware is capable of detecting, respectively. */ - +pressure: number; + readonly pressure: number; /** * The normalized tangential pressure of the pointer input (also known as barrel pressure or * cylinder stress) in the range -1 to 1, where 0 is the neutral position of the control. */ - +tangentialPressure: number; + readonly tangentialPressure: number; /** * The plane angle (in degrees, in the range of -90 to 90) between the Y–Z plane and the plane * containing both the pointer (e.g. pen stylus) axis and the Y axis. */ - +tiltX: number; + readonly tiltX: number; /** * The plane angle (in degrees, in the range of -90 to 90) between the X–Z plane and the plane * containing both the pointer (e.g. pen stylus) axis and the X axis. */ - +tiltY: number; + readonly tiltY: number; /** * The clockwise rotation of the pointer (e.g. pen stylus) around its major axis in degrees, * with a value in the range 0 to 359. */ - +twist: number; + readonly twist: number; /** * Indicates the device type that caused the event (mouse, pen, touch, etc.) */ - +pointerType: string; + readonly pointerType: string; /** * Indicates if the pointer represents the primary pointer of this pointer type. */ - +isPrimary: boolean; + readonly isPrimary: boolean; } export type PointerEvent = SyntheticEvent; export type PressEvent = ResponderSyntheticEvent< - $ReadOnly<{| - changedTouches: $ReadOnlyArray<$PropertyType>, + Readonly<{| + changedTouches: ReadonlyArray, force: number, identifier: number, locationX: number, @@ -231,35 +231,35 @@ export type PressEvent = ResponderSyntheticEvent< pageY: number, target: ?HTMLElement, timestamp: number, - touches: $ReadOnlyArray<$PropertyType>, + touches: ReadonlyArray, |}>, >; export type ScrollEvent = SyntheticEvent< - $ReadOnly<{| - contentInset: $ReadOnly<{| + Readonly<{| + contentInset: Readonly<{| bottom: number, left: number, right: number, top: number, |}>, - contentOffset: $ReadOnly<{| + contentOffset: Readonly<{| y: number, x: number, |}>, - contentSize: $ReadOnly<{| + contentSize: Readonly<{| height: number, width: number, |}>, - layoutMeasurement: $ReadOnly<{| + layoutMeasurement: Readonly<{| height: number, width: number, |}>, - targetContentOffset?: $ReadOnly<{| + targetContentOffset?: Readonly<{| y: number, x: number, |}>, - velocity?: $ReadOnly<{| + velocity?: Readonly<{| y: number, x: number, |}>, @@ -269,19 +269,19 @@ export type ScrollEvent = SyntheticEvent< >; export type BlurEvent = SyntheticEvent< - $ReadOnly<{| + Readonly<{| target: number, |}>, >; export type FocusEvent = SyntheticEvent< - $ReadOnly<{| + Readonly<{| target: number, |}>, >; export type MouseEvent = SyntheticEvent< - $ReadOnly<{| + Readonly<{| clientX: number, clientY: number, pageX: number, diff --git a/packages/react-native-web/src/vendor/react-native/Utilities/setAndForwardRef.js b/packages/react-native-web/src/vendor/react-native/Utilities/setAndForwardRef.js deleted file mode 100644 index cdea86b08b..0000000000 --- a/packages/react-native-web/src/vendor/react-native/Utilities/setAndForwardRef.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow - */ - -'use strict'; - -import type {ElementRef, Ref} from 'react'; - -type Args = $ReadOnly<{| - getForwardedRef: () => ?Ref, - setLocalRef: (ref: ElementRef) => mixed, -|}>; - -/** - * This is a helper function for when a component needs to be able to forward a ref - * to a child component, but still needs to have access to that component as part of - * its implementation. - * - * Its main use case is in wrappers for native components. - * - * Usage: - * - * class MyView extends React.Component { - * _nativeRef = null; - * - * _setNativeRef = setAndForwardRef({ - * getForwardedRef: () => this.props.forwardedRef, - * setLocalRef: ref => { - * this._nativeRef = ref; - * }, - * }); - * - * render() { - * return ; - * } - * } - * - * const MyViewWithRef = React.forwardRef((props, ref) => ( - * - * )); - * - * module.exports = MyViewWithRef; - */ - -function setAndForwardRef({ - getForwardedRef, - setLocalRef, -}: Args): (ref: ElementRef) => void { - return function forwardRef(ref: ElementRef) { - const forwardedRef = getForwardedRef(); - - setLocalRef(ref); - - // Forward to user ref prop (if one has been specified) - if (typeof forwardedRef === 'function') { - // Handle function-based refs. String-based refs are handled as functions. - forwardedRef(ref); - } else if (typeof forwardedRef === 'object' && forwardedRef != null) { - // Handle createRef-based refs - forwardedRef.current = ref; - } - }; -} - -export default setAndForwardRef; diff --git a/packages/react-native-web/src/vendor/react-native/Utilities/useMergeRefs.js b/packages/react-native-web/src/vendor/react-native/Utilities/useMergeRefs.js index 15bd982d03..ba2ac6296f 100644 --- a/packages/react-native-web/src/vendor/react-native/Utilities/useMergeRefs.js +++ b/packages/react-native-web/src/vendor/react-native/Utilities/useMergeRefs.js @@ -10,7 +10,7 @@ import {useCallback} from 'react'; -type CallbackRef = T => mixed; +type CallbackRef = T => unknown; type ObjectRef = {current: T, ...}; type Ref = CallbackRef | ObjectRef; @@ -25,7 +25,7 @@ type Ref = CallbackRef | ObjectRef; * lead to problems with the given refs being invoked more times than desired. */ export default function useMergeRefs( - ...refs: $ReadOnlyArray> + ...refs: ReadonlyArray> ): CallbackRef { return useCallback( (current: T) => { diff --git a/packages/react-native-web/src/vendor/react-native/Utilities/useRefEffect.js b/packages/react-native-web/src/vendor/react-native/Utilities/useRefEffect.js index b79a644b83..e95eeec29d 100644 --- a/packages/react-native-web/src/vendor/react-native/Utilities/useRefEffect.js +++ b/packages/react-native-web/src/vendor/react-native/Utilities/useRefEffect.js @@ -10,7 +10,7 @@ import {useCallback, useRef} from 'react'; -type CallbackRef = T => mixed; +type CallbackRef = T => unknown; /** * Constructs a callback ref that provides similar semantics as `useEffect`. The diff --git a/packages/react-native-web/src/vendor/react-native/ViewabilityHelper/index.js b/packages/react-native-web/src/vendor/react-native/ViewabilityHelper/index.js index 850118e85c..ca05b2d133 100644 --- a/packages/react-native-web/src/vendor/react-native/ViewabilityHelper/index.js +++ b/packages/react-native-web/src/vendor/react-native/ViewabilityHelper/index.js @@ -91,9 +91,6 @@ class ViewabilityHelper { * Cleanup, e.g. on unmount. Clears any pending timers. */ dispose() { - /* $FlowFixMe[incompatible-call] (>=0.63.0 site=react_native_fb) This - * comment suppresses an error found when Flow v0.63 was deployed. To see - * the error delete this comment and run Flow. */ this._timers.forEach(clearTimeout); } @@ -234,10 +231,7 @@ class ViewabilityHelper { } this._viewableIndices = viewableIndices; if (this._config.minimumViewTime) { - const handle: TimeoutID = setTimeout(() => { - /* $FlowFixMe[incompatible-call] (>=0.63.0 site=react_native_fb) This - * comment suppresses an error found when Flow v0.63 was deployed. To - * see the error delete this comment and run Flow. */ + const handle: number = setTimeout(() => { this._timers.delete(handle); this._onUpdateSync( props, @@ -246,9 +240,6 @@ class ViewabilityHelper { createViewToken, ); }, this._config.minimumViewTime); - /* $FlowFixMe[incompatible-call] (>=0.63.0 site=react_native_fb) This - * comment suppresses an error found when Flow v0.63 was deployed. To see - * the error delete this comment and run Flow. */ this._timers.add(handle); } else { this._onUpdateSync( diff --git a/packages/react-native-web/src/vendor/react-native/VirtualizedList/CellRenderMask.js b/packages/react-native-web/src/vendor/react-native/VirtualizedList/CellRenderMask.js index a234607ca6..95075aa401 100644 --- a/packages/react-native-web/src/vendor/react-native/VirtualizedList/CellRenderMask.js +++ b/packages/react-native-web/src/vendor/react-native/VirtualizedList/CellRenderMask.js @@ -41,7 +41,7 @@ export class CellRenderMask { } } - enumerateRegions(): $ReadOnlyArray { + enumerateRegions(): ReadonlyArray { return this._regions; } diff --git a/packages/react-native-web/src/vendor/react-native/VirtualizedList/StateSafePureComponent.js b/packages/react-native-web/src/vendor/react-native/VirtualizedList/StateSafePureComponent.js index 145a4ebce0..adbd3be709 100644 --- a/packages/react-native-web/src/vendor/react-native/VirtualizedList/StateSafePureComponent.js +++ b/packages/react-native-web/src/vendor/react-native/VirtualizedList/StateSafePureComponent.js @@ -22,7 +22,7 @@ import * as React from 'react'; */ export default class StateSafePureComponent< Props, - State: interface {}, + State extends interface {}, > extends React.PureComponent { _inAsyncStateUpdate = false; @@ -31,9 +31,10 @@ export default class StateSafePureComponent< this._installSetStateHooks(); } + // $FlowFixMe[incompatible-type] setState( - partialState: ?($Shape | ((State, Props) => ?$Shape)), - callback?: () => mixed, + partialState: ?(Partial | ((State, Props) => ?Partial)), + callback?: () => unknown, ): void { if (typeof partialState === 'function') { super.setState((state, props) => { diff --git a/packages/react-native-web/src/vendor/react-native/VirtualizedList/VirtualizedListCellRenderer.js b/packages/react-native-web/src/vendor/react-native/VirtualizedList/VirtualizedListCellRenderer.js index b251487513..4ac567be82 100644 --- a/packages/react-native-web/src/vendor/react-native/VirtualizedList/VirtualizedListCellRenderer.js +++ b/packages/react-native-web/src/vendor/react-native/VirtualizedList/VirtualizedListCellRenderer.js @@ -20,14 +20,14 @@ import {VirtualizedListCellContextProvider} from './VirtualizedListContext.js'; import invariant from 'fbjs/lib/invariant'; import * as React from 'react'; -type ViewStyleProp = $PropertyType; +type ViewStyleProp = ViewProps['style']; export type Props = { CellRendererComponent?: ?React.ComponentType>, ItemSeparatorComponent: ?React.ComponentType< any | {highlighted: boolean, leadingItem: ?ItemT}, >, - ListItemComponent?: ?(React.ComponentType | React.Element), + ListItemComponent?: ?(React.ComponentType | React.MixedElement), cellKey: string, horizontal: ?boolean, index: number, @@ -38,14 +38,14 @@ export type Props = { onUnmount: (cellKey: string) => void, onUpdateSeparators: ( cellKeys: Array, - props: $Shape>, + props: Partial>, ) => void, prevCellKey: ?string, renderItem?: ?RenderItemType, ... }; -type SeparatorProps = $ReadOnly<{| +type SeparatorProps = Readonly<{| highlighted: boolean, leadingItem: ?ItemT, |}>; @@ -139,12 +139,7 @@ export default class CellRenderer extends React.Component< } if (ListItemComponent) { - /* $FlowFixMe[not-a-component] (>=0.108.0 site=react_native_fb) This - * comment suppresses an error found when Flow v0.108 was deployed. To - * see the error, delete this comment and run Flow. */ - /* $FlowFixMe[incompatible-type-arg] (>=0.108.0 site=react_native_fb) - * This comment suppresses an error found when Flow v0.108 was deployed. - * To see the error, delete this comment and run Flow. */ + // $FlowFixMe[not-a-function] return React.createElement(ListItemComponent, { item, index, @@ -194,8 +189,7 @@ export default class CellRenderer extends React.Component< ) ? // $FlowFixMe[incompatible-type] ItemSeparatorComponent - : // $FlowFixMe[incompatible-type] - ItemSeparatorComponent && ( + : ItemSeparatorComponent && ( ); const cellStyle = inversionStyle @@ -206,6 +200,7 @@ export default class CellRenderer extends React.Component< ? [styles.row, inversionStyle] : inversionStyle; const result = !CellRendererComponent ? ( + // $FlowFixMe[incompatible-type] View drops unsupported props { contentLength: number, diff --git a/packages/react-native-web/src/vendor/react-native/VirtualizedList/VirtualizedListProps.js b/packages/react-native-web/src/vendor/react-native/VirtualizedList/VirtualizedListProps.js index e2d511ccc7..426e0858f7 100644 --- a/packages/react-native-web/src/vendor/react-native/VirtualizedList/VirtualizedListProps.js +++ b/packages/react-native-web/src/vendor/react-native/VirtualizedList/VirtualizedListProps.js @@ -14,7 +14,7 @@ import type { FocusEvent, } from '../Types/CoreEventTypes'; import { type ViewProps } from '../../../exports/View'; -type ViewStyleProp = $PropertyType; +type ViewStyleProp = ViewProps['style']; import type { ViewabilityConfig, ViewabilityConfigCallbackPair, @@ -39,7 +39,7 @@ export type RenderItemProps = { ... }; -export type CellRendererProps = $ReadOnly<{ +export type CellRendererProps = Readonly<{ cellKey: string, children: React.Node, index: number, @@ -156,17 +156,17 @@ type OptionalProps = {| * `highlight` and `unhighlight` (which set the `highlighted: boolean` prop) are insufficient for * your use-case. */ - ListItemComponent?: ?(React.ComponentType | React.Element), + ListItemComponent?: ?(React.ComponentType | React.MixedElement), /** * Rendered when the list is empty. Can be a React Component Class, a render function, or * a rendered element. */ - ListEmptyComponent?: ?(React.ComponentType | React.Element), + ListEmptyComponent?: ?(React.ComponentType | React.MixedElement), /** * Rendered at the bottom of all the items. Can be a React Component Class, a render function, or * a rendered element. */ - ListFooterComponent?: ?(React.ComponentType | React.Element), + ListFooterComponent?: ?(React.ComponentType | React.MixedElement), /** * Styling for internal View for ListFooterComponent */ @@ -175,7 +175,7 @@ type OptionalProps = {| * Rendered at the top of all the items. Can be a React Component Class, a render function, or * a rendered element. */ - ListHeaderComponent?: ?(React.ComponentType | React.Element), + ListHeaderComponent?: ?(React.ComponentType | React.MixedElement), /** * Styling for internal View for ListHeaderComponent */ @@ -245,7 +245,7 @@ type OptionalProps = {| * component built internally. The onRefresh and refreshing * props are also ignored. Only works for vertical VirtualizedList. */ - refreshControl?: ?React.Element, + refreshControl?: ?React.MixedElement, /** * Set this true while waiting for new data from a refresh. */ @@ -259,7 +259,7 @@ type OptionalProps = {| /** * Render a custom scroll component, e.g. with a differently styled `RefreshControl`. */ - renderScrollComponent?: (props: Object) => React.Element, + renderScrollComponent?: (props: Object) => React.MixedElement, /** * Amount of time between low-pri item render batches, e.g. for rendering items quite a ways off * screen. Similar fill rate/responsiveness tradeoff as `maxToRenderPerBatch`. @@ -289,7 +289,7 @@ type OptionalProps = {| |}; export type Props = {| - ...React.ElementConfig, + ...React.ComponentProps, ...RequiredProps, ...OptionalProps, |}; diff --git a/packages/react-native-web/src/vendor/react-native/VirtualizedList/index.js b/packages/react-native-web/src/vendor/react-native/VirtualizedList/index.js index 97c817f0b2..b7576d1250 100644 --- a/packages/react-native-web/src/vendor/react-native/VirtualizedList/index.js +++ b/packages/react-native-web/src/vendor/react-native/VirtualizedList/index.js @@ -59,7 +59,7 @@ let _usedIndexForKey = false; let _keylessItemComponentName: string = ''; type ScrollResponderType = any; -type ViewStyleProp = $PropertyType; +type ViewStyleProp = ViewProps['style']; type ViewabilityHelperCallbackTuple = { viewabilityHelper: ViewabilityHelper, @@ -122,7 +122,7 @@ function windowSizeOrDefault(windowSize: ?number) { } function findLastWhere( - arr: $ReadOnlyArray, + arr: ReadonlyArray, predicate: (element: T) => boolean, ): T | null { for (let i = arr.length - 1; i >= 0; i--) { @@ -470,7 +470,7 @@ class VirtualizedList extends StateSafePureComponent { const targetDelta = delta - leftoverDelta; if (this.props.inverted && this._scrollRef && this._scrollRef.getScrollableNode) { - const node = (this._scrollRef: any).getScrollableNode(); + const node = (this._scrollRef as any).getScrollableNode(); if (this.props.horizontal) { ev.target.scrollLeft += targetDelta; const nextScrollLeft = node.scrollLeft - leftoverDelta; @@ -490,7 +490,6 @@ class VirtualizedList extends StateSafePureComponent { props; invariant( - // $FlowFixMe[prop-missing] !onScroll || !onScroll.__isNative, 'Components based on VirtualizedList must be wrapped with Animated.createAnimatedComponent ' + 'to support native onScroll events with useNativeDriver', @@ -521,7 +520,6 @@ class VirtualizedList extends StateSafePureComponent { } if (__DEV__ && !this._hasWarned.flexWrap) { - // $FlowFixMe[underconstrained-implicit-instantiation] const flatStyles = StyleSheet.flatten(this.props.contentContainerStyle); if (flatStyles != null && flatStyles.flexWrap === 'wrap') { console.warn( @@ -536,7 +534,7 @@ class VirtualizedList extends StateSafePureComponent { static _createRenderMask( props: Props, cellsAroundViewport: {first: number, last: number}, - additionalRegions?: ?$ReadOnlyArray<{first: number, last: number}>, + additionalRegions?: ?ReadonlyArray<{first: number, last: number}>, ): CellRenderMask { const itemCount = props.getItemCount(props.data); @@ -927,8 +925,6 @@ class VirtualizedList extends StateSafePureComponent { const element = React.isValidElement(ListHeaderComponent) ? ( ListHeaderComponent ) : ( - // $FlowFixMe[not-a-component] - // $FlowFixMe[incompatible-type-arg] ); cells.push( @@ -941,10 +937,7 @@ class VirtualizedList extends StateSafePureComponent { inversionStyle, this.props.ListHeaderComponentStyle, ]}> - { - // $FlowFixMe[incompatible-type] - Typing ReactNativeComponent revealed errors - element - } + {element} , ); @@ -953,15 +946,13 @@ class VirtualizedList extends StateSafePureComponent { // 2a. Add a cell for ListEmptyComponent if applicable const itemCount = this.props.getItemCount(data); if (itemCount === 0 && ListEmptyComponent) { - const element: React.Element = ((React.isValidElement( + const element: any = (React.isValidElement( ListEmptyComponent, ) ? ( ListEmptyComponent ) : ( - // $FlowFixMe[not-a-component] - // $FlowFixMe[incompatible-type-arg] - )): any); + )) as any; cells.push( { cells.push( , ); @@ -1049,8 +1041,6 @@ class VirtualizedList extends StateSafePureComponent { const element = React.isValidElement(ListFooterComponent) ? ( ListFooterComponent ) : ( - // $FlowFixMe[not-a-component] - // $FlowFixMe[incompatible-type-arg] ); cells.push( @@ -1063,10 +1053,7 @@ class VirtualizedList extends StateSafePureComponent { inversionStyle, this.props.ListFooterComponentStyle, ]}> - { - // $FlowFixMe[incompatible-type] - Typing ReactNativeComponent revealed errors - element - } + {element} , ); @@ -1246,7 +1233,6 @@ class VirtualizedList extends StateSafePureComponent { _defaultRenderScrollComponent = props => { const onRefresh = props.onRefresh; if (this._isNestedWithSameOrientation()) { - // $FlowFixMe[prop-missing] - Typing ReactNativeComponent revealed errors return ; } else if (onRefresh) { invariant( @@ -1256,14 +1242,11 @@ class VirtualizedList extends StateSafePureComponent { '`', ); return ( - // $FlowFixMe[prop-missing] Invalid prop usage - // $FlowFixMe[incompatible-use] { /> ); } else { - // $FlowFixMe[prop-missing] Invalid prop usage - // $FlowFixMe[incompatible-use] return ; } }; _onCellLayout = (e: LayoutEvent, cellKey: string, index: number): void => { const layout = e.nativeEvent.layout; - const next = { + const next: { + inLayout?: boolean, + index: number, + length: number, + offset: number, + } = { offset: this._selectOffset(layout), length: this._selectLength(layout), index, @@ -1486,7 +1472,7 @@ class VirtualizedList extends StateSafePureComponent { } _selectLength( - metrics: $ReadOnly<{ + metrics: Readonly<{ height: number, width: number, ... @@ -1498,7 +1484,7 @@ class VirtualizedList extends StateSafePureComponent { } _selectOffset( - metrics: $ReadOnly<{ + metrics: Readonly<{ x: number, y: number, ... @@ -1917,9 +1903,7 @@ class VirtualizedList extends StateSafePureComponent { const frame = this._frames[this._keyExtractor(item, index, props)]; if (!frame || frame.index !== index) { if (getItemLayout) { - /* $FlowFixMe[prop-missing] (>=0.63.0 site=react_native_fb) This comment - * suppresses an error found when Flow v0.63 was deployed. To see the error - * delete this comment and run Flow. */ + // $FlowFixMe[incompatible-type] return getItemLayout(data, index); } } @@ -1928,7 +1912,7 @@ class VirtualizedList extends StateSafePureComponent { _getNonViewportRenderRegions = ( props: FrameMetricProps, - ): $ReadOnlyArray<{ + ): ReadonlyArray<{ first: number, last: number, }> => { diff --git a/packages/react-native-web/src/vendor/react-native/VirtualizedSectionList/index.js b/packages/react-native-web/src/vendor/react-native/VirtualizedSectionList/index.js index c37c8d3727..b941e87620 100644 --- a/packages/react-native-web/src/vendor/react-native/VirtualizedSectionList/index.js +++ b/packages/react-native-web/src/vendor/react-native/VirtualizedSectionList/index.js @@ -21,7 +21,7 @@ export type SectionBase = { /** * The data for rendering items in this section. */ - data: $ReadOnlyArray, + data: ReadonlyArray, /** * Optional key to keep track of section re-ordering. If you don't plan on re-ordering sections, * the array index will be used by default. @@ -39,17 +39,17 @@ export type SectionBase = { ... }, ... - }) => null | React.Element, + }) => null | React.MixedElement, ItemSeparatorComponent?: ?React.ComponentType, keyExtractor?: (item: SectionItemT, index?: ?number) => string, ... }; -type RequiredProps> = {| - sections: $ReadOnlyArray, +type RequiredProps> = {| + sections: ReadonlyArray, |}; -type OptionalProps> = {| +type OptionalProps> = {| /** * Default renderer for every item in every section. */ @@ -64,7 +64,7 @@ type OptionalProps> = {| ... }, ... - }) => null | React.Element, + }) => null | React.MixedElement, /** * Rendered at the top of each section. These stick to the top of the `ScrollView` by default on * iOS. See `stickySectionHeadersEnabled`. @@ -72,14 +72,14 @@ type OptionalProps> = {| renderSectionHeader?: ?(info: { section: SectionT, ... - }) => null | React.Element, + }) => null | React.MixedElement, /** * Rendered at the bottom of each section. */ renderSectionFooter?: ?(info: { section: SectionT, ... - }) => null | React.Element, + }) => null | React.MixedElement, /** * Rendered at the top and bottom of each section (note this is different from * `ItemSeparatorComponent` which is only rendered between items). These are intended to separate @@ -96,18 +96,14 @@ type OptionalProps> = {| onEndReached?: ?({distanceFromEnd: number, ...}) => void, |}; -type VirtualizedListProps = React.ElementConfig; +type VirtualizedListProps = React.ComponentProps; export type Props = {| ...RequiredProps, ...OptionalProps, - ...$Diff< + ...Omit< VirtualizedListProps, - { - renderItem: $PropertyType, - data: $PropertyType, - ... - }, + 'renderItem' | 'data', >, |}; export type ScrollToLocationParamsType = {| @@ -126,7 +122,7 @@ type State = {childProps: VirtualizedListProps, ...}; * sections when new props are received, which should be plenty fast for up to ~10,000 items. */ class VirtualizedSectionList< - SectionT: SectionBase, + SectionT extends SectionBase, > extends React.PureComponent, State> { scrollToLocation(params: ScrollToLocationParamsType) { let index = params.itemIndex; @@ -172,7 +168,7 @@ class VirtualizedSectionList< const listHeaderOffset = this.props.ListHeaderComponent ? 1 : 0; const stickyHeaderIndices = this.props.stickySectionHeadersEnabled - ? ([]: Array) + ? ([] as Array) : undefined; let itemCount = 0; @@ -211,7 +207,7 @@ class VirtualizedSectionList< _getItem( props: Props, - sections: ?$ReadOnlyArray, + sections: ?ReadonlyArray, index: number, ): ?Item { if (!sections) { @@ -455,12 +451,12 @@ class VirtualizedSectionList< _updateHighlightMap: {[string]: (boolean) => void} = {}; _updatePropsMap: {[string]: void | (boolean => void)} = {}; _listRef: ?React.ElementRef; - _captureRef = (ref: null | React$ElementRef>) => { + _captureRef = (ref: null | React.ElementRef>) => { this._listRef = ref; }; } -type ItemWithSeparatorCommonProps = $ReadOnly<{| +type ItemWithSeparatorCommonProps = Readonly<{| leadingItem: ?Item, leadingSection: ?Object, section: Object, @@ -468,7 +464,7 @@ type ItemWithSeparatorCommonProps = $ReadOnly<{| trailingSection: ?Object, |}>; -type ItemWithSeparatorProps = $ReadOnly<{| +type ItemWithSeparatorProps = Readonly<{| ...ItemWithSeparatorCommonProps, LeadingSeparatorComponent: ?React.ComponentType, SeparatorComponent: ?React.ComponentType, @@ -529,7 +525,7 @@ function ItemWithSeparator(props: ItemWithSeparatorProps): React.Node { React.useEffect(() => { setSelfHighlightCallback(cellKey, setSeparatorHighlighted); - // $FlowFixMe[incompatible-call] + // $FlowFixMe[incompatible-type] setSelfUpdatePropsCallback(cellKey, setSeparatorProps); return () => { @@ -560,7 +556,7 @@ function ItemWithSeparator(props: ItemWithSeparatorProps): React.Node { }, updateProps: ( select: 'leading' | 'trailing', - newProps: $Shape, + newProps: Partial, ) => { if (select === 'leading') { if (LeadingSeparatorComponent != null) { @@ -603,14 +599,4 @@ function ItemWithSeparator(props: ItemWithSeparatorProps): React.Node { ); } -/* $FlowFixMe[class-object-subtyping] added when improving typing for this - * parameters */ -// $FlowFixMe[method-unbinding] -export default (VirtualizedSectionList: React.AbstractComponent< - React.ElementConfig, - $ReadOnly<{ - getListRef: () => ?React.ElementRef, - scrollToLocation: (params: ScrollToLocationParamsType) => void, - ... - }>, ->); +export default VirtualizedSectionList; diff --git a/packages/react-native-web/src/vendor/react-native/infoLog/index.js b/packages/react-native-web/src/vendor/react-native/infoLog/index.js index 7f2a63e0cd..96760d9c85 100644 --- a/packages/react-native-web/src/vendor/react-native/infoLog/index.js +++ b/packages/react-native-web/src/vendor/react-native/infoLog/index.js @@ -13,7 +13,7 @@ /** * Intentional info-level logging for clear separation from ad-hoc console debug logging. */ -function infoLog(...args: Array): void { +function infoLog(...args: Array): void { return console.log(...args); } diff --git a/packages/react-native-web/src/vendor/react-native/vendor/emitter/EventEmitter.js b/packages/react-native-web/src/vendor/react-native/vendor/emitter/EventEmitter.js index 81ae2c011c..60c5c65b6a 100644 --- a/packages/react-native-web/src/vendor/react-native/vendor/emitter/EventEmitter.js +++ b/packages/react-native-web/src/vendor/react-native/vendor/emitter/EventEmitter.js @@ -12,33 +12,30 @@ export interface EventSubscription { remove(): void; } -export interface IEventEmitter { - addListener>( +export interface IEventEmitter { + addListener( eventType: TEvent, - listener: (...args: $ElementType) => mixed, - context?: mixed, + listener: (...args: TEventToArgsMap[TEvent]) => unknown, + context?: unknown, ): EventSubscription; - emit>( + emit( eventType: TEvent, - ...args: $ElementType + ...args: TEventToArgsMap[TEvent] ): void; - removeAllListeners>(eventType?: ?TEvent): void; + removeAllListeners(eventType?: ?TEvent): void; - listenerCount>(eventType: TEvent): number; + listenerCount(eventType: TEvent): number; } interface Registration { - +context: mixed; - +listener: (...args: TArgs) => mixed; - +remove: () => void; + readonly context: unknown; + readonly listener: (...args: TArgs) => unknown; + readonly remove: () => void; } -type Registry = $ObjMap< - TEventToArgsMap, - (TArgs) => Set>, ->; +type Registry = {[eventType: string]: Set>}; /** * EventEmitter manages listeners and publishes events to them. @@ -60,22 +57,22 @@ type Registry = $ObjMap< * emitter.emit('error', new Error('Resource not found')); * */ -export default class EventEmitter +export default class EventEmitter implements IEventEmitter { - _registry: Registry = {}; + _registry: Registry = {}; /** * Registers a listener that is called when the supplied event is emitted. * Returns a subscription that has a `remove` method to undo registration. */ - addListener>( + addListener( eventType: TEvent, - listener: (...args: $ElementType) => mixed, - context: mixed, + listener: (...args: TEventToArgsMap[TEvent]) => unknown, + context: unknown, ): EventSubscription { - const registrations = allocate(this._registry, eventType); - const registration: Registration<$ElementType> = { + const registrations = allocate(this._registry, eventType); + const registration: Registration = { context, listener, remove(): void { @@ -93,13 +90,12 @@ export default class EventEmitter * If a listener modifies the listeners registered for the same event, those * changes will not be reflected in the current invocation of `emit`. */ - emit>( + emit( eventType: TEvent, - ...args: $ElementType + ...args: TEventToArgsMap[TEvent] ): void { - const registrations: ?Set< - Registration<$ElementType>, - > = this._registry[eventType]; + const registrations: ?Set> = + this._registry[eventType]; if (registrations != null) { for (const registration of [...registrations]) { registration.listener.apply(registration.context, args); @@ -110,7 +106,7 @@ export default class EventEmitter /** * Removes all registered listeners. */ - removeAllListeners>( + removeAllListeners( eventType?: ?TEvent, ): void { if (eventType == null) { @@ -123,19 +119,15 @@ export default class EventEmitter /** * Returns the number of registered listeners for the supplied event. */ - listenerCount>(eventType: TEvent): number { - const registrations: ?Set> = this._registry[eventType]; + listenerCount(eventType: TEvent): number { + const registrations: ?Set> = this._registry[eventType]; return registrations == null ? 0 : registrations.size; } } -function allocate< - TEventToArgsMap: {...}, - TEvent: $Keys, - TEventArgs: $ElementType, ->( - registry: Registry, - eventType: TEvent, +function allocate( + registry: Registry, + eventType: string, ): Set> { let registrations: ?Set> = registry[eventType]; if (registrations == null) { diff --git a/packages/react-native-web/types/index.d.ts b/packages/react-native-web/types/index.d.ts new file mode 100644 index 0000000000..c842bdd97d --- /dev/null +++ b/packages/react-native-web/types/index.d.ts @@ -0,0 +1,694 @@ +/** + * Augments the types of `react-native` (>= 0.88) with the props and styles + * that react-native-web supports. + * + * Usage, in a `.d.ts` file of your project: + * /// + * Or in `tsconfig.json`: + * "compilerOptions": { "types": ["react-native-web/types"] } + */ + +import type { + MouseEventHandler, + UIEventHandler, + WheelEventHandler +} from 'react'; +import type { + ColorValue, + DimensionValue, + GestureResponderEvent, + Role +} from 'react-native'; + +type idRef = string; +type idRefList = idRef | Array; +type NumberOrString = number | string; + +// Roles that react-native-web renders as a specific HTML element. +// See src/modules/AccessibilityUtil/propsToAccessibilityComponent.js +type WebRole = + | 'blockquote' + | 'code' + | 'deletion' + | 'emphasis' + | 'insertion' + | 'label' + | 'paragraph' + | 'strong'; + +// See src/exports/View/types.js +interface WebAccessibilityProps { + 'aria-activedescendant'?: idRef | undefined; + 'aria-atomic'?: boolean | undefined; + 'aria-autocomplete'?: 'none' | 'list' | 'inline' | 'both' | undefined; + 'aria-colcount'?: number | undefined; + 'aria-colindex'?: number | undefined; + 'aria-colspan'?: number | undefined; + 'aria-controls'?: idRef | undefined; + 'aria-current'?: + boolean | 'page' | 'step' | 'location' | 'date' | 'time' | undefined; + 'aria-describedby'?: idRef | undefined; + 'aria-details'?: idRef | undefined; + 'aria-errormessage'?: idRef | undefined; + 'aria-flowto'?: idRef | undefined; + 'aria-haspopup'?: + 'dialog' | 'grid' | 'listbox' | 'menu' | 'tree' | false | undefined; + 'aria-invalid'?: boolean | undefined; + 'aria-keyshortcuts'?: Array | undefined; + 'aria-level'?: number | undefined; + 'aria-multiline'?: boolean | undefined; + 'aria-multiselectable'?: boolean | undefined; + 'aria-orientation'?: 'horizontal' | 'vertical' | undefined; + 'aria-owns'?: idRef | undefined; + 'aria-placeholder'?: string | undefined; + 'aria-posinset'?: number | undefined; + 'aria-pressed'?: boolean | 'mixed' | undefined; + 'aria-readonly'?: boolean | undefined; + 'aria-required'?: boolean | undefined; + 'aria-roledescription'?: string | undefined; + 'aria-rowcount'?: number | undefined; + 'aria-rowindex'?: number | undefined; + 'aria-rowspan'?: number | undefined; + 'aria-setsize'?: number | undefined; + 'aria-sort'?: 'ascending' | 'descending' | 'none' | 'other' | undefined; + inert?: boolean | undefined; + + /** @deprecated Use `aria-activedescendant`. */ + accessibilityActiveDescendant?: idRef | undefined; + /** @deprecated Use `aria-atomic`. */ + accessibilityAtomic?: boolean | undefined; + /** @deprecated Use `aria-autocomplete`. */ + accessibilityAutoComplete?: 'none' | 'list' | 'inline' | 'both' | undefined; + /** @deprecated Use `aria-busy`. */ + accessibilityBusy?: boolean | undefined; + /** @deprecated Use `aria-checked`. */ + accessibilityChecked?: boolean | 'mixed' | undefined; + /** @deprecated Use `aria-colcount`. */ + accessibilityColumnCount?: number | undefined; + /** @deprecated Use `aria-colindex`. */ + accessibilityColumnIndex?: number | undefined; + /** @deprecated Use `aria-colspan`. */ + accessibilityColumnSpan?: number | undefined; + /** @deprecated Use `aria-controls`. */ + accessibilityControls?: idRefList | undefined; + /** @deprecated Use `aria-current`. */ + accessibilityCurrent?: + boolean | 'page' | 'step' | 'location' | 'date' | 'time' | undefined; + /** @deprecated Use `aria-describedby`. */ + accessibilityDescribedBy?: idRefList | undefined; + /** @deprecated Use `aria-details`. */ + accessibilityDetails?: idRef | undefined; + /** @deprecated Use `aria-disabled`. */ + accessibilityDisabled?: boolean | undefined; + /** @deprecated Use `aria-errormessage`. */ + accessibilityErrorMessage?: idRef | undefined; + /** @deprecated Use `aria-expanded`. */ + accessibilityExpanded?: boolean | undefined; + /** @deprecated Use `aria-flowto`. */ + accessibilityFlowTo?: idRefList | undefined; + /** @deprecated Use `aria-haspopup`. */ + accessibilityHasPopup?: + 'dialog' | 'grid' | 'listbox' | 'menu' | 'tree' | false | undefined; + /** @deprecated Use `aria-hidden`. */ + accessibilityHidden?: boolean | undefined; + /** @deprecated Use `aria-invalid`. */ + accessibilityInvalid?: boolean | undefined; + /** @deprecated Use `aria-keyshortcuts`. */ + accessibilityKeyShortcuts?: Array | undefined; + /** @deprecated Use `aria-level`. */ + accessibilityLevel?: number | undefined; + /** @deprecated Use `aria-modal`. */ + accessibilityModal?: boolean | undefined; + /** @deprecated Use `aria-multiline`. */ + accessibilityMultiline?: boolean | undefined; + /** @deprecated Use `aria-multiselectable`. */ + accessibilityMultiSelectable?: boolean | undefined; + /** @deprecated Use `aria-orientation`. */ + accessibilityOrientation?: 'horizontal' | 'vertical' | undefined; + /** @deprecated Use `aria-owns`. */ + accessibilityOwns?: idRefList | undefined; + /** @deprecated Use `aria-placeholder`. */ + accessibilityPlaceholder?: string | undefined; + /** @deprecated Use `aria-posinset`. */ + accessibilityPosInSet?: number | undefined; + /** @deprecated Use `aria-pressed`. */ + accessibilityPressed?: boolean | 'mixed' | undefined; + /** @deprecated Use `aria-readonly`. */ + accessibilityReadOnly?: boolean | undefined; + /** @deprecated Use `aria-required`. */ + accessibilityRequired?: boolean | undefined; + /** @deprecated Use `aria-roledescription`. */ + accessibilityRoleDescription?: string | undefined; + /** @deprecated Use `aria-rowcount`. */ + accessibilityRowCount?: number | undefined; + /** @deprecated Use `aria-rowindex`. */ + accessibilityRowIndex?: number | undefined; + /** @deprecated Use `aria-rowspan`. */ + accessibilityRowSpan?: number | undefined; + /** @deprecated Use `aria-selected`. */ + accessibilitySelected?: boolean | undefined; + /** @deprecated Use `aria-setsize`. */ + accessibilitySetSize?: number | undefined; + /** @deprecated Use `aria-sort`. */ + accessibilitySort?: 'ascending' | 'descending' | 'none' | 'other' | undefined; + /** @deprecated Use `aria-valuemax`. */ + accessibilityValueMax?: number | undefined; + /** @deprecated Use `aria-valuemin`. */ + accessibilityValueMin?: number | undefined; + /** @deprecated Use `aria-valuenow`. */ + accessibilityValueNow?: number | undefined; + /** @deprecated Use `aria-valuetext`. */ + accessibilityValueText?: string | undefined; +} + +// Events that react-native does not declare. +// See src/exports/View/types.js and src/modules/forwardedProps/index.js +interface WebEventProps { + onAuxClick?: MouseEventHandler | undefined; + onContextMenu?: MouseEventHandler | undefined; + onMouseDown?: MouseEventHandler | undefined; + onMouseMove?: MouseEventHandler | undefined; + onMouseOut?: MouseEventHandler | undefined; + onMouseOver?: MouseEventHandler | undefined; + onMouseUp?: MouseEventHandler | undefined; + onScroll?: UIEventHandler | undefined; + onWheel?: WheelEventHandler | undefined; + onScrollShouldSetResponder?: + ((event: GestureResponderEvent) => boolean) | undefined; + onScrollShouldSetResponderCapture?: + ((event: GestureResponderEvent) => boolean) | undefined; + onSelectionChangeShouldSetResponder?: + ((event: GestureResponderEvent) => boolean) | undefined; + onSelectionChangeShouldSetResponderCapture?: + ((event: GestureResponderEvent) => boolean) | undefined; +} + +interface WebSharedProps extends WebEventProps { + dataSet?: Record | undefined; + lang?: string | undefined; + suppressHydrationWarning?: boolean | undefined; + /** @unstable */ + href?: string | undefined; + /** @unstable */ + hrefAttrs?: + | { + download?: boolean | undefined; + rel?: string | undefined; + target?: string | undefined; + } + | undefined; +} + +// Styles that react-native does not declare. +// See src/exports/View/types.js and src/types/styles.js +type AnimationDirection = + 'alternate' | 'alternate-reverse' | 'normal' | 'reverse'; + +type AnimationFillMode = 'none' | 'forwards' | 'backwards' | 'both'; +type AnimationIterationCount = number | 'infinite'; +type AnimationKeyframes = string | Record; +type AnimationPlayState = 'paused' | 'running'; +type BorderStyleValue = 'solid' | 'dotted' | 'dashed'; + +type CursorValue = + | 'alias' + | 'all-scroll' + | 'auto' + | 'cell' + | 'context-menu' + | 'copy' + | 'crosshair' + | 'default' + | 'grab' + | 'grabbing' + | 'help' + | 'pointer' + | 'progress' + | 'wait' + | 'text' + | 'vertical-text' + | 'move' + | 'none' + | 'no-drop' + | 'not-allowed' + | 'zoom-in' + | 'zoom-out' + // resize + | 'col-resize' + | 'e-resize' + | 'ew-resize' + | 'n-resize' + | 'ne-resize' + | 'ns-resize' + | 'nw-resize' + | 'row-resize' + | 's-resize' + | 'se-resize' + | 'sw-resize' + | 'w-resize' + | 'nesw-resize' + | 'nwse-resize'; + +type OverflowValue = 'auto' | 'hidden' | 'scroll' | 'visible'; +type OverscrollBehaviorValue = 'auto' | 'contain' | 'none'; + +type TouchActionValue = + | 'auto' + | 'inherit' + | 'manipulation' + | 'none' + | 'pan-down' + | 'pan-left' + | 'pan-right' + | 'pan-up' + | 'pan-x' + | 'pan-y' + | 'pinch-zoom'; + +interface WebViewStyle { + animationDelay?: string | Array | undefined; + animationDirection?: + AnimationDirection | Array | undefined; + animationDuration?: string | Array | undefined; + animationFillMode?: AnimationFillMode | Array | undefined; + animationIterationCount?: + AnimationIterationCount | Array | undefined; + animationKeyframes?: + AnimationKeyframes | Array | undefined; + animationPlayState?: + AnimationPlayState | Array | undefined; + animationTimingFunction?: string | Array | undefined; + appearance?: string | undefined; + backdropFilter?: string | undefined; + backgroundAttachment?: string | undefined; + backgroundBlendMode?: string | undefined; + backgroundClip?: string | undefined; + backgroundOrigin?: 'border-box' | 'content-box' | 'padding-box' | undefined; + borderBlockEndStyle?: BorderStyleValue | undefined; + borderBlockEndWidth?: DimensionValue | undefined; + borderBlockStartStyle?: BorderStyleValue | undefined; + borderBlockStartWidth?: DimensionValue | undefined; + borderBlockStyle?: BorderStyleValue | undefined; + borderBlockWidth?: DimensionValue | undefined; + borderBottomStyle?: BorderStyleValue | undefined; + borderInlineColor?: ColorValue | undefined; + borderInlineEndColor?: ColorValue | undefined; + borderInlineEndStyle?: BorderStyleValue | undefined; + borderInlineEndWidth?: DimensionValue | undefined; + borderInlineStartColor?: ColorValue | undefined; + borderInlineStartStyle?: BorderStyleValue | undefined; + borderInlineStartWidth?: DimensionValue | undefined; + borderInlineStyle?: BorderStyleValue | undefined; + borderInlineWidth?: DimensionValue | undefined; + borderLeftStyle?: BorderStyleValue | undefined; + borderRightStyle?: BorderStyleValue | undefined; + borderTopStyle?: BorderStyleValue | undefined; + /** @deprecated */ + borderEndStyle?: BorderStyleValue | undefined; + /** @deprecated */ + borderStartStyle?: BorderStyleValue | undefined; + boxDecorationBreak?: 'clone' | 'slice' | undefined; + clip?: string | undefined; + forcedColorAdjust?: 'auto' | 'none' | undefined; + gridAutoColumns?: string | undefined; + gridAutoFlow?: string | undefined; + gridAutoRows?: string | undefined; + gridColumnEnd?: string | undefined; + gridColumnGap?: string | undefined; + gridColumnStart?: string | undefined; + gridRowEnd?: string | undefined; + gridRowGap?: string | undefined; + gridRowStart?: string | undefined; + gridTemplateAreas?: string | undefined; + gridTemplateColumns?: string | undefined; + gridTemplateRows?: string | undefined; + mask?: string | undefined; + maskClip?: string | undefined; + maskComposite?: string | undefined; + maskImage?: string | undefined; + maskOrigin?: string | undefined; + maskPosition?: string | undefined; + maskRepeat?: string | undefined; + maskSize?: string | undefined; + order?: number | undefined; + overflowX?: OverflowValue | undefined; + overflowY?: OverflowValue | undefined; + overscrollBehavior?: OverscrollBehaviorValue | undefined; + overscrollBehaviorX?: OverscrollBehaviorValue | undefined; + overscrollBehaviorY?: OverscrollBehaviorValue | undefined; + perspective?: NumberOrString | undefined; + perspectiveOrigin?: string | undefined; + printColorAdjust?: 'economy' | 'exact' | undefined; + scrollbarWidth?: 'auto' | 'none' | 'thin' | undefined; + scrollSnapAlign?: string | undefined; + scrollSnapType?: string | undefined; + touchAction?: TouchActionValue | undefined; + transformStyle?: 'flat' | 'preserve-3d' | undefined; + transitionDelay?: string | Array | undefined; + transitionDuration?: string | Array | undefined; + transitionProperty?: string | Array | undefined; + transitionTimingFunction?: string | Array | undefined; + visibility?: 'hidden' | 'visible' | undefined; + willChange?: string | undefined; + WebkitMaskImage?: string | undefined; + WebkitOverflowScrolling?: 'auto' | 'touch' | undefined; +} + +// See src/exports/Text/types.js and src/exports/TextInput/types.js +interface WebTextStyle { + fontFeatureSettings?: string | undefined; + hyphenateCharacter?: string | undefined; + hyphens?: 'auto' | 'manual' | 'none' | undefined; + initialLetter?: NumberOrString | undefined; + lineClamp?: number | undefined; + rubyPosition?: 'alternate' | 'over' | 'under' | undefined; + textEmphasis?: string | undefined; + textEmphasisColor?: ColorValue | undefined; + textEmphasisPosition?: string | undefined; + textEmphasisStyle?: string | undefined; + textIndent?: NumberOrString | undefined; + textOverflow?: string | undefined; + textRendering?: + | 'auto' + | 'geometricPrecision' + | 'optimizeLegibility' + | 'optimizeSpeed' + | undefined; + textShadow?: string | undefined; + textSizeAdjust?: string | undefined; + unicodeBidi?: + | 'normal' + | 'bidi-override' + | 'embed' + | 'isolate' + | 'isolate-override' + | 'plaintext' + | undefined; + whiteSpace?: string | undefined; + wordBreak?: 'normal' | 'break-all' | 'break-word' | 'keep-all' | undefined; + wordWrap?: string | undefined; + MozOsxFontSmoothing?: string | undefined; + WebkitFontSmoothing?: string | undefined; + /** TextInput only. */ + caretColor?: ColorValue | undefined; + /** TextInput only. */ + resize?: 'none' | 'vertical' | 'horizontal' | 'both' | undefined; +} + +declare module 'react-native' { + interface AccessibilityProps extends WebAccessibilityProps { + 'aria-live'?: 'assertive' | 'none' | 'off' | 'polite' | undefined; + role?: Role | WebRole | undefined; + } + + interface ViewProps extends WebSharedProps { + dir?: 'ltr' | 'rtl' | undefined; + } + + interface TextProps + extends + WebSharedProps, + Pick< + ViewProps, + | 'focusable' + | 'onBlur' + | 'onClick' + | 'onFocus' + | 'onGotPointerCapture' + | 'onKeyDown' + | 'onKeyUp' + | 'onLostPointerCapture' + | 'onMouseEnter' + | 'onMouseLeave' + | 'onMoveShouldSetResponderCapture' + | 'onPointerCancel' + | 'onPointerDown' + | 'onPointerOut' + | 'onPointerOver' + | 'onPointerUp' + | 'onResponderEnd' + | 'onResponderReject' + | 'onResponderStart' + | 'onStartShouldSetResponderCapture' + | 'onTouchCancel' + | 'onTouchCancelCapture' + | 'onTouchEnd' + | 'onTouchEndCapture' + | 'onTouchMove' + | 'onTouchMoveCapture' + | 'onTouchStart' + | 'onTouchStartCapture' + | 'tabIndex' + > { + dir?: 'auto' | 'ltr' | 'rtl' | undefined; + } + + interface TextInputProps { + /** @deprecated Use `autoComplete`. */ + autoCompleteType?: string | undefined; + dir?: 'auto' | 'ltr' | 'rtl' | undefined; + disabled?: boolean | undefined; + } + + interface ImageProps { + draggable?: boolean | undefined; + } + + interface PressableProps extends Pick< + ViewProps, + 'onMouseEnter' | 'onMouseLeave' + > { + /** Duration (in milliseconds) from `onPressStart` is called after pointerdown. */ + delayPressIn?: number | undefined; + /** Duration (in milliseconds) from `onPressEnd` is called after pointerup. */ + delayPressOut?: number | undefined; + /** Used only for documentation or testing (e.g. snapshot testing). */ + testOnly_hovered?: boolean | undefined; + } + + interface PressableStateCallbackType { + readonly focused?: boolean | undefined; + readonly hovered?: boolean | undefined; + } + + interface ViewStyle extends WebViewStyle { + borderBottomWidth?: DimensionValue | undefined; + borderEndWidth?: DimensionValue | undefined; + borderLeftWidth?: DimensionValue | undefined; + borderRightWidth?: DimensionValue | undefined; + borderStartWidth?: DimensionValue | undefined; + borderTopWidth?: DimensionValue | undefined; + borderWidth?: DimensionValue | undefined; + bottom?: DimensionValue | undefined; + boxSizing?: 'border-box' | 'content-box' | 'padding-box' | undefined; + cursor?: CursorValue | undefined; + display?: string | undefined; + end?: DimensionValue | undefined; + height?: DimensionValue | undefined; + inset?: DimensionValue | undefined; + insetBlock?: DimensionValue | undefined; + insetBlockEnd?: DimensionValue | undefined; + insetBlockStart?: DimensionValue | undefined; + insetInline?: DimensionValue | undefined; + insetInlineEnd?: DimensionValue | undefined; + insetInlineStart?: DimensionValue | undefined; + left?: DimensionValue | undefined; + margin?: DimensionValue | undefined; + marginBlock?: DimensionValue | undefined; + marginBlockEnd?: DimensionValue | undefined; + marginBlockStart?: DimensionValue | undefined; + marginBottom?: DimensionValue | undefined; + marginEnd?: DimensionValue | undefined; + marginHorizontal?: DimensionValue | undefined; + marginInline?: DimensionValue | undefined; + marginInlineEnd?: DimensionValue | undefined; + marginInlineStart?: DimensionValue | undefined; + marginLeft?: DimensionValue | undefined; + marginRight?: DimensionValue | undefined; + marginStart?: DimensionValue | undefined; + marginTop?: DimensionValue | undefined; + marginVertical?: DimensionValue | undefined; + maxHeight?: DimensionValue | undefined; + maxWidth?: DimensionValue | undefined; + minHeight?: DimensionValue | undefined; + minWidth?: DimensionValue | undefined; + outlineOffset?: NumberOrString | undefined; + outlineStyle?: string | undefined; + outlineWidth?: NumberOrString | undefined; + overflow?: OverflowValue | undefined; + padding?: DimensionValue | undefined; + paddingBlock?: DimensionValue | undefined; + paddingBlockEnd?: DimensionValue | undefined; + paddingBlockStart?: DimensionValue | undefined; + paddingBottom?: DimensionValue | undefined; + paddingEnd?: DimensionValue | undefined; + paddingHorizontal?: DimensionValue | undefined; + paddingInline?: DimensionValue | undefined; + paddingInlineEnd?: DimensionValue | undefined; + paddingInlineStart?: DimensionValue | undefined; + paddingLeft?: DimensionValue | undefined; + paddingRight?: DimensionValue | undefined; + paddingStart?: DimensionValue | undefined; + paddingTop?: DimensionValue | undefined; + paddingVertical?: DimensionValue | undefined; + position?: + 'absolute' | 'fixed' | 'relative' | 'static' | 'sticky' | undefined; + right?: DimensionValue | undefined; + start?: DimensionValue | undefined; + top?: DimensionValue | undefined; + userSelect?: 'all' | 'auto' | 'contain' | 'none' | 'text' | undefined; + width?: DimensionValue | undefined; + } + + interface TextStyle extends WebViewStyle, WebTextStyle { + borderBottomWidth?: DimensionValue | undefined; + borderEndWidth?: DimensionValue | undefined; + borderLeftWidth?: DimensionValue | undefined; + borderRightWidth?: DimensionValue | undefined; + borderStartWidth?: DimensionValue | undefined; + borderTopWidth?: DimensionValue | undefined; + borderWidth?: DimensionValue | undefined; + bottom?: DimensionValue | undefined; + boxSizing?: 'border-box' | 'content-box' | 'padding-box' | undefined; + cursor?: CursorValue | undefined; + display?: string | undefined; + end?: DimensionValue | undefined; + fontSize?: NumberOrString | undefined; + height?: DimensionValue | undefined; + inset?: DimensionValue | undefined; + insetBlock?: DimensionValue | undefined; + insetBlockEnd?: DimensionValue | undefined; + insetBlockStart?: DimensionValue | undefined; + insetInline?: DimensionValue | undefined; + insetInlineEnd?: DimensionValue | undefined; + insetInlineStart?: DimensionValue | undefined; + left?: DimensionValue | undefined; + letterSpacing?: NumberOrString | undefined; + lineHeight?: NumberOrString | undefined; + margin?: DimensionValue | undefined; + marginBlock?: DimensionValue | undefined; + marginBlockEnd?: DimensionValue | undefined; + marginBlockStart?: DimensionValue | undefined; + marginBottom?: DimensionValue | undefined; + marginEnd?: DimensionValue | undefined; + marginHorizontal?: DimensionValue | undefined; + marginInline?: DimensionValue | undefined; + marginInlineEnd?: DimensionValue | undefined; + marginInlineStart?: DimensionValue | undefined; + marginLeft?: DimensionValue | undefined; + marginRight?: DimensionValue | undefined; + marginStart?: DimensionValue | undefined; + marginTop?: DimensionValue | undefined; + marginVertical?: DimensionValue | undefined; + maxHeight?: DimensionValue | undefined; + maxWidth?: DimensionValue | undefined; + minHeight?: DimensionValue | undefined; + minWidth?: DimensionValue | undefined; + outlineOffset?: NumberOrString | undefined; + outlineStyle?: string | undefined; + outlineWidth?: NumberOrString | undefined; + overflow?: OverflowValue | undefined; + padding?: DimensionValue | undefined; + paddingBlock?: DimensionValue | undefined; + paddingBlockEnd?: DimensionValue | undefined; + paddingBlockStart?: DimensionValue | undefined; + paddingBottom?: DimensionValue | undefined; + paddingEnd?: DimensionValue | undefined; + paddingHorizontal?: DimensionValue | undefined; + paddingInline?: DimensionValue | undefined; + paddingInlineEnd?: DimensionValue | undefined; + paddingInlineStart?: DimensionValue | undefined; + paddingLeft?: DimensionValue | undefined; + paddingRight?: DimensionValue | undefined; + paddingStart?: DimensionValue | undefined; + paddingTop?: DimensionValue | undefined; + paddingVertical?: DimensionValue | undefined; + position?: + 'absolute' | 'fixed' | 'relative' | 'static' | 'sticky' | undefined; + right?: DimensionValue | undefined; + start?: DimensionValue | undefined; + textAlign?: + | 'auto' + | 'center' + | 'end' + | 'inherit' + | 'justify' + | 'justify-all' + | 'left' + | 'right' + | 'start' + | undefined; + top?: DimensionValue | undefined; + verticalAlign?: string | undefined; + width?: DimensionValue | undefined; + } + + interface ImageStyle extends WebViewStyle { + borderBottomWidth?: DimensionValue | undefined; + borderEndWidth?: DimensionValue | undefined; + borderLeftWidth?: DimensionValue | undefined; + borderRightWidth?: DimensionValue | undefined; + borderStartWidth?: DimensionValue | undefined; + borderTopWidth?: DimensionValue | undefined; + borderWidth?: DimensionValue | undefined; + bottom?: DimensionValue | undefined; + boxSizing?: 'border-box' | 'content-box' | 'padding-box' | undefined; + cursor?: CursorValue | undefined; + display?: string | undefined; + end?: DimensionValue | undefined; + height?: DimensionValue | undefined; + inset?: DimensionValue | undefined; + insetBlock?: DimensionValue | undefined; + insetBlockEnd?: DimensionValue | undefined; + insetBlockStart?: DimensionValue | undefined; + insetInline?: DimensionValue | undefined; + insetInlineEnd?: DimensionValue | undefined; + insetInlineStart?: DimensionValue | undefined; + left?: DimensionValue | undefined; + margin?: DimensionValue | undefined; + marginBlock?: DimensionValue | undefined; + marginBlockEnd?: DimensionValue | undefined; + marginBlockStart?: DimensionValue | undefined; + marginBottom?: DimensionValue | undefined; + marginEnd?: DimensionValue | undefined; + marginHorizontal?: DimensionValue | undefined; + marginInline?: DimensionValue | undefined; + marginInlineEnd?: DimensionValue | undefined; + marginInlineStart?: DimensionValue | undefined; + marginLeft?: DimensionValue | undefined; + marginRight?: DimensionValue | undefined; + marginStart?: DimensionValue | undefined; + marginTop?: DimensionValue | undefined; + marginVertical?: DimensionValue | undefined; + maxHeight?: DimensionValue | undefined; + maxWidth?: DimensionValue | undefined; + minHeight?: DimensionValue | undefined; + minWidth?: DimensionValue | undefined; + outlineOffset?: NumberOrString | undefined; + outlineStyle?: string | undefined; + outlineWidth?: NumberOrString | undefined; + overflow?: OverflowValue | undefined; + padding?: DimensionValue | undefined; + paddingBlock?: DimensionValue | undefined; + paddingBlockEnd?: DimensionValue | undefined; + paddingBlockStart?: DimensionValue | undefined; + paddingBottom?: DimensionValue | undefined; + paddingEnd?: DimensionValue | undefined; + paddingHorizontal?: DimensionValue | undefined; + paddingInline?: DimensionValue | undefined; + paddingInlineEnd?: DimensionValue | undefined; + paddingInlineStart?: DimensionValue | undefined; + paddingLeft?: DimensionValue | undefined; + paddingRight?: DimensionValue | undefined; + paddingStart?: DimensionValue | undefined; + paddingTop?: DimensionValue | undefined; + paddingVertical?: DimensionValue | undefined; + position?: + 'absolute' | 'fixed' | 'relative' | 'static' | 'sticky' | undefined; + right?: DimensionValue | undefined; + start?: DimensionValue | undefined; + top?: DimensionValue | undefined; + userSelect?: 'all' | 'auto' | 'contain' | 'none' | 'text' | undefined; + width?: DimensionValue | undefined; + } +} diff --git a/packages/react-native-web/types/react-native-web.d.ts b/packages/react-native-web/types/react-native-web.d.ts new file mode 100644 index 0000000000..f193eec03b --- /dev/null +++ b/packages/react-native-web/types/react-native-web.d.ts @@ -0,0 +1,114 @@ +import type { ComponentType, ReactElement, ReactNode } from 'react'; +import type { Root } from 'react-dom/client'; +import type { + AppRegistry as AppRegistryRN, + StyleSheet as StyleSheetRN +} from 'react-native'; + +export { + findNodeHandle, + processColor, + NativeModules, + AccessibilityInfo, + Alert, + Animated, + Appearance, + AppState, + AssetRegistry, + BackHandler, + Clipboard, + Dimensions, + Easing, + I18nManager, + Keyboard, + LayoutAnimation, + Linking, + NativeEventEmitter, + PanResponder, + PixelRatio, + Platform, + Share, + UIManager, + Vibration, + ActivityIndicator, + Button, + FlatList, + Image, + ImageBackground, + InputAccessoryView, + KeyboardAvoidingView, + Modal, + Pressable, + RefreshControl, + SafeAreaView, + ScrollView, + SectionList, + StatusBar, + Switch, + Text, + TextInput, + TouchableHighlight, + TouchableNativeFeedback, + TouchableOpacity, + TouchableWithoutFeedback, + View, + VirtualizedList, + LogBox, + DeviceEventEmitter, + useColorScheme, + useWindowDimensions +} from 'react-native'; + +// See src/exports/AppRegistry/renderApplication.js +type Application = { unmount(): void }; + +export const AppRegistry: Pick< + typeof AppRegistryRN, + | 'getAppKeys' + | 'registerComponent' + | 'registerConfig' + | 'registerRunnable' + | 'setComponentProviderInstrumentationHook' + | 'setWrapperComponentProvider' +> & { + unmountApplicationComponentAtRootTag(rootTag: Application): void; + runApplication( + appKey: string, + appParameters: { + rootTag: Element; + initialProps?: object; + hydrate?: boolean; + callback?: () => void; + } + ): Application; + getApplication( + appKey: string, + appParameters?: { initialProps?: object } + ): { + element: ReactElement; + getStyleElement: (props?: object) => ReactElement; + }; +}; + +// See src/exports/StyleSheet/index.js +export const StyleSheet: Omit< + typeof StyleSheetRN, + 'setStyleAttributePreprocessor' +> & { + getSheet(): { id: string; textContent: string }; +}; + +export function render(element: ReactNode, root: Element): Root; + +export function unmountComponentAtNode(root: Root): boolean; + +export function unstable_createElement( + component: string | ComponentType, + props?: object, + options?: object +): ReactElement; + +export function useLocaleContext(): { + direction: 'ltr' | 'rtl'; + locale: string | null | undefined; +}; diff --git a/react-native-web.code-workspace b/react-native-web.code-workspace new file mode 100644 index 0000000000..0b75c70a49 --- /dev/null +++ b/react-native-web.code-workspace @@ -0,0 +1,16 @@ +{ + "folders": [{ "path": "." }], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + "flowtype.flow-for-vscode" + ] + }, + "settings": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true, + "flow.pathToFlow": "${workspaceFolder}/node_modules/.bin/flow", + "js/ts.validate.enabled": false + } +} diff --git a/scripts/createBabelReactNativeWebModuleMap.js b/scripts/createBabelReactNativeWebModuleMap.js deleted file mode 100644 index d0910e8be4..0000000000 --- a/scripts/createBabelReactNativeWebModuleMap.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Creates a map of exported modules, allowing the RNW babel plugin to rewrite - * paths only for modules it knows are exported by RNW. - */ -const fs = require('fs'); -const path = require('path'); - -const isDirectory = (source) => fs.lstatSync(source).isDirectory(); -const getDirectories = (source) => - fs.readdirSync(source).filter((name) => isDirectory(path.join(source, name))); - -const packagesDir = path.join(__dirname, '../packages/'); -const exportsDir = path.join(packagesDir, 'react-native-web/src/exports'); -const moduleMapOutfile = path.join( - packagesDir, - 'babel-plugin-react-native-web/src/moduleMap.js' -); - -const moduleMap = getDirectories(exportsDir).reduce((acc, curr) => { - acc[curr] = true; - return acc; -}, {}); - -const data = `// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. -module.exports = ${JSON.stringify(moduleMap, null, 2)}`; - -fs.writeFileSync(moduleMapOutfile, data); diff --git a/scripts/createInlineStylePrefixerData.js b/scripts/createInlineStylePrefixerData.js deleted file mode 100644 index 2e134c6d48..0000000000 --- a/scripts/createInlineStylePrefixerData.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -const generator = require('inline-style-prefixer/lib/generator').default; -const path = require('path'); - -const browserList = { - and_chr: 49, - chrome: 49, - edge: 79, - firefox: 52, - ios_saf: 11, - opera: 50, - safari: 11 -}; - -generator(browserList, { - path: path.join( - __dirname, - '../packages/react-native-web/src/modules/prefixStyles/static.js' - ) -}); diff --git a/scripts/createModuleMap.js b/scripts/createModuleMap.js new file mode 100644 index 0000000000..411cd94f28 --- /dev/null +++ b/scripts/createModuleMap.js @@ -0,0 +1,51 @@ +/** + * Creates a map of exported modules, allowing the RNW babel plugin to rewrite + * paths only for modules it knows are exported by RNW. + * + * By default, exits with an error if the file is not up to date. + * With --write, updates the file. + */ +import fs from 'node:fs'; +import path from 'node:path'; + +const isDirectory = (source) => fs.lstatSync(source).isDirectory(); + +const getDirectories = (source) => + fs.readdirSync(source).filter((name) => isDirectory(path.join(source, name))); + +const packagesDir = path.join(import.meta.dirname, '../packages/'); +const exportsDir = path.join(packagesDir, 'react-native-web/src/exports'); +const identifierRegex = /^[A-Za-z_$][\w$]*$/; + +const moduleMapOutfile = path.join( + packagesDir, + 'babel-plugin-react-native-web/src/moduleMap.js' +); + +const moduleMapEntries = getDirectories(exportsDir) + .map((name) => { + return ` ${ + identifierRegex.test(name) ? name : `'${name.replace(/[\\']/g, '\\$&')}'` + }: true`; + }) + .join(',\n'); + +const moduleMapData = `// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. +module.exports = { +${moduleMapEntries} +}; +`; + +if (process.argv.includes('--write')) { + fs.writeFileSync(moduleMapOutfile, moduleMapData); +} else if ( + !fs.existsSync(moduleMapOutfile) || + fs.readFileSync(moduleMapOutfile, 'utf-8') !== moduleMapData +) { + console.error( + `${path.relative(process.cwd(), moduleMapOutfile)} is not up to date.` + ); + + console.error('Run `npm run module-map` and stage the changes.'); + process.exit(1); +} diff --git a/scripts/releaseReactNativeWebPackages.js b/scripts/releasePackages.js similarity index 59% rename from scripts/releaseReactNativeWebPackages.js rename to scripts/releasePackages.js index f051b49e69..017735fe48 100644 --- a/scripts/releaseReactNativeWebPackages.js +++ b/scripts/releasePackages.js @@ -1,36 +1,48 @@ #!/usr/bin/env node -'use strict'; +import { execSync } from 'node:child_process'; +import fs from 'node:fs'; +import path from 'node:path'; +import { parseArgs } from 'node:util'; +import packageJson from '../package.json' with { type: 'json' }; -const execSync = require('child_process').execSync; -const fs = require('fs'); -const glob = require('glob'); -const minimist = require('minimist'); -const path = require('path'); +const { positionals, values } = parseArgs({ + allowPositionals: true, + options: { + 'skip-git': { type: 'boolean', default: false }, + otp: { type: 'string' } + } +}); -const args = process.argv.slice(2); -const argv = minimist(args); +const version = positionals[0]; +const skipGit = values['skip-git']; +const oneTimeCode = values.otp; -const version = argv._[0]; -const skipGit = argv['skip-git']; -const oneTimeCode = argv.otp; +if (version == null || oneTimeCode == null) { + console.error('Usage: npm run release --otp [--skip-git]'); + process.exit(1); +} + +try { + execSync('npm whoami', { stdio: 'ignore' }); +} catch { + console.error('You must be logged in to npm. Run `npm login` first.'); + process.exit(1); +} console.log(`Publishing react-native-web@${version}`); // Collect 'react-native-web' workspaces and package manifests -const workspacePaths = require('../package.json').workspaces.reduce( - (acc, w) => { - const resolvedPaths = glob.sync(w); - resolvedPaths.forEach((p) => { - // Remove duplicates and unrelated packages - if (p.includes('react-native-web') && acc.indexOf(p) === -1) { - acc.push(p); - } - }); - return acc; - }, - [] -); +const workspacePaths = packageJson.workspaces.reduce((acc, w) => { + const resolvedPaths = fs.globSync(w); + resolvedPaths.forEach((p) => { + // Remove duplicates and unrelated packages + if (p.includes('react-native-web') && acc.indexOf(p) === -1) { + acc.push(p); + } + }); + return acc; +}, []); const workspaces = workspacePaths.map((dir) => { const directory = path.resolve(dir);