diff --git a/.circleci/config.yml b/.circleci/config.yml index 05cc3abd94bc..532a93a8a44f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -59,13 +59,6 @@ commands: description: 'Set to true if you intend to any browser (for example with playwright).' steps: - - run: - name: Resolve React version - command: | - node scripts/useReactVersion.mjs - # log a patch for maintainers who want to check out this change - git --no-pager diff HEAD - - when: condition: << parameters.browsers >> steps: @@ -97,16 +90,14 @@ commands: pnpm --version - run: name: Install js dependencies + command: pnpm install + + - run: + name: Resolve React version command: | - echo "React version $REACT_VERSION" - if [ $REACT_VERSION == "stable" ]; - then - echo "pnpm install" - pnpm install - else - echo "pnpm install --no-frozen-lockfile" - pnpm install --no-frozen-lockfile - fi + pnpm use-react-version + # log a patch for maintainers who want to check out this change + git --no-pager diff HEAD - when: condition: << parameters.browsers >> @@ -134,7 +125,8 @@ jobs: - run: name: '`pnpm dedupe` was run?' command: | - if [[ $(git diff --name-status next | grep pnpm-lock) == "" ]]; + # #default-branch-switch + if [[ $(git diff --name-status master | grep pnpm-lock) == "" ]]; then echo "No changes to dependencies detected. Skipping..." else @@ -145,9 +137,6 @@ jobs: steps: - checkout - install_js - - run: - name: Tests charts - command: pnpm test:charts:unit # Run special test for charts due to ESM compatibility issue - run: name: Tests fake browser command: pnpm test:coverage @@ -185,7 +174,14 @@ jobs: - install_js - run: name: '`pnpm prettier` changes committed?' - command: pnpm prettier --check + command: | + # #default-branch-switch + if [[ $(git diff --name-status master | grep pnpm-lock) == "" ]]; + then + pnpm prettier --check + else + pnpm prettier:check + fi - run: name: Generate PropTypes command: pnpm proptypes @@ -213,6 +209,18 @@ jobs: command: | pnpm docs:link-check git add -A && git diff --exit-code --staged + - run: + name: '`pnpm @mui/x-charts-vendor build` was run?' + command: | + # #default-branch-switch + if [[ $(git diff --name-status master | grep pnpm-lock) == "" ]]; + then + echo "No changes to dependencies detected. Skipping..." + else + pnpm --filter @mui/x-charts-vendor build + git add -A && git diff --exit-code --staged + fi + test_browser: <<: *default-job docker: diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index 2bcfb7926690..f709cfa8489c 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -11,6 +11,7 @@ "packages/x-date-pickers", "packages/x-date-pickers-pro", "packages/x-charts", + "packages/x-charts-vendor", "packages/x-tree-view", "packages/x-internals" ], @@ -23,6 +24,7 @@ "@mui/x-date-pickers": "packages/x-date-pickers/build", "@mui/x-date-pickers-pro": "packages/x-date-pickers-pro/build", "@mui/x-charts": "packages/x-charts/build", + "@mui/x-charts-vendor": "packages/x-charts-vendor", "@mui/x-charts-pro": "packages/x-charts-pro/build", "@mui/x-tree-view": "packages/x-tree-view/build", "@mui/x-tree-view-pro": "packages/x-tree-view-pro/build", diff --git a/.eslintignore b/.eslintignore index e4429ac6dfba..cfe3e6dc2580 100644 --- a/.eslintignore +++ b/.eslintignore @@ -6,7 +6,9 @@ netlify/functions /docs/pages/playground/ /lerna.json /packages/x-codemod/src/**/*.spec.js +/packages/x-charts-vendor build +/coverage CHANGELOG.md dist node_modules diff --git a/.github/ISSUE_TEMPLATE/1.bug.yml b/.github/ISSUE_TEMPLATE/1.bug.yml index 9f824d1be7f6..f450370788a1 100644 --- a/.github/ISSUE_TEMPLATE/1.bug.yml +++ b/.github/ISSUE_TEMPLATE/1.bug.yml @@ -1,6 +1,6 @@ name: Bug report 🐛 description: Create a bug report for MUI X. -labels: ['status: waiting for maintainer'] +labels: ['status: waiting for maintainer', 'bug 🐛'] body: - type: markdown attributes: @@ -20,6 +20,16 @@ body: options: - label: I have tested the latest version required: true + - type: dropdown + attributes: + label: Affected products + description: Which products are affected by this issue? If you're not sure, leave this blank. + multiple: true + options: + - Data Grid + - Date and Time Pickers + - Charts + - Tree View - type: textarea attributes: label: Steps to reproduce diff --git a/.github/ISSUE_TEMPLATE/2.feature.yml b/.github/ISSUE_TEMPLATE/2.feature.yml index ea6b42d11ab9..cb1ada6dc465 100644 --- a/.github/ISSUE_TEMPLATE/2.feature.yml +++ b/.github/ISSUE_TEMPLATE/2.feature.yml @@ -1,6 +1,6 @@ name: Feature request 💄 description: Suggest a new idea for MUI X. -labels: ['status: waiting for maintainer'] +labels: ['status: waiting for maintainer', 'new feature'] body: - type: markdown attributes: diff --git a/.github/ISSUE_TEMPLATE/3.pro-support.yml b/.github/ISSUE_TEMPLATE/3.pro-support.yml index e660e745d7b9..5c240d8e03c5 100644 --- a/.github/ISSUE_TEMPLATE/3.pro-support.yml +++ b/.github/ISSUE_TEMPLATE/3.pro-support.yml @@ -32,6 +32,16 @@ body: options: - label: I have tested the latest version required: true + - type: dropdown + attributes: + label: Affected products + description: Which products are affected by this issue? If you're not sure, leave this blank. + multiple: true + options: + - Data Grid + - Date and Time Pickers + - Charts + - Tree View - type: textarea attributes: label: The problem in depth diff --git a/.github/ISSUE_TEMPLATE/4.premium-support.yml b/.github/ISSUE_TEMPLATE/4.premium-support.yml index b4a524402c27..3cecec347296 100644 --- a/.github/ISSUE_TEMPLATE/4.premium-support.yml +++ b/.github/ISSUE_TEMPLATE/4.premium-support.yml @@ -32,6 +32,16 @@ body: options: - label: I have tested the latest version required: true + - type: dropdown + attributes: + label: Affected products + description: Which products are affected by this issue? If you're not sure, leave this blank. + multiple: true + options: + - Data Grid + - Date and Time Pickers + - Charts + - Tree View - type: textarea attributes: label: The problem in depth diff --git a/.github/ISSUE_TEMPLATE/5.priority-support.yml b/.github/ISSUE_TEMPLATE/5.priority-support.yml index e9deef0e72c6..ebba6002eaa1 100644 --- a/.github/ISSUE_TEMPLATE/5.priority-support.yml +++ b/.github/ISSUE_TEMPLATE/5.priority-support.yml @@ -22,6 +22,16 @@ body: options: - label: I have tested the latest version required: true + - type: dropdown + attributes: + label: Affected products + description: Which products are affected by this issue? If you're not sure, leave this blank. + multiple: true + options: + - Data Grid + - Date and Time Pickers + - Charts + - Tree View - type: textarea attributes: label: The problem in depth diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index ab6b43ed33fa..38ce7892b350 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12 + uses: github/codeql-action/init@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15 with: languages: typescript # If you wish to specify custom queries, you can do so here or in a config file. @@ -29,4 +29,4 @@ jobs: # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs # queries: security-extended,security-and-quality - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12 + uses: github/codeql-action/analyze@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15 diff --git a/.github/workflows/codspeed.yml b/.github/workflows/codspeed.yml new file mode 100644 index 000000000000..bfd31d7482a8 --- /dev/null +++ b/.github/workflows/codspeed.yml @@ -0,0 +1,54 @@ +name: Benchmarks + +on: + push: + branches: + - 'master' + - 'next' + paths: + - 'packages/x-charts*/**' + pull_request: + types: + - labeled + - opened + - synchronize + - reopened + branches: + - 'master' + - 'next' + +jobs: + benchmarks: + name: Benchmarks Charts + runs-on: ubuntu-latest + # L1: Run the benchmarks for pushes to the master or next branch and if the changes are in the charts package based on on.push.paths + # L2: Run the benchmarks if we add the label 'component: charts' to the pull request + # L3: Run the benchmarks for pull requests with the label 'component: charts' + # Yaml syntax looks a little weird, but it is correct. + if: >- + ${{ + (github.event_name == 'push') || + (github.event_name == 'pull_request' && github.event.action == 'labeled' && github.event.label.name == 'component: charts') || + (github.event_name == 'pull_request' && github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'component: charts')) + }} + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 + with: + run_install: false + - name: Use Node.js 20.x + uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 + with: + node-version: 20 + cache: 'pnpm' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-dependencies + - run: pnpm install --frozen-lockfile + # Ensure we are running on the prod version of our libs + # Only charts and license are needed for the benchmarks + - run: pnpm --filter @mui/x-license build + - run: pnpm --filter @mui/x-charts build + - run: pnpm --filter @mui/x-charts-pro build + - name: Run benchmarks + uses: CodSpeedHQ/action@a58b84c0b61569a9cbb7cfb378cc849d65cf1ce5 + with: + run: pnpm --filter @mui-x-internal/performance-charts test:performance + token: ${{ secrets.CODSPEED_TOKEN }} diff --git a/.github/workflows/issue-cleanup.yml b/.github/workflows/issue-cleanup.yml index 0da67dc0a803..a4d8839b60aa 100644 --- a/.github/workflows/issue-cleanup.yml +++ b/.github/workflows/issue-cleanup.yml @@ -1,4 +1,4 @@ -name: Cleanup issue comment +name: Issue cleanup on: issues: @@ -10,43 +10,26 @@ permissions: {} jobs: issue_cleanup: runs-on: ubuntu-latest + name: Clean issue body and add support label permissions: issues: write steps: - - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7 + - name: Checkout repository + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - name: Clean issue body + id: cleanup + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: script: | - const issue = await github.rest.issues.get({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - }) - - const lines = issue.data.body.split('\n') - - const _ = extractInputSection(lines, 'Latest version') - const searchKeywords = extractInputSection(lines, 'Search keywords') - const orderID = extractInputSection(lines, 'Order ID or Support key') - - lines.push('') - lines.push('**Search keywords**: ' + searchKeywords) - if (orderID !== '' && orderID !== '_No response_') { - lines.push('**Order ID**: ' + orderID) - } - - const body = lines.join('\n') - - await github.rest.issues.update({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - body, - }) - - function extractInputSection(lines, title) { - const index = lines.findIndex(line => line.startsWith('###') && line.includes(title)) - if (index === -1) { - return '' - } - return lines.splice(index, 4)[2].trim() - } + const script = require('./scripts/githubActions/issueBodyCleanup.js') + await script({core, github, context}) + - name: Add support label + if: steps.cleanup.outputs.ORDER_ID != '' + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 + with: + script: | + const script = require('./scripts/githubActions/orderIdValidation.js') + await script({core, github, context}) + env: + ORDER_API_TOKEN: ${{ secrets.SHOP_AUTH_TOKEN }} + ORDER_ID: ${{ steps.cleanup.outputs.ORDER_ID }} diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml index fbba1f5db7c4..e04f536c60ad 100644 --- a/.github/workflows/scorecards.yml +++ b/.github/workflows/scorecards.yml @@ -28,7 +28,7 @@ jobs: persist-credentials: false - name: Run analysis - uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3 + uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0 with: results_file: results.sarif results_format: sarif @@ -44,6 +44,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: Upload to code-scanning - uses: github/codeql-action/upload-sarif@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12 + uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15 with: sarif_file: results.sarif diff --git a/.gitignore b/.gitignore index ca6bf0461cd6..c35b8143932a 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ performance-snapshot.json .github/styles/Google .github/styles/MUI .github/styles/.vale-config +test-results \ No newline at end of file diff --git a/.mocharc.js b/.mocharc.js index e45e0484ca48..3f1b312f2f7c 100644 --- a/.mocharc.js +++ b/.mocharc.js @@ -7,9 +7,6 @@ module.exports = { // Mocha seems to ignore .next anyway (maybe because dotfiles?). // We're leaving this to make sure. 'docs/.next/**', - // x-charts requires 'tsx/cjs' which conflict with the babel date-fns override for picker tests - 'packages/x-charts/**', - 'packages/x-charts-pro/**', ], recursive: true, timeout: (process.env.CIRCLECI === 'true' ? 5 : 2) * 1000, // Circle CI has low-performance CPUs. diff --git a/CHANGELOG.md b/CHANGELOG.md index d53ac8519095..a3f3d899b88a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,90 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## 7.11.1 + +_Jul 25, 2024_ + +We'd like to offer a big thanks to the 18 contributors who made this release possible. Here are some highlights ✨: + +- 🔎 Allow `Zoom` to be controllable for charts (#13858) @JCQuintas +- 🌍 Add Icelandic (is-IS) and Norwegian Nynorsk (nn-NO) locales on the Data Grid +- 🌍 Improve Norwegian Bokmål (nb-NO) and German (de-DE) locales on the Data Grid +- 🌍 Add Norwegian Nynorsk (nn-NO) locale on the Date and Time Pickers +- 🐞 Bugfixes +- 📚 Documentation improvements + + + +### Data Grid + +#### `@mui/x-data-grid@7.11.1` + +- [DataGrid] Remove dead code in internal `GridPreferencesPanel` (#13934) @k-rajat19 +- [DataGrid] Do not miss to escape formulas in CSV export (#13888) @arminmeh +- [l10n] Add Icelandic (is-IS) locale (#13283) @magnimarels +- [l10n] Add Norwegian nynorsk (nn-NO) locale and improve Norwegian bokmål (nb-NO) locale (#13588) @AnderzL7 +- [l10n] Improve German (de-DE) locale (#13910) @lhilgert9 + +#### `@mui/x-data-grid-pro@7.11.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan') + +Same changes as in `@mui/x-data-grid@7.11.1`. + +#### `@mui/x-data-grid-premium@7.11.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan') + +Same changes as in `@mui/x-data-grid-pro@7.11.1`, plus: + +- [DataGridPremium] Pass the `api` object to events (#13893) @pcorpet +- [DataGridPremium] Fix paste to selected cells (#13967) @romgrk + +### Date and Time Pickers + +#### `@mui/x-date-pickers@7.11.1` + +- [fields] Prevent keyboard editing when disabled (#13900) @arthurbalduini +- [l10n] Add Norwegian Nynorsk (nn-NO) locale (#13946) @AnderzL7 + +#### `@mui/x-date-pickers-pro@7.11.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan') + +Same changes as in `@mui/x-date-pickers@7.11.1`. + +### Charts + +#### `@mui/x-charts@7.11.1` + +- [charts] Add `ownerState` function to `slotProps` typing when available (#13965) @alexfauquette +- [charts] Allow `Zoom` to be controllable (#13858) @JCQuintas +- [charts] Deprecate `xAxisKey` /`zAxisKey` in favor of `xAxisId`/`zAxisId` (#13940) @alexfauquette +- [charts] Hide empty arcs in the PieChart (#13897) @alexfauquette +- [charts] Limit the trigger of exit charts (#13682) @alexfauquette + +### Tree View + +#### `@mui/x-tree-view@7.11.1` + +- [TreeView] Allow the plugins to enrich the props passed to the item slots (#13953) @flaviendelangle + +### Docs + +- [docs] Bump pnpm priority as a package manager (#13894) @oliviertassinari +- [docs] Explicitly mark charts pro as not released (#13905) @alexfauquette +- [docs] Fix dot consistency a11y table @oliviertassinari +- [docs] Fix some typos in charts docs (#13906) @cratiu222 +- [docs] Fix spelling (#13902) @nnsW3 +- [docs] Improve error message when moving between plans (#13874) @oliviertassinari +- [docs] Update `SparkLineChart` reference not being correctly capitalised (#13960) @duckboy81 +- [docs] Fix scroll demos disorientation (#13909) @oliviertassinari + +### Core + +- [core] Add `@mui/material-nextjs` to `MUI Core` renovate group (#13966) @LukasTy +- [core] Remove warning message in production (#13911) @oliviertassinari +- [code-infra] Reuse `useReactVersion` script from the monorepo (#13710) @cherniavskii +- [infra] Adds order id validation action (#13957) @michelengelen +- [infra] Fix order id validator action (#13971) @michelengelen +- [infra] Fix regex in order id validation (#13976) @michelengelen +- [infra] Issue template improvement (#13954) @michelengelen + ## 7.11.0 _Jul 18, 2024_ @@ -59,8 +143,8 @@ Same changes as in `@mui/x-date-pickers@7.11.0`, plus: - [charts] Defaultize axis on top level `useChartContainerProps` (#13817) @JCQuintas - [charts] Fix charts not passing `className` to root element (#13647) @JCQuintas - [charts] Generate API documentation for pro components (#13822) @alexfauquette -- [charts] Improve zoomed highlight behaviour (unreleased) (#13868) @JCQuintas -- [charts] Allow zoom on Y axis and add zoom options to configure zooming behaviour (unreleased) (#13726) @JCQuintas +- [charts] Improve zoomed highlight behavior (unreleased) (#13868) @JCQuintas +- [charts] Allow zoom on Y axis and add zoom options to configure zooming behavior (unreleased) (#13726) @JCQuintas - [charts] Disable animations while zooming (unreleased) (#13807) @JCQuintas ### Tree View @@ -533,7 +617,7 @@ Same changes as in `@mui/x-date-pickers@7.6.2`. #### `@mui/x-charts@7.6.2` -- [charts] Add `Initializable` type and behaviour to allow checking if a complex context has been initialized. (#13365) @JCQuintas +- [charts] Add `Initializable` type and behavior to allow checking if a complex context has been initialized. (#13365) @JCQuintas - [charts] Fix some props not working in `xAxis` and `yAxis` (#13372) @Valyok26 - [charts] Harmonize charts types (#13366) @alexfauquette - [charts] Introduce plugins system (#13367) @alexfauquette @@ -541,7 +625,7 @@ Same changes as in `@mui/x-date-pickers@7.6.2`. ### Docs -- [docs] Add badges like in Material UI @oliviertassinari +- [docs] Add badges like in Material UI @oliviertassinari - [docs] Update twitter.com to x.com @oliviertassinari - [docs] Fix the description of `tickInterval` (#13355) @alexfauquette - [docs] Adjust the code example for `quickFilterValues` (#12919) @michelengelen diff --git a/babel.config.js b/babel.config.js index 9e2bc852d0ed..4d49a519eca6 100644 --- a/babel.config.js +++ b/babel.config.js @@ -16,6 +16,7 @@ const defaultAlias = { '@mui/x-date-pickers-pro': resolveAliasPath('./packages/x-date-pickers-pro/src'), '@mui/x-charts': resolveAliasPath('./packages/x-charts/src'), '@mui/x-charts-pro': resolveAliasPath('./packages/x-charts-pro/src'), + '@mui/x-charts-vendor': resolveAliasPath('./packages/x-charts-vendor'), '@mui/x-tree-view': resolveAliasPath('./packages/x-tree-view/src'), '@mui/x-tree-view-pro': resolveAliasPath('./packages/x-tree-view-pro/src'), '@mui/x-internals': resolveAliasPath('./packages/x-internals/src'), diff --git a/codecov.yml b/codecov.yml index 426667acdf10..4a05503c5b9e 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,4 +1,7 @@ coverage: + ignore: + - 'packages/x-charts-vendor' + - '**/*.test.tsx' status: project: default: @@ -16,8 +19,6 @@ coverage: - 'packages/x-date-pickers/src/AdapterMoment/AdapterMoment.ts' - 'packages/x-date-pickers/src/AdapterMomentHijri/AdapterMomentHijri.ts' - 'packages/x-date-pickers/src/AdapterMomentJalaali/AdapterMomentJalaali.ts' - ignore: - - '**/*.test.tsx' patch: off comment: false diff --git a/docs/data/charts/axis/AxisWithComposition.js b/docs/data/charts/axis/AxisWithComposition.js index 71a2a507fe90..647925c7c762 100644 --- a/docs/data/charts/axis/AxisWithComposition.js +++ b/docs/data/charts/axis/AxisWithComposition.js @@ -24,19 +24,19 @@ export default function AxisWithComposition() { { type: 'line', id: 'revenue', - yAxisKey: 'money', + yAxisId: 'money', data: [5645, 7542, 9135, 12221], }, { type: 'bar', id: 'cookies', - yAxisKey: 'quantities', + yAxisId: 'quantities', data: [3205, 2542, 3135, 8374], }, { type: 'bar', id: 'icecream', - yAxisKey: 'quantities', + yAxisId: 'quantities', data: [1645, 5542, 5146, 3735], }, ]} diff --git a/docs/data/charts/axis/AxisWithComposition.tsx b/docs/data/charts/axis/AxisWithComposition.tsx index 71a2a507fe90..647925c7c762 100644 --- a/docs/data/charts/axis/AxisWithComposition.tsx +++ b/docs/data/charts/axis/AxisWithComposition.tsx @@ -24,19 +24,19 @@ export default function AxisWithComposition() { { type: 'line', id: 'revenue', - yAxisKey: 'money', + yAxisId: 'money', data: [5645, 7542, 9135, 12221], }, { type: 'bar', id: 'cookies', - yAxisKey: 'quantities', + yAxisId: 'quantities', data: [3205, 2542, 3135, 8374], }, { type: 'bar', id: 'icecream', - yAxisKey: 'quantities', + yAxisId: 'quantities', data: [1645, 5542, 5146, 3735], }, ]} diff --git a/docs/data/charts/axis/ReverseExampleNoSnap.js b/docs/data/charts/axis/ReverseExampleNoSnap.js index 4a948a496aab..146d418d133e 100644 --- a/docs/data/charts/axis/ReverseExampleNoSnap.js +++ b/docs/data/charts/axis/ReverseExampleNoSnap.js @@ -30,7 +30,7 @@ const dataset = [ const series = [ { type: 'line', dataKey: 'min', color: '#577399' }, { type: 'line', dataKey: 'max', color: '#fe5f55' }, - { type: 'bar', dataKey: 'precip', color: '#bfdbf7', yAxisKey: 'rightAxis' }, + { type: 'bar', dataKey: 'precip', color: '#bfdbf7', yAxisId: 'rightAxis' }, ]; export default function ReverseExampleNoSnap() { diff --git a/docs/data/charts/axis/ScaleExample.js b/docs/data/charts/axis/ScaleExample.js index 0dabe97ff559..3220698ae60b 100644 --- a/docs/data/charts/axis/ScaleExample.js +++ b/docs/data/charts/axis/ScaleExample.js @@ -14,8 +14,8 @@ export default function ScaleExample() { { id: 'logAxis', scaleType: 'log' }, ]} series={[ - { yAxisKey: 'linearAxis', data: sample, label: 'linear' }, - { yAxisKey: 'logAxis', data: sample, label: 'log' }, + { yAxisId: 'linearAxis', data: sample, label: 'linear' }, + { yAxisId: 'logAxis', data: sample, label: 'log' }, ]} leftAxis="linearAxis" rightAxis="logAxis" diff --git a/docs/data/charts/axis/ScaleExample.tsx b/docs/data/charts/axis/ScaleExample.tsx index 0dabe97ff559..3220698ae60b 100644 --- a/docs/data/charts/axis/ScaleExample.tsx +++ b/docs/data/charts/axis/ScaleExample.tsx @@ -14,8 +14,8 @@ export default function ScaleExample() { { id: 'logAxis', scaleType: 'log' }, ]} series={[ - { yAxisKey: 'linearAxis', data: sample, label: 'linear' }, - { yAxisKey: 'logAxis', data: sample, label: 'log' }, + { yAxisId: 'linearAxis', data: sample, label: 'linear' }, + { yAxisId: 'logAxis', data: sample, label: 'log' }, ]} leftAxis="linearAxis" rightAxis="logAxis" diff --git a/docs/data/charts/axis/ScaleExample.tsx.preview b/docs/data/charts/axis/ScaleExample.tsx.preview index d9b761353ed0..e6f1a6c469b5 100644 --- a/docs/data/charts/axis/ScaleExample.tsx.preview +++ b/docs/data/charts/axis/ScaleExample.tsx.preview @@ -5,8 +5,8 @@ { id: 'logAxis', scaleType: 'log' }, ]} series={[ - { yAxisKey: 'linearAxis', data: sample, label: 'linear' }, - { yAxisKey: 'logAxis', data: sample, label: 'log' }, + { yAxisId: 'linearAxis', data: sample, label: 'linear' }, + { yAxisId: 'logAxis', data: sample, label: 'log' }, ]} leftAxis="linearAxis" rightAxis="logAxis" diff --git a/docs/data/charts/axis/axis.md b/docs/data/charts/axis/axis.md index 1aa0b424bfea..e415596c2583 100644 --- a/docs/data/charts/axis/axis.md +++ b/docs/data/charts/axis/axis.md @@ -20,9 +20,8 @@ Those props expect an array of objects. Here is a demonstration with two lines with the same data. But one uses a linear, and the other a log axis. - Each axis definition is identified by its property `id`. -And series specify the axis they use with `xAxisKey` and `yAxisKey` properties. +Then each series specifies the axis they use with the `xAxisId` and `yAxisId` properties. {{"demo": "ScaleExample.js"}} @@ -30,9 +29,9 @@ And series specify the axis they use with `xAxisKey` and `yAxisKey` properties. The management of those ids is for advanced use cases, such as charts with multiple axes. Or customized axes. -If you do not provide a `xAxisKey` or `yAxisKey`, the series will use the first axis defined. +If you do not provide a `xAxisId` or `yAxisId`, the series will use the first axis defined. -That's why in most of the demonstrations with single x and y axis you will not see definitions of axis `id`, `xAxisKey`, or `yAxisKey`. +That's why in most of the demonstrations with single x and y axis you will not see definitions of axis `id`, `xAxisId`, or `yAxisId`. Those demonstrations use the defaultized values. ::: @@ -125,7 +124,7 @@ This number is not the exact number of ticks displayed. Thanks to d3, ticks are placed to be human-readable. For example, ticks for time axes will be placed on special values (years, days, half-days, ...). -If you set `tickNumber=5` but there are only 4 years to display in the axis, the component might chose to render ticks on the 4 years, instead of putting 5 ticks on some months. +If you set `tickNumber=5` but there are only 4 years to display in the axis, the component might choose to render ticks on the 4 years, instead of putting 5 ticks on some months. ::: As a helper, you can also provide `tickMinStep` and `tickMaxStep` which will compute `tickNumber` such that the step between two ticks respect those min/max values. diff --git a/docs/data/charts/bar-demo/BiaxialBarChart.js b/docs/data/charts/bar-demo/BiaxialBarChart.js index 22fabd88fabd..6e235d3803c9 100644 --- a/docs/data/charts/bar-demo/BiaxialBarChart.js +++ b/docs/data/charts/bar-demo/BiaxialBarChart.js @@ -24,13 +24,13 @@ export default function BiaxialBarChart() { data: pData, label: 'pv', id: 'pvId', - yAxisKey: 'leftAxisId', + yAxisId: 'leftAxisId', }, { data: uData, label: 'uv', id: 'uvId', - yAxisKey: 'rightAxisId', + yAxisId: 'rightAxisId', }, ]} xAxis={[{ data: xLabels, scaleType: 'band' }]} diff --git a/docs/data/charts/bar-demo/BiaxialBarChart.tsx b/docs/data/charts/bar-demo/BiaxialBarChart.tsx index c4ebb6453f62..97e505f00d47 100644 --- a/docs/data/charts/bar-demo/BiaxialBarChart.tsx +++ b/docs/data/charts/bar-demo/BiaxialBarChart.tsx @@ -25,14 +25,14 @@ export default function BiaxialBarChart() { label: 'pv', id: 'pvId', - yAxisKey: 'leftAxisId', + yAxisId: 'leftAxisId', }, { data: uData, label: 'uv', id: 'uvId', - yAxisKey: 'rightAxisId', + yAxisId: 'rightAxisId', }, ]} xAxis={[{ data: xLabels, scaleType: 'band' }]} diff --git a/docs/data/charts/bars/bars.md b/docs/data/charts/bars/bars.md index aa694dfc5ab8..d76e2df0bc9a 100644 --- a/docs/data/charts/bars/bars.md +++ b/docs/data/charts/bars/bars.md @@ -38,7 +38,7 @@ The ratio is obtained by dividing the size of the gap by the size of the categor The `barGapRatio` defines the gap between two bars of the same category. It's the size of the gap divided by the size of the bar. So a value of `1` will result in a gap between bars equal to the bar width. -And a value of `-1` will make bars overlap on top of each over. +And a value of `-1` will make bars overlap on top of each other. {{"demo": "BarGapNoSnap.js", "hideToolbar": true, "bg": "playground"}} @@ -155,7 +155,7 @@ Their is a slight difference between the `event` of `onItemClick` and `onAxisCli ### Composition -If you're using composition, you can get those click event as follow. +If you're using composition, you can get those click event as follows. Notice that the `onAxisClick` will handle both bar and line series if you mix them. ```jsx diff --git a/docs/data/charts/components/ScaleDemo.js b/docs/data/charts/components/ScaleDemo.js index 98a60004841c..a8abcb355339 100644 --- a/docs/data/charts/components/ScaleDemo.js +++ b/docs/data/charts/components/ScaleDemo.js @@ -103,14 +103,14 @@ export default function ScaleDemo() { { type: 'line', data: [5, 15, 20, 24, 30, 38, 40, 51, 52, 61], - yAxisKey: 'left_axis_id', + yAxisId: 'left_axis_id', }, { type: 'line', data: [ 50134, 48361, 46362, 44826, 42376, 40168, 38264, 36159, 34259, 32168, ], - yAxisKey: 'right_axis_id', + yAxisId: 'right_axis_id', }, ]} xAxis={[{ data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], scaleType: 'point' }]} diff --git a/docs/data/charts/components/ScaleDemo.tsx b/docs/data/charts/components/ScaleDemo.tsx index 2733fc28bdf7..b912d56affc2 100644 --- a/docs/data/charts/components/ScaleDemo.tsx +++ b/docs/data/charts/components/ScaleDemo.tsx @@ -103,14 +103,14 @@ export default function ScaleDemo() { { type: 'line', data: [5, 15, 20, 24, 30, 38, 40, 51, 52, 61], - yAxisKey: 'left_axis_id', + yAxisId: 'left_axis_id', }, { type: 'line', data: [ 50134, 48361, 46362, 44826, 42376, 40168, 38264, 36159, 34259, 32168, ], - yAxisKey: 'right_axis_id', + yAxisId: 'right_axis_id', }, ]} xAxis={[{ data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], scaleType: 'point' }]} diff --git a/docs/data/charts/components/components.md b/docs/data/charts/components/components.md index 1501c39b63b1..5cfff2f9f6d9 100644 --- a/docs/data/charts/components/components.md +++ b/docs/data/charts/components/components.md @@ -55,7 +55,7 @@ You don't need extra work to take into account the drawing area. #### Value to coordinate The `d3-scale` default method maps from values to coordinates. -For example, you can get the `x=0` coordinate as follow: +For example, you can get the `x=0` coordinate as follows: ```jsx const xAxisScale = useXScale(); // get the default X scale diff --git a/docs/data/charts/getting-started/Combining.js b/docs/data/charts/getting-started/Combining.js index e871e58ac92b..1b1b3cb9e714 100644 --- a/docs/data/charts/getting-started/Combining.js +++ b/docs/data/charts/getting-started/Combining.js @@ -10,18 +10,18 @@ const series = [ { type: 'bar', stack: '', - yAxisKey: 'eco', + yAxisId: 'eco', data: [2, 5, 3, 4, 1], }, { type: 'bar', stack: '', - yAxisKey: 'eco', + yAxisId: 'eco', data: [5, 6, 2, 8, 9], }, { type: 'line', - yAxisKey: 'pib', + yAxisId: 'pib', color: 'red', data: [1000, 1500, 3000, 5000, 10000], }, diff --git a/docs/data/charts/getting-started/Combining.tsx b/docs/data/charts/getting-started/Combining.tsx index 5f2a252502b8..cc183c177ca6 100644 --- a/docs/data/charts/getting-started/Combining.tsx +++ b/docs/data/charts/getting-started/Combining.tsx @@ -10,18 +10,18 @@ const series = [ { type: 'bar', stack: '', - yAxisKey: 'eco', + yAxisId: 'eco', data: [2, 5, 3, 4, 1], }, { type: 'bar', stack: '', - yAxisKey: 'eco', + yAxisId: 'eco', data: [5, 6, 2, 8, 9], }, { type: 'line', - yAxisKey: 'pib', + yAxisId: 'pib', color: 'red', data: [1000, 1500, 3000, 5000, 10000], }, diff --git a/docs/data/charts/getting-started/getting-started.md b/docs/data/charts/getting-started/getting-started.md index 7eea0dda7d14..3404ac1465d7 100644 --- a/docs/data/charts/getting-started/getting-started.md +++ b/docs/data/charts/getting-started/getting-started.md @@ -19,29 +19,33 @@ Run one of the following commands to add the MUI X Charts to your project: npm install @mui/x-charts ``` -```bash yarn -yarn add @mui/x-charts -``` - ```bash pnpm pnpm add @mui/x-charts ``` +```bash yarn +yarn add @mui/x-charts +``` + The Charts package has a peer dependency on `@mui/material`. If you are not already using it in your project, you can install it with: + ```bash npm npm install @mui/material @emotion/react @emotion/styled ``` -```bash yarn -yarn add @mui/material @emotion/react @emotion/styled -``` + ```bash pnpm pnpm add @mui/material @emotion/react @emotion/styled ``` + +```bash yarn +yarn add @mui/material @emotion/react @emotion/styled +``` + @@ -64,28 +68,23 @@ Material UI is using [Emotion](https://emotion.sh/docs/introduction) as a styli npm install @mui/styled-engine-sc styled-components ``` -```bash yarn -yarn add @mui/styled-engine-sc styled-components -``` - ```bash pnpm pnpm add @mui/styled-engine-sc styled-components ``` +```bash yarn +yarn add @mui/styled-engine-sc styled-components +``` + Take a look at the [Styled engine guide](/material-ui/integrations/styled-components/) for more information about how to configure `styled-components` as the style engine. -### Usage with Next.js - -If you're using MUI X Charts with Next.js, you might face the following error: +### Usage with D3 -```bash -[ESM][charts] Doesn't build due to require() of ES Module (ERR_REQUIRE_ESM) -``` +To help folks using CommonJS, the `@mui/x-charts` package uses a vendored package named `@mui/x-charts-vendor` to access D3 libraries. -To solve it, transpile the package by adding `transpilePackages: ['@mui/x-charts']` to your `next.config.js` file. -Visit [this GitHub issue and comment](https://github.com/mui/mui-x/issues/9826#issuecomment-1658333978) for details. +If you need some D3 functions, you can import them with `@mui/x-charts-vendor/d3-color`. ## Displaying Charts diff --git a/docs/data/charts/heatmap/heatmap.md b/docs/data/charts/heatmap/heatmap.md index fd5a059db04c..b334ca1df7d7 100644 --- a/docs/data/charts/heatmap/heatmap.md +++ b/docs/data/charts/heatmap/heatmap.md @@ -4,12 +4,15 @@ productId: x-charts components: Heatmap, HeatmapPlot, HeatmapItem, DefaultHeatmapTooltip --- -# Charts - Heatmap [](/x/introduction/licensing/#pro-plan 'Pro plan')🚧 +# Charts - Heatmap [](/x/introduction/licensing/#pro-plan 'Pro plan') 🚧

Heatmap charts visually represents data with color variations to highlight patterns and trends across two dimensions.

:::warning -The Heatmap Chart component isn't stable. Don't hesitate to open issues to give feedback. +The Heatmap Chart component is part of the pro package which is **not yet** released. + +You can test demos. +Don't hesitate to open issues to give feedback. ::: ## Basics diff --git a/docs/data/charts/legend/legend.md b/docs/data/charts/legend/legend.md index 189e8a62e475..f3042bc1a75d 100644 --- a/docs/data/charts/legend/legend.md +++ b/docs/data/charts/legend/legend.md @@ -98,7 +98,7 @@ The labels and gradient bar alignment can be modified by the `align` prop. The piecewise Legend is quite similar to the series legend. It accepts the same props for [customization](#dimensions). -The props `hideFirst` and `hideLast` allows to hide the two extreme pieces: values lower than the min threshold, and value hight than the max threshold. +The props `hideFirst` and `hideLast` allows to hide the two extreme pieces: values lower than the min threshold, and value higher than the max threshold. To override labels generated by default, provide a `labelFormatter` prop. It takes the min/max of the piece and returns the label. diff --git a/docs/data/charts/line-demo/BiaxialLineChart.js b/docs/data/charts/line-demo/BiaxialLineChart.js index e65932325993..a9350ecccf8a 100644 --- a/docs/data/charts/line-demo/BiaxialLineChart.js +++ b/docs/data/charts/line-demo/BiaxialLineChart.js @@ -19,8 +19,8 @@ export default function BiaxialLineChart() { width={500} height={300} series={[ - { data: pData, label: 'pv', yAxisKey: 'leftAxisId' }, - { data: uData, label: 'uv', yAxisKey: 'rightAxisId' }, + { data: pData, label: 'pv', yAxisId: 'leftAxisId' }, + { data: uData, label: 'uv', yAxisId: 'rightAxisId' }, ]} xAxis={[{ scaleType: 'point', data: xLabels }]} yAxis={[{ id: 'leftAxisId' }, { id: 'rightAxisId' }]} diff --git a/docs/data/charts/line-demo/BiaxialLineChart.tsx b/docs/data/charts/line-demo/BiaxialLineChart.tsx index e65932325993..a9350ecccf8a 100644 --- a/docs/data/charts/line-demo/BiaxialLineChart.tsx +++ b/docs/data/charts/line-demo/BiaxialLineChart.tsx @@ -19,8 +19,8 @@ export default function BiaxialLineChart() { width={500} height={300} series={[ - { data: pData, label: 'pv', yAxisKey: 'leftAxisId' }, - { data: uData, label: 'uv', yAxisKey: 'rightAxisId' }, + { data: pData, label: 'pv', yAxisId: 'leftAxisId' }, + { data: uData, label: 'uv', yAxisId: 'rightAxisId' }, ]} xAxis={[{ scaleType: 'point', data: xLabels }]} yAxis={[{ id: 'leftAxisId' }, { id: 'rightAxisId' }]} diff --git a/docs/data/charts/line-demo/BiaxialLineChart.tsx.preview b/docs/data/charts/line-demo/BiaxialLineChart.tsx.preview index 1dab89343d2d..017f659fda27 100644 --- a/docs/data/charts/line-demo/BiaxialLineChart.tsx.preview +++ b/docs/data/charts/line-demo/BiaxialLineChart.tsx.preview @@ -2,8 +2,8 @@ width={500} height={300} series={[ - { data: pData, label: 'pv', yAxisKey: 'leftAxisId' }, - { data: uData, label: 'uv', yAxisKey: 'rightAxisId' }, + { data: pData, label: 'pv', yAxisId: 'leftAxisId' }, + { data: uData, label: 'uv', yAxisId: 'rightAxisId' }, ]} xAxis={[{ scaleType: 'point', data: xLabels }]} yAxis={[{ id: 'leftAxisId' }, { id: 'rightAxisId' }]} diff --git a/docs/data/charts/scatter-demo/MultipleYAxesScatterChart.js b/docs/data/charts/scatter-demo/MultipleYAxesScatterChart.js index b411dfbb3072..b692685c4af6 100644 --- a/docs/data/charts/scatter-demo/MultipleYAxesScatterChart.js +++ b/docs/data/charts/scatter-demo/MultipleYAxesScatterChart.js @@ -34,12 +34,12 @@ export default function MultipleYAxesScatterChart() { series={[ { data: data1, - yAxisKey: 'leftAxis', + yAxisId: 'leftAxis', valueFormatter: ({ x, y }) => `${x}cm, ${y}kg`, }, { data: data2, - yAxisKey: 'rightAxis', + yAxisId: 'rightAxis', valueFormatter: ({ x, y }) => `${x}cm, ${y}kg`, }, ]} diff --git a/docs/data/charts/scatter-demo/MultipleYAxesScatterChart.tsx b/docs/data/charts/scatter-demo/MultipleYAxesScatterChart.tsx index 0379ec483a45..ead45453fd03 100644 --- a/docs/data/charts/scatter-demo/MultipleYAxesScatterChart.tsx +++ b/docs/data/charts/scatter-demo/MultipleYAxesScatterChart.tsx @@ -33,13 +33,13 @@ export default function MultipleYAxesScatterChart() { series={[ { data: data1, - yAxisKey: 'leftAxis', + yAxisId: 'leftAxis', valueFormatter: ({ x, y }) => `${x}cm, ${y}kg`, }, { data: data2, - yAxisKey: 'rightAxis', + yAxisId: 'rightAxis', valueFormatter: ({ x, y }) => `${x}cm, ${y}kg`, }, diff --git a/docs/data/charts/sparkline/sparkline.md b/docs/data/charts/sparkline/sparkline.md index 95269e6b588f..c85443972104 100644 --- a/docs/data/charts/sparkline/sparkline.md +++ b/docs/data/charts/sparkline/sparkline.md @@ -11,7 +11,7 @@ components: SparkLineChart ## Basics A sparkline is a small chart drawn without axes or coordinates, that presents the general shape of a variation in a simplified way. -The `` requires only the `data` props which is an array of numbers. +The `` requires only the `data` props which is an array of numbers. You can also switch from line to a bar plot with `plotType="bar"`. {{"demo": "BasicSparkLine.js"}} diff --git a/docs/data/charts/tooltip/tooltip.md b/docs/data/charts/tooltip/tooltip.md index ee43c997e6ce..4c1ddb98678f 100644 --- a/docs/data/charts/tooltip/tooltip.md +++ b/docs/data/charts/tooltip/tooltip.md @@ -1,7 +1,7 @@ --- title: Charts - Tooltip productId: x-charts -components: ChartsAxisTooltipContent, ChartsItemTooltipContent, ChartsTooltip, DefaultChartsAxisTooltipContent, DefaultChartsItemTooltipContent, ChartsAxisHighlight +components: ChartsTooltip, DefaultChartsAxisTooltipContent, DefaultChartsItemTooltipContent, ChartsAxisHighlight --- # Charts - Tooltip diff --git a/docs/data/charts/zoom-and-pan/ZoomControlled.js b/docs/data/charts/zoom-and-pan/ZoomControlled.js new file mode 100644 index 000000000000..5f214831d5ed --- /dev/null +++ b/docs/data/charts/zoom-and-pan/ZoomControlled.js @@ -0,0 +1,145 @@ +import * as React from 'react'; +import { LineChartPro } from '@mui/x-charts-pro/LineChartPro'; + +import Button from '@mui/material/Button'; + +export default function ZoomControlled() { + const [zoom, setZoom] = React.useState([ + { + axisId: 'my-x-axis', + start: 20, + end: 40, + }, + ]); + + return ( +
+ + i), + }, + ]} + /> +
+ ); +} + +const data = [ + { + y1: 443.28, + y2: 153.9, + }, + { + y1: 110.5, + y2: 217.8, + }, + { + y1: 175.23, + y2: 286.32, + }, + { + y1: 195.97, + y2: 325.12, + }, + { + y1: 351.77, + y2: 144.58, + }, + { + y1: 43.253, + y2: 146.51, + }, + { + y1: 376.34, + y2: 309.69, + }, + { + y1: 31.514, + y2: 236.38, + }, + { + y1: 231.31, + y2: 440.72, + }, + { + y1: 108.04, + y2: 20.29, + }, + { + y1: 321.77, + y2: 484.17, + }, + { + y1: 120.18, + y2: 54.962, + }, + { + y1: 366.2, + y2: 418.5, + }, + { + y1: 451.45, + y2: 181.32, + }, + { + y1: 294.8, + y2: 440.9, + }, + { + y1: 121.83, + y2: 273.52, + }, + { + y1: 287.7, + y2: 346.7, + }, + { + y1: 134.06, + y2: 74.528, + }, + { + y1: 104.5, + y2: 150.9, + }, + { + y1: 413.07, + y2: 26.483, + }, + { + y1: 74.68, + y2: 333.2, + }, + { + y1: 360.6, + y2: 422.0, + }, + { + y1: 330.72, + y2: 488.06, + }, +]; + +const chartProps = { + width: 600, + height: 300, + series: [ + { + label: 'Series A', + data: data.map((v) => v.y1), + }, + { + label: 'Series B', + data: data.map((v) => v.y2), + }, + ], +}; diff --git a/docs/data/charts/zoom-and-pan/ZoomControlled.tsx b/docs/data/charts/zoom-and-pan/ZoomControlled.tsx new file mode 100644 index 000000000000..bb17254c4e90 --- /dev/null +++ b/docs/data/charts/zoom-and-pan/ZoomControlled.tsx @@ -0,0 +1,145 @@ +import * as React from 'react'; +import { LineChartPro } from '@mui/x-charts-pro/LineChartPro'; +import { ZoomData } from '@mui/x-charts-pro/context'; +import Button from '@mui/material/Button'; + +export default function ZoomControlled() { + const [zoom, setZoom] = React.useState([ + { + axisId: 'my-x-axis', + start: 20, + end: 40, + }, + ]); + + return ( +
+ + i), + }, + ]} + /> +
+ ); +} + +const data = [ + { + y1: 443.28, + y2: 153.9, + }, + { + y1: 110.5, + y2: 217.8, + }, + { + y1: 175.23, + y2: 286.32, + }, + { + y1: 195.97, + y2: 325.12, + }, + { + y1: 351.77, + y2: 144.58, + }, + { + y1: 43.253, + y2: 146.51, + }, + { + y1: 376.34, + y2: 309.69, + }, + { + y1: 31.514, + y2: 236.38, + }, + { + y1: 231.31, + y2: 440.72, + }, + { + y1: 108.04, + y2: 20.29, + }, + { + y1: 321.77, + y2: 484.17, + }, + { + y1: 120.18, + y2: 54.962, + }, + { + y1: 366.2, + y2: 418.5, + }, + { + y1: 451.45, + y2: 181.32, + }, + { + y1: 294.8, + y2: 440.9, + }, + { + y1: 121.83, + y2: 273.52, + }, + { + y1: 287.7, + y2: 346.7, + }, + { + y1: 134.06, + y2: 74.528, + }, + { + y1: 104.5, + y2: 150.9, + }, + { + y1: 413.07, + y2: 26.483, + }, + { + y1: 74.68, + y2: 333.2, + }, + { + y1: 360.6, + y2: 422.0, + }, + { + y1: 330.72, + y2: 488.06, + }, +]; + +const chartProps = { + width: 600, + height: 300, + series: [ + { + label: 'Series A', + data: data.map((v) => v.y1), + }, + { + label: 'Series B', + data: data.map((v) => v.y2), + }, + ], +}; diff --git a/docs/data/charts/zoom-and-pan/ZoomControlled.tsx.preview b/docs/data/charts/zoom-and-pan/ZoomControlled.tsx.preview new file mode 100644 index 000000000000..443aef289aa8 --- /dev/null +++ b/docs/data/charts/zoom-and-pan/ZoomControlled.tsx.preview @@ -0,0 +1,16 @@ + + i), + }, + ]} +/> \ No newline at end of file diff --git a/docs/data/charts/zoom-and-pan/zoom-and-pan.md b/docs/data/charts/zoom-and-pan/zoom-and-pan.md index d0ef87f92662..389b055de099 100644 --- a/docs/data/charts/zoom-and-pan/zoom-and-pan.md +++ b/docs/data/charts/zoom-and-pan/zoom-and-pan.md @@ -8,6 +8,13 @@ components: ScatterChartPro, BarChartPro, LineChartPro

Enables zooming and panning on specific charts or axis.

+:::warning +The zoom feature is part of the pro package which is **not yet** released. + +You can test demos. +Don't hesitate to open issues to give feedback. +::: + Zooming is possible on the **Pro**[](/x/introduction/licensing/#pro-plan 'Pro plan') versions of the charts: ``, ``, ``. ## Basic usage @@ -26,7 +33,7 @@ The following actions are supported: {{"demo": "ZoomBarChart.js"}} {{"demo": "ZoomLineChart.js"}} -## Zooming Options +## Zooming options You can customize the zooming behavior by setting the `zoomOptions` prop. @@ -40,3 +47,18 @@ The following options are available: - **panning**: Enables or disables panning. {{"demo": "ZoomOptionsNoSnap.js", "hideToolbar": true, "bg": "playground"}} + +## Controlled zoom + +You can control the zoom state by setting the `zoom` and `onZoomChange` props. +This way, you can control the zoom state from outside the chart. + +The `onZoomChange` prop is a function that receives the new zoom state. + +While the `zoom` prop is an array of objects that define the zoom state for each axis with zoom enabled. + +- **axisId**: The id of the axis to control. +- **start**: The starting percentage of the axis range. +- **end**: The ending percentage of the zoom range. + +{{"demo": "ZoomControlled.js"}} diff --git a/docs/data/data-grid/column-definition/AutogeneratedRows.js b/docs/data/data-grid/column-definition/AutogeneratedRows.js new file mode 100644 index 000000000000..d5689bc6ecbd --- /dev/null +++ b/docs/data/data-grid/column-definition/AutogeneratedRows.js @@ -0,0 +1,56 @@ +import * as React from 'react'; +import { + DataGridPremium, + isAutogeneratedRow, + useGridApiRef, + useKeepGroupedColumnsHidden, +} from '@mui/x-data-grid-premium'; +import { useMovieData } from '@mui/x-data-grid-generator'; + +const columns = [ + { field: '__row_group_by_columns_group__', width: 200 }, + { field: 'company', width: 200 }, + { + field: 'title', + minWidth: 250, + cellClassName: 'highlighted', + valueGetter: (value, row) => { + if (isAutogeneratedRow(row)) { + return '[this is an autogenerated row]'; + } + return `title: ${value}`; + }, + }, + { field: 'year' }, +]; + +export default function AutogeneratedRows() { + const { rows } = useMovieData(); + const apiRef = useGridApiRef(); + + const initialState = useKeepGroupedColumnsHidden({ + apiRef, + initialState: { + rowGrouping: { + model: ['company'], + }, + }, + }); + + return ( +
+ +
+ ); +} diff --git a/docs/data/data-grid/column-definition/AutogeneratedRows.tsx b/docs/data/data-grid/column-definition/AutogeneratedRows.tsx new file mode 100644 index 000000000000..c58c4bf79e2d --- /dev/null +++ b/docs/data/data-grid/column-definition/AutogeneratedRows.tsx @@ -0,0 +1,57 @@ +import * as React from 'react'; +import { + DataGridPremium, + GridColDef, + isAutogeneratedRow, + useGridApiRef, + useKeepGroupedColumnsHidden, +} from '@mui/x-data-grid-premium'; +import { useMovieData } from '@mui/x-data-grid-generator'; + +const columns: GridColDef[] = [ + { field: '__row_group_by_columns_group__', width: 200 }, + { field: 'company', width: 200 }, + { + field: 'title', + minWidth: 250, + cellClassName: 'highlighted', + valueGetter: (value, row) => { + if (isAutogeneratedRow(row)) { + return '[this is an autogenerated row]'; + } + return `title: ${value}`; + }, + }, + { field: 'year' }, +]; + +export default function AutogeneratedRows() { + const { rows } = useMovieData(); + const apiRef = useGridApiRef(); + + const initialState = useKeepGroupedColumnsHidden({ + apiRef, + initialState: { + rowGrouping: { + model: ['company'], + }, + }, + }); + + return ( +
+ +
+ ); +} diff --git a/docs/data/data-grid/column-definition/AutogeneratedRows.tsx.preview b/docs/data/data-grid/column-definition/AutogeneratedRows.tsx.preview new file mode 100644 index 000000000000..36548f489011 --- /dev/null +++ b/docs/data/data-grid/column-definition/AutogeneratedRows.tsx.preview @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/docs/data/data-grid/column-definition/column-definition.md b/docs/data/data-grid/column-definition/column-definition.md index d86945322506..436ab68089fb 100644 --- a/docs/data/data-grid/column-definition/column-definition.md +++ b/docs/data/data-grid/column-definition/column-definition.md @@ -90,6 +90,11 @@ The value returned by `valueGetter` is used for: {{"demo": "ValueGetterGrid.js", "bg": "inline", "defaultCodeOpen": false}} +:::warning +`valueGetter` can be called for autogenerated rows, which are created when features like [row grouping](/x/react-data-grid/row-grouping/) or [aggregation](/x/react-data-grid/aggregation/) are used. +Read more in the [handling autogenerated rows](/x/react-data-grid/column-definition/#autogenerated-rows) section. +::: + ### Value formatter The value formatter allows you to convert the value before displaying it. @@ -103,6 +108,11 @@ and `valueFormatter` is used to display it as a percentage (for example `20%`). {{"demo": "ValueFormatterGrid.js", "bg": "inline"}} +:::warning +`valueFormatter` can be called for autogenerated rows, which are created when features like [row grouping](/x/react-data-grid/row-grouping/) or [aggregation](/x/react-data-grid/aggregation/) are used. +Read more in the [handling autogenerated rows](/x/react-data-grid/column-definition/#autogenerated-rows) section. +::: + ## Rendering cells By default, the Data Grid renders the value as a string in the cell. @@ -148,6 +158,11 @@ When using `renderCell`, if the type of the value returned by `valueGetter` does ::: +:::warning +`renderCell` can be called for autogenerated rows, which are created when features like [row grouping](/x/react-data-grid/row-grouping/) or [aggregation](/x/react-data-grid/aggregation/) are used. +Read more in the [handling autogenerated rows](/x/react-data-grid/column-definition/#autogenerated-rows) section. +::: + ### Styling cells You can check the [styling cells](/x/react-data-grid/style/#styling-cells) section for more information. @@ -317,6 +332,26 @@ In the following example, the "Delete" action opens a confirmation dialog and th Please refer to the [custom columns](/x/react-data-grid/custom-columns/) page for documentation and integration examples. +## Autogenerated rows + +Some features like [row grouping](/x/react-data-grid/row-grouping/) or [aggregation](/x/react-data-grid/aggregation/) create autogenerated rows. +These rows also call functions like `valueGetter`, `valueFormatter` and `renderCell`, and that can cause issues if you're not expecting it because the `row` parameter will be an empty object and the `value` parameter will be `undefined`. +If we take for example the movie dataset, you can detect autogenerated rows using `isAutogeneratedRow`: + +```tsx +{ + field: 'title', + valueGetter: (value, row) => { + if (isAutogeneratedRow(row)) { + return '[this is an autogenerated row]'; + } + return `title: ${value}`; + }, +} +``` + +{{"demo": "AutogeneratedRows.js", "bg": "inline", "defaultCodeOpen": false}} + ## Selectors ### Visible columns diff --git a/docs/data/data-grid/components/RowContextMenu.js b/docs/data/data-grid/components/RowContextMenu.js index 52f5ca7a5e64..30bb93043b2a 100644 --- a/docs/data/data-grid/components/RowContextMenu.js +++ b/docs/data/data-grid/components/RowContextMenu.js @@ -107,8 +107,8 @@ export default function RowContextMenu() { } slotProps={{ root: { - onContextMenu: (e) => { - e.preventDefault(); + onContextMenu: (event) => { + event.preventDefault(); handleClose(); }, }, diff --git a/docs/data/data-grid/components/RowContextMenu.tsx b/docs/data/data-grid/components/RowContextMenu.tsx index ec850af7851b..ef8dc42a3e18 100644 --- a/docs/data/data-grid/components/RowContextMenu.tsx +++ b/docs/data/data-grid/components/RowContextMenu.tsx @@ -110,8 +110,8 @@ export default function RowContextMenu() { } slotProps={{ root: { - onContextMenu: (e) => { - e.preventDefault(); + onContextMenu: (event) => { + event.preventDefault(); handleClose(); }, }, diff --git a/docs/data/data-grid/filtering-recipes/QuickFilterOutsideOfGrid.js b/docs/data/data-grid/filtering-recipes/QuickFilterOutsideOfGrid.js index 685103643c46..e1b71155c7e9 100644 --- a/docs/data/data-grid/filtering-recipes/QuickFilterOutsideOfGrid.js +++ b/docs/data/data-grid/filtering-recipes/QuickFilterOutsideOfGrid.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import { Portal } from '@mui/base/Portal'; +import Portal from '@mui/material/Portal'; import Box from '@mui/material/Box'; import Grid from '@mui/material/Grid'; import { DataGrid, GridToolbarQuickFilter, GridToolbar } from '@mui/x-data-grid'; diff --git a/docs/data/data-grid/filtering-recipes/QuickFilterOutsideOfGrid.tsx b/docs/data/data-grid/filtering-recipes/QuickFilterOutsideOfGrid.tsx index 12fc5cd7a1ab..9e8397efea9c 100644 --- a/docs/data/data-grid/filtering-recipes/QuickFilterOutsideOfGrid.tsx +++ b/docs/data/data-grid/filtering-recipes/QuickFilterOutsideOfGrid.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { Portal } from '@mui/base/Portal'; +import Portal from '@mui/material/Portal'; import Box from '@mui/material/Box'; import Grid from '@mui/material/Grid'; import { DataGrid, GridToolbarQuickFilter, GridToolbar } from '@mui/x-data-grid'; diff --git a/docs/data/data-grid/getting-started/getting-started.md b/docs/data/data-grid/getting-started/getting-started.md index 84dae9faae03..696a9da03c95 100644 --- a/docs/data/data-grid/getting-started/getting-started.md +++ b/docs/data/data-grid/getting-started/getting-started.md @@ -14,18 +14,19 @@ The Data Grid package has a peer dependency on `@mui/material`. If you are not already using it in your project, you can install it with: + ```bash npm npm install @mui/material @emotion/react @emotion/styled ``` -```bash yarn -yarn add @mui/material @emotion/react @emotion/styled -``` - ```bash pnpm pnpm add @mui/material @emotion/react @emotion/styled ``` +```bash yarn +yarn add @mui/material @emotion/react @emotion/styled +``` + @@ -44,18 +45,19 @@ Please note that [react](https://www.npmjs.com/package/react) and [react-dom](ht Material UI is using [Emotion](https://emotion.sh/docs/introduction) as a styling engine by default. If you want to use [`styled-components`](https://styled-components.com/) instead, run: + ```bash npm npm install @mui/styled-engine-sc styled-components ``` -```bash yarn -yarn add @mui/styled-engine-sc styled-components -``` - ```bash pnpm pnpm add @mui/styled-engine-sc styled-components ``` +```bash yarn +yarn add @mui/styled-engine-sc styled-components +``` + :::info diff --git a/docs/data/data-grid/localization/data.json b/docs/data/data-grid/localization/data.json index 79e9f02fe924..e1a780c91537 100644 --- a/docs/data/data-grid/localization/data.json +++ b/docs/data/data-grid/localization/data.json @@ -99,7 +99,7 @@ "languageTag": "de-DE", "importName": "deDE", "localeName": "German", - "missingKeysCount": 1, + "missingKeysCount": 0, "totalKeysCount": 118, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/deDE.ts" }, @@ -127,6 +127,14 @@ "totalKeysCount": 118, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/huHU.ts" }, + { + "languageTag": "is-IS", + "importName": "isIS", + "localeName": "Icelandic", + "missingKeysCount": 4, + "totalKeysCount": 118, + "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/isIS.ts" + }, { "languageTag": "it-IT", "importName": "itIT", @@ -155,10 +163,18 @@ "languageTag": "nb-NO", "importName": "nbNO", "localeName": "Norwegian (Bokmål)", - "missingKeysCount": 25, + "missingKeysCount": 0, "totalKeysCount": 118, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/nbNO.ts" }, + { + "languageTag": "nn-NO", + "importName": "nnNO", + "localeName": "Norwegian (Nynorsk)", + "missingKeysCount": 0, + "totalKeysCount": 118, + "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/nnNO.ts" + }, { "languageTag": "fa-IR", "importName": "faIR", @@ -235,7 +251,7 @@ "languageTag": "tr-TR", "importName": "trTR", "localeName": "Turkish", - "missingKeysCount": 19, + "missingKeysCount": 0, "totalKeysCount": 118, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/trTR.ts" }, diff --git a/docs/data/data-grid/overlays/overlays.md b/docs/data/data-grid/overlays/overlays.md index 426e8b615b3e..be08d87ac261 100644 --- a/docs/data/data-grid/overlays/overlays.md +++ b/docs/data/data-grid/overlays/overlays.md @@ -50,21 +50,21 @@ An animated placeholder of the data grid. ### Custom component -If you want to customize the no rows overlay, a component can be passed to the `loadingOverlay` slot. +If you want to customize the no-rows overlay, a component can be passed to the `loadingOverlay` slot. -In the following demo, a labelled determinate [CircularProgress](/material-ui/react-progress/#circular-determinate) component is rendered in place of the default loading overlay, with some additional _Loading rows…_ text. +In the following demo, a labeled determinate [CircularProgress](/material-ui/react-progress/#circular-determinate) component is rendered in place of the default loading overlay, with some additional _Loading rows…_ text. {{"demo": "LoadingOverlayCustom.js", "bg": "inline"}} ## No rows overlay -The no rows overlay is displayed when the data grid has no rows. +The no-rows overlay is displayed when the data grid has no rows. {{"demo": "NoRowsOverlay.js", "bg": "inline"}} ### Custom component -If you want to customize the no rows overlay, a component can be passed to the `noRowsOverlay` slot and rendered in place. +If you want to customize the no-rows overlay, a component can be passed to the `noRowsOverlay` slot and rendered in place. In the following demo, an illustration is added on top of the default "No rows" message. @@ -72,7 +72,7 @@ In the following demo, an illustration is added on top of the default "No rows" ## No results overlay -The no results overlay is displayed when the data grid has no results after filtering. +The no-results overlay is displayed when the data grid has no results after filtering. {{"demo": "NoResultsOverlay.js", "bg": "inline"}} diff --git a/docs/data/data-grid/server-side-data/index.md b/docs/data/data-grid/server-side-data/index.md index 38a003c98581..106b1737b7c3 100644 --- a/docs/data/data-grid/server-side-data/index.md +++ b/docs/data/data-grid/server-side-data/index.md @@ -58,7 +58,7 @@ This example only scratches the surface with a lot of problems still unsolved li - Performance optimization - Caching data/deduping requests -- More complex use-cases on the server like grouping, tree data, etc. +- More complex use cases on the server like grouping, tree data, etc. - Server-side row editing - Lazy loading of data - Handling updates to the data like row editing, row deletion, etc. @@ -70,17 +70,17 @@ Trying to solve these problems one after the other can make the code complex and The idea for a centralized data source is to simplify server-side data fetching. It's an abstraction layer between the Data Grid and the server, providing a simple interface for interacting with the server. -Think of it like a middleman handling the communication between the Data Grid (client) and the actual data source (server). +Think of it like an intermediary handling the communication between the Data Grid (client) and the actual data source (server). :::warning This feature is under development and is marked as **unstable**. -The information shared on this page could change in future. +The information shared on this page could change in the future. Feel free to subscribe or comment on the official GitHub [umbrella issue](https://github.com/mui/mui-x/issues/8179). ::: -It has an initial set of required methods that you need to implement. The data grid will use these methods internally to fetch a sub-set of data when needed. +It has an initial set of required methods that you need to implement. The data grid will use these methods internally to fetch a subset of data when needed. Let's take a look at the minimal `GridDataSource` interface configuration. @@ -177,7 +177,7 @@ The following demo showcases this behavior. :::info The data source demos use a utility function `useMockServer` to simulate the server-side data fetching. -In a real-world scenario, you should replace this with your own server-side data fetching logic. +In a real-world scenario, you should replace this with your own server-side data-fetching logic. Open info section of the browser console to see the requests being made and the data being fetched in response. ::: @@ -187,7 +187,7 @@ Open info section of the browser console to see the requests being made and the The data source caches fetched data by default. This means that if the user navigates to a page or expands a node that has already been fetched, the grid will not call the `getRows` function again to avoid unnecessary calls to the server. -The `GridDataSourceCacheDefault` is used by default which is a simple in-memory cache that stores the data in a plain object. It could be seen in action in the demo below. +The `GridDataSourceCacheDefault` is used by default which is a simple in-memory cache that stores the data in a plain object. It can be seen in action in the demo below. {{"demo": "ServerSideDataGrid.js", "bg": "inline"}} @@ -211,7 +211,7 @@ const lowTTLCache = new GridDataSourceCacheDefault({ ttl: 1000 * 10 }); // 10 se ### Custom cache -To provide a custom cache, use `unstable_dataSourceCache` prop, which could be either written from scratch or based out of another cache library. +To provide a custom cache, use `unstable_dataSourceCache` prop, which could be either written from scratch or based on another cache library. This prop accepts a generic interface of type `GridDataSourceCache`. ```tsx diff --git a/docs/data/data-grid/style-recipes/StylingAllCellsButAggregation.js b/docs/data/data-grid/style-recipes/StylingAllCellsButAggregation.js index da7be8770849..5bb197ada478 100644 --- a/docs/data/data-grid/style-recipes/StylingAllCellsButAggregation.js +++ b/docs/data/data-grid/style-recipes/StylingAllCellsButAggregation.js @@ -1,6 +1,10 @@ import * as React from 'react'; import Box from '@mui/material/Box'; -import { DataGridPremium, gridClasses } from '@mui/x-data-grid-premium'; +import { + DataGridPremium, + gridClasses, + isAutogeneratedRow, +} from '@mui/x-data-grid-premium'; // eliminate rounding errors in aggregation row const valueFormatter = (value) => `${Math.floor(value * 1000) / 1000} °C`; @@ -54,7 +58,7 @@ export default function StylingAllCellsButAggregation() { if ( params.field === 'city' || params.value == null || - params.id.toString().startsWith('auto-generated') + isAutogeneratedRow(params.row) ) { return ''; } diff --git a/docs/data/data-grid/style-recipes/StylingAllCellsButAggregation.tsx b/docs/data/data-grid/style-recipes/StylingAllCellsButAggregation.tsx index f26c378f9e60..8b725034db90 100644 --- a/docs/data/data-grid/style-recipes/StylingAllCellsButAggregation.tsx +++ b/docs/data/data-grid/style-recipes/StylingAllCellsButAggregation.tsx @@ -5,6 +5,7 @@ import { DataGridPremium, GridCellParams, gridClasses, + isAutogeneratedRow, } from '@mui/x-data-grid-premium'; // eliminate rounding errors in aggregation row @@ -60,7 +61,7 @@ export default function StylingAllCellsButAggregation() { if ( params.field === 'city' || params.value == null || - params.id.toString().startsWith('auto-generated') + isAutogeneratedRow(params.row) ) { return ''; } diff --git a/docs/data/date-pickers/custom-field/JoyV6MultiInputRangeField.js b/docs/data/date-pickers/custom-field/JoyV6MultiInputRangeField.js index a4995da9d500..ed551c5e00bc 100644 --- a/docs/data/date-pickers/custom-field/JoyV6MultiInputRangeField.js +++ b/docs/data/date-pickers/custom-field/JoyV6MultiInputRangeField.js @@ -5,6 +5,7 @@ import { useColorScheme as useMaterialColorScheme, Experimental_CssVarsProvider as MaterialCssVarsProvider, } from '@mui/material/styles'; +import useSlotProps from '@mui/utils/useSlotProps'; import { extendTheme as extendJoyTheme, useColorScheme, diff --git a/docs/data/date-pickers/custom-field/JoyV6MultiInputRangeField.tsx b/docs/data/date-pickers/custom-field/JoyV6MultiInputRangeField.tsx index 017166f0f124..5f688bf60ab7 100644 --- a/docs/data/date-pickers/custom-field/JoyV6MultiInputRangeField.tsx +++ b/docs/data/date-pickers/custom-field/JoyV6MultiInputRangeField.tsx @@ -5,6 +5,7 @@ import { useColorScheme as useMaterialColorScheme, Experimental_CssVarsProvider as MaterialCssVarsProvider, } from '@mui/material/styles'; +import useSlotProps from '@mui/utils/useSlotProps'; import { extendTheme as extendJoyTheme, useColorScheme, diff --git a/docs/data/date-pickers/custom-field/JoyV6SingleInputRangeField.js b/docs/data/date-pickers/custom-field/JoyV6SingleInputRangeField.js index cc90c74d2c80..90e4a2839860 100644 --- a/docs/data/date-pickers/custom-field/JoyV6SingleInputRangeField.js +++ b/docs/data/date-pickers/custom-field/JoyV6SingleInputRangeField.js @@ -5,6 +5,7 @@ import { useColorScheme as useMaterialColorScheme, Experimental_CssVarsProvider as MaterialCssVarsProvider, } from '@mui/material/styles'; +import useSlotProps from '@mui/utils/useSlotProps'; import { extendTheme as extendJoyTheme, useColorScheme, diff --git a/docs/data/date-pickers/custom-field/JoyV6SingleInputRangeField.tsx b/docs/data/date-pickers/custom-field/JoyV6SingleInputRangeField.tsx index 6545a68a1b9d..7b27ff86f05e 100644 --- a/docs/data/date-pickers/custom-field/JoyV6SingleInputRangeField.tsx +++ b/docs/data/date-pickers/custom-field/JoyV6SingleInputRangeField.tsx @@ -5,6 +5,7 @@ import { useColorScheme as useMaterialColorScheme, Experimental_CssVarsProvider as MaterialCssVarsProvider, } from '@mui/material/styles'; +import useSlotProps from '@mui/utils/useSlotProps'; import { extendTheme as extendJoyTheme, useColorScheme, diff --git a/docs/data/date-pickers/getting-started/getting-started.md b/docs/data/date-pickers/getting-started/getting-started.md index ac7925ea7c39..7572576f22f6 100644 --- a/docs/data/date-pickers/getting-started/getting-started.md +++ b/docs/data/date-pickers/getting-started/getting-started.md @@ -31,15 +31,19 @@ The Date and Time Pickers package has a peer dependency on `@mui/material`. If you are not already using it in your project, you can install it with: + ```bash npm npm install @mui/material @emotion/react @emotion/styled ``` -```bash yarn -yarn add @mui/material @emotion/react @emotion/styled -``` + ```bash pnpm pnpm add @mui/material @emotion/react @emotion/styled ``` + +```bash yarn +yarn add @mui/material @emotion/react @emotion/styled +``` + @@ -58,18 +62,19 @@ Please note that [react](https://www.npmjs.com/package/react) and [react-dom](ht Material UI is using [Emotion](https://emotion.sh/docs/introduction) as a styling engine by default. If you want to use [`styled-components`](https://styled-components.com/) instead, run: + ```bash npm npm install @mui/styled-engine-sc styled-components ``` -```bash yarn -yarn add @mui/styled-engine-sc styled-components -``` - ```bash pnpm pnpm add @mui/styled-engine-sc styled-components ``` +```bash yarn +yarn add @mui/styled-engine-sc styled-components +``` + Take a look at the [Styled engine guide](/material-ui/integrations/styled-components/) for more information about how to configure `styled-components` as the style engine. diff --git a/docs/data/date-pickers/localization/data.json b/docs/data/date-pickers/localization/data.json index eda4bb64d838..9e60d0001b7e 100644 --- a/docs/data/date-pickers/localization/data.json +++ b/docs/data/date-pickers/localization/data.json @@ -167,6 +167,14 @@ "totalKeysCount": 50, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-date-pickers/src/locales/nbNO.ts" }, + { + "languageTag": "nn-NO", + "importName": "nnNO", + "localeName": "Norwegian (Nynorsk)", + "missingKeysCount": 0, + "totalKeysCount": 50, + "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-date-pickers/src/locales/nnNO.ts" + }, { "languageTag": "fa-IR", "importName": "faIR", diff --git a/docs/data/date-pickers/validation/validation.md b/docs/data/date-pickers/validation/validation.md index 1a1d0aee49f1..2f9bb23631e6 100644 --- a/docs/data/date-pickers/validation/validation.md +++ b/docs/data/date-pickers/validation/validation.md @@ -87,6 +87,10 @@ The `minDate` prop prevents the selection of all values before `props.minDate`. {{"demo": "DateValidationMinDate.js", "defaultCodeOpen": false}} +:::info +The default value of `minDate` is `1900-01-01`. +::: + The `maxDate` prop prevents the selection of all values after `props.maxDate`. - On the `day` view—all the days after the `maxDate` won't be selectable. @@ -94,6 +98,10 @@ The `maxDate` prop prevents the selection of all values after `props.maxDate`. {{"demo": "DateValidationMaxDate.js", "defaultCodeOpen": false}} +:::info +The default value of `maxDate` is `2099-12-31`. +::: + ### Disable specific dates The `shouldDisableDate` prop prevents the selection of all dates for which it returns `true`. diff --git a/docs/data/migration/migration-pickers-lab/migration-pickers-lab.md b/docs/data/migration/migration-pickers-lab/migration-pickers-lab.md index a449aa68def3..25e25c6456c2 100644 --- a/docs/data/migration/migration-pickers-lab/migration-pickers-lab.md +++ b/docs/data/migration/migration-pickers-lab/migration-pickers-lab.md @@ -32,18 +32,19 @@ If you already have a license for `@mui/x-data-grid-pro`, you can use the same o #### Community plan + ```bash npm npm install @mui/x-date-pickers ``` -```bash yarn -yarn add @mui/x-date-pickers -``` - ```bash pnpm pnpm add @mui/x-date-pickers ``` +```bash yarn +yarn add @mui/x-date-pickers +``` + #### Pro plan @@ -54,14 +55,14 @@ pnpm add @mui/x-date-pickers npm install @mui/x-date-pickers-pro @mui/x-license-pro ``` -```bash yarn -yarn add @mui/x-date-pickers-pro @mui/x-license-pro -``` - ```bash pnpm pnpm add @mui/x-date-pickers-pro @mui/x-license-pro ``` +```bash yarn +yarn add @mui/x-date-pickers-pro @mui/x-license-pro +``` + When you purchase a commercial license, you'll receive a license key by email. diff --git a/docs/data/migration/migration-tree-view-lab/migration-tree-view-lab.md b/docs/data/migration/migration-tree-view-lab/migration-tree-view-lab.md index ca437680baa8..2b1a932e33ff 100644 --- a/docs/data/migration/migration-tree-view-lab/migration-tree-view-lab.md +++ b/docs/data/migration/migration-tree-view-lab/migration-tree-view-lab.md @@ -18,18 +18,19 @@ This migration is about the npm packages used, it **does not** affect the behavi ### 1. Install MUI X package + ```bash npm npm install @mui/x-tree-view ``` -```bash yarn -yarn add @mui/x-tree-view -``` - ```bash pnpm pnpm add @mui/x-tree-view ``` +```bash yarn +yarn add @mui/x-tree-view +``` + ### 2. Run the code mod diff --git a/docs/data/pages.ts b/docs/data/pages.ts index 12a8c186dfc8..ae5de4cf9b6b 100644 --- a/docs/data/pages.ts +++ b/docs/data/pages.ts @@ -428,7 +428,7 @@ const pages: MuiPage[] = [ pathname: '/x/react-charts/heatmap', title: 'Heatmap', plan: 'pro', - unstable: true, + planned: true, }, { pathname: '/x/react-charts/common-features', @@ -442,7 +442,12 @@ const pages: MuiPage[] = [ { pathname: '/x/react-charts/stacking' }, { pathname: '/x/react-charts/styling' }, { pathname: '/x/react-charts/tooltip', title: 'Tooltip & Highlights' }, - { pathname: '/x/react-charts/zoom-and-pan', title: 'Zoom & Pan', plan: 'pro' }, + { + pathname: '/x/react-charts/zoom-and-pan', + title: 'Zoom & Pan', + plan: 'pro', + planned: true, + }, ], }, { @@ -505,6 +510,7 @@ const pages: MuiPage[] = [ { pathname: '/x/react-tree-view/rich-tree-view/expansion' }, { pathname: '/x/react-tree-view/rich-tree-view/customization' }, { pathname: '/x/react-tree-view/rich-tree-view/focus' }, + { pathname: '/x/react-tree-view/rich-tree-view/ordering', plan: 'pro' }, ], }, { diff --git a/docs/data/tree-view/accessibility/accessibility.md b/docs/data/tree-view/accessibility/accessibility.md index c3dee3eb6d32..b1fc45bfc690 100644 --- a/docs/data/tree-view/accessibility/accessibility.md +++ b/docs/data/tree-view/accessibility/accessibility.md @@ -42,13 +42,13 @@ Some devices may lack certain keys, requiring the use of key combinations. In th | Keys | Description | | --------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Enter | Activates the focused item.
  • If item has children, it is expanded or collapsed
  • If the item does not have children, it is selected
| -| Arrow Up | Moves focus to the previous focusable item, without expanding or collapsing it. | -| Arrow Down | Moves focus to the next focusable item, without expanding or collapsing it. | +| Arrow Up | Moves focus to the previous focusable item, without expanding or collapsing it | +| Arrow Down | Moves focus to the next focusable item, without expanding or collapsing it | | Arrow Right + RTL off
Arrow Left + RTL on |
  • If focus is on a collapsed item, expands the item without moving focus
  • If focus is on an expanded item, moves focus to the first child
  • If focus is on an end item, nothing happens
| | Arrow Left + RTL off
Arrow Right RTL on |
  • If focus is on an expanded item, collapses the item
  • If focus is on a collapsed item that has a parent, moves focus to its parent
  • If focus is on a root item, nothing happens
| | Home | Focuses the first item in the tree | | End | Focuses the last item in the tree | -| \* | Expands all siblings that are at the same level as the focused item without moving focus. | +| \* | Expands all siblings that are at the same level as the focused item without moving focus | Type-ahead is supported for single characters. When typing a character, focus moves to the next item with a label that starts with the typed character. diff --git a/docs/data/tree-view/getting-started/getting-started.md b/docs/data/tree-view/getting-started/getting-started.md index 3ae405a02a8d..8b57abc56271 100644 --- a/docs/data/tree-view/getting-started/getting-started.md +++ b/docs/data/tree-view/getting-started/getting-started.md @@ -18,33 +18,38 @@ Using your favorite package manager, install `@mui/x-tree-view`: + ```bash npm npm install @mui/x-tree-view ``` -```bash yarn -yarn add @mui/x-tree-view -``` - ```bash pnpm pnpm add @mui/x-tree-view ``` +```bash yarn +yarn add @mui/x-tree-view +``` + The Tree View package has a peer dependency on `@mui/material`. If you are not already using it in your project, you can install it with: + ```bash npm npm install @mui/material @emotion/react @emotion/styled ``` -```bash yarn -yarn add @mui/material @emotion/react @emotion/styled -``` + ```bash pnpm pnpm add @mui/material @emotion/react @emotion/styled ``` + +```bash yarn +yarn add @mui/material @emotion/react @emotion/styled +``` + diff --git a/docs/data/tree-view/rich-tree-view/customization/FileExplorer.js b/docs/data/tree-view/rich-tree-view/customization/FileExplorer.js index ee988f862845..a02a1e86667b 100644 --- a/docs/data/tree-view/rich-tree-view/customization/FileExplorer.js +++ b/docs/data/tree-view/rich-tree-view/customization/FileExplorer.js @@ -25,6 +25,7 @@ import { } from '@mui/x-tree-view/TreeItem2'; import { TreeItem2Icon } from '@mui/x-tree-view/TreeItem2Icon'; import { TreeItem2Provider } from '@mui/x-tree-view/TreeItem2Provider'; +import { TreeItem2DragAndDropOverlay } from '@mui/x-tree-view/TreeItem2DragAndDropOverlay'; const ITEMS = [ { @@ -212,6 +213,7 @@ const CustomTreeItem = React.forwardRef(function CustomTreeItem(props, ref) { getCheckboxProps, getLabelProps, getGroupTransitionProps, + getDragAndDropOverlayProps, status, publicAPI, } = useTreeItem2({ id, itemId, children, label, disabled, rootRef: ref }); @@ -245,6 +247,7 @@ const CustomTreeItem = React.forwardRef(function CustomTreeItem(props, ref) { + {children && } diff --git a/docs/data/tree-view/rich-tree-view/customization/FileExplorer.tsx b/docs/data/tree-view/rich-tree-view/customization/FileExplorer.tsx index 3bee383e9d96..b57e0a3fb720 100644 --- a/docs/data/tree-view/rich-tree-view/customization/FileExplorer.tsx +++ b/docs/data/tree-view/rich-tree-view/customization/FileExplorer.tsx @@ -28,6 +28,7 @@ import { } from '@mui/x-tree-view/TreeItem2'; import { TreeItem2Icon } from '@mui/x-tree-view/TreeItem2Icon'; import { TreeItem2Provider } from '@mui/x-tree-view/TreeItem2Provider'; +import { TreeItem2DragAndDropOverlay } from '@mui/x-tree-view/TreeItem2DragAndDropOverlay'; import { TreeViewBaseItem } from '@mui/x-tree-view/models'; type FileType = 'image' | 'pdf' | 'doc' | 'video' | 'folder' | 'pinned' | 'trash'; @@ -248,6 +249,7 @@ const CustomTreeItem = React.forwardRef(function CustomTreeItem( getCheckboxProps, getLabelProps, getGroupTransitionProps, + getDragAndDropOverlayProps, status, publicAPI, } = useTreeItem2({ id, itemId, children, label, disabled, rootRef: ref }); @@ -281,6 +283,7 @@ const CustomTreeItem = React.forwardRef(function CustomTreeItem( + {children && } diff --git a/docs/data/tree-view/rich-tree-view/customization/HeadlessAPI.js b/docs/data/tree-view/rich-tree-view/customization/HeadlessAPI.js index e3915dd7caba..1fa00ed8698b 100644 --- a/docs/data/tree-view/rich-tree-view/customization/HeadlessAPI.js +++ b/docs/data/tree-view/rich-tree-view/customization/HeadlessAPI.js @@ -15,6 +15,7 @@ import { } from '@mui/x-tree-view/TreeItem2'; import { TreeItem2Icon } from '@mui/x-tree-view/TreeItem2Icon'; import { TreeItem2Provider } from '@mui/x-tree-view/TreeItem2Provider'; +import { TreeItem2DragAndDropOverlay } from '@mui/x-tree-view/TreeItem2DragAndDropOverlay'; const ITEMS = [ { @@ -50,6 +51,7 @@ const CustomTreeItem = React.forwardRef(function CustomTreeItem(props, ref) { getCheckboxProps, getLabelProps, getGroupTransitionProps, + getDragAndDropOverlayProps, status, } = useTreeItem2({ id, itemId, children, label, disabled, rootRef: ref }); @@ -74,6 +76,7 @@ const CustomTreeItem = React.forwardRef(function CustomTreeItem(props, ref) { + {children && } diff --git a/docs/data/tree-view/rich-tree-view/customization/HeadlessAPI.tsx b/docs/data/tree-view/rich-tree-view/customization/HeadlessAPI.tsx index 8d0929895b2c..75533393d528 100644 --- a/docs/data/tree-view/rich-tree-view/customization/HeadlessAPI.tsx +++ b/docs/data/tree-view/rich-tree-view/customization/HeadlessAPI.tsx @@ -18,6 +18,7 @@ import { } from '@mui/x-tree-view/TreeItem2'; import { TreeItem2Icon } from '@mui/x-tree-view/TreeItem2Icon'; import { TreeItem2Provider } from '@mui/x-tree-view/TreeItem2Provider'; +import { TreeItem2DragAndDropOverlay } from '@mui/x-tree-view/TreeItem2DragAndDropOverlay'; const ITEMS: TreeViewBaseItem[] = [ { @@ -60,6 +61,7 @@ const CustomTreeItem = React.forwardRef(function CustomTreeItem( getCheckboxProps, getLabelProps, getGroupTransitionProps, + getDragAndDropOverlayProps, status, } = useTreeItem2({ id, itemId, children, label, disabled, rootRef: ref }); @@ -84,6 +86,7 @@ const CustomTreeItem = React.forwardRef(function CustomTreeItem( + {children && } diff --git a/docs/data/tree-view/rich-tree-view/items/ApiMethodGetItemDOMElement.js b/docs/data/tree-view/rich-tree-view/items/ApiMethodGetItemDOMElement.js index 560e4412ee84..95427da9ddcb 100644 --- a/docs/data/tree-view/rich-tree-view/items/ApiMethodGetItemDOMElement.js +++ b/docs/data/tree-view/rich-tree-view/items/ApiMethodGetItemDOMElement.js @@ -42,7 +42,7 @@ export default function ApiMethodGetItemDOMElement() { apiRef.current.focusItem(event, 'charts-community'); apiRef.current .getItemDOMElement('charts-community') - ?.scrollIntoView({ block: 'center' }); + ?.scrollIntoView({ block: 'nearest' }); }; return ( diff --git a/docs/data/tree-view/rich-tree-view/items/ApiMethodGetItemDOMElement.tsx b/docs/data/tree-view/rich-tree-view/items/ApiMethodGetItemDOMElement.tsx index caec1f25a7f2..2f2e6e1e69fc 100644 --- a/docs/data/tree-view/rich-tree-view/items/ApiMethodGetItemDOMElement.tsx +++ b/docs/data/tree-view/rich-tree-view/items/ApiMethodGetItemDOMElement.tsx @@ -42,7 +42,7 @@ export default function ApiMethodGetItemDOMElement() { apiRef.current!.focusItem(event, 'charts-community'); apiRef .current!.getItemDOMElement('charts-community') - ?.scrollIntoView({ block: 'center' }); + ?.scrollIntoView({ block: 'nearest' }); }; return ( diff --git a/docs/data/tree-view/rich-tree-view/items/OnItemClick.js b/docs/data/tree-view/rich-tree-view/items/OnItemClick.js new file mode 100644 index 000000000000..4d89a64feb0e --- /dev/null +++ b/docs/data/tree-view/rich-tree-view/items/OnItemClick.js @@ -0,0 +1,56 @@ +import * as React from 'react'; +import Stack from '@mui/material/Stack'; +import Box from '@mui/material/Box'; +import Typography from '@mui/material/Typography'; + +import { RichTreeView } from '@mui/x-tree-view/RichTreeView'; + +const MUI_X_PRODUCTS = [ + { + id: 'grid', + label: 'Data Grid', + children: [ + { id: 'grid-community', label: '@mui/x-data-grid' }, + { id: 'grid-pro', label: '@mui/x-data-grid-pro' }, + { id: 'grid-premium', label: '@mui/x-data-grid-premium' }, + ], + }, + { + id: 'pickers', + label: 'Date and Time Pickers', + children: [ + { id: 'pickers-community', label: '@mui/x-date-pickers' }, + { id: 'pickers-pro', label: '@mui/x-date-pickers-pro' }, + ], + }, + { + id: 'charts', + label: 'Charts', + children: [{ id: 'charts-community', label: '@mui/x-charts' }], + }, + { + id: 'tree-view', + label: 'Tree View', + children: [{ id: 'tree-view-community', label: '@mui/x-tree-view' }], + }, +]; + +export default function OnItemClick() { + const [lastClickedItem, setLastClickedItem] = React.useState(null); + + return ( + + + {lastClickedItem == null + ? 'No item click recorded' + : `Last clicked item: ${lastClickedItem}`} + + + setLastClickedItem(itemId)} + /> + + + ); +} diff --git a/docs/data/tree-view/rich-tree-view/items/OnItemClick.tsx b/docs/data/tree-view/rich-tree-view/items/OnItemClick.tsx new file mode 100644 index 000000000000..108b3c6a67a1 --- /dev/null +++ b/docs/data/tree-view/rich-tree-view/items/OnItemClick.tsx @@ -0,0 +1,56 @@ +import * as React from 'react'; +import Stack from '@mui/material/Stack'; +import Box from '@mui/material/Box'; +import Typography from '@mui/material/Typography'; +import { TreeViewBaseItem } from '@mui/x-tree-view/models'; +import { RichTreeView } from '@mui/x-tree-view/RichTreeView'; + +const MUI_X_PRODUCTS: TreeViewBaseItem[] = [ + { + id: 'grid', + label: 'Data Grid', + children: [ + { id: 'grid-community', label: '@mui/x-data-grid' }, + { id: 'grid-pro', label: '@mui/x-data-grid-pro' }, + { id: 'grid-premium', label: '@mui/x-data-grid-premium' }, + ], + }, + { + id: 'pickers', + label: 'Date and Time Pickers', + children: [ + { id: 'pickers-community', label: '@mui/x-date-pickers' }, + { id: 'pickers-pro', label: '@mui/x-date-pickers-pro' }, + ], + }, + { + id: 'charts', + label: 'Charts', + children: [{ id: 'charts-community', label: '@mui/x-charts' }], + }, + { + id: 'tree-view', + label: 'Tree View', + children: [{ id: 'tree-view-community', label: '@mui/x-tree-view' }], + }, +]; + +export default function OnItemClick() { + const [lastClickedItem, setLastClickedItem] = React.useState(null); + + return ( + + + {lastClickedItem == null + ? 'No item click recorded' + : `Last clicked item: ${lastClickedItem}`} + + + setLastClickedItem(itemId)} + /> + + + ); +} diff --git a/docs/data/tree-view/rich-tree-view/items/OnItemClick.tsx.preview b/docs/data/tree-view/rich-tree-view/items/OnItemClick.tsx.preview new file mode 100644 index 000000000000..d63a90f87356 --- /dev/null +++ b/docs/data/tree-view/rich-tree-view/items/OnItemClick.tsx.preview @@ -0,0 +1,11 @@ + + {lastClickedItem == null + ? 'No item click recorded' + : `Last clicked item: ${lastClickedItem}`} + + + setLastClickedItem(itemId)} + /> + \ No newline at end of file diff --git a/docs/data/tree-view/rich-tree-view/items/items.md b/docs/data/tree-view/rich-tree-view/items/items.md index 6180d5f9f074..322e8c3dba80 100644 --- a/docs/data/tree-view/rich-tree-view/items/items.md +++ b/docs/data/tree-view/rich-tree-view/items/items.md @@ -143,6 +143,12 @@ When it's set to true: {{"demo": "DisabledItemsFocusable.js", "defaultCodeOpen": false}} +## Track item clicks + +Use the `onItemClick` prop to track the clicked item: + +{{"demo": "OnItemClick.js"}} + ## Imperative API ### Get an item by ID @@ -181,6 +187,11 @@ const itemTree = apiRef.current.getItemTree(); {{"demo": "ApiMethodGetItemTree.js", "defaultCodeOpen": false}} +:::info +This method is mostly useful when the Tree View has some internal updates on the items. +For now, the only features causing updates on the items is the [re-ordering](/x/react-tree-view/rich-tree-view/ordering/). +::: + ### Get an item's children by ID Use the `getItemOrderedChildrenIds` API method to get an item's children by its ID. diff --git a/docs/data/tree-view/rich-tree-view/ordering/DragAndDrop.js b/docs/data/tree-view/rich-tree-view/ordering/DragAndDrop.js new file mode 100644 index 000000000000..7832e545034f --- /dev/null +++ b/docs/data/tree-view/rich-tree-view/ordering/DragAndDrop.js @@ -0,0 +1,50 @@ +import * as React from 'react'; +import Box from '@mui/material/Box'; + +import { RichTreeViewPro } from '@mui/x-tree-view-pro/RichTreeViewPro'; + +const ITEMS = [ + { + id: 'grid', + label: 'Data Grid', + children: [ + { id: 'grid-community', label: '@mui/x-data-grid' }, + { id: 'grid-pro', label: '@mui/x-data-grid-pro' }, + { id: 'grid-premium', label: '@mui/x-data-grid-premium' }, + ], + }, + { + id: 'pickers', + label: 'Date and Time Pickers', + children: [ + { id: 'pickers-community', label: '@mui/x-date-pickers' }, + { id: 'pickers-pro', label: '@mui/x-date-pickers-pro' }, + ], + }, + { + id: 'charts', + label: 'Charts', + children: [{ id: 'charts-community', label: '@mui/x-charts' }], + }, + { + id: 'tree-view', + label: 'Tree View', + children: [{ id: 'tree-view-community', label: '@mui/x-tree-view' }], + }, +]; + +export default function DragAndDrop() { + return ( + + + + ); +} diff --git a/docs/data/tree-view/rich-tree-view/ordering/DragAndDrop.tsx b/docs/data/tree-view/rich-tree-view/ordering/DragAndDrop.tsx new file mode 100644 index 000000000000..1c59beb40bc9 --- /dev/null +++ b/docs/data/tree-view/rich-tree-view/ordering/DragAndDrop.tsx @@ -0,0 +1,50 @@ +import * as React from 'react'; +import Box from '@mui/material/Box'; +import { TreeViewBaseItem } from '@mui/x-tree-view/models'; +import { RichTreeViewPro } from '@mui/x-tree-view-pro/RichTreeViewPro'; + +const ITEMS: TreeViewBaseItem[] = [ + { + id: 'grid', + label: 'Data Grid', + children: [ + { id: 'grid-community', label: '@mui/x-data-grid' }, + { id: 'grid-pro', label: '@mui/x-data-grid-pro' }, + { id: 'grid-premium', label: '@mui/x-data-grid-premium' }, + ], + }, + { + id: 'pickers', + label: 'Date and Time Pickers', + children: [ + { id: 'pickers-community', label: '@mui/x-date-pickers' }, + { id: 'pickers-pro', label: '@mui/x-date-pickers-pro' }, + ], + }, + { + id: 'charts', + label: 'Charts', + children: [{ id: 'charts-community', label: '@mui/x-charts' }], + }, + { + id: 'tree-view', + label: 'Tree View', + children: [{ id: 'tree-view-community', label: '@mui/x-tree-view' }], + }, +]; + +export default function DragAndDrop() { + return ( + + + + ); +} diff --git a/docs/data/tree-view/rich-tree-view/ordering/DragAndDrop.tsx.preview b/docs/data/tree-view/rich-tree-view/ordering/DragAndDrop.tsx.preview new file mode 100644 index 000000000000..b29cac8f227a --- /dev/null +++ b/docs/data/tree-view/rich-tree-view/ordering/DragAndDrop.tsx.preview @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/docs/data/tree-view/rich-tree-view/ordering/FileExplorer.js b/docs/data/tree-view/rich-tree-view/ordering/FileExplorer.js new file mode 100644 index 000000000000..2e27635af25f --- /dev/null +++ b/docs/data/tree-view/rich-tree-view/ordering/FileExplorer.js @@ -0,0 +1,260 @@ +import * as React from 'react'; +import clsx from 'clsx'; +import { styled, alpha } from '@mui/material/styles'; +import Box from '@mui/material/Box'; +import Typography from '@mui/material/Typography'; +import ArticleIcon from '@mui/icons-material/Article'; +import DeleteIcon from '@mui/icons-material/Delete'; +import FolderRounded from '@mui/icons-material/FolderRounded'; +import ImageIcon from '@mui/icons-material/Image'; +import PictureAsPdfIcon from '@mui/icons-material/PictureAsPdf'; +import VideoCameraBackIcon from '@mui/icons-material/VideoCameraBack'; +import { RichTreeViewPro } from '@mui/x-tree-view-pro/RichTreeViewPro'; +import { treeItemClasses } from '@mui/x-tree-view/TreeItem'; +import { unstable_useTreeItem2 as useTreeItem2 } from '@mui/x-tree-view/useTreeItem2'; +import { + TreeItem2Checkbox, + TreeItem2Content, + TreeItem2IconContainer, + TreeItem2Label, + TreeItem2Root, + TreeItem2GroupTransition, +} from '@mui/x-tree-view/TreeItem2'; +import { TreeItem2Icon } from '@mui/x-tree-view/TreeItem2Icon'; +import { TreeItem2Provider } from '@mui/x-tree-view/TreeItem2Provider'; +import { TreeItem2DragAndDropOverlay } from '@mui/x-tree-view/TreeItem2DragAndDropOverlay'; + +import { useTreeViewApiRef } from '@mui/x-tree-view/hooks'; + +const ITEMS = [ + { + id: '1', + label: 'Documents', + fileType: 'folder', + children: [ + { + id: '1.1', + label: 'Company', + fileType: 'folder', + children: [ + { id: '1.1.1', label: 'Invoice', fileType: 'pdf' }, + { id: '1.1.2', label: 'Meeting notes', fileType: 'doc' }, + { id: '1.1.3', label: 'Tasks list', fileType: 'doc' }, + { id: '1.1.4', label: 'Equipment', fileType: 'pdf' }, + { id: '1.1.5', label: 'Video conference', fileType: 'video' }, + ], + }, + { id: '1.2', label: 'Personal', fileType: 'folder' }, + { id: '1.3', label: 'Group photo', fileType: 'image' }, + ], + }, + { + id: '2', + label: 'Bookmarked', + fileType: 'folder', + children: [ + { id: '2.1', label: 'Learning materials', fileType: 'folder' }, + { id: '2.2', label: 'News', fileType: 'folder' }, + { id: '2.3', label: 'Forums', fileType: 'folder' }, + { id: '2.4', label: 'Travel documents', fileType: 'pdf' }, + ], + }, + { id: '3', label: 'History', fileType: 'folder' }, + { id: '4', label: 'Trash', fileType: 'trash' }, +]; + +function DotIcon() { + return ( + + ); +} + +const StyledTreeItemRoot = styled(TreeItem2Root)(({ theme }) => ({ + color: + theme.palette.mode === 'light' + ? theme.palette.grey[800] + : theme.palette.grey[400], + position: 'relative', + [`& .${treeItemClasses.groupTransition}`]: { + marginLeft: theme.spacing(3.5), + }, +})); + +const CustomTreeItemContent = styled(TreeItem2Content)(({ theme }) => ({ + flexDirection: 'row-reverse', + borderRadius: theme.spacing(0.7), + marginBottom: theme.spacing(0.5), + marginTop: theme.spacing(0.5), + paddingRight: theme.spacing(1), + fontWeight: 500, + [`&.Mui-expanded `]: { + '&:not(.Mui-focused, .Mui-selected, .Mui-selected.Mui-focused) .labelIcon': { + color: + theme.palette.mode === 'light' + ? theme.palette.primary.main + : theme.palette.primary.dark, + }, + '&::before': { + content: '""', + display: 'block', + position: 'absolute', + left: '16px', + top: '44px', + height: 'calc(100% - 48px)', + width: '1.5px', + backgroundColor: + theme.palette.mode === 'light' + ? theme.palette.grey[300] + : theme.palette.grey[700], + }, + }, + '&:hover': { + backgroundColor: alpha(theme.palette.primary.main, 0.1), + color: theme.palette.mode === 'light' ? theme.palette.primary.main : 'white', + }, + [`&.Mui-focused, &.Mui-selected, &.Mui-selected.Mui-focused`]: { + backgroundColor: + theme.palette.mode === 'light' + ? theme.palette.primary.main + : theme.palette.primary.dark, + color: theme.palette.primary.contrastText, + }, +})); + +const StyledTreeItemLabelText = styled(Typography)({ + color: 'inherit', + fontFamily: 'General Sans', + fontWeight: 500, +}); + +function CustomLabel({ icon: Icon, expandable, children, ...other }) { + return ( + + {Icon && ( + + )} + + {children} + {expandable && } + + ); +} + +const isExpandable = (reactChildren) => { + if (Array.isArray(reactChildren)) { + return reactChildren.length > 0 && reactChildren.some(isExpandable); + } + return Boolean(reactChildren); +}; + +const getIconFromFileType = (fileType) => { + switch (fileType) { + case 'image': + return ImageIcon; + case 'pdf': + return PictureAsPdfIcon; + case 'doc': + return ArticleIcon; + case 'video': + return VideoCameraBackIcon; + case 'folder': + return FolderRounded; + case 'trash': + return DeleteIcon; + default: + return ArticleIcon; + } +}; + +const CustomTreeItem = React.forwardRef(function CustomTreeItem(props, ref) { + const { id, itemId, label, disabled, children, ...other } = props; + + const { + getRootProps, + getContentProps, + getIconContainerProps, + getCheckboxProps, + getLabelProps, + getGroupTransitionProps, + getDragAndDropOverlayProps, + status, + publicAPI, + } = useTreeItem2({ id, itemId, children, label, disabled, rootRef: ref }); + + const item = publicAPI.getItem(itemId); + const expandable = isExpandable(children); + const icon = getIconFromFileType(item.fileType); + + return ( + + + + + + + + + + + {children && } + + + ); +}); + +export default function FileExplorer() { + const apiRef = useTreeViewApiRef(); + + return ( + { + return ( + params.newPosition.parentId === null || + ['folder', 'trash'].includes( + apiRef.current.getItem(params.newPosition.parentId).fileType, + ) + ); + }} + /> + ); +} diff --git a/docs/data/tree-view/rich-tree-view/ordering/FileExplorer.tsx b/docs/data/tree-view/rich-tree-view/ordering/FileExplorer.tsx new file mode 100644 index 000000000000..77d933653142 --- /dev/null +++ b/docs/data/tree-view/rich-tree-view/ordering/FileExplorer.tsx @@ -0,0 +1,295 @@ +import * as React from 'react'; +import clsx from 'clsx'; +import { styled, alpha } from '@mui/material/styles'; +import Box from '@mui/material/Box'; +import Typography from '@mui/material/Typography'; +import ArticleIcon from '@mui/icons-material/Article'; +import DeleteIcon from '@mui/icons-material/Delete'; +import FolderRounded from '@mui/icons-material/FolderRounded'; +import ImageIcon from '@mui/icons-material/Image'; +import PictureAsPdfIcon from '@mui/icons-material/PictureAsPdf'; +import VideoCameraBackIcon from '@mui/icons-material/VideoCameraBack'; +import { RichTreeViewPro } from '@mui/x-tree-view-pro/RichTreeViewPro'; +import { treeItemClasses } from '@mui/x-tree-view/TreeItem'; +import { + unstable_useTreeItem2 as useTreeItem2, + UseTreeItem2Parameters, +} from '@mui/x-tree-view/useTreeItem2'; +import { + TreeItem2Checkbox, + TreeItem2Content, + TreeItem2IconContainer, + TreeItem2Label, + TreeItem2Root, + TreeItem2GroupTransition, +} from '@mui/x-tree-view/TreeItem2'; +import { TreeItem2Icon } from '@mui/x-tree-view/TreeItem2Icon'; +import { TreeItem2Provider } from '@mui/x-tree-view/TreeItem2Provider'; +import { TreeItem2DragAndDropOverlay } from '@mui/x-tree-view/TreeItem2DragAndDropOverlay'; +import { TreeViewBaseItem } from '@mui/x-tree-view/models'; +import { useTreeViewApiRef } from '@mui/x-tree-view/hooks'; + +type FileType = 'image' | 'pdf' | 'doc' | 'video' | 'folder' | 'pinned' | 'trash'; + +type ExtendedTreeItemProps = { + fileType: FileType; + id: string; + label: string; +}; + +const ITEMS: TreeViewBaseItem[] = [ + { + id: '1', + label: 'Documents', + fileType: 'folder', + children: [ + { + id: '1.1', + label: 'Company', + fileType: 'folder', + children: [ + { id: '1.1.1', label: 'Invoice', fileType: 'pdf' }, + { id: '1.1.2', label: 'Meeting notes', fileType: 'doc' }, + { id: '1.1.3', label: 'Tasks list', fileType: 'doc' }, + { id: '1.1.4', label: 'Equipment', fileType: 'pdf' }, + { id: '1.1.5', label: 'Video conference', fileType: 'video' }, + ], + }, + { id: '1.2', label: 'Personal', fileType: 'folder' }, + { id: '1.3', label: 'Group photo', fileType: 'image' }, + ], + }, + { + id: '2', + label: 'Bookmarked', + fileType: 'folder', + children: [ + { id: '2.1', label: 'Learning materials', fileType: 'folder' }, + { id: '2.2', label: 'News', fileType: 'folder' }, + { id: '2.3', label: 'Forums', fileType: 'folder' }, + { id: '2.4', label: 'Travel documents', fileType: 'pdf' }, + ], + }, + { id: '3', label: 'History', fileType: 'folder' }, + { id: '4', label: 'Trash', fileType: 'trash' }, +]; + +function DotIcon() { + return ( + + ); +} +declare module 'react' { + interface CSSProperties { + '--tree-view-color'?: string; + '--tree-view-bg-color'?: string; + } +} + +const StyledTreeItemRoot = styled(TreeItem2Root)(({ theme }) => ({ + color: + theme.palette.mode === 'light' + ? theme.palette.grey[800] + : theme.palette.grey[400], + position: 'relative', + [`& .${treeItemClasses.groupTransition}`]: { + marginLeft: theme.spacing(3.5), + }, +})) as unknown as typeof TreeItem2Root; + +const CustomTreeItemContent = styled(TreeItem2Content)(({ theme }) => ({ + flexDirection: 'row-reverse', + borderRadius: theme.spacing(0.7), + marginBottom: theme.spacing(0.5), + marginTop: theme.spacing(0.5), + paddingRight: theme.spacing(1), + fontWeight: 500, + [`&.Mui-expanded `]: { + '&:not(.Mui-focused, .Mui-selected, .Mui-selected.Mui-focused) .labelIcon': { + color: + theme.palette.mode === 'light' + ? theme.palette.primary.main + : theme.palette.primary.dark, + }, + '&::before': { + content: '""', + display: 'block', + position: 'absolute', + left: '16px', + top: '44px', + height: 'calc(100% - 48px)', + width: '1.5px', + backgroundColor: + theme.palette.mode === 'light' + ? theme.palette.grey[300] + : theme.palette.grey[700], + }, + }, + '&:hover': { + backgroundColor: alpha(theme.palette.primary.main, 0.1), + color: theme.palette.mode === 'light' ? theme.palette.primary.main : 'white', + }, + [`&.Mui-focused, &.Mui-selected, &.Mui-selected.Mui-focused`]: { + backgroundColor: + theme.palette.mode === 'light' + ? theme.palette.primary.main + : theme.palette.primary.dark, + color: theme.palette.primary.contrastText, + }, +})); + +const StyledTreeItemLabelText = styled(Typography)({ + color: 'inherit', + fontFamily: 'General Sans', + fontWeight: 500, +}) as unknown as typeof Typography; + +interface CustomLabelProps { + children: React.ReactNode; + icon?: React.ElementType; + expandable?: boolean; +} + +function CustomLabel({ + icon: Icon, + expandable, + children, + ...other +}: CustomLabelProps) { + return ( + + {Icon && ( + + )} + + {children} + {expandable && } + + ); +} + +const isExpandable = (reactChildren: React.ReactNode) => { + if (Array.isArray(reactChildren)) { + return reactChildren.length > 0 && reactChildren.some(isExpandable); + } + return Boolean(reactChildren); +}; + +const getIconFromFileType = (fileType: FileType) => { + switch (fileType) { + case 'image': + return ImageIcon; + case 'pdf': + return PictureAsPdfIcon; + case 'doc': + return ArticleIcon; + case 'video': + return VideoCameraBackIcon; + case 'folder': + return FolderRounded; + case 'trash': + return DeleteIcon; + default: + return ArticleIcon; + } +}; + +interface CustomTreeItemProps + extends Omit, + Omit, 'onFocus'> {} + +const CustomTreeItem = React.forwardRef(function CustomTreeItem( + props: CustomTreeItemProps, + ref: React.Ref, +) { + const { id, itemId, label, disabled, children, ...other } = props; + + const { + getRootProps, + getContentProps, + getIconContainerProps, + getCheckboxProps, + getLabelProps, + getGroupTransitionProps, + getDragAndDropOverlayProps, + status, + publicAPI, + } = useTreeItem2({ id, itemId, children, label, disabled, rootRef: ref }); + + const item = publicAPI.getItem(itemId); + const expandable = isExpandable(children); + const icon = getIconFromFileType(item.fileType); + + return ( + + + + + + + + + + + {children && } + + + ); +}); + +export default function FileExplorer() { + const apiRef = useTreeViewApiRef(); + + return ( + { + return ( + params.newPosition.parentId === null || + ['folder', 'trash'].includes( + apiRef.current!.getItem(params.newPosition.parentId).fileType, + ) + ); + }} + /> + ); +} diff --git a/docs/data/tree-view/rich-tree-view/ordering/OnItemPositionChange.js b/docs/data/tree-view/rich-tree-view/ordering/OnItemPositionChange.js new file mode 100644 index 000000000000..c9cfef10d6a0 --- /dev/null +++ b/docs/data/tree-view/rich-tree-view/ordering/OnItemPositionChange.js @@ -0,0 +1,69 @@ +import * as React from 'react'; +import Box from '@mui/material/Box'; + +import { RichTreeViewPro } from '@mui/x-tree-view-pro/RichTreeViewPro'; +import Stack from '@mui/material/Stack'; +import Typography from '@mui/material/Typography'; + +const MUI_X_PRODUCTS = [ + { + id: 'grid', + label: 'Data Grid', + children: [ + { id: 'grid-community', label: '@mui/x-data-grid' }, + { id: 'grid-pro', label: '@mui/x-data-grid-pro' }, + { id: 'grid-premium', label: '@mui/x-data-grid-premium' }, + ], + }, + { + id: 'pickers', + label: 'Date and Time Pickers', + children: [ + { id: 'pickers-community', label: '@mui/x-date-pickers' }, + { id: 'pickers-pro', label: '@mui/x-date-pickers-pro' }, + ], + }, + { + id: 'charts', + label: 'Charts', + children: [{ id: 'charts-community', label: '@mui/x-charts' }], + }, + { + id: 'tree-view', + label: 'Tree View', + children: [{ id: 'tree-view-community', label: '@mui/x-tree-view' }], + }, +]; + +export default function OnItemPositionChange() { + const [lastReorder, setLastReorder] = React.useState(null); + + return ( + + + setLastReorder(params)} + /> + + {lastReorder == null ? ( + No reorder registered yet + ) : ( + + Last reordered item: {lastReorder.itemId} +
+ Position before: {lastReorder.oldPosition.parentId ?? 'root'} (index{' '} + {lastReorder.oldPosition.index})
F Position after:{' '} + {lastReorder.newPosition.parentId ?? 'root'} (index{' '} + {lastReorder.newPosition.index}) +
+ )} +
+ ); +} diff --git a/docs/data/tree-view/rich-tree-view/ordering/OnItemPositionChange.tsx b/docs/data/tree-view/rich-tree-view/ordering/OnItemPositionChange.tsx new file mode 100644 index 000000000000..52f5ff5474bc --- /dev/null +++ b/docs/data/tree-view/rich-tree-view/ordering/OnItemPositionChange.tsx @@ -0,0 +1,77 @@ +import * as React from 'react'; +import Box from '@mui/material/Box'; +import { TreeViewBaseItem } from '@mui/x-tree-view/models'; +import { + RichTreeViewPro, + RichTreeViewProProps, +} from '@mui/x-tree-view-pro/RichTreeViewPro'; +import Stack from '@mui/material/Stack'; +import Typography from '@mui/material/Typography'; + +const MUI_X_PRODUCTS: TreeViewBaseItem[] = [ + { + id: 'grid', + label: 'Data Grid', + children: [ + { id: 'grid-community', label: '@mui/x-data-grid' }, + { id: 'grid-pro', label: '@mui/x-data-grid-pro' }, + { id: 'grid-premium', label: '@mui/x-data-grid-premium' }, + ], + }, + { + id: 'pickers', + label: 'Date and Time Pickers', + children: [ + { id: 'pickers-community', label: '@mui/x-date-pickers' }, + { id: 'pickers-pro', label: '@mui/x-date-pickers-pro' }, + ], + }, + { + id: 'charts', + label: 'Charts', + children: [{ id: 'charts-community', label: '@mui/x-charts' }], + }, + { + id: 'tree-view', + label: 'Tree View', + children: [{ id: 'tree-view-community', label: '@mui/x-tree-view' }], + }, +]; + +export default function OnItemPositionChange() { + const [lastReorder, setLastReorder] = React.useState< + | Parameters< + NonNullable['onItemPositionChange']> + >[0] + | null + >(null); + + return ( + + + setLastReorder(params)} + /> + + {lastReorder == null ? ( + No reorder registered yet + ) : ( + + Last reordered item: {lastReorder.itemId} +
+ Position before: {lastReorder.oldPosition.parentId ?? 'root'} (index{' '} + {lastReorder.oldPosition.index})
F Position after:{' '} + {lastReorder.newPosition.parentId ?? 'root'} (index{' '} + {lastReorder.newPosition.index}) +
+ )} +
+ ); +} diff --git a/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderFromDragHandle.js b/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderFromDragHandle.js new file mode 100644 index 000000000000..8aa17d6dd5a2 --- /dev/null +++ b/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderFromDragHandle.js @@ -0,0 +1,115 @@ +import * as React from 'react'; +import Box from '@mui/material/Box'; +import DragIndicatorIcon from '@mui/icons-material/DragIndicator'; +import { RichTreeViewPro } from '@mui/x-tree-view-pro/RichTreeViewPro'; + +import { unstable_useTreeItem2 as useTreeItem2 } from '@mui/x-tree-view/useTreeItem2'; +import { + TreeItem2Content, + TreeItem2IconContainer, + TreeItem2GroupTransition, + TreeItem2Label, + TreeItem2Root, + TreeItem2Checkbox, +} from '@mui/x-tree-view/TreeItem2'; +import { TreeItem2Icon } from '@mui/x-tree-view/TreeItem2Icon'; +import { TreeItem2Provider } from '@mui/x-tree-view/TreeItem2Provider'; +import { TreeItem2DragAndDropOverlay } from '@mui/x-tree-view/TreeItem2DragAndDropOverlay'; + +const MUI_X_PRODUCTS = [ + { + id: 'grid', + label: 'Data Grid', + children: [ + { id: 'grid-community', label: '@mui/x-data-grid' }, + { id: 'grid-pro', label: '@mui/x-data-grid-pro' }, + { id: 'grid-premium', label: '@mui/x-data-grid-premium' }, + ], + }, + { + id: 'pickers', + label: 'Date and Time Pickers', + children: [ + { id: 'pickers-community', label: '@mui/x-date-pickers' }, + { id: 'pickers-pro', label: '@mui/x-date-pickers-pro' }, + ], + }, + { + id: 'charts', + label: 'Charts', + children: [{ id: 'charts-community', label: '@mui/x-charts' }], + }, + { + id: 'tree-view', + label: 'Tree View', + children: [{ id: 'tree-view-community', label: '@mui/x-tree-view' }], + }, +]; + +const CustomTreeItem = React.forwardRef(function CustomTreeItem(props, ref) { + const { id, itemId, label, disabled, children, ...other } = props; + + const { + getRootProps, + getContentProps, + getIconContainerProps, + getCheckboxProps, + getLabelProps, + getGroupTransitionProps, + getDragAndDropOverlayProps, + status, + } = useTreeItem2({ id, itemId, children, label, disabled, rootRef: ref }); + + const { draggable, onDragStart, onDragOver, onDragEnd, ...otherRootProps } = + getRootProps(other); + + const handleDragStart = (event) => { + if (!onDragStart) { + return; + } + + onDragStart(event); + event.dataTransfer.setDragImage(event.target.parentElement, 0, 0); + }; + + return ( + + + + + + + + + + + + + + {children && } + + + ); +}); + +export default function OnlyReorderFromDragHandle() { + return ( + + + + ); +} diff --git a/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderFromDragHandle.tsx b/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderFromDragHandle.tsx new file mode 100644 index 000000000000..d01d81f8f4c3 --- /dev/null +++ b/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderFromDragHandle.tsx @@ -0,0 +1,129 @@ +import * as React from 'react'; +import Box from '@mui/material/Box'; +import DragIndicatorIcon from '@mui/icons-material/DragIndicator'; +import { RichTreeViewPro } from '@mui/x-tree-view-pro/RichTreeViewPro'; +import { TreeViewBaseItem } from '@mui/x-tree-view/models'; +import { + unstable_useTreeItem2 as useTreeItem2, + UseTreeItem2Parameters, +} from '@mui/x-tree-view/useTreeItem2'; +import { + TreeItem2Content, + TreeItem2IconContainer, + TreeItem2GroupTransition, + TreeItem2Label, + TreeItem2Root, + TreeItem2Checkbox, +} from '@mui/x-tree-view/TreeItem2'; +import { TreeItem2Icon } from '@mui/x-tree-view/TreeItem2Icon'; +import { TreeItem2Provider } from '@mui/x-tree-view/TreeItem2Provider'; +import { TreeItem2DragAndDropOverlay } from '@mui/x-tree-view/TreeItem2DragAndDropOverlay'; + +const MUI_X_PRODUCTS: TreeViewBaseItem[] = [ + { + id: 'grid', + label: 'Data Grid', + children: [ + { id: 'grid-community', label: '@mui/x-data-grid' }, + { id: 'grid-pro', label: '@mui/x-data-grid-pro' }, + { id: 'grid-premium', label: '@mui/x-data-grid-premium' }, + ], + }, + { + id: 'pickers', + label: 'Date and Time Pickers', + children: [ + { id: 'pickers-community', label: '@mui/x-date-pickers' }, + { id: 'pickers-pro', label: '@mui/x-date-pickers-pro' }, + ], + }, + { + id: 'charts', + label: 'Charts', + children: [{ id: 'charts-community', label: '@mui/x-charts' }], + }, + { + id: 'tree-view', + label: 'Tree View', + children: [{ id: 'tree-view-community', label: '@mui/x-tree-view' }], + }, +]; + +interface CustomTreeItemProps + extends Omit, + Omit, 'onFocus'> {} + +const CustomTreeItem = React.forwardRef(function CustomTreeItem( + props: CustomTreeItemProps, + ref: React.Ref, +) { + const { id, itemId, label, disabled, children, ...other } = props; + + const { + getRootProps, + getContentProps, + getIconContainerProps, + getCheckboxProps, + getLabelProps, + getGroupTransitionProps, + getDragAndDropOverlayProps, + status, + } = useTreeItem2({ id, itemId, children, label, disabled, rootRef: ref }); + + const { draggable, onDragStart, onDragOver, onDragEnd, ...otherRootProps } = + getRootProps(other); + + const handleDragStart = (event: React.DragEvent) => { + if (!onDragStart) { + return; + } + + onDragStart(event); + event.dataTransfer.setDragImage( + (event.target as HTMLElement).parentElement!, + 0, + 0, + ); + }; + + return ( + + + + + + + + + + + + + + {children && } + + + ); +}); + +export default function OnlyReorderFromDragHandle() { + return ( + + + + ); +} diff --git a/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderFromDragHandle.tsx.preview b/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderFromDragHandle.tsx.preview new file mode 100644 index 000000000000..632176dce3e3 --- /dev/null +++ b/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderFromDragHandle.tsx.preview @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderInSameParent.js b/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderInSameParent.js new file mode 100644 index 000000000000..c105172ea3e9 --- /dev/null +++ b/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderInSameParent.js @@ -0,0 +1,53 @@ +import * as React from 'react'; +import Box from '@mui/material/Box'; + +import { RichTreeViewPro } from '@mui/x-tree-view-pro/RichTreeViewPro'; + +const MUI_X_PRODUCTS = [ + { + id: 'grid', + label: 'Data Grid', + children: [ + { id: 'grid-community', label: '@mui/x-data-grid' }, + { id: 'grid-pro', label: '@mui/x-data-grid-pro' }, + { id: 'grid-premium', label: '@mui/x-data-grid-premium' }, + ], + }, + { + id: 'pickers', + label: 'Date and Time Pickers', + children: [ + { id: 'pickers-community', label: '@mui/x-date-pickers' }, + { id: 'pickers-pro', label: '@mui/x-date-pickers-pro' }, + ], + }, + { + id: 'charts', + label: 'Charts', + children: [{ id: 'charts-community', label: '@mui/x-charts' }], + }, + { + id: 'tree-view', + label: 'Tree View', + children: [{ id: 'tree-view-community', label: '@mui/x-tree-view' }], + }, +]; + +export default function OnlyReorderInSameParent() { + return ( + + + params.oldPosition.parentId === params.newPosition.parentId + } + /> + + ); +} diff --git a/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderInSameParent.tsx b/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderInSameParent.tsx new file mode 100644 index 000000000000..c69e56fdfde4 --- /dev/null +++ b/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderInSameParent.tsx @@ -0,0 +1,53 @@ +import * as React from 'react'; +import Box from '@mui/material/Box'; +import { TreeViewBaseItem } from '@mui/x-tree-view/models'; +import { RichTreeViewPro } from '@mui/x-tree-view-pro/RichTreeViewPro'; + +const MUI_X_PRODUCTS: TreeViewBaseItem[] = [ + { + id: 'grid', + label: 'Data Grid', + children: [ + { id: 'grid-community', label: '@mui/x-data-grid' }, + { id: 'grid-pro', label: '@mui/x-data-grid-pro' }, + { id: 'grid-premium', label: '@mui/x-data-grid-premium' }, + ], + }, + { + id: 'pickers', + label: 'Date and Time Pickers', + children: [ + { id: 'pickers-community', label: '@mui/x-date-pickers' }, + { id: 'pickers-pro', label: '@mui/x-date-pickers-pro' }, + ], + }, + { + id: 'charts', + label: 'Charts', + children: [{ id: 'charts-community', label: '@mui/x-charts' }], + }, + { + id: 'tree-view', + label: 'Tree View', + children: [{ id: 'tree-view-community', label: '@mui/x-tree-view' }], + }, +]; + +export default function OnlyReorderInSameParent() { + return ( + + + params.oldPosition.parentId === params.newPosition.parentId + } + /> + + ); +} diff --git a/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderInSameParent.tsx.preview b/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderInSameParent.tsx.preview new file mode 100644 index 000000000000..726c958558b1 --- /dev/null +++ b/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderInSameParent.tsx.preview @@ -0,0 +1,12 @@ + + params.oldPosition.parentId === params.newPosition.parentId + } +/> \ No newline at end of file diff --git a/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderLeaves.js b/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderLeaves.js new file mode 100644 index 000000000000..ac3e351da44b --- /dev/null +++ b/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderLeaves.js @@ -0,0 +1,57 @@ +import * as React from 'react'; +import Box from '@mui/material/Box'; + +import { RichTreeViewPro } from '@mui/x-tree-view-pro/RichTreeViewPro'; +import { useTreeViewApiRef } from '@mui/x-tree-view/hooks'; + +const MUI_X_PRODUCTS = [ + { + id: 'grid', + label: 'Data Grid', + children: [ + { id: 'grid-community', label: '@mui/x-data-grid' }, + { id: 'grid-pro', label: '@mui/x-data-grid-pro' }, + { id: 'grid-premium', label: '@mui/x-data-grid-premium' }, + ], + }, + { + id: 'pickers', + label: 'Date and Time Pickers', + children: [ + { id: 'pickers-community', label: '@mui/x-date-pickers' }, + { id: 'pickers-pro', label: '@mui/x-date-pickers-pro' }, + ], + }, + { + id: 'charts', + label: 'Charts', + children: [{ id: 'charts-community', label: '@mui/x-charts' }], + }, + { + id: 'tree-view', + label: 'Tree View', + children: [{ id: 'tree-view-community', label: '@mui/x-tree-view' }], + }, +]; + +export default function OnlyReorderLeaves() { + const apiRef = useTreeViewApiRef(); + + return ( + + + apiRef.current.getItemOrderedChildrenIds(itemId).length === 0 + } + /> + + ); +} diff --git a/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderLeaves.tsx b/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderLeaves.tsx new file mode 100644 index 000000000000..551b2a805ef4 --- /dev/null +++ b/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderLeaves.tsx @@ -0,0 +1,57 @@ +import * as React from 'react'; +import Box from '@mui/material/Box'; +import { TreeViewBaseItem } from '@mui/x-tree-view/models'; +import { RichTreeViewPro } from '@mui/x-tree-view-pro/RichTreeViewPro'; +import { useTreeViewApiRef } from '@mui/x-tree-view/hooks'; + +const MUI_X_PRODUCTS: TreeViewBaseItem[] = [ + { + id: 'grid', + label: 'Data Grid', + children: [ + { id: 'grid-community', label: '@mui/x-data-grid' }, + { id: 'grid-pro', label: '@mui/x-data-grid-pro' }, + { id: 'grid-premium', label: '@mui/x-data-grid-premium' }, + ], + }, + { + id: 'pickers', + label: 'Date and Time Pickers', + children: [ + { id: 'pickers-community', label: '@mui/x-date-pickers' }, + { id: 'pickers-pro', label: '@mui/x-date-pickers-pro' }, + ], + }, + { + id: 'charts', + label: 'Charts', + children: [{ id: 'charts-community', label: '@mui/x-charts' }], + }, + { + id: 'tree-view', + label: 'Tree View', + children: [{ id: 'tree-view-community', label: '@mui/x-tree-view' }], + }, +]; + +export default function OnlyReorderLeaves() { + const apiRef = useTreeViewApiRef(); + + return ( + + + apiRef.current!.getItemOrderedChildrenIds(itemId).length === 0 + } + /> + + ); +} diff --git a/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderLeaves.tsx.preview b/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderLeaves.tsx.preview new file mode 100644 index 000000000000..8057c22fe961 --- /dev/null +++ b/docs/data/tree-view/rich-tree-view/ordering/OnlyReorderLeaves.tsx.preview @@ -0,0 +1,13 @@ + + apiRef.current!.getItemOrderedChildrenIds(itemId).length === 0 + } +/> \ No newline at end of file diff --git a/docs/data/tree-view/rich-tree-view/ordering/SendAllItemsToServer.js b/docs/data/tree-view/rich-tree-view/ordering/SendAllItemsToServer.js new file mode 100644 index 000000000000..1481b77bb83d --- /dev/null +++ b/docs/data/tree-view/rich-tree-view/ordering/SendAllItemsToServer.js @@ -0,0 +1,88 @@ +import * as React from 'react'; +import Box from '@mui/material/Box'; +import Stack from '@mui/material/Stack'; + +import { RichTreeViewPro } from '@mui/x-tree-view-pro/RichTreeViewPro'; +import { useTreeViewApiRef } from '@mui/x-tree-view/hooks'; + +const MUI_X_PRODUCTS = [ + { + id: 'grid', + label: 'Data Grid', + children: [ + { id: 'grid-community', label: '@mui/x-data-grid' }, + { id: 'grid-pro', label: '@mui/x-data-grid-pro' }, + { id: 'grid-premium', label: '@mui/x-data-grid-premium' }, + ], + }, + { + id: 'pickers', + label: 'Date and Time Pickers', + children: [ + { id: 'pickers-community', label: '@mui/x-date-pickers' }, + { id: 'pickers-pro', label: '@mui/x-date-pickers-pro' }, + ], + }, + { + id: 'charts', + label: 'Charts', + children: [{ id: 'charts-community', label: '@mui/x-charts' }], + }, + { + id: 'tree-view', + label: 'Tree View', + children: [{ id: 'tree-view-community', label: '@mui/x-tree-view' }], + }, +]; + +const getAllItemsWithChildrenItemIds = (items) => { + const itemIds = []; + const registerItemId = (item) => { + if (item.children?.length) { + itemIds.push(item.id); + item.children.forEach(registerItemId); + } + }; + + items.forEach(registerItemId); + + return itemIds; +}; + +export default function SendAllItemsToServer() { + const apiRefTreeViewA = useTreeViewApiRef(); + const [itemsTreeViewB, setItemsTreeViewB] = React.useState(MUI_X_PRODUCTS); + + const handleItemPositionChangeTreeViewA = () => { + // We need to wait for the new items to be updated in the state + setTimeout(() => { + const newItemsTreeViewA = apiRefTreeViewA.current.getItemTree(); + setItemsTreeViewB(newItemsTreeViewA); + }); + }; + + return ( + + + + + + true} + /> + + + ); +} diff --git a/docs/data/tree-view/rich-tree-view/ordering/SendAllItemsToServer.tsx b/docs/data/tree-view/rich-tree-view/ordering/SendAllItemsToServer.tsx new file mode 100644 index 000000000000..6f39404daf70 --- /dev/null +++ b/docs/data/tree-view/rich-tree-view/ordering/SendAllItemsToServer.tsx @@ -0,0 +1,88 @@ +import * as React from 'react'; +import Box from '@mui/material/Box'; +import Stack from '@mui/material/Stack'; +import { TreeViewBaseItem } from '@mui/x-tree-view/models'; +import { RichTreeViewPro } from '@mui/x-tree-view-pro/RichTreeViewPro'; +import { useTreeViewApiRef } from '@mui/x-tree-view/hooks'; + +const MUI_X_PRODUCTS: TreeViewBaseItem[] = [ + { + id: 'grid', + label: 'Data Grid', + children: [ + { id: 'grid-community', label: '@mui/x-data-grid' }, + { id: 'grid-pro', label: '@mui/x-data-grid-pro' }, + { id: 'grid-premium', label: '@mui/x-data-grid-premium' }, + ], + }, + { + id: 'pickers', + label: 'Date and Time Pickers', + children: [ + { id: 'pickers-community', label: '@mui/x-date-pickers' }, + { id: 'pickers-pro', label: '@mui/x-date-pickers-pro' }, + ], + }, + { + id: 'charts', + label: 'Charts', + children: [{ id: 'charts-community', label: '@mui/x-charts' }], + }, + { + id: 'tree-view', + label: 'Tree View', + children: [{ id: 'tree-view-community', label: '@mui/x-tree-view' }], + }, +]; + +const getAllItemsWithChildrenItemIds = (items: TreeViewBaseItem[]) => { + const itemIds: string[] = []; + const registerItemId = (item: TreeViewBaseItem) => { + if (item.children?.length) { + itemIds.push(item.id); + item.children.forEach(registerItemId); + } + }; + + items.forEach(registerItemId); + + return itemIds; +}; + +export default function SendAllItemsToServer() { + const apiRefTreeViewA = useTreeViewApiRef(); + const [itemsTreeViewB, setItemsTreeViewB] = React.useState(MUI_X_PRODUCTS); + + const handleItemPositionChangeTreeViewA = () => { + // We need to wait for the new items to be updated in the state + setTimeout(() => { + const newItemsTreeViewA = apiRefTreeViewA.current!.getItemTree(); + setItemsTreeViewB(newItemsTreeViewA); + }); + }; + + return ( + + + + + + true} + /> + + + ); +} diff --git a/docs/data/tree-view/rich-tree-view/ordering/ordering.md b/docs/data/tree-view/rich-tree-view/ordering/ordering.md new file mode 100644 index 000000000000..bdd78d0ff9ad --- /dev/null +++ b/docs/data/tree-view/rich-tree-view/ordering/ordering.md @@ -0,0 +1,72 @@ +--- +productId: x-tree-view +title: Rich Tree View - Ordering +components: RichTreeView, TreeItem2 +packageName: '@mui/x-tree-view' +githubLabel: 'component: tree view' +waiAria: https://www.w3.org/WAI/ARIA/apg/patterns/treeview/ +--- + +# Rich Tree View - Ordering [](/x/introduction/licensing/#pro-plan 'Pro plan') + +

Drag and drop your items to reorder them.

+ +:::success +To be able to reorder items, you first have to enable the `indentationAtItemLevel` and the `itemsReordering` experimental features: + +```tsx + +``` + +See [Tree Item Customization—Apply the nested item's indentation at the item level](/x/react-tree-view/tree-item-customization/#apply-the-nested-items-indentation-at-the-item-level) for more details. +::: + +## Enable drag & drop re-ordering + +You can enable the drag & drop re-ordering of items by setting the `itemsReordering` prop to `true`: + +{{"demo": "DragAndDrop.js"}} + +## Limit the re-ordering + +By default, all the items are reorderable. +You can prevent the re-ordering of some items using the `isItemReorderable` prop. +The following example shows how to only allow re-ordering of the leaves using the [`getItemOrderedChildrenIds`](/x/react-tree-view/rich-tree-view/items/#get-an-items-children-by-id) API method. + +{{"demo": "OnlyReorderLeaves.js"}} + +You can also limit the items in which an item can be dropped using the `canMoveItemToNewPosition` prop. +The following example shows how to only allow re-ordering inside the same parent: + +{{"demo": "OnlyReorderInSameParent.js"}} + +## React to an item re-ordering + +You can use the `onItemPositionChange` to send the new position of an item to your backend: + +{{"demo": "OnItemPositionChange.js"}} + +If you want to send the entire dataset to your backend, you can use the [`getItemTree`](/x/react-tree-view/rich-tree-view/items/#get-the-current-item-tree) API method. +The following demo demonstrates it by synchronizing the first tree view with the second one whenever you do a re-ordering: + +{{"demo": "SendAllItemsToServer.js"}} + +## Customization + +### Only trigger the reordering from a drag handle + +You can create a custom Tree Item component to render a drag handle icon and only trigger the reordering when dragging from it: + +{{"demo": "OnlyReorderFromDragHandle.js"}} + +## Common examples + +### File explorer + +The example below is a simplified version of the [File Explorer](/x/react-tree-view/rich-tree-view/customization/#file-explorer) example with drag & drop re-ordering. +You can re-order items but only inside folders (or inside the trash). + +{{"demo": "FileExplorer.js"}} diff --git a/docs/data/tree-view/rich-tree-view/selection/TrackItemSelectionToggle.js b/docs/data/tree-view/rich-tree-view/selection/TrackItemSelectionToggle.js index 9d310064592c..4a527ce73b8e 100644 --- a/docs/data/tree-view/rich-tree-view/selection/TrackItemSelectionToggle.js +++ b/docs/data/tree-view/rich-tree-view/selection/TrackItemSelectionToggle.js @@ -1,9 +1,8 @@ import * as React from 'react'; import Box from '@mui/material/Box'; import Stack from '@mui/material/Stack'; -import { RichTreeView } from '@mui/x-tree-view/RichTreeView'; - import Typography from '@mui/material/Typography'; +import { RichTreeView } from '@mui/x-tree-view/RichTreeView'; const MUI_X_PRODUCTS = [ { diff --git a/docs/data/tree-view/rich-tree-view/selection/TrackItemSelectionToggle.tsx b/docs/data/tree-view/rich-tree-view/selection/TrackItemSelectionToggle.tsx index 50893614cde5..987cfbc9ed44 100644 --- a/docs/data/tree-view/rich-tree-view/selection/TrackItemSelectionToggle.tsx +++ b/docs/data/tree-view/rich-tree-view/selection/TrackItemSelectionToggle.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; import Box from '@mui/material/Box'; import Stack from '@mui/material/Stack'; +import Typography from '@mui/material/Typography'; import { RichTreeView } from '@mui/x-tree-view/RichTreeView'; import { TreeViewBaseItem } from '@mui/x-tree-view/models'; -import Typography from '@mui/material/Typography'; const MUI_X_PRODUCTS: TreeViewBaseItem[] = [ { diff --git a/docs/data/tree-view/simple-tree-view/items/ApiMethodGetItemDOMElement.js b/docs/data/tree-view/simple-tree-view/items/ApiMethodGetItemDOMElement.js index 74e7dd11ca46..ba8ad12bd5f6 100644 --- a/docs/data/tree-view/simple-tree-view/items/ApiMethodGetItemDOMElement.js +++ b/docs/data/tree-view/simple-tree-view/items/ApiMethodGetItemDOMElement.js @@ -12,7 +12,7 @@ export default function ApiMethodGetItemDOMElement() { apiRef.current.focusItem(event, 'charts-community'); apiRef.current .getItemDOMElement('charts-community') - ?.scrollIntoView({ block: 'center' }); + ?.scrollIntoView({ block: 'nearest' }); }; return ( diff --git a/docs/data/tree-view/simple-tree-view/items/ApiMethodGetItemDOMElement.tsx b/docs/data/tree-view/simple-tree-view/items/ApiMethodGetItemDOMElement.tsx index 5d0e9d77ee8a..678a7093fa74 100644 --- a/docs/data/tree-view/simple-tree-view/items/ApiMethodGetItemDOMElement.tsx +++ b/docs/data/tree-view/simple-tree-view/items/ApiMethodGetItemDOMElement.tsx @@ -12,7 +12,7 @@ export default function ApiMethodGetItemDOMElement() { apiRef.current!.focusItem(event, 'charts-community'); apiRef .current!.getItemDOMElement('charts-community') - ?.scrollIntoView({ block: 'center' }); + ?.scrollIntoView({ block: 'nearest' }); }; return ( diff --git a/docs/data/tree-view/simple-tree-view/items/OnItemClick.js b/docs/data/tree-view/simple-tree-view/items/OnItemClick.js new file mode 100644 index 000000000000..6554729941dc --- /dev/null +++ b/docs/data/tree-view/simple-tree-view/items/OnItemClick.js @@ -0,0 +1,39 @@ +import * as React from 'react'; +import Box from '@mui/material/Box'; +import Stack from '@mui/material/Stack'; +import Typography from '@mui/material/Typography'; +import { SimpleTreeView } from '@mui/x-tree-view/SimpleTreeView'; +import { TreeItem } from '@mui/x-tree-view/TreeItem'; + +export default function OnItemClick() { + const [lastClickedItem, setLastClickedItem] = React.useState(null); + + return ( + + + {lastClickedItem == null + ? 'No item click recorded' + : `Last clicked item: ${lastClickedItem}`} + + + setLastClickedItem(itemId)}> + + + + + + + + + + + + + + + + + + + ); +} diff --git a/docs/data/tree-view/simple-tree-view/items/OnItemClick.tsx b/docs/data/tree-view/simple-tree-view/items/OnItemClick.tsx new file mode 100644 index 000000000000..1340a787f1a9 --- /dev/null +++ b/docs/data/tree-view/simple-tree-view/items/OnItemClick.tsx @@ -0,0 +1,39 @@ +import * as React from 'react'; +import Box from '@mui/material/Box'; +import Stack from '@mui/material/Stack'; +import Typography from '@mui/material/Typography'; +import { SimpleTreeView } from '@mui/x-tree-view/SimpleTreeView'; +import { TreeItem } from '@mui/x-tree-view/TreeItem'; + +export default function OnItemClick() { + const [lastClickedItem, setLastClickedItem] = React.useState(null); + + return ( + + + {lastClickedItem == null + ? 'No item click recorded' + : `Last clicked item: ${lastClickedItem}`} + + + setLastClickedItem(itemId)}> + + + + + + + + + + + + + + + + + + + ); +} diff --git a/docs/data/tree-view/simple-tree-view/items/items.md b/docs/data/tree-view/simple-tree-view/items/items.md index efffddcf5574..755b162c915d 100644 --- a/docs/data/tree-view/simple-tree-view/items/items.md +++ b/docs/data/tree-view/simple-tree-view/items/items.md @@ -74,6 +74,12 @@ When it's set to true: {{"demo": "DisabledItemsFocusable.js", "defaultCodeOpen": false}} +## Track item clicks + +Use the `onItemClick` prop to track the clicked item: + +{{"demo": "OnItemClick.js"}} + ## Imperative API ### Get an item's DOM element by ID diff --git a/docs/data/tree-view/simple-tree-view/selection/TrackItemSelectionToggle.js b/docs/data/tree-view/simple-tree-view/selection/TrackItemSelectionToggle.js index a42fbf9f74a7..32a2df8674ce 100644 --- a/docs/data/tree-view/simple-tree-view/selection/TrackItemSelectionToggle.js +++ b/docs/data/tree-view/simple-tree-view/selection/TrackItemSelectionToggle.js @@ -1,9 +1,9 @@ import * as React from 'react'; import Box from '@mui/material/Box'; import Stack from '@mui/material/Stack'; +import Typography from '@mui/material/Typography'; import { SimpleTreeView } from '@mui/x-tree-view/SimpleTreeView'; import { TreeItem } from '@mui/x-tree-view/TreeItem'; -import Typography from '@mui/material/Typography'; export default function TrackItemSelectionToggle() { const [lastSelectedItem, setLastSelectedItem] = React.useState(null); diff --git a/docs/data/tree-view/simple-tree-view/selection/TrackItemSelectionToggle.tsx b/docs/data/tree-view/simple-tree-view/selection/TrackItemSelectionToggle.tsx index 665c44a496fc..e13f86336676 100644 --- a/docs/data/tree-view/simple-tree-view/selection/TrackItemSelectionToggle.tsx +++ b/docs/data/tree-view/simple-tree-view/selection/TrackItemSelectionToggle.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; import Box from '@mui/material/Box'; import Stack from '@mui/material/Stack'; +import Typography from '@mui/material/Typography'; import { SimpleTreeView } from '@mui/x-tree-view/SimpleTreeView'; import { TreeItem } from '@mui/x-tree-view/TreeItem'; -import Typography from '@mui/material/Typography'; export default function TrackItemSelectionToggle() { const [lastSelectedItem, setLastSelectedItem] = React.useState( diff --git a/docs/next.config.mjs b/docs/next.config.mjs index de1ede2b32f4..53ca7e886098 100644 --- a/docs/next.config.mjs +++ b/docs/next.config.mjs @@ -36,6 +36,8 @@ const WORKSPACE_ALIASES = { '@mui/x-date-pickers': path.resolve(WORKSPACE_ROOT, './packages/x-date-pickers/src'), '@mui/x-date-pickers-pro': path.resolve(WORKSPACE_ROOT, './packages/x-date-pickers-pro/src'), '@mui/x-charts': path.resolve(WORKSPACE_ROOT, './packages/x-charts/src'), + '@mui/x-charts-pro': path.resolve(WORKSPACE_ROOT, './packages/x-charts-pro/src'), + '@mui/x-charts-vendor': path.resolve(WORKSPACE_ROOT, './packages/x-charts-vendor'), '@mui/x-tree-view': path.resolve(WORKSPACE_ROOT, './packages/x-tree-view/src'), '@mui/x-tree-view-pro': path.resolve(WORKSPACE_ROOT, './packages/x-tree-view-pro/src'), '@mui/x-license': path.resolve(WORKSPACE_ROOT, './packages/x-license/src'), diff --git a/docs/package.json b/docs/package.json index 8e3fcd72bdb2..1c2da4954612 100644 --- a/docs/package.json +++ b/docs/package.json @@ -19,25 +19,25 @@ "populate:demos": "tsx scripts/populatePickersDemos" }, "dependencies": { - "@babel/core": "^7.24.8", - "@babel/runtime": "^7.24.8", - "@babel/runtime-corejs2": "^7.24.8", - "@docsearch/react": "^3.6.0", - "@emotion/cache": "^11.11.0", - "@emotion/react": "^11.11.4", + "@babel/core": "^7.25.2", + "@babel/runtime": "^7.25.0", + "@babel/runtime-corejs2": "^7.25.0", + "@docsearch/react": "^3.6.1", + "@emotion/cache": "^11.13.1", + "@emotion/react": "^11.13.0", "@emotion/server": "^11.11.0", - "@emotion/styled": "^11.11.5", - "@mui/base": "^5.0.0-beta.40", - "@mui/docs": "6.0.0-beta.2", - "@mui/icons-material": "^5.16.2", + "@emotion/styled": "^11.13.0", + "@mui/docs": "6.0.0-beta.4", + "@mui/icons-material": "^5.16.5", "@mui/joy": "^5.0.0-beta.48", - "@mui/lab": "^5.0.0-alpha.172", - "@mui/material": "^5.16.2", - "@mui/material-nextjs": "^5.15.11", - "@mui/styles": "^5.16.2", - "@mui/system": "^5.16.2", - "@mui/utils": "^5.16.2", + "@mui/lab": "^5.0.0-alpha.173", + "@mui/material": "^5.16.5", + "@mui/material-nextjs": "^5.16.4", + "@mui/styles": "^5.16.5", + "@mui/system": "^5.16.5", + "@mui/utils": "^5.16.5", "@mui/x-charts": "workspace:*", + "@mui/x-charts-vendor": "workspace:*", "@mui/x-data-grid": "workspace:*", "@mui/x-data-grid-generator": "workspace:*", "@mui/x-data-grid-premium": "workspace:*", @@ -45,8 +45,8 @@ "@mui/x-date-pickers": "workspace:*", "@mui/x-date-pickers-pro": "workspace:*", "@mui/x-tree-view": "workspace:*", - "@react-spring/web": "^9.7.3", - "@tanstack/query-core": "^5.50.1", + "@react-spring/web": "^9.7.4", + "@tanstack/query-core": "^5.51.15", "ast-types": "^0.14.2", "autoprefixer": "^10.4.19", "babel-plugin-module-resolver": "^5.0.2", @@ -65,7 +65,6 @@ "date-fns-jalali": "^2.30.0-0", "dayjs": "^1.11.11", "doctrine": "^3.0.0", - "d3-scale-chromatic": "^3.1.0", "exceljs": "^4.4.0", "fg-loadcss": "^3.1.0", "jscodeshift": "0.16.1", @@ -74,12 +73,12 @@ "lz-string": "^1.5.0", "markdown-to-jsx": "^7.4.7", "moment": "^2.30.1", - "moment-hijri": "^2.1.2", + "moment-hijri": "^2.30.0", "moment-jalaali": "^0.10.1", "moment-timezone": "^0.5.45", "next": "^14.2.5", "nprogress": "^0.2.0", - "postcss": "^8.4.39", + "postcss": "^8.4.40", "prismjs": "^1.29.0", "prop-types": "^15.8.1", "react": "^18.3.1", @@ -87,28 +86,29 @@ "react-dom": "^18.3.1", "react-hook-form": "^7.52.1", "react-is": "^18.3.1", - "react-router": "^6.24.1", - "react-router-dom": "^6.24.1", + "react-router": "^6.25.1", + "react-router-dom": "^6.25.1", "react-runner": "^1.0.5", "react-simple-code-editor": "^0.14.1", "recast": "^0.23.9", - "rimraf": "^5.0.8", + "rimraf": "^5.0.9", "rxjs": "^7.8.1", - "styled-components": "^6.1.11", + "styled-components": "^6.1.12", "stylis": "^4.3.2", "stylis-plugin-rtl": "^2.1.1", "webpack-bundle-analyzer": "^4.10.2" }, "devDependencies": { - "@babel/plugin-transform-react-constant-elements": "^7.24.7", + "@babel/plugin-transform-react-constant-elements": "^7.25.1", "@babel/preset-typescript": "^7.24.7", - "@mui/internal-docs-utils": "^1.0.7", - "@mui/internal-scripts": "^1.0.12", + "@mui/internal-docs-utils": "^1.0.8", + "@mui/internal-scripts": "^1.0.13", "@types/chance": "^1.1.6", "@types/d3-scale": "^4.0.8", "@types/d3-scale-chromatic": "^3.0.3", "@types/doctrine": "^0.0.9", - "@types/lodash": "^4.17.6", + "@types/gtag.js": "^0.0.20", + "@types/lodash": "^4.17.7", "@types/luxon": "^3.4.2", "@types/moment-hijri": "^2.1.4", "@types/moment-jalaali": "^0.7.9", diff --git a/docs/pages/x/api/charts/bar-chart.json b/docs/pages/x/api/charts/bar-chart.json index d578934f13e0..2e7d219fdfdc 100644 --- a/docs/pages/x/api/charts/bar-chart.json +++ b/docs/pages/x/api/charts/bar-chart.json @@ -99,13 +99,13 @@ "xAxis": { "type": { "name": "arrayOf", - "description": "Array<{ axisId?: number
| string, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } }, "yAxis": { "type": { "name": "arrayOf", - "description": "Array<{ axisId?: number
| string, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } } }, diff --git a/docs/pages/x/api/charts/bar-series-type.json b/docs/pages/x/api/charts/bar-series-type.json index a683fd1d7ca5..cf2252d4cc89 100644 --- a/docs/pages/x/api/charts/bar-series-type.json +++ b/docs/pages/x/api/charts/bar-series-type.json @@ -16,7 +16,9 @@ "stackOffset": { "type": { "description": "StackOffsetType" }, "default": "'diverging'" }, "stackOrder": { "type": { "description": "StackOrderType" }, "default": "'none'" }, "valueFormatter": { "type": { "description": "SeriesValueFormatter<TValue>" } }, + "xAxisId": { "type": { "description": "string" } }, "xAxisKey": { "type": { "description": "string" } }, + "yAxisId": { "type": { "description": "string" } }, "yAxisKey": { "type": { "description": "string" } } } } diff --git a/docs/pages/x/api/charts/chart-container-pro.json b/docs/pages/x/api/charts/chart-container-pro.json index 85cd769e2e54..5ac5c1b78337 100644 --- a/docs/pages/x/api/charts/chart-container-pro.json +++ b/docs/pages/x/api/charts/chart-container-pro.json @@ -32,17 +32,24 @@ "describedArgs": ["highlightedItem"] } }, + "onZoomChange": { + "type": { "name": "func" }, + "signature": { + "type": "function(zoomData: Array) => void", + "describedArgs": ["zoomData"] + } + }, "plugins": { "type": { "name": "arrayOf", "description": "Array<object>" } }, "xAxis": { "type": { "name": "arrayOf", - "description": "Array<{ axisId?: number
| string, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" } }, "yAxis": { "type": { "name": "arrayOf", - "description": "Array<{ axisId?: number
| string, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" } }, "zAxis": { @@ -50,6 +57,12 @@ "name": "arrayOf", "description": "Array<{ colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, id?: string, max?: number, min?: number }>" } + }, + "zoom": { + "type": { + "name": "arrayOf", + "description": "Array<{ axisId: number
| string, end: number, start: number }>" + } } }, "name": "ChartContainerPro", diff --git a/docs/pages/x/api/charts/chart-container.json b/docs/pages/x/api/charts/chart-container.json index 3777445516b8..3a78a1ef89b5 100644 --- a/docs/pages/x/api/charts/chart-container.json +++ b/docs/pages/x/api/charts/chart-container.json @@ -36,13 +36,13 @@ "xAxis": { "type": { "name": "arrayOf", - "description": "Array<{ axisId?: number
| string, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } }, "yAxis": { "type": { "name": "arrayOf", - "description": "Array<{ axisId?: number
| string, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } }, "zAxis": { diff --git a/docs/pages/x/api/charts/default-heatmap-tooltip.json b/docs/pages/x/api/charts/default-heatmap-tooltip.json index 4a187f652ccc..fc5ce2bb3c83 100644 --- a/docs/pages/x/api/charts/default-heatmap-tooltip.json +++ b/docs/pages/x/api/charts/default-heatmap-tooltip.json @@ -81,6 +81,6 @@ "muiName": "MuiDefaultHeatmapTooltip", "filename": "/packages/x-charts-pro/src/Heatmap/DefaultHeatmapTooltip.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/x/api/charts/heatmap-item.json b/docs/pages/x/api/charts/heatmap-item.json index a924c31e0f10..e05b59240c97 100644 --- a/docs/pages/x/api/charts/heatmap-item.json +++ b/docs/pages/x/api/charts/heatmap-item.json @@ -24,6 +24,6 @@ "muiName": "MuiHeatmapItem", "filename": "/packages/x-charts-pro/src/Heatmap/HeatmapItem.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/x/api/charts/heatmap-plot.json b/docs/pages/x/api/charts/heatmap-plot.json index 7220a386a699..63eddc26e7d7 100644 --- a/docs/pages/x/api/charts/heatmap-plot.json +++ b/docs/pages/x/api/charts/heatmap-plot.json @@ -16,6 +16,6 @@ "muiName": "MuiHeatmapPlot", "filename": "/packages/x-charts-pro/src/Heatmap/HeatmapPlot.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/x/api/charts/heatmap.json b/docs/pages/x/api/charts/heatmap.json index 5cc4ec4b7c5a..fb2e2656976a 100644 --- a/docs/pages/x/api/charts/heatmap.json +++ b/docs/pages/x/api/charts/heatmap.json @@ -7,14 +7,14 @@ "xAxis": { "type": { "name": "arrayOf", - "description": "Array<{ axisId?: number
| string, barGapRatio?: number, categoryGapRatio?: number, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" + "description": "Array<{ barGapRatio?: number, categoryGapRatio?: number, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" }, "required": true }, "yAxis": { "type": { "name": "arrayOf", - "description": "Array<{ axisId?: number
| string, barGapRatio?: number, categoryGapRatio?: number, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" + "description": "Array<{ barGapRatio?: number, categoryGapRatio?: number, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" }, "required": true }, @@ -168,6 +168,6 @@ "muiName": "MuiHeatmap", "filename": "/packages/x-charts-pro/src/Heatmap/Heatmap.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/x/api/charts/line-chart.json b/docs/pages/x/api/charts/line-chart.json index 85bd33e1b061..f146dd6804d5 100644 --- a/docs/pages/x/api/charts/line-chart.json +++ b/docs/pages/x/api/charts/line-chart.json @@ -92,13 +92,13 @@ "xAxis": { "type": { "name": "arrayOf", - "description": "Array<{ axisId?: number
| string, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } }, "yAxis": { "type": { "name": "arrayOf", - "description": "Array<{ axisId?: number
| string, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } } }, diff --git a/docs/pages/x/api/charts/line-series-type.json b/docs/pages/x/api/charts/line-series-type.json index 161415302468..8043690cf449 100644 --- a/docs/pages/x/api/charts/line-series-type.json +++ b/docs/pages/x/api/charts/line-series-type.json @@ -20,7 +20,9 @@ "stackOffset": { "type": { "description": "StackOffsetType" }, "default": "'none'" }, "stackOrder": { "type": { "description": "StackOrderType" }, "default": "'none'" }, "valueFormatter": { "type": { "description": "SeriesValueFormatter<TValue>" } }, + "xAxisId": { "type": { "description": "string" } }, "xAxisKey": { "type": { "description": "string" } }, + "yAxisId": { "type": { "description": "string" } }, "yAxisKey": { "type": { "description": "string" } } } } diff --git a/docs/pages/x/api/charts/pie-chart.json b/docs/pages/x/api/charts/pie-chart.json index 06f71fd3330b..42ad6eed68d5 100644 --- a/docs/pages/x/api/charts/pie-chart.json +++ b/docs/pages/x/api/charts/pie-chart.json @@ -88,13 +88,13 @@ "xAxis": { "type": { "name": "arrayOf", - "description": "Array<{ axisId?: number
| string, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } }, "yAxis": { "type": { "name": "arrayOf", - "description": "Array<{ axisId?: number
| string, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } } }, diff --git a/docs/pages/x/api/charts/responsive-chart-container-pro.json b/docs/pages/x/api/charts/responsive-chart-container-pro.json index c404bc2fd96b..c38d3cf3be32 100644 --- a/docs/pages/x/api/charts/responsive-chart-container-pro.json +++ b/docs/pages/x/api/charts/responsive-chart-container-pro.json @@ -31,18 +31,25 @@ "describedArgs": ["highlightedItem"] } }, + "onZoomChange": { + "type": { "name": "func" }, + "signature": { + "type": "function(zoomData: Array) => void", + "describedArgs": ["zoomData"] + } + }, "plugins": { "type": { "name": "arrayOf", "description": "Array<object>" } }, "width": { "type": { "name": "number" } }, "xAxis": { "type": { "name": "arrayOf", - "description": "Array<{ axisId?: number
| string, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" } }, "yAxis": { "type": { "name": "arrayOf", - "description": "Array<{ axisId?: number
| string, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" } }, "zAxis": { @@ -50,6 +57,12 @@ "name": "arrayOf", "description": "Array<{ colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, id?: string, max?: number, min?: number }>" } + }, + "zoom": { + "type": { + "name": "arrayOf", + "description": "Array<{ axisId: number
| string, end: number, start: number }>" + } } }, "name": "ResponsiveChartContainerPro", diff --git a/docs/pages/x/api/charts/responsive-chart-container.json b/docs/pages/x/api/charts/responsive-chart-container.json index 50f9fdcd769b..38b6f6e9bf8f 100644 --- a/docs/pages/x/api/charts/responsive-chart-container.json +++ b/docs/pages/x/api/charts/responsive-chart-container.json @@ -36,13 +36,13 @@ "xAxis": { "type": { "name": "arrayOf", - "description": "Array<{ axisId?: number
| string, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } }, "yAxis": { "type": { "name": "arrayOf", - "description": "Array<{ axisId?: number
| string, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } }, "zAxis": { diff --git a/docs/pages/x/api/charts/scatter-chart-pro.json b/docs/pages/x/api/charts/scatter-chart-pro.json index dbe112e7cf9b..17da9ca377a6 100644 --- a/docs/pages/x/api/charts/scatter-chart-pro.json +++ b/docs/pages/x/api/charts/scatter-chart-pro.json @@ -62,6 +62,13 @@ "describedArgs": ["event", "scatterItemIdentifier"] } }, + "onZoomChange": { + "type": { "name": "func" }, + "signature": { + "type": "function(zoomData: Array) => void", + "describedArgs": ["zoomData"] + } + }, "rightAxis": { "type": { "name": "union", "description": "object
| string" }, "default": "null" @@ -89,13 +96,13 @@ "xAxis": { "type": { "name": "arrayOf", - "description": "Array<{ axisId?: number
| string, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" } }, "yAxis": { "type": { "name": "arrayOf", - "description": "Array<{ axisId?: number
| string, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" } }, "zAxis": { @@ -103,6 +110,12 @@ "name": "arrayOf", "description": "Array<{ colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, id?: string, max?: number, min?: number }>" } + }, + "zoom": { + "type": { + "name": "arrayOf", + "description": "Array<{ axisId: number
| string, end: number, start: number }>" + } } }, "name": "ScatterChartPro", diff --git a/docs/pages/x/api/charts/scatter-chart.json b/docs/pages/x/api/charts/scatter-chart.json index 30c0942ca778..f3aa2e2e027f 100644 --- a/docs/pages/x/api/charts/scatter-chart.json +++ b/docs/pages/x/api/charts/scatter-chart.json @@ -89,13 +89,13 @@ "xAxis": { "type": { "name": "arrayOf", - "description": "Array<{ axisId?: number
| string, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } }, "yAxis": { "type": { "name": "arrayOf", - "description": "Array<{ axisId?: number
| string, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } }, "zAxis": { diff --git a/docs/pages/x/api/charts/scatter-series-type.json b/docs/pages/x/api/charts/scatter-series-type.json index 6e8504bb14fc..7488c7cc1a37 100644 --- a/docs/pages/x/api/charts/scatter-series-type.json +++ b/docs/pages/x/api/charts/scatter-series-type.json @@ -13,8 +13,11 @@ }, "markerSize": { "type": { "description": "number" } }, "valueFormatter": { "type": { "description": "SeriesValueFormatter<TValue>" } }, + "xAxisId": { "type": { "description": "string" } }, "xAxisKey": { "type": { "description": "string" } }, + "yAxisId": { "type": { "description": "string" } }, "yAxisKey": { "type": { "description": "string" } }, + "zAxisId": { "type": { "description": "string" } }, "zAxisKey": { "type": { "description": "string" } } } } diff --git a/docs/pages/x/api/charts/spark-line-chart.json b/docs/pages/x/api/charts/spark-line-chart.json index 54fb323ea2da..ffdba7744836 100644 --- a/docs/pages/x/api/charts/spark-line-chart.json +++ b/docs/pages/x/api/charts/spark-line-chart.json @@ -57,13 +57,13 @@ "xAxis": { "type": { "name": "shape", - "description": "{ axisId?: number
| string, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }" + "description": "{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }" } }, "yAxis": { "type": { "name": "shape", - "description": "{ axisId?: number
| string, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }" + "description": "{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }" } } }, diff --git a/docs/pages/x/api/date-pickers/date-calendar.json b/docs/pages/x/api/date-pickers/date-calendar.json index 8e87fd1c8c02..6b4dd0199c54 100644 --- a/docs/pages/x/api/date-pickers/date-calendar.json +++ b/docs/pages/x/api/date-pickers/date-calendar.json @@ -25,8 +25,8 @@ } }, "loading": { "type": { "name": "bool" }, "default": "false" }, - "maxDate": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "monthsPerRow": { "type": { "name": "enum", "description": "3
| 4" }, "default": "3" diff --git a/docs/pages/x/api/date-pickers/date-field.json b/docs/pages/x/api/date-pickers/date-field.json index 92c14caf83d9..6aa1c3a910ad 100644 --- a/docs/pages/x/api/date-pickers/date-field.json +++ b/docs/pages/x/api/date-pickers/date-field.json @@ -36,8 +36,8 @@ }, "default": "'none'" }, - "maxDate": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "name": { "type": { "name": "string" } }, "onChange": { "type": { "name": "func" }, diff --git a/docs/pages/x/api/date-pickers/date-picker.json b/docs/pages/x/api/date-pickers/date-picker.json index 565af5531312..11f66d860b1c 100644 --- a/docs/pages/x/api/date-pickers/date-picker.json +++ b/docs/pages/x/api/date-pickers/date-picker.json @@ -35,8 +35,8 @@ "label": { "type": { "name": "node" } }, "loading": { "type": { "name": "bool" }, "default": "false" }, "localeText": { "type": { "name": "object" } }, - "maxDate": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "monthsPerRow": { "type": { "name": "enum", "description": "3
| 4" }, "default": "3" @@ -236,7 +236,7 @@ { "name": "desktopTrapFocus", "description": "Custom component for trapping the focus inside the views on desktop.", - "default": "FocusTrap from '@mui/base'.", + "default": "TrapFocus from '@mui/material'.", "class": null }, { diff --git a/docs/pages/x/api/date-pickers/date-range-calendar.json b/docs/pages/x/api/date-pickers/date-range-calendar.json index ab3d28ca3241..de5a31671d26 100644 --- a/docs/pages/x/api/date-pickers/date-range-calendar.json +++ b/docs/pages/x/api/date-pickers/date-range-calendar.json @@ -38,8 +38,8 @@ "fixedWeekNumber": { "type": { "name": "number" } }, "focusedView": { "type": { "name": "enum", "description": "'day'" } }, "loading": { "type": { "name": "bool" }, "default": "false" }, - "maxDate": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "onChange": { "type": { "name": "func" }, "signature": { diff --git a/docs/pages/x/api/date-pickers/date-range-picker.json b/docs/pages/x/api/date-pickers/date-range-picker.json index aee31355d359..ac4355088980 100644 --- a/docs/pages/x/api/date-pickers/date-range-picker.json +++ b/docs/pages/x/api/date-pickers/date-range-picker.json @@ -49,8 +49,8 @@ "label": { "type": { "name": "node" } }, "loading": { "type": { "name": "bool" }, "default": "false" }, "localeText": { "type": { "name": "object" } }, - "maxDate": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "name": { "type": { "name": "string" } }, "onAccept": { "type": { "name": "func" }, @@ -202,7 +202,7 @@ { "name": "desktopTrapFocus", "description": "Custom component for trapping the focus inside the views on desktop.", - "default": "FocusTrap from '@mui/base'.", + "default": "TrapFocus from '@mui/material'.", "class": null }, { diff --git a/docs/pages/x/api/date-pickers/date-time-field.json b/docs/pages/x/api/date-pickers/date-time-field.json index db1735ef6db8..28e462156626 100644 --- a/docs/pages/x/api/date-pickers/date-time-field.json +++ b/docs/pages/x/api/date-pickers/date-time-field.json @@ -38,10 +38,10 @@ }, "default": "'none'" }, - "maxDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, "maxDateTime": { "type": { "name": "object" } }, "maxTime": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "minDateTime": { "type": { "name": "object" } }, "minTime": { "type": { "name": "object" } }, "minutesStep": { "type": { "name": "number" }, "default": "1" }, diff --git a/docs/pages/x/api/date-pickers/date-time-picker.json b/docs/pages/x/api/date-pickers/date-time-picker.json index a7487d7b5259..4186360ab270 100644 --- a/docs/pages/x/api/date-pickers/date-time-picker.json +++ b/docs/pages/x/api/date-pickers/date-time-picker.json @@ -38,10 +38,10 @@ "label": { "type": { "name": "node" } }, "loading": { "type": { "name": "bool" }, "default": "false" }, "localeText": { "type": { "name": "object" } }, - "maxDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, "maxDateTime": { "type": { "name": "object" } }, "maxTime": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "minDateTime": { "type": { "name": "object" } }, "minTime": { "type": { "name": "object" } }, "minutesStep": { "type": { "name": "number" }, "default": "1" }, @@ -264,7 +264,7 @@ { "name": "desktopTrapFocus", "description": "Custom component for trapping the focus inside the views on desktop.", - "default": "FocusTrap from '@mui/base'.", + "default": "TrapFocus from '@mui/material'.", "class": null }, { diff --git a/docs/pages/x/api/date-pickers/date-time-range-picker.json b/docs/pages/x/api/date-pickers/date-time-range-picker.json index b39cb3202622..ebbb2d916315 100644 --- a/docs/pages/x/api/date-pickers/date-time-range-picker.json +++ b/docs/pages/x/api/date-pickers/date-time-range-picker.json @@ -51,10 +51,10 @@ "label": { "type": { "name": "node" } }, "loading": { "type": { "name": "bool" }, "default": "false" }, "localeText": { "type": { "name": "object" } }, - "maxDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, "maxDateTime": { "type": { "name": "object" } }, "maxTime": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "minDateTime": { "type": { "name": "object" } }, "minTime": { "type": { "name": "object" } }, "minutesStep": { "type": { "name": "number" }, "default": "1" }, @@ -253,7 +253,7 @@ { "name": "desktopTrapFocus", "description": "Custom component for trapping the focus inside the views on desktop.", - "default": "FocusTrap from '@mui/base'.", + "default": "TrapFocus from '@mui/material'.", "class": null }, { diff --git a/docs/pages/x/api/date-pickers/desktop-date-picker.json b/docs/pages/x/api/date-pickers/desktop-date-picker.json index 681a292e96b4..c9f5528a3a66 100644 --- a/docs/pages/x/api/date-pickers/desktop-date-picker.json +++ b/docs/pages/x/api/date-pickers/desktop-date-picker.json @@ -31,8 +31,8 @@ "label": { "type": { "name": "node" } }, "loading": { "type": { "name": "bool" }, "default": "false" }, "localeText": { "type": { "name": "object" } }, - "maxDate": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "monthsPerRow": { "type": { "name": "enum", "description": "3
| 4" }, "default": "3" @@ -232,7 +232,7 @@ { "name": "desktopTrapFocus", "description": "Custom component for trapping the focus inside the views on desktop.", - "default": "FocusTrap from '@mui/base'.", + "default": "TrapFocus from '@mui/material'.", "class": null }, { diff --git a/docs/pages/x/api/date-pickers/desktop-date-range-picker.json b/docs/pages/x/api/date-pickers/desktop-date-range-picker.json index 7332df722a1c..f4aec3a80bb5 100644 --- a/docs/pages/x/api/date-pickers/desktop-date-range-picker.json +++ b/docs/pages/x/api/date-pickers/desktop-date-range-picker.json @@ -45,8 +45,8 @@ "label": { "type": { "name": "node" } }, "loading": { "type": { "name": "bool" }, "default": "false" }, "localeText": { "type": { "name": "object" } }, - "maxDate": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "name": { "type": { "name": "string" } }, "onAccept": { "type": { "name": "func" }, @@ -198,7 +198,7 @@ { "name": "desktopTrapFocus", "description": "Custom component for trapping the focus inside the views on desktop.", - "default": "FocusTrap from '@mui/base'.", + "default": "TrapFocus from '@mui/material'.", "class": null }, { "name": "field", "description": "", "class": null }, diff --git a/docs/pages/x/api/date-pickers/desktop-date-time-picker.json b/docs/pages/x/api/date-pickers/desktop-date-time-picker.json index 0c740b7970ab..ba0848986a20 100644 --- a/docs/pages/x/api/date-pickers/desktop-date-time-picker.json +++ b/docs/pages/x/api/date-pickers/desktop-date-time-picker.json @@ -34,10 +34,10 @@ "label": { "type": { "name": "node" } }, "loading": { "type": { "name": "bool" }, "default": "false" }, "localeText": { "type": { "name": "object" } }, - "maxDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, "maxDateTime": { "type": { "name": "object" } }, "maxTime": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "minDateTime": { "type": { "name": "object" } }, "minTime": { "type": { "name": "object" } }, "minutesStep": { "type": { "name": "number" }, "default": "1" }, @@ -260,7 +260,7 @@ { "name": "desktopTrapFocus", "description": "Custom component for trapping the focus inside the views on desktop.", - "default": "FocusTrap from '@mui/base'.", + "default": "TrapFocus from '@mui/material'.", "class": null }, { diff --git a/docs/pages/x/api/date-pickers/desktop-date-time-range-picker.json b/docs/pages/x/api/date-pickers/desktop-date-time-range-picker.json index 1ad8d15b25b0..39ea91b009e3 100644 --- a/docs/pages/x/api/date-pickers/desktop-date-time-range-picker.json +++ b/docs/pages/x/api/date-pickers/desktop-date-time-range-picker.json @@ -47,10 +47,10 @@ "label": { "type": { "name": "node" } }, "loading": { "type": { "name": "bool" }, "default": "false" }, "localeText": { "type": { "name": "object" } }, - "maxDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, "maxDateTime": { "type": { "name": "object" } }, "maxTime": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "minDateTime": { "type": { "name": "object" } }, "minTime": { "type": { "name": "object" } }, "minutesStep": { "type": { "name": "number" }, "default": "1" }, @@ -249,7 +249,7 @@ { "name": "desktopTrapFocus", "description": "Custom component for trapping the focus inside the views on desktop.", - "default": "FocusTrap from '@mui/base'.", + "default": "TrapFocus from '@mui/material'.", "class": null }, { diff --git a/docs/pages/x/api/date-pickers/desktop-time-picker.json b/docs/pages/x/api/date-pickers/desktop-time-picker.json index 9e0778a668a3..5ed580f886e8 100644 --- a/docs/pages/x/api/date-pickers/desktop-time-picker.json +++ b/docs/pages/x/api/date-pickers/desktop-time-picker.json @@ -181,7 +181,7 @@ { "name": "desktopTrapFocus", "description": "Custom component for trapping the focus inside the views on desktop.", - "default": "FocusTrap from '@mui/base'.", + "default": "TrapFocus from '@mui/material'.", "class": null }, { diff --git a/docs/pages/x/api/date-pickers/mobile-date-picker.json b/docs/pages/x/api/date-pickers/mobile-date-picker.json index 3503311d4c00..f61852ff2104 100644 --- a/docs/pages/x/api/date-pickers/mobile-date-picker.json +++ b/docs/pages/x/api/date-pickers/mobile-date-picker.json @@ -31,8 +31,8 @@ "label": { "type": { "name": "node" } }, "loading": { "type": { "name": "bool" }, "default": "false" }, "localeText": { "type": { "name": "object" } }, - "maxDate": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "monthsPerRow": { "type": { "name": "enum", "description": "3
| 4" }, "default": "3" diff --git a/docs/pages/x/api/date-pickers/mobile-date-range-picker.json b/docs/pages/x/api/date-pickers/mobile-date-range-picker.json index 99680c68462a..72322d7e8bcb 100644 --- a/docs/pages/x/api/date-pickers/mobile-date-range-picker.json +++ b/docs/pages/x/api/date-pickers/mobile-date-range-picker.json @@ -41,8 +41,8 @@ "label": { "type": { "name": "node" } }, "loading": { "type": { "name": "bool" }, "default": "false" }, "localeText": { "type": { "name": "object" } }, - "maxDate": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "name": { "type": { "name": "string" } }, "onAccept": { "type": { "name": "func" }, diff --git a/docs/pages/x/api/date-pickers/mobile-date-time-picker.json b/docs/pages/x/api/date-pickers/mobile-date-time-picker.json index 738365a596e7..c81d0e8a2d47 100644 --- a/docs/pages/x/api/date-pickers/mobile-date-time-picker.json +++ b/docs/pages/x/api/date-pickers/mobile-date-time-picker.json @@ -34,10 +34,10 @@ "label": { "type": { "name": "node" } }, "loading": { "type": { "name": "bool" }, "default": "false" }, "localeText": { "type": { "name": "object" } }, - "maxDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, "maxDateTime": { "type": { "name": "object" } }, "maxTime": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "minDateTime": { "type": { "name": "object" } }, "minTime": { "type": { "name": "object" } }, "minutesStep": { "type": { "name": "number" }, "default": "1" }, diff --git a/docs/pages/x/api/date-pickers/mobile-date-time-range-picker.json b/docs/pages/x/api/date-pickers/mobile-date-time-range-picker.json index 619eef330c85..ceb7fd706de5 100644 --- a/docs/pages/x/api/date-pickers/mobile-date-time-range-picker.json +++ b/docs/pages/x/api/date-pickers/mobile-date-time-range-picker.json @@ -43,10 +43,10 @@ "label": { "type": { "name": "node" } }, "loading": { "type": { "name": "bool" }, "default": "false" }, "localeText": { "type": { "name": "object" } }, - "maxDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, "maxDateTime": { "type": { "name": "object" } }, "maxTime": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "minDateTime": { "type": { "name": "object" } }, "minTime": { "type": { "name": "object" } }, "minutesStep": { "type": { "name": "number" }, "default": "1" }, diff --git a/docs/pages/x/api/date-pickers/month-calendar.json b/docs/pages/x/api/date-pickers/month-calendar.json index cbacc2ea9b59..81afa3e045d4 100644 --- a/docs/pages/x/api/date-pickers/month-calendar.json +++ b/docs/pages/x/api/date-pickers/month-calendar.json @@ -6,8 +6,8 @@ "disableFuture": { "type": { "name": "bool" }, "default": "false" }, "disableHighlightToday": { "type": { "name": "bool" }, "default": "false" }, "disablePast": { "type": { "name": "bool" }, "default": "false" }, - "maxDate": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "monthsPerRow": { "type": { "name": "enum", "description": "3
| 4" }, "default": "3" diff --git a/docs/pages/x/api/date-pickers/multi-input-date-range-field.json b/docs/pages/x/api/date-pickers/multi-input-date-range-field.json index 0479a019cc93..244b3c3ff67f 100644 --- a/docs/pages/x/api/date-pickers/multi-input-date-range-field.json +++ b/docs/pages/x/api/date-pickers/multi-input-date-range-field.json @@ -20,8 +20,8 @@ "type": { "name": "enum", "description": "'dense'
| 'spacious'" }, "default": "\"dense\"" }, - "maxDate": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "onChange": { "type": { "name": "func" }, "signature": { diff --git a/docs/pages/x/api/date-pickers/multi-input-date-time-range-field.json b/docs/pages/x/api/date-pickers/multi-input-date-time-range-field.json index 2c867c57f146..eccae7c10c52 100644 --- a/docs/pages/x/api/date-pickers/multi-input-date-time-range-field.json +++ b/docs/pages/x/api/date-pickers/multi-input-date-time-range-field.json @@ -22,10 +22,10 @@ "type": { "name": "enum", "description": "'dense'
| 'spacious'" }, "default": "\"dense\"" }, - "maxDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, "maxDateTime": { "type": { "name": "object" } }, "maxTime": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "minDateTime": { "type": { "name": "object" } }, "minTime": { "type": { "name": "object" } }, "minutesStep": { "type": { "name": "number" }, "default": "1" }, diff --git a/docs/pages/x/api/date-pickers/single-input-date-range-field.json b/docs/pages/x/api/date-pickers/single-input-date-range-field.json index b54bb9238ae2..d029a9c08222 100644 --- a/docs/pages/x/api/date-pickers/single-input-date-range-field.json +++ b/docs/pages/x/api/date-pickers/single-input-date-range-field.json @@ -37,8 +37,8 @@ }, "default": "'none'" }, - "maxDate": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "name": { "type": { "name": "string" } }, "onChange": { "type": { "name": "func" }, diff --git a/docs/pages/x/api/date-pickers/single-input-date-time-range-field.json b/docs/pages/x/api/date-pickers/single-input-date-time-range-field.json index 14b3d3ad9f0d..dfc1fa601465 100644 --- a/docs/pages/x/api/date-pickers/single-input-date-time-range-field.json +++ b/docs/pages/x/api/date-pickers/single-input-date-time-range-field.json @@ -39,10 +39,10 @@ }, "default": "'none'" }, - "maxDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, "maxDateTime": { "type": { "name": "object" } }, "maxTime": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "minDateTime": { "type": { "name": "object" } }, "minTime": { "type": { "name": "object" } }, "minutesStep": { "type": { "name": "number" }, "default": "1" }, diff --git a/docs/pages/x/api/date-pickers/static-date-picker.json b/docs/pages/x/api/date-pickers/static-date-picker.json index a4ef9a9c4184..93d2fbdb0c88 100644 --- a/docs/pages/x/api/date-pickers/static-date-picker.json +++ b/docs/pages/x/api/date-pickers/static-date-picker.json @@ -23,8 +23,8 @@ "fixedWeekNumber": { "type": { "name": "number" } }, "loading": { "type": { "name": "bool" }, "default": "false" }, "localeText": { "type": { "name": "object" } }, - "maxDate": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "monthsPerRow": { "type": { "name": "enum", "description": "3
| 4" }, "default": "3" diff --git a/docs/pages/x/api/date-pickers/static-date-range-picker.json b/docs/pages/x/api/date-pickers/static-date-range-picker.json index 2ba7821b8221..91ceaa5d0405 100644 --- a/docs/pages/x/api/date-pickers/static-date-range-picker.json +++ b/docs/pages/x/api/date-pickers/static-date-range-picker.json @@ -37,8 +37,8 @@ "fixedWeekNumber": { "type": { "name": "number" } }, "loading": { "type": { "name": "bool" }, "default": "false" }, "localeText": { "type": { "name": "object" } }, - "maxDate": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "onAccept": { "type": { "name": "func" }, "signature": { diff --git a/docs/pages/x/api/date-pickers/static-date-time-picker.json b/docs/pages/x/api/date-pickers/static-date-time-picker.json index 3648e1b66269..440519f2a10d 100644 --- a/docs/pages/x/api/date-pickers/static-date-time-picker.json +++ b/docs/pages/x/api/date-pickers/static-date-time-picker.json @@ -26,10 +26,10 @@ "fixedWeekNumber": { "type": { "name": "number" } }, "loading": { "type": { "name": "bool" }, "default": "false" }, "localeText": { "type": { "name": "object" } }, - "maxDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, "maxDateTime": { "type": { "name": "object" } }, "maxTime": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "minDateTime": { "type": { "name": "object" } }, "minTime": { "type": { "name": "object" } }, "minutesStep": { "type": { "name": "number" }, "default": "1" }, diff --git a/docs/pages/x/api/date-pickers/time-picker.json b/docs/pages/x/api/date-pickers/time-picker.json index bd196aa67441..fc3050e0d0c8 100644 --- a/docs/pages/x/api/date-pickers/time-picker.json +++ b/docs/pages/x/api/date-pickers/time-picker.json @@ -185,7 +185,7 @@ { "name": "desktopTrapFocus", "description": "Custom component for trapping the focus inside the views on desktop.", - "default": "FocusTrap from '@mui/base'.", + "default": "TrapFocus from '@mui/material'.", "class": null }, { diff --git a/docs/pages/x/api/date-pickers/year-calendar.json b/docs/pages/x/api/date-pickers/year-calendar.json index 14f14f863907..ca1c7a0685f6 100644 --- a/docs/pages/x/api/date-pickers/year-calendar.json +++ b/docs/pages/x/api/date-pickers/year-calendar.json @@ -6,8 +6,8 @@ "disableFuture": { "type": { "name": "bool" }, "default": "false" }, "disableHighlightToday": { "type": { "name": "bool" }, "default": "false" }, "disablePast": { "type": { "name": "bool" }, "default": "false" }, - "maxDate": { "type": { "name": "object" } }, - "minDate": { "type": { "name": "object" } }, + "maxDate": { "type": { "name": "object" }, "default": "2099-12-31" }, + "minDate": { "type": { "name": "object" }, "default": "1900-01-01" }, "onChange": { "type": { "name": "func" }, "signature": { "type": "function(value: TDate) => void", "describedArgs": ["value"] } diff --git a/docs/pages/x/api/tree-view/rich-tree-view.json b/docs/pages/x/api/tree-view/rich-tree-view.json index 1ddd92846779..4c371bb9e28a 100644 --- a/docs/pages/x/api/tree-view/rich-tree-view.json +++ b/docs/pages/x/api/tree-view/rich-tree-view.json @@ -62,6 +62,13 @@ "describedArgs": ["event", "itemIds"] } }, + "onItemClick": { + "type": { "name": "func" }, + "signature": { + "type": "function(event: React.MouseEvent, itemId: string) => void", + "describedArgs": ["event", "itemId"] + } + }, "onItemExpansionToggle": { "type": { "name": "func" }, "signature": { @@ -72,8 +79,8 @@ "onItemFocus": { "type": { "name": "func" }, "signature": { - "type": "function(event: React.SyntheticEvent, itemId: string, value: string) => void", - "describedArgs": ["event", "itemId", "value"] + "type": "function(event: React.SyntheticEvent | null, itemId: string) => void", + "describedArgs": ["event", "itemId"] } }, "onItemSelectionToggle": { @@ -146,6 +153,6 @@ "forwardsRefTo": "HTMLUListElement", "filename": "/packages/x-tree-view/src/RichTreeView/RichTreeView.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/x/api/tree-view/simple-tree-view.json b/docs/pages/x/api/tree-view/simple-tree-view.json index 77f288c32b52..8089af6898d0 100644 --- a/docs/pages/x/api/tree-view/simple-tree-view.json +++ b/docs/pages/x/api/tree-view/simple-tree-view.json @@ -37,6 +37,13 @@ "describedArgs": ["event", "itemIds"] } }, + "onItemClick": { + "type": { "name": "func" }, + "signature": { + "type": "function(event: React.MouseEvent, itemId: string) => void", + "describedArgs": ["event", "itemId"] + } + }, "onItemExpansionToggle": { "type": { "name": "func" }, "signature": { @@ -47,8 +54,8 @@ "onItemFocus": { "type": { "name": "func" }, "signature": { - "type": "function(event: React.SyntheticEvent, itemId: string, value: string) => void", - "describedArgs": ["event", "itemId", "value"] + "type": "function(event: React.SyntheticEvent | null, itemId: string) => void", + "describedArgs": ["event", "itemId"] } }, "onItemSelectionToggle": { diff --git a/docs/pages/x/api/tree-view/tree-item-2.json b/docs/pages/x/api/tree-view/tree-item-2.json index bac50963652a..7fb8b2a97e2d 100644 --- a/docs/pages/x/api/tree-view/tree-item-2.json +++ b/docs/pages/x/api/tree-view/tree-item-2.json @@ -58,6 +58,12 @@ "default": "TreeItem2Label", "class": "MuiTreeItem2-label" }, + { + "name": "dragAndDropOverlay", + "description": "The component that renders the overlay when an item reordering is ongoing.\nWarning: This slot is only useful when using the `RichTreeViewPro` component.", + "default": "TreeItem2DragAndDropOverlay", + "class": "MuiTreeItem2-dragAndDropOverlay" + }, { "name": "collapseIcon", "description": "The icon used to collapse the item.", "class": null }, { "name": "expandIcon", "description": "The icon used to expand the item.", "class": null }, { "name": "endIcon", "description": "The icon displayed next to an end item.", "class": null }, @@ -99,6 +105,6 @@ "forwardsRefTo": "HTMLLIElement", "filename": "/packages/x-tree-view/src/TreeItem2/TreeItem2.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/x/api/tree-view/tree-item.json b/docs/pages/x/api/tree-view/tree-item.json index 290aa0e5881d..5c84d1bdfbcc 100644 --- a/docs/pages/x/api/tree-view/tree-item.json +++ b/docs/pages/x/api/tree-view/tree-item.json @@ -66,6 +66,12 @@ "description": "State class applied to the element when disabled.", "isGlobal": true }, + { + "key": "dragAndDropOverlay", + "className": "MuiTreeItem-dragAndDropOverlay", + "description": "Styles applied to the drag and drop overlay.", + "isGlobal": false + }, { "key": "expanded", "className": "Mui-expanded", diff --git a/docs/pages/x/api/tree-view/tree-view.json b/docs/pages/x/api/tree-view/tree-view.json index 97dbf8d7ac54..d75b315dc75b 100644 --- a/docs/pages/x/api/tree-view/tree-view.json +++ b/docs/pages/x/api/tree-view/tree-view.json @@ -37,6 +37,13 @@ "describedArgs": ["event", "itemIds"] } }, + "onItemClick": { + "type": { "name": "func" }, + "signature": { + "type": "function(event: React.MouseEvent, itemId: string) => void", + "describedArgs": ["event", "itemId"] + } + }, "onItemExpansionToggle": { "type": { "name": "func" }, "signature": { @@ -47,8 +54,8 @@ "onItemFocus": { "type": { "name": "func" }, "signature": { - "type": "function(event: React.SyntheticEvent, itemId: string, value: string) => void", - "describedArgs": ["event", "itemId", "value"] + "type": "function(event: React.SyntheticEvent | null, itemId: string) => void", + "describedArgs": ["event", "itemId"] } }, "onItemSelectionToggle": { diff --git a/docs/pages/x/react-tree-view/rich-tree-view/ordering.js b/docs/pages/x/react-tree-view/rich-tree-view/ordering.js new file mode 100644 index 000000000000..72994d240844 --- /dev/null +++ b/docs/pages/x/react-tree-view/rich-tree-view/ordering.js @@ -0,0 +1,7 @@ +import * as React from 'react'; +import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; +import * as pageProps from 'docsx/data/tree-view/rich-tree-view/ordering/ordering.md?muiMarkdown'; + +export default function Page() { + return ; +} diff --git a/docs/src/modules/components/InstallationInstructions.tsx b/docs/src/modules/components/InstallationInstructions.tsx index 18faa37de0e6..4f0c59bd4a65 100644 --- a/docs/src/modules/components/InstallationInstructions.tsx +++ b/docs/src/modules/components/InstallationInstructions.tsx @@ -6,8 +6,8 @@ import ToggleOptions from './ToggleOptions'; const defaultPackageManagers: Record = { npm: 'npm install', - yarn: 'yarn add', pnpm: 'pnpm add', + yarn: 'yarn add', }; export default function InstallationInstructions(props: { diff --git a/docs/translations/api-docs/charts/bar-series-type.json b/docs/translations/api-docs/charts/bar-series-type.json index 535e72409254..179d3e15bd8e 100644 --- a/docs/translations/api-docs/charts/bar-series-type.json +++ b/docs/translations/api-docs/charts/bar-series-type.json @@ -21,7 +21,9 @@ "valueFormatter": { "description": "Formatter used to render values in tooltip or other data display." }, + "xAxisId": { "description": "The id of the x-axis used to render the series." }, "xAxisKey": { "description": "The id of the x-axis used to render the series." }, + "yAxisId": { "description": "The id of the y-axis used to render the series." }, "yAxisKey": { "description": "The id of the y-axis used to render the series." } } } diff --git a/docs/translations/api-docs/charts/chart-container-pro/chart-container-pro.json b/docs/translations/api-docs/charts/chart-container-pro/chart-container-pro.json index 5a13d2067ae7..20c5b4a30105 100644 --- a/docs/translations/api-docs/charts/chart-container-pro/chart-container-pro.json +++ b/docs/translations/api-docs/charts/chart-container-pro/chart-container-pro.json @@ -19,6 +19,10 @@ "description": "The callback fired when the highlighted item changes.", "typeDescriptions": { "highlightedItem": "The newly highlighted item." } }, + "onZoomChange": { + "description": "Callback fired when the zoom has changed.", + "typeDescriptions": { "zoomData": "Updated zoom data." } + }, "plugins": { "description": "An array of plugins defining how to preprocess data. If not provided, the container supports line, bar, scatter and pie charts." }, @@ -32,7 +36,8 @@ "yAxis": { "description": "The configuration of the y-axes. If not provided, a default axis config is used. An array of AxisConfig objects." }, - "zAxis": { "description": "The configuration of the z-axes." } + "zAxis": { "description": "The configuration of the z-axes." }, + "zoom": { "description": "The list of zoom data related to each axis." } }, "classDescriptions": {} } diff --git a/docs/translations/api-docs/charts/line-series-type.json b/docs/translations/api-docs/charts/line-series-type.json index d75b7c50670a..ff576209272d 100644 --- a/docs/translations/api-docs/charts/line-series-type.json +++ b/docs/translations/api-docs/charts/line-series-type.json @@ -31,7 +31,9 @@ "valueFormatter": { "description": "Formatter used to render values in tooltip or other data display." }, + "xAxisId": { "description": "The id of the x-axis used to render the series." }, "xAxisKey": { "description": "The id of the x-axis used to render the series." }, + "yAxisId": { "description": "The id of the y-axis used to render the series." }, "yAxisKey": { "description": "The id of the y-axis used to render the series." } } } diff --git a/docs/translations/api-docs/charts/responsive-chart-container-pro/responsive-chart-container-pro.json b/docs/translations/api-docs/charts/responsive-chart-container-pro/responsive-chart-container-pro.json index 1623c12c44cd..469366dd9aad 100644 --- a/docs/translations/api-docs/charts/responsive-chart-container-pro/responsive-chart-container-pro.json +++ b/docs/translations/api-docs/charts/responsive-chart-container-pro/responsive-chart-container-pro.json @@ -21,6 +21,10 @@ "description": "The callback fired when the highlighted item changes.", "typeDescriptions": { "highlightedItem": "The newly highlighted item." } }, + "onZoomChange": { + "description": "Callback fired when the zoom has changed.", + "typeDescriptions": { "zoomData": "Updated zoom data." } + }, "plugins": { "description": "An array of plugins defining how to preprocess data. If not provided, the container supports line, bar, scatter and pie charts." }, @@ -36,7 +40,8 @@ "yAxis": { "description": "The configuration of the y-axes. If not provided, a default axis config is used. An array of AxisConfig objects." }, - "zAxis": { "description": "The configuration of the z-axes." } + "zAxis": { "description": "The configuration of the z-axes." }, + "zoom": { "description": "The list of zoom data related to each axis." } }, "classDescriptions": {} } diff --git a/docs/translations/api-docs/charts/scatter-chart-pro/scatter-chart-pro.json b/docs/translations/api-docs/charts/scatter-chart-pro/scatter-chart-pro.json index 28a931b143cc..6a6c1e0b1bf6 100644 --- a/docs/translations/api-docs/charts/scatter-chart-pro/scatter-chart-pro.json +++ b/docs/translations/api-docs/charts/scatter-chart-pro/scatter-chart-pro.json @@ -43,6 +43,10 @@ "scatterItemIdentifier": "The scatter item identifier." } }, + "onZoomChange": { + "description": "Callback fired when the zoom has changed.", + "typeDescriptions": { "zoomData": "Updated zoom data." } + }, "rightAxis": { "description": "Indicate which axis to display the right of the charts. Can be a string (the id of the axis) or an object ChartsYAxisProps." }, @@ -70,7 +74,8 @@ "yAxis": { "description": "The configuration of the y-axes. If not provided, a default axis config is used. An array of AxisConfig objects." }, - "zAxis": { "description": "The configuration of the z-axes." } + "zAxis": { "description": "The configuration of the z-axes." }, + "zoom": { "description": "The list of zoom data related to each axis." } }, "classDescriptions": {} } diff --git a/docs/translations/api-docs/charts/scatter-series-type.json b/docs/translations/api-docs/charts/scatter-series-type.json index 72bd1fbf430f..f2c801b5c89d 100644 --- a/docs/translations/api-docs/charts/scatter-series-type.json +++ b/docs/translations/api-docs/charts/scatter-series-type.json @@ -16,8 +16,11 @@ "valueFormatter": { "description": "Formatter used to render values in tooltip or other data display." }, + "xAxisId": { "description": "The id of the x-axis used to render the series." }, "xAxisKey": { "description": "The id of the x-axis used to render the series." }, + "yAxisId": { "description": "The id of the y-axis used to render the series." }, "yAxisKey": { "description": "The id of the y-axis used to render the series." }, + "zAxisId": { "description": "The id of the z-axis used to render the series." }, "zAxisKey": { "description": "The id of the z-axis used to render the series." } } } diff --git a/docs/translations/api-docs/tree-view/rich-tree-view/rich-tree-view.json b/docs/translations/api-docs/tree-view/rich-tree-view/rich-tree-view.json index ea67296629a8..3b94a5f52442 100644 --- a/docs/translations/api-docs/tree-view/rich-tree-view/rich-tree-view.json +++ b/docs/translations/api-docs/tree-view/rich-tree-view/rich-tree-view.json @@ -58,6 +58,13 @@ "itemIds": "The ids of the expanded items." } }, + "onItemClick": { + "description": "Callback fired when the content slot of a given tree item is clicked.", + "typeDescriptions": { + "event": "The DOM event that triggered the change.", + "itemId": "The id of the focused item." + } + }, "onItemExpansionToggle": { "description": "Callback fired when a tree item is expanded or collapsed.", "typeDescriptions": { @@ -67,11 +74,10 @@ } }, "onItemFocus": { - "description": "Callback fired when tree items are focused.", + "description": "Callback fired when a given tree item is focused.", "typeDescriptions": { "event": "The DOM event that triggered the change. Warning: This is a generic event not a focus event.", - "itemId": "The id of the focused item.", - "value": "of the focused item." + "itemId": "The id of the focused item." } }, "onItemSelectionToggle": { diff --git a/docs/translations/api-docs/tree-view/simple-tree-view/simple-tree-view.json b/docs/translations/api-docs/tree-view/simple-tree-view/simple-tree-view.json index bd1994ea533b..a56fd8d2d75a 100644 --- a/docs/translations/api-docs/tree-view/simple-tree-view/simple-tree-view.json +++ b/docs/translations/api-docs/tree-view/simple-tree-view/simple-tree-view.json @@ -44,6 +44,13 @@ "itemIds": "The ids of the expanded items." } }, + "onItemClick": { + "description": "Callback fired when the content slot of a given tree item is clicked.", + "typeDescriptions": { + "event": "The DOM event that triggered the change.", + "itemId": "The id of the focused item." + } + }, "onItemExpansionToggle": { "description": "Callback fired when a tree item is expanded or collapsed.", "typeDescriptions": { @@ -53,11 +60,10 @@ } }, "onItemFocus": { - "description": "Callback fired when tree items are focused.", + "description": "Callback fired when a given tree item is focused.", "typeDescriptions": { "event": "The DOM event that triggered the change. Warning: This is a generic event not a focus event.", - "itemId": "The id of the focused item.", - "value": "of the focused item." + "itemId": "The id of the focused item." } }, "onItemSelectionToggle": { diff --git a/docs/translations/api-docs/tree-view/tree-item-2/tree-item-2.json b/docs/translations/api-docs/tree-view/tree-item-2/tree-item-2.json index 9c34f2f4220e..6a5f8d2ae832 100644 --- a/docs/translations/api-docs/tree-view/tree-item-2/tree-item-2.json +++ b/docs/translations/api-docs/tree-view/tree-item-2/tree-item-2.json @@ -43,6 +43,7 @@ "checkbox": "The component that renders the item checkbox for selection.", "collapseIcon": "The icon used to collapse the item.", "content": "The component that renders the content of the item. (e.g.: everything related to this item, not to its children).", + "dragAndDropOverlay": "The component that renders the overlay when an item reordering is ongoing. Warning: This slot is only useful when using the RichTreeViewPro component.", "endIcon": "The icon displayed next to an end item.", "expandIcon": "The icon used to expand the item.", "groupTransition": "The component that renders the children of the item.", diff --git a/docs/translations/api-docs/tree-view/tree-item/tree-item.json b/docs/translations/api-docs/tree-view/tree-item/tree-item.json index d0471b434619..596c008d70f1 100644 --- a/docs/translations/api-docs/tree-view/tree-item/tree-item.json +++ b/docs/translations/api-docs/tree-view/tree-item/tree-item.json @@ -37,6 +37,10 @@ "nodeName": "the element", "conditions": "disabled" }, + "dragAndDropOverlay": { + "description": "Styles applied to {{nodeName}}.", + "nodeName": "the drag and drop overlay" + }, "expanded": { "description": "State class applied to {{nodeName}} when {{conditions}}.", "nodeName": "the content element", diff --git a/docs/translations/api-docs/tree-view/tree-view/tree-view.json b/docs/translations/api-docs/tree-view/tree-view/tree-view.json index dde9a0faa577..765c53c0efd9 100644 --- a/docs/translations/api-docs/tree-view/tree-view/tree-view.json +++ b/docs/translations/api-docs/tree-view/tree-view/tree-view.json @@ -44,6 +44,13 @@ "itemIds": "The ids of the expanded items." } }, + "onItemClick": { + "description": "Callback fired when the content slot of a given tree item is clicked.", + "typeDescriptions": { + "event": "The DOM event that triggered the change.", + "itemId": "The id of the focused item." + } + }, "onItemExpansionToggle": { "description": "Callback fired when a tree item is expanded or collapsed.", "typeDescriptions": { @@ -53,11 +60,10 @@ } }, "onItemFocus": { - "description": "Callback fired when tree items are focused.", + "description": "Callback fired when a given tree item is focused.", "typeDescriptions": { "event": "The DOM event that triggered the change. Warning: This is a generic event not a focus event.", - "itemId": "The id of the focused item.", - "value": "of the focused item." + "itemId": "The id of the focused item." } }, "onItemSelectionToggle": { diff --git a/package.json b/package.json index d058d6ef9178..9a5c889e6630 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "7.11.0", + "version": "7.11.1", "private": true, "scripts": { "preinstall": "npx only-allow pnpm", @@ -27,6 +27,7 @@ "markdownlint": "markdownlint-cli2 \"**/*.md\"", "prettier": "pretty-quick --branch master --ignore-path .eslintignore", "prettier:all": "prettier --write . --ignore-path .eslintignore", + "prettier:check": "prettier --check . --ignore-path .eslintignore", "proptypes": "cross-env BABEL_ENV=development babel-node -i \"/node_modules/(?!@mui)/\" -x .ts,.tsx,.js ./docs/scripts/generateProptypes.ts", "size:snapshot": "node --max-old-space-size=2048 ./scripts/sizeSnapshot/create", "size:why": "pnpm size:snapshot --analyze --accurateBundles", @@ -38,7 +39,6 @@ "test:karma": "cross-env NODE_ENV=test TZ=UTC karma start test/karma.conf.js", "test:karma:parallel": "cross-env NODE_ENV=test TZ=UTC PARALLEL=true karma start test/karma.conf.js", "test:unit": "cross-env NODE_ENV=test TZ=UTC mocha -n expose_gc", - "test:charts:unit": "cross-env NODE_ENV=test TZ=UTC mocha -n expose_gc --config packages/x-charts/.mocharc.js", "test:e2e": "cross-env NODE_ENV=production pnpm test:e2e:build && concurrently --success first --kill-others \"pnpm test:e2e:run\" \"pnpm test:e2e:server\"", "test:e2e:build": "webpack --config test/e2e/webpack.config.js", "test:e2e:dev": "concurrently \"pnpm test:e2e:build --watch\" \"pnpm test:e2e:server\"", @@ -54,6 +54,7 @@ "test:argos": "node ./scripts/pushArgos.mjs", "typescript": "lerna run --no-bail --parallel typescript", "typescript:ci": "lerna run --concurrency 3 --no-bail --no-sort typescript", + "use-react-version": "node scripts/useReactVersion.mjs", "build:codesandbox": "pnpm release:build", "install:codesandbox": "pnpm install --no-frozen-lockfile", "release:changelog": "node scripts/releaseChangelog.mjs", @@ -66,34 +67,36 @@ "clean:node_modules": "rimraf --glob \"**/node_modules\"" }, "devDependencies": { - "@argos-ci/core": "^2.3.0", + "@actions/core": "^1.10.1", + "@actions/github": "^6.0.0", + "@argos-ci/core": "^2.4.0", "@babel/cli": "^7.24.8", - "@babel/core": "^7.24.8", - "@babel/node": "^7.24.8", + "@babel/core": "^7.25.2", + "@babel/node": "^7.25.0", "@babel/plugin-transform-class-properties": "^7.24.7", "@babel/plugin-transform-object-rest-spread": "^7.24.7", "@babel/plugin-transform-private-methods": "^7.24.7", "@babel/plugin-transform-private-property-in-object": "^7.24.7", - "@babel/plugin-transform-react-constant-elements": "^7.24.7", + "@babel/plugin-transform-react-constant-elements": "^7.25.1", "@babel/plugin-transform-runtime": "^7.24.7", - "@babel/preset-env": "^7.24.8", + "@babel/preset-env": "^7.25.2", "@babel/preset-react": "^7.24.7", "@babel/preset-typescript": "^7.24.7", "@babel/register": "^7.24.6", - "@babel/traverse": "^7.24.8", - "@babel/types": "^7.24.8", - "@emotion/cache": "^11.11.0", - "@emotion/react": "^11.11.4", - "@emotion/styled": "^11.11.5", - "@mui/icons-material": "^5.16.2", - "@mui/internal-markdown": "^1.0.7", - "@mui/internal-test-utils": "^1.0.4", - "@mui/material": "^5.16.2", - "@mui/monorepo": "github:mui/material-ui#0d9333e9f3999d96679a2691e2815296a81475f2", - "@mui/utils": "^5.16.2", + "@babel/traverse": "^7.25.2", + "@babel/types": "^7.25.2", + "@emotion/cache": "^11.13.1", + "@emotion/react": "^11.13.0", + "@emotion/styled": "^11.13.0", + "@mui/icons-material": "^5.16.5", + "@mui/internal-markdown": "^1.0.8", + "@mui/internal-test-utils": "^1.0.5", + "@mui/material": "^5.16.5", + "@mui/monorepo": "github:mui/material-ui#4a82b6b0e0395db8fa0a0d49b6b76de4516b1579", + "@mui/utils": "^5.16.5", "@next/eslint-plugin-next": "14.2.5", "@octokit/plugin-retry": "^7.1.1", - "@octokit/rest": "^21.0.0", + "@octokit/rest": "^21.0.1", "@playwright/test": "^1.44.1", "@types/babel__core": "^7.20.5", "@types/babel__traverse": "^7.20.6", @@ -101,9 +104,9 @@ "@types/chai-dom": "^1.11.3", "@types/fs-extra": "^11.0.4", "@types/karma": "^6.3.8", - "@types/lodash": "^4.17.6", + "@types/lodash": "^4.17.7", "@types/mocha": "^10.0.7", - "@types/node": "^18.19.39", + "@types/node": "^18.19.42", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", "@types/react-test-renderer": "^18.3.0", @@ -122,7 +125,7 @@ "babel-plugin-replace-imports": "^1.0.2", "babel-plugin-search-and-replace": "^1.1.1", "babel-plugin-transform-react-remove-prop-types": "^0.4.24", - "chai": "^4.4.1", + "chai": "^4.5.0", "chai-dom": "^1.12.0", "compression-webpack-plugin": "^11.1.0", "concurrently": "^8.2.2", @@ -138,13 +141,13 @@ "eslint-import-resolver-webpack": "^0.13.8", "eslint-plugin-filenames": "^1.3.2", "eslint-plugin-import": "^2.29.1", - "eslint-plugin-jsdoc": "^48.5.2", + "eslint-plugin-jsdoc": "^48.8.3", "eslint-plugin-jsx-a11y": "^6.9.0", "eslint-plugin-material-ui": "workspace:^", "eslint-plugin-mocha": "^10.4.3", - "eslint-plugin-prettier": "^5.1.3", - "eslint-plugin-react": "^7.34.4", - "eslint-plugin-react-compiler": "0.0.0-experimental-51a85ea-20240601", + "eslint-plugin-prettier": "^5.2.1", + "eslint-plugin-react": "^7.35.0", + "eslint-plugin-react-compiler": "0.0.0-experimental-9ed098e-20240725", "eslint-plugin-react-hooks": "^4.6.2", "fast-glob": "^3.3.2", "format-util": "^1.0.5", @@ -152,7 +155,7 @@ "glob-gitignore": "^1.0.14", "globby": "^14.0.1", "html-webpack-plugin": "^5.6.0", - "jsdom": "24.1.0", + "jsdom": "24.1.1", "jss": "^10.10.0", "jss-plugin-template": "^10.10.0", "jss-rtl": "^0.3.0", @@ -162,27 +165,27 @@ "karma-parallel": "^0.3.1", "karma-sourcemap-loader": "^0.4.0", "karma-webpack": "^5.0.1", - "lerna": "^8.1.6", + "lerna": "^8.1.7", "lodash": "^4.17.21", "markdownlint-cli2": "^0.13.0", - "mocha": "^10.6.0", + "mocha": "^10.7.0", "moment": "^2.30.1", "moment-timezone": "^0.5.45", "nyc": "^17.0.0", - "prettier": "^3.3.2", + "prettier": "^3.3.3", "pretty-quick": "^4.0.0", "process": "^0.11.10", "react": "^18.3.1", "react-dom": "^18.3.1", "remark": "^13.0.0", - "rimraf": "^5.0.8", + "rimraf": "^5.0.9", "serve": "^14.2.3", "sinon": "^16.1.3", "stream-browserify": "^3.0.0", "string-replace-loader": "^3.1.0", "terser-webpack-plugin": "^5.3.10", "tsx": "^4.16.2", - "typescript": "^5.5.3", + "typescript": "^5.5.4", "unist-util-visit": "^2.0.3", "util": "^0.12.5", "webpack": "^5.92.1", @@ -192,11 +195,11 @@ }, "resolutions": { "react-is": "^18.3.1", - "@types/node": "^18.19.39" + "@types/node": "^18.19.42" }, - "packageManager": "pnpm@9.5.0", + "packageManager": "pnpm@9.6.0", "engines": { - "pnpm": "9.5.0" + "pnpm": "9.6.0" }, "pnpm": { "patchedDependencies": { diff --git a/packages/eslint-plugin-material-ui/package.json b/packages/eslint-plugin-material-ui/package.json index 1e904f52567b..c5f013fb9f82 100644 --- a/packages/eslint-plugin-material-ui/package.json +++ b/packages/eslint-plugin-material-ui/package.json @@ -5,7 +5,7 @@ "description": "Custom eslint rules for MUI X.", "main": "src/index.js", "devDependencies": { - "@types/eslint": "^8.56.10", + "@types/eslint": "^8.56.11", "@typescript-eslint/utils": "^7.16.1", "@typescript-eslint/parser": "^7.16.1" }, diff --git a/packages/x-charts-pro/package.json b/packages/x-charts-pro/package.json index e8f2cfc19416..6f81dc767fdc 100644 --- a/packages/x-charts-pro/package.json +++ b/packages/x-charts-pro/package.json @@ -40,20 +40,15 @@ "directory": "packages/x-charts-pro" }, "dependencies": { - "@babel/runtime": "^7.24.8", - "@mui/base": "^5.0.0-beta.40", - "@mui/system": "^5.16.2", - "@mui/utils": "^5.16.2", + "@babel/runtime": "^7.25.0", + "@mui/system": "^5.16.5", + "@mui/utils": "^5.16.5", "@mui/x-charts": "workspace:*", "@mui/x-license": "workspace:*", - "@react-spring/rafz": "^9.7.3", - "@react-spring/web": "^9.7.3", + "@mui/x-charts-vendor": "workspace:*", + "@react-spring/rafz": "^9.7.4", + "@react-spring/web": "^9.7.4", "clsx": "^2.1.1", - "d3-color": "^3.1.0", - "d3-delaunay": "^6.0.4", - "d3-interpolate": "^3.0.1", - "d3-scale": "^4.0.2", - "d3-shape": "^3.2.0", "prop-types": "^15.8.1" }, "peerDependencies": { @@ -72,16 +67,11 @@ } }, "devDependencies": { - "@react-spring/core": "^9.7.3", - "@react-spring/shared": "^9.7.3", - "@types/d3-color": "^3.1.3", - "@types/d3-delaunay": "^6.0.4", - "@types/d3-interpolate": "^3.0.4", - "@types/d3-scale": "^4.0.8", - "@types/d3-shape": "^3.1.6", + "@react-spring/core": "^9.7.4", + "@react-spring/shared": "^9.7.4", "@types/prop-types": "^15.7.12", "csstype": "^3.1.3", - "rimraf": "^5.0.8" + "rimraf": "^5.0.9" }, "exports": { ".": { diff --git a/packages/x-charts-pro/src/BarChartPro/BarChartPro.tsx b/packages/x-charts-pro/src/BarChartPro/BarChartPro.tsx index 6db9610abedf..9f03659068b1 100644 --- a/packages/x-charts-pro/src/BarChartPro/BarChartPro.tsx +++ b/packages/x-charts-pro/src/BarChartPro/BarChartPro.tsx @@ -14,8 +14,9 @@ import { BarPlotProps } from '@mui/x-charts'; import { ResponsiveChartContainerPro } from '../ResponsiveChartContainerPro'; import { ZoomSetup } from '../context/ZoomProvider/ZoomSetup'; import { useZoom } from '../context/ZoomProvider/useZoom'; +import { ZoomProps } from '../context/ZoomProvider'; -export interface BarChartProProps extends BarChartProps {} +export interface BarChartProProps extends BarChartProps, ZoomProps {} /** * Demos: @@ -29,6 +30,7 @@ export interface BarChartProProps extends BarChartProps {} * - [BarChart API](https://mui.com/x/api/charts/bar-chart/) */ const BarChartPro = React.forwardRef(function BarChartPro(props: BarChartProProps, ref) { + const { zoom, onZoomChange, ...other } = props; const { chartContainerProps, barPlotProps, @@ -42,10 +44,15 @@ const BarChartPro = React.forwardRef(function BarChartPro(props: BarChartProProp legendProps, tooltipProps, children, - } = useBarChartProps(props); + } = useBarChartProps(other); return ( - + {props.onAxisClick && } {props.grid && } diff --git a/packages/x-charts-pro/src/ChartContainerPro/ChartContainerPro.tsx b/packages/x-charts-pro/src/ChartContainerPro/ChartContainerPro.tsx index 09dc026abacc..2daf4a098657 100644 --- a/packages/x-charts-pro/src/ChartContainerPro/ChartContainerPro.tsx +++ b/packages/x-charts-pro/src/ChartContainerPro/ChartContainerPro.tsx @@ -8,42 +8,41 @@ import { ColorProvider, DrawingProvider, InteractionProvider, - SeriesContextProvider, - useChartContainerProps, + SeriesProvider, } from '@mui/x-charts/internals'; import { useLicenseVerifier } from '@mui/x-license/useLicenseVerifier'; import { getReleaseInfo } from '../internals/utils/releaseInfo'; import { CartesianContextProviderPro } from '../context/CartesianProviderPro'; -import { ZoomProvider } from '../context/ZoomProvider'; +import { ZoomProps, ZoomProvider } from '../context/ZoomProvider'; +import { useChartContainerProProps } from './useChartContainerProProps'; const releaseInfo = getReleaseInfo(); -export interface ChartContainerProProps extends ChartContainerProps {} +export interface ChartContainerProProps extends ChartContainerProps, ZoomProps {} const ChartContainerPro = React.forwardRef(function ChartContainer( props: ChartContainerProProps, ref, ) { const { - children, + zoomProviderProps, drawingProviderProps, colorProviderProps, - seriesContextProps, - cartesianContextProps, + seriesProviderProps, zAxisContextProps, highlightedProviderProps, + cartesianContextProps, chartsSurfaceProps, - xAxis, - yAxis, - } = useChartContainerProps(props, ref); + children, + } = useChartContainerProProps(props, ref); useLicenseVerifier('x-charts-pro', releaseInfo); return ( - - + + @@ -57,7 +56,7 @@ const ChartContainerPro = React.forwardRef(function ChartContainer( - + ); @@ -115,6 +114,12 @@ ChartContainerPro.propTypes = { * @param {HighlightItemData | null} highlightedItem The newly highlighted item. */ onHighlightChange: PropTypes.func, + /** + * Callback fired when the zoom has changed. + * + * @param {ZoomData[]} zoomData Updated zoom data. + */ + onZoomChange: PropTypes.func, /** * An array of plugins defining how to preprocess data. * If not provided, the container supports line, bar, scatter and pie charts. @@ -149,7 +154,6 @@ ChartContainerPro.propTypes = { */ xAxis: PropTypes.arrayOf( PropTypes.shape({ - axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), classes: PropTypes.object, colorMap: PropTypes.oneOfType([ PropTypes.shape({ @@ -231,7 +235,6 @@ ChartContainerPro.propTypes = { */ yAxis: PropTypes.arrayOf( PropTypes.shape({ - axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), classes: PropTypes.object, colorMap: PropTypes.oneOfType([ PropTypes.shape({ @@ -345,6 +348,16 @@ ChartContainerPro.propTypes = { min: PropTypes.number, }), ), + /** + * The list of zoom data related to each axis. + */ + zoom: PropTypes.arrayOf( + PropTypes.shape({ + axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired, + end: PropTypes.number.isRequired, + start: PropTypes.number.isRequired, + }), + ), } as any; export { ChartContainerPro }; diff --git a/packages/x-charts-pro/src/ChartContainerPro/useChartContainerProProps.ts b/packages/x-charts-pro/src/ChartContainerPro/useChartContainerProProps.ts new file mode 100644 index 000000000000..f0a17e423a6e --- /dev/null +++ b/packages/x-charts-pro/src/ChartContainerPro/useChartContainerProProps.ts @@ -0,0 +1,42 @@ +import { useChartContainerProps } from '@mui/x-charts/internals'; +import { ZoomProviderProps } from '../context/ZoomProvider'; +import type { ChartContainerProProps } from './ChartContainerPro'; + +export const useChartContainerProProps = ( + props: ChartContainerProProps, + ref: React.ForwardedRef, +) => { + const { zoom, onZoomChange, ...baseProps } = props; + + const { + children, + drawingProviderProps, + colorProviderProps, + seriesProviderProps, + cartesianContextProps, + zAxisContextProps, + highlightedProviderProps, + chartsSurfaceProps, + xAxis, + yAxis, + } = useChartContainerProps(baseProps, ref); + + const zoomProviderProps: Omit = { + zoom, + onZoomChange, + xAxis, + yAxis, + }; + + return { + zoomProviderProps, + children, + drawingProviderProps, + colorProviderProps, + seriesProviderProps, + cartesianContextProps, + zAxisContextProps, + highlightedProviderProps, + chartsSurfaceProps, + }; +}; diff --git a/packages/x-charts-pro/src/Heatmap/Heatmap.tsx b/packages/x-charts-pro/src/Heatmap/Heatmap.tsx index a7936aa4847d..5c72d19e8ea6 100644 --- a/packages/x-charts-pro/src/Heatmap/Heatmap.tsx +++ b/packages/x-charts-pro/src/Heatmap/Heatmap.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import { interpolateRgbBasis } from 'd3-interpolate'; +import { interpolateRgbBasis } from '@mui/x-charts-vendor/d3-interpolate'; import useId from '@mui/utils/useId'; import { ChartsAxis, ChartsAxisProps } from '@mui/x-charts/ChartsAxis'; import { @@ -50,7 +50,10 @@ export interface HeatmapSlotProps HeatmapItemSlotProps {} export interface HeatmapProps - extends Omit, + extends Omit< + ResponsiveChartContainerProProps, + 'series' | 'plugins' | 'xAxis' | 'yAxis' | 'zoom' | 'onZoomChange' + >, Omit, Omit, ChartsOnAxisClickHandlerProps { @@ -342,7 +345,6 @@ Heatmap.propTypes = { */ xAxis: PropTypes.arrayOf( PropTypes.shape({ - axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), barGapRatio: PropTypes.number, categoryGapRatio: PropTypes.number, classes: PropTypes.object, @@ -426,7 +428,6 @@ Heatmap.propTypes = { */ yAxis: PropTypes.arrayOf( PropTypes.shape({ - axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), barGapRatio: PropTypes.number, categoryGapRatio: PropTypes.number, classes: PropTypes.object, diff --git a/packages/x-charts-pro/src/Heatmap/HeatmapItem.tsx b/packages/x-charts-pro/src/Heatmap/HeatmapItem.tsx index ef38071bbf35..5b36445c5aa9 100644 --- a/packages/x-charts-pro/src/Heatmap/HeatmapItem.tsx +++ b/packages/x-charts-pro/src/Heatmap/HeatmapItem.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { styled } from '@mui/material/styles'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import composeClasses from '@mui/utils/composeClasses'; import { useItemHighlighted } from '@mui/x-charts/context'; import { useInteractionItemProps, SeriesId } from '@mui/x-charts/internals'; diff --git a/packages/x-charts-pro/src/LineChartPro/LineChartPro.tsx b/packages/x-charts-pro/src/LineChartPro/LineChartPro.tsx index 543b6951aaa7..323d37fb05d5 100644 --- a/packages/x-charts-pro/src/LineChartPro/LineChartPro.tsx +++ b/packages/x-charts-pro/src/LineChartPro/LineChartPro.tsx @@ -22,8 +22,9 @@ import { MarkPlotProps } from '@mui/x-charts'; import { ResponsiveChartContainerPro } from '../ResponsiveChartContainerPro'; import { ZoomSetup } from '../context/ZoomProvider/ZoomSetup'; import { useZoom } from '../context/ZoomProvider/useZoom'; +import { ZoomProps } from '../context/ZoomProvider'; -export interface LineChartProProps extends LineChartProps {} +export interface LineChartProProps extends LineChartProps, ZoomProps {} /** * Demos: @@ -36,6 +37,7 @@ export interface LineChartProProps extends LineChartProps {} * - [LineChart API](https://mui.com/x/api/charts/line-chart/) */ const LineChartPro = React.forwardRef(function LineChartPro(props: LineChartProProps, ref) { + const { zoom, onZoomChange, ...other } = props; const { chartContainerProps, axisClickHandlerProps, @@ -52,10 +54,15 @@ const LineChartPro = React.forwardRef(function LineChartPro(props: LineChartProP legendProps, tooltipProps, children, - } = useLineChartProps(props); + } = useLineChartProps(other); return ( - + {props.onAxisClick && } {props.grid && } @@ -65,7 +72,10 @@ const LineChartPro = React.forwardRef(function LineChartPro(props: LineChartProP - + + {/* The `data-drawing-container` indicates that children are part of the drawing area. Ref: https://github.com/mui/mui-x/issues/13659 */} + + {!props.loading && } diff --git a/packages/x-charts-pro/src/ResponsiveChartContainerPro/ResponsiveChartContainerPro.tsx b/packages/x-charts-pro/src/ResponsiveChartContainerPro/ResponsiveChartContainerPro.tsx index c856012e26b7..2a3fafbe3124 100644 --- a/packages/x-charts-pro/src/ResponsiveChartContainerPro/ResponsiveChartContainerPro.tsx +++ b/packages/x-charts-pro/src/ResponsiveChartContainerPro/ResponsiveChartContainerPro.tsx @@ -2,11 +2,15 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { Watermark } from '@mui/x-license/Watermark'; import { ResponsiveChartContainerProps } from '@mui/x-charts/ResponsiveChartContainer'; -import { ResizableContainer, useResponsiveChartContainerProps } from '@mui/x-charts/internals'; +import { ResizableContainer } from '@mui/x-charts/internals'; import { getReleaseInfo } from '../internals/utils/releaseInfo'; import { ChartContainerPro } from '../ChartContainerPro'; +import { ZoomProps } from '../context/ZoomProvider'; +import { useResponsiveChartContainerProProps } from './useResponsiveChartContainerProProps'; -export interface ResponsiveChartContainerProProps extends ResponsiveChartContainerProps {} +export interface ResponsiveChartContainerProProps + extends ResponsiveChartContainerProps, + ZoomProps {} const releaseInfo = getReleaseInfo(); @@ -14,12 +18,12 @@ const ResponsiveChartContainerPro = React.forwardRef(function ResponsiveChartCon props: ResponsiveChartContainerProProps, ref, ) { - const { chartContainerProps, resizableChartContainerProps, hasIntrinsicSize } = - useResponsiveChartContainerProps(props, ref); + const { chartContainerProProps, resizableChartContainerProps, hasIntrinsicSize } = + useResponsiveChartContainerProProps(props, ref); return ( - {hasIntrinsicSize ? : null} + {hasIntrinsicSize ? : null} ); @@ -77,6 +81,12 @@ ResponsiveChartContainerPro.propTypes = { * @param {HighlightItemData | null} highlightedItem The newly highlighted item. */ onHighlightChange: PropTypes.func, + /** + * Callback fired when the zoom has changed. + * + * @param {ZoomData[]} zoomData Updated zoom data. + */ + onZoomChange: PropTypes.func, /** * An array of plugins defining how to preprocess data. * If not provided, the container supports line, bar, scatter and pie charts. @@ -111,7 +121,6 @@ ResponsiveChartContainerPro.propTypes = { */ xAxis: PropTypes.arrayOf( PropTypes.shape({ - axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), classes: PropTypes.object, colorMap: PropTypes.oneOfType([ PropTypes.shape({ @@ -193,7 +202,6 @@ ResponsiveChartContainerPro.propTypes = { */ yAxis: PropTypes.arrayOf( PropTypes.shape({ - axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), classes: PropTypes.object, colorMap: PropTypes.oneOfType([ PropTypes.shape({ @@ -307,6 +315,16 @@ ResponsiveChartContainerPro.propTypes = { min: PropTypes.number, }), ), + /** + * The list of zoom data related to each axis. + */ + zoom: PropTypes.arrayOf( + PropTypes.shape({ + axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired, + end: PropTypes.number.isRequired, + start: PropTypes.number.isRequired, + }), + ), } as any; export { ResponsiveChartContainerPro }; diff --git a/packages/x-charts-pro/src/ResponsiveChartContainerPro/useResponsiveChartContainerProProps.ts b/packages/x-charts-pro/src/ResponsiveChartContainerPro/useResponsiveChartContainerProProps.ts new file mode 100644 index 000000000000..363e4f9c9fc3 --- /dev/null +++ b/packages/x-charts-pro/src/ResponsiveChartContainerPro/useResponsiveChartContainerProProps.ts @@ -0,0 +1,27 @@ +import { useResponsiveChartContainerProps } from '@mui/x-charts/internals'; +import type { ChartContainerProProps } from '../ChartContainerPro'; +import type { ResponsiveChartContainerProProps } from './ResponsiveChartContainerPro'; + +export const useResponsiveChartContainerProProps = ( + props: ResponsiveChartContainerProProps, + ref: React.ForwardedRef, +) => { + const { zoom, onZoomChange, ...baseProps } = props; + + const chartContainerProProps: Pick = { + zoom, + onZoomChange, + }; + + const { chartContainerProps, resizableChartContainerProps, hasIntrinsicSize } = + useResponsiveChartContainerProps(baseProps, ref); + + return { + chartContainerProProps: { + ...chartContainerProps, + ...chartContainerProProps, + }, + resizableChartContainerProps, + hasIntrinsicSize, + }; +}; diff --git a/packages/x-charts-pro/src/ScatterChartPro/ScatterChartPro.tsx b/packages/x-charts-pro/src/ScatterChartPro/ScatterChartPro.tsx index 11d0f2d3ddc7..0a6b54bfe058 100644 --- a/packages/x-charts-pro/src/ScatterChartPro/ScatterChartPro.tsx +++ b/packages/x-charts-pro/src/ScatterChartPro/ScatterChartPro.tsx @@ -12,8 +12,9 @@ import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip'; import { useScatterChartProps } from '@mui/x-charts/internals'; import { ResponsiveChartContainerPro } from '../ResponsiveChartContainerPro'; import { ZoomSetup } from '../context/ZoomProvider/ZoomSetup'; +import { ZoomProps } from '../context/ZoomProvider'; -export interface ScatterChartProProps extends ScatterChartProps {} +export interface ScatterChartProProps extends ScatterChartProps, ZoomProps {} /** * Demos: @@ -29,6 +30,7 @@ const ScatterChartPro = React.forwardRef(function ScatterChartPro( props: ScatterChartProProps, ref, ) { + const { zoom, onZoomChange, ...other } = props; const { chartContainerProps, zAxisProps, @@ -41,14 +43,23 @@ const ScatterChartPro = React.forwardRef(function ScatterChartPro( axisHighlightProps, tooltipProps, children, - } = useScatterChartProps(props); + } = useScatterChartProps(other); + return ( - + {!props.disableVoronoi && } {props.grid && } - + + {/* The `data-drawing-container` indicates that children are part of the drawing area. Ref: https://github.com/mui/mui-x/issues/13659 */} + + @@ -170,6 +181,12 @@ ScatterChartPro.propTypes = { * @param {ScatterItemIdentifier} scatterItemIdentifier The scatter item identifier. */ onItemClick: PropTypes.func, + /** + * Callback fired when the zoom has changed. + * + * @param {ZoomData[]} zoomData Updated zoom data. + */ + onZoomChange: PropTypes.func, /** * Indicate which axis to display the right of the charts. * Can be a string (the id of the axis) or an object `ChartsYAxisProps`. @@ -238,7 +255,6 @@ ScatterChartPro.propTypes = { */ xAxis: PropTypes.arrayOf( PropTypes.shape({ - axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), classes: PropTypes.object, colorMap: PropTypes.oneOfType([ PropTypes.shape({ @@ -320,7 +336,6 @@ ScatterChartPro.propTypes = { */ yAxis: PropTypes.arrayOf( PropTypes.shape({ - axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), classes: PropTypes.object, colorMap: PropTypes.oneOfType([ PropTypes.shape({ @@ -434,6 +449,16 @@ ScatterChartPro.propTypes = { min: PropTypes.number, }), ), + /** + * The list of zoom data related to each axis. + */ + zoom: PropTypes.arrayOf( + PropTypes.shape({ + axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired, + end: PropTypes.number.isRequired, + start: PropTypes.number.isRequired, + }), + ), } as any; export { ScatterChartPro }; diff --git a/packages/x-charts-pro/src/context/ZoomProvider/Zoom.types.ts b/packages/x-charts-pro/src/context/ZoomProvider/Zoom.types.ts index 2cc44f9c0620..ac3f9990fc69 100644 --- a/packages/x-charts-pro/src/context/ZoomProvider/Zoom.types.ts +++ b/packages/x-charts-pro/src/context/ZoomProvider/Zoom.types.ts @@ -1,5 +1,59 @@ import { AxisId } from '@mui/x-charts/internals'; +export type ZoomProviderProps = { + children: React.ReactNode; + /** + * The configuration of the x-axes. + * If not provided, a default axis config is used. + * An array of [[AxisConfig]] objects. + */ + xAxis?: AxisConfigForZoom[]; + /** + * The configuration of the y-axes. + * If not provided, a default axis config is used. + * An array of [[AxisConfig]] objects. + */ + yAxis?: AxisConfigForZoom[]; +} & ZoomProps; + +/** + * Represents the state of the ZoomProvider. + */ +export type ZoomState = { + /** + * Whether zooming is enabled. + */ + isZoomEnabled: boolean; + /** + * Whether panning is enabled. + */ + isPanEnabled: boolean; + /** + * The zoom options for each axis. + */ + options: Record; + /** + * The zoom data for each axis + * @default [] + */ + zoomData: ZoomData[]; + /** + * Set the zoom data for each axis. + * @param {ZoomData[]} zoomData The new zoom data. + */ + setZoomData: (zoomData: ZoomData[] | ((zoomData: ZoomData[]) => ZoomData[])) => void; + /** + * Whether the user is currently interacting with the chart. + * This is useful to prevent animations from running while the user is interacting. + */ + isInteracting: boolean; + /** + * Set the interaction state of the chart. + * @param {boolean} isInteracting The new interaction state. + */ + setIsInteracting: (isInteracting: boolean) => void; +}; + export type ZoomOptions = { /** * The starting percentage of the zoom range. In the range of 0 to 100. @@ -64,8 +118,16 @@ export type ZoomData = { }; export type ZoomProps = { + /** + * The list of zoom data related to each axis. + */ zoom?: ZoomData[]; - onZoomChange?: (zoom: ZoomData[]) => void; + /** + * Callback fired when the zoom has changed. + * + * @param {ZoomData[]} zoomData Updated zoom data. + */ + onZoomChange?: (zoomData: ZoomData[] | ((zoomData: ZoomData[]) => ZoomData[])) => void; }; export type DefaultizedZoomOptions = Required & { diff --git a/packages/x-charts-pro/src/context/ZoomProvider/ZoomContext.ts b/packages/x-charts-pro/src/context/ZoomProvider/ZoomContext.ts index 88edfe25d42c..a4cecd94d228 100644 --- a/packages/x-charts-pro/src/context/ZoomProvider/ZoomContext.ts +++ b/packages/x-charts-pro/src/context/ZoomProvider/ZoomContext.ts @@ -1,16 +1,6 @@ import * as React from 'react'; -import { AxisId, Initializable } from '@mui/x-charts/internals'; -import { DefaultizedZoomOptions, ZoomData } from './Zoom.types'; - -export type ZoomState = { - isZoomEnabled: boolean; - isPanEnabled: boolean; - options: Record; - zoomData: ZoomData[]; - setZoomData: (zoomData: ZoomData[]) => void; - isInteracting: boolean; - setIsInteracting: (isInteracting: boolean) => void; -}; +import { Initializable } from '@mui/x-charts/internals'; +import { ZoomState } from './Zoom.types'; export const ZoomContext = React.createContext>({ isInitialized: false, diff --git a/packages/x-charts-pro/src/context/ZoomProvider/ZoomProvider.tsx b/packages/x-charts-pro/src/context/ZoomProvider/ZoomProvider.tsx index 9e3cff88622d..6c55b6769318 100644 --- a/packages/x-charts-pro/src/context/ZoomProvider/ZoomProvider.tsx +++ b/packages/x-charts-pro/src/context/ZoomProvider/ZoomProvider.tsx @@ -1,25 +1,12 @@ import * as React from 'react'; -import { ZoomContext, ZoomState } from './ZoomContext'; +import useControlled from '@mui/utils/useControlled'; +import { Initializable } from '@mui/x-charts/internals'; +import { ZoomContext } from './ZoomContext'; import { defaultizeZoom } from './defaultizeZoom'; -import { AxisConfigForZoom, ZoomData } from './Zoom.types'; +import { ZoomData, ZoomProviderProps, ZoomState } from './Zoom.types'; +import { initializeZoomData } from './initializeZoomData'; -type ZoomProviderProps = { - children: React.ReactNode; - /** - * The configuration of the x-axes. - * If not provided, a default axis config is used. - * An array of [[AxisConfig]] objects. - */ - xAxis?: AxisConfigForZoom[]; - /** - * The configuration of the y-axes. - * If not provided, a default axis config is used. - * An array of [[AxisConfig]] objects. - */ - yAxis?: AxisConfigForZoom[]; -}; - -export function ZoomProvider({ children, xAxis, yAxis }: ZoomProviderProps) { +export function ZoomProvider({ children, xAxis, yAxis, zoom, onZoomChange }: ZoomProviderProps) { const [isInteracting, setIsInteracting] = React.useState(false); const options = React.useMemo( @@ -34,28 +21,40 @@ export function ZoomProvider({ children, xAxis, yAxis }: ZoomProviderProps) { [xAxis, yAxis], ); - const [zoomData, setZoomData] = React.useState(() => - Object.values(options).map(({ axisId, minStart: start, maxEnd: end }) => ({ - axisId, - start, - end, - })), + // Default zoom data is initialized only once when uncontrolled. If the user changes the options + // after the initial render, the zoom data will not be updated until the next zoom interaction. + // This is required to avoid warnings about controlled/uncontrolled components. + const defaultZoomData = React.useRef(initializeZoomData(options)); + + const [zoomData, setZoomData] = useControlled({ + controlled: zoom, + default: defaultZoomData.current, + name: 'ZoomProvider', + state: 'zoom', + }); + + const setZoomDataCallback = React.useCallback( + (newZoomData) => { + setZoomData(newZoomData); + onZoomChange?.(newZoomData); + }, + [setZoomData, onZoomChange], ); - const value = React.useMemo( + const value = React.useMemo>( () => ({ isInitialized: true, data: { - isZoomEnabled: zoomData.length > 0, + isZoomEnabled: Object.keys(options).length > 0, isPanEnabled: isPanEnabled(options), options, zoomData, - setZoomData, + setZoomData: setZoomDataCallback, isInteracting, setIsInteracting, }, }), - [zoomData, setZoomData, isInteracting, setIsInteracting, options], + [zoomData, isInteracting, setIsInteracting, options, setZoomDataCallback], ); return {children}; diff --git a/packages/x-charts-pro/src/context/ZoomProvider/ZoomSetup.ts b/packages/x-charts-pro/src/context/ZoomProvider/ZoomSetup.ts index 072baa872d42..775b173dabdf 100644 --- a/packages/x-charts-pro/src/context/ZoomProvider/ZoomSetup.ts +++ b/packages/x-charts-pro/src/context/ZoomProvider/ZoomSetup.ts @@ -1,6 +1,13 @@ import { useSetupPan } from './useSetupPan'; import { useSetupZoom } from './useSetupZoom'; +/** + * Sets up the zoom functionality if using composition or a custom chart. + * + * Simply add this component at the same level as the chart component to enable zooming and panning. + * + * See: [Composition](https://mui.com/x/react-charts/composition/) + */ function ZoomSetup() { useSetupZoom(); useSetupPan(); diff --git a/packages/x-charts-pro/src/context/ZoomProvider/initializeZoomData.ts b/packages/x-charts-pro/src/context/ZoomProvider/initializeZoomData.ts new file mode 100644 index 000000000000..454865c58648 --- /dev/null +++ b/packages/x-charts-pro/src/context/ZoomProvider/initializeZoomData.ts @@ -0,0 +1,11 @@ +import { ZoomState } from './Zoom.types'; + +// This function is used to initialize the zoom data when it is not provided by the user. +// It is helpful to avoid the need to provide the possibly auto-generated id for each axis. +export const initializeZoomData = (options: ZoomState['options']) => { + return Object.values(options).map(({ axisId, minStart: start, maxEnd: end }) => ({ + axisId, + start, + end, + })); +}; diff --git a/packages/x-charts-pro/src/context/ZoomProvider/useSetupZoom.ts b/packages/x-charts-pro/src/context/ZoomProvider/useSetupZoom.ts index 876f6bd873a2..c73900cd34ba 100644 --- a/packages/x-charts-pro/src/context/ZoomProvider/useSetupZoom.ts +++ b/packages/x-charts-pro/src/context/ZoomProvider/useSetupZoom.ts @@ -55,7 +55,7 @@ const zoomAtPoint = ( }; export const useSetupZoom = () => { - const { zoomData, setZoomData, isZoomEnabled, options, setIsInteracting } = useZoom(); + const { setZoomData, isZoomEnabled, options, setIsInteracting } = useZoom(); const drawingArea = useDrawingArea(); const svgRef = useSvgRef(); @@ -91,24 +91,28 @@ export const useSetupZoom = () => { setIsInteracting(false); }, 166); - const newZoomData = zoomData.map((zoom) => { - const option = options[zoom.axisId]; - const centerRatio = - option.axisDirection === 'x' - ? getHorizontalCenterRatio(point, drawingArea) - : getVerticalCenterRatio(point, drawingArea); + setZoomData((prevZoomData) => { + return prevZoomData.map((zoom) => { + const option = options[zoom.axisId]; + if (!option) { + return zoom; + } - const { scaleRatio, isZoomIn } = getWheelScaleRatio(event, option.step); - const [newMinRange, newMaxRange] = zoomAtPoint(centerRatio, scaleRatio, zoom, option); + const centerRatio = + option.axisDirection === 'x' + ? getHorizontalCenterRatio(point, drawingArea) + : getVerticalCenterRatio(point, drawingArea); - if (!isSpanValid(newMinRange, newMaxRange, isZoomIn, option)) { - return zoom; - } + const { scaleRatio, isZoomIn } = getWheelScaleRatio(event, option.step); + const [newMinRange, newMaxRange] = zoomAtPoint(centerRatio, scaleRatio, zoom, option); - return { axisId: zoom.axisId, start: newMinRange, end: newMaxRange }; - }); + if (!isSpanValid(newMinRange, newMaxRange, isZoomIn, option)) { + return zoom; + } - setZoomData(newZoomData); + return { axisId: zoom.axisId, start: newMinRange, end: newMaxRange }; + }); + }); }; function pointerDownHandler(event: PointerEvent) { @@ -134,39 +138,41 @@ export const useSetupZoom = () => { const firstEvent = eventCacheRef.current[0]; const curDiff = getDiff(eventCacheRef.current); - const newZoomData = zoomData.map((zoom) => { - const option = options[zoom.axisId]; - - const { scaleRatio, isZoomIn } = getPinchScaleRatio( - curDiff, - eventPrevDiff.current, - option.step, - ); - - // If the scale ratio is 0, it means the pinch gesture is not valid. - if (scaleRatio === 0) { - eventPrevDiff.current = curDiff; - return zoom; - } - - const point = getSVGPoint(element, firstEvent); - - const centerRatio = - option.axisDirection === 'x' - ? getHorizontalCenterRatio(point, drawingArea) - : getVerticalCenterRatio(point, drawingArea); - - const [newMinRange, newMaxRange] = zoomAtPoint(centerRatio, scaleRatio, zoom, option); - - if (!isSpanValid(newMinRange, newMaxRange, isZoomIn, option)) { - return zoom; - } - - return { axisId: zoom.axisId, start: newMinRange, end: newMaxRange }; + setZoomData((prevZoomData) => { + const newZoomData = prevZoomData.map((zoom) => { + const option = options[zoom.axisId]; + if (!option) { + return zoom; + } + + const { scaleRatio, isZoomIn } = getPinchScaleRatio( + curDiff, + eventPrevDiff.current, + option.step, + ); + + // If the scale ratio is 0, it means the pinch gesture is not valid. + if (scaleRatio === 0) { + return zoom; + } + + const point = getSVGPoint(element, firstEvent); + + const centerRatio = + option.axisDirection === 'x' + ? getHorizontalCenterRatio(point, drawingArea) + : getVerticalCenterRatio(point, drawingArea); + + const [newMinRange, newMaxRange] = zoomAtPoint(centerRatio, scaleRatio, zoom, option); + + if (!isSpanValid(newMinRange, newMaxRange, isZoomIn, option)) { + return zoom; + } + return { axisId: zoom.axisId, start: newMinRange, end: newMaxRange }; + }); + eventPrevDiff.current = curDiff; + return newZoomData; }); - - eventPrevDiff.current = curDiff; - setZoomData(newZoomData); } function pointerUpHandler(event: PointerEvent) { @@ -210,7 +216,7 @@ export const useSetupZoom = () => { clearTimeout(interactionTimeoutRef.current); } }; - }, [svgRef, setZoomData, zoomData, drawingArea, isZoomEnabled, options, setIsInteracting]); + }, [svgRef, setZoomData, drawingArea, isZoomEnabled, options, setIsInteracting]); }; /** diff --git a/packages/x-charts-pro/src/context/ZoomProvider/useZoom.ts b/packages/x-charts-pro/src/context/ZoomProvider/useZoom.ts index 59bda96ca395..af53a694c448 100644 --- a/packages/x-charts-pro/src/context/ZoomProvider/useZoom.ts +++ b/packages/x-charts-pro/src/context/ZoomProvider/useZoom.ts @@ -1,7 +1,23 @@ import * as React from 'react'; import { ZoomContext } from './ZoomContext'; +import { ZoomState } from './Zoom.types'; + +/** + * Get access to the zoom state. + * + * @returns {ZoomState} The zoom state. + */ +export function useZoom(): ZoomState { + const { data, isInitialized } = React.useContext(ZoomContext); + + if (!isInitialized) { + throw new Error( + [ + 'MUI X: Could not find the zoom context.', + 'It looks like you rendered your component outside of a ChartsContainer parent component.', + ].join('\n'), + ); + } -export const useZoom = () => { - const { data } = React.useContext(ZoomContext); return data; -}; +} diff --git a/packages/x-charts-pro/src/context/index.ts b/packages/x-charts-pro/src/context/index.ts new file mode 100644 index 000000000000..d0634736be8a --- /dev/null +++ b/packages/x-charts-pro/src/context/index.ts @@ -0,0 +1,4 @@ +// # Zoom & Pan +export type { ZoomOptions, ZoomData, ZoomProps, ZoomState } from './ZoomProvider/Zoom.types'; +export * from './ZoomProvider/useZoom'; +export * from './ZoomProvider/ZoomSetup'; diff --git a/packages/x-charts-pro/src/index.ts b/packages/x-charts-pro/src/index.ts index eade0525b940..34c236962381 100644 --- a/packages/x-charts-pro/src/index.ts +++ b/packages/x-charts-pro/src/index.ts @@ -33,3 +33,6 @@ export * from './ChartContainerPro'; export * from './ScatterChartPro'; export * from './BarChartPro'; export * from './LineChartPro'; + +// Pro context +export * from './context'; diff --git a/packages/x-charts-pro/src/typeOverloads/modules.ts b/packages/x-charts-pro/src/typeOverloads/modules.ts index 5dae3f83d41e..78c705633fce 100644 --- a/packages/x-charts-pro/src/typeOverloads/modules.ts +++ b/packages/x-charts-pro/src/typeOverloads/modules.ts @@ -4,7 +4,7 @@ import { HeatmapSeriesType, DefaultizedHeatmapSeriesType, } from '../models/seriesType/heatmap'; -import { ZoomOptions } from '../context/ZoomProvider/Zoom.types'; +import { ZoomOptions } from '../context/ZoomProvider'; declare module '@mui/x-charts/internals' { interface ChartsSeriesConfig { diff --git a/packages/x-charts-vendor/.babelrc.js b/packages/x-charts-vendor/.babelrc.js new file mode 100644 index 000000000000..21146f4cbc44 --- /dev/null +++ b/packages/x-charts-vendor/.babelrc.js @@ -0,0 +1,62 @@ +/** + * Transform d3 ESM libraries to vendored CommonJS libraries + * + * This produces `lib-vendor/d3-/src` files that have + * internally consistent references to other d3 packages. It is only meant + * to be used for the CommonJS import path. + */ +const path = require('path'); + +module.exports = { + only: [/node_modules\/(d3-.*|internmap|delaunator|robust-predicates)\/.*\.js/], + plugins: [ + [ + '@babel/transform-modules-commonjs', + { + strict: false, + allowTopLevelThis: true, + }, + ], + [ + 'module-resolver', + { + // Convert all imports for _other_ d3 dependencies to the relative + // path in our vendor package. + resolvePath(sourcePath, currentFile) { + const d3pattern = + /^(?(d3-[^\/]+|internmap|delaunator|robust-predicates))(?.*)/; + const match = d3pattern.exec(sourcePath); + if (match) { + // We're assuming a common shape of d3 packages: + // - Only top level imports "d3-" + // - With no path components (like "d3-/path/to.js") + if (match.groups.path) { + throw new Error(`Unable to process ${sourcePath} import in ${currentFile}`); + } + + // Get Vendor package path. + const vendorPkg = ['delaunator', 'robust-predicates'].includes(match.groups.pkg) + ? path.resolve(__dirname, `./lib-vendor/${match.groups.pkg}/index.js`) + : path.resolve(__dirname, `./lib-vendor/${match.groups.pkg}/src/index.js`); + + // Derive relative path to vendor lib to have a file like move from: + // - 'node_modules/d3-interpolate/src/rgb.js' + // - 'lib-vendor/d3-interpolate/src/rgb.js' + // and have an import transform like: + // - `d3-color` + // - `../../d3-color` + const currentFileVendor = currentFile.replace(/^node_modules/, 'lib-vendor'); + const relPathToPkg = path + .relative(path.dirname(currentFileVendor), vendorPkg) + .replace(/\\/g, '/'); + + return relPathToPkg; + } + + return sourcePath; + }, + }, + ], + '@babel/plugin-transform-runtime', + ], +}; diff --git a/packages/x-charts-vendor/.npmignore b/packages/x-charts-vendor/.npmignore new file mode 100644 index 000000000000..86e1a1cbaa58 --- /dev/null +++ b/packages/x-charts-vendor/.npmignore @@ -0,0 +1,14 @@ +/* +!/dist +!/es +!/lib +!/lib-vendor +!/src +!/d3-* +!/internmap.js +!LICENSE.txt +!CHANGELOG.md +!README.md +!package.json +*.map +**/*.test.* \ No newline at end of file diff --git a/packages/x-charts-vendor/README.md b/packages/x-charts-vendor/README.md new file mode 100644 index 000000000000..4084fe508626 --- /dev/null +++ b/packages/x-charts-vendor/README.md @@ -0,0 +1,76 @@ +# Charts Vendor + +Vendored dependencies for @mui/x-charts. + +An adaptation of the victory-vendor + +## Background + +D3 has released most of its libraries as ESM-only. This means that consumers in Node.js applications can no longer just `require()` anything with a d3 transitive dependency, including much of @mui/x-charts. + +To help provide an easy path to folks still using CommonJS in their Node.js applications that consume @mui/x-charts, we now provide this package to vendor in various d3-related packages. + +## Main difference with victory-vendor + +Victory is using the `d3-voronoid` which is an archived project. +Our chart library relies on the `d3-delaunay` which is also ESM only and reuse `robust-predicates` which is also ESM only + +## Packages + +We presently provide the following top-level libraries: + +- d3-color +- d3-delaunay +- d3-interpolate +- d3-scale +- d3-shape +- d3-time +- delaunator +- robust-predicate + +This is the total list of top and transitive libraries we vendor: + +- d3-array +- d3-color +- d3-delaunay +- d3-format +- d3-interpolate +- d3-path +- d3-scale +- d3-shape +- d3-time +- d3-time-format +- delaunator +- internmap +- robust-predicates + +## How it works + +We provide two alternate paths and behaviors -- for ESM and CommonJS + +### ESM + +If you do a Node.js import like: + +```js +import { interpolate } from '@mui/x-charts-vendor/d3-interpolate'; +``` + +under the hood it's going to just re-export and pass you through to `node_modules/d3-interpolate`, the **real** ESM library from D3. + +### CommonJS + +If you do a Node.js import like: + +```js +const { interpolate } = require('@mui/x-charts-vendor/d3-interpolate'); +``` + +under the hood, it will go to an alternate path that contains the transpiled version of the underlying d3 library found at `x-charts-vendor/lib-vendor/d3-interpolate/**/*.js`. +This further has internally consistent import references to other `x-charts-vendor/lib-vendor/` paths. + +Note that for some tooling (like Jest) that doesn't play well with `package.json:exports` routing to this CommonJS path, we **also** output a root file in the form of `x-charts-vendor/d3-interpolate.js`. + +## Licenses + +This project is released under the MIT license, but the vendored in libraries include other licenses (e.g. ISC) that we enumerate in our `package.json:license` field. diff --git a/packages/x-charts-vendor/d3-color.d.ts b/packages/x-charts-vendor/d3-color.d.ts new file mode 100644 index 000000000000..292a6c9c27f4 --- /dev/null +++ b/packages/x-charts-vendor/d3-color.d.ts @@ -0,0 +1,5 @@ + +// `x-charts-vendor/d3-color` (TypeScript) +// +// Export the type definitions for this package: +export * from "d3-color"; diff --git a/packages/x-charts-vendor/d3-color.js b/packages/x-charts-vendor/d3-color.js new file mode 100644 index 000000000000..5efda0590bda --- /dev/null +++ b/packages/x-charts-vendor/d3-color.js @@ -0,0 +1,7 @@ + +// `x-charts-vendor/d3-color` (CommonJS) +// See upstream license: https://github.com/d3/d3-color/blob/main/LICENSE +// +// This file only exists for tooling that doesn't work yet with package.json:exports +// by proxying through the CommonJS version. +module.exports = require("./lib/d3-color"); diff --git a/packages/x-charts-vendor/d3-delaunay.d.ts b/packages/x-charts-vendor/d3-delaunay.d.ts new file mode 100644 index 000000000000..802419f8f372 --- /dev/null +++ b/packages/x-charts-vendor/d3-delaunay.d.ts @@ -0,0 +1,5 @@ + +// `x-charts-vendor/d3-delaunay` (TypeScript) +// +// Export the type definitions for this package: +export * from "d3-delaunay"; diff --git a/packages/x-charts-vendor/d3-delaunay.js b/packages/x-charts-vendor/d3-delaunay.js new file mode 100644 index 000000000000..6d6883cfce88 --- /dev/null +++ b/packages/x-charts-vendor/d3-delaunay.js @@ -0,0 +1,7 @@ + +// `x-charts-vendor/d3-delaunay` (CommonJS) +// See upstream license: https://github.com/d3/d3-delaunay/blob/main/LICENSE +// +// This file only exists for tooling that doesn't work yet with package.json:exports +// by proxying through the CommonJS version. +module.exports = require("./lib/d3-delaunay"); diff --git a/packages/x-charts-vendor/d3-interpolate.d.ts b/packages/x-charts-vendor/d3-interpolate.d.ts new file mode 100644 index 000000000000..5b2fff9c555d --- /dev/null +++ b/packages/x-charts-vendor/d3-interpolate.d.ts @@ -0,0 +1,5 @@ + +// `x-charts-vendor/d3-interpolate` (TypeScript) +// +// Export the type definitions for this package: +export * from "d3-interpolate"; diff --git a/packages/x-charts-vendor/d3-interpolate.js b/packages/x-charts-vendor/d3-interpolate.js new file mode 100644 index 000000000000..654f2ce9e885 --- /dev/null +++ b/packages/x-charts-vendor/d3-interpolate.js @@ -0,0 +1,7 @@ + +// `x-charts-vendor/d3-interpolate` (CommonJS) +// See upstream license: https://github.com/d3/d3-interpolate/blob/main/LICENSE +// +// This file only exists for tooling that doesn't work yet with package.json:exports +// by proxying through the CommonJS version. +module.exports = require("./lib/d3-interpolate"); diff --git a/packages/x-charts-vendor/d3-scale.d.ts b/packages/x-charts-vendor/d3-scale.d.ts new file mode 100644 index 000000000000..f4b971dc2ec7 --- /dev/null +++ b/packages/x-charts-vendor/d3-scale.d.ts @@ -0,0 +1,5 @@ + +// `x-charts-vendor/d3-scale` (TypeScript) +// +// Export the type definitions for this package: +export * from "d3-scale"; diff --git a/packages/x-charts-vendor/d3-scale.js b/packages/x-charts-vendor/d3-scale.js new file mode 100644 index 000000000000..dcb70ec3a215 --- /dev/null +++ b/packages/x-charts-vendor/d3-scale.js @@ -0,0 +1,7 @@ + +// `x-charts-vendor/d3-scale` (CommonJS) +// See upstream license: https://github.com/d3/d3-scale/blob/main/LICENSE +// +// This file only exists for tooling that doesn't work yet with package.json:exports +// by proxying through the CommonJS version. +module.exports = require("./lib/d3-scale"); diff --git a/packages/x-charts-vendor/d3-shape.d.ts b/packages/x-charts-vendor/d3-shape.d.ts new file mode 100644 index 000000000000..fb79528677fa --- /dev/null +++ b/packages/x-charts-vendor/d3-shape.d.ts @@ -0,0 +1,5 @@ + +// `x-charts-vendor/d3-shape` (TypeScript) +// +// Export the type definitions for this package: +export * from "d3-shape"; diff --git a/packages/x-charts-vendor/d3-shape.js b/packages/x-charts-vendor/d3-shape.js new file mode 100644 index 000000000000..8d86b7713a92 --- /dev/null +++ b/packages/x-charts-vendor/d3-shape.js @@ -0,0 +1,7 @@ + +// `x-charts-vendor/d3-shape` (CommonJS) +// See upstream license: https://github.com/d3/d3-shape/blob/main/LICENSE +// +// This file only exists for tooling that doesn't work yet with package.json:exports +// by proxying through the CommonJS version. +module.exports = require("./lib/d3-shape"); diff --git a/packages/x-charts-vendor/d3-time.d.ts b/packages/x-charts-vendor/d3-time.d.ts new file mode 100644 index 000000000000..cbdf8bb2eef7 --- /dev/null +++ b/packages/x-charts-vendor/d3-time.d.ts @@ -0,0 +1,5 @@ + +// `x-charts-vendor/d3-time` (TypeScript) +// +// Export the type definitions for this package: +export * from "d3-time"; diff --git a/packages/x-charts-vendor/d3-time.js b/packages/x-charts-vendor/d3-time.js new file mode 100644 index 000000000000..0a99b4885af0 --- /dev/null +++ b/packages/x-charts-vendor/d3-time.js @@ -0,0 +1,7 @@ + +// `x-charts-vendor/d3-time` (CommonJS) +// See upstream license: https://github.com/d3/d3-time/blob/main/LICENSE +// +// This file only exists for tooling that doesn't work yet with package.json:exports +// by proxying through the CommonJS version. +module.exports = require("./lib/d3-time"); diff --git a/packages/x-charts-vendor/delaunator.d.ts b/packages/x-charts-vendor/delaunator.d.ts new file mode 100644 index 000000000000..7b745e0841f0 --- /dev/null +++ b/packages/x-charts-vendor/delaunator.d.ts @@ -0,0 +1,5 @@ + +// `x-charts-vendor/delaunator` (TypeScript) +// +// Export the type definitions for this package: +export * from "delaunator"; diff --git a/packages/x-charts-vendor/delaunator.js b/packages/x-charts-vendor/delaunator.js new file mode 100644 index 000000000000..6bd5b9889661 --- /dev/null +++ b/packages/x-charts-vendor/delaunator.js @@ -0,0 +1,7 @@ + +// `x-charts-vendor/delaunator` (CommonJS) +// See upstream license: https://github.com/mapbox/delaunator/blob/main/LICENSE +// +// This file only exists for tooling that doesn't work yet with package.json:exports +// by proxying through the CommonJS version. +module.exports = require("./lib/delaunator"); diff --git a/packages/x-charts-vendor/es/d3-array.js b/packages/x-charts-vendor/es/d3-array.js new file mode 100644 index 000000000000..d2ea11f4c569 --- /dev/null +++ b/packages/x-charts-vendor/es/d3-array.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/d3-array` (ESM) +// See upstream license: https://github.com/d3/d3-array/blob/main/LICENSE +// +// Our ESM package uses the underlying installed dependencies of `node_modules/d3-array` +export * from "d3-array"; diff --git a/packages/x-charts-vendor/es/d3-color.js b/packages/x-charts-vendor/es/d3-color.js new file mode 100644 index 000000000000..738ea776efa1 --- /dev/null +++ b/packages/x-charts-vendor/es/d3-color.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/d3-color` (ESM) +// See upstream license: https://github.com/d3/d3-color/blob/main/LICENSE +// +// Our ESM package uses the underlying installed dependencies of `node_modules/d3-color` +export * from "d3-color"; diff --git a/packages/x-charts-vendor/es/d3-delaunay.js b/packages/x-charts-vendor/es/d3-delaunay.js new file mode 100644 index 000000000000..c923313d628d --- /dev/null +++ b/packages/x-charts-vendor/es/d3-delaunay.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/d3-delaunay` (ESM) +// See upstream license: https://github.com/d3/d3-delaunay/blob/main/LICENSE +// +// Our ESM package uses the underlying installed dependencies of `node_modules/d3-delaunay` +export * from "d3-delaunay"; diff --git a/packages/x-charts-vendor/es/d3-format.js b/packages/x-charts-vendor/es/d3-format.js new file mode 100644 index 000000000000..ae4d63d49f38 --- /dev/null +++ b/packages/x-charts-vendor/es/d3-format.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/d3-format` (ESM) +// See upstream license: https://github.com/d3/d3-format/blob/main/LICENSE +// +// Our ESM package uses the underlying installed dependencies of `node_modules/d3-format` +export * from "d3-format"; diff --git a/packages/x-charts-vendor/es/d3-interpolate.js b/packages/x-charts-vendor/es/d3-interpolate.js new file mode 100644 index 000000000000..943fcf72aab0 --- /dev/null +++ b/packages/x-charts-vendor/es/d3-interpolate.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/d3-interpolate` (ESM) +// See upstream license: https://github.com/d3/d3-interpolate/blob/main/LICENSE +// +// Our ESM package uses the underlying installed dependencies of `node_modules/d3-interpolate` +export * from "d3-interpolate"; diff --git a/packages/x-charts-vendor/es/d3-path.js b/packages/x-charts-vendor/es/d3-path.js new file mode 100644 index 000000000000..08415047f013 --- /dev/null +++ b/packages/x-charts-vendor/es/d3-path.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/d3-path` (ESM) +// See upstream license: https://github.com/d3/d3-path/blob/main/LICENSE +// +// Our ESM package uses the underlying installed dependencies of `node_modules/d3-path` +export * from "d3-path"; diff --git a/packages/x-charts-vendor/es/d3-scale.js b/packages/x-charts-vendor/es/d3-scale.js new file mode 100644 index 000000000000..ff3458b65c14 --- /dev/null +++ b/packages/x-charts-vendor/es/d3-scale.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/d3-scale` (ESM) +// See upstream license: https://github.com/d3/d3-scale/blob/main/LICENSE +// +// Our ESM package uses the underlying installed dependencies of `node_modules/d3-scale` +export * from "d3-scale"; diff --git a/packages/x-charts-vendor/es/d3-shape.js b/packages/x-charts-vendor/es/d3-shape.js new file mode 100644 index 000000000000..0e4ad9fa5c78 --- /dev/null +++ b/packages/x-charts-vendor/es/d3-shape.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/d3-shape` (ESM) +// See upstream license: https://github.com/d3/d3-shape/blob/main/LICENSE +// +// Our ESM package uses the underlying installed dependencies of `node_modules/d3-shape` +export * from "d3-shape"; diff --git a/packages/x-charts-vendor/es/d3-time-format.js b/packages/x-charts-vendor/es/d3-time-format.js new file mode 100644 index 000000000000..7271b4dabdfa --- /dev/null +++ b/packages/x-charts-vendor/es/d3-time-format.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/d3-time-format` (ESM) +// See upstream license: https://github.com/d3/d3-time-format/blob/main/LICENSE +// +// Our ESM package uses the underlying installed dependencies of `node_modules/d3-time-format` +export * from "d3-time-format"; diff --git a/packages/x-charts-vendor/es/d3-time.js b/packages/x-charts-vendor/es/d3-time.js new file mode 100644 index 000000000000..f23c5a38309d --- /dev/null +++ b/packages/x-charts-vendor/es/d3-time.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/d3-time` (ESM) +// See upstream license: https://github.com/d3/d3-time/blob/main/LICENSE +// +// Our ESM package uses the underlying installed dependencies of `node_modules/d3-time` +export * from "d3-time"; diff --git a/packages/x-charts-vendor/es/delaunator.js b/packages/x-charts-vendor/es/delaunator.js new file mode 100644 index 000000000000..02e446552949 --- /dev/null +++ b/packages/x-charts-vendor/es/delaunator.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/delaunator` (ESM) +// See upstream license: https://github.com/mapbox/delaunator/blob/main/LICENSE +// +// Our ESM package uses the underlying installed dependencies of `node_modules/delaunator` +export * from "delaunator"; diff --git a/packages/x-charts-vendor/es/internmap.js b/packages/x-charts-vendor/es/internmap.js new file mode 100644 index 000000000000..221109d8ff69 --- /dev/null +++ b/packages/x-charts-vendor/es/internmap.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/internmap` (ESM) +// See upstream license: https://github.com/mbostock/internmap/blob/main/LICENSE +// +// Our ESM package uses the underlying installed dependencies of `node_modules/internmap` +export * from "internmap"; diff --git a/packages/x-charts-vendor/es/robust-predicates.js b/packages/x-charts-vendor/es/robust-predicates.js new file mode 100644 index 000000000000..6b52e786ecb3 --- /dev/null +++ b/packages/x-charts-vendor/es/robust-predicates.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/robust-predicates` (ESM) +// See upstream license: https://github.com/mourner/robust-predicates/blob/main/LICENSE +// +// Our ESM package uses the underlying installed dependencies of `node_modules/robust-predicates` +export * from "robust-predicates"; diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/LICENSE b/packages/x-charts-vendor/lib-vendor/d3-array/LICENSE new file mode 100644 index 000000000000..3594fffaf63c --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/LICENSE @@ -0,0 +1,13 @@ +Copyright 2010-2023 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/array.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/array.js new file mode 100644 index 000000000000..3639cfa1ce04 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/array.js @@ -0,0 +1,9 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.slice = exports.map = void 0; +var array = Array.prototype; +var slice = exports.slice = array.slice; +var map = exports.map = array.map; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/ascending.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/ascending.js new file mode 100644 index 000000000000..8ffcc8c4750a --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/ascending.js @@ -0,0 +1,9 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = ascending; +function ascending(a, b) { + return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/bin.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/bin.js new file mode 100644 index 000000000000..bfc4c11dc36d --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/bin.js @@ -0,0 +1,126 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = bin; +var _array = require("./array.js"); +var _bisect = _interopRequireDefault(require("./bisect.js")); +var _constant = _interopRequireDefault(require("./constant.js")); +var _extent = _interopRequireDefault(require("./extent.js")); +var _identity = _interopRequireDefault(require("./identity.js")); +var _nice = _interopRequireDefault(require("./nice.js")); +var _ticks = _interopRequireWildcard(require("./ticks.js")); +var _sturges = _interopRequireDefault(require("./threshold/sturges.js")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +function bin() { + var value = _identity.default, + domain = _extent.default, + threshold = _sturges.default; + function histogram(data) { + if (!Array.isArray(data)) data = Array.from(data); + var i, + n = data.length, + x, + step, + values = new Array(n); + for (i = 0; i < n; ++i) { + values[i] = value(data[i], i, data); + } + var xz = domain(values), + x0 = xz[0], + x1 = xz[1], + tz = threshold(values, x0, x1); + + // Convert number of thresholds into uniform thresholds, and nice the + // default domain accordingly. + if (!Array.isArray(tz)) { + const max = x1, + tn = +tz; + if (domain === _extent.default) [x0, x1] = (0, _nice.default)(x0, x1, tn); + tz = (0, _ticks.default)(x0, x1, tn); + + // If the domain is aligned with the first tick (which it will by + // default), then we can use quantization rather than bisection to bin + // values, which is substantially faster. + if (tz[0] <= x0) step = (0, _ticks.tickIncrement)(x0, x1, tn); + + // If the last threshold is coincident with the domain’s upper bound, the + // last bin will be zero-width. If the default domain is used, and this + // last threshold is coincident with the maximum input value, we can + // extend the niced upper bound by one tick to ensure uniform bin widths; + // otherwise, we simply remove the last threshold. Note that we don’t + // coerce values or the domain to numbers, and thus must be careful to + // compare order (>=) rather than strict equality (===)! + if (tz[tz.length - 1] >= x1) { + if (max >= x1 && domain === _extent.default) { + const step = (0, _ticks.tickIncrement)(x0, x1, tn); + if (isFinite(step)) { + if (step > 0) { + x1 = (Math.floor(x1 / step) + 1) * step; + } else if (step < 0) { + x1 = (Math.ceil(x1 * -step) + 1) / -step; + } + } + } else { + tz.pop(); + } + } + } + + // Remove any thresholds outside the domain. + // Be careful not to mutate an array owned by the user! + var m = tz.length, + a = 0, + b = m; + while (tz[a] <= x0) ++a; + while (tz[b - 1] > x1) --b; + if (a || b < m) tz = tz.slice(a, b), m = b - a; + var bins = new Array(m + 1), + bin; + + // Initialize bins. + for (i = 0; i <= m; ++i) { + bin = bins[i] = []; + bin.x0 = i > 0 ? tz[i - 1] : x0; + bin.x1 = i < m ? tz[i] : x1; + } + + // Assign data to bins by value, ignoring any outside the domain. + if (isFinite(step)) { + if (step > 0) { + for (i = 0; i < n; ++i) { + if ((x = values[i]) != null && x0 <= x && x <= x1) { + bins[Math.min(m, Math.floor((x - x0) / step))].push(data[i]); + } + } + } else if (step < 0) { + for (i = 0; i < n; ++i) { + if ((x = values[i]) != null && x0 <= x && x <= x1) { + const j = Math.floor((x0 - x) * step); + bins[Math.min(m, j + (tz[j] <= x))].push(data[i]); // handle off-by-one due to rounding + } + } + } + } else { + for (i = 0; i < n; ++i) { + if ((x = values[i]) != null && x0 <= x && x <= x1) { + bins[(0, _bisect.default)(tz, x, 0, m)].push(data[i]); + } + } + } + return bins; + } + histogram.value = function (_) { + return arguments.length ? (value = typeof _ === "function" ? _ : (0, _constant.default)(_), histogram) : value; + }; + histogram.domain = function (_) { + return arguments.length ? (domain = typeof _ === "function" ? _ : (0, _constant.default)([_[0], _[1]]), histogram) : domain; + }; + histogram.thresholds = function (_) { + return arguments.length ? (threshold = typeof _ === "function" ? _ : (0, _constant.default)(Array.isArray(_) ? _array.slice.call(_) : _), histogram) : threshold; + }; + return histogram; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/bisect.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/bisect.js new file mode 100644 index 000000000000..9c97e4056cfd --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/bisect.js @@ -0,0 +1,15 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.bisectRight = exports.bisectLeft = exports.bisectCenter = void 0; +var _ascending = _interopRequireDefault(require("./ascending.js")); +var _bisector = _interopRequireDefault(require("./bisector.js")); +var _number = _interopRequireDefault(require("./number.js")); +const ascendingBisect = (0, _bisector.default)(_ascending.default); +const bisectRight = exports.bisectRight = ascendingBisect.right; +const bisectLeft = exports.bisectLeft = ascendingBisect.left; +const bisectCenter = exports.bisectCenter = (0, _bisector.default)(_number.default).center; +var _default = exports.default = bisectRight; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/bisector.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/bisector.js new file mode 100644 index 000000000000..2183e0c640a1 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/bisector.js @@ -0,0 +1,59 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = bisector; +var _ascending = _interopRequireDefault(require("./ascending.js")); +var _descending = _interopRequireDefault(require("./descending.js")); +function bisector(f) { + let compare1, compare2, delta; + + // If an accessor is specified, promote it to a comparator. In this case we + // can test whether the search value is (self-) comparable. We can’t do this + // for a comparator (except for specific, known comparators) because we can’t + // tell if the comparator is symmetric, and an asymmetric comparator can’t be + // used to test whether a single value is comparable. + if (f.length !== 2) { + compare1 = _ascending.default; + compare2 = (d, x) => (0, _ascending.default)(f(d), x); + delta = (d, x) => f(d) - x; + } else { + compare1 = f === _ascending.default || f === _descending.default ? f : zero; + compare2 = f; + delta = f; + } + function left(a, x, lo = 0, hi = a.length) { + if (lo < hi) { + if (compare1(x, x) !== 0) return hi; + do { + const mid = lo + hi >>> 1; + if (compare2(a[mid], x) < 0) lo = mid + 1;else hi = mid; + } while (lo < hi); + } + return lo; + } + function right(a, x, lo = 0, hi = a.length) { + if (lo < hi) { + if (compare1(x, x) !== 0) return hi; + do { + const mid = lo + hi >>> 1; + if (compare2(a[mid], x) <= 0) lo = mid + 1;else hi = mid; + } while (lo < hi); + } + return lo; + } + function center(a, x, lo = 0, hi = a.length) { + const i = left(a, x, lo, hi - 1); + return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i; + } + return { + left, + center, + right + }; +} +function zero() { + return 0; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/blur.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/blur.js new file mode 100644 index 000000000000..4c69838b67d8 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/blur.js @@ -0,0 +1,122 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.blur = blur; +exports.blurImage = exports.blur2 = void 0; +function blur(values, r) { + if (!((r = +r) >= 0)) throw new RangeError("invalid r"); + let length = values.length; + if (!((length = Math.floor(length)) >= 0)) throw new RangeError("invalid length"); + if (!length || !r) return values; + const blur = blurf(r); + const temp = values.slice(); + blur(values, temp, 0, length, 1); + blur(temp, values, 0, length, 1); + blur(values, temp, 0, length, 1); + return values; +} +const blur2 = exports.blur2 = Blur2(blurf); +const blurImage = exports.blurImage = Blur2(blurfImage); +function Blur2(blur) { + return function (data, rx, ry = rx) { + if (!((rx = +rx) >= 0)) throw new RangeError("invalid rx"); + if (!((ry = +ry) >= 0)) throw new RangeError("invalid ry"); + let { + data: values, + width, + height + } = data; + if (!((width = Math.floor(width)) >= 0)) throw new RangeError("invalid width"); + if (!((height = Math.floor(height !== undefined ? height : values.length / width)) >= 0)) throw new RangeError("invalid height"); + if (!width || !height || !rx && !ry) return data; + const blurx = rx && blur(rx); + const blury = ry && blur(ry); + const temp = values.slice(); + if (blurx && blury) { + blurh(blurx, temp, values, width, height); + blurh(blurx, values, temp, width, height); + blurh(blurx, temp, values, width, height); + blurv(blury, values, temp, width, height); + blurv(blury, temp, values, width, height); + blurv(blury, values, temp, width, height); + } else if (blurx) { + blurh(blurx, values, temp, width, height); + blurh(blurx, temp, values, width, height); + blurh(blurx, values, temp, width, height); + } else if (blury) { + blurv(blury, values, temp, width, height); + blurv(blury, temp, values, width, height); + blurv(blury, values, temp, width, height); + } + return data; + }; +} +function blurh(blur, T, S, w, h) { + for (let y = 0, n = w * h; y < n;) { + blur(T, S, y, y += w, 1); + } +} +function blurv(blur, T, S, w, h) { + for (let x = 0, n = w * h; x < w; ++x) { + blur(T, S, x, x + n, w); + } +} +function blurfImage(radius) { + const blur = blurf(radius); + return (T, S, start, stop, step) => { + start <<= 2, stop <<= 2, step <<= 2; + blur(T, S, start + 0, stop + 0, step); + blur(T, S, start + 1, stop + 1, step); + blur(T, S, start + 2, stop + 2, step); + blur(T, S, start + 3, stop + 3, step); + }; +} + +// Given a target array T, a source array S, sets each value T[i] to the average +// of {S[i - r], …, S[i], …, S[i + r]}, where r = ⌊radius⌋, start <= i < stop, +// for each i, i + step, i + 2 * step, etc., and where S[j] is clamped between +// S[start] (inclusive) and S[stop] (exclusive). If the given radius is not an +// integer, S[i - r - 1] and S[i + r + 1] are added to the sum, each weighted +// according to r - ⌊radius⌋. +function blurf(radius) { + const radius0 = Math.floor(radius); + if (radius0 === radius) return bluri(radius); + const t = radius - radius0; + const w = 2 * radius + 1; + return (T, S, start, stop, step) => { + // stop must be aligned! + if (!((stop -= step) >= start)) return; // inclusive stop + let sum = radius0 * S[start]; + const s0 = step * radius0; + const s1 = s0 + step; + for (let i = start, j = start + s0; i < j; i += step) { + sum += S[Math.min(stop, i)]; + } + for (let i = start, j = stop; i <= j; i += step) { + sum += S[Math.min(stop, i + s0)]; + T[i] = (sum + t * (S[Math.max(start, i - s1)] + S[Math.min(stop, i + s1)])) / w; + sum -= S[Math.max(start, i - s0)]; + } + }; +} + +// Like blurf, but optimized for integer radius. +function bluri(radius) { + const w = 2 * radius + 1; + return (T, S, start, stop, step) => { + // stop must be aligned! + if (!((stop -= step) >= start)) return; // inclusive stop + let sum = radius * S[start]; + const s = step * radius; + for (let i = start, j = start + s; i < j; i += step) { + sum += S[Math.min(stop, i)]; + } + for (let i = start, j = stop; i <= j; i += step) { + sum += S[Math.min(stop, i + s)]; + T[i] = sum / w; + sum -= S[Math.max(start, i - s)]; + } + }; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/constant.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/constant.js new file mode 100644 index 000000000000..616bd0612628 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/constant.js @@ -0,0 +1,9 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = constant; +function constant(x) { + return () => x; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/count.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/count.js new file mode 100644 index 000000000000..ea548171aa95 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/count.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = count; +function count(values, valueof) { + let count = 0; + if (valueof === undefined) { + for (let value of values) { + if (value != null && (value = +value) >= value) { + ++count; + } + } + } else { + let index = -1; + for (let value of values) { + if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { + ++count; + } + } + } + return count; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/cross.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/cross.js new file mode 100644 index 000000000000..c530a523ba65 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/cross.js @@ -0,0 +1,35 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = cross; +function length(array) { + return array.length | 0; +} +function empty(length) { + return !(length > 0); +} +function arrayify(values) { + return typeof values !== "object" || "length" in values ? values : Array.from(values); +} +function reducer(reduce) { + return values => reduce(...values); +} +function cross(...values) { + const reduce = typeof values[values.length - 1] === "function" && reducer(values.pop()); + values = values.map(arrayify); + const lengths = values.map(length); + const j = values.length - 1; + const index = new Array(j + 1).fill(0); + const product = []; + if (j < 0 || lengths.some(empty)) return product; + while (true) { + product.push(index.map((j, i) => values[i][j])); + let i = j; + while (++index[i] === lengths[i]) { + if (i === 0) return reduce ? product.map(reduce) : product; + index[i--] = 0; + } + } +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/cumsum.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/cumsum.js new file mode 100644 index 000000000000..88617614eb26 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/cumsum.js @@ -0,0 +1,11 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = cumsum; +function cumsum(values, valueof) { + var sum = 0, + index = 0; + return Float64Array.from(values, valueof === undefined ? v => sum += +v || 0 : v => sum += +valueof(v, index++, values) || 0); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/descending.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/descending.js new file mode 100644 index 000000000000..539986716665 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/descending.js @@ -0,0 +1,9 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = descending; +function descending(a, b) { + return a == null || b == null ? NaN : b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/deviation.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/deviation.js new file mode 100644 index 000000000000..bbfc08171706 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/deviation.js @@ -0,0 +1,12 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = deviation; +var _variance = _interopRequireDefault(require("./variance.js")); +function deviation(values, valueof) { + const v = (0, _variance.default)(values, valueof); + return v ? Math.sqrt(v) : v; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/difference.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/difference.js new file mode 100644 index 000000000000..b287251899ec --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/difference.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = difference; +var _index = require("../../../lib-vendor/internmap/src/index.js"); +function difference(values, ...others) { + values = new _index.InternSet(values); + for (const other of others) { + for (const value of other) { + values.delete(value); + } + } + return values; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/disjoint.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/disjoint.js new file mode 100644 index 000000000000..7cac5ed41b85 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/disjoint.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = disjoint; +var _index = require("../../../lib-vendor/internmap/src/index.js"); +function disjoint(values, other) { + const iterator = other[Symbol.iterator](), + set = new _index.InternSet(); + for (const v of values) { + if (set.has(v)) return false; + let value, done; + while (({ + value, + done + } = iterator.next())) { + if (done) break; + if (Object.is(v, value)) return false; + set.add(value); + } + } + return true; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/every.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/every.js new file mode 100644 index 000000000000..58f8d416400f --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/every.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = every; +function every(values, test) { + if (typeof test !== "function") throw new TypeError("test is not a function"); + let index = -1; + for (const value of values) { + if (!test(value, ++index, values)) { + return false; + } + } + return true; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/extent.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/extent.js new file mode 100644 index 000000000000..7ded95fb36f3 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/extent.js @@ -0,0 +1,35 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = extent; +function extent(values, valueof) { + let min; + let max; + if (valueof === undefined) { + for (const value of values) { + if (value != null) { + if (min === undefined) { + if (value >= value) min = max = value; + } else { + if (min > value) min = value; + if (max < value) max = value; + } + } + } + } else { + let index = -1; + for (let value of values) { + if ((value = valueof(value, ++index, values)) != null) { + if (min === undefined) { + if (value >= value) min = max = value; + } else { + if (min > value) min = value; + if (max < value) max = value; + } + } + } + } + return [min, max]; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/filter.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/filter.js new file mode 100644 index 000000000000..475c79f31f50 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/filter.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = filter; +function filter(values, test) { + if (typeof test !== "function") throw new TypeError("test is not a function"); + const array = []; + let index = -1; + for (const value of values) { + if (test(value, ++index, values)) { + array.push(value); + } + } + return array; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/fsum.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/fsum.js new file mode 100644 index 000000000000..5458f3578752 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/fsum.js @@ -0,0 +1,77 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Adder = void 0; +exports.fcumsum = fcumsum; +exports.fsum = fsum; +// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423 +class Adder { + constructor() { + this._partials = new Float64Array(32); + this._n = 0; + } + add(x) { + const p = this._partials; + let i = 0; + for (let j = 0; j < this._n && j < 32; j++) { + const y = p[j], + hi = x + y, + lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x); + if (lo) p[i++] = lo; + x = hi; + } + p[i] = x; + this._n = i + 1; + return this; + } + valueOf() { + const p = this._partials; + let n = this._n, + x, + y, + lo, + hi = 0; + if (n > 0) { + hi = p[--n]; + while (n > 0) { + x = hi; + y = p[--n]; + hi = x + y; + lo = y - (hi - x); + if (lo) break; + } + if (n > 0 && (lo < 0 && p[n - 1] < 0 || lo > 0 && p[n - 1] > 0)) { + y = lo * 2; + x = hi + y; + if (y == x - hi) hi = x; + } + } + return hi; + } +} +exports.Adder = Adder; +function fsum(values, valueof) { + const adder = new Adder(); + if (valueof === undefined) { + for (let value of values) { + if (value = +value) { + adder.add(value); + } + } + } else { + let index = -1; + for (let value of values) { + if (value = +valueof(value, ++index, values)) { + adder.add(value); + } + } + } + return +adder; +} +function fcumsum(values, valueof) { + const adder = new Adder(); + let index = -1; + return Float64Array.from(values, valueof === undefined ? v => adder.add(+v || 0) : v => adder.add(+valueof(v, ++index, values) || 0)); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/greatest.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/greatest.js new file mode 100644 index 000000000000..52cb3db6242c --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/greatest.js @@ -0,0 +1,31 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = greatest; +var _ascending = _interopRequireDefault(require("./ascending.js")); +function greatest(values, compare = _ascending.default) { + let max; + let defined = false; + if (compare.length === 1) { + let maxValue; + for (const element of values) { + const value = compare(element); + if (defined ? (0, _ascending.default)(value, maxValue) > 0 : (0, _ascending.default)(value, value) === 0) { + max = element; + maxValue = value; + defined = true; + } + } + } else { + for (const value of values) { + if (defined ? compare(value, max) > 0 : compare(value, value) === 0) { + max = value; + defined = true; + } + } + } + return max; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/greatestIndex.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/greatestIndex.js new file mode 100644 index 000000000000..a61530f0c04b --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/greatestIndex.js @@ -0,0 +1,23 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = greatestIndex; +var _ascending = _interopRequireDefault(require("./ascending.js")); +var _maxIndex = _interopRequireDefault(require("./maxIndex.js")); +function greatestIndex(values, compare = _ascending.default) { + if (compare.length === 1) return (0, _maxIndex.default)(values, compare); + let maxValue; + let max = -1; + let index = -1; + for (const value of values) { + ++index; + if (max < 0 ? compare(value, value) === 0 : compare(value, maxValue) > 0) { + maxValue = value; + max = index; + } + } + return max; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/group.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/group.js new file mode 100644 index 000000000000..d6ea16bcdad1 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/group.js @@ -0,0 +1,67 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = group; +exports.flatGroup = flatGroup; +exports.flatRollup = flatRollup; +exports.groups = groups; +exports.index = index; +exports.indexes = indexes; +exports.rollup = rollup; +exports.rollups = rollups; +var _index = require("../../../lib-vendor/internmap/src/index.js"); +var _identity = _interopRequireDefault(require("./identity.js")); +function group(values, ...keys) { + return nest(values, _identity.default, _identity.default, keys); +} +function groups(values, ...keys) { + return nest(values, Array.from, _identity.default, keys); +} +function flatten(groups, keys) { + for (let i = 1, n = keys.length; i < n; ++i) { + groups = groups.flatMap(g => g.pop().map(([key, value]) => [...g, key, value])); + } + return groups; +} +function flatGroup(values, ...keys) { + return flatten(groups(values, ...keys), keys); +} +function flatRollup(values, reduce, ...keys) { + return flatten(rollups(values, reduce, ...keys), keys); +} +function rollup(values, reduce, ...keys) { + return nest(values, _identity.default, reduce, keys); +} +function rollups(values, reduce, ...keys) { + return nest(values, Array.from, reduce, keys); +} +function index(values, ...keys) { + return nest(values, _identity.default, unique, keys); +} +function indexes(values, ...keys) { + return nest(values, Array.from, unique, keys); +} +function unique(values) { + if (values.length !== 1) throw new Error("duplicate key"); + return values[0]; +} +function nest(values, map, reduce, keys) { + return function regroup(values, i) { + if (i >= keys.length) return reduce(values); + const groups = new _index.InternMap(); + const keyof = keys[i++]; + let index = -1; + for (const value of values) { + const key = keyof(value, ++index, values); + const group = groups.get(key); + if (group) group.push(value);else groups.set(key, [value]); + } + for (const [key, values] of groups) { + groups.set(key, regroup(values, i)); + } + return map(groups); + }(values, 0); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/groupSort.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/groupSort.js new file mode 100644 index 000000000000..d60afc53da4c --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/groupSort.js @@ -0,0 +1,15 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = groupSort; +var _ascending = _interopRequireDefault(require("./ascending.js")); +var _group = _interopRequireWildcard(require("./group.js")); +var _sort = _interopRequireDefault(require("./sort.js")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +function groupSort(values, reduce, key) { + return (reduce.length !== 2 ? (0, _sort.default)((0, _group.rollup)(values, reduce, key), ([ak, av], [bk, bv]) => (0, _ascending.default)(av, bv) || (0, _ascending.default)(ak, bk)) : (0, _sort.default)((0, _group.default)(values, key), ([ak, av], [bk, bv]) => reduce(av, bv) || (0, _ascending.default)(ak, bk))).map(([key]) => key); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/identity.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/identity.js new file mode 100644 index 000000000000..b2b2e6261051 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/identity.js @@ -0,0 +1,9 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = identity; +function identity(x) { + return x; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/index.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/index.js new file mode 100644 index 000000000000..1231cadc8874 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/index.js @@ -0,0 +1,539 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "Adder", { + enumerable: true, + get: function () { + return _fsum.Adder; + } +}); +Object.defineProperty(exports, "InternMap", { + enumerable: true, + get: function () { + return _index.InternMap; + } +}); +Object.defineProperty(exports, "InternSet", { + enumerable: true, + get: function () { + return _index.InternSet; + } +}); +Object.defineProperty(exports, "ascending", { + enumerable: true, + get: function () { + return _ascending.default; + } +}); +Object.defineProperty(exports, "bin", { + enumerable: true, + get: function () { + return _bin.default; + } +}); +Object.defineProperty(exports, "bisect", { + enumerable: true, + get: function () { + return _bisect.default; + } +}); +Object.defineProperty(exports, "bisectCenter", { + enumerable: true, + get: function () { + return _bisect.bisectCenter; + } +}); +Object.defineProperty(exports, "bisectLeft", { + enumerable: true, + get: function () { + return _bisect.bisectLeft; + } +}); +Object.defineProperty(exports, "bisectRight", { + enumerable: true, + get: function () { + return _bisect.bisectRight; + } +}); +Object.defineProperty(exports, "bisector", { + enumerable: true, + get: function () { + return _bisector.default; + } +}); +Object.defineProperty(exports, "blur", { + enumerable: true, + get: function () { + return _blur.blur; + } +}); +Object.defineProperty(exports, "blur2", { + enumerable: true, + get: function () { + return _blur.blur2; + } +}); +Object.defineProperty(exports, "blurImage", { + enumerable: true, + get: function () { + return _blur.blurImage; + } +}); +Object.defineProperty(exports, "count", { + enumerable: true, + get: function () { + return _count.default; + } +}); +Object.defineProperty(exports, "cross", { + enumerable: true, + get: function () { + return _cross.default; + } +}); +Object.defineProperty(exports, "cumsum", { + enumerable: true, + get: function () { + return _cumsum.default; + } +}); +Object.defineProperty(exports, "descending", { + enumerable: true, + get: function () { + return _descending.default; + } +}); +Object.defineProperty(exports, "deviation", { + enumerable: true, + get: function () { + return _deviation.default; + } +}); +Object.defineProperty(exports, "difference", { + enumerable: true, + get: function () { + return _difference.default; + } +}); +Object.defineProperty(exports, "disjoint", { + enumerable: true, + get: function () { + return _disjoint.default; + } +}); +Object.defineProperty(exports, "every", { + enumerable: true, + get: function () { + return _every.default; + } +}); +Object.defineProperty(exports, "extent", { + enumerable: true, + get: function () { + return _extent.default; + } +}); +Object.defineProperty(exports, "fcumsum", { + enumerable: true, + get: function () { + return _fsum.fcumsum; + } +}); +Object.defineProperty(exports, "filter", { + enumerable: true, + get: function () { + return _filter.default; + } +}); +Object.defineProperty(exports, "flatGroup", { + enumerable: true, + get: function () { + return _group.flatGroup; + } +}); +Object.defineProperty(exports, "flatRollup", { + enumerable: true, + get: function () { + return _group.flatRollup; + } +}); +Object.defineProperty(exports, "fsum", { + enumerable: true, + get: function () { + return _fsum.fsum; + } +}); +Object.defineProperty(exports, "greatest", { + enumerable: true, + get: function () { + return _greatest.default; + } +}); +Object.defineProperty(exports, "greatestIndex", { + enumerable: true, + get: function () { + return _greatestIndex.default; + } +}); +Object.defineProperty(exports, "group", { + enumerable: true, + get: function () { + return _group.default; + } +}); +Object.defineProperty(exports, "groupSort", { + enumerable: true, + get: function () { + return _groupSort.default; + } +}); +Object.defineProperty(exports, "groups", { + enumerable: true, + get: function () { + return _group.groups; + } +}); +Object.defineProperty(exports, "histogram", { + enumerable: true, + get: function () { + return _bin.default; + } +}); +Object.defineProperty(exports, "index", { + enumerable: true, + get: function () { + return _group.index; + } +}); +Object.defineProperty(exports, "indexes", { + enumerable: true, + get: function () { + return _group.indexes; + } +}); +Object.defineProperty(exports, "intersection", { + enumerable: true, + get: function () { + return _intersection.default; + } +}); +Object.defineProperty(exports, "least", { + enumerable: true, + get: function () { + return _least.default; + } +}); +Object.defineProperty(exports, "leastIndex", { + enumerable: true, + get: function () { + return _leastIndex.default; + } +}); +Object.defineProperty(exports, "map", { + enumerable: true, + get: function () { + return _map.default; + } +}); +Object.defineProperty(exports, "max", { + enumerable: true, + get: function () { + return _max.default; + } +}); +Object.defineProperty(exports, "maxIndex", { + enumerable: true, + get: function () { + return _maxIndex.default; + } +}); +Object.defineProperty(exports, "mean", { + enumerable: true, + get: function () { + return _mean.default; + } +}); +Object.defineProperty(exports, "median", { + enumerable: true, + get: function () { + return _median.default; + } +}); +Object.defineProperty(exports, "medianIndex", { + enumerable: true, + get: function () { + return _median.medianIndex; + } +}); +Object.defineProperty(exports, "merge", { + enumerable: true, + get: function () { + return _merge.default; + } +}); +Object.defineProperty(exports, "min", { + enumerable: true, + get: function () { + return _min.default; + } +}); +Object.defineProperty(exports, "minIndex", { + enumerable: true, + get: function () { + return _minIndex.default; + } +}); +Object.defineProperty(exports, "mode", { + enumerable: true, + get: function () { + return _mode.default; + } +}); +Object.defineProperty(exports, "nice", { + enumerable: true, + get: function () { + return _nice.default; + } +}); +Object.defineProperty(exports, "pairs", { + enumerable: true, + get: function () { + return _pairs.default; + } +}); +Object.defineProperty(exports, "permute", { + enumerable: true, + get: function () { + return _permute.default; + } +}); +Object.defineProperty(exports, "quantile", { + enumerable: true, + get: function () { + return _quantile.default; + } +}); +Object.defineProperty(exports, "quantileIndex", { + enumerable: true, + get: function () { + return _quantile.quantileIndex; + } +}); +Object.defineProperty(exports, "quantileSorted", { + enumerable: true, + get: function () { + return _quantile.quantileSorted; + } +}); +Object.defineProperty(exports, "quickselect", { + enumerable: true, + get: function () { + return _quickselect.default; + } +}); +Object.defineProperty(exports, "range", { + enumerable: true, + get: function () { + return _range.default; + } +}); +Object.defineProperty(exports, "rank", { + enumerable: true, + get: function () { + return _rank.default; + } +}); +Object.defineProperty(exports, "reduce", { + enumerable: true, + get: function () { + return _reduce.default; + } +}); +Object.defineProperty(exports, "reverse", { + enumerable: true, + get: function () { + return _reverse.default; + } +}); +Object.defineProperty(exports, "rollup", { + enumerable: true, + get: function () { + return _group.rollup; + } +}); +Object.defineProperty(exports, "rollups", { + enumerable: true, + get: function () { + return _group.rollups; + } +}); +Object.defineProperty(exports, "scan", { + enumerable: true, + get: function () { + return _scan.default; + } +}); +Object.defineProperty(exports, "shuffle", { + enumerable: true, + get: function () { + return _shuffle.default; + } +}); +Object.defineProperty(exports, "shuffler", { + enumerable: true, + get: function () { + return _shuffle.shuffler; + } +}); +Object.defineProperty(exports, "some", { + enumerable: true, + get: function () { + return _some.default; + } +}); +Object.defineProperty(exports, "sort", { + enumerable: true, + get: function () { + return _sort.default; + } +}); +Object.defineProperty(exports, "subset", { + enumerable: true, + get: function () { + return _subset.default; + } +}); +Object.defineProperty(exports, "sum", { + enumerable: true, + get: function () { + return _sum.default; + } +}); +Object.defineProperty(exports, "superset", { + enumerable: true, + get: function () { + return _superset.default; + } +}); +Object.defineProperty(exports, "thresholdFreedmanDiaconis", { + enumerable: true, + get: function () { + return _freedmanDiaconis.default; + } +}); +Object.defineProperty(exports, "thresholdScott", { + enumerable: true, + get: function () { + return _scott.default; + } +}); +Object.defineProperty(exports, "thresholdSturges", { + enumerable: true, + get: function () { + return _sturges.default; + } +}); +Object.defineProperty(exports, "tickIncrement", { + enumerable: true, + get: function () { + return _ticks.tickIncrement; + } +}); +Object.defineProperty(exports, "tickStep", { + enumerable: true, + get: function () { + return _ticks.tickStep; + } +}); +Object.defineProperty(exports, "ticks", { + enumerable: true, + get: function () { + return _ticks.default; + } +}); +Object.defineProperty(exports, "transpose", { + enumerable: true, + get: function () { + return _transpose.default; + } +}); +Object.defineProperty(exports, "union", { + enumerable: true, + get: function () { + return _union.default; + } +}); +Object.defineProperty(exports, "variance", { + enumerable: true, + get: function () { + return _variance.default; + } +}); +Object.defineProperty(exports, "zip", { + enumerable: true, + get: function () { + return _zip.default; + } +}); +var _bisect = _interopRequireWildcard(require("./bisect.js")); +var _ascending = _interopRequireDefault(require("./ascending.js")); +var _bisector = _interopRequireDefault(require("./bisector.js")); +var _blur = require("./blur.js"); +var _count = _interopRequireDefault(require("./count.js")); +var _cross = _interopRequireDefault(require("./cross.js")); +var _cumsum = _interopRequireDefault(require("./cumsum.js")); +var _descending = _interopRequireDefault(require("./descending.js")); +var _deviation = _interopRequireDefault(require("./deviation.js")); +var _extent = _interopRequireDefault(require("./extent.js")); +var _fsum = require("./fsum.js"); +var _group = _interopRequireWildcard(require("./group.js")); +var _groupSort = _interopRequireDefault(require("./groupSort.js")); +var _bin = _interopRequireDefault(require("./bin.js")); +var _freedmanDiaconis = _interopRequireDefault(require("./threshold/freedmanDiaconis.js")); +var _scott = _interopRequireDefault(require("./threshold/scott.js")); +var _sturges = _interopRequireDefault(require("./threshold/sturges.js")); +var _max = _interopRequireDefault(require("./max.js")); +var _maxIndex = _interopRequireDefault(require("./maxIndex.js")); +var _mean = _interopRequireDefault(require("./mean.js")); +var _median = _interopRequireWildcard(require("./median.js")); +var _merge = _interopRequireDefault(require("./merge.js")); +var _min = _interopRequireDefault(require("./min.js")); +var _minIndex = _interopRequireDefault(require("./minIndex.js")); +var _mode = _interopRequireDefault(require("./mode.js")); +var _nice = _interopRequireDefault(require("./nice.js")); +var _pairs = _interopRequireDefault(require("./pairs.js")); +var _permute = _interopRequireDefault(require("./permute.js")); +var _quantile = _interopRequireWildcard(require("./quantile.js")); +var _quickselect = _interopRequireDefault(require("./quickselect.js")); +var _range = _interopRequireDefault(require("./range.js")); +var _rank = _interopRequireDefault(require("./rank.js")); +var _least = _interopRequireDefault(require("./least.js")); +var _leastIndex = _interopRequireDefault(require("./leastIndex.js")); +var _greatest = _interopRequireDefault(require("./greatest.js")); +var _greatestIndex = _interopRequireDefault(require("./greatestIndex.js")); +var _scan = _interopRequireDefault(require("./scan.js")); +var _shuffle = _interopRequireWildcard(require("./shuffle.js")); +var _sum = _interopRequireDefault(require("./sum.js")); +var _ticks = _interopRequireWildcard(require("./ticks.js")); +var _transpose = _interopRequireDefault(require("./transpose.js")); +var _variance = _interopRequireDefault(require("./variance.js")); +var _zip = _interopRequireDefault(require("./zip.js")); +var _every = _interopRequireDefault(require("./every.js")); +var _some = _interopRequireDefault(require("./some.js")); +var _filter = _interopRequireDefault(require("./filter.js")); +var _map = _interopRequireDefault(require("./map.js")); +var _reduce = _interopRequireDefault(require("./reduce.js")); +var _reverse = _interopRequireDefault(require("./reverse.js")); +var _sort = _interopRequireDefault(require("./sort.js")); +var _difference = _interopRequireDefault(require("./difference.js")); +var _disjoint = _interopRequireDefault(require("./disjoint.js")); +var _intersection = _interopRequireDefault(require("./intersection.js")); +var _subset = _interopRequireDefault(require("./subset.js")); +var _superset = _interopRequireDefault(require("./superset.js")); +var _union = _interopRequireDefault(require("./union.js")); +var _index = require("../../../lib-vendor/internmap/src/index.js"); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/intersection.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/intersection.js new file mode 100644 index 000000000000..439de53e7e1e --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/intersection.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = intersection; +var _index = require("../../../lib-vendor/internmap/src/index.js"); +function intersection(values, ...others) { + values = new _index.InternSet(values); + others = others.map(set); + out: for (const value of values) { + for (const other of others) { + if (!other.has(value)) { + values.delete(value); + continue out; + } + } + } + return values; +} +function set(values) { + return values instanceof _index.InternSet ? values : new _index.InternSet(values); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/least.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/least.js new file mode 100644 index 000000000000..9cdbae7442b7 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/least.js @@ -0,0 +1,31 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = least; +var _ascending = _interopRequireDefault(require("./ascending.js")); +function least(values, compare = _ascending.default) { + let min; + let defined = false; + if (compare.length === 1) { + let minValue; + for (const element of values) { + const value = compare(element); + if (defined ? (0, _ascending.default)(value, minValue) < 0 : (0, _ascending.default)(value, value) === 0) { + min = element; + minValue = value; + defined = true; + } + } + } else { + for (const value of values) { + if (defined ? compare(value, min) < 0 : compare(value, value) === 0) { + min = value; + defined = true; + } + } + } + return min; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/leastIndex.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/leastIndex.js new file mode 100644 index 000000000000..bf6930b2df0a --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/leastIndex.js @@ -0,0 +1,23 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = leastIndex; +var _ascending = _interopRequireDefault(require("./ascending.js")); +var _minIndex = _interopRequireDefault(require("./minIndex.js")); +function leastIndex(values, compare = _ascending.default) { + if (compare.length === 1) return (0, _minIndex.default)(values, compare); + let minValue; + let min = -1; + let index = -1; + for (const value of values) { + ++index; + if (min < 0 ? compare(value, value) === 0 : compare(value, minValue) < 0) { + minValue = value; + min = index; + } + } + return min; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/map.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/map.js new file mode 100644 index 000000000000..0c149eae7519 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/map.js @@ -0,0 +1,11 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = map; +function map(values, mapper) { + if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable"); + if (typeof mapper !== "function") throw new TypeError("mapper is not a function"); + return Array.from(values, (value, index) => mapper(value, index, values)); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/max.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/max.js new file mode 100644 index 000000000000..f07115afe533 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/max.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = max; +function max(values, valueof) { + let max; + if (valueof === undefined) { + for (const value of values) { + if (value != null && (max < value || max === undefined && value >= value)) { + max = value; + } + } + } else { + let index = -1; + for (let value of values) { + if ((value = valueof(value, ++index, values)) != null && (max < value || max === undefined && value >= value)) { + max = value; + } + } + } + return max; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/maxIndex.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/maxIndex.js new file mode 100644 index 000000000000..a98f9b7cf732 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/maxIndex.js @@ -0,0 +1,26 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = maxIndex; +function maxIndex(values, valueof) { + let max; + let maxIndex = -1; + let index = -1; + if (valueof === undefined) { + for (const value of values) { + ++index; + if (value != null && (max < value || max === undefined && value >= value)) { + max = value, maxIndex = index; + } + } + } else { + for (let value of values) { + if ((value = valueof(value, ++index, values)) != null && (max < value || max === undefined && value >= value)) { + max = value, maxIndex = index; + } + } + } + return maxIndex; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/mean.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/mean.js new file mode 100644 index 000000000000..441701c0500b --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/mean.js @@ -0,0 +1,25 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = mean; +function mean(values, valueof) { + let count = 0; + let sum = 0; + if (valueof === undefined) { + for (let value of values) { + if (value != null && (value = +value) >= value) { + ++count, sum += value; + } + } + } else { + let index = -1; + for (let value of values) { + if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { + ++count, sum += value; + } + } + } + if (count) return sum / count; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/median.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/median.js new file mode 100644 index 000000000000..f45fc449fa93 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/median.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = median; +exports.medianIndex = medianIndex; +var _quantile = _interopRequireWildcard(require("./quantile.js")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +function median(values, valueof) { + return (0, _quantile.default)(values, 0.5, valueof); +} +function medianIndex(values, valueof) { + return (0, _quantile.quantileIndex)(values, 0.5, valueof); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/merge.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/merge.js new file mode 100644 index 000000000000..6372fdaed2cb --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/merge.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = merge; +function* flatten(arrays) { + for (const array of arrays) { + yield* array; + } +} +function merge(arrays) { + return Array.from(flatten(arrays)); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/min.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/min.js new file mode 100644 index 000000000000..a9c335aeb46a --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/min.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = min; +function min(values, valueof) { + let min; + if (valueof === undefined) { + for (const value of values) { + if (value != null && (min > value || min === undefined && value >= value)) { + min = value; + } + } + } else { + let index = -1; + for (let value of values) { + if ((value = valueof(value, ++index, values)) != null && (min > value || min === undefined && value >= value)) { + min = value; + } + } + } + return min; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/minIndex.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/minIndex.js new file mode 100644 index 000000000000..7825bf0d6e98 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/minIndex.js @@ -0,0 +1,26 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = minIndex; +function minIndex(values, valueof) { + let min; + let minIndex = -1; + let index = -1; + if (valueof === undefined) { + for (const value of values) { + ++index; + if (value != null && (min > value || min === undefined && value >= value)) { + min = value, minIndex = index; + } + } + } else { + for (let value of values) { + if ((value = valueof(value, ++index, values)) != null && (min > value || min === undefined && value >= value)) { + min = value, minIndex = index; + } + } + } + return minIndex; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/mode.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/mode.js new file mode 100644 index 000000000000..6e23adede941 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/mode.js @@ -0,0 +1,33 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = mode; +var _index = require("../../../lib-vendor/internmap/src/index.js"); +function mode(values, valueof) { + const counts = new _index.InternMap(); + if (valueof === undefined) { + for (let value of values) { + if (value != null && value >= value) { + counts.set(value, (counts.get(value) || 0) + 1); + } + } + } else { + let index = -1; + for (let value of values) { + if ((value = valueof(value, ++index, values)) != null && value >= value) { + counts.set(value, (counts.get(value) || 0) + 1); + } + } + } + let modeValue; + let modeCount = 0; + for (const [value, count] of counts) { + if (count > modeCount) { + modeCount = count; + modeValue = value; + } + } + return modeValue; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/nice.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/nice.js new file mode 100644 index 000000000000..a1502b82084c --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/nice.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = nice; +var _ticks = require("./ticks.js"); +function nice(start, stop, count) { + let prestep; + while (true) { + const step = (0, _ticks.tickIncrement)(start, stop, count); + if (step === prestep || step === 0 || !isFinite(step)) { + return [start, stop]; + } else if (step > 0) { + start = Math.floor(start / step) * step; + stop = Math.ceil(stop / step) * step; + } else if (step < 0) { + start = Math.ceil(start * step) / step; + stop = Math.floor(stop * step) / step; + } + prestep = step; + } +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/number.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/number.js new file mode 100644 index 000000000000..7ba23d8a3d39 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/number.js @@ -0,0 +1,26 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = number; +exports.numbers = numbers; +function number(x) { + return x === null ? NaN : +x; +} +function* numbers(values, valueof) { + if (valueof === undefined) { + for (let value of values) { + if (value != null && (value = +value) >= value) { + yield value; + } + } + } else { + let index = -1; + for (let value of values) { + if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { + yield value; + } + } + } +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/pairs.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/pairs.js new file mode 100644 index 000000000000..b9b88f82ae11 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/pairs.js @@ -0,0 +1,21 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = pairs; +exports.pair = pair; +function pairs(values, pairof = pair) { + const pairs = []; + let previous; + let first = false; + for (const value of values) { + if (first) pairs.push(pairof(previous, value)); + previous = value; + first = true; + } + return pairs; +} +function pair(a, b) { + return [a, b]; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/permute.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/permute.js new file mode 100644 index 000000000000..7d81cecc0a8d --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/permute.js @@ -0,0 +1,9 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = permute; +function permute(source, keys) { + return Array.from(keys, key => source[key]); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/quantile.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/quantile.js new file mode 100644 index 000000000000..48bcb76ebc9f --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/quantile.js @@ -0,0 +1,55 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = quantile; +exports.quantileIndex = quantileIndex; +exports.quantileSorted = quantileSorted; +var _max = _interopRequireDefault(require("./max.js")); +var _maxIndex = _interopRequireDefault(require("./maxIndex.js")); +var _min = _interopRequireDefault(require("./min.js")); +var _minIndex = _interopRequireDefault(require("./minIndex.js")); +var _quickselect = _interopRequireDefault(require("./quickselect.js")); +var _number = _interopRequireWildcard(require("./number.js")); +var _sort = require("./sort.js"); +var _greatest = _interopRequireDefault(require("./greatest.js")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +function quantile(values, p, valueof) { + values = Float64Array.from((0, _number.numbers)(values, valueof)); + if (!(n = values.length) || isNaN(p = +p)) return; + if (p <= 0 || n < 2) return (0, _min.default)(values); + if (p >= 1) return (0, _max.default)(values); + var n, + i = (n - 1) * p, + i0 = Math.floor(i), + value0 = (0, _max.default)((0, _quickselect.default)(values, i0).subarray(0, i0 + 1)), + value1 = (0, _min.default)(values.subarray(i0 + 1)); + return value0 + (value1 - value0) * (i - i0); +} +function quantileSorted(values, p, valueof = _number.default) { + if (!(n = values.length) || isNaN(p = +p)) return; + if (p <= 0 || n < 2) return +valueof(values[0], 0, values); + if (p >= 1) return +valueof(values[n - 1], n - 1, values); + var n, + i = (n - 1) * p, + i0 = Math.floor(i), + value0 = +valueof(values[i0], i0, values), + value1 = +valueof(values[i0 + 1], i0 + 1, values); + return value0 + (value1 - value0) * (i - i0); +} +function quantileIndex(values, p, valueof = _number.default) { + if (isNaN(p = +p)) return; + numbers = Float64Array.from(values, (_, i) => (0, _number.default)(valueof(values[i], i, values))); + if (p <= 0) return (0, _minIndex.default)(numbers); + if (p >= 1) return (0, _maxIndex.default)(numbers); + var numbers, + index = Uint32Array.from(values, (_, i) => i), + j = numbers.length - 1, + i = Math.floor(j * p); + (0, _quickselect.default)(index, i, 0, j, (i, j) => (0, _sort.ascendingDefined)(numbers[i], numbers[j])); + i = (0, _greatest.default)(index.subarray(0, i + 1), i => numbers[i]); + return i >= 0 ? i : -1; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/quickselect.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/quickselect.js new file mode 100644 index 000000000000..0be93ed832e0 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/quickselect.js @@ -0,0 +1,47 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = quickselect; +var _sort = require("./sort.js"); +// Based on https://github.com/mourner/quickselect +// ISC license, Copyright 2018 Vladimir Agafonkin. +function quickselect(array, k, left = 0, right = Infinity, compare) { + k = Math.floor(k); + left = Math.floor(Math.max(0, left)); + right = Math.floor(Math.min(array.length - 1, right)); + if (!(left <= k && k <= right)) return array; + compare = compare === undefined ? _sort.ascendingDefined : (0, _sort.compareDefined)(compare); + while (right > left) { + if (right - left > 600) { + const n = right - left + 1; + const m = k - left + 1; + const z = Math.log(n); + const s = 0.5 * Math.exp(2 * z / 3); + const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1); + const newLeft = Math.max(left, Math.floor(k - m * s / n + sd)); + const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd)); + quickselect(array, k, newLeft, newRight, compare); + } + const t = array[k]; + let i = left; + let j = right; + swap(array, left, k); + if (compare(array[right], t) > 0) swap(array, left, right); + while (i < j) { + swap(array, i, j), ++i, --j; + while (compare(array[i], t) < 0) ++i; + while (compare(array[j], t) > 0) --j; + } + if (compare(array[left], t) === 0) swap(array, left, j);else ++j, swap(array, j, right); + if (j <= k) left = j + 1; + if (k <= j) right = j - 1; + } + return array; +} +function swap(array, i, j) { + const t = array[i]; + array[i] = array[j]; + array[j] = t; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/range.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/range.js new file mode 100644 index 000000000000..8b5c450fc6d0 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/range.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = range; +function range(start, stop, step) { + start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step; + var i = -1, + n = Math.max(0, Math.ceil((stop - start) / step)) | 0, + range = new Array(n); + while (++i < n) { + range[i] = start + i * step; + } + return range; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/rank.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/rank.js new file mode 100644 index 000000000000..5f4563bafa82 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/rank.js @@ -0,0 +1,30 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = rank; +var _ascending = _interopRequireDefault(require("./ascending.js")); +var _sort = require("./sort.js"); +function rank(values, valueof = _ascending.default) { + if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable"); + let V = Array.from(values); + const R = new Float64Array(V.length); + if (valueof.length !== 2) V = V.map(valueof), valueof = _ascending.default; + const compareIndex = (i, j) => valueof(V[i], V[j]); + let k, r; + values = Uint32Array.from(V, (_, i) => i); + // Risky chaining due to Safari 14 https://github.com/d3/d3-array/issues/123 + values.sort(valueof === _ascending.default ? (i, j) => (0, _sort.ascendingDefined)(V[i], V[j]) : (0, _sort.compareDefined)(compareIndex)); + values.forEach((j, i) => { + const c = compareIndex(j, k === undefined ? j : k); + if (c >= 0) { + if (k === undefined || c > 0) k = j, r = i; + R[j] = r; + } else { + R[j] = NaN; + } + }); + return R; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/reduce.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/reduce.js new file mode 100644 index 000000000000..caddffcdcccc --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/reduce.js @@ -0,0 +1,28 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = reduce; +function reduce(values, reducer, value) { + if (typeof reducer !== "function") throw new TypeError("reducer is not a function"); + const iterator = values[Symbol.iterator](); + let done, + next, + index = -1; + if (arguments.length < 3) { + ({ + done, + value + } = iterator.next()); + if (done) return; + ++index; + } + while (({ + done, + value: next + } = iterator.next()), !done) { + value = reducer(value, next, ++index, values); + } + return value; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/reverse.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/reverse.js new file mode 100644 index 000000000000..499b0d76cd0a --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/reverse.js @@ -0,0 +1,10 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = reverse; +function reverse(values) { + if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable"); + return Array.from(values).reverse(); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/scan.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/scan.js new file mode 100644 index 000000000000..848af02a741a --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/scan.js @@ -0,0 +1,12 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = scan; +var _leastIndex = _interopRequireDefault(require("./leastIndex.js")); +function scan(values, compare) { + const index = (0, _leastIndex.default)(values, compare); + return index < 0 ? undefined : index; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/shuffle.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/shuffle.js new file mode 100644 index 000000000000..db8e5fdf1ec4 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/shuffle.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +exports.shuffler = shuffler; +var _default = exports.default = shuffler(Math.random); +function shuffler(random) { + return function shuffle(array, i0 = 0, i1 = array.length) { + let m = i1 - (i0 = +i0); + while (m) { + const i = random() * m-- | 0, + t = array[m + i0]; + array[m + i0] = array[i + i0]; + array[i + i0] = t; + } + return array; + }; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/some.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/some.js new file mode 100644 index 000000000000..3f015780a7e6 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/some.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = some; +function some(values, test) { + if (typeof test !== "function") throw new TypeError("test is not a function"); + let index = -1; + for (const value of values) { + if (test(value, ++index, values)) { + return true; + } + } + return false; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/sort.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/sort.js new file mode 100644 index 000000000000..a1b0b4cedf76 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/sort.js @@ -0,0 +1,45 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ascendingDefined = ascendingDefined; +exports.compareDefined = compareDefined; +exports.default = sort; +var _ascending = _interopRequireDefault(require("./ascending.js")); +var _permute = _interopRequireDefault(require("./permute.js")); +function sort(values, ...F) { + if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable"); + values = Array.from(values); + let [f] = F; + if (f && f.length !== 2 || F.length > 1) { + const index = Uint32Array.from(values, (d, i) => i); + if (F.length > 1) { + F = F.map(f => values.map(f)); + index.sort((i, j) => { + for (const f of F) { + const c = ascendingDefined(f[i], f[j]); + if (c) return c; + } + }); + } else { + f = values.map(f); + index.sort((i, j) => ascendingDefined(f[i], f[j])); + } + return (0, _permute.default)(values, index); + } + return values.sort(compareDefined(f)); +} +function compareDefined(compare = _ascending.default) { + if (compare === _ascending.default) return ascendingDefined; + if (typeof compare !== "function") throw new TypeError("compare is not a function"); + return (a, b) => { + const x = compare(a, b); + if (x || x === 0) return x; + return (compare(b, b) === 0) - (compare(a, a) === 0); + }; +} +function ascendingDefined(a, b) { + return (a == null || !(a >= a)) - (b == null || !(b >= b)) || (a < b ? -1 : a > b ? 1 : 0); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/subset.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/subset.js new file mode 100644 index 000000000000..503474b93a83 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/subset.js @@ -0,0 +1,11 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = subset; +var _superset = _interopRequireDefault(require("./superset.js")); +function subset(values, other) { + return (0, _superset.default)(other, values); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/sum.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/sum.js new file mode 100644 index 000000000000..f2b63b5414fd --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/sum.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = sum; +function sum(values, valueof) { + let sum = 0; + if (valueof === undefined) { + for (let value of values) { + if (value = +value) { + sum += value; + } + } + } else { + let index = -1; + for (let value of values) { + if (value = +valueof(value, ++index, values)) { + sum += value; + } + } + } + return sum; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/superset.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/superset.js new file mode 100644 index 000000000000..04de9d7af7d0 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/superset.js @@ -0,0 +1,28 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = superset; +function superset(values, other) { + const iterator = values[Symbol.iterator](), + set = new Set(); + for (const o of other) { + const io = intern(o); + if (set.has(io)) continue; + let value, done; + while (({ + value, + done + } = iterator.next())) { + if (done) return false; + const ivalue = intern(value); + set.add(ivalue); + if (Object.is(io, ivalue)) break; + } + } + return true; +} +function intern(value) { + return value !== null && typeof value === "object" ? value.valueOf() : value; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/threshold/freedmanDiaconis.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/threshold/freedmanDiaconis.js new file mode 100644 index 000000000000..602c8b029151 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/threshold/freedmanDiaconis.js @@ -0,0 +1,14 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = thresholdFreedmanDiaconis; +var _count = _interopRequireDefault(require("../count.js")); +var _quantile = _interopRequireDefault(require("../quantile.js")); +function thresholdFreedmanDiaconis(values, min, max) { + const c = (0, _count.default)(values), + d = (0, _quantile.default)(values, 0.75) - (0, _quantile.default)(values, 0.25); + return c && d ? Math.ceil((max - min) / (2 * d * Math.pow(c, -1 / 3))) : 1; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/threshold/scott.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/threshold/scott.js new file mode 100644 index 000000000000..e3ba1ec697f6 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/threshold/scott.js @@ -0,0 +1,14 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = thresholdScott; +var _count = _interopRequireDefault(require("../count.js")); +var _deviation = _interopRequireDefault(require("../deviation.js")); +function thresholdScott(values, min, max) { + const c = (0, _count.default)(values), + d = (0, _deviation.default)(values); + return c && d ? Math.ceil((max - min) * Math.cbrt(c) / (3.49 * d)) : 1; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/threshold/sturges.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/threshold/sturges.js new file mode 100644 index 000000000000..089dd4017eb4 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/threshold/sturges.js @@ -0,0 +1,11 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = thresholdSturges; +var _count = _interopRequireDefault(require("../count.js")); +function thresholdSturges(values) { + return Math.max(1, Math.ceil(Math.log((0, _count.default)(values)) / Math.LN2) + 1); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/ticks.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/ticks.js new file mode 100644 index 000000000000..6be2a99df6dd --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/ticks.js @@ -0,0 +1,60 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = ticks; +exports.tickIncrement = tickIncrement; +exports.tickStep = tickStep; +const e10 = Math.sqrt(50), + e5 = Math.sqrt(10), + e2 = Math.sqrt(2); +function tickSpec(start, stop, count) { + const step = (stop - start) / Math.max(0, count), + power = Math.floor(Math.log10(step)), + error = step / Math.pow(10, power), + factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1; + let i1, i2, inc; + if (power < 0) { + inc = Math.pow(10, -power) / factor; + i1 = Math.round(start * inc); + i2 = Math.round(stop * inc); + if (i1 / inc < start) ++i1; + if (i2 / inc > stop) --i2; + inc = -inc; + } else { + inc = Math.pow(10, power) * factor; + i1 = Math.round(start / inc); + i2 = Math.round(stop / inc); + if (i1 * inc < start) ++i1; + if (i2 * inc > stop) --i2; + } + if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2); + return [i1, i2, inc]; +} +function ticks(start, stop, count) { + stop = +stop, start = +start, count = +count; + if (!(count > 0)) return []; + if (start === stop) return [start]; + const reverse = stop < start, + [i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count); + if (!(i2 >= i1)) return []; + const n = i2 - i1 + 1, + ticks = new Array(n); + if (reverse) { + if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) / -inc;else for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) * inc; + } else { + if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) / -inc;else for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) * inc; + } + return ticks; +} +function tickIncrement(start, stop, count) { + stop = +stop, start = +start, count = +count; + return tickSpec(start, stop, count)[2]; +} +function tickStep(start, stop, count) { + stop = +stop, start = +start, count = +count; + const reverse = stop < start, + inc = reverse ? tickIncrement(stop, start, count) : tickIncrement(start, stop, count); + return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/transpose.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/transpose.js new file mode 100644 index 000000000000..894224a67071 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/transpose.js @@ -0,0 +1,20 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = transpose; +var _min = _interopRequireDefault(require("./min.js")); +function transpose(matrix) { + if (!(n = matrix.length)) return []; + for (var i = -1, m = (0, _min.default)(matrix, length), transpose = new Array(m); ++i < m;) { + for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) { + row[j] = matrix[j][i]; + } + } + return transpose; +} +function length(d) { + return d.length; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/union.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/union.js new file mode 100644 index 000000000000..3cdb7f396685 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/union.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = union; +var _index = require("../../../lib-vendor/internmap/src/index.js"); +function union(...others) { + const set = new _index.InternSet(); + for (const other of others) { + for (const o of other) { + set.add(o); + } + } + return set; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/variance.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/variance.js new file mode 100644 index 000000000000..4b96c190783c --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/variance.js @@ -0,0 +1,31 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = variance; +function variance(values, valueof) { + let count = 0; + let delta; + let mean = 0; + let sum = 0; + if (valueof === undefined) { + for (let value of values) { + if (value != null && (value = +value) >= value) { + delta = value - mean; + mean += delta / ++count; + sum += delta * (value - mean); + } + } + } else { + let index = -1; + for (let value of values) { + if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { + delta = value - mean; + mean += delta / ++count; + sum += delta * (value - mean); + } + } + } + if (count > 1) return sum / (count - 1); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-array/src/zip.js b/packages/x-charts-vendor/lib-vendor/d3-array/src/zip.js new file mode 100644 index 000000000000..f4cd574a273a --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-array/src/zip.js @@ -0,0 +1,11 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = zip; +var _transpose = _interopRequireDefault(require("./transpose.js")); +function zip() { + return (0, _transpose.default)(arguments); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-color/LICENSE b/packages/x-charts-vendor/lib-vendor/d3-color/LICENSE new file mode 100644 index 000000000000..fbe44bdc9ad5 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-color/LICENSE @@ -0,0 +1,13 @@ +Copyright 2010-2022 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/packages/x-charts-vendor/lib-vendor/d3-color/src/color.js b/packages/x-charts-vendor/lib-vendor/d3-color/src/color.js new file mode 100644 index 000000000000..4d6382da5c4a --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-color/src/color.js @@ -0,0 +1,366 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Color = Color; +exports.Rgb = Rgb; +exports.darker = exports.brighter = void 0; +exports.default = color; +exports.hsl = hsl; +exports.hslConvert = hslConvert; +exports.rgb = rgb; +exports.rgbConvert = rgbConvert; +var _define = _interopRequireWildcard(require("./define.js")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +function Color() {} +var darker = exports.darker = 0.7; +var brighter = exports.brighter = 1 / darker; +var reI = "\\s*([+-]?\\d+)\\s*", + reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", + reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", + reHex = /^#([0-9a-f]{3,8})$/, + reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`), + reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`), + reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`), + reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`), + reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`), + reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`); +var named = { + aliceblue: 0xf0f8ff, + antiquewhite: 0xfaebd7, + aqua: 0x00ffff, + aquamarine: 0x7fffd4, + azure: 0xf0ffff, + beige: 0xf5f5dc, + bisque: 0xffe4c4, + black: 0x000000, + blanchedalmond: 0xffebcd, + blue: 0x0000ff, + blueviolet: 0x8a2be2, + brown: 0xa52a2a, + burlywood: 0xdeb887, + cadetblue: 0x5f9ea0, + chartreuse: 0x7fff00, + chocolate: 0xd2691e, + coral: 0xff7f50, + cornflowerblue: 0x6495ed, + cornsilk: 0xfff8dc, + crimson: 0xdc143c, + cyan: 0x00ffff, + darkblue: 0x00008b, + darkcyan: 0x008b8b, + darkgoldenrod: 0xb8860b, + darkgray: 0xa9a9a9, + darkgreen: 0x006400, + darkgrey: 0xa9a9a9, + darkkhaki: 0xbdb76b, + darkmagenta: 0x8b008b, + darkolivegreen: 0x556b2f, + darkorange: 0xff8c00, + darkorchid: 0x9932cc, + darkred: 0x8b0000, + darksalmon: 0xe9967a, + darkseagreen: 0x8fbc8f, + darkslateblue: 0x483d8b, + darkslategray: 0x2f4f4f, + darkslategrey: 0x2f4f4f, + darkturquoise: 0x00ced1, + darkviolet: 0x9400d3, + deeppink: 0xff1493, + deepskyblue: 0x00bfff, + dimgray: 0x696969, + dimgrey: 0x696969, + dodgerblue: 0x1e90ff, + firebrick: 0xb22222, + floralwhite: 0xfffaf0, + forestgreen: 0x228b22, + fuchsia: 0xff00ff, + gainsboro: 0xdcdcdc, + ghostwhite: 0xf8f8ff, + gold: 0xffd700, + goldenrod: 0xdaa520, + gray: 0x808080, + green: 0x008000, + greenyellow: 0xadff2f, + grey: 0x808080, + honeydew: 0xf0fff0, + hotpink: 0xff69b4, + indianred: 0xcd5c5c, + indigo: 0x4b0082, + ivory: 0xfffff0, + khaki: 0xf0e68c, + lavender: 0xe6e6fa, + lavenderblush: 0xfff0f5, + lawngreen: 0x7cfc00, + lemonchiffon: 0xfffacd, + lightblue: 0xadd8e6, + lightcoral: 0xf08080, + lightcyan: 0xe0ffff, + lightgoldenrodyellow: 0xfafad2, + lightgray: 0xd3d3d3, + lightgreen: 0x90ee90, + lightgrey: 0xd3d3d3, + lightpink: 0xffb6c1, + lightsalmon: 0xffa07a, + lightseagreen: 0x20b2aa, + lightskyblue: 0x87cefa, + lightslategray: 0x778899, + lightslategrey: 0x778899, + lightsteelblue: 0xb0c4de, + lightyellow: 0xffffe0, + lime: 0x00ff00, + limegreen: 0x32cd32, + linen: 0xfaf0e6, + magenta: 0xff00ff, + maroon: 0x800000, + mediumaquamarine: 0x66cdaa, + mediumblue: 0x0000cd, + mediumorchid: 0xba55d3, + mediumpurple: 0x9370db, + mediumseagreen: 0x3cb371, + mediumslateblue: 0x7b68ee, + mediumspringgreen: 0x00fa9a, + mediumturquoise: 0x48d1cc, + mediumvioletred: 0xc71585, + midnightblue: 0x191970, + mintcream: 0xf5fffa, + mistyrose: 0xffe4e1, + moccasin: 0xffe4b5, + navajowhite: 0xffdead, + navy: 0x000080, + oldlace: 0xfdf5e6, + olive: 0x808000, + olivedrab: 0x6b8e23, + orange: 0xffa500, + orangered: 0xff4500, + orchid: 0xda70d6, + palegoldenrod: 0xeee8aa, + palegreen: 0x98fb98, + paleturquoise: 0xafeeee, + palevioletred: 0xdb7093, + papayawhip: 0xffefd5, + peachpuff: 0xffdab9, + peru: 0xcd853f, + pink: 0xffc0cb, + plum: 0xdda0dd, + powderblue: 0xb0e0e6, + purple: 0x800080, + rebeccapurple: 0x663399, + red: 0xff0000, + rosybrown: 0xbc8f8f, + royalblue: 0x4169e1, + saddlebrown: 0x8b4513, + salmon: 0xfa8072, + sandybrown: 0xf4a460, + seagreen: 0x2e8b57, + seashell: 0xfff5ee, + sienna: 0xa0522d, + silver: 0xc0c0c0, + skyblue: 0x87ceeb, + slateblue: 0x6a5acd, + slategray: 0x708090, + slategrey: 0x708090, + snow: 0xfffafa, + springgreen: 0x00ff7f, + steelblue: 0x4682b4, + tan: 0xd2b48c, + teal: 0x008080, + thistle: 0xd8bfd8, + tomato: 0xff6347, + turquoise: 0x40e0d0, + violet: 0xee82ee, + wheat: 0xf5deb3, + white: 0xffffff, + whitesmoke: 0xf5f5f5, + yellow: 0xffff00, + yellowgreen: 0x9acd32 +}; +(0, _define.default)(Color, color, { + copy(channels) { + return Object.assign(new this.constructor(), this, channels); + }, + displayable() { + return this.rgb().displayable(); + }, + hex: color_formatHex, + // Deprecated! Use color.formatHex. + formatHex: color_formatHex, + formatHex8: color_formatHex8, + formatHsl: color_formatHsl, + formatRgb: color_formatRgb, + toString: color_formatRgb +}); +function color_formatHex() { + return this.rgb().formatHex(); +} +function color_formatHex8() { + return this.rgb().formatHex8(); +} +function color_formatHsl() { + return hslConvert(this).formatHsl(); +} +function color_formatRgb() { + return this.rgb().formatRgb(); +} +function color(format) { + var m, l; + format = (format + "").trim().toLowerCase(); + return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000 + : l === 3 ? new Rgb(m >> 8 & 0xf | m >> 4 & 0xf0, m >> 4 & 0xf | m & 0xf0, (m & 0xf) << 4 | m & 0xf, 1) // #f00 + : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000 + : l === 4 ? rgba(m >> 12 & 0xf | m >> 8 & 0xf0, m >> 8 & 0xf | m >> 4 & 0xf0, m >> 4 & 0xf | m & 0xf0, ((m & 0xf) << 4 | m & 0xf) / 0xff) // #f000 + : null // invalid hex + ) : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0) + : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%) + : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1) + : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1) + : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%) + : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1) + : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins + : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null; +} +function rgbn(n) { + return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1); +} +function rgba(r, g, b, a) { + if (a <= 0) r = g = b = NaN; + return new Rgb(r, g, b, a); +} +function rgbConvert(o) { + if (!(o instanceof Color)) o = color(o); + if (!o) return new Rgb(); + o = o.rgb(); + return new Rgb(o.r, o.g, o.b, o.opacity); +} +function rgb(r, g, b, opacity) { + return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); +} +function Rgb(r, g, b, opacity) { + this.r = +r; + this.g = +g; + this.b = +b; + this.opacity = +opacity; +} +(0, _define.default)(Rgb, rgb, (0, _define.extend)(Color, { + brighter(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); + }, + darker(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); + }, + rgb() { + return this; + }, + clamp() { + return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity)); + }, + displayable() { + return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1; + }, + hex: rgb_formatHex, + // Deprecated! Use color.formatHex. + formatHex: rgb_formatHex, + formatHex8: rgb_formatHex8, + formatRgb: rgb_formatRgb, + toString: rgb_formatRgb +})); +function rgb_formatHex() { + return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`; +} +function rgb_formatHex8() { + return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`; +} +function rgb_formatRgb() { + const a = clampa(this.opacity); + return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`; +} +function clampa(opacity) { + return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity)); +} +function clampi(value) { + return Math.max(0, Math.min(255, Math.round(value) || 0)); +} +function hex(value) { + value = clampi(value); + return (value < 16 ? "0" : "") + value.toString(16); +} +function hsla(h, s, l, a) { + if (a <= 0) h = s = l = NaN;else if (l <= 0 || l >= 1) h = s = NaN;else if (s <= 0) h = NaN; + return new Hsl(h, s, l, a); +} +function hslConvert(o) { + if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity); + if (!(o instanceof Color)) o = color(o); + if (!o) return new Hsl(); + if (o instanceof Hsl) return o; + o = o.rgb(); + var r = o.r / 255, + g = o.g / 255, + b = o.b / 255, + min = Math.min(r, g, b), + max = Math.max(r, g, b), + h = NaN, + s = max - min, + l = (max + min) / 2; + if (s) { + if (r === max) h = (g - b) / s + (g < b) * 6;else if (g === max) h = (b - r) / s + 2;else h = (r - g) / s + 4; + s /= l < 0.5 ? max + min : 2 - max - min; + h *= 60; + } else { + s = l > 0 && l < 1 ? 0 : h; + } + return new Hsl(h, s, l, o.opacity); +} +function hsl(h, s, l, opacity) { + return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity); +} +function Hsl(h, s, l, opacity) { + this.h = +h; + this.s = +s; + this.l = +l; + this.opacity = +opacity; +} +(0, _define.default)(Hsl, hsl, (0, _define.extend)(Color, { + brighter(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + darker(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + rgb() { + var h = this.h % 360 + (this.h < 0) * 360, + s = isNaN(h) || isNaN(this.s) ? 0 : this.s, + l = this.l, + m2 = l + (l < 0.5 ? l : 1 - l) * s, + m1 = 2 * l - m2; + return new Rgb(hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), hsl2rgb(h, m1, m2), hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), this.opacity); + }, + clamp() { + return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity)); + }, + displayable() { + return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1; + }, + formatHsl() { + const a = clampa(this.opacity); + return `${a === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`; + } +})); +function clamph(value) { + value = (value || 0) % 360; + return value < 0 ? value + 360 : value; +} +function clampt(value) { + return Math.max(0, Math.min(1, value || 0)); +} + +/* From FvD 13.37, CSS Color Module Level 3 */ +function hsl2rgb(h, m1, m2) { + return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-color/src/cubehelix.js b/packages/x-charts-vendor/lib-vendor/d3-color/src/cubehelix.js new file mode 100644 index 000000000000..9dfc1b572c87 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-color/src/cubehelix.js @@ -0,0 +1,61 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Cubehelix = Cubehelix; +exports.default = cubehelix; +var _define = _interopRequireWildcard(require("./define.js")); +var _color = require("./color.js"); +var _math = require("./math.js"); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +var A = -0.14861, + B = +1.78277, + C = -0.29227, + D = -0.90649, + E = +1.97294, + ED = E * D, + EB = E * B, + BC_DA = B * C - D * A; +function cubehelixConvert(o) { + if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity); + if (!(o instanceof _color.Rgb)) o = (0, _color.rgbConvert)(o); + var r = o.r / 255, + g = o.g / 255, + b = o.b / 255, + l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB), + bl = b - l, + k = (E * (g - l) - C * bl) / D, + s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), + // NaN if l=0 or l=1 + h = s ? Math.atan2(k, bl) * _math.degrees - 120 : NaN; + return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity); +} +function cubehelix(h, s, l, opacity) { + return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity); +} +function Cubehelix(h, s, l, opacity) { + this.h = +h; + this.s = +s; + this.l = +l; + this.opacity = +opacity; +} +(0, _define.default)(Cubehelix, cubehelix, (0, _define.extend)(_color.Color, { + brighter(k) { + k = k == null ? _color.brighter : Math.pow(_color.brighter, k); + return new Cubehelix(this.h, this.s, this.l * k, this.opacity); + }, + darker(k) { + k = k == null ? _color.darker : Math.pow(_color.darker, k); + return new Cubehelix(this.h, this.s, this.l * k, this.opacity); + }, + rgb() { + var h = isNaN(this.h) ? 0 : (this.h + 120) * _math.radians, + l = +this.l, + a = isNaN(this.s) ? 0 : this.s * l * (1 - l), + cosh = Math.cos(h), + sinh = Math.sin(h); + return new _color.Rgb(255 * (l + a * (A * cosh + B * sinh)), 255 * (l + a * (C * cosh + D * sinh)), 255 * (l + a * (E * cosh)), this.opacity); + } +})); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-color/src/define.js b/packages/x-charts-vendor/lib-vendor/d3-color/src/define.js new file mode 100644 index 000000000000..880e52e68a7f --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-color/src/define.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +exports.extend = extend; +function _default(constructor, factory, prototype) { + constructor.prototype = factory.prototype = prototype; + prototype.constructor = constructor; +} +function extend(parent, definition) { + var prototype = Object.create(parent.prototype); + for (var key in definition) prototype[key] = definition[key]; + return prototype; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-color/src/index.js b/packages/x-charts-vendor/lib-vendor/d3-color/src/index.js new file mode 100644 index 000000000000..e148d8cdb4d7 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-color/src/index.js @@ -0,0 +1,59 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "color", { + enumerable: true, + get: function () { + return _color.default; + } +}); +Object.defineProperty(exports, "cubehelix", { + enumerable: true, + get: function () { + return _cubehelix.default; + } +}); +Object.defineProperty(exports, "gray", { + enumerable: true, + get: function () { + return _lab.gray; + } +}); +Object.defineProperty(exports, "hcl", { + enumerable: true, + get: function () { + return _lab.hcl; + } +}); +Object.defineProperty(exports, "hsl", { + enumerable: true, + get: function () { + return _color.hsl; + } +}); +Object.defineProperty(exports, "lab", { + enumerable: true, + get: function () { + return _lab.default; + } +}); +Object.defineProperty(exports, "lch", { + enumerable: true, + get: function () { + return _lab.lch; + } +}); +Object.defineProperty(exports, "rgb", { + enumerable: true, + get: function () { + return _color.rgb; + } +}); +var _color = _interopRequireWildcard(require("./color.js")); +var _lab = _interopRequireWildcard(require("./lab.js")); +var _cubehelix = _interopRequireDefault(require("./cubehelix.js")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-color/src/lab.js b/packages/x-charts-vendor/lib-vendor/d3-color/src/lab.js new file mode 100644 index 000000000000..7b50de62016a --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-color/src/lab.js @@ -0,0 +1,117 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Hcl = Hcl; +exports.Lab = Lab; +exports.default = lab; +exports.gray = gray; +exports.hcl = hcl; +exports.lch = lch; +var _define = _interopRequireWildcard(require("./define.js")); +var _color = require("./color.js"); +var _math = require("./math.js"); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +// https://observablehq.com/@mbostock/lab-and-rgb +const K = 18, + Xn = 0.96422, + Yn = 1, + Zn = 0.82521, + t0 = 4 / 29, + t1 = 6 / 29, + t2 = 3 * t1 * t1, + t3 = t1 * t1 * t1; +function labConvert(o) { + if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity); + if (o instanceof Hcl) return hcl2lab(o); + if (!(o instanceof _color.Rgb)) o = (0, _color.rgbConvert)(o); + var r = rgb2lrgb(o.r), + g = rgb2lrgb(o.g), + b = rgb2lrgb(o.b), + y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), + x, + z; + if (r === g && g === b) x = z = y;else { + x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn); + z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn); + } + return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity); +} +function gray(l, opacity) { + return new Lab(l, 0, 0, opacity == null ? 1 : opacity); +} +function lab(l, a, b, opacity) { + return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity); +} +function Lab(l, a, b, opacity) { + this.l = +l; + this.a = +a; + this.b = +b; + this.opacity = +opacity; +} +(0, _define.default)(Lab, lab, (0, _define.extend)(_color.Color, { + brighter(k) { + return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity); + }, + darker(k) { + return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity); + }, + rgb() { + var y = (this.l + 16) / 116, + x = isNaN(this.a) ? y : y + this.a / 500, + z = isNaN(this.b) ? y : y - this.b / 200; + x = Xn * lab2xyz(x); + y = Yn * lab2xyz(y); + z = Zn * lab2xyz(z); + return new _color.Rgb(lrgb2rgb(3.1338561 * x - 1.6168667 * y - 0.4906146 * z), lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z), lrgb2rgb(0.0719453 * x - 0.2289914 * y + 1.4052427 * z), this.opacity); + } +})); +function xyz2lab(t) { + return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0; +} +function lab2xyz(t) { + return t > t1 ? t * t * t : t2 * (t - t0); +} +function lrgb2rgb(x) { + return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055); +} +function rgb2lrgb(x) { + return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4); +} +function hclConvert(o) { + if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity); + if (!(o instanceof Lab)) o = labConvert(o); + if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity); + var h = Math.atan2(o.b, o.a) * _math.degrees; + return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity); +} +function lch(l, c, h, opacity) { + return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity); +} +function hcl(h, c, l, opacity) { + return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity); +} +function Hcl(h, c, l, opacity) { + this.h = +h; + this.c = +c; + this.l = +l; + this.opacity = +opacity; +} +function hcl2lab(o) { + if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity); + var h = o.h * _math.radians; + return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity); +} +(0, _define.default)(Hcl, hcl, (0, _define.extend)(_color.Color, { + brighter(k) { + return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity); + }, + darker(k) { + return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity); + }, + rgb() { + return hcl2lab(this).rgb(); + } +})); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-color/src/math.js b/packages/x-charts-vendor/lib-vendor/d3-color/src/math.js new file mode 100644 index 000000000000..3a643dd29dc1 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-color/src/math.js @@ -0,0 +1,8 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.radians = exports.degrees = void 0; +const radians = exports.radians = Math.PI / 180; +const degrees = exports.degrees = 180 / Math.PI; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-delaunay/LICENSE b/packages/x-charts-vendor/lib-vendor/d3-delaunay/LICENSE new file mode 100644 index 000000000000..3a6ada6240b2 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-delaunay/LICENSE @@ -0,0 +1,14 @@ +Copyright 2018-2021 Observable, Inc. +Copyright 2021 Mapbox + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/packages/x-charts-vendor/lib-vendor/d3-delaunay/src/delaunay.js b/packages/x-charts-vendor/lib-vendor/d3-delaunay/src/delaunay.js new file mode 100644 index 000000000000..466c82bbbd4b --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-delaunay/src/delaunay.js @@ -0,0 +1,282 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _index = _interopRequireDefault(require("../../../lib-vendor/delaunator/index.js")); +var _path = _interopRequireDefault(require("./path.js")); +var _polygon = _interopRequireDefault(require("./polygon.js")); +var _voronoi = _interopRequireDefault(require("./voronoi.js")); +const tau = 2 * Math.PI, + pow = Math.pow; +function pointX(p) { + return p[0]; +} +function pointY(p) { + return p[1]; +} + +// A triangulation is collinear if all its triangles have a non-null area +function collinear(d) { + const { + triangles, + coords + } = d; + for (let i = 0; i < triangles.length; i += 3) { + const a = 2 * triangles[i], + b = 2 * triangles[i + 1], + c = 2 * triangles[i + 2], + cross = (coords[c] - coords[a]) * (coords[b + 1] - coords[a + 1]) - (coords[b] - coords[a]) * (coords[c + 1] - coords[a + 1]); + if (cross > 1e-10) return false; + } + return true; +} +function jitter(x, y, r) { + return [x + Math.sin(x + y) * r, y + Math.cos(x - y) * r]; +} +class Delaunay { + static from(points, fx = pointX, fy = pointY, that) { + return new Delaunay("length" in points ? flatArray(points, fx, fy, that) : Float64Array.from(flatIterable(points, fx, fy, that))); + } + constructor(points) { + this._delaunator = new _index.default(points); + this.inedges = new Int32Array(points.length / 2); + this._hullIndex = new Int32Array(points.length / 2); + this.points = this._delaunator.coords; + this._init(); + } + update() { + this._delaunator.update(); + this._init(); + return this; + } + _init() { + const d = this._delaunator, + points = this.points; + + // check for collinear + if (d.hull && d.hull.length > 2 && collinear(d)) { + this.collinear = Int32Array.from({ + length: points.length / 2 + }, (_, i) => i).sort((i, j) => points[2 * i] - points[2 * j] || points[2 * i + 1] - points[2 * j + 1]); // for exact neighbors + const e = this.collinear[0], + f = this.collinear[this.collinear.length - 1], + bounds = [points[2 * e], points[2 * e + 1], points[2 * f], points[2 * f + 1]], + r = 1e-8 * Math.hypot(bounds[3] - bounds[1], bounds[2] - bounds[0]); + for (let i = 0, n = points.length / 2; i < n; ++i) { + const p = jitter(points[2 * i], points[2 * i + 1], r); + points[2 * i] = p[0]; + points[2 * i + 1] = p[1]; + } + this._delaunator = new _index.default(points); + } else { + delete this.collinear; + } + const halfedges = this.halfedges = this._delaunator.halfedges; + const hull = this.hull = this._delaunator.hull; + const triangles = this.triangles = this._delaunator.triangles; + const inedges = this.inedges.fill(-1); + const hullIndex = this._hullIndex.fill(-1); + + // Compute an index from each point to an (arbitrary) incoming halfedge + // Used to give the first neighbor of each point; for this reason, + // on the hull we give priority to exterior halfedges + for (let e = 0, n = halfedges.length; e < n; ++e) { + const p = triangles[e % 3 === 2 ? e - 2 : e + 1]; + if (halfedges[e] === -1 || inedges[p] === -1) inedges[p] = e; + } + for (let i = 0, n = hull.length; i < n; ++i) { + hullIndex[hull[i]] = i; + } + + // degenerate case: 1 or 2 (distinct) points + if (hull.length <= 2 && hull.length > 0) { + this.triangles = new Int32Array(3).fill(-1); + this.halfedges = new Int32Array(3).fill(-1); + this.triangles[0] = hull[0]; + inedges[hull[0]] = 1; + if (hull.length === 2) { + inedges[hull[1]] = 0; + this.triangles[1] = hull[1]; + this.triangles[2] = hull[1]; + } + } + } + voronoi(bounds) { + return new _voronoi.default(this, bounds); + } + *neighbors(i) { + const { + inedges, + hull, + _hullIndex, + halfedges, + triangles, + collinear + } = this; + + // degenerate case with several collinear points + if (collinear) { + const l = collinear.indexOf(i); + if (l > 0) yield collinear[l - 1]; + if (l < collinear.length - 1) yield collinear[l + 1]; + return; + } + const e0 = inedges[i]; + if (e0 === -1) return; // coincident point + let e = e0, + p0 = -1; + do { + yield p0 = triangles[e]; + e = e % 3 === 2 ? e - 2 : e + 1; + if (triangles[e] !== i) return; // bad triangulation + e = halfedges[e]; + if (e === -1) { + const p = hull[(_hullIndex[i] + 1) % hull.length]; + if (p !== p0) yield p; + return; + } + } while (e !== e0); + } + find(x, y, i = 0) { + if ((x = +x, x !== x) || (y = +y, y !== y)) return -1; + const i0 = i; + let c; + while ((c = this._step(i, x, y)) >= 0 && c !== i && c !== i0) i = c; + return c; + } + _step(i, x, y) { + const { + inedges, + hull, + _hullIndex, + halfedges, + triangles, + points + } = this; + if (inedges[i] === -1 || !points.length) return (i + 1) % (points.length >> 1); + let c = i; + let dc = pow(x - points[i * 2], 2) + pow(y - points[i * 2 + 1], 2); + const e0 = inedges[i]; + let e = e0; + do { + let t = triangles[e]; + const dt = pow(x - points[t * 2], 2) + pow(y - points[t * 2 + 1], 2); + if (dt < dc) dc = dt, c = t; + e = e % 3 === 2 ? e - 2 : e + 1; + if (triangles[e] !== i) break; // bad triangulation + e = halfedges[e]; + if (e === -1) { + e = hull[(_hullIndex[i] + 1) % hull.length]; + if (e !== t) { + if (pow(x - points[e * 2], 2) + pow(y - points[e * 2 + 1], 2) < dc) return e; + } + break; + } + } while (e !== e0); + return c; + } + render(context) { + const buffer = context == null ? context = new _path.default() : undefined; + const { + points, + halfedges, + triangles + } = this; + for (let i = 0, n = halfedges.length; i < n; ++i) { + const j = halfedges[i]; + if (j < i) continue; + const ti = triangles[i] * 2; + const tj = triangles[j] * 2; + context.moveTo(points[ti], points[ti + 1]); + context.lineTo(points[tj], points[tj + 1]); + } + this.renderHull(context); + return buffer && buffer.value(); + } + renderPoints(context, r) { + if (r === undefined && (!context || typeof context.moveTo !== "function")) r = context, context = null; + r = r == undefined ? 2 : +r; + const buffer = context == null ? context = new _path.default() : undefined; + const { + points + } = this; + for (let i = 0, n = points.length; i < n; i += 2) { + const x = points[i], + y = points[i + 1]; + context.moveTo(x + r, y); + context.arc(x, y, r, 0, tau); + } + return buffer && buffer.value(); + } + renderHull(context) { + const buffer = context == null ? context = new _path.default() : undefined; + const { + hull, + points + } = this; + const h = hull[0] * 2, + n = hull.length; + context.moveTo(points[h], points[h + 1]); + for (let i = 1; i < n; ++i) { + const h = 2 * hull[i]; + context.lineTo(points[h], points[h + 1]); + } + context.closePath(); + return buffer && buffer.value(); + } + hullPolygon() { + const polygon = new _polygon.default(); + this.renderHull(polygon); + return polygon.value(); + } + renderTriangle(i, context) { + const buffer = context == null ? context = new _path.default() : undefined; + const { + points, + triangles + } = this; + const t0 = triangles[i *= 3] * 2; + const t1 = triangles[i + 1] * 2; + const t2 = triangles[i + 2] * 2; + context.moveTo(points[t0], points[t0 + 1]); + context.lineTo(points[t1], points[t1 + 1]); + context.lineTo(points[t2], points[t2 + 1]); + context.closePath(); + return buffer && buffer.value(); + } + *trianglePolygons() { + const { + triangles + } = this; + for (let i = 0, n = triangles.length / 3; i < n; ++i) { + yield this.trianglePolygon(i); + } + } + trianglePolygon(i) { + const polygon = new _polygon.default(); + this.renderTriangle(i, polygon); + return polygon.value(); + } +} +exports.default = Delaunay; +function flatArray(points, fx, fy, that) { + const n = points.length; + const array = new Float64Array(n * 2); + for (let i = 0; i < n; ++i) { + const p = points[i]; + array[i * 2] = fx.call(that, p, i, points); + array[i * 2 + 1] = fy.call(that, p, i, points); + } + return array; +} +function* flatIterable(points, fx, fy, that) { + let i = 0; + for (const p of points) { + yield fx.call(that, p, i, points); + yield fy.call(that, p, i, points); + ++i; + } +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-delaunay/src/index.js b/packages/x-charts-vendor/lib-vendor/d3-delaunay/src/index.js new file mode 100644 index 000000000000..37fece5817b8 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-delaunay/src/index.js @@ -0,0 +1,20 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "Delaunay", { + enumerable: true, + get: function () { + return _delaunay.default; + } +}); +Object.defineProperty(exports, "Voronoi", { + enumerable: true, + get: function () { + return _voronoi.default; + } +}); +var _delaunay = _interopRequireDefault(require("./delaunay.js")); +var _voronoi = _interopRequireDefault(require("./voronoi.js")); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-delaunay/src/path.js b/packages/x-charts-vendor/lib-vendor/d3-delaunay/src/path.js new file mode 100644 index 000000000000..2c3e8689a7e8 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-delaunay/src/path.js @@ -0,0 +1,43 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +const epsilon = 1e-6; +class Path { + constructor() { + this._x0 = this._y0 = + // start of current subpath + this._x1 = this._y1 = null; // end of current subpath + this._ = ""; + } + moveTo(x, y) { + this._ += `M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`; + } + closePath() { + if (this._x1 !== null) { + this._x1 = this._x0, this._y1 = this._y0; + this._ += "Z"; + } + } + lineTo(x, y) { + this._ += `L${this._x1 = +x},${this._y1 = +y}`; + } + arc(x, y, r) { + x = +x, y = +y, r = +r; + const x0 = x + r; + const y0 = y; + if (r < 0) throw new Error("negative radius"); + if (this._x1 === null) this._ += `M${x0},${y0}`;else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) this._ += "L" + x0 + "," + y0; + if (!r) return; + this._ += `A${r},${r},0,1,1,${x - r},${y}A${r},${r},0,1,1,${this._x1 = x0},${this._y1 = y0}`; + } + rect(x, y, w, h) { + this._ += `M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${+w}v${+h}h${-w}Z`; + } + value() { + return this._ || null; + } +} +exports.default = Path; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-delaunay/src/polygon.js b/packages/x-charts-vendor/lib-vendor/d3-delaunay/src/polygon.js new file mode 100644 index 000000000000..7562a1a9908f --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-delaunay/src/polygon.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +class Polygon { + constructor() { + this._ = []; + } + moveTo(x, y) { + this._.push([x, y]); + } + closePath() { + this._.push(this._[0].slice()); + } + lineTo(x, y) { + this._.push([x, y]); + } + value() { + return this._.length ? this._ : null; + } +} +exports.default = Polygon; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-delaunay/src/voronoi.js b/packages/x-charts-vendor/lib-vendor/d3-delaunay/src/voronoi.js new file mode 100644 index 000000000000..19d357b6a06d --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-delaunay/src/voronoi.js @@ -0,0 +1,390 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _path = _interopRequireDefault(require("./path.js")); +var _polygon = _interopRequireDefault(require("./polygon.js")); +class Voronoi { + constructor(delaunay, [xmin, ymin, xmax, ymax] = [0, 0, 960, 500]) { + if (!((xmax = +xmax) >= (xmin = +xmin)) || !((ymax = +ymax) >= (ymin = +ymin))) throw new Error("invalid bounds"); + this.delaunay = delaunay; + this._circumcenters = new Float64Array(delaunay.points.length * 2); + this.vectors = new Float64Array(delaunay.points.length * 2); + this.xmax = xmax, this.xmin = xmin; + this.ymax = ymax, this.ymin = ymin; + this._init(); + } + update() { + this.delaunay.update(); + this._init(); + return this; + } + _init() { + const { + delaunay: { + points, + hull, + triangles + }, + vectors + } = this; + let bx, by; // lazily computed barycenter of the hull + + // Compute circumcenters. + const circumcenters = this.circumcenters = this._circumcenters.subarray(0, triangles.length / 3 * 2); + for (let i = 0, j = 0, n = triangles.length, x, y; i < n; i += 3, j += 2) { + const t1 = triangles[i] * 2; + const t2 = triangles[i + 1] * 2; + const t3 = triangles[i + 2] * 2; + const x1 = points[t1]; + const y1 = points[t1 + 1]; + const x2 = points[t2]; + const y2 = points[t2 + 1]; + const x3 = points[t3]; + const y3 = points[t3 + 1]; + const dx = x2 - x1; + const dy = y2 - y1; + const ex = x3 - x1; + const ey = y3 - y1; + const ab = (dx * ey - dy * ex) * 2; + if (Math.abs(ab) < 1e-9) { + // For a degenerate triangle, the circumcenter is at the infinity, in a + // direction orthogonal to the halfedge and away from the “center” of + // the diagram , defined as the hull’s barycenter. + if (bx === undefined) { + bx = by = 0; + for (const i of hull) bx += points[i * 2], by += points[i * 2 + 1]; + bx /= hull.length, by /= hull.length; + } + const a = 1e9 * Math.sign((bx - x1) * ey - (by - y1) * ex); + x = (x1 + x3) / 2 - a * ey; + y = (y1 + y3) / 2 + a * ex; + } else { + const d = 1 / ab; + const bl = dx * dx + dy * dy; + const cl = ex * ex + ey * ey; + x = x1 + (ey * bl - dy * cl) * d; + y = y1 + (dx * cl - ex * bl) * d; + } + circumcenters[j] = x; + circumcenters[j + 1] = y; + } + + // Compute exterior cell rays. + let h = hull[hull.length - 1]; + let p0, + p1 = h * 4; + let x0, + x1 = points[2 * h]; + let y0, + y1 = points[2 * h + 1]; + vectors.fill(0); + for (let i = 0; i < hull.length; ++i) { + h = hull[i]; + p0 = p1, x0 = x1, y0 = y1; + p1 = h * 4, x1 = points[2 * h], y1 = points[2 * h + 1]; + vectors[p0 + 2] = vectors[p1] = y0 - y1; + vectors[p0 + 3] = vectors[p1 + 1] = x1 - x0; + } + } + render(context) { + const buffer = context == null ? context = new _path.default() : undefined; + const { + delaunay: { + halfedges, + inedges, + hull + }, + circumcenters, + vectors + } = this; + if (hull.length <= 1) return null; + for (let i = 0, n = halfedges.length; i < n; ++i) { + const j = halfedges[i]; + if (j < i) continue; + const ti = Math.floor(i / 3) * 2; + const tj = Math.floor(j / 3) * 2; + const xi = circumcenters[ti]; + const yi = circumcenters[ti + 1]; + const xj = circumcenters[tj]; + const yj = circumcenters[tj + 1]; + this._renderSegment(xi, yi, xj, yj, context); + } + let h0, + h1 = hull[hull.length - 1]; + for (let i = 0; i < hull.length; ++i) { + h0 = h1, h1 = hull[i]; + const t = Math.floor(inedges[h1] / 3) * 2; + const x = circumcenters[t]; + const y = circumcenters[t + 1]; + const v = h0 * 4; + const p = this._project(x, y, vectors[v + 2], vectors[v + 3]); + if (p) this._renderSegment(x, y, p[0], p[1], context); + } + return buffer && buffer.value(); + } + renderBounds(context) { + const buffer = context == null ? context = new _path.default() : undefined; + context.rect(this.xmin, this.ymin, this.xmax - this.xmin, this.ymax - this.ymin); + return buffer && buffer.value(); + } + renderCell(i, context) { + const buffer = context == null ? context = new _path.default() : undefined; + const points = this._clip(i); + if (points === null || !points.length) return; + context.moveTo(points[0], points[1]); + let n = points.length; + while (points[0] === points[n - 2] && points[1] === points[n - 1] && n > 1) n -= 2; + for (let i = 2; i < n; i += 2) { + if (points[i] !== points[i - 2] || points[i + 1] !== points[i - 1]) context.lineTo(points[i], points[i + 1]); + } + context.closePath(); + return buffer && buffer.value(); + } + *cellPolygons() { + const { + delaunay: { + points + } + } = this; + for (let i = 0, n = points.length / 2; i < n; ++i) { + const cell = this.cellPolygon(i); + if (cell) cell.index = i, yield cell; + } + } + cellPolygon(i) { + const polygon = new _polygon.default(); + this.renderCell(i, polygon); + return polygon.value(); + } + _renderSegment(x0, y0, x1, y1, context) { + let S; + const c0 = this._regioncode(x0, y0); + const c1 = this._regioncode(x1, y1); + if (c0 === 0 && c1 === 0) { + context.moveTo(x0, y0); + context.lineTo(x1, y1); + } else if (S = this._clipSegment(x0, y0, x1, y1, c0, c1)) { + context.moveTo(S[0], S[1]); + context.lineTo(S[2], S[3]); + } + } + contains(i, x, y) { + if ((x = +x, x !== x) || (y = +y, y !== y)) return false; + return this.delaunay._step(i, x, y) === i; + } + *neighbors(i) { + const ci = this._clip(i); + if (ci) for (const j of this.delaunay.neighbors(i)) { + const cj = this._clip(j); + // find the common edge + if (cj) loop: for (let ai = 0, li = ci.length; ai < li; ai += 2) { + for (let aj = 0, lj = cj.length; aj < lj; aj += 2) { + if (ci[ai] === cj[aj] && ci[ai + 1] === cj[aj + 1] && ci[(ai + 2) % li] === cj[(aj + lj - 2) % lj] && ci[(ai + 3) % li] === cj[(aj + lj - 1) % lj]) { + yield j; + break loop; + } + } + } + } + } + _cell(i) { + const { + circumcenters, + delaunay: { + inedges, + halfedges, + triangles + } + } = this; + const e0 = inedges[i]; + if (e0 === -1) return null; // coincident point + const points = []; + let e = e0; + do { + const t = Math.floor(e / 3); + points.push(circumcenters[t * 2], circumcenters[t * 2 + 1]); + e = e % 3 === 2 ? e - 2 : e + 1; + if (triangles[e] !== i) break; // bad triangulation + e = halfedges[e]; + } while (e !== e0 && e !== -1); + return points; + } + _clip(i) { + // degenerate case (1 valid point: return the box) + if (i === 0 && this.delaunay.hull.length === 1) { + return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin]; + } + const points = this._cell(i); + if (points === null) return null; + const { + vectors: V + } = this; + const v = i * 4; + return this._simplify(V[v] || V[v + 1] ? this._clipInfinite(i, points, V[v], V[v + 1], V[v + 2], V[v + 3]) : this._clipFinite(i, points)); + } + _clipFinite(i, points) { + const n = points.length; + let P = null; + let x0, + y0, + x1 = points[n - 2], + y1 = points[n - 1]; + let c0, + c1 = this._regioncode(x1, y1); + let e0, + e1 = 0; + for (let j = 0; j < n; j += 2) { + x0 = x1, y0 = y1, x1 = points[j], y1 = points[j + 1]; + c0 = c1, c1 = this._regioncode(x1, y1); + if (c0 === 0 && c1 === 0) { + e0 = e1, e1 = 0; + if (P) P.push(x1, y1);else P = [x1, y1]; + } else { + let S, sx0, sy0, sx1, sy1; + if (c0 === 0) { + if ((S = this._clipSegment(x0, y0, x1, y1, c0, c1)) === null) continue; + [sx0, sy0, sx1, sy1] = S; + } else { + if ((S = this._clipSegment(x1, y1, x0, y0, c1, c0)) === null) continue; + [sx1, sy1, sx0, sy0] = S; + e0 = e1, e1 = this._edgecode(sx0, sy0); + if (e0 && e1) this._edge(i, e0, e1, P, P.length); + if (P) P.push(sx0, sy0);else P = [sx0, sy0]; + } + e0 = e1, e1 = this._edgecode(sx1, sy1); + if (e0 && e1) this._edge(i, e0, e1, P, P.length); + if (P) P.push(sx1, sy1);else P = [sx1, sy1]; + } + } + if (P) { + e0 = e1, e1 = this._edgecode(P[0], P[1]); + if (e0 && e1) this._edge(i, e0, e1, P, P.length); + } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) { + return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin]; + } + return P; + } + _clipSegment(x0, y0, x1, y1, c0, c1) { + // for more robustness, always consider the segment in the same order + const flip = c0 < c1; + if (flip) [x0, y0, x1, y1, c0, c1] = [x1, y1, x0, y0, c1, c0]; + while (true) { + if (c0 === 0 && c1 === 0) return flip ? [x1, y1, x0, y0] : [x0, y0, x1, y1]; + if (c0 & c1) return null; + let x, + y, + c = c0 || c1; + if (c & 0b1000) x = x0 + (x1 - x0) * (this.ymax - y0) / (y1 - y0), y = this.ymax;else if (c & 0b0100) x = x0 + (x1 - x0) * (this.ymin - y0) / (y1 - y0), y = this.ymin;else if (c & 0b0010) y = y0 + (y1 - y0) * (this.xmax - x0) / (x1 - x0), x = this.xmax;else y = y0 + (y1 - y0) * (this.xmin - x0) / (x1 - x0), x = this.xmin; + if (c0) x0 = x, y0 = y, c0 = this._regioncode(x0, y0);else x1 = x, y1 = y, c1 = this._regioncode(x1, y1); + } + } + _clipInfinite(i, points, vx0, vy0, vxn, vyn) { + let P = Array.from(points), + p; + if (p = this._project(P[0], P[1], vx0, vy0)) P.unshift(p[0], p[1]); + if (p = this._project(P[P.length - 2], P[P.length - 1], vxn, vyn)) P.push(p[0], p[1]); + if (P = this._clipFinite(i, P)) { + for (let j = 0, n = P.length, c0, c1 = this._edgecode(P[n - 2], P[n - 1]); j < n; j += 2) { + c0 = c1, c1 = this._edgecode(P[j], P[j + 1]); + if (c0 && c1) j = this._edge(i, c0, c1, P, j), n = P.length; + } + } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) { + P = [this.xmin, this.ymin, this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax]; + } + return P; + } + _edge(i, e0, e1, P, j) { + while (e0 !== e1) { + let x, y; + switch (e0) { + case 0b0101: + e0 = 0b0100; + continue; + // top-left + case 0b0100: + e0 = 0b0110, x = this.xmax, y = this.ymin; + break; + // top + case 0b0110: + e0 = 0b0010; + continue; + // top-right + case 0b0010: + e0 = 0b1010, x = this.xmax, y = this.ymax; + break; + // right + case 0b1010: + e0 = 0b1000; + continue; + // bottom-right + case 0b1000: + e0 = 0b1001, x = this.xmin, y = this.ymax; + break; + // bottom + case 0b1001: + e0 = 0b0001; + continue; + // bottom-left + case 0b0001: + e0 = 0b0101, x = this.xmin, y = this.ymin; + break; + // left + } + // Note: this implicitly checks for out of bounds: if P[j] or P[j+1] are + // undefined, the conditional statement will be executed. + if ((P[j] !== x || P[j + 1] !== y) && this.contains(i, x, y)) { + P.splice(j, 0, x, y), j += 2; + } + } + return j; + } + _project(x0, y0, vx, vy) { + let t = Infinity, + c, + x, + y; + if (vy < 0) { + // top + if (y0 <= this.ymin) return null; + if ((c = (this.ymin - y0) / vy) < t) y = this.ymin, x = x0 + (t = c) * vx; + } else if (vy > 0) { + // bottom + if (y0 >= this.ymax) return null; + if ((c = (this.ymax - y0) / vy) < t) y = this.ymax, x = x0 + (t = c) * vx; + } + if (vx > 0) { + // right + if (x0 >= this.xmax) return null; + if ((c = (this.xmax - x0) / vx) < t) x = this.xmax, y = y0 + (t = c) * vy; + } else if (vx < 0) { + // left + if (x0 <= this.xmin) return null; + if ((c = (this.xmin - x0) / vx) < t) x = this.xmin, y = y0 + (t = c) * vy; + } + return [x, y]; + } + _edgecode(x, y) { + return (x === this.xmin ? 0b0001 : x === this.xmax ? 0b0010 : 0b0000) | (y === this.ymin ? 0b0100 : y === this.ymax ? 0b1000 : 0b0000); + } + _regioncode(x, y) { + return (x < this.xmin ? 0b0001 : x > this.xmax ? 0b0010 : 0b0000) | (y < this.ymin ? 0b0100 : y > this.ymax ? 0b1000 : 0b0000); + } + _simplify(P) { + if (P && P.length > 4) { + for (let i = 0; i < P.length; i += 2) { + const j = (i + 2) % P.length, + k = (i + 4) % P.length; + if (P[i] === P[j] && P[j] === P[k] || P[i + 1] === P[j + 1] && P[j + 1] === P[k + 1]) { + P.splice(j, 2), i -= 2; + } + } + if (!P.length) P = null; + } + return P; + } +} +exports.default = Voronoi; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-format/LICENSE b/packages/x-charts-vendor/lib-vendor/d3-format/LICENSE new file mode 100644 index 000000000000..b0145150fd35 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-format/LICENSE @@ -0,0 +1,13 @@ +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/packages/x-charts-vendor/lib-vendor/d3-format/src/defaultLocale.js b/packages/x-charts-vendor/lib-vendor/d3-format/src/defaultLocale.js new file mode 100644 index 000000000000..8728c449a324 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-format/src/defaultLocale.js @@ -0,0 +1,23 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = defaultLocale; +exports.formatPrefix = exports.format = void 0; +var _locale = _interopRequireDefault(require("./locale.js")); +var locale; +var format; +var formatPrefix; +defaultLocale({ + thousands: ",", + grouping: [3], + currency: ["$", ""] +}); +function defaultLocale(definition) { + locale = (0, _locale.default)(definition); + exports.format = format = locale.format; + exports.formatPrefix = formatPrefix = locale.formatPrefix; + return locale; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-format/src/exponent.js b/packages/x-charts-vendor/lib-vendor/d3-format/src/exponent.js new file mode 100644 index 000000000000..4fd129d25768 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-format/src/exponent.js @@ -0,0 +1,10 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _formatDecimal = require("./formatDecimal.js"); +function _default(x) { + return x = (0, _formatDecimal.formatDecimalParts)(Math.abs(x)), x ? x[1] : NaN; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-format/src/formatDecimal.js b/packages/x-charts-vendor/lib-vendor/d3-format/src/formatDecimal.js new file mode 100644 index 000000000000..7319a84ad1c1 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-format/src/formatDecimal.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +exports.formatDecimalParts = formatDecimalParts; +function _default(x) { + return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString("en").replace(/,/g, "") : x.toString(10); +} + +// Computes the decimal coefficient and exponent of the specified number x with +// significant digits p, where x is positive and p is in [1, 21] or undefined. +// For example, formatDecimalParts(1.23) returns ["123", 0]. +function formatDecimalParts(x, p) { + if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity + var i, + coefficient = x.slice(0, i); + + // The string returned by toExponential either has the form \d\.\d+e[-+]\d+ + // (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3). + return [coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1)]; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-format/src/formatGroup.js b/packages/x-charts-vendor/lib-vendor/d3-format/src/formatGroup.js new file mode 100644 index 000000000000..f07f4c69b555 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-format/src/formatGroup.js @@ -0,0 +1,22 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +function _default(grouping, thousands) { + return function (value, width) { + var i = value.length, + t = [], + j = 0, + g = grouping[0], + length = 0; + while (i > 0 && g > 0) { + if (length + g + 1 > width) g = Math.max(1, width - length); + t.push(value.substring(i -= g, i + g)); + if ((length += g + 1) > width) break; + g = grouping[j = (j + 1) % grouping.length]; + } + return t.reverse().join(thousands); + }; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-format/src/formatNumerals.js b/packages/x-charts-vendor/lib-vendor/d3-format/src/formatNumerals.js new file mode 100644 index 000000000000..93264fd21f33 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-format/src/formatNumerals.js @@ -0,0 +1,13 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +function _default(numerals) { + return function (value) { + return value.replace(/[0-9]/g, function (i) { + return numerals[+i]; + }); + }; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-format/src/formatPrefixAuto.js b/packages/x-charts-vendor/lib-vendor/d3-format/src/formatPrefixAuto.js new file mode 100644 index 000000000000..0bef74da95d6 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-format/src/formatPrefixAuto.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +exports.prefixExponent = void 0; +var _formatDecimal = require("./formatDecimal.js"); +var prefixExponent; +function _default(x, p) { + var d = (0, _formatDecimal.formatDecimalParts)(x, p); + if (!d) return x + ""; + var coefficient = d[0], + exponent = d[1], + i = exponent - (exports.prefixExponent = prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1, + n = coefficient.length; + return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join("0") : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) : "0." + new Array(1 - i).join("0") + (0, _formatDecimal.formatDecimalParts)(x, Math.max(0, p + i - 1))[0]; // less than 1y! +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-format/src/formatRounded.js b/packages/x-charts-vendor/lib-vendor/d3-format/src/formatRounded.js new file mode 100644 index 000000000000..5e86ca9b1d68 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-format/src/formatRounded.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _formatDecimal = require("./formatDecimal.js"); +function _default(x, p) { + var d = (0, _formatDecimal.formatDecimalParts)(x, p); + if (!d) return x + ""; + var coefficient = d[0], + exponent = d[1]; + return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1) : coefficient + new Array(exponent - coefficient.length + 2).join("0"); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-format/src/formatSpecifier.js b/packages/x-charts-vendor/lib-vendor/d3-format/src/formatSpecifier.js new file mode 100644 index 000000000000..9211ca563b43 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-format/src/formatSpecifier.js @@ -0,0 +1,42 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.FormatSpecifier = FormatSpecifier; +exports.default = formatSpecifier; +// [[fill]align][sign][symbol][0][width][,][.precision][~][type] +var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i; +function formatSpecifier(specifier) { + if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier); + var match; + return new FormatSpecifier({ + fill: match[1], + align: match[2], + sign: match[3], + symbol: match[4], + zero: match[5], + width: match[6], + comma: match[7], + precision: match[8] && match[8].slice(1), + trim: match[9], + type: match[10] + }); +} +formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof + +function FormatSpecifier(specifier) { + this.fill = specifier.fill === undefined ? " " : specifier.fill + ""; + this.align = specifier.align === undefined ? ">" : specifier.align + ""; + this.sign = specifier.sign === undefined ? "-" : specifier.sign + ""; + this.symbol = specifier.symbol === undefined ? "" : specifier.symbol + ""; + this.zero = !!specifier.zero; + this.width = specifier.width === undefined ? undefined : +specifier.width; + this.comma = !!specifier.comma; + this.precision = specifier.precision === undefined ? undefined : +specifier.precision; + this.trim = !!specifier.trim; + this.type = specifier.type === undefined ? "" : specifier.type + ""; +} +FormatSpecifier.prototype.toString = function () { + return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === undefined ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === undefined ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type; +}; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-format/src/formatTrim.js b/packages/x-charts-vendor/lib-vendor/d3-format/src/formatTrim.js new file mode 100644 index 000000000000..dde7edd38b03 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-format/src/formatTrim.js @@ -0,0 +1,25 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k. +function _default(s) { + out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) { + switch (s[i]) { + case ".": + i0 = i1 = i; + break; + case "0": + if (i0 === 0) i0 = i; + i1 = i; + break; + default: + if (!+s[i]) break out; + if (i0 > 0) i0 = 0; + break; + } + } + return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-format/src/formatTypes.js b/packages/x-charts-vendor/lib-vendor/d3-format/src/formatTypes.js new file mode 100644 index 000000000000..a2bc125e3ef1 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-format/src/formatTypes.js @@ -0,0 +1,25 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _formatDecimal = _interopRequireDefault(require("./formatDecimal.js")); +var _formatPrefixAuto = _interopRequireDefault(require("./formatPrefixAuto.js")); +var _formatRounded = _interopRequireDefault(require("./formatRounded.js")); +var _default = exports.default = { + "%": (x, p) => (x * 100).toFixed(p), + "b": x => Math.round(x).toString(2), + "c": x => x + "", + "d": _formatDecimal.default, + "e": (x, p) => x.toExponential(p), + "f": (x, p) => x.toFixed(p), + "g": (x, p) => x.toPrecision(p), + "o": x => Math.round(x).toString(8), + "p": (x, p) => (0, _formatRounded.default)(x * 100, p), + "r": _formatRounded.default, + "s": _formatPrefixAuto.default, + "X": x => Math.round(x).toString(16).toUpperCase(), + "x": x => Math.round(x).toString(16) +}; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-format/src/identity.js b/packages/x-charts-vendor/lib-vendor/d3-format/src/identity.js new file mode 100644 index 000000000000..78375ad66cf0 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-format/src/identity.js @@ -0,0 +1,9 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +function _default(x) { + return x; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-format/src/index.js b/packages/x-charts-vendor/lib-vendor/d3-format/src/index.js new file mode 100644 index 000000000000..eb7a8abe7b5f --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-format/src/index.js @@ -0,0 +1,68 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "FormatSpecifier", { + enumerable: true, + get: function () { + return _formatSpecifier.FormatSpecifier; + } +}); +Object.defineProperty(exports, "format", { + enumerable: true, + get: function () { + return _defaultLocale.format; + } +}); +Object.defineProperty(exports, "formatDefaultLocale", { + enumerable: true, + get: function () { + return _defaultLocale.default; + } +}); +Object.defineProperty(exports, "formatLocale", { + enumerable: true, + get: function () { + return _locale.default; + } +}); +Object.defineProperty(exports, "formatPrefix", { + enumerable: true, + get: function () { + return _defaultLocale.formatPrefix; + } +}); +Object.defineProperty(exports, "formatSpecifier", { + enumerable: true, + get: function () { + return _formatSpecifier.default; + } +}); +Object.defineProperty(exports, "precisionFixed", { + enumerable: true, + get: function () { + return _precisionFixed.default; + } +}); +Object.defineProperty(exports, "precisionPrefix", { + enumerable: true, + get: function () { + return _precisionPrefix.default; + } +}); +Object.defineProperty(exports, "precisionRound", { + enumerable: true, + get: function () { + return _precisionRound.default; + } +}); +var _defaultLocale = _interopRequireWildcard(require("./defaultLocale.js")); +var _locale = _interopRequireDefault(require("./locale.js")); +var _formatSpecifier = _interopRequireWildcard(require("./formatSpecifier.js")); +var _precisionFixed = _interopRequireDefault(require("./precisionFixed.js")); +var _precisionPrefix = _interopRequireDefault(require("./precisionPrefix.js")); +var _precisionRound = _interopRequireDefault(require("./precisionRound.js")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-format/src/locale.js b/packages/x-charts-vendor/lib-vendor/d3-format/src/locale.js new file mode 100644 index 000000000000..dd5554bd971a --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-format/src/locale.js @@ -0,0 +1,152 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _exponent = _interopRequireDefault(require("./exponent.js")); +var _formatGroup = _interopRequireDefault(require("./formatGroup.js")); +var _formatNumerals = _interopRequireDefault(require("./formatNumerals.js")); +var _formatSpecifier = _interopRequireDefault(require("./formatSpecifier.js")); +var _formatTrim = _interopRequireDefault(require("./formatTrim.js")); +var _formatTypes = _interopRequireDefault(require("./formatTypes.js")); +var _formatPrefixAuto = require("./formatPrefixAuto.js"); +var _identity = _interopRequireDefault(require("./identity.js")); +var map = Array.prototype.map, + prefixes = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"]; +function _default(locale) { + var group = locale.grouping === undefined || locale.thousands === undefined ? _identity.default : (0, _formatGroup.default)(map.call(locale.grouping, Number), locale.thousands + ""), + currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "", + currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "", + decimal = locale.decimal === undefined ? "." : locale.decimal + "", + numerals = locale.numerals === undefined ? _identity.default : (0, _formatNumerals.default)(map.call(locale.numerals, String)), + percent = locale.percent === undefined ? "%" : locale.percent + "", + minus = locale.minus === undefined ? "−" : locale.minus + "", + nan = locale.nan === undefined ? "NaN" : locale.nan + ""; + function newFormat(specifier) { + specifier = (0, _formatSpecifier.default)(specifier); + var fill = specifier.fill, + align = specifier.align, + sign = specifier.sign, + symbol = specifier.symbol, + zero = specifier.zero, + width = specifier.width, + comma = specifier.comma, + precision = specifier.precision, + trim = specifier.trim, + type = specifier.type; + + // The "n" type is an alias for ",g". + if (type === "n") comma = true, type = "g"; + + // The "" type, and any invalid type, is an alias for ".12~g". + else if (!_formatTypes.default[type]) precision === undefined && (precision = 12), trim = true, type = "g"; + + // If zero fill is specified, padding goes after sign and before digits. + if (zero || fill === "0" && align === "=") zero = true, fill = "0", align = "="; + + // Compute the prefix and suffix. + // For SI-prefix, the suffix is lazily computed. + var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "", + suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : ""; + + // What format function should we use? + // Is this an integer type? + // Can this type generate exponential notation? + var formatType = _formatTypes.default[type], + maybeSuffix = /[defgprs%]/.test(type); + + // Set the default precision if not specified, + // or clamp the specified precision to the supported range. + // For significant precision, it must be in [1, 21]. + // For fixed precision, it must be in [0, 20]. + precision = precision === undefined ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision)); + function format(value) { + var valuePrefix = prefix, + valueSuffix = suffix, + i, + n, + c; + if (type === "c") { + valueSuffix = formatType(value) + valueSuffix; + value = ""; + } else { + value = +value; + + // Determine the sign. -0 is not less than 0, but 1 / -0 is! + var valueNegative = value < 0 || 1 / value < 0; + + // Perform the initial formatting. + value = isNaN(value) ? nan : formatType(Math.abs(value), precision); + + // Trim insignificant zeros. + if (trim) value = (0, _formatTrim.default)(value); + + // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign. + if (valueNegative && +value === 0 && sign !== "+") valueNegative = false; + + // Compute the prefix and suffix. + valuePrefix = (valueNegative ? sign === "(" ? sign : minus : sign === "-" || sign === "(" ? "" : sign) + valuePrefix; + valueSuffix = (type === "s" ? prefixes[8 + _formatPrefixAuto.prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : ""); + + // Break the formatted value into the integer “value” part that can be + // grouped, and fractional or exponential “suffix” part that is not. + if (maybeSuffix) { + i = -1, n = value.length; + while (++i < n) { + if (c = value.charCodeAt(i), 48 > c || c > 57) { + valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix; + value = value.slice(0, i); + break; + } + } + } + } + + // If the fill character is not "0", grouping is applied before padding. + if (comma && !zero) value = group(value, Infinity); + + // Compute the padding. + var length = valuePrefix.length + value.length + valueSuffix.length, + padding = length < width ? new Array(width - length + 1).join(fill) : ""; + + // If the fill character is "0", grouping is applied after padding. + if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = ""; + + // Reconstruct the final output based on the desired alignment. + switch (align) { + case "<": + value = valuePrefix + value + valueSuffix + padding; + break; + case "=": + value = valuePrefix + padding + value + valueSuffix; + break; + case "^": + value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); + break; + default: + value = padding + valuePrefix + value + valueSuffix; + break; + } + return numerals(value); + } + format.toString = function () { + return specifier + ""; + }; + return format; + } + function formatPrefix(specifier, value) { + var f = newFormat((specifier = (0, _formatSpecifier.default)(specifier), specifier.type = "f", specifier)), + e = Math.max(-8, Math.min(8, Math.floor((0, _exponent.default)(value) / 3))) * 3, + k = Math.pow(10, -e), + prefix = prefixes[8 + e / 3]; + return function (value) { + return f(k * value) + prefix; + }; + } + return { + format: newFormat, + formatPrefix: formatPrefix + }; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-format/src/precisionFixed.js b/packages/x-charts-vendor/lib-vendor/d3-format/src/precisionFixed.js new file mode 100644 index 000000000000..ec93443edcef --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-format/src/precisionFixed.js @@ -0,0 +1,11 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _exponent = _interopRequireDefault(require("./exponent.js")); +function _default(step) { + return Math.max(0, -(0, _exponent.default)(Math.abs(step))); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-format/src/precisionPrefix.js b/packages/x-charts-vendor/lib-vendor/d3-format/src/precisionPrefix.js new file mode 100644 index 000000000000..11f2f984eb59 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-format/src/precisionPrefix.js @@ -0,0 +1,11 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _exponent = _interopRequireDefault(require("./exponent.js")); +function _default(step, value) { + return Math.max(0, Math.max(-8, Math.min(8, Math.floor((0, _exponent.default)(value) / 3))) * 3 - (0, _exponent.default)(Math.abs(step))); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-format/src/precisionRound.js b/packages/x-charts-vendor/lib-vendor/d3-format/src/precisionRound.js new file mode 100644 index 000000000000..20c0d92fddf4 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-format/src/precisionRound.js @@ -0,0 +1,12 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _exponent = _interopRequireDefault(require("./exponent.js")); +function _default(step, max) { + step = Math.abs(step), max = Math.abs(max) - step; + return Math.max(0, (0, _exponent.default)(max) - (0, _exponent.default)(step)) + 1; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/LICENSE b/packages/x-charts-vendor/lib-vendor/d3-interpolate/LICENSE new file mode 100644 index 000000000000..b0145150fd35 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/LICENSE @@ -0,0 +1,13 @@ +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/array.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/array.js new file mode 100644 index 000000000000..e255e2d1e0c7 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/array.js @@ -0,0 +1,28 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +exports.genericArray = genericArray; +var _value = _interopRequireDefault(require("./value.js")); +var _numberArray = _interopRequireWildcard(require("./numberArray.js")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +function _default(a, b) { + return ((0, _numberArray.isNumberArray)(b) ? _numberArray.default : genericArray)(a, b); +} +function genericArray(a, b) { + var nb = b ? b.length : 0, + na = a ? Math.min(nb, a.length) : 0, + x = new Array(na), + c = new Array(nb), + i; + for (i = 0; i < na; ++i) x[i] = (0, _value.default)(a[i], b[i]); + for (; i < nb; ++i) c[i] = b[i]; + return function (t) { + for (i = 0; i < na; ++i) c[i] = x[i](t); + return c; + }; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/basis.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/basis.js new file mode 100644 index 000000000000..fb7878eaf2fb --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/basis.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.basis = basis; +exports.default = _default; +function basis(t1, v0, v1, v2, v3) { + var t2 = t1 * t1, + t3 = t2 * t1; + return ((1 - 3 * t1 + 3 * t2 - t3) * v0 + (4 - 6 * t2 + 3 * t3) * v1 + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 + t3 * v3) / 6; +} +function _default(values) { + var n = values.length - 1; + return function (t) { + var i = t <= 0 ? t = 0 : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n), + v1 = values[i], + v2 = values[i + 1], + v0 = i > 0 ? values[i - 1] : 2 * v1 - v2, + v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1; + return basis((t - i / n) * n, v0, v1, v2, v3); + }; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/basisClosed.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/basisClosed.js new file mode 100644 index 000000000000..9146e274d385 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/basisClosed.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _basis = require("./basis.js"); +function _default(values) { + var n = values.length; + return function (t) { + var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n), + v0 = values[(i + n - 1) % n], + v1 = values[i % n], + v2 = values[(i + 1) % n], + v3 = values[(i + 2) % n]; + return (0, _basis.basis)((t - i / n) * n, v0, v1, v2, v3); + }; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/color.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/color.js new file mode 100644 index 000000000000..9af8967b05af --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/color.js @@ -0,0 +1,33 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = nogamma; +exports.gamma = gamma; +exports.hue = hue; +var _constant = _interopRequireDefault(require("./constant.js")); +function linear(a, d) { + return function (t) { + return a + t * d; + }; +} +function exponential(a, b, y) { + return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function (t) { + return Math.pow(a + t * b, y); + }; +} +function hue(a, b) { + var d = b - a; + return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : (0, _constant.default)(isNaN(a) ? b : a); +} +function gamma(y) { + return (y = +y) === 1 ? nogamma : function (a, b) { + return b - a ? exponential(a, b, y) : (0, _constant.default)(isNaN(a) ? b : a); + }; +} +function nogamma(a, b) { + var d = b - a; + return d ? linear(a, d) : (0, _constant.default)(isNaN(a) ? b : a); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/constant.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/constant.js new file mode 100644 index 000000000000..227999ec26cf --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/constant.js @@ -0,0 +1,8 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _default = x => () => x; +exports.default = _default; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/cubehelix.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/cubehelix.js new file mode 100644 index 000000000000..6acbc19daf04 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/cubehelix.js @@ -0,0 +1,32 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.cubehelixLong = void 0; +var _index = require("../../../lib-vendor/d3-color/src/index.js"); +var _color = _interopRequireWildcard(require("./color.js")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +function cubehelix(hue) { + return function cubehelixGamma(y) { + y = +y; + function cubehelix(start, end) { + var h = hue((start = (0, _index.cubehelix)(start)).h, (end = (0, _index.cubehelix)(end)).h), + s = (0, _color.default)(start.s, end.s), + l = (0, _color.default)(start.l, end.l), + opacity = (0, _color.default)(start.opacity, end.opacity); + return function (t) { + start.h = h(t); + start.s = s(t); + start.l = l(Math.pow(t, y)); + start.opacity = opacity(t); + return start + ""; + }; + } + cubehelix.gamma = cubehelixGamma; + return cubehelix; + }(1); +} +var _default = exports.default = cubehelix(_color.hue); +var cubehelixLong = exports.cubehelixLong = cubehelix(_color.default); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/date.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/date.js new file mode 100644 index 000000000000..27fc56300f90 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/date.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +function _default(a, b) { + var d = new Date(); + return a = +a, b = +b, function (t) { + return d.setTime(a * (1 - t) + b * t), d; + }; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/discrete.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/discrete.js new file mode 100644 index 000000000000..0e7a5a76f25d --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/discrete.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +function _default(range) { + var n = range.length; + return function (t) { + return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))]; + }; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/hcl.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/hcl.js new file mode 100644 index 000000000000..b1a3fdef70e1 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/hcl.js @@ -0,0 +1,27 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.hclLong = exports.default = void 0; +var _index = require("../../../lib-vendor/d3-color/src/index.js"); +var _color = _interopRequireWildcard(require("./color.js")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +function hcl(hue) { + return function (start, end) { + var h = hue((start = (0, _index.hcl)(start)).h, (end = (0, _index.hcl)(end)).h), + c = (0, _color.default)(start.c, end.c), + l = (0, _color.default)(start.l, end.l), + opacity = (0, _color.default)(start.opacity, end.opacity); + return function (t) { + start.h = h(t); + start.c = c(t); + start.l = l(t); + start.opacity = opacity(t); + return start + ""; + }; + }; +} +var _default = exports.default = hcl(_color.hue); +var hclLong = exports.hclLong = hcl(_color.default); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/hsl.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/hsl.js new file mode 100644 index 000000000000..c992c3c5ef7e --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/hsl.js @@ -0,0 +1,27 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.hslLong = exports.default = void 0; +var _index = require("../../../lib-vendor/d3-color/src/index.js"); +var _color = _interopRequireWildcard(require("./color.js")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +function hsl(hue) { + return function (start, end) { + var h = hue((start = (0, _index.hsl)(start)).h, (end = (0, _index.hsl)(end)).h), + s = (0, _color.default)(start.s, end.s), + l = (0, _color.default)(start.l, end.l), + opacity = (0, _color.default)(start.opacity, end.opacity); + return function (t) { + start.h = h(t); + start.s = s(t); + start.l = l(t); + start.opacity = opacity(t); + return start + ""; + }; + }; +} +var _default = exports.default = hsl(_color.hue); +var hslLong = exports.hslLong = hsl(_color.default); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/hue.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/hue.js new file mode 100644 index 000000000000..75846f319201 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/hue.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _color = require("./color.js"); +function _default(a, b) { + var i = (0, _color.hue)(+a, +b); + return function (t) { + var x = i(t); + return x - 360 * Math.floor(x / 360); + }; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/index.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/index.js new file mode 100644 index 000000000000..322bc2240e7f --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/index.js @@ -0,0 +1,191 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "interpolate", { + enumerable: true, + get: function () { + return _value.default; + } +}); +Object.defineProperty(exports, "interpolateArray", { + enumerable: true, + get: function () { + return _array.default; + } +}); +Object.defineProperty(exports, "interpolateBasis", { + enumerable: true, + get: function () { + return _basis.default; + } +}); +Object.defineProperty(exports, "interpolateBasisClosed", { + enumerable: true, + get: function () { + return _basisClosed.default; + } +}); +Object.defineProperty(exports, "interpolateCubehelix", { + enumerable: true, + get: function () { + return _cubehelix.default; + } +}); +Object.defineProperty(exports, "interpolateCubehelixLong", { + enumerable: true, + get: function () { + return _cubehelix.cubehelixLong; + } +}); +Object.defineProperty(exports, "interpolateDate", { + enumerable: true, + get: function () { + return _date.default; + } +}); +Object.defineProperty(exports, "interpolateDiscrete", { + enumerable: true, + get: function () { + return _discrete.default; + } +}); +Object.defineProperty(exports, "interpolateHcl", { + enumerable: true, + get: function () { + return _hcl.default; + } +}); +Object.defineProperty(exports, "interpolateHclLong", { + enumerable: true, + get: function () { + return _hcl.hclLong; + } +}); +Object.defineProperty(exports, "interpolateHsl", { + enumerable: true, + get: function () { + return _hsl.default; + } +}); +Object.defineProperty(exports, "interpolateHslLong", { + enumerable: true, + get: function () { + return _hsl.hslLong; + } +}); +Object.defineProperty(exports, "interpolateHue", { + enumerable: true, + get: function () { + return _hue.default; + } +}); +Object.defineProperty(exports, "interpolateLab", { + enumerable: true, + get: function () { + return _lab.default; + } +}); +Object.defineProperty(exports, "interpolateNumber", { + enumerable: true, + get: function () { + return _number.default; + } +}); +Object.defineProperty(exports, "interpolateNumberArray", { + enumerable: true, + get: function () { + return _numberArray.default; + } +}); +Object.defineProperty(exports, "interpolateObject", { + enumerable: true, + get: function () { + return _object.default; + } +}); +Object.defineProperty(exports, "interpolateRgb", { + enumerable: true, + get: function () { + return _rgb.default; + } +}); +Object.defineProperty(exports, "interpolateRgbBasis", { + enumerable: true, + get: function () { + return _rgb.rgbBasis; + } +}); +Object.defineProperty(exports, "interpolateRgbBasisClosed", { + enumerable: true, + get: function () { + return _rgb.rgbBasisClosed; + } +}); +Object.defineProperty(exports, "interpolateRound", { + enumerable: true, + get: function () { + return _round.default; + } +}); +Object.defineProperty(exports, "interpolateString", { + enumerable: true, + get: function () { + return _string.default; + } +}); +Object.defineProperty(exports, "interpolateTransformCss", { + enumerable: true, + get: function () { + return _index.interpolateTransformCss; + } +}); +Object.defineProperty(exports, "interpolateTransformSvg", { + enumerable: true, + get: function () { + return _index.interpolateTransformSvg; + } +}); +Object.defineProperty(exports, "interpolateZoom", { + enumerable: true, + get: function () { + return _zoom.default; + } +}); +Object.defineProperty(exports, "piecewise", { + enumerable: true, + get: function () { + return _piecewise.default; + } +}); +Object.defineProperty(exports, "quantize", { + enumerable: true, + get: function () { + return _quantize.default; + } +}); +var _value = _interopRequireDefault(require("./value.js")); +var _array = _interopRequireDefault(require("./array.js")); +var _basis = _interopRequireDefault(require("./basis.js")); +var _basisClosed = _interopRequireDefault(require("./basisClosed.js")); +var _date = _interopRequireDefault(require("./date.js")); +var _discrete = _interopRequireDefault(require("./discrete.js")); +var _hue = _interopRequireDefault(require("./hue.js")); +var _number = _interopRequireDefault(require("./number.js")); +var _numberArray = _interopRequireDefault(require("./numberArray.js")); +var _object = _interopRequireDefault(require("./object.js")); +var _round = _interopRequireDefault(require("./round.js")); +var _string = _interopRequireDefault(require("./string.js")); +var _index = require("./transform/index.js"); +var _zoom = _interopRequireDefault(require("./zoom.js")); +var _rgb = _interopRequireWildcard(require("./rgb.js")); +var _hsl = _interopRequireWildcard(require("./hsl.js")); +var _lab = _interopRequireDefault(require("./lab.js")); +var _hcl = _interopRequireWildcard(require("./hcl.js")); +var _cubehelix = _interopRequireWildcard(require("./cubehelix.js")); +var _piecewise = _interopRequireDefault(require("./piecewise.js")); +var _quantize = _interopRequireDefault(require("./quantize.js")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/lab.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/lab.js new file mode 100644 index 000000000000..fe8ed3ec87c2 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/lab.js @@ -0,0 +1,22 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = lab; +var _index = require("../../../lib-vendor/d3-color/src/index.js"); +var _color = _interopRequireDefault(require("./color.js")); +function lab(start, end) { + var l = (0, _color.default)((start = (0, _index.lab)(start)).l, (end = (0, _index.lab)(end)).l), + a = (0, _color.default)(start.a, end.a), + b = (0, _color.default)(start.b, end.b), + opacity = (0, _color.default)(start.opacity, end.opacity); + return function (t) { + start.l = l(t); + start.a = a(t); + start.b = b(t); + start.opacity = opacity(t); + return start + ""; + }; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/number.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/number.js new file mode 100644 index 000000000000..d88c1e11721f --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/number.js @@ -0,0 +1,11 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +function _default(a, b) { + return a = +a, b = +b, function (t) { + return a * (1 - t) + b * t; + }; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/numberArray.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/numberArray.js new file mode 100644 index 000000000000..838545995327 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/numberArray.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +exports.isNumberArray = isNumberArray; +function _default(a, b) { + if (!b) b = []; + var n = a ? Math.min(b.length, a.length) : 0, + c = b.slice(), + i; + return function (t) { + for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t; + return c; + }; +} +function isNumberArray(x) { + return ArrayBuffer.isView(x) && !(x instanceof DataView); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/object.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/object.js new file mode 100644 index 000000000000..7ca115ccb8f9 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/object.js @@ -0,0 +1,26 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _value = _interopRequireDefault(require("./value.js")); +function _default(a, b) { + var i = {}, + c = {}, + k; + if (a === null || typeof a !== "object") a = {}; + if (b === null || typeof b !== "object") b = {}; + for (k in b) { + if (k in a) { + i[k] = (0, _value.default)(a[k], b[k]); + } else { + c[k] = b[k]; + } + } + return function (t) { + for (k in i) c[k] = i[k](t); + return c; + }; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/piecewise.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/piecewise.js new file mode 100644 index 000000000000..620b3ca2e0fd --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/piecewise.js @@ -0,0 +1,20 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = piecewise; +var _value = _interopRequireDefault(require("./value.js")); +function piecewise(interpolate, values) { + if (values === undefined) values = interpolate, interpolate = _value.default; + var i = 0, + n = values.length - 1, + v = values[0], + I = new Array(n < 0 ? 0 : n); + while (i < n) I[i] = interpolate(v, v = values[++i]); + return function (t) { + var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n))); + return I[i](t - i); + }; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/quantize.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/quantize.js new file mode 100644 index 000000000000..d356cc059cdd --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/quantize.js @@ -0,0 +1,11 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +function _default(interpolator, n) { + var samples = new Array(n); + for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1)); + return samples; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/rgb.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/rgb.js new file mode 100644 index 000000000000..607ad89d5795 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/rgb.js @@ -0,0 +1,59 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.rgbBasisClosed = exports.rgbBasis = exports.default = void 0; +var _index = require("../../../lib-vendor/d3-color/src/index.js"); +var _basis = _interopRequireDefault(require("./basis.js")); +var _basisClosed = _interopRequireDefault(require("./basisClosed.js")); +var _color = _interopRequireWildcard(require("./color.js")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +var _default = exports.default = function rgbGamma(y) { + var color = (0, _color.gamma)(y); + function rgb(start, end) { + var r = color((start = (0, _index.rgb)(start)).r, (end = (0, _index.rgb)(end)).r), + g = color(start.g, end.g), + b = color(start.b, end.b), + opacity = (0, _color.default)(start.opacity, end.opacity); + return function (t) { + start.r = r(t); + start.g = g(t); + start.b = b(t); + start.opacity = opacity(t); + return start + ""; + }; + } + rgb.gamma = rgbGamma; + return rgb; +}(1); +function rgbSpline(spline) { + return function (colors) { + var n = colors.length, + r = new Array(n), + g = new Array(n), + b = new Array(n), + i, + color; + for (i = 0; i < n; ++i) { + color = (0, _index.rgb)(colors[i]); + r[i] = color.r || 0; + g[i] = color.g || 0; + b[i] = color.b || 0; + } + r = spline(r); + g = spline(g); + b = spline(b); + color.opacity = 1; + return function (t) { + color.r = r(t); + color.g = g(t); + color.b = b(t); + return color + ""; + }; + }; +} +var rgbBasis = exports.rgbBasis = rgbSpline(_basis.default); +var rgbBasisClosed = exports.rgbBasisClosed = rgbSpline(_basisClosed.default); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/round.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/round.js new file mode 100644 index 000000000000..9fddbc012043 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/round.js @@ -0,0 +1,11 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +function _default(a, b) { + return a = +a, b = +b, function (t) { + return Math.round(a * (1 - t) + b * t); + }; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/string.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/string.js new file mode 100644 index 000000000000..4b3963a18161 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/string.js @@ -0,0 +1,75 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _number = _interopRequireDefault(require("./number.js")); +var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, + reB = new RegExp(reA.source, "g"); +function zero(b) { + return function () { + return b; + }; +} +function one(b) { + return function (t) { + return b(t) + ""; + }; +} +function _default(a, b) { + var bi = reA.lastIndex = reB.lastIndex = 0, + // scan index for next number in b + am, + // current match in a + bm, + // current match in b + bs, + // string preceding current number in b, if any + i = -1, + // index in s + s = [], + // string constants and placeholders + q = []; // number interpolators + + // Coerce inputs to strings. + a = a + "", b = b + ""; + + // Interpolate pairs of numbers in a & b. + while ((am = reA.exec(a)) && (bm = reB.exec(b))) { + if ((bs = bm.index) > bi) { + // a string precedes the next number in b + bs = b.slice(bi, bs); + if (s[i]) s[i] += bs; // coalesce with previous string + else s[++i] = bs; + } + if ((am = am[0]) === (bm = bm[0])) { + // numbers in a & b match + if (s[i]) s[i] += bm; // coalesce with previous string + else s[++i] = bm; + } else { + // interpolate non-matching numbers + s[++i] = null; + q.push({ + i: i, + x: (0, _number.default)(am, bm) + }); + } + bi = reB.lastIndex; + } + + // Add remains of b. + if (bi < b.length) { + bs = b.slice(bi); + if (s[i]) s[i] += bs; // coalesce with previous string + else s[++i] = bs; + } + + // Special optimization for only a single match. + // Otherwise, interpolate each of the numbers and rejoin the string. + return s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length, function (t) { + for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t); + return s.join(""); + }); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/transform/decompose.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/transform/decompose.js new file mode 100644 index 000000000000..35a756efd4cc --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/transform/decompose.js @@ -0,0 +1,31 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +exports.identity = void 0; +var degrees = 180 / Math.PI; +var identity = exports.identity = { + translateX: 0, + translateY: 0, + rotate: 0, + skewX: 0, + scaleX: 1, + scaleY: 1 +}; +function _default(a, b, c, d, e, f) { + var scaleX, scaleY, skewX; + if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX; + if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX; + if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY; + if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX; + return { + translateX: e, + translateY: f, + rotate: Math.atan2(b, a) * degrees, + skewX: Math.atan(skewX) * degrees, + scaleX: scaleX, + scaleY: scaleY + }; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/transform/index.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/transform/index.js new file mode 100644 index 000000000000..a11a01445bfa --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/transform/index.js @@ -0,0 +1,83 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.interpolateTransformSvg = exports.interpolateTransformCss = void 0; +var _number = _interopRequireDefault(require("../number.js")); +var _parse = require("./parse.js"); +function interpolateTransform(parse, pxComma, pxParen, degParen) { + function pop(s) { + return s.length ? s.pop() + " " : ""; + } + function translate(xa, ya, xb, yb, s, q) { + if (xa !== xb || ya !== yb) { + var i = s.push("translate(", null, pxComma, null, pxParen); + q.push({ + i: i - 4, + x: (0, _number.default)(xa, xb) + }, { + i: i - 2, + x: (0, _number.default)(ya, yb) + }); + } else if (xb || yb) { + s.push("translate(" + xb + pxComma + yb + pxParen); + } + } + function rotate(a, b, s, q) { + if (a !== b) { + if (a - b > 180) b += 360;else if (b - a > 180) a += 360; // shortest path + q.push({ + i: s.push(pop(s) + "rotate(", null, degParen) - 2, + x: (0, _number.default)(a, b) + }); + } else if (b) { + s.push(pop(s) + "rotate(" + b + degParen); + } + } + function skewX(a, b, s, q) { + if (a !== b) { + q.push({ + i: s.push(pop(s) + "skewX(", null, degParen) - 2, + x: (0, _number.default)(a, b) + }); + } else if (b) { + s.push(pop(s) + "skewX(" + b + degParen); + } + } + function scale(xa, ya, xb, yb, s, q) { + if (xa !== xb || ya !== yb) { + var i = s.push(pop(s) + "scale(", null, ",", null, ")"); + q.push({ + i: i - 4, + x: (0, _number.default)(xa, xb) + }, { + i: i - 2, + x: (0, _number.default)(ya, yb) + }); + } else if (xb !== 1 || yb !== 1) { + s.push(pop(s) + "scale(" + xb + "," + yb + ")"); + } + } + return function (a, b) { + var s = [], + // string constants and placeholders + q = []; // number interpolators + a = parse(a), b = parse(b); + translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q); + rotate(a.rotate, b.rotate, s, q); + skewX(a.skewX, b.skewX, s, q); + scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q); + a = b = null; // gc + return function (t) { + var i = -1, + n = q.length, + o; + while (++i < n) s[(o = q[i]).i] = o.x(t); + return s.join(""); + }; + }; +} +var interpolateTransformCss = exports.interpolateTransformCss = interpolateTransform(_parse.parseCss, "px, ", "px)", "deg)"); +var interpolateTransformSvg = exports.interpolateTransformSvg = interpolateTransform(_parse.parseSvg, ", ", ")", ")"); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/transform/parse.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/transform/parse.js new file mode 100644 index 000000000000..3ff8a4b3f964 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/transform/parse.js @@ -0,0 +1,25 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.parseCss = parseCss; +exports.parseSvg = parseSvg; +var _decompose = _interopRequireWildcard(require("./decompose.js")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +var svgNode; + +/* eslint-disable no-undef */ +function parseCss(value) { + const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + ""); + return m.isIdentity ? _decompose.identity : (0, _decompose.default)(m.a, m.b, m.c, m.d, m.e, m.f); +} +function parseSvg(value) { + if (value == null) return _decompose.identity; + if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g"); + svgNode.setAttribute("transform", value); + if (!(value = svgNode.transform.baseVal.consolidate())) return _decompose.identity; + value = value.matrix; + return (0, _decompose.default)(value.a, value.b, value.c, value.d, value.e, value.f); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/value.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/value.js new file mode 100644 index 000000000000..9f26d08f0c63 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/value.js @@ -0,0 +1,23 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _index = require("../../../lib-vendor/d3-color/src/index.js"); +var _rgb = _interopRequireDefault(require("./rgb.js")); +var _array = require("./array.js"); +var _date = _interopRequireDefault(require("./date.js")); +var _number = _interopRequireDefault(require("./number.js")); +var _object = _interopRequireDefault(require("./object.js")); +var _string = _interopRequireDefault(require("./string.js")); +var _constant = _interopRequireDefault(require("./constant.js")); +var _numberArray = _interopRequireWildcard(require("./numberArray.js")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +function _default(a, b) { + var t = typeof b, + c; + return b == null || t === "boolean" ? (0, _constant.default)(b) : (t === "number" ? _number.default : t === "string" ? (c = (0, _index.color)(b)) ? (b = c, _rgb.default) : _string.default : b instanceof _index.color ? _rgb.default : b instanceof Date ? _date.default : (0, _numberArray.isNumberArray)(b) ? _numberArray.default : Array.isArray(b) ? _array.genericArray : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? _object.default : _number.default)(a, b); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/zoom.js b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/zoom.js new file mode 100644 index 000000000000..30d4f236ae89 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-interpolate/src/zoom.js @@ -0,0 +1,66 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var epsilon2 = 1e-12; +function cosh(x) { + return ((x = Math.exp(x)) + 1 / x) / 2; +} +function sinh(x) { + return ((x = Math.exp(x)) - 1 / x) / 2; +} +function tanh(x) { + return ((x = Math.exp(2 * x)) - 1) / (x + 1); +} +var _default = exports.default = function zoomRho(rho, rho2, rho4) { + // p0 = [ux0, uy0, w0] + // p1 = [ux1, uy1, w1] + function zoom(p0, p1) { + var ux0 = p0[0], + uy0 = p0[1], + w0 = p0[2], + ux1 = p1[0], + uy1 = p1[1], + w1 = p1[2], + dx = ux1 - ux0, + dy = uy1 - uy0, + d2 = dx * dx + dy * dy, + i, + S; + + // Special case for u0 ≅ u1. + if (d2 < epsilon2) { + S = Math.log(w1 / w0) / rho; + i = function (t) { + return [ux0 + t * dx, uy0 + t * dy, w0 * Math.exp(rho * t * S)]; + }; + } + + // General case. + else { + var d1 = Math.sqrt(d2), + b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), + b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), + r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), + r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1); + S = (r1 - r0) / rho; + i = function (t) { + var s = t * S, + coshr0 = cosh(r0), + u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0)); + return [ux0 + u * dx, uy0 + u * dy, w0 * coshr0 / cosh(rho * s + r0)]; + }; + } + i.duration = S * 1000 * rho / Math.SQRT2; + return i; + } + zoom.rho = function (_) { + var _1 = Math.max(1e-3, +_), + _2 = _1 * _1, + _4 = _2 * _2; + return zoomRho(_1, _2, _4); + }; + return zoom; +}(Math.SQRT2, 2, 4); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-path/LICENSE b/packages/x-charts-vendor/lib-vendor/d3-path/LICENSE new file mode 100644 index 000000000000..ed25746bbfc8 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-path/LICENSE @@ -0,0 +1,13 @@ +Copyright 2015-2022 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/packages/x-charts-vendor/lib-vendor/d3-path/src/index.js b/packages/x-charts-vendor/lib-vendor/d3-path/src/index.js new file mode 100644 index 000000000000..725ee829d865 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-path/src/index.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "Path", { + enumerable: true, + get: function () { + return _path.Path; + } +}); +Object.defineProperty(exports, "path", { + enumerable: true, + get: function () { + return _path.path; + } +}); +Object.defineProperty(exports, "pathRound", { + enumerable: true, + get: function () { + return _path.pathRound; + } +}); +var _path = require("./path.js"); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-path/src/path.js b/packages/x-charts-vendor/lib-vendor/d3-path/src/path.js new file mode 100644 index 000000000000..d0f5718c21ab --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-path/src/path.js @@ -0,0 +1,158 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Path = void 0; +exports.path = path; +exports.pathRound = pathRound; +const pi = Math.PI, + tau = 2 * pi, + epsilon = 1e-6, + tauEpsilon = tau - epsilon; +function append(strings) { + this._ += strings[0]; + for (let i = 1, n = strings.length; i < n; ++i) { + this._ += arguments[i] + strings[i]; + } +} +function appendRound(digits) { + let d = Math.floor(digits); + if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`); + if (d > 15) return append; + const k = 10 ** d; + return function (strings) { + this._ += strings[0]; + for (let i = 1, n = strings.length; i < n; ++i) { + this._ += Math.round(arguments[i] * k) / k + strings[i]; + } + }; +} +class Path { + constructor(digits) { + this._x0 = this._y0 = + // start of current subpath + this._x1 = this._y1 = null; // end of current subpath + this._ = ""; + this._append = digits == null ? append : appendRound(digits); + } + moveTo(x, y) { + this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`; + } + closePath() { + if (this._x1 !== null) { + this._x1 = this._x0, this._y1 = this._y0; + this._append`Z`; + } + } + lineTo(x, y) { + this._append`L${this._x1 = +x},${this._y1 = +y}`; + } + quadraticCurveTo(x1, y1, x, y) { + this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`; + } + bezierCurveTo(x1, y1, x2, y2, x, y) { + this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`; + } + arcTo(x1, y1, x2, y2, r) { + x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r; + + // Is the radius negative? Error. + if (r < 0) throw new Error(`negative radius: ${r}`); + let x0 = this._x1, + y0 = this._y1, + x21 = x2 - x1, + y21 = y2 - y1, + x01 = x0 - x1, + y01 = y0 - y1, + l01_2 = x01 * x01 + y01 * y01; + + // Is this path empty? Move to (x1,y1). + if (this._x1 === null) { + this._append`M${this._x1 = x1},${this._y1 = y1}`; + } + + // Or, is (x1,y1) coincident with (x0,y0)? Do nothing. + else if (!(l01_2 > epsilon)) ; + + // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear? + // Equivalently, is (x1,y1) coincident with (x2,y2)? + // Or, is the radius zero? Line to (x1,y1). + else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) { + this._append`L${this._x1 = x1},${this._y1 = y1}`; + } + + // Otherwise, draw an arc! + else { + let x20 = x2 - x0, + y20 = y2 - y0, + l21_2 = x21 * x21 + y21 * y21, + l20_2 = x20 * x20 + y20 * y20, + l21 = Math.sqrt(l21_2), + l01 = Math.sqrt(l01_2), + l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), + t01 = l / l01, + t21 = l / l21; + + // If the start tangent is not coincident with (x0,y0), line to. + if (Math.abs(t01 - 1) > epsilon) { + this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`; + } + this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`; + } + } + arc(x, y, r, a0, a1, ccw) { + x = +x, y = +y, r = +r, ccw = !!ccw; + + // Is the radius negative? Error. + if (r < 0) throw new Error(`negative radius: ${r}`); + let dx = r * Math.cos(a0), + dy = r * Math.sin(a0), + x0 = x + dx, + y0 = y + dy, + cw = 1 ^ ccw, + da = ccw ? a0 - a1 : a1 - a0; + + // Is this path empty? Move to (x0,y0). + if (this._x1 === null) { + this._append`M${x0},${y0}`; + } + + // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0). + else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) { + this._append`L${x0},${y0}`; + } + + // Is this arc empty? We’re done. + if (!r) return; + + // Does the angle go the wrong way? Flip the direction. + if (da < 0) da = da % tau + tau; + + // Is this a complete circle? Draw two arcs to complete the circle. + if (da > tauEpsilon) { + this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`; + } + + // Is this arc non-empty? Draw an arc! + else if (da > epsilon) { + this._append`A${r},${r},0,${+(da >= pi)},${cw},${this._x1 = x + r * Math.cos(a1)},${this._y1 = y + r * Math.sin(a1)}`; + } + } + rect(x, y, w, h) { + this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`; + } + toString() { + return this._; + } +} +exports.Path = Path; +function path() { + return new Path(); +} + +// Allow instanceof d3.path +path.prototype = Path.prototype; +function pathRound(digits = 3) { + return new Path(+digits); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/LICENSE b/packages/x-charts-vendor/lib-vendor/d3-scale/LICENSE new file mode 100644 index 000000000000..b0145150fd35 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/LICENSE @@ -0,0 +1,13 @@ +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/band.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/band.js new file mode 100644 index 000000000000..503c3445c37f --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/band.js @@ -0,0 +1,87 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = band; +exports.point = point; +var _index = require("../../../lib-vendor/d3-array/src/index.js"); +var _init = require("./init.js"); +var _ordinal = _interopRequireDefault(require("./ordinal.js")); +function band() { + var scale = (0, _ordinal.default)().unknown(undefined), + domain = scale.domain, + ordinalRange = scale.range, + r0 = 0, + r1 = 1, + step, + bandwidth, + round = false, + paddingInner = 0, + paddingOuter = 0, + align = 0.5; + delete scale.unknown; + function rescale() { + var n = domain().length, + reverse = r1 < r0, + start = reverse ? r1 : r0, + stop = reverse ? r0 : r1; + step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2); + if (round) step = Math.floor(step); + start += (stop - start - step * (n - paddingInner)) * align; + bandwidth = step * (1 - paddingInner); + if (round) start = Math.round(start), bandwidth = Math.round(bandwidth); + var values = (0, _index.range)(n).map(function (i) { + return start + step * i; + }); + return ordinalRange(reverse ? values.reverse() : values); + } + scale.domain = function (_) { + return arguments.length ? (domain(_), rescale()) : domain(); + }; + scale.range = function (_) { + return arguments.length ? ([r0, r1] = _, r0 = +r0, r1 = +r1, rescale()) : [r0, r1]; + }; + scale.rangeRound = function (_) { + return [r0, r1] = _, r0 = +r0, r1 = +r1, round = true, rescale(); + }; + scale.bandwidth = function () { + return bandwidth; + }; + scale.step = function () { + return step; + }; + scale.round = function (_) { + return arguments.length ? (round = !!_, rescale()) : round; + }; + scale.padding = function (_) { + return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner; + }; + scale.paddingInner = function (_) { + return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner; + }; + scale.paddingOuter = function (_) { + return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter; + }; + scale.align = function (_) { + return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align; + }; + scale.copy = function () { + return band(domain(), [r0, r1]).round(round).paddingInner(paddingInner).paddingOuter(paddingOuter).align(align); + }; + return _init.initRange.apply(rescale(), arguments); +} +function pointish(scale) { + var copy = scale.copy; + scale.padding = scale.paddingOuter; + delete scale.paddingInner; + delete scale.paddingOuter; + scale.copy = function () { + return pointish(copy()); + }; + return scale; +} +function point() { + return pointish(band.apply(null, arguments).paddingInner(1)); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/colors.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/colors.js new file mode 100644 index 000000000000..e543b53f804b --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/colors.js @@ -0,0 +1,11 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = colors; +function colors(s) { + return s.match(/.{6}/g).map(function (x) { + return "#" + x; + }); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/constant.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/constant.js new file mode 100644 index 000000000000..9e101d787cdd --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/constant.js @@ -0,0 +1,11 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = constants; +function constants(x) { + return function () { + return x; + }; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/continuous.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/continuous.js new file mode 100644 index 000000000000..1ecf6be65bfd --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/continuous.js @@ -0,0 +1,116 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.copy = copy; +exports.default = continuous; +exports.identity = identity; +exports.transformer = transformer; +var _index = require("../../../lib-vendor/d3-array/src/index.js"); +var _index2 = require("../../../lib-vendor/d3-interpolate/src/index.js"); +var _constant = _interopRequireDefault(require("./constant.js")); +var _number = _interopRequireDefault(require("./number.js")); +var unit = [0, 1]; +function identity(x) { + return x; +} +function normalize(a, b) { + return (b -= a = +a) ? function (x) { + return (x - a) / b; + } : (0, _constant.default)(isNaN(b) ? NaN : 0.5); +} +function clamper(a, b) { + var t; + if (a > b) t = a, a = b, b = t; + return function (x) { + return Math.max(a, Math.min(b, x)); + }; +} + +// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1]. +// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b]. +function bimap(domain, range, interpolate) { + var d0 = domain[0], + d1 = domain[1], + r0 = range[0], + r1 = range[1]; + if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);else d0 = normalize(d0, d1), r0 = interpolate(r0, r1); + return function (x) { + return r0(d0(x)); + }; +} +function polymap(domain, range, interpolate) { + var j = Math.min(domain.length, range.length) - 1, + d = new Array(j), + r = new Array(j), + i = -1; + + // Reverse descending domains. + if (domain[j] < domain[0]) { + domain = domain.slice().reverse(); + range = range.slice().reverse(); + } + while (++i < j) { + d[i] = normalize(domain[i], domain[i + 1]); + r[i] = interpolate(range[i], range[i + 1]); + } + return function (x) { + var i = (0, _index.bisect)(domain, x, 1, j) - 1; + return r[i](d[i](x)); + }; +} +function copy(source, target) { + return target.domain(source.domain()).range(source.range()).interpolate(source.interpolate()).clamp(source.clamp()).unknown(source.unknown()); +} +function transformer() { + var domain = unit, + range = unit, + interpolate = _index2.interpolate, + transform, + untransform, + unknown, + clamp = identity, + piecewise, + output, + input; + function rescale() { + var n = Math.min(domain.length, range.length); + if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]); + piecewise = n > 2 ? polymap : bimap; + output = input = null; + return scale; + } + function scale(x) { + return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x))); + } + scale.invert = function (y) { + return clamp(untransform((input || (input = piecewise(range, domain.map(transform), _index2.interpolateNumber)))(y))); + }; + scale.domain = function (_) { + return arguments.length ? (domain = Array.from(_, _number.default), rescale()) : domain.slice(); + }; + scale.range = function (_) { + return arguments.length ? (range = Array.from(_), rescale()) : range.slice(); + }; + scale.rangeRound = function (_) { + return range = Array.from(_), interpolate = _index2.interpolateRound, rescale(); + }; + scale.clamp = function (_) { + return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity; + }; + scale.interpolate = function (_) { + return arguments.length ? (interpolate = _, rescale()) : interpolate; + }; + scale.unknown = function (_) { + return arguments.length ? (unknown = _, scale) : unknown; + }; + return function (t, u) { + transform = t, untransform = u; + return rescale(); + }; +} +function continuous() { + return transformer()(identity, identity); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/diverging.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/diverging.js new file mode 100644 index 000000000000..043d9a29dcc2 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/diverging.js @@ -0,0 +1,91 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = diverging; +exports.divergingLog = divergingLog; +exports.divergingPow = divergingPow; +exports.divergingSqrt = divergingSqrt; +exports.divergingSymlog = divergingSymlog; +var _index = require("../../../lib-vendor/d3-interpolate/src/index.js"); +var _continuous = require("./continuous.js"); +var _init = require("./init.js"); +var _linear = require("./linear.js"); +var _log = require("./log.js"); +var _sequential = require("./sequential.js"); +var _symlog = require("./symlog.js"); +var _pow = require("./pow.js"); +function transformer() { + var x0 = 0, + x1 = 0.5, + x2 = 1, + s = 1, + t0, + t1, + t2, + k10, + k21, + interpolator = _continuous.identity, + transform, + clamp = false, + unknown; + function scale(x) { + return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (s * x < s * t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x)); + } + scale.domain = function (_) { + return arguments.length ? ([x0, x1, x2] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), t2 = transform(x2 = +x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1, scale) : [x0, x1, x2]; + }; + scale.clamp = function (_) { + return arguments.length ? (clamp = !!_, scale) : clamp; + }; + scale.interpolator = function (_) { + return arguments.length ? (interpolator = _, scale) : interpolator; + }; + function range(interpolate) { + return function (_) { + var r0, r1, r2; + return arguments.length ? ([r0, r1, r2] = _, interpolator = (0, _index.piecewise)(interpolate, [r0, r1, r2]), scale) : [interpolator(0), interpolator(0.5), interpolator(1)]; + }; + } + scale.range = range(_index.interpolate); + scale.rangeRound = range(_index.interpolateRound); + scale.unknown = function (_) { + return arguments.length ? (unknown = _, scale) : unknown; + }; + return function (t) { + transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1; + return scale; + }; +} +function diverging() { + var scale = (0, _linear.linearish)(transformer()(_continuous.identity)); + scale.copy = function () { + return (0, _sequential.copy)(scale, diverging()); + }; + return _init.initInterpolator.apply(scale, arguments); +} +function divergingLog() { + var scale = (0, _log.loggish)(transformer()).domain([0.1, 1, 10]); + scale.copy = function () { + return (0, _sequential.copy)(scale, divergingLog()).base(scale.base()); + }; + return _init.initInterpolator.apply(scale, arguments); +} +function divergingSymlog() { + var scale = (0, _symlog.symlogish)(transformer()); + scale.copy = function () { + return (0, _sequential.copy)(scale, divergingSymlog()).constant(scale.constant()); + }; + return _init.initInterpolator.apply(scale, arguments); +} +function divergingPow() { + var scale = (0, _pow.powish)(transformer()); + scale.copy = function () { + return (0, _sequential.copy)(scale, divergingPow()).exponent(scale.exponent()); + }; + return _init.initInterpolator.apply(scale, arguments); +} +function divergingSqrt() { + return divergingPow.apply(null, arguments).exponent(0.5); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/identity.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/identity.js new file mode 100644 index 000000000000..cdd427a4d249 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/identity.js @@ -0,0 +1,27 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = identity; +var _linear = require("./linear.js"); +var _number = _interopRequireDefault(require("./number.js")); +function identity(domain) { + var unknown; + function scale(x) { + return x == null || isNaN(x = +x) ? unknown : x; + } + scale.invert = scale; + scale.domain = scale.range = function (_) { + return arguments.length ? (domain = Array.from(_, _number.default), scale) : domain.slice(); + }; + scale.unknown = function (_) { + return arguments.length ? (unknown = _, scale) : unknown; + }; + scale.copy = function () { + return identity(domain).unknown(unknown); + }; + domain = arguments.length ? Array.from(domain, _number.default) : [0, 1]; + return (0, _linear.linearish)(scale); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/index.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/index.js new file mode 100644 index 000000000000..c6460fc5ab6a --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/index.js @@ -0,0 +1,193 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "scaleBand", { + enumerable: true, + get: function () { + return _band.default; + } +}); +Object.defineProperty(exports, "scaleDiverging", { + enumerable: true, + get: function () { + return _diverging.default; + } +}); +Object.defineProperty(exports, "scaleDivergingLog", { + enumerable: true, + get: function () { + return _diverging.divergingLog; + } +}); +Object.defineProperty(exports, "scaleDivergingPow", { + enumerable: true, + get: function () { + return _diverging.divergingPow; + } +}); +Object.defineProperty(exports, "scaleDivergingSqrt", { + enumerable: true, + get: function () { + return _diverging.divergingSqrt; + } +}); +Object.defineProperty(exports, "scaleDivergingSymlog", { + enumerable: true, + get: function () { + return _diverging.divergingSymlog; + } +}); +Object.defineProperty(exports, "scaleIdentity", { + enumerable: true, + get: function () { + return _identity.default; + } +}); +Object.defineProperty(exports, "scaleImplicit", { + enumerable: true, + get: function () { + return _ordinal.implicit; + } +}); +Object.defineProperty(exports, "scaleLinear", { + enumerable: true, + get: function () { + return _linear.default; + } +}); +Object.defineProperty(exports, "scaleLog", { + enumerable: true, + get: function () { + return _log.default; + } +}); +Object.defineProperty(exports, "scaleOrdinal", { + enumerable: true, + get: function () { + return _ordinal.default; + } +}); +Object.defineProperty(exports, "scalePoint", { + enumerable: true, + get: function () { + return _band.point; + } +}); +Object.defineProperty(exports, "scalePow", { + enumerable: true, + get: function () { + return _pow.default; + } +}); +Object.defineProperty(exports, "scaleQuantile", { + enumerable: true, + get: function () { + return _quantile.default; + } +}); +Object.defineProperty(exports, "scaleQuantize", { + enumerable: true, + get: function () { + return _quantize.default; + } +}); +Object.defineProperty(exports, "scaleRadial", { + enumerable: true, + get: function () { + return _radial.default; + } +}); +Object.defineProperty(exports, "scaleSequential", { + enumerable: true, + get: function () { + return _sequential.default; + } +}); +Object.defineProperty(exports, "scaleSequentialLog", { + enumerable: true, + get: function () { + return _sequential.sequentialLog; + } +}); +Object.defineProperty(exports, "scaleSequentialPow", { + enumerable: true, + get: function () { + return _sequential.sequentialPow; + } +}); +Object.defineProperty(exports, "scaleSequentialQuantile", { + enumerable: true, + get: function () { + return _sequentialQuantile.default; + } +}); +Object.defineProperty(exports, "scaleSequentialSqrt", { + enumerable: true, + get: function () { + return _sequential.sequentialSqrt; + } +}); +Object.defineProperty(exports, "scaleSequentialSymlog", { + enumerable: true, + get: function () { + return _sequential.sequentialSymlog; + } +}); +Object.defineProperty(exports, "scaleSqrt", { + enumerable: true, + get: function () { + return _pow.sqrt; + } +}); +Object.defineProperty(exports, "scaleSymlog", { + enumerable: true, + get: function () { + return _symlog.default; + } +}); +Object.defineProperty(exports, "scaleThreshold", { + enumerable: true, + get: function () { + return _threshold.default; + } +}); +Object.defineProperty(exports, "scaleTime", { + enumerable: true, + get: function () { + return _time.default; + } +}); +Object.defineProperty(exports, "scaleUtc", { + enumerable: true, + get: function () { + return _utcTime.default; + } +}); +Object.defineProperty(exports, "tickFormat", { + enumerable: true, + get: function () { + return _tickFormat.default; + } +}); +var _band = _interopRequireWildcard(require("./band.js")); +var _identity = _interopRequireDefault(require("./identity.js")); +var _linear = _interopRequireDefault(require("./linear.js")); +var _log = _interopRequireDefault(require("./log.js")); +var _symlog = _interopRequireDefault(require("./symlog.js")); +var _ordinal = _interopRequireWildcard(require("./ordinal.js")); +var _pow = _interopRequireWildcard(require("./pow.js")); +var _radial = _interopRequireDefault(require("./radial.js")); +var _quantile = _interopRequireDefault(require("./quantile.js")); +var _quantize = _interopRequireDefault(require("./quantize.js")); +var _threshold = _interopRequireDefault(require("./threshold.js")); +var _time = _interopRequireDefault(require("./time.js")); +var _utcTime = _interopRequireDefault(require("./utcTime.js")); +var _sequential = _interopRequireWildcard(require("./sequential.js")); +var _sequentialQuantile = _interopRequireDefault(require("./sequentialQuantile.js")); +var _diverging = _interopRequireWildcard(require("./diverging.js")); +var _tickFormat = _interopRequireDefault(require("./tickFormat.js")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/init.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/init.js new file mode 100644 index 000000000000..41012afe9d6f --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/init.js @@ -0,0 +1,38 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.initInterpolator = initInterpolator; +exports.initRange = initRange; +function initRange(domain, range) { + switch (arguments.length) { + case 0: + break; + case 1: + this.range(domain); + break; + default: + this.range(range).domain(domain); + break; + } + return this; +} +function initInterpolator(domain, interpolator) { + switch (arguments.length) { + case 0: + break; + case 1: + { + if (typeof domain === "function") this.interpolator(domain);else this.range(domain); + break; + } + default: + { + this.domain(domain); + if (typeof interpolator === "function") this.interpolator(interpolator);else this.range(interpolator); + break; + } + } + return this; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/linear.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/linear.js new file mode 100644 index 000000000000..316b966fb516 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/linear.js @@ -0,0 +1,67 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = linear; +exports.linearish = linearish; +var _index = require("../../../lib-vendor/d3-array/src/index.js"); +var _continuous = _interopRequireWildcard(require("./continuous.js")); +var _init = require("./init.js"); +var _tickFormat = _interopRequireDefault(require("./tickFormat.js")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +function linearish(scale) { + var domain = scale.domain; + scale.ticks = function (count) { + var d = domain(); + return (0, _index.ticks)(d[0], d[d.length - 1], count == null ? 10 : count); + }; + scale.tickFormat = function (count, specifier) { + var d = domain(); + return (0, _tickFormat.default)(d[0], d[d.length - 1], count == null ? 10 : count, specifier); + }; + scale.nice = function (count) { + if (count == null) count = 10; + var d = domain(); + var i0 = 0; + var i1 = d.length - 1; + var start = d[i0]; + var stop = d[i1]; + var prestep; + var step; + var maxIter = 10; + if (stop < start) { + step = start, start = stop, stop = step; + step = i0, i0 = i1, i1 = step; + } + while (maxIter-- > 0) { + step = (0, _index.tickIncrement)(start, stop, count); + if (step === prestep) { + d[i0] = start; + d[i1] = stop; + return domain(d); + } else if (step > 0) { + start = Math.floor(start / step) * step; + stop = Math.ceil(stop / step) * step; + } else if (step < 0) { + start = Math.ceil(start * step) / step; + stop = Math.floor(stop * step) / step; + } else { + break; + } + prestep = step; + } + return scale; + }; + return scale; +} +function linear() { + var scale = (0, _continuous.default)(); + scale.copy = function () { + return (0, _continuous.copy)(scale, linear()); + }; + _init.initRange.apply(scale, arguments); + return linearish(scale); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/log.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/log.js new file mode 100644 index 000000000000..6c080c5f7ef8 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/log.js @@ -0,0 +1,123 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = log; +exports.loggish = loggish; +var _index = require("../../../lib-vendor/d3-array/src/index.js"); +var _index2 = require("../../../lib-vendor/d3-format/src/index.js"); +var _nice = _interopRequireDefault(require("./nice.js")); +var _continuous = require("./continuous.js"); +var _init = require("./init.js"); +function transformLog(x) { + return Math.log(x); +} +function transformExp(x) { + return Math.exp(x); +} +function transformLogn(x) { + return -Math.log(-x); +} +function transformExpn(x) { + return -Math.exp(-x); +} +function pow10(x) { + return isFinite(x) ? +("1e" + x) : x < 0 ? 0 : x; +} +function powp(base) { + return base === 10 ? pow10 : base === Math.E ? Math.exp : x => Math.pow(base, x); +} +function logp(base) { + return base === Math.E ? Math.log : base === 10 && Math.log10 || base === 2 && Math.log2 || (base = Math.log(base), x => Math.log(x) / base); +} +function reflect(f) { + return (x, k) => -f(-x, k); +} +function loggish(transform) { + const scale = transform(transformLog, transformExp); + const domain = scale.domain; + let base = 10; + let logs; + let pows; + function rescale() { + logs = logp(base), pows = powp(base); + if (domain()[0] < 0) { + logs = reflect(logs), pows = reflect(pows); + transform(transformLogn, transformExpn); + } else { + transform(transformLog, transformExp); + } + return scale; + } + scale.base = function (_) { + return arguments.length ? (base = +_, rescale()) : base; + }; + scale.domain = function (_) { + return arguments.length ? (domain(_), rescale()) : domain(); + }; + scale.ticks = count => { + const d = domain(); + let u = d[0]; + let v = d[d.length - 1]; + const r = v < u; + if (r) [u, v] = [v, u]; + let i = logs(u); + let j = logs(v); + let k; + let t; + const n = count == null ? 10 : +count; + let z = []; + if (!(base % 1) && j - i < n) { + i = Math.floor(i), j = Math.ceil(j); + if (u > 0) for (; i <= j; ++i) { + for (k = 1; k < base; ++k) { + t = i < 0 ? k / pows(-i) : k * pows(i); + if (t < u) continue; + if (t > v) break; + z.push(t); + } + } else for (; i <= j; ++i) { + for (k = base - 1; k >= 1; --k) { + t = i > 0 ? k / pows(-i) : k * pows(i); + if (t < u) continue; + if (t > v) break; + z.push(t); + } + } + if (z.length * 2 < n) z = (0, _index.ticks)(u, v, n); + } else { + z = (0, _index.ticks)(i, j, Math.min(j - i, n)).map(pows); + } + return r ? z.reverse() : z; + }; + scale.tickFormat = (count, specifier) => { + if (count == null) count = 10; + if (specifier == null) specifier = base === 10 ? "s" : ","; + if (typeof specifier !== "function") { + if (!(base % 1) && (specifier = (0, _index2.formatSpecifier)(specifier)).precision == null) specifier.trim = true; + specifier = (0, _index2.format)(specifier); + } + if (count === Infinity) return specifier; + const k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate? + return d => { + let i = d / pows(Math.round(logs(d))); + if (i * base < base - 0.5) i *= base; + return i <= k ? specifier(d) : ""; + }; + }; + scale.nice = () => { + return domain((0, _nice.default)(domain(), { + floor: x => pows(Math.floor(logs(x))), + ceil: x => pows(Math.ceil(logs(x))) + })); + }; + return scale; +} +function log() { + const scale = loggish((0, _continuous.transformer)()).domain([1, 10]); + scale.copy = () => (0, _continuous.copy)(scale, log()).base(scale.base()); + _init.initRange.apply(scale, arguments); + return scale; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/nice.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/nice.js new file mode 100644 index 000000000000..78a4661a9c6e --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/nice.js @@ -0,0 +1,21 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = nice; +function nice(domain, interval) { + domain = domain.slice(); + var i0 = 0, + i1 = domain.length - 1, + x0 = domain[i0], + x1 = domain[i1], + t; + if (x1 < x0) { + t = i0, i0 = i1, i1 = t; + t = x0, x0 = x1, x1 = t; + } + domain[i0] = interval.floor(x0); + domain[i1] = interval.ceil(x1); + return domain; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/number.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/number.js new file mode 100644 index 000000000000..2c3bd953e06a --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/number.js @@ -0,0 +1,9 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = number; +function number(x) { + return +x; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/ordinal.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/ordinal.js new file mode 100644 index 000000000000..3fe158c35113 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/ordinal.js @@ -0,0 +1,44 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = ordinal; +exports.implicit = void 0; +var _index = require("../../../lib-vendor/d3-array/src/index.js"); +var _init = require("./init.js"); +const implicit = exports.implicit = Symbol("implicit"); +function ordinal() { + var index = new _index.InternMap(), + domain = [], + range = [], + unknown = implicit; + function scale(d) { + let i = index.get(d); + if (i === undefined) { + if (unknown !== implicit) return unknown; + index.set(d, i = domain.push(d) - 1); + } + return range[i % range.length]; + } + scale.domain = function (_) { + if (!arguments.length) return domain.slice(); + domain = [], index = new _index.InternMap(); + for (const value of _) { + if (index.has(value)) continue; + index.set(value, domain.push(value) - 1); + } + return scale; + }; + scale.range = function (_) { + return arguments.length ? (range = Array.from(_), scale) : range.slice(); + }; + scale.unknown = function (_) { + return arguments.length ? (unknown = _, scale) : unknown; + }; + scale.copy = function () { + return ordinal(domain, range).unknown(unknown); + }; + _init.initRange.apply(scale, arguments); + return scale; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/pow.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/pow.js new file mode 100644 index 000000000000..915720727f81 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/pow.js @@ -0,0 +1,44 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = pow; +exports.powish = powish; +exports.sqrt = sqrt; +var _linear = require("./linear.js"); +var _continuous = require("./continuous.js"); +var _init = require("./init.js"); +function transformPow(exponent) { + return function (x) { + return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent); + }; +} +function transformSqrt(x) { + return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x); +} +function transformSquare(x) { + return x < 0 ? -x * x : x * x; +} +function powish(transform) { + var scale = transform(_continuous.identity, _continuous.identity), + exponent = 1; + function rescale() { + return exponent === 1 ? transform(_continuous.identity, _continuous.identity) : exponent === 0.5 ? transform(transformSqrt, transformSquare) : transform(transformPow(exponent), transformPow(1 / exponent)); + } + scale.exponent = function (_) { + return arguments.length ? (exponent = +_, rescale()) : exponent; + }; + return (0, _linear.linearish)(scale); +} +function pow() { + var scale = powish((0, _continuous.transformer)()); + scale.copy = function () { + return (0, _continuous.copy)(scale, pow()).exponent(scale.exponent()); + }; + _init.initRange.apply(scale, arguments); + return scale; +} +function sqrt() { + return pow.apply(null, arguments).exponent(0.5); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/quantile.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/quantile.js new file mode 100644 index 000000000000..96fdf7493d7c --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/quantile.js @@ -0,0 +1,48 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = quantile; +var _index = require("../../../lib-vendor/d3-array/src/index.js"); +var _init = require("./init.js"); +function quantile() { + var domain = [], + range = [], + thresholds = [], + unknown; + function rescale() { + var i = 0, + n = Math.max(1, range.length); + thresholds = new Array(n - 1); + while (++i < n) thresholds[i - 1] = (0, _index.quantileSorted)(domain, i / n); + return scale; + } + function scale(x) { + return x == null || isNaN(x = +x) ? unknown : range[(0, _index.bisect)(thresholds, x)]; + } + scale.invertExtent = function (y) { + var i = range.indexOf(y); + return i < 0 ? [NaN, NaN] : [i > 0 ? thresholds[i - 1] : domain[0], i < thresholds.length ? thresholds[i] : domain[domain.length - 1]]; + }; + scale.domain = function (_) { + if (!arguments.length) return domain.slice(); + domain = []; + for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d); + domain.sort(_index.ascending); + return rescale(); + }; + scale.range = function (_) { + return arguments.length ? (range = Array.from(_), rescale()) : range.slice(); + }; + scale.unknown = function (_) { + return arguments.length ? (unknown = _, scale) : unknown; + }; + scale.quantiles = function () { + return thresholds.slice(); + }; + scale.copy = function () { + return quantile().domain(domain).range(range).unknown(unknown); + }; + return _init.initRange.apply(scale, arguments); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/quantize.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/quantize.js new file mode 100644 index 000000000000..756e0fc76501 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/quantize.js @@ -0,0 +1,46 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = quantize; +var _index = require("../../../lib-vendor/d3-array/src/index.js"); +var _linear = require("./linear.js"); +var _init = require("./init.js"); +function quantize() { + var x0 = 0, + x1 = 1, + n = 1, + domain = [0.5], + range = [0, 1], + unknown; + function scale(x) { + return x != null && x <= x ? range[(0, _index.bisect)(domain, x, 0, n)] : unknown; + } + function rescale() { + var i = -1; + domain = new Array(n); + while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1); + return scale; + } + scale.domain = function (_) { + return arguments.length ? ([x0, x1] = _, x0 = +x0, x1 = +x1, rescale()) : [x0, x1]; + }; + scale.range = function (_) { + return arguments.length ? (n = (range = Array.from(_)).length - 1, rescale()) : range.slice(); + }; + scale.invertExtent = function (y) { + var i = range.indexOf(y); + return i < 0 ? [NaN, NaN] : i < 1 ? [x0, domain[0]] : i >= n ? [domain[n - 1], x1] : [domain[i - 1], domain[i]]; + }; + scale.unknown = function (_) { + return arguments.length ? (unknown = _, scale) : scale; + }; + scale.thresholds = function () { + return domain.slice(); + }; + scale.copy = function () { + return quantize().domain([x0, x1]).range(range).unknown(unknown); + }; + return _init.initRange.apply((0, _linear.linearish)(scale), arguments); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/radial.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/radial.js new file mode 100644 index 000000000000..26dea874dd9a --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/radial.js @@ -0,0 +1,53 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = radial; +var _continuous = _interopRequireDefault(require("./continuous.js")); +var _init = require("./init.js"); +var _linear = require("./linear.js"); +var _number = _interopRequireDefault(require("./number.js")); +function square(x) { + return Math.sign(x) * x * x; +} +function unsquare(x) { + return Math.sign(x) * Math.sqrt(Math.abs(x)); +} +function radial() { + var squared = (0, _continuous.default)(), + range = [0, 1], + round = false, + unknown; + function scale(x) { + var y = unsquare(squared(x)); + return isNaN(y) ? unknown : round ? Math.round(y) : y; + } + scale.invert = function (y) { + return squared.invert(square(y)); + }; + scale.domain = function (_) { + return arguments.length ? (squared.domain(_), scale) : squared.domain(); + }; + scale.range = function (_) { + return arguments.length ? (squared.range((range = Array.from(_, _number.default)).map(square)), scale) : range.slice(); + }; + scale.rangeRound = function (_) { + return scale.range(_).round(true); + }; + scale.round = function (_) { + return arguments.length ? (round = !!_, scale) : round; + }; + scale.clamp = function (_) { + return arguments.length ? (squared.clamp(_), scale) : squared.clamp(); + }; + scale.unknown = function (_) { + return arguments.length ? (unknown = _, scale) : unknown; + }; + scale.copy = function () { + return radial(squared.domain(), range).round(round).clamp(squared.clamp()).unknown(unknown); + }; + _init.initRange.apply(scale, arguments); + return (0, _linear.linearish)(scale); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/sequential.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/sequential.js new file mode 100644 index 000000000000..a3aafa213657 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/sequential.js @@ -0,0 +1,90 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.copy = copy; +exports.default = sequential; +exports.sequentialLog = sequentialLog; +exports.sequentialPow = sequentialPow; +exports.sequentialSqrt = sequentialSqrt; +exports.sequentialSymlog = sequentialSymlog; +var _index = require("../../../lib-vendor/d3-interpolate/src/index.js"); +var _continuous = require("./continuous.js"); +var _init = require("./init.js"); +var _linear = require("./linear.js"); +var _log = require("./log.js"); +var _symlog = require("./symlog.js"); +var _pow = require("./pow.js"); +function transformer() { + var x0 = 0, + x1 = 1, + t0, + t1, + k10, + transform, + interpolator = _continuous.identity, + clamp = false, + unknown; + function scale(x) { + return x == null || isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x)); + } + scale.domain = function (_) { + return arguments.length ? ([x0, x1] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1]; + }; + scale.clamp = function (_) { + return arguments.length ? (clamp = !!_, scale) : clamp; + }; + scale.interpolator = function (_) { + return arguments.length ? (interpolator = _, scale) : interpolator; + }; + function range(interpolate) { + return function (_) { + var r0, r1; + return arguments.length ? ([r0, r1] = _, interpolator = interpolate(r0, r1), scale) : [interpolator(0), interpolator(1)]; + }; + } + scale.range = range(_index.interpolate); + scale.rangeRound = range(_index.interpolateRound); + scale.unknown = function (_) { + return arguments.length ? (unknown = _, scale) : unknown; + }; + return function (t) { + transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0); + return scale; + }; +} +function copy(source, target) { + return target.domain(source.domain()).interpolator(source.interpolator()).clamp(source.clamp()).unknown(source.unknown()); +} +function sequential() { + var scale = (0, _linear.linearish)(transformer()(_continuous.identity)); + scale.copy = function () { + return copy(scale, sequential()); + }; + return _init.initInterpolator.apply(scale, arguments); +} +function sequentialLog() { + var scale = (0, _log.loggish)(transformer()).domain([1, 10]); + scale.copy = function () { + return copy(scale, sequentialLog()).base(scale.base()); + }; + return _init.initInterpolator.apply(scale, arguments); +} +function sequentialSymlog() { + var scale = (0, _symlog.symlogish)(transformer()); + scale.copy = function () { + return copy(scale, sequentialSymlog()).constant(scale.constant()); + }; + return _init.initInterpolator.apply(scale, arguments); +} +function sequentialPow() { + var scale = (0, _pow.powish)(transformer()); + scale.copy = function () { + return copy(scale, sequentialPow()).exponent(scale.exponent()); + }; + return _init.initInterpolator.apply(scale, arguments); +} +function sequentialSqrt() { + return sequentialPow.apply(null, arguments).exponent(0.5); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/sequentialQuantile.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/sequentialQuantile.js new file mode 100644 index 000000000000..dc90b3eb9585 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/sequentialQuantile.js @@ -0,0 +1,38 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = sequentialQuantile; +var _index = require("../../../lib-vendor/d3-array/src/index.js"); +var _continuous = require("./continuous.js"); +var _init = require("./init.js"); +function sequentialQuantile() { + var domain = [], + interpolator = _continuous.identity; + function scale(x) { + if (x != null && !isNaN(x = +x)) return interpolator(((0, _index.bisect)(domain, x, 1) - 1) / (domain.length - 1)); + } + scale.domain = function (_) { + if (!arguments.length) return domain.slice(); + domain = []; + for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d); + domain.sort(_index.ascending); + return scale; + }; + scale.interpolator = function (_) { + return arguments.length ? (interpolator = _, scale) : interpolator; + }; + scale.range = function () { + return domain.map((d, i) => interpolator(i / (domain.length - 1))); + }; + scale.quantiles = function (n) { + return Array.from({ + length: n + 1 + }, (_, i) => (0, _index.quantile)(domain, i / n)); + }; + scale.copy = function () { + return sequentialQuantile(interpolator).domain(domain); + }; + return _init.initInterpolator.apply(scale, arguments); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/symlog.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/symlog.js new file mode 100644 index 000000000000..cb86a6e674dd --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/symlog.js @@ -0,0 +1,35 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = symlog; +exports.symlogish = symlogish; +var _linear = require("./linear.js"); +var _continuous = require("./continuous.js"); +var _init = require("./init.js"); +function transformSymlog(c) { + return function (x) { + return Math.sign(x) * Math.log1p(Math.abs(x / c)); + }; +} +function transformSymexp(c) { + return function (x) { + return Math.sign(x) * Math.expm1(Math.abs(x)) * c; + }; +} +function symlogish(transform) { + var c = 1, + scale = transform(transformSymlog(c), transformSymexp(c)); + scale.constant = function (_) { + return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c; + }; + return (0, _linear.linearish)(scale); +} +function symlog() { + var scale = symlogish((0, _continuous.transformer)()); + scale.copy = function () { + return (0, _continuous.copy)(scale, symlog()).constant(scale.constant()); + }; + return _init.initRange.apply(scale, arguments); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/threshold.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/threshold.js new file mode 100644 index 000000000000..fbfcc9d84a6a --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/threshold.js @@ -0,0 +1,34 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = threshold; +var _index = require("../../../lib-vendor/d3-array/src/index.js"); +var _init = require("./init.js"); +function threshold() { + var domain = [0.5], + range = [0, 1], + unknown, + n = 1; + function scale(x) { + return x != null && x <= x ? range[(0, _index.bisect)(domain, x, 0, n)] : unknown; + } + scale.domain = function (_) { + return arguments.length ? (domain = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice(); + }; + scale.range = function (_) { + return arguments.length ? (range = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice(); + }; + scale.invertExtent = function (y) { + var i = range.indexOf(y); + return [domain[i - 1], domain[i]]; + }; + scale.unknown = function (_) { + return arguments.length ? (unknown = _, scale) : unknown; + }; + scale.copy = function () { + return threshold().domain(domain).range(range).unknown(unknown); + }; + return _init.initRange.apply(scale, arguments); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/tickFormat.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/tickFormat.js new file mode 100644 index 000000000000..dd0e2d4aa67a --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/tickFormat.js @@ -0,0 +1,37 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = tickFormat; +var _index = require("../../../lib-vendor/d3-array/src/index.js"); +var _index2 = require("../../../lib-vendor/d3-format/src/index.js"); +function tickFormat(start, stop, count, specifier) { + var step = (0, _index.tickStep)(start, stop, count), + precision; + specifier = (0, _index2.formatSpecifier)(specifier == null ? ",f" : specifier); + switch (specifier.type) { + case "s": + { + var value = Math.max(Math.abs(start), Math.abs(stop)); + if (specifier.precision == null && !isNaN(precision = (0, _index2.precisionPrefix)(step, value))) specifier.precision = precision; + return (0, _index2.formatPrefix)(specifier, value); + } + case "": + case "e": + case "g": + case "p": + case "r": + { + if (specifier.precision == null && !isNaN(precision = (0, _index2.precisionRound)(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e"); + break; + } + case "f": + case "%": + { + if (specifier.precision == null && !isNaN(precision = (0, _index2.precisionFixed)(step))) specifier.precision = precision - (specifier.type === "%") * 2; + break; + } + } + return (0, _index2.format)(specifier); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/time.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/time.js new file mode 100644 index 000000000000..bb815160efb6 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/time.js @@ -0,0 +1,62 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.calendar = calendar; +exports.default = time; +var _index = require("../../../lib-vendor/d3-time/src/index.js"); +var _index2 = require("../../../lib-vendor/d3-time-format/src/index.js"); +var _continuous = _interopRequireWildcard(require("./continuous.js")); +var _init = require("./init.js"); +var _nice = _interopRequireDefault(require("./nice.js")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +function date(t) { + return new Date(t); +} +function number(t) { + return t instanceof Date ? +t : +new Date(+t); +} +function calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format) { + var scale = (0, _continuous.default)(), + invert = scale.invert, + domain = scale.domain; + var formatMillisecond = format(".%L"), + formatSecond = format(":%S"), + formatMinute = format("%I:%M"), + formatHour = format("%I %p"), + formatDay = format("%a %d"), + formatWeek = format("%b %d"), + formatMonth = format("%B"), + formatYear = format("%Y"); + function tickFormat(date) { + return (second(date) < date ? formatMillisecond : minute(date) < date ? formatSecond : hour(date) < date ? formatMinute : day(date) < date ? formatHour : month(date) < date ? week(date) < date ? formatDay : formatWeek : year(date) < date ? formatMonth : formatYear)(date); + } + scale.invert = function (y) { + return new Date(invert(y)); + }; + scale.domain = function (_) { + return arguments.length ? domain(Array.from(_, number)) : domain().map(date); + }; + scale.ticks = function (interval) { + var d = domain(); + return ticks(d[0], d[d.length - 1], interval == null ? 10 : interval); + }; + scale.tickFormat = function (count, specifier) { + return specifier == null ? tickFormat : format(specifier); + }; + scale.nice = function (interval) { + var d = domain(); + if (!interval || typeof interval.range !== "function") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval); + return interval ? domain((0, _nice.default)(d, interval)) : scale; + }; + scale.copy = function () { + return (0, _continuous.copy)(scale, calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format)); + }; + return scale; +} +function time() { + return _init.initRange.apply(calendar(_index.timeTicks, _index.timeTickInterval, _index.timeYear, _index.timeMonth, _index.timeWeek, _index.timeDay, _index.timeHour, _index.timeMinute, _index.timeSecond, _index2.timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-scale/src/utcTime.js b/packages/x-charts-vendor/lib-vendor/d3-scale/src/utcTime.js new file mode 100644 index 000000000000..0e27375b6f0b --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-scale/src/utcTime.js @@ -0,0 +1,13 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = utcTime; +var _index = require("../../../lib-vendor/d3-time/src/index.js"); +var _index2 = require("../../../lib-vendor/d3-time-format/src/index.js"); +var _time = require("./time.js"); +var _init = require("./init.js"); +function utcTime() { + return _init.initRange.apply((0, _time.calendar)(_index.utcTicks, _index.utcTickInterval, _index.utcYear, _index.utcMonth, _index.utcWeek, _index.utcDay, _index.utcHour, _index.utcMinute, _index.utcSecond, _index2.utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/LICENSE b/packages/x-charts-vendor/lib-vendor/d3-shape/LICENSE new file mode 100644 index 000000000000..fbe44bdc9ad5 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/LICENSE @@ -0,0 +1,13 @@ +Copyright 2010-2022 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/arc.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/arc.js new file mode 100644 index 000000000000..dc44ccff79b8 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/arc.js @@ -0,0 +1,250 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _constant = _interopRequireDefault(require("./constant.js")); +var _math = require("./math.js"); +var _path = require("./path.js"); +function arcInnerRadius(d) { + return d.innerRadius; +} +function arcOuterRadius(d) { + return d.outerRadius; +} +function arcStartAngle(d) { + return d.startAngle; +} +function arcEndAngle(d) { + return d.endAngle; +} +function arcPadAngle(d) { + return d && d.padAngle; // Note: optional! +} +function intersect(x0, y0, x1, y1, x2, y2, x3, y3) { + var x10 = x1 - x0, + y10 = y1 - y0, + x32 = x3 - x2, + y32 = y3 - y2, + t = y32 * x10 - x32 * y10; + if (t * t < _math.epsilon) return; + t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t; + return [x0 + t * x10, y0 + t * y10]; +} + +// Compute perpendicular offset line of length rc. +// http://mathworld.wolfram.com/Circle-LineIntersection.html +function cornerTangents(x0, y0, x1, y1, r1, rc, cw) { + var x01 = x0 - x1, + y01 = y0 - y1, + lo = (cw ? rc : -rc) / (0, _math.sqrt)(x01 * x01 + y01 * y01), + ox = lo * y01, + oy = -lo * x01, + x11 = x0 + ox, + y11 = y0 + oy, + x10 = x1 + ox, + y10 = y1 + oy, + x00 = (x11 + x10) / 2, + y00 = (y11 + y10) / 2, + dx = x10 - x11, + dy = y10 - y11, + d2 = dx * dx + dy * dy, + r = r1 - rc, + D = x11 * y10 - x10 * y11, + d = (dy < 0 ? -1 : 1) * (0, _math.sqrt)((0, _math.max)(0, r * r * d2 - D * D)), + cx0 = (D * dy - dx * d) / d2, + cy0 = (-D * dx - dy * d) / d2, + cx1 = (D * dy + dx * d) / d2, + cy1 = (-D * dx + dy * d) / d2, + dx0 = cx0 - x00, + dy0 = cy0 - y00, + dx1 = cx1 - x00, + dy1 = cy1 - y00; + + // Pick the closer of the two intersection points. + // TODO Is there a faster way to determine which intersection to use? + if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1; + return { + cx: cx0, + cy: cy0, + x01: -ox, + y01: -oy, + x11: cx0 * (r1 / r - 1), + y11: cy0 * (r1 / r - 1) + }; +} +function _default() { + var innerRadius = arcInnerRadius, + outerRadius = arcOuterRadius, + cornerRadius = (0, _constant.default)(0), + padRadius = null, + startAngle = arcStartAngle, + endAngle = arcEndAngle, + padAngle = arcPadAngle, + context = null, + path = (0, _path.withPath)(arc); + function arc() { + var buffer, + r, + r0 = +innerRadius.apply(this, arguments), + r1 = +outerRadius.apply(this, arguments), + a0 = startAngle.apply(this, arguments) - _math.halfPi, + a1 = endAngle.apply(this, arguments) - _math.halfPi, + da = (0, _math.abs)(a1 - a0), + cw = a1 > a0; + if (!context) context = buffer = path(); + + // Ensure that the outer radius is always larger than the inner radius. + if (r1 < r0) r = r1, r1 = r0, r0 = r; + + // Is it a point? + if (!(r1 > _math.epsilon)) context.moveTo(0, 0); + + // Or is it a circle or annulus? + else if (da > _math.tau - _math.epsilon) { + context.moveTo(r1 * (0, _math.cos)(a0), r1 * (0, _math.sin)(a0)); + context.arc(0, 0, r1, a0, a1, !cw); + if (r0 > _math.epsilon) { + context.moveTo(r0 * (0, _math.cos)(a1), r0 * (0, _math.sin)(a1)); + context.arc(0, 0, r0, a1, a0, cw); + } + } + + // Or is it a circular or annular sector? + else { + var a01 = a0, + a11 = a1, + a00 = a0, + a10 = a1, + da0 = da, + da1 = da, + ap = padAngle.apply(this, arguments) / 2, + rp = ap > _math.epsilon && (padRadius ? +padRadius.apply(this, arguments) : (0, _math.sqrt)(r0 * r0 + r1 * r1)), + rc = (0, _math.min)((0, _math.abs)(r1 - r0) / 2, +cornerRadius.apply(this, arguments)), + rc0 = rc, + rc1 = rc, + t0, + t1; + + // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0. + if (rp > _math.epsilon) { + var p0 = (0, _math.asin)(rp / r0 * (0, _math.sin)(ap)), + p1 = (0, _math.asin)(rp / r1 * (0, _math.sin)(ap)); + if ((da0 -= p0 * 2) > _math.epsilon) p0 *= cw ? 1 : -1, a00 += p0, a10 -= p0;else da0 = 0, a00 = a10 = (a0 + a1) / 2; + if ((da1 -= p1 * 2) > _math.epsilon) p1 *= cw ? 1 : -1, a01 += p1, a11 -= p1;else da1 = 0, a01 = a11 = (a0 + a1) / 2; + } + var x01 = r1 * (0, _math.cos)(a01), + y01 = r1 * (0, _math.sin)(a01), + x10 = r0 * (0, _math.cos)(a10), + y10 = r0 * (0, _math.sin)(a10); + + // Apply rounded corners? + if (rc > _math.epsilon) { + var x11 = r1 * (0, _math.cos)(a11), + y11 = r1 * (0, _math.sin)(a11), + x00 = r0 * (0, _math.cos)(a00), + y00 = r0 * (0, _math.sin)(a00), + oc; + + // Restrict the corner radius according to the sector angle. If this + // intersection fails, it’s probably because the arc is too small, so + // disable the corner radius entirely. + if (da < _math.pi) { + if (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10)) { + var ax = x01 - oc[0], + ay = y01 - oc[1], + bx = x11 - oc[0], + by = y11 - oc[1], + kc = 1 / (0, _math.sin)((0, _math.acos)((ax * bx + ay * by) / ((0, _math.sqrt)(ax * ax + ay * ay) * (0, _math.sqrt)(bx * bx + by * by))) / 2), + lc = (0, _math.sqrt)(oc[0] * oc[0] + oc[1] * oc[1]); + rc0 = (0, _math.min)(rc, (r0 - lc) / (kc - 1)); + rc1 = (0, _math.min)(rc, (r1 - lc) / (kc + 1)); + } else { + rc0 = rc1 = 0; + } + } + } + + // Is the sector collapsed to a line? + if (!(da1 > _math.epsilon)) context.moveTo(x01, y01); + + // Does the sector’s outer ring have rounded corners? + else if (rc1 > _math.epsilon) { + t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw); + t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw); + context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01); + + // Have the corners merged? + if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, (0, _math.atan2)(t0.y01, t0.x01), (0, _math.atan2)(t1.y01, t1.x01), !cw); + + // Otherwise, draw the two corners and the ring. + else { + context.arc(t0.cx, t0.cy, rc1, (0, _math.atan2)(t0.y01, t0.x01), (0, _math.atan2)(t0.y11, t0.x11), !cw); + context.arc(0, 0, r1, (0, _math.atan2)(t0.cy + t0.y11, t0.cx + t0.x11), (0, _math.atan2)(t1.cy + t1.y11, t1.cx + t1.x11), !cw); + context.arc(t1.cx, t1.cy, rc1, (0, _math.atan2)(t1.y11, t1.x11), (0, _math.atan2)(t1.y01, t1.x01), !cw); + } + } + + // Or is the outer ring just a circular arc? + else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw); + + // Is there no inner ring, and it’s a circular sector? + // Or perhaps it’s an annular sector collapsed due to padding? + if (!(r0 > _math.epsilon) || !(da0 > _math.epsilon)) context.lineTo(x10, y10); + + // Does the sector’s inner ring (or point) have rounded corners? + else if (rc0 > _math.epsilon) { + t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw); + t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw); + context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01); + + // Have the corners merged? + if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, (0, _math.atan2)(t0.y01, t0.x01), (0, _math.atan2)(t1.y01, t1.x01), !cw); + + // Otherwise, draw the two corners and the ring. + else { + context.arc(t0.cx, t0.cy, rc0, (0, _math.atan2)(t0.y01, t0.x01), (0, _math.atan2)(t0.y11, t0.x11), !cw); + context.arc(0, 0, r0, (0, _math.atan2)(t0.cy + t0.y11, t0.cx + t0.x11), (0, _math.atan2)(t1.cy + t1.y11, t1.cx + t1.x11), cw); + context.arc(t1.cx, t1.cy, rc0, (0, _math.atan2)(t1.y11, t1.x11), (0, _math.atan2)(t1.y01, t1.x01), !cw); + } + } + + // Or is the inner ring just a circular arc? + else context.arc(0, 0, r0, a10, a00, cw); + } + context.closePath(); + if (buffer) return context = null, buffer + "" || null; + } + arc.centroid = function () { + var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, + a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - _math.pi / 2; + return [(0, _math.cos)(a) * r, (0, _math.sin)(a) * r]; + }; + arc.innerRadius = function (_) { + return arguments.length ? (innerRadius = typeof _ === "function" ? _ : (0, _constant.default)(+_), arc) : innerRadius; + }; + arc.outerRadius = function (_) { + return arguments.length ? (outerRadius = typeof _ === "function" ? _ : (0, _constant.default)(+_), arc) : outerRadius; + }; + arc.cornerRadius = function (_) { + return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : (0, _constant.default)(+_), arc) : cornerRadius; + }; + arc.padRadius = function (_) { + return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : (0, _constant.default)(+_), arc) : padRadius; + }; + arc.startAngle = function (_) { + return arguments.length ? (startAngle = typeof _ === "function" ? _ : (0, _constant.default)(+_), arc) : startAngle; + }; + arc.endAngle = function (_) { + return arguments.length ? (endAngle = typeof _ === "function" ? _ : (0, _constant.default)(+_), arc) : endAngle; + }; + arc.padAngle = function (_) { + return arguments.length ? (padAngle = typeof _ === "function" ? _ : (0, _constant.default)(+_), arc) : padAngle; + }; + arc.context = function (_) { + return arguments.length ? (context = _ == null ? null : _, arc) : context; + }; + return arc; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/area.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/area.js new file mode 100644 index 000000000000..680bf4ca95f4 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/area.js @@ -0,0 +1,98 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _array = _interopRequireDefault(require("./array.js")); +var _constant = _interopRequireDefault(require("./constant.js")); +var _linear = _interopRequireDefault(require("./curve/linear.js")); +var _line = _interopRequireDefault(require("./line.js")); +var _path = require("./path.js"); +var _point = require("./point.js"); +function _default(x0, y0, y1) { + var x1 = null, + defined = (0, _constant.default)(true), + context = null, + curve = _linear.default, + output = null, + path = (0, _path.withPath)(area); + x0 = typeof x0 === "function" ? x0 : x0 === undefined ? _point.x : (0, _constant.default)(+x0); + y0 = typeof y0 === "function" ? y0 : y0 === undefined ? (0, _constant.default)(0) : (0, _constant.default)(+y0); + y1 = typeof y1 === "function" ? y1 : y1 === undefined ? _point.y : (0, _constant.default)(+y1); + function area(data) { + var i, + j, + k, + n = (data = (0, _array.default)(data)).length, + d, + defined0 = false, + buffer, + x0z = new Array(n), + y0z = new Array(n); + if (context == null) output = curve(buffer = path()); + for (i = 0; i <= n; ++i) { + if (!(i < n && defined(d = data[i], i, data)) === defined0) { + if (defined0 = !defined0) { + j = i; + output.areaStart(); + output.lineStart(); + } else { + output.lineEnd(); + output.lineStart(); + for (k = i - 1; k >= j; --k) { + output.point(x0z[k], y0z[k]); + } + output.lineEnd(); + output.areaEnd(); + } + } + if (defined0) { + x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data); + output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]); + } + } + if (buffer) return output = null, buffer + "" || null; + } + function arealine() { + return (0, _line.default)().defined(defined).curve(curve).context(context); + } + area.x = function (_) { + return arguments.length ? (x0 = typeof _ === "function" ? _ : (0, _constant.default)(+_), x1 = null, area) : x0; + }; + area.x0 = function (_) { + return arguments.length ? (x0 = typeof _ === "function" ? _ : (0, _constant.default)(+_), area) : x0; + }; + area.x1 = function (_) { + return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : (0, _constant.default)(+_), area) : x1; + }; + area.y = function (_) { + return arguments.length ? (y0 = typeof _ === "function" ? _ : (0, _constant.default)(+_), y1 = null, area) : y0; + }; + area.y0 = function (_) { + return arguments.length ? (y0 = typeof _ === "function" ? _ : (0, _constant.default)(+_), area) : y0; + }; + area.y1 = function (_) { + return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : (0, _constant.default)(+_), area) : y1; + }; + area.lineX0 = area.lineY0 = function () { + return arealine().x(x0).y(y0); + }; + area.lineY1 = function () { + return arealine().x(x0).y(y1); + }; + area.lineX1 = function () { + return arealine().x(x1).y(y0); + }; + area.defined = function (_) { + return arguments.length ? (defined = typeof _ === "function" ? _ : (0, _constant.default)(!!_), area) : defined; + }; + area.curve = function (_) { + return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve; + }; + area.context = function (_) { + return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context; + }; + return area; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/areaRadial.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/areaRadial.js new file mode 100644 index 000000000000..4d4aa5478cd1 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/areaRadial.js @@ -0,0 +1,42 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _radial = _interopRequireWildcard(require("./curve/radial.js")); +var _area = _interopRequireDefault(require("./area.js")); +var _lineRadial = require("./lineRadial.js"); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +function _default() { + var a = (0, _area.default)().curve(_radial.curveRadialLinear), + c = a.curve, + x0 = a.lineX0, + x1 = a.lineX1, + y0 = a.lineY0, + y1 = a.lineY1; + a.angle = a.x, delete a.x; + a.startAngle = a.x0, delete a.x0; + a.endAngle = a.x1, delete a.x1; + a.radius = a.y, delete a.y; + a.innerRadius = a.y0, delete a.y0; + a.outerRadius = a.y1, delete a.y1; + a.lineStartAngle = function () { + return (0, _lineRadial.lineRadial)(x0()); + }, delete a.lineX0; + a.lineEndAngle = function () { + return (0, _lineRadial.lineRadial)(x1()); + }, delete a.lineX1; + a.lineInnerRadius = function () { + return (0, _lineRadial.lineRadial)(y0()); + }, delete a.lineY0; + a.lineOuterRadius = function () { + return (0, _lineRadial.lineRadial)(y1()); + }, delete a.lineY1; + a.curve = function (_) { + return arguments.length ? c((0, _radial.default)(_)) : c()._curve; + }; + return a; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/array.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/array.js new file mode 100644 index 000000000000..3bb14182db40 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/array.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +exports.slice = void 0; +var slice = exports.slice = Array.prototype.slice; +function _default(x) { + return typeof x === "object" && "length" in x ? x // Array, TypedArray, NodeList, array-like + : Array.from(x); // Map, Set, iterable, string, or anything else +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/constant.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/constant.js new file mode 100644 index 000000000000..370b71f1b2a6 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/constant.js @@ -0,0 +1,11 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +function _default(x) { + return function constant() { + return x; + }; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/basis.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/basis.js new file mode 100644 index 000000000000..b25463d97d2d --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/basis.js @@ -0,0 +1,62 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Basis = Basis; +exports.default = _default; +exports.point = point; +function point(that, x, y) { + that._context.bezierCurveTo((2 * that._x0 + that._x1) / 3, (2 * that._y0 + that._y1) / 3, (that._x0 + 2 * that._x1) / 3, (that._y0 + 2 * that._y1) / 3, (that._x0 + 4 * that._x1 + x) / 6, (that._y0 + 4 * that._y1 + y) / 6); +} +function Basis(context) { + this._context = context; +} +Basis.prototype = { + areaStart: function () { + this._line = 0; + }, + areaEnd: function () { + this._line = NaN; + }, + lineStart: function () { + this._x0 = this._x1 = this._y0 = this._y1 = NaN; + this._point = 0; + }, + lineEnd: function () { + switch (this._point) { + case 3: + point(this, this._x1, this._y1); + // falls through + case 2: + this._context.lineTo(this._x1, this._y1); + break; + } + if (this._line || this._line !== 0 && this._point === 1) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function (x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: + this._point = 1; + this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3; + this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); + // falls through + default: + point(this, x, y); + break; + } + this._x0 = this._x1, this._x1 = x; + this._y0 = this._y1, this._y1 = y; + } +}; +function _default(context) { + return new Basis(context); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/basisClosed.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/basisClosed.js new file mode 100644 index 000000000000..7b2bcb3f0ba2 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/basisClosed.js @@ -0,0 +1,70 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _noop = _interopRequireDefault(require("../noop.js")); +var _basis = require("./basis.js"); +function BasisClosed(context) { + this._context = context; +} +BasisClosed.prototype = { + areaStart: _noop.default, + areaEnd: _noop.default, + lineStart: function () { + this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN; + this._point = 0; + }, + lineEnd: function () { + switch (this._point) { + case 1: + { + this._context.moveTo(this._x2, this._y2); + this._context.closePath(); + break; + } + case 2: + { + this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3); + this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3); + this._context.closePath(); + break; + } + case 3: + { + this.point(this._x2, this._y2); + this.point(this._x3, this._y3); + this.point(this._x4, this._y4); + break; + } + } + }, + point: function (x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: + this._point = 1; + this._x2 = x, this._y2 = y; + break; + case 1: + this._point = 2; + this._x3 = x, this._y3 = y; + break; + case 2: + this._point = 3; + this._x4 = x, this._y4 = y; + this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); + break; + default: + (0, _basis.point)(this, x, y); + break; + } + this._x0 = this._x1, this._x1 = x; + this._y0 = this._y1, this._y1 = y; + } +}; +function _default(context) { + return new BasisClosed(context); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/basisOpen.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/basisOpen.js new file mode 100644 index 000000000000..993a1fc114e8 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/basisOpen.js @@ -0,0 +1,54 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _basis = require("./basis.js"); +function BasisOpen(context) { + this._context = context; +} +BasisOpen.prototype = { + areaStart: function () { + this._line = 0; + }, + areaEnd: function () { + this._line = NaN; + }, + lineStart: function () { + this._x0 = this._x1 = this._y0 = this._y1 = NaN; + this._point = 0; + }, + lineEnd: function () { + if (this._line || this._line !== 0 && this._point === 3) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function (x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: + this._point = 1; + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3; + var x0 = (this._x0 + 4 * this._x1 + x) / 6, + y0 = (this._y0 + 4 * this._y1 + y) / 6; + this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); + break; + case 3: + this._point = 4; + // falls through + default: + (0, _basis.point)(this, x, y); + break; + } + this._x0 = this._x1, this._x1 = x; + this._y0 = this._y1, this._y1 = y; + } +}; +function _default(context) { + return new BasisOpen(context); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/bump.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/bump.js new file mode 100644 index 000000000000..d3a7b6061568 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/bump.js @@ -0,0 +1,81 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.bumpRadial = bumpRadial; +exports.bumpX = bumpX; +exports.bumpY = bumpY; +var _pointRadial = _interopRequireDefault(require("../pointRadial.js")); +class Bump { + constructor(context, x) { + this._context = context; + this._x = x; + } + areaStart() { + this._line = 0; + } + areaEnd() { + this._line = NaN; + } + lineStart() { + this._point = 0; + } + lineEnd() { + if (this._line || this._line !== 0 && this._point === 1) this._context.closePath(); + this._line = 1 - this._line; + } + point(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: + { + this._point = 1; + if (this._line) this._context.lineTo(x, y);else this._context.moveTo(x, y); + break; + } + case 1: + this._point = 2; + // falls through + default: + { + if (this._x) this._context.bezierCurveTo(this._x0 = (this._x0 + x) / 2, this._y0, this._x0, y, x, y);else this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + y) / 2, x, this._y0, x, y); + break; + } + } + this._x0 = x, this._y0 = y; + } +} +class BumpRadial { + constructor(context) { + this._context = context; + } + lineStart() { + this._point = 0; + } + lineEnd() {} + point(x, y) { + x = +x, y = +y; + if (this._point === 0) { + this._point = 1; + } else { + const p0 = (0, _pointRadial.default)(this._x0, this._y0); + const p1 = (0, _pointRadial.default)(this._x0, this._y0 = (this._y0 + y) / 2); + const p2 = (0, _pointRadial.default)(x, this._y0); + const p3 = (0, _pointRadial.default)(x, y); + this._context.moveTo(...p0); + this._context.bezierCurveTo(...p1, ...p2, ...p3); + } + this._x0 = x, this._y0 = y; + } +} +function bumpX(context) { + return new Bump(context, true); +} +function bumpY(context) { + return new Bump(context, false); +} +function bumpRadial(context) { + return new BumpRadial(context); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/bundle.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/bundle.js new file mode 100644 index 000000000000..913dc639d77f --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/bundle.js @@ -0,0 +1,50 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _basis = require("./basis.js"); +function Bundle(context, beta) { + this._basis = new _basis.Basis(context); + this._beta = beta; +} +Bundle.prototype = { + lineStart: function () { + this._x = []; + this._y = []; + this._basis.lineStart(); + }, + lineEnd: function () { + var x = this._x, + y = this._y, + j = x.length - 1; + if (j > 0) { + var x0 = x[0], + y0 = y[0], + dx = x[j] - x0, + dy = y[j] - y0, + i = -1, + t; + while (++i <= j) { + t = i / j; + this._basis.point(this._beta * x[i] + (1 - this._beta) * (x0 + t * dx), this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)); + } + } + this._x = this._y = null; + this._basis.lineEnd(); + }, + point: function (x, y) { + this._x.push(+x); + this._y.push(+y); + } +}; +var _default = exports.default = function custom(beta) { + function bundle(context) { + return beta === 1 ? new _basis.Basis(context) : new Bundle(context, beta); + } + bundle.beta = function (beta) { + return custom(+beta); + }; + return bundle; +}(0.85); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/cardinal.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/cardinal.js new file mode 100644 index 000000000000..408455b401c7 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/cardinal.js @@ -0,0 +1,69 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Cardinal = Cardinal; +exports.default = void 0; +exports.point = point; +function point(that, x, y) { + that._context.bezierCurveTo(that._x1 + that._k * (that._x2 - that._x0), that._y1 + that._k * (that._y2 - that._y0), that._x2 + that._k * (that._x1 - x), that._y2 + that._k * (that._y1 - y), that._x2, that._y2); +} +function Cardinal(context, tension) { + this._context = context; + this._k = (1 - tension) / 6; +} +Cardinal.prototype = { + areaStart: function () { + this._line = 0; + }, + areaEnd: function () { + this._line = NaN; + }, + lineStart: function () { + this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN; + this._point = 0; + }, + lineEnd: function () { + switch (this._point) { + case 2: + this._context.lineTo(this._x2, this._y2); + break; + case 3: + point(this, this._x1, this._y1); + break; + } + if (this._line || this._line !== 0 && this._point === 1) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function (x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: + this._point = 1; + this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); + break; + case 1: + this._point = 2; + this._x1 = x, this._y1 = y; + break; + case 2: + this._point = 3; + // falls through + default: + point(this, x, y); + break; + } + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; +var _default = exports.default = function custom(tension) { + function cardinal(context) { + return new Cardinal(context, tension); + } + cardinal.tension = function (tension) { + return custom(+tension); + }; + return cardinal; +}(0); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/cardinalClosed.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/cardinalClosed.js new file mode 100644 index 000000000000..81595c256657 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/cardinalClosed.js @@ -0,0 +1,76 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.CardinalClosed = CardinalClosed; +exports.default = void 0; +var _noop = _interopRequireDefault(require("../noop.js")); +var _cardinal = require("./cardinal.js"); +function CardinalClosed(context, tension) { + this._context = context; + this._k = (1 - tension) / 6; +} +CardinalClosed.prototype = { + areaStart: _noop.default, + areaEnd: _noop.default, + lineStart: function () { + this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; + this._point = 0; + }, + lineEnd: function () { + switch (this._point) { + case 1: + { + this._context.moveTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 2: + { + this._context.lineTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 3: + { + this.point(this._x3, this._y3); + this.point(this._x4, this._y4); + this.point(this._x5, this._y5); + break; + } + } + }, + point: function (x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: + this._point = 1; + this._x3 = x, this._y3 = y; + break; + case 1: + this._point = 2; + this._context.moveTo(this._x4 = x, this._y4 = y); + break; + case 2: + this._point = 3; + this._x5 = x, this._y5 = y; + break; + default: + (0, _cardinal.point)(this, x, y); + break; + } + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; +var _default = exports.default = function custom(tension) { + function cardinal(context) { + return new CardinalClosed(context, tension); + } + cardinal.tension = function (tension) { + return custom(+tension); + }; + return cardinal; +}(0); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/cardinalOpen.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/cardinalOpen.js new file mode 100644 index 000000000000..f6bb864bec66 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/cardinalOpen.js @@ -0,0 +1,60 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.CardinalOpen = CardinalOpen; +exports.default = void 0; +var _cardinal = require("./cardinal.js"); +function CardinalOpen(context, tension) { + this._context = context; + this._k = (1 - tension) / 6; +} +CardinalOpen.prototype = { + areaStart: function () { + this._line = 0; + }, + areaEnd: function () { + this._line = NaN; + }, + lineStart: function () { + this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN; + this._point = 0; + }, + lineEnd: function () { + if (this._line || this._line !== 0 && this._point === 3) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function (x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: + this._point = 1; + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3; + this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); + break; + case 3: + this._point = 4; + // falls through + default: + (0, _cardinal.point)(this, x, y); + break; + } + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; +var _default = exports.default = function custom(tension) { + function cardinal(context) { + return new CardinalOpen(context, tension); + } + cardinal.tension = function (tension) { + return custom(+tension); + }; + return cardinal; +}(0); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/catmullRom.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/catmullRom.js new file mode 100644 index 000000000000..a1323aca799b --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/catmullRom.js @@ -0,0 +1,92 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +exports.point = point; +var _math = require("../math.js"); +var _cardinal = require("./cardinal.js"); +function point(that, x, y) { + var x1 = that._x1, + y1 = that._y1, + x2 = that._x2, + y2 = that._y2; + if (that._l01_a > _math.epsilon) { + var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a, + n = 3 * that._l01_a * (that._l01_a + that._l12_a); + x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n; + y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n; + } + if (that._l23_a > _math.epsilon) { + var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a, + m = 3 * that._l23_a * (that._l23_a + that._l12_a); + x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m; + y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m; + } + that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2); +} +function CatmullRom(context, alpha) { + this._context = context; + this._alpha = alpha; +} +CatmullRom.prototype = { + areaStart: function () { + this._line = 0; + }, + areaEnd: function () { + this._line = NaN; + }, + lineStart: function () { + this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN; + this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0; + }, + lineEnd: function () { + switch (this._point) { + case 2: + this._context.lineTo(this._x2, this._y2); + break; + case 3: + this.point(this._x2, this._y2); + break; + } + if (this._line || this._line !== 0 && this._point === 1) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function (x, y) { + x = +x, y = +y; + if (this._point) { + var x23 = this._x2 - x, + y23 = this._y2 - y; + this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); + } + switch (this._point) { + case 0: + this._point = 1; + this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3; + // falls through + default: + point(this, x, y); + break; + } + this._l01_a = this._l12_a, this._l12_a = this._l23_a; + this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; +var _default = exports.default = function custom(alpha) { + function catmullRom(context) { + return alpha ? new CatmullRom(context, alpha) : new _cardinal.Cardinal(context, 0); + } + catmullRom.alpha = function (alpha) { + return custom(+alpha); + }; + return catmullRom; +}(0.5); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/catmullRomClosed.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/catmullRomClosed.js new file mode 100644 index 000000000000..ea06e8c7adbc --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/catmullRomClosed.js @@ -0,0 +1,83 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _cardinalClosed = require("./cardinalClosed.js"); +var _noop = _interopRequireDefault(require("../noop.js")); +var _catmullRom = require("./catmullRom.js"); +function CatmullRomClosed(context, alpha) { + this._context = context; + this._alpha = alpha; +} +CatmullRomClosed.prototype = { + areaStart: _noop.default, + areaEnd: _noop.default, + lineStart: function () { + this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; + this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0; + }, + lineEnd: function () { + switch (this._point) { + case 1: + { + this._context.moveTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 2: + { + this._context.lineTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 3: + { + this.point(this._x3, this._y3); + this.point(this._x4, this._y4); + this.point(this._x5, this._y5); + break; + } + } + }, + point: function (x, y) { + x = +x, y = +y; + if (this._point) { + var x23 = this._x2 - x, + y23 = this._y2 - y; + this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); + } + switch (this._point) { + case 0: + this._point = 1; + this._x3 = x, this._y3 = y; + break; + case 1: + this._point = 2; + this._context.moveTo(this._x4 = x, this._y4 = y); + break; + case 2: + this._point = 3; + this._x5 = x, this._y5 = y; + break; + default: + (0, _catmullRom.point)(this, x, y); + break; + } + this._l01_a = this._l12_a, this._l12_a = this._l23_a; + this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; +var _default = exports.default = function custom(alpha) { + function catmullRom(context) { + return alpha ? new CatmullRomClosed(context, alpha) : new _cardinalClosed.CardinalClosed(context, 0); + } + catmullRom.alpha = function (alpha) { + return custom(+alpha); + }; + return catmullRom; +}(0.5); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/catmullRomOpen.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/catmullRomOpen.js new file mode 100644 index 000000000000..35a4a8708222 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/catmullRomOpen.js @@ -0,0 +1,67 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _cardinalOpen = require("./cardinalOpen.js"); +var _catmullRom = require("./catmullRom.js"); +function CatmullRomOpen(context, alpha) { + this._context = context; + this._alpha = alpha; +} +CatmullRomOpen.prototype = { + areaStart: function () { + this._line = 0; + }, + areaEnd: function () { + this._line = NaN; + }, + lineStart: function () { + this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN; + this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0; + }, + lineEnd: function () { + if (this._line || this._line !== 0 && this._point === 3) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function (x, y) { + x = +x, y = +y; + if (this._point) { + var x23 = this._x2 - x, + y23 = this._y2 - y; + this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); + } + switch (this._point) { + case 0: + this._point = 1; + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3; + this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); + break; + case 3: + this._point = 4; + // falls through + default: + (0, _catmullRom.point)(this, x, y); + break; + } + this._l01_a = this._l12_a, this._l12_a = this._l23_a; + this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; +var _default = exports.default = function custom(alpha) { + function catmullRom(context) { + return alpha ? new CatmullRomOpen(context, alpha) : new _cardinalOpen.CardinalOpen(context, 0); + } + catmullRom.alpha = function (alpha) { + return custom(+alpha); + }; + return catmullRom; +}(0.5); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/linear.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/linear.js new file mode 100644 index 000000000000..0dd374187b2a --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/linear.js @@ -0,0 +1,42 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +function Linear(context) { + this._context = context; +} +Linear.prototype = { + areaStart: function () { + this._line = 0; + }, + areaEnd: function () { + this._line = NaN; + }, + lineStart: function () { + this._point = 0; + }, + lineEnd: function () { + if (this._line || this._line !== 0 && this._point === 1) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function (x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: + this._point = 1; + this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); + break; + case 1: + this._point = 2; + // falls through + default: + this._context.lineTo(x, y); + break; + } + } +}; +function _default(context) { + return new Linear(context); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/linearClosed.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/linearClosed.js new file mode 100644 index 000000000000..6cd4ca9b57ed --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/linearClosed.js @@ -0,0 +1,28 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _noop = _interopRequireDefault(require("../noop.js")); +function LinearClosed(context) { + this._context = context; +} +LinearClosed.prototype = { + areaStart: _noop.default, + areaEnd: _noop.default, + lineStart: function () { + this._point = 0; + }, + lineEnd: function () { + if (this._point) this._context.closePath(); + }, + point: function (x, y) { + x = +x, y = +y; + if (this._point) this._context.lineTo(x, y);else this._point = 1, this._context.moveTo(x, y); + } +}; +function _default(context) { + return new LinearClosed(context); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/monotone.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/monotone.js new file mode 100644 index 000000000000..b2a9f087c2ee --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/monotone.js @@ -0,0 +1,121 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.monotoneX = monotoneX; +exports.monotoneY = monotoneY; +function sign(x) { + return x < 0 ? -1 : 1; +} + +// Calculate the slopes of the tangents (Hermite-type interpolation) based on +// the following paper: Steffen, M. 1990. A Simple Method for Monotonic +// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO. +// NOV(II), P. 443, 1990. +function slope3(that, x2, y2) { + var h0 = that._x1 - that._x0, + h1 = x2 - that._x1, + s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0), + s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0), + p = (s0 * h1 + s1 * h0) / (h0 + h1); + return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0; +} + +// Calculate a one-sided slope. +function slope2(that, t) { + var h = that._x1 - that._x0; + return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t; +} + +// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations +// "you can express cubic Hermite interpolation in terms of cubic Bézier curves +// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1". +function point(that, t0, t1) { + var x0 = that._x0, + y0 = that._y0, + x1 = that._x1, + y1 = that._y1, + dx = (x1 - x0) / 3; + that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1); +} +function MonotoneX(context) { + this._context = context; +} +MonotoneX.prototype = { + areaStart: function () { + this._line = 0; + }, + areaEnd: function () { + this._line = NaN; + }, + lineStart: function () { + this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN; + this._point = 0; + }, + lineEnd: function () { + switch (this._point) { + case 2: + this._context.lineTo(this._x1, this._y1); + break; + case 3: + point(this, this._t0, slope2(this, this._t0)); + break; + } + if (this._line || this._line !== 0 && this._point === 1) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function (x, y) { + var t1 = NaN; + x = +x, y = +y; + if (x === this._x1 && y === this._y1) return; // Ignore coincident points. + switch (this._point) { + case 0: + this._point = 1; + this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3; + point(this, slope2(this, t1 = slope3(this, x, y)), t1); + break; + default: + point(this, this._t0, t1 = slope3(this, x, y)); + break; + } + this._x0 = this._x1, this._x1 = x; + this._y0 = this._y1, this._y1 = y; + this._t0 = t1; + } +}; +function MonotoneY(context) { + this._context = new ReflectContext(context); +} +(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function (x, y) { + MonotoneX.prototype.point.call(this, y, x); +}; +function ReflectContext(context) { + this._context = context; +} +ReflectContext.prototype = { + moveTo: function (x, y) { + this._context.moveTo(y, x); + }, + closePath: function () { + this._context.closePath(); + }, + lineTo: function (x, y) { + this._context.lineTo(y, x); + }, + bezierCurveTo: function (x1, y1, x2, y2, x, y) { + this._context.bezierCurveTo(y1, x1, y2, x2, y, x); + } +}; +function monotoneX(context) { + return new MonotoneX(context); +} +function monotoneY(context) { + return new MonotoneY(context); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/natural.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/natural.js new file mode 100644 index 000000000000..a5bd1caf0d60 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/natural.js @@ -0,0 +1,67 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +function Natural(context) { + this._context = context; +} +Natural.prototype = { + areaStart: function () { + this._line = 0; + }, + areaEnd: function () { + this._line = NaN; + }, + lineStart: function () { + this._x = []; + this._y = []; + }, + lineEnd: function () { + var x = this._x, + y = this._y, + n = x.length; + if (n) { + this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]); + if (n === 2) { + this._context.lineTo(x[1], y[1]); + } else { + var px = controlPoints(x), + py = controlPoints(y); + for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) { + this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]); + } + } + } + if (this._line || this._line !== 0 && n === 1) this._context.closePath(); + this._line = 1 - this._line; + this._x = this._y = null; + }, + point: function (x, y) { + this._x.push(+x); + this._y.push(+y); + } +}; + +// See https://www.particleincell.com/2012/bezier-splines/ for derivation. +function controlPoints(x) { + var i, + n = x.length - 1, + m, + a = new Array(n), + b = new Array(n), + r = new Array(n); + a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1]; + for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1]; + a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n]; + for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1]; + a[n - 1] = r[n - 1] / b[n - 1]; + for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i]; + b[n - 1] = (x[n] + a[n - 1]) / 2; + for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1]; + return [a, b]; +} +function _default(context) { + return new Natural(context); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/radial.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/radial.js new file mode 100644 index 000000000000..55bfa0fb527d --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/radial.js @@ -0,0 +1,37 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.curveRadialLinear = void 0; +exports.default = curveRadial; +var _linear = _interopRequireDefault(require("./linear.js")); +var curveRadialLinear = exports.curveRadialLinear = curveRadial(_linear.default); +function Radial(curve) { + this._curve = curve; +} +Radial.prototype = { + areaStart: function () { + this._curve.areaStart(); + }, + areaEnd: function () { + this._curve.areaEnd(); + }, + lineStart: function () { + this._curve.lineStart(); + }, + lineEnd: function () { + this._curve.lineEnd(); + }, + point: function (a, r) { + this._curve.point(r * Math.sin(a), r * -Math.cos(a)); + } +}; +function curveRadial(curve) { + function radial(context) { + return new Radial(curve(context)); + } + radial._curve = curve; + return radial; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/step.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/step.js new file mode 100644 index 000000000000..faba07377ca2 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/curve/step.js @@ -0,0 +1,63 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +exports.stepAfter = stepAfter; +exports.stepBefore = stepBefore; +function Step(context, t) { + this._context = context; + this._t = t; +} +Step.prototype = { + areaStart: function () { + this._line = 0; + }, + areaEnd: function () { + this._line = NaN; + }, + lineStart: function () { + this._x = this._y = NaN; + this._point = 0; + }, + lineEnd: function () { + if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y); + if (this._line || this._line !== 0 && this._point === 1) this._context.closePath(); + if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line; + }, + point: function (x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: + this._point = 1; + this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); + break; + case 1: + this._point = 2; + // falls through + default: + { + if (this._t <= 0) { + this._context.lineTo(this._x, y); + this._context.lineTo(x, y); + } else { + var x1 = this._x * (1 - this._t) + x * this._t; + this._context.lineTo(x1, this._y); + this._context.lineTo(x1, y); + } + break; + } + } + this._x = x, this._y = y; + } +}; +function _default(context) { + return new Step(context, 0.5); +} +function stepBefore(context) { + return new Step(context, 0); +} +function stepAfter(context) { + return new Step(context, 1); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/descending.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/descending.js new file mode 100644 index 000000000000..6df215954b0e --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/descending.js @@ -0,0 +1,9 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +function _default(a, b) { + return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/identity.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/identity.js new file mode 100644 index 000000000000..66d957a7cc5a --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/identity.js @@ -0,0 +1,9 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +function _default(d) { + return d; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/index.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/index.js new file mode 100644 index 000000000000..41c3dd3cde42 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/index.js @@ -0,0 +1,436 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "arc", { + enumerable: true, + get: function () { + return _arc.default; + } +}); +Object.defineProperty(exports, "area", { + enumerable: true, + get: function () { + return _area.default; + } +}); +Object.defineProperty(exports, "areaRadial", { + enumerable: true, + get: function () { + return _areaRadial.default; + } +}); +Object.defineProperty(exports, "curveBasis", { + enumerable: true, + get: function () { + return _basis.default; + } +}); +Object.defineProperty(exports, "curveBasisClosed", { + enumerable: true, + get: function () { + return _basisClosed.default; + } +}); +Object.defineProperty(exports, "curveBasisOpen", { + enumerable: true, + get: function () { + return _basisOpen.default; + } +}); +Object.defineProperty(exports, "curveBumpX", { + enumerable: true, + get: function () { + return _bump.bumpX; + } +}); +Object.defineProperty(exports, "curveBumpY", { + enumerable: true, + get: function () { + return _bump.bumpY; + } +}); +Object.defineProperty(exports, "curveBundle", { + enumerable: true, + get: function () { + return _bundle.default; + } +}); +Object.defineProperty(exports, "curveCardinal", { + enumerable: true, + get: function () { + return _cardinal.default; + } +}); +Object.defineProperty(exports, "curveCardinalClosed", { + enumerable: true, + get: function () { + return _cardinalClosed.default; + } +}); +Object.defineProperty(exports, "curveCardinalOpen", { + enumerable: true, + get: function () { + return _cardinalOpen.default; + } +}); +Object.defineProperty(exports, "curveCatmullRom", { + enumerable: true, + get: function () { + return _catmullRom.default; + } +}); +Object.defineProperty(exports, "curveCatmullRomClosed", { + enumerable: true, + get: function () { + return _catmullRomClosed.default; + } +}); +Object.defineProperty(exports, "curveCatmullRomOpen", { + enumerable: true, + get: function () { + return _catmullRomOpen.default; + } +}); +Object.defineProperty(exports, "curveLinear", { + enumerable: true, + get: function () { + return _linear.default; + } +}); +Object.defineProperty(exports, "curveLinearClosed", { + enumerable: true, + get: function () { + return _linearClosed.default; + } +}); +Object.defineProperty(exports, "curveMonotoneX", { + enumerable: true, + get: function () { + return _monotone.monotoneX; + } +}); +Object.defineProperty(exports, "curveMonotoneY", { + enumerable: true, + get: function () { + return _monotone.monotoneY; + } +}); +Object.defineProperty(exports, "curveNatural", { + enumerable: true, + get: function () { + return _natural.default; + } +}); +Object.defineProperty(exports, "curveStep", { + enumerable: true, + get: function () { + return _step.default; + } +}); +Object.defineProperty(exports, "curveStepAfter", { + enumerable: true, + get: function () { + return _step.stepAfter; + } +}); +Object.defineProperty(exports, "curveStepBefore", { + enumerable: true, + get: function () { + return _step.stepBefore; + } +}); +Object.defineProperty(exports, "line", { + enumerable: true, + get: function () { + return _line.default; + } +}); +Object.defineProperty(exports, "lineRadial", { + enumerable: true, + get: function () { + return _lineRadial.default; + } +}); +Object.defineProperty(exports, "link", { + enumerable: true, + get: function () { + return _link.link; + } +}); +Object.defineProperty(exports, "linkHorizontal", { + enumerable: true, + get: function () { + return _link.linkHorizontal; + } +}); +Object.defineProperty(exports, "linkRadial", { + enumerable: true, + get: function () { + return _link.linkRadial; + } +}); +Object.defineProperty(exports, "linkVertical", { + enumerable: true, + get: function () { + return _link.linkVertical; + } +}); +Object.defineProperty(exports, "pie", { + enumerable: true, + get: function () { + return _pie.default; + } +}); +Object.defineProperty(exports, "pointRadial", { + enumerable: true, + get: function () { + return _pointRadial.default; + } +}); +Object.defineProperty(exports, "radialArea", { + enumerable: true, + get: function () { + return _areaRadial.default; + } +}); +Object.defineProperty(exports, "radialLine", { + enumerable: true, + get: function () { + return _lineRadial.default; + } +}); +Object.defineProperty(exports, "stack", { + enumerable: true, + get: function () { + return _stack.default; + } +}); +Object.defineProperty(exports, "stackOffsetDiverging", { + enumerable: true, + get: function () { + return _diverging.default; + } +}); +Object.defineProperty(exports, "stackOffsetExpand", { + enumerable: true, + get: function () { + return _expand.default; + } +}); +Object.defineProperty(exports, "stackOffsetNone", { + enumerable: true, + get: function () { + return _none.default; + } +}); +Object.defineProperty(exports, "stackOffsetSilhouette", { + enumerable: true, + get: function () { + return _silhouette.default; + } +}); +Object.defineProperty(exports, "stackOffsetWiggle", { + enumerable: true, + get: function () { + return _wiggle.default; + } +}); +Object.defineProperty(exports, "stackOrderAppearance", { + enumerable: true, + get: function () { + return _appearance.default; + } +}); +Object.defineProperty(exports, "stackOrderAscending", { + enumerable: true, + get: function () { + return _ascending.default; + } +}); +Object.defineProperty(exports, "stackOrderDescending", { + enumerable: true, + get: function () { + return _descending.default; + } +}); +Object.defineProperty(exports, "stackOrderInsideOut", { + enumerable: true, + get: function () { + return _insideOut.default; + } +}); +Object.defineProperty(exports, "stackOrderNone", { + enumerable: true, + get: function () { + return _none2.default; + } +}); +Object.defineProperty(exports, "stackOrderReverse", { + enumerable: true, + get: function () { + return _reverse.default; + } +}); +Object.defineProperty(exports, "symbol", { + enumerable: true, + get: function () { + return _symbol.default; + } +}); +Object.defineProperty(exports, "symbolAsterisk", { + enumerable: true, + get: function () { + return _asterisk.default; + } +}); +Object.defineProperty(exports, "symbolCircle", { + enumerable: true, + get: function () { + return _circle.default; + } +}); +Object.defineProperty(exports, "symbolCross", { + enumerable: true, + get: function () { + return _cross.default; + } +}); +Object.defineProperty(exports, "symbolDiamond", { + enumerable: true, + get: function () { + return _diamond.default; + } +}); +Object.defineProperty(exports, "symbolDiamond2", { + enumerable: true, + get: function () { + return _diamond2.default; + } +}); +Object.defineProperty(exports, "symbolPlus", { + enumerable: true, + get: function () { + return _plus.default; + } +}); +Object.defineProperty(exports, "symbolSquare", { + enumerable: true, + get: function () { + return _square.default; + } +}); +Object.defineProperty(exports, "symbolSquare2", { + enumerable: true, + get: function () { + return _square2.default; + } +}); +Object.defineProperty(exports, "symbolStar", { + enumerable: true, + get: function () { + return _star.default; + } +}); +Object.defineProperty(exports, "symbolTimes", { + enumerable: true, + get: function () { + return _times.default; + } +}); +Object.defineProperty(exports, "symbolTriangle", { + enumerable: true, + get: function () { + return _triangle.default; + } +}); +Object.defineProperty(exports, "symbolTriangle2", { + enumerable: true, + get: function () { + return _triangle2.default; + } +}); +Object.defineProperty(exports, "symbolWye", { + enumerable: true, + get: function () { + return _wye.default; + } +}); +Object.defineProperty(exports, "symbolX", { + enumerable: true, + get: function () { + return _times.default; + } +}); +Object.defineProperty(exports, "symbols", { + enumerable: true, + get: function () { + return _symbol.symbolsFill; + } +}); +Object.defineProperty(exports, "symbolsFill", { + enumerable: true, + get: function () { + return _symbol.symbolsFill; + } +}); +Object.defineProperty(exports, "symbolsStroke", { + enumerable: true, + get: function () { + return _symbol.symbolsStroke; + } +}); +var _arc = _interopRequireDefault(require("./arc.js")); +var _area = _interopRequireDefault(require("./area.js")); +var _line = _interopRequireDefault(require("./line.js")); +var _pie = _interopRequireDefault(require("./pie.js")); +var _areaRadial = _interopRequireDefault(require("./areaRadial.js")); +var _lineRadial = _interopRequireDefault(require("./lineRadial.js")); +var _pointRadial = _interopRequireDefault(require("./pointRadial.js")); +var _link = require("./link.js"); +var _symbol = _interopRequireWildcard(require("./symbol.js")); +var _asterisk = _interopRequireDefault(require("./symbol/asterisk.js")); +var _circle = _interopRequireDefault(require("./symbol/circle.js")); +var _cross = _interopRequireDefault(require("./symbol/cross.js")); +var _diamond = _interopRequireDefault(require("./symbol/diamond.js")); +var _diamond2 = _interopRequireDefault(require("./symbol/diamond2.js")); +var _plus = _interopRequireDefault(require("./symbol/plus.js")); +var _square = _interopRequireDefault(require("./symbol/square.js")); +var _square2 = _interopRequireDefault(require("./symbol/square2.js")); +var _star = _interopRequireDefault(require("./symbol/star.js")); +var _triangle = _interopRequireDefault(require("./symbol/triangle.js")); +var _triangle2 = _interopRequireDefault(require("./symbol/triangle2.js")); +var _wye = _interopRequireDefault(require("./symbol/wye.js")); +var _times = _interopRequireDefault(require("./symbol/times.js")); +var _basisClosed = _interopRequireDefault(require("./curve/basisClosed.js")); +var _basisOpen = _interopRequireDefault(require("./curve/basisOpen.js")); +var _basis = _interopRequireDefault(require("./curve/basis.js")); +var _bump = require("./curve/bump.js"); +var _bundle = _interopRequireDefault(require("./curve/bundle.js")); +var _cardinalClosed = _interopRequireDefault(require("./curve/cardinalClosed.js")); +var _cardinalOpen = _interopRequireDefault(require("./curve/cardinalOpen.js")); +var _cardinal = _interopRequireDefault(require("./curve/cardinal.js")); +var _catmullRomClosed = _interopRequireDefault(require("./curve/catmullRomClosed.js")); +var _catmullRomOpen = _interopRequireDefault(require("./curve/catmullRomOpen.js")); +var _catmullRom = _interopRequireDefault(require("./curve/catmullRom.js")); +var _linearClosed = _interopRequireDefault(require("./curve/linearClosed.js")); +var _linear = _interopRequireDefault(require("./curve/linear.js")); +var _monotone = require("./curve/monotone.js"); +var _natural = _interopRequireDefault(require("./curve/natural.js")); +var _step = _interopRequireWildcard(require("./curve/step.js")); +var _stack = _interopRequireDefault(require("./stack.js")); +var _expand = _interopRequireDefault(require("./offset/expand.js")); +var _diverging = _interopRequireDefault(require("./offset/diverging.js")); +var _none = _interopRequireDefault(require("./offset/none.js")); +var _silhouette = _interopRequireDefault(require("./offset/silhouette.js")); +var _wiggle = _interopRequireDefault(require("./offset/wiggle.js")); +var _appearance = _interopRequireDefault(require("./order/appearance.js")); +var _ascending = _interopRequireDefault(require("./order/ascending.js")); +var _descending = _interopRequireDefault(require("./order/descending.js")); +var _insideOut = _interopRequireDefault(require("./order/insideOut.js")); +var _none2 = _interopRequireDefault(require("./order/none.js")); +var _reverse = _interopRequireDefault(require("./order/reverse.js")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/line.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/line.js new file mode 100644 index 000000000000..3de4d6b7e130 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/line.js @@ -0,0 +1,52 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _array = _interopRequireDefault(require("./array.js")); +var _constant = _interopRequireDefault(require("./constant.js")); +var _linear = _interopRequireDefault(require("./curve/linear.js")); +var _path = require("./path.js"); +var _point = require("./point.js"); +function _default(x, y) { + var defined = (0, _constant.default)(true), + context = null, + curve = _linear.default, + output = null, + path = (0, _path.withPath)(line); + x = typeof x === "function" ? x : x === undefined ? _point.x : (0, _constant.default)(x); + y = typeof y === "function" ? y : y === undefined ? _point.y : (0, _constant.default)(y); + function line(data) { + var i, + n = (data = (0, _array.default)(data)).length, + d, + defined0 = false, + buffer; + if (context == null) output = curve(buffer = path()); + for (i = 0; i <= n; ++i) { + if (!(i < n && defined(d = data[i], i, data)) === defined0) { + if (defined0 = !defined0) output.lineStart();else output.lineEnd(); + } + if (defined0) output.point(+x(d, i, data), +y(d, i, data)); + } + if (buffer) return output = null, buffer + "" || null; + } + line.x = function (_) { + return arguments.length ? (x = typeof _ === "function" ? _ : (0, _constant.default)(+_), line) : x; + }; + line.y = function (_) { + return arguments.length ? (y = typeof _ === "function" ? _ : (0, _constant.default)(+_), line) : y; + }; + line.defined = function (_) { + return arguments.length ? (defined = typeof _ === "function" ? _ : (0, _constant.default)(!!_), line) : defined; + }; + line.curve = function (_) { + return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve; + }; + line.context = function (_) { + return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context; + }; + return line; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/lineRadial.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/lineRadial.js new file mode 100644 index 000000000000..a8bbfa2dd382 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/lineRadial.js @@ -0,0 +1,24 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +exports.lineRadial = lineRadial; +var _radial = _interopRequireWildcard(require("./curve/radial.js")); +var _line = _interopRequireDefault(require("./line.js")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +function lineRadial(l) { + var c = l.curve; + l.angle = l.x, delete l.x; + l.radius = l.y, delete l.y; + l.curve = function (_) { + return arguments.length ? c((0, _radial.default)(_)) : c()._curve; + }; + return l; +} +function _default() { + return lineRadial((0, _line.default)().curve(_radial.curveRadialLinear)); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/link.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/link.js new file mode 100644 index 000000000000..6bf9ba109811 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/link.js @@ -0,0 +1,70 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.link = link; +exports.linkHorizontal = linkHorizontal; +exports.linkRadial = linkRadial; +exports.linkVertical = linkVertical; +var _array = require("./array.js"); +var _constant = _interopRequireDefault(require("./constant.js")); +var _bump = require("./curve/bump.js"); +var _path = require("./path.js"); +var _point = require("./point.js"); +function linkSource(d) { + return d.source; +} +function linkTarget(d) { + return d.target; +} +function link(curve) { + let source = linkSource, + target = linkTarget, + x = _point.x, + y = _point.y, + context = null, + output = null, + path = (0, _path.withPath)(link); + function link() { + let buffer; + const argv = _array.slice.call(arguments); + const s = source.apply(this, argv); + const t = target.apply(this, argv); + if (context == null) output = curve(buffer = path()); + output.lineStart(); + argv[0] = s, output.point(+x.apply(this, argv), +y.apply(this, argv)); + argv[0] = t, output.point(+x.apply(this, argv), +y.apply(this, argv)); + output.lineEnd(); + if (buffer) return output = null, buffer + "" || null; + } + link.source = function (_) { + return arguments.length ? (source = _, link) : source; + }; + link.target = function (_) { + return arguments.length ? (target = _, link) : target; + }; + link.x = function (_) { + return arguments.length ? (x = typeof _ === "function" ? _ : (0, _constant.default)(+_), link) : x; + }; + link.y = function (_) { + return arguments.length ? (y = typeof _ === "function" ? _ : (0, _constant.default)(+_), link) : y; + }; + link.context = function (_) { + return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), link) : context; + }; + return link; +} +function linkHorizontal() { + return link(_bump.bumpX); +} +function linkVertical() { + return link(_bump.bumpY); +} +function linkRadial() { + const l = link(_bump.bumpRadial); + l.angle = l.x, delete l.x; + l.radius = l.y, delete l.y; + return l; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/math.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/math.js new file mode 100644 index 000000000000..445051a2d036 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/math.js @@ -0,0 +1,26 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.abs = void 0; +exports.acos = acos; +exports.asin = asin; +exports.tau = exports.sqrt = exports.sin = exports.pi = exports.min = exports.max = exports.halfPi = exports.epsilon = exports.cos = exports.atan2 = void 0; +const abs = exports.abs = Math.abs; +const atan2 = exports.atan2 = Math.atan2; +const cos = exports.cos = Math.cos; +const max = exports.max = Math.max; +const min = exports.min = Math.min; +const sin = exports.sin = Math.sin; +const sqrt = exports.sqrt = Math.sqrt; +const epsilon = exports.epsilon = 1e-12; +const pi = exports.pi = Math.PI; +const halfPi = exports.halfPi = pi / 2; +const tau = exports.tau = 2 * pi; +function acos(x) { + return x > 1 ? 0 : x < -1 ? pi : Math.acos(x); +} +function asin(x) { + return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/noop.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/noop.js new file mode 100644 index 000000000000..1209259b537e --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/noop.js @@ -0,0 +1,7 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +function _default() {} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/offset/diverging.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/offset/diverging.js new file mode 100644 index 000000000000..d638c817a0c1 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/offset/diverging.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +function _default(series, order) { + if (!((n = series.length) > 0)) return; + for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) { + for (yp = yn = 0, i = 0; i < n; ++i) { + if ((dy = (d = series[order[i]][j])[1] - d[0]) > 0) { + d[0] = yp, d[1] = yp += dy; + } else if (dy < 0) { + d[1] = yn, d[0] = yn += dy; + } else { + d[0] = 0, d[1] = dy; + } + } + } +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/offset/expand.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/offset/expand.js new file mode 100644 index 000000000000..5ae22123526e --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/offset/expand.js @@ -0,0 +1,16 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _none = _interopRequireDefault(require("./none.js")); +function _default(series, order) { + if (!((n = series.length) > 0)) return; + for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) { + for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0; + if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y; + } + (0, _none.default)(series, order); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/offset/none.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/offset/none.js new file mode 100644 index 000000000000..c2d15b8837d3 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/offset/none.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +function _default(series, order) { + if (!((n = series.length) > 1)) return; + for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) { + s0 = s1, s1 = series[order[i]]; + for (j = 0; j < m; ++j) { + s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1]; + } + } +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/offset/silhouette.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/offset/silhouette.js new file mode 100644 index 000000000000..48a03a841a91 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/offset/silhouette.js @@ -0,0 +1,16 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _none = _interopRequireDefault(require("./none.js")); +function _default(series, order) { + if (!((n = series.length) > 0)) return; + for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) { + for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0; + s0[j][1] += s0[j][0] = -y / 2; + } + (0, _none.default)(series, order); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/offset/wiggle.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/offset/wiggle.js new file mode 100644 index 000000000000..2b3aa5c05153 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/offset/wiggle.js @@ -0,0 +1,30 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _none = _interopRequireDefault(require("./none.js")); +function _default(series, order) { + if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return; + for (var y = 0, j = 1, s0, m, n; j < m; ++j) { + for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) { + var si = series[order[i]], + sij0 = si[j][1] || 0, + sij1 = si[j - 1][1] || 0, + s3 = (sij0 - sij1) / 2; + for (var k = 0; k < i; ++k) { + var sk = series[order[k]], + skj0 = sk[j][1] || 0, + skj1 = sk[j - 1][1] || 0; + s3 += skj0 - skj1; + } + s1 += sij0, s2 += s3 * sij0; + } + s0[j - 1][1] += s0[j - 1][0] = y; + if (s1) y -= s2 / s1; + } + s0[j - 1][1] += s0[j - 1][0] = y; + (0, _none.default)(series, order); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/order/appearance.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/order/appearance.js new file mode 100644 index 000000000000..a2e7b7dfae66 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/order/appearance.js @@ -0,0 +1,23 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _none = _interopRequireDefault(require("./none.js")); +function _default(series) { + var peaks = series.map(peak); + return (0, _none.default)(series).sort(function (a, b) { + return peaks[a] - peaks[b]; + }); +} +function peak(series) { + var i = -1, + j = 0, + n = series.length, + vi, + vj = -Infinity; + while (++i < n) if ((vi = +series[i][1]) > vj) vj = vi, j = i; + return j; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/order/ascending.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/order/ascending.js new file mode 100644 index 000000000000..1d8ace8c1ec4 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/order/ascending.js @@ -0,0 +1,23 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +exports.sum = sum; +var _none = _interopRequireDefault(require("./none.js")); +function _default(series) { + var sums = series.map(sum); + return (0, _none.default)(series).sort(function (a, b) { + return sums[a] - sums[b]; + }); +} +function sum(series) { + var s = 0, + i = -1, + n = series.length, + v; + while (++i < n) if (v = +series[i][1]) s += v; + return s; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/order/descending.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/order/descending.js new file mode 100644 index 000000000000..b5ad57c86b0d --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/order/descending.js @@ -0,0 +1,11 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _ascending = _interopRequireDefault(require("./ascending.js")); +function _default(series) { + return (0, _ascending.default)(series).reverse(); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/order/insideOut.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/order/insideOut.js new file mode 100644 index 000000000000..0fa683e73e63 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/order/insideOut.js @@ -0,0 +1,31 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _appearance = _interopRequireDefault(require("./appearance.js")); +var _ascending = require("./ascending.js"); +function _default(series) { + var n = series.length, + i, + j, + sums = series.map(_ascending.sum), + order = (0, _appearance.default)(series), + top = 0, + bottom = 0, + tops = [], + bottoms = []; + for (i = 0; i < n; ++i) { + j = order[i]; + if (top < bottom) { + top += sums[j]; + tops.push(j); + } else { + bottom += sums[j]; + bottoms.push(j); + } + } + return bottoms.reverse().concat(tops); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/order/none.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/order/none.js new file mode 100644 index 000000000000..06a85f6b222d --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/order/none.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +function _default(series) { + var n = series.length, + o = new Array(n); + while (--n >= 0) o[n] = n; + return o; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/order/reverse.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/order/reverse.js new file mode 100644 index 000000000000..526ed9b455c2 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/order/reverse.js @@ -0,0 +1,11 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _none = _interopRequireDefault(require("./none.js")); +function _default(series) { + return (0, _none.default)(series).reverse(); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/path.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/path.js new file mode 100644 index 000000000000..d382c24b9dd8 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/path.js @@ -0,0 +1,22 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.withPath = withPath; +var _index = require("../../../lib-vendor/d3-path/src/index.js"); +function withPath(shape) { + let digits = 3; + shape.digits = function (_) { + if (!arguments.length) return digits; + if (_ == null) { + digits = null; + } else { + const d = Math.floor(_); + if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`); + digits = d; + } + return shape; + }; + return () => new _index.Path(digits); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/pie.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/pie.js new file mode 100644 index 000000000000..ceb8daff1f70 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/pie.js @@ -0,0 +1,79 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _array = _interopRequireDefault(require("./array.js")); +var _constant = _interopRequireDefault(require("./constant.js")); +var _descending = _interopRequireDefault(require("./descending.js")); +var _identity = _interopRequireDefault(require("./identity.js")); +var _math = require("./math.js"); +function _default() { + var value = _identity.default, + sortValues = _descending.default, + sort = null, + startAngle = (0, _constant.default)(0), + endAngle = (0, _constant.default)(_math.tau), + padAngle = (0, _constant.default)(0); + function pie(data) { + var i, + n = (data = (0, _array.default)(data)).length, + j, + k, + sum = 0, + index = new Array(n), + arcs = new Array(n), + a0 = +startAngle.apply(this, arguments), + da = Math.min(_math.tau, Math.max(-_math.tau, endAngle.apply(this, arguments) - a0)), + a1, + p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)), + pa = p * (da < 0 ? -1 : 1), + v; + for (i = 0; i < n; ++i) { + if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) { + sum += v; + } + } + + // Optionally sort the arcs by previously-computed values or by data. + if (sortValues != null) index.sort(function (i, j) { + return sortValues(arcs[i], arcs[j]); + });else if (sort != null) index.sort(function (i, j) { + return sort(data[i], data[j]); + }); + + // Compute the arcs! They are stored in the original data's order. + for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) { + j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = { + data: data[j], + index: i, + value: v, + startAngle: a0, + endAngle: a1, + padAngle: p + }; + } + return arcs; + } + pie.value = function (_) { + return arguments.length ? (value = typeof _ === "function" ? _ : (0, _constant.default)(+_), pie) : value; + }; + pie.sortValues = function (_) { + return arguments.length ? (sortValues = _, sort = null, pie) : sortValues; + }; + pie.sort = function (_) { + return arguments.length ? (sort = _, sortValues = null, pie) : sort; + }; + pie.startAngle = function (_) { + return arguments.length ? (startAngle = typeof _ === "function" ? _ : (0, _constant.default)(+_), pie) : startAngle; + }; + pie.endAngle = function (_) { + return arguments.length ? (endAngle = typeof _ === "function" ? _ : (0, _constant.default)(+_), pie) : endAngle; + }; + pie.padAngle = function (_) { + return arguments.length ? (padAngle = typeof _ === "function" ? _ : (0, _constant.default)(+_), pie) : padAngle; + }; + return pie; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/point.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/point.js new file mode 100644 index 000000000000..eb6cee240b53 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/point.js @@ -0,0 +1,13 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.x = x; +exports.y = y; +function x(p) { + return p[0]; +} +function y(p) { + return p[1]; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/pointRadial.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/pointRadial.js new file mode 100644 index 000000000000..6940a07bb5a9 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/pointRadial.js @@ -0,0 +1,9 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +function _default(x, y) { + return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)]; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/stack.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/stack.js new file mode 100644 index 000000000000..44f2a2a88fa0 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/stack.js @@ -0,0 +1,55 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _array = _interopRequireDefault(require("./array.js")); +var _constant = _interopRequireDefault(require("./constant.js")); +var _none = _interopRequireDefault(require("./offset/none.js")); +var _none2 = _interopRequireDefault(require("./order/none.js")); +function stackValue(d, key) { + return d[key]; +} +function stackSeries(key) { + const series = []; + series.key = key; + return series; +} +function _default() { + var keys = (0, _constant.default)([]), + order = _none2.default, + offset = _none.default, + value = stackValue; + function stack(data) { + var sz = Array.from(keys.apply(this, arguments), stackSeries), + i, + n = sz.length, + j = -1, + oz; + for (const d of data) { + for (i = 0, ++j; i < n; ++i) { + (sz[i][j] = [0, +value(d, sz[i].key, j, data)]).data = d; + } + } + for (i = 0, oz = (0, _array.default)(order(sz)); i < n; ++i) { + sz[oz[i]].index = i; + } + offset(sz, oz); + return sz; + } + stack.keys = function (_) { + return arguments.length ? (keys = typeof _ === "function" ? _ : (0, _constant.default)(Array.from(_)), stack) : keys; + }; + stack.value = function (_) { + return arguments.length ? (value = typeof _ === "function" ? _ : (0, _constant.default)(+_), stack) : value; + }; + stack.order = function (_) { + return arguments.length ? (order = _ == null ? _none2.default : typeof _ === "function" ? _ : (0, _constant.default)(Array.from(_)), stack) : order; + }; + stack.offset = function (_) { + return arguments.length ? (offset = _ == null ? _none.default : _, stack) : offset; + }; + return stack; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol.js new file mode 100644 index 000000000000..79a579b8cb3c --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol.js @@ -0,0 +1,50 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = Symbol; +exports.symbolsStroke = exports.symbolsFill = void 0; +var _constant = _interopRequireDefault(require("./constant.js")); +var _path = require("./path.js"); +var _asterisk = _interopRequireDefault(require("./symbol/asterisk.js")); +var _circle = _interopRequireDefault(require("./symbol/circle.js")); +var _cross = _interopRequireDefault(require("./symbol/cross.js")); +var _diamond = _interopRequireDefault(require("./symbol/diamond.js")); +var _diamond2 = _interopRequireDefault(require("./symbol/diamond2.js")); +var _plus = _interopRequireDefault(require("./symbol/plus.js")); +var _square = _interopRequireDefault(require("./symbol/square.js")); +var _square2 = _interopRequireDefault(require("./symbol/square2.js")); +var _star = _interopRequireDefault(require("./symbol/star.js")); +var _triangle = _interopRequireDefault(require("./symbol/triangle.js")); +var _triangle2 = _interopRequireDefault(require("./symbol/triangle2.js")); +var _wye = _interopRequireDefault(require("./symbol/wye.js")); +var _times = _interopRequireDefault(require("./symbol/times.js")); +// These symbols are designed to be filled. +const symbolsFill = exports.symbolsFill = [_circle.default, _cross.default, _diamond.default, _square.default, _star.default, _triangle.default, _wye.default]; + +// These symbols are designed to be stroked (with a width of 1.5px and round caps). +const symbolsStroke = exports.symbolsStroke = [_circle.default, _plus.default, _times.default, _triangle2.default, _asterisk.default, _square2.default, _diamond2.default]; +function Symbol(type, size) { + let context = null, + path = (0, _path.withPath)(symbol); + type = typeof type === "function" ? type : (0, _constant.default)(type || _circle.default); + size = typeof size === "function" ? size : (0, _constant.default)(size === undefined ? 64 : +size); + function symbol() { + let buffer; + if (!context) context = buffer = path(); + type.apply(this, arguments).draw(context, +size.apply(this, arguments)); + if (buffer) return context = null, buffer + "" || null; + } + symbol.type = function (_) { + return arguments.length ? (type = typeof _ === "function" ? _ : (0, _constant.default)(_), symbol) : type; + }; + symbol.size = function (_) { + return arguments.length ? (size = typeof _ === "function" ? _ : (0, _constant.default)(+_), symbol) : size; + }; + symbol.context = function (_) { + return arguments.length ? (context = _ == null ? null : _, symbol) : context; + }; + return symbol; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/asterisk.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/asterisk.js new file mode 100644 index 000000000000..95553b92c399 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/asterisk.js @@ -0,0 +1,21 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _math = require("../math.js"); +const sqrt3 = (0, _math.sqrt)(3); +var _default = exports.default = { + draw(context, size) { + const r = (0, _math.sqrt)(size + (0, _math.min)(size / 28, 0.75)) * 0.59436; + const t = r / 2; + const u = t * sqrt3; + context.moveTo(0, r); + context.lineTo(0, -r); + context.moveTo(-u, -t); + context.lineTo(u, t); + context.moveTo(-u, t); + context.lineTo(u, -t); + } +}; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/circle.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/circle.js new file mode 100644 index 000000000000..a248c50bf646 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/circle.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _math = require("../math.js"); +var _default = exports.default = { + draw(context, size) { + const r = (0, _math.sqrt)(size / _math.pi); + context.moveTo(r, 0); + context.arc(0, 0, r, 0, _math.tau); + } +}; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/cross.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/cross.js new file mode 100644 index 000000000000..3a0a7018d0d8 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/cross.js @@ -0,0 +1,25 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _math = require("../math.js"); +var _default = exports.default = { + draw(context, size) { + const r = (0, _math.sqrt)(size / 5) / 2; + context.moveTo(-3 * r, -r); + context.lineTo(-r, -r); + context.lineTo(-r, -3 * r); + context.lineTo(r, -3 * r); + context.lineTo(r, -r); + context.lineTo(3 * r, -r); + context.lineTo(3 * r, r); + context.lineTo(r, r); + context.lineTo(r, 3 * r); + context.lineTo(-r, 3 * r); + context.lineTo(-r, r); + context.lineTo(-3 * r, r); + context.closePath(); + } +}; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/diamond.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/diamond.js new file mode 100644 index 000000000000..7c1d04e70e4f --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/diamond.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _math = require("../math.js"); +const tan30 = (0, _math.sqrt)(1 / 3); +const tan30_2 = tan30 * 2; +var _default = exports.default = { + draw(context, size) { + const y = (0, _math.sqrt)(size / tan30_2); + const x = y * tan30; + context.moveTo(0, -y); + context.lineTo(x, 0); + context.lineTo(0, y); + context.lineTo(-x, 0); + context.closePath(); + } +}; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/diamond2.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/diamond2.js new file mode 100644 index 000000000000..38db01c2ef87 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/diamond2.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _math = require("../math.js"); +var _default = exports.default = { + draw(context, size) { + const r = (0, _math.sqrt)(size) * 0.62625; + context.moveTo(0, -r); + context.lineTo(r, 0); + context.lineTo(0, r); + context.lineTo(-r, 0); + context.closePath(); + } +}; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/plus.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/plus.js new file mode 100644 index 000000000000..eac65f85be1b --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/plus.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _math = require("../math.js"); +var _default = exports.default = { + draw(context, size) { + const r = (0, _math.sqrt)(size - (0, _math.min)(size / 7, 2)) * 0.87559; + context.moveTo(-r, 0); + context.lineTo(r, 0); + context.moveTo(0, r); + context.lineTo(0, -r); + } +}; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/square.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/square.js new file mode 100644 index 000000000000..eb217fcc2b68 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/square.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _math = require("../math.js"); +var _default = exports.default = { + draw(context, size) { + const w = (0, _math.sqrt)(size); + const x = -w / 2; + context.rect(x, x, w, w); + } +}; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/square2.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/square2.js new file mode 100644 index 000000000000..a78921823c94 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/square2.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _math = require("../math.js"); +var _default = exports.default = { + draw(context, size) { + const r = (0, _math.sqrt)(size) * 0.4431; + context.moveTo(r, r); + context.lineTo(r, -r); + context.lineTo(-r, -r); + context.lineTo(-r, r); + context.closePath(); + } +}; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/star.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/star.js new file mode 100644 index 000000000000..fb353c754776 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/star.js @@ -0,0 +1,28 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _math = require("../math.js"); +const ka = 0.89081309152928522810; +const kr = (0, _math.sin)(_math.pi / 10) / (0, _math.sin)(7 * _math.pi / 10); +const kx = (0, _math.sin)(_math.tau / 10) * kr; +const ky = -(0, _math.cos)(_math.tau / 10) * kr; +var _default = exports.default = { + draw(context, size) { + const r = (0, _math.sqrt)(size * ka); + const x = kx * r; + const y = ky * r; + context.moveTo(0, -r); + context.lineTo(x, y); + for (let i = 1; i < 5; ++i) { + const a = _math.tau * i / 5; + const c = (0, _math.cos)(a); + const s = (0, _math.sin)(a); + context.lineTo(s * r, -c * r); + context.lineTo(c * x - s * y, s * x + c * y); + } + context.closePath(); + } +}; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/times.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/times.js new file mode 100644 index 000000000000..15fce57f18b4 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/times.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _math = require("../math.js"); +var _default = exports.default = { + draw(context, size) { + const r = (0, _math.sqrt)(size - (0, _math.min)(size / 6, 1.7)) * 0.6189; + context.moveTo(-r, -r); + context.lineTo(r, r); + context.moveTo(-r, r); + context.lineTo(r, -r); + } +}; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/triangle.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/triangle.js new file mode 100644 index 000000000000..682e80d97b1d --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/triangle.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _math = require("../math.js"); +const sqrt3 = (0, _math.sqrt)(3); +var _default = exports.default = { + draw(context, size) { + const y = -(0, _math.sqrt)(size / (sqrt3 * 3)); + context.moveTo(0, y * 2); + context.lineTo(-sqrt3 * y, -y); + context.lineTo(sqrt3 * y, -y); + context.closePath(); + } +}; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/triangle2.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/triangle2.js new file mode 100644 index 000000000000..e1f4588ca646 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/triangle2.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _math = require("../math.js"); +const sqrt3 = (0, _math.sqrt)(3); +var _default = exports.default = { + draw(context, size) { + const s = (0, _math.sqrt)(size) * 0.6824; + const t = s / 2; + const u = s * sqrt3 / 2; // cos(Math.PI / 6) + context.moveTo(0, -s); + context.lineTo(u, t); + context.lineTo(-u, t); + context.closePath(); + } +}; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/wye.js b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/wye.js new file mode 100644 index 000000000000..7008cc867f81 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-shape/src/symbol/wye.js @@ -0,0 +1,32 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _math = require("../math.js"); +const c = -0.5; +const s = (0, _math.sqrt)(3) / 2; +const k = 1 / (0, _math.sqrt)(12); +const a = (k / 2 + 1) * 3; +var _default = exports.default = { + draw(context, size) { + const r = (0, _math.sqrt)(size / a); + const x0 = r / 2, + y0 = r * k; + const x1 = x0, + y1 = r * k + r; + const x2 = -x1, + y2 = y1; + context.moveTo(x0, y0); + context.lineTo(x1, y1); + context.lineTo(x2, y2); + context.lineTo(c * x0 - s * y0, s * x0 + c * y0); + context.lineTo(c * x1 - s * y1, s * x1 + c * y1); + context.lineTo(c * x2 - s * y2, s * x2 + c * y2); + context.lineTo(c * x0 + s * y0, c * y0 - s * x0); + context.lineTo(c * x1 + s * y1, c * y1 - s * x1); + context.lineTo(c * x2 + s * y2, c * y2 - s * x2); + context.closePath(); + } +}; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-time-format/LICENSE b/packages/x-charts-vendor/lib-vendor/d3-time-format/LICENSE new file mode 100644 index 000000000000..b0145150fd35 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-time-format/LICENSE @@ -0,0 +1,13 @@ +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/packages/x-charts-vendor/lib-vendor/d3-time-format/src/defaultLocale.js b/packages/x-charts-vendor/lib-vendor/d3-time-format/src/defaultLocale.js new file mode 100644 index 000000000000..6fdb1ad2ec21 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-time-format/src/defaultLocale.js @@ -0,0 +1,32 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = defaultLocale; +exports.utcParse = exports.utcFormat = exports.timeParse = exports.timeFormat = void 0; +var _locale = _interopRequireDefault(require("./locale.js")); +var locale; +var timeFormat; +var timeParse; +var utcFormat; +var utcParse; +defaultLocale({ + dateTime: "%x, %X", + date: "%-m/%-d/%Y", + time: "%-I:%M:%S %p", + periods: ["AM", "PM"], + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] +}); +function defaultLocale(definition) { + locale = (0, _locale.default)(definition); + exports.timeFormat = timeFormat = locale.format; + exports.timeParse = timeParse = locale.parse; + exports.utcFormat = utcFormat = locale.utcFormat; + exports.utcParse = utcParse = locale.utcParse; + return locale; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-time-format/src/index.js b/packages/x-charts-vendor/lib-vendor/d3-time-format/src/index.js new file mode 100644 index 000000000000..96f92a1b0272 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-time-format/src/index.js @@ -0,0 +1,60 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "isoFormat", { + enumerable: true, + get: function () { + return _isoFormat.default; + } +}); +Object.defineProperty(exports, "isoParse", { + enumerable: true, + get: function () { + return _isoParse.default; + } +}); +Object.defineProperty(exports, "timeFormat", { + enumerable: true, + get: function () { + return _defaultLocale.timeFormat; + } +}); +Object.defineProperty(exports, "timeFormatDefaultLocale", { + enumerable: true, + get: function () { + return _defaultLocale.default; + } +}); +Object.defineProperty(exports, "timeFormatLocale", { + enumerable: true, + get: function () { + return _locale.default; + } +}); +Object.defineProperty(exports, "timeParse", { + enumerable: true, + get: function () { + return _defaultLocale.timeParse; + } +}); +Object.defineProperty(exports, "utcFormat", { + enumerable: true, + get: function () { + return _defaultLocale.utcFormat; + } +}); +Object.defineProperty(exports, "utcParse", { + enumerable: true, + get: function () { + return _defaultLocale.utcParse; + } +}); +var _defaultLocale = _interopRequireWildcard(require("./defaultLocale.js")); +var _locale = _interopRequireDefault(require("./locale.js")); +var _isoFormat = _interopRequireDefault(require("./isoFormat.js")); +var _isoParse = _interopRequireDefault(require("./isoParse.js")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-time-format/src/isoFormat.js b/packages/x-charts-vendor/lib-vendor/d3-time-format/src/isoFormat.js new file mode 100644 index 000000000000..6873561cec82 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-time-format/src/isoFormat.js @@ -0,0 +1,13 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isoSpecifier = exports.default = void 0; +var _defaultLocale = require("./defaultLocale.js"); +var isoSpecifier = exports.isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ"; +function formatIsoNative(date) { + return date.toISOString(); +} +var formatIso = Date.prototype.toISOString ? formatIsoNative : (0, _defaultLocale.utcFormat)(isoSpecifier); +var _default = exports.default = formatIso; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-time-format/src/isoParse.js b/packages/x-charts-vendor/lib-vendor/d3-time-format/src/isoParse.js new file mode 100644 index 000000000000..b43d3b9bd16c --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-time-format/src/isoParse.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _isoFormat = require("./isoFormat.js"); +var _defaultLocale = require("./defaultLocale.js"); +function parseIsoNative(string) { + var date = new Date(string); + return isNaN(date) ? null : date; +} +var parseIso = +new Date("2000-01-01T00:00:00.000Z") ? parseIsoNative : (0, _defaultLocale.utcParse)(_isoFormat.isoSpecifier); +var _default = exports.default = parseIso; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-time-format/src/locale.js b/packages/x-charts-vendor/lib-vendor/d3-time-format/src/locale.js new file mode 100644 index 000000000000..3b21337139c0 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-time-format/src/locale.js @@ -0,0 +1,606 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = formatLocale; +var _index = require("../../../lib-vendor/d3-time/src/index.js"); +function localDate(d) { + if (0 <= d.y && d.y < 100) { + var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L); + date.setFullYear(d.y); + return date; + } + return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L); +} +function utcDate(d) { + if (0 <= d.y && d.y < 100) { + var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L)); + date.setUTCFullYear(d.y); + return date; + } + return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L)); +} +function newDate(y, m, d) { + return { + y: y, + m: m, + d: d, + H: 0, + M: 0, + S: 0, + L: 0 + }; +} +function formatLocale(locale) { + var locale_dateTime = locale.dateTime, + locale_date = locale.date, + locale_time = locale.time, + locale_periods = locale.periods, + locale_weekdays = locale.days, + locale_shortWeekdays = locale.shortDays, + locale_months = locale.months, + locale_shortMonths = locale.shortMonths; + var periodRe = formatRe(locale_periods), + periodLookup = formatLookup(locale_periods), + weekdayRe = formatRe(locale_weekdays), + weekdayLookup = formatLookup(locale_weekdays), + shortWeekdayRe = formatRe(locale_shortWeekdays), + shortWeekdayLookup = formatLookup(locale_shortWeekdays), + monthRe = formatRe(locale_months), + monthLookup = formatLookup(locale_months), + shortMonthRe = formatRe(locale_shortMonths), + shortMonthLookup = formatLookup(locale_shortMonths); + var formats = { + "a": formatShortWeekday, + "A": formatWeekday, + "b": formatShortMonth, + "B": formatMonth, + "c": null, + "d": formatDayOfMonth, + "e": formatDayOfMonth, + "f": formatMicroseconds, + "g": formatYearISO, + "G": formatFullYearISO, + "H": formatHour24, + "I": formatHour12, + "j": formatDayOfYear, + "L": formatMilliseconds, + "m": formatMonthNumber, + "M": formatMinutes, + "p": formatPeriod, + "q": formatQuarter, + "Q": formatUnixTimestamp, + "s": formatUnixTimestampSeconds, + "S": formatSeconds, + "u": formatWeekdayNumberMonday, + "U": formatWeekNumberSunday, + "V": formatWeekNumberISO, + "w": formatWeekdayNumberSunday, + "W": formatWeekNumberMonday, + "x": null, + "X": null, + "y": formatYear, + "Y": formatFullYear, + "Z": formatZone, + "%": formatLiteralPercent + }; + var utcFormats = { + "a": formatUTCShortWeekday, + "A": formatUTCWeekday, + "b": formatUTCShortMonth, + "B": formatUTCMonth, + "c": null, + "d": formatUTCDayOfMonth, + "e": formatUTCDayOfMonth, + "f": formatUTCMicroseconds, + "g": formatUTCYearISO, + "G": formatUTCFullYearISO, + "H": formatUTCHour24, + "I": formatUTCHour12, + "j": formatUTCDayOfYear, + "L": formatUTCMilliseconds, + "m": formatUTCMonthNumber, + "M": formatUTCMinutes, + "p": formatUTCPeriod, + "q": formatUTCQuarter, + "Q": formatUnixTimestamp, + "s": formatUnixTimestampSeconds, + "S": formatUTCSeconds, + "u": formatUTCWeekdayNumberMonday, + "U": formatUTCWeekNumberSunday, + "V": formatUTCWeekNumberISO, + "w": formatUTCWeekdayNumberSunday, + "W": formatUTCWeekNumberMonday, + "x": null, + "X": null, + "y": formatUTCYear, + "Y": formatUTCFullYear, + "Z": formatUTCZone, + "%": formatLiteralPercent + }; + var parses = { + "a": parseShortWeekday, + "A": parseWeekday, + "b": parseShortMonth, + "B": parseMonth, + "c": parseLocaleDateTime, + "d": parseDayOfMonth, + "e": parseDayOfMonth, + "f": parseMicroseconds, + "g": parseYear, + "G": parseFullYear, + "H": parseHour24, + "I": parseHour24, + "j": parseDayOfYear, + "L": parseMilliseconds, + "m": parseMonthNumber, + "M": parseMinutes, + "p": parsePeriod, + "q": parseQuarter, + "Q": parseUnixTimestamp, + "s": parseUnixTimestampSeconds, + "S": parseSeconds, + "u": parseWeekdayNumberMonday, + "U": parseWeekNumberSunday, + "V": parseWeekNumberISO, + "w": parseWeekdayNumberSunday, + "W": parseWeekNumberMonday, + "x": parseLocaleDate, + "X": parseLocaleTime, + "y": parseYear, + "Y": parseFullYear, + "Z": parseZone, + "%": parseLiteralPercent + }; + + // These recursive directive definitions must be deferred. + formats.x = newFormat(locale_date, formats); + formats.X = newFormat(locale_time, formats); + formats.c = newFormat(locale_dateTime, formats); + utcFormats.x = newFormat(locale_date, utcFormats); + utcFormats.X = newFormat(locale_time, utcFormats); + utcFormats.c = newFormat(locale_dateTime, utcFormats); + function newFormat(specifier, formats) { + return function (date) { + var string = [], + i = -1, + j = 0, + n = specifier.length, + c, + pad, + format; + if (!(date instanceof Date)) date = new Date(+date); + while (++i < n) { + if (specifier.charCodeAt(i) === 37) { + string.push(specifier.slice(j, i)); + if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);else pad = c === "e" ? " " : "0"; + if (format = formats[c]) c = format(date, pad); + string.push(c); + j = i + 1; + } + } + string.push(specifier.slice(j, i)); + return string.join(""); + }; + } + function newParse(specifier, Z) { + return function (string) { + var d = newDate(1900, undefined, 1), + i = parseSpecifier(d, specifier, string += "", 0), + week, + day; + if (i != string.length) return null; + + // If a UNIX timestamp is specified, return it. + if ("Q" in d) return new Date(d.Q); + if ("s" in d) return new Date(d.s * 1000 + ("L" in d ? d.L : 0)); + + // If this is utcParse, never use the local timezone. + if (Z && !("Z" in d)) d.Z = 0; + + // The am-pm flag is 0 for AM, and 1 for PM. + if ("p" in d) d.H = d.H % 12 + d.p * 12; + + // If the month was not specified, inherit from the quarter. + if (d.m === undefined) d.m = "q" in d ? d.q : 0; + + // Convert day-of-week and week-of-year to day-of-year. + if ("V" in d) { + if (d.V < 1 || d.V > 53) return null; + if (!("w" in d)) d.w = 1; + if ("Z" in d) { + week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay(); + week = day > 4 || day === 0 ? _index.utcMonday.ceil(week) : (0, _index.utcMonday)(week); + week = _index.utcDay.offset(week, (d.V - 1) * 7); + d.y = week.getUTCFullYear(); + d.m = week.getUTCMonth(); + d.d = week.getUTCDate() + (d.w + 6) % 7; + } else { + week = localDate(newDate(d.y, 0, 1)), day = week.getDay(); + week = day > 4 || day === 0 ? _index.timeMonday.ceil(week) : (0, _index.timeMonday)(week); + week = _index.timeDay.offset(week, (d.V - 1) * 7); + d.y = week.getFullYear(); + d.m = week.getMonth(); + d.d = week.getDate() + (d.w + 6) % 7; + } + } else if ("W" in d || "U" in d) { + if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0; + day = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay(); + d.m = 0; + d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7; + } + + // If a time zone is specified, all fields are interpreted as UTC and then + // offset according to the specified time zone. + if ("Z" in d) { + d.H += d.Z / 100 | 0; + d.M += d.Z % 100; + return utcDate(d); + } + + // Otherwise, all fields are in local time. + return localDate(d); + }; + } + function parseSpecifier(d, specifier, string, j) { + var i = 0, + n = specifier.length, + m = string.length, + c, + parse; + while (i < n) { + if (j >= m) return -1; + c = specifier.charCodeAt(i++); + if (c === 37) { + c = specifier.charAt(i++); + parse = parses[c in pads ? specifier.charAt(i++) : c]; + if (!parse || (j = parse(d, string, j)) < 0) return -1; + } else if (c != string.charCodeAt(j++)) { + return -1; + } + } + return j; + } + function parsePeriod(d, string, i) { + var n = periodRe.exec(string.slice(i)); + return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; + } + function parseShortWeekday(d, string, i) { + var n = shortWeekdayRe.exec(string.slice(i)); + return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; + } + function parseWeekday(d, string, i) { + var n = weekdayRe.exec(string.slice(i)); + return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; + } + function parseShortMonth(d, string, i) { + var n = shortMonthRe.exec(string.slice(i)); + return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; + } + function parseMonth(d, string, i) { + var n = monthRe.exec(string.slice(i)); + return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; + } + function parseLocaleDateTime(d, string, i) { + return parseSpecifier(d, locale_dateTime, string, i); + } + function parseLocaleDate(d, string, i) { + return parseSpecifier(d, locale_date, string, i); + } + function parseLocaleTime(d, string, i) { + return parseSpecifier(d, locale_time, string, i); + } + function formatShortWeekday(d) { + return locale_shortWeekdays[d.getDay()]; + } + function formatWeekday(d) { + return locale_weekdays[d.getDay()]; + } + function formatShortMonth(d) { + return locale_shortMonths[d.getMonth()]; + } + function formatMonth(d) { + return locale_months[d.getMonth()]; + } + function formatPeriod(d) { + return locale_periods[+(d.getHours() >= 12)]; + } + function formatQuarter(d) { + return 1 + ~~(d.getMonth() / 3); + } + function formatUTCShortWeekday(d) { + return locale_shortWeekdays[d.getUTCDay()]; + } + function formatUTCWeekday(d) { + return locale_weekdays[d.getUTCDay()]; + } + function formatUTCShortMonth(d) { + return locale_shortMonths[d.getUTCMonth()]; + } + function formatUTCMonth(d) { + return locale_months[d.getUTCMonth()]; + } + function formatUTCPeriod(d) { + return locale_periods[+(d.getUTCHours() >= 12)]; + } + function formatUTCQuarter(d) { + return 1 + ~~(d.getUTCMonth() / 3); + } + return { + format: function (specifier) { + var f = newFormat(specifier += "", formats); + f.toString = function () { + return specifier; + }; + return f; + }, + parse: function (specifier) { + var p = newParse(specifier += "", false); + p.toString = function () { + return specifier; + }; + return p; + }, + utcFormat: function (specifier) { + var f = newFormat(specifier += "", utcFormats); + f.toString = function () { + return specifier; + }; + return f; + }, + utcParse: function (specifier) { + var p = newParse(specifier += "", true); + p.toString = function () { + return specifier; + }; + return p; + } + }; +} +var pads = { + "-": "", + "_": " ", + "0": "0" + }, + numberRe = /^\s*\d+/, + // note: ignores next directive + percentRe = /^%/, + requoteRe = /[\\^$*+?|[\]().{}]/g; +function pad(value, fill, width) { + var sign = value < 0 ? "-" : "", + string = (sign ? -value : value) + "", + length = string.length; + return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string); +} +function requote(s) { + return s.replace(requoteRe, "\\$&"); +} +function formatRe(names) { + return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i"); +} +function formatLookup(names) { + return new Map(names.map((name, i) => [name.toLowerCase(), i])); +} +function parseWeekdayNumberSunday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 1)); + return n ? (d.w = +n[0], i + n[0].length) : -1; +} +function parseWeekdayNumberMonday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 1)); + return n ? (d.u = +n[0], i + n[0].length) : -1; +} +function parseWeekNumberSunday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.U = +n[0], i + n[0].length) : -1; +} +function parseWeekNumberISO(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.V = +n[0], i + n[0].length) : -1; +} +function parseWeekNumberMonday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.W = +n[0], i + n[0].length) : -1; +} +function parseFullYear(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 4)); + return n ? (d.y = +n[0], i + n[0].length) : -1; +} +function parseYear(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1; +} +function parseZone(d, string, i) { + var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6)); + return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1; +} +function parseQuarter(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 1)); + return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1; +} +function parseMonthNumber(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.m = n[0] - 1, i + n[0].length) : -1; +} +function parseDayOfMonth(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.d = +n[0], i + n[0].length) : -1; +} +function parseDayOfYear(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 3)); + return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1; +} +function parseHour24(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.H = +n[0], i + n[0].length) : -1; +} +function parseMinutes(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.M = +n[0], i + n[0].length) : -1; +} +function parseSeconds(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.S = +n[0], i + n[0].length) : -1; +} +function parseMilliseconds(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 3)); + return n ? (d.L = +n[0], i + n[0].length) : -1; +} +function parseMicroseconds(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 6)); + return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1; +} +function parseLiteralPercent(d, string, i) { + var n = percentRe.exec(string.slice(i, i + 1)); + return n ? i + n[0].length : -1; +} +function parseUnixTimestamp(d, string, i) { + var n = numberRe.exec(string.slice(i)); + return n ? (d.Q = +n[0], i + n[0].length) : -1; +} +function parseUnixTimestampSeconds(d, string, i) { + var n = numberRe.exec(string.slice(i)); + return n ? (d.s = +n[0], i + n[0].length) : -1; +} +function formatDayOfMonth(d, p) { + return pad(d.getDate(), p, 2); +} +function formatHour24(d, p) { + return pad(d.getHours(), p, 2); +} +function formatHour12(d, p) { + return pad(d.getHours() % 12 || 12, p, 2); +} +function formatDayOfYear(d, p) { + return pad(1 + _index.timeDay.count((0, _index.timeYear)(d), d), p, 3); +} +function formatMilliseconds(d, p) { + return pad(d.getMilliseconds(), p, 3); +} +function formatMicroseconds(d, p) { + return formatMilliseconds(d, p) + "000"; +} +function formatMonthNumber(d, p) { + return pad(d.getMonth() + 1, p, 2); +} +function formatMinutes(d, p) { + return pad(d.getMinutes(), p, 2); +} +function formatSeconds(d, p) { + return pad(d.getSeconds(), p, 2); +} +function formatWeekdayNumberMonday(d) { + var day = d.getDay(); + return day === 0 ? 7 : day; +} +function formatWeekNumberSunday(d, p) { + return pad(_index.timeSunday.count((0, _index.timeYear)(d) - 1, d), p, 2); +} +function dISO(d) { + var day = d.getDay(); + return day >= 4 || day === 0 ? (0, _index.timeThursday)(d) : _index.timeThursday.ceil(d); +} +function formatWeekNumberISO(d, p) { + d = dISO(d); + return pad(_index.timeThursday.count((0, _index.timeYear)(d), d) + ((0, _index.timeYear)(d).getDay() === 4), p, 2); +} +function formatWeekdayNumberSunday(d) { + return d.getDay(); +} +function formatWeekNumberMonday(d, p) { + return pad(_index.timeMonday.count((0, _index.timeYear)(d) - 1, d), p, 2); +} +function formatYear(d, p) { + return pad(d.getFullYear() % 100, p, 2); +} +function formatYearISO(d, p) { + d = dISO(d); + return pad(d.getFullYear() % 100, p, 2); +} +function formatFullYear(d, p) { + return pad(d.getFullYear() % 10000, p, 4); +} +function formatFullYearISO(d, p) { + var day = d.getDay(); + d = day >= 4 || day === 0 ? (0, _index.timeThursday)(d) : _index.timeThursday.ceil(d); + return pad(d.getFullYear() % 10000, p, 4); +} +function formatZone(d) { + var z = d.getTimezoneOffset(); + return (z > 0 ? "-" : (z *= -1, "+")) + pad(z / 60 | 0, "0", 2) + pad(z % 60, "0", 2); +} +function formatUTCDayOfMonth(d, p) { + return pad(d.getUTCDate(), p, 2); +} +function formatUTCHour24(d, p) { + return pad(d.getUTCHours(), p, 2); +} +function formatUTCHour12(d, p) { + return pad(d.getUTCHours() % 12 || 12, p, 2); +} +function formatUTCDayOfYear(d, p) { + return pad(1 + _index.utcDay.count((0, _index.utcYear)(d), d), p, 3); +} +function formatUTCMilliseconds(d, p) { + return pad(d.getUTCMilliseconds(), p, 3); +} +function formatUTCMicroseconds(d, p) { + return formatUTCMilliseconds(d, p) + "000"; +} +function formatUTCMonthNumber(d, p) { + return pad(d.getUTCMonth() + 1, p, 2); +} +function formatUTCMinutes(d, p) { + return pad(d.getUTCMinutes(), p, 2); +} +function formatUTCSeconds(d, p) { + return pad(d.getUTCSeconds(), p, 2); +} +function formatUTCWeekdayNumberMonday(d) { + var dow = d.getUTCDay(); + return dow === 0 ? 7 : dow; +} +function formatUTCWeekNumberSunday(d, p) { + return pad(_index.utcSunday.count((0, _index.utcYear)(d) - 1, d), p, 2); +} +function UTCdISO(d) { + var day = d.getUTCDay(); + return day >= 4 || day === 0 ? (0, _index.utcThursday)(d) : _index.utcThursday.ceil(d); +} +function formatUTCWeekNumberISO(d, p) { + d = UTCdISO(d); + return pad(_index.utcThursday.count((0, _index.utcYear)(d), d) + ((0, _index.utcYear)(d).getUTCDay() === 4), p, 2); +} +function formatUTCWeekdayNumberSunday(d) { + return d.getUTCDay(); +} +function formatUTCWeekNumberMonday(d, p) { + return pad(_index.utcMonday.count((0, _index.utcYear)(d) - 1, d), p, 2); +} +function formatUTCYear(d, p) { + return pad(d.getUTCFullYear() % 100, p, 2); +} +function formatUTCYearISO(d, p) { + d = UTCdISO(d); + return pad(d.getUTCFullYear() % 100, p, 2); +} +function formatUTCFullYear(d, p) { + return pad(d.getUTCFullYear() % 10000, p, 4); +} +function formatUTCFullYearISO(d, p) { + var day = d.getUTCDay(); + d = day >= 4 || day === 0 ? (0, _index.utcThursday)(d) : _index.utcThursday.ceil(d); + return pad(d.getUTCFullYear() % 10000, p, 4); +} +function formatUTCZone() { + return "+0000"; +} +function formatLiteralPercent() { + return "%"; +} +function formatUnixTimestamp(d) { + return +d; +} +function formatUnixTimestampSeconds(d) { + return Math.floor(+d / 1000); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-time/LICENSE b/packages/x-charts-vendor/lib-vendor/d3-time/LICENSE new file mode 100644 index 000000000000..fbe44bdc9ad5 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-time/LICENSE @@ -0,0 +1,13 @@ +Copyright 2010-2022 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/packages/x-charts-vendor/lib-vendor/d3-time/src/day.js b/packages/x-charts-vendor/lib-vendor/d3-time/src/day.js new file mode 100644 index 000000000000..6a3bf656b5fa --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-time/src/day.js @@ -0,0 +1,30 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.utcDays = exports.utcDay = exports.unixDays = exports.unixDay = exports.timeDays = exports.timeDay = void 0; +var _interval = require("./interval.js"); +var _duration = require("./duration.js"); +const timeDay = exports.timeDay = (0, _interval.timeInterval)(date => date.setHours(0, 0, 0, 0), (date, step) => date.setDate(date.getDate() + step), (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * _duration.durationMinute) / _duration.durationDay, date => date.getDate() - 1); +const timeDays = exports.timeDays = timeDay.range; +const utcDay = exports.utcDay = (0, _interval.timeInterval)(date => { + date.setUTCHours(0, 0, 0, 0); +}, (date, step) => { + date.setUTCDate(date.getUTCDate() + step); +}, (start, end) => { + return (end - start) / _duration.durationDay; +}, date => { + return date.getUTCDate() - 1; +}); +const utcDays = exports.utcDays = utcDay.range; +const unixDay = exports.unixDay = (0, _interval.timeInterval)(date => { + date.setUTCHours(0, 0, 0, 0); +}, (date, step) => { + date.setUTCDate(date.getUTCDate() + step); +}, (start, end) => { + return (end - start) / _duration.durationDay; +}, date => { + return Math.floor(date / _duration.durationDay); +}); +const unixDays = exports.unixDays = unixDay.range; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-time/src/duration.js b/packages/x-charts-vendor/lib-vendor/d3-time/src/duration.js new file mode 100644 index 000000000000..6e5e52af362e --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-time/src/duration.js @@ -0,0 +1,13 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.durationYear = exports.durationWeek = exports.durationSecond = exports.durationMonth = exports.durationMinute = exports.durationHour = exports.durationDay = void 0; +const durationSecond = exports.durationSecond = 1000; +const durationMinute = exports.durationMinute = durationSecond * 60; +const durationHour = exports.durationHour = durationMinute * 60; +const durationDay = exports.durationDay = durationHour * 24; +const durationWeek = exports.durationWeek = durationDay * 7; +const durationMonth = exports.durationMonth = durationDay * 30; +const durationYear = exports.durationYear = durationDay * 365; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-time/src/hour.js b/packages/x-charts-vendor/lib-vendor/d3-time/src/hour.js new file mode 100644 index 000000000000..27240e003809 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-time/src/hour.js @@ -0,0 +1,28 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.utcHours = exports.utcHour = exports.timeHours = exports.timeHour = void 0; +var _interval = require("./interval.js"); +var _duration = require("./duration.js"); +const timeHour = exports.timeHour = (0, _interval.timeInterval)(date => { + date.setTime(date - date.getMilliseconds() - date.getSeconds() * _duration.durationSecond - date.getMinutes() * _duration.durationMinute); +}, (date, step) => { + date.setTime(+date + step * _duration.durationHour); +}, (start, end) => { + return (end - start) / _duration.durationHour; +}, date => { + return date.getHours(); +}); +const timeHours = exports.timeHours = timeHour.range; +const utcHour = exports.utcHour = (0, _interval.timeInterval)(date => { + date.setUTCMinutes(0, 0, 0); +}, (date, step) => { + date.setTime(+date + step * _duration.durationHour); +}, (start, end) => { + return (end - start) / _duration.durationHour; +}, date => { + return date.getUTCHours(); +}); +const utcHours = exports.utcHours = utcHour.range; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-time/src/index.js b/packages/x-charts-vendor/lib-vendor/d3-time/src/index.js new file mode 100644 index 000000000000..6bc4b04e71be --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-time/src/index.js @@ -0,0 +1,417 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "timeDay", { + enumerable: true, + get: function () { + return _day.timeDay; + } +}); +Object.defineProperty(exports, "timeDays", { + enumerable: true, + get: function () { + return _day.timeDays; + } +}); +Object.defineProperty(exports, "timeFriday", { + enumerable: true, + get: function () { + return _week.timeFriday; + } +}); +Object.defineProperty(exports, "timeFridays", { + enumerable: true, + get: function () { + return _week.timeFridays; + } +}); +Object.defineProperty(exports, "timeHour", { + enumerable: true, + get: function () { + return _hour.timeHour; + } +}); +Object.defineProperty(exports, "timeHours", { + enumerable: true, + get: function () { + return _hour.timeHours; + } +}); +Object.defineProperty(exports, "timeInterval", { + enumerable: true, + get: function () { + return _interval.timeInterval; + } +}); +Object.defineProperty(exports, "timeMillisecond", { + enumerable: true, + get: function () { + return _millisecond.millisecond; + } +}); +Object.defineProperty(exports, "timeMilliseconds", { + enumerable: true, + get: function () { + return _millisecond.milliseconds; + } +}); +Object.defineProperty(exports, "timeMinute", { + enumerable: true, + get: function () { + return _minute.timeMinute; + } +}); +Object.defineProperty(exports, "timeMinutes", { + enumerable: true, + get: function () { + return _minute.timeMinutes; + } +}); +Object.defineProperty(exports, "timeMonday", { + enumerable: true, + get: function () { + return _week.timeMonday; + } +}); +Object.defineProperty(exports, "timeMondays", { + enumerable: true, + get: function () { + return _week.timeMondays; + } +}); +Object.defineProperty(exports, "timeMonth", { + enumerable: true, + get: function () { + return _month.timeMonth; + } +}); +Object.defineProperty(exports, "timeMonths", { + enumerable: true, + get: function () { + return _month.timeMonths; + } +}); +Object.defineProperty(exports, "timeSaturday", { + enumerable: true, + get: function () { + return _week.timeSaturday; + } +}); +Object.defineProperty(exports, "timeSaturdays", { + enumerable: true, + get: function () { + return _week.timeSaturdays; + } +}); +Object.defineProperty(exports, "timeSecond", { + enumerable: true, + get: function () { + return _second.second; + } +}); +Object.defineProperty(exports, "timeSeconds", { + enumerable: true, + get: function () { + return _second.seconds; + } +}); +Object.defineProperty(exports, "timeSunday", { + enumerable: true, + get: function () { + return _week.timeSunday; + } +}); +Object.defineProperty(exports, "timeSundays", { + enumerable: true, + get: function () { + return _week.timeSundays; + } +}); +Object.defineProperty(exports, "timeThursday", { + enumerable: true, + get: function () { + return _week.timeThursday; + } +}); +Object.defineProperty(exports, "timeThursdays", { + enumerable: true, + get: function () { + return _week.timeThursdays; + } +}); +Object.defineProperty(exports, "timeTickInterval", { + enumerable: true, + get: function () { + return _ticks.timeTickInterval; + } +}); +Object.defineProperty(exports, "timeTicks", { + enumerable: true, + get: function () { + return _ticks.timeTicks; + } +}); +Object.defineProperty(exports, "timeTuesday", { + enumerable: true, + get: function () { + return _week.timeTuesday; + } +}); +Object.defineProperty(exports, "timeTuesdays", { + enumerable: true, + get: function () { + return _week.timeTuesdays; + } +}); +Object.defineProperty(exports, "timeWednesday", { + enumerable: true, + get: function () { + return _week.timeWednesday; + } +}); +Object.defineProperty(exports, "timeWednesdays", { + enumerable: true, + get: function () { + return _week.timeWednesdays; + } +}); +Object.defineProperty(exports, "timeWeek", { + enumerable: true, + get: function () { + return _week.timeSunday; + } +}); +Object.defineProperty(exports, "timeWeeks", { + enumerable: true, + get: function () { + return _week.timeSundays; + } +}); +Object.defineProperty(exports, "timeYear", { + enumerable: true, + get: function () { + return _year.timeYear; + } +}); +Object.defineProperty(exports, "timeYears", { + enumerable: true, + get: function () { + return _year.timeYears; + } +}); +Object.defineProperty(exports, "unixDay", { + enumerable: true, + get: function () { + return _day.unixDay; + } +}); +Object.defineProperty(exports, "unixDays", { + enumerable: true, + get: function () { + return _day.unixDays; + } +}); +Object.defineProperty(exports, "utcDay", { + enumerable: true, + get: function () { + return _day.utcDay; + } +}); +Object.defineProperty(exports, "utcDays", { + enumerable: true, + get: function () { + return _day.utcDays; + } +}); +Object.defineProperty(exports, "utcFriday", { + enumerable: true, + get: function () { + return _week.utcFriday; + } +}); +Object.defineProperty(exports, "utcFridays", { + enumerable: true, + get: function () { + return _week.utcFridays; + } +}); +Object.defineProperty(exports, "utcHour", { + enumerable: true, + get: function () { + return _hour.utcHour; + } +}); +Object.defineProperty(exports, "utcHours", { + enumerable: true, + get: function () { + return _hour.utcHours; + } +}); +Object.defineProperty(exports, "utcMillisecond", { + enumerable: true, + get: function () { + return _millisecond.millisecond; + } +}); +Object.defineProperty(exports, "utcMilliseconds", { + enumerable: true, + get: function () { + return _millisecond.milliseconds; + } +}); +Object.defineProperty(exports, "utcMinute", { + enumerable: true, + get: function () { + return _minute.utcMinute; + } +}); +Object.defineProperty(exports, "utcMinutes", { + enumerable: true, + get: function () { + return _minute.utcMinutes; + } +}); +Object.defineProperty(exports, "utcMonday", { + enumerable: true, + get: function () { + return _week.utcMonday; + } +}); +Object.defineProperty(exports, "utcMondays", { + enumerable: true, + get: function () { + return _week.utcMondays; + } +}); +Object.defineProperty(exports, "utcMonth", { + enumerable: true, + get: function () { + return _month.utcMonth; + } +}); +Object.defineProperty(exports, "utcMonths", { + enumerable: true, + get: function () { + return _month.utcMonths; + } +}); +Object.defineProperty(exports, "utcSaturday", { + enumerable: true, + get: function () { + return _week.utcSaturday; + } +}); +Object.defineProperty(exports, "utcSaturdays", { + enumerable: true, + get: function () { + return _week.utcSaturdays; + } +}); +Object.defineProperty(exports, "utcSecond", { + enumerable: true, + get: function () { + return _second.second; + } +}); +Object.defineProperty(exports, "utcSeconds", { + enumerable: true, + get: function () { + return _second.seconds; + } +}); +Object.defineProperty(exports, "utcSunday", { + enumerable: true, + get: function () { + return _week.utcSunday; + } +}); +Object.defineProperty(exports, "utcSundays", { + enumerable: true, + get: function () { + return _week.utcSundays; + } +}); +Object.defineProperty(exports, "utcThursday", { + enumerable: true, + get: function () { + return _week.utcThursday; + } +}); +Object.defineProperty(exports, "utcThursdays", { + enumerable: true, + get: function () { + return _week.utcThursdays; + } +}); +Object.defineProperty(exports, "utcTickInterval", { + enumerable: true, + get: function () { + return _ticks.utcTickInterval; + } +}); +Object.defineProperty(exports, "utcTicks", { + enumerable: true, + get: function () { + return _ticks.utcTicks; + } +}); +Object.defineProperty(exports, "utcTuesday", { + enumerable: true, + get: function () { + return _week.utcTuesday; + } +}); +Object.defineProperty(exports, "utcTuesdays", { + enumerable: true, + get: function () { + return _week.utcTuesdays; + } +}); +Object.defineProperty(exports, "utcWednesday", { + enumerable: true, + get: function () { + return _week.utcWednesday; + } +}); +Object.defineProperty(exports, "utcWednesdays", { + enumerable: true, + get: function () { + return _week.utcWednesdays; + } +}); +Object.defineProperty(exports, "utcWeek", { + enumerable: true, + get: function () { + return _week.utcSunday; + } +}); +Object.defineProperty(exports, "utcWeeks", { + enumerable: true, + get: function () { + return _week.utcSundays; + } +}); +Object.defineProperty(exports, "utcYear", { + enumerable: true, + get: function () { + return _year.utcYear; + } +}); +Object.defineProperty(exports, "utcYears", { + enumerable: true, + get: function () { + return _year.utcYears; + } +}); +var _interval = require("./interval.js"); +var _millisecond = require("./millisecond.js"); +var _second = require("./second.js"); +var _minute = require("./minute.js"); +var _hour = require("./hour.js"); +var _day = require("./day.js"); +var _week = require("./week.js"); +var _month = require("./month.js"); +var _year = require("./year.js"); +var _ticks = require("./ticks.js"); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-time/src/interval.js b/packages/x-charts-vendor/lib-vendor/d3-time/src/interval.js new file mode 100644 index 000000000000..1049b7a19fc8 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-time/src/interval.js @@ -0,0 +1,61 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.timeInterval = timeInterval; +const t0 = new Date(), + t1 = new Date(); +function timeInterval(floori, offseti, count, field) { + function interval(date) { + return floori(date = arguments.length === 0 ? new Date() : new Date(+date)), date; + } + interval.floor = date => { + return floori(date = new Date(+date)), date; + }; + interval.ceil = date => { + return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date; + }; + interval.round = date => { + const d0 = interval(date), + d1 = interval.ceil(date); + return date - d0 < d1 - date ? d0 : d1; + }; + interval.offset = (date, step) => { + return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date; + }; + interval.range = (start, stop, step) => { + const range = []; + start = interval.ceil(start); + step = step == null ? 1 : Math.floor(step); + if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date + let previous; + do range.push(previous = new Date(+start)), offseti(start, step), floori(start); while (previous < start && start < stop); + return range; + }; + interval.filter = test => { + return timeInterval(date => { + if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1); + }, (date, step) => { + if (date >= date) { + if (step < 0) while (++step <= 0) { + while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty + } else while (--step >= 0) { + while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty + } + } + }); + }; + if (count) { + interval.count = (start, end) => { + t0.setTime(+start), t1.setTime(+end); + floori(t0), floori(t1); + return Math.floor(count(t0, t1)); + }; + interval.every = step => { + step = Math.floor(step); + return !isFinite(step) || !(step > 0) ? null : !(step > 1) ? interval : interval.filter(field ? d => field(d) % step === 0 : d => interval.count(0, d) % step === 0); + }; + } + return interval; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-time/src/millisecond.js b/packages/x-charts-vendor/lib-vendor/d3-time/src/millisecond.js new file mode 100644 index 000000000000..2f1538a42971 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-time/src/millisecond.js @@ -0,0 +1,29 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.milliseconds = exports.millisecond = void 0; +var _interval = require("./interval.js"); +const millisecond = exports.millisecond = (0, _interval.timeInterval)(() => { + // noop +}, (date, step) => { + date.setTime(+date + step); +}, (start, end) => { + return end - start; +}); + +// An optimized implementation for this simple case. +millisecond.every = k => { + k = Math.floor(k); + if (!isFinite(k) || !(k > 0)) return null; + if (!(k > 1)) return millisecond; + return (0, _interval.timeInterval)(date => { + date.setTime(Math.floor(date / k) * k); + }, (date, step) => { + date.setTime(+date + step * k); + }, (start, end) => { + return (end - start) / k; + }); +}; +const milliseconds = exports.milliseconds = millisecond.range; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-time/src/minute.js b/packages/x-charts-vendor/lib-vendor/d3-time/src/minute.js new file mode 100644 index 000000000000..644dea7a38e7 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-time/src/minute.js @@ -0,0 +1,28 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.utcMinutes = exports.utcMinute = exports.timeMinutes = exports.timeMinute = void 0; +var _interval = require("./interval.js"); +var _duration = require("./duration.js"); +const timeMinute = exports.timeMinute = (0, _interval.timeInterval)(date => { + date.setTime(date - date.getMilliseconds() - date.getSeconds() * _duration.durationSecond); +}, (date, step) => { + date.setTime(+date + step * _duration.durationMinute); +}, (start, end) => { + return (end - start) / _duration.durationMinute; +}, date => { + return date.getMinutes(); +}); +const timeMinutes = exports.timeMinutes = timeMinute.range; +const utcMinute = exports.utcMinute = (0, _interval.timeInterval)(date => { + date.setUTCSeconds(0, 0); +}, (date, step) => { + date.setTime(+date + step * _duration.durationMinute); +}, (start, end) => { + return (end - start) / _duration.durationMinute; +}, date => { + return date.getUTCMinutes(); +}); +const utcMinutes = exports.utcMinutes = utcMinute.range; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-time/src/month.js b/packages/x-charts-vendor/lib-vendor/d3-time/src/month.js new file mode 100644 index 000000000000..3caa95557231 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-time/src/month.js @@ -0,0 +1,29 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.utcMonths = exports.utcMonth = exports.timeMonths = exports.timeMonth = void 0; +var _interval = require("./interval.js"); +const timeMonth = exports.timeMonth = (0, _interval.timeInterval)(date => { + date.setDate(1); + date.setHours(0, 0, 0, 0); +}, (date, step) => { + date.setMonth(date.getMonth() + step); +}, (start, end) => { + return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12; +}, date => { + return date.getMonth(); +}); +const timeMonths = exports.timeMonths = timeMonth.range; +const utcMonth = exports.utcMonth = (0, _interval.timeInterval)(date => { + date.setUTCDate(1); + date.setUTCHours(0, 0, 0, 0); +}, (date, step) => { + date.setUTCMonth(date.getUTCMonth() + step); +}, (start, end) => { + return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12; +}, date => { + return date.getUTCMonth(); +}); +const utcMonths = exports.utcMonths = utcMonth.range; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-time/src/second.js b/packages/x-charts-vendor/lib-vendor/d3-time/src/second.js new file mode 100644 index 000000000000..abb57fc0780b --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-time/src/second.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.seconds = exports.second = void 0; +var _interval = require("./interval.js"); +var _duration = require("./duration.js"); +const second = exports.second = (0, _interval.timeInterval)(date => { + date.setTime(date - date.getMilliseconds()); +}, (date, step) => { + date.setTime(+date + step * _duration.durationSecond); +}, (start, end) => { + return (end - start) / _duration.durationSecond; +}, date => { + return date.getUTCSeconds(); +}); +const seconds = exports.seconds = second.range; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-time/src/ticks.js b/packages/x-charts-vendor/lib-vendor/d3-time/src/ticks.js new file mode 100644 index 000000000000..063d82c5b91e --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-time/src/ticks.js @@ -0,0 +1,41 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.utcTicks = exports.utcTickInterval = exports.timeTicks = exports.timeTickInterval = void 0; +var _index = require("../../../lib-vendor/d3-array/src/index.js"); +var _duration = require("./duration.js"); +var _millisecond = require("./millisecond.js"); +var _second = require("./second.js"); +var _minute = require("./minute.js"); +var _hour = require("./hour.js"); +var _day = require("./day.js"); +var _week = require("./week.js"); +var _month = require("./month.js"); +var _year = require("./year.js"); +function ticker(year, month, week, day, hour, minute) { + const tickIntervals = [[_second.second, 1, _duration.durationSecond], [_second.second, 5, 5 * _duration.durationSecond], [_second.second, 15, 15 * _duration.durationSecond], [_second.second, 30, 30 * _duration.durationSecond], [minute, 1, _duration.durationMinute], [minute, 5, 5 * _duration.durationMinute], [minute, 15, 15 * _duration.durationMinute], [minute, 30, 30 * _duration.durationMinute], [hour, 1, _duration.durationHour], [hour, 3, 3 * _duration.durationHour], [hour, 6, 6 * _duration.durationHour], [hour, 12, 12 * _duration.durationHour], [day, 1, _duration.durationDay], [day, 2, 2 * _duration.durationDay], [week, 1, _duration.durationWeek], [month, 1, _duration.durationMonth], [month, 3, 3 * _duration.durationMonth], [year, 1, _duration.durationYear]]; + function ticks(start, stop, count) { + const reverse = stop < start; + if (reverse) [start, stop] = [stop, start]; + const interval = count && typeof count.range === "function" ? count : tickInterval(start, stop, count); + const ticks = interval ? interval.range(start, +stop + 1) : []; // inclusive stop + return reverse ? ticks.reverse() : ticks; + } + function tickInterval(start, stop, count) { + const target = Math.abs(stop - start) / count; + const i = (0, _index.bisector)(([,, step]) => step).right(tickIntervals, target); + if (i === tickIntervals.length) return year.every((0, _index.tickStep)(start / _duration.durationYear, stop / _duration.durationYear, count)); + if (i === 0) return _millisecond.millisecond.every(Math.max((0, _index.tickStep)(start, stop, count), 1)); + const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i]; + return t.every(step); + } + return [ticks, tickInterval]; +} +const [utcTicks, utcTickInterval] = ticker(_year.utcYear, _month.utcMonth, _week.utcSunday, _day.unixDay, _hour.utcHour, _minute.utcMinute); +exports.utcTickInterval = utcTickInterval; +exports.utcTicks = utcTicks; +const [timeTicks, timeTickInterval] = ticker(_year.timeYear, _month.timeMonth, _week.timeSunday, _day.timeDay, _hour.timeHour, _minute.timeMinute); +exports.timeTickInterval = timeTickInterval; +exports.timeTicks = timeTicks; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-time/src/week.js b/packages/x-charts-vendor/lib-vendor/d3-time/src/week.js new file mode 100644 index 000000000000..8f0904213e04 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-time/src/week.js @@ -0,0 +1,56 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.utcWednesdays = exports.utcWednesday = exports.utcTuesdays = exports.utcTuesday = exports.utcThursdays = exports.utcThursday = exports.utcSundays = exports.utcSunday = exports.utcSaturdays = exports.utcSaturday = exports.utcMondays = exports.utcMonday = exports.utcFridays = exports.utcFriday = exports.timeWednesdays = exports.timeWednesday = exports.timeTuesdays = exports.timeTuesday = exports.timeThursdays = exports.timeThursday = exports.timeSundays = exports.timeSunday = exports.timeSaturdays = exports.timeSaturday = exports.timeMondays = exports.timeMonday = exports.timeFridays = exports.timeFriday = void 0; +var _interval = require("./interval.js"); +var _duration = require("./duration.js"); +function timeWeekday(i) { + return (0, _interval.timeInterval)(date => { + date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7); + date.setHours(0, 0, 0, 0); + }, (date, step) => { + date.setDate(date.getDate() + step * 7); + }, (start, end) => { + return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * _duration.durationMinute) / _duration.durationWeek; + }); +} +const timeSunday = exports.timeSunday = timeWeekday(0); +const timeMonday = exports.timeMonday = timeWeekday(1); +const timeTuesday = exports.timeTuesday = timeWeekday(2); +const timeWednesday = exports.timeWednesday = timeWeekday(3); +const timeThursday = exports.timeThursday = timeWeekday(4); +const timeFriday = exports.timeFriday = timeWeekday(5); +const timeSaturday = exports.timeSaturday = timeWeekday(6); +const timeSundays = exports.timeSundays = timeSunday.range; +const timeMondays = exports.timeMondays = timeMonday.range; +const timeTuesdays = exports.timeTuesdays = timeTuesday.range; +const timeWednesdays = exports.timeWednesdays = timeWednesday.range; +const timeThursdays = exports.timeThursdays = timeThursday.range; +const timeFridays = exports.timeFridays = timeFriday.range; +const timeSaturdays = exports.timeSaturdays = timeSaturday.range; +function utcWeekday(i) { + return (0, _interval.timeInterval)(date => { + date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7); + date.setUTCHours(0, 0, 0, 0); + }, (date, step) => { + date.setUTCDate(date.getUTCDate() + step * 7); + }, (start, end) => { + return (end - start) / _duration.durationWeek; + }); +} +const utcSunday = exports.utcSunday = utcWeekday(0); +const utcMonday = exports.utcMonday = utcWeekday(1); +const utcTuesday = exports.utcTuesday = utcWeekday(2); +const utcWednesday = exports.utcWednesday = utcWeekday(3); +const utcThursday = exports.utcThursday = utcWeekday(4); +const utcFriday = exports.utcFriday = utcWeekday(5); +const utcSaturday = exports.utcSaturday = utcWeekday(6); +const utcSundays = exports.utcSundays = utcSunday.range; +const utcMondays = exports.utcMondays = utcMonday.range; +const utcTuesdays = exports.utcTuesdays = utcTuesday.range; +const utcWednesdays = exports.utcWednesdays = utcWednesday.range; +const utcThursdays = exports.utcThursdays = utcThursday.range; +const utcFridays = exports.utcFridays = utcFriday.range; +const utcSaturdays = exports.utcSaturdays = utcSaturday.range; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/d3-time/src/year.js b/packages/x-charts-vendor/lib-vendor/d3-time/src/year.js new file mode 100644 index 000000000000..b5b890d95c52 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/d3-time/src/year.js @@ -0,0 +1,51 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.utcYears = exports.utcYear = exports.timeYears = exports.timeYear = void 0; +var _interval = require("./interval.js"); +const timeYear = exports.timeYear = (0, _interval.timeInterval)(date => { + date.setMonth(0, 1); + date.setHours(0, 0, 0, 0); +}, (date, step) => { + date.setFullYear(date.getFullYear() + step); +}, (start, end) => { + return end.getFullYear() - start.getFullYear(); +}, date => { + return date.getFullYear(); +}); + +// An optimized implementation for this simple case. +timeYear.every = k => { + return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : (0, _interval.timeInterval)(date => { + date.setFullYear(Math.floor(date.getFullYear() / k) * k); + date.setMonth(0, 1); + date.setHours(0, 0, 0, 0); + }, (date, step) => { + date.setFullYear(date.getFullYear() + step * k); + }); +}; +const timeYears = exports.timeYears = timeYear.range; +const utcYear = exports.utcYear = (0, _interval.timeInterval)(date => { + date.setUTCMonth(0, 1); + date.setUTCHours(0, 0, 0, 0); +}, (date, step) => { + date.setUTCFullYear(date.getUTCFullYear() + step); +}, (start, end) => { + return end.getUTCFullYear() - start.getUTCFullYear(); +}, date => { + return date.getUTCFullYear(); +}); + +// An optimized implementation for this simple case. +utcYear.every = k => { + return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : (0, _interval.timeInterval)(date => { + date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k); + date.setUTCMonth(0, 1); + date.setUTCHours(0, 0, 0, 0); + }, (date, step) => { + date.setUTCFullYear(date.getUTCFullYear() + step * k); + }); +}; +const utcYears = exports.utcYears = utcYear.range; \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/delaunator/LICENSE b/packages/x-charts-vendor/lib-vendor/delaunator/LICENSE new file mode 100644 index 000000000000..631921c40afa --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/delaunator/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2021, Mapbox + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/packages/x-charts-vendor/lib-vendor/delaunator/delaunator.js b/packages/x-charts-vendor/lib-vendor/delaunator/delaunator.js new file mode 100644 index 000000000000..9f64c7ef772d --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/delaunator/delaunator.js @@ -0,0 +1,688 @@ +"use strict"; + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Delaunator = factory()); +})(this, function () { + 'use strict'; + + const epsilon = 1.1102230246251565e-16; + const splitter = 134217729; + const resulterrbound = (3 + 8 * epsilon) * epsilon; + + // fast_expansion_sum_zeroelim routine from oritinal code + function sum(elen, e, flen, f, h) { + let Q, Qnew, hh, bvirt; + let enow = e[0]; + let fnow = f[0]; + let eindex = 0; + let findex = 0; + if (fnow > enow === fnow > -enow) { + Q = enow; + enow = e[++eindex]; + } else { + Q = fnow; + fnow = f[++findex]; + } + let hindex = 0; + if (eindex < elen && findex < flen) { + if (fnow > enow === fnow > -enow) { + Qnew = enow + Q; + hh = Q - (Qnew - enow); + enow = e[++eindex]; + } else { + Qnew = fnow + Q; + hh = Q - (Qnew - fnow); + fnow = f[++findex]; + } + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + while (eindex < elen && findex < flen) { + if (fnow > enow === fnow > -enow) { + Qnew = Q + enow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (enow - bvirt); + enow = e[++eindex]; + } else { + Qnew = Q + fnow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (fnow - bvirt); + fnow = f[++findex]; + } + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + } + while (eindex < elen) { + Qnew = Q + enow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (enow - bvirt); + enow = e[++eindex]; + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + while (findex < flen) { + Qnew = Q + fnow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (fnow - bvirt); + fnow = f[++findex]; + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + if (Q !== 0 || hindex === 0) { + h[hindex++] = Q; + } + return hindex; + } + function estimate(elen, e) { + let Q = e[0]; + for (let i = 1; i < elen; i++) Q += e[i]; + return Q; + } + function vec(n) { + return new Float64Array(n); + } + const ccwerrboundA = (3 + 16 * epsilon) * epsilon; + const ccwerrboundB = (2 + 12 * epsilon) * epsilon; + const ccwerrboundC = (9 + 64 * epsilon) * epsilon * epsilon; + const B = vec(4); + const C1 = vec(8); + const C2 = vec(12); + const D = vec(16); + const u = vec(4); + function orient2dadapt(ax, ay, bx, by, cx, cy, detsum) { + let acxtail, acytail, bcxtail, bcytail; + let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3; + const acx = ax - cx; + const bcx = bx - cx; + const acy = ay - cy; + const bcy = by - cy; + s1 = acx * bcy; + c = splitter * acx; + ahi = c - (c - acx); + alo = acx - ahi; + c = splitter * bcy; + bhi = c - (c - bcy); + blo = bcy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = acy * bcx; + c = splitter * acy; + ahi = c - (c - acy); + alo = acy - ahi; + c = splitter * bcx; + bhi = c - (c - bcx); + blo = bcx - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + B[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + B[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + B[2] = _j - (u3 - bvirt) + (_i - bvirt); + B[3] = u3; + let det = estimate(4, B); + let errbound = ccwerrboundB * detsum; + if (det >= errbound || -det >= errbound) { + return det; + } + bvirt = ax - acx; + acxtail = ax - (acx + bvirt) + (bvirt - cx); + bvirt = bx - bcx; + bcxtail = bx - (bcx + bvirt) + (bvirt - cx); + bvirt = ay - acy; + acytail = ay - (acy + bvirt) + (bvirt - cy); + bvirt = by - bcy; + bcytail = by - (bcy + bvirt) + (bvirt - cy); + if (acxtail === 0 && acytail === 0 && bcxtail === 0 && bcytail === 0) { + return det; + } + errbound = ccwerrboundC * detsum + resulterrbound * Math.abs(det); + det += acx * bcytail + bcy * acxtail - (acy * bcxtail + bcx * acytail); + if (det >= errbound || -det >= errbound) return det; + s1 = acxtail * bcy; + c = splitter * acxtail; + ahi = c - (c - acxtail); + alo = acxtail - ahi; + c = splitter * bcy; + bhi = c - (c - bcy); + blo = bcy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = acytail * bcx; + c = splitter * acytail; + ahi = c - (c - acytail); + alo = acytail - ahi; + c = splitter * bcx; + bhi = c - (c - bcx); + blo = bcx - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + u[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + u[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + u[2] = _j - (u3 - bvirt) + (_i - bvirt); + u[3] = u3; + const C1len = sum(4, B, 4, u, C1); + s1 = acx * bcytail; + c = splitter * acx; + ahi = c - (c - acx); + alo = acx - ahi; + c = splitter * bcytail; + bhi = c - (c - bcytail); + blo = bcytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = acy * bcxtail; + c = splitter * acy; + ahi = c - (c - acy); + alo = acy - ahi; + c = splitter * bcxtail; + bhi = c - (c - bcxtail); + blo = bcxtail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + u[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + u[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + u[2] = _j - (u3 - bvirt) + (_i - bvirt); + u[3] = u3; + const C2len = sum(C1len, C1, 4, u, C2); + s1 = acxtail * bcytail; + c = splitter * acxtail; + ahi = c - (c - acxtail); + alo = acxtail - ahi; + c = splitter * bcytail; + bhi = c - (c - bcytail); + blo = bcytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = acytail * bcxtail; + c = splitter * acytail; + ahi = c - (c - acytail); + alo = acytail - ahi; + c = splitter * bcxtail; + bhi = c - (c - bcxtail); + blo = bcxtail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + u[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + u[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + u[2] = _j - (u3 - bvirt) + (_i - bvirt); + u[3] = u3; + const Dlen = sum(C2len, C2, 4, u, D); + return D[Dlen - 1]; + } + function orient2d(ax, ay, bx, by, cx, cy) { + const detleft = (ay - cy) * (bx - cx); + const detright = (ax - cx) * (by - cy); + const det = detleft - detright; + const detsum = Math.abs(detleft + detright); + if (Math.abs(det) >= ccwerrboundA * detsum) return det; + return -orient2dadapt(ax, ay, bx, by, cx, cy, detsum); + } + const EPSILON = Math.pow(2, -52); + const EDGE_STACK = new Uint32Array(512); + class Delaunator { + static from(points, getX = defaultGetX, getY = defaultGetY) { + const n = points.length; + const coords = new Float64Array(n * 2); + for (let i = 0; i < n; i++) { + const p = points[i]; + coords[2 * i] = getX(p); + coords[2 * i + 1] = getY(p); + } + return new Delaunator(coords); + } + constructor(coords) { + const n = coords.length >> 1; + if (n > 0 && typeof coords[0] !== 'number') throw new Error('Expected coords to contain numbers.'); + this.coords = coords; + + // arrays that will store the triangulation graph + const maxTriangles = Math.max(2 * n - 5, 0); + this._triangles = new Uint32Array(maxTriangles * 3); + this._halfedges = new Int32Array(maxTriangles * 3); + + // temporary arrays for tracking the edges of the advancing convex hull + this._hashSize = Math.ceil(Math.sqrt(n)); + this._hullPrev = new Uint32Array(n); // edge to prev edge + this._hullNext = new Uint32Array(n); // edge to next edge + this._hullTri = new Uint32Array(n); // edge to adjacent triangle + this._hullHash = new Int32Array(this._hashSize); // angular edge hash + + // temporary arrays for sorting points + this._ids = new Uint32Array(n); + this._dists = new Float64Array(n); + this.update(); + } + update() { + const { + coords, + _hullPrev: hullPrev, + _hullNext: hullNext, + _hullTri: hullTri, + _hullHash: hullHash + } = this; + const n = coords.length >> 1; + + // populate an array of point indices; calculate input data bbox + let minX = Infinity; + let minY = Infinity; + let maxX = -Infinity; + let maxY = -Infinity; + for (let i = 0; i < n; i++) { + const x = coords[2 * i]; + const y = coords[2 * i + 1]; + if (x < minX) minX = x; + if (y < minY) minY = y; + if (x > maxX) maxX = x; + if (y > maxY) maxY = y; + this._ids[i] = i; + } + const cx = (minX + maxX) / 2; + const cy = (minY + maxY) / 2; + let i0, i1, i2; + + // pick a seed point close to the center + for (let i = 0, minDist = Infinity; i < n; i++) { + const d = dist(cx, cy, coords[2 * i], coords[2 * i + 1]); + if (d < minDist) { + i0 = i; + minDist = d; + } + } + const i0x = coords[2 * i0]; + const i0y = coords[2 * i0 + 1]; + + // find the point closest to the seed + for (let i = 0, minDist = Infinity; i < n; i++) { + if (i === i0) continue; + const d = dist(i0x, i0y, coords[2 * i], coords[2 * i + 1]); + if (d < minDist && d > 0) { + i1 = i; + minDist = d; + } + } + let i1x = coords[2 * i1]; + let i1y = coords[2 * i1 + 1]; + let minRadius = Infinity; + + // find the third point which forms the smallest circumcircle with the first two + for (let i = 0; i < n; i++) { + if (i === i0 || i === i1) continue; + const r = circumradius(i0x, i0y, i1x, i1y, coords[2 * i], coords[2 * i + 1]); + if (r < minRadius) { + i2 = i; + minRadius = r; + } + } + let i2x = coords[2 * i2]; + let i2y = coords[2 * i2 + 1]; + if (minRadius === Infinity) { + // order collinear points by dx (or dy if all x are identical) + // and return the list as a hull + for (let i = 0; i < n; i++) { + this._dists[i] = coords[2 * i] - coords[0] || coords[2 * i + 1] - coords[1]; + } + quicksort(this._ids, this._dists, 0, n - 1); + const hull = new Uint32Array(n); + let j = 0; + for (let i = 0, d0 = -Infinity; i < n; i++) { + const id = this._ids[i]; + const d = this._dists[id]; + if (d > d0) { + hull[j++] = id; + d0 = d; + } + } + this.hull = hull.subarray(0, j); + this.triangles = new Uint32Array(0); + this.halfedges = new Uint32Array(0); + return; + } + + // swap the order of the seed points for counter-clockwise orientation + if (orient2d(i0x, i0y, i1x, i1y, i2x, i2y) < 0) { + const i = i1; + const x = i1x; + const y = i1y; + i1 = i2; + i1x = i2x; + i1y = i2y; + i2 = i; + i2x = x; + i2y = y; + } + const center = circumcenter(i0x, i0y, i1x, i1y, i2x, i2y); + this._cx = center.x; + this._cy = center.y; + for (let i = 0; i < n; i++) { + this._dists[i] = dist(coords[2 * i], coords[2 * i + 1], center.x, center.y); + } + + // sort the points by distance from the seed triangle circumcenter + quicksort(this._ids, this._dists, 0, n - 1); + + // set up the seed triangle as the starting hull + this._hullStart = i0; + let hullSize = 3; + hullNext[i0] = hullPrev[i2] = i1; + hullNext[i1] = hullPrev[i0] = i2; + hullNext[i2] = hullPrev[i1] = i0; + hullTri[i0] = 0; + hullTri[i1] = 1; + hullTri[i2] = 2; + hullHash.fill(-1); + hullHash[this._hashKey(i0x, i0y)] = i0; + hullHash[this._hashKey(i1x, i1y)] = i1; + hullHash[this._hashKey(i2x, i2y)] = i2; + this.trianglesLen = 0; + this._addTriangle(i0, i1, i2, -1, -1, -1); + for (let k = 0, xp, yp; k < this._ids.length; k++) { + const i = this._ids[k]; + const x = coords[2 * i]; + const y = coords[2 * i + 1]; + + // skip near-duplicate points + if (k > 0 && Math.abs(x - xp) <= EPSILON && Math.abs(y - yp) <= EPSILON) continue; + xp = x; + yp = y; + + // skip seed triangle points + if (i === i0 || i === i1 || i === i2) continue; + + // find a visible edge on the convex hull using edge hash + let start = 0; + for (let j = 0, key = this._hashKey(x, y); j < this._hashSize; j++) { + start = hullHash[(key + j) % this._hashSize]; + if (start !== -1 && start !== hullNext[start]) break; + } + start = hullPrev[start]; + let e = start, + q; + while (q = hullNext[e], orient2d(x, y, coords[2 * e], coords[2 * e + 1], coords[2 * q], coords[2 * q + 1]) >= 0) { + e = q; + if (e === start) { + e = -1; + break; + } + } + if (e === -1) continue; // likely a near-duplicate point; skip it + + // add the first triangle from the point + let t = this._addTriangle(e, i, hullNext[e], -1, -1, hullTri[e]); + + // recursively flip triangles from the point until they satisfy the Delaunay condition + hullTri[i] = this._legalize(t + 2); + hullTri[e] = t; // keep track of boundary triangles on the hull + hullSize++; + + // walk forward through the hull, adding more triangles and flipping recursively + let n = hullNext[e]; + while (q = hullNext[n], orient2d(x, y, coords[2 * n], coords[2 * n + 1], coords[2 * q], coords[2 * q + 1]) < 0) { + t = this._addTriangle(n, i, q, hullTri[i], -1, hullTri[n]); + hullTri[i] = this._legalize(t + 2); + hullNext[n] = n; // mark as removed + hullSize--; + n = q; + } + + // walk backward from the other side, adding more triangles and flipping + if (e === start) { + while (q = hullPrev[e], orient2d(x, y, coords[2 * q], coords[2 * q + 1], coords[2 * e], coords[2 * e + 1]) < 0) { + t = this._addTriangle(q, i, e, -1, hullTri[e], hullTri[q]); + this._legalize(t + 2); + hullTri[q] = t; + hullNext[e] = e; // mark as removed + hullSize--; + e = q; + } + } + + // update the hull indices + this._hullStart = hullPrev[i] = e; + hullNext[e] = hullPrev[n] = i; + hullNext[i] = n; + + // save the two new edges in the hash table + hullHash[this._hashKey(x, y)] = i; + hullHash[this._hashKey(coords[2 * e], coords[2 * e + 1])] = e; + } + this.hull = new Uint32Array(hullSize); + for (let i = 0, e = this._hullStart; i < hullSize; i++) { + this.hull[i] = e; + e = hullNext[e]; + } + + // trim typed triangle mesh arrays + this.triangles = this._triangles.subarray(0, this.trianglesLen); + this.halfedges = this._halfedges.subarray(0, this.trianglesLen); + } + _hashKey(x, y) { + return Math.floor(pseudoAngle(x - this._cx, y - this._cy) * this._hashSize) % this._hashSize; + } + _legalize(a) { + const { + _triangles: triangles, + _halfedges: halfedges, + coords + } = this; + let i = 0; + let ar = 0; + + // recursion eliminated with a fixed-size stack + while (true) { + const b = halfedges[a]; + + /* if the pair of triangles doesn't satisfy the Delaunay condition + * (p1 is inside the circumcircle of [p0, pl, pr]), flip them, + * then do the same check/flip recursively for the new pair of triangles + * + * pl pl + * /||\ / \ + * al/ || \bl al/ \a + * / || \ / \ + * / a||b \ flip /___ar___\ + * p0\ || /p1 => p0\---bl---/p1 + * \ || / \ / + * ar\ || /br b\ /br + * \||/ \ / + * pr pr + */ + const a0 = a - a % 3; + ar = a0 + (a + 2) % 3; + if (b === -1) { + // convex hull edge + if (i === 0) break; + a = EDGE_STACK[--i]; + continue; + } + const b0 = b - b % 3; + const al = a0 + (a + 1) % 3; + const bl = b0 + (b + 2) % 3; + const p0 = triangles[ar]; + const pr = triangles[a]; + const pl = triangles[al]; + const p1 = triangles[bl]; + const illegal = inCircle(coords[2 * p0], coords[2 * p0 + 1], coords[2 * pr], coords[2 * pr + 1], coords[2 * pl], coords[2 * pl + 1], coords[2 * p1], coords[2 * p1 + 1]); + if (illegal) { + triangles[a] = p1; + triangles[b] = p0; + const hbl = halfedges[bl]; + + // edge swapped on the other side of the hull (rare); fix the halfedge reference + if (hbl === -1) { + let e = this._hullStart; + do { + if (this._hullTri[e] === bl) { + this._hullTri[e] = a; + break; + } + e = this._hullPrev[e]; + } while (e !== this._hullStart); + } + this._link(a, hbl); + this._link(b, halfedges[ar]); + this._link(ar, bl); + const br = b0 + (b + 1) % 3; + + // don't worry about hitting the cap: it can only happen on extremely degenerate input + if (i < EDGE_STACK.length) { + EDGE_STACK[i++] = br; + } + } else { + if (i === 0) break; + a = EDGE_STACK[--i]; + } + } + return ar; + } + _link(a, b) { + this._halfedges[a] = b; + if (b !== -1) this._halfedges[b] = a; + } + + // add a new triangle given vertex indices and adjacent half-edge ids + _addTriangle(i0, i1, i2, a, b, c) { + const t = this.trianglesLen; + this._triangles[t] = i0; + this._triangles[t + 1] = i1; + this._triangles[t + 2] = i2; + this._link(t, a); + this._link(t + 1, b); + this._link(t + 2, c); + this.trianglesLen += 3; + return t; + } + } + + // monotonically increases with real angle, but doesn't need expensive trigonometry + function pseudoAngle(dx, dy) { + const p = dx / (Math.abs(dx) + Math.abs(dy)); + return (dy > 0 ? 3 - p : 1 + p) / 4; // [0..1] + } + function dist(ax, ay, bx, by) { + const dx = ax - bx; + const dy = ay - by; + return dx * dx + dy * dy; + } + function inCircle(ax, ay, bx, by, cx, cy, px, py) { + const dx = ax - px; + const dy = ay - py; + const ex = bx - px; + const ey = by - py; + const fx = cx - px; + const fy = cy - py; + const ap = dx * dx + dy * dy; + const bp = ex * ex + ey * ey; + const cp = fx * fx + fy * fy; + return dx * (ey * cp - bp * fy) - dy * (ex * cp - bp * fx) + ap * (ex * fy - ey * fx) < 0; + } + function circumradius(ax, ay, bx, by, cx, cy) { + const dx = bx - ax; + const dy = by - ay; + const ex = cx - ax; + const ey = cy - ay; + const bl = dx * dx + dy * dy; + const cl = ex * ex + ey * ey; + const d = 0.5 / (dx * ey - dy * ex); + const x = (ey * bl - dy * cl) * d; + const y = (dx * cl - ex * bl) * d; + return x * x + y * y; + } + function circumcenter(ax, ay, bx, by, cx, cy) { + const dx = bx - ax; + const dy = by - ay; + const ex = cx - ax; + const ey = cy - ay; + const bl = dx * dx + dy * dy; + const cl = ex * ex + ey * ey; + const d = 0.5 / (dx * ey - dy * ex); + const x = ax + (ey * bl - dy * cl) * d; + const y = ay + (dx * cl - ex * bl) * d; + return { + x, + y + }; + } + function quicksort(ids, dists, left, right) { + if (right - left <= 20) { + for (let i = left + 1; i <= right; i++) { + const temp = ids[i]; + const tempDist = dists[temp]; + let j = i - 1; + while (j >= left && dists[ids[j]] > tempDist) ids[j + 1] = ids[j--]; + ids[j + 1] = temp; + } + } else { + const median = left + right >> 1; + let i = left + 1; + let j = right; + swap(ids, median, i); + if (dists[ids[left]] > dists[ids[right]]) swap(ids, left, right); + if (dists[ids[i]] > dists[ids[right]]) swap(ids, i, right); + if (dists[ids[left]] > dists[ids[i]]) swap(ids, left, i); + const temp = ids[i]; + const tempDist = dists[temp]; + while (true) { + do i++; while (dists[ids[i]] < tempDist); + do j--; while (dists[ids[j]] > tempDist); + if (j < i) break; + swap(ids, i, j); + } + ids[left + 1] = ids[j]; + ids[j] = temp; + if (right - i + 1 >= j - left) { + quicksort(ids, dists, i, right); + quicksort(ids, dists, left, j - 1); + } else { + quicksort(ids, dists, left, j - 1); + quicksort(ids, dists, i, right); + } + } + } + function swap(arr, i, j) { + const tmp = arr[i]; + arr[i] = arr[j]; + arr[j] = tmp; + } + function defaultGetX(p) { + return p[0]; + } + function defaultGetY(p) { + return p[1]; + } + return Delaunator; +}); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/delaunator/delaunator.min.js b/packages/x-charts-vendor/lib-vendor/delaunator/delaunator.min.js new file mode 100644 index 000000000000..fea4092ad305 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/delaunator/delaunator.min.js @@ -0,0 +1,316 @@ +"use strict"; + +!function (t, i) { + "object" == typeof exports && "undefined" != typeof module ? module.exports = i() : "function" == typeof define && define.amd ? define(i) : (t = "undefined" != typeof globalThis ? globalThis : t || self).Delaunator = i(); +}(this, function () { + "use strict"; + + const t = 11102230246251565e-32, + i = 134217729, + s = (3 + 8 * t) * t; + function e(t, i, s, e, n) { + let h, + r, + l, + o, + a = i[0], + f = e[0], + c = 0, + u = 0; + f > a == f > -a ? (h = a, a = i[++c]) : (h = f, f = e[++u]); + let _ = 0; + if (c < t && u < s) for (f > a == f > -a ? (r = a + h, l = h - (r - a), a = i[++c]) : (r = f + h, l = h - (r - f), f = e[++u]), h = r, 0 !== l && (n[_++] = l); c < t && u < s;) f > a == f > -a ? (r = h + a, o = r - h, l = h - (r - o) + (a - o), a = i[++c]) : (r = h + f, o = r - h, l = h - (r - o) + (f - o), f = e[++u]), h = r, 0 !== l && (n[_++] = l); + for (; c < t;) r = h + a, o = r - h, l = h - (r - o) + (a - o), a = i[++c], h = r, 0 !== l && (n[_++] = l); + for (; u < s;) r = h + f, o = r - h, l = h - (r - o) + (f - o), f = e[++u], h = r, 0 !== l && (n[_++] = l); + return 0 === h && 0 !== _ || (n[_++] = h), _; + } + function n(t) { + return new Float64Array(t); + } + const h = 22204460492503146e-32, + r = 11093356479670487e-47, + l = n(4), + o = n(8), + a = n(12), + f = n(16), + c = n(4); + function u(t, n, u, _, d, g) { + const y = (n - g) * (u - d), + w = (t - d) * (_ - g), + b = y - w, + A = Math.abs(y + w); + return Math.abs(b) >= 33306690738754716e-32 * A ? b : -function (t, n, u, _, d, g, y) { + let w, b, A, k, M, p, x, S, T, z, U, m, K, L, v, F, P, E; + const H = t - d, + I = u - d, + N = n - g, + j = _ - g; + L = H * j, p = i * H, x = p - (p - H), S = H - x, p = i * j, T = p - (p - j), z = j - T, v = S * z - (L - x * T - S * T - x * z), F = N * I, p = i * N, x = p - (p - N), S = N - x, p = i * I, T = p - (p - I), z = I - T, P = S * z - (F - x * T - S * T - x * z), U = v - P, M = v - U, l[0] = v - (U + M) + (M - P), m = L + U, M = m - L, K = L - (m - M) + (U - M), U = K - F, M = K - U, l[1] = K - (U + M) + (M - F), E = m + U, M = E - m, l[2] = m - (E - M) + (U - M), l[3] = E; + let q = function (t, i) { + let s = i[0]; + for (let e = 1; e < t; e++) s += i[e]; + return s; + }(4, l), + D = h * y; + if (q >= D || -q >= D) return q; + if (M = t - H, w = t - (H + M) + (M - d), M = u - I, A = u - (I + M) + (M - d), M = n - N, b = n - (N + M) + (M - g), M = _ - j, k = _ - (j + M) + (M - g), 0 === w && 0 === b && 0 === A && 0 === k) return q; + if (D = r * y + s * Math.abs(q), q += H * k + j * w - (N * A + I * b), q >= D || -q >= D) return q; + L = w * j, p = i * w, x = p - (p - w), S = w - x, p = i * j, T = p - (p - j), z = j - T, v = S * z - (L - x * T - S * T - x * z), F = b * I, p = i * b, x = p - (p - b), S = b - x, p = i * I, T = p - (p - I), z = I - T, P = S * z - (F - x * T - S * T - x * z), U = v - P, M = v - U, c[0] = v - (U + M) + (M - P), m = L + U, M = m - L, K = L - (m - M) + (U - M), U = K - F, M = K - U, c[1] = K - (U + M) + (M - F), E = m + U, M = E - m, c[2] = m - (E - M) + (U - M), c[3] = E; + const B = e(4, l, 4, c, o); + L = H * k, p = i * H, x = p - (p - H), S = H - x, p = i * k, T = p - (p - k), z = k - T, v = S * z - (L - x * T - S * T - x * z), F = N * A, p = i * N, x = p - (p - N), S = N - x, p = i * A, T = p - (p - A), z = A - T, P = S * z - (F - x * T - S * T - x * z), U = v - P, M = v - U, c[0] = v - (U + M) + (M - P), m = L + U, M = m - L, K = L - (m - M) + (U - M), U = K - F, M = K - U, c[1] = K - (U + M) + (M - F), E = m + U, M = E - m, c[2] = m - (E - M) + (U - M), c[3] = E; + const C = e(B, o, 4, c, a); + L = w * k, p = i * w, x = p - (p - w), S = w - x, p = i * k, T = p - (p - k), z = k - T, v = S * z - (L - x * T - S * T - x * z), F = b * A, p = i * b, x = p - (p - b), S = b - x, p = i * A, T = p - (p - A), z = A - T, P = S * z - (F - x * T - S * T - x * z), U = v - P, M = v - U, c[0] = v - (U + M) + (M - P), m = L + U, M = m - L, K = L - (m - M) + (U - M), U = K - F, M = K - U, c[1] = K - (U + M) + (M - F), E = m + U, M = E - m, c[2] = m - (E - M) + (U - M), c[3] = E; + const G = e(C, a, 4, c, f); + return f[G - 1]; + }(t, n, u, _, d, g, A); + } + const _ = Math.pow(2, -52), + d = new Uint32Array(512); + class g { + static from(t, i = M, s = p) { + const e = t.length, + n = new Float64Array(2 * e); + for (let h = 0; h < e; h++) { + const e = t[h]; + n[2 * h] = i(e), n[2 * h + 1] = s(e); + } + return new g(n); + } + constructor(t) { + const i = t.length >> 1; + if (i > 0 && "number" != typeof t[0]) throw new Error("Expected coords to contain numbers."); + this.coords = t; + const s = Math.max(2 * i - 5, 0); + this._triangles = new Uint32Array(3 * s), this._halfedges = new Int32Array(3 * s), this._hashSize = Math.ceil(Math.sqrt(i)), this._hullPrev = new Uint32Array(i), this._hullNext = new Uint32Array(i), this._hullTri = new Uint32Array(i), this._hullHash = new Int32Array(this._hashSize), this._ids = new Uint32Array(i), this._dists = new Float64Array(i), this.update(); + } + update() { + const { + coords: t, + _hullPrev: i, + _hullNext: s, + _hullTri: e, + _hullHash: n + } = this, + h = t.length >> 1; + let r = 1 / 0, + l = 1 / 0, + o = -1 / 0, + a = -1 / 0; + for (let i = 0; i < h; i++) { + const s = t[2 * i], + e = t[2 * i + 1]; + s < r && (r = s), e < l && (l = e), s > o && (o = s), e > a && (a = e), this._ids[i] = i; + } + const f = (r + o) / 2, + c = (l + a) / 2; + let d, g, w; + for (let i = 0, s = 1 / 0; i < h; i++) { + const e = y(f, c, t[2 * i], t[2 * i + 1]); + e < s && (d = i, s = e); + } + const k = t[2 * d], + M = t[2 * d + 1]; + for (let i = 0, s = 1 / 0; i < h; i++) { + if (i === d) continue; + const e = y(k, M, t[2 * i], t[2 * i + 1]); + e < s && e > 0 && (g = i, s = e); + } + let p = t[2 * g], + x = t[2 * g + 1], + S = 1 / 0; + for (let i = 0; i < h; i++) { + if (i === d || i === g) continue; + const s = b(k, M, p, x, t[2 * i], t[2 * i + 1]); + s < S && (w = i, S = s); + } + let T = t[2 * w], + z = t[2 * w + 1]; + if (S === 1 / 0) { + for (let i = 0; i < h; i++) this._dists[i] = t[2 * i] - t[0] || t[2 * i + 1] - t[1]; + A(this._ids, this._dists, 0, h - 1); + const i = new Uint32Array(h); + let s = 0; + for (let t = 0, e = -1 / 0; t < h; t++) { + const n = this._ids[t], + h = this._dists[n]; + h > e && (i[s++] = n, e = h); + } + return this.hull = i.subarray(0, s), this.triangles = new Uint32Array(0), void (this.halfedges = new Uint32Array(0)); + } + if (u(k, M, p, x, T, z) < 0) { + const t = g, + i = p, + s = x; + g = w, p = T, x = z, w = t, T = i, z = s; + } + const U = function (t, i, s, e, n, h) { + const r = s - t, + l = e - i, + o = n - t, + a = h - i, + f = r * r + l * l, + c = o * o + a * a, + u = .5 / (r * a - l * o); + return { + x: t + (a * f - l * c) * u, + y: i + (r * c - o * f) * u + }; + }(k, M, p, x, T, z); + this._cx = U.x, this._cy = U.y; + for (let i = 0; i < h; i++) this._dists[i] = y(t[2 * i], t[2 * i + 1], U.x, U.y); + A(this._ids, this._dists, 0, h - 1), this._hullStart = d; + let m = 3; + s[d] = i[w] = g, s[g] = i[d] = w, s[w] = i[g] = d, e[d] = 0, e[g] = 1, e[w] = 2, n.fill(-1), n[this._hashKey(k, M)] = d, n[this._hashKey(p, x)] = g, n[this._hashKey(T, z)] = w, this.trianglesLen = 0, this._addTriangle(d, g, w, -1, -1, -1); + for (let h, r, l = 0; l < this._ids.length; l++) { + const o = this._ids[l], + a = t[2 * o], + f = t[2 * o + 1]; + if (l > 0 && Math.abs(a - h) <= _ && Math.abs(f - r) <= _) continue; + if (h = a, r = f, o === d || o === g || o === w) continue; + let c = 0; + for (let t = 0, i = this._hashKey(a, f); t < this._hashSize && (c = n[(i + t) % this._hashSize], -1 === c || c === s[c]); t++); + c = i[c]; + let y, + b = c; + for (; y = s[b], u(a, f, t[2 * b], t[2 * b + 1], t[2 * y], t[2 * y + 1]) >= 0;) if (b = y, b === c) { + b = -1; + break; + } + if (-1 === b) continue; + let A = this._addTriangle(b, o, s[b], -1, -1, e[b]); + e[o] = this._legalize(A + 2), e[b] = A, m++; + let k = s[b]; + for (; y = s[k], u(a, f, t[2 * k], t[2 * k + 1], t[2 * y], t[2 * y + 1]) < 0;) A = this._addTriangle(k, o, y, e[o], -1, e[k]), e[o] = this._legalize(A + 2), s[k] = k, m--, k = y; + if (b === c) for (; y = i[b], u(a, f, t[2 * y], t[2 * y + 1], t[2 * b], t[2 * b + 1]) < 0;) A = this._addTriangle(y, o, b, -1, e[b], e[y]), this._legalize(A + 2), e[y] = A, s[b] = b, m--, b = y; + this._hullStart = i[o] = b, s[b] = i[k] = o, s[o] = k, n[this._hashKey(a, f)] = o, n[this._hashKey(t[2 * b], t[2 * b + 1])] = b; + } + this.hull = new Uint32Array(m); + for (let t = 0, i = this._hullStart; t < m; t++) this.hull[t] = i, i = s[i]; + this.triangles = this._triangles.subarray(0, this.trianglesLen), this.halfedges = this._halfedges.subarray(0, this.trianglesLen); + } + _hashKey(t, i) { + return Math.floor(function (t, i) { + const s = t / (Math.abs(t) + Math.abs(i)); + return (i > 0 ? 3 - s : 1 + s) / 4; + }(t - this._cx, i - this._cy) * this._hashSize) % this._hashSize; + } + _legalize(t) { + const { + _triangles: i, + _halfedges: s, + coords: e + } = this; + let n = 0, + h = 0; + for (;;) { + const r = s[t], + l = t - t % 3; + if (h = l + (t + 2) % 3, -1 === r) { + if (0 === n) break; + t = d[--n]; + continue; + } + const o = r - r % 3, + a = l + (t + 1) % 3, + f = o + (r + 2) % 3, + c = i[h], + u = i[t], + _ = i[a], + g = i[f]; + if (w(e[2 * c], e[2 * c + 1], e[2 * u], e[2 * u + 1], e[2 * _], e[2 * _ + 1], e[2 * g], e[2 * g + 1])) { + i[t] = g, i[r] = c; + const e = s[f]; + if (-1 === e) { + let i = this._hullStart; + do { + if (this._hullTri[i] === f) { + this._hullTri[i] = t; + break; + } + i = this._hullPrev[i]; + } while (i !== this._hullStart); + } + this._link(t, e), this._link(r, s[h]), this._link(h, f); + const l = o + (r + 1) % 3; + n < d.length && (d[n++] = l); + } else { + if (0 === n) break; + t = d[--n]; + } + } + return h; + } + _link(t, i) { + this._halfedges[t] = i, -1 !== i && (this._halfedges[i] = t); + } + _addTriangle(t, i, s, e, n, h) { + const r = this.trianglesLen; + return this._triangles[r] = t, this._triangles[r + 1] = i, this._triangles[r + 2] = s, this._link(r, e), this._link(r + 1, n), this._link(r + 2, h), this.trianglesLen += 3, r; + } + } + function y(t, i, s, e) { + const n = t - s, + h = i - e; + return n * n + h * h; + } + function w(t, i, s, e, n, h, r, l) { + const o = t - r, + a = i - l, + f = s - r, + c = e - l, + u = n - r, + _ = h - l, + d = f * f + c * c, + g = u * u + _ * _; + return o * (c * g - d * _) - a * (f * g - d * u) + (o * o + a * a) * (f * _ - c * u) < 0; + } + function b(t, i, s, e, n, h) { + const r = s - t, + l = e - i, + o = n - t, + a = h - i, + f = r * r + l * l, + c = o * o + a * a, + u = .5 / (r * a - l * o), + _ = (a * f - l * c) * u, + d = (r * c - o * f) * u; + return _ * _ + d * d; + } + function A(t, i, s, e) { + if (e - s <= 20) for (let n = s + 1; n <= e; n++) { + const e = t[n], + h = i[e]; + let r = n - 1; + for (; r >= s && i[t[r]] > h;) t[r + 1] = t[r--]; + t[r + 1] = e; + } else { + let n = s + 1, + h = e; + k(t, s + e >> 1, n), i[t[s]] > i[t[e]] && k(t, s, e), i[t[n]] > i[t[e]] && k(t, n, e), i[t[s]] > i[t[n]] && k(t, s, n); + const r = t[n], + l = i[r]; + for (;;) { + do { + n++; + } while (i[t[n]] < l); + do { + h--; + } while (i[t[h]] > l); + if (h < n) break; + k(t, n, h); + } + t[s + 1] = t[h], t[h] = r, e - n + 1 >= h - s ? (A(t, i, n, e), A(t, i, s, h - 1)) : (A(t, i, s, h - 1), A(t, i, n, e)); + } + } + function k(t, i, s) { + const e = t[i]; + t[i] = t[s], t[s] = e; + } + function M(t) { + return t[0]; + } + function p(t) { + return t[1]; + } + return g; +}); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/delaunator/index.js b/packages/x-charts-vendor/lib-vendor/delaunator/index.js new file mode 100644 index 000000000000..9134fe7aa9da --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/delaunator/index.js @@ -0,0 +1,440 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _index = require("../../lib-vendor/robust-predicates/index.js"); +const EPSILON = Math.pow(2, -52); +const EDGE_STACK = new Uint32Array(512); +class Delaunator { + static from(points, getX = defaultGetX, getY = defaultGetY) { + const n = points.length; + const coords = new Float64Array(n * 2); + for (let i = 0; i < n; i++) { + const p = points[i]; + coords[2 * i] = getX(p); + coords[2 * i + 1] = getY(p); + } + return new Delaunator(coords); + } + constructor(coords) { + const n = coords.length >> 1; + if (n > 0 && typeof coords[0] !== 'number') throw new Error('Expected coords to contain numbers.'); + this.coords = coords; + + // arrays that will store the triangulation graph + const maxTriangles = Math.max(2 * n - 5, 0); + this._triangles = new Uint32Array(maxTriangles * 3); + this._halfedges = new Int32Array(maxTriangles * 3); + + // temporary arrays for tracking the edges of the advancing convex hull + this._hashSize = Math.ceil(Math.sqrt(n)); + this._hullPrev = new Uint32Array(n); // edge to prev edge + this._hullNext = new Uint32Array(n); // edge to next edge + this._hullTri = new Uint32Array(n); // edge to adjacent triangle + this._hullHash = new Int32Array(this._hashSize); // angular edge hash + + // temporary arrays for sorting points + this._ids = new Uint32Array(n); + this._dists = new Float64Array(n); + this.update(); + } + update() { + const { + coords, + _hullPrev: hullPrev, + _hullNext: hullNext, + _hullTri: hullTri, + _hullHash: hullHash + } = this; + const n = coords.length >> 1; + + // populate an array of point indices; calculate input data bbox + let minX = Infinity; + let minY = Infinity; + let maxX = -Infinity; + let maxY = -Infinity; + for (let i = 0; i < n; i++) { + const x = coords[2 * i]; + const y = coords[2 * i + 1]; + if (x < minX) minX = x; + if (y < minY) minY = y; + if (x > maxX) maxX = x; + if (y > maxY) maxY = y; + this._ids[i] = i; + } + const cx = (minX + maxX) / 2; + const cy = (minY + maxY) / 2; + let i0, i1, i2; + + // pick a seed point close to the center + for (let i = 0, minDist = Infinity; i < n; i++) { + const d = dist(cx, cy, coords[2 * i], coords[2 * i + 1]); + if (d < minDist) { + i0 = i; + minDist = d; + } + } + const i0x = coords[2 * i0]; + const i0y = coords[2 * i0 + 1]; + + // find the point closest to the seed + for (let i = 0, minDist = Infinity; i < n; i++) { + if (i === i0) continue; + const d = dist(i0x, i0y, coords[2 * i], coords[2 * i + 1]); + if (d < minDist && d > 0) { + i1 = i; + minDist = d; + } + } + let i1x = coords[2 * i1]; + let i1y = coords[2 * i1 + 1]; + let minRadius = Infinity; + + // find the third point which forms the smallest circumcircle with the first two + for (let i = 0; i < n; i++) { + if (i === i0 || i === i1) continue; + const r = circumradius(i0x, i0y, i1x, i1y, coords[2 * i], coords[2 * i + 1]); + if (r < minRadius) { + i2 = i; + minRadius = r; + } + } + let i2x = coords[2 * i2]; + let i2y = coords[2 * i2 + 1]; + if (minRadius === Infinity) { + // order collinear points by dx (or dy if all x are identical) + // and return the list as a hull + for (let i = 0; i < n; i++) { + this._dists[i] = coords[2 * i] - coords[0] || coords[2 * i + 1] - coords[1]; + } + quicksort(this._ids, this._dists, 0, n - 1); + const hull = new Uint32Array(n); + let j = 0; + for (let i = 0, d0 = -Infinity; i < n; i++) { + const id = this._ids[i]; + const d = this._dists[id]; + if (d > d0) { + hull[j++] = id; + d0 = d; + } + } + this.hull = hull.subarray(0, j); + this.triangles = new Uint32Array(0); + this.halfedges = new Uint32Array(0); + return; + } + + // swap the order of the seed points for counter-clockwise orientation + if ((0, _index.orient2d)(i0x, i0y, i1x, i1y, i2x, i2y) < 0) { + const i = i1; + const x = i1x; + const y = i1y; + i1 = i2; + i1x = i2x; + i1y = i2y; + i2 = i; + i2x = x; + i2y = y; + } + const center = circumcenter(i0x, i0y, i1x, i1y, i2x, i2y); + this._cx = center.x; + this._cy = center.y; + for (let i = 0; i < n; i++) { + this._dists[i] = dist(coords[2 * i], coords[2 * i + 1], center.x, center.y); + } + + // sort the points by distance from the seed triangle circumcenter + quicksort(this._ids, this._dists, 0, n - 1); + + // set up the seed triangle as the starting hull + this._hullStart = i0; + let hullSize = 3; + hullNext[i0] = hullPrev[i2] = i1; + hullNext[i1] = hullPrev[i0] = i2; + hullNext[i2] = hullPrev[i1] = i0; + hullTri[i0] = 0; + hullTri[i1] = 1; + hullTri[i2] = 2; + hullHash.fill(-1); + hullHash[this._hashKey(i0x, i0y)] = i0; + hullHash[this._hashKey(i1x, i1y)] = i1; + hullHash[this._hashKey(i2x, i2y)] = i2; + this.trianglesLen = 0; + this._addTriangle(i0, i1, i2, -1, -1, -1); + for (let k = 0, xp, yp; k < this._ids.length; k++) { + const i = this._ids[k]; + const x = coords[2 * i]; + const y = coords[2 * i + 1]; + + // skip near-duplicate points + if (k > 0 && Math.abs(x - xp) <= EPSILON && Math.abs(y - yp) <= EPSILON) continue; + xp = x; + yp = y; + + // skip seed triangle points + if (i === i0 || i === i1 || i === i2) continue; + + // find a visible edge on the convex hull using edge hash + let start = 0; + for (let j = 0, key = this._hashKey(x, y); j < this._hashSize; j++) { + start = hullHash[(key + j) % this._hashSize]; + if (start !== -1 && start !== hullNext[start]) break; + } + start = hullPrev[start]; + let e = start, + q; + while (q = hullNext[e], (0, _index.orient2d)(x, y, coords[2 * e], coords[2 * e + 1], coords[2 * q], coords[2 * q + 1]) >= 0) { + e = q; + if (e === start) { + e = -1; + break; + } + } + if (e === -1) continue; // likely a near-duplicate point; skip it + + // add the first triangle from the point + let t = this._addTriangle(e, i, hullNext[e], -1, -1, hullTri[e]); + + // recursively flip triangles from the point until they satisfy the Delaunay condition + hullTri[i] = this._legalize(t + 2); + hullTri[e] = t; // keep track of boundary triangles on the hull + hullSize++; + + // walk forward through the hull, adding more triangles and flipping recursively + let n = hullNext[e]; + while (q = hullNext[n], (0, _index.orient2d)(x, y, coords[2 * n], coords[2 * n + 1], coords[2 * q], coords[2 * q + 1]) < 0) { + t = this._addTriangle(n, i, q, hullTri[i], -1, hullTri[n]); + hullTri[i] = this._legalize(t + 2); + hullNext[n] = n; // mark as removed + hullSize--; + n = q; + } + + // walk backward from the other side, adding more triangles and flipping + if (e === start) { + while (q = hullPrev[e], (0, _index.orient2d)(x, y, coords[2 * q], coords[2 * q + 1], coords[2 * e], coords[2 * e + 1]) < 0) { + t = this._addTriangle(q, i, e, -1, hullTri[e], hullTri[q]); + this._legalize(t + 2); + hullTri[q] = t; + hullNext[e] = e; // mark as removed + hullSize--; + e = q; + } + } + + // update the hull indices + this._hullStart = hullPrev[i] = e; + hullNext[e] = hullPrev[n] = i; + hullNext[i] = n; + + // save the two new edges in the hash table + hullHash[this._hashKey(x, y)] = i; + hullHash[this._hashKey(coords[2 * e], coords[2 * e + 1])] = e; + } + this.hull = new Uint32Array(hullSize); + for (let i = 0, e = this._hullStart; i < hullSize; i++) { + this.hull[i] = e; + e = hullNext[e]; + } + + // trim typed triangle mesh arrays + this.triangles = this._triangles.subarray(0, this.trianglesLen); + this.halfedges = this._halfedges.subarray(0, this.trianglesLen); + } + _hashKey(x, y) { + return Math.floor(pseudoAngle(x - this._cx, y - this._cy) * this._hashSize) % this._hashSize; + } + _legalize(a) { + const { + _triangles: triangles, + _halfedges: halfedges, + coords + } = this; + let i = 0; + let ar = 0; + + // recursion eliminated with a fixed-size stack + while (true) { + const b = halfedges[a]; + + /* if the pair of triangles doesn't satisfy the Delaunay condition + * (p1 is inside the circumcircle of [p0, pl, pr]), flip them, + * then do the same check/flip recursively for the new pair of triangles + * + * pl pl + * /||\ / \ + * al/ || \bl al/ \a + * / || \ / \ + * / a||b \ flip /___ar___\ + * p0\ || /p1 => p0\---bl---/p1 + * \ || / \ / + * ar\ || /br b\ /br + * \||/ \ / + * pr pr + */ + const a0 = a - a % 3; + ar = a0 + (a + 2) % 3; + if (b === -1) { + // convex hull edge + if (i === 0) break; + a = EDGE_STACK[--i]; + continue; + } + const b0 = b - b % 3; + const al = a0 + (a + 1) % 3; + const bl = b0 + (b + 2) % 3; + const p0 = triangles[ar]; + const pr = triangles[a]; + const pl = triangles[al]; + const p1 = triangles[bl]; + const illegal = inCircle(coords[2 * p0], coords[2 * p0 + 1], coords[2 * pr], coords[2 * pr + 1], coords[2 * pl], coords[2 * pl + 1], coords[2 * p1], coords[2 * p1 + 1]); + if (illegal) { + triangles[a] = p1; + triangles[b] = p0; + const hbl = halfedges[bl]; + + // edge swapped on the other side of the hull (rare); fix the halfedge reference + if (hbl === -1) { + let e = this._hullStart; + do { + if (this._hullTri[e] === bl) { + this._hullTri[e] = a; + break; + } + e = this._hullPrev[e]; + } while (e !== this._hullStart); + } + this._link(a, hbl); + this._link(b, halfedges[ar]); + this._link(ar, bl); + const br = b0 + (b + 1) % 3; + + // don't worry about hitting the cap: it can only happen on extremely degenerate input + if (i < EDGE_STACK.length) { + EDGE_STACK[i++] = br; + } + } else { + if (i === 0) break; + a = EDGE_STACK[--i]; + } + } + return ar; + } + _link(a, b) { + this._halfedges[a] = b; + if (b !== -1) this._halfedges[b] = a; + } + + // add a new triangle given vertex indices and adjacent half-edge ids + _addTriangle(i0, i1, i2, a, b, c) { + const t = this.trianglesLen; + this._triangles[t] = i0; + this._triangles[t + 1] = i1; + this._triangles[t + 2] = i2; + this._link(t, a); + this._link(t + 1, b); + this._link(t + 2, c); + this.trianglesLen += 3; + return t; + } +} + +// monotonically increases with real angle, but doesn't need expensive trigonometry +exports.default = Delaunator; +function pseudoAngle(dx, dy) { + const p = dx / (Math.abs(dx) + Math.abs(dy)); + return (dy > 0 ? 3 - p : 1 + p) / 4; // [0..1] +} +function dist(ax, ay, bx, by) { + const dx = ax - bx; + const dy = ay - by; + return dx * dx + dy * dy; +} +function inCircle(ax, ay, bx, by, cx, cy, px, py) { + const dx = ax - px; + const dy = ay - py; + const ex = bx - px; + const ey = by - py; + const fx = cx - px; + const fy = cy - py; + const ap = dx * dx + dy * dy; + const bp = ex * ex + ey * ey; + const cp = fx * fx + fy * fy; + return dx * (ey * cp - bp * fy) - dy * (ex * cp - bp * fx) + ap * (ex * fy - ey * fx) < 0; +} +function circumradius(ax, ay, bx, by, cx, cy) { + const dx = bx - ax; + const dy = by - ay; + const ex = cx - ax; + const ey = cy - ay; + const bl = dx * dx + dy * dy; + const cl = ex * ex + ey * ey; + const d = 0.5 / (dx * ey - dy * ex); + const x = (ey * bl - dy * cl) * d; + const y = (dx * cl - ex * bl) * d; + return x * x + y * y; +} +function circumcenter(ax, ay, bx, by, cx, cy) { + const dx = bx - ax; + const dy = by - ay; + const ex = cx - ax; + const ey = cy - ay; + const bl = dx * dx + dy * dy; + const cl = ex * ex + ey * ey; + const d = 0.5 / (dx * ey - dy * ex); + const x = ax + (ey * bl - dy * cl) * d; + const y = ay + (dx * cl - ex * bl) * d; + return { + x, + y + }; +} +function quicksort(ids, dists, left, right) { + if (right - left <= 20) { + for (let i = left + 1; i <= right; i++) { + const temp = ids[i]; + const tempDist = dists[temp]; + let j = i - 1; + while (j >= left && dists[ids[j]] > tempDist) ids[j + 1] = ids[j--]; + ids[j + 1] = temp; + } + } else { + const median = left + right >> 1; + let i = left + 1; + let j = right; + swap(ids, median, i); + if (dists[ids[left]] > dists[ids[right]]) swap(ids, left, right); + if (dists[ids[i]] > dists[ids[right]]) swap(ids, i, right); + if (dists[ids[left]] > dists[ids[i]]) swap(ids, left, i); + const temp = ids[i]; + const tempDist = dists[temp]; + while (true) { + do i++; while (dists[ids[i]] < tempDist); + do j--; while (dists[ids[j]] > tempDist); + if (j < i) break; + swap(ids, i, j); + } + ids[left + 1] = ids[j]; + ids[j] = temp; + if (right - i + 1 >= j - left) { + quicksort(ids, dists, i, right); + quicksort(ids, dists, left, j - 1); + } else { + quicksort(ids, dists, left, j - 1); + quicksort(ids, dists, i, right); + } + } +} +function swap(arr, i, j) { + const tmp = arr[i]; + arr[i] = arr[j]; + arr[j] = tmp; +} +function defaultGetX(p) { + return p[0]; +} +function defaultGetY(p) { + return p[1]; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/internmap/LICENSE b/packages/x-charts-vendor/lib-vendor/internmap/LICENSE new file mode 100644 index 000000000000..6fca7113f8ba --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/internmap/LICENSE @@ -0,0 +1,13 @@ +Copyright 2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/packages/x-charts-vendor/lib-vendor/internmap/src/index.js b/packages/x-charts-vendor/lib-vendor/internmap/src/index.js new file mode 100644 index 000000000000..9dc9704b86a2 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/internmap/src/index.js @@ -0,0 +1,87 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.InternSet = exports.InternMap = void 0; +class InternMap extends Map { + constructor(entries, key = keyof) { + super(); + Object.defineProperties(this, { + _intern: { + value: new Map() + }, + _key: { + value: key + } + }); + if (entries != null) for (const [key, value] of entries) this.set(key, value); + } + get(key) { + return super.get(intern_get(this, key)); + } + has(key) { + return super.has(intern_get(this, key)); + } + set(key, value) { + return super.set(intern_set(this, key), value); + } + delete(key) { + return super.delete(intern_delete(this, key)); + } +} +exports.InternMap = InternMap; +class InternSet extends Set { + constructor(values, key = keyof) { + super(); + Object.defineProperties(this, { + _intern: { + value: new Map() + }, + _key: { + value: key + } + }); + if (values != null) for (const value of values) this.add(value); + } + has(value) { + return super.has(intern_get(this, value)); + } + add(value) { + return super.add(intern_set(this, value)); + } + delete(value) { + return super.delete(intern_delete(this, value)); + } +} +exports.InternSet = InternSet; +function intern_get({ + _intern, + _key +}, value) { + const key = _key(value); + return _intern.has(key) ? _intern.get(key) : value; +} +function intern_set({ + _intern, + _key +}, value) { + const key = _key(value); + if (_intern.has(key)) return _intern.get(key); + _intern.set(key, value); + return value; +} +function intern_delete({ + _intern, + _key +}, value) { + const key = _key(value); + if (_intern.has(key)) { + value = _intern.get(key); + _intern.delete(key); + } + return value; +} +function keyof(value) { + return value !== null && typeof value === "object" ? value.valueOf() : value; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/robust-predicates/LICENSE b/packages/x-charts-vendor/lib-vendor/robust-predicates/LICENSE new file mode 100644 index 000000000000..cf1ab25da034 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/robust-predicates/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/packages/x-charts-vendor/lib-vendor/robust-predicates/esm/incircle.js b/packages/x-charts-vendor/lib-vendor/robust-predicates/esm/incircle.js new file mode 100644 index 000000000000..7a9d147b49c8 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/robust-predicates/esm/incircle.js @@ -0,0 +1,667 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.incircle = incircle; +exports.incirclefast = incirclefast; +var _util = require("./util.js"); +const iccerrboundA = (10 + 96 * _util.epsilon) * _util.epsilon; +const iccerrboundB = (4 + 48 * _util.epsilon) * _util.epsilon; +const iccerrboundC = (44 + 576 * _util.epsilon) * _util.epsilon * _util.epsilon; +const bc = (0, _util.vec)(4); +const ca = (0, _util.vec)(4); +const ab = (0, _util.vec)(4); +const aa = (0, _util.vec)(4); +const bb = (0, _util.vec)(4); +const cc = (0, _util.vec)(4); +const u = (0, _util.vec)(4); +const v = (0, _util.vec)(4); +const axtbc = (0, _util.vec)(8); +const aytbc = (0, _util.vec)(8); +const bxtca = (0, _util.vec)(8); +const bytca = (0, _util.vec)(8); +const cxtab = (0, _util.vec)(8); +const cytab = (0, _util.vec)(8); +const abt = (0, _util.vec)(8); +const bct = (0, _util.vec)(8); +const cat = (0, _util.vec)(8); +const abtt = (0, _util.vec)(4); +const bctt = (0, _util.vec)(4); +const catt = (0, _util.vec)(4); +const _8 = (0, _util.vec)(8); +const _16 = (0, _util.vec)(16); +const _16b = (0, _util.vec)(16); +const _16c = (0, _util.vec)(16); +const _32 = (0, _util.vec)(32); +const _32b = (0, _util.vec)(32); +const _48 = (0, _util.vec)(48); +const _64 = (0, _util.vec)(64); +let fin = (0, _util.vec)(1152); +let fin2 = (0, _util.vec)(1152); +function finadd(finlen, a, alen) { + finlen = (0, _util.sum)(finlen, fin, a, alen, fin2); + const tmp = fin; + fin = fin2; + fin2 = tmp; + return finlen; +} +function incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent) { + let finlen; + let adxtail, bdxtail, cdxtail, adytail, bdytail, cdytail; + let axtbclen, aytbclen, bxtcalen, bytcalen, cxtablen, cytablen; + let abtlen, bctlen, catlen; + let abttlen, bcttlen, cattlen; + let n1, n0; + let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3; + const adx = ax - dx; + const bdx = bx - dx; + const cdx = cx - dx; + const ady = ay - dy; + const bdy = by - dy; + const cdy = cy - dy; + s1 = bdx * cdy; + c = _util.splitter * bdx; + ahi = c - (c - bdx); + alo = bdx - ahi; + c = _util.splitter * cdy; + bhi = c - (c - cdy); + blo = cdy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cdx * bdy; + c = _util.splitter * cdx; + ahi = c - (c - cdx); + alo = cdx - ahi; + c = _util.splitter * bdy; + bhi = c - (c - bdy); + blo = bdy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + bc[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + bc[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + bc[2] = _j - (u3 - bvirt) + (_i - bvirt); + bc[3] = u3; + s1 = cdx * ady; + c = _util.splitter * cdx; + ahi = c - (c - cdx); + alo = cdx - ahi; + c = _util.splitter * ady; + bhi = c - (c - ady); + blo = ady - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = adx * cdy; + c = _util.splitter * adx; + ahi = c - (c - adx); + alo = adx - ahi; + c = _util.splitter * cdy; + bhi = c - (c - cdy); + blo = cdy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ca[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ca[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ca[2] = _j - (u3 - bvirt) + (_i - bvirt); + ca[3] = u3; + s1 = adx * bdy; + c = _util.splitter * adx; + ahi = c - (c - adx); + alo = adx - ahi; + c = _util.splitter * bdy; + bhi = c - (c - bdy); + blo = bdy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bdx * ady; + c = _util.splitter * bdx; + ahi = c - (c - bdx); + alo = bdx - ahi; + c = _util.splitter * ady; + bhi = c - (c - ady); + blo = ady - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ab[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ab[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ab[2] = _j - (u3 - bvirt) + (_i - bvirt); + ab[3] = u3; + finlen = (0, _util.sum)((0, _util.sum)((0, _util.sum)((0, _util.scale)((0, _util.scale)(4, bc, adx, _8), _8, adx, _16), _16, (0, _util.scale)((0, _util.scale)(4, bc, ady, _8), _8, ady, _16b), _16b, _32), _32, (0, _util.sum)((0, _util.scale)((0, _util.scale)(4, ca, bdx, _8), _8, bdx, _16), _16, (0, _util.scale)((0, _util.scale)(4, ca, bdy, _8), _8, bdy, _16b), _16b, _32b), _32b, _64), _64, (0, _util.sum)((0, _util.scale)((0, _util.scale)(4, ab, cdx, _8), _8, cdx, _16), _16, (0, _util.scale)((0, _util.scale)(4, ab, cdy, _8), _8, cdy, _16b), _16b, _32), _32, fin); + let det = (0, _util.estimate)(finlen, fin); + let errbound = iccerrboundB * permanent; + if (det >= errbound || -det >= errbound) { + return det; + } + bvirt = ax - adx; + adxtail = ax - (adx + bvirt) + (bvirt - dx); + bvirt = ay - ady; + adytail = ay - (ady + bvirt) + (bvirt - dy); + bvirt = bx - bdx; + bdxtail = bx - (bdx + bvirt) + (bvirt - dx); + bvirt = by - bdy; + bdytail = by - (bdy + bvirt) + (bvirt - dy); + bvirt = cx - cdx; + cdxtail = cx - (cdx + bvirt) + (bvirt - dx); + bvirt = cy - cdy; + cdytail = cy - (cdy + bvirt) + (bvirt - dy); + if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 && adytail === 0 && bdytail === 0 && cdytail === 0) { + return det; + } + errbound = iccerrboundC * permanent + _util.resulterrbound * Math.abs(det); + det += (adx * adx + ady * ady) * (bdx * cdytail + cdy * bdxtail - (bdy * cdxtail + cdx * bdytail)) + 2 * (adx * adxtail + ady * adytail) * (bdx * cdy - bdy * cdx) + ((bdx * bdx + bdy * bdy) * (cdx * adytail + ady * cdxtail - (cdy * adxtail + adx * cdytail)) + 2 * (bdx * bdxtail + bdy * bdytail) * (cdx * ady - cdy * adx)) + ((cdx * cdx + cdy * cdy) * (adx * bdytail + bdy * adxtail - (ady * bdxtail + bdx * adytail)) + 2 * (cdx * cdxtail + cdy * cdytail) * (adx * bdy - ady * bdx)); + if (det >= errbound || -det >= errbound) { + return det; + } + if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) { + s1 = adx * adx; + c = _util.splitter * adx; + ahi = c - (c - adx); + alo = adx - ahi; + s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo); + t1 = ady * ady; + c = _util.splitter * ady; + ahi = c - (c - ady); + alo = ady - ahi; + t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo); + _i = s0 + t0; + bvirt = _i - s0; + aa[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + aa[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + aa[2] = _j - (u3 - bvirt) + (_i - bvirt); + aa[3] = u3; + } + if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) { + s1 = bdx * bdx; + c = _util.splitter * bdx; + ahi = c - (c - bdx); + alo = bdx - ahi; + s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo); + t1 = bdy * bdy; + c = _util.splitter * bdy; + ahi = c - (c - bdy); + alo = bdy - ahi; + t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo); + _i = s0 + t0; + bvirt = _i - s0; + bb[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + bb[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + bb[2] = _j - (u3 - bvirt) + (_i - bvirt); + bb[3] = u3; + } + if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) { + s1 = cdx * cdx; + c = _util.splitter * cdx; + ahi = c - (c - cdx); + alo = cdx - ahi; + s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo); + t1 = cdy * cdy; + c = _util.splitter * cdy; + ahi = c - (c - cdy); + alo = cdy - ahi; + t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo); + _i = s0 + t0; + bvirt = _i - s0; + cc[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + cc[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + cc[2] = _j - (u3 - bvirt) + (_i - bvirt); + cc[3] = u3; + } + if (adxtail !== 0) { + axtbclen = (0, _util.scale)(4, bc, adxtail, axtbc); + finlen = finadd(finlen, (0, _util.sum_three)((0, _util.scale)(axtbclen, axtbc, 2 * adx, _16), _16, (0, _util.scale)((0, _util.scale)(4, cc, adxtail, _8), _8, bdy, _16b), _16b, (0, _util.scale)((0, _util.scale)(4, bb, adxtail, _8), _8, -cdy, _16c), _16c, _32, _48), _48); + } + if (adytail !== 0) { + aytbclen = (0, _util.scale)(4, bc, adytail, aytbc); + finlen = finadd(finlen, (0, _util.sum_three)((0, _util.scale)(aytbclen, aytbc, 2 * ady, _16), _16, (0, _util.scale)((0, _util.scale)(4, bb, adytail, _8), _8, cdx, _16b), _16b, (0, _util.scale)((0, _util.scale)(4, cc, adytail, _8), _8, -bdx, _16c), _16c, _32, _48), _48); + } + if (bdxtail !== 0) { + bxtcalen = (0, _util.scale)(4, ca, bdxtail, bxtca); + finlen = finadd(finlen, (0, _util.sum_three)((0, _util.scale)(bxtcalen, bxtca, 2 * bdx, _16), _16, (0, _util.scale)((0, _util.scale)(4, aa, bdxtail, _8), _8, cdy, _16b), _16b, (0, _util.scale)((0, _util.scale)(4, cc, bdxtail, _8), _8, -ady, _16c), _16c, _32, _48), _48); + } + if (bdytail !== 0) { + bytcalen = (0, _util.scale)(4, ca, bdytail, bytca); + finlen = finadd(finlen, (0, _util.sum_three)((0, _util.scale)(bytcalen, bytca, 2 * bdy, _16), _16, (0, _util.scale)((0, _util.scale)(4, cc, bdytail, _8), _8, adx, _16b), _16b, (0, _util.scale)((0, _util.scale)(4, aa, bdytail, _8), _8, -cdx, _16c), _16c, _32, _48), _48); + } + if (cdxtail !== 0) { + cxtablen = (0, _util.scale)(4, ab, cdxtail, cxtab); + finlen = finadd(finlen, (0, _util.sum_three)((0, _util.scale)(cxtablen, cxtab, 2 * cdx, _16), _16, (0, _util.scale)((0, _util.scale)(4, bb, cdxtail, _8), _8, ady, _16b), _16b, (0, _util.scale)((0, _util.scale)(4, aa, cdxtail, _8), _8, -bdy, _16c), _16c, _32, _48), _48); + } + if (cdytail !== 0) { + cytablen = (0, _util.scale)(4, ab, cdytail, cytab); + finlen = finadd(finlen, (0, _util.sum_three)((0, _util.scale)(cytablen, cytab, 2 * cdy, _16), _16, (0, _util.scale)((0, _util.scale)(4, aa, cdytail, _8), _8, bdx, _16b), _16b, (0, _util.scale)((0, _util.scale)(4, bb, cdytail, _8), _8, -adx, _16c), _16c, _32, _48), _48); + } + if (adxtail !== 0 || adytail !== 0) { + if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) { + s1 = bdxtail * cdy; + c = _util.splitter * bdxtail; + ahi = c - (c - bdxtail); + alo = bdxtail - ahi; + c = _util.splitter * cdy; + bhi = c - (c - cdy); + blo = cdy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bdx * cdytail; + c = _util.splitter * bdx; + ahi = c - (c - bdx); + alo = bdx - ahi; + c = _util.splitter * cdytail; + bhi = c - (c - cdytail); + blo = cdytail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 + t0; + bvirt = _i - s0; + u[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + u[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + u[2] = _j - (u3 - bvirt) + (_i - bvirt); + u[3] = u3; + s1 = cdxtail * -bdy; + c = _util.splitter * cdxtail; + ahi = c - (c - cdxtail); + alo = cdxtail - ahi; + c = _util.splitter * -bdy; + bhi = c - (c - -bdy); + blo = -bdy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cdx * -bdytail; + c = _util.splitter * cdx; + ahi = c - (c - cdx); + alo = cdx - ahi; + c = _util.splitter * -bdytail; + bhi = c - (c - -bdytail); + blo = -bdytail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 + t0; + bvirt = _i - s0; + v[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + v[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + v[2] = _j - (u3 - bvirt) + (_i - bvirt); + v[3] = u3; + bctlen = (0, _util.sum)(4, u, 4, v, bct); + s1 = bdxtail * cdytail; + c = _util.splitter * bdxtail; + ahi = c - (c - bdxtail); + alo = bdxtail - ahi; + c = _util.splitter * cdytail; + bhi = c - (c - cdytail); + blo = cdytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cdxtail * bdytail; + c = _util.splitter * cdxtail; + ahi = c - (c - cdxtail); + alo = cdxtail - ahi; + c = _util.splitter * bdytail; + bhi = c - (c - bdytail); + blo = bdytail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + bctt[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + bctt[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + bctt[2] = _j - (u3 - bvirt) + (_i - bvirt); + bctt[3] = u3; + bcttlen = 4; + } else { + bct[0] = 0; + bctlen = 1; + bctt[0] = 0; + bcttlen = 1; + } + if (adxtail !== 0) { + const len = (0, _util.scale)(bctlen, bct, adxtail, _16c); + finlen = finadd(finlen, (0, _util.sum)((0, _util.scale)(axtbclen, axtbc, adxtail, _16), _16, (0, _util.scale)(len, _16c, 2 * adx, _32), _32, _48), _48); + const len2 = (0, _util.scale)(bcttlen, bctt, adxtail, _8); + finlen = finadd(finlen, (0, _util.sum_three)((0, _util.scale)(len2, _8, 2 * adx, _16), _16, (0, _util.scale)(len2, _8, adxtail, _16b), _16b, (0, _util.scale)(len, _16c, adxtail, _32), _32, _32b, _64), _64); + if (bdytail !== 0) { + finlen = finadd(finlen, (0, _util.scale)((0, _util.scale)(4, cc, adxtail, _8), _8, bdytail, _16), _16); + } + if (cdytail !== 0) { + finlen = finadd(finlen, (0, _util.scale)((0, _util.scale)(4, bb, -adxtail, _8), _8, cdytail, _16), _16); + } + } + if (adytail !== 0) { + const len = (0, _util.scale)(bctlen, bct, adytail, _16c); + finlen = finadd(finlen, (0, _util.sum)((0, _util.scale)(aytbclen, aytbc, adytail, _16), _16, (0, _util.scale)(len, _16c, 2 * ady, _32), _32, _48), _48); + const len2 = (0, _util.scale)(bcttlen, bctt, adytail, _8); + finlen = finadd(finlen, (0, _util.sum_three)((0, _util.scale)(len2, _8, 2 * ady, _16), _16, (0, _util.scale)(len2, _8, adytail, _16b), _16b, (0, _util.scale)(len, _16c, adytail, _32), _32, _32b, _64), _64); + } + } + if (bdxtail !== 0 || bdytail !== 0) { + if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) { + s1 = cdxtail * ady; + c = _util.splitter * cdxtail; + ahi = c - (c - cdxtail); + alo = cdxtail - ahi; + c = _util.splitter * ady; + bhi = c - (c - ady); + blo = ady - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cdx * adytail; + c = _util.splitter * cdx; + ahi = c - (c - cdx); + alo = cdx - ahi; + c = _util.splitter * adytail; + bhi = c - (c - adytail); + blo = adytail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 + t0; + bvirt = _i - s0; + u[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + u[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + u[2] = _j - (u3 - bvirt) + (_i - bvirt); + u[3] = u3; + n1 = -cdy; + n0 = -cdytail; + s1 = adxtail * n1; + c = _util.splitter * adxtail; + ahi = c - (c - adxtail); + alo = adxtail - ahi; + c = _util.splitter * n1; + bhi = c - (c - n1); + blo = n1 - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = adx * n0; + c = _util.splitter * adx; + ahi = c - (c - adx); + alo = adx - ahi; + c = _util.splitter * n0; + bhi = c - (c - n0); + blo = n0 - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 + t0; + bvirt = _i - s0; + v[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + v[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + v[2] = _j - (u3 - bvirt) + (_i - bvirt); + v[3] = u3; + catlen = (0, _util.sum)(4, u, 4, v, cat); + s1 = cdxtail * adytail; + c = _util.splitter * cdxtail; + ahi = c - (c - cdxtail); + alo = cdxtail - ahi; + c = _util.splitter * adytail; + bhi = c - (c - adytail); + blo = adytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = adxtail * cdytail; + c = _util.splitter * adxtail; + ahi = c - (c - adxtail); + alo = adxtail - ahi; + c = _util.splitter * cdytail; + bhi = c - (c - cdytail); + blo = cdytail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + catt[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + catt[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + catt[2] = _j - (u3 - bvirt) + (_i - bvirt); + catt[3] = u3; + cattlen = 4; + } else { + cat[0] = 0; + catlen = 1; + catt[0] = 0; + cattlen = 1; + } + if (bdxtail !== 0) { + const len = (0, _util.scale)(catlen, cat, bdxtail, _16c); + finlen = finadd(finlen, (0, _util.sum)((0, _util.scale)(bxtcalen, bxtca, bdxtail, _16), _16, (0, _util.scale)(len, _16c, 2 * bdx, _32), _32, _48), _48); + const len2 = (0, _util.scale)(cattlen, catt, bdxtail, _8); + finlen = finadd(finlen, (0, _util.sum_three)((0, _util.scale)(len2, _8, 2 * bdx, _16), _16, (0, _util.scale)(len2, _8, bdxtail, _16b), _16b, (0, _util.scale)(len, _16c, bdxtail, _32), _32, _32b, _64), _64); + if (cdytail !== 0) { + finlen = finadd(finlen, (0, _util.scale)((0, _util.scale)(4, aa, bdxtail, _8), _8, cdytail, _16), _16); + } + if (adytail !== 0) { + finlen = finadd(finlen, (0, _util.scale)((0, _util.scale)(4, cc, -bdxtail, _8), _8, adytail, _16), _16); + } + } + if (bdytail !== 0) { + const len = (0, _util.scale)(catlen, cat, bdytail, _16c); + finlen = finadd(finlen, (0, _util.sum)((0, _util.scale)(bytcalen, bytca, bdytail, _16), _16, (0, _util.scale)(len, _16c, 2 * bdy, _32), _32, _48), _48); + const len2 = (0, _util.scale)(cattlen, catt, bdytail, _8); + finlen = finadd(finlen, (0, _util.sum_three)((0, _util.scale)(len2, _8, 2 * bdy, _16), _16, (0, _util.scale)(len2, _8, bdytail, _16b), _16b, (0, _util.scale)(len, _16c, bdytail, _32), _32, _32b, _64), _64); + } + } + if (cdxtail !== 0 || cdytail !== 0) { + if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) { + s1 = adxtail * bdy; + c = _util.splitter * adxtail; + ahi = c - (c - adxtail); + alo = adxtail - ahi; + c = _util.splitter * bdy; + bhi = c - (c - bdy); + blo = bdy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = adx * bdytail; + c = _util.splitter * adx; + ahi = c - (c - adx); + alo = adx - ahi; + c = _util.splitter * bdytail; + bhi = c - (c - bdytail); + blo = bdytail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 + t0; + bvirt = _i - s0; + u[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + u[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + u[2] = _j - (u3 - bvirt) + (_i - bvirt); + u[3] = u3; + n1 = -ady; + n0 = -adytail; + s1 = bdxtail * n1; + c = _util.splitter * bdxtail; + ahi = c - (c - bdxtail); + alo = bdxtail - ahi; + c = _util.splitter * n1; + bhi = c - (c - n1); + blo = n1 - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bdx * n0; + c = _util.splitter * bdx; + ahi = c - (c - bdx); + alo = bdx - ahi; + c = _util.splitter * n0; + bhi = c - (c - n0); + blo = n0 - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 + t0; + bvirt = _i - s0; + v[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + v[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + v[2] = _j - (u3 - bvirt) + (_i - bvirt); + v[3] = u3; + abtlen = (0, _util.sum)(4, u, 4, v, abt); + s1 = adxtail * bdytail; + c = _util.splitter * adxtail; + ahi = c - (c - adxtail); + alo = adxtail - ahi; + c = _util.splitter * bdytail; + bhi = c - (c - bdytail); + blo = bdytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bdxtail * adytail; + c = _util.splitter * bdxtail; + ahi = c - (c - bdxtail); + alo = bdxtail - ahi; + c = _util.splitter * adytail; + bhi = c - (c - adytail); + blo = adytail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + abtt[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + abtt[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + abtt[2] = _j - (u3 - bvirt) + (_i - bvirt); + abtt[3] = u3; + abttlen = 4; + } else { + abt[0] = 0; + abtlen = 1; + abtt[0] = 0; + abttlen = 1; + } + if (cdxtail !== 0) { + const len = (0, _util.scale)(abtlen, abt, cdxtail, _16c); + finlen = finadd(finlen, (0, _util.sum)((0, _util.scale)(cxtablen, cxtab, cdxtail, _16), _16, (0, _util.scale)(len, _16c, 2 * cdx, _32), _32, _48), _48); + const len2 = (0, _util.scale)(abttlen, abtt, cdxtail, _8); + finlen = finadd(finlen, (0, _util.sum_three)((0, _util.scale)(len2, _8, 2 * cdx, _16), _16, (0, _util.scale)(len2, _8, cdxtail, _16b), _16b, (0, _util.scale)(len, _16c, cdxtail, _32), _32, _32b, _64), _64); + if (adytail !== 0) { + finlen = finadd(finlen, (0, _util.scale)((0, _util.scale)(4, bb, cdxtail, _8), _8, adytail, _16), _16); + } + if (bdytail !== 0) { + finlen = finadd(finlen, (0, _util.scale)((0, _util.scale)(4, aa, -cdxtail, _8), _8, bdytail, _16), _16); + } + } + if (cdytail !== 0) { + const len = (0, _util.scale)(abtlen, abt, cdytail, _16c); + finlen = finadd(finlen, (0, _util.sum)((0, _util.scale)(cytablen, cytab, cdytail, _16), _16, (0, _util.scale)(len, _16c, 2 * cdy, _32), _32, _48), _48); + const len2 = (0, _util.scale)(abttlen, abtt, cdytail, _8); + finlen = finadd(finlen, (0, _util.sum_three)((0, _util.scale)(len2, _8, 2 * cdy, _16), _16, (0, _util.scale)(len2, _8, cdytail, _16b), _16b, (0, _util.scale)(len, _16c, cdytail, _32), _32, _32b, _64), _64); + } + } + return fin[finlen - 1]; +} +function incircle(ax, ay, bx, by, cx, cy, dx, dy) { + const adx = ax - dx; + const bdx = bx - dx; + const cdx = cx - dx; + const ady = ay - dy; + const bdy = by - dy; + const cdy = cy - dy; + const bdxcdy = bdx * cdy; + const cdxbdy = cdx * bdy; + const alift = adx * adx + ady * ady; + const cdxady = cdx * ady; + const adxcdy = adx * cdy; + const blift = bdx * bdx + bdy * bdy; + const adxbdy = adx * bdy; + const bdxady = bdx * ady; + const clift = cdx * cdx + cdy * cdy; + const det = alift * (bdxcdy - cdxbdy) + blift * (cdxady - adxcdy) + clift * (adxbdy - bdxady); + const permanent = (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * alift + (Math.abs(cdxady) + Math.abs(adxcdy)) * blift + (Math.abs(adxbdy) + Math.abs(bdxady)) * clift; + const errbound = iccerrboundA * permanent; + if (det > errbound || -det > errbound) { + return det; + } + return incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent); +} +function incirclefast(ax, ay, bx, by, cx, cy, dx, dy) { + const adx = ax - dx; + const ady = ay - dy; + const bdx = bx - dx; + const bdy = by - dy; + const cdx = cx - dx; + const cdy = cy - dy; + const abdet = adx * bdy - bdx * ady; + const bcdet = bdx * cdy - cdx * bdy; + const cadet = cdx * ady - adx * cdy; + const alift = adx * adx + ady * ady; + const blift = bdx * bdx + bdy * bdy; + const clift = cdx * cdx + cdy * cdy; + return alift * bcdet + blift * cadet + clift * abdet; +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/robust-predicates/esm/insphere.js b/packages/x-charts-vendor/lib-vendor/robust-predicates/esm/insphere.js new file mode 100644 index 000000000000..8b0767b8a610 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/robust-predicates/esm/insphere.js @@ -0,0 +1,693 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.insphere = insphere; +exports.inspherefast = inspherefast; +var _util = require("./util.js"); +const isperrboundA = (16 + 224 * _util.epsilon) * _util.epsilon; +const isperrboundB = (5 + 72 * _util.epsilon) * _util.epsilon; +const isperrboundC = (71 + 1408 * _util.epsilon) * _util.epsilon * _util.epsilon; +const ab = (0, _util.vec)(4); +const bc = (0, _util.vec)(4); +const cd = (0, _util.vec)(4); +const de = (0, _util.vec)(4); +const ea = (0, _util.vec)(4); +const ac = (0, _util.vec)(4); +const bd = (0, _util.vec)(4); +const ce = (0, _util.vec)(4); +const da = (0, _util.vec)(4); +const eb = (0, _util.vec)(4); +const abc = (0, _util.vec)(24); +const bcd = (0, _util.vec)(24); +const cde = (0, _util.vec)(24); +const dea = (0, _util.vec)(24); +const eab = (0, _util.vec)(24); +const abd = (0, _util.vec)(24); +const bce = (0, _util.vec)(24); +const cda = (0, _util.vec)(24); +const deb = (0, _util.vec)(24); +const eac = (0, _util.vec)(24); +const adet = (0, _util.vec)(1152); +const bdet = (0, _util.vec)(1152); +const cdet = (0, _util.vec)(1152); +const ddet = (0, _util.vec)(1152); +const edet = (0, _util.vec)(1152); +const abdet = (0, _util.vec)(2304); +const cddet = (0, _util.vec)(2304); +const cdedet = (0, _util.vec)(3456); +const deter = (0, _util.vec)(5760); +const _8 = (0, _util.vec)(8); +const _8b = (0, _util.vec)(8); +const _8c = (0, _util.vec)(8); +const _16 = (0, _util.vec)(16); +const _24 = (0, _util.vec)(24); +const _48 = (0, _util.vec)(48); +const _48b = (0, _util.vec)(48); +const _96 = (0, _util.vec)(96); +const _192 = (0, _util.vec)(192); +const _384x = (0, _util.vec)(384); +const _384y = (0, _util.vec)(384); +const _384z = (0, _util.vec)(384); +const _768 = (0, _util.vec)(768); +function sum_three_scale(a, b, c, az, bz, cz, out) { + return (0, _util.sum_three)((0, _util.scale)(4, a, az, _8), _8, (0, _util.scale)(4, b, bz, _8b), _8b, (0, _util.scale)(4, c, cz, _8c), _8c, _16, out); +} +function liftexact(alen, a, blen, b, clen, c, dlen, d, x, y, z, out) { + const len = (0, _util.sum)((0, _util.sum)(alen, a, blen, b, _48), _48, (0, _util.negate)((0, _util.sum)(clen, c, dlen, d, _48b), _48b), _48b, _96); + return (0, _util.sum_three)((0, _util.scale)((0, _util.scale)(len, _96, x, _192), _192, x, _384x), _384x, (0, _util.scale)((0, _util.scale)(len, _96, y, _192), _192, y, _384y), _384y, (0, _util.scale)((0, _util.scale)(len, _96, z, _192), _192, z, _384z), _384z, _768, out); +} +function insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) { + let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3; + s1 = ax * by; + c = _util.splitter * ax; + ahi = c - (c - ax); + alo = ax - ahi; + c = _util.splitter * by; + bhi = c - (c - by); + blo = by - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bx * ay; + c = _util.splitter * bx; + ahi = c - (c - bx); + alo = bx - ahi; + c = _util.splitter * ay; + bhi = c - (c - ay); + blo = ay - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ab[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ab[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ab[2] = _j - (u3 - bvirt) + (_i - bvirt); + ab[3] = u3; + s1 = bx * cy; + c = _util.splitter * bx; + ahi = c - (c - bx); + alo = bx - ahi; + c = _util.splitter * cy; + bhi = c - (c - cy); + blo = cy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cx * by; + c = _util.splitter * cx; + ahi = c - (c - cx); + alo = cx - ahi; + c = _util.splitter * by; + bhi = c - (c - by); + blo = by - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + bc[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + bc[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + bc[2] = _j - (u3 - bvirt) + (_i - bvirt); + bc[3] = u3; + s1 = cx * dy; + c = _util.splitter * cx; + ahi = c - (c - cx); + alo = cx - ahi; + c = _util.splitter * dy; + bhi = c - (c - dy); + blo = dy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = dx * cy; + c = _util.splitter * dx; + ahi = c - (c - dx); + alo = dx - ahi; + c = _util.splitter * cy; + bhi = c - (c - cy); + blo = cy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + cd[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + cd[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + cd[2] = _j - (u3 - bvirt) + (_i - bvirt); + cd[3] = u3; + s1 = dx * ey; + c = _util.splitter * dx; + ahi = c - (c - dx); + alo = dx - ahi; + c = _util.splitter * ey; + bhi = c - (c - ey); + blo = ey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = ex * dy; + c = _util.splitter * ex; + ahi = c - (c - ex); + alo = ex - ahi; + c = _util.splitter * dy; + bhi = c - (c - dy); + blo = dy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + de[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + de[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + de[2] = _j - (u3 - bvirt) + (_i - bvirt); + de[3] = u3; + s1 = ex * ay; + c = _util.splitter * ex; + ahi = c - (c - ex); + alo = ex - ahi; + c = _util.splitter * ay; + bhi = c - (c - ay); + blo = ay - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = ax * ey; + c = _util.splitter * ax; + ahi = c - (c - ax); + alo = ax - ahi; + c = _util.splitter * ey; + bhi = c - (c - ey); + blo = ey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ea[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ea[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ea[2] = _j - (u3 - bvirt) + (_i - bvirt); + ea[3] = u3; + s1 = ax * cy; + c = _util.splitter * ax; + ahi = c - (c - ax); + alo = ax - ahi; + c = _util.splitter * cy; + bhi = c - (c - cy); + blo = cy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cx * ay; + c = _util.splitter * cx; + ahi = c - (c - cx); + alo = cx - ahi; + c = _util.splitter * ay; + bhi = c - (c - ay); + blo = ay - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ac[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ac[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ac[2] = _j - (u3 - bvirt) + (_i - bvirt); + ac[3] = u3; + s1 = bx * dy; + c = _util.splitter * bx; + ahi = c - (c - bx); + alo = bx - ahi; + c = _util.splitter * dy; + bhi = c - (c - dy); + blo = dy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = dx * by; + c = _util.splitter * dx; + ahi = c - (c - dx); + alo = dx - ahi; + c = _util.splitter * by; + bhi = c - (c - by); + blo = by - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + bd[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + bd[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + bd[2] = _j - (u3 - bvirt) + (_i - bvirt); + bd[3] = u3; + s1 = cx * ey; + c = _util.splitter * cx; + ahi = c - (c - cx); + alo = cx - ahi; + c = _util.splitter * ey; + bhi = c - (c - ey); + blo = ey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = ex * cy; + c = _util.splitter * ex; + ahi = c - (c - ex); + alo = ex - ahi; + c = _util.splitter * cy; + bhi = c - (c - cy); + blo = cy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ce[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ce[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ce[2] = _j - (u3 - bvirt) + (_i - bvirt); + ce[3] = u3; + s1 = dx * ay; + c = _util.splitter * dx; + ahi = c - (c - dx); + alo = dx - ahi; + c = _util.splitter * ay; + bhi = c - (c - ay); + blo = ay - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = ax * dy; + c = _util.splitter * ax; + ahi = c - (c - ax); + alo = ax - ahi; + c = _util.splitter * dy; + bhi = c - (c - dy); + blo = dy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + da[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + da[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + da[2] = _j - (u3 - bvirt) + (_i - bvirt); + da[3] = u3; + s1 = ex * by; + c = _util.splitter * ex; + ahi = c - (c - ex); + alo = ex - ahi; + c = _util.splitter * by; + bhi = c - (c - by); + blo = by - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bx * ey; + c = _util.splitter * bx; + ahi = c - (c - bx); + alo = bx - ahi; + c = _util.splitter * ey; + bhi = c - (c - ey); + blo = ey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + eb[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + eb[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + eb[2] = _j - (u3 - bvirt) + (_i - bvirt); + eb[3] = u3; + const abclen = sum_three_scale(ab, bc, ac, cz, az, -bz, abc); + const bcdlen = sum_three_scale(bc, cd, bd, dz, bz, -cz, bcd); + const cdelen = sum_three_scale(cd, de, ce, ez, cz, -dz, cde); + const dealen = sum_three_scale(de, ea, da, az, dz, -ez, dea); + const eablen = sum_three_scale(ea, ab, eb, bz, ez, -az, eab); + const abdlen = sum_three_scale(ab, bd, da, dz, az, bz, abd); + const bcelen = sum_three_scale(bc, ce, eb, ez, bz, cz, bce); + const cdalen = sum_three_scale(cd, da, ac, az, cz, dz, cda); + const deblen = sum_three_scale(de, eb, bd, bz, dz, ez, deb); + const eaclen = sum_three_scale(ea, ac, ce, cz, ez, az, eac); + const deterlen = (0, _util.sum_three)(liftexact(cdelen, cde, bcelen, bce, deblen, deb, bcdlen, bcd, ax, ay, az, adet), adet, liftexact(dealen, dea, cdalen, cda, eaclen, eac, cdelen, cde, bx, by, bz, bdet), bdet, (0, _util.sum_three)(liftexact(eablen, eab, deblen, deb, abdlen, abd, dealen, dea, cx, cy, cz, cdet), cdet, liftexact(abclen, abc, eaclen, eac, bcelen, bce, eablen, eab, dx, dy, dz, ddet), ddet, liftexact(bcdlen, bcd, abdlen, abd, cdalen, cda, abclen, abc, ex, ey, ez, edet), edet, cddet, cdedet), cdedet, abdet, deter); + return deter[deterlen - 1]; +} +const xdet = (0, _util.vec)(96); +const ydet = (0, _util.vec)(96); +const zdet = (0, _util.vec)(96); +const fin = (0, _util.vec)(1152); +function liftadapt(a, b, c, az, bz, cz, x, y, z, out) { + const len = sum_three_scale(a, b, c, az, bz, cz, _24); + return (0, _util.sum_three)((0, _util.scale)((0, _util.scale)(len, _24, x, _48), _48, x, xdet), xdet, (0, _util.scale)((0, _util.scale)(len, _24, y, _48), _48, y, ydet), ydet, (0, _util.scale)((0, _util.scale)(len, _24, z, _48), _48, z, zdet), zdet, _192, out); +} +function insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent) { + let ab3, bc3, cd3, da3, ac3, bd3; + let aextail, bextail, cextail, dextail; + let aeytail, beytail, ceytail, deytail; + let aeztail, beztail, ceztail, deztail; + let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0; + const aex = ax - ex; + const bex = bx - ex; + const cex = cx - ex; + const dex = dx - ex; + const aey = ay - ey; + const bey = by - ey; + const cey = cy - ey; + const dey = dy - ey; + const aez = az - ez; + const bez = bz - ez; + const cez = cz - ez; + const dez = dz - ez; + s1 = aex * bey; + c = _util.splitter * aex; + ahi = c - (c - aex); + alo = aex - ahi; + c = _util.splitter * bey; + bhi = c - (c - bey); + blo = bey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bex * aey; + c = _util.splitter * bex; + ahi = c - (c - bex); + alo = bex - ahi; + c = _util.splitter * aey; + bhi = c - (c - aey); + blo = aey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ab[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ab[1] = _0 - (_i + bvirt) + (bvirt - t1); + ab3 = _j + _i; + bvirt = ab3 - _j; + ab[2] = _j - (ab3 - bvirt) + (_i - bvirt); + ab[3] = ab3; + s1 = bex * cey; + c = _util.splitter * bex; + ahi = c - (c - bex); + alo = bex - ahi; + c = _util.splitter * cey; + bhi = c - (c - cey); + blo = cey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cex * bey; + c = _util.splitter * cex; + ahi = c - (c - cex); + alo = cex - ahi; + c = _util.splitter * bey; + bhi = c - (c - bey); + blo = bey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + bc[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + bc[1] = _0 - (_i + bvirt) + (bvirt - t1); + bc3 = _j + _i; + bvirt = bc3 - _j; + bc[2] = _j - (bc3 - bvirt) + (_i - bvirt); + bc[3] = bc3; + s1 = cex * dey; + c = _util.splitter * cex; + ahi = c - (c - cex); + alo = cex - ahi; + c = _util.splitter * dey; + bhi = c - (c - dey); + blo = dey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = dex * cey; + c = _util.splitter * dex; + ahi = c - (c - dex); + alo = dex - ahi; + c = _util.splitter * cey; + bhi = c - (c - cey); + blo = cey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + cd[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + cd[1] = _0 - (_i + bvirt) + (bvirt - t1); + cd3 = _j + _i; + bvirt = cd3 - _j; + cd[2] = _j - (cd3 - bvirt) + (_i - bvirt); + cd[3] = cd3; + s1 = dex * aey; + c = _util.splitter * dex; + ahi = c - (c - dex); + alo = dex - ahi; + c = _util.splitter * aey; + bhi = c - (c - aey); + blo = aey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = aex * dey; + c = _util.splitter * aex; + ahi = c - (c - aex); + alo = aex - ahi; + c = _util.splitter * dey; + bhi = c - (c - dey); + blo = dey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + da[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + da[1] = _0 - (_i + bvirt) + (bvirt - t1); + da3 = _j + _i; + bvirt = da3 - _j; + da[2] = _j - (da3 - bvirt) + (_i - bvirt); + da[3] = da3; + s1 = aex * cey; + c = _util.splitter * aex; + ahi = c - (c - aex); + alo = aex - ahi; + c = _util.splitter * cey; + bhi = c - (c - cey); + blo = cey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cex * aey; + c = _util.splitter * cex; + ahi = c - (c - cex); + alo = cex - ahi; + c = _util.splitter * aey; + bhi = c - (c - aey); + blo = aey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ac[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ac[1] = _0 - (_i + bvirt) + (bvirt - t1); + ac3 = _j + _i; + bvirt = ac3 - _j; + ac[2] = _j - (ac3 - bvirt) + (_i - bvirt); + ac[3] = ac3; + s1 = bex * dey; + c = _util.splitter * bex; + ahi = c - (c - bex); + alo = bex - ahi; + c = _util.splitter * dey; + bhi = c - (c - dey); + blo = dey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = dex * bey; + c = _util.splitter * dex; + ahi = c - (c - dex); + alo = dex - ahi; + c = _util.splitter * bey; + bhi = c - (c - bey); + blo = bey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + bd[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + bd[1] = _0 - (_i + bvirt) + (bvirt - t1); + bd3 = _j + _i; + bvirt = bd3 - _j; + bd[2] = _j - (bd3 - bvirt) + (_i - bvirt); + bd[3] = bd3; + const finlen = (0, _util.sum)((0, _util.sum)((0, _util.negate)(liftadapt(bc, cd, bd, dez, bez, -cez, aex, aey, aez, adet), adet), adet, liftadapt(cd, da, ac, aez, cez, dez, bex, bey, bez, bdet), bdet, abdet), abdet, (0, _util.sum)((0, _util.negate)(liftadapt(da, ab, bd, bez, dez, aez, cex, cey, cez, cdet), cdet), cdet, liftadapt(ab, bc, ac, cez, aez, -bez, dex, dey, dez, ddet), ddet, cddet), cddet, fin); + let det = (0, _util.estimate)(finlen, fin); + let errbound = isperrboundB * permanent; + if (det >= errbound || -det >= errbound) { + return det; + } + bvirt = ax - aex; + aextail = ax - (aex + bvirt) + (bvirt - ex); + bvirt = ay - aey; + aeytail = ay - (aey + bvirt) + (bvirt - ey); + bvirt = az - aez; + aeztail = az - (aez + bvirt) + (bvirt - ez); + bvirt = bx - bex; + bextail = bx - (bex + bvirt) + (bvirt - ex); + bvirt = by - bey; + beytail = by - (bey + bvirt) + (bvirt - ey); + bvirt = bz - bez; + beztail = bz - (bez + bvirt) + (bvirt - ez); + bvirt = cx - cex; + cextail = cx - (cex + bvirt) + (bvirt - ex); + bvirt = cy - cey; + ceytail = cy - (cey + bvirt) + (bvirt - ey); + bvirt = cz - cez; + ceztail = cz - (cez + bvirt) + (bvirt - ez); + bvirt = dx - dex; + dextail = dx - (dex + bvirt) + (bvirt - ex); + bvirt = dy - dey; + deytail = dy - (dey + bvirt) + (bvirt - ey); + bvirt = dz - dez; + deztail = dz - (dez + bvirt) + (bvirt - ez); + if (aextail === 0 && aeytail === 0 && aeztail === 0 && bextail === 0 && beytail === 0 && beztail === 0 && cextail === 0 && ceytail === 0 && ceztail === 0 && dextail === 0 && deytail === 0 && deztail === 0) { + return det; + } + errbound = isperrboundC * permanent + _util.resulterrbound * Math.abs(det); + const abeps = aex * beytail + bey * aextail - (aey * bextail + bex * aeytail); + const bceps = bex * ceytail + cey * bextail - (bey * cextail + cex * beytail); + const cdeps = cex * deytail + dey * cextail - (cey * dextail + dex * ceytail); + const daeps = dex * aeytail + aey * dextail - (dey * aextail + aex * deytail); + const aceps = aex * ceytail + cey * aextail - (aey * cextail + cex * aeytail); + const bdeps = bex * deytail + dey * bextail - (bey * dextail + dex * beytail); + det += (bex * bex + bey * bey + bez * bez) * (cez * daeps + dez * aceps + aez * cdeps + (ceztail * da3 + deztail * ac3 + aeztail * cd3)) + (dex * dex + dey * dey + dez * dez) * (aez * bceps - bez * aceps + cez * abeps + (aeztail * bc3 - beztail * ac3 + ceztail * ab3)) - ((aex * aex + aey * aey + aez * aez) * (bez * cdeps - cez * bdeps + dez * bceps + (beztail * cd3 - ceztail * bd3 + deztail * bc3)) + (cex * cex + cey * cey + cez * cez) * (dez * abeps + aez * bdeps + bez * daeps + (deztail * ab3 + aeztail * bd3 + beztail * da3))) + 2 * ((bex * bextail + bey * beytail + bez * beztail) * (cez * da3 + dez * ac3 + aez * cd3) + (dex * dextail + dey * deytail + dez * deztail) * (aez * bc3 - bez * ac3 + cez * ab3) - ((aex * aextail + aey * aeytail + aez * aeztail) * (bez * cd3 - cez * bd3 + dez * bc3) + (cex * cextail + cey * ceytail + cez * ceztail) * (dez * ab3 + aez * bd3 + bez * da3))); + if (det >= errbound || -det >= errbound) { + return det; + } + return insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez); +} +function insphere(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) { + const aex = ax - ex; + const bex = bx - ex; + const cex = cx - ex; + const dex = dx - ex; + const aey = ay - ey; + const bey = by - ey; + const cey = cy - ey; + const dey = dy - ey; + const aez = az - ez; + const bez = bz - ez; + const cez = cz - ez; + const dez = dz - ez; + const aexbey = aex * bey; + const bexaey = bex * aey; + const ab = aexbey - bexaey; + const bexcey = bex * cey; + const cexbey = cex * bey; + const bc = bexcey - cexbey; + const cexdey = cex * dey; + const dexcey = dex * cey; + const cd = cexdey - dexcey; + const dexaey = dex * aey; + const aexdey = aex * dey; + const da = dexaey - aexdey; + const aexcey = aex * cey; + const cexaey = cex * aey; + const ac = aexcey - cexaey; + const bexdey = bex * dey; + const dexbey = dex * bey; + const bd = bexdey - dexbey; + const alift = aex * aex + aey * aey + aez * aez; + const blift = bex * bex + bey * bey + bez * bez; + const clift = cex * cex + cey * cey + cez * cez; + const dlift = dex * dex + dey * dey + dez * dez; + const det = clift * (dez * ab + aez * bd + bez * da) - dlift * (aez * bc - bez * ac + cez * ab) + (alift * (bez * cd - cez * bd + dez * bc) - blift * (cez * da + dez * ac + aez * cd)); + const aezplus = Math.abs(aez); + const bezplus = Math.abs(bez); + const cezplus = Math.abs(cez); + const dezplus = Math.abs(dez); + const aexbeyplus = Math.abs(aexbey) + Math.abs(bexaey); + const bexceyplus = Math.abs(bexcey) + Math.abs(cexbey); + const cexdeyplus = Math.abs(cexdey) + Math.abs(dexcey); + const dexaeyplus = Math.abs(dexaey) + Math.abs(aexdey); + const aexceyplus = Math.abs(aexcey) + Math.abs(cexaey); + const bexdeyplus = Math.abs(bexdey) + Math.abs(dexbey); + const permanent = (cexdeyplus * bezplus + bexdeyplus * cezplus + bexceyplus * dezplus) * alift + (dexaeyplus * cezplus + aexceyplus * dezplus + cexdeyplus * aezplus) * blift + (aexbeyplus * dezplus + bexdeyplus * aezplus + dexaeyplus * bezplus) * clift + (bexceyplus * aezplus + aexceyplus * bezplus + aexbeyplus * cezplus) * dlift; + const errbound = isperrboundA * permanent; + if (det > errbound || -det > errbound) { + return det; + } + return -insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent); +} +function inspherefast(pax, pay, paz, pbx, pby, pbz, pcx, pcy, pcz, pdx, pdy, pdz, pex, pey, pez) { + const aex = pax - pex; + const bex = pbx - pex; + const cex = pcx - pex; + const dex = pdx - pex; + const aey = pay - pey; + const bey = pby - pey; + const cey = pcy - pey; + const dey = pdy - pey; + const aez = paz - pez; + const bez = pbz - pez; + const cez = pcz - pez; + const dez = pdz - pez; + const ab = aex * bey - bex * aey; + const bc = bex * cey - cex * bey; + const cd = cex * dey - dex * cey; + const da = dex * aey - aex * dey; + const ac = aex * cey - cex * aey; + const bd = bex * dey - dex * bey; + const abc = aez * bc - bez * ac + cez * ab; + const bcd = bez * cd - cez * bd + dez * bc; + const cda = cez * da + dez * ac + aez * cd; + const dab = dez * ab + aez * bd + bez * da; + const alift = aex * aex + aey * aey + aez * aez; + const blift = bex * bex + bey * bey + bez * bez; + const clift = cex * cex + cey * cey + cez * cez; + const dlift = dex * dex + dey * dey + dez * dez; + return clift * dab - dlift * abc + (alift * bcd - blift * cda); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/robust-predicates/esm/orient2d.js b/packages/x-charts-vendor/lib-vendor/robust-predicates/esm/orient2d.js new file mode 100644 index 000000000000..725b2f8d5f9c --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/robust-predicates/esm/orient2d.js @@ -0,0 +1,174 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.orient2d = orient2d; +exports.orient2dfast = orient2dfast; +var _util = require("./util.js"); +const ccwerrboundA = (3 + 16 * _util.epsilon) * _util.epsilon; +const ccwerrboundB = (2 + 12 * _util.epsilon) * _util.epsilon; +const ccwerrboundC = (9 + 64 * _util.epsilon) * _util.epsilon * _util.epsilon; +const B = (0, _util.vec)(4); +const C1 = (0, _util.vec)(8); +const C2 = (0, _util.vec)(12); +const D = (0, _util.vec)(16); +const u = (0, _util.vec)(4); +function orient2dadapt(ax, ay, bx, by, cx, cy, detsum) { + let acxtail, acytail, bcxtail, bcytail; + let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3; + const acx = ax - cx; + const bcx = bx - cx; + const acy = ay - cy; + const bcy = by - cy; + s1 = acx * bcy; + c = _util.splitter * acx; + ahi = c - (c - acx); + alo = acx - ahi; + c = _util.splitter * bcy; + bhi = c - (c - bcy); + blo = bcy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = acy * bcx; + c = _util.splitter * acy; + ahi = c - (c - acy); + alo = acy - ahi; + c = _util.splitter * bcx; + bhi = c - (c - bcx); + blo = bcx - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + B[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + B[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + B[2] = _j - (u3 - bvirt) + (_i - bvirt); + B[3] = u3; + let det = (0, _util.estimate)(4, B); + let errbound = ccwerrboundB * detsum; + if (det >= errbound || -det >= errbound) { + return det; + } + bvirt = ax - acx; + acxtail = ax - (acx + bvirt) + (bvirt - cx); + bvirt = bx - bcx; + bcxtail = bx - (bcx + bvirt) + (bvirt - cx); + bvirt = ay - acy; + acytail = ay - (acy + bvirt) + (bvirt - cy); + bvirt = by - bcy; + bcytail = by - (bcy + bvirt) + (bvirt - cy); + if (acxtail === 0 && acytail === 0 && bcxtail === 0 && bcytail === 0) { + return det; + } + errbound = ccwerrboundC * detsum + _util.resulterrbound * Math.abs(det); + det += acx * bcytail + bcy * acxtail - (acy * bcxtail + bcx * acytail); + if (det >= errbound || -det >= errbound) return det; + s1 = acxtail * bcy; + c = _util.splitter * acxtail; + ahi = c - (c - acxtail); + alo = acxtail - ahi; + c = _util.splitter * bcy; + bhi = c - (c - bcy); + blo = bcy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = acytail * bcx; + c = _util.splitter * acytail; + ahi = c - (c - acytail); + alo = acytail - ahi; + c = _util.splitter * bcx; + bhi = c - (c - bcx); + blo = bcx - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + u[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + u[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + u[2] = _j - (u3 - bvirt) + (_i - bvirt); + u[3] = u3; + const C1len = (0, _util.sum)(4, B, 4, u, C1); + s1 = acx * bcytail; + c = _util.splitter * acx; + ahi = c - (c - acx); + alo = acx - ahi; + c = _util.splitter * bcytail; + bhi = c - (c - bcytail); + blo = bcytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = acy * bcxtail; + c = _util.splitter * acy; + ahi = c - (c - acy); + alo = acy - ahi; + c = _util.splitter * bcxtail; + bhi = c - (c - bcxtail); + blo = bcxtail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + u[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + u[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + u[2] = _j - (u3 - bvirt) + (_i - bvirt); + u[3] = u3; + const C2len = (0, _util.sum)(C1len, C1, 4, u, C2); + s1 = acxtail * bcytail; + c = _util.splitter * acxtail; + ahi = c - (c - acxtail); + alo = acxtail - ahi; + c = _util.splitter * bcytail; + bhi = c - (c - bcytail); + blo = bcytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = acytail * bcxtail; + c = _util.splitter * acytail; + ahi = c - (c - acytail); + alo = acytail - ahi; + c = _util.splitter * bcxtail; + bhi = c - (c - bcxtail); + blo = bcxtail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + u[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + u[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + u[2] = _j - (u3 - bvirt) + (_i - bvirt); + u[3] = u3; + const Dlen = (0, _util.sum)(C2len, C2, 4, u, D); + return D[Dlen - 1]; +} +function orient2d(ax, ay, bx, by, cx, cy) { + const detleft = (ay - cy) * (bx - cx); + const detright = (ax - cx) * (by - cy); + const det = detleft - detright; + const detsum = Math.abs(detleft + detright); + if (Math.abs(det) >= ccwerrboundA * detsum) return det; + return -orient2dadapt(ax, ay, bx, by, cx, cy, detsum); +} +function orient2dfast(ax, ay, bx, by, cx, cy) { + return (ay - cy) * (bx - cx) - (ax - cx) * (by - cy); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/robust-predicates/esm/orient3d.js b/packages/x-charts-vendor/lib-vendor/robust-predicates/esm/orient3d.js new file mode 100644 index 000000000000..49aaf8958c8d --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/robust-predicates/esm/orient3d.js @@ -0,0 +1,422 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.orient3d = orient3d; +exports.orient3dfast = orient3dfast; +var _util = require("./util.js"); +const o3derrboundA = (7 + 56 * _util.epsilon) * _util.epsilon; +const o3derrboundB = (3 + 28 * _util.epsilon) * _util.epsilon; +const o3derrboundC = (26 + 288 * _util.epsilon) * _util.epsilon * _util.epsilon; +const bc = (0, _util.vec)(4); +const ca = (0, _util.vec)(4); +const ab = (0, _util.vec)(4); +const at_b = (0, _util.vec)(4); +const at_c = (0, _util.vec)(4); +const bt_c = (0, _util.vec)(4); +const bt_a = (0, _util.vec)(4); +const ct_a = (0, _util.vec)(4); +const ct_b = (0, _util.vec)(4); +const bct = (0, _util.vec)(8); +const cat = (0, _util.vec)(8); +const abt = (0, _util.vec)(8); +const u = (0, _util.vec)(4); +const _8 = (0, _util.vec)(8); +const _8b = (0, _util.vec)(8); +const _16 = (0, _util.vec)(8); +const _12 = (0, _util.vec)(12); +let fin = (0, _util.vec)(192); +let fin2 = (0, _util.vec)(192); +function finadd(finlen, alen, a) { + finlen = (0, _util.sum)(finlen, fin, alen, a, fin2); + const tmp = fin; + fin = fin2; + fin2 = tmp; + return finlen; +} +function tailinit(xtail, ytail, ax, ay, bx, by, a, b) { + let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, t1, t0, u3, negate; + if (xtail === 0) { + if (ytail === 0) { + a[0] = 0; + b[0] = 0; + return 1; + } else { + negate = -ytail; + s1 = negate * ax; + c = _util.splitter * negate; + ahi = c - (c - negate); + alo = negate - ahi; + c = _util.splitter * ax; + bhi = c - (c - ax); + blo = ax - bhi; + a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + a[1] = s1; + s1 = ytail * bx; + c = _util.splitter * ytail; + ahi = c - (c - ytail); + alo = ytail - ahi; + c = _util.splitter * bx; + bhi = c - (c - bx); + blo = bx - bhi; + b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + b[1] = s1; + return 2; + } + } else { + if (ytail === 0) { + s1 = xtail * ay; + c = _util.splitter * xtail; + ahi = c - (c - xtail); + alo = xtail - ahi; + c = _util.splitter * ay; + bhi = c - (c - ay); + blo = ay - bhi; + a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + a[1] = s1; + negate = -xtail; + s1 = negate * by; + c = _util.splitter * negate; + ahi = c - (c - negate); + alo = negate - ahi; + c = _util.splitter * by; + bhi = c - (c - by); + blo = by - bhi; + b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + b[1] = s1; + return 2; + } else { + s1 = xtail * ay; + c = _util.splitter * xtail; + ahi = c - (c - xtail); + alo = xtail - ahi; + c = _util.splitter * ay; + bhi = c - (c - ay); + blo = ay - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = ytail * ax; + c = _util.splitter * ytail; + ahi = c - (c - ytail); + alo = ytail - ahi; + c = _util.splitter * ax; + bhi = c - (c - ax); + blo = ax - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + a[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + a[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + a[2] = _j - (u3 - bvirt) + (_i - bvirt); + a[3] = u3; + s1 = ytail * bx; + c = _util.splitter * ytail; + ahi = c - (c - ytail); + alo = ytail - ahi; + c = _util.splitter * bx; + bhi = c - (c - bx); + blo = bx - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = xtail * by; + c = _util.splitter * xtail; + ahi = c - (c - xtail); + alo = xtail - ahi; + c = _util.splitter * by; + bhi = c - (c - by); + blo = by - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + b[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + b[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + b[2] = _j - (u3 - bvirt) + (_i - bvirt); + b[3] = u3; + return 4; + } + } +} +function tailadd(finlen, a, b, k, z) { + let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, u3; + s1 = a * b; + c = _util.splitter * a; + ahi = c - (c - a); + alo = a - ahi; + c = _util.splitter * b; + bhi = c - (c - b); + blo = b - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + c = _util.splitter * k; + bhi = c - (c - k); + blo = k - bhi; + _i = s0 * k; + c = _util.splitter * s0; + ahi = c - (c - s0); + alo = s0 - ahi; + u[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo); + _j = s1 * k; + c = _util.splitter * s1; + ahi = c - (c - s1); + alo = s1 - ahi; + _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo); + _k = _i + _0; + bvirt = _k - _i; + u[1] = _i - (_k - bvirt) + (_0 - bvirt); + u3 = _j + _k; + u[2] = _k - (u3 - _j); + u[3] = u3; + finlen = finadd(finlen, 4, u); + if (z !== 0) { + c = _util.splitter * z; + bhi = c - (c - z); + blo = z - bhi; + _i = s0 * z; + c = _util.splitter * s0; + ahi = c - (c - s0); + alo = s0 - ahi; + u[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo); + _j = s1 * z; + c = _util.splitter * s1; + ahi = c - (c - s1); + alo = s1 - ahi; + _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo); + _k = _i + _0; + bvirt = _k - _i; + u[1] = _i - (_k - bvirt) + (_0 - bvirt); + u3 = _j + _k; + u[2] = _k - (u3 - _j); + u[3] = u3; + finlen = finadd(finlen, 4, u); + } + return finlen; +} +function orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent) { + let finlen; + let adxtail, bdxtail, cdxtail; + let adytail, bdytail, cdytail; + let adztail, bdztail, cdztail; + let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, t1, t0, u3; + const adx = ax - dx; + const bdx = bx - dx; + const cdx = cx - dx; + const ady = ay - dy; + const bdy = by - dy; + const cdy = cy - dy; + const adz = az - dz; + const bdz = bz - dz; + const cdz = cz - dz; + s1 = bdx * cdy; + c = _util.splitter * bdx; + ahi = c - (c - bdx); + alo = bdx - ahi; + c = _util.splitter * cdy; + bhi = c - (c - cdy); + blo = cdy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cdx * bdy; + c = _util.splitter * cdx; + ahi = c - (c - cdx); + alo = cdx - ahi; + c = _util.splitter * bdy; + bhi = c - (c - bdy); + blo = bdy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + bc[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + bc[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + bc[2] = _j - (u3 - bvirt) + (_i - bvirt); + bc[3] = u3; + s1 = cdx * ady; + c = _util.splitter * cdx; + ahi = c - (c - cdx); + alo = cdx - ahi; + c = _util.splitter * ady; + bhi = c - (c - ady); + blo = ady - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = adx * cdy; + c = _util.splitter * adx; + ahi = c - (c - adx); + alo = adx - ahi; + c = _util.splitter * cdy; + bhi = c - (c - cdy); + blo = cdy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ca[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ca[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ca[2] = _j - (u3 - bvirt) + (_i - bvirt); + ca[3] = u3; + s1 = adx * bdy; + c = _util.splitter * adx; + ahi = c - (c - adx); + alo = adx - ahi; + c = _util.splitter * bdy; + bhi = c - (c - bdy); + blo = bdy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bdx * ady; + c = _util.splitter * bdx; + ahi = c - (c - bdx); + alo = bdx - ahi; + c = _util.splitter * ady; + bhi = c - (c - ady); + blo = ady - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ab[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ab[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ab[2] = _j - (u3 - bvirt) + (_i - bvirt); + ab[3] = u3; + finlen = (0, _util.sum)((0, _util.sum)((0, _util.scale)(4, bc, adz, _8), _8, (0, _util.scale)(4, ca, bdz, _8b), _8b, _16), _16, (0, _util.scale)(4, ab, cdz, _8), _8, fin); + let det = (0, _util.estimate)(finlen, fin); + let errbound = o3derrboundB * permanent; + if (det >= errbound || -det >= errbound) { + return det; + } + bvirt = ax - adx; + adxtail = ax - (adx + bvirt) + (bvirt - dx); + bvirt = bx - bdx; + bdxtail = bx - (bdx + bvirt) + (bvirt - dx); + bvirt = cx - cdx; + cdxtail = cx - (cdx + bvirt) + (bvirt - dx); + bvirt = ay - ady; + adytail = ay - (ady + bvirt) + (bvirt - dy); + bvirt = by - bdy; + bdytail = by - (bdy + bvirt) + (bvirt - dy); + bvirt = cy - cdy; + cdytail = cy - (cdy + bvirt) + (bvirt - dy); + bvirt = az - adz; + adztail = az - (adz + bvirt) + (bvirt - dz); + bvirt = bz - bdz; + bdztail = bz - (bdz + bvirt) + (bvirt - dz); + bvirt = cz - cdz; + cdztail = cz - (cdz + bvirt) + (bvirt - dz); + if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 && adytail === 0 && bdytail === 0 && cdytail === 0 && adztail === 0 && bdztail === 0 && cdztail === 0) { + return det; + } + errbound = o3derrboundC * permanent + _util.resulterrbound * Math.abs(det); + det += adz * (bdx * cdytail + cdy * bdxtail - (bdy * cdxtail + cdx * bdytail)) + adztail * (bdx * cdy - bdy * cdx) + bdz * (cdx * adytail + ady * cdxtail - (cdy * adxtail + adx * cdytail)) + bdztail * (cdx * ady - cdy * adx) + cdz * (adx * bdytail + bdy * adxtail - (ady * bdxtail + bdx * adytail)) + cdztail * (adx * bdy - ady * bdx); + if (det >= errbound || -det >= errbound) { + return det; + } + const at_len = tailinit(adxtail, adytail, bdx, bdy, cdx, cdy, at_b, at_c); + const bt_len = tailinit(bdxtail, bdytail, cdx, cdy, adx, ady, bt_c, bt_a); + const ct_len = tailinit(cdxtail, cdytail, adx, ady, bdx, bdy, ct_a, ct_b); + const bctlen = (0, _util.sum)(bt_len, bt_c, ct_len, ct_b, bct); + finlen = finadd(finlen, (0, _util.scale)(bctlen, bct, adz, _16), _16); + const catlen = (0, _util.sum)(ct_len, ct_a, at_len, at_c, cat); + finlen = finadd(finlen, (0, _util.scale)(catlen, cat, bdz, _16), _16); + const abtlen = (0, _util.sum)(at_len, at_b, bt_len, bt_a, abt); + finlen = finadd(finlen, (0, _util.scale)(abtlen, abt, cdz, _16), _16); + if (adztail !== 0) { + finlen = finadd(finlen, (0, _util.scale)(4, bc, adztail, _12), _12); + finlen = finadd(finlen, (0, _util.scale)(bctlen, bct, adztail, _16), _16); + } + if (bdztail !== 0) { + finlen = finadd(finlen, (0, _util.scale)(4, ca, bdztail, _12), _12); + finlen = finadd(finlen, (0, _util.scale)(catlen, cat, bdztail, _16), _16); + } + if (cdztail !== 0) { + finlen = finadd(finlen, (0, _util.scale)(4, ab, cdztail, _12), _12); + finlen = finadd(finlen, (0, _util.scale)(abtlen, abt, cdztail, _16), _16); + } + if (adxtail !== 0) { + if (bdytail !== 0) { + finlen = tailadd(finlen, adxtail, bdytail, cdz, cdztail); + } + if (cdytail !== 0) { + finlen = tailadd(finlen, -adxtail, cdytail, bdz, bdztail); + } + } + if (bdxtail !== 0) { + if (cdytail !== 0) { + finlen = tailadd(finlen, bdxtail, cdytail, adz, adztail); + } + if (adytail !== 0) { + finlen = tailadd(finlen, -bdxtail, adytail, cdz, cdztail); + } + } + if (cdxtail !== 0) { + if (adytail !== 0) { + finlen = tailadd(finlen, cdxtail, adytail, bdz, bdztail); + } + if (bdytail !== 0) { + finlen = tailadd(finlen, -cdxtail, bdytail, adz, adztail); + } + } + return fin[finlen - 1]; +} +function orient3d(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) { + const adx = ax - dx; + const bdx = bx - dx; + const cdx = cx - dx; + const ady = ay - dy; + const bdy = by - dy; + const cdy = cy - dy; + const adz = az - dz; + const bdz = bz - dz; + const cdz = cz - dz; + const bdxcdy = bdx * cdy; + const cdxbdy = cdx * bdy; + const cdxady = cdx * ady; + const adxcdy = adx * cdy; + const adxbdy = adx * bdy; + const bdxady = bdx * ady; + const det = adz * (bdxcdy - cdxbdy) + bdz * (cdxady - adxcdy) + cdz * (adxbdy - bdxady); + const permanent = (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * Math.abs(adz) + (Math.abs(cdxady) + Math.abs(adxcdy)) * Math.abs(bdz) + (Math.abs(adxbdy) + Math.abs(bdxady)) * Math.abs(cdz); + const errbound = o3derrboundA * permanent; + if (det > errbound || -det > errbound) { + return det; + } + return orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent); +} +function orient3dfast(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) { + const adx = ax - dx; + const bdx = bx - dx; + const cdx = cx - dx; + const ady = ay - dy; + const bdy = by - dy; + const cdy = cy - dy; + const adz = az - dz; + const bdz = bz - dz; + const cdz = cz - dz; + return adx * (bdy * cdz - bdz * cdy) + bdx * (cdy * adz - cdz * ady) + cdx * (ady * bdz - adz * bdy); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/robust-predicates/esm/util.js b/packages/x-charts-vendor/lib-vendor/robust-predicates/esm/util.js new file mode 100644 index 000000000000..b7a1eaeaac89 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/robust-predicates/esm/util.js @@ -0,0 +1,147 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.epsilon = void 0; +exports.estimate = estimate; +exports.negate = negate; +exports.resulterrbound = void 0; +exports.scale = scale; +exports.splitter = void 0; +exports.sum = sum; +exports.sum_three = sum_three; +exports.vec = vec; +const epsilon = exports.epsilon = 1.1102230246251565e-16; +const splitter = exports.splitter = 134217729; +const resulterrbound = exports.resulterrbound = (3 + 8 * epsilon) * epsilon; + +// fast_expansion_sum_zeroelim routine from oritinal code +function sum(elen, e, flen, f, h) { + let Q, Qnew, hh, bvirt; + let enow = e[0]; + let fnow = f[0]; + let eindex = 0; + let findex = 0; + if (fnow > enow === fnow > -enow) { + Q = enow; + enow = e[++eindex]; + } else { + Q = fnow; + fnow = f[++findex]; + } + let hindex = 0; + if (eindex < elen && findex < flen) { + if (fnow > enow === fnow > -enow) { + Qnew = enow + Q; + hh = Q - (Qnew - enow); + enow = e[++eindex]; + } else { + Qnew = fnow + Q; + hh = Q - (Qnew - fnow); + fnow = f[++findex]; + } + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + while (eindex < elen && findex < flen) { + if (fnow > enow === fnow > -enow) { + Qnew = Q + enow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (enow - bvirt); + enow = e[++eindex]; + } else { + Qnew = Q + fnow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (fnow - bvirt); + fnow = f[++findex]; + } + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + } + while (eindex < elen) { + Qnew = Q + enow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (enow - bvirt); + enow = e[++eindex]; + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + while (findex < flen) { + Qnew = Q + fnow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (fnow - bvirt); + fnow = f[++findex]; + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + if (Q !== 0 || hindex === 0) { + h[hindex++] = Q; + } + return hindex; +} +function sum_three(alen, a, blen, b, clen, c, tmp, out) { + return sum(sum(alen, a, blen, b, tmp), tmp, clen, c, out); +} + +// scale_expansion_zeroelim routine from oritinal code +function scale(elen, e, b, h) { + let Q, sum, hh, product1, product0; + let bvirt, c, ahi, alo, bhi, blo; + c = splitter * b; + bhi = c - (c - b); + blo = b - bhi; + let enow = e[0]; + Q = enow * b; + c = splitter * enow; + ahi = c - (c - enow); + alo = enow - ahi; + hh = alo * blo - (Q - ahi * bhi - alo * bhi - ahi * blo); + let hindex = 0; + if (hh !== 0) { + h[hindex++] = hh; + } + for (let i = 1; i < elen; i++) { + enow = e[i]; + product1 = enow * b; + c = splitter * enow; + ahi = c - (c - enow); + alo = enow - ahi; + product0 = alo * blo - (product1 - ahi * bhi - alo * bhi - ahi * blo); + sum = Q + product0; + bvirt = sum - Q; + hh = Q - (sum - bvirt) + (product0 - bvirt); + if (hh !== 0) { + h[hindex++] = hh; + } + Q = product1 + sum; + hh = sum - (Q - product1); + if (hh !== 0) { + h[hindex++] = hh; + } + } + if (Q !== 0 || hindex === 0) { + h[hindex++] = Q; + } + return hindex; +} +function negate(elen, e) { + for (let i = 0; i < elen; i++) e[i] = -e[i]; + return elen; +} +function estimate(elen, e) { + let Q = e[0]; + for (let i = 1; i < elen; i++) Q += e[i]; + return Q; +} +function vec(n) { + return new Float64Array(n); +} \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/robust-predicates/index.js b/packages/x-charts-vendor/lib-vendor/robust-predicates/index.js new file mode 100644 index 000000000000..b70df243c219 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/robust-predicates/index.js @@ -0,0 +1,57 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "incircle", { + enumerable: true, + get: function () { + return _incircle.incircle; + } +}); +Object.defineProperty(exports, "incirclefast", { + enumerable: true, + get: function () { + return _incircle.incirclefast; + } +}); +Object.defineProperty(exports, "insphere", { + enumerable: true, + get: function () { + return _insphere.insphere; + } +}); +Object.defineProperty(exports, "inspherefast", { + enumerable: true, + get: function () { + return _insphere.inspherefast; + } +}); +Object.defineProperty(exports, "orient2d", { + enumerable: true, + get: function () { + return _orient2d.orient2d; + } +}); +Object.defineProperty(exports, "orient2dfast", { + enumerable: true, + get: function () { + return _orient2d.orient2dfast; + } +}); +Object.defineProperty(exports, "orient3d", { + enumerable: true, + get: function () { + return _orient3d.orient3d; + } +}); +Object.defineProperty(exports, "orient3dfast", { + enumerable: true, + get: function () { + return _orient3d.orient3dfast; + } +}); +var _orient2d = require("./esm/orient2d.js"); +var _orient3d = require("./esm/orient3d.js"); +var _incircle = require("./esm/incircle.js"); +var _insphere = require("./esm/insphere.js"); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/incircle.js b/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/incircle.js new file mode 100644 index 000000000000..eb7b0cb31573 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/incircle.js @@ -0,0 +1,798 @@ +"use strict"; + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.predicates = {})); +})(this, function (exports) { + 'use strict'; + + const epsilon = 1.1102230246251565e-16; + const splitter = 134217729; + const resulterrbound = (3 + 8 * epsilon) * epsilon; + + // fast_expansion_sum_zeroelim routine from oritinal code + function sum(elen, e, flen, f, h) { + let Q, Qnew, hh, bvirt; + let enow = e[0]; + let fnow = f[0]; + let eindex = 0; + let findex = 0; + if (fnow > enow === fnow > -enow) { + Q = enow; + enow = e[++eindex]; + } else { + Q = fnow; + fnow = f[++findex]; + } + let hindex = 0; + if (eindex < elen && findex < flen) { + if (fnow > enow === fnow > -enow) { + Qnew = enow + Q; + hh = Q - (Qnew - enow); + enow = e[++eindex]; + } else { + Qnew = fnow + Q; + hh = Q - (Qnew - fnow); + fnow = f[++findex]; + } + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + while (eindex < elen && findex < flen) { + if (fnow > enow === fnow > -enow) { + Qnew = Q + enow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (enow - bvirt); + enow = e[++eindex]; + } else { + Qnew = Q + fnow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (fnow - bvirt); + fnow = f[++findex]; + } + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + } + while (eindex < elen) { + Qnew = Q + enow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (enow - bvirt); + enow = e[++eindex]; + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + while (findex < flen) { + Qnew = Q + fnow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (fnow - bvirt); + fnow = f[++findex]; + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + if (Q !== 0 || hindex === 0) { + h[hindex++] = Q; + } + return hindex; + } + function sum_three(alen, a, blen, b, clen, c, tmp, out) { + return sum(sum(alen, a, blen, b, tmp), tmp, clen, c, out); + } + + // scale_expansion_zeroelim routine from oritinal code + function scale(elen, e, b, h) { + let Q, sum, hh, product1, product0; + let bvirt, c, ahi, alo, bhi, blo; + c = splitter * b; + bhi = c - (c - b); + blo = b - bhi; + let enow = e[0]; + Q = enow * b; + c = splitter * enow; + ahi = c - (c - enow); + alo = enow - ahi; + hh = alo * blo - (Q - ahi * bhi - alo * bhi - ahi * blo); + let hindex = 0; + if (hh !== 0) { + h[hindex++] = hh; + } + for (let i = 1; i < elen; i++) { + enow = e[i]; + product1 = enow * b; + c = splitter * enow; + ahi = c - (c - enow); + alo = enow - ahi; + product0 = alo * blo - (product1 - ahi * bhi - alo * bhi - ahi * blo); + sum = Q + product0; + bvirt = sum - Q; + hh = Q - (sum - bvirt) + (product0 - bvirt); + if (hh !== 0) { + h[hindex++] = hh; + } + Q = product1 + sum; + hh = sum - (Q - product1); + if (hh !== 0) { + h[hindex++] = hh; + } + } + if (Q !== 0 || hindex === 0) { + h[hindex++] = Q; + } + return hindex; + } + function estimate(elen, e) { + let Q = e[0]; + for (let i = 1; i < elen; i++) Q += e[i]; + return Q; + } + function vec(n) { + return new Float64Array(n); + } + const iccerrboundA = (10 + 96 * epsilon) * epsilon; + const iccerrboundB = (4 + 48 * epsilon) * epsilon; + const iccerrboundC = (44 + 576 * epsilon) * epsilon * epsilon; + const bc = vec(4); + const ca = vec(4); + const ab = vec(4); + const aa = vec(4); + const bb = vec(4); + const cc = vec(4); + const u = vec(4); + const v = vec(4); + const axtbc = vec(8); + const aytbc = vec(8); + const bxtca = vec(8); + const bytca = vec(8); + const cxtab = vec(8); + const cytab = vec(8); + const abt = vec(8); + const bct = vec(8); + const cat = vec(8); + const abtt = vec(4); + const bctt = vec(4); + const catt = vec(4); + const _8 = vec(8); + const _16 = vec(16); + const _16b = vec(16); + const _16c = vec(16); + const _32 = vec(32); + const _32b = vec(32); + const _48 = vec(48); + const _64 = vec(64); + let fin = vec(1152); + let fin2 = vec(1152); + function finadd(finlen, a, alen) { + finlen = sum(finlen, fin, a, alen, fin2); + const tmp = fin; + fin = fin2; + fin2 = tmp; + return finlen; + } + function incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent) { + let finlen; + let adxtail, bdxtail, cdxtail, adytail, bdytail, cdytail; + let axtbclen, aytbclen, bxtcalen, bytcalen, cxtablen, cytablen; + let abtlen, bctlen, catlen; + let abttlen, bcttlen, cattlen; + let n1, n0; + let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3; + const adx = ax - dx; + const bdx = bx - dx; + const cdx = cx - dx; + const ady = ay - dy; + const bdy = by - dy; + const cdy = cy - dy; + s1 = bdx * cdy; + c = splitter * bdx; + ahi = c - (c - bdx); + alo = bdx - ahi; + c = splitter * cdy; + bhi = c - (c - cdy); + blo = cdy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cdx * bdy; + c = splitter * cdx; + ahi = c - (c - cdx); + alo = cdx - ahi; + c = splitter * bdy; + bhi = c - (c - bdy); + blo = bdy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + bc[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + bc[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + bc[2] = _j - (u3 - bvirt) + (_i - bvirt); + bc[3] = u3; + s1 = cdx * ady; + c = splitter * cdx; + ahi = c - (c - cdx); + alo = cdx - ahi; + c = splitter * ady; + bhi = c - (c - ady); + blo = ady - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = adx * cdy; + c = splitter * adx; + ahi = c - (c - adx); + alo = adx - ahi; + c = splitter * cdy; + bhi = c - (c - cdy); + blo = cdy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ca[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ca[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ca[2] = _j - (u3 - bvirt) + (_i - bvirt); + ca[3] = u3; + s1 = adx * bdy; + c = splitter * adx; + ahi = c - (c - adx); + alo = adx - ahi; + c = splitter * bdy; + bhi = c - (c - bdy); + blo = bdy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bdx * ady; + c = splitter * bdx; + ahi = c - (c - bdx); + alo = bdx - ahi; + c = splitter * ady; + bhi = c - (c - ady); + blo = ady - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ab[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ab[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ab[2] = _j - (u3 - bvirt) + (_i - bvirt); + ab[3] = u3; + finlen = sum(sum(sum(scale(scale(4, bc, adx, _8), _8, adx, _16), _16, scale(scale(4, bc, ady, _8), _8, ady, _16b), _16b, _32), _32, sum(scale(scale(4, ca, bdx, _8), _8, bdx, _16), _16, scale(scale(4, ca, bdy, _8), _8, bdy, _16b), _16b, _32b), _32b, _64), _64, sum(scale(scale(4, ab, cdx, _8), _8, cdx, _16), _16, scale(scale(4, ab, cdy, _8), _8, cdy, _16b), _16b, _32), _32, fin); + let det = estimate(finlen, fin); + let errbound = iccerrboundB * permanent; + if (det >= errbound || -det >= errbound) { + return det; + } + bvirt = ax - adx; + adxtail = ax - (adx + bvirt) + (bvirt - dx); + bvirt = ay - ady; + adytail = ay - (ady + bvirt) + (bvirt - dy); + bvirt = bx - bdx; + bdxtail = bx - (bdx + bvirt) + (bvirt - dx); + bvirt = by - bdy; + bdytail = by - (bdy + bvirt) + (bvirt - dy); + bvirt = cx - cdx; + cdxtail = cx - (cdx + bvirt) + (bvirt - dx); + bvirt = cy - cdy; + cdytail = cy - (cdy + bvirt) + (bvirt - dy); + if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 && adytail === 0 && bdytail === 0 && cdytail === 0) { + return det; + } + errbound = iccerrboundC * permanent + resulterrbound * Math.abs(det); + det += (adx * adx + ady * ady) * (bdx * cdytail + cdy * bdxtail - (bdy * cdxtail + cdx * bdytail)) + 2 * (adx * adxtail + ady * adytail) * (bdx * cdy - bdy * cdx) + ((bdx * bdx + bdy * bdy) * (cdx * adytail + ady * cdxtail - (cdy * adxtail + adx * cdytail)) + 2 * (bdx * bdxtail + bdy * bdytail) * (cdx * ady - cdy * adx)) + ((cdx * cdx + cdy * cdy) * (adx * bdytail + bdy * adxtail - (ady * bdxtail + bdx * adytail)) + 2 * (cdx * cdxtail + cdy * cdytail) * (adx * bdy - ady * bdx)); + if (det >= errbound || -det >= errbound) { + return det; + } + if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) { + s1 = adx * adx; + c = splitter * adx; + ahi = c - (c - adx); + alo = adx - ahi; + s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo); + t1 = ady * ady; + c = splitter * ady; + ahi = c - (c - ady); + alo = ady - ahi; + t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo); + _i = s0 + t0; + bvirt = _i - s0; + aa[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + aa[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + aa[2] = _j - (u3 - bvirt) + (_i - bvirt); + aa[3] = u3; + } + if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) { + s1 = bdx * bdx; + c = splitter * bdx; + ahi = c - (c - bdx); + alo = bdx - ahi; + s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo); + t1 = bdy * bdy; + c = splitter * bdy; + ahi = c - (c - bdy); + alo = bdy - ahi; + t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo); + _i = s0 + t0; + bvirt = _i - s0; + bb[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + bb[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + bb[2] = _j - (u3 - bvirt) + (_i - bvirt); + bb[3] = u3; + } + if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) { + s1 = cdx * cdx; + c = splitter * cdx; + ahi = c - (c - cdx); + alo = cdx - ahi; + s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo); + t1 = cdy * cdy; + c = splitter * cdy; + ahi = c - (c - cdy); + alo = cdy - ahi; + t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo); + _i = s0 + t0; + bvirt = _i - s0; + cc[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + cc[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + cc[2] = _j - (u3 - bvirt) + (_i - bvirt); + cc[3] = u3; + } + if (adxtail !== 0) { + axtbclen = scale(4, bc, adxtail, axtbc); + finlen = finadd(finlen, sum_three(scale(axtbclen, axtbc, 2 * adx, _16), _16, scale(scale(4, cc, adxtail, _8), _8, bdy, _16b), _16b, scale(scale(4, bb, adxtail, _8), _8, -cdy, _16c), _16c, _32, _48), _48); + } + if (adytail !== 0) { + aytbclen = scale(4, bc, adytail, aytbc); + finlen = finadd(finlen, sum_three(scale(aytbclen, aytbc, 2 * ady, _16), _16, scale(scale(4, bb, adytail, _8), _8, cdx, _16b), _16b, scale(scale(4, cc, adytail, _8), _8, -bdx, _16c), _16c, _32, _48), _48); + } + if (bdxtail !== 0) { + bxtcalen = scale(4, ca, bdxtail, bxtca); + finlen = finadd(finlen, sum_three(scale(bxtcalen, bxtca, 2 * bdx, _16), _16, scale(scale(4, aa, bdxtail, _8), _8, cdy, _16b), _16b, scale(scale(4, cc, bdxtail, _8), _8, -ady, _16c), _16c, _32, _48), _48); + } + if (bdytail !== 0) { + bytcalen = scale(4, ca, bdytail, bytca); + finlen = finadd(finlen, sum_three(scale(bytcalen, bytca, 2 * bdy, _16), _16, scale(scale(4, cc, bdytail, _8), _8, adx, _16b), _16b, scale(scale(4, aa, bdytail, _8), _8, -cdx, _16c), _16c, _32, _48), _48); + } + if (cdxtail !== 0) { + cxtablen = scale(4, ab, cdxtail, cxtab); + finlen = finadd(finlen, sum_three(scale(cxtablen, cxtab, 2 * cdx, _16), _16, scale(scale(4, bb, cdxtail, _8), _8, ady, _16b), _16b, scale(scale(4, aa, cdxtail, _8), _8, -bdy, _16c), _16c, _32, _48), _48); + } + if (cdytail !== 0) { + cytablen = scale(4, ab, cdytail, cytab); + finlen = finadd(finlen, sum_three(scale(cytablen, cytab, 2 * cdy, _16), _16, scale(scale(4, aa, cdytail, _8), _8, bdx, _16b), _16b, scale(scale(4, bb, cdytail, _8), _8, -adx, _16c), _16c, _32, _48), _48); + } + if (adxtail !== 0 || adytail !== 0) { + if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) { + s1 = bdxtail * cdy; + c = splitter * bdxtail; + ahi = c - (c - bdxtail); + alo = bdxtail - ahi; + c = splitter * cdy; + bhi = c - (c - cdy); + blo = cdy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bdx * cdytail; + c = splitter * bdx; + ahi = c - (c - bdx); + alo = bdx - ahi; + c = splitter * cdytail; + bhi = c - (c - cdytail); + blo = cdytail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 + t0; + bvirt = _i - s0; + u[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + u[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + u[2] = _j - (u3 - bvirt) + (_i - bvirt); + u[3] = u3; + s1 = cdxtail * -bdy; + c = splitter * cdxtail; + ahi = c - (c - cdxtail); + alo = cdxtail - ahi; + c = splitter * -bdy; + bhi = c - (c - -bdy); + blo = -bdy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cdx * -bdytail; + c = splitter * cdx; + ahi = c - (c - cdx); + alo = cdx - ahi; + c = splitter * -bdytail; + bhi = c - (c - -bdytail); + blo = -bdytail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 + t0; + bvirt = _i - s0; + v[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + v[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + v[2] = _j - (u3 - bvirt) + (_i - bvirt); + v[3] = u3; + bctlen = sum(4, u, 4, v, bct); + s1 = bdxtail * cdytail; + c = splitter * bdxtail; + ahi = c - (c - bdxtail); + alo = bdxtail - ahi; + c = splitter * cdytail; + bhi = c - (c - cdytail); + blo = cdytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cdxtail * bdytail; + c = splitter * cdxtail; + ahi = c - (c - cdxtail); + alo = cdxtail - ahi; + c = splitter * bdytail; + bhi = c - (c - bdytail); + blo = bdytail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + bctt[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + bctt[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + bctt[2] = _j - (u3 - bvirt) + (_i - bvirt); + bctt[3] = u3; + bcttlen = 4; + } else { + bct[0] = 0; + bctlen = 1; + bctt[0] = 0; + bcttlen = 1; + } + if (adxtail !== 0) { + const len = scale(bctlen, bct, adxtail, _16c); + finlen = finadd(finlen, sum(scale(axtbclen, axtbc, adxtail, _16), _16, scale(len, _16c, 2 * adx, _32), _32, _48), _48); + const len2 = scale(bcttlen, bctt, adxtail, _8); + finlen = finadd(finlen, sum_three(scale(len2, _8, 2 * adx, _16), _16, scale(len2, _8, adxtail, _16b), _16b, scale(len, _16c, adxtail, _32), _32, _32b, _64), _64); + if (bdytail !== 0) { + finlen = finadd(finlen, scale(scale(4, cc, adxtail, _8), _8, bdytail, _16), _16); + } + if (cdytail !== 0) { + finlen = finadd(finlen, scale(scale(4, bb, -adxtail, _8), _8, cdytail, _16), _16); + } + } + if (adytail !== 0) { + const len = scale(bctlen, bct, adytail, _16c); + finlen = finadd(finlen, sum(scale(aytbclen, aytbc, adytail, _16), _16, scale(len, _16c, 2 * ady, _32), _32, _48), _48); + const len2 = scale(bcttlen, bctt, adytail, _8); + finlen = finadd(finlen, sum_three(scale(len2, _8, 2 * ady, _16), _16, scale(len2, _8, adytail, _16b), _16b, scale(len, _16c, adytail, _32), _32, _32b, _64), _64); + } + } + if (bdxtail !== 0 || bdytail !== 0) { + if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) { + s1 = cdxtail * ady; + c = splitter * cdxtail; + ahi = c - (c - cdxtail); + alo = cdxtail - ahi; + c = splitter * ady; + bhi = c - (c - ady); + blo = ady - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cdx * adytail; + c = splitter * cdx; + ahi = c - (c - cdx); + alo = cdx - ahi; + c = splitter * adytail; + bhi = c - (c - adytail); + blo = adytail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 + t0; + bvirt = _i - s0; + u[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + u[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + u[2] = _j - (u3 - bvirt) + (_i - bvirt); + u[3] = u3; + n1 = -cdy; + n0 = -cdytail; + s1 = adxtail * n1; + c = splitter * adxtail; + ahi = c - (c - adxtail); + alo = adxtail - ahi; + c = splitter * n1; + bhi = c - (c - n1); + blo = n1 - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = adx * n0; + c = splitter * adx; + ahi = c - (c - adx); + alo = adx - ahi; + c = splitter * n0; + bhi = c - (c - n0); + blo = n0 - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 + t0; + bvirt = _i - s0; + v[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + v[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + v[2] = _j - (u3 - bvirt) + (_i - bvirt); + v[3] = u3; + catlen = sum(4, u, 4, v, cat); + s1 = cdxtail * adytail; + c = splitter * cdxtail; + ahi = c - (c - cdxtail); + alo = cdxtail - ahi; + c = splitter * adytail; + bhi = c - (c - adytail); + blo = adytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = adxtail * cdytail; + c = splitter * adxtail; + ahi = c - (c - adxtail); + alo = adxtail - ahi; + c = splitter * cdytail; + bhi = c - (c - cdytail); + blo = cdytail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + catt[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + catt[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + catt[2] = _j - (u3 - bvirt) + (_i - bvirt); + catt[3] = u3; + cattlen = 4; + } else { + cat[0] = 0; + catlen = 1; + catt[0] = 0; + cattlen = 1; + } + if (bdxtail !== 0) { + const len = scale(catlen, cat, bdxtail, _16c); + finlen = finadd(finlen, sum(scale(bxtcalen, bxtca, bdxtail, _16), _16, scale(len, _16c, 2 * bdx, _32), _32, _48), _48); + const len2 = scale(cattlen, catt, bdxtail, _8); + finlen = finadd(finlen, sum_three(scale(len2, _8, 2 * bdx, _16), _16, scale(len2, _8, bdxtail, _16b), _16b, scale(len, _16c, bdxtail, _32), _32, _32b, _64), _64); + if (cdytail !== 0) { + finlen = finadd(finlen, scale(scale(4, aa, bdxtail, _8), _8, cdytail, _16), _16); + } + if (adytail !== 0) { + finlen = finadd(finlen, scale(scale(4, cc, -bdxtail, _8), _8, adytail, _16), _16); + } + } + if (bdytail !== 0) { + const len = scale(catlen, cat, bdytail, _16c); + finlen = finadd(finlen, sum(scale(bytcalen, bytca, bdytail, _16), _16, scale(len, _16c, 2 * bdy, _32), _32, _48), _48); + const len2 = scale(cattlen, catt, bdytail, _8); + finlen = finadd(finlen, sum_three(scale(len2, _8, 2 * bdy, _16), _16, scale(len2, _8, bdytail, _16b), _16b, scale(len, _16c, bdytail, _32), _32, _32b, _64), _64); + } + } + if (cdxtail !== 0 || cdytail !== 0) { + if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) { + s1 = adxtail * bdy; + c = splitter * adxtail; + ahi = c - (c - adxtail); + alo = adxtail - ahi; + c = splitter * bdy; + bhi = c - (c - bdy); + blo = bdy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = adx * bdytail; + c = splitter * adx; + ahi = c - (c - adx); + alo = adx - ahi; + c = splitter * bdytail; + bhi = c - (c - bdytail); + blo = bdytail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 + t0; + bvirt = _i - s0; + u[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + u[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + u[2] = _j - (u3 - bvirt) + (_i - bvirt); + u[3] = u3; + n1 = -ady; + n0 = -adytail; + s1 = bdxtail * n1; + c = splitter * bdxtail; + ahi = c - (c - bdxtail); + alo = bdxtail - ahi; + c = splitter * n1; + bhi = c - (c - n1); + blo = n1 - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bdx * n0; + c = splitter * bdx; + ahi = c - (c - bdx); + alo = bdx - ahi; + c = splitter * n0; + bhi = c - (c - n0); + blo = n0 - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 + t0; + bvirt = _i - s0; + v[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + v[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + v[2] = _j - (u3 - bvirt) + (_i - bvirt); + v[3] = u3; + abtlen = sum(4, u, 4, v, abt); + s1 = adxtail * bdytail; + c = splitter * adxtail; + ahi = c - (c - adxtail); + alo = adxtail - ahi; + c = splitter * bdytail; + bhi = c - (c - bdytail); + blo = bdytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bdxtail * adytail; + c = splitter * bdxtail; + ahi = c - (c - bdxtail); + alo = bdxtail - ahi; + c = splitter * adytail; + bhi = c - (c - adytail); + blo = adytail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + abtt[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + abtt[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + abtt[2] = _j - (u3 - bvirt) + (_i - bvirt); + abtt[3] = u3; + abttlen = 4; + } else { + abt[0] = 0; + abtlen = 1; + abtt[0] = 0; + abttlen = 1; + } + if (cdxtail !== 0) { + const len = scale(abtlen, abt, cdxtail, _16c); + finlen = finadd(finlen, sum(scale(cxtablen, cxtab, cdxtail, _16), _16, scale(len, _16c, 2 * cdx, _32), _32, _48), _48); + const len2 = scale(abttlen, abtt, cdxtail, _8); + finlen = finadd(finlen, sum_three(scale(len2, _8, 2 * cdx, _16), _16, scale(len2, _8, cdxtail, _16b), _16b, scale(len, _16c, cdxtail, _32), _32, _32b, _64), _64); + if (adytail !== 0) { + finlen = finadd(finlen, scale(scale(4, bb, cdxtail, _8), _8, adytail, _16), _16); + } + if (bdytail !== 0) { + finlen = finadd(finlen, scale(scale(4, aa, -cdxtail, _8), _8, bdytail, _16), _16); + } + } + if (cdytail !== 0) { + const len = scale(abtlen, abt, cdytail, _16c); + finlen = finadd(finlen, sum(scale(cytablen, cytab, cdytail, _16), _16, scale(len, _16c, 2 * cdy, _32), _32, _48), _48); + const len2 = scale(abttlen, abtt, cdytail, _8); + finlen = finadd(finlen, sum_three(scale(len2, _8, 2 * cdy, _16), _16, scale(len2, _8, cdytail, _16b), _16b, scale(len, _16c, cdytail, _32), _32, _32b, _64), _64); + } + } + return fin[finlen - 1]; + } + function incircle(ax, ay, bx, by, cx, cy, dx, dy) { + const adx = ax - dx; + const bdx = bx - dx; + const cdx = cx - dx; + const ady = ay - dy; + const bdy = by - dy; + const cdy = cy - dy; + const bdxcdy = bdx * cdy; + const cdxbdy = cdx * bdy; + const alift = adx * adx + ady * ady; + const cdxady = cdx * ady; + const adxcdy = adx * cdy; + const blift = bdx * bdx + bdy * bdy; + const adxbdy = adx * bdy; + const bdxady = bdx * ady; + const clift = cdx * cdx + cdy * cdy; + const det = alift * (bdxcdy - cdxbdy) + blift * (cdxady - adxcdy) + clift * (adxbdy - bdxady); + const permanent = (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * alift + (Math.abs(cdxady) + Math.abs(adxcdy)) * blift + (Math.abs(adxbdy) + Math.abs(bdxady)) * clift; + const errbound = iccerrboundA * permanent; + if (det > errbound || -det > errbound) { + return det; + } + return incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent); + } + function incirclefast(ax, ay, bx, by, cx, cy, dx, dy) { + const adx = ax - dx; + const ady = ay - dy; + const bdx = bx - dx; + const bdy = by - dy; + const cdx = cx - dx; + const cdy = cy - dy; + const abdet = adx * bdy - bdx * ady; + const bcdet = bdx * cdy - cdx * bdy; + const cadet = cdx * ady - adx * cdy; + const alift = adx * adx + ady * ady; + const blift = bdx * bdx + bdy * bdy; + const clift = cdx * cdx + cdy * cdy; + return alift * bcdet + blift * cadet + clift * abdet; + } + exports.incircle = incircle; + exports.incirclefast = incirclefast; +}); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/incircle.min.js b/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/incircle.min.js new file mode 100644 index 000000000000..fe1b328f8a96 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/incircle.min.js @@ -0,0 +1,170 @@ +"use strict"; + +!function (t, n) { + "object" == typeof exports && "undefined" != typeof module ? n(exports) : "function" == typeof define && define.amd ? define(["exports"], n) : n((t = "undefined" != typeof globalThis ? globalThis : t || self).predicates = {}); +}(this, function (t) { + "use strict"; + + const n = 11102230246251565e-32, + e = 134217729, + o = (3 + 8 * n) * n; + function f(t, n, e, o, f) { + let i, + r, + c, + s, + u = n[0], + a = o[0], + l = 0, + b = 0; + a > u == a > -u ? (i = u, u = n[++l]) : (i = a, a = o[++b]); + let d = 0; + if (l < t && b < e) for (a > u == a > -u ? (r = u + i, c = i - (r - u), u = n[++l]) : (r = a + i, c = i - (r - a), a = o[++b]), i = r, 0 !== c && (f[d++] = c); l < t && b < e;) a > u == a > -u ? (r = i + u, s = r - i, c = i - (r - s) + (u - s), u = n[++l]) : (r = i + a, s = r - i, c = i - (r - s) + (a - s), a = o[++b]), i = r, 0 !== c && (f[d++] = c); + for (; l < t;) r = i + u, s = r - i, c = i - (r - s) + (u - s), u = n[++l], i = r, 0 !== c && (f[d++] = c); + for (; b < e;) r = i + a, s = r - i, c = i - (r - s) + (a - s), a = o[++b], i = r, 0 !== c && (f[d++] = c); + return 0 === i && 0 !== d || (f[d++] = i), d; + } + function i(t, n, e, o, i, r, c, s) { + return f(f(t, n, e, o, c), c, i, r, s); + } + function r(t, n, o, f) { + let i, r, c, s, u, a, l, b, d, h, p; + l = e * o, h = l - (l - o), p = o - h; + let M = n[0]; + i = M * o, l = e * M, b = l - (l - M), d = M - b, c = d * p - (i - b * h - d * h - b * p); + let y = 0; + 0 !== c && (f[y++] = c); + for (let x = 1; x < t; x++) M = n[x], s = M * o, l = e * M, b = l - (l - M), d = M - b, u = d * p - (s - b * h - d * h - b * p), r = i + u, a = r - i, c = i - (r - a) + (u - a), 0 !== c && (f[y++] = c), i = s + r, c = r - (i - s), 0 !== c && (f[y++] = c); + return 0 === i && 0 !== y || (f[y++] = i), y; + } + function c(t) { + return new Float64Array(t); + } + const s = 4440892098500632e-31, + u = 5423418723394464e-46, + a = c(4), + l = c(4), + b = c(4), + d = c(4), + h = c(4), + p = c(4), + M = c(4), + y = c(4), + x = c(8), + g = c(8), + m = c(8), + T = c(8), + j = c(8), + w = c(8), + A = c(8), + F = c(8), + k = c(8), + q = c(4), + v = c(4), + z = c(4), + B = c(8), + C = c(16), + D = c(16), + E = c(16), + G = c(32), + H = c(32), + I = c(48), + J = c(64); + let K = c(1152), + L = c(1152); + function N(t, n, e) { + t = f(t, K, n, e, L); + const o = K; + return K = L, L = o, t; + } + t.incircle = function (t, n, c, L, O, P, Q, R) { + const S = t - Q, + U = c - Q, + V = O - Q, + W = n - R, + X = L - R, + Y = P - R, + Z = U * Y, + $ = V * X, + _ = S * S + W * W, + tt = V * W, + nt = S * Y, + et = U * U + X * X, + ot = S * X, + ft = U * W, + it = V * V + Y * Y, + rt = _ * (Z - $) + et * (tt - nt) + it * (ot - ft), + ct = (Math.abs(Z) + Math.abs($)) * _ + (Math.abs(tt) + Math.abs(nt)) * et + (Math.abs(ot) + Math.abs(ft)) * it, + st = 11102230246251577e-31 * ct; + return rt > st || -rt > st ? rt : function (t, n, c, L, O, P, Q, R, S) { + let U, V, W, X, Y, Z, $, _, tt, nt, et, ot, ft, it, rt, ct, st, ut, at, lt, bt, dt, ht, pt, Mt, yt, xt, gt, mt, Tt, jt, wt, At, Ft, kt; + const qt = t - Q, + vt = c - Q, + zt = O - Q, + Bt = n - R, + Ct = L - R, + Dt = P - R; + jt = vt * Dt, ht = e * vt, pt = ht - (ht - vt), Mt = vt - pt, ht = e * Dt, yt = ht - (ht - Dt), xt = Dt - yt, wt = Mt * xt - (jt - pt * yt - Mt * yt - pt * xt), At = zt * Ct, ht = e * zt, pt = ht - (ht - zt), Mt = zt - pt, ht = e * Ct, yt = ht - (ht - Ct), xt = Ct - yt, Ft = Mt * xt - (At - pt * yt - Mt * yt - pt * xt), gt = wt - Ft, dt = wt - gt, a[0] = wt - (gt + dt) + (dt - Ft), mt = jt + gt, dt = mt - jt, Tt = jt - (mt - dt) + (gt - dt), gt = Tt - At, dt = Tt - gt, a[1] = Tt - (gt + dt) + (dt - At), kt = mt + gt, dt = kt - mt, a[2] = mt - (kt - dt) + (gt - dt), a[3] = kt, jt = zt * Bt, ht = e * zt, pt = ht - (ht - zt), Mt = zt - pt, ht = e * Bt, yt = ht - (ht - Bt), xt = Bt - yt, wt = Mt * xt - (jt - pt * yt - Mt * yt - pt * xt), At = qt * Dt, ht = e * qt, pt = ht - (ht - qt), Mt = qt - pt, ht = e * Dt, yt = ht - (ht - Dt), xt = Dt - yt, Ft = Mt * xt - (At - pt * yt - Mt * yt - pt * xt), gt = wt - Ft, dt = wt - gt, l[0] = wt - (gt + dt) + (dt - Ft), mt = jt + gt, dt = mt - jt, Tt = jt - (mt - dt) + (gt - dt), gt = Tt - At, dt = Tt - gt, l[1] = Tt - (gt + dt) + (dt - At), kt = mt + gt, dt = kt - mt, l[2] = mt - (kt - dt) + (gt - dt), l[3] = kt, jt = qt * Ct, ht = e * qt, pt = ht - (ht - qt), Mt = qt - pt, ht = e * Ct, yt = ht - (ht - Ct), xt = Ct - yt, wt = Mt * xt - (jt - pt * yt - Mt * yt - pt * xt), At = vt * Bt, ht = e * vt, pt = ht - (ht - vt), Mt = vt - pt, ht = e * Bt, yt = ht - (ht - Bt), xt = Bt - yt, Ft = Mt * xt - (At - pt * yt - Mt * yt - pt * xt), gt = wt - Ft, dt = wt - gt, b[0] = wt - (gt + dt) + (dt - Ft), mt = jt + gt, dt = mt - jt, Tt = jt - (mt - dt) + (gt - dt), gt = Tt - At, dt = Tt - gt, b[1] = Tt - (gt + dt) + (dt - At), kt = mt + gt, dt = kt - mt, b[2] = mt - (kt - dt) + (gt - dt), b[3] = kt, U = f(f(f(r(r(4, a, qt, B), B, qt, C), C, r(r(4, a, Bt, B), B, Bt, D), D, G), G, f(r(r(4, l, vt, B), B, vt, C), C, r(r(4, l, Ct, B), B, Ct, D), D, H), H, J), J, f(r(r(4, b, zt, B), B, zt, C), C, r(r(4, b, Dt, B), B, Dt, D), D, G), G, K); + let Et = function (t, n) { + let e = n[0]; + for (let o = 1; o < t; o++) e += n[o]; + return e; + }(U, K), + Gt = s * S; + if (Et >= Gt || -Et >= Gt) return Et; + if (dt = t - qt, V = t - (qt + dt) + (dt - Q), dt = n - Bt, Y = n - (Bt + dt) + (dt - R), dt = c - vt, W = c - (vt + dt) + (dt - Q), dt = L - Ct, Z = L - (Ct + dt) + (dt - R), dt = O - zt, X = O - (zt + dt) + (dt - Q), dt = P - Dt, $ = P - (Dt + dt) + (dt - R), 0 === V && 0 === W && 0 === X && 0 === Y && 0 === Z && 0 === $) return Et; + if (Gt = u * S + o * Math.abs(Et), Et += (qt * qt + Bt * Bt) * (vt * $ + Dt * W - (Ct * X + zt * Z)) + 2 * (qt * V + Bt * Y) * (vt * Dt - Ct * zt) + ((vt * vt + Ct * Ct) * (zt * Y + Bt * X - (Dt * V + qt * $)) + 2 * (vt * W + Ct * Z) * (zt * Bt - Dt * qt)) + ((zt * zt + Dt * Dt) * (qt * Z + Ct * V - (Bt * W + vt * Y)) + 2 * (zt * X + Dt * $) * (qt * Ct - Bt * vt)), Et >= Gt || -Et >= Gt) return Et; + if (0 === W && 0 === Z && 0 === X && 0 === $ || (jt = qt * qt, ht = e * qt, pt = ht - (ht - qt), Mt = qt - pt, wt = Mt * Mt - (jt - pt * pt - (pt + pt) * Mt), At = Bt * Bt, ht = e * Bt, pt = ht - (ht - Bt), Mt = Bt - pt, Ft = Mt * Mt - (At - pt * pt - (pt + pt) * Mt), gt = wt + Ft, dt = gt - wt, d[0] = wt - (gt - dt) + (Ft - dt), mt = jt + gt, dt = mt - jt, Tt = jt - (mt - dt) + (gt - dt), gt = Tt + At, dt = gt - Tt, d[1] = Tt - (gt - dt) + (At - dt), kt = mt + gt, dt = kt - mt, d[2] = mt - (kt - dt) + (gt - dt), d[3] = kt), 0 === X && 0 === $ && 0 === V && 0 === Y || (jt = vt * vt, ht = e * vt, pt = ht - (ht - vt), Mt = vt - pt, wt = Mt * Mt - (jt - pt * pt - (pt + pt) * Mt), At = Ct * Ct, ht = e * Ct, pt = ht - (ht - Ct), Mt = Ct - pt, Ft = Mt * Mt - (At - pt * pt - (pt + pt) * Mt), gt = wt + Ft, dt = gt - wt, h[0] = wt - (gt - dt) + (Ft - dt), mt = jt + gt, dt = mt - jt, Tt = jt - (mt - dt) + (gt - dt), gt = Tt + At, dt = gt - Tt, h[1] = Tt - (gt - dt) + (At - dt), kt = mt + gt, dt = kt - mt, h[2] = mt - (kt - dt) + (gt - dt), h[3] = kt), 0 === V && 0 === Y && 0 === W && 0 === Z || (jt = zt * zt, ht = e * zt, pt = ht - (ht - zt), Mt = zt - pt, wt = Mt * Mt - (jt - pt * pt - (pt + pt) * Mt), At = Dt * Dt, ht = e * Dt, pt = ht - (ht - Dt), Mt = Dt - pt, Ft = Mt * Mt - (At - pt * pt - (pt + pt) * Mt), gt = wt + Ft, dt = gt - wt, p[0] = wt - (gt - dt) + (Ft - dt), mt = jt + gt, dt = mt - jt, Tt = jt - (mt - dt) + (gt - dt), gt = Tt + At, dt = gt - Tt, p[1] = Tt - (gt - dt) + (At - dt), kt = mt + gt, dt = kt - mt, p[2] = mt - (kt - dt) + (gt - dt), p[3] = kt), 0 !== V && (_ = r(4, a, V, x), U = N(U, i(r(_, x, 2 * qt, C), C, r(r(4, p, V, B), B, Ct, D), D, r(r(4, h, V, B), B, -Dt, E), E, G, I), I)), 0 !== Y && (tt = r(4, a, Y, g), U = N(U, i(r(tt, g, 2 * Bt, C), C, r(r(4, h, Y, B), B, zt, D), D, r(r(4, p, Y, B), B, -vt, E), E, G, I), I)), 0 !== W && (nt = r(4, l, W, m), U = N(U, i(r(nt, m, 2 * vt, C), C, r(r(4, d, W, B), B, Dt, D), D, r(r(4, p, W, B), B, -Bt, E), E, G, I), I)), 0 !== Z && (et = r(4, l, Z, T), U = N(U, i(r(et, T, 2 * Ct, C), C, r(r(4, p, Z, B), B, qt, D), D, r(r(4, d, Z, B), B, -zt, E), E, G, I), I)), 0 !== X && (ot = r(4, b, X, j), U = N(U, i(r(ot, j, 2 * zt, C), C, r(r(4, h, X, B), B, Bt, D), D, r(r(4, d, X, B), B, -Ct, E), E, G, I), I)), 0 !== $ && (ft = r(4, b, $, w), U = N(U, i(r(ft, w, 2 * Dt, C), C, r(r(4, d, $, B), B, vt, D), D, r(r(4, h, $, B), B, -qt, E), E, G, I), I)), 0 !== V || 0 !== Y) { + if (0 !== W || 0 !== Z || 0 !== X || 0 !== $ ? (jt = W * Dt, ht = e * W, pt = ht - (ht - W), Mt = W - pt, ht = e * Dt, yt = ht - (ht - Dt), xt = Dt - yt, wt = Mt * xt - (jt - pt * yt - Mt * yt - pt * xt), At = vt * $, ht = e * vt, pt = ht - (ht - vt), Mt = vt - pt, ht = e * $, yt = ht - (ht - $), xt = $ - yt, Ft = Mt * xt - (At - pt * yt - Mt * yt - pt * xt), gt = wt + Ft, dt = gt - wt, M[0] = wt - (gt - dt) + (Ft - dt), mt = jt + gt, dt = mt - jt, Tt = jt - (mt - dt) + (gt - dt), gt = Tt + At, dt = gt - Tt, M[1] = Tt - (gt - dt) + (At - dt), kt = mt + gt, dt = kt - mt, M[2] = mt - (kt - dt) + (gt - dt), M[3] = kt, jt = X * -Ct, ht = e * X, pt = ht - (ht - X), Mt = X - pt, ht = e * -Ct, yt = ht - (ht - -Ct), xt = -Ct - yt, wt = Mt * xt - (jt - pt * yt - Mt * yt - pt * xt), At = zt * -Z, ht = e * zt, pt = ht - (ht - zt), Mt = zt - pt, ht = e * -Z, yt = ht - (ht - -Z), xt = -Z - yt, Ft = Mt * xt - (At - pt * yt - Mt * yt - pt * xt), gt = wt + Ft, dt = gt - wt, y[0] = wt - (gt - dt) + (Ft - dt), mt = jt + gt, dt = mt - jt, Tt = jt - (mt - dt) + (gt - dt), gt = Tt + At, dt = gt - Tt, y[1] = Tt - (gt - dt) + (At - dt), kt = mt + gt, dt = kt - mt, y[2] = mt - (kt - dt) + (gt - dt), y[3] = kt, rt = f(4, M, 4, y, F), jt = W * $, ht = e * W, pt = ht - (ht - W), Mt = W - pt, ht = e * $, yt = ht - (ht - $), xt = $ - yt, wt = Mt * xt - (jt - pt * yt - Mt * yt - pt * xt), At = X * Z, ht = e * X, pt = ht - (ht - X), Mt = X - pt, ht = e * Z, yt = ht - (ht - Z), xt = Z - yt, Ft = Mt * xt - (At - pt * yt - Mt * yt - pt * xt), gt = wt - Ft, dt = wt - gt, v[0] = wt - (gt + dt) + (dt - Ft), mt = jt + gt, dt = mt - jt, Tt = jt - (mt - dt) + (gt - dt), gt = Tt - At, dt = Tt - gt, v[1] = Tt - (gt + dt) + (dt - At), kt = mt + gt, dt = kt - mt, v[2] = mt - (kt - dt) + (gt - dt), v[3] = kt, ut = 4) : (F[0] = 0, rt = 1, v[0] = 0, ut = 1), 0 !== V) { + const t = r(rt, F, V, E); + U = N(U, f(r(_, x, V, C), C, r(t, E, 2 * qt, G), G, I), I); + const n = r(ut, v, V, B); + U = N(U, i(r(n, B, 2 * qt, C), C, r(n, B, V, D), D, r(t, E, V, G), G, H, J), J), 0 !== Z && (U = N(U, r(r(4, p, V, B), B, Z, C), C)), 0 !== $ && (U = N(U, r(r(4, h, -V, B), B, $, C), C)); + } + if (0 !== Y) { + const t = r(rt, F, Y, E); + U = N(U, f(r(tt, g, Y, C), C, r(t, E, 2 * Bt, G), G, I), I); + const n = r(ut, v, Y, B); + U = N(U, i(r(n, B, 2 * Bt, C), C, r(n, B, Y, D), D, r(t, E, Y, G), G, H, J), J); + } + } + if (0 !== W || 0 !== Z) { + if (0 !== X || 0 !== $ || 0 !== V || 0 !== Y ? (jt = X * Bt, ht = e * X, pt = ht - (ht - X), Mt = X - pt, ht = e * Bt, yt = ht - (ht - Bt), xt = Bt - yt, wt = Mt * xt - (jt - pt * yt - Mt * yt - pt * xt), At = zt * Y, ht = e * zt, pt = ht - (ht - zt), Mt = zt - pt, ht = e * Y, yt = ht - (ht - Y), xt = Y - yt, Ft = Mt * xt - (At - pt * yt - Mt * yt - pt * xt), gt = wt + Ft, dt = gt - wt, M[0] = wt - (gt - dt) + (Ft - dt), mt = jt + gt, dt = mt - jt, Tt = jt - (mt - dt) + (gt - dt), gt = Tt + At, dt = gt - Tt, M[1] = Tt - (gt - dt) + (At - dt), kt = mt + gt, dt = kt - mt, M[2] = mt - (kt - dt) + (gt - dt), M[3] = kt, lt = -Dt, bt = -$, jt = V * lt, ht = e * V, pt = ht - (ht - V), Mt = V - pt, ht = e * lt, yt = ht - (ht - lt), xt = lt - yt, wt = Mt * xt - (jt - pt * yt - Mt * yt - pt * xt), At = qt * bt, ht = e * qt, pt = ht - (ht - qt), Mt = qt - pt, ht = e * bt, yt = ht - (ht - bt), xt = bt - yt, Ft = Mt * xt - (At - pt * yt - Mt * yt - pt * xt), gt = wt + Ft, dt = gt - wt, y[0] = wt - (gt - dt) + (Ft - dt), mt = jt + gt, dt = mt - jt, Tt = jt - (mt - dt) + (gt - dt), gt = Tt + At, dt = gt - Tt, y[1] = Tt - (gt - dt) + (At - dt), kt = mt + gt, dt = kt - mt, y[2] = mt - (kt - dt) + (gt - dt), y[3] = kt, ct = f(4, M, 4, y, k), jt = X * Y, ht = e * X, pt = ht - (ht - X), Mt = X - pt, ht = e * Y, yt = ht - (ht - Y), xt = Y - yt, wt = Mt * xt - (jt - pt * yt - Mt * yt - pt * xt), At = V * $, ht = e * V, pt = ht - (ht - V), Mt = V - pt, ht = e * $, yt = ht - (ht - $), xt = $ - yt, Ft = Mt * xt - (At - pt * yt - Mt * yt - pt * xt), gt = wt - Ft, dt = wt - gt, z[0] = wt - (gt + dt) + (dt - Ft), mt = jt + gt, dt = mt - jt, Tt = jt - (mt - dt) + (gt - dt), gt = Tt - At, dt = Tt - gt, z[1] = Tt - (gt + dt) + (dt - At), kt = mt + gt, dt = kt - mt, z[2] = mt - (kt - dt) + (gt - dt), z[3] = kt, at = 4) : (k[0] = 0, ct = 1, z[0] = 0, at = 1), 0 !== W) { + const t = r(ct, k, W, E); + U = N(U, f(r(nt, m, W, C), C, r(t, E, 2 * vt, G), G, I), I); + const n = r(at, z, W, B); + U = N(U, i(r(n, B, 2 * vt, C), C, r(n, B, W, D), D, r(t, E, W, G), G, H, J), J), 0 !== $ && (U = N(U, r(r(4, d, W, B), B, $, C), C)), 0 !== Y && (U = N(U, r(r(4, p, -W, B), B, Y, C), C)); + } + if (0 !== Z) { + const t = r(ct, k, Z, E); + U = N(U, f(r(et, T, Z, C), C, r(t, E, 2 * Ct, G), G, I), I); + const n = r(at, z, Z, B); + U = N(U, i(r(n, B, 2 * Ct, C), C, r(n, B, Z, D), D, r(t, E, Z, G), G, H, J), J); + } + } + if (0 !== X || 0 !== $) { + if (0 !== V || 0 !== Y || 0 !== W || 0 !== Z ? (jt = V * Ct, ht = e * V, pt = ht - (ht - V), Mt = V - pt, ht = e * Ct, yt = ht - (ht - Ct), xt = Ct - yt, wt = Mt * xt - (jt - pt * yt - Mt * yt - pt * xt), At = qt * Z, ht = e * qt, pt = ht - (ht - qt), Mt = qt - pt, ht = e * Z, yt = ht - (ht - Z), xt = Z - yt, Ft = Mt * xt - (At - pt * yt - Mt * yt - pt * xt), gt = wt + Ft, dt = gt - wt, M[0] = wt - (gt - dt) + (Ft - dt), mt = jt + gt, dt = mt - jt, Tt = jt - (mt - dt) + (gt - dt), gt = Tt + At, dt = gt - Tt, M[1] = Tt - (gt - dt) + (At - dt), kt = mt + gt, dt = kt - mt, M[2] = mt - (kt - dt) + (gt - dt), M[3] = kt, lt = -Bt, bt = -Y, jt = W * lt, ht = e * W, pt = ht - (ht - W), Mt = W - pt, ht = e * lt, yt = ht - (ht - lt), xt = lt - yt, wt = Mt * xt - (jt - pt * yt - Mt * yt - pt * xt), At = vt * bt, ht = e * vt, pt = ht - (ht - vt), Mt = vt - pt, ht = e * bt, yt = ht - (ht - bt), xt = bt - yt, Ft = Mt * xt - (At - pt * yt - Mt * yt - pt * xt), gt = wt + Ft, dt = gt - wt, y[0] = wt - (gt - dt) + (Ft - dt), mt = jt + gt, dt = mt - jt, Tt = jt - (mt - dt) + (gt - dt), gt = Tt + At, dt = gt - Tt, y[1] = Tt - (gt - dt) + (At - dt), kt = mt + gt, dt = kt - mt, y[2] = mt - (kt - dt) + (gt - dt), y[3] = kt, it = f(4, M, 4, y, A), jt = V * Z, ht = e * V, pt = ht - (ht - V), Mt = V - pt, ht = e * Z, yt = ht - (ht - Z), xt = Z - yt, wt = Mt * xt - (jt - pt * yt - Mt * yt - pt * xt), At = W * Y, ht = e * W, pt = ht - (ht - W), Mt = W - pt, ht = e * Y, yt = ht - (ht - Y), xt = Y - yt, Ft = Mt * xt - (At - pt * yt - Mt * yt - pt * xt), gt = wt - Ft, dt = wt - gt, q[0] = wt - (gt + dt) + (dt - Ft), mt = jt + gt, dt = mt - jt, Tt = jt - (mt - dt) + (gt - dt), gt = Tt - At, dt = Tt - gt, q[1] = Tt - (gt + dt) + (dt - At), kt = mt + gt, dt = kt - mt, q[2] = mt - (kt - dt) + (gt - dt), q[3] = kt, st = 4) : (A[0] = 0, it = 1, q[0] = 0, st = 1), 0 !== X) { + const t = r(it, A, X, E); + U = N(U, f(r(ot, j, X, C), C, r(t, E, 2 * zt, G), G, I), I); + const n = r(st, q, X, B); + U = N(U, i(r(n, B, 2 * zt, C), C, r(n, B, X, D), D, r(t, E, X, G), G, H, J), J), 0 !== Y && (U = N(U, r(r(4, h, X, B), B, Y, C), C)), 0 !== Z && (U = N(U, r(r(4, d, -X, B), B, Z, C), C)); + } + if (0 !== $) { + const t = r(it, A, $, E); + U = N(U, f(r(ft, w, $, C), C, r(t, E, 2 * Dt, G), G, I), I); + const n = r(st, q, $, B); + U = N(U, i(r(n, B, 2 * Dt, C), C, r(n, B, $, D), D, r(t, E, $, G), G, H, J), J); + } + } + return K[U - 1]; + }(t, n, c, L, O, P, Q, R, ct); + }, t.incirclefast = function (t, n, e, o, f, i, r, c) { + const s = t - r, + u = n - c, + a = e - r, + l = o - c, + b = f - r, + d = i - c; + return (s * s + u * u) * (a * d - b * l) + (a * a + l * l) * (b * u - s * d) + (b * b + d * d) * (s * l - a * u); + }; +}); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/insphere.js b/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/insphere.js new file mode 100644 index 000000000000..e98e951f6eae --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/insphere.js @@ -0,0 +1,828 @@ +"use strict"; + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.predicates = {})); +})(this, function (exports) { + 'use strict'; + + const epsilon = 1.1102230246251565e-16; + const splitter = 134217729; + const resulterrbound = (3 + 8 * epsilon) * epsilon; + + // fast_expansion_sum_zeroelim routine from oritinal code + function sum(elen, e, flen, f, h) { + let Q, Qnew, hh, bvirt; + let enow = e[0]; + let fnow = f[0]; + let eindex = 0; + let findex = 0; + if (fnow > enow === fnow > -enow) { + Q = enow; + enow = e[++eindex]; + } else { + Q = fnow; + fnow = f[++findex]; + } + let hindex = 0; + if (eindex < elen && findex < flen) { + if (fnow > enow === fnow > -enow) { + Qnew = enow + Q; + hh = Q - (Qnew - enow); + enow = e[++eindex]; + } else { + Qnew = fnow + Q; + hh = Q - (Qnew - fnow); + fnow = f[++findex]; + } + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + while (eindex < elen && findex < flen) { + if (fnow > enow === fnow > -enow) { + Qnew = Q + enow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (enow - bvirt); + enow = e[++eindex]; + } else { + Qnew = Q + fnow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (fnow - bvirt); + fnow = f[++findex]; + } + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + } + while (eindex < elen) { + Qnew = Q + enow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (enow - bvirt); + enow = e[++eindex]; + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + while (findex < flen) { + Qnew = Q + fnow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (fnow - bvirt); + fnow = f[++findex]; + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + if (Q !== 0 || hindex === 0) { + h[hindex++] = Q; + } + return hindex; + } + function sum_three(alen, a, blen, b, clen, c, tmp, out) { + return sum(sum(alen, a, blen, b, tmp), tmp, clen, c, out); + } + + // scale_expansion_zeroelim routine from oritinal code + function scale(elen, e, b, h) { + let Q, sum, hh, product1, product0; + let bvirt, c, ahi, alo, bhi, blo; + c = splitter * b; + bhi = c - (c - b); + blo = b - bhi; + let enow = e[0]; + Q = enow * b; + c = splitter * enow; + ahi = c - (c - enow); + alo = enow - ahi; + hh = alo * blo - (Q - ahi * bhi - alo * bhi - ahi * blo); + let hindex = 0; + if (hh !== 0) { + h[hindex++] = hh; + } + for (let i = 1; i < elen; i++) { + enow = e[i]; + product1 = enow * b; + c = splitter * enow; + ahi = c - (c - enow); + alo = enow - ahi; + product0 = alo * blo - (product1 - ahi * bhi - alo * bhi - ahi * blo); + sum = Q + product0; + bvirt = sum - Q; + hh = Q - (sum - bvirt) + (product0 - bvirt); + if (hh !== 0) { + h[hindex++] = hh; + } + Q = product1 + sum; + hh = sum - (Q - product1); + if (hh !== 0) { + h[hindex++] = hh; + } + } + if (Q !== 0 || hindex === 0) { + h[hindex++] = Q; + } + return hindex; + } + function negate(elen, e) { + for (let i = 0; i < elen; i++) e[i] = -e[i]; + return elen; + } + function estimate(elen, e) { + let Q = e[0]; + for (let i = 1; i < elen; i++) Q += e[i]; + return Q; + } + function vec(n) { + return new Float64Array(n); + } + const isperrboundA = (16 + 224 * epsilon) * epsilon; + const isperrboundB = (5 + 72 * epsilon) * epsilon; + const isperrboundC = (71 + 1408 * epsilon) * epsilon * epsilon; + const ab = vec(4); + const bc = vec(4); + const cd = vec(4); + const de = vec(4); + const ea = vec(4); + const ac = vec(4); + const bd = vec(4); + const ce = vec(4); + const da = vec(4); + const eb = vec(4); + const abc = vec(24); + const bcd = vec(24); + const cde = vec(24); + const dea = vec(24); + const eab = vec(24); + const abd = vec(24); + const bce = vec(24); + const cda = vec(24); + const deb = vec(24); + const eac = vec(24); + const adet = vec(1152); + const bdet = vec(1152); + const cdet = vec(1152); + const ddet = vec(1152); + const edet = vec(1152); + const abdet = vec(2304); + const cddet = vec(2304); + const cdedet = vec(3456); + const deter = vec(5760); + const _8 = vec(8); + const _8b = vec(8); + const _8c = vec(8); + const _16 = vec(16); + const _24 = vec(24); + const _48 = vec(48); + const _48b = vec(48); + const _96 = vec(96); + const _192 = vec(192); + const _384x = vec(384); + const _384y = vec(384); + const _384z = vec(384); + const _768 = vec(768); + function sum_three_scale(a, b, c, az, bz, cz, out) { + return sum_three(scale(4, a, az, _8), _8, scale(4, b, bz, _8b), _8b, scale(4, c, cz, _8c), _8c, _16, out); + } + function liftexact(alen, a, blen, b, clen, c, dlen, d, x, y, z, out) { + const len = sum(sum(alen, a, blen, b, _48), _48, negate(sum(clen, c, dlen, d, _48b), _48b), _48b, _96); + return sum_three(scale(scale(len, _96, x, _192), _192, x, _384x), _384x, scale(scale(len, _96, y, _192), _192, y, _384y), _384y, scale(scale(len, _96, z, _192), _192, z, _384z), _384z, _768, out); + } + function insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) { + let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3; + s1 = ax * by; + c = splitter * ax; + ahi = c - (c - ax); + alo = ax - ahi; + c = splitter * by; + bhi = c - (c - by); + blo = by - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bx * ay; + c = splitter * bx; + ahi = c - (c - bx); + alo = bx - ahi; + c = splitter * ay; + bhi = c - (c - ay); + blo = ay - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ab[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ab[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ab[2] = _j - (u3 - bvirt) + (_i - bvirt); + ab[3] = u3; + s1 = bx * cy; + c = splitter * bx; + ahi = c - (c - bx); + alo = bx - ahi; + c = splitter * cy; + bhi = c - (c - cy); + blo = cy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cx * by; + c = splitter * cx; + ahi = c - (c - cx); + alo = cx - ahi; + c = splitter * by; + bhi = c - (c - by); + blo = by - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + bc[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + bc[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + bc[2] = _j - (u3 - bvirt) + (_i - bvirt); + bc[3] = u3; + s1 = cx * dy; + c = splitter * cx; + ahi = c - (c - cx); + alo = cx - ahi; + c = splitter * dy; + bhi = c - (c - dy); + blo = dy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = dx * cy; + c = splitter * dx; + ahi = c - (c - dx); + alo = dx - ahi; + c = splitter * cy; + bhi = c - (c - cy); + blo = cy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + cd[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + cd[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + cd[2] = _j - (u3 - bvirt) + (_i - bvirt); + cd[3] = u3; + s1 = dx * ey; + c = splitter * dx; + ahi = c - (c - dx); + alo = dx - ahi; + c = splitter * ey; + bhi = c - (c - ey); + blo = ey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = ex * dy; + c = splitter * ex; + ahi = c - (c - ex); + alo = ex - ahi; + c = splitter * dy; + bhi = c - (c - dy); + blo = dy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + de[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + de[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + de[2] = _j - (u3 - bvirt) + (_i - bvirt); + de[3] = u3; + s1 = ex * ay; + c = splitter * ex; + ahi = c - (c - ex); + alo = ex - ahi; + c = splitter * ay; + bhi = c - (c - ay); + blo = ay - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = ax * ey; + c = splitter * ax; + ahi = c - (c - ax); + alo = ax - ahi; + c = splitter * ey; + bhi = c - (c - ey); + blo = ey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ea[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ea[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ea[2] = _j - (u3 - bvirt) + (_i - bvirt); + ea[3] = u3; + s1 = ax * cy; + c = splitter * ax; + ahi = c - (c - ax); + alo = ax - ahi; + c = splitter * cy; + bhi = c - (c - cy); + blo = cy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cx * ay; + c = splitter * cx; + ahi = c - (c - cx); + alo = cx - ahi; + c = splitter * ay; + bhi = c - (c - ay); + blo = ay - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ac[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ac[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ac[2] = _j - (u3 - bvirt) + (_i - bvirt); + ac[3] = u3; + s1 = bx * dy; + c = splitter * bx; + ahi = c - (c - bx); + alo = bx - ahi; + c = splitter * dy; + bhi = c - (c - dy); + blo = dy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = dx * by; + c = splitter * dx; + ahi = c - (c - dx); + alo = dx - ahi; + c = splitter * by; + bhi = c - (c - by); + blo = by - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + bd[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + bd[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + bd[2] = _j - (u3 - bvirt) + (_i - bvirt); + bd[3] = u3; + s1 = cx * ey; + c = splitter * cx; + ahi = c - (c - cx); + alo = cx - ahi; + c = splitter * ey; + bhi = c - (c - ey); + blo = ey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = ex * cy; + c = splitter * ex; + ahi = c - (c - ex); + alo = ex - ahi; + c = splitter * cy; + bhi = c - (c - cy); + blo = cy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ce[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ce[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ce[2] = _j - (u3 - bvirt) + (_i - bvirt); + ce[3] = u3; + s1 = dx * ay; + c = splitter * dx; + ahi = c - (c - dx); + alo = dx - ahi; + c = splitter * ay; + bhi = c - (c - ay); + blo = ay - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = ax * dy; + c = splitter * ax; + ahi = c - (c - ax); + alo = ax - ahi; + c = splitter * dy; + bhi = c - (c - dy); + blo = dy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + da[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + da[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + da[2] = _j - (u3 - bvirt) + (_i - bvirt); + da[3] = u3; + s1 = ex * by; + c = splitter * ex; + ahi = c - (c - ex); + alo = ex - ahi; + c = splitter * by; + bhi = c - (c - by); + blo = by - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bx * ey; + c = splitter * bx; + ahi = c - (c - bx); + alo = bx - ahi; + c = splitter * ey; + bhi = c - (c - ey); + blo = ey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + eb[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + eb[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + eb[2] = _j - (u3 - bvirt) + (_i - bvirt); + eb[3] = u3; + const abclen = sum_three_scale(ab, bc, ac, cz, az, -bz, abc); + const bcdlen = sum_three_scale(bc, cd, bd, dz, bz, -cz, bcd); + const cdelen = sum_three_scale(cd, de, ce, ez, cz, -dz, cde); + const dealen = sum_three_scale(de, ea, da, az, dz, -ez, dea); + const eablen = sum_three_scale(ea, ab, eb, bz, ez, -az, eab); + const abdlen = sum_three_scale(ab, bd, da, dz, az, bz, abd); + const bcelen = sum_three_scale(bc, ce, eb, ez, bz, cz, bce); + const cdalen = sum_three_scale(cd, da, ac, az, cz, dz, cda); + const deblen = sum_three_scale(de, eb, bd, bz, dz, ez, deb); + const eaclen = sum_three_scale(ea, ac, ce, cz, ez, az, eac); + const deterlen = sum_three(liftexact(cdelen, cde, bcelen, bce, deblen, deb, bcdlen, bcd, ax, ay, az, adet), adet, liftexact(dealen, dea, cdalen, cda, eaclen, eac, cdelen, cde, bx, by, bz, bdet), bdet, sum_three(liftexact(eablen, eab, deblen, deb, abdlen, abd, dealen, dea, cx, cy, cz, cdet), cdet, liftexact(abclen, abc, eaclen, eac, bcelen, bce, eablen, eab, dx, dy, dz, ddet), ddet, liftexact(bcdlen, bcd, abdlen, abd, cdalen, cda, abclen, abc, ex, ey, ez, edet), edet, cddet, cdedet), cdedet, abdet, deter); + return deter[deterlen - 1]; + } + const xdet = vec(96); + const ydet = vec(96); + const zdet = vec(96); + const fin = vec(1152); + function liftadapt(a, b, c, az, bz, cz, x, y, z, out) { + const len = sum_three_scale(a, b, c, az, bz, cz, _24); + return sum_three(scale(scale(len, _24, x, _48), _48, x, xdet), xdet, scale(scale(len, _24, y, _48), _48, y, ydet), ydet, scale(scale(len, _24, z, _48), _48, z, zdet), zdet, _192, out); + } + function insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent) { + let ab3, bc3, cd3, da3, ac3, bd3; + let aextail, bextail, cextail, dextail; + let aeytail, beytail, ceytail, deytail; + let aeztail, beztail, ceztail, deztail; + let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0; + const aex = ax - ex; + const bex = bx - ex; + const cex = cx - ex; + const dex = dx - ex; + const aey = ay - ey; + const bey = by - ey; + const cey = cy - ey; + const dey = dy - ey; + const aez = az - ez; + const bez = bz - ez; + const cez = cz - ez; + const dez = dz - ez; + s1 = aex * bey; + c = splitter * aex; + ahi = c - (c - aex); + alo = aex - ahi; + c = splitter * bey; + bhi = c - (c - bey); + blo = bey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bex * aey; + c = splitter * bex; + ahi = c - (c - bex); + alo = bex - ahi; + c = splitter * aey; + bhi = c - (c - aey); + blo = aey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ab[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ab[1] = _0 - (_i + bvirt) + (bvirt - t1); + ab3 = _j + _i; + bvirt = ab3 - _j; + ab[2] = _j - (ab3 - bvirt) + (_i - bvirt); + ab[3] = ab3; + s1 = bex * cey; + c = splitter * bex; + ahi = c - (c - bex); + alo = bex - ahi; + c = splitter * cey; + bhi = c - (c - cey); + blo = cey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cex * bey; + c = splitter * cex; + ahi = c - (c - cex); + alo = cex - ahi; + c = splitter * bey; + bhi = c - (c - bey); + blo = bey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + bc[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + bc[1] = _0 - (_i + bvirt) + (bvirt - t1); + bc3 = _j + _i; + bvirt = bc3 - _j; + bc[2] = _j - (bc3 - bvirt) + (_i - bvirt); + bc[3] = bc3; + s1 = cex * dey; + c = splitter * cex; + ahi = c - (c - cex); + alo = cex - ahi; + c = splitter * dey; + bhi = c - (c - dey); + blo = dey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = dex * cey; + c = splitter * dex; + ahi = c - (c - dex); + alo = dex - ahi; + c = splitter * cey; + bhi = c - (c - cey); + blo = cey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + cd[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + cd[1] = _0 - (_i + bvirt) + (bvirt - t1); + cd3 = _j + _i; + bvirt = cd3 - _j; + cd[2] = _j - (cd3 - bvirt) + (_i - bvirt); + cd[3] = cd3; + s1 = dex * aey; + c = splitter * dex; + ahi = c - (c - dex); + alo = dex - ahi; + c = splitter * aey; + bhi = c - (c - aey); + blo = aey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = aex * dey; + c = splitter * aex; + ahi = c - (c - aex); + alo = aex - ahi; + c = splitter * dey; + bhi = c - (c - dey); + blo = dey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + da[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + da[1] = _0 - (_i + bvirt) + (bvirt - t1); + da3 = _j + _i; + bvirt = da3 - _j; + da[2] = _j - (da3 - bvirt) + (_i - bvirt); + da[3] = da3; + s1 = aex * cey; + c = splitter * aex; + ahi = c - (c - aex); + alo = aex - ahi; + c = splitter * cey; + bhi = c - (c - cey); + blo = cey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cex * aey; + c = splitter * cex; + ahi = c - (c - cex); + alo = cex - ahi; + c = splitter * aey; + bhi = c - (c - aey); + blo = aey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ac[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ac[1] = _0 - (_i + bvirt) + (bvirt - t1); + ac3 = _j + _i; + bvirt = ac3 - _j; + ac[2] = _j - (ac3 - bvirt) + (_i - bvirt); + ac[3] = ac3; + s1 = bex * dey; + c = splitter * bex; + ahi = c - (c - bex); + alo = bex - ahi; + c = splitter * dey; + bhi = c - (c - dey); + blo = dey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = dex * bey; + c = splitter * dex; + ahi = c - (c - dex); + alo = dex - ahi; + c = splitter * bey; + bhi = c - (c - bey); + blo = bey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + bd[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + bd[1] = _0 - (_i + bvirt) + (bvirt - t1); + bd3 = _j + _i; + bvirt = bd3 - _j; + bd[2] = _j - (bd3 - bvirt) + (_i - bvirt); + bd[3] = bd3; + const finlen = sum(sum(negate(liftadapt(bc, cd, bd, dez, bez, -cez, aex, aey, aez, adet), adet), adet, liftadapt(cd, da, ac, aez, cez, dez, bex, bey, bez, bdet), bdet, abdet), abdet, sum(negate(liftadapt(da, ab, bd, bez, dez, aez, cex, cey, cez, cdet), cdet), cdet, liftadapt(ab, bc, ac, cez, aez, -bez, dex, dey, dez, ddet), ddet, cddet), cddet, fin); + let det = estimate(finlen, fin); + let errbound = isperrboundB * permanent; + if (det >= errbound || -det >= errbound) { + return det; + } + bvirt = ax - aex; + aextail = ax - (aex + bvirt) + (bvirt - ex); + bvirt = ay - aey; + aeytail = ay - (aey + bvirt) + (bvirt - ey); + bvirt = az - aez; + aeztail = az - (aez + bvirt) + (bvirt - ez); + bvirt = bx - bex; + bextail = bx - (bex + bvirt) + (bvirt - ex); + bvirt = by - bey; + beytail = by - (bey + bvirt) + (bvirt - ey); + bvirt = bz - bez; + beztail = bz - (bez + bvirt) + (bvirt - ez); + bvirt = cx - cex; + cextail = cx - (cex + bvirt) + (bvirt - ex); + bvirt = cy - cey; + ceytail = cy - (cey + bvirt) + (bvirt - ey); + bvirt = cz - cez; + ceztail = cz - (cez + bvirt) + (bvirt - ez); + bvirt = dx - dex; + dextail = dx - (dex + bvirt) + (bvirt - ex); + bvirt = dy - dey; + deytail = dy - (dey + bvirt) + (bvirt - ey); + bvirt = dz - dez; + deztail = dz - (dez + bvirt) + (bvirt - ez); + if (aextail === 0 && aeytail === 0 && aeztail === 0 && bextail === 0 && beytail === 0 && beztail === 0 && cextail === 0 && ceytail === 0 && ceztail === 0 && dextail === 0 && deytail === 0 && deztail === 0) { + return det; + } + errbound = isperrboundC * permanent + resulterrbound * Math.abs(det); + const abeps = aex * beytail + bey * aextail - (aey * bextail + bex * aeytail); + const bceps = bex * ceytail + cey * bextail - (bey * cextail + cex * beytail); + const cdeps = cex * deytail + dey * cextail - (cey * dextail + dex * ceytail); + const daeps = dex * aeytail + aey * dextail - (dey * aextail + aex * deytail); + const aceps = aex * ceytail + cey * aextail - (aey * cextail + cex * aeytail); + const bdeps = bex * deytail + dey * bextail - (bey * dextail + dex * beytail); + det += (bex * bex + bey * bey + bez * bez) * (cez * daeps + dez * aceps + aez * cdeps + (ceztail * da3 + deztail * ac3 + aeztail * cd3)) + (dex * dex + dey * dey + dez * dez) * (aez * bceps - bez * aceps + cez * abeps + (aeztail * bc3 - beztail * ac3 + ceztail * ab3)) - ((aex * aex + aey * aey + aez * aez) * (bez * cdeps - cez * bdeps + dez * bceps + (beztail * cd3 - ceztail * bd3 + deztail * bc3)) + (cex * cex + cey * cey + cez * cez) * (dez * abeps + aez * bdeps + bez * daeps + (deztail * ab3 + aeztail * bd3 + beztail * da3))) + 2 * ((bex * bextail + bey * beytail + bez * beztail) * (cez * da3 + dez * ac3 + aez * cd3) + (dex * dextail + dey * deytail + dez * deztail) * (aez * bc3 - bez * ac3 + cez * ab3) - ((aex * aextail + aey * aeytail + aez * aeztail) * (bez * cd3 - cez * bd3 + dez * bc3) + (cex * cextail + cey * ceytail + cez * ceztail) * (dez * ab3 + aez * bd3 + bez * da3))); + if (det >= errbound || -det >= errbound) { + return det; + } + return insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez); + } + function insphere(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) { + const aex = ax - ex; + const bex = bx - ex; + const cex = cx - ex; + const dex = dx - ex; + const aey = ay - ey; + const bey = by - ey; + const cey = cy - ey; + const dey = dy - ey; + const aez = az - ez; + const bez = bz - ez; + const cez = cz - ez; + const dez = dz - ez; + const aexbey = aex * bey; + const bexaey = bex * aey; + const ab = aexbey - bexaey; + const bexcey = bex * cey; + const cexbey = cex * bey; + const bc = bexcey - cexbey; + const cexdey = cex * dey; + const dexcey = dex * cey; + const cd = cexdey - dexcey; + const dexaey = dex * aey; + const aexdey = aex * dey; + const da = dexaey - aexdey; + const aexcey = aex * cey; + const cexaey = cex * aey; + const ac = aexcey - cexaey; + const bexdey = bex * dey; + const dexbey = dex * bey; + const bd = bexdey - dexbey; + const alift = aex * aex + aey * aey + aez * aez; + const blift = bex * bex + bey * bey + bez * bez; + const clift = cex * cex + cey * cey + cez * cez; + const dlift = dex * dex + dey * dey + dez * dez; + const det = clift * (dez * ab + aez * bd + bez * da) - dlift * (aez * bc - bez * ac + cez * ab) + (alift * (bez * cd - cez * bd + dez * bc) - blift * (cez * da + dez * ac + aez * cd)); + const aezplus = Math.abs(aez); + const bezplus = Math.abs(bez); + const cezplus = Math.abs(cez); + const dezplus = Math.abs(dez); + const aexbeyplus = Math.abs(aexbey) + Math.abs(bexaey); + const bexceyplus = Math.abs(bexcey) + Math.abs(cexbey); + const cexdeyplus = Math.abs(cexdey) + Math.abs(dexcey); + const dexaeyplus = Math.abs(dexaey) + Math.abs(aexdey); + const aexceyplus = Math.abs(aexcey) + Math.abs(cexaey); + const bexdeyplus = Math.abs(bexdey) + Math.abs(dexbey); + const permanent = (cexdeyplus * bezplus + bexdeyplus * cezplus + bexceyplus * dezplus) * alift + (dexaeyplus * cezplus + aexceyplus * dezplus + cexdeyplus * aezplus) * blift + (aexbeyplus * dezplus + bexdeyplus * aezplus + dexaeyplus * bezplus) * clift + (bexceyplus * aezplus + aexceyplus * bezplus + aexbeyplus * cezplus) * dlift; + const errbound = isperrboundA * permanent; + if (det > errbound || -det > errbound) { + return det; + } + return -insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent); + } + function inspherefast(pax, pay, paz, pbx, pby, pbz, pcx, pcy, pcz, pdx, pdy, pdz, pex, pey, pez) { + const aex = pax - pex; + const bex = pbx - pex; + const cex = pcx - pex; + const dex = pdx - pex; + const aey = pay - pey; + const bey = pby - pey; + const cey = pcy - pey; + const dey = pdy - pey; + const aez = paz - pez; + const bez = pbz - pez; + const cez = pcz - pez; + const dez = pdz - pez; + const ab = aex * bey - bex * aey; + const bc = bex * cey - cex * bey; + const cd = cex * dey - dex * cey; + const da = dex * aey - aex * dey; + const ac = aex * cey - cex * aey; + const bd = bex * dey - dex * bey; + const abc = aez * bc - bez * ac + cez * ab; + const bcd = bez * cd - cez * bd + dez * bc; + const cda = cez * da + dez * ac + aez * cd; + const dab = dez * ab + aez * bd + bez * da; + const alift = aex * aex + aey * aey + aez * aez; + const blift = bex * bex + bey * bey + bez * bez; + const clift = cex * cex + cey * cey + cez * cez; + const dlift = dex * dex + dey * dey + dez * dez; + return clift * dab - dlift * abc + (alift * bcd - blift * cda); + } + exports.insphere = insphere; + exports.inspherefast = inspherefast; +}); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/insphere.min.js b/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/insphere.min.js new file mode 100644 index 000000000000..f524f2a8a744 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/insphere.min.js @@ -0,0 +1,223 @@ +"use strict"; + +!function (t, n) { + "object" == typeof exports && "undefined" != typeof module ? n(exports) : "function" == typeof define && define.amd ? define(["exports"], n) : n((t = "undefined" != typeof globalThis ? globalThis : t || self).predicates = {}); +}(this, function (t) { + "use strict"; + + const n = 11102230246251565e-32, + e = 134217729, + r = (3 + 8 * n) * n; + function o(t, n, e, r, o) { + let a, + s, + f, + u, + i = n[0], + c = r[0], + h = 0, + b = 0; + c > i == c > -i ? (a = i, i = n[++h]) : (a = c, c = r[++b]); + let l = 0; + if (h < t && b < e) for (c > i == c > -i ? (s = i + a, f = a - (s - i), i = n[++h]) : (s = c + a, f = a - (s - c), c = r[++b]), a = s, 0 !== f && (o[l++] = f); h < t && b < e;) c > i == c > -i ? (s = a + i, u = s - a, f = a - (s - u) + (i - u), i = n[++h]) : (s = a + c, u = s - a, f = a - (s - u) + (c - u), c = r[++b]), a = s, 0 !== f && (o[l++] = f); + for (; h < t;) s = a + i, u = s - a, f = a - (s - u) + (i - u), i = n[++h], a = s, 0 !== f && (o[l++] = f); + for (; b < e;) s = a + c, u = s - a, f = a - (s - u) + (c - u), c = r[++b], a = s, 0 !== f && (o[l++] = f); + return 0 === a && 0 !== l || (o[l++] = a), l; + } + function a(t, n, e, r, a, s, f, u) { + return o(o(t, n, e, r, f), f, a, s, u); + } + function s(t, n, r, o) { + let a, s, f, u, i, c, h, b, l, M, d; + h = e * r, M = h - (h - r), d = r - M; + let p = n[0]; + a = p * r, h = e * p, b = h - (h - p), l = p - b, f = l * d - (a - b * M - l * M - b * d); + let y = 0; + 0 !== f && (o[y++] = f); + for (let x = 1; x < t; x++) p = n[x], u = p * r, h = e * p, b = h - (h - p), l = p - b, i = l * d - (u - b * M - l * M - b * d), s = a + i, c = s - a, f = a - (s - c) + (i - c), 0 !== f && (o[y++] = f), a = u + s, f = s - (a - u), 0 !== f && (o[y++] = f); + return 0 === a && 0 !== y || (o[y++] = a), y; + } + function f(t, n) { + for (let e = 0; e < t; e++) n[e] = -n[e]; + return t; + } + function u(t) { + return new Float64Array(t); + } + const i = 5551115123125792e-31, + c = 8751425667295619e-46, + h = u(4), + b = u(4), + l = u(4), + M = u(4), + d = u(4), + p = u(4), + y = u(4), + x = u(4), + g = u(4), + m = u(4), + T = u(24), + j = u(24), + w = u(24), + A = u(24), + F = u(24), + k = u(24), + q = u(24), + v = u(24), + z = u(24), + B = u(24), + C = u(1152), + D = u(1152), + E = u(1152), + G = u(1152), + H = u(1152), + I = u(2304), + J = u(2304), + K = u(3456), + L = u(5760), + N = u(8), + O = u(8), + P = u(8), + Q = u(16), + R = u(24), + S = u(48), + U = u(48), + V = u(96), + W = u(192), + X = u(384), + Y = u(384), + Z = u(384), + $ = u(768); + function _(t, n, e, r, o, f, u) { + return a(s(4, t, r, N), N, s(4, n, o, O), O, s(4, e, f, P), P, Q, u); + } + function tt(t, n, e, r, u, i, c, h, b, l, M, d) { + const p = o(o(t, n, e, r, S), S, f(o(u, i, c, h, U), U), U, V); + return a(s(s(p, V, b, W), W, b, X), X, s(s(p, V, l, W), W, l, Y), Y, s(s(p, V, M, W), W, M, Z), Z, $, d); + } + const nt = u(96), + et = u(96), + rt = u(96), + ot = u(1152); + function at(t, n, e, r, o, f, u, i, c, h) { + const b = _(t, n, e, r, o, f, R); + return a(s(s(b, R, u, S), S, u, nt), nt, s(s(b, R, i, S), S, i, et), et, s(s(b, R, c, S), S, c, rt), rt, W, h); + } + function st(t, n, s, u, N, O, P, Q, R, S, U, V, W, X, Y, Z) { + let $, nt, et, rt, st, ft, ut, it, ct, ht, bt, lt, Mt, dt, pt, yt, xt, gt, mt, Tt, jt, wt, At, Ft, kt, qt, vt, zt, Bt, Ct, Dt; + const Et = t - W, + Gt = u - W, + Ht = P - W, + It = S - W, + Jt = n - X, + Kt = N - X, + Lt = Q - X, + Nt = U - X, + Ot = s - Y, + Pt = O - Y, + Qt = R - Y, + Rt = V - Y; + zt = Et * Kt, Tt = e * Et, jt = Tt - (Tt - Et), wt = Et - jt, Tt = e * Kt, At = Tt - (Tt - Kt), Ft = Kt - At, Bt = wt * Ft - (zt - jt * At - wt * At - jt * Ft), Ct = Gt * Jt, Tt = e * Gt, jt = Tt - (Tt - Gt), wt = Gt - jt, Tt = e * Jt, At = Tt - (Tt - Jt), Ft = Jt - At, Dt = wt * Ft - (Ct - jt * At - wt * At - jt * Ft), kt = Bt - Dt, mt = Bt - kt, h[0] = Bt - (kt + mt) + (mt - Dt), qt = zt + kt, mt = qt - zt, vt = zt - (qt - mt) + (kt - mt), kt = vt - Ct, mt = vt - kt, h[1] = vt - (kt + mt) + (mt - Ct), $ = qt + kt, mt = $ - qt, h[2] = qt - ($ - mt) + (kt - mt), h[3] = $, zt = Gt * Lt, Tt = e * Gt, jt = Tt - (Tt - Gt), wt = Gt - jt, Tt = e * Lt, At = Tt - (Tt - Lt), Ft = Lt - At, Bt = wt * Ft - (zt - jt * At - wt * At - jt * Ft), Ct = Ht * Kt, Tt = e * Ht, jt = Tt - (Tt - Ht), wt = Ht - jt, Tt = e * Kt, At = Tt - (Tt - Kt), Ft = Kt - At, Dt = wt * Ft - (Ct - jt * At - wt * At - jt * Ft), kt = Bt - Dt, mt = Bt - kt, b[0] = Bt - (kt + mt) + (mt - Dt), qt = zt + kt, mt = qt - zt, vt = zt - (qt - mt) + (kt - mt), kt = vt - Ct, mt = vt - kt, b[1] = vt - (kt + mt) + (mt - Ct), nt = qt + kt, mt = nt - qt, b[2] = qt - (nt - mt) + (kt - mt), b[3] = nt, zt = Ht * Nt, Tt = e * Ht, jt = Tt - (Tt - Ht), wt = Ht - jt, Tt = e * Nt, At = Tt - (Tt - Nt), Ft = Nt - At, Bt = wt * Ft - (zt - jt * At - wt * At - jt * Ft), Ct = It * Lt, Tt = e * It, jt = Tt - (Tt - It), wt = It - jt, Tt = e * Lt, At = Tt - (Tt - Lt), Ft = Lt - At, Dt = wt * Ft - (Ct - jt * At - wt * At - jt * Ft), kt = Bt - Dt, mt = Bt - kt, l[0] = Bt - (kt + mt) + (mt - Dt), qt = zt + kt, mt = qt - zt, vt = zt - (qt - mt) + (kt - mt), kt = vt - Ct, mt = vt - kt, l[1] = vt - (kt + mt) + (mt - Ct), et = qt + kt, mt = et - qt, l[2] = qt - (et - mt) + (kt - mt), l[3] = et, zt = It * Jt, Tt = e * It, jt = Tt - (Tt - It), wt = It - jt, Tt = e * Jt, At = Tt - (Tt - Jt), Ft = Jt - At, Bt = wt * Ft - (zt - jt * At - wt * At - jt * Ft), Ct = Et * Nt, Tt = e * Et, jt = Tt - (Tt - Et), wt = Et - jt, Tt = e * Nt, At = Tt - (Tt - Nt), Ft = Nt - At, Dt = wt * Ft - (Ct - jt * At - wt * At - jt * Ft), kt = Bt - Dt, mt = Bt - kt, g[0] = Bt - (kt + mt) + (mt - Dt), qt = zt + kt, mt = qt - zt, vt = zt - (qt - mt) + (kt - mt), kt = vt - Ct, mt = vt - kt, g[1] = vt - (kt + mt) + (mt - Ct), rt = qt + kt, mt = rt - qt, g[2] = qt - (rt - mt) + (kt - mt), g[3] = rt, zt = Et * Lt, Tt = e * Et, jt = Tt - (Tt - Et), wt = Et - jt, Tt = e * Lt, At = Tt - (Tt - Lt), Ft = Lt - At, Bt = wt * Ft - (zt - jt * At - wt * At - jt * Ft), Ct = Ht * Jt, Tt = e * Ht, jt = Tt - (Tt - Ht), wt = Ht - jt, Tt = e * Jt, At = Tt - (Tt - Jt), Ft = Jt - At, Dt = wt * Ft - (Ct - jt * At - wt * At - jt * Ft), kt = Bt - Dt, mt = Bt - kt, p[0] = Bt - (kt + mt) + (mt - Dt), qt = zt + kt, mt = qt - zt, vt = zt - (qt - mt) + (kt - mt), kt = vt - Ct, mt = vt - kt, p[1] = vt - (kt + mt) + (mt - Ct), st = qt + kt, mt = st - qt, p[2] = qt - (st - mt) + (kt - mt), p[3] = st, zt = Gt * Nt, Tt = e * Gt, jt = Tt - (Tt - Gt), wt = Gt - jt, Tt = e * Nt, At = Tt - (Tt - Nt), Ft = Nt - At, Bt = wt * Ft - (zt - jt * At - wt * At - jt * Ft), Ct = It * Kt, Tt = e * It, jt = Tt - (Tt - It), wt = It - jt, Tt = e * Kt, At = Tt - (Tt - Kt), Ft = Kt - At, Dt = wt * Ft - (Ct - jt * At - wt * At - jt * Ft), kt = Bt - Dt, mt = Bt - kt, y[0] = Bt - (kt + mt) + (mt - Dt), qt = zt + kt, mt = qt - zt, vt = zt - (qt - mt) + (kt - mt), kt = vt - Ct, mt = vt - kt, y[1] = vt - (kt + mt) + (mt - Ct), ft = qt + kt, mt = ft - qt, y[2] = qt - (ft - mt) + (kt - mt), y[3] = ft; + let St = function (t, n) { + let e = n[0]; + for (let r = 1; r < t; r++) e += n[r]; + return e; + }(o(o(f(at(b, l, y, Rt, Pt, -Qt, Et, Jt, Ot, C), C), C, at(l, g, p, Ot, Qt, Rt, Gt, Kt, Pt, D), D, I), I, o(f(at(g, h, y, Pt, Rt, Ot, Ht, Lt, Qt, E), E), E, at(h, b, p, Qt, Ot, -Pt, It, Nt, Rt, G), G, J), J, ot), ot), + Ut = i * Z; + if (St >= Ut || -St >= Ut) return St; + if (mt = t - Et, ut = t - (Et + mt) + (mt - W), mt = n - Jt, bt = n - (Jt + mt) + (mt - X), mt = s - Ot, pt = s - (Ot + mt) + (mt - Y), mt = u - Gt, it = u - (Gt + mt) + (mt - W), mt = N - Kt, lt = N - (Kt + mt) + (mt - X), mt = O - Pt, yt = O - (Pt + mt) + (mt - Y), mt = P - Ht, ct = P - (Ht + mt) + (mt - W), mt = Q - Lt, Mt = Q - (Lt + mt) + (mt - X), mt = R - Qt, xt = R - (Qt + mt) + (mt - Y), mt = S - It, ht = S - (It + mt) + (mt - W), mt = U - Nt, dt = U - (Nt + mt) + (mt - X), mt = V - Rt, gt = V - (Rt + mt) + (mt - Y), 0 === ut && 0 === bt && 0 === pt && 0 === it && 0 === lt && 0 === yt && 0 === ct && 0 === Mt && 0 === xt && 0 === ht && 0 === dt && 0 === gt) return St; + Ut = c * Z + r * Math.abs(St); + const Vt = Et * lt + Kt * ut - (Jt * it + Gt * bt), + Wt = Gt * Mt + Lt * it - (Kt * ct + Ht * lt), + Xt = Ht * dt + Nt * ct - (Lt * ht + It * Mt), + Yt = It * bt + Jt * ht - (Nt * ut + Et * dt), + Zt = Et * Mt + Lt * ut - (Jt * ct + Ht * bt), + $t = Gt * dt + Nt * it - (Kt * ht + It * lt); + return St += (Gt * Gt + Kt * Kt + Pt * Pt) * (Qt * Yt + Rt * Zt + Ot * Xt + (xt * rt + gt * st + pt * et)) + (It * It + Nt * Nt + Rt * Rt) * (Ot * Wt - Pt * Zt + Qt * Vt + (pt * nt - yt * st + xt * $)) - ((Et * Et + Jt * Jt + Ot * Ot) * (Pt * Xt - Qt * $t + Rt * Wt + (yt * et - xt * ft + gt * nt)) + (Ht * Ht + Lt * Lt + Qt * Qt) * (Rt * Vt + Ot * $t + Pt * Yt + (gt * $ + pt * ft + yt * rt))) + 2 * ((Gt * it + Kt * lt + Pt * yt) * (Qt * rt + Rt * st + Ot * et) + (It * ht + Nt * dt + Rt * gt) * (Ot * nt - Pt * st + Qt * $) - ((Et * ut + Jt * bt + Ot * pt) * (Pt * et - Qt * ft + Rt * nt) + (Ht * ct + Lt * Mt + Qt * xt) * (Rt * $ + Ot * ft + Pt * rt))), St >= Ut || -St >= Ut ? St : function (t, n, r, o, s, f, u, i, c, N, O, P, Q, R, S) { + let U, V, W, X, Y, Z, $, nt, et, rt, ot, at, st, ft; + rt = t * s, V = e * t, W = V - (V - t), X = t - W, V = e * s, Y = V - (V - s), Z = s - Y, ot = X * Z - (rt - W * Y - X * Y - W * Z), at = o * n, V = e * o, W = V - (V - o), X = o - W, V = e * n, Y = V - (V - n), Z = n - Y, st = X * Z - (at - W * Y - X * Y - W * Z), $ = ot - st, U = ot - $, h[0] = ot - ($ + U) + (U - st), nt = rt + $, U = nt - rt, et = rt - (nt - U) + ($ - U), $ = et - at, U = et - $, h[1] = et - ($ + U) + (U - at), ft = nt + $, U = ft - nt, h[2] = nt - (ft - U) + ($ - U), h[3] = ft, rt = o * i, V = e * o, W = V - (V - o), X = o - W, V = e * i, Y = V - (V - i), Z = i - Y, ot = X * Z - (rt - W * Y - X * Y - W * Z), at = u * s, V = e * u, W = V - (V - u), X = u - W, V = e * s, Y = V - (V - s), Z = s - Y, st = X * Z - (at - W * Y - X * Y - W * Z), $ = ot - st, U = ot - $, b[0] = ot - ($ + U) + (U - st), nt = rt + $, U = nt - rt, et = rt - (nt - U) + ($ - U), $ = et - at, U = et - $, b[1] = et - ($ + U) + (U - at), ft = nt + $, U = ft - nt, b[2] = nt - (ft - U) + ($ - U), b[3] = ft, rt = u * O, V = e * u, W = V - (V - u), X = u - W, V = e * O, Y = V - (V - O), Z = O - Y, ot = X * Z - (rt - W * Y - X * Y - W * Z), at = N * i, V = e * N, W = V - (V - N), X = N - W, V = e * i, Y = V - (V - i), Z = i - Y, st = X * Z - (at - W * Y - X * Y - W * Z), $ = ot - st, U = ot - $, l[0] = ot - ($ + U) + (U - st), nt = rt + $, U = nt - rt, et = rt - (nt - U) + ($ - U), $ = et - at, U = et - $, l[1] = et - ($ + U) + (U - at), ft = nt + $, U = ft - nt, l[2] = nt - (ft - U) + ($ - U), l[3] = ft, rt = N * R, V = e * N, W = V - (V - N), X = N - W, V = e * R, Y = V - (V - R), Z = R - Y, ot = X * Z - (rt - W * Y - X * Y - W * Z), at = Q * O, V = e * Q, W = V - (V - Q), X = Q - W, V = e * O, Y = V - (V - O), Z = O - Y, st = X * Z - (at - W * Y - X * Y - W * Z), $ = ot - st, U = ot - $, M[0] = ot - ($ + U) + (U - st), nt = rt + $, U = nt - rt, et = rt - (nt - U) + ($ - U), $ = et - at, U = et - $, M[1] = et - ($ + U) + (U - at), ft = nt + $, U = ft - nt, M[2] = nt - (ft - U) + ($ - U), M[3] = ft, rt = Q * n, V = e * Q, W = V - (V - Q), X = Q - W, V = e * n, Y = V - (V - n), Z = n - Y, ot = X * Z - (rt - W * Y - X * Y - W * Z), at = t * R, V = e * t, W = V - (V - t), X = t - W, V = e * R, Y = V - (V - R), Z = R - Y, st = X * Z - (at - W * Y - X * Y - W * Z), $ = ot - st, U = ot - $, d[0] = ot - ($ + U) + (U - st), nt = rt + $, U = nt - rt, et = rt - (nt - U) + ($ - U), $ = et - at, U = et - $, d[1] = et - ($ + U) + (U - at), ft = nt + $, U = ft - nt, d[2] = nt - (ft - U) + ($ - U), d[3] = ft, rt = t * i, V = e * t, W = V - (V - t), X = t - W, V = e * i, Y = V - (V - i), Z = i - Y, ot = X * Z - (rt - W * Y - X * Y - W * Z), at = u * n, V = e * u, W = V - (V - u), X = u - W, V = e * n, Y = V - (V - n), Z = n - Y, st = X * Z - (at - W * Y - X * Y - W * Z), $ = ot - st, U = ot - $, p[0] = ot - ($ + U) + (U - st), nt = rt + $, U = nt - rt, et = rt - (nt - U) + ($ - U), $ = et - at, U = et - $, p[1] = et - ($ + U) + (U - at), ft = nt + $, U = ft - nt, p[2] = nt - (ft - U) + ($ - U), p[3] = ft, rt = o * O, V = e * o, W = V - (V - o), X = o - W, V = e * O, Y = V - (V - O), Z = O - Y, ot = X * Z - (rt - W * Y - X * Y - W * Z), at = N * s, V = e * N, W = V - (V - N), X = N - W, V = e * s, Y = V - (V - s), Z = s - Y, st = X * Z - (at - W * Y - X * Y - W * Z), $ = ot - st, U = ot - $, y[0] = ot - ($ + U) + (U - st), nt = rt + $, U = nt - rt, et = rt - (nt - U) + ($ - U), $ = et - at, U = et - $, y[1] = et - ($ + U) + (U - at), ft = nt + $, U = ft - nt, y[2] = nt - (ft - U) + ($ - U), y[3] = ft, rt = u * R, V = e * u, W = V - (V - u), X = u - W, V = e * R, Y = V - (V - R), Z = R - Y, ot = X * Z - (rt - W * Y - X * Y - W * Z), at = Q * i, V = e * Q, W = V - (V - Q), X = Q - W, V = e * i, Y = V - (V - i), Z = i - Y, st = X * Z - (at - W * Y - X * Y - W * Z), $ = ot - st, U = ot - $, x[0] = ot - ($ + U) + (U - st), nt = rt + $, U = nt - rt, et = rt - (nt - U) + ($ - U), $ = et - at, U = et - $, x[1] = et - ($ + U) + (U - at), ft = nt + $, U = ft - nt, x[2] = nt - (ft - U) + ($ - U), x[3] = ft, rt = N * n, V = e * N, W = V - (V - N), X = N - W, V = e * n, Y = V - (V - n), Z = n - Y, ot = X * Z - (rt - W * Y - X * Y - W * Z), at = t * O, V = e * t, W = V - (V - t), X = t - W, V = e * O, Y = V - (V - O), Z = O - Y, st = X * Z - (at - W * Y - X * Y - W * Z), $ = ot - st, U = ot - $, g[0] = ot - ($ + U) + (U - st), nt = rt + $, U = nt - rt, et = rt - (nt - U) + ($ - U), $ = et - at, U = et - $, g[1] = et - ($ + U) + (U - at), ft = nt + $, U = ft - nt, g[2] = nt - (ft - U) + ($ - U), g[3] = ft, rt = Q * s, V = e * Q, W = V - (V - Q), X = Q - W, V = e * s, Y = V - (V - s), Z = s - Y, ot = X * Z - (rt - W * Y - X * Y - W * Z), at = o * R, V = e * o, W = V - (V - o), X = o - W, V = e * R, Y = V - (V - R), Z = R - Y, st = X * Z - (at - W * Y - X * Y - W * Z), $ = ot - st, U = ot - $, m[0] = ot - ($ + U) + (U - st), nt = rt + $, U = nt - rt, et = rt - (nt - U) + ($ - U), $ = et - at, U = et - $, m[1] = et - ($ + U) + (U - at), ft = nt + $, U = ft - nt, m[2] = nt - (ft - U) + ($ - U), m[3] = ft; + const ut = _(h, b, p, c, r, -f, T), + it = _(b, l, y, P, f, -c, j), + ct = _(l, M, x, S, c, -P, w), + ht = _(M, d, g, r, P, -S, A), + bt = _(d, h, m, f, S, -r, F), + lt = _(h, y, g, P, r, f, k), + Mt = _(b, x, m, S, f, c, q), + dt = _(l, g, p, r, c, P, v), + pt = _(M, m, y, f, P, S, z), + yt = _(d, p, x, c, S, r, B), + xt = a(tt(ct, w, Mt, q, pt, z, it, j, t, n, r, C), C, tt(ht, A, dt, v, yt, B, ct, w, o, s, f, D), D, a(tt(bt, F, pt, z, lt, k, ht, A, u, i, c, E), E, tt(ut, T, yt, B, Mt, q, bt, F, N, O, P, G), G, tt(it, j, lt, k, dt, v, ut, T, Q, R, S, H), H, J, K), K, I, L); + return L[xt - 1]; + }(t, n, s, u, N, O, P, Q, R, S, U, V, W, X, Y); + } + t.insphere = function (t, n, e, r, o, a, s, f, u, i, c, h, b, l, M) { + const d = t - b, + p = r - b, + y = s - b, + x = i - b, + g = n - l, + m = o - l, + T = f - l, + j = c - l, + w = e - M, + A = a - M, + F = u - M, + k = h - M, + q = d * m, + v = p * g, + z = q - v, + B = p * T, + C = y * m, + D = B - C, + E = y * j, + G = x * T, + H = E - G, + I = x * g, + J = d * j, + K = I - J, + L = d * T, + N = y * g, + O = L - N, + P = p * j, + Q = x * m, + R = P - Q, + S = d * d + g * g + w * w, + U = p * p + m * m + A * A, + V = y * y + T * T + F * F, + W = x * x + j * j + k * k, + X = V * (k * z + w * R + A * K) - W * (w * D - A * O + F * z) + (S * (A * H - F * R + k * D) - U * (F * K + k * O + w * H)), + Y = Math.abs(w), + Z = Math.abs(A), + $ = Math.abs(F), + _ = Math.abs(k), + tt = Math.abs(q) + Math.abs(v), + nt = Math.abs(B) + Math.abs(C), + et = Math.abs(E) + Math.abs(G), + rt = Math.abs(I) + Math.abs(J), + ot = Math.abs(L) + Math.abs(N), + at = Math.abs(P) + Math.abs(Q), + ft = (et * Z + at * $ + nt * _) * S + (rt * $ + ot * _ + et * Y) * U + (tt * _ + at * Y + rt * Z) * V + (nt * Y + ot * Z + tt * $) * W, + ut = 17763568394002532e-31 * ft; + return X > ut || -X > ut ? X : -st(t, n, e, r, o, a, s, f, u, i, c, h, b, l, M, ft); + }, t.inspherefast = function (t, n, e, r, o, a, s, f, u, i, c, h, b, l, M) { + const d = t - b, + p = r - b, + y = s - b, + x = i - b, + g = n - l, + m = o - l, + T = f - l, + j = c - l, + w = e - M, + A = a - M, + F = u - M, + k = h - M, + q = d * m - p * g, + v = p * T - y * m, + z = y * j - x * T, + B = x * g - d * j, + C = d * T - y * g, + D = p * j - x * m; + return (y * y + T * T + F * F) * (k * q + w * D + A * B) - (x * x + j * j + k * k) * (w * v - A * C + F * q) + ((d * d + g * g + w * w) * (A * z - F * D + k * v) - (p * p + m * m + A * A) * (F * B + k * C + w * z)); + }; +}); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/orient2d.js b/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/orient2d.js new file mode 100644 index 000000000000..39e54b701bca --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/orient2d.js @@ -0,0 +1,260 @@ +"use strict"; + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.predicates = {})); +})(this, function (exports) { + 'use strict'; + + const epsilon = 1.1102230246251565e-16; + const splitter = 134217729; + const resulterrbound = (3 + 8 * epsilon) * epsilon; + + // fast_expansion_sum_zeroelim routine from oritinal code + function sum(elen, e, flen, f, h) { + let Q, Qnew, hh, bvirt; + let enow = e[0]; + let fnow = f[0]; + let eindex = 0; + let findex = 0; + if (fnow > enow === fnow > -enow) { + Q = enow; + enow = e[++eindex]; + } else { + Q = fnow; + fnow = f[++findex]; + } + let hindex = 0; + if (eindex < elen && findex < flen) { + if (fnow > enow === fnow > -enow) { + Qnew = enow + Q; + hh = Q - (Qnew - enow); + enow = e[++eindex]; + } else { + Qnew = fnow + Q; + hh = Q - (Qnew - fnow); + fnow = f[++findex]; + } + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + while (eindex < elen && findex < flen) { + if (fnow > enow === fnow > -enow) { + Qnew = Q + enow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (enow - bvirt); + enow = e[++eindex]; + } else { + Qnew = Q + fnow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (fnow - bvirt); + fnow = f[++findex]; + } + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + } + while (eindex < elen) { + Qnew = Q + enow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (enow - bvirt); + enow = e[++eindex]; + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + while (findex < flen) { + Qnew = Q + fnow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (fnow - bvirt); + fnow = f[++findex]; + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + if (Q !== 0 || hindex === 0) { + h[hindex++] = Q; + } + return hindex; + } + function estimate(elen, e) { + let Q = e[0]; + for (let i = 1; i < elen; i++) Q += e[i]; + return Q; + } + function vec(n) { + return new Float64Array(n); + } + const ccwerrboundA = (3 + 16 * epsilon) * epsilon; + const ccwerrboundB = (2 + 12 * epsilon) * epsilon; + const ccwerrboundC = (9 + 64 * epsilon) * epsilon * epsilon; + const B = vec(4); + const C1 = vec(8); + const C2 = vec(12); + const D = vec(16); + const u = vec(4); + function orient2dadapt(ax, ay, bx, by, cx, cy, detsum) { + let acxtail, acytail, bcxtail, bcytail; + let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3; + const acx = ax - cx; + const bcx = bx - cx; + const acy = ay - cy; + const bcy = by - cy; + s1 = acx * bcy; + c = splitter * acx; + ahi = c - (c - acx); + alo = acx - ahi; + c = splitter * bcy; + bhi = c - (c - bcy); + blo = bcy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = acy * bcx; + c = splitter * acy; + ahi = c - (c - acy); + alo = acy - ahi; + c = splitter * bcx; + bhi = c - (c - bcx); + blo = bcx - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + B[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + B[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + B[2] = _j - (u3 - bvirt) + (_i - bvirt); + B[3] = u3; + let det = estimate(4, B); + let errbound = ccwerrboundB * detsum; + if (det >= errbound || -det >= errbound) { + return det; + } + bvirt = ax - acx; + acxtail = ax - (acx + bvirt) + (bvirt - cx); + bvirt = bx - bcx; + bcxtail = bx - (bcx + bvirt) + (bvirt - cx); + bvirt = ay - acy; + acytail = ay - (acy + bvirt) + (bvirt - cy); + bvirt = by - bcy; + bcytail = by - (bcy + bvirt) + (bvirt - cy); + if (acxtail === 0 && acytail === 0 && bcxtail === 0 && bcytail === 0) { + return det; + } + errbound = ccwerrboundC * detsum + resulterrbound * Math.abs(det); + det += acx * bcytail + bcy * acxtail - (acy * bcxtail + bcx * acytail); + if (det >= errbound || -det >= errbound) return det; + s1 = acxtail * bcy; + c = splitter * acxtail; + ahi = c - (c - acxtail); + alo = acxtail - ahi; + c = splitter * bcy; + bhi = c - (c - bcy); + blo = bcy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = acytail * bcx; + c = splitter * acytail; + ahi = c - (c - acytail); + alo = acytail - ahi; + c = splitter * bcx; + bhi = c - (c - bcx); + blo = bcx - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + u[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + u[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + u[2] = _j - (u3 - bvirt) + (_i - bvirt); + u[3] = u3; + const C1len = sum(4, B, 4, u, C1); + s1 = acx * bcytail; + c = splitter * acx; + ahi = c - (c - acx); + alo = acx - ahi; + c = splitter * bcytail; + bhi = c - (c - bcytail); + blo = bcytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = acy * bcxtail; + c = splitter * acy; + ahi = c - (c - acy); + alo = acy - ahi; + c = splitter * bcxtail; + bhi = c - (c - bcxtail); + blo = bcxtail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + u[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + u[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + u[2] = _j - (u3 - bvirt) + (_i - bvirt); + u[3] = u3; + const C2len = sum(C1len, C1, 4, u, C2); + s1 = acxtail * bcytail; + c = splitter * acxtail; + ahi = c - (c - acxtail); + alo = acxtail - ahi; + c = splitter * bcytail; + bhi = c - (c - bcytail); + blo = bcytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = acytail * bcxtail; + c = splitter * acytail; + ahi = c - (c - acytail); + alo = acytail - ahi; + c = splitter * bcxtail; + bhi = c - (c - bcxtail); + blo = bcxtail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + u[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + u[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + u[2] = _j - (u3 - bvirt) + (_i - bvirt); + u[3] = u3; + const Dlen = sum(C2len, C2, 4, u, D); + return D[Dlen - 1]; + } + function orient2d(ax, ay, bx, by, cx, cy) { + const detleft = (ay - cy) * (bx - cx); + const detright = (ax - cx) * (by - cy); + const det = detleft - detright; + const detsum = Math.abs(detleft + detright); + if (Math.abs(det) >= ccwerrboundA * detsum) return det; + return -orient2dadapt(ax, ay, bx, by, cx, cy, detsum); + } + function orient2dfast(ax, ay, bx, by, cx, cy) { + return (ay - cy) * (bx - cx) - (ax - cx) * (by - cy); + } + exports.orient2d = orient2d; + exports.orient2dfast = orient2dfast; +}); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/orient2d.min.js b/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/orient2d.min.js new file mode 100644 index 000000000000..22e66628ed4a --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/orient2d.min.js @@ -0,0 +1,69 @@ +"use strict"; + +!function (t, e) { + "object" == typeof exports && "undefined" != typeof module ? e(exports) : "function" == typeof define && define.amd ? define(["exports"], e) : e((t = "undefined" != typeof globalThis ? globalThis : t || self).predicates = {}); +}(this, function (t) { + "use strict"; + + const e = 11102230246251565e-32, + n = 134217729, + o = (3 + 8 * e) * e; + function r(t, e, n, o, r) { + let f, + i, + u, + s, + c = e[0], + a = o[0], + l = 0, + d = 0; + a > c == a > -c ? (f = c, c = e[++l]) : (f = a, a = o[++d]); + let p = 0; + if (l < t && d < n) for (a > c == a > -c ? (i = c + f, u = f - (i - c), c = e[++l]) : (i = a + f, u = f - (i - a), a = o[++d]), f = i, 0 !== u && (r[p++] = u); l < t && d < n;) a > c == a > -c ? (i = f + c, s = i - f, u = f - (i - s) + (c - s), c = e[++l]) : (i = f + a, s = i - f, u = f - (i - s) + (a - s), a = o[++d]), f = i, 0 !== u && (r[p++] = u); + for (; l < t;) i = f + c, s = i - f, u = f - (i - s) + (c - s), c = e[++l], f = i, 0 !== u && (r[p++] = u); + for (; d < n;) i = f + a, s = i - f, u = f - (i - s) + (a - s), a = o[++d], f = i, 0 !== u && (r[p++] = u); + return 0 === f && 0 !== p || (r[p++] = f), p; + } + function f(t) { + return new Float64Array(t); + } + const i = 22204460492503146e-32, + u = 11093356479670487e-47, + s = f(4), + c = f(8), + a = f(12), + l = f(16), + d = f(4); + t.orient2d = function (t, e, f, p, b, h) { + const y = (e - h) * (f - b), + x = (t - b) * (p - h), + M = y - x, + g = Math.abs(y + x); + return Math.abs(M) >= 33306690738754716e-32 * g ? M : -function (t, e, f, p, b, h, y) { + let x, M, g, m, T, j, w, A, F, k, q, v, z, B, C, D, E, G; + const H = t - b, + I = f - b, + J = e - h, + K = p - h; + B = H * K, j = n * H, w = j - (j - H), A = H - w, j = n * K, F = j - (j - K), k = K - F, C = A * k - (B - w * F - A * F - w * k), D = J * I, j = n * J, w = j - (j - J), A = J - w, j = n * I, F = j - (j - I), k = I - F, E = A * k - (D - w * F - A * F - w * k), q = C - E, T = C - q, s[0] = C - (q + T) + (T - E), v = B + q, T = v - B, z = B - (v - T) + (q - T), q = z - D, T = z - q, s[1] = z - (q + T) + (T - D), G = v + q, T = G - v, s[2] = v - (G - T) + (q - T), s[3] = G; + let L = function (t, e) { + let n = e[0]; + for (let o = 1; o < t; o++) n += e[o]; + return n; + }(4, s), + N = i * y; + if (L >= N || -L >= N) return L; + if (T = t - H, x = t - (H + T) + (T - b), T = f - I, g = f - (I + T) + (T - b), T = e - J, M = e - (J + T) + (T - h), T = p - K, m = p - (K + T) + (T - h), 0 === x && 0 === M && 0 === g && 0 === m) return L; + if (N = u * y + o * Math.abs(L), L += H * m + K * x - (J * g + I * M), L >= N || -L >= N) return L; + B = x * K, j = n * x, w = j - (j - x), A = x - w, j = n * K, F = j - (j - K), k = K - F, C = A * k - (B - w * F - A * F - w * k), D = M * I, j = n * M, w = j - (j - M), A = M - w, j = n * I, F = j - (j - I), k = I - F, E = A * k - (D - w * F - A * F - w * k), q = C - E, T = C - q, d[0] = C - (q + T) + (T - E), v = B + q, T = v - B, z = B - (v - T) + (q - T), q = z - D, T = z - q, d[1] = z - (q + T) + (T - D), G = v + q, T = G - v, d[2] = v - (G - T) + (q - T), d[3] = G; + const O = r(4, s, 4, d, c); + B = H * m, j = n * H, w = j - (j - H), A = H - w, j = n * m, F = j - (j - m), k = m - F, C = A * k - (B - w * F - A * F - w * k), D = J * g, j = n * J, w = j - (j - J), A = J - w, j = n * g, F = j - (j - g), k = g - F, E = A * k - (D - w * F - A * F - w * k), q = C - E, T = C - q, d[0] = C - (q + T) + (T - E), v = B + q, T = v - B, z = B - (v - T) + (q - T), q = z - D, T = z - q, d[1] = z - (q + T) + (T - D), G = v + q, T = G - v, d[2] = v - (G - T) + (q - T), d[3] = G; + const P = r(O, c, 4, d, a); + B = x * m, j = n * x, w = j - (j - x), A = x - w, j = n * m, F = j - (j - m), k = m - F, C = A * k - (B - w * F - A * F - w * k), D = M * g, j = n * M, w = j - (j - M), A = M - w, j = n * g, F = j - (j - g), k = g - F, E = A * k - (D - w * F - A * F - w * k), q = C - E, T = C - q, d[0] = C - (q + T) + (T - E), v = B + q, T = v - B, z = B - (v - T) + (q - T), q = z - D, T = z - q, d[1] = z - (q + T) + (T - D), G = v + q, T = G - v, d[2] = v - (G - T) + (q - T), d[3] = G; + const Q = r(P, a, 4, d, l); + return l[Q - 1]; + }(t, e, f, p, b, h, g); + }, t.orient2dfast = function (t, e, n, o, r, f) { + return (e - f) * (n - r) - (t - r) * (o - f); + }; +}); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/orient3d.js b/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/orient3d.js new file mode 100644 index 000000000000..8d89726f0e4b --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/orient3d.js @@ -0,0 +1,550 @@ +"use strict"; + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.predicates = {})); +})(this, function (exports) { + 'use strict'; + + const epsilon = 1.1102230246251565e-16; + const splitter = 134217729; + const resulterrbound = (3 + 8 * epsilon) * epsilon; + + // fast_expansion_sum_zeroelim routine from oritinal code + function sum(elen, e, flen, f, h) { + let Q, Qnew, hh, bvirt; + let enow = e[0]; + let fnow = f[0]; + let eindex = 0; + let findex = 0; + if (fnow > enow === fnow > -enow) { + Q = enow; + enow = e[++eindex]; + } else { + Q = fnow; + fnow = f[++findex]; + } + let hindex = 0; + if (eindex < elen && findex < flen) { + if (fnow > enow === fnow > -enow) { + Qnew = enow + Q; + hh = Q - (Qnew - enow); + enow = e[++eindex]; + } else { + Qnew = fnow + Q; + hh = Q - (Qnew - fnow); + fnow = f[++findex]; + } + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + while (eindex < elen && findex < flen) { + if (fnow > enow === fnow > -enow) { + Qnew = Q + enow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (enow - bvirt); + enow = e[++eindex]; + } else { + Qnew = Q + fnow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (fnow - bvirt); + fnow = f[++findex]; + } + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + } + while (eindex < elen) { + Qnew = Q + enow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (enow - bvirt); + enow = e[++eindex]; + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + while (findex < flen) { + Qnew = Q + fnow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (fnow - bvirt); + fnow = f[++findex]; + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + if (Q !== 0 || hindex === 0) { + h[hindex++] = Q; + } + return hindex; + } + + // scale_expansion_zeroelim routine from oritinal code + function scale(elen, e, b, h) { + let Q, sum, hh, product1, product0; + let bvirt, c, ahi, alo, bhi, blo; + c = splitter * b; + bhi = c - (c - b); + blo = b - bhi; + let enow = e[0]; + Q = enow * b; + c = splitter * enow; + ahi = c - (c - enow); + alo = enow - ahi; + hh = alo * blo - (Q - ahi * bhi - alo * bhi - ahi * blo); + let hindex = 0; + if (hh !== 0) { + h[hindex++] = hh; + } + for (let i = 1; i < elen; i++) { + enow = e[i]; + product1 = enow * b; + c = splitter * enow; + ahi = c - (c - enow); + alo = enow - ahi; + product0 = alo * blo - (product1 - ahi * bhi - alo * bhi - ahi * blo); + sum = Q + product0; + bvirt = sum - Q; + hh = Q - (sum - bvirt) + (product0 - bvirt); + if (hh !== 0) { + h[hindex++] = hh; + } + Q = product1 + sum; + hh = sum - (Q - product1); + if (hh !== 0) { + h[hindex++] = hh; + } + } + if (Q !== 0 || hindex === 0) { + h[hindex++] = Q; + } + return hindex; + } + function estimate(elen, e) { + let Q = e[0]; + for (let i = 1; i < elen; i++) Q += e[i]; + return Q; + } + function vec(n) { + return new Float64Array(n); + } + const o3derrboundA = (7 + 56 * epsilon) * epsilon; + const o3derrboundB = (3 + 28 * epsilon) * epsilon; + const o3derrboundC = (26 + 288 * epsilon) * epsilon * epsilon; + const bc = vec(4); + const ca = vec(4); + const ab = vec(4); + const at_b = vec(4); + const at_c = vec(4); + const bt_c = vec(4); + const bt_a = vec(4); + const ct_a = vec(4); + const ct_b = vec(4); + const bct = vec(8); + const cat = vec(8); + const abt = vec(8); + const u = vec(4); + const _8 = vec(8); + const _8b = vec(8); + const _16 = vec(8); + const _12 = vec(12); + let fin = vec(192); + let fin2 = vec(192); + function finadd(finlen, alen, a) { + finlen = sum(finlen, fin, alen, a, fin2); + const tmp = fin; + fin = fin2; + fin2 = tmp; + return finlen; + } + function tailinit(xtail, ytail, ax, ay, bx, by, a, b) { + let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3, negate; + if (xtail === 0) { + if (ytail === 0) { + a[0] = 0; + b[0] = 0; + return 1; + } else { + negate = -ytail; + s1 = negate * ax; + c = splitter * negate; + ahi = c - (c - negate); + alo = negate - ahi; + c = splitter * ax; + bhi = c - (c - ax); + blo = ax - bhi; + a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + a[1] = s1; + s1 = ytail * bx; + c = splitter * ytail; + ahi = c - (c - ytail); + alo = ytail - ahi; + c = splitter * bx; + bhi = c - (c - bx); + blo = bx - bhi; + b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + b[1] = s1; + return 2; + } + } else { + if (ytail === 0) { + s1 = xtail * ay; + c = splitter * xtail; + ahi = c - (c - xtail); + alo = xtail - ahi; + c = splitter * ay; + bhi = c - (c - ay); + blo = ay - bhi; + a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + a[1] = s1; + negate = -xtail; + s1 = negate * by; + c = splitter * negate; + ahi = c - (c - negate); + alo = negate - ahi; + c = splitter * by; + bhi = c - (c - by); + blo = by - bhi; + b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + b[1] = s1; + return 2; + } else { + s1 = xtail * ay; + c = splitter * xtail; + ahi = c - (c - xtail); + alo = xtail - ahi; + c = splitter * ay; + bhi = c - (c - ay); + blo = ay - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = ytail * ax; + c = splitter * ytail; + ahi = c - (c - ytail); + alo = ytail - ahi; + c = splitter * ax; + bhi = c - (c - ax); + blo = ax - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + a[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + a[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + a[2] = _j - (u3 - bvirt) + (_i - bvirt); + a[3] = u3; + s1 = ytail * bx; + c = splitter * ytail; + ahi = c - (c - ytail); + alo = ytail - ahi; + c = splitter * bx; + bhi = c - (c - bx); + blo = bx - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = xtail * by; + c = splitter * xtail; + ahi = c - (c - xtail); + alo = xtail - ahi; + c = splitter * by; + bhi = c - (c - by); + blo = by - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + b[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + b[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + b[2] = _j - (u3 - bvirt) + (_i - bvirt); + b[3] = u3; + return 4; + } + } + } + function tailadd(finlen, a, b, k, z) { + let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, u3; + s1 = a * b; + c = splitter * a; + ahi = c - (c - a); + alo = a - ahi; + c = splitter * b; + bhi = c - (c - b); + blo = b - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + c = splitter * k; + bhi = c - (c - k); + blo = k - bhi; + _i = s0 * k; + c = splitter * s0; + ahi = c - (c - s0); + alo = s0 - ahi; + u[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo); + _j = s1 * k; + c = splitter * s1; + ahi = c - (c - s1); + alo = s1 - ahi; + _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo); + _k = _i + _0; + bvirt = _k - _i; + u[1] = _i - (_k - bvirt) + (_0 - bvirt); + u3 = _j + _k; + u[2] = _k - (u3 - _j); + u[3] = u3; + finlen = finadd(finlen, 4, u); + if (z !== 0) { + c = splitter * z; + bhi = c - (c - z); + blo = z - bhi; + _i = s0 * z; + c = splitter * s0; + ahi = c - (c - s0); + alo = s0 - ahi; + u[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo); + _j = s1 * z; + c = splitter * s1; + ahi = c - (c - s1); + alo = s1 - ahi; + _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo); + _k = _i + _0; + bvirt = _k - _i; + u[1] = _i - (_k - bvirt) + (_0 - bvirt); + u3 = _j + _k; + u[2] = _k - (u3 - _j); + u[3] = u3; + finlen = finadd(finlen, 4, u); + } + return finlen; + } + function orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent) { + let finlen; + let adxtail, bdxtail, cdxtail; + let adytail, bdytail, cdytail; + let adztail, bdztail, cdztail; + let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3; + const adx = ax - dx; + const bdx = bx - dx; + const cdx = cx - dx; + const ady = ay - dy; + const bdy = by - dy; + const cdy = cy - dy; + const adz = az - dz; + const bdz = bz - dz; + const cdz = cz - dz; + s1 = bdx * cdy; + c = splitter * bdx; + ahi = c - (c - bdx); + alo = bdx - ahi; + c = splitter * cdy; + bhi = c - (c - cdy); + blo = cdy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cdx * bdy; + c = splitter * cdx; + ahi = c - (c - cdx); + alo = cdx - ahi; + c = splitter * bdy; + bhi = c - (c - bdy); + blo = bdy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + bc[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + bc[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + bc[2] = _j - (u3 - bvirt) + (_i - bvirt); + bc[3] = u3; + s1 = cdx * ady; + c = splitter * cdx; + ahi = c - (c - cdx); + alo = cdx - ahi; + c = splitter * ady; + bhi = c - (c - ady); + blo = ady - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = adx * cdy; + c = splitter * adx; + ahi = c - (c - adx); + alo = adx - ahi; + c = splitter * cdy; + bhi = c - (c - cdy); + blo = cdy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ca[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ca[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ca[2] = _j - (u3 - bvirt) + (_i - bvirt); + ca[3] = u3; + s1 = adx * bdy; + c = splitter * adx; + ahi = c - (c - adx); + alo = adx - ahi; + c = splitter * bdy; + bhi = c - (c - bdy); + blo = bdy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bdx * ady; + c = splitter * bdx; + ahi = c - (c - bdx); + alo = bdx - ahi; + c = splitter * ady; + bhi = c - (c - ady); + blo = ady - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ab[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ab[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ab[2] = _j - (u3 - bvirt) + (_i - bvirt); + ab[3] = u3; + finlen = sum(sum(scale(4, bc, adz, _8), _8, scale(4, ca, bdz, _8b), _8b, _16), _16, scale(4, ab, cdz, _8), _8, fin); + let det = estimate(finlen, fin); + let errbound = o3derrboundB * permanent; + if (det >= errbound || -det >= errbound) { + return det; + } + bvirt = ax - adx; + adxtail = ax - (adx + bvirt) + (bvirt - dx); + bvirt = bx - bdx; + bdxtail = bx - (bdx + bvirt) + (bvirt - dx); + bvirt = cx - cdx; + cdxtail = cx - (cdx + bvirt) + (bvirt - dx); + bvirt = ay - ady; + adytail = ay - (ady + bvirt) + (bvirt - dy); + bvirt = by - bdy; + bdytail = by - (bdy + bvirt) + (bvirt - dy); + bvirt = cy - cdy; + cdytail = cy - (cdy + bvirt) + (bvirt - dy); + bvirt = az - adz; + adztail = az - (adz + bvirt) + (bvirt - dz); + bvirt = bz - bdz; + bdztail = bz - (bdz + bvirt) + (bvirt - dz); + bvirt = cz - cdz; + cdztail = cz - (cdz + bvirt) + (bvirt - dz); + if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 && adytail === 0 && bdytail === 0 && cdytail === 0 && adztail === 0 && bdztail === 0 && cdztail === 0) { + return det; + } + errbound = o3derrboundC * permanent + resulterrbound * Math.abs(det); + det += adz * (bdx * cdytail + cdy * bdxtail - (bdy * cdxtail + cdx * bdytail)) + adztail * (bdx * cdy - bdy * cdx) + bdz * (cdx * adytail + ady * cdxtail - (cdy * adxtail + adx * cdytail)) + bdztail * (cdx * ady - cdy * adx) + cdz * (adx * bdytail + bdy * adxtail - (ady * bdxtail + bdx * adytail)) + cdztail * (adx * bdy - ady * bdx); + if (det >= errbound || -det >= errbound) { + return det; + } + const at_len = tailinit(adxtail, adytail, bdx, bdy, cdx, cdy, at_b, at_c); + const bt_len = tailinit(bdxtail, bdytail, cdx, cdy, adx, ady, bt_c, bt_a); + const ct_len = tailinit(cdxtail, cdytail, adx, ady, bdx, bdy, ct_a, ct_b); + const bctlen = sum(bt_len, bt_c, ct_len, ct_b, bct); + finlen = finadd(finlen, scale(bctlen, bct, adz, _16), _16); + const catlen = sum(ct_len, ct_a, at_len, at_c, cat); + finlen = finadd(finlen, scale(catlen, cat, bdz, _16), _16); + const abtlen = sum(at_len, at_b, bt_len, bt_a, abt); + finlen = finadd(finlen, scale(abtlen, abt, cdz, _16), _16); + if (adztail !== 0) { + finlen = finadd(finlen, scale(4, bc, adztail, _12), _12); + finlen = finadd(finlen, scale(bctlen, bct, adztail, _16), _16); + } + if (bdztail !== 0) { + finlen = finadd(finlen, scale(4, ca, bdztail, _12), _12); + finlen = finadd(finlen, scale(catlen, cat, bdztail, _16), _16); + } + if (cdztail !== 0) { + finlen = finadd(finlen, scale(4, ab, cdztail, _12), _12); + finlen = finadd(finlen, scale(abtlen, abt, cdztail, _16), _16); + } + if (adxtail !== 0) { + if (bdytail !== 0) { + finlen = tailadd(finlen, adxtail, bdytail, cdz, cdztail); + } + if (cdytail !== 0) { + finlen = tailadd(finlen, -adxtail, cdytail, bdz, bdztail); + } + } + if (bdxtail !== 0) { + if (cdytail !== 0) { + finlen = tailadd(finlen, bdxtail, cdytail, adz, adztail); + } + if (adytail !== 0) { + finlen = tailadd(finlen, -bdxtail, adytail, cdz, cdztail); + } + } + if (cdxtail !== 0) { + if (adytail !== 0) { + finlen = tailadd(finlen, cdxtail, adytail, bdz, bdztail); + } + if (bdytail !== 0) { + finlen = tailadd(finlen, -cdxtail, bdytail, adz, adztail); + } + } + return fin[finlen - 1]; + } + function orient3d(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) { + const adx = ax - dx; + const bdx = bx - dx; + const cdx = cx - dx; + const ady = ay - dy; + const bdy = by - dy; + const cdy = cy - dy; + const adz = az - dz; + const bdz = bz - dz; + const cdz = cz - dz; + const bdxcdy = bdx * cdy; + const cdxbdy = cdx * bdy; + const cdxady = cdx * ady; + const adxcdy = adx * cdy; + const adxbdy = adx * bdy; + const bdxady = bdx * ady; + const det = adz * (bdxcdy - cdxbdy) + bdz * (cdxady - adxcdy) + cdz * (adxbdy - bdxady); + const permanent = (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * Math.abs(adz) + (Math.abs(cdxady) + Math.abs(adxcdy)) * Math.abs(bdz) + (Math.abs(adxbdy) + Math.abs(bdxady)) * Math.abs(cdz); + const errbound = o3derrboundA * permanent; + if (det > errbound || -det > errbound) { + return det; + } + return orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent); + } + function orient3dfast(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) { + const adx = ax - dx; + const bdx = bx - dx; + const cdx = cx - dx; + const ady = ay - dy; + const bdy = by - dy; + const cdy = cy - dy; + const adz = az - dz; + const bdz = bz - dz; + const cdz = cz - dz; + return adx * (bdy * cdz - bdz * cdy) + bdx * (cdy * adz - cdz * ady) + cdx * (ady * bdz - adz * bdy); + } + exports.orient3d = orient3d; + exports.orient3dfast = orient3dfast; +}); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/orient3d.min.js b/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/orient3d.min.js new file mode 100644 index 000000000000..2183f9ee59ce --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/orient3d.min.js @@ -0,0 +1,133 @@ +"use strict"; + +!function (t, n) { + "object" == typeof exports && "undefined" != typeof module ? n(exports) : "function" == typeof define && define.amd ? define(["exports"], n) : n((t = "undefined" != typeof globalThis ? globalThis : t || self).predicates = {}); +}(this, function (t) { + "use strict"; + + const n = 11102230246251565e-32, + e = 134217729, + o = (3 + 8 * n) * n; + function r(t, n, e, o, r) { + let f, + s, + u, + i, + a = n[0], + c = o[0], + l = 0, + b = 0; + c > a == c > -a ? (f = a, a = n[++l]) : (f = c, c = o[++b]); + let h = 0; + if (l < t && b < e) for (c > a == c > -a ? (s = a + f, u = f - (s - a), a = n[++l]) : (s = c + f, u = f - (s - c), c = o[++b]), f = s, 0 !== u && (r[h++] = u); l < t && b < e;) c > a == c > -a ? (s = f + a, i = s - f, u = f - (s - i) + (a - i), a = n[++l]) : (s = f + c, i = s - f, u = f - (s - i) + (c - i), c = o[++b]), f = s, 0 !== u && (r[h++] = u); + for (; l < t;) s = f + a, i = s - f, u = f - (s - i) + (a - i), a = n[++l], f = s, 0 !== u && (r[h++] = u); + for (; b < e;) s = f + c, i = s - f, u = f - (s - i) + (c - i), c = o[++b], f = s, 0 !== u && (r[h++] = u); + return 0 === f && 0 !== h || (r[h++] = f), h; + } + function f(t, n, o, r) { + let f, s, u, i, a, c, l, b, h, d, M; + l = e * o, d = l - (l - o), M = o - d; + let p = n[0]; + f = p * o, l = e * p, b = l - (l - p), h = p - b, u = h * M - (f - b * d - h * d - b * M); + let y = 0; + 0 !== u && (r[y++] = u); + for (let x = 1; x < t; x++) p = n[x], i = p * o, l = e * p, b = l - (l - p), h = p - b, a = h * M - (i - b * d - h * d - b * M), s = f + a, c = s - f, u = f - (s - c) + (a - c), 0 !== u && (r[y++] = u), f = i + s, u = s - (f - i), 0 !== u && (r[y++] = u); + return 0 === f && 0 !== y || (r[y++] = f), y; + } + function s(t) { + return new Float64Array(t); + } + const u = 3330669073875473e-31, + i = 32047474274603644e-47, + a = s(4), + c = s(4), + l = s(4), + b = s(4), + h = s(4), + d = s(4), + M = s(4), + p = s(4), + y = s(4), + x = s(8), + g = s(8), + m = s(8), + T = s(4), + j = s(8), + w = s(8), + A = s(8), + F = s(12); + let k = s(192), + q = s(192); + function v(t, n, e) { + t = r(t, k, n, e, q); + const o = k; + return k = q, q = o, t; + } + function z(t, n, o, r, f, s, u, i) { + let a, c, l, b, h, d, M, p, y, x, g, m, T, j, w; + return 0 === t ? 0 === n ? (u[0] = 0, i[0] = 0, 1) : (w = -n, x = w * o, c = e * w, l = c - (c - w), b = w - l, c = e * o, h = c - (c - o), d = o - h, u[0] = b * d - (x - l * h - b * h - l * d), u[1] = x, x = n * f, c = e * n, l = c - (c - n), b = n - l, c = e * f, h = c - (c - f), d = f - h, i[0] = b * d - (x - l * h - b * h - l * d), i[1] = x, 2) : 0 === n ? (x = t * r, c = e * t, l = c - (c - t), b = t - l, c = e * r, h = c - (c - r), d = r - h, u[0] = b * d - (x - l * h - b * h - l * d), u[1] = x, w = -t, x = w * s, c = e * w, l = c - (c - w), b = w - l, c = e * s, h = c - (c - s), d = s - h, i[0] = b * d - (x - l * h - b * h - l * d), i[1] = x, 2) : (x = t * r, c = e * t, l = c - (c - t), b = t - l, c = e * r, h = c - (c - r), d = r - h, g = b * d - (x - l * h - b * h - l * d), m = n * o, c = e * n, l = c - (c - n), b = n - l, c = e * o, h = c - (c - o), d = o - h, T = b * d - (m - l * h - b * h - l * d), M = g - T, a = g - M, u[0] = g - (M + a) + (a - T), p = x + M, a = p - x, y = x - (p - a) + (M - a), M = y - m, a = y - M, u[1] = y - (M + a) + (a - m), j = p + M, a = j - p, u[2] = p - (j - a) + (M - a), u[3] = j, x = n * f, c = e * n, l = c - (c - n), b = n - l, c = e * f, h = c - (c - f), d = f - h, g = b * d - (x - l * h - b * h - l * d), m = t * s, c = e * t, l = c - (c - t), b = t - l, c = e * s, h = c - (c - s), d = s - h, T = b * d - (m - l * h - b * h - l * d), M = g - T, a = g - M, i[0] = g - (M + a) + (a - T), p = x + M, a = p - x, y = x - (p - a) + (M - a), M = y - m, a = y - M, i[1] = y - (M + a) + (a - m), j = p + M, a = j - p, i[2] = p - (j - a) + (M - a), i[3] = j, 4); + } + function B(t, n, o, r, f) { + let s, u, i, a, c, l, b, h, d, M, p, y, x; + return p = n * o, u = e * n, i = u - (u - n), a = n - i, u = e * o, c = u - (u - o), l = o - c, y = a * l - (p - i * c - a * c - i * l), u = e * r, c = u - (u - r), l = r - c, b = y * r, u = e * y, i = u - (u - y), a = y - i, T[0] = a * l - (b - i * c - a * c - i * l), h = p * r, u = e * p, i = u - (u - p), a = p - i, M = a * l - (h - i * c - a * c - i * l), d = b + M, s = d - b, T[1] = b - (d - s) + (M - s), x = h + d, T[2] = d - (x - h), T[3] = x, t = v(t, 4, T), 0 !== f && (u = e * f, c = u - (u - f), l = f - c, b = y * f, u = e * y, i = u - (u - y), a = y - i, T[0] = a * l - (b - i * c - a * c - i * l), h = p * f, u = e * p, i = u - (u - p), a = p - i, M = a * l - (h - i * c - a * c - i * l), d = b + M, s = d - b, T[1] = b - (d - s) + (M - s), x = h + d, T[2] = d - (x - h), T[3] = x, t = v(t, 4, T)), t; + } + t.orient3d = function (t, n, s, T, q, C, D, E, G, H, I, J) { + const K = t - H, + L = T - H, + N = D - H, + O = n - I, + P = q - I, + Q = E - I, + R = s - J, + S = C - J, + U = G - J, + V = L * Q, + W = N * P, + X = N * O, + Y = K * Q, + Z = K * P, + $ = L * O, + _ = R * (V - W) + S * (X - Y) + U * (Z - $), + tt = (Math.abs(V) + Math.abs(W)) * Math.abs(R) + (Math.abs(X) + Math.abs(Y)) * Math.abs(S) + (Math.abs(Z) + Math.abs($)) * Math.abs(U), + nt = 7771561172376103e-31 * tt; + return _ > nt || -_ > nt ? _ : function (t, n, s, T, q, C, D, E, G, H, I, J, K) { + let L, N, O, P, Q, R, S, U, V, W, X, Y, Z, $, _, tt, nt, et, ot, rt, ft, st, ut, it; + const at = t - H, + ct = T - H, + lt = D - H, + bt = n - I, + ht = q - I, + dt = E - I, + Mt = s - J, + pt = C - J, + yt = G - J; + rt = ct * dt, Y = e * ct, Z = Y - (Y - ct), $ = ct - Z, Y = e * dt, _ = Y - (Y - dt), tt = dt - _, ft = $ * tt - (rt - Z * _ - $ * _ - Z * tt), st = lt * ht, Y = e * lt, Z = Y - (Y - lt), $ = lt - Z, Y = e * ht, _ = Y - (Y - ht), tt = ht - _, ut = $ * tt - (st - Z * _ - $ * _ - Z * tt), nt = ft - ut, X = ft - nt, a[0] = ft - (nt + X) + (X - ut), et = rt + nt, X = et - rt, ot = rt - (et - X) + (nt - X), nt = ot - st, X = ot - nt, a[1] = ot - (nt + X) + (X - st), it = et + nt, X = it - et, a[2] = et - (it - X) + (nt - X), a[3] = it, rt = lt * bt, Y = e * lt, Z = Y - (Y - lt), $ = lt - Z, Y = e * bt, _ = Y - (Y - bt), tt = bt - _, ft = $ * tt - (rt - Z * _ - $ * _ - Z * tt), st = at * dt, Y = e * at, Z = Y - (Y - at), $ = at - Z, Y = e * dt, _ = Y - (Y - dt), tt = dt - _, ut = $ * tt - (st - Z * _ - $ * _ - Z * tt), nt = ft - ut, X = ft - nt, c[0] = ft - (nt + X) + (X - ut), et = rt + nt, X = et - rt, ot = rt - (et - X) + (nt - X), nt = ot - st, X = ot - nt, c[1] = ot - (nt + X) + (X - st), it = et + nt, X = it - et, c[2] = et - (it - X) + (nt - X), c[3] = it, rt = at * ht, Y = e * at, Z = Y - (Y - at), $ = at - Z, Y = e * ht, _ = Y - (Y - ht), tt = ht - _, ft = $ * tt - (rt - Z * _ - $ * _ - Z * tt), st = ct * bt, Y = e * ct, Z = Y - (Y - ct), $ = ct - Z, Y = e * bt, _ = Y - (Y - bt), tt = bt - _, ut = $ * tt - (st - Z * _ - $ * _ - Z * tt), nt = ft - ut, X = ft - nt, l[0] = ft - (nt + X) + (X - ut), et = rt + nt, X = et - rt, ot = rt - (et - X) + (nt - X), nt = ot - st, X = ot - nt, l[1] = ot - (nt + X) + (X - st), it = et + nt, X = it - et, l[2] = et - (it - X) + (nt - X), l[3] = it, L = r(r(f(4, a, Mt, j), j, f(4, c, pt, w), w, A), A, f(4, l, yt, j), j, k); + let xt = function (t, n) { + let e = n[0]; + for (let o = 1; o < t; o++) e += n[o]; + return e; + }(L, k), + gt = u * K; + if (xt >= gt || -xt >= gt) return xt; + if (X = t - at, N = t - (at + X) + (X - H), X = T - ct, O = T - (ct + X) + (X - H), X = D - lt, P = D - (lt + X) + (X - H), X = n - bt, Q = n - (bt + X) + (X - I), X = q - ht, R = q - (ht + X) + (X - I), X = E - dt, S = E - (dt + X) + (X - I), X = s - Mt, U = s - (Mt + X) + (X - J), X = C - pt, V = C - (pt + X) + (X - J), X = G - yt, W = G - (yt + X) + (X - J), 0 === N && 0 === O && 0 === P && 0 === Q && 0 === R && 0 === S && 0 === U && 0 === V && 0 === W) return xt; + if (gt = i * K + o * Math.abs(xt), xt += Mt * (ct * S + dt * O - (ht * P + lt * R)) + U * (ct * dt - ht * lt) + pt * (lt * Q + bt * P - (dt * N + at * S)) + V * (lt * bt - dt * at) + yt * (at * R + ht * N - (bt * O + ct * Q)) + W * (at * ht - bt * ct), xt >= gt || -xt >= gt) return xt; + const mt = z(N, Q, ct, ht, lt, dt, b, h), + Tt = z(O, R, lt, dt, at, bt, d, M), + jt = z(P, S, at, bt, ct, ht, p, y), + wt = r(Tt, d, jt, y, x); + L = v(L, f(wt, x, Mt, A), A); + const At = r(jt, p, mt, h, g); + L = v(L, f(At, g, pt, A), A); + const Ft = r(mt, b, Tt, M, m); + return L = v(L, f(Ft, m, yt, A), A), 0 !== U && (L = v(L, f(4, a, U, F), F), L = v(L, f(wt, x, U, A), A)), 0 !== V && (L = v(L, f(4, c, V, F), F), L = v(L, f(At, g, V, A), A)), 0 !== W && (L = v(L, f(4, l, W, F), F), L = v(L, f(Ft, m, W, A), A)), 0 !== N && (0 !== R && (L = B(L, N, R, yt, W)), 0 !== S && (L = B(L, -N, S, pt, V))), 0 !== O && (0 !== S && (L = B(L, O, S, Mt, U)), 0 !== Q && (L = B(L, -O, Q, yt, W))), 0 !== P && (0 !== Q && (L = B(L, P, Q, pt, V)), 0 !== R && (L = B(L, -P, R, Mt, U))), k[L - 1]; + }(t, n, s, T, q, C, D, E, G, H, I, J, tt); + }, t.orient3dfast = function (t, n, e, o, r, f, s, u, i, a, c, l) { + const b = n - c, + h = r - c, + d = u - c, + M = e - l, + p = f - l, + y = i - l; + return (t - a) * (h * y - p * d) + (o - a) * (d * M - y * b) + (s - a) * (b * p - M * h); + }; +}); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/predicates.js b/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/predicates.js new file mode 100644 index 000000000000..9373065fa391 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/predicates.js @@ -0,0 +1,2073 @@ +"use strict"; + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.predicates = {})); +})(this, function (exports) { + 'use strict'; + + const epsilon = 1.1102230246251565e-16; + const splitter = 134217729; + const resulterrbound = (3 + 8 * epsilon) * epsilon; + + // fast_expansion_sum_zeroelim routine from oritinal code + function sum(elen, e, flen, f, h) { + let Q, Qnew, hh, bvirt; + let enow = e[0]; + let fnow = f[0]; + let eindex = 0; + let findex = 0; + if (fnow > enow === fnow > -enow) { + Q = enow; + enow = e[++eindex]; + } else { + Q = fnow; + fnow = f[++findex]; + } + let hindex = 0; + if (eindex < elen && findex < flen) { + if (fnow > enow === fnow > -enow) { + Qnew = enow + Q; + hh = Q - (Qnew - enow); + enow = e[++eindex]; + } else { + Qnew = fnow + Q; + hh = Q - (Qnew - fnow); + fnow = f[++findex]; + } + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + while (eindex < elen && findex < flen) { + if (fnow > enow === fnow > -enow) { + Qnew = Q + enow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (enow - bvirt); + enow = e[++eindex]; + } else { + Qnew = Q + fnow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (fnow - bvirt); + fnow = f[++findex]; + } + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + } + while (eindex < elen) { + Qnew = Q + enow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (enow - bvirt); + enow = e[++eindex]; + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + while (findex < flen) { + Qnew = Q + fnow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (fnow - bvirt); + fnow = f[++findex]; + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + if (Q !== 0 || hindex === 0) { + h[hindex++] = Q; + } + return hindex; + } + function sum_three(alen, a, blen, b, clen, c, tmp, out) { + return sum(sum(alen, a, blen, b, tmp), tmp, clen, c, out); + } + + // scale_expansion_zeroelim routine from oritinal code + function scale(elen, e, b, h) { + let Q, sum, hh, product1, product0; + let bvirt, c, ahi, alo, bhi, blo; + c = splitter * b; + bhi = c - (c - b); + blo = b - bhi; + let enow = e[0]; + Q = enow * b; + c = splitter * enow; + ahi = c - (c - enow); + alo = enow - ahi; + hh = alo * blo - (Q - ahi * bhi - alo * bhi - ahi * blo); + let hindex = 0; + if (hh !== 0) { + h[hindex++] = hh; + } + for (let i = 1; i < elen; i++) { + enow = e[i]; + product1 = enow * b; + c = splitter * enow; + ahi = c - (c - enow); + alo = enow - ahi; + product0 = alo * blo - (product1 - ahi * bhi - alo * bhi - ahi * blo); + sum = Q + product0; + bvirt = sum - Q; + hh = Q - (sum - bvirt) + (product0 - bvirt); + if (hh !== 0) { + h[hindex++] = hh; + } + Q = product1 + sum; + hh = sum - (Q - product1); + if (hh !== 0) { + h[hindex++] = hh; + } + } + if (Q !== 0 || hindex === 0) { + h[hindex++] = Q; + } + return hindex; + } + function negate(elen, e) { + for (let i = 0; i < elen; i++) e[i] = -e[i]; + return elen; + } + function estimate(elen, e) { + let Q = e[0]; + for (let i = 1; i < elen; i++) Q += e[i]; + return Q; + } + function vec(n) { + return new Float64Array(n); + } + const ccwerrboundA = (3 + 16 * epsilon) * epsilon; + const ccwerrboundB = (2 + 12 * epsilon) * epsilon; + const ccwerrboundC = (9 + 64 * epsilon) * epsilon * epsilon; + const B = vec(4); + const C1 = vec(8); + const C2 = vec(12); + const D = vec(16); + const u$2 = vec(4); + function orient2dadapt(ax, ay, bx, by, cx, cy, detsum) { + let acxtail, acytail, bcxtail, bcytail; + let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3; + const acx = ax - cx; + const bcx = bx - cx; + const acy = ay - cy; + const bcy = by - cy; + s1 = acx * bcy; + c = splitter * acx; + ahi = c - (c - acx); + alo = acx - ahi; + c = splitter * bcy; + bhi = c - (c - bcy); + blo = bcy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = acy * bcx; + c = splitter * acy; + ahi = c - (c - acy); + alo = acy - ahi; + c = splitter * bcx; + bhi = c - (c - bcx); + blo = bcx - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + B[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + B[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + B[2] = _j - (u3 - bvirt) + (_i - bvirt); + B[3] = u3; + let det = estimate(4, B); + let errbound = ccwerrboundB * detsum; + if (det >= errbound || -det >= errbound) { + return det; + } + bvirt = ax - acx; + acxtail = ax - (acx + bvirt) + (bvirt - cx); + bvirt = bx - bcx; + bcxtail = bx - (bcx + bvirt) + (bvirt - cx); + bvirt = ay - acy; + acytail = ay - (acy + bvirt) + (bvirt - cy); + bvirt = by - bcy; + bcytail = by - (bcy + bvirt) + (bvirt - cy); + if (acxtail === 0 && acytail === 0 && bcxtail === 0 && bcytail === 0) { + return det; + } + errbound = ccwerrboundC * detsum + resulterrbound * Math.abs(det); + det += acx * bcytail + bcy * acxtail - (acy * bcxtail + bcx * acytail); + if (det >= errbound || -det >= errbound) return det; + s1 = acxtail * bcy; + c = splitter * acxtail; + ahi = c - (c - acxtail); + alo = acxtail - ahi; + c = splitter * bcy; + bhi = c - (c - bcy); + blo = bcy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = acytail * bcx; + c = splitter * acytail; + ahi = c - (c - acytail); + alo = acytail - ahi; + c = splitter * bcx; + bhi = c - (c - bcx); + blo = bcx - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + u$2[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + u$2[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + u$2[2] = _j - (u3 - bvirt) + (_i - bvirt); + u$2[3] = u3; + const C1len = sum(4, B, 4, u$2, C1); + s1 = acx * bcytail; + c = splitter * acx; + ahi = c - (c - acx); + alo = acx - ahi; + c = splitter * bcytail; + bhi = c - (c - bcytail); + blo = bcytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = acy * bcxtail; + c = splitter * acy; + ahi = c - (c - acy); + alo = acy - ahi; + c = splitter * bcxtail; + bhi = c - (c - bcxtail); + blo = bcxtail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + u$2[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + u$2[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + u$2[2] = _j - (u3 - bvirt) + (_i - bvirt); + u$2[3] = u3; + const C2len = sum(C1len, C1, 4, u$2, C2); + s1 = acxtail * bcytail; + c = splitter * acxtail; + ahi = c - (c - acxtail); + alo = acxtail - ahi; + c = splitter * bcytail; + bhi = c - (c - bcytail); + blo = bcytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = acytail * bcxtail; + c = splitter * acytail; + ahi = c - (c - acytail); + alo = acytail - ahi; + c = splitter * bcxtail; + bhi = c - (c - bcxtail); + blo = bcxtail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + u$2[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + u$2[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + u$2[2] = _j - (u3 - bvirt) + (_i - bvirt); + u$2[3] = u3; + const Dlen = sum(C2len, C2, 4, u$2, D); + return D[Dlen - 1]; + } + function orient2d(ax, ay, bx, by, cx, cy) { + const detleft = (ay - cy) * (bx - cx); + const detright = (ax - cx) * (by - cy); + const det = detleft - detright; + const detsum = Math.abs(detleft + detright); + if (Math.abs(det) >= ccwerrboundA * detsum) return det; + return -orient2dadapt(ax, ay, bx, by, cx, cy, detsum); + } + function orient2dfast(ax, ay, bx, by, cx, cy) { + return (ay - cy) * (bx - cx) - (ax - cx) * (by - cy); + } + const o3derrboundA = (7 + 56 * epsilon) * epsilon; + const o3derrboundB = (3 + 28 * epsilon) * epsilon; + const o3derrboundC = (26 + 288 * epsilon) * epsilon * epsilon; + const bc$2 = vec(4); + const ca$1 = vec(4); + const ab$2 = vec(4); + const at_b = vec(4); + const at_c = vec(4); + const bt_c = vec(4); + const bt_a = vec(4); + const ct_a = vec(4); + const ct_b = vec(4); + const bct$1 = vec(8); + const cat$1 = vec(8); + const abt$1 = vec(8); + const u$1 = vec(4); + const _8$2 = vec(8); + const _8b$1 = vec(8); + const _16$2 = vec(8); + const _12 = vec(12); + let fin$2 = vec(192); + let fin2$1 = vec(192); + function finadd$1(finlen, alen, a) { + finlen = sum(finlen, fin$2, alen, a, fin2$1); + const tmp = fin$2; + fin$2 = fin2$1; + fin2$1 = tmp; + return finlen; + } + function tailinit(xtail, ytail, ax, ay, bx, by, a, b) { + let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3, negate; + if (xtail === 0) { + if (ytail === 0) { + a[0] = 0; + b[0] = 0; + return 1; + } else { + negate = -ytail; + s1 = negate * ax; + c = splitter * negate; + ahi = c - (c - negate); + alo = negate - ahi; + c = splitter * ax; + bhi = c - (c - ax); + blo = ax - bhi; + a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + a[1] = s1; + s1 = ytail * bx; + c = splitter * ytail; + ahi = c - (c - ytail); + alo = ytail - ahi; + c = splitter * bx; + bhi = c - (c - bx); + blo = bx - bhi; + b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + b[1] = s1; + return 2; + } + } else { + if (ytail === 0) { + s1 = xtail * ay; + c = splitter * xtail; + ahi = c - (c - xtail); + alo = xtail - ahi; + c = splitter * ay; + bhi = c - (c - ay); + blo = ay - bhi; + a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + a[1] = s1; + negate = -xtail; + s1 = negate * by; + c = splitter * negate; + ahi = c - (c - negate); + alo = negate - ahi; + c = splitter * by; + bhi = c - (c - by); + blo = by - bhi; + b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + b[1] = s1; + return 2; + } else { + s1 = xtail * ay; + c = splitter * xtail; + ahi = c - (c - xtail); + alo = xtail - ahi; + c = splitter * ay; + bhi = c - (c - ay); + blo = ay - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = ytail * ax; + c = splitter * ytail; + ahi = c - (c - ytail); + alo = ytail - ahi; + c = splitter * ax; + bhi = c - (c - ax); + blo = ax - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + a[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + a[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + a[2] = _j - (u3 - bvirt) + (_i - bvirt); + a[3] = u3; + s1 = ytail * bx; + c = splitter * ytail; + ahi = c - (c - ytail); + alo = ytail - ahi; + c = splitter * bx; + bhi = c - (c - bx); + blo = bx - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = xtail * by; + c = splitter * xtail; + ahi = c - (c - xtail); + alo = xtail - ahi; + c = splitter * by; + bhi = c - (c - by); + blo = by - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + b[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + b[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + b[2] = _j - (u3 - bvirt) + (_i - bvirt); + b[3] = u3; + return 4; + } + } + } + function tailadd(finlen, a, b, k, z) { + let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, u3; + s1 = a * b; + c = splitter * a; + ahi = c - (c - a); + alo = a - ahi; + c = splitter * b; + bhi = c - (c - b); + blo = b - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + c = splitter * k; + bhi = c - (c - k); + blo = k - bhi; + _i = s0 * k; + c = splitter * s0; + ahi = c - (c - s0); + alo = s0 - ahi; + u$1[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo); + _j = s1 * k; + c = splitter * s1; + ahi = c - (c - s1); + alo = s1 - ahi; + _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo); + _k = _i + _0; + bvirt = _k - _i; + u$1[1] = _i - (_k - bvirt) + (_0 - bvirt); + u3 = _j + _k; + u$1[2] = _k - (u3 - _j); + u$1[3] = u3; + finlen = finadd$1(finlen, 4, u$1); + if (z !== 0) { + c = splitter * z; + bhi = c - (c - z); + blo = z - bhi; + _i = s0 * z; + c = splitter * s0; + ahi = c - (c - s0); + alo = s0 - ahi; + u$1[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo); + _j = s1 * z; + c = splitter * s1; + ahi = c - (c - s1); + alo = s1 - ahi; + _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo); + _k = _i + _0; + bvirt = _k - _i; + u$1[1] = _i - (_k - bvirt) + (_0 - bvirt); + u3 = _j + _k; + u$1[2] = _k - (u3 - _j); + u$1[3] = u3; + finlen = finadd$1(finlen, 4, u$1); + } + return finlen; + } + function orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent) { + let finlen; + let adxtail, bdxtail, cdxtail; + let adytail, bdytail, cdytail; + let adztail, bdztail, cdztail; + let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3; + const adx = ax - dx; + const bdx = bx - dx; + const cdx = cx - dx; + const ady = ay - dy; + const bdy = by - dy; + const cdy = cy - dy; + const adz = az - dz; + const bdz = bz - dz; + const cdz = cz - dz; + s1 = bdx * cdy; + c = splitter * bdx; + ahi = c - (c - bdx); + alo = bdx - ahi; + c = splitter * cdy; + bhi = c - (c - cdy); + blo = cdy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cdx * bdy; + c = splitter * cdx; + ahi = c - (c - cdx); + alo = cdx - ahi; + c = splitter * bdy; + bhi = c - (c - bdy); + blo = bdy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + bc$2[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + bc$2[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + bc$2[2] = _j - (u3 - bvirt) + (_i - bvirt); + bc$2[3] = u3; + s1 = cdx * ady; + c = splitter * cdx; + ahi = c - (c - cdx); + alo = cdx - ahi; + c = splitter * ady; + bhi = c - (c - ady); + blo = ady - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = adx * cdy; + c = splitter * adx; + ahi = c - (c - adx); + alo = adx - ahi; + c = splitter * cdy; + bhi = c - (c - cdy); + blo = cdy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ca$1[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ca$1[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ca$1[2] = _j - (u3 - bvirt) + (_i - bvirt); + ca$1[3] = u3; + s1 = adx * bdy; + c = splitter * adx; + ahi = c - (c - adx); + alo = adx - ahi; + c = splitter * bdy; + bhi = c - (c - bdy); + blo = bdy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bdx * ady; + c = splitter * bdx; + ahi = c - (c - bdx); + alo = bdx - ahi; + c = splitter * ady; + bhi = c - (c - ady); + blo = ady - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ab$2[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ab$2[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ab$2[2] = _j - (u3 - bvirt) + (_i - bvirt); + ab$2[3] = u3; + finlen = sum(sum(scale(4, bc$2, adz, _8$2), _8$2, scale(4, ca$1, bdz, _8b$1), _8b$1, _16$2), _16$2, scale(4, ab$2, cdz, _8$2), _8$2, fin$2); + let det = estimate(finlen, fin$2); + let errbound = o3derrboundB * permanent; + if (det >= errbound || -det >= errbound) { + return det; + } + bvirt = ax - adx; + adxtail = ax - (adx + bvirt) + (bvirt - dx); + bvirt = bx - bdx; + bdxtail = bx - (bdx + bvirt) + (bvirt - dx); + bvirt = cx - cdx; + cdxtail = cx - (cdx + bvirt) + (bvirt - dx); + bvirt = ay - ady; + adytail = ay - (ady + bvirt) + (bvirt - dy); + bvirt = by - bdy; + bdytail = by - (bdy + bvirt) + (bvirt - dy); + bvirt = cy - cdy; + cdytail = cy - (cdy + bvirt) + (bvirt - dy); + bvirt = az - adz; + adztail = az - (adz + bvirt) + (bvirt - dz); + bvirt = bz - bdz; + bdztail = bz - (bdz + bvirt) + (bvirt - dz); + bvirt = cz - cdz; + cdztail = cz - (cdz + bvirt) + (bvirt - dz); + if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 && adytail === 0 && bdytail === 0 && cdytail === 0 && adztail === 0 && bdztail === 0 && cdztail === 0) { + return det; + } + errbound = o3derrboundC * permanent + resulterrbound * Math.abs(det); + det += adz * (bdx * cdytail + cdy * bdxtail - (bdy * cdxtail + cdx * bdytail)) + adztail * (bdx * cdy - bdy * cdx) + bdz * (cdx * adytail + ady * cdxtail - (cdy * adxtail + adx * cdytail)) + bdztail * (cdx * ady - cdy * adx) + cdz * (adx * bdytail + bdy * adxtail - (ady * bdxtail + bdx * adytail)) + cdztail * (adx * bdy - ady * bdx); + if (det >= errbound || -det >= errbound) { + return det; + } + const at_len = tailinit(adxtail, adytail, bdx, bdy, cdx, cdy, at_b, at_c); + const bt_len = tailinit(bdxtail, bdytail, cdx, cdy, adx, ady, bt_c, bt_a); + const ct_len = tailinit(cdxtail, cdytail, adx, ady, bdx, bdy, ct_a, ct_b); + const bctlen = sum(bt_len, bt_c, ct_len, ct_b, bct$1); + finlen = finadd$1(finlen, scale(bctlen, bct$1, adz, _16$2), _16$2); + const catlen = sum(ct_len, ct_a, at_len, at_c, cat$1); + finlen = finadd$1(finlen, scale(catlen, cat$1, bdz, _16$2), _16$2); + const abtlen = sum(at_len, at_b, bt_len, bt_a, abt$1); + finlen = finadd$1(finlen, scale(abtlen, abt$1, cdz, _16$2), _16$2); + if (adztail !== 0) { + finlen = finadd$1(finlen, scale(4, bc$2, adztail, _12), _12); + finlen = finadd$1(finlen, scale(bctlen, bct$1, adztail, _16$2), _16$2); + } + if (bdztail !== 0) { + finlen = finadd$1(finlen, scale(4, ca$1, bdztail, _12), _12); + finlen = finadd$1(finlen, scale(catlen, cat$1, bdztail, _16$2), _16$2); + } + if (cdztail !== 0) { + finlen = finadd$1(finlen, scale(4, ab$2, cdztail, _12), _12); + finlen = finadd$1(finlen, scale(abtlen, abt$1, cdztail, _16$2), _16$2); + } + if (adxtail !== 0) { + if (bdytail !== 0) { + finlen = tailadd(finlen, adxtail, bdytail, cdz, cdztail); + } + if (cdytail !== 0) { + finlen = tailadd(finlen, -adxtail, cdytail, bdz, bdztail); + } + } + if (bdxtail !== 0) { + if (cdytail !== 0) { + finlen = tailadd(finlen, bdxtail, cdytail, adz, adztail); + } + if (adytail !== 0) { + finlen = tailadd(finlen, -bdxtail, adytail, cdz, cdztail); + } + } + if (cdxtail !== 0) { + if (adytail !== 0) { + finlen = tailadd(finlen, cdxtail, adytail, bdz, bdztail); + } + if (bdytail !== 0) { + finlen = tailadd(finlen, -cdxtail, bdytail, adz, adztail); + } + } + return fin$2[finlen - 1]; + } + function orient3d(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) { + const adx = ax - dx; + const bdx = bx - dx; + const cdx = cx - dx; + const ady = ay - dy; + const bdy = by - dy; + const cdy = cy - dy; + const adz = az - dz; + const bdz = bz - dz; + const cdz = cz - dz; + const bdxcdy = bdx * cdy; + const cdxbdy = cdx * bdy; + const cdxady = cdx * ady; + const adxcdy = adx * cdy; + const adxbdy = adx * bdy; + const bdxady = bdx * ady; + const det = adz * (bdxcdy - cdxbdy) + bdz * (cdxady - adxcdy) + cdz * (adxbdy - bdxady); + const permanent = (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * Math.abs(adz) + (Math.abs(cdxady) + Math.abs(adxcdy)) * Math.abs(bdz) + (Math.abs(adxbdy) + Math.abs(bdxady)) * Math.abs(cdz); + const errbound = o3derrboundA * permanent; + if (det > errbound || -det > errbound) { + return det; + } + return orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent); + } + function orient3dfast(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) { + const adx = ax - dx; + const bdx = bx - dx; + const cdx = cx - dx; + const ady = ay - dy; + const bdy = by - dy; + const cdy = cy - dy; + const adz = az - dz; + const bdz = bz - dz; + const cdz = cz - dz; + return adx * (bdy * cdz - bdz * cdy) + bdx * (cdy * adz - cdz * ady) + cdx * (ady * bdz - adz * bdy); + } + const iccerrboundA = (10 + 96 * epsilon) * epsilon; + const iccerrboundB = (4 + 48 * epsilon) * epsilon; + const iccerrboundC = (44 + 576 * epsilon) * epsilon * epsilon; + const bc$1 = vec(4); + const ca = vec(4); + const ab$1 = vec(4); + const aa = vec(4); + const bb = vec(4); + const cc = vec(4); + const u = vec(4); + const v = vec(4); + const axtbc = vec(8); + const aytbc = vec(8); + const bxtca = vec(8); + const bytca = vec(8); + const cxtab = vec(8); + const cytab = vec(8); + const abt = vec(8); + const bct = vec(8); + const cat = vec(8); + const abtt = vec(4); + const bctt = vec(4); + const catt = vec(4); + const _8$1 = vec(8); + const _16$1 = vec(16); + const _16b = vec(16); + const _16c = vec(16); + const _32 = vec(32); + const _32b = vec(32); + const _48$1 = vec(48); + const _64 = vec(64); + let fin$1 = vec(1152); + let fin2 = vec(1152); + function finadd(finlen, a, alen) { + finlen = sum(finlen, fin$1, a, alen, fin2); + const tmp = fin$1; + fin$1 = fin2; + fin2 = tmp; + return finlen; + } + function incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent) { + let finlen; + let adxtail, bdxtail, cdxtail, adytail, bdytail, cdytail; + let axtbclen, aytbclen, bxtcalen, bytcalen, cxtablen, cytablen; + let abtlen, bctlen, catlen; + let abttlen, bcttlen, cattlen; + let n1, n0; + let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3; + const adx = ax - dx; + const bdx = bx - dx; + const cdx = cx - dx; + const ady = ay - dy; + const bdy = by - dy; + const cdy = cy - dy; + s1 = bdx * cdy; + c = splitter * bdx; + ahi = c - (c - bdx); + alo = bdx - ahi; + c = splitter * cdy; + bhi = c - (c - cdy); + blo = cdy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cdx * bdy; + c = splitter * cdx; + ahi = c - (c - cdx); + alo = cdx - ahi; + c = splitter * bdy; + bhi = c - (c - bdy); + blo = bdy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + bc$1[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + bc$1[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + bc$1[2] = _j - (u3 - bvirt) + (_i - bvirt); + bc$1[3] = u3; + s1 = cdx * ady; + c = splitter * cdx; + ahi = c - (c - cdx); + alo = cdx - ahi; + c = splitter * ady; + bhi = c - (c - ady); + blo = ady - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = adx * cdy; + c = splitter * adx; + ahi = c - (c - adx); + alo = adx - ahi; + c = splitter * cdy; + bhi = c - (c - cdy); + blo = cdy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ca[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ca[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ca[2] = _j - (u3 - bvirt) + (_i - bvirt); + ca[3] = u3; + s1 = adx * bdy; + c = splitter * adx; + ahi = c - (c - adx); + alo = adx - ahi; + c = splitter * bdy; + bhi = c - (c - bdy); + blo = bdy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bdx * ady; + c = splitter * bdx; + ahi = c - (c - bdx); + alo = bdx - ahi; + c = splitter * ady; + bhi = c - (c - ady); + blo = ady - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ab$1[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ab$1[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ab$1[2] = _j - (u3 - bvirt) + (_i - bvirt); + ab$1[3] = u3; + finlen = sum(sum(sum(scale(scale(4, bc$1, adx, _8$1), _8$1, adx, _16$1), _16$1, scale(scale(4, bc$1, ady, _8$1), _8$1, ady, _16b), _16b, _32), _32, sum(scale(scale(4, ca, bdx, _8$1), _8$1, bdx, _16$1), _16$1, scale(scale(4, ca, bdy, _8$1), _8$1, bdy, _16b), _16b, _32b), _32b, _64), _64, sum(scale(scale(4, ab$1, cdx, _8$1), _8$1, cdx, _16$1), _16$1, scale(scale(4, ab$1, cdy, _8$1), _8$1, cdy, _16b), _16b, _32), _32, fin$1); + let det = estimate(finlen, fin$1); + let errbound = iccerrboundB * permanent; + if (det >= errbound || -det >= errbound) { + return det; + } + bvirt = ax - adx; + adxtail = ax - (adx + bvirt) + (bvirt - dx); + bvirt = ay - ady; + adytail = ay - (ady + bvirt) + (bvirt - dy); + bvirt = bx - bdx; + bdxtail = bx - (bdx + bvirt) + (bvirt - dx); + bvirt = by - bdy; + bdytail = by - (bdy + bvirt) + (bvirt - dy); + bvirt = cx - cdx; + cdxtail = cx - (cdx + bvirt) + (bvirt - dx); + bvirt = cy - cdy; + cdytail = cy - (cdy + bvirt) + (bvirt - dy); + if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 && adytail === 0 && bdytail === 0 && cdytail === 0) { + return det; + } + errbound = iccerrboundC * permanent + resulterrbound * Math.abs(det); + det += (adx * adx + ady * ady) * (bdx * cdytail + cdy * bdxtail - (bdy * cdxtail + cdx * bdytail)) + 2 * (adx * adxtail + ady * adytail) * (bdx * cdy - bdy * cdx) + ((bdx * bdx + bdy * bdy) * (cdx * adytail + ady * cdxtail - (cdy * adxtail + adx * cdytail)) + 2 * (bdx * bdxtail + bdy * bdytail) * (cdx * ady - cdy * adx)) + ((cdx * cdx + cdy * cdy) * (adx * bdytail + bdy * adxtail - (ady * bdxtail + bdx * adytail)) + 2 * (cdx * cdxtail + cdy * cdytail) * (adx * bdy - ady * bdx)); + if (det >= errbound || -det >= errbound) { + return det; + } + if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) { + s1 = adx * adx; + c = splitter * adx; + ahi = c - (c - adx); + alo = adx - ahi; + s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo); + t1 = ady * ady; + c = splitter * ady; + ahi = c - (c - ady); + alo = ady - ahi; + t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo); + _i = s0 + t0; + bvirt = _i - s0; + aa[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + aa[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + aa[2] = _j - (u3 - bvirt) + (_i - bvirt); + aa[3] = u3; + } + if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) { + s1 = bdx * bdx; + c = splitter * bdx; + ahi = c - (c - bdx); + alo = bdx - ahi; + s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo); + t1 = bdy * bdy; + c = splitter * bdy; + ahi = c - (c - bdy); + alo = bdy - ahi; + t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo); + _i = s0 + t0; + bvirt = _i - s0; + bb[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + bb[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + bb[2] = _j - (u3 - bvirt) + (_i - bvirt); + bb[3] = u3; + } + if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) { + s1 = cdx * cdx; + c = splitter * cdx; + ahi = c - (c - cdx); + alo = cdx - ahi; + s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo); + t1 = cdy * cdy; + c = splitter * cdy; + ahi = c - (c - cdy); + alo = cdy - ahi; + t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo); + _i = s0 + t0; + bvirt = _i - s0; + cc[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + cc[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + cc[2] = _j - (u3 - bvirt) + (_i - bvirt); + cc[3] = u3; + } + if (adxtail !== 0) { + axtbclen = scale(4, bc$1, adxtail, axtbc); + finlen = finadd(finlen, sum_three(scale(axtbclen, axtbc, 2 * adx, _16$1), _16$1, scale(scale(4, cc, adxtail, _8$1), _8$1, bdy, _16b), _16b, scale(scale(4, bb, adxtail, _8$1), _8$1, -cdy, _16c), _16c, _32, _48$1), _48$1); + } + if (adytail !== 0) { + aytbclen = scale(4, bc$1, adytail, aytbc); + finlen = finadd(finlen, sum_three(scale(aytbclen, aytbc, 2 * ady, _16$1), _16$1, scale(scale(4, bb, adytail, _8$1), _8$1, cdx, _16b), _16b, scale(scale(4, cc, adytail, _8$1), _8$1, -bdx, _16c), _16c, _32, _48$1), _48$1); + } + if (bdxtail !== 0) { + bxtcalen = scale(4, ca, bdxtail, bxtca); + finlen = finadd(finlen, sum_three(scale(bxtcalen, bxtca, 2 * bdx, _16$1), _16$1, scale(scale(4, aa, bdxtail, _8$1), _8$1, cdy, _16b), _16b, scale(scale(4, cc, bdxtail, _8$1), _8$1, -ady, _16c), _16c, _32, _48$1), _48$1); + } + if (bdytail !== 0) { + bytcalen = scale(4, ca, bdytail, bytca); + finlen = finadd(finlen, sum_three(scale(bytcalen, bytca, 2 * bdy, _16$1), _16$1, scale(scale(4, cc, bdytail, _8$1), _8$1, adx, _16b), _16b, scale(scale(4, aa, bdytail, _8$1), _8$1, -cdx, _16c), _16c, _32, _48$1), _48$1); + } + if (cdxtail !== 0) { + cxtablen = scale(4, ab$1, cdxtail, cxtab); + finlen = finadd(finlen, sum_three(scale(cxtablen, cxtab, 2 * cdx, _16$1), _16$1, scale(scale(4, bb, cdxtail, _8$1), _8$1, ady, _16b), _16b, scale(scale(4, aa, cdxtail, _8$1), _8$1, -bdy, _16c), _16c, _32, _48$1), _48$1); + } + if (cdytail !== 0) { + cytablen = scale(4, ab$1, cdytail, cytab); + finlen = finadd(finlen, sum_three(scale(cytablen, cytab, 2 * cdy, _16$1), _16$1, scale(scale(4, aa, cdytail, _8$1), _8$1, bdx, _16b), _16b, scale(scale(4, bb, cdytail, _8$1), _8$1, -adx, _16c), _16c, _32, _48$1), _48$1); + } + if (adxtail !== 0 || adytail !== 0) { + if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) { + s1 = bdxtail * cdy; + c = splitter * bdxtail; + ahi = c - (c - bdxtail); + alo = bdxtail - ahi; + c = splitter * cdy; + bhi = c - (c - cdy); + blo = cdy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bdx * cdytail; + c = splitter * bdx; + ahi = c - (c - bdx); + alo = bdx - ahi; + c = splitter * cdytail; + bhi = c - (c - cdytail); + blo = cdytail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 + t0; + bvirt = _i - s0; + u[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + u[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + u[2] = _j - (u3 - bvirt) + (_i - bvirt); + u[3] = u3; + s1 = cdxtail * -bdy; + c = splitter * cdxtail; + ahi = c - (c - cdxtail); + alo = cdxtail - ahi; + c = splitter * -bdy; + bhi = c - (c - -bdy); + blo = -bdy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cdx * -bdytail; + c = splitter * cdx; + ahi = c - (c - cdx); + alo = cdx - ahi; + c = splitter * -bdytail; + bhi = c - (c - -bdytail); + blo = -bdytail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 + t0; + bvirt = _i - s0; + v[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + v[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + v[2] = _j - (u3 - bvirt) + (_i - bvirt); + v[3] = u3; + bctlen = sum(4, u, 4, v, bct); + s1 = bdxtail * cdytail; + c = splitter * bdxtail; + ahi = c - (c - bdxtail); + alo = bdxtail - ahi; + c = splitter * cdytail; + bhi = c - (c - cdytail); + blo = cdytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cdxtail * bdytail; + c = splitter * cdxtail; + ahi = c - (c - cdxtail); + alo = cdxtail - ahi; + c = splitter * bdytail; + bhi = c - (c - bdytail); + blo = bdytail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + bctt[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + bctt[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + bctt[2] = _j - (u3 - bvirt) + (_i - bvirt); + bctt[3] = u3; + bcttlen = 4; + } else { + bct[0] = 0; + bctlen = 1; + bctt[0] = 0; + bcttlen = 1; + } + if (adxtail !== 0) { + const len = scale(bctlen, bct, adxtail, _16c); + finlen = finadd(finlen, sum(scale(axtbclen, axtbc, adxtail, _16$1), _16$1, scale(len, _16c, 2 * adx, _32), _32, _48$1), _48$1); + const len2 = scale(bcttlen, bctt, adxtail, _8$1); + finlen = finadd(finlen, sum_three(scale(len2, _8$1, 2 * adx, _16$1), _16$1, scale(len2, _8$1, adxtail, _16b), _16b, scale(len, _16c, adxtail, _32), _32, _32b, _64), _64); + if (bdytail !== 0) { + finlen = finadd(finlen, scale(scale(4, cc, adxtail, _8$1), _8$1, bdytail, _16$1), _16$1); + } + if (cdytail !== 0) { + finlen = finadd(finlen, scale(scale(4, bb, -adxtail, _8$1), _8$1, cdytail, _16$1), _16$1); + } + } + if (adytail !== 0) { + const len = scale(bctlen, bct, adytail, _16c); + finlen = finadd(finlen, sum(scale(aytbclen, aytbc, adytail, _16$1), _16$1, scale(len, _16c, 2 * ady, _32), _32, _48$1), _48$1); + const len2 = scale(bcttlen, bctt, adytail, _8$1); + finlen = finadd(finlen, sum_three(scale(len2, _8$1, 2 * ady, _16$1), _16$1, scale(len2, _8$1, adytail, _16b), _16b, scale(len, _16c, adytail, _32), _32, _32b, _64), _64); + } + } + if (bdxtail !== 0 || bdytail !== 0) { + if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) { + s1 = cdxtail * ady; + c = splitter * cdxtail; + ahi = c - (c - cdxtail); + alo = cdxtail - ahi; + c = splitter * ady; + bhi = c - (c - ady); + blo = ady - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cdx * adytail; + c = splitter * cdx; + ahi = c - (c - cdx); + alo = cdx - ahi; + c = splitter * adytail; + bhi = c - (c - adytail); + blo = adytail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 + t0; + bvirt = _i - s0; + u[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + u[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + u[2] = _j - (u3 - bvirt) + (_i - bvirt); + u[3] = u3; + n1 = -cdy; + n0 = -cdytail; + s1 = adxtail * n1; + c = splitter * adxtail; + ahi = c - (c - adxtail); + alo = adxtail - ahi; + c = splitter * n1; + bhi = c - (c - n1); + blo = n1 - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = adx * n0; + c = splitter * adx; + ahi = c - (c - adx); + alo = adx - ahi; + c = splitter * n0; + bhi = c - (c - n0); + blo = n0 - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 + t0; + bvirt = _i - s0; + v[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + v[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + v[2] = _j - (u3 - bvirt) + (_i - bvirt); + v[3] = u3; + catlen = sum(4, u, 4, v, cat); + s1 = cdxtail * adytail; + c = splitter * cdxtail; + ahi = c - (c - cdxtail); + alo = cdxtail - ahi; + c = splitter * adytail; + bhi = c - (c - adytail); + blo = adytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = adxtail * cdytail; + c = splitter * adxtail; + ahi = c - (c - adxtail); + alo = adxtail - ahi; + c = splitter * cdytail; + bhi = c - (c - cdytail); + blo = cdytail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + catt[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + catt[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + catt[2] = _j - (u3 - bvirt) + (_i - bvirt); + catt[3] = u3; + cattlen = 4; + } else { + cat[0] = 0; + catlen = 1; + catt[0] = 0; + cattlen = 1; + } + if (bdxtail !== 0) { + const len = scale(catlen, cat, bdxtail, _16c); + finlen = finadd(finlen, sum(scale(bxtcalen, bxtca, bdxtail, _16$1), _16$1, scale(len, _16c, 2 * bdx, _32), _32, _48$1), _48$1); + const len2 = scale(cattlen, catt, bdxtail, _8$1); + finlen = finadd(finlen, sum_three(scale(len2, _8$1, 2 * bdx, _16$1), _16$1, scale(len2, _8$1, bdxtail, _16b), _16b, scale(len, _16c, bdxtail, _32), _32, _32b, _64), _64); + if (cdytail !== 0) { + finlen = finadd(finlen, scale(scale(4, aa, bdxtail, _8$1), _8$1, cdytail, _16$1), _16$1); + } + if (adytail !== 0) { + finlen = finadd(finlen, scale(scale(4, cc, -bdxtail, _8$1), _8$1, adytail, _16$1), _16$1); + } + } + if (bdytail !== 0) { + const len = scale(catlen, cat, bdytail, _16c); + finlen = finadd(finlen, sum(scale(bytcalen, bytca, bdytail, _16$1), _16$1, scale(len, _16c, 2 * bdy, _32), _32, _48$1), _48$1); + const len2 = scale(cattlen, catt, bdytail, _8$1); + finlen = finadd(finlen, sum_three(scale(len2, _8$1, 2 * bdy, _16$1), _16$1, scale(len2, _8$1, bdytail, _16b), _16b, scale(len, _16c, bdytail, _32), _32, _32b, _64), _64); + } + } + if (cdxtail !== 0 || cdytail !== 0) { + if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) { + s1 = adxtail * bdy; + c = splitter * adxtail; + ahi = c - (c - adxtail); + alo = adxtail - ahi; + c = splitter * bdy; + bhi = c - (c - bdy); + blo = bdy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = adx * bdytail; + c = splitter * adx; + ahi = c - (c - adx); + alo = adx - ahi; + c = splitter * bdytail; + bhi = c - (c - bdytail); + blo = bdytail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 + t0; + bvirt = _i - s0; + u[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + u[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + u[2] = _j - (u3 - bvirt) + (_i - bvirt); + u[3] = u3; + n1 = -ady; + n0 = -adytail; + s1 = bdxtail * n1; + c = splitter * bdxtail; + ahi = c - (c - bdxtail); + alo = bdxtail - ahi; + c = splitter * n1; + bhi = c - (c - n1); + blo = n1 - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bdx * n0; + c = splitter * bdx; + ahi = c - (c - bdx); + alo = bdx - ahi; + c = splitter * n0; + bhi = c - (c - n0); + blo = n0 - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 + t0; + bvirt = _i - s0; + v[0] = s0 - (_i - bvirt) + (t0 - bvirt); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 + t1; + bvirt = _i - _0; + v[1] = _0 - (_i - bvirt) + (t1 - bvirt); + u3 = _j + _i; + bvirt = u3 - _j; + v[2] = _j - (u3 - bvirt) + (_i - bvirt); + v[3] = u3; + abtlen = sum(4, u, 4, v, abt); + s1 = adxtail * bdytail; + c = splitter * adxtail; + ahi = c - (c - adxtail); + alo = adxtail - ahi; + c = splitter * bdytail; + bhi = c - (c - bdytail); + blo = bdytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bdxtail * adytail; + c = splitter * bdxtail; + ahi = c - (c - bdxtail); + alo = bdxtail - ahi; + c = splitter * adytail; + bhi = c - (c - adytail); + blo = adytail - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + abtt[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + abtt[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + abtt[2] = _j - (u3 - bvirt) + (_i - bvirt); + abtt[3] = u3; + abttlen = 4; + } else { + abt[0] = 0; + abtlen = 1; + abtt[0] = 0; + abttlen = 1; + } + if (cdxtail !== 0) { + const len = scale(abtlen, abt, cdxtail, _16c); + finlen = finadd(finlen, sum(scale(cxtablen, cxtab, cdxtail, _16$1), _16$1, scale(len, _16c, 2 * cdx, _32), _32, _48$1), _48$1); + const len2 = scale(abttlen, abtt, cdxtail, _8$1); + finlen = finadd(finlen, sum_three(scale(len2, _8$1, 2 * cdx, _16$1), _16$1, scale(len2, _8$1, cdxtail, _16b), _16b, scale(len, _16c, cdxtail, _32), _32, _32b, _64), _64); + if (adytail !== 0) { + finlen = finadd(finlen, scale(scale(4, bb, cdxtail, _8$1), _8$1, adytail, _16$1), _16$1); + } + if (bdytail !== 0) { + finlen = finadd(finlen, scale(scale(4, aa, -cdxtail, _8$1), _8$1, bdytail, _16$1), _16$1); + } + } + if (cdytail !== 0) { + const len = scale(abtlen, abt, cdytail, _16c); + finlen = finadd(finlen, sum(scale(cytablen, cytab, cdytail, _16$1), _16$1, scale(len, _16c, 2 * cdy, _32), _32, _48$1), _48$1); + const len2 = scale(abttlen, abtt, cdytail, _8$1); + finlen = finadd(finlen, sum_three(scale(len2, _8$1, 2 * cdy, _16$1), _16$1, scale(len2, _8$1, cdytail, _16b), _16b, scale(len, _16c, cdytail, _32), _32, _32b, _64), _64); + } + } + return fin$1[finlen - 1]; + } + function incircle(ax, ay, bx, by, cx, cy, dx, dy) { + const adx = ax - dx; + const bdx = bx - dx; + const cdx = cx - dx; + const ady = ay - dy; + const bdy = by - dy; + const cdy = cy - dy; + const bdxcdy = bdx * cdy; + const cdxbdy = cdx * bdy; + const alift = adx * adx + ady * ady; + const cdxady = cdx * ady; + const adxcdy = adx * cdy; + const blift = bdx * bdx + bdy * bdy; + const adxbdy = adx * bdy; + const bdxady = bdx * ady; + const clift = cdx * cdx + cdy * cdy; + const det = alift * (bdxcdy - cdxbdy) + blift * (cdxady - adxcdy) + clift * (adxbdy - bdxady); + const permanent = (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * alift + (Math.abs(cdxady) + Math.abs(adxcdy)) * blift + (Math.abs(adxbdy) + Math.abs(bdxady)) * clift; + const errbound = iccerrboundA * permanent; + if (det > errbound || -det > errbound) { + return det; + } + return incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent); + } + function incirclefast(ax, ay, bx, by, cx, cy, dx, dy) { + const adx = ax - dx; + const ady = ay - dy; + const bdx = bx - dx; + const bdy = by - dy; + const cdx = cx - dx; + const cdy = cy - dy; + const abdet = adx * bdy - bdx * ady; + const bcdet = bdx * cdy - cdx * bdy; + const cadet = cdx * ady - adx * cdy; + const alift = adx * adx + ady * ady; + const blift = bdx * bdx + bdy * bdy; + const clift = cdx * cdx + cdy * cdy; + return alift * bcdet + blift * cadet + clift * abdet; + } + const isperrboundA = (16 + 224 * epsilon) * epsilon; + const isperrboundB = (5 + 72 * epsilon) * epsilon; + const isperrboundC = (71 + 1408 * epsilon) * epsilon * epsilon; + const ab = vec(4); + const bc = vec(4); + const cd = vec(4); + const de = vec(4); + const ea = vec(4); + const ac = vec(4); + const bd = vec(4); + const ce = vec(4); + const da = vec(4); + const eb = vec(4); + const abc = vec(24); + const bcd = vec(24); + const cde = vec(24); + const dea = vec(24); + const eab = vec(24); + const abd = vec(24); + const bce = vec(24); + const cda = vec(24); + const deb = vec(24); + const eac = vec(24); + const adet = vec(1152); + const bdet = vec(1152); + const cdet = vec(1152); + const ddet = vec(1152); + const edet = vec(1152); + const abdet = vec(2304); + const cddet = vec(2304); + const cdedet = vec(3456); + const deter = vec(5760); + const _8 = vec(8); + const _8b = vec(8); + const _8c = vec(8); + const _16 = vec(16); + const _24 = vec(24); + const _48 = vec(48); + const _48b = vec(48); + const _96 = vec(96); + const _192 = vec(192); + const _384x = vec(384); + const _384y = vec(384); + const _384z = vec(384); + const _768 = vec(768); + function sum_three_scale(a, b, c, az, bz, cz, out) { + return sum_three(scale(4, a, az, _8), _8, scale(4, b, bz, _8b), _8b, scale(4, c, cz, _8c), _8c, _16, out); + } + function liftexact(alen, a, blen, b, clen, c, dlen, d, x, y, z, out) { + const len = sum(sum(alen, a, blen, b, _48), _48, negate(sum(clen, c, dlen, d, _48b), _48b), _48b, _96); + return sum_three(scale(scale(len, _96, x, _192), _192, x, _384x), _384x, scale(scale(len, _96, y, _192), _192, y, _384y), _384y, scale(scale(len, _96, z, _192), _192, z, _384z), _384z, _768, out); + } + function insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) { + let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3; + s1 = ax * by; + c = splitter * ax; + ahi = c - (c - ax); + alo = ax - ahi; + c = splitter * by; + bhi = c - (c - by); + blo = by - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bx * ay; + c = splitter * bx; + ahi = c - (c - bx); + alo = bx - ahi; + c = splitter * ay; + bhi = c - (c - ay); + blo = ay - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ab[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ab[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ab[2] = _j - (u3 - bvirt) + (_i - bvirt); + ab[3] = u3; + s1 = bx * cy; + c = splitter * bx; + ahi = c - (c - bx); + alo = bx - ahi; + c = splitter * cy; + bhi = c - (c - cy); + blo = cy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cx * by; + c = splitter * cx; + ahi = c - (c - cx); + alo = cx - ahi; + c = splitter * by; + bhi = c - (c - by); + blo = by - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + bc[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + bc[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + bc[2] = _j - (u3 - bvirt) + (_i - bvirt); + bc[3] = u3; + s1 = cx * dy; + c = splitter * cx; + ahi = c - (c - cx); + alo = cx - ahi; + c = splitter * dy; + bhi = c - (c - dy); + blo = dy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = dx * cy; + c = splitter * dx; + ahi = c - (c - dx); + alo = dx - ahi; + c = splitter * cy; + bhi = c - (c - cy); + blo = cy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + cd[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + cd[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + cd[2] = _j - (u3 - bvirt) + (_i - bvirt); + cd[3] = u3; + s1 = dx * ey; + c = splitter * dx; + ahi = c - (c - dx); + alo = dx - ahi; + c = splitter * ey; + bhi = c - (c - ey); + blo = ey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = ex * dy; + c = splitter * ex; + ahi = c - (c - ex); + alo = ex - ahi; + c = splitter * dy; + bhi = c - (c - dy); + blo = dy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + de[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + de[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + de[2] = _j - (u3 - bvirt) + (_i - bvirt); + de[3] = u3; + s1 = ex * ay; + c = splitter * ex; + ahi = c - (c - ex); + alo = ex - ahi; + c = splitter * ay; + bhi = c - (c - ay); + blo = ay - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = ax * ey; + c = splitter * ax; + ahi = c - (c - ax); + alo = ax - ahi; + c = splitter * ey; + bhi = c - (c - ey); + blo = ey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ea[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ea[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ea[2] = _j - (u3 - bvirt) + (_i - bvirt); + ea[3] = u3; + s1 = ax * cy; + c = splitter * ax; + ahi = c - (c - ax); + alo = ax - ahi; + c = splitter * cy; + bhi = c - (c - cy); + blo = cy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cx * ay; + c = splitter * cx; + ahi = c - (c - cx); + alo = cx - ahi; + c = splitter * ay; + bhi = c - (c - ay); + blo = ay - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ac[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ac[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ac[2] = _j - (u3 - bvirt) + (_i - bvirt); + ac[3] = u3; + s1 = bx * dy; + c = splitter * bx; + ahi = c - (c - bx); + alo = bx - ahi; + c = splitter * dy; + bhi = c - (c - dy); + blo = dy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = dx * by; + c = splitter * dx; + ahi = c - (c - dx); + alo = dx - ahi; + c = splitter * by; + bhi = c - (c - by); + blo = by - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + bd[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + bd[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + bd[2] = _j - (u3 - bvirt) + (_i - bvirt); + bd[3] = u3; + s1 = cx * ey; + c = splitter * cx; + ahi = c - (c - cx); + alo = cx - ahi; + c = splitter * ey; + bhi = c - (c - ey); + blo = ey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = ex * cy; + c = splitter * ex; + ahi = c - (c - ex); + alo = ex - ahi; + c = splitter * cy; + bhi = c - (c - cy); + blo = cy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ce[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ce[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + ce[2] = _j - (u3 - bvirt) + (_i - bvirt); + ce[3] = u3; + s1 = dx * ay; + c = splitter * dx; + ahi = c - (c - dx); + alo = dx - ahi; + c = splitter * ay; + bhi = c - (c - ay); + blo = ay - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = ax * dy; + c = splitter * ax; + ahi = c - (c - ax); + alo = ax - ahi; + c = splitter * dy; + bhi = c - (c - dy); + blo = dy - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + da[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + da[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + da[2] = _j - (u3 - bvirt) + (_i - bvirt); + da[3] = u3; + s1 = ex * by; + c = splitter * ex; + ahi = c - (c - ex); + alo = ex - ahi; + c = splitter * by; + bhi = c - (c - by); + blo = by - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bx * ey; + c = splitter * bx; + ahi = c - (c - bx); + alo = bx - ahi; + c = splitter * ey; + bhi = c - (c - ey); + blo = ey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + eb[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + eb[1] = _0 - (_i + bvirt) + (bvirt - t1); + u3 = _j + _i; + bvirt = u3 - _j; + eb[2] = _j - (u3 - bvirt) + (_i - bvirt); + eb[3] = u3; + const abclen = sum_three_scale(ab, bc, ac, cz, az, -bz, abc); + const bcdlen = sum_three_scale(bc, cd, bd, dz, bz, -cz, bcd); + const cdelen = sum_three_scale(cd, de, ce, ez, cz, -dz, cde); + const dealen = sum_three_scale(de, ea, da, az, dz, -ez, dea); + const eablen = sum_three_scale(ea, ab, eb, bz, ez, -az, eab); + const abdlen = sum_three_scale(ab, bd, da, dz, az, bz, abd); + const bcelen = sum_three_scale(bc, ce, eb, ez, bz, cz, bce); + const cdalen = sum_three_scale(cd, da, ac, az, cz, dz, cda); + const deblen = sum_three_scale(de, eb, bd, bz, dz, ez, deb); + const eaclen = sum_three_scale(ea, ac, ce, cz, ez, az, eac); + const deterlen = sum_three(liftexact(cdelen, cde, bcelen, bce, deblen, deb, bcdlen, bcd, ax, ay, az, adet), adet, liftexact(dealen, dea, cdalen, cda, eaclen, eac, cdelen, cde, bx, by, bz, bdet), bdet, sum_three(liftexact(eablen, eab, deblen, deb, abdlen, abd, dealen, dea, cx, cy, cz, cdet), cdet, liftexact(abclen, abc, eaclen, eac, bcelen, bce, eablen, eab, dx, dy, dz, ddet), ddet, liftexact(bcdlen, bcd, abdlen, abd, cdalen, cda, abclen, abc, ex, ey, ez, edet), edet, cddet, cdedet), cdedet, abdet, deter); + return deter[deterlen - 1]; + } + const xdet = vec(96); + const ydet = vec(96); + const zdet = vec(96); + const fin = vec(1152); + function liftadapt(a, b, c, az, bz, cz, x, y, z, out) { + const len = sum_three_scale(a, b, c, az, bz, cz, _24); + return sum_three(scale(scale(len, _24, x, _48), _48, x, xdet), xdet, scale(scale(len, _24, y, _48), _48, y, ydet), ydet, scale(scale(len, _24, z, _48), _48, z, zdet), zdet, _192, out); + } + function insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent) { + let ab3, bc3, cd3, da3, ac3, bd3; + let aextail, bextail, cextail, dextail; + let aeytail, beytail, ceytail, deytail; + let aeztail, beztail, ceztail, deztail; + let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0; + const aex = ax - ex; + const bex = bx - ex; + const cex = cx - ex; + const dex = dx - ex; + const aey = ay - ey; + const bey = by - ey; + const cey = cy - ey; + const dey = dy - ey; + const aez = az - ez; + const bez = bz - ez; + const cez = cz - ez; + const dez = dz - ez; + s1 = aex * bey; + c = splitter * aex; + ahi = c - (c - aex); + alo = aex - ahi; + c = splitter * bey; + bhi = c - (c - bey); + blo = bey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = bex * aey; + c = splitter * bex; + ahi = c - (c - bex); + alo = bex - ahi; + c = splitter * aey; + bhi = c - (c - aey); + blo = aey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ab[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ab[1] = _0 - (_i + bvirt) + (bvirt - t1); + ab3 = _j + _i; + bvirt = ab3 - _j; + ab[2] = _j - (ab3 - bvirt) + (_i - bvirt); + ab[3] = ab3; + s1 = bex * cey; + c = splitter * bex; + ahi = c - (c - bex); + alo = bex - ahi; + c = splitter * cey; + bhi = c - (c - cey); + blo = cey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cex * bey; + c = splitter * cex; + ahi = c - (c - cex); + alo = cex - ahi; + c = splitter * bey; + bhi = c - (c - bey); + blo = bey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + bc[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + bc[1] = _0 - (_i + bvirt) + (bvirt - t1); + bc3 = _j + _i; + bvirt = bc3 - _j; + bc[2] = _j - (bc3 - bvirt) + (_i - bvirt); + bc[3] = bc3; + s1 = cex * dey; + c = splitter * cex; + ahi = c - (c - cex); + alo = cex - ahi; + c = splitter * dey; + bhi = c - (c - dey); + blo = dey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = dex * cey; + c = splitter * dex; + ahi = c - (c - dex); + alo = dex - ahi; + c = splitter * cey; + bhi = c - (c - cey); + blo = cey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + cd[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + cd[1] = _0 - (_i + bvirt) + (bvirt - t1); + cd3 = _j + _i; + bvirt = cd3 - _j; + cd[2] = _j - (cd3 - bvirt) + (_i - bvirt); + cd[3] = cd3; + s1 = dex * aey; + c = splitter * dex; + ahi = c - (c - dex); + alo = dex - ahi; + c = splitter * aey; + bhi = c - (c - aey); + blo = aey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = aex * dey; + c = splitter * aex; + ahi = c - (c - aex); + alo = aex - ahi; + c = splitter * dey; + bhi = c - (c - dey); + blo = dey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + da[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + da[1] = _0 - (_i + bvirt) + (bvirt - t1); + da3 = _j + _i; + bvirt = da3 - _j; + da[2] = _j - (da3 - bvirt) + (_i - bvirt); + da[3] = da3; + s1 = aex * cey; + c = splitter * aex; + ahi = c - (c - aex); + alo = aex - ahi; + c = splitter * cey; + bhi = c - (c - cey); + blo = cey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = cex * aey; + c = splitter * cex; + ahi = c - (c - cex); + alo = cex - ahi; + c = splitter * aey; + bhi = c - (c - aey); + blo = aey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + ac[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + ac[1] = _0 - (_i + bvirt) + (bvirt - t1); + ac3 = _j + _i; + bvirt = ac3 - _j; + ac[2] = _j - (ac3 - bvirt) + (_i - bvirt); + ac[3] = ac3; + s1 = bex * dey; + c = splitter * bex; + ahi = c - (c - bex); + alo = bex - ahi; + c = splitter * dey; + bhi = c - (c - dey); + blo = dey - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t1 = dex * bey; + c = splitter * dex; + ahi = c - (c - dex); + alo = dex - ahi; + c = splitter * bey; + bhi = c - (c - bey); + blo = bey - bhi; + t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo); + _i = s0 - t0; + bvirt = s0 - _i; + bd[0] = s0 - (_i + bvirt) + (bvirt - t0); + _j = s1 + _i; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i - bvirt); + _i = _0 - t1; + bvirt = _0 - _i; + bd[1] = _0 - (_i + bvirt) + (bvirt - t1); + bd3 = _j + _i; + bvirt = bd3 - _j; + bd[2] = _j - (bd3 - bvirt) + (_i - bvirt); + bd[3] = bd3; + const finlen = sum(sum(negate(liftadapt(bc, cd, bd, dez, bez, -cez, aex, aey, aez, adet), adet), adet, liftadapt(cd, da, ac, aez, cez, dez, bex, bey, bez, bdet), bdet, abdet), abdet, sum(negate(liftadapt(da, ab, bd, bez, dez, aez, cex, cey, cez, cdet), cdet), cdet, liftadapt(ab, bc, ac, cez, aez, -bez, dex, dey, dez, ddet), ddet, cddet), cddet, fin); + let det = estimate(finlen, fin); + let errbound = isperrboundB * permanent; + if (det >= errbound || -det >= errbound) { + return det; + } + bvirt = ax - aex; + aextail = ax - (aex + bvirt) + (bvirt - ex); + bvirt = ay - aey; + aeytail = ay - (aey + bvirt) + (bvirt - ey); + bvirt = az - aez; + aeztail = az - (aez + bvirt) + (bvirt - ez); + bvirt = bx - bex; + bextail = bx - (bex + bvirt) + (bvirt - ex); + bvirt = by - bey; + beytail = by - (bey + bvirt) + (bvirt - ey); + bvirt = bz - bez; + beztail = bz - (bez + bvirt) + (bvirt - ez); + bvirt = cx - cex; + cextail = cx - (cex + bvirt) + (bvirt - ex); + bvirt = cy - cey; + ceytail = cy - (cey + bvirt) + (bvirt - ey); + bvirt = cz - cez; + ceztail = cz - (cez + bvirt) + (bvirt - ez); + bvirt = dx - dex; + dextail = dx - (dex + bvirt) + (bvirt - ex); + bvirt = dy - dey; + deytail = dy - (dey + bvirt) + (bvirt - ey); + bvirt = dz - dez; + deztail = dz - (dez + bvirt) + (bvirt - ez); + if (aextail === 0 && aeytail === 0 && aeztail === 0 && bextail === 0 && beytail === 0 && beztail === 0 && cextail === 0 && ceytail === 0 && ceztail === 0 && dextail === 0 && deytail === 0 && deztail === 0) { + return det; + } + errbound = isperrboundC * permanent + resulterrbound * Math.abs(det); + const abeps = aex * beytail + bey * aextail - (aey * bextail + bex * aeytail); + const bceps = bex * ceytail + cey * bextail - (bey * cextail + cex * beytail); + const cdeps = cex * deytail + dey * cextail - (cey * dextail + dex * ceytail); + const daeps = dex * aeytail + aey * dextail - (dey * aextail + aex * deytail); + const aceps = aex * ceytail + cey * aextail - (aey * cextail + cex * aeytail); + const bdeps = bex * deytail + dey * bextail - (bey * dextail + dex * beytail); + det += (bex * bex + bey * bey + bez * bez) * (cez * daeps + dez * aceps + aez * cdeps + (ceztail * da3 + deztail * ac3 + aeztail * cd3)) + (dex * dex + dey * dey + dez * dez) * (aez * bceps - bez * aceps + cez * abeps + (aeztail * bc3 - beztail * ac3 + ceztail * ab3)) - ((aex * aex + aey * aey + aez * aez) * (bez * cdeps - cez * bdeps + dez * bceps + (beztail * cd3 - ceztail * bd3 + deztail * bc3)) + (cex * cex + cey * cey + cez * cez) * (dez * abeps + aez * bdeps + bez * daeps + (deztail * ab3 + aeztail * bd3 + beztail * da3))) + 2 * ((bex * bextail + bey * beytail + bez * beztail) * (cez * da3 + dez * ac3 + aez * cd3) + (dex * dextail + dey * deytail + dez * deztail) * (aez * bc3 - bez * ac3 + cez * ab3) - ((aex * aextail + aey * aeytail + aez * aeztail) * (bez * cd3 - cez * bd3 + dez * bc3) + (cex * cextail + cey * ceytail + cez * ceztail) * (dez * ab3 + aez * bd3 + bez * da3))); + if (det >= errbound || -det >= errbound) { + return det; + } + return insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez); + } + function insphere(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) { + const aex = ax - ex; + const bex = bx - ex; + const cex = cx - ex; + const dex = dx - ex; + const aey = ay - ey; + const bey = by - ey; + const cey = cy - ey; + const dey = dy - ey; + const aez = az - ez; + const bez = bz - ez; + const cez = cz - ez; + const dez = dz - ez; + const aexbey = aex * bey; + const bexaey = bex * aey; + const ab = aexbey - bexaey; + const bexcey = bex * cey; + const cexbey = cex * bey; + const bc = bexcey - cexbey; + const cexdey = cex * dey; + const dexcey = dex * cey; + const cd = cexdey - dexcey; + const dexaey = dex * aey; + const aexdey = aex * dey; + const da = dexaey - aexdey; + const aexcey = aex * cey; + const cexaey = cex * aey; + const ac = aexcey - cexaey; + const bexdey = bex * dey; + const dexbey = dex * bey; + const bd = bexdey - dexbey; + const alift = aex * aex + aey * aey + aez * aez; + const blift = bex * bex + bey * bey + bez * bez; + const clift = cex * cex + cey * cey + cez * cez; + const dlift = dex * dex + dey * dey + dez * dez; + const det = clift * (dez * ab + aez * bd + bez * da) - dlift * (aez * bc - bez * ac + cez * ab) + (alift * (bez * cd - cez * bd + dez * bc) - blift * (cez * da + dez * ac + aez * cd)); + const aezplus = Math.abs(aez); + const bezplus = Math.abs(bez); + const cezplus = Math.abs(cez); + const dezplus = Math.abs(dez); + const aexbeyplus = Math.abs(aexbey) + Math.abs(bexaey); + const bexceyplus = Math.abs(bexcey) + Math.abs(cexbey); + const cexdeyplus = Math.abs(cexdey) + Math.abs(dexcey); + const dexaeyplus = Math.abs(dexaey) + Math.abs(aexdey); + const aexceyplus = Math.abs(aexcey) + Math.abs(cexaey); + const bexdeyplus = Math.abs(bexdey) + Math.abs(dexbey); + const permanent = (cexdeyplus * bezplus + bexdeyplus * cezplus + bexceyplus * dezplus) * alift + (dexaeyplus * cezplus + aexceyplus * dezplus + cexdeyplus * aezplus) * blift + (aexbeyplus * dezplus + bexdeyplus * aezplus + dexaeyplus * bezplus) * clift + (bexceyplus * aezplus + aexceyplus * bezplus + aexbeyplus * cezplus) * dlift; + const errbound = isperrboundA * permanent; + if (det > errbound || -det > errbound) { + return det; + } + return -insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent); + } + function inspherefast(pax, pay, paz, pbx, pby, pbz, pcx, pcy, pcz, pdx, pdy, pdz, pex, pey, pez) { + const aex = pax - pex; + const bex = pbx - pex; + const cex = pcx - pex; + const dex = pdx - pex; + const aey = pay - pey; + const bey = pby - pey; + const cey = pcy - pey; + const dey = pdy - pey; + const aez = paz - pez; + const bez = pbz - pez; + const cez = pcz - pez; + const dez = pdz - pez; + const ab = aex * bey - bex * aey; + const bc = bex * cey - cex * bey; + const cd = cex * dey - dex * cey; + const da = dex * aey - aex * dey; + const ac = aex * cey - cex * aey; + const bd = bex * dey - dex * bey; + const abc = aez * bc - bez * ac + cez * ab; + const bcd = bez * cd - cez * bd + dez * bc; + const cda = cez * da + dez * ac + aez * cd; + const dab = dez * ab + aez * bd + bez * da; + const alift = aex * aex + aey * aey + aez * aez; + const blift = bex * bex + bey * bey + bez * bez; + const clift = cex * cex + cey * cey + cez * cez; + const dlift = dex * dex + dey * dey + dez * dez; + return clift * dab - dlift * abc + (alift * bcd - blift * cda); + } + exports.incircle = incircle; + exports.incirclefast = incirclefast; + exports.insphere = insphere; + exports.inspherefast = inspherefast; + exports.orient2d = orient2d; + exports.orient2dfast = orient2dfast; + exports.orient3d = orient3d; + exports.orient3dfast = orient3dfast; +}); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/predicates.min.js b/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/predicates.min.js new file mode 100644 index 000000000000..bf9e2599b961 --- /dev/null +++ b/packages/x-charts-vendor/lib-vendor/robust-predicates/umd/predicates.min.js @@ -0,0 +1,468 @@ +"use strict"; + +!function (t, n) { + "object" == typeof exports && "undefined" != typeof module ? n(exports) : "function" == typeof define && define.amd ? define(["exports"], n) : n((t = "undefined" != typeof globalThis ? globalThis : t || self).predicates = {}); +}(this, function (t) { + "use strict"; + + const n = 11102230246251565e-32, + e = 134217729, + r = (3 + 8 * n) * n; + function s(t, n, e, r, s) { + let o, + a, + c, + f, + i = n[0], + u = r[0], + h = 0, + b = 0; + u > i == u > -i ? (o = i, i = n[++h]) : (o = u, u = r[++b]); + let M = 0; + if (h < t && b < e) for (u > i == u > -i ? (a = i + o, c = o - (a - i), i = n[++h]) : (a = u + o, c = o - (a - u), u = r[++b]), o = a, 0 !== c && (s[M++] = c); h < t && b < e;) u > i == u > -i ? (a = o + i, f = a - o, c = o - (a - f) + (i - f), i = n[++h]) : (a = o + u, f = a - o, c = o - (a - f) + (u - f), u = r[++b]), o = a, 0 !== c && (s[M++] = c); + for (; h < t;) a = o + i, f = a - o, c = o - (a - f) + (i - f), i = n[++h], o = a, 0 !== c && (s[M++] = c); + for (; b < e;) a = o + u, f = a - o, c = o - (a - f) + (u - f), u = r[++b], o = a, 0 !== c && (s[M++] = c); + return 0 === o && 0 !== M || (s[M++] = o), M; + } + function o(t, n, e, r, o, a, c, f) { + return s(s(t, n, e, r, c), c, o, a, f); + } + function a(t, n, r, s) { + let o, a, c, f, i, u, h, b, M, l, d; + h = e * r, l = h - (h - r), d = r - l; + let p = n[0]; + o = p * r, h = e * p, b = h - (h - p), M = p - b, c = M * d - (o - b * l - M * l - b * d); + let y = 0; + 0 !== c && (s[y++] = c); + for (let x = 1; x < t; x++) p = n[x], f = p * r, h = e * p, b = h - (h - p), M = p - b, i = M * d - (f - b * l - M * l - b * d), a = o + i, u = a - o, c = o - (a - u) + (i - u), 0 !== c && (s[y++] = c), o = f + a, c = a - (o - f), 0 !== c && (s[y++] = c); + return 0 === o && 0 !== y || (s[y++] = o), y; + } + function c(t, n) { + for (let e = 0; e < t; e++) n[e] = -n[e]; + return t; + } + function f(t, n) { + let e = n[0]; + for (let r = 1; r < t; r++) e += n[r]; + return e; + } + function i(t) { + return new Float64Array(t); + } + const u = 22204460492503146e-32, + h = 11093356479670487e-47, + b = i(4), + M = i(8), + l = i(12), + d = i(16), + p = i(4); + const y = 3330669073875473e-31, + x = 32047474274603644e-47, + g = i(4), + m = i(4), + T = i(4), + j = i(4), + w = i(4), + A = i(4), + F = i(4), + k = i(4), + q = i(4), + v = i(8), + z = i(8), + B = i(8), + C = i(4), + D = i(8), + E = i(8), + G = i(8), + H = i(12); + let I = i(192), + J = i(192); + function K(t, n, e) { + t = s(t, I, n, e, J); + const r = I; + return I = J, J = r, t; + } + function L(t, n, r, s, o, a, c, f) { + let i, u, h, b, M, l, d, p, y, x, g, m, T, j, w; + return 0 === t ? 0 === n ? (c[0] = 0, f[0] = 0, 1) : (w = -n, x = w * r, u = e * w, h = u - (u - w), b = w - h, u = e * r, M = u - (u - r), l = r - M, c[0] = b * l - (x - h * M - b * M - h * l), c[1] = x, x = n * o, u = e * n, h = u - (u - n), b = n - h, u = e * o, M = u - (u - o), l = o - M, f[0] = b * l - (x - h * M - b * M - h * l), f[1] = x, 2) : 0 === n ? (x = t * s, u = e * t, h = u - (u - t), b = t - h, u = e * s, M = u - (u - s), l = s - M, c[0] = b * l - (x - h * M - b * M - h * l), c[1] = x, w = -t, x = w * a, u = e * w, h = u - (u - w), b = w - h, u = e * a, M = u - (u - a), l = a - M, f[0] = b * l - (x - h * M - b * M - h * l), f[1] = x, 2) : (x = t * s, u = e * t, h = u - (u - t), b = t - h, u = e * s, M = u - (u - s), l = s - M, g = b * l - (x - h * M - b * M - h * l), m = n * r, u = e * n, h = u - (u - n), b = n - h, u = e * r, M = u - (u - r), l = r - M, T = b * l - (m - h * M - b * M - h * l), d = g - T, i = g - d, c[0] = g - (d + i) + (i - T), p = x + d, i = p - x, y = x - (p - i) + (d - i), d = y - m, i = y - d, c[1] = y - (d + i) + (i - m), j = p + d, i = j - p, c[2] = p - (j - i) + (d - i), c[3] = j, x = n * o, u = e * n, h = u - (u - n), b = n - h, u = e * o, M = u - (u - o), l = o - M, g = b * l - (x - h * M - b * M - h * l), m = t * a, u = e * t, h = u - (u - t), b = t - h, u = e * a, M = u - (u - a), l = a - M, T = b * l - (m - h * M - b * M - h * l), d = g - T, i = g - d, f[0] = g - (d + i) + (i - T), p = x + d, i = p - x, y = x - (p - i) + (d - i), d = y - m, i = y - d, f[1] = y - (d + i) + (i - m), j = p + d, i = j - p, f[2] = p - (j - i) + (d - i), f[3] = j, 4); + } + function N(t, n, r, s, o) { + let a, c, f, i, u, h, b, M, l, d, p, y, x; + return p = n * r, c = e * n, f = c - (c - n), i = n - f, c = e * r, u = c - (c - r), h = r - u, y = i * h - (p - f * u - i * u - f * h), c = e * s, u = c - (c - s), h = s - u, b = y * s, c = e * y, f = c - (c - y), i = y - f, C[0] = i * h - (b - f * u - i * u - f * h), M = p * s, c = e * p, f = c - (c - p), i = p - f, d = i * h - (M - f * u - i * u - f * h), l = b + d, a = l - b, C[1] = b - (l - a) + (d - a), x = M + l, C[2] = l - (x - M), C[3] = x, t = K(t, 4, C), 0 !== o && (c = e * o, u = c - (c - o), h = o - u, b = y * o, c = e * y, f = c - (c - y), i = y - f, C[0] = i * h - (b - f * u - i * u - f * h), M = p * o, c = e * p, f = c - (c - p), i = p - f, d = i * h - (M - f * u - i * u - f * h), l = b + d, a = l - b, C[1] = b - (l - a) + (d - a), x = M + l, C[2] = l - (x - M), C[3] = x, t = K(t, 4, C)), t; + } + const O = 4440892098500632e-31, + P = 5423418723394464e-46, + Q = i(4), + R = i(4), + S = i(4), + U = i(4), + V = i(4), + W = i(4), + X = i(4), + Y = i(4), + Z = i(8), + $ = i(8), + _ = i(8), + tt = i(8), + nt = i(8), + et = i(8), + rt = i(8), + st = i(8), + ot = i(8), + at = i(4), + ct = i(4), + ft = i(4), + it = i(8), + ut = i(16), + ht = i(16), + bt = i(16), + Mt = i(32), + lt = i(32), + dt = i(48), + pt = i(64); + let yt = i(1152), + xt = i(1152); + function gt(t, n, e) { + t = s(t, yt, n, e, xt); + const r = yt; + return yt = xt, xt = r, t; + } + const mt = 5551115123125792e-31, + Tt = 8751425667295619e-46, + jt = i(4), + wt = i(4), + At = i(4), + Ft = i(4), + kt = i(4), + qt = i(4), + vt = i(4), + zt = i(4), + Bt = i(4), + Ct = i(4), + Dt = i(24), + Et = i(24), + Gt = i(24), + Ht = i(24), + It = i(24), + Jt = i(24), + Kt = i(24), + Lt = i(24), + Nt = i(24), + Ot = i(24), + Pt = i(1152), + Qt = i(1152), + Rt = i(1152), + St = i(1152), + Ut = i(1152), + Vt = i(2304), + Wt = i(2304), + Xt = i(3456), + Yt = i(5760), + Zt = i(8), + $t = i(8), + _t = i(8), + tn = i(16), + nn = i(24), + en = i(48), + rn = i(48), + sn = i(96), + on = i(192), + an = i(384), + cn = i(384), + fn = i(384), + un = i(768); + function hn(t, n, e, r, s, c, f) { + return o(a(4, t, r, Zt), Zt, a(4, n, s, $t), $t, a(4, e, c, _t), _t, tn, f); + } + function bn(t, n, e, r, f, i, u, h, b, M, l, d) { + const p = s(s(t, n, e, r, en), en, c(s(f, i, u, h, rn), rn), rn, sn); + return o(a(a(p, sn, b, on), on, b, an), an, a(a(p, sn, M, on), on, M, cn), cn, a(a(p, sn, l, on), on, l, fn), fn, un, d); + } + const Mn = i(96), + ln = i(96), + dn = i(96), + pn = i(1152); + function yn(t, n, e, r, s, c, f, i, u, h) { + const b = hn(t, n, e, r, s, c, nn); + return o(a(a(b, nn, f, en), en, f, Mn), Mn, a(a(b, nn, i, en), en, i, ln), ln, a(a(b, nn, u, en), en, u, dn), dn, on, h); + } + function xn(t, n, a, i, u, h, b, M, l, d, p, y, x, g, m, T) { + let j, w, A, F, k, q, v, z, B, C, D, E, G, H, I, J, K, L, N, O, P, Q, R, S, U, V, W, X, Y, Z, $; + const _ = t - x, + tt = i - x, + nt = b - x, + et = d - x, + rt = n - g, + st = u - g, + ot = M - g, + at = p - g, + ct = a - m, + ft = h - m, + it = l - m, + ut = y - m; + X = _ * st, O = e * _, P = O - (O - _), Q = _ - P, O = e * st, R = O - (O - st), S = st - R, Y = Q * S - (X - P * R - Q * R - P * S), Z = tt * rt, O = e * tt, P = O - (O - tt), Q = tt - P, O = e * rt, R = O - (O - rt), S = rt - R, $ = Q * S - (Z - P * R - Q * R - P * S), U = Y - $, N = Y - U, jt[0] = Y - (U + N) + (N - $), V = X + U, N = V - X, W = X - (V - N) + (U - N), U = W - Z, N = W - U, jt[1] = W - (U + N) + (N - Z), j = V + U, N = j - V, jt[2] = V - (j - N) + (U - N), jt[3] = j, X = tt * ot, O = e * tt, P = O - (O - tt), Q = tt - P, O = e * ot, R = O - (O - ot), S = ot - R, Y = Q * S - (X - P * R - Q * R - P * S), Z = nt * st, O = e * nt, P = O - (O - nt), Q = nt - P, O = e * st, R = O - (O - st), S = st - R, $ = Q * S - (Z - P * R - Q * R - P * S), U = Y - $, N = Y - U, wt[0] = Y - (U + N) + (N - $), V = X + U, N = V - X, W = X - (V - N) + (U - N), U = W - Z, N = W - U, wt[1] = W - (U + N) + (N - Z), w = V + U, N = w - V, wt[2] = V - (w - N) + (U - N), wt[3] = w, X = nt * at, O = e * nt, P = O - (O - nt), Q = nt - P, O = e * at, R = O - (O - at), S = at - R, Y = Q * S - (X - P * R - Q * R - P * S), Z = et * ot, O = e * et, P = O - (O - et), Q = et - P, O = e * ot, R = O - (O - ot), S = ot - R, $ = Q * S - (Z - P * R - Q * R - P * S), U = Y - $, N = Y - U, At[0] = Y - (U + N) + (N - $), V = X + U, N = V - X, W = X - (V - N) + (U - N), U = W - Z, N = W - U, At[1] = W - (U + N) + (N - Z), A = V + U, N = A - V, At[2] = V - (A - N) + (U - N), At[3] = A, X = et * rt, O = e * et, P = O - (O - et), Q = et - P, O = e * rt, R = O - (O - rt), S = rt - R, Y = Q * S - (X - P * R - Q * R - P * S), Z = _ * at, O = e * _, P = O - (O - _), Q = _ - P, O = e * at, R = O - (O - at), S = at - R, $ = Q * S - (Z - P * R - Q * R - P * S), U = Y - $, N = Y - U, Bt[0] = Y - (U + N) + (N - $), V = X + U, N = V - X, W = X - (V - N) + (U - N), U = W - Z, N = W - U, Bt[1] = W - (U + N) + (N - Z), F = V + U, N = F - V, Bt[2] = V - (F - N) + (U - N), Bt[3] = F, X = _ * ot, O = e * _, P = O - (O - _), Q = _ - P, O = e * ot, R = O - (O - ot), S = ot - R, Y = Q * S - (X - P * R - Q * R - P * S), Z = nt * rt, O = e * nt, P = O - (O - nt), Q = nt - P, O = e * rt, R = O - (O - rt), S = rt - R, $ = Q * S - (Z - P * R - Q * R - P * S), U = Y - $, N = Y - U, qt[0] = Y - (U + N) + (N - $), V = X + U, N = V - X, W = X - (V - N) + (U - N), U = W - Z, N = W - U, qt[1] = W - (U + N) + (N - Z), k = V + U, N = k - V, qt[2] = V - (k - N) + (U - N), qt[3] = k, X = tt * at, O = e * tt, P = O - (O - tt), Q = tt - P, O = e * at, R = O - (O - at), S = at - R, Y = Q * S - (X - P * R - Q * R - P * S), Z = et * st, O = e * et, P = O - (O - et), Q = et - P, O = e * st, R = O - (O - st), S = st - R, $ = Q * S - (Z - P * R - Q * R - P * S), U = Y - $, N = Y - U, vt[0] = Y - (U + N) + (N - $), V = X + U, N = V - X, W = X - (V - N) + (U - N), U = W - Z, N = W - U, vt[1] = W - (U + N) + (N - Z), q = V + U, N = q - V, vt[2] = V - (q - N) + (U - N), vt[3] = q; + let ht = f(s(s(c(yn(wt, At, vt, ut, ft, -it, _, rt, ct, Pt), Pt), Pt, yn(At, Bt, qt, ct, it, ut, tt, st, ft, Qt), Qt, Vt), Vt, s(c(yn(Bt, jt, vt, ft, ut, ct, nt, ot, it, Rt), Rt), Rt, yn(jt, wt, qt, it, ct, -ft, et, at, ut, St), St, Wt), Wt, pn), pn), + bt = mt * T; + if (ht >= bt || -ht >= bt) return ht; + if (N = t - _, v = t - (_ + N) + (N - x), N = n - rt, D = n - (rt + N) + (N - g), N = a - ct, I = a - (ct + N) + (N - m), N = i - tt, z = i - (tt + N) + (N - x), N = u - st, E = u - (st + N) + (N - g), N = h - ft, J = h - (ft + N) + (N - m), N = b - nt, B = b - (nt + N) + (N - x), N = M - ot, G = M - (ot + N) + (N - g), N = l - it, K = l - (it + N) + (N - m), N = d - et, C = d - (et + N) + (N - x), N = p - at, H = p - (at + N) + (N - g), N = y - ut, L = y - (ut + N) + (N - m), 0 === v && 0 === D && 0 === I && 0 === z && 0 === E && 0 === J && 0 === B && 0 === G && 0 === K && 0 === C && 0 === H && 0 === L) return ht; + bt = Tt * T + r * Math.abs(ht); + const Mt = _ * E + st * v - (rt * z + tt * D), + lt = tt * G + ot * z - (st * B + nt * E), + dt = nt * H + at * B - (ot * C + et * G), + pt = et * D + rt * C - (at * v + _ * H), + yt = _ * G + ot * v - (rt * B + nt * D), + xt = tt * H + at * z - (st * C + et * E); + return ht += (tt * tt + st * st + ft * ft) * (it * pt + ut * yt + ct * dt + (K * F + L * k + I * A)) + (et * et + at * at + ut * ut) * (ct * lt - ft * yt + it * Mt + (I * w - J * k + K * j)) - ((_ * _ + rt * rt + ct * ct) * (ft * dt - it * xt + ut * lt + (J * A - K * q + L * w)) + (nt * nt + ot * ot + it * it) * (ut * Mt + ct * xt + ft * pt + (L * j + I * q + J * F))) + 2 * ((tt * z + st * E + ft * J) * (it * F + ut * k + ct * A) + (et * C + at * H + ut * L) * (ct * w - ft * k + it * j) - ((_ * v + rt * D + ct * I) * (ft * A - it * q + ut * w) + (nt * B + ot * G + it * K) * (ut * j + ct * q + ft * F))), ht >= bt || -ht >= bt ? ht : function (t, n, r, s, a, c, f, i, u, h, b, M, l, d, p) { + let y, x, g, m, T, j, w, A, F, k, q, v, z, B; + k = t * a, x = e * t, g = x - (x - t), m = t - g, x = e * a, T = x - (x - a), j = a - T, q = m * j - (k - g * T - m * T - g * j), v = s * n, x = e * s, g = x - (x - s), m = s - g, x = e * n, T = x - (x - n), j = n - T, z = m * j - (v - g * T - m * T - g * j), w = q - z, y = q - w, jt[0] = q - (w + y) + (y - z), A = k + w, y = A - k, F = k - (A - y) + (w - y), w = F - v, y = F - w, jt[1] = F - (w + y) + (y - v), B = A + w, y = B - A, jt[2] = A - (B - y) + (w - y), jt[3] = B, k = s * i, x = e * s, g = x - (x - s), m = s - g, x = e * i, T = x - (x - i), j = i - T, q = m * j - (k - g * T - m * T - g * j), v = f * a, x = e * f, g = x - (x - f), m = f - g, x = e * a, T = x - (x - a), j = a - T, z = m * j - (v - g * T - m * T - g * j), w = q - z, y = q - w, wt[0] = q - (w + y) + (y - z), A = k + w, y = A - k, F = k - (A - y) + (w - y), w = F - v, y = F - w, wt[1] = F - (w + y) + (y - v), B = A + w, y = B - A, wt[2] = A - (B - y) + (w - y), wt[3] = B, k = f * b, x = e * f, g = x - (x - f), m = f - g, x = e * b, T = x - (x - b), j = b - T, q = m * j - (k - g * T - m * T - g * j), v = h * i, x = e * h, g = x - (x - h), m = h - g, x = e * i, T = x - (x - i), j = i - T, z = m * j - (v - g * T - m * T - g * j), w = q - z, y = q - w, At[0] = q - (w + y) + (y - z), A = k + w, y = A - k, F = k - (A - y) + (w - y), w = F - v, y = F - w, At[1] = F - (w + y) + (y - v), B = A + w, y = B - A, At[2] = A - (B - y) + (w - y), At[3] = B, k = h * d, x = e * h, g = x - (x - h), m = h - g, x = e * d, T = x - (x - d), j = d - T, q = m * j - (k - g * T - m * T - g * j), v = l * b, x = e * l, g = x - (x - l), m = l - g, x = e * b, T = x - (x - b), j = b - T, z = m * j - (v - g * T - m * T - g * j), w = q - z, y = q - w, Ft[0] = q - (w + y) + (y - z), A = k + w, y = A - k, F = k - (A - y) + (w - y), w = F - v, y = F - w, Ft[1] = F - (w + y) + (y - v), B = A + w, y = B - A, Ft[2] = A - (B - y) + (w - y), Ft[3] = B, k = l * n, x = e * l, g = x - (x - l), m = l - g, x = e * n, T = x - (x - n), j = n - T, q = m * j - (k - g * T - m * T - g * j), v = t * d, x = e * t, g = x - (x - t), m = t - g, x = e * d, T = x - (x - d), j = d - T, z = m * j - (v - g * T - m * T - g * j), w = q - z, y = q - w, kt[0] = q - (w + y) + (y - z), A = k + w, y = A - k, F = k - (A - y) + (w - y), w = F - v, y = F - w, kt[1] = F - (w + y) + (y - v), B = A + w, y = B - A, kt[2] = A - (B - y) + (w - y), kt[3] = B, k = t * i, x = e * t, g = x - (x - t), m = t - g, x = e * i, T = x - (x - i), j = i - T, q = m * j - (k - g * T - m * T - g * j), v = f * n, x = e * f, g = x - (x - f), m = f - g, x = e * n, T = x - (x - n), j = n - T, z = m * j - (v - g * T - m * T - g * j), w = q - z, y = q - w, qt[0] = q - (w + y) + (y - z), A = k + w, y = A - k, F = k - (A - y) + (w - y), w = F - v, y = F - w, qt[1] = F - (w + y) + (y - v), B = A + w, y = B - A, qt[2] = A - (B - y) + (w - y), qt[3] = B, k = s * b, x = e * s, g = x - (x - s), m = s - g, x = e * b, T = x - (x - b), j = b - T, q = m * j - (k - g * T - m * T - g * j), v = h * a, x = e * h, g = x - (x - h), m = h - g, x = e * a, T = x - (x - a), j = a - T, z = m * j - (v - g * T - m * T - g * j), w = q - z, y = q - w, vt[0] = q - (w + y) + (y - z), A = k + w, y = A - k, F = k - (A - y) + (w - y), w = F - v, y = F - w, vt[1] = F - (w + y) + (y - v), B = A + w, y = B - A, vt[2] = A - (B - y) + (w - y), vt[3] = B, k = f * d, x = e * f, g = x - (x - f), m = f - g, x = e * d, T = x - (x - d), j = d - T, q = m * j - (k - g * T - m * T - g * j), v = l * i, x = e * l, g = x - (x - l), m = l - g, x = e * i, T = x - (x - i), j = i - T, z = m * j - (v - g * T - m * T - g * j), w = q - z, y = q - w, zt[0] = q - (w + y) + (y - z), A = k + w, y = A - k, F = k - (A - y) + (w - y), w = F - v, y = F - w, zt[1] = F - (w + y) + (y - v), B = A + w, y = B - A, zt[2] = A - (B - y) + (w - y), zt[3] = B, k = h * n, x = e * h, g = x - (x - h), m = h - g, x = e * n, T = x - (x - n), j = n - T, q = m * j - (k - g * T - m * T - g * j), v = t * b, x = e * t, g = x - (x - t), m = t - g, x = e * b, T = x - (x - b), j = b - T, z = m * j - (v - g * T - m * T - g * j), w = q - z, y = q - w, Bt[0] = q - (w + y) + (y - z), A = k + w, y = A - k, F = k - (A - y) + (w - y), w = F - v, y = F - w, Bt[1] = F - (w + y) + (y - v), B = A + w, y = B - A, Bt[2] = A - (B - y) + (w - y), Bt[3] = B, k = l * a, x = e * l, g = x - (x - l), m = l - g, x = e * a, T = x - (x - a), j = a - T, q = m * j - (k - g * T - m * T - g * j), v = s * d, x = e * s, g = x - (x - s), m = s - g, x = e * d, T = x - (x - d), j = d - T, z = m * j - (v - g * T - m * T - g * j), w = q - z, y = q - w, Ct[0] = q - (w + y) + (y - z), A = k + w, y = A - k, F = k - (A - y) + (w - y), w = F - v, y = F - w, Ct[1] = F - (w + y) + (y - v), B = A + w, y = B - A, Ct[2] = A - (B - y) + (w - y), Ct[3] = B; + const C = hn(jt, wt, qt, u, r, -c, Dt), + D = hn(wt, At, vt, M, c, -u, Et), + E = hn(At, Ft, zt, p, u, -M, Gt), + G = hn(Ft, kt, Bt, r, M, -p, Ht), + H = hn(kt, jt, Ct, c, p, -r, It), + I = hn(jt, vt, Bt, M, r, c, Jt), + J = hn(wt, zt, Ct, p, c, u, Kt), + K = hn(At, Bt, qt, r, u, M, Lt), + L = hn(Ft, Ct, vt, c, M, p, Nt), + N = hn(kt, qt, zt, u, p, r, Ot), + O = o(bn(E, Gt, J, Kt, L, Nt, D, Et, t, n, r, Pt), Pt, bn(G, Ht, K, Lt, N, Ot, E, Gt, s, a, c, Qt), Qt, o(bn(H, It, L, Nt, I, Jt, G, Ht, f, i, u, Rt), Rt, bn(C, Dt, N, Ot, J, Kt, H, It, h, b, M, St), St, bn(D, Et, I, Jt, K, Lt, C, Dt, l, d, p, Ut), Ut, Wt, Xt), Xt, Vt, Yt); + return Yt[O - 1]; + }(t, n, a, i, u, h, b, M, l, d, p, y, x, g, m); + } + t.incircle = function (t, n, c, i, u, h, b, M) { + const l = t - b, + d = c - b, + p = u - b, + y = n - M, + x = i - M, + g = h - M, + m = d * g, + T = p * x, + j = l * l + y * y, + w = p * y, + A = l * g, + F = d * d + x * x, + k = l * x, + q = d * y, + v = p * p + g * g, + z = j * (m - T) + F * (w - A) + v * (k - q), + B = (Math.abs(m) + Math.abs(T)) * j + (Math.abs(w) + Math.abs(A)) * F + (Math.abs(k) + Math.abs(q)) * v, + C = 11102230246251577e-31 * B; + return z > C || -z > C ? z : function (t, n, c, i, u, h, b, M, l) { + let d, p, y, x, g, m, T, j, w, A, F, k, q, v, z, B, C, D, E, G, H, I, J, K, L, N, xt, mt, Tt, jt, wt, At, Ft, kt, qt; + const vt = t - b, + zt = c - b, + Bt = u - b, + Ct = n - M, + Dt = i - M, + Et = h - M; + wt = zt * Et, J = e * zt, K = J - (J - zt), L = zt - K, J = e * Et, N = J - (J - Et), xt = Et - N, At = L * xt - (wt - K * N - L * N - K * xt), Ft = Bt * Dt, J = e * Bt, K = J - (J - Bt), L = Bt - K, J = e * Dt, N = J - (J - Dt), xt = Dt - N, kt = L * xt - (Ft - K * N - L * N - K * xt), mt = At - kt, I = At - mt, Q[0] = At - (mt + I) + (I - kt), Tt = wt + mt, I = Tt - wt, jt = wt - (Tt - I) + (mt - I), mt = jt - Ft, I = jt - mt, Q[1] = jt - (mt + I) + (I - Ft), qt = Tt + mt, I = qt - Tt, Q[2] = Tt - (qt - I) + (mt - I), Q[3] = qt, wt = Bt * Ct, J = e * Bt, K = J - (J - Bt), L = Bt - K, J = e * Ct, N = J - (J - Ct), xt = Ct - N, At = L * xt - (wt - K * N - L * N - K * xt), Ft = vt * Et, J = e * vt, K = J - (J - vt), L = vt - K, J = e * Et, N = J - (J - Et), xt = Et - N, kt = L * xt - (Ft - K * N - L * N - K * xt), mt = At - kt, I = At - mt, R[0] = At - (mt + I) + (I - kt), Tt = wt + mt, I = Tt - wt, jt = wt - (Tt - I) + (mt - I), mt = jt - Ft, I = jt - mt, R[1] = jt - (mt + I) + (I - Ft), qt = Tt + mt, I = qt - Tt, R[2] = Tt - (qt - I) + (mt - I), R[3] = qt, wt = vt * Dt, J = e * vt, K = J - (J - vt), L = vt - K, J = e * Dt, N = J - (J - Dt), xt = Dt - N, At = L * xt - (wt - K * N - L * N - K * xt), Ft = zt * Ct, J = e * zt, K = J - (J - zt), L = zt - K, J = e * Ct, N = J - (J - Ct), xt = Ct - N, kt = L * xt - (Ft - K * N - L * N - K * xt), mt = At - kt, I = At - mt, S[0] = At - (mt + I) + (I - kt), Tt = wt + mt, I = Tt - wt, jt = wt - (Tt - I) + (mt - I), mt = jt - Ft, I = jt - mt, S[1] = jt - (mt + I) + (I - Ft), qt = Tt + mt, I = qt - Tt, S[2] = Tt - (qt - I) + (mt - I), S[3] = qt, d = s(s(s(a(a(4, Q, vt, it), it, vt, ut), ut, a(a(4, Q, Ct, it), it, Ct, ht), ht, Mt), Mt, s(a(a(4, R, zt, it), it, zt, ut), ut, a(a(4, R, Dt, it), it, Dt, ht), ht, lt), lt, pt), pt, s(a(a(4, S, Bt, it), it, Bt, ut), ut, a(a(4, S, Et, it), it, Et, ht), ht, Mt), Mt, yt); + let Gt = f(d, yt), + Ht = O * l; + if (Gt >= Ht || -Gt >= Ht) return Gt; + if (I = t - vt, p = t - (vt + I) + (I - b), I = n - Ct, g = n - (Ct + I) + (I - M), I = c - zt, y = c - (zt + I) + (I - b), I = i - Dt, m = i - (Dt + I) + (I - M), I = u - Bt, x = u - (Bt + I) + (I - b), I = h - Et, T = h - (Et + I) + (I - M), 0 === p && 0 === y && 0 === x && 0 === g && 0 === m && 0 === T) return Gt; + if (Ht = P * l + r * Math.abs(Gt), Gt += (vt * vt + Ct * Ct) * (zt * T + Et * y - (Dt * x + Bt * m)) + 2 * (vt * p + Ct * g) * (zt * Et - Dt * Bt) + ((zt * zt + Dt * Dt) * (Bt * g + Ct * x - (Et * p + vt * T)) + 2 * (zt * y + Dt * m) * (Bt * Ct - Et * vt)) + ((Bt * Bt + Et * Et) * (vt * m + Dt * p - (Ct * y + zt * g)) + 2 * (Bt * x + Et * T) * (vt * Dt - Ct * zt)), Gt >= Ht || -Gt >= Ht) return Gt; + if (0 === y && 0 === m && 0 === x && 0 === T || (wt = vt * vt, J = e * vt, K = J - (J - vt), L = vt - K, At = L * L - (wt - K * K - (K + K) * L), Ft = Ct * Ct, J = e * Ct, K = J - (J - Ct), L = Ct - K, kt = L * L - (Ft - K * K - (K + K) * L), mt = At + kt, I = mt - At, U[0] = At - (mt - I) + (kt - I), Tt = wt + mt, I = Tt - wt, jt = wt - (Tt - I) + (mt - I), mt = jt + Ft, I = mt - jt, U[1] = jt - (mt - I) + (Ft - I), qt = Tt + mt, I = qt - Tt, U[2] = Tt - (qt - I) + (mt - I), U[3] = qt), 0 === x && 0 === T && 0 === p && 0 === g || (wt = zt * zt, J = e * zt, K = J - (J - zt), L = zt - K, At = L * L - (wt - K * K - (K + K) * L), Ft = Dt * Dt, J = e * Dt, K = J - (J - Dt), L = Dt - K, kt = L * L - (Ft - K * K - (K + K) * L), mt = At + kt, I = mt - At, V[0] = At - (mt - I) + (kt - I), Tt = wt + mt, I = Tt - wt, jt = wt - (Tt - I) + (mt - I), mt = jt + Ft, I = mt - jt, V[1] = jt - (mt - I) + (Ft - I), qt = Tt + mt, I = qt - Tt, V[2] = Tt - (qt - I) + (mt - I), V[3] = qt), 0 === p && 0 === g && 0 === y && 0 === m || (wt = Bt * Bt, J = e * Bt, K = J - (J - Bt), L = Bt - K, At = L * L - (wt - K * K - (K + K) * L), Ft = Et * Et, J = e * Et, K = J - (J - Et), L = Et - K, kt = L * L - (Ft - K * K - (K + K) * L), mt = At + kt, I = mt - At, W[0] = At - (mt - I) + (kt - I), Tt = wt + mt, I = Tt - wt, jt = wt - (Tt - I) + (mt - I), mt = jt + Ft, I = mt - jt, W[1] = jt - (mt - I) + (Ft - I), qt = Tt + mt, I = qt - Tt, W[2] = Tt - (qt - I) + (mt - I), W[3] = qt), 0 !== p && (j = a(4, Q, p, Z), d = gt(d, o(a(j, Z, 2 * vt, ut), ut, a(a(4, W, p, it), it, Dt, ht), ht, a(a(4, V, p, it), it, -Et, bt), bt, Mt, dt), dt)), 0 !== g && (w = a(4, Q, g, $), d = gt(d, o(a(w, $, 2 * Ct, ut), ut, a(a(4, V, g, it), it, Bt, ht), ht, a(a(4, W, g, it), it, -zt, bt), bt, Mt, dt), dt)), 0 !== y && (A = a(4, R, y, _), d = gt(d, o(a(A, _, 2 * zt, ut), ut, a(a(4, U, y, it), it, Et, ht), ht, a(a(4, W, y, it), it, -Ct, bt), bt, Mt, dt), dt)), 0 !== m && (F = a(4, R, m, tt), d = gt(d, o(a(F, tt, 2 * Dt, ut), ut, a(a(4, W, m, it), it, vt, ht), ht, a(a(4, U, m, it), it, -Bt, bt), bt, Mt, dt), dt)), 0 !== x && (k = a(4, S, x, nt), d = gt(d, o(a(k, nt, 2 * Bt, ut), ut, a(a(4, V, x, it), it, Ct, ht), ht, a(a(4, U, x, it), it, -Dt, bt), bt, Mt, dt), dt)), 0 !== T && (q = a(4, S, T, et), d = gt(d, o(a(q, et, 2 * Et, ut), ut, a(a(4, U, T, it), it, zt, ht), ht, a(a(4, V, T, it), it, -vt, bt), bt, Mt, dt), dt)), 0 !== p || 0 !== g) { + if (0 !== y || 0 !== m || 0 !== x || 0 !== T ? (wt = y * Et, J = e * y, K = J - (J - y), L = y - K, J = e * Et, N = J - (J - Et), xt = Et - N, At = L * xt - (wt - K * N - L * N - K * xt), Ft = zt * T, J = e * zt, K = J - (J - zt), L = zt - K, J = e * T, N = J - (J - T), xt = T - N, kt = L * xt - (Ft - K * N - L * N - K * xt), mt = At + kt, I = mt - At, X[0] = At - (mt - I) + (kt - I), Tt = wt + mt, I = Tt - wt, jt = wt - (Tt - I) + (mt - I), mt = jt + Ft, I = mt - jt, X[1] = jt - (mt - I) + (Ft - I), qt = Tt + mt, I = qt - Tt, X[2] = Tt - (qt - I) + (mt - I), X[3] = qt, wt = x * -Dt, J = e * x, K = J - (J - x), L = x - K, J = e * -Dt, N = J - (J - -Dt), xt = -Dt - N, At = L * xt - (wt - K * N - L * N - K * xt), Ft = Bt * -m, J = e * Bt, K = J - (J - Bt), L = Bt - K, J = e * -m, N = J - (J - -m), xt = -m - N, kt = L * xt - (Ft - K * N - L * N - K * xt), mt = At + kt, I = mt - At, Y[0] = At - (mt - I) + (kt - I), Tt = wt + mt, I = Tt - wt, jt = wt - (Tt - I) + (mt - I), mt = jt + Ft, I = mt - jt, Y[1] = jt - (mt - I) + (Ft - I), qt = Tt + mt, I = qt - Tt, Y[2] = Tt - (qt - I) + (mt - I), Y[3] = qt, z = s(4, X, 4, Y, st), wt = y * T, J = e * y, K = J - (J - y), L = y - K, J = e * T, N = J - (J - T), xt = T - N, At = L * xt - (wt - K * N - L * N - K * xt), Ft = x * m, J = e * x, K = J - (J - x), L = x - K, J = e * m, N = J - (J - m), xt = m - N, kt = L * xt - (Ft - K * N - L * N - K * xt), mt = At - kt, I = At - mt, ct[0] = At - (mt + I) + (I - kt), Tt = wt + mt, I = Tt - wt, jt = wt - (Tt - I) + (mt - I), mt = jt - Ft, I = jt - mt, ct[1] = jt - (mt + I) + (I - Ft), qt = Tt + mt, I = qt - Tt, ct[2] = Tt - (qt - I) + (mt - I), ct[3] = qt, D = 4) : (st[0] = 0, z = 1, ct[0] = 0, D = 1), 0 !== p) { + const t = a(z, st, p, bt); + d = gt(d, s(a(j, Z, p, ut), ut, a(t, bt, 2 * vt, Mt), Mt, dt), dt); + const n = a(D, ct, p, it); + d = gt(d, o(a(n, it, 2 * vt, ut), ut, a(n, it, p, ht), ht, a(t, bt, p, Mt), Mt, lt, pt), pt), 0 !== m && (d = gt(d, a(a(4, W, p, it), it, m, ut), ut)), 0 !== T && (d = gt(d, a(a(4, V, -p, it), it, T, ut), ut)); + } + if (0 !== g) { + const t = a(z, st, g, bt); + d = gt(d, s(a(w, $, g, ut), ut, a(t, bt, 2 * Ct, Mt), Mt, dt), dt); + const n = a(D, ct, g, it); + d = gt(d, o(a(n, it, 2 * Ct, ut), ut, a(n, it, g, ht), ht, a(t, bt, g, Mt), Mt, lt, pt), pt); + } + } + if (0 !== y || 0 !== m) { + if (0 !== x || 0 !== T || 0 !== p || 0 !== g ? (wt = x * Ct, J = e * x, K = J - (J - x), L = x - K, J = e * Ct, N = J - (J - Ct), xt = Ct - N, At = L * xt - (wt - K * N - L * N - K * xt), Ft = Bt * g, J = e * Bt, K = J - (J - Bt), L = Bt - K, J = e * g, N = J - (J - g), xt = g - N, kt = L * xt - (Ft - K * N - L * N - K * xt), mt = At + kt, I = mt - At, X[0] = At - (mt - I) + (kt - I), Tt = wt + mt, I = Tt - wt, jt = wt - (Tt - I) + (mt - I), mt = jt + Ft, I = mt - jt, X[1] = jt - (mt - I) + (Ft - I), qt = Tt + mt, I = qt - Tt, X[2] = Tt - (qt - I) + (mt - I), X[3] = qt, G = -Et, H = -T, wt = p * G, J = e * p, K = J - (J - p), L = p - K, J = e * G, N = J - (J - G), xt = G - N, At = L * xt - (wt - K * N - L * N - K * xt), Ft = vt * H, J = e * vt, K = J - (J - vt), L = vt - K, J = e * H, N = J - (J - H), xt = H - N, kt = L * xt - (Ft - K * N - L * N - K * xt), mt = At + kt, I = mt - At, Y[0] = At - (mt - I) + (kt - I), Tt = wt + mt, I = Tt - wt, jt = wt - (Tt - I) + (mt - I), mt = jt + Ft, I = mt - jt, Y[1] = jt - (mt - I) + (Ft - I), qt = Tt + mt, I = qt - Tt, Y[2] = Tt - (qt - I) + (mt - I), Y[3] = qt, B = s(4, X, 4, Y, ot), wt = x * g, J = e * x, K = J - (J - x), L = x - K, J = e * g, N = J - (J - g), xt = g - N, At = L * xt - (wt - K * N - L * N - K * xt), Ft = p * T, J = e * p, K = J - (J - p), L = p - K, J = e * T, N = J - (J - T), xt = T - N, kt = L * xt - (Ft - K * N - L * N - K * xt), mt = At - kt, I = At - mt, ft[0] = At - (mt + I) + (I - kt), Tt = wt + mt, I = Tt - wt, jt = wt - (Tt - I) + (mt - I), mt = jt - Ft, I = jt - mt, ft[1] = jt - (mt + I) + (I - Ft), qt = Tt + mt, I = qt - Tt, ft[2] = Tt - (qt - I) + (mt - I), ft[3] = qt, E = 4) : (ot[0] = 0, B = 1, ft[0] = 0, E = 1), 0 !== y) { + const t = a(B, ot, y, bt); + d = gt(d, s(a(A, _, y, ut), ut, a(t, bt, 2 * zt, Mt), Mt, dt), dt); + const n = a(E, ft, y, it); + d = gt(d, o(a(n, it, 2 * zt, ut), ut, a(n, it, y, ht), ht, a(t, bt, y, Mt), Mt, lt, pt), pt), 0 !== T && (d = gt(d, a(a(4, U, y, it), it, T, ut), ut)), 0 !== g && (d = gt(d, a(a(4, W, -y, it), it, g, ut), ut)); + } + if (0 !== m) { + const t = a(B, ot, m, bt); + d = gt(d, s(a(F, tt, m, ut), ut, a(t, bt, 2 * Dt, Mt), Mt, dt), dt); + const n = a(E, ft, m, it); + d = gt(d, o(a(n, it, 2 * Dt, ut), ut, a(n, it, m, ht), ht, a(t, bt, m, Mt), Mt, lt, pt), pt); + } + } + if (0 !== x || 0 !== T) { + if (0 !== p || 0 !== g || 0 !== y || 0 !== m ? (wt = p * Dt, J = e * p, K = J - (J - p), L = p - K, J = e * Dt, N = J - (J - Dt), xt = Dt - N, At = L * xt - (wt - K * N - L * N - K * xt), Ft = vt * m, J = e * vt, K = J - (J - vt), L = vt - K, J = e * m, N = J - (J - m), xt = m - N, kt = L * xt - (Ft - K * N - L * N - K * xt), mt = At + kt, I = mt - At, X[0] = At - (mt - I) + (kt - I), Tt = wt + mt, I = Tt - wt, jt = wt - (Tt - I) + (mt - I), mt = jt + Ft, I = mt - jt, X[1] = jt - (mt - I) + (Ft - I), qt = Tt + mt, I = qt - Tt, X[2] = Tt - (qt - I) + (mt - I), X[3] = qt, G = -Ct, H = -g, wt = y * G, J = e * y, K = J - (J - y), L = y - K, J = e * G, N = J - (J - G), xt = G - N, At = L * xt - (wt - K * N - L * N - K * xt), Ft = zt * H, J = e * zt, K = J - (J - zt), L = zt - K, J = e * H, N = J - (J - H), xt = H - N, kt = L * xt - (Ft - K * N - L * N - K * xt), mt = At + kt, I = mt - At, Y[0] = At - (mt - I) + (kt - I), Tt = wt + mt, I = Tt - wt, jt = wt - (Tt - I) + (mt - I), mt = jt + Ft, I = mt - jt, Y[1] = jt - (mt - I) + (Ft - I), qt = Tt + mt, I = qt - Tt, Y[2] = Tt - (qt - I) + (mt - I), Y[3] = qt, v = s(4, X, 4, Y, rt), wt = p * m, J = e * p, K = J - (J - p), L = p - K, J = e * m, N = J - (J - m), xt = m - N, At = L * xt - (wt - K * N - L * N - K * xt), Ft = y * g, J = e * y, K = J - (J - y), L = y - K, J = e * g, N = J - (J - g), xt = g - N, kt = L * xt - (Ft - K * N - L * N - K * xt), mt = At - kt, I = At - mt, at[0] = At - (mt + I) + (I - kt), Tt = wt + mt, I = Tt - wt, jt = wt - (Tt - I) + (mt - I), mt = jt - Ft, I = jt - mt, at[1] = jt - (mt + I) + (I - Ft), qt = Tt + mt, I = qt - Tt, at[2] = Tt - (qt - I) + (mt - I), at[3] = qt, C = 4) : (rt[0] = 0, v = 1, at[0] = 0, C = 1), 0 !== x) { + const t = a(v, rt, x, bt); + d = gt(d, s(a(k, nt, x, ut), ut, a(t, bt, 2 * Bt, Mt), Mt, dt), dt); + const n = a(C, at, x, it); + d = gt(d, o(a(n, it, 2 * Bt, ut), ut, a(n, it, x, ht), ht, a(t, bt, x, Mt), Mt, lt, pt), pt), 0 !== g && (d = gt(d, a(a(4, V, x, it), it, g, ut), ut)), 0 !== m && (d = gt(d, a(a(4, U, -x, it), it, m, ut), ut)); + } + if (0 !== T) { + const t = a(v, rt, T, bt); + d = gt(d, s(a(q, et, T, ut), ut, a(t, bt, 2 * Et, Mt), Mt, dt), dt); + const n = a(C, at, T, it); + d = gt(d, o(a(n, it, 2 * Et, ut), ut, a(n, it, T, ht), ht, a(t, bt, T, Mt), Mt, lt, pt), pt); + } + } + return yt[d - 1]; + }(t, n, c, i, u, h, b, M, B); + }, t.incirclefast = function (t, n, e, r, s, o, a, c) { + const f = t - a, + i = n - c, + u = e - a, + h = r - c, + b = s - a, + M = o - c; + return (f * f + i * i) * (u * M - b * h) + (u * u + h * h) * (b * i - f * M) + (b * b + M * M) * (f * h - u * i); + }, t.insphere = function (t, n, e, r, s, o, a, c, f, i, u, h, b, M, l) { + const d = t - b, + p = r - b, + y = a - b, + x = i - b, + g = n - M, + m = s - M, + T = c - M, + j = u - M, + w = e - l, + A = o - l, + F = f - l, + k = h - l, + q = d * m, + v = p * g, + z = q - v, + B = p * T, + C = y * m, + D = B - C, + E = y * j, + G = x * T, + H = E - G, + I = x * g, + J = d * j, + K = I - J, + L = d * T, + N = y * g, + O = L - N, + P = p * j, + Q = x * m, + R = P - Q, + S = d * d + g * g + w * w, + U = p * p + m * m + A * A, + V = y * y + T * T + F * F, + W = x * x + j * j + k * k, + X = V * (k * z + w * R + A * K) - W * (w * D - A * O + F * z) + (S * (A * H - F * R + k * D) - U * (F * K + k * O + w * H)), + Y = Math.abs(w), + Z = Math.abs(A), + $ = Math.abs(F), + _ = Math.abs(k), + tt = Math.abs(q) + Math.abs(v), + nt = Math.abs(B) + Math.abs(C), + et = Math.abs(E) + Math.abs(G), + rt = Math.abs(I) + Math.abs(J), + st = Math.abs(L) + Math.abs(N), + ot = Math.abs(P) + Math.abs(Q), + at = (et * Z + ot * $ + nt * _) * S + (rt * $ + st * _ + et * Y) * U + (tt * _ + ot * Y + rt * Z) * V + (nt * Y + st * Z + tt * $) * W, + ct = 17763568394002532e-31 * at; + return X > ct || -X > ct ? X : -xn(t, n, e, r, s, o, a, c, f, i, u, h, b, M, l, at); + }, t.inspherefast = function (t, n, e, r, s, o, a, c, f, i, u, h, b, M, l) { + const d = t - b, + p = r - b, + y = a - b, + x = i - b, + g = n - M, + m = s - M, + T = c - M, + j = u - M, + w = e - l, + A = o - l, + F = f - l, + k = h - l, + q = d * m - p * g, + v = p * T - y * m, + z = y * j - x * T, + B = x * g - d * j, + C = d * T - y * g, + D = p * j - x * m; + return (y * y + T * T + F * F) * (k * q + w * D + A * B) - (x * x + j * j + k * k) * (w * v - A * C + F * q) + ((d * d + g * g + w * w) * (A * z - F * D + k * v) - (p * p + m * m + A * A) * (F * B + k * C + w * z)); + }, t.orient2d = function (t, n, o, a, c, i) { + const y = (n - i) * (o - c), + x = (t - c) * (a - i), + g = y - x, + m = Math.abs(y + x); + return Math.abs(g) >= 33306690738754716e-32 * m ? g : -function (t, n, o, a, c, i, y) { + let x, g, m, T, j, w, A, F, k, q, v, z, B, C, D, E, G, H; + const I = t - c, + J = o - c, + K = n - i, + L = a - i; + C = I * L, w = e * I, A = w - (w - I), F = I - A, w = e * L, k = w - (w - L), q = L - k, D = F * q - (C - A * k - F * k - A * q), E = K * J, w = e * K, A = w - (w - K), F = K - A, w = e * J, k = w - (w - J), q = J - k, G = F * q - (E - A * k - F * k - A * q), v = D - G, j = D - v, b[0] = D - (v + j) + (j - G), z = C + v, j = z - C, B = C - (z - j) + (v - j), v = B - E, j = B - v, b[1] = B - (v + j) + (j - E), H = z + v, j = H - z, b[2] = z - (H - j) + (v - j), b[3] = H; + let N = f(4, b), + O = u * y; + if (N >= O || -N >= O) return N; + if (j = t - I, x = t - (I + j) + (j - c), j = o - J, m = o - (J + j) + (j - c), j = n - K, g = n - (K + j) + (j - i), j = a - L, T = a - (L + j) + (j - i), 0 === x && 0 === g && 0 === m && 0 === T) return N; + if (O = h * y + r * Math.abs(N), N += I * T + L * x - (K * m + J * g), N >= O || -N >= O) return N; + C = x * L, w = e * x, A = w - (w - x), F = x - A, w = e * L, k = w - (w - L), q = L - k, D = F * q - (C - A * k - F * k - A * q), E = g * J, w = e * g, A = w - (w - g), F = g - A, w = e * J, k = w - (w - J), q = J - k, G = F * q - (E - A * k - F * k - A * q), v = D - G, j = D - v, p[0] = D - (v + j) + (j - G), z = C + v, j = z - C, B = C - (z - j) + (v - j), v = B - E, j = B - v, p[1] = B - (v + j) + (j - E), H = z + v, j = H - z, p[2] = z - (H - j) + (v - j), p[3] = H; + const P = s(4, b, 4, p, M); + C = I * T, w = e * I, A = w - (w - I), F = I - A, w = e * T, k = w - (w - T), q = T - k, D = F * q - (C - A * k - F * k - A * q), E = K * m, w = e * K, A = w - (w - K), F = K - A, w = e * m, k = w - (w - m), q = m - k, G = F * q - (E - A * k - F * k - A * q), v = D - G, j = D - v, p[0] = D - (v + j) + (j - G), z = C + v, j = z - C, B = C - (z - j) + (v - j), v = B - E, j = B - v, p[1] = B - (v + j) + (j - E), H = z + v, j = H - z, p[2] = z - (H - j) + (v - j), p[3] = H; + const Q = s(P, M, 4, p, l); + C = x * T, w = e * x, A = w - (w - x), F = x - A, w = e * T, k = w - (w - T), q = T - k, D = F * q - (C - A * k - F * k - A * q), E = g * m, w = e * g, A = w - (w - g), F = g - A, w = e * m, k = w - (w - m), q = m - k, G = F * q - (E - A * k - F * k - A * q), v = D - G, j = D - v, p[0] = D - (v + j) + (j - G), z = C + v, j = z - C, B = C - (z - j) + (v - j), v = B - E, j = B - v, p[1] = B - (v + j) + (j - E), H = z + v, j = H - z, p[2] = z - (H - j) + (v - j), p[3] = H; + const R = s(Q, l, 4, p, d); + return d[R - 1]; + }(t, n, o, a, c, i, m); + }, t.orient2dfast = function (t, n, e, r, s, o) { + return (n - o) * (e - s) - (t - s) * (r - o); + }, t.orient3d = function (t, n, o, c, i, u, h, b, M, l, d, p) { + const C = t - l, + J = c - l, + O = h - l, + P = n - d, + Q = i - d, + R = b - d, + S = o - p, + U = u - p, + V = M - p, + W = J * R, + X = O * Q, + Y = O * P, + Z = C * R, + $ = C * Q, + _ = J * P, + tt = S * (W - X) + U * (Y - Z) + V * ($ - _), + nt = (Math.abs(W) + Math.abs(X)) * Math.abs(S) + (Math.abs(Y) + Math.abs(Z)) * Math.abs(U) + (Math.abs($) + Math.abs(_)) * Math.abs(V), + et = 7771561172376103e-31 * nt; + return tt > et || -tt > et ? tt : function (t, n, o, c, i, u, h, b, M, l, d, p, C) { + let J, O, P, Q, R, S, U, V, W, X, Y, Z, $, _, tt, nt, et, rt, st, ot, at, ct, ft, it; + const ut = t - l, + ht = c - l, + bt = h - l, + Mt = n - d, + lt = i - d, + dt = b - d, + pt = o - p, + yt = u - p, + xt = M - p; + ot = ht * dt, Z = e * ht, $ = Z - (Z - ht), _ = ht - $, Z = e * dt, tt = Z - (Z - dt), nt = dt - tt, at = _ * nt - (ot - $ * tt - _ * tt - $ * nt), ct = bt * lt, Z = e * bt, $ = Z - (Z - bt), _ = bt - $, Z = e * lt, tt = Z - (Z - lt), nt = lt - tt, ft = _ * nt - (ct - $ * tt - _ * tt - $ * nt), et = at - ft, Y = at - et, g[0] = at - (et + Y) + (Y - ft), rt = ot + et, Y = rt - ot, st = ot - (rt - Y) + (et - Y), et = st - ct, Y = st - et, g[1] = st - (et + Y) + (Y - ct), it = rt + et, Y = it - rt, g[2] = rt - (it - Y) + (et - Y), g[3] = it, ot = bt * Mt, Z = e * bt, $ = Z - (Z - bt), _ = bt - $, Z = e * Mt, tt = Z - (Z - Mt), nt = Mt - tt, at = _ * nt - (ot - $ * tt - _ * tt - $ * nt), ct = ut * dt, Z = e * ut, $ = Z - (Z - ut), _ = ut - $, Z = e * dt, tt = Z - (Z - dt), nt = dt - tt, ft = _ * nt - (ct - $ * tt - _ * tt - $ * nt), et = at - ft, Y = at - et, m[0] = at - (et + Y) + (Y - ft), rt = ot + et, Y = rt - ot, st = ot - (rt - Y) + (et - Y), et = st - ct, Y = st - et, m[1] = st - (et + Y) + (Y - ct), it = rt + et, Y = it - rt, m[2] = rt - (it - Y) + (et - Y), m[3] = it, ot = ut * lt, Z = e * ut, $ = Z - (Z - ut), _ = ut - $, Z = e * lt, tt = Z - (Z - lt), nt = lt - tt, at = _ * nt - (ot - $ * tt - _ * tt - $ * nt), ct = ht * Mt, Z = e * ht, $ = Z - (Z - ht), _ = ht - $, Z = e * Mt, tt = Z - (Z - Mt), nt = Mt - tt, ft = _ * nt - (ct - $ * tt - _ * tt - $ * nt), et = at - ft, Y = at - et, T[0] = at - (et + Y) + (Y - ft), rt = ot + et, Y = rt - ot, st = ot - (rt - Y) + (et - Y), et = st - ct, Y = st - et, T[1] = st - (et + Y) + (Y - ct), it = rt + et, Y = it - rt, T[2] = rt - (it - Y) + (et - Y), T[3] = it, J = s(s(a(4, g, pt, D), D, a(4, m, yt, E), E, G), G, a(4, T, xt, D), D, I); + let gt = f(J, I), + mt = y * C; + if (gt >= mt || -gt >= mt) return gt; + if (Y = t - ut, O = t - (ut + Y) + (Y - l), Y = c - ht, P = c - (ht + Y) + (Y - l), Y = h - bt, Q = h - (bt + Y) + (Y - l), Y = n - Mt, R = n - (Mt + Y) + (Y - d), Y = i - lt, S = i - (lt + Y) + (Y - d), Y = b - dt, U = b - (dt + Y) + (Y - d), Y = o - pt, V = o - (pt + Y) + (Y - p), Y = u - yt, W = u - (yt + Y) + (Y - p), Y = M - xt, X = M - (xt + Y) + (Y - p), 0 === O && 0 === P && 0 === Q && 0 === R && 0 === S && 0 === U && 0 === V && 0 === W && 0 === X) return gt; + if (mt = x * C + r * Math.abs(gt), gt += pt * (ht * U + dt * P - (lt * Q + bt * S)) + V * (ht * dt - lt * bt) + yt * (bt * R + Mt * Q - (dt * O + ut * U)) + W * (bt * Mt - dt * ut) + xt * (ut * S + lt * O - (Mt * P + ht * R)) + X * (ut * lt - Mt * ht), gt >= mt || -gt >= mt) return gt; + const Tt = L(O, R, ht, lt, bt, dt, j, w), + jt = L(P, S, bt, dt, ut, Mt, A, F), + wt = L(Q, U, ut, Mt, ht, lt, k, q), + At = s(jt, A, wt, q, v); + J = K(J, a(At, v, pt, G), G); + const Ft = s(wt, k, Tt, w, z); + J = K(J, a(Ft, z, yt, G), G); + const kt = s(Tt, j, jt, F, B); + return J = K(J, a(kt, B, xt, G), G), 0 !== V && (J = K(J, a(4, g, V, H), H), J = K(J, a(At, v, V, G), G)), 0 !== W && (J = K(J, a(4, m, W, H), H), J = K(J, a(Ft, z, W, G), G)), 0 !== X && (J = K(J, a(4, T, X, H), H), J = K(J, a(kt, B, X, G), G)), 0 !== O && (0 !== S && (J = N(J, O, S, xt, X)), 0 !== U && (J = N(J, -O, U, yt, W))), 0 !== P && (0 !== U && (J = N(J, P, U, pt, V)), 0 !== R && (J = N(J, -P, R, xt, X))), 0 !== Q && (0 !== R && (J = N(J, Q, R, yt, W)), 0 !== S && (J = N(J, -Q, S, pt, V))), I[J - 1]; + }(t, n, o, c, i, u, h, b, M, l, d, p, nt); + }, t.orient3dfast = function (t, n, e, r, s, o, a, c, f, i, u, h) { + const b = n - u, + M = s - u, + l = c - u, + d = e - h, + p = o - h, + y = f - h; + return (t - i) * (M * y - p * l) + (r - i) * (l * d - y * b) + (a - i) * (b * p - d * M); + }; +}); \ No newline at end of file diff --git a/packages/x-charts-vendor/lib/d3-array.js b/packages/x-charts-vendor/lib/d3-array.js new file mode 100644 index 000000000000..4b59539e0ec5 --- /dev/null +++ b/packages/x-charts-vendor/lib/d3-array.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/d3-array` (CommonJS) +// See upstream license: https://github.com/d3/d3-array/blob/main/LICENSE +// +// Our CommonJS package relies on transpiled vendor files in `lib-vendor/d3-array` +module.exports = require("../lib-vendor/d3-array/src/index.js"); diff --git a/packages/x-charts-vendor/lib/d3-color.js b/packages/x-charts-vendor/lib/d3-color.js new file mode 100644 index 000000000000..8b26c5d76a5e --- /dev/null +++ b/packages/x-charts-vendor/lib/d3-color.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/d3-color` (CommonJS) +// See upstream license: https://github.com/d3/d3-color/blob/main/LICENSE +// +// Our CommonJS package relies on transpiled vendor files in `lib-vendor/d3-color` +module.exports = require("../lib-vendor/d3-color/src/index.js"); diff --git a/packages/x-charts-vendor/lib/d3-delaunay.js b/packages/x-charts-vendor/lib/d3-delaunay.js new file mode 100644 index 000000000000..1ef27fe5c75d --- /dev/null +++ b/packages/x-charts-vendor/lib/d3-delaunay.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/d3-delaunay` (CommonJS) +// See upstream license: https://github.com/d3/d3-delaunay/blob/main/LICENSE +// +// Our CommonJS package relies on transpiled vendor files in `lib-vendor/d3-delaunay` +module.exports = require("../lib-vendor/d3-delaunay/src/index.js"); diff --git a/packages/x-charts-vendor/lib/d3-format.js b/packages/x-charts-vendor/lib/d3-format.js new file mode 100644 index 000000000000..c2b1a217e4e3 --- /dev/null +++ b/packages/x-charts-vendor/lib/d3-format.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/d3-format` (CommonJS) +// See upstream license: https://github.com/d3/d3-format/blob/main/LICENSE +// +// Our CommonJS package relies on transpiled vendor files in `lib-vendor/d3-format` +module.exports = require("../lib-vendor/d3-format/src/index.js"); diff --git a/packages/x-charts-vendor/lib/d3-interpolate.js b/packages/x-charts-vendor/lib/d3-interpolate.js new file mode 100644 index 000000000000..01c9066cc1f3 --- /dev/null +++ b/packages/x-charts-vendor/lib/d3-interpolate.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/d3-interpolate` (CommonJS) +// See upstream license: https://github.com/d3/d3-interpolate/blob/main/LICENSE +// +// Our CommonJS package relies on transpiled vendor files in `lib-vendor/d3-interpolate` +module.exports = require("../lib-vendor/d3-interpolate/src/index.js"); diff --git a/packages/x-charts-vendor/lib/d3-path.js b/packages/x-charts-vendor/lib/d3-path.js new file mode 100644 index 000000000000..ad74635ca0b6 --- /dev/null +++ b/packages/x-charts-vendor/lib/d3-path.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/d3-path` (CommonJS) +// See upstream license: https://github.com/d3/d3-path/blob/main/LICENSE +// +// Our CommonJS package relies on transpiled vendor files in `lib-vendor/d3-path` +module.exports = require("../lib-vendor/d3-path/src/index.js"); diff --git a/packages/x-charts-vendor/lib/d3-scale.js b/packages/x-charts-vendor/lib/d3-scale.js new file mode 100644 index 000000000000..366e8023abaf --- /dev/null +++ b/packages/x-charts-vendor/lib/d3-scale.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/d3-scale` (CommonJS) +// See upstream license: https://github.com/d3/d3-scale/blob/main/LICENSE +// +// Our CommonJS package relies on transpiled vendor files in `lib-vendor/d3-scale` +module.exports = require("../lib-vendor/d3-scale/src/index.js"); diff --git a/packages/x-charts-vendor/lib/d3-shape.js b/packages/x-charts-vendor/lib/d3-shape.js new file mode 100644 index 000000000000..3bd68e9fc4b4 --- /dev/null +++ b/packages/x-charts-vendor/lib/d3-shape.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/d3-shape` (CommonJS) +// See upstream license: https://github.com/d3/d3-shape/blob/main/LICENSE +// +// Our CommonJS package relies on transpiled vendor files in `lib-vendor/d3-shape` +module.exports = require("../lib-vendor/d3-shape/src/index.js"); diff --git a/packages/x-charts-vendor/lib/d3-time-format.js b/packages/x-charts-vendor/lib/d3-time-format.js new file mode 100644 index 000000000000..23b857c93aac --- /dev/null +++ b/packages/x-charts-vendor/lib/d3-time-format.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/d3-time-format` (CommonJS) +// See upstream license: https://github.com/d3/d3-time-format/blob/main/LICENSE +// +// Our CommonJS package relies on transpiled vendor files in `lib-vendor/d3-time-format` +module.exports = require("../lib-vendor/d3-time-format/src/index.js"); diff --git a/packages/x-charts-vendor/lib/d3-time.js b/packages/x-charts-vendor/lib/d3-time.js new file mode 100644 index 000000000000..49c7bafd5154 --- /dev/null +++ b/packages/x-charts-vendor/lib/d3-time.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/d3-time` (CommonJS) +// See upstream license: https://github.com/d3/d3-time/blob/main/LICENSE +// +// Our CommonJS package relies on transpiled vendor files in `lib-vendor/d3-time` +module.exports = require("../lib-vendor/d3-time/src/index.js"); diff --git a/packages/x-charts-vendor/lib/delaunator.js b/packages/x-charts-vendor/lib/delaunator.js new file mode 100644 index 000000000000..4e2803555cd8 --- /dev/null +++ b/packages/x-charts-vendor/lib/delaunator.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/delaunator` (CommonJS) +// See upstream license: https://github.com/mapbox/delaunator/blob/main/LICENSE +// +// Our CommonJS package relies on transpiled vendor files in `lib-vendor/delaunator` +module.exports = require("../lib-vendor/delaunator/src/index.js"); diff --git a/packages/x-charts-vendor/lib/internmap.js b/packages/x-charts-vendor/lib/internmap.js new file mode 100644 index 000000000000..b993414f8a02 --- /dev/null +++ b/packages/x-charts-vendor/lib/internmap.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/internmap` (CommonJS) +// See upstream license: https://github.com/mbostock/internmap/blob/main/LICENSE +// +// Our CommonJS package relies on transpiled vendor files in `lib-vendor/internmap` +module.exports = require("../lib-vendor/internmap/src/index.js"); diff --git a/packages/x-charts-vendor/lib/robust-predicates.js b/packages/x-charts-vendor/lib/robust-predicates.js new file mode 100644 index 000000000000..b32baa17f01b --- /dev/null +++ b/packages/x-charts-vendor/lib/robust-predicates.js @@ -0,0 +1,6 @@ + +// `x-charts-vendor/robust-predicates` (CommonJS) +// See upstream license: https://github.com/mourner/robust-predicates/blob/main/LICENSE +// +// Our CommonJS package relies on transpiled vendor files in `lib-vendor/robust-predicates` +module.exports = require("../lib-vendor/robust-predicates/src/index.js"); diff --git a/packages/x-charts-vendor/package.json b/packages/x-charts-vendor/package.json new file mode 100644 index 000000000000..92e890da5ca1 --- /dev/null +++ b/packages/x-charts-vendor/package.json @@ -0,0 +1,63 @@ +{ + "name": "@mui/x-charts-vendor", + "version": "7.8.0", + "description": "Vendored dependencies for MUI X Charts", + "author": "MUI Team", + "main": "./index.js", + "keywords": [ + "data visualization", + "React", + "d3", + "charting" + ], + "repository": { + "type": "git", + "url": "https://github.com/mui/mui-x" + }, + "license": "MIT AND ISC", + "exports": { + "./package.json": "./package.json", + "./*": { + "types": "./*.d.ts", + "import": "./es/*.js", + "default": "./lib/*.js" + } + }, + "dependencies": { + "@babel/runtime": "^7.25.0", + "d3-color": "^3.1.0", + "d3-delaunay": "^6.0.4", + "d3-interpolate": "^3.0.1", + "d3-scale": "^4.0.2", + "d3-shape": "^3.2.0", + "d3-time": "^3.1.0", + "@types/d3-color": "^3.1.3", + "@types/d3-delaunay": "^6.0.4", + "@types/d3-interpolate": "^3.0.4", + "@types/d3-scale": "^4.0.8", + "@types/d3-shape": "^3.1.6", + "@types/d3-time": "^3.0.3", + "robust-predicates": "^3.0.2", + "delaunator": "^5.0.1" + }, + "devDependencies": { + "d3-format": "^3.1.0", + "d3-time-format": "^4.1.0", + "d3-path": "^3.0.1", + "d3-array": "^3.1.6", + "@types/d3-format": "^3.0.4", + "@types/d3-time-format": "^4.0.3", + "@types/d3-path": "^3.0.1", + "@types/d3-array": "^3.0.3", + "internmap": "^2.0.3", + "execa": "^9.3.0", + "rimraf": "^5.0.8", + "@babel/plugin-transform-runtime": "^7.24.7" + }, + "publishConfig": { + "provenance": true + }, + "scripts": { + "build": "node ./scripts/build.js" + } +} diff --git a/packages/x-charts-vendor/robust-predicates.d.ts b/packages/x-charts-vendor/robust-predicates.d.ts new file mode 100644 index 000000000000..fcc94a14628c --- /dev/null +++ b/packages/x-charts-vendor/robust-predicates.d.ts @@ -0,0 +1,5 @@ + +// `x-charts-vendor/robust-predicates` (TypeScript) +// +// Export the type definitions for this package: +export * from "robust-predicates"; diff --git a/packages/x-charts-vendor/robust-predicates.js b/packages/x-charts-vendor/robust-predicates.js new file mode 100644 index 000000000000..8bfbb3d6ae38 --- /dev/null +++ b/packages/x-charts-vendor/robust-predicates.js @@ -0,0 +1,7 @@ + +// `x-charts-vendor/robust-predicates` (CommonJS) +// See upstream license: https://github.com/mourner/robust-predicates/blob/main/LICENSE +// +// This file only exists for tooling that doesn't work yet with package.json:exports +// by proxying through the CommonJS version. +module.exports = require("./lib/robust-predicates"); diff --git a/packages/x-charts-vendor/scripts/build.js b/packages/x-charts-vendor/scripts/build.js new file mode 100644 index 000000000000..169e75aee51c --- /dev/null +++ b/packages/x-charts-vendor/scripts/build.js @@ -0,0 +1,148 @@ +/* global __dirname:false */ +/** + * Build d3 vendor libraries from `node_modules`. + * + * **Note - transitive dependencies**: Because pnpm lacks a `nohoist` option, + * if you have a `d3-*` dependency that has a transitive dependency on another + * module (e.g., `d3-interpolate` depends on `d3-color`) you need to add a + * compatible version to `package.json:devDependencies` here to make sure we + * get the library in our `node_modules` and appropriately build it. + */ +const fs = require('fs').promises; +const path = require('path'); + +const { rimraf } = require('rimraf'); + +const vendorPkg = require('../package.json'); +const VENDOR_PKGS = new Set(Object.keys(vendorPkg.dependencies)); + +const { log, error } = console; // eslint-disable-line no-undef + +// Templates. +const getEsmIndex = (pkg) => ` +// \`x-charts-vendor/${pkg.name}\` (ESM) +// See upstream license: ${pkg.repository.url.replace(/\.git$/, '')}/blob/main/LICENSE +// +// Our ESM package uses the underlying installed dependencies of \`node_modules/${pkg.name}\` +export * from "${pkg.name}"; +`; + +const getCjsIndex = (pkg) => ` +// \`x-charts-vendor/${pkg.name}\` (CommonJS) +// See upstream license: ${pkg.repository.url.replace(/\.git$/, '')}/blob/main/LICENSE +// +// Our CommonJS package relies on transpiled vendor files in \`lib-vendor/${pkg.name}\` +module.exports = require("../lib-vendor/${pkg.name}/src/index.js"); +`; + +const getCjsRootIndex = (pkg) => ` +// \`x-charts-vendor/${pkg.name}\` (CommonJS) +// See upstream license: ${pkg.repository.url.replace(/\.git$/, '')}/blob/main/LICENSE +// +// This file only exists for tooling that doesn't work yet with package.json:exports +// by proxying through the CommonJS version. +module.exports = require("./lib/${pkg.name}"); +`; + +const getTypeDefinitionFile = (pkg) => ` +// \`x-charts-vendor/${pkg.name}\` (TypeScript) +// +// Export the type definitions for this package: +export * from "${pkg.name}"; +`; + +// Main. +const main = async () => { + // Lazy ESM imports. + const { execa } = await import('execa'); + + // Get d3-related packages we want to vendor. + const pkgs = (await fs.readdir(path.resolve(__dirname, '../node_modules/'))).filter((name) => + /^(d3-|internmap|delaunator|robust-predicates)/.test(name), + ); + + // Safety check: we assume that **all** are flattened to root level of this + // package, and want to make sure there are no nested dependencies. + for (const pkgName of pkgs) { + const pkgModsPath = path.resolve(__dirname, `../node_modules/git${pkgName}/node_modules`); + const stat = await fs.lstat(pkgModsPath).catch(() => null); + if (stat) { + throw new Error(`Found nested modules: ${pkgModsPath}`); + } + } + + // Clean out and ensure base library paths exist + const EsmBasePath = path.resolve(__dirname, `../es`); + const CjsBasePath = path.resolve(__dirname, `../lib`); + const VendorBasePath = path.resolve(__dirname, `../lib-vendor`); + const baseDirs = [EsmBasePath, CjsBasePath, VendorBasePath]; + const cleanGlobs = [].concat( + baseDirs, + path.resolve(__dirname, '../d3-*'), + path.resolve(__dirname, '../internmap'), + path.resolve(__dirname, '../delaunator'), + path.resolve(__dirname, '../robust-predicates'), + ); + + log('Cleaning old vendor directories.'); + await Promise.all(cleanGlobs.map((glob) => rimraf(glob))); + log('Creating empty vendor directories.'); + await Promise.all(baseDirs.map((libPath) => fs.mkdir(libPath, { recursive: true }))); + + // Transpile. + log('Transpiling vendor sources.'); + await execa( + 'pnpm', + [ + 'babel', + '--config-file', + path.resolve(__dirname, '../.babelrc.js'), + '-d', + path.resolve(__dirname, '../lib-vendor'), + path.resolve(__dirname, '../node_modules'), + ], + { + stdio: 'inherit', + }, + ); + + // Iterate and generate index files. + log('Copying licenses and generating indexes.'); + for (const pkgName of pkgs) { + log(`- ${pkgName}`); + + const pkgBase = path.resolve(__dirname, `../node_modules/${pkgName}`); + const pkgPath = path.join(pkgBase, `package.json`); + const pkg = await fs.readFile(pkgPath).then((buf) => JSON.parse(buf.toString())); + const libVendorPath = path.resolve(__dirname, `../lib-vendor/${pkgName}`); + + // Create library indexes and copy licenses to `lib-vendor. + await Promise.all([ + fs.writeFile(path.join(EsmBasePath, `${pkgName}.js`), getEsmIndex(pkg)), + fs.writeFile(path.join(CjsBasePath, `${pkgName}.js`), getCjsIndex(pkg)), + fs + .copyFile(path.join(pkgBase, 'LICENSE'), path.join(libVendorPath, 'LICENSE')) + .catch((error) => { + // The package has no license file + }), + // Root hack file for non package.json:exports systems + VENDOR_PKGS.has(pkgName) && + fs.writeFile(path.resolve(__dirname, `../${pkgName}.js`), getCjsRootIndex(pkg)), + // Generate TypeScript definitions + VENDOR_PKGS.has(pkgName) && + fs.writeFile(path.resolve(__dirname, `../${pkgName}.d.ts`), getTypeDefinitionFile(pkg)), + ]); + } +}; + +if (require.main === module) { + main() + // eslint-disable-next-line promise/always-return + .then(() => { + log('Build finished.'); + }) + .catch((err) => { + error(err); + process.exit(-1); + }); +} diff --git a/packages/x-charts-vendor/tests/d3-interpolate.test.ts b/packages/x-charts-vendor/tests/d3-interpolate.test.ts new file mode 100644 index 000000000000..ca28b08af8d7 --- /dev/null +++ b/packages/x-charts-vendor/tests/d3-interpolate.test.ts @@ -0,0 +1,19 @@ +import { expect } from 'chai'; + +/* + * This test verifies that these modules and types are exported correctly + */ + +/* eslint-disable @typescript-eslint/no-unused-vars */ +import { + // @ts-expect-error Make sure invalid imports fail: + INVALID_TYPE, + interpolate, + NumberArray, +} from '@mui/x-charts-vendor/d3-interpolate'; + +describe('d3-interpolate', () => { + it('exports valid functions', () => { + expect(interpolate).instanceOf(Function); + }); +}); diff --git a/packages/x-charts-vendor/tests/d3-scale.test.ts b/packages/x-charts-vendor/tests/d3-scale.test.ts new file mode 100644 index 000000000000..d27f29054c4e --- /dev/null +++ b/packages/x-charts-vendor/tests/d3-scale.test.ts @@ -0,0 +1,65 @@ +import { expect } from 'chai'; + +/* eslint-disable @typescript-eslint/no-unused-vars */ +import { + // @ts-expect-error Make sure invalid imports fail: + INVALID_TYPE, + InterpolatorFactory, + NumberValue, + ScaleBand, + ScaleContinuousNumeric, + ScaleDiverging, + ScaleIdentity, + ScaleLinear, + ScaleLogarithmic, + ScaleOrdinal, + ScalePoint, + ScalePower, + ScaleQuantile, + ScaleQuantize, + ScaleRadial, + ScaleSequential, + ScaleSequentialBase, + ScaleSequentialQuantile, + ScaleSymLog, + ScaleThreshold, + ScaleTime, + UnknownReturnType, + scaleBand, + scaleDiverging, + scaleDivergingLog, + scaleDivergingPow, + scaleDivergingSqrt, + scaleDivergingSymlog, + scaleIdentity, + scaleImplicit, + scaleLinear, + scaleLog, + scaleOrdinal, + scalePoint, + scalePow, + scaleQuantile, + scaleQuantize, + scaleRadial, + scaleSequential, + scaleSequentialLog, + scaleSequentialPow, + scaleSequentialQuantile, + scaleSequentialSqrt, + scaleSequentialSymlog, + scaleSqrt, + scaleSymlog, + scaleThreshold, + scaleTime, + scaleUtc, + tickFormat, +} from '@mui/x-charts-vendor/d3-scale'; + +describe('d3-scale', () => { + it('exports valid functions', () => { + expect(scaleLinear).instanceOf(Function); + expect(scaleLog).instanceOf(Function); + expect(scalePow).instanceOf(Function); + expect(scaleSqrt).instanceOf(Function); + }); +}); diff --git a/packages/x-charts-vendor/tsconfig.json b/packages/x-charts-vendor/tsconfig.json new file mode 100644 index 000000000000..9b6eb7748db0 --- /dev/null +++ b/packages/x-charts-vendor/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "types": ["mocha", "node"] + }, + "exclude": ["es", "lib", "jest.config.ts"] +} diff --git a/packages/x-charts/.mocharc.js b/packages/x-charts/.mocharc.js deleted file mode 100644 index 8c6c28b43a26..000000000000 --- a/packages/x-charts/.mocharc.js +++ /dev/null @@ -1,34 +0,0 @@ -// We can't import the `.mocharc.js` of the monorepo, otherwise we trigger its `setupBabel`. -module.exports = { - extension: ['js', 'ts', 'tsx'], - ignore: [ - '**/build/**', - '**/node_modules/**', - // Mocha seems to ignore .next anyway (maybe because dotfiles?). - // We're leaving this to make sure. - 'docs/.next/**', - ], - recursive: true, - timeout: (process.env.CIRCLECI === 'true' ? 5 : 2) * 1000, // Circle CI has low-performance CPUs. - reporter: 'dot', - require: [ - require.resolve('../../test/utils/setupBabel'), - // Not strictly necessary, but just to keep the babel plugins in the loop for the tests - // For compiling pure ESM modules that @babel/register can't handle. - // See https://babeljs.io/docs/babel-register#experimental-babel-8-implementation - // Note: @babel/register does not support compiling native Node.js ES modules on the fly, - // since currently there is no stable API for intercepting ES modules loading. - require.resolve('tsx/cjs'), - require.resolve('../../test/utils/setupJSDOM'), - ], - 'watch-ignore': [ - // default - '.git', - // node_modules can be nested with workspaces - '**/node_modules/**', - // Unrelated directories with a large number of files - '**/build/**', - 'docs/.next/**', - ], - spec: ['packages/x-charts{,-pro,-premium}/**/*.test.{js,ts,tsx}'], -}; diff --git a/packages/x-charts/package.json b/packages/x-charts/package.json index ec1e16987e58..28fc77a6daad 100644 --- a/packages/x-charts/package.json +++ b/packages/x-charts/package.json @@ -1,6 +1,6 @@ { "name": "@mui/x-charts", - "version": "7.11.0", + "version": "7.11.1", "description": "The community edition of the Charts components (MUI X).", "author": "MUI Team", "main": "./src/index.js", @@ -39,19 +39,14 @@ "directory": "packages/x-charts" }, "dependencies": { - "@babel/runtime": "^7.24.8", - "@mui/base": "^5.0.0-beta.40", - "@mui/system": "^5.16.2", - "@mui/utils": "^5.16.2", - "@react-spring/rafz": "^9.7.3", - "@react-spring/web": "^9.7.3", + "@babel/runtime": "^7.25.0", + "@mui/system": "^5.16.5", + "@mui/utils": "^5.16.5", + "@react-spring/rafz": "^9.7.4", + "@react-spring/web": "^9.7.4", "clsx": "^2.1.1", - "d3-color": "^3.1.0", - "d3-delaunay": "^6.0.4", - "d3-interpolate": "^3.0.1", - "d3-scale": "^4.0.2", - "d3-shape": "^3.2.0", - "prop-types": "^15.8.1" + "prop-types": "^15.8.1", + "@mui/x-charts-vendor": "workspace:*" }, "peerDependencies": { "@emotion/react": "^11.9.0", @@ -69,29 +64,12 @@ } }, "devDependencies": { - "@mui/internal-test-utils": "^1.0.4", - "@react-spring/core": "^9.7.3", - "@react-spring/shared": "^9.7.3", - "@types/d3-color": "^3.1.3", - "@types/d3-delaunay": "^6.0.4", - "@types/d3-interpolate": "^3.0.4", - "@types/d3-scale": "^4.0.8", - "@types/d3-shape": "^3.1.6", + "@mui/internal-test-utils": "^1.0.5", + "@react-spring/core": "^9.7.4", + "@react-spring/shared": "^9.7.4", "@types/prop-types": "^15.7.12", "csstype": "^3.1.3", - "rimraf": "^5.0.8" - }, - "exports": { - ".": { - "types": "./index.d.ts", - "import": "./esm/index.js", - "default": "./esm/index.js" - }, - "./*": { - "types": "./*/index.d.ts", - "import": "./esm/*/index.js", - "default": "./esm/*/index.js" - } + "rimraf": "^5.0.9" }, "engines": { "node": ">=14.0.0" diff --git a/packages/x-charts/src/BarChart/BarChart.tsx b/packages/x-charts/src/BarChart/BarChart.tsx index 7fa7ecba0990..b106c2251715 100644 --- a/packages/x-charts/src/BarChart/BarChart.tsx +++ b/packages/x-charts/src/BarChart/BarChart.tsx @@ -340,7 +340,6 @@ BarChart.propTypes = { */ xAxis: PropTypes.arrayOf( PropTypes.shape({ - axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), classes: PropTypes.object, colorMap: PropTypes.oneOfType([ PropTypes.shape({ @@ -411,7 +410,6 @@ BarChart.propTypes = { */ yAxis: PropTypes.arrayOf( PropTypes.shape({ - axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), classes: PropTypes.object, colorMap: PropTypes.oneOfType([ PropTypes.shape({ diff --git a/packages/x-charts/src/BarChart/BarElement.tsx b/packages/x-charts/src/BarChart/BarElement.tsx index 38d082f58d34..e9359eae9fd9 100644 --- a/packages/x-charts/src/BarChart/BarElement.tsx +++ b/packages/x-charts/src/BarChart/BarElement.tsx @@ -1,12 +1,13 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import composeClasses from '@mui/utils/composeClasses'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import generateUtilityClass from '@mui/utils/generateUtilityClass'; import { styled } from '@mui/material/styles'; -import { color as d3Color } from 'd3-color'; import generateUtilityClasses from '@mui/utils/generateUtilityClasses'; +import { color as d3Color } from '@mui/x-charts-vendor/d3-color'; import { AnimatedProps, animated } from '@react-spring/web'; +import { SlotComponentPropsFromProps } from '../internals/SlotComponentPropsFromProps'; import { useInteractionItemProps } from '../hooks/useInteractionItemProps'; import { SeriesId } from '../models/seriesType/common'; import { useItemHighlighted } from '../context'; @@ -78,9 +79,8 @@ export interface BarElementSlots { */ bar?: React.ElementType; } - export interface BarElementSlotProps { - bar?: Partial; + bar?: SlotComponentPropsFromProps; } export type BarElementProps = Omit & diff --git a/packages/x-charts/src/BarChart/BarLabel/BarLabelItem.tsx b/packages/x-charts/src/BarChart/BarLabel/BarLabelItem.tsx index f162efb6aa52..a71c3c7a4a29 100644 --- a/packages/x-charts/src/BarChart/BarLabel/BarLabelItem.tsx +++ b/packages/x-charts/src/BarChart/BarLabel/BarLabelItem.tsx @@ -1,6 +1,7 @@ import * as React from 'react'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import PropTypes from 'prop-types'; +import { SlotComponentPropsFromProps } from '../../internals/SlotComponentPropsFromProps'; import { useUtilityClasses } from './barLabelClasses'; import { BarLabelOwnerState, BarItem, BarLabelContext } from './BarLabel.types'; import { getBarLabel } from './getBarLabel'; @@ -16,7 +17,7 @@ export interface BarLabelSlots { } export interface BarLabelSlotProps { - barLabel?: Partial; + barLabel?: SlotComponentPropsFromProps; } export type BarLabelItemProps = Omit & diff --git a/packages/x-charts/src/BarChart/BarPlot.tsx b/packages/x-charts/src/BarChart/BarPlot.tsx index bab8699fe686..0fcec46bc62b 100644 --- a/packages/x-charts/src/BarChart/BarPlot.tsx +++ b/packages/x-charts/src/BarChart/BarPlot.tsx @@ -101,15 +101,15 @@ const useAggregatedData = (): { const data = stackingGroups.flatMap(({ ids: groupIds }, groupIndex) => { return groupIds.flatMap((seriesId) => { - const xAxisKey = series[seriesId].xAxisKey ?? defaultXAxisId; - const yAxisKey = series[seriesId].yAxisKey ?? defaultYAxisId; + const xAxisId = series[seriesId].xAxisId ?? series[seriesId].xAxisKey ?? defaultXAxisId; + const yAxisId = series[seriesId].yAxisId ?? series[seriesId].yAxisKey ?? defaultYAxisId; - const xAxisConfig = xAxis[xAxisKey]; - const yAxisConfig = yAxis[yAxisKey]; + const xAxisConfig = xAxis[xAxisId]; + const yAxisConfig = yAxis[yAxisId]; const verticalLayout = series[seriesId].layout === 'vertical'; - checkScaleErrors(verticalLayout, seriesId, xAxisKey, xAxis, yAxisKey, yAxis); + checkScaleErrors(verticalLayout, seriesId, xAxisId, xAxis, yAxisId, yAxis); const baseScaleConfig = ( verticalLayout ? xAxisConfig : yAxisConfig @@ -118,7 +118,7 @@ const useAggregatedData = (): { const xScale = xAxisConfig.scale; const yScale = yAxisConfig.scale; - const colorGetter = getColor(series[seriesId], xAxis[xAxisKey], yAxis[yAxisKey]); + const colorGetter = getColor(series[seriesId], xAxis[xAxisId], yAxis[yAxisId]); const bandWidth = baseScaleConfig.scale.bandwidth(); const { barWidth, offset } = getBandSize({ @@ -142,12 +142,8 @@ const useAggregatedData = (): { seriesId, dataIndex, layout: series[seriesId].layout, - x: verticalLayout - ? xScale(xAxis[xAxisKey].data?.[dataIndex])! + barOffset - : minValueCoord, - y: verticalLayout - ? minValueCoord - : yScale(yAxis[yAxisKey].data?.[dataIndex])! + barOffset, + x: verticalLayout ? xScale(xAxis[xAxisId].data?.[dataIndex])! + barOffset : minValueCoord, + y: verticalLayout ? minValueCoord : yScale(yAxis[yAxisId].data?.[dataIndex])! + barOffset, xOrigin: xScale(0)!, yOrigin: yScale(0)!, height: verticalLayout ? maxValueCoord - minValueCoord : barWidth, diff --git a/packages/x-charts/src/BarChart/checkScaleErrors.test.ts b/packages/x-charts/src/BarChart/checkScaleErrors.test.ts index 6e780a309ad3..219e6f6d1a47 100644 --- a/packages/x-charts/src/BarChart/checkScaleErrors.test.ts +++ b/packages/x-charts/src/BarChart/checkScaleErrors.test.ts @@ -22,7 +22,7 @@ describe('BarChart - checkScaleErrors', () => { }, ); }).throws( - 'MUI X Charts: The first `xAxis` should be of type "band" to display the bar series of id "seriesId".', + 'MUI X: The first `xAxis` should be of type "band" to display the bar series of id "seriesId".', ); }); @@ -43,7 +43,7 @@ describe('BarChart - checkScaleErrors', () => { [yKey]: { id: yKey, scaleType: 'linear' }, }, ); - }).throws('MUI X Charts: The first `xAxis` should have data property.'); + }).throws('MUI X: The first `xAxis` should have data property.'); }); it('should throw an error when the y-axis is not a continuous scale', () => { @@ -64,7 +64,7 @@ describe('BarChart - checkScaleErrors', () => { }, ); }).throws( - 'MUI X Charts: The first `yAxis` should be a continuous type to display the bar series of id "seriesId".', + 'MUI X: The first `yAxis` should be a continuous type to display the bar series of id "seriesId".', ); }); @@ -108,7 +108,7 @@ describe('BarChart - checkScaleErrors', () => { }, ); }).throws( - 'MUI X Charts: The first `yAxis` should be of type "band" to display the bar series of id "seriesId".', + 'MUI X: The first `yAxis` should be of type "band" to display the bar series of id "seriesId".', ); }); @@ -129,7 +129,7 @@ describe('BarChart - checkScaleErrors', () => { [yKey]: { id: yKey, scaleType: 'band' }, }, ); - }).throws('MUI X Charts: The first `yAxis` should have data property.'); + }).throws('MUI X: The first `yAxis` should have data property.'); }); it('should throw an error when the x-axis is not a continuous scale', () => { @@ -150,7 +150,7 @@ describe('BarChart - checkScaleErrors', () => { }, ); }).throws( - 'MUI X Charts: The first `xAxis` should be a continuous type to display the bar series of id "seriesId".', + 'MUI X: The first `xAxis` should be a continuous type to display the bar series of id "seriesId".', ); }); @@ -193,7 +193,7 @@ describe('BarChart - checkScaleErrors', () => { }, ); }).throws( - 'MUI X Charts: The x-axis with id "x-test" should be of type "band" to display the bar series of id "seriesId".', + 'MUI X: The x-axis with id "x-test" should be of type "band" to display the bar series of id "seriesId".', ); }); @@ -215,7 +215,7 @@ describe('BarChart - checkScaleErrors', () => { }, ); }).throws( - 'MUI X Charts: The y-axis with id "y-test" should be of type "band" to display the bar series of id "seriesId".', + 'MUI X: The y-axis with id "y-test" should be of type "band" to display the bar series of id "seriesId".', ); }); }); diff --git a/packages/x-charts/src/BarChart/checkScaleErrors.ts b/packages/x-charts/src/BarChart/checkScaleErrors.ts index cbd3137b11d5..95d67e2b1db8 100644 --- a/packages/x-charts/src/BarChart/checkScaleErrors.ts +++ b/packages/x-charts/src/BarChart/checkScaleErrors.ts @@ -2,48 +2,48 @@ import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from '../constants'; import { AxisDefaultized, AxisId, isBandScaleConfig, isPointScaleConfig } from '../models/axis'; import { SeriesId } from '../models/seriesType/common'; -const getAxisMessage = (axisDirection: 'x' | 'y', axisKey: AxisId) => { +const getAxisMessage = (axisDirection: 'x' | 'y', axisId: AxisId) => { const axisName = `${axisDirection}-axis`; - const axisKeyName = `${axisDirection}Axis`; + const axisIdName = `${axisDirection}Axis`; const axisDefaultKey = axisDirection === 'x' ? DEFAULT_X_AXIS_KEY : DEFAULT_Y_AXIS_KEY; - return axisKey === axisDefaultKey - ? `The first \`${axisKeyName}\`` - : `The ${axisName} with id "${axisKey}"`; + return axisId === axisDefaultKey + ? `The first \`${axisIdName}\`` + : `The ${axisName} with id "${axisId}"`; }; export function checkScaleErrors( verticalLayout: boolean, seriesId: SeriesId, - xAxisKey: AxisId, - xAxis: { [axisKey: AxisId]: AxisDefaultized }, - yAxisKey: AxisId, - yAxis: { [axisKey: AxisId]: AxisDefaultized }, + xAxisId: AxisId, + xAxis: { [axisId: AxisId]: AxisDefaultized }, + yAxisId: AxisId, + yAxis: { [axisId: AxisId]: AxisDefaultized }, ): void { - const xAxisConfig = xAxis[xAxisKey]; - const yAxisConfig = yAxis[yAxisKey]; + const xAxisConfig = xAxis[xAxisId]; + const yAxisConfig = yAxis[yAxisId]; const discreteAxisConfig = verticalLayout ? xAxisConfig : yAxisConfig; const continuousAxisConfig = verticalLayout ? yAxisConfig : xAxisConfig; - const discreteAxisKey = verticalLayout ? xAxisKey : yAxisKey; - const continuousAxisKey = verticalLayout ? yAxisKey : xAxisKey; + const discreteAxisId = verticalLayout ? xAxisId : yAxisId; + const continuousAxisId = verticalLayout ? yAxisId : xAxisId; const discreteAxisDirection = verticalLayout ? 'x' : 'y'; const continuousAxisDirection = verticalLayout ? 'y' : 'x'; if (!isBandScaleConfig(discreteAxisConfig)) { throw new Error( - `MUI X Charts: ${getAxisMessage(discreteAxisDirection, discreteAxisKey)} should be of type "band" to display the bar series of id "${seriesId}".`, + `MUI X: ${getAxisMessage(discreteAxisDirection, discreteAxisId)} should be of type "band" to display the bar series of id "${seriesId}".`, ); } if (discreteAxisConfig.data === undefined) { throw new Error( - `MUI X Charts: ${getAxisMessage(discreteAxisDirection, discreteAxisKey)} should have data property.`, + `MUI X: ${getAxisMessage(discreteAxisDirection, discreteAxisId)} should have data property.`, ); } if (isBandScaleConfig(continuousAxisConfig) || isPointScaleConfig(continuousAxisConfig)) { throw new Error( - `MUI X Charts: ${getAxisMessage(continuousAxisDirection, continuousAxisKey)} should be a continuous type to display the bar series of id "${seriesId}".`, + `MUI X: ${getAxisMessage(continuousAxisDirection, continuousAxisId)} should be a continuous type to display the bar series of id "${seriesId}".`, ); } } diff --git a/packages/x-charts/src/BarChart/extremums.ts b/packages/x-charts/src/BarChart/extremums.ts index b2ea914188be..19a1913290dc 100644 --- a/packages/x-charts/src/BarChart/extremums.ts +++ b/packages/x-charts/src/BarChart/extremums.ts @@ -12,11 +12,10 @@ const getValueExtremum: ExtremumGetter<'bar'> = (params) => { const { series, axis, isDefaultAxis } = params; return Object.keys(series) - .filter( - (seriesId) => - series[seriesId].yAxisKey === axis.id || - (isDefaultAxis && series[seriesId].yAxisKey === undefined), - ) + .filter((seriesId) => { + const yAxisId = series[seriesId].yAxisId ?? series[seriesId].yAxisKey; + return yAxisId === axis.id || (isDefaultAxis && yAxisId === undefined); + }) .reduce( (acc: ExtremumGetterResult, seriesId) => { const [seriesMin, seriesMax] = series[seriesId].stackedData?.reduce( diff --git a/packages/x-charts/src/BarChart/formatter.ts b/packages/x-charts/src/BarChart/formatter.ts index 362f58e1d910..3fd9f07ae17c 100644 --- a/packages/x-charts/src/BarChart/formatter.ts +++ b/packages/x-charts/src/BarChart/formatter.ts @@ -1,4 +1,4 @@ -import { stack as d3Stack } from 'd3-shape'; +import { stack as d3Stack } from '@mui/x-charts-vendor/d3-shape'; import { getStackingGroups } from '../internals/stackSeries'; import { ChartSeries, @@ -33,7 +33,7 @@ const formatter: Formatter<'bar'> = (params, dataset) => { } else if (dataset === undefined) { throw new Error( [ - `MUI X Charts: bar series with id='${id}' has no data.`, + `MUI X: bar series with id='${id}' has no data.`, 'Either provide a data property to the series or use the dataset prop.', ].join('\n'), ); @@ -69,10 +69,12 @@ const formatter: Formatter<'bar'> = (params, dataset) => { if (typeof value !== 'number') { if (process.env.NODE_ENV !== 'production' && !warnOnce && value !== null) { warnOnce = true; - console.error([ - `MUI X charts: your dataset key "${dataKey}" is used for plotting bars, but contains nonnumerical elements.`, - 'Bar plots only support numbers and null values.', - ]); + console.error( + [ + `MUI X charts: your dataset key "${dataKey}" is used for plotting bars, but contains nonnumerical elements.`, + 'Bar plots only support numbers and null values.', + ].join('\n'), + ); } return 0; } diff --git a/packages/x-charts/src/ChartContainer/ChartContainer.tsx b/packages/x-charts/src/ChartContainer/ChartContainer.tsx index c63093455f31..2d5555891a35 100644 --- a/packages/x-charts/src/ChartContainer/ChartContainer.tsx +++ b/packages/x-charts/src/ChartContainer/ChartContainer.tsx @@ -1,10 +1,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { DrawingProvider, DrawingProviderProps } from '../context/DrawingProvider'; -import { - SeriesContextProvider, - SeriesContextProviderProps, -} from '../context/SeriesContextProvider'; +import { SeriesProvider, SeriesProviderProps } from '../context/SeriesProvider'; import { InteractionProvider } from '../context/InteractionProvider'; import { ColorProvider } from '../context/ColorProvider'; import { ChartsSurface, ChartsSurfaceProps } from '../ChartsSurface'; @@ -27,7 +24,7 @@ import { MakeOptional } from '../models/helpers'; export type ChartContainerProps = Omit< ChartsSurfaceProps & - Omit & + Omit & Omit & Pick & ZAxisContextProviderProps & @@ -59,7 +56,7 @@ const ChartContainer = React.forwardRef(function ChartContainer(props: ChartCont children, drawingProviderProps, colorProviderProps, - seriesContextProps, + seriesProviderProps, cartesianContextProps, zAxisContextProps, highlightedProviderProps, @@ -69,7 +66,7 @@ const ChartContainer = React.forwardRef(function ChartContainer(props: ChartCont return ( - + @@ -82,7 +79,7 @@ const ChartContainer = React.forwardRef(function ChartContainer(props: ChartCont - + ); @@ -174,7 +171,6 @@ ChartContainer.propTypes = { */ xAxis: PropTypes.arrayOf( PropTypes.shape({ - axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), classes: PropTypes.object, colorMap: PropTypes.oneOfType([ PropTypes.shape({ @@ -245,7 +241,6 @@ ChartContainer.propTypes = { */ yAxis: PropTypes.arrayOf( PropTypes.shape({ - axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), classes: PropTypes.object, colorMap: PropTypes.oneOfType([ PropTypes.shape({ diff --git a/packages/x-charts/src/ChartContainer/useChartContainerProps.ts b/packages/x-charts/src/ChartContainer/useChartContainerProps.ts index 2cf69e5c2a09..b25c480bebef 100644 --- a/packages/x-charts/src/ChartContainer/useChartContainerProps.ts +++ b/packages/x-charts/src/ChartContainer/useChartContainerProps.ts @@ -1,7 +1,7 @@ import type { DrawingProviderProps } from '../context/DrawingProvider'; import type { ColorProviderProps } from '../context/ColorProvider'; import type { CartesianContextProviderProps } from '../context/CartesianProvider'; -import type { SeriesContextProviderProps } from '../context/SeriesContextProvider'; +import type { SeriesProviderProps } from '../context/SeriesProvider'; import type { ZAxisContextProviderProps } from '../context/ZAxisContextProvider'; import type { ChartContainerProps } from './ChartContainer'; import { useChartContainerHooks } from './useChartContainerHooks'; @@ -56,7 +56,7 @@ export const useChartContainerProps = ( colorProcessors, }; - const seriesContextProps: Omit = { + const seriesProviderProps: Omit = { series, colors, dataset, @@ -96,7 +96,7 @@ export const useChartContainerProps = ( children, drawingProviderProps, colorProviderProps, - seriesContextProps, + seriesProviderProps, cartesianContextProps, zAxisContextProps, highlightedProviderProps, diff --git a/packages/x-charts/src/ChartContainer/usePluginsMerge.ts b/packages/x-charts/src/ChartContainer/usePluginsMerge.ts index b269bf79adfb..66d9034424b3 100644 --- a/packages/x-charts/src/ChartContainer/usePluginsMerge.ts +++ b/packages/x-charts/src/ChartContainer/usePluginsMerge.ts @@ -1,7 +1,7 @@ import * as React from 'react'; import { ChartsPluginType, ColorProcessorsConfig, ExtremumGettersConfig } from '../models'; import { ChartSeriesType } from '../models/seriesType/config'; -import { SeriesFormatterConfig } from '../context/SeriesContextProvider'; +import { SeriesFormatterConfig } from '../context/SeriesProvider'; import { defaultPlugins } from './defaultPlugins'; export function usePluginsMerge(plugins?: ChartsPluginType[]) { diff --git a/packages/x-charts/src/ChartsAxis/ChartsAxis.tsx b/packages/x-charts/src/ChartsAxis/ChartsAxis.tsx index 4212e2950954..7ebbf743930a 100644 --- a/packages/x-charts/src/ChartsAxis/ChartsAxis.tsx +++ b/packages/x-charts/src/ChartsAxis/ChartsAxis.tsx @@ -99,7 +99,7 @@ function ChartsAxis(props: ChartsAxisProps) { if (topId !== null && !xAxis[topId]) { throw Error( [ - `MUI X Charts: id used for top axis "${topId}" is not defined.`, + `MUI X: id used for top axis "${topId}" is not defined.`, `Available ids are: ${xAxisIds.join(', ')}.`, ].join('\n'), ); @@ -107,7 +107,7 @@ function ChartsAxis(props: ChartsAxisProps) { if (leftId !== null && !yAxis[leftId]) { throw Error( [ - `MUI X Charts: id used for left axis "${leftId}" is not defined.`, + `MUI X: id used for left axis "${leftId}" is not defined.`, `Available ids are: ${yAxisIds.join(', ')}.`, ].join('\n'), ); @@ -115,7 +115,7 @@ function ChartsAxis(props: ChartsAxisProps) { if (rightId !== null && !yAxis[rightId]) { throw Error( [ - `MUI X Charts: id used for right axis "${rightId}" is not defined.`, + `MUI X: id used for right axis "${rightId}" is not defined.`, `Available ids are: ${yAxisIds.join(', ')}.`, ].join('\n'), ); @@ -123,7 +123,7 @@ function ChartsAxis(props: ChartsAxisProps) { if (bottomId !== null && !xAxis[bottomId]) { throw Error( [ - `MUI X Charts: id used for bottom axis "${bottomId}" is not defined.`, + `MUI X: id used for bottom axis "${bottomId}" is not defined.`, `Available ids are: ${xAxisIds.join(', ')}.`, ].join('\n'), ); diff --git a/packages/x-charts/src/ChartsAxisHighlight/ChartsAxisHighlight.tsx b/packages/x-charts/src/ChartsAxisHighlight/ChartsAxisHighlight.tsx index 38f77bcc6b36..456067392205 100644 --- a/packages/x-charts/src/ChartsAxisHighlight/ChartsAxisHighlight.tsx +++ b/packages/x-charts/src/ChartsAxisHighlight/ChartsAxisHighlight.tsx @@ -94,7 +94,7 @@ function ChartsAxisHighlight(props: ChartsAxisHighlightProps) { if (isXError || isYError) { console.error( [ - `MUI X Charts: The position value provided for the axis is not valid for the current scale.`, + `MUI X: The position value provided for the axis is not valid for the current scale.`, `This probably means something is wrong with the data passed to the chart.`, `The ChartsAxisHighlight component will not be displayed.`, ].join('\n'), diff --git a/packages/x-charts/src/ChartsLegend/ChartsLegend.tsx b/packages/x-charts/src/ChartsLegend/ChartsLegend.tsx index 5194f2e14184..1fab773c243f 100644 --- a/packages/x-charts/src/ChartsLegend/ChartsLegend.tsx +++ b/packages/x-charts/src/ChartsLegend/ChartsLegend.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import { useSlotProps } from '@mui/base/utils'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; +import composeClasses from '@mui/utils/composeClasses'; import { useThemeProps, useTheme, Theme } from '@mui/material/styles'; import { getSeriesToDisplay } from './utils'; import { ChartsLegendClasses, getLegendUtilityClass } from './chartsLegendClasses'; diff --git a/packages/x-charts/src/ChartsLegend/ContinuousColorLegend.tsx b/packages/x-charts/src/ChartsLegend/ContinuousColorLegend.tsx index 0aecec2fbbdc..d331e317f945 100644 --- a/packages/x-charts/src/ChartsLegend/ContinuousColorLegend.tsx +++ b/packages/x-charts/src/ChartsLegend/ContinuousColorLegend.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import { ScaleSequential } from 'd3-scale'; +import { ScaleSequential } from '@mui/x-charts-vendor/d3-scale'; import { useTheme } from '@mui/material/styles'; import ChartsContinuousGradient from '../internals/components/ChartsAxesGradients/ChartsContinuousGradient'; import { AxisDefaultized, ContinuousScaleName } from '../models/axis'; diff --git a/packages/x-charts/src/ChartsLegend/DefaultChartsLegend.tsx b/packages/x-charts/src/ChartsLegend/DefaultChartsLegend.tsx index a28178f1939b..2c485452fd04 100644 --- a/packages/x-charts/src/ChartsLegend/DefaultChartsLegend.tsx +++ b/packages/x-charts/src/ChartsLegend/DefaultChartsLegend.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import { FormattedSeries } from '../context/SeriesContextProvider'; +import { FormattedSeries } from '../context/SeriesProvider'; import { LegendPerItem, LegendPerItemProps } from './LegendPerItem'; import { DrawingArea } from '../context/DrawingProvider'; diff --git a/packages/x-charts/src/ChartsLegend/LegendPerItem.tsx b/packages/x-charts/src/ChartsLegend/LegendPerItem.tsx index 9bb218e150fd..dd61aeb4e9f8 100644 --- a/packages/x-charts/src/ChartsLegend/LegendPerItem.tsx +++ b/packages/x-charts/src/ChartsLegend/LegendPerItem.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { NoSsr } from '@mui/base/NoSsr'; +import NoSsr from '@mui/material/NoSsr'; import { useTheme, styled } from '@mui/material/styles'; import { DrawingArea } from '../context/DrawingProvider'; import { DefaultizedProps } from '../models/helpers'; diff --git a/packages/x-charts/src/ChartsLegend/utils.ts b/packages/x-charts/src/ChartsLegend/utils.ts index eec484649fa3..304831f9062a 100644 --- a/packages/x-charts/src/ChartsLegend/utils.ts +++ b/packages/x-charts/src/ChartsLegend/utils.ts @@ -1,4 +1,4 @@ -import { FormattedSeries } from '../context/SeriesContextProvider'; +import { FormattedSeries } from '../context/SeriesProvider'; import { ChartSeriesType, LegendGetter } from '../models/seriesType/config'; import getBarLegend from '../BarChart/legend'; import getScatterLegend from '../ScatterChart/legend'; diff --git a/packages/x-charts/src/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.tsx b/packages/x-charts/src/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.tsx index 8710c72762a0..66dd4c1f6816 100644 --- a/packages/x-charts/src/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.tsx +++ b/packages/x-charts/src/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.tsx @@ -53,7 +53,11 @@ function ChartsOnAxisClickHandler(props: ChartsOnAxisClickHandlerProps) { .forEach((seriesType) => { series[seriesType]?.seriesOrder.forEach((seriesId) => { const seriesItem = series[seriesType]!.series[seriesId]; - const axisKey = isXaxis ? seriesItem.xAxisKey : seriesItem.yAxisKey; + + const providedXAxisId = seriesItem.xAxisId ?? seriesItem.xAxisKey; + const providedYAxisId = seriesItem.yAxisId ?? seriesItem.yAxisKey; + + const axisKey = isXaxis ? providedXAxisId : providedYAxisId; if (axisKey === undefined || axisKey === USED_AXIS_ID) { seriesValues[seriesId] = seriesItem.data[dataIndex]; } diff --git a/packages/x-charts/src/ChartsOverlay/ChartsOverlay.tsx b/packages/x-charts/src/ChartsOverlay/ChartsOverlay.tsx index 528002d32de0..c247719ae795 100644 --- a/packages/x-charts/src/ChartsOverlay/ChartsOverlay.tsx +++ b/packages/x-charts/src/ChartsOverlay/ChartsOverlay.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; import { SxProps, Theme } from '@mui/material/styles'; +import { SlotComponentPropsFromProps } from '../internals/SlotComponentPropsFromProps'; import { ChartsLoadingOverlay } from './ChartsLoadingOverlay'; import { useSeries } from '../hooks/useSeries'; import { SeriesId } from '../models/seriesType/common'; @@ -39,8 +40,8 @@ export interface ChartsOverlaySlots { noDataOverlay?: React.ElementType; } export interface ChartsOverlaySlotProps { - loadingOverlay?: Partial; - noDataOverlay?: Partial; + loadingOverlay?: SlotComponentPropsFromProps; + noDataOverlay?: SlotComponentPropsFromProps; } export interface ChartsOverlayProps { diff --git a/packages/x-charts/src/ChartsReferenceLine/ChartsReferenceLine.tsx b/packages/x-charts/src/ChartsReferenceLine/ChartsReferenceLine.tsx index bf8d673866d5..1826282a9820 100644 --- a/packages/x-charts/src/ChartsReferenceLine/ChartsReferenceLine.tsx +++ b/packages/x-charts/src/ChartsReferenceLine/ChartsReferenceLine.tsx @@ -12,15 +12,11 @@ type ChartsReferenceLineProps - `MUI X Charts: the value ${value} does not exist in the data of x axis with id ${id}.`, - 'error', -); - function ChartsXReferenceLine(props: ChartsXReferenceLineProps) { const { x, @@ -98,7 +92,10 @@ function ChartsXReferenceLine(props: ChartsXReferenceLineProps) { if (xPosition === undefined) { if (process.env.NODE_ENV !== 'production') { - valueError(x, axisId); + warnOnce( + `MUI X: the value ${x} does not exist in the data of x axis with id ${axisId}.`, + 'error', + ); } return null; } @@ -106,8 +103,8 @@ function ChartsXReferenceLine(props: ChartsXReferenceLineProps) { const classes = getXReferenceLineClasses(inClasses); - const spacingX = typeof spacing === 'object' ? spacing.x ?? 0 : spacing; - const spacingY = typeof spacing === 'object' ? spacing.y ?? 0 : spacing; + const spacingX = typeof spacing === 'object' ? (spacing.x ?? 0) : spacing; + const spacingY = typeof spacing === 'object' ? (spacing.y ?? 0) : spacing; const textParams = { x: xPosition + spacingX, diff --git a/packages/x-charts/src/ChartsReferenceLine/ChartsYReferenceLine.tsx b/packages/x-charts/src/ChartsReferenceLine/ChartsYReferenceLine.tsx index 048c37c3459f..5a18d38bd34f 100644 --- a/packages/x-charts/src/ChartsReferenceLine/ChartsYReferenceLine.tsx +++ b/packages/x-charts/src/ChartsReferenceLine/ChartsYReferenceLine.tsx @@ -7,7 +7,7 @@ import { ChartsReferenceLineClasses, getReferenceLineUtilityClass, } from './chartsReferenceLineClasses'; -import { buildWarning } from '../internals/warning'; +import { warnOnce } from '../internals/warning'; export type ChartsYReferenceLineProps< TValue extends string | number | Date = string | number | Date, @@ -73,12 +73,6 @@ export function getYReferenceLineClasses(classes?: Partial - `MUI X Charts: the value ${value} does not exist in the data of y axis with id ${id}.`, - 'error', -); - function ChartsYReferenceLine(props: ChartsYReferenceLineProps) { const { y, @@ -98,7 +92,10 @@ function ChartsYReferenceLine(props: ChartsYReferenceLineProps) { if (yPosition === undefined) { if (process.env.NODE_ENV !== 'production') { - valueError(y, axisId); + warnOnce( + `MUI X: the value ${y} does not exist in the data of y axis with id ${axisId}.`, + 'error', + ); } return null; } @@ -107,8 +104,8 @@ function ChartsYReferenceLine(props: ChartsYReferenceLineProps) { const classes = getYReferenceLineClasses(inClasses); - const spacingX = typeof spacing === 'object' ? spacing.x ?? 0 : spacing; - const spacingY = typeof spacing === 'object' ? spacing.y ?? 0 : spacing; + const spacingX = typeof spacing === 'object' ? (spacing.x ?? 0) : spacing; + const spacingY = typeof spacing === 'object' ? (spacing.y ?? 0) : spacing; const textParams = { y: yPosition - spacingY, diff --git a/packages/x-charts/src/ChartsTooltip/ChartsAxisTooltipContent.tsx b/packages/x-charts/src/ChartsTooltip/ChartsAxisTooltipContent.tsx index 4784d5559bf7..961191227c49 100644 --- a/packages/x-charts/src/ChartsTooltip/ChartsAxisTooltipContent.tsx +++ b/packages/x-charts/src/ChartsTooltip/ChartsAxisTooltipContent.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { SxProps, Theme } from '@mui/material/styles'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import { AxisInteractionData } from '../context/InteractionProvider'; import { useCartesianContext } from '../context/CartesianProvider'; import { ChartSeriesDefaultized, ChartSeriesType } from '../models/seriesType/config'; @@ -76,18 +76,26 @@ function ChartsAxisTooltipContent(props: { .forEach((seriesType) => { series[seriesType]!.seriesOrder.forEach((seriesId) => { const item = series[seriesType]!.series[seriesId]; - const axisKey = isXaxis ? item.xAxisKey : item.yAxisKey; + + const providedXAxisId = item.xAxisId ?? item.xAxisKey; + const providedYAxisId = item.yAxisId ?? item.yAxisKey; + + const axisKey = isXaxis ? providedXAxisId : providedYAxisId; + if (axisKey === undefined || axisKey === USED_AXIS_ID) { const seriesToAdd = series[seriesType]!.series[seriesId]; - const zAxisKey = (seriesToAdd as any).zAxisKey ?? zAxisIds[0]; + const xAxisId = providedXAxisId ?? xAxisIds[0]; + const yAxisId = providedYAxisId ?? yAxisIds[0]; + const zAxisId = + (seriesToAdd as any).zAxisId ?? (seriesToAdd as any).zAxisKey ?? zAxisIds[0]; const getColor = colorProcessors[seriesType]?.( seriesToAdd as any, - xAxis[seriesToAdd.xAxisKey ?? xAxisIds[0]], - yAxis[seriesToAdd.yAxisKey ?? yAxisIds[0]], - zAxisKey && zAxis[zAxisKey], + xAxis[xAxisId], + yAxis[yAxisId], + zAxisId && zAxis[zAxisId], ) ?? (() => ''); rep.push({ ...seriesToAdd, getColor }); diff --git a/packages/x-charts/src/ChartsTooltip/ChartsItemTooltipContent.tsx b/packages/x-charts/src/ChartsTooltip/ChartsItemTooltipContent.tsx index 099921b4bf33..65c8dbe0c652 100644 --- a/packages/x-charts/src/ChartsTooltip/ChartsItemTooltipContent.tsx +++ b/packages/x-charts/src/ChartsTooltip/ChartsItemTooltipContent.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { SxProps, Theme } from '@mui/material/styles'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import { ItemInteractionData } from '../context/InteractionProvider'; import { ChartSeriesDefaultized, ChartSeriesType } from '../models/seriesType/config'; import { ChartsTooltipClasses } from './chartsTooltipClasses'; @@ -54,16 +54,16 @@ function ChartsItemTooltipContent( const { zAxis, zAxisIds } = React.useContext(ZAxisContext); const colorProcessors = useColorProcessor(); - const xAxisKey = (series as any).xAxisKey ?? xAxisIds[0]; - const yAxisKey = (series as any).yAxisKey ?? yAxisIds[0]; - const zAxisKey = (series as any).zAxisKey ?? zAxisIds[0]; + const xAxisId = (series as any).xAxisId ?? (series as any).xAxisKey ?? xAxisIds[0]; + const yAxisId = (series as any).yAxisId ?? (series as any).yAxisKey ?? yAxisIds[0]; + const zAxisId = (series as any).zAxisId ?? (series as any).zAxisKey ?? zAxisIds[0]; const getColor = colorProcessors[series.type]?.( series as any, - xAxisKey && xAxis[xAxisKey], - yAxisKey && yAxis[yAxisKey], - zAxisKey && zAxis[zAxisKey], + xAxisId && xAxis[xAxisId], + yAxisId && yAxis[yAxisId], + zAxisId && zAxis[zAxisId], ) ?? (() => ''); const Content = content ?? DefaultChartsItemTooltipContent; diff --git a/packages/x-charts/src/ChartsTooltip/ChartsTooltip.tsx b/packages/x-charts/src/ChartsTooltip/ChartsTooltip.tsx index 5f2d8fb96b2e..1391416cf3d0 100644 --- a/packages/x-charts/src/ChartsTooltip/ChartsTooltip.tsx +++ b/packages/x-charts/src/ChartsTooltip/ChartsTooltip.tsx @@ -2,9 +2,9 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import composeClasses from '@mui/utils/composeClasses'; import { styled, useThemeProps, SxProps, Theme } from '@mui/material/styles'; -import { Popper, PopperProps as BasePopperProps } from '@mui/base/Popper'; -import { NoSsr } from '@mui/base/NoSsr'; -import { useSlotProps } from '@mui/base/utils'; +import Popper, { PopperProps as BasePopperProps } from '@mui/material/Popper'; +import NoSsr from '@mui/material/NoSsr'; +import useSlotProps from '@mui/utils/useSlotProps'; import { AxisInteractionData, InteractionContext, diff --git a/packages/x-charts/src/ChartsVoronoiHandler/ChartsVoronoiHandler.tsx b/packages/x-charts/src/ChartsVoronoiHandler/ChartsVoronoiHandler.tsx index 211f841cab68..d0b0f161e60c 100644 --- a/packages/x-charts/src/ChartsVoronoiHandler/ChartsVoronoiHandler.tsx +++ b/packages/x-charts/src/ChartsVoronoiHandler/ChartsVoronoiHandler.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import { Delaunay } from 'd3-delaunay'; +import { Delaunay } from '@mui/x-charts-vendor/d3-delaunay'; import useEnhancedEffect from '@mui/utils/useEnhancedEffect'; import { InteractionContext } from '../context/InteractionProvider'; import { useCartesianContext } from '../context/CartesianProvider'; @@ -63,10 +63,10 @@ function ChartsVoronoiHandler(props: ChartsVoronoiHandlerProps) { voronoiRef.current = {}; let points: number[] = []; seriesOrder.forEach((seriesId) => { - const { data, xAxisKey, yAxisKey } = series[seriesId]; + const { data, xAxisId, yAxisId, xAxisKey, yAxisKey } = series[seriesId]; - const xScale = xAxis[xAxisKey ?? defaultXAxisId].scale; - const yScale = yAxis[yAxisKey ?? defaultYAxisId].scale; + const xScale = xAxis[xAxisId ?? xAxisKey ?? defaultXAxisId].scale; + const yScale = yAxis[yAxisId ?? yAxisKey ?? defaultYAxisId].scale; const getXPosition = getValueToPositionMapper(xScale); const getYPosition = getValueToPositionMapper(yScale); diff --git a/packages/x-charts/src/ChartsXAxis/ChartsXAxis.tsx b/packages/x-charts/src/ChartsXAxis/ChartsXAxis.tsx index 8329f9bd91b3..dd5ce3424fad 100644 --- a/packages/x-charts/src/ChartsXAxis/ChartsXAxis.tsx +++ b/packages/x-charts/src/ChartsXAxis/ChartsXAxis.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import { useSlotProps } from '@mui/base/utils'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; +import composeClasses from '@mui/utils/composeClasses'; import { useThemeProps, useTheme, Theme } from '@mui/material/styles'; import { useCartesianContext } from '../context/CartesianProvider'; import { useTicks, TickItemType } from '../hooks/useTicks'; diff --git a/packages/x-charts/src/ChartsYAxis/ChartsYAxis.tsx b/packages/x-charts/src/ChartsYAxis/ChartsYAxis.tsx index 09cc6fd48c8f..43f365d4881f 100644 --- a/packages/x-charts/src/ChartsYAxis/ChartsYAxis.tsx +++ b/packages/x-charts/src/ChartsYAxis/ChartsYAxis.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import { useSlotProps } from '@mui/base/utils'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; +import composeClasses from '@mui/utils/composeClasses'; import { useThemeProps, useTheme, Theme } from '@mui/material/styles'; import { useCartesianContext } from '../context/CartesianProvider'; import { useTicks } from '../hooks/useTicks'; diff --git a/packages/x-charts/src/Gauge/GaugeReferenceArc.tsx b/packages/x-charts/src/Gauge/GaugeReferenceArc.tsx index 55a0308362cc..ee5a9ec76cf4 100644 --- a/packages/x-charts/src/Gauge/GaugeReferenceArc.tsx +++ b/packages/x-charts/src/Gauge/GaugeReferenceArc.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { arc as d3Arc } from 'd3-shape'; +import { arc as d3Arc } from '@mui/x-charts-vendor/d3-shape'; import { styled } from '@mui/material/styles'; import { useGaugeState } from './GaugeProvider'; diff --git a/packages/x-charts/src/Gauge/GaugeValueArc.tsx b/packages/x-charts/src/Gauge/GaugeValueArc.tsx index 3c8bb81a5c6f..a40901048217 100644 --- a/packages/x-charts/src/Gauge/GaugeValueArc.tsx +++ b/packages/x-charts/src/Gauge/GaugeValueArc.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { arc as d3Arc } from 'd3-shape'; +import { arc as d3Arc } from '@mui/x-charts-vendor/d3-shape'; import { styled } from '@mui/material/styles'; import { useGaugeState } from './GaugeProvider'; diff --git a/packages/x-charts/src/LineChart/AnimatedArea.tsx b/packages/x-charts/src/LineChart/AnimatedArea.tsx index 88bd4c71b96e..adebfc0ac866 100644 --- a/packages/x-charts/src/LineChart/AnimatedArea.tsx +++ b/packages/x-charts/src/LineChart/AnimatedArea.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { styled } from '@mui/material/styles'; -import { color as d3Color } from 'd3-color'; import { animated, useSpring } from '@react-spring/web'; +import { color as d3Color } from '@mui/x-charts-vendor/d3-color'; import { useAnimatedPath } from '../internals/useAnimatedPath'; import { cleanId } from '../internals/cleanId'; import type { AreaElementOwnerState } from './AreaElement'; diff --git a/packages/x-charts/src/LineChart/AnimatedLine.tsx b/packages/x-charts/src/LineChart/AnimatedLine.tsx index d8528df48329..968f44652d01 100644 --- a/packages/x-charts/src/LineChart/AnimatedLine.tsx +++ b/packages/x-charts/src/LineChart/AnimatedLine.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { animated, useSpring } from '@react-spring/web'; -import { color as d3Color } from 'd3-color'; +import { color as d3Color } from '@mui/x-charts-vendor/d3-color'; import { styled } from '@mui/material/styles'; import { useAnimatedPath } from '../internals/useAnimatedPath'; import { cleanId } from '../internals/cleanId'; diff --git a/packages/x-charts/src/LineChart/AreaElement.tsx b/packages/x-charts/src/LineChart/AreaElement.tsx index 813e8e2ba8af..ab692866824a 100644 --- a/packages/x-charts/src/LineChart/AreaElement.tsx +++ b/packages/x-charts/src/LineChart/AreaElement.tsx @@ -1,9 +1,10 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import composeClasses from '@mui/utils/composeClasses'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import generateUtilityClass from '@mui/utils/generateUtilityClass'; import generateUtilityClasses from '@mui/utils/generateUtilityClasses'; +import { SlotComponentPropsFromProps } from '../internals/SlotComponentPropsFromProps'; import { useInteractionItemProps } from '../hooks/useInteractionItemProps'; import { AnimatedArea, AnimatedAreaProps } from './AnimatedArea'; import { SeriesId } from '../models/seriesType/common'; @@ -57,7 +58,7 @@ export interface AreaElementSlots { } export interface AreaElementSlotProps { - area?: AnimatedAreaProps; + area?: SlotComponentPropsFromProps; } export interface AreaElementProps diff --git a/packages/x-charts/src/LineChart/AreaPlot.tsx b/packages/x-charts/src/LineChart/AreaPlot.tsx index edf60f0893ad..79412e5211e6 100644 --- a/packages/x-charts/src/LineChart/AreaPlot.tsx +++ b/packages/x-charts/src/LineChart/AreaPlot.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import { area as d3Area } from 'd3-shape'; +import { area as d3Area } from '@mui/x-charts-vendor/d3-shape'; import { useCartesianContext } from '../context/CartesianProvider'; import { AreaElement, @@ -52,6 +52,8 @@ const useAggregatedData = () => { .reverse() // Revert stacked area for a more pleasant animation .map((seriesId) => { const { + xAxisId: xAxisIdProp, + yAxisId: yAxisIdProp, xAxisKey = defaultXAxisId, yAxisKey = defaultYAxisId, stackedData, @@ -59,28 +61,31 @@ const useAggregatedData = () => { connectNulls, } = series[seriesId]; - const xScale = getValueToPositionMapper(xAxis[xAxisKey].scale); - const yScale = yAxis[yAxisKey].scale; - const xData = xAxis[xAxisKey].data; + const xAxisId = xAxisIdProp ?? xAxisKey; + const yAxisId = yAxisIdProp ?? yAxisKey; + + const xScale = getValueToPositionMapper(xAxis[xAxisId].scale); + const yScale = yAxis[yAxisId].scale; + const xData = xAxis[xAxisId].data; const gradientUsed: [AxisId, 'x' | 'y'] | undefined = - (yAxis[yAxisKey].colorScale && [yAxisKey, 'y']) || - (xAxis[xAxisKey].colorScale && [xAxisKey, 'x']) || + (yAxis[yAxisId].colorScale && [yAxisId, 'y']) || + (xAxis[xAxisId].colorScale && [xAxisId, 'x']) || undefined; if (process.env.NODE_ENV !== 'production') { if (xData === undefined) { throw new Error( - `MUI X Charts: ${ - xAxisKey === DEFAULT_X_AXIS_KEY + `MUI X: ${ + xAxisId === DEFAULT_X_AXIS_KEY ? 'The first `xAxis`' - : `The x-axis with id "${xAxisKey}"` + : `The x-axis with id "${xAxisId}"` } should have data property to be able to display a line plot.`, ); } if (xData.length < stackedData.length) { throw new Error( - `MUI X Charts: The data length of the x axis (${xData.length} items) is lower than the length of series (${stackedData.length} items).`, + `MUI X: The data length of the x axis (${xData.length} items) is lower than the length of series (${stackedData.length} items).`, ); } } diff --git a/packages/x-charts/src/LineChart/LineChart.tsx b/packages/x-charts/src/LineChart/LineChart.tsx index 1b357d023539..d73abe04bf37 100644 --- a/packages/x-charts/src/LineChart/LineChart.tsx +++ b/packages/x-charts/src/LineChart/LineChart.tsx @@ -165,7 +165,10 @@ const LineChart = React.forwardRef(function LineChart(props: LineChartProps, ref - + + {/* The `data-drawing-container` indicates that children are part of the drawing area. Ref: https://github.com/mui/mui-x/issues/13659 */} + + {!props.loading && } @@ -365,7 +368,6 @@ LineChart.propTypes = { */ xAxis: PropTypes.arrayOf( PropTypes.shape({ - axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), classes: PropTypes.object, colorMap: PropTypes.oneOfType([ PropTypes.shape({ @@ -436,7 +438,6 @@ LineChart.propTypes = { */ yAxis: PropTypes.arrayOf( PropTypes.shape({ - axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), classes: PropTypes.object, colorMap: PropTypes.oneOfType([ PropTypes.shape({ diff --git a/packages/x-charts/src/LineChart/LineElement.tsx b/packages/x-charts/src/LineChart/LineElement.tsx index aa626b0d6698..4361d3e7a0d8 100644 --- a/packages/x-charts/src/LineChart/LineElement.tsx +++ b/packages/x-charts/src/LineChart/LineElement.tsx @@ -1,9 +1,10 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import composeClasses from '@mui/utils/composeClasses'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import generateUtilityClass from '@mui/utils/generateUtilityClass'; import generateUtilityClasses from '@mui/utils/generateUtilityClasses'; +import { SlotComponentPropsFromProps } from '../internals/SlotComponentPropsFromProps'; import { useInteractionItemProps } from '../hooks/useInteractionItemProps'; import { AnimatedLine, AnimatedLineProps } from './AnimatedLine'; import { SeriesId } from '../models/seriesType/common'; @@ -57,7 +58,7 @@ export interface LineElementSlots { } export interface LineElementSlotProps { - line?: AnimatedLineProps; + line?: SlotComponentPropsFromProps; } export interface LineElementProps diff --git a/packages/x-charts/src/LineChart/LineHighlightPlot.tsx b/packages/x-charts/src/LineChart/LineHighlightPlot.tsx index a8121982a01b..4899c0fcd78e 100644 --- a/packages/x-charts/src/LineChart/LineHighlightPlot.tsx +++ b/packages/x-charts/src/LineChart/LineHighlightPlot.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; import PropTypes from 'prop-types'; +import { SlotComponentPropsFromProps } from '../internals/SlotComponentPropsFromProps'; import { useCartesianContext } from '../context/CartesianProvider'; import { LineHighlightElement, LineHighlightElementProps } from './LineHighlightElement'; import { getValueToPositionMapper } from '../hooks/useScale'; @@ -14,7 +15,7 @@ export interface LineHighlightPlotSlots { } export interface LineHighlightPlotSlotProps { - lineHighlight?: Partial; + lineHighlight?: SlotComponentPropsFromProps; } export interface LineHighlightPlotProps extends React.SVGAttributes { @@ -68,6 +69,8 @@ function LineHighlightPlot(props: LineHighlightPlotProps) { {stackingGroups.flatMap(({ ids: groupIds }) => { return groupIds.flatMap((seriesId) => { const { + xAxisId: xAxisIdProp, + yAxisId: yAxisIdProp, xAxisKey = defaultXAxisId, yAxisKey = defaultYAxisId, stackedData, @@ -75,19 +78,22 @@ function LineHighlightPlot(props: LineHighlightPlotProps) { disableHighlight, } = series[seriesId]; + const xAxisId = xAxisIdProp ?? xAxisKey; + const yAxisId = yAxisIdProp ?? yAxisKey; + if (disableHighlight || data[highlightedIndex] == null) { return null; } - const xScale = getValueToPositionMapper(xAxis[xAxisKey].scale); - const yScale = yAxis[yAxisKey].scale; - const xData = xAxis[xAxisKey].data; + const xScale = getValueToPositionMapper(xAxis[xAxisId].scale); + const yScale = yAxis[yAxisId].scale; + const xData = xAxis[xAxisId].data; if (xData === undefined) { throw new Error( - `MUI X Charts: ${ - xAxisKey === DEFAULT_X_AXIS_KEY + `MUI X: ${ + xAxisId === DEFAULT_X_AXIS_KEY ? 'The first `xAxis`' - : `The x-axis with id "${xAxisKey}"` + : `The x-axis with id "${xAxisId}"` } should have data property to be able to display a line plot.`, ); } @@ -99,7 +105,7 @@ function LineHighlightPlot(props: LineHighlightPlotProps) { return null; } - const colorGetter = getColor(series[seriesId], xAxis[xAxisKey], yAxis[yAxisKey]); + const colorGetter = getColor(series[seriesId], xAxis[xAxisId], yAxis[yAxisId]); return ( { return stackingGroups.flatMap(({ ids: groupIds }) => { return groupIds.flatMap((seriesId) => { const { + xAxisId: xAxisIdProp, + yAxisId: yAxisIdProp, xAxisKey = defaultXAxisId, yAxisKey = defaultYAxisId, stackedData, @@ -57,28 +59,31 @@ const useAggregatedData = () => { connectNulls, } = series[seriesId]; - const xScale = getValueToPositionMapper(xAxis[xAxisKey].scale); - const yScale = yAxis[yAxisKey].scale; - const xData = xAxis[xAxisKey].data; + const xAxisId = xAxisIdProp ?? xAxisKey; + const yAxisId = yAxisIdProp ?? yAxisKey; + + const xScale = getValueToPositionMapper(xAxis[xAxisId].scale); + const yScale = yAxis[yAxisId].scale; + const xData = xAxis[xAxisId].data; const gradientUsed: [AxisId, 'x' | 'y'] | undefined = - (yAxis[yAxisKey].colorScale && [yAxisKey, 'y']) || - (xAxis[xAxisKey].colorScale && [xAxisKey, 'x']) || + (yAxis[yAxisId].colorScale && [yAxisId, 'y']) || + (xAxis[xAxisId].colorScale && [xAxisId, 'x']) || undefined; if (process.env.NODE_ENV !== 'production') { if (xData === undefined) { throw new Error( - `MUI X Charts: ${ - xAxisKey === DEFAULT_X_AXIS_KEY + `MUI X: ${ + xAxisId === DEFAULT_X_AXIS_KEY ? 'The first `xAxis`' - : `The x-axis with id "${xAxisKey}"` + : `The x-axis with id "${xAxisId}"` } should have data property to be able to display a line plot.`, ); } if (xData.length < stackedData.length) { throw new Error( - `MUI X Charts: The data length of the x axis (${xData.length} items) is lower than the length of series (${stackedData.length} items).`, + `MUI X: The data length of the x axis (${xData.length} items) is lower than the length of series (${stackedData.length} items).`, ); } } diff --git a/packages/x-charts/src/LineChart/MarkElement.tsx b/packages/x-charts/src/LineChart/MarkElement.tsx index f9420ba24bd5..137f44f252b7 100644 --- a/packages/x-charts/src/LineChart/MarkElement.tsx +++ b/packages/x-charts/src/LineChart/MarkElement.tsx @@ -4,7 +4,7 @@ import composeClasses from '@mui/utils/composeClasses'; import generateUtilityClass from '@mui/utils/generateUtilityClass'; import { styled } from '@mui/material/styles'; import generateUtilityClasses from '@mui/utils/generateUtilityClasses'; -import { symbol as d3Symbol, symbolsFill as d3SymbolsFill } from 'd3-shape'; +import { symbol as d3Symbol, symbolsFill as d3SymbolsFill } from '@mui/x-charts-vendor/d3-shape'; import { animated, to, useSpring } from '@react-spring/web'; import { getSymbol } from '../internals/getSymbol'; import { InteractionContext } from '../context/InteractionProvider'; diff --git a/packages/x-charts/src/LineChart/MarkPlot.tsx b/packages/x-charts/src/LineChart/MarkPlot.tsx index 12c52119dc3d..70957eeefc67 100644 --- a/packages/x-charts/src/LineChart/MarkPlot.tsx +++ b/packages/x-charts/src/LineChart/MarkPlot.tsx @@ -76,6 +76,8 @@ function MarkPlot(props: MarkPlotProps) { {stackingGroups.flatMap(({ ids: groupIds }) => { return groupIds.map((seriesId) => { const { + xAxisId: xAxisIdProp, + yAxisId: yAxisIdProp, xAxisKey = defaultXAxisId, yAxisKey = defaultYAxisId, stackedData, @@ -87,23 +89,26 @@ function MarkPlot(props: MarkPlotProps) { return null; } - const xScale = getValueToPositionMapper(xAxis[xAxisKey].scale); - const yScale = yAxis[yAxisKey].scale; - const xData = xAxis[xAxisKey].data; + const xAxisId = xAxisIdProp ?? xAxisKey; + const yAxisId = yAxisIdProp ?? yAxisKey; + + const xScale = getValueToPositionMapper(xAxis[xAxisId].scale); + const yScale = yAxis[yAxisId].scale; + const xData = xAxis[xAxisId].data; if (xData === undefined) { throw new Error( - `MUI X Charts: ${ - xAxisKey === DEFAULT_X_AXIS_KEY + `MUI X: ${ + xAxisId === DEFAULT_X_AXIS_KEY ? 'The first `xAxis`' - : `The x-axis with id "${xAxisKey}"` + : `The x-axis with id "${xAxisId}"` } should have data property to be able to display a line plot.`, ); } const clipId = cleanId(`${chartId}-${seriesId}-line-clip`); // We assume that if displaying line mark, the line will also be rendered - const colorGetter = getColor(series[seriesId], xAxis[xAxisKey], yAxis[yAxisKey]); + const colorGetter = getColor(series[seriesId], xAxis[xAxisId], yAxis[yAxisId]); return ( diff --git a/packages/x-charts/src/LineChart/extremums.ts b/packages/x-charts/src/LineChart/extremums.ts index 56f972dfdeba..57c6ec6cd0b6 100644 --- a/packages/x-charts/src/LineChart/extremums.ts +++ b/packages/x-charts/src/LineChart/extremums.ts @@ -31,11 +31,10 @@ export const getExtremumY: ExtremumGetter<'line'> = (params) => { const { series, axis, isDefaultAxis } = params; return Object.keys(series) - .filter( - (seriesId) => - series[seriesId].yAxisKey === axis.id || - (isDefaultAxis && series[seriesId].yAxisKey === undefined), - ) + .filter((seriesId) => { + const yAxisId = series[seriesId].yAxisId ?? series[seriesId].yAxisKey; + return yAxisId === axis.id || (isDefaultAxis && yAxisId === undefined); + }) .reduce( (acc: ExtremumGetterResult, seriesId) => { const { area, stackedData } = series[seriesId]; diff --git a/packages/x-charts/src/LineChart/formatter.ts b/packages/x-charts/src/LineChart/formatter.ts index 53962140313b..32196d2e47e1 100644 --- a/packages/x-charts/src/LineChart/formatter.ts +++ b/packages/x-charts/src/LineChart/formatter.ts @@ -1,4 +1,4 @@ -import { stack as d3Stack } from 'd3-shape'; +import { stack as d3Stack } from '@mui/x-charts-vendor/d3-shape'; import { getStackingGroups } from '../internals/stackSeries'; import { ChartSeries, @@ -32,7 +32,7 @@ const formatter: Formatter<'line'> = (params, dataset) => { } else if (dataset === undefined && process.env.NODE_ENV !== 'production') { throw new Error( [ - `MUI X Charts: line series with id='${id}' has no data.`, + `MUI X: line series with id='${id}' has no data.`, 'Either provide a data property to the series or use the dataset prop.', ].join('\n'), ); @@ -67,7 +67,7 @@ const formatter: Formatter<'line'> = (params, dataset) => { if (process.env.NODE_ENV !== 'production' && !warnedOnce && value !== null) { warnedOnce = true; console.error([ - `MUI X charts: your dataset key "${dataKey}" is used for plotting line, but contains nonnumerical elements.`, + `MUI X: Your dataset key "${dataKey}" is used for plotting line, but contains nonnumerical elements.`, 'Line plots only support numbers and null values.', ]); } diff --git a/packages/x-charts/src/PieChart/PieArc.tsx b/packages/x-charts/src/PieChart/PieArc.tsx index 1cc8bc50a128..a7c8875b82a4 100644 --- a/packages/x-charts/src/PieChart/PieArc.tsx +++ b/packages/x-charts/src/PieChart/PieArc.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import { arc as d3Arc } from 'd3-shape'; +import { arc as d3Arc } from '@mui/x-charts-vendor/d3-shape'; import { animated, SpringValue, to } from '@react-spring/web'; import composeClasses from '@mui/utils/composeClasses'; import generateUtilityClass from '@mui/utils/generateUtilityClass'; @@ -118,6 +118,7 @@ function PieArc(props: PieArcProps) { outerRadius: oR, })!, )} + visibility={to([startAngle, endAngle], (sA, eA) => (sA === eA ? 'hidden' : 'visible'))} onClick={onClick} cursor={onClick ? 'pointer' : 'unset'} ownerState={ownerState} diff --git a/packages/x-charts/src/PieChart/PieArcLabel.tsx b/packages/x-charts/src/PieChart/PieArcLabel.tsx index 90164f32dbc2..80c94367618b 100644 --- a/packages/x-charts/src/PieChart/PieArcLabel.tsx +++ b/packages/x-charts/src/PieChart/PieArcLabel.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { animated, SpringValue, to } from '@react-spring/web'; -import { arc as d3Arc } from 'd3-shape'; +import { arc as d3Arc } from '@mui/x-charts-vendor/d3-shape'; import composeClasses from '@mui/utils/composeClasses'; import generateUtilityClass from '@mui/utils/generateUtilityClass'; import { styled } from '@mui/material/styles'; diff --git a/packages/x-charts/src/PieChart/PieChart.tsx b/packages/x-charts/src/PieChart/PieChart.tsx index 2078d2831036..75e954f5ab06 100644 --- a/packages/x-charts/src/PieChart/PieChart.tsx +++ b/packages/x-charts/src/PieChart/PieChart.tsx @@ -378,7 +378,6 @@ PieChart.propTypes = { */ xAxis: PropTypes.arrayOf( PropTypes.shape({ - axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), classes: PropTypes.object, colorMap: PropTypes.oneOfType([ PropTypes.shape({ @@ -449,7 +448,6 @@ PieChart.propTypes = { */ yAxis: PropTypes.arrayOf( PropTypes.shape({ - axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), classes: PropTypes.object, colorMap: PropTypes.oneOfType([ PropTypes.shape({ diff --git a/packages/x-charts/src/PieChart/formatter.ts b/packages/x-charts/src/PieChart/formatter.ts index 2364cc16a0c2..5e7467c56b0c 100644 --- a/packages/x-charts/src/PieChart/formatter.ts +++ b/packages/x-charts/src/PieChart/formatter.ts @@ -1,4 +1,4 @@ -import { pie as d3Pie } from 'd3-shape'; +import { pie as d3Pie } from '@mui/x-charts-vendor/d3-shape'; import { ChartSeriesDefaultized, Formatter } from '../models/seriesType/config'; import { ChartsPieSorting, PieValueType } from '../models/seriesType/pie'; import { SeriesId } from '../models/seriesType/common'; diff --git a/packages/x-charts/src/ResponsiveChartContainer/ResponsiveChartContainer.tsx b/packages/x-charts/src/ResponsiveChartContainer/ResponsiveChartContainer.tsx index 3797aaf7b864..f5afa5bdf271 100644 --- a/packages/x-charts/src/ResponsiveChartContainer/ResponsiveChartContainer.tsx +++ b/packages/x-charts/src/ResponsiveChartContainer/ResponsiveChartContainer.tsx @@ -116,7 +116,6 @@ ResponsiveChartContainer.propTypes = { */ xAxis: PropTypes.arrayOf( PropTypes.shape({ - axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), classes: PropTypes.object, colorMap: PropTypes.oneOfType([ PropTypes.shape({ @@ -187,7 +186,6 @@ ResponsiveChartContainer.propTypes = { */ yAxis: PropTypes.arrayOf( PropTypes.shape({ - axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), classes: PropTypes.object, colorMap: PropTypes.oneOfType([ PropTypes.shape({ diff --git a/packages/x-charts/src/ResponsiveChartContainer/useChartContainerDimensions.ts b/packages/x-charts/src/ResponsiveChartContainer/useChartContainerDimensions.ts index cb6001d1588f..00ba813b4a28 100644 --- a/packages/x-charts/src/ResponsiveChartContainer/useChartContainerDimensions.ts +++ b/packages/x-charts/src/ResponsiveChartContainer/useChartContainerDimensions.ts @@ -69,13 +69,13 @@ export const useChartContainerDimensions = (inWidth?: number, inHeight?: number) if (process.env.NODE_ENV !== 'production') { if (displayError.current && inWidth === undefined && width === 0) { console.error( - `MUI X Charts: ChartContainer does not have \`width\` prop, and its container has no \`width\` defined.`, + `MUI X: ChartContainer does not have \`width\` prop, and its container has no \`width\` defined.`, ); displayError.current = false; } if (displayError.current && inHeight === undefined && height === 0) { console.error( - `MUI X Charts: ChartContainer does not have \`height\` prop, and its container has no \`height\` defined.`, + `MUI X: ChartContainer does not have \`height\` prop, and its container has no \`height\` defined.`, ); displayError.current = false; } diff --git a/packages/x-charts/src/ScatterChart/ScatterChart.tsx b/packages/x-charts/src/ScatterChart/ScatterChart.tsx index 84ca039c4f4c..ee2cd79132f9 100644 --- a/packages/x-charts/src/ScatterChart/ScatterChart.tsx +++ b/packages/x-charts/src/ScatterChart/ScatterChart.tsx @@ -138,7 +138,10 @@ const ScatterChart = React.forwardRef(function ScatterChart(props: ScatterChartP {!props.disableVoronoi && } {props.grid && } - + + {/* The `data-drawing-container` indicates that children are part of the drawing area. Ref: https://github.com/mui/mui-x/issues/13659 */} + + @@ -327,7 +330,6 @@ ScatterChart.propTypes = { */ xAxis: PropTypes.arrayOf( PropTypes.shape({ - axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), classes: PropTypes.object, colorMap: PropTypes.oneOfType([ PropTypes.shape({ @@ -398,7 +400,6 @@ ScatterChart.propTypes = { */ yAxis: PropTypes.arrayOf( PropTypes.shape({ - axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), classes: PropTypes.object, colorMap: PropTypes.oneOfType([ PropTypes.shape({ diff --git a/packages/x-charts/src/ScatterChart/ScatterPlot.tsx b/packages/x-charts/src/ScatterChart/ScatterPlot.tsx index 0bdc7c1060a2..d4326f545215 100644 --- a/packages/x-charts/src/ScatterChart/ScatterPlot.tsx +++ b/packages/x-charts/src/ScatterChart/ScatterPlot.tsx @@ -58,16 +58,17 @@ function ScatterPlot(props: ScatterPlotProps) { return ( {seriesOrder.map((seriesId) => { - const { id, xAxisKey, yAxisKey, zAxisKey, markerSize, color } = series[seriesId]; + const { id, xAxisKey, yAxisKey, zAxisKey, xAxisId, yAxisId, zAxisId, markerSize, color } = + series[seriesId]; const colorGetter = getColor( series[seriesId], - xAxis[xAxisKey ?? defaultXAxisId], - yAxis[yAxisKey ?? defaultYAxisId], - zAxis[zAxisKey ?? defaultZAxisId], + xAxis[xAxisId ?? xAxisKey ?? defaultXAxisId], + yAxis[yAxisId ?? yAxisKey ?? defaultYAxisId], + zAxis[zAxisId ?? zAxisKey ?? defaultZAxisId], ); - const xScale = xAxis[xAxisKey ?? defaultXAxisId].scale; - const yScale = yAxis[yAxisKey ?? defaultYAxisId].scale; + const xScale = xAxis[xAxisId ?? xAxisKey ?? defaultXAxisId].scale; + const yScale = yAxis[yAxisId ?? yAxisKey ?? defaultYAxisId].scale; return ( = (params) => { const { series, axis, isDefaultAxis } = params; return Object.keys(series) - .filter( - (seriesId) => - series[seriesId].xAxisKey === axis.id || - (series[seriesId].xAxisKey === undefined && isDefaultAxis), - ) + .filter((seriesId) => { + const axisId = series[seriesId].xAxisId ?? series[seriesId].xAxisKey; + return axisId === axis.id || (axisId === undefined && isDefaultAxis); + }) .reduce( (acc: ExtremumGetterResult, seriesId) => { const seriesMinMax = series[seriesId].data.reduce( @@ -41,11 +40,10 @@ export const getExtremumY: ExtremumGetter<'scatter'> = (params) => { const { series, axis, isDefaultAxis } = params; return Object.keys(series) - .filter( - (seriesId) => - series[seriesId].yAxisKey === axis.id || - (series[seriesId].yAxisKey === undefined && isDefaultAxis), - ) + .filter((seriesId) => { + const axisId = series[seriesId].yAxisId ?? series[seriesId].yAxisKey; + return axisId === axis.id || (axisId === undefined && isDefaultAxis); + }) .reduce( (acc: ExtremumGetterResult, seriesId) => { const seriesMinMax = series[seriesId].data.reduce( diff --git a/packages/x-charts/src/SparkLineChart/SparkLineChart.tsx b/packages/x-charts/src/SparkLineChart/SparkLineChart.tsx index 0fc5335484f3..01b76065fcd9 100644 --- a/packages/x-charts/src/SparkLineChart/SparkLineChart.tsx +++ b/packages/x-charts/src/SparkLineChart/SparkLineChart.tsx @@ -377,7 +377,6 @@ SparkLineChart.propTypes = { * Notice it is a single [[AxisConfig]] object, not an array of configuration. */ xAxis: PropTypes.shape({ - axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), classes: PropTypes.object, colorMap: PropTypes.oneOfType([ PropTypes.shape({ @@ -439,7 +438,6 @@ SparkLineChart.propTypes = { * Notice it is a single [[AxisConfig]] object, not an array of configuration. */ yAxis: PropTypes.shape({ - axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), classes: PropTypes.object, colorMap: PropTypes.oneOfType([ PropTypes.shape({ diff --git a/packages/x-charts/src/context/CartesianProvider/CartesianContext.ts b/packages/x-charts/src/context/CartesianProvider/CartesianContext.ts index 6406b1e42dcc..6351090516cb 100644 --- a/packages/x-charts/src/context/CartesianProvider/CartesianContext.ts +++ b/packages/x-charts/src/context/CartesianProvider/CartesianContext.ts @@ -10,7 +10,7 @@ import { } from '../../models/axis'; export type DefaultizedAxisConfig = { - [axisKey: AxisId]: AxisDefaultized; + [axisId: AxisId]: AxisDefaultized; }; export type CartesianContextState = { diff --git a/packages/x-charts/src/context/CartesianProvider/computeValue.ts b/packages/x-charts/src/context/CartesianProvider/computeValue.ts index fd8505378db6..ab0ee067fbee 100644 --- a/packages/x-charts/src/context/CartesianProvider/computeValue.ts +++ b/packages/x-charts/src/context/CartesianProvider/computeValue.ts @@ -1,4 +1,4 @@ -import { scaleBand, scalePoint, scaleTime } from 'd3-scale'; +import { scaleBand, scalePoint, scaleTime } from '@mui/x-charts-vendor/d3-scale'; import { AxisConfig, ScaleName } from '../../models'; import { ChartsXAxisProps, @@ -18,7 +18,7 @@ import { getColorScale, getOrdinalColorScale } from '../../internals/colorScale' import { getTickNumber } from '../../hooks/useTicks'; import { getScale } from '../../internals/getScale'; import { DrawingArea } from '../DrawingProvider'; -import { FormattedSeries } from '../SeriesContextProvider'; +import { FormattedSeries } from '../SeriesProvider'; import { getAxisExtremum } from './getAxisExtremum'; import { normalizeAxis } from './normalizeAxis'; diff --git a/packages/x-charts/src/context/CartesianProvider/getAxisExtremum.ts b/packages/x-charts/src/context/CartesianProvider/getAxisExtremum.ts index 43a16a657cd4..bcfcfb36cd7d 100644 --- a/packages/x-charts/src/context/CartesianProvider/getAxisExtremum.ts +++ b/packages/x-charts/src/context/CartesianProvider/getAxisExtremum.ts @@ -1,6 +1,6 @@ import { AxisConfig, ExtremumGettersConfig } from '../../models'; import { CartesianChartSeriesType, ExtremumGetterResult } from '../../models/seriesType/config'; -import { FormattedSeries } from '../SeriesContextProvider'; +import { FormattedSeries } from '../SeriesProvider'; const axisExtremumCallback = ( acc: ExtremumGetterResult, diff --git a/packages/x-charts/src/context/CartesianProvider/normalizeAxis.ts b/packages/x-charts/src/context/CartesianProvider/normalizeAxis.ts index 36659a061f66..89f4eefc9518 100644 --- a/packages/x-charts/src/context/CartesianProvider/normalizeAxis.ts +++ b/packages/x-charts/src/context/CartesianProvider/normalizeAxis.ts @@ -18,9 +18,7 @@ export const normalizeAxis = < return axisConfig; } if (dataset === undefined) { - throw Error( - `MUI X Charts: ${axisName}-axis uses \`dataKey\` but no \`dataset\` is provided.`, - ); + throw Error(`MUI X: ${axisName}-axis uses \`dataKey\` but no \`dataset\` is provided.`); } return { ...axisConfig, diff --git a/packages/x-charts/src/context/DrawingProvider.tsx b/packages/x-charts/src/context/DrawingProvider.tsx index 2a3b84d18682..26dee3c5a414 100644 --- a/packages/x-charts/src/context/DrawingProvider.tsx +++ b/packages/x-charts/src/context/DrawingProvider.tsx @@ -42,9 +42,10 @@ export type DrawingArea = { * @param {Object} point The point to check. * @param {number} point.x The x coordinate of the point. * @param {number} point.y The y coordinate of the point. + * @param {Element} targetElement The target element if relevant. * @returns {boolean} `true` if the point is inside the drawing area, `false` otherwise. */ - isPointInside: (point: { x: number; y: number }) => boolean; + isPointInside: (point: { x: number; y: number }, targetElement?: Element) => boolean; }; export const DrawingContext = React.createContext< @@ -86,11 +87,18 @@ export function DrawingProvider(props: DrawingProviderProps) { const chartId = useId(); const isPointInside = React.useCallback( - ({ x, y }) => - x >= drawingArea.left && - x <= drawingArea.left + drawingArea.width && - y >= drawingArea.top && - y <= drawingArea.top + drawingArea.height, + ({ x, y }, targetElement) => { + // For element allowed to overflow, wrapping them in make them fully part of the drawing area. + if (targetElement && targetElement.closest('[data-drawing-container]')) { + return true; + } + return ( + x >= drawingArea.left && + x <= drawingArea.left + drawingArea.width && + y >= drawingArea.top && + y <= drawingArea.top + drawingArea.height + ); + }, [drawingArea], ); diff --git a/packages/x-charts/src/context/HighlightedProvider/HighlightedProvider.tsx b/packages/x-charts/src/context/HighlightedProvider/HighlightedProvider.tsx index 93cd613e2727..2481fc157586 100644 --- a/packages/x-charts/src/context/HighlightedProvider/HighlightedProvider.tsx +++ b/packages/x-charts/src/context/HighlightedProvider/HighlightedProvider.tsx @@ -65,7 +65,7 @@ function HighlightedProvider({ const highlightScope = highlightedItem && highlightedItem.seriesId - ? seriesById.get(highlightedItem.seriesId) ?? undefined + ? (seriesById.get(highlightedItem.seriesId) ?? undefined) : undefined; const providerValue = React.useMemo>(() => { diff --git a/packages/x-charts/src/context/HighlightedProvider/useHighlighted.test.tsx b/packages/x-charts/src/context/HighlightedProvider/useHighlighted.test.tsx index 1ed200662456..3008b3a3801d 100644 --- a/packages/x-charts/src/context/HighlightedProvider/useHighlighted.test.tsx +++ b/packages/x-charts/src/context/HighlightedProvider/useHighlighted.test.tsx @@ -3,7 +3,7 @@ import { expect } from 'chai'; import { ErrorBoundary, createRenderer } from '@mui/internal-test-utils'; import { useHighlighted } from './useHighlighted'; import { HighlightedProvider } from './HighlightedProvider'; -import { SeriesContextProvider } from '../SeriesContextProvider'; +import { SeriesProvider } from '../SeriesProvider'; function UseHighlighted() { const { highlightedItem } = useHighlighted(); @@ -42,11 +42,11 @@ describe('useHighlighted', () => { it('should not throw an error when parent context is present', () => { const { getByText } = render( - + - , + , ); expect(getByText('test-id')).toBeVisible(); diff --git a/packages/x-charts/src/context/SeriesContextProvider.tsx b/packages/x-charts/src/context/SeriesContextProvider.tsx deleted file mode 100644 index 05ee76e3bf28..000000000000 --- a/packages/x-charts/src/context/SeriesContextProvider.tsx +++ /dev/null @@ -1,122 +0,0 @@ -import * as React from 'react'; -import { useTheme } from '@mui/material/styles'; -import { AllSeriesType } from '../models/seriesType'; -import { defaultizeColor } from '../internals/defaultizeColor'; -import { - ChartSeriesType, - DatasetType, - FormatterParams, - FormatterResult, -} from '../models/seriesType/config'; -import { ChartsColorPalette, blueberryTwilightPalette } from '../colorPalettes'; -import { Initializable } from './context.types'; - -export type SeriesFormatterType = ( - series: AllSeriesType[], - colors: string[], - dataset?: DatasetType, -) => { [type in T]?: FormatterResult }; - -export type SeriesContextProviderProps = { - dataset?: DatasetType; - /** - * The array of series to display. - * Each type of series has its own specificity. - * Please refer to the appropriate docs page to learn more about it. - */ - series: AllSeriesType[]; - /** - * Color palette used to colorize multiple series. - * @default blueberryTwilightPalette - */ - colors?: ChartsColorPalette; - /** - * Preprocessors for each series types. - */ - seriesFormatters: SeriesFormatterConfig; - children: React.ReactNode; -}; - -export type FormattedSeries = { [type in ChartSeriesType]?: FormatterResult }; - -export const SeriesContext = React.createContext>({ - isInitialized: false, - data: {}, -}); - -if (process.env.NODE_ENV !== 'production') { - SeriesContext.displayName = 'SeriesContext'; -} - -export type SeriesFormatterConfig = { - // TODO replace the function type by Formatter - [K in T]?: (series: FormatterParams, dataset?: DatasetType) => any; -}; - -/** - * This methods is the interface between what the developer is providing and what components receives - * To simplify the components behaviors, it groups series by type, such that LinePlots props are not updated if some line data are modified - * It also add defaultized values such as the ids, colors - * @param series The array of series provided by devs - * @param colors The color palette used to defaultize series colors - * @returns An object structuring all the series by type. - */ -const preprocessSeries = ( - series: AllSeriesType[], - colors: string[], - seriesFormatters: SeriesFormatterConfig, - dataset?: DatasetType, -) => { - // Group series by type - const seriesGroups: { [type in ChartSeriesType]?: FormatterParams } = {}; - series.forEach((seriesData, seriesIndex: number) => { - const { id = `auto-generated-id-${seriesIndex}`, type } = seriesData; - - if (seriesGroups[type] === undefined) { - seriesGroups[type] = { series: {}, seriesOrder: [] }; - } - if (seriesGroups[type]?.series[id] !== undefined) { - throw new Error(`MUI X Charts: series' id "${id}" is not unique.`); - } - - seriesGroups[type]!.series[id] = { - id, - ...defaultizeColor(seriesData, seriesIndex, colors), - }; - seriesGroups[type]!.seriesOrder.push(id); - }); - - const formattedSeries: FormattedSeries = {}; - // Apply formatter on a type group - (Object.keys(seriesFormatters) as T[]).forEach((type) => { - const group = seriesGroups[type]; - if (group !== undefined) { - formattedSeries[type] = seriesFormatters[type]?.(group, dataset) ?? seriesGroups[type]; - } - }); - - return formattedSeries; -}; - -function SeriesContextProvider(props: SeriesContextProviderProps) { - const { series, dataset, colors = blueberryTwilightPalette, seriesFormatters, children } = props; - - const theme = useTheme(); - - const formattedSeries = React.useMemo( - () => ({ - isInitialized: true, - data: preprocessSeries( - series, - typeof colors === 'function' ? colors(theme.palette.mode) : colors, - seriesFormatters, - dataset as DatasetType, - ), - }), - [series, colors, theme.palette.mode, seriesFormatters, dataset], - ); - - return {children}; -} - -export { SeriesContextProvider }; diff --git a/packages/x-charts/src/context/SeriesProvider/Series.types.ts b/packages/x-charts/src/context/SeriesProvider/Series.types.ts new file mode 100644 index 000000000000..ce863244ab65 --- /dev/null +++ b/packages/x-charts/src/context/SeriesProvider/Series.types.ts @@ -0,0 +1,42 @@ +import * as React from 'react'; +import { AllSeriesType } from '../../models/seriesType'; +import { + ChartSeriesType, + DatasetType, + FormatterParams, + FormatterResult, +} from '../../models/seriesType/config'; +import { ChartsColorPalette } from '../../colorPalettes'; + +export type SeriesFormatterType = ( + series: AllSeriesType[], + colors: string[], + dataset?: DatasetType, +) => { [type in T]?: FormatterResult }; + +export type SeriesProviderProps = { + dataset?: DatasetType; + /** + * The array of series to display. + * Each type of series has its own specificity. + * Please refer to the appropriate docs page to learn more about it. + */ + series: AllSeriesType[]; + /** + * Color palette used to colorize multiple series. + * @default blueberryTwilightPalette + */ + colors?: ChartsColorPalette; + /** + * Preprocessors for each series types. + */ + seriesFormatters: SeriesFormatterConfig; + children: React.ReactNode; +}; + +export type FormattedSeries = { [type in ChartSeriesType]?: FormatterResult }; + +export type SeriesFormatterConfig = { + // TODO replace the function type by Formatter + [K in T]?: (series: FormatterParams, dataset?: DatasetType) => any; +}; diff --git a/packages/x-charts/src/context/SeriesProvider/SeriesContext.ts b/packages/x-charts/src/context/SeriesProvider/SeriesContext.ts new file mode 100644 index 000000000000..712d5bdb6e0c --- /dev/null +++ b/packages/x-charts/src/context/SeriesProvider/SeriesContext.ts @@ -0,0 +1,12 @@ +import * as React from 'react'; +import { Initializable } from '../context.types'; +import { FormattedSeries } from './Series.types'; + +export const SeriesContext = React.createContext>({ + isInitialized: false, + data: {}, +}); + +if (process.env.NODE_ENV !== 'production') { + SeriesContext.displayName = 'SeriesContext'; +} diff --git a/packages/x-charts/src/context/SeriesProvider/SeriesProvider.tsx b/packages/x-charts/src/context/SeriesProvider/SeriesProvider.tsx new file mode 100644 index 000000000000..9925208933bc --- /dev/null +++ b/packages/x-charts/src/context/SeriesProvider/SeriesProvider.tsx @@ -0,0 +1,30 @@ +import * as React from 'react'; +import { useTheme } from '@mui/material/styles'; +import { ChartSeriesType, DatasetType } from '../../models/seriesType/config'; +import { blueberryTwilightPalette } from '../../colorPalettes'; +import { SeriesProviderProps } from './Series.types'; +import { SeriesContext } from './SeriesContext'; +import { preprocessSeries } from './processSeries'; + +function SeriesProvider(props: SeriesProviderProps) { + const { series, dataset, colors = blueberryTwilightPalette, seriesFormatters, children } = props; + + const theme = useTheme(); + + const formattedSeries = React.useMemo( + () => ({ + isInitialized: true, + data: preprocessSeries({ + series, + colors: typeof colors === 'function' ? colors(theme.palette.mode) : colors, + seriesFormatters, + dataset: dataset as DatasetType, + }), + }), + [series, colors, theme.palette.mode, seriesFormatters, dataset], + ); + + return {children}; +} + +export { SeriesProvider }; diff --git a/packages/x-charts/src/context/SeriesProvider/index.ts b/packages/x-charts/src/context/SeriesProvider/index.ts new file mode 100644 index 000000000000..852fb6928868 --- /dev/null +++ b/packages/x-charts/src/context/SeriesProvider/index.ts @@ -0,0 +1,11 @@ +import { preprocessSeries } from './processSeries'; + +export * from './SeriesProvider'; +export * from './SeriesContext'; +export * from './Series.types'; + +const seriesProviderUtils = { + preprocessSeries, +}; + +export { seriesProviderUtils }; diff --git a/packages/x-charts/src/context/SeriesProvider/processSeries.ts b/packages/x-charts/src/context/SeriesProvider/processSeries.ts new file mode 100644 index 000000000000..7f00c1e0b229 --- /dev/null +++ b/packages/x-charts/src/context/SeriesProvider/processSeries.ts @@ -0,0 +1,54 @@ +import { AllSeriesType } from '../../models/seriesType'; +import { defaultizeColor } from '../../internals/defaultizeColor'; +import { ChartSeriesType, DatasetType, FormatterParams } from '../../models/seriesType/config'; +import { FormattedSeries, SeriesFormatterConfig } from './Series.types'; + +/** + * This methods is the interface between what the developer is providing and what components receives + * To simplify the components behaviors, it groups series by type, such that LinePlots props are not updated if some line data are modified + * It also add defaultized values such as the ids, colors + * @param series The array of series provided by the developer + * @param colors The color palette used to defaultize series colors + * @returns An object structuring all the series by type. + */ +export const preprocessSeries = ({ + series, + colors, + seriesFormatters, + dataset, +}: { + series: AllSeriesType[]; + colors: string[]; + seriesFormatters: SeriesFormatterConfig; + dataset?: DatasetType; +}) => { + // Group series by type + const seriesGroups: { [type in ChartSeriesType]?: FormatterParams } = {}; + series.forEach((seriesData, seriesIndex: number) => { + const { id = `auto-generated-id-${seriesIndex}`, type } = seriesData; + + if (seriesGroups[type] === undefined) { + seriesGroups[type] = { series: {}, seriesOrder: [] }; + } + if (seriesGroups[type]?.series[id] !== undefined) { + throw new Error(`MUI X: series' id "${id}" is not unique.`); + } + + seriesGroups[type]!.series[id] = { + id, + ...defaultizeColor(seriesData, seriesIndex, colors), + }; + seriesGroups[type]!.seriesOrder.push(id); + }); + + const formattedSeries: FormattedSeries = {}; + // Apply formatter on a type group + (Object.keys(seriesFormatters) as T[]).forEach((type) => { + const group = seriesGroups[type]; + if (group !== undefined) { + formattedSeries[type] = seriesFormatters[type]?.(group, dataset) ?? seriesGroups[type]; + } + }); + + return formattedSeries; +}; diff --git a/packages/x-charts/src/context/ZAxisContextProvider.tsx b/packages/x-charts/src/context/ZAxisContextProvider.tsx index 413dc0fad32f..c2407d89424c 100644 --- a/packages/x-charts/src/context/ZAxisContextProvider.tsx +++ b/packages/x-charts/src/context/ZAxisContextProvider.tsx @@ -18,7 +18,7 @@ export type ZAxisContextProviderProps = { }; type DefaultizedZAxisConfig = { - [axisKey: string]: ZAxisDefaultized; + [axisId: string]: ZAxisDefaultized; }; export const ZAxisContext = React.createContext<{ @@ -47,7 +47,7 @@ function ZAxisContextProvider(props: ZAxisContextProviderProps) { return axisConfig; } if (dataset === undefined) { - throw Error('MUI X Charts: z-axis uses `dataKey` but no `dataset` is provided.'); + throw Error('MUI X: z-axis uses `dataKey` but no `dataset` is provided.'); } return { ...axisConfig, diff --git a/packages/x-charts/src/hooks/useAxisEvents.ts b/packages/x-charts/src/hooks/useAxisEvents.ts index 963e53ea143a..f20d26f76dcc 100644 --- a/packages/x-charts/src/hooks/useAxisEvents.ts +++ b/packages/x-charts/src/hooks/useAxisEvents.ts @@ -21,6 +21,7 @@ export const useAxisEvents = (disableAxisListener: boolean) => { // Use a ref to avoid rerendering on every mousemove event. const mousePosition = React.useRef({ + isInChart: false, x: -1, y: -1, }); @@ -94,6 +95,7 @@ export const useAxisEvents = (disableAxisListener: boolean) => { const handleOut = () => { mousePosition.current = { + isInChart: false, x: -1, y: -1, }; @@ -104,15 +106,17 @@ export const useAxisEvents = (disableAxisListener: boolean) => { const target = 'targetTouches' in event ? event.targetTouches[0] : event; const svgPoint = getSVGPoint(element, target); - mousePosition.current = { - x: svgPoint.x, - y: svgPoint.y, - }; + mousePosition.current.x = svgPoint.x; + mousePosition.current.y = svgPoint.y; - if (!drawingArea.isPointInside(svgPoint)) { - dispatch({ type: 'exitChart' }); + if (!drawingArea.isPointInside(svgPoint, event.target as SVGElement)) { + if (mousePosition.current.isInChart) { + dispatch({ type: 'exitChart' }); + mousePosition.current.isInChart = false; + } return; } + mousePosition.current.isInChart = true; const newStateX = getNewAxisState(xAxis[usedXAxis], svgPoint.x); const newStateY = getNewAxisState(yAxis[usedYAxis], svgPoint.y); diff --git a/packages/x-charts/src/hooks/useReducedMotion.ts b/packages/x-charts/src/hooks/useReducedMotion.ts index 74e30fb792c2..b95f28d4a9da 100644 --- a/packages/x-charts/src/hooks/useReducedMotion.ts +++ b/packages/x-charts/src/hooks/useReducedMotion.ts @@ -20,10 +20,10 @@ export const useReducedMotion = () => { } const mql = window.matchMedia('(prefers-reduced-motion)'); - const handleMediaChange = (e: MediaQueryListEvent | MediaQueryList) => { + const handleMediaChange = (event: MediaQueryListEvent | MediaQueryList) => { Globals.assign({ // Modification such the react-spring implementation such that this hook can remove animation but never activate animation. - skipAnimation: e.matches || undefined, + skipAnimation: event.matches || undefined, }); }; diff --git a/packages/x-charts/src/hooks/useSeries.test.tsx b/packages/x-charts/src/hooks/useSeries.test.tsx index 0e2d247a0b40..d4def2d8df7c 100644 --- a/packages/x-charts/src/hooks/useSeries.test.tsx +++ b/packages/x-charts/src/hooks/useSeries.test.tsx @@ -3,7 +3,7 @@ import { expect } from 'chai'; import { ErrorBoundary, createRenderer } from '@mui/internal-test-utils'; import { useSeries } from './useSeries'; import barFormatter from '../BarChart/formatter'; -import { SeriesContextProvider } from '../context/SeriesContextProvider'; +import { SeriesProvider } from '../context/SeriesProvider'; function UseSeries() { const { bar } = useSeries(); @@ -42,12 +42,12 @@ describe('useSeries', () => { it('should not throw an error when parent context is present', () => { const { getByText } = render( - - , + , ); expect(getByText('test-id')).toBeVisible(); diff --git a/packages/x-charts/src/hooks/useSeries.ts b/packages/x-charts/src/hooks/useSeries.ts index 4b4d7fa6e079..ab771ed1bca2 100644 --- a/packages/x-charts/src/hooks/useSeries.ts +++ b/packages/x-charts/src/hooks/useSeries.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { FormattedSeries, SeriesContext } from '../context/SeriesContextProvider'; +import { FormattedSeries, SeriesContext } from '../context/SeriesProvider'; /** * Get access to the internal state of series. diff --git a/packages/x-charts/src/hooks/useTicks.ts b/packages/x-charts/src/hooks/useTicks.ts index ecc42b5727fe..4b41fe74eeab 100644 --- a/packages/x-charts/src/hooks/useTicks.ts +++ b/packages/x-charts/src/hooks/useTicks.ts @@ -46,7 +46,7 @@ export interface TickParams { export function getTickNumber( params: TickParams & { - range: any[]; + range: number[]; domain: any[]; }, ) { diff --git a/packages/x-charts/src/internals/SlotComponentPropsFromProps.ts b/packages/x-charts/src/internals/SlotComponentPropsFromProps.ts new file mode 100644 index 000000000000..7ea98c11f1ba --- /dev/null +++ b/packages/x-charts/src/internals/SlotComponentPropsFromProps.ts @@ -0,0 +1,5 @@ +export type SlotComponentPropsFromProps< + TProps extends {}, + TOverrides extends {}, + TOwnerState extends {}, +> = (Partial & TOverrides) | ((ownerState: TOwnerState) => Partial & TOverrides); diff --git a/packages/x-charts/src/internals/colorScale.ts b/packages/x-charts/src/internals/colorScale.ts index a0c2807e9dfd..be5792fceb85 100644 --- a/packages/x-charts/src/internals/colorScale.ts +++ b/packages/x-charts/src/internals/colorScale.ts @@ -1,4 +1,9 @@ -import { scaleOrdinal, scaleThreshold, scaleSequential, ScaleOrdinal } from 'd3-scale'; +import { + scaleOrdinal, + scaleThreshold, + scaleSequential, + ScaleOrdinal, +} from '@mui/x-charts-vendor/d3-scale'; import { ContinuousColorConfig, PiecewiseColorConfig, diff --git a/packages/x-charts/src/internals/components/ChartsAxesGradients/ChartsContinuousGradient.tsx b/packages/x-charts/src/internals/components/ChartsAxesGradients/ChartsContinuousGradient.tsx index 271229c0d5a0..f78518a478c5 100644 --- a/packages/x-charts/src/internals/components/ChartsAxesGradients/ChartsContinuousGradient.tsx +++ b/packages/x-charts/src/internals/components/ChartsAxesGradients/ChartsContinuousGradient.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { interpolateDate, interpolateNumber } from 'd3-interpolate'; +import { interpolateDate, interpolateNumber } from '@mui/x-charts-vendor/d3-interpolate'; import { ContinuousColorConfig } from '../../../models/colorMapping'; const PX_PRECISION = 10; diff --git a/packages/x-charts/src/internals/geometry.ts b/packages/x-charts/src/internals/geometry.ts index 593ba18e20a0..43fd024cacc3 100644 --- a/packages/x-charts/src/internals/geometry.ts +++ b/packages/x-charts/src/internals/geometry.ts @@ -16,7 +16,7 @@ export function getMinXTranslation(width: number, height: number, angle: number warnedOnce = true; console.warn( [ - `MUI X Charts: It seems you applied an angle larger than 90° or smaller than -90° to an axis text.`, + `MUI X: It seems you applied an angle larger than 90° or smaller than -90° to an axis text.`, `This could cause some text overlapping.`, `If you encounter a use case where it's needed, please open an issue.`, ].join('\n'), diff --git a/packages/x-charts/src/internals/getCurve.ts b/packages/x-charts/src/internals/getCurve.ts index f07de1b0e561..73691782fb75 100644 --- a/packages/x-charts/src/internals/getCurve.ts +++ b/packages/x-charts/src/internals/getCurve.ts @@ -7,7 +7,7 @@ import { curveStep, curveStepAfter, curveStepBefore, -} from 'd3-shape'; +} from '@mui/x-charts-vendor/d3-shape'; import { CurveType } from '../models/seriesType/line'; export default function getCurveFactory(curveType?: CurveType) { diff --git a/packages/x-charts/src/internals/getPercentageValue.ts b/packages/x-charts/src/internals/getPercentageValue.ts index 2edabcbd93c5..85f843f10852 100644 --- a/packages/x-charts/src/internals/getPercentageValue.ts +++ b/packages/x-charts/src/internals/getPercentageValue.ts @@ -25,6 +25,6 @@ export function getPercentageValue(value: number | string, refValue: number) { } } throw Error( - `MUI X Charts: Received an unknown value "${value}". It should be a number, or a string with a percentage value.`, + `MUI X: Received an unknown value "${value}". It should be a number, or a string with a percentage value.`, ); } diff --git a/packages/x-charts/src/internals/getScale.ts b/packages/x-charts/src/internals/getScale.ts index 68ab1d5e4fbc..c3d70478cf77 100644 --- a/packages/x-charts/src/internals/getScale.ts +++ b/packages/x-charts/src/internals/getScale.ts @@ -1,4 +1,11 @@ -import { scaleLog, scalePow, scaleSqrt, scaleTime, scaleUtc, scaleLinear } from 'd3-scale'; +import { + scaleLog, + scalePow, + scaleSqrt, + scaleTime, + scaleUtc, + scaleLinear, +} from '@mui/x-charts-vendor/d3-scale'; import { ContinuousScaleName, D3ContinuousScale } from '../models/axis'; export function getScale( diff --git a/packages/x-charts/src/internals/index.ts b/packages/x-charts/src/internals/index.ts index 9a2d7f7ae017..193cc1769bb5 100644 --- a/packages/x-charts/src/internals/index.ts +++ b/packages/x-charts/src/internals/index.ts @@ -28,7 +28,7 @@ export * from '../context/CartesianProvider'; export * from '../context/DrawingProvider'; export * from '../context/ColorProvider'; export * from '../context/InteractionProvider'; -export * from '../context/SeriesContextProvider'; +export * from '../context/SeriesProvider'; export * from '../context/ZAxisContextProvider'; export type * from '../context/context.types'; diff --git a/packages/x-charts/src/internals/isBandScale.ts b/packages/x-charts/src/internals/isBandScale.ts index 0479662fd607..274598d6eeb5 100644 --- a/packages/x-charts/src/internals/isBandScale.ts +++ b/packages/x-charts/src/internals/isBandScale.ts @@ -1,4 +1,4 @@ -import type { ScaleBand, ScalePoint } from 'd3-scale'; +import type { ScaleBand, ScalePoint } from '@mui/x-charts-vendor/d3-scale'; import { D3Scale } from '../models/axis'; export function isBandScale( diff --git a/packages/x-charts/src/internals/stackSeries.ts b/packages/x-charts/src/internals/stackSeries.ts index 84a49749808d..597975768740 100644 --- a/packages/x-charts/src/internals/stackSeries.ts +++ b/packages/x-charts/src/internals/stackSeries.ts @@ -11,7 +11,7 @@ import { stackOffsetSilhouette as d3StackOffsetSilhouette, stackOffsetWiggle as d3StackOffsetWiggle, Series, -} from 'd3-shape'; +} from '@mui/x-charts-vendor/d3-shape'; import type { BarSeriesType, LineSeriesType } from '../models/seriesType'; import type { StackOffsetType, StackOrderType } from '../models/stacking'; import { SeriesId } from '../models/seriesType/common'; diff --git a/packages/x-charts/src/internals/useAnimatedPath.ts b/packages/x-charts/src/internals/useAnimatedPath.ts index 034302c08f7b..9f29447fe138 100644 --- a/packages/x-charts/src/internals/useAnimatedPath.ts +++ b/packages/x-charts/src/internals/useAnimatedPath.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { interpolateString } from 'd3-interpolate'; +import { interpolateString } from '@mui/x-charts-vendor/d3-interpolate'; import { useSpring, to } from '@react-spring/web'; function usePrevious(value: T) { diff --git a/packages/x-charts/src/internals/warning.ts b/packages/x-charts/src/internals/warning.ts index 412c7ed444dd..f0d34fc59f68 100644 --- a/packages/x-charts/src/internals/warning.ts +++ b/packages/x-charts/src/internals/warning.ts @@ -1,17 +1,25 @@ -export function buildWarning( - message: (...args: any) => string, - gravity: 'warning' | 'error' = 'warning', -) { - let alreadyWarned = false; +const warnedOnceCache = new Set(); - return (...args: any) => { - if (!alreadyWarned) { - alreadyWarned = true; - if (gravity === 'error') { - console.error(message(...args)); - } else { - console.warn(message(...args)); - } +// TODO move to @mui/x-internals +// TODO eventually move to @base_ui/internals. Base UI, etc. too need this helper. +export function warnOnce(message: string | string[], gravity: 'warning' | 'error' = 'warning') { + if (process.env.NODE_ENV === 'production') { + return; + } + + const cleanMessage = Array.isArray(message) ? message.join('\n') : message; + + if (!warnedOnceCache.has(cleanMessage)) { + warnedOnceCache.add(cleanMessage); + + if (gravity === 'error') { + console.error(cleanMessage); + } else { + console.warn(cleanMessage); } - }; + } +} + +export function clearWarningsCache() { + warnedOnceCache.clear(); } diff --git a/packages/x-charts/src/models/axis.ts b/packages/x-charts/src/models/axis.ts index fb602f83f5d6..28d946f43b3c 100644 --- a/packages/x-charts/src/models/axis.ts +++ b/packages/x-charts/src/models/axis.ts @@ -8,7 +8,7 @@ import type { ScaleOrdinal, ScaleSequential, ScaleThreshold, -} from 'd3-scale'; +} from '@mui/x-charts-vendor/d3-scale'; import { ChartsAxisClasses } from '../ChartsAxis/axisClasses'; import type { TickParams } from '../hooks/useTicks'; import { ChartsTextProps } from '../ChartsText'; @@ -304,7 +304,7 @@ export type AxisConfig< * If `true`, Reverse the axis scaleBand. */ reverse?: boolean; -} & Partial & +} & Omit, 'axisId'> & Partial> & TickParams & AxisConfigExtension; diff --git a/packages/x-charts/src/models/seriesType/common.ts b/packages/x-charts/src/models/seriesType/common.ts index d9c4212fe56f..5ec59cc45455 100644 --- a/packages/x-charts/src/models/seriesType/common.ts +++ b/packages/x-charts/src/models/seriesType/common.ts @@ -36,12 +36,22 @@ export type CommonDefaultizedProps = 'id' | 'valueFormatter' | 'data'; export type CartesianSeriesType = { /** * The id of the x-axis used to render the series. + * @deprecated Use `xAxisId` instead */ xAxisKey?: string; /** * The id of the y-axis used to render the series. + * @deprecated Use `xAxisId` instead */ yAxisKey?: string; + /** + * The id of the x-axis used to render the series. + */ + xAxisId?: string; + /** + * The id of the y-axis used to render the series. + */ + yAxisId?: string; }; export type StackableSeriesType = { diff --git a/packages/x-charts/src/models/seriesType/pie.ts b/packages/x-charts/src/models/seriesType/pie.ts index 5dc86e2bf042..bf87340066cb 100644 --- a/packages/x-charts/src/models/seriesType/pie.ts +++ b/packages/x-charts/src/models/seriesType/pie.ts @@ -1,4 +1,4 @@ -import { PieArcDatum as D3PieArcDatum } from 'd3-shape'; +import { PieArcDatum as D3PieArcDatum } from '@mui/x-charts-vendor/d3-shape'; import { DefaultizedProps } from '../helpers'; import { CommonDefaultizedProps, CommonSeriesType, SeriesId } from './common'; diff --git a/packages/x-charts/src/models/seriesType/scatter.ts b/packages/x-charts/src/models/seriesType/scatter.ts index 7a67df4b89e0..4048b662c388 100644 --- a/packages/x-charts/src/models/seriesType/scatter.ts +++ b/packages/x-charts/src/models/seriesType/scatter.ts @@ -26,8 +26,13 @@ export interface ScatterSeriesType extends CommonSeriesType, C disableHover?: boolean; /** * The id of the z-axis used to render the series. + * @deprecated Use `zAxisId` instead. */ zAxisKey?: string; + /** + * The id of the z-axis used to render the series. + */ + zAxisId?: string; } /** diff --git a/packages/x-charts/src/models/z-axis.ts b/packages/x-charts/src/models/z-axis.ts index 194622049534..15ce09b5cc38 100644 --- a/packages/x-charts/src/models/z-axis.ts +++ b/packages/x-charts/src/models/z-axis.ts @@ -1,4 +1,4 @@ -import type { ScaleOrdinal, ScaleSequential, ScaleThreshold } from 'd3-scale'; +import type { ScaleOrdinal, ScaleSequential, ScaleThreshold } from '@mui/x-charts-vendor/d3-scale'; import { ContinuousColorConfig, OrdinalColorConfig, PiecewiseColorConfig } from './colorMapping'; export interface ZAxisConfig { diff --git a/packages/x-codemod/package.json b/packages/x-codemod/package.json index e5be3fbfc401..6bd85dc1f6d6 100644 --- a/packages/x-codemod/package.json +++ b/packages/x-codemod/package.json @@ -32,9 +32,9 @@ "url": "https://opencollective.com/mui-org" }, "dependencies": { - "@babel/core": "^7.24.8", - "@babel/runtime": "^7.24.8", - "@babel/traverse": "^7.24.8", + "@babel/core": "^7.25.2", + "@babel/runtime": "^7.25.0", + "@babel/traverse": "^7.25.2", "jscodeshift": "0.16.1", "yargs": "^17.7.2" }, @@ -42,7 +42,7 @@ "@types/jscodeshift": "^0.11.11", "dayjs": "^1.11.11", "moment-timezone": "^0.5.45", - "rimraf": "^5.0.8" + "rimraf": "^5.0.9" }, "sideEffects": false, "publishConfig": { diff --git a/packages/x-data-grid-generator/package.json b/packages/x-data-grid-generator/package.json index 1d6b086c618a..c45ba4a8a521 100644 --- a/packages/x-data-grid-generator/package.json +++ b/packages/x-data-grid-generator/package.json @@ -1,6 +1,6 @@ { "name": "@mui/x-data-grid-generator", - "version": "7.11.0", + "version": "7.11.1", "description": "Generate fake data for demo purposes only.", "author": "MUI Team", "main": "src/index.ts", @@ -33,16 +33,15 @@ "directory": "packages/x-data-grid-generator" }, "dependencies": { - "@babel/runtime": "^7.24.8", - "@mui/base": "^5.0.0-beta.40", + "@babel/runtime": "^7.25.0", "@mui/x-data-grid-premium": "workspace:*", "chance": "^1.1.12", "clsx": "^2.1.1", - "lru-cache": "^10.3.0" + "lru-cache": "^10.4.3" }, "devDependencies": { "@types/chance": "^1.1.6", - "rimraf": "^5.0.8" + "rimraf": "^5.0.9" }, "peerDependencies": { "@mui/icons-material": "^5.4.1", diff --git a/packages/x-data-grid-premium/package.json b/packages/x-data-grid-premium/package.json index c49b43d87781..9b1c244c808f 100644 --- a/packages/x-data-grid-premium/package.json +++ b/packages/x-data-grid-premium/package.json @@ -1,6 +1,6 @@ { "name": "@mui/x-data-grid-premium", - "version": "7.11.0", + "version": "7.11.1", "description": "The Premium plan edition of the Data Grid Components (MUI X).", "author": "MUI Team", "main": "src/index.ts", @@ -43,9 +43,9 @@ "directory": "packages/x-data-grid-premium" }, "dependencies": { - "@babel/runtime": "^7.24.8", - "@mui/system": "^5.16.2", - "@mui/utils": "^5.16.2", + "@babel/runtime": "^7.25.0", + "@mui/system": "^5.16.5", + "@mui/utils": "^5.16.5", "@mui/x-data-grid": "workspace:*", "@mui/x-data-grid-pro": "workspace:*", "@mui/x-internals": "workspace:*", @@ -62,10 +62,10 @@ "react-dom": "^17.0.0 || ^18.0.0" }, "devDependencies": { - "@mui/internal-test-utils": "^1.0.4", + "@mui/internal-test-utils": "^1.0.5", "@types/prop-types": "^15.7.12", "date-fns": "^2.30.0", - "rimraf": "^5.0.8" + "rimraf": "^5.0.9" }, "engines": { "node": ">=14.0.0" diff --git a/packages/x-data-grid-premium/src/DataGridPremium/useDataGridPremiumProps.ts b/packages/x-data-grid-premium/src/DataGridPremium/useDataGridPremiumProps.ts index 0d50f1b0a819..b1efe92d1480 100644 --- a/packages/x-data-grid-premium/src/DataGridPremium/useDataGridPremiumProps.ts +++ b/packages/x-data-grid-premium/src/DataGridPremium/useDataGridPremiumProps.ts @@ -4,6 +4,7 @@ import { DATA_GRID_PRO_PROPS_DEFAULT_VALUES, GRID_DEFAULT_LOCALE_TEXT, DataGridProProps, + GridSignature, } from '@mui/x-data-grid-pro'; import { computeSlots, useProps } from '@mui/x-data-grid-pro/internals'; import { @@ -25,7 +26,7 @@ type GetDataGridProForcedProps = ( ) => DataGridProForcedProps; const getDataGridPremiumForcedProps: GetDataGridProForcedProps = (themedProps) => ({ - signature: 'DataGridPremium', + signature: GridSignature.DataGridPremium, ...(themedProps.unstable_dataSource ? { filterMode: 'server', diff --git a/packages/x-data-grid-premium/src/components/GridAggregationHeader.tsx b/packages/x-data-grid-premium/src/components/GridAggregationHeader.tsx index bcf55edd9897..45048fa89147 100644 --- a/packages/x-data-grid-premium/src/components/GridAggregationHeader.tsx +++ b/packages/x-data-grid-premium/src/components/GridAggregationHeader.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { styled } from '@mui/material/styles'; import { getDataGridUtilityClass, diff --git a/packages/x-data-grid-premium/src/components/GridColumnMenuAggregationItem.tsx b/packages/x-data-grid-premium/src/components/GridColumnMenuAggregationItem.tsx index 01bba6af146b..f2976b011913 100644 --- a/packages/x-data-grid-premium/src/components/GridColumnMenuAggregationItem.tsx +++ b/packages/x-data-grid-premium/src/components/GridColumnMenuAggregationItem.tsx @@ -83,7 +83,7 @@ function GridColumnMenuAggregationItem(props: GridColumnMenuItemProps) { label={label} color="primary" onChange={handleAggregationItemChange} - onBlur={(e) => e.stopPropagation()} + onBlur={(event) => event.stopPropagation()} fullWidth > ... diff --git a/packages/x-data-grid-premium/src/components/GridFooterCell.tsx b/packages/x-data-grid-premium/src/components/GridFooterCell.tsx index e7184db59b37..d7b7c601d62c 100644 --- a/packages/x-data-grid-premium/src/components/GridFooterCell.tsx +++ b/packages/x-data-grid-premium/src/components/GridFooterCell.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { getDataGridUtilityClass, GridRenderCellParams } from '@mui/x-data-grid'; import { styled, Theme } from '@mui/material/styles'; import { SxProps } from '@mui/system'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { useGridRootProps } from '../hooks/utils/useGridRootProps'; import { DataGridPremiumProcessedProps } from '../models/dataGridPremiumProps'; diff --git a/packages/x-data-grid-premium/src/components/GridGroupingCriteriaCell.tsx b/packages/x-data-grid-premium/src/components/GridGroupingCriteriaCell.tsx index b9b367ea6c31..0046dc3294a4 100644 --- a/packages/x-data-grid-premium/src/components/GridGroupingCriteriaCell.tsx +++ b/packages/x-data-grid-premium/src/components/GridGroupingCriteriaCell.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import Box from '@mui/material/Box'; import { useGridSelector, diff --git a/packages/x-data-grid-premium/src/hooks/features/aggregation/wrapColumnWithAggregation.tsx b/packages/x-data-grid-premium/src/hooks/features/aggregation/wrapColumnWithAggregation.tsx index 3b40db435437..f0fba4cf79dc 100644 --- a/packages/x-data-grid-premium/src/hooks/features/aggregation/wrapColumnWithAggregation.tsx +++ b/packages/x-data-grid-premium/src/hooks/features/aggregation/wrapColumnWithAggregation.tsx @@ -209,7 +209,7 @@ export const wrapColumnWithAggregationValue = ({ } // TODO: Add custom root id - const groupId = cellAggregationPosition === 'inline' ? id : rowNode.parent ?? ''; + const groupId = cellAggregationPosition === 'inline' ? id : (rowNode.parent ?? ''); const aggregationResult = gridAggregationLookupSelector(apiRef)?.[groupId]?.[field]; if (!aggregationResult || aggregationResult.position !== cellAggregationPosition) { diff --git a/packages/x-data-grid-premium/src/hooks/features/cellSelection/useGridCellSelection.ts b/packages/x-data-grid-premium/src/hooks/features/cellSelection/useGridCellSelection.ts index 920aafd965bf..5c4e3020ba61 100644 --- a/packages/x-data-grid-premium/src/hooks/features/cellSelection/useGridCellSelection.ts +++ b/packages/x-data-grid-premium/src/hooks/features/cellSelection/useGridCellSelection.ts @@ -4,6 +4,7 @@ import { GridPipeProcessor, GridStateInitializer, getTotalHeaderHeight, + getVisibleRows, isNavigationKey, serializeCellValue, useGridRegisterPipeProcessor, @@ -164,22 +165,37 @@ export const useGridCellSelection = ( const getSelectedCellsAsArray = React.useCallback< GridCellSelectionApi['getSelectedCellsAsArray'] >(() => { - const model = apiRef.current.getCellSelectionModel(); + const selectionModel = apiRef.current.getCellSelectionModel(); const idToIdLookup = gridRowsDataRowIdToIdLookupSelector(apiRef); + const currentVisibleRows = getVisibleRows(apiRef, props); + const sortedEntries = currentVisibleRows.rows.reduce( + (result, row) => { + if (row.id in selectionModel) { + result.push([row.id, selectionModel[row.id]]); + } + return result; + }, + [] as [GridRowId, Record][], + ); - return Object.entries(model).reduce<{ id: GridRowId; field: string }[]>( - (acc, [id, fields]) => [ - ...acc, - ...Object.entries(fields).reduce<{ id: GridRowId; field: string }[]>( - (acc2, [field, isSelected]) => { - return isSelected ? [...acc2, { id: idToIdLookup[id], field }] : acc2; - }, - [], - ), - ], + return sortedEntries.reduce<{ id: GridRowId; field: string }[]>( + (selectedCells, [id, fields]) => { + selectedCells.push( + ...Object.entries(fields).reduce<{ id: GridRowId; field: string }[]>( + (selectedFields, [field, isSelected]) => { + if (isSelected) { + selectedFields.push({ id: idToIdLookup[id], field }); + } + return selectedFields; + }, + [], + ), + ); + return selectedCells; + }, [], ); - }, [apiRef]); + }, [apiRef, props]); const cellSelectionApi: GridCellSelectionApi = { isCellSelected, diff --git a/packages/x-data-grid-premium/src/hooks/features/clipboard/useGridClipboardImport.ts b/packages/x-data-grid-premium/src/hooks/features/clipboard/useGridClipboardImport.ts index b05389a3fd0c..7dea10e4f8b2 100644 --- a/packages/x-data-grid-premium/src/hooks/features/clipboard/useGridClipboardImport.ts +++ b/packages/x-data-grid-premium/src/hooks/features/clipboard/useGridClipboardImport.ts @@ -14,7 +14,7 @@ import { gridExpandedSortedRowIdsSelector, } from '@mui/x-data-grid'; import { - buildWarning, + warnOnce, getRowIdFromRowModel, getActiveElement, GridPipeProcessor, @@ -28,15 +28,6 @@ import { unstable_debounce as debounce } from '@mui/utils'; import { GridApiPremium, GridPrivateApiPremium } from '../../../models/gridApiPremium'; import type { DataGridPremiumProcessedProps } from '../../../models/dataGridPremiumProps'; -const missingOnProcessRowUpdateErrorWarning = buildWarning( - [ - 'MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', - 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example ` ...} />`.', - 'For more detail, see https://mui.com/x/react-data-grid/editing/#server-side-persistence.', - ], - 'error', -); - const columnFieldsToExcludeFromPaste = [ GRID_CHECKBOX_SELECTION_FIELD, GRID_REORDER_COL_DEF.field, @@ -176,7 +167,14 @@ class CellValueUpdater { if (onProcessRowUpdateError) { onProcessRowUpdateError(errorThrown); } else if (process.env.NODE_ENV !== 'production') { - missingOnProcessRowUpdateErrorWarning(); + warnOnce( + [ + 'MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', + 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example ` ...} />`.', + 'For more detail, see https://mui.com/x/react-data-grid/editing/#server-side-persistence.', + ], + 'error', + ); } }; @@ -222,16 +220,24 @@ function defaultPasteResolver({ const cellSelectionModel = apiRef.current.getCellSelectionModel(); const selectedCellsArray = apiRef.current.getSelectedCellsAsArray(); if (cellSelectionModel && selectedCellsArray.length > 1) { - Object.keys(cellSelectionModel).forEach((rowId, rowIndex) => { + let lastRowId = selectedCellsArray[0].id; + let rowIndex = 0; + let colIndex = 0; + selectedCellsArray.forEach(({ id: rowId, field }) => { + if (rowId !== lastRowId) { + lastRowId = rowId; + rowIndex += 1; + colIndex = 0; + } + const rowDataArr = pastedData[isSingleValuePasted ? 0 : rowIndex]; const hasRowData = isSingleValuePasted ? true : rowDataArr !== undefined; - if (!hasRowData) { - return; - } - Object.keys(cellSelectionModel[rowId]).forEach((field, colIndex) => { + if (hasRowData) { const cellValue = isSingleValuePasted ? rowDataArr[0] : rowDataArr[colIndex]; updateCell({ rowId, field, pastedCellValue: cellValue }); - }); + } + + colIndex += 1; }); return; diff --git a/packages/x-data-grid-premium/src/hooks/features/export/serializer/excelSerializer.ts b/packages/x-data-grid-premium/src/hooks/features/export/serializer/excelSerializer.ts index f6c9de2adcc1..6ae00a3a3aeb 100644 --- a/packages/x-data-grid-premium/src/hooks/features/export/serializer/excelSerializer.ts +++ b/packages/x-data-grid-premium/src/hooks/features/export/serializer/excelSerializer.ts @@ -9,7 +9,7 @@ import { GridValidRowModel, } from '@mui/x-data-grid-pro'; import { - buildWarning, + warnOnce, GridStateColDef, GridSingleSelectColDef, isObject, @@ -25,11 +25,6 @@ const getExcelJs = async () => { return excelJsModule.default ?? excelJsModule; }; -const warnInvalidFormattedValue = buildWarning([ - 'MUI X: When the value of a field is an object or a `renderCell` is provided, the Excel export might not display the value correctly.', - 'You can provide a `valueFormatter` with a string representation to be used.', -]); - const getFormattedValueOptions = ( colDef: GridSingleSelectColDef, row: GridValidRowModel, @@ -151,7 +146,10 @@ export const serializeRowUnsafe = ( const formattedValue = apiRef.current.getCellParams(id, castColumn.field).formattedValue; if (process.env.NODE_ENV !== 'production') { if (String(cellParams.formattedValue) === '[object Object]') { - warnInvalidFormattedValue(); + warnOnce([ + 'MUI X: When the value of a field is an object or a `renderCell` is provided, the Excel export might not display the value correctly.', + 'You can provide a `valueFormatter` with a string representation to be used.', + ]); } } if (isObject<{ label: any }>(formattedValue)) { @@ -194,7 +192,10 @@ export const serializeRowUnsafe = ( cellValue = apiRef.current.getCellParams(id, column.field).formattedValue as any; if (process.env.NODE_ENV !== 'production') { if (String(cellParams.formattedValue) === '[object Object]') { - warnInvalidFormattedValue(); + warnOnce([ + 'MUI X: When the value of a field is an object or a `renderCell` is provided, the Excel export might not display the value correctly.', + 'You can provide a `valueFormatter` with a string representation to be used.', + ]); } } break; @@ -263,7 +264,7 @@ const addColumnGroupingHeaders = ( }); const newRow = worksheet.addRow( - row.map((group) => (group.groupId === null ? null : group?.headerName ?? group.groupId)), + row.map((group) => (group.groupId === null ? null : (group?.headerName ?? group.groupId))), ); // use `rowCount`, since worksheet can have additional rows added in `exceljsPreProcess` diff --git a/packages/x-data-grid-premium/src/tests/clipboard.DataGridPremium.test.tsx b/packages/x-data-grid-premium/src/tests/clipboard.DataGridPremium.test.tsx index 22cd738034d8..aad776990c85 100644 --- a/packages/x-data-grid-premium/src/tests/clipboard.DataGridPremium.test.tsx +++ b/packages/x-data-grid-premium/src/tests/clipboard.DataGridPremium.test.tsx @@ -6,10 +6,9 @@ import { DataGridPremiumProps, GridColDef, } from '@mui/x-data-grid-premium'; -// @ts-ignore Remove once the test utils are typed import { createRenderer, fireEvent, userEvent, waitFor } from '@mui/internal-test-utils'; import { expect } from 'chai'; -import { stub, SinonStub, spy } from 'sinon'; +import { SinonSpy, spy, stub, SinonStub } from 'sinon'; import { getCell, getColumnValues, sleep } from 'test/utils/helperFn'; import { getBasicGridData } from '@mui/x-data-grid-generator'; @@ -59,26 +58,18 @@ describe(' - Clipboard', () => { } describe('copy', () => { - let writeText: SinonStub; - const originalClipboard = navigator.clipboard; - - beforeEach(function beforeEachHook() { - writeText = stub().resolves(); - - Object.defineProperty(navigator, 'clipboard', { - value: { writeText }, - writable: true, - }); - }); + let writeText: SinonSpy | undefined; afterEach(function afterEachHook() { - Object.defineProperty(navigator, 'clipboard', { value: originalClipboard }); + writeText?.restore(); }); ['ctrlKey', 'metaKey'].forEach((key) => { it(`should copy the selected cells to the clipboard when ${key} + C is pressed`, () => { render(); + writeText = spy(navigator.clipboard, 'writeText'); + const cell = getCell(0, 0); cell.focus(); userEvent.mousePress(cell); @@ -100,6 +91,8 @@ describe(' - Clipboard', () => { it(`should copy cells range selected in one row`, () => { render(); + writeText = spy(navigator.clipboard, 'writeText'); + const cell = getCell(0, 0); cell.focus(); userEvent.mousePress(cell); @@ -129,6 +122,8 @@ describe(' - Clipboard', () => { , ); + writeText = spy(navigator.clipboard, 'writeText'); + const cell = getCell(0, 0); cell.focus(); userEvent.mousePress(cell); @@ -158,6 +153,8 @@ describe(' - Clipboard', () => { , ); + writeText = spy(navigator.clipboard, 'writeText'); + const cell = getCell(0, 0); cell.focus(); userEvent.mousePress(cell); @@ -848,17 +845,14 @@ describe(' - Clipboard', () => { clipboardData = data; return Promise.resolve(); }; - const originalClipboard = navigator.clipboard; + let writeTextStub: SinonStub; - beforeEach(function beforeEachHook() { - Object.defineProperty(navigator, 'clipboard', { - value: { writeText }, - writable: true, - }); - }); + const stubClipboard = () => { + writeTextStub = stub(navigator.clipboard, 'writeText').callsFake(writeText); + }; afterEach(function afterEachHook() { - Object.defineProperty(navigator, 'clipboard', { value: originalClipboard }); + writeTextStub.restore(); clipboardData = ''; }); @@ -892,6 +886,8 @@ describe(' - Clipboard', () => { ]; render(); + // Call after render to override the `@testing-library/user-event` stub + stubClipboard(); const sourceCell = getCell(0, 1); const targetCell = getCell(1, 1); @@ -914,6 +910,8 @@ describe(' - Clipboard', () => { ]; render(); + // Call after render to override the `@testing-library/user-event` stub + stubClipboard(); const sourceCell = getCell(0, 1); const targetCell = getCell(1, 1); @@ -936,6 +934,8 @@ describe(' - Clipboard', () => { ]; render(); + // Call after render to override the `@testing-library/user-event` stub + stubClipboard(); const sourceCell = getCell(0, 1); const targetCell = getCell(1, 1); @@ -967,6 +967,8 @@ describe(' - Clipboard', () => { ]; render(); + // Call after render to override the `@testing-library/user-event` stub + stubClipboard(); const sourceCell = getCell(0, 1); const targetCell = getCell(1, 1); @@ -989,6 +991,8 @@ describe(' - Clipboard', () => { ]; render(); + // Call after render to override the `@testing-library/user-event` stub + stubClipboard(); const sourceCell = getCell(0, 1); const targetCell = getCell(1, 1); @@ -1016,6 +1020,8 @@ describe(' - Clipboard', () => { ]; render(); + // Call after render to override the `@testing-library/user-event` stub + stubClipboard(); const sourceCell = getCell(0, 1); const targetCell = getCell(1, 1); @@ -1055,6 +1061,8 @@ describe(' - Clipboard', () => { ]; render(); + // Call after render to override the `@testing-library/user-event` stub + stubClipboard(); const sourceCell = getCell(0, 1); const targetCell = getCell(1, 1); diff --git a/packages/x-data-grid-pro/package.json b/packages/x-data-grid-pro/package.json index cd45df96ddad..4ab27308d3cc 100644 --- a/packages/x-data-grid-pro/package.json +++ b/packages/x-data-grid-pro/package.json @@ -1,6 +1,6 @@ { "name": "@mui/x-data-grid-pro", - "version": "7.11.0", + "version": "7.11.1", "description": "The Pro plan edition of the Data Grid components (MUI X).", "author": "MUI Team", "main": "src/index.ts", @@ -43,9 +43,9 @@ "directory": "packages/x-data-grid-pro" }, "dependencies": { - "@babel/runtime": "^7.24.8", - "@mui/system": "^5.16.2", - "@mui/utils": "^5.16.2", + "@babel/runtime": "^7.25.0", + "@mui/system": "^5.16.5", + "@mui/utils": "^5.16.5", "@mui/x-data-grid": "workspace:*", "@mui/x-internals": "workspace:*", "@mui/x-license": "workspace:*", @@ -60,9 +60,9 @@ "react-dom": "^17.0.0 || ^18.0.0" }, "devDependencies": { - "@mui/internal-test-utils": "^1.0.4", + "@mui/internal-test-utils": "^1.0.5", "@types/prop-types": "^15.7.12", - "rimraf": "^5.0.8" + "rimraf": "^5.0.9" }, "engines": { "node": ">=14.0.0" diff --git a/packages/x-data-grid-pro/src/components/GridDataSourceTreeDataGroupingCell.tsx b/packages/x-data-grid-pro/src/components/GridDataSourceTreeDataGroupingCell.tsx index d03c28e675c4..eedd1ea4f7d3 100644 --- a/packages/x-data-grid-pro/src/components/GridDataSourceTreeDataGroupingCell.tsx +++ b/packages/x-data-grid-pro/src/components/GridDataSourceTreeDataGroupingCell.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import Box from '@mui/material/Box'; import Badge from '@mui/material/Badge'; import { diff --git a/packages/x-data-grid-pro/src/components/GridDetailPanelToggleCell.tsx b/packages/x-data-grid-pro/src/components/GridDetailPanelToggleCell.tsx index f38083de2364..0df3ae4e9dbb 100644 --- a/packages/x-data-grid-pro/src/components/GridDetailPanelToggleCell.tsx +++ b/packages/x-data-grid-pro/src/components/GridDetailPanelToggleCell.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { getDataGridUtilityClass, useGridSelector, GridRenderCellParams } from '@mui/x-data-grid'; import { useGridRootProps } from '../hooks/utils/useGridRootProps'; import { useGridApiContext } from '../hooks/utils/useGridApiContext'; diff --git a/packages/x-data-grid-pro/src/components/GridDetailPanels.tsx b/packages/x-data-grid-pro/src/components/GridDetailPanels.tsx index 64f3cbed737e..a1bdd1cf006b 100644 --- a/packages/x-data-grid-pro/src/components/GridDetailPanels.tsx +++ b/packages/x-data-grid-pro/src/components/GridDetailPanels.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { getDataGridUtilityClass, useGridSelector, GridRowId } from '@mui/x-data-grid'; import { GridDetailPanelsProps, EMPTY_DETAIL_PANELS } from '@mui/x-data-grid/internals'; import { useGridPrivateApiContext } from '../hooks/utils/useGridPrivateApiContext'; diff --git a/packages/x-data-grid-pro/src/components/GridPinnedRows.tsx b/packages/x-data-grid-pro/src/components/GridPinnedRows.tsx index a1060d680c0f..04dfb4ccd17c 100644 --- a/packages/x-data-grid-pro/src/components/GridPinnedRows.tsx +++ b/packages/x-data-grid-pro/src/components/GridPinnedRows.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import clsx from 'clsx'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { getDataGridUtilityClass, gridClasses, useGridSelector } from '@mui/x-data-grid'; import { GridPinnedRowsProps, diff --git a/packages/x-data-grid-pro/src/components/GridRowReorderCell.tsx b/packages/x-data-grid-pro/src/components/GridRowReorderCell.tsx index 42a11ff403da..8cac92c40b11 100644 --- a/packages/x-data-grid-pro/src/components/GridRowReorderCell.tsx +++ b/packages/x-data-grid-pro/src/components/GridRowReorderCell.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { GridRenderCellParams, GridRowEventLookup, diff --git a/packages/x-data-grid-pro/src/components/GridTreeDataGroupingCell.tsx b/packages/x-data-grid-pro/src/components/GridTreeDataGroupingCell.tsx index 673b637ee038..65cc02dc5886 100644 --- a/packages/x-data-grid-pro/src/components/GridTreeDataGroupingCell.tsx +++ b/packages/x-data-grid-pro/src/components/GridTreeDataGroupingCell.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import Box from '@mui/material/Box'; import { useGridSelector, diff --git a/packages/x-data-grid-pro/src/components/headerFiltering/GridHeaderFilterCell.tsx b/packages/x-data-grid-pro/src/components/headerFiltering/GridHeaderFilterCell.tsx index 23ca4abaeed3..8a73ef0aab68 100644 --- a/packages/x-data-grid-pro/src/components/headerFiltering/GridHeaderFilterCell.tsx +++ b/packages/x-data-grid-pro/src/components/headerFiltering/GridHeaderFilterCell.tsx @@ -319,7 +319,7 @@ const GridHeaderFilterCell = React.forwardRef diff --git a/packages/x-data-grid-pro/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx b/packages/x-data-grid-pro/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx index 5465063b1a27..ced989772a6b 100644 --- a/packages/x-data-grid-pro/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx +++ b/packages/x-data-grid-pro/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx @@ -18,7 +18,7 @@ import { GridStateColDef, GridColumnHeaderRow, } from '@mui/x-data-grid/internals'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { useGridRootProps } from '../../utils/useGridRootProps'; import { DataGridProProcessedProps } from '../../../models/dataGridProProps'; diff --git a/packages/x-data-grid-pro/src/hooks/features/columnReorder/useGridColumnReorder.tsx b/packages/x-data-grid-pro/src/hooks/features/columnReorder/useGridColumnReorder.tsx index bbe9010f1583..e882e42ea10a 100644 --- a/packages/x-data-grid-pro/src/hooks/features/columnReorder/useGridColumnReorder.tsx +++ b/packages/x-data-grid-pro/src/hooks/features/columnReorder/useGridColumnReorder.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { useTheme } from '@mui/material/styles'; import { CursorCoordinates, diff --git a/packages/x-data-grid-pro/src/hooks/features/rowReorder/useGridRowReorder.tsx b/packages/x-data-grid-pro/src/hooks/features/rowReorder/useGridRowReorder.tsx index eac8e8105a68..e6c4ed135c1d 100644 --- a/packages/x-data-grid-pro/src/hooks/features/rowReorder/useGridRowReorder.tsx +++ b/packages/x-data-grid-pro/src/hooks/features/rowReorder/useGridRowReorder.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { useGridLogger, useGridApiEventHandler, diff --git a/packages/x-data-grid-pro/src/hooks/features/rowReorder/useGridRowReorderPreProcessors.ts b/packages/x-data-grid-pro/src/hooks/features/rowReorder/useGridRowReorderPreProcessors.ts index ccef772bac9d..12c63761f0ce 100644 --- a/packages/x-data-grid-pro/src/hooks/features/rowReorder/useGridRowReorderPreProcessors.ts +++ b/packages/x-data-grid-pro/src/hooks/features/rowReorder/useGridRowReorderPreProcessors.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { getDataGridUtilityClass, GridColDef } from '@mui/x-data-grid'; import { GridPipeProcessor, useGridRegisterPipeProcessor } from '@mui/x-data-grid/internals'; import { DataGridProProcessedProps } from '../../../models/dataGridProProps'; diff --git a/packages/x-data-grid-pro/src/tests/clipboard.DataGridPro.test.tsx b/packages/x-data-grid-pro/src/tests/clipboard.DataGridPro.test.tsx index 3ce23f839bf3..6287545d7c5b 100644 --- a/packages/x-data-grid-pro/src/tests/clipboard.DataGridPro.test.tsx +++ b/packages/x-data-grid-pro/src/tests/clipboard.DataGridPro.test.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { GridApi, useGridApiRef, DataGridPro, DataGridProProps } from '@mui/x-data-grid-pro'; import { createRenderer, fireEvent, act, userEvent } from '@mui/internal-test-utils'; import { expect } from 'chai'; -import { stub, SinonStub } from 'sinon'; +import { SinonSpy, spy } from 'sinon'; import { getCell } from 'test/utils/helperFn'; const isJSDOM = /jsdom/.test(window.navigator.userAgent); @@ -39,25 +39,18 @@ describe(' - Clipboard', () => { } describe('copy to clipboard', () => { - let writeText: SinonStub; - const originalClipboard = navigator.clipboard; - - beforeEach(function beforeEachHook() { - writeText = stub().resolves(); - - Object.defineProperty(navigator, 'clipboard', { - value: { writeText }, - writable: true, - }); - }); + let writeText: SinonSpy | undefined; afterEach(function afterEachHook() { - Object.defineProperty(navigator, 'clipboard', { value: originalClipboard }); + writeText?.restore(); }); ['ctrlKey', 'metaKey'].forEach((key) => { it(`should copy the selected rows to the clipboard when ${key} + C is pressed`, () => { render(); + + writeText = spy(navigator.clipboard, 'writeText'); + act(() => apiRef.current.selectRows([0, 1])); const cell = getCell(0, 0); userEvent.mousePress(cell); @@ -75,6 +68,8 @@ describe(' - Clipboard', () => { />, ); + writeText = spy(navigator.clipboard, 'writeText'); + const cell = getCell(0, 0); cell.focus(); userEvent.mousePress(cell); @@ -95,6 +90,8 @@ describe(' - Clipboard', () => { />, ); + writeText = spy(navigator.clipboard, 'writeText'); + act(() => apiRef.current.selectRows([0, 1])); const cell = getCell(0, 0); userEvent.mousePress(cell); diff --git a/packages/x-data-grid-pro/src/tests/rows.DataGridPro.test.tsx b/packages/x-data-grid-pro/src/tests/rows.DataGridPro.test.tsx index 101bc83e0420..8e24fde92b3b 100644 --- a/packages/x-data-grid-pro/src/tests/rows.DataGridPro.test.tsx +++ b/packages/x-data-grid-pro/src/tests/rows.DataGridPro.test.tsx @@ -441,10 +441,12 @@ describe(' - Rows', () => { const rowBufferPx = n * rowHeight; const nbRows = 996; const height = 600; + const headerHeight = rowHeight; + const innerHeight = height - headerHeight; render( - Rows', () => { const lastCell = $$('[role="row"]:last-child [role="gridcell"]')[0]; expect(lastCell).to.have.text('995'); - expect(renderingZone.children.length).to.equal(Math.floor(height / rowHeight) + n); + expect(renderingZone.children.length).to.equal(Math.floor(innerHeight / rowHeight) + n); const scrollbarSize = apiRef.current.state.dimensions.scrollbarSize; const distanceToFirstRow = (nbRows - renderingZone.children.length) * rowHeight; expect(gridOffsetTop()).to.equal(distanceToFirstRow); - expect(virtualScroller.scrollHeight - scrollbarSize).to.equal(nbRows * rowHeight); + expect(virtualScroller.scrollHeight - scrollbarSize - headerHeight).to.equal( + nbRows * rowHeight, + ); }); it('should have all the rows rendered of the page in the DOM when autoPageSize: true', () => { diff --git a/packages/x-data-grid/package.json b/packages/x-data-grid/package.json index 100a26d7b2ca..a4eda7b280c3 100644 --- a/packages/x-data-grid/package.json +++ b/packages/x-data-grid/package.json @@ -1,6 +1,6 @@ { "name": "@mui/x-data-grid", - "version": "7.11.0", + "version": "7.11.1", "description": "The Community plan edition of the Data Grid components (MUI X).", "author": "MUI Team", "main": "src/index.ts", @@ -47,9 +47,9 @@ "directory": "packages/x-data-grid" }, "dependencies": { - "@babel/runtime": "^7.24.8", - "@mui/system": "^5.16.2", - "@mui/utils": "^5.16.2", + "@babel/runtime": "^7.25.0", + "@mui/system": "^5.16.5", + "@mui/utils": "^5.16.5", "@mui/x-internals": "workspace:*", "clsx": "^2.1.1", "prop-types": "^15.8.1", @@ -61,11 +61,11 @@ "react-dom": "^17.0.0 || ^18.0.0" }, "devDependencies": { - "@mui/internal-test-utils": "^1.0.4", + "@mui/internal-test-utils": "^1.0.5", "@mui/joy": "^5.0.0-beta.48", "@mui/types": "^7.2.15", "@types/prop-types": "^15.7.12", - "rimraf": "^5.0.8" + "rimraf": "^5.0.9" }, "engines": { "node": ">=14.0.0" diff --git a/packages/x-data-grid/src/components/GridPagination.tsx b/packages/x-data-grid/src/components/GridPagination.tsx index e4ff7b2953c9..495d57d7ee02 100644 --- a/packages/x-data-grid/src/components/GridPagination.tsx +++ b/packages/x-data-grid/src/components/GridPagination.tsx @@ -16,6 +16,7 @@ import { } from '../hooks/features/pagination/gridPaginationSelector'; const GridPaginationRoot = styled(TablePagination)(({ theme }) => ({ + maxHeight: 'calc(100% + 1px)', // border width [`& .${tablePaginationClasses.selectLabel}`]: { display: 'none', [theme.breakpoints.up('sm')]: { diff --git a/packages/x-data-grid/src/components/GridRow.tsx b/packages/x-data-grid/src/components/GridRow.tsx index 917deae2ba62..ee26a2b20c1f 100644 --- a/packages/x-data-grid/src/components/GridRow.tsx +++ b/packages/x-data-grid/src/components/GridRow.tsx @@ -1,18 +1,15 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; -import { - unstable_composeClasses as composeClasses, - unstable_useForkRef as useForkRef, -} from '@mui/utils'; +import { unstable_useForkRef as useForkRef } from '@mui/utils'; import { fastMemo } from '../utils/fastMemo'; import { GridRowEventLookup } from '../models/events'; import { GridRowId, GridRowModel } from '../models/gridRows'; import { GridEditModes, GridRowModes, GridCellModes } from '../models/gridEditRowModel'; import { useGridApiContext } from '../hooks/utils/useGridApiContext'; -import { getDataGridUtilityClass, gridClasses } from '../constants/gridClasses'; +import { gridClasses } from '../constants/gridClasses'; +import { composeGridClasses } from '../utils/composeGridClasses'; import { useGridRootProps } from '../hooks/utils/useGridRootProps'; -import type { DataGridProcessedProps } from '../models/props/DataGridProps'; import { GridPinnedColumns } from '../hooks/features/columns'; import type { GridStateColDef } from '../models/colDef/gridColDef'; import type { GridRenderContext } from '../models/params/gridScrollParams'; @@ -62,6 +59,7 @@ export interface GridRowProps extends React.HTMLAttributes { isFirstVisible: boolean; isLastVisible: boolean; isNotVisible: boolean; + showBottomBorder: boolean; onClick?: React.MouseEventHandler; onDoubleClick?: React.MouseEventHandler; onMouseEnter?: React.MouseEventHandler; @@ -69,33 +67,6 @@ export interface GridRowProps extends React.HTMLAttributes { [x: string]: any; // Allow custom attributes like data-* and aria-* } -type OwnerState = Pick & { - editable: boolean; - editing: boolean; - isFirstVisible: boolean; - isLastVisible: boolean; - classes?: DataGridProcessedProps['classes']; - rowHeight: GridRowProps['rowHeight']; -}; - -const useUtilityClasses = (ownerState: OwnerState) => { - const { editable, editing, selected, isFirstVisible, isLastVisible, rowHeight, classes } = - ownerState; - const slots = { - root: [ - 'row', - selected && 'selected', - editable && 'row--editable', - editing && 'row--editing', - isFirstVisible && 'row--firstVisible', - isLastVisible && 'row--lastVisible', - rowHeight === 'auto' && 'row--dynamicHeight', - ], - }; - - return composeClasses(slots, getDataGridUtilityClass, classes); -}; - function EmptyCell({ width }: { width: number }) { if (!width) { return null; @@ -129,6 +100,7 @@ const GridRow = React.forwardRef(function GridRow( isFirstVisible, isLastVisible, isNotVisible, + showBottomBorder, focusedCell, tabbableCell, onClick, @@ -152,6 +124,8 @@ const GridRow = React.forwardRef(function GridRow( const rowNode = apiRef.current.getRowNode(rowId); const scrollbarWidth = dimensions.hasScrollY ? dimensions.scrollbarSize : 0; const gridHasFiller = dimensions.columnsTotalWidth < dimensions.viewportOuterSize.width; + const editing = apiRef.current.getRowMode(rowId) === GridRowModes.Edit; + const editable = rootProps.editMode === GridEditModes.Row; const hasFocusCell = focusedColumnIndex !== undefined; const hasVirtualFocusCellLeft = @@ -165,17 +139,18 @@ const GridRow = React.forwardRef(function GridRow( const ariaRowIndex = index + headerGroupingMaxDepth + 2; // 1 for the header row and 1 as it's 1-based - const ownerState = { - selected, - isFirstVisible, - isLastVisible, - classes: rootProps.classes, - editing: apiRef.current.getRowMode(rowId) === GridRowModes.Edit, - editable: rootProps.editMode === GridEditModes.Row, - rowHeight, - }; - - const classes = useUtilityClasses(ownerState); + const classes = composeGridClasses(rootProps.classes, { + root: [ + 'row', + selected && 'selected', + editable && 'row--editable', + editing && 'row--editing', + isFirstVisible && 'row--firstVisible', + isLastVisible && 'row--lastVisible', + showBottomBorder && 'row--borderBottom', + rowHeight === 'auto' && 'row--dynamicHeight', + ], + }); React.useLayoutEffect(() => { if (currentPage.range) { @@ -596,6 +571,7 @@ GridRow.propTypes = { rowHeight: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]).isRequired, rowId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired, selected: PropTypes.bool.isRequired, + showBottomBorder: PropTypes.bool.isRequired, /** * Determines which cell should be tabbable by having tabIndex=0. * If `null`, no cell in this row is in the tab sequence. diff --git a/packages/x-data-grid/src/components/GridRowCount.tsx b/packages/x-data-grid/src/components/GridRowCount.tsx index e032ae6c443f..1651bfa95765 100644 --- a/packages/x-data-grid/src/components/GridRowCount.tsx +++ b/packages/x-data-grid/src/components/GridRowCount.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { styled, SxProps, Theme } from '@mui/system'; import { useGridApiContext } from '../hooks/utils/useGridApiContext'; import { getDataGridUtilityClass } from '../constants/gridClasses'; diff --git a/packages/x-data-grid/src/components/GridSelectedRowCount.tsx b/packages/x-data-grid/src/components/GridSelectedRowCount.tsx index 0b1f98a07bed..17b033fbfeea 100644 --- a/packages/x-data-grid/src/components/GridSelectedRowCount.tsx +++ b/packages/x-data-grid/src/components/GridSelectedRowCount.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { styled, SxProps, Theme } from '@mui/system'; import { useGridApiContext } from '../hooks/utils/useGridApiContext'; import { getDataGridUtilityClass } from '../constants/gridClasses'; diff --git a/packages/x-data-grid/src/components/base/GridOverlays.tsx b/packages/x-data-grid/src/components/base/GridOverlays.tsx index 169763a4633c..e21561bcdf27 100644 --- a/packages/x-data-grid/src/components/base/GridOverlays.tsx +++ b/packages/x-data-grid/src/components/base/GridOverlays.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { styled } from '@mui/system'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import clsx from 'clsx'; import { useGridSelector } from '../../hooks/utils/useGridSelector'; import { gridDimensionsSelector } from '../../hooks/features/dimensions'; diff --git a/packages/x-data-grid/src/components/cell/GridBooleanCell.tsx b/packages/x-data-grid/src/components/cell/GridBooleanCell.tsx index 3a6ba22174f2..543e199229c2 100644 --- a/packages/x-data-grid/src/components/cell/GridBooleanCell.tsx +++ b/packages/x-data-grid/src/components/cell/GridBooleanCell.tsx @@ -1,14 +1,14 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { SvgIconProps } from '@mui/material/SvgIcon'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { getDataGridUtilityClass } from '../../constants/gridClasses'; import { GridRenderCellParams } from '../../models/params/gridCellParams'; import { useGridRootProps } from '../../hooks/utils/useGridRootProps'; import { useGridApiContext } from '../../hooks/utils/useGridApiContext'; import { DataGridProcessedProps } from '../../models/props/DataGridProps'; import { GridColDef } from '../../models/colDef/gridColDef'; -import { isAutoGeneratedRow } from '../../hooks/features/rows/gridRowsUtils'; +import { isAutogeneratedRowNode } from '../../hooks/features/rows/gridRowsUtils'; type OwnerState = { classes: DataGridProcessedProps['classes'] }; @@ -142,7 +142,7 @@ const GridBooleanCell = React.memo(GridBooleanCellRaw); export { GridBooleanCell }; export const renderBooleanCell: GridColDef['renderCell'] = (params: GridBooleanCellProps) => { - if (params.field !== '__row_group_by_columns_group__' && isAutoGeneratedRow(params.rowNode)) { + if (params.field !== '__row_group_by_columns_group__' && isAutogeneratedRowNode(params.rowNode)) { return ''; } diff --git a/packages/x-data-grid/src/components/cell/GridSkeletonCell.tsx b/packages/x-data-grid/src/components/cell/GridSkeletonCell.tsx index 28a25539b706..2441f413d65c 100644 --- a/packages/x-data-grid/src/components/cell/GridSkeletonCell.tsx +++ b/packages/x-data-grid/src/components/cell/GridSkeletonCell.tsx @@ -82,7 +82,7 @@ function GridSkeletonCell(props: GridSkeletonCellProps) { // The width of the skeleton is a random number between the min and max values // The min and max values are determined by the type of the column const [min, max] = type - ? CONTENT_WIDTH_RANGE_BY_TYPE[type] ?? DEFAULT_CONTENT_WIDTH_RANGE + ? (CONTENT_WIDTH_RANGE_BY_TYPE[type] ?? DEFAULT_CONTENT_WIDTH_RANGE) : DEFAULT_CONTENT_WIDTH_RANGE; return { diff --git a/packages/x-data-grid/src/components/columnHeaders/ColumnHeaderMenuIcon.tsx b/packages/x-data-grid/src/components/columnHeaders/ColumnHeaderMenuIcon.tsx index 16566f378d74..20d7527388ab 100644 --- a/packages/x-data-grid/src/components/columnHeaders/ColumnHeaderMenuIcon.tsx +++ b/packages/x-data-grid/src/components/columnHeaders/ColumnHeaderMenuIcon.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { useGridApiContext } from '../../hooks/utils/useGridApiContext'; import { GridStateColDef } from '../../models/colDef/gridColDef'; import { getDataGridUtilityClass } from '../../constants/gridClasses'; diff --git a/packages/x-data-grid/src/components/columnHeaders/GridBaseColumnHeaders.tsx b/packages/x-data-grid/src/components/columnHeaders/GridBaseColumnHeaders.tsx index aa640c82d98b..47d2ecf6a418 100644 --- a/packages/x-data-grid/src/components/columnHeaders/GridBaseColumnHeaders.tsx +++ b/packages/x-data-grid/src/components/columnHeaders/GridBaseColumnHeaders.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import clsx from 'clsx'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { styled, SxProps, Theme } from '@mui/system'; import { getDataGridUtilityClass } from '../../constants/gridClasses'; import { useGridRootProps } from '../../hooks/utils/useGridRootProps'; diff --git a/packages/x-data-grid/src/components/columnHeaders/GridColumnGroupHeader.tsx b/packages/x-data-grid/src/components/columnHeaders/GridColumnGroupHeader.tsx index e9524c5a7e7e..b734b750b04e 100644 --- a/packages/x-data-grid/src/components/columnHeaders/GridColumnGroupHeader.tsx +++ b/packages/x-data-grid/src/components/columnHeaders/GridColumnGroupHeader.tsx @@ -38,6 +38,7 @@ type OwnerState = { showLeftBorder: boolean; showRightBorder: boolean; isDragging: boolean; + isLastColumn: boolean; headerAlign?: GridAlignment; classes?: DataGridProcessedProps['classes']; pinnedPosition?: GridPinnedColumnPosition; @@ -48,6 +49,7 @@ const useUtilityClasses = (ownerState: OwnerState) => { classes, headerAlign, isDragging, + isLastColumn, showLeftBorder, showRightBorder, groupId, @@ -67,6 +69,7 @@ const useUtilityClasses = (ownerState: OwnerState) => { groupId === null ? 'columnHeader--emptyGroup' : 'columnHeader--filledGroup', pinnedPosition === 'left' && 'columnHeader--pinnedLeft', pinnedPosition === 'right' && 'columnHeader--pinnedRight', + isLastColumn && 'columnHeader--last', ], draggableContainer: ['columnHeaderDraggableContainer'], titleContainer: ['columnHeaderTitleContainer', 'withBorderColor'], diff --git a/packages/x-data-grid/src/components/columnHeaders/GridColumnHeaderSortIcon.tsx b/packages/x-data-grid/src/components/columnHeaders/GridColumnHeaderSortIcon.tsx index c10c6225402f..367931b7e3c9 100644 --- a/packages/x-data-grid/src/components/columnHeaders/GridColumnHeaderSortIcon.tsx +++ b/packages/x-data-grid/src/components/columnHeaders/GridColumnHeaderSortIcon.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import Badge from '@mui/material/Badge'; import { GridSlotsComponent } from '../../models/gridSlotsComponent'; import { GridSortDirection } from '../../models/gridSortModel'; diff --git a/packages/x-data-grid/src/components/columnHeaders/GridColumnHeaderTitle.tsx b/packages/x-data-grid/src/components/columnHeaders/GridColumnHeaderTitle.tsx index 7faef9a89489..cf70450d7643 100644 --- a/packages/x-data-grid/src/components/columnHeaders/GridColumnHeaderTitle.tsx +++ b/packages/x-data-grid/src/components/columnHeaders/GridColumnHeaderTitle.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { styled } from '@mui/system'; import { isOverflown } from '../../utils/domUtils'; import { getDataGridUtilityClass } from '../../constants/gridClasses'; diff --git a/packages/x-data-grid/src/components/columnHeaders/GridIconButtonContainer.tsx b/packages/x-data-grid/src/components/columnHeaders/GridIconButtonContainer.tsx index 1fd807e831ee..7c0c88a6df7b 100644 --- a/packages/x-data-grid/src/components/columnHeaders/GridIconButtonContainer.tsx +++ b/packages/x-data-grid/src/components/columnHeaders/GridIconButtonContainer.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import clsx from 'clsx'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { styled } from '@mui/system'; import { getDataGridUtilityClass } from '../../constants/gridClasses'; import { useGridRootProps } from '../../hooks/utils/useGridRootProps'; diff --git a/packages/x-data-grid/src/components/columnSelection/GridHeaderCheckbox.tsx b/packages/x-data-grid/src/components/columnSelection/GridHeaderCheckbox.tsx index 47ee8b35b92b..71e12c5db38b 100644 --- a/packages/x-data-grid/src/components/columnSelection/GridHeaderCheckbox.tsx +++ b/packages/x-data-grid/src/components/columnSelection/GridHeaderCheckbox.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { isMultipleRowSelectionEnabled } from '../../hooks/features/rowSelection/utils'; import { useGridSelector } from '../../hooks/utils/useGridSelector'; import { gridTabIndexColumnHeaderSelector } from '../../hooks/features/focus/gridFocusStateSelector'; diff --git a/packages/x-data-grid/src/components/columnsManagement/GridColumnsManagement.tsx b/packages/x-data-grid/src/components/columnsManagement/GridColumnsManagement.tsx index 7fdf409c4811..431736337d34 100644 --- a/packages/x-data-grid/src/components/columnsManagement/GridColumnsManagement.tsx +++ b/packages/x-data-grid/src/components/columnsManagement/GridColumnsManagement.tsx @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-use-before-define */ import * as React from 'react'; import PropTypes from 'prop-types'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import FormControlLabel from '@mui/material/FormControlLabel'; import { styled } from '@mui/material/styles'; import { diff --git a/packages/x-data-grid/src/components/containers/GridFooterContainer.tsx b/packages/x-data-grid/src/components/containers/GridFooterContainer.tsx index ef1f96f32fe1..42f4a1051319 100644 --- a/packages/x-data-grid/src/components/containers/GridFooterContainer.tsx +++ b/packages/x-data-grid/src/components/containers/GridFooterContainer.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { styled, SxProps, Theme } from '@mui/system'; import { getDataGridUtilityClass } from '../../constants/gridClasses'; import { useGridRootProps } from '../../hooks/utils/useGridRootProps'; diff --git a/packages/x-data-grid/src/components/containers/GridOverlay.tsx b/packages/x-data-grid/src/components/containers/GridOverlay.tsx index 5a48306eaeab..73a339738ca4 100644 --- a/packages/x-data-grid/src/components/containers/GridOverlay.tsx +++ b/packages/x-data-grid/src/components/containers/GridOverlay.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { Theme, SxProps, styled } from '@mui/system'; import type { DataGridProcessedProps } from '../../models/props/DataGridProps'; import { getDataGridUtilityClass } from '../../constants/gridClasses'; diff --git a/packages/x-data-grid/src/components/containers/GridRoot.tsx b/packages/x-data-grid/src/components/containers/GridRoot.tsx index a9642d906b69..7bfee7a978eb 100644 --- a/packages/x-data-grid/src/components/containers/GridRoot.tsx +++ b/packages/x-data-grid/src/components/containers/GridRoot.tsx @@ -25,18 +25,17 @@ export interface GridRootProps extends React.HTMLAttributes { sx?: SxProps; } -type OwnerState = DataGridProcessedProps & { - density: GridDensity; -}; +type OwnerState = DataGridProcessedProps; -const useUtilityClasses = (ownerState: OwnerState) => { - const { autoHeight, density, classes, showCellVerticalBorder } = ownerState; +const useUtilityClasses = (ownerState: OwnerState, density: GridDensity) => { + const { autoHeight, classes, showCellVerticalBorder } = ownerState; const slots = { root: [ 'root', autoHeight && 'autoHeight', `root--density${capitalize(density)}`, + ownerState.slots.toolbar === null && 'root--noToolbar', 'withBorderColor', showCellVerticalBorder && 'withVerticalBorder', ], @@ -53,12 +52,9 @@ const GridRoot = React.forwardRef(function GridRo const rootElementRef = apiRef.current.rootElementRef; const handleRef = useForkRef(rootElementRef, ref); - const ownerState = { - ...rootProps, - density, - }; + const ownerState = rootProps; - const classes = useUtilityClasses(ownerState); + const classes = useUtilityClasses(ownerState, density); // Our implementation of const [mountedState, setMountedState] = React.useState(false); diff --git a/packages/x-data-grid/src/components/containers/GridRootStyles.ts b/packages/x-data-grid/src/components/containers/GridRootStyles.ts index bdfd79712cd3..0e76bd7f298f 100644 --- a/packages/x-data-grid/src/components/containers/GridRootStyles.ts +++ b/packages/x-data-grid/src/components/containers/GridRootStyles.ts @@ -11,6 +11,9 @@ import { import type {} from '../../themeAugmentation/overrides'; import { gridClasses as c } from '../../constants/gridClasses'; import { DataGridProcessedProps } from '../../models/props/DataGridProps'; +import { useGridSelector } from '../../hooks/utils/useGridSelector'; +import { useGridPrivateApiContext } from '../../hooks/utils/useGridPrivateApiContext'; +import { gridDimensionsSelector } from '../../hooks/features/dimensions/gridDimensionsSelectors'; export type OwnerState = DataGridProcessedProps; @@ -42,6 +45,11 @@ const columnHeaderStyles = { }, }; +// Emotion thinks it knows better than us which selector we should use. +// https://github.com/emotion-js/emotion/issues/1105#issuecomment-1722524968 +const ignoreSsrWarning = + '/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */'; + export const GridRootStyles = styled('div', { name: 'MuiDataGrid', slot: 'Root', @@ -125,12 +133,15 @@ export const GridRootStyles = styled('div', { styles.root, ], })<{ ownerState: OwnerState }>(({ theme: t }) => { + const apiRef = useGridPrivateApiContext(); + const dimensions = useGridSelector(apiRef, gridDimensionsSelector); + const borderColor = getBorderColor(t); const radius = t.shape.borderRadius; const containerBackground = t.vars ? t.vars.palette.background.default - : t.mixins.MuiDataGrid?.containerBackground ?? t.palette.background.default; + : (t.mixins.MuiDataGrid?.containerBackground ?? t.palette.background.default); const pinnedBackground = t.mixins.MuiDataGrid?.pinnedBackground ?? containerBackground; @@ -215,13 +226,9 @@ export const GridRootStyles = styled('div', { minWidth: 0, // See https://github.com/mui/mui-x/issues/8547 minHeight: 0, flexDirection: 'column', + overflow: 'hidden', overflowAnchor: 'none', // Keep the same scrolling position - // The selector we really want here is `:first-child`, but emotion thinks it knows better than use what we - // want and prints a warning to the console if we use it, about :first-child being "unsafe" in an SSR context. - // https://github.com/emotion-js/emotion/issues/1105 - // Using `:first-of-type instead` is ironically less "safe" because if all our elements aren't `div`, this style - // will fail to apply. - [`.${c.main} > *:first-of-type`]: { + [`.${c.main} > *:first-child${ignoreSsrWarning}`]: { borderTopLeftRadius: 'var(--unstable_DataGrid-radius)', borderTopRightRadius: 'var(--unstable_DataGrid-radius)', }, @@ -273,6 +280,15 @@ export const GridRootStyles = styled('div', { [`& .${c.columnHeader}:focus, & .${c.cell}:focus`]: { outline: `solid ${t.palette.primary.main} 1px`, }, + [`&.${c['root--noToolbar']} [aria-rowindex="1"] [aria-colindex="1"]`]: { + borderTopLeftRadius: 'calc(var(--unstable_DataGrid-radius) - 1px)', + }, + [`&.${c['root--noToolbar']} [aria-rowindex="1"] .${c['columnHeader--last']}`]: { + borderTopRightRadius: + !dimensions.hasScrollY || dimensions.scrollbarSize === 0 + ? 'calc(var(--unstable_DataGrid-radius) - 1px)' + : undefined, + }, [`& .${c.columnHeaderCheckbox}, & .${c.cellCheckbox}`]: { padding: 0, justifyContent: 'center', @@ -417,6 +433,16 @@ export const GridRootStyles = styled('div', { }, }, + /* Bottom border of the top-container */ + [`& .${c['row--borderBottom']} .${c.columnHeader}, + & .${c['row--borderBottom']} .${c.filler}, + & .${c['row--borderBottom']} .${c.scrollbarFiller}`]: { + borderBottom: `1px solid var(--DataGrid-rowBorderColor)`, + }, + [`& .${c['row--borderBottom']} .${c.cell}`]: { + borderBottom: `1px solid var(--rowBorderColor)`, + }, + /* Row styles */ [`.${c.row}`]: { display: 'flex', diff --git a/packages/x-data-grid/src/components/containers/GridToolbarContainer.tsx b/packages/x-data-grid/src/components/containers/GridToolbarContainer.tsx index c291bd10796e..e53f8d7809d1 100644 --- a/packages/x-data-grid/src/components/containers/GridToolbarContainer.tsx +++ b/packages/x-data-grid/src/components/containers/GridToolbarContainer.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import { styled, SxProps, Theme } from '@mui/system'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { getDataGridUtilityClass } from '../../constants/gridClasses'; import type { DataGridProcessedProps } from '../../models/props/DataGridProps'; import { useGridRootProps } from '../../hooks/utils/useGridRootProps'; diff --git a/packages/x-data-grid/src/components/panel/GridPanelContent.tsx b/packages/x-data-grid/src/components/panel/GridPanelContent.tsx index 2e373a71ab0b..0506f44f7b55 100644 --- a/packages/x-data-grid/src/components/panel/GridPanelContent.tsx +++ b/packages/x-data-grid/src/components/panel/GridPanelContent.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import { styled, SxProps, Theme } from '@mui/system'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import type { DataGridProcessedProps } from '../../models/props/DataGridProps'; import { getDataGridUtilityClass } from '../../constants/gridClasses'; import { useGridRootProps } from '../../hooks/utils/useGridRootProps'; diff --git a/packages/x-data-grid/src/components/panel/GridPanelFooter.tsx b/packages/x-data-grid/src/components/panel/GridPanelFooter.tsx index df96cce1c7f9..7744ad239b7d 100644 --- a/packages/x-data-grid/src/components/panel/GridPanelFooter.tsx +++ b/packages/x-data-grid/src/components/panel/GridPanelFooter.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import { styled, SxProps, Theme } from '@mui/system'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import type { DataGridProcessedProps } from '../../models/props/DataGridProps'; import { getDataGridUtilityClass } from '../../constants/gridClasses'; import { useGridRootProps } from '../../hooks/utils/useGridRootProps'; diff --git a/packages/x-data-grid/src/components/panel/GridPanelHeader.tsx b/packages/x-data-grid/src/components/panel/GridPanelHeader.tsx index 23ad3f025218..64cf34faf373 100644 --- a/packages/x-data-grid/src/components/panel/GridPanelHeader.tsx +++ b/packages/x-data-grid/src/components/panel/GridPanelHeader.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import { styled, SxProps, Theme } from '@mui/system'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import type { DataGridProcessedProps } from '../../models/props/DataGridProps'; import { getDataGridUtilityClass } from '../../constants/gridClasses'; import { useGridRootProps } from '../../hooks/utils/useGridRootProps'; diff --git a/packages/x-data-grid/src/components/panel/GridPanelWrapper.tsx b/packages/x-data-grid/src/components/panel/GridPanelWrapper.tsx index 455a3e474a76..d1afe7d8f292 100644 --- a/packages/x-data-grid/src/components/panel/GridPanelWrapper.tsx +++ b/packages/x-data-grid/src/components/panel/GridPanelWrapper.tsx @@ -4,7 +4,7 @@ import clsx from 'clsx'; import FocusTrap, { TrapFocusProps } from '@mui/material/Unstable_TrapFocus'; import { styled, Theme } from '@mui/material/styles'; import { MUIStyledCommonProps } from '@mui/system'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import type { DataGridProcessedProps } from '../../models/props/DataGridProps'; import { getDataGridUtilityClass } from '../../constants/gridClasses'; import { useGridRootProps } from '../../hooks/utils/useGridRootProps'; diff --git a/packages/x-data-grid/src/components/panel/GridPreferencesPanel.tsx b/packages/x-data-grid/src/components/panel/GridPreferencesPanel.tsx index fe3083aa87ac..03913dc78cf2 100644 --- a/packages/x-data-grid/src/components/panel/GridPreferencesPanel.tsx +++ b/packages/x-data-grid/src/components/panel/GridPreferencesPanel.tsx @@ -6,10 +6,7 @@ import { GridPreferencePanelsValue } from '../../hooks/features/preferencesPanel import { useGridApiContext } from '../../hooks/utils/useGridApiContext'; import { useGridRootProps } from '../../hooks/utils/useGridRootProps'; -export const GridPreferencesPanel = React.forwardRef< - HTMLDivElement, - React.HTMLAttributes ->(function GridPreferencesPanel(props, ref) { +export function GridPreferencesPanel() { const apiRef = useGridApiContext(); const columns = useGridSelector(apiRef, gridColumnDefinitionsSelector); const rootProps = useGridRootProps(); @@ -23,16 +20,14 @@ export const GridPreferencesPanel = React.forwardRef< return ( 0 && preferencePanelState.open} id={preferencePanelState.panelId} aria-labelledby={preferencePanelState.labelId} {...rootProps.slotProps?.panel} - {...props} {...rootProps.slotProps?.basePopper} > {panelContent} ); -}); +} diff --git a/packages/x-data-grid/src/components/virtualization/GridBottomContainer.tsx b/packages/x-data-grid/src/components/virtualization/GridBottomContainer.tsx index fa5b24d25ed0..40eaa1cfcf94 100644 --- a/packages/x-data-grid/src/components/virtualization/GridBottomContainer.tsx +++ b/packages/x-data-grid/src/components/virtualization/GridBottomContainer.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import clsx from 'clsx'; import { styled } from '@mui/system'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { gridClasses, getDataGridUtilityClass } from '../../constants/gridClasses'; const useUtilityClasses = () => { diff --git a/packages/x-data-grid/src/components/virtualization/GridTopContainer.tsx b/packages/x-data-grid/src/components/virtualization/GridTopContainer.tsx index 88603b41c344..84afe0bd9fec 100644 --- a/packages/x-data-grid/src/components/virtualization/GridTopContainer.tsx +++ b/packages/x-data-grid/src/components/virtualization/GridTopContainer.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import clsx from 'clsx'; import { styled } from '@mui/system'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { gridClasses, getDataGridUtilityClass } from '../../constants/gridClasses'; const useUtilityClasses = () => { @@ -15,17 +15,6 @@ const Element = styled('div')({ position: 'sticky', zIndex: 4, top: 0, - '&::after': { - content: '" "', - position: 'absolute', - zIndex: 5, - bottom: 0, - left: 0, - right: 0, - height: 1, - width: 'var(--DataGrid-rowWidth)', - backgroundColor: 'var(--DataGrid-rowBorderColor)', - }, }); export function GridTopContainer(props: React.HTMLAttributes) { diff --git a/packages/x-data-grid/src/components/virtualization/GridVirtualScrollbar.tsx b/packages/x-data-grid/src/components/virtualization/GridVirtualScrollbar.tsx index 5be8dfaf8914..6affba3676d3 100644 --- a/packages/x-data-grid/src/components/virtualization/GridVirtualScrollbar.tsx +++ b/packages/x-data-grid/src/components/virtualization/GridVirtualScrollbar.tsx @@ -152,7 +152,12 @@ const GridVirtualScrollbar = React.forwardRef + ); diff --git a/packages/x-data-grid/src/components/virtualization/GridVirtualScroller.tsx b/packages/x-data-grid/src/components/virtualization/GridVirtualScroller.tsx index 5afc96f930fc..875d1e2b80e5 100644 --- a/packages/x-data-grid/src/components/virtualization/GridVirtualScroller.tsx +++ b/packages/x-data-grid/src/components/virtualization/GridVirtualScroller.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { styled } from '@mui/system'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { GridScrollArea } from '../GridScrollArea'; import { useGridRootProps } from '../../hooks/utils/useGridRootProps'; import { useGridApiContext } from '../../hooks/utils/useGridApiContext'; diff --git a/packages/x-data-grid/src/components/virtualization/GridVirtualScrollerContent.tsx b/packages/x-data-grid/src/components/virtualization/GridVirtualScrollerContent.tsx index 95e05d1a48a5..90709353bf2b 100644 --- a/packages/x-data-grid/src/components/virtualization/GridVirtualScrollerContent.tsx +++ b/packages/x-data-grid/src/components/virtualization/GridVirtualScrollerContent.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import clsx from 'clsx'; import { styled, SxProps, Theme } from '@mui/system'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { useGridRootProps } from '../../hooks/utils/useGridRootProps'; import { getDataGridUtilityClass } from '../../constants/gridClasses'; import { DataGridProcessedProps } from '../../models/props/DataGridProps'; diff --git a/packages/x-data-grid/src/components/virtualization/GridVirtualScrollerRenderZone.tsx b/packages/x-data-grid/src/components/virtualization/GridVirtualScrollerRenderZone.tsx index 240238494e0b..4ecd09eaf4f8 100644 --- a/packages/x-data-grid/src/components/virtualization/GridVirtualScrollerRenderZone.tsx +++ b/packages/x-data-grid/src/components/virtualization/GridVirtualScrollerRenderZone.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import clsx from 'clsx'; import { styled, SxProps, Theme } from '@mui/system'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { useGridApiContext } from '../../hooks/utils/useGridApiContext'; import { useGridSelector } from '../../hooks/utils/useGridSelector'; import { gridRowsMetaSelector } from '../../hooks/features/rows'; diff --git a/packages/x-data-grid/src/constants/gridClasses.ts b/packages/x-data-grid/src/constants/gridClasses.ts index e18d9ad39c9c..3251ec30d194 100644 --- a/packages/x-data-grid/src/constants/gridClasses.ts +++ b/packages/x-data-grid/src/constants/gridClasses.ts @@ -444,6 +444,11 @@ export interface GridClasses { * Styles applied to the root element when user selection is disabled. */ 'root--disableUserSelection': string; + /** + * Used to fix header outline border radius. + * @ignore - do not document. + */ + 'root--noToolbar': string; /** * Styles applied to the row element if the row is editable. */ @@ -472,6 +477,11 @@ export interface GridClasses { * Styles applied to the row if its detail panel is open. */ 'row--detailPanelExpanded': string; + /** + * Styles applied to the row cells if the row needs a bottom border. + * @ignore - do not document. + */ + 'row--borderBottom': string; /** * Styles applied to the row element. */ @@ -729,6 +739,7 @@ export const gridClasses = generateUtilityClasses('MuiDataGrid', [ 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', + 'root--noToolbar', 'row', 'row--editable', 'row--editing', @@ -737,6 +748,7 @@ export const gridClasses = generateUtilityClasses('MuiDataGrid', [ 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', + 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', diff --git a/packages/x-data-grid/src/hooks/core/useGridApiInitialization.ts b/packages/x-data-grid/src/hooks/core/useGridApiInitialization.ts index 61f639fb183a..3113bc997010 100644 --- a/packages/x-data-grid/src/hooks/core/useGridApiInitialization.ts +++ b/packages/x-data-grid/src/hooks/core/useGridApiInitialization.ts @@ -120,7 +120,8 @@ export function useGridApiInitialization< } const details = - props.signature === GridSignature.DataGridPro + props.signature === GridSignature.DataGridPro || + props.signature === GridSignature.DataGridPremium ? { api: privateApiRef.current.getPublicApi() } : {}; privateApiRef.current.eventManager.emit(name, params, event, details); diff --git a/packages/x-data-grid/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx b/packages/x-data-grid/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx index a18109c0edfb..de3a72f4a844 100644 --- a/packages/x-data-grid/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx +++ b/packages/x-data-grid/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx @@ -28,6 +28,7 @@ import { gridColumnPositionsSelector, gridVisiblePinnedColumnDefinitionsSelector, } from '../columns'; +import { gridPinnedRowsSelector } from '../rows/gridRowsSelector'; import { GridGroupingStructure } from '../columnGrouping/gridColumnGroupsInterfaces'; import { gridColumnGroupsUnwrappedModelSelector } from '../columnGrouping/gridColumnGroupsSelector'; import { GridScrollbarFillerCell as ScrollbarFiller } from '../../../components/GridScrollbarFillerCell'; @@ -105,6 +106,7 @@ export const useGridColumnHeaders = (props: UseGridColumnHeadersProps) => { const columnPositions = useGridSelector(apiRef, gridColumnPositionsSelector); const renderContext = useGridSelector(apiRef, gridRenderContextColumnsSelector); const pinnedColumns = useGridSelector(apiRef, gridVisiblePinnedColumnDefinitionsSelector); + const pinnedRows = useGridSelector(apiRef, gridPinnedRowsSelector); const offsetLeft = computeOffsetLeft( columnPositions, renderContext, @@ -298,6 +300,7 @@ export const useGridColumnHeaders = (props: UseGridColumnHeadersProps) => { role="row" aria-rowindex={headerGroupingMaxDepth + 1} ownerState={rootProps} + className={pinnedRows.top.length === 0 ? gridClasses['row--borderBottom'] : undefined} > {leftRenderContext && getColumnHeaders( diff --git a/packages/x-data-grid/src/hooks/features/editing/useGridCellEditing.ts b/packages/x-data-grid/src/hooks/features/editing/useGridCellEditing.ts index 8220068b7d35..fa6afb47afaf 100644 --- a/packages/x-data-grid/src/hooks/features/editing/useGridCellEditing.ts +++ b/packages/x-data-grid/src/hooks/features/editing/useGridCellEditing.ts @@ -30,7 +30,7 @@ import { useGridApiMethod } from '../../utils/useGridApiMethod'; import { gridEditRowsStateSelector } from './gridEditingSelectors'; import { GridRowId } from '../../../models/gridRows'; import { isPrintableKey, isPasteShortcut } from '../../../utils/keyboardUtils'; -import { buildWarning } from '../../../utils/warning'; +import { warnOnce } from '../../../internals/utils/warning'; import { gridRowsDataRowIdToIdLookupSelector } from '../rows/gridRowsSelector'; import { deepClone } from '../../../utils/utils'; import { @@ -40,15 +40,6 @@ import { GridCellEditStopReasons, } from '../../../models/params/gridEditCellParams'; -const missingOnProcessRowUpdateErrorWarning = buildWarning( - [ - 'MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', - 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example ` ...} />`.', - 'For more detail, see https://mui.com/x/react-data-grid/editing/#server-side-persistence.', - ], - 'error', -); - export const useGridCellEditing = ( apiRef: React.MutableRefObject, props: Pick< @@ -435,7 +426,14 @@ export const useGridCellEditing = ( if (onProcessRowUpdateError) { onProcessRowUpdateError(errorThrown); } else if (process.env.NODE_ENV !== 'production') { - missingOnProcessRowUpdateErrorWarning(); + warnOnce( + [ + 'MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', + 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example ` ...} />`.', + 'For more detail, see https://mui.com/x/react-data-grid/editing/#server-side-persistence.', + ], + 'error', + ); } }; diff --git a/packages/x-data-grid/src/hooks/features/editing/useGridEditing.ts b/packages/x-data-grid/src/hooks/features/editing/useGridEditing.ts index 56e3ba6096de..1f5351ab67d4 100644 --- a/packages/x-data-grid/src/hooks/features/editing/useGridEditing.ts +++ b/packages/x-data-grid/src/hooks/features/editing/useGridEditing.ts @@ -14,7 +14,7 @@ import { GridCellModes, GridEditModes } from '../../../models/gridEditRowModel'; import { useGridRowEditing } from './useGridRowEditing'; import { GridStateInitializer } from '../../utils/useGridInitializeState'; import { gridEditRowsStateSelector } from './gridEditingSelectors'; -import { isAutoGeneratedRow } from '../rows/gridRowsUtils'; +import { isAutogeneratedRowNode } from '../rows/gridRowsUtils'; export const editingStateInitializer: GridStateInitializer = (state) => ({ ...state, @@ -36,7 +36,7 @@ export const useGridEditing = ( const isCellEditable = React.useCallback( (params) => { - if (isAutoGeneratedRow(params.rowNode)) { + if (isAutogeneratedRowNode(params.rowNode)) { return false; } if (!params.colDef.editable) { diff --git a/packages/x-data-grid/src/hooks/features/editing/useGridRowEditing.ts b/packages/x-data-grid/src/hooks/features/editing/useGridRowEditing.ts index 33932d80672f..fe07ea384681 100644 --- a/packages/x-data-grid/src/hooks/features/editing/useGridRowEditing.ts +++ b/packages/x-data-grid/src/hooks/features/editing/useGridRowEditing.ts @@ -36,7 +36,7 @@ import { gridVisibleColumnFieldsSelector, } from '../columns/gridColumnsSelector'; import { GridCellParams } from '../../../models/params/gridCellParams'; -import { buildWarning } from '../../../utils/warning'; +import { warnOnce } from '../../../internals/utils/warning'; import { gridRowsDataRowIdToIdLookupSelector } from '../rows/gridRowsSelector'; import { deepClone } from '../../../utils/utils'; import { @@ -47,15 +47,6 @@ import { } from '../../../models/params/gridRowParams'; import { GRID_ACTIONS_COLUMN_TYPE } from '../../../colDef'; -const missingOnProcessRowUpdateErrorWarning = buildWarning( - [ - 'MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', - 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example ` ...} />`.', - 'For more detail, see https://mui.com/x/react-data-grid/editing/#server-side-persistence.', - ], - 'error', -); - export const useGridRowEditing = ( apiRef: React.MutableRefObject, props: Pick< @@ -522,7 +513,14 @@ export const useGridRowEditing = ( if (onProcessRowUpdateError) { onProcessRowUpdateError(errorThrown); } else if (process.env.NODE_ENV !== 'production') { - missingOnProcessRowUpdateErrorWarning(); + warnOnce( + [ + 'MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', + 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example ` ...} />`.', + 'For more detail, see https://mui.com/x/react-data-grid/editing/#server-side-persistence.', + ], + 'error', + ); } }; diff --git a/packages/x-data-grid/src/hooks/features/export/serializers/csvSerializer.ts b/packages/x-data-grid/src/hooks/features/export/serializers/csvSerializer.ts index bc8b49658233..0589aba5d346 100644 --- a/packages/x-data-grid/src/hooks/features/export/serializers/csvSerializer.ts +++ b/packages/x-data-grid/src/hooks/features/export/serializers/csvSerializer.ts @@ -3,23 +3,23 @@ import { GRID_CHECKBOX_SELECTION_COL_DEF } from '../../../../colDef'; import type { GridCellParams } from '../../../../models/params/gridCellParams'; import type { GridStateColDef } from '../../../../models/colDef/gridColDef'; import type { GridApiCommunity } from '../../../../models/api/gridApiCommunity'; -import { buildWarning } from '../../../../utils/warning'; +import { warnOnce } from '../../../../internals/utils/warning'; function sanitizeCellValue(value: unknown, csvOptions: CSVOptions): string { const valueStr = typeof value === 'string' ? value : `${value}`; if (csvOptions.shouldAppendQuotes || csvOptions.escapeFormulas) { const escapedValue = valueStr.replace(/"/g, '""'); - // Make sure value containing delimiter or line break won't be split into multiple cells - if ([csvOptions.delimiter, '\n', '\r', '"'].some((delimiter) => valueStr.includes(delimiter))) { - return `"${escapedValue}"`; - } if (csvOptions.escapeFormulas) { // See https://owasp.org/www-community/attacks/CSV_Injection if (['=', '+', '-', '@', '\t', '\r'].includes(escapedValue[0])) { - return `'${escapedValue}`; + return `"'${escapedValue}"`; } } + // Make sure value containing delimiter or line break won't be split into multiple cells + if ([csvOptions.delimiter, '\n', '\r', '"'].some((delimiter) => valueStr.includes(delimiter))) { + return `"${escapedValue}"`; + } return escapedValue; } @@ -53,11 +53,6 @@ export const serializeCellValue = ( return sanitizeCellValue(value, csvOptions); }; -const objectFormattedValueWarning = buildWarning([ - 'MUI X: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.', - 'You can provide a `valueFormatter` with a string representation to be used.', -]); - type CSVOptions = Required< Pick >; @@ -115,7 +110,10 @@ const serializeRow = ({ const cellParams = getCellParams(id, column.field); if (process.env.NODE_ENV !== 'production') { if (String(cellParams.formattedValue) === '[object Object]') { - objectFormattedValueWarning(); + warnOnce([ + 'MUI X: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.', + 'You can provide a `valueFormatter` with a string representation to be used.', + ]); } } row.addValue( diff --git a/packages/x-data-grid/src/hooks/features/filter/gridFilterUtils.ts b/packages/x-data-grid/src/hooks/features/filter/gridFilterUtils.ts index 028bc8c126af..5a6f64bce4dc 100644 --- a/packages/x-data-grid/src/hooks/features/filter/gridFilterUtils.ts +++ b/packages/x-data-grid/src/hooks/features/filter/gridFilterUtils.ts @@ -14,7 +14,7 @@ import { GridFilterItemResult, GridQuickFilterValueResult, } from './gridFilterState'; -import { buildWarning } from '../../../utils/warning'; +import { warnOnce } from '../../../internals/utils/warning'; import { getPublicApiRef } from '../../../utils/getPublicApiRef'; import { gridColumnFieldsSelector, @@ -75,24 +75,6 @@ export const cleanFilterItem = ( return cleanItem; }; -const filterModelDisableMultiColumnsFilteringWarning = buildWarning( - [ - 'MUI X: The `filterModel` can only contain a single item when the `disableMultipleColumnsFiltering` prop is set to `true`.', - 'If you are using the community version of the `DataGrid`, this prop is always `true`.', - ], - 'error', -); - -const filterModelMissingItemIdWarning = buildWarning( - 'MUI X: The `id` field is required on `filterModel.items` when you use multiple filters.', - 'error', -); - -const filterModelMissingItemOperatorWarning = buildWarning( - 'MUI X: The `operator` field is required on `filterModel.items`, one or more of your filtering item has no `operator` provided.', - 'error', -); - export const sanitizeFilterModel = ( model: GridFilterModel, disableMultipleColumnsFiltering: boolean, @@ -102,8 +84,15 @@ export const sanitizeFilterModel = ( let items: GridFilterItem[]; if (hasSeveralItems && disableMultipleColumnsFiltering) { - filterModelDisableMultiColumnsFilteringWarning(); - + if (process.env.NODE_ENV !== 'production') { + warnOnce( + [ + 'MUI X: The `filterModel` can only contain a single item when the `disableMultipleColumnsFiltering` prop is set to `true`.', + 'If you are using the community version of the `DataGrid`, this prop is always `true`.', + ], + 'error', + ); + } items = [model.items[0]]; } else { items = model.items; @@ -112,12 +101,22 @@ export const sanitizeFilterModel = ( const hasItemsWithoutIds = hasSeveralItems && items.some((item) => item.id == null); const hasItemWithoutOperator = items.some((item) => item.operator == null); - if (hasItemsWithoutIds) { - filterModelMissingItemIdWarning(); + if (process.env.NODE_ENV !== 'production') { + if (hasItemsWithoutIds) { + warnOnce( + 'MUI X: The `id` field is required on `filterModel.items` when you use multiple filters.', + 'error', + ); + } } - if (hasItemWithoutOperator) { - filterModelMissingItemOperatorWarning(); + if (process.env.NODE_ENV !== 'production') { + if (hasItemWithoutOperator) { + warnOnce( + 'MUI X: The `operator` field is required on `filterModel.items`, one or more of your filtering item has no `operator` provided.', + 'error', + ); + } } if (hasItemWithoutOperator || hasItemsWithoutIds) { diff --git a/packages/x-data-grid/src/hooks/features/rowSelection/useGridRowSelection.ts b/packages/x-data-grid/src/hooks/features/rowSelection/useGridRowSelection.ts index 7362b7a848be..2888ec5929a1 100644 --- a/packages/x-data-grid/src/hooks/features/rowSelection/useGridRowSelection.ts +++ b/packages/x-data-grid/src/hooks/features/rowSelection/useGridRowSelection.ts @@ -56,7 +56,9 @@ export const rowSelectionStateInitializer: GridStateInitializer< Pick > = (state, props) => ({ ...state, - rowSelection: props.rowSelection ? getSelectionModelPropValue(props.rowSelectionModel) ?? [] : [], + rowSelection: props.rowSelection + ? (getSelectionModelPropValue(props.rowSelectionModel) ?? []) + : [], }); /** diff --git a/packages/x-data-grid/src/hooks/features/rowSelection/useGridRowSelectionPreProcessors.ts b/packages/x-data-grid/src/hooks/features/rowSelection/useGridRowSelectionPreProcessors.ts index 454bbb05cbdc..373282645648 100644 --- a/packages/x-data-grid/src/hooks/features/rowSelection/useGridRowSelectionPreProcessors.ts +++ b/packages/x-data-grid/src/hooks/features/rowSelection/useGridRowSelectionPreProcessors.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { GridColDef } from '../../../models/colDef/gridColDef'; import { GridPipeProcessor, useGridRegisterPipeProcessor } from '../../core/pipeProcessing'; import { getDataGridUtilityClass } from '../../../constants'; diff --git a/packages/x-data-grid/src/hooks/features/rows/gridRowsUtils.ts b/packages/x-data-grid/src/hooks/features/rows/gridRowsUtils.ts index 83b643c84dd4..b088a3fb6565 100644 --- a/packages/x-data-grid/src/hooks/features/rows/gridRowsUtils.ts +++ b/packages/x-data-grid/src/hooks/features/rows/gridRowsUtils.ts @@ -192,7 +192,9 @@ export const getRowsStateFromCache = ({ }; }; -export const isAutoGeneratedRow = ( +export const isAutogeneratedRow = (row: GridRowModel): boolean => GRID_ID_AUTOGENERATED in row; + +export const isAutogeneratedRowNode = ( rowNode: GridTreeNode, ): rowNode is | GridFooterNode @@ -217,7 +219,7 @@ export const getTreeNodeDescendants = ( const validDescendants: GridRowId[] = []; for (let i = 0; i < node.children.length; i += 1) { const child = node.children[i]; - if (!skipAutoGeneratedRows || !isAutoGeneratedRow(tree[child])) { + if (!skipAutoGeneratedRows || !isAutogeneratedRowNode(tree[child])) { validDescendants.push(child); } const childDescendants = getTreeNodeDescendants(tree, child, skipAutoGeneratedRows); diff --git a/packages/x-data-grid/src/hooks/features/rows/index.ts b/packages/x-data-grid/src/hooks/features/rows/index.ts index 0ebbb415a226..c946d462137c 100644 --- a/packages/x-data-grid/src/hooks/features/rows/index.ts +++ b/packages/x-data-grid/src/hooks/features/rows/index.ts @@ -13,4 +13,4 @@ export { gridDataRowIdsSelector, } from './gridRowsSelector'; export type { GridRowsState, GridRowIdToModelLookup } from './gridRowsInterfaces'; -export { GRID_ROOT_GROUP_ID, checkGridRowIdIsValid } from './gridRowsUtils'; +export { GRID_ROOT_GROUP_ID, checkGridRowIdIsValid, isAutogeneratedRow } from './gridRowsUtils'; diff --git a/packages/x-data-grid/src/hooks/features/rows/useGridRows.ts b/packages/x-data-grid/src/hooks/features/rows/useGridRows.ts index 2737b07ce94c..775962e697bc 100644 --- a/packages/x-data-grid/src/hooks/features/rows/useGridRows.ts +++ b/packages/x-data-grid/src/hooks/features/rows/useGridRows.ts @@ -28,7 +28,7 @@ import { getTreeNodeDescendants, createRowsInternalCache, getRowsStateFromCache, - isAutoGeneratedRow, + isAutogeneratedRowNode, GRID_ROOT_GROUP_ID, GRID_ID_AUTOGENERATED, updateCacheWithNewRows, @@ -100,7 +100,7 @@ export const useGridRows = ( } const node = apiRef.current.getRowNode(id); - if (node && isAutoGeneratedRow(node)) { + if (node && isAutogeneratedRowNode(node)) { return { [GRID_ID_AUTOGENERATED]: id }; } @@ -320,7 +320,7 @@ export const useGridRows = ( index += 1 ) { const id = sortedRowIds[index]; - if (!skipAutoGeneratedRows || !isAutoGeneratedRow(tree[id])) { + if (!skipAutoGeneratedRows || !isAutogeneratedRowNode(tree[id])) { children.push(id); } } diff --git a/packages/x-data-grid/src/hooks/features/sorting/gridSortingSelector.ts b/packages/x-data-grid/src/hooks/features/sorting/gridSortingSelector.ts index 90c85a1ad65f..70c9993cac46 100644 --- a/packages/x-data-grid/src/hooks/features/sorting/gridSortingSelector.ts +++ b/packages/x-data-grid/src/hooks/features/sorting/gridSortingSelector.ts @@ -1,7 +1,7 @@ import { createSelector, createSelectorMemoized } from '../../../utils/createSelector'; import { GridSortDirection, GridSortModel } from '../../../models/gridSortModel'; import { gridRowTreeSelector, gridRowsLookupSelector } from '../rows/gridRowsSelector'; -import { GRID_ID_AUTOGENERATED, isAutoGeneratedRow } from '../rows/gridRowsUtils'; +import { GRID_ID_AUTOGENERATED, isAutogeneratedRowNode } from '../rows/gridRowsUtils'; import type { GridStateCommunity } from '../../../models/gridStateCommunity'; import type { GridValidRowModel, GridRowEntry } from '../../../models/gridRows'; @@ -35,7 +35,7 @@ export const gridSortedRowEntriesSelector = createSelectorMemoized( acc.push({ id, model }); } const rowNode = rowTree[id]; - if (rowNode && isAutoGeneratedRow(rowNode)) { + if (rowNode && isAutogeneratedRowNode(rowNode)) { acc.push({ id, model: { [GRID_ID_AUTOGENERATED]: id } }); } return acc; diff --git a/packages/x-data-grid/src/hooks/features/sorting/gridSortingUtils.ts b/packages/x-data-grid/src/hooks/features/sorting/gridSortingUtils.ts index 77d6486988a5..ce7138653a28 100644 --- a/packages/x-data-grid/src/hooks/features/sorting/gridSortingUtils.ts +++ b/packages/x-data-grid/src/hooks/features/sorting/gridSortingUtils.ts @@ -10,7 +10,7 @@ import { GridSortModel, GridSortCellParams, } from '../../../models/gridSortModel'; -import { buildWarning } from '../../../utils/warning'; +import { warnOnce } from '../../../internals/utils/warning'; type GridSortingFieldComparator = { getSortCellParams: (id: GridRowId) => GridSortCellParams; @@ -22,18 +22,16 @@ interface GridParsedSortItem { getSortCellParams: (id: GridRowId) => GridSortCellParams; } -const sortModelDisableMultiColumnsSortingWarning = buildWarning( - [ - 'MUI X: The `sortModel` can only contain a single item when the `disableMultipleColumnsSorting` prop is set to `true`.', - 'If you are using the community version of the `DataGrid`, this prop is always `true`.', - ], - 'error', -); - export const sanitizeSortModel = (model: GridSortModel, disableMultipleColumnsSorting: boolean) => { if (disableMultipleColumnsSorting && model.length > 1) { if (process.env.NODE_ENV !== 'production') { - sortModelDisableMultiColumnsSortingWarning(); + warnOnce( + [ + 'MUI X: The `sortModel` can only contain a single item when the `disableMultipleColumnsSorting` prop is set to `true`.', + 'If you are using the community version of the `DataGrid`, this prop is always `true`.', + ], + 'error', + ); } return [model[0]]; } diff --git a/packages/x-data-grid/src/hooks/features/virtualization/useGridVirtualScroller.tsx b/packages/x-data-grid/src/hooks/features/virtualization/useGridVirtualScroller.tsx index 334d65759aac..4c12b9b87a56 100644 --- a/packages/x-data-grid/src/hooks/features/virtualization/useGridVirtualScroller.tsx +++ b/packages/x-data-grid/src/hooks/features/virtualization/useGridVirtualScroller.tsx @@ -25,6 +25,7 @@ import { GridPinnedRowsPosition } from '../rows/gridRowsInterfaces'; import { gridFocusCellSelector, gridTabIndexCellSelector } from '../focus/gridFocusStateSelector'; import { useGridVisibleRows, getVisibleRows } from '../../utils/useGridVisibleRows'; import { useGridApiEventHandler } from '../../utils'; +import * as platform from '../../../utils/platform'; import { clamp, range } from '../../../utils/utils'; import type { GridRenderContext, @@ -277,6 +278,8 @@ export const useGridVirtualScroller = () => { const forceUpdateRenderContext = () => { const inputs = inputsSelector(apiRef, rootProps, enabled, enabledForColumns); const nextRenderContext = computeRenderContext(inputs, scrollPosition.current, scrollCache); + // Reset the frozen context when the render context changes, see the illustration in https://github.com/mui/mui-x/pull/12353 + frozenContext.current = undefined; updateRenderContext(nextRenderContext); }; @@ -375,6 +378,7 @@ export const useGridVirtualScroller = () => { rowIndexes.forEach((rowIndexInPage) => { const { id, model } = rowModels[rowIndexInPage]; + const rowIndex = (currentPage?.range?.firstRowIndex || 0) + rowIndexOffset + rowIndexInPage; // NOTE: This is an expensive feature, the colSpan code could be optimized. if (hasColSpan) { @@ -426,6 +430,7 @@ export const useGridVirtualScroller = () => { } let isLastVisible = false; + const isLastVisibleInSection = rowIndexInPage === rowModels.length - 1; if (isLastSection) { if (!isPinnedSection) { const lastIndex = currentPage.rows.length - 1; @@ -435,7 +440,7 @@ export const useGridVirtualScroller = () => { isLastVisible = true; } } else { - isLastVisible = rowIndexInPage === rowModels.length - 1; + isLastVisible = isLastVisibleInSection; } } @@ -464,8 +469,7 @@ export const useGridVirtualScroller = () => { theme.direction, pinnedColumns.left.length, ); - - const rowIndex = (currentPage?.range?.firstRowIndex || 0) + rowIndexOffset + rowIndexInPage; + const showBottomBorder = isLastVisibleInSection && params.position === 'top'; rows.push( { isFirstVisible={isFirstVisible} isLastVisible={isLastVisible} isNotVisible={isNotVisible} + showBottomBorder={showBottomBorder} {...rowProps} />, ); @@ -583,12 +588,14 @@ export const useGridVirtualScroller = () => { }), getScrollerProps: () => ({ ref: scrollerRef, - tabIndex: -1, onScroll: handleScroll, onWheel: handleWheel, onTouchMove: handleTouchMove, style: scrollerStyle, role: 'presentation', + // `tabIndex` shouldn't be used along role=presentation, but it fixes a Firefox bug + // https://github.com/mui/mui-x/pull/13891#discussion_r1683416024 + tabIndex: platform.isFirefox ? -1 : undefined, }), getContentProps: () => ({ style: contentSize, diff --git a/packages/x-data-grid/src/hooks/utils/useGridApiEventHandler.ts b/packages/x-data-grid/src/hooks/utils/useGridApiEventHandler.ts index 2e75893309e9..b35036c795bf 100644 --- a/packages/x-data-grid/src/hooks/utils/useGridApiEventHandler.ts +++ b/packages/x-data-grid/src/hooks/utils/useGridApiEventHandler.ts @@ -13,6 +13,7 @@ import type { GridApiCommon } from '../../models'; enum GridSignature { DataGrid = 'DataGrid', DataGridPro = 'DataGridPro', + DataGridPremium = 'DataGridPremium', } interface RegistryContainer { diff --git a/packages/x-data-grid/src/hooks/utils/useGridNativeEventListener.ts b/packages/x-data-grid/src/hooks/utils/useGridNativeEventListener.ts index f351de22c8a3..84cddedd45ef 100644 --- a/packages/x-data-grid/src/hooks/utils/useGridNativeEventListener.ts +++ b/packages/x-data-grid/src/hooks/utils/useGridNativeEventListener.ts @@ -17,7 +17,7 @@ export const useGridNativeEventListener = < const [added, setAdded] = React.useState(false); const handlerRef = React.useRef(handler); - const targetElement = isFunction(ref) ? ref() : ref?.current ?? null; + const targetElement = isFunction(ref) ? ref() : (ref?.current ?? null); const wrapHandler = React.useCallback((event: HTMLElementEventMap[K]) => { return handlerRef.current && handlerRef.current(event); diff --git a/packages/x-data-grid/src/hooks/utils/useGridSelector.ts b/packages/x-data-grid/src/hooks/utils/useGridSelector.ts index 859167dcfb24..76fc6754b8c8 100644 --- a/packages/x-data-grid/src/hooks/utils/useGridSelector.ts +++ b/packages/x-data-grid/src/hooks/utils/useGridSelector.ts @@ -3,14 +3,9 @@ import type { GridApiCommon } from '../../models/api/gridApiCommon'; import { OutputSelector } from '../../utils/createSelector'; import { useLazyRef } from './useLazyRef'; import { useOnMount } from './useOnMount'; -import { buildWarning } from '../../utils/warning'; +import { warnOnce } from '../../internals/utils/warning'; import { fastObjectShallowCompare } from '../../utils/fastObjectShallowCompare'; -const stateNotInitializedWarning = buildWarning([ - 'MUI X: `useGridSelector` has been called before the initialization of the state.', - 'This hook can only be used inside the context of the grid.', -]); - function isOutputSelector( selector: any, ): selector is OutputSelector { @@ -39,7 +34,10 @@ export const useGridSelector = ( ) => { if (process.env.NODE_ENV !== 'production') { if (!apiRef.current.state) { - stateNotInitializedWarning(); + warnOnce([ + 'MUI X: `useGridSelector` has been called before the initialization of the state.', + 'This hook can only be used inside the context of the grid.', + ]); } } diff --git a/packages/x-data-grid/src/internals/index.ts b/packages/x-data-grid/src/internals/index.ts index 1387f50016d3..90f1ca592e48 100644 --- a/packages/x-data-grid/src/internals/index.ts +++ b/packages/x-data-grid/src/internals/index.ts @@ -143,7 +143,6 @@ export { export { isNavigationKey, isPasteShortcut } from '../utils/keyboardUtils'; export * from '../utils/utils'; export * from '../utils/fastMemo'; -export { buildWarning } from '../utils/warning'; export { exportAs } from '../utils/exportAs'; export * from '../utils/getPublicApiRef'; export * from '../utils/cellBorderUtils'; diff --git a/packages/x-data-grid/src/internals/utils/index.ts b/packages/x-data-grid/src/internals/utils/index.ts index 5bdfb7c8c66f..20749d11ceb9 100644 --- a/packages/x-data-grid/src/internals/utils/index.ts +++ b/packages/x-data-grid/src/internals/utils/index.ts @@ -1,3 +1,4 @@ export * from './computeSlots'; export * from './useProps'; export * from './propValidation'; +export * from './warning'; diff --git a/packages/x-data-grid/src/internals/utils/propValidation.ts b/packages/x-data-grid/src/internals/utils/propValidation.ts index 825db3991f71..e6dbaad64390 100644 --- a/packages/x-data-grid/src/internals/utils/propValidation.ts +++ b/packages/x-data-grid/src/internals/utils/propValidation.ts @@ -1,3 +1,4 @@ +import { warnOnce } from './warning'; import { isNumber } from '../../utils/utils'; import { DataGridProcessedProps } from '../../models/props/DataGridProps'; import { GridSignature } from '../../hooks/utils/useGridApiEventHandler'; @@ -43,23 +44,11 @@ export const propValidatorsDataGrid: PropValidator[] = [ undefined, ]; -const warnedOnceCache = new Set(); -function warnOnce(message: string) { - if (!warnedOnceCache.has(message)) { - console.error(message); - warnedOnceCache.add(message); - } -} - export function validateProps(props: TProps, validators: PropValidator[]) { validators.forEach((validator) => { - const warning = validator(props); - if (warning) { - warnOnce(warning); + const message = validator(props); + if (message) { + warnOnce(message, 'error'); } }); } - -export function clearWarningsCache() { - warnedOnceCache.clear(); -} diff --git a/packages/x-data-grid/src/internals/utils/useProps.ts b/packages/x-data-grid/src/internals/utils/useProps.ts index 0f876b37a31f..2529fc1f09df 100644 --- a/packages/x-data-grid/src/internals/utils/useProps.ts +++ b/packages/x-data-grid/src/internals/utils/useProps.ts @@ -32,8 +32,5 @@ function groupForwardedProps< } export function useProps>(allProps: T) { - return React.useMemo(() => { - const { ...themedProps } = allProps; - return groupForwardedProps(themedProps); - }, [allProps]); + return React.useMemo(() => groupForwardedProps(allProps), [allProps]); } diff --git a/packages/x-data-grid/src/internals/utils/warning.ts b/packages/x-data-grid/src/internals/utils/warning.ts new file mode 100644 index 000000000000..f0d34fc59f68 --- /dev/null +++ b/packages/x-data-grid/src/internals/utils/warning.ts @@ -0,0 +1,25 @@ +const warnedOnceCache = new Set(); + +// TODO move to @mui/x-internals +// TODO eventually move to @base_ui/internals. Base UI, etc. too need this helper. +export function warnOnce(message: string | string[], gravity: 'warning' | 'error' = 'warning') { + if (process.env.NODE_ENV === 'production') { + return; + } + + const cleanMessage = Array.isArray(message) ? message.join('\n') : message; + + if (!warnedOnceCache.has(cleanMessage)) { + warnedOnceCache.add(cleanMessage); + + if (gravity === 'error') { + console.error(cleanMessage); + } else { + console.warn(cleanMessage); + } + } +} + +export function clearWarningsCache() { + warnedOnceCache.clear(); +} diff --git a/packages/x-data-grid/src/locales/deDE.ts b/packages/x-data-grid/src/locales/deDE.ts index a4d7d88382bf..6d4faf098abd 100644 --- a/packages/x-data-grid/src/locales/deDE.ts +++ b/packages/x-data-grid/src/locales/deDE.ts @@ -42,7 +42,7 @@ const deDEGrid: Partial = { columnsManagementSearchTitle: 'Suche', columnsManagementNoColumns: 'Keine Spalten', columnsManagementShowHideAllText: 'Alle anzeigen/verbergen', - // columnsManagementReset: 'Reset', + columnsManagementReset: 'Zurücksetzen', // Filter panel text filterPanelAddFilter: 'Filter hinzufügen', diff --git a/packages/x-data-grid/src/locales/index.ts b/packages/x-data-grid/src/locales/index.ts index fbc7613b5603..9dc9e0647a36 100644 --- a/packages/x-data-grid/src/locales/index.ts +++ b/packages/x-data-grid/src/locales/index.ts @@ -18,6 +18,7 @@ export * from './jaJP'; export * from './koKR'; export * from './nbNO'; export * from './nlNL'; +export * from './nnNO'; export * from './plPL'; export * from './ptBR'; export * from './roRO'; @@ -33,3 +34,4 @@ export * from './zhTW'; export * from './hrHR'; export * from './ptPT'; export * from './zhHK'; +export * from './isIS'; diff --git a/packages/x-data-grid/src/locales/isIS.ts b/packages/x-data-grid/src/locales/isIS.ts new file mode 100644 index 000000000000..00ccef4cd83c --- /dev/null +++ b/packages/x-data-grid/src/locales/isIS.ts @@ -0,0 +1,179 @@ +import { isIS as isISCore } from '@mui/material/locale'; +import { GridLocaleText } from '../models/api/gridLocaleTextApi'; +import { getGridLocalization, Localization } from '../utils/getGridLocalization'; + +const isISGrid: Partial = { + // Root + noRowsLabel: 'Engar raðir', + noResultsOverlayLabel: 'Engar niðurstöður', + + // Density selector toolbar button text + toolbarDensity: 'Þéttleiki', + toolbarDensityLabel: 'Þéttleiki', + toolbarDensityCompact: 'Þétt', + toolbarDensityStandard: 'Staðlað', + toolbarDensityComfortable: 'Rúmlegt', + + // Columns selector toolbar button text + toolbarColumns: 'Dálkar', + toolbarColumnsLabel: 'Veldu dálka', + + // Filters toolbar button text + toolbarFilters: 'Sía', + toolbarFiltersLabel: 'Sjá síur', + toolbarFiltersTooltipHide: 'Fela síur', + toolbarFiltersTooltipShow: 'Sjá síur', + toolbarFiltersTooltipActive: (count) => + count !== 1 ? `${count} virk sía` : `${count} virkar síur`, + + // Quick filter toolbar field + toolbarQuickFilterPlaceholder: 'Leita…', + toolbarQuickFilterLabel: 'Leita', + toolbarQuickFilterDeleteIconLabel: 'Eyða', + + // Export selector toolbar button text + toolbarExport: 'Flytja út', + toolbarExportLabel: 'Flytja út', + toolbarExportCSV: 'Hlaða niður sem CSV', + toolbarExportPrint: 'Prenta', + toolbarExportExcel: 'Hlaða niður sem Excel', + + // Columns management text + // columnsManagementSearchTitle: 'Search', + // columnsManagementNoColumns: 'No columns', + // columnsManagementShowHideAllText: 'Show/Hide All', + // columnsManagementReset: 'Reset', + + // Filter panel text + filterPanelAddFilter: 'Bæta síu', + filterPanelRemoveAll: 'Fjarlægja alla', + filterPanelDeleteIconLabel: 'Eyða', + filterPanelLogicOperator: 'Rökvirkir', + filterPanelOperator: 'Virkir', + filterPanelOperatorAnd: 'Og', + filterPanelOperatorOr: 'Eða', + filterPanelColumns: 'Dálkar', + filterPanelInputLabel: 'Gildi', + filterPanelInputPlaceholder: 'Síu gildi', + + // Filter operators text + filterOperatorContains: 'inniheldur', + filterOperatorEquals: 'jafnt og', + filterOperatorStartsWith: 'byrjar með', + filterOperatorEndsWith: 'endar með', + filterOperatorIs: 'er líka með', + filterOperatorNot: 'er ekki líka með', + filterOperatorAfter: 'eftir', + filterOperatorOnOrAfter: 'á eða eftir', + filterOperatorBefore: 'fyrir', + filterOperatorOnOrBefore: 'á eða fyrir', + filterOperatorIsEmpty: 'inniheldur ekki gögn', + filterOperatorIsNotEmpty: 'inniheldur gögn', + filterOperatorIsAnyOf: 'inniheldur einn af', + 'filterOperator=': '=', + 'filterOperator!=': '!=', + 'filterOperator>': '>', + 'filterOperator>=': '>=', + 'filterOperator<': '<', + 'filterOperator<=': '<=', + + // Header filter operators text + headerFilterOperatorContains: 'Inniheldur', + headerFilterOperatorEquals: 'Jafnt og', + headerFilterOperatorStartsWith: 'Byrjar með', + headerFilterOperatorEndsWith: 'Endar með', + headerFilterOperatorIs: 'Er jafnt og', + headerFilterOperatorNot: 'Er ekki jafnt og', + headerFilterOperatorAfter: 'Eftir', + headerFilterOperatorOnOrAfter: 'Á eða eftir', + headerFilterOperatorBefore: 'Fyrir', + headerFilterOperatorOnOrBefore: 'Á eða fyrir', + headerFilterOperatorIsEmpty: 'Inniheldur ekki gögn', + headerFilterOperatorIsNotEmpty: 'Inniheldur gögn', + headerFilterOperatorIsAnyOf: 'Inniheldur einn af', + 'headerFilterOperator=': 'Jafnt og', + 'headerFilterOperator!=': 'Ekki jafnt og', + 'headerFilterOperator>': 'Stærra en', + 'headerFilterOperator>=': 'Stærra en eða jafnt og', + 'headerFilterOperator<': 'Minna en', + 'headerFilterOperator<=': 'Minna en eða jafnt og', + + // Filter values text + filterValueAny: 'hvað sem er', + filterValueTrue: 'satt', + filterValueFalse: 'falskt', + + // Column menu text + columnMenuLabel: 'Valmynd', + columnMenuShowColumns: 'Sýna dálka', + columnMenuManageColumns: 'Stjórna dálkum', + columnMenuFilter: 'Síur', + columnMenuHideColumn: 'Fela dálka', + columnMenuUnsort: 'Fjarlægja röðun', + columnMenuSortAsc: 'Raða hækkandi', + columnMenuSortDesc: 'Raða lækkandi', + + // Column header text + columnHeaderFiltersTooltipActive: (count) => + count !== 1 ? `${count} virkar síur` : `Ein virk sía`, + columnHeaderFiltersLabel: 'Sýna síur', + columnHeaderSortIconLabel: 'Raða', + + // Rows selected footer text + footerRowSelected: (count) => + count !== 1 ? `${count.toLocaleString()} raðir valdar` : `Ein röð valin`, + + // Total row amount footer text + footerTotalRows: 'Heildarfjöldi lína:', + + // Total visible row amount footer text + footerTotalVisibleRows: (visibleCount, totalCount) => + `${visibleCount.toLocaleString()} af ${totalCount.toLocaleString()}`, + + // Checkbox selection text + checkboxSelectionHeaderName: 'Val á gátreit', + checkboxSelectionSelectAllRows: 'Velja allar raðir', + checkboxSelectionUnselectAllRows: 'Afvelja allar raðir', + checkboxSelectionSelectRow: 'Velja röð', + checkboxSelectionUnselectRow: 'Afvelja röð', + + // Boolean cell text + booleanCellTrueLabel: 'já', + booleanCellFalseLabel: 'nei', + + // Actions cell more text + actionsCellMore: 'meira', + + // Column pinning text + pinToLeft: 'Festa til vinstri', + pinToRight: 'Festa til hægri', + unpin: 'Losa um', + + // Tree Data + treeDataGroupingHeaderName: 'Hópur', + treeDataExpand: 'Sýna undirliði', + treeDataCollapse: 'Fela undirliði', + + // Grouping columns + groupingColumnHeaderName: 'Hópur', + groupColumn: (name) => `Hópa eftir ${name}`, + unGroupColumn: (name) => `Fjarlægja hópun eftir ${name}`, + + // Master/detail + detailPanelToggle: 'Stækka/minnka smáatriðaspjald', + expandDetailPanel: 'Stækka', + collapseDetailPanel: 'Minnka', + + // Row reordering text + rowReorderingHeaderName: 'Endurröðun raða', + + // Aggregation + aggregationMenuItemHeader: 'Samsafn', + aggregationFunctionLabelSum: 'sum', + aggregationFunctionLabelAvg: 'avg', + aggregationFunctionLabelMin: 'min', + aggregationFunctionLabelMax: 'max', + aggregationFunctionLabelSize: 'stærð', +}; + +export const isIS: Localization = getGridLocalization(isISGrid, isISCore); diff --git a/packages/x-data-grid/src/locales/nbNO.ts b/packages/x-data-grid/src/locales/nbNO.ts index 67c0e100dc7b..16de342b6999 100644 --- a/packages/x-data-grid/src/locales/nbNO.ts +++ b/packages/x-data-grid/src/locales/nbNO.ts @@ -21,7 +21,7 @@ const nbNOGrid: Partial = { // Filters toolbar button text toolbarFilters: 'Filter', toolbarFiltersLabel: 'Vis filter', - toolbarFiltersTooltipHide: 'Skjul fitler', + toolbarFiltersTooltipHide: 'Skjul filter', toolbarFiltersTooltipShow: 'Vis filter', toolbarFiltersTooltipActive: (count) => count !== 1 ? `${count} aktive filter` : `${count} aktivt filter`, @@ -49,7 +49,7 @@ const nbNOGrid: Partial = { filterPanelRemoveAll: 'Fjern alle', filterPanelDeleteIconLabel: 'Slett', filterPanelLogicOperator: 'Logisk operator', - filterPanelOperator: 'Operatører', + filterPanelOperator: 'Operator', filterPanelOperatorAnd: 'Og', filterPanelOperatorOr: 'Eller', filterPanelColumns: 'Kolonner', @@ -70,33 +70,33 @@ const nbNOGrid: Partial = { filterOperatorIsEmpty: 'er tom', filterOperatorIsNotEmpty: 'er ikke tom', filterOperatorIsAnyOf: 'er en av', - // 'filterOperator=': '=', - // 'filterOperator!=': '!=', - // 'filterOperator>': '>', - // 'filterOperator>=': '>=', - // 'filterOperator<': '<', - // 'filterOperator<=': '<=', + 'filterOperator=': '=', + 'filterOperator!=': '!=', + 'filterOperator>': '>', + 'filterOperator>=': '>=', + 'filterOperator<': '<', + 'filterOperator<=': '<=', // Header filter operators text - // headerFilterOperatorContains: 'Contains', - // headerFilterOperatorEquals: 'Equals', - // headerFilterOperatorStartsWith: 'Starts with', - // headerFilterOperatorEndsWith: 'Ends with', - // headerFilterOperatorIs: 'Is', - // headerFilterOperatorNot: 'Is not', - // headerFilterOperatorAfter: 'Is after', - // headerFilterOperatorOnOrAfter: 'Is on or after', - // headerFilterOperatorBefore: 'Is before', - // headerFilterOperatorOnOrBefore: 'Is on or before', - // headerFilterOperatorIsEmpty: 'Is empty', - // headerFilterOperatorIsNotEmpty: 'Is not empty', - // headerFilterOperatorIsAnyOf: 'Is any of', - // 'headerFilterOperator=': 'Equals', - // 'headerFilterOperator!=': 'Not equals', - // 'headerFilterOperator>': 'Greater than', - // 'headerFilterOperator>=': 'Greater than or equal to', - // 'headerFilterOperator<': 'Less than', - // 'headerFilterOperator<=': 'Less than or equal to', + headerFilterOperatorContains: 'Inneholder', + headerFilterOperatorEquals: 'Lik', + headerFilterOperatorStartsWith: 'Starter på', + headerFilterOperatorEndsWith: 'Slutter på', + headerFilterOperatorIs: 'Er', + headerFilterOperatorNot: 'Er ikke', + headerFilterOperatorAfter: 'Er etter', + headerFilterOperatorOnOrAfter: 'Er på eller etter', + headerFilterOperatorBefore: 'Er før', + headerFilterOperatorOnOrBefore: 'Er på eller før', + headerFilterOperatorIsEmpty: 'Er tom', + headerFilterOperatorIsNotEmpty: 'Er ikke tom', + headerFilterOperatorIsAnyOf: 'Er en av', + 'headerFilterOperator=': 'Lik', + 'headerFilterOperator!=': 'Ikke lik', + 'headerFilterOperator>': 'Større enn', + 'headerFilterOperator>=': 'Større enn eller lik', + 'headerFilterOperator<': 'Mindre enn', + 'headerFilterOperator<=': 'Mindre enn eller lik', // Filter values text filterValueAny: 'noen', @@ -131,7 +131,7 @@ const nbNOGrid: Partial = { `${visibleCount.toLocaleString()} av ${totalCount.toLocaleString()}`, // Checkbox selection text - checkboxSelectionHeaderName: 'Avmerkingsboks valgt', + checkboxSelectionHeaderName: 'Avmerkingsboks', checkboxSelectionSelectAllRows: 'Velg alle rader', checkboxSelectionUnselectAllRows: 'Velg bort alle rader', checkboxSelectionSelectRow: 'Velg rad', @@ -157,7 +157,7 @@ const nbNOGrid: Partial = { // Grouping columns groupingColumnHeaderName: 'Grupper', groupColumn: (name) => `Grupper på ${name}`, - unGroupColumn: (name) => `Stopp å grupper på ${name}`, + unGroupColumn: (name) => `Slutt å grupper på ${name}`, // Master/detail detailPanelToggle: 'Utvid/kollaps detalj panel', @@ -165,7 +165,7 @@ const nbNOGrid: Partial = { collapseDetailPanel: 'Kollaps', // Row reordering text - rowReorderingHeaderName: 'Rad reorganisering', + rowReorderingHeaderName: 'Radreorganisering', // Aggregation aggregationMenuItemHeader: 'Aggregering', diff --git a/packages/x-data-grid/src/locales/nnNO.ts b/packages/x-data-grid/src/locales/nnNO.ts new file mode 100644 index 000000000000..8ef20a566b6c --- /dev/null +++ b/packages/x-data-grid/src/locales/nnNO.ts @@ -0,0 +1,179 @@ +import { nnNO as nnNOCore } from '@mui/material/locale'; +import { GridLocaleText } from '../models/api/gridLocaleTextApi'; +import { getGridLocalization, Localization } from '../utils/getGridLocalization'; + +const nnNOGrid: Partial = { + // Root + noRowsLabel: 'Ingen rader', + noResultsOverlayLabel: 'Fann ingen resultat.', + + // Density selector toolbar button text + toolbarDensity: 'Tettheit', + toolbarDensityLabel: 'Tettheit', + toolbarDensityCompact: 'Kompakt', + toolbarDensityStandard: 'Standard', + toolbarDensityComfortable: 'Komfortabelt', + + // Columns selector toolbar button text + toolbarColumns: 'Kolonner', + toolbarColumnsLabel: 'Vel kolonner', + + // Filters toolbar button text + toolbarFilters: 'Filter', + toolbarFiltersLabel: 'Vis filter', + toolbarFiltersTooltipHide: 'Skjul filter', + toolbarFiltersTooltipShow: 'Vis filter', + toolbarFiltersTooltipActive: (count) => + count !== 1 ? `${count} aktive filter` : `${count} aktivt filter`, + + // Quick filter toolbar field + toolbarQuickFilterPlaceholder: 'Søk…', + toolbarQuickFilterLabel: 'Søk', + toolbarQuickFilterDeleteIconLabel: 'Slett', + + // Export selector toolbar button text + toolbarExport: 'Eksporter', + toolbarExportLabel: 'Eksporter', + toolbarExportCSV: 'Last ned som CSV', + toolbarExportPrint: 'Skriv ut', + toolbarExportExcel: 'Last ned som Excel', + + // Columns management text + columnsManagementSearchTitle: 'Søk', + columnsManagementNoColumns: 'Ingen kolonner', + columnsManagementShowHideAllText: 'Vis/skjul alle', + columnsManagementReset: 'Nullstill', + + // Filter panel text + filterPanelAddFilter: 'Legg til filter', + filterPanelRemoveAll: 'Fjern alle', + filterPanelDeleteIconLabel: 'Slett', + filterPanelLogicOperator: 'Logisk operator', + filterPanelOperator: 'Operator', + filterPanelOperatorAnd: 'Og', + filterPanelOperatorOr: 'Eller', + filterPanelColumns: 'Kolonner', + filterPanelInputLabel: 'Verdi', + filterPanelInputPlaceholder: 'Filter verdi', + + // Filter operators text + filterOperatorContains: 'inneheld', + filterOperatorEquals: 'er lik', + filterOperatorStartsWith: 'startar med', + filterOperatorEndsWith: 'sluttar med', + filterOperatorIs: 'er', + filterOperatorNot: 'er ikkje', + filterOperatorAfter: 'er etter', + filterOperatorOnOrAfter: 'er på eller etter', + filterOperatorBefore: 'er før', + filterOperatorOnOrBefore: 'er på eller før', + filterOperatorIsEmpty: 'er tom', + filterOperatorIsNotEmpty: 'er ikkje tom', + filterOperatorIsAnyOf: 'er ein av', + 'filterOperator=': '=', + 'filterOperator!=': '!=', + 'filterOperator>': '>', + 'filterOperator>=': '>=', + 'filterOperator<': '<', + 'filterOperator<=': '<=', + + // Header filter operators text + headerFilterOperatorContains: 'Inneheld', + headerFilterOperatorEquals: 'Lik', + headerFilterOperatorStartsWith: 'Startar på', + headerFilterOperatorEndsWith: 'Sluttar på', + headerFilterOperatorIs: 'Er', + headerFilterOperatorNot: 'Er ikkje', + headerFilterOperatorAfter: 'Er etter', + headerFilterOperatorOnOrAfter: 'Er på eller etter', + headerFilterOperatorBefore: 'Er før', + headerFilterOperatorOnOrBefore: 'Er på eller før', + headerFilterOperatorIsEmpty: 'Er tom', + headerFilterOperatorIsNotEmpty: 'Er ikkje tom', + headerFilterOperatorIsAnyOf: 'Er ein av', + 'headerFilterOperator=': 'Lik', + 'headerFilterOperator!=': 'Ikkje lik', + 'headerFilterOperator>': 'Større enn', + 'headerFilterOperator>=': 'Større enn eller lik', + 'headerFilterOperator<': 'Mindre enn', + 'headerFilterOperator<=': 'Mindre enn eller lik', + + // Filter values text + filterValueAny: 'nokon', + filterValueTrue: 'sant', + filterValueFalse: 'usant', + + // Column menu text + columnMenuLabel: 'Meny', + columnMenuShowColumns: 'Vis kolonner', + columnMenuManageColumns: 'Administrer kolonner', + columnMenuFilter: 'Filter', + columnMenuHideColumn: 'Skjul', + columnMenuUnsort: 'Usorter', + columnMenuSortAsc: 'Sorter AUKANDE', + columnMenuSortDesc: 'Sorter SYNKANDE', + + // Column header text + columnHeaderFiltersTooltipActive: (count) => + count !== 1 ? `${count} aktive filter` : `${count} aktivt filter`, + columnHeaderFiltersLabel: 'Vis filter', + columnHeaderSortIconLabel: 'Sorter', + + // Rows selected footer text + footerRowSelected: (count) => + count !== 1 ? `${count.toLocaleString()} rader valt` : `${count.toLocaleString()} rad valt`, + + // Total row amount footer text + footerTotalRows: 'Totalt tal rader:', + + // Total visible row amount footer text + footerTotalVisibleRows: (visibleCount, totalCount) => + `${visibleCount.toLocaleString()} av ${totalCount.toLocaleString()}`, + + // Checkbox selection text + checkboxSelectionHeaderName: 'Avmerkingsboks', + checkboxSelectionSelectAllRows: 'Vel alle rader', + checkboxSelectionUnselectAllRows: 'Vel vekk alle rader', + checkboxSelectionSelectRow: 'Vel rad', + checkboxSelectionUnselectRow: 'Vel vekk rad', + + // Boolean cell text + booleanCellTrueLabel: 'sant', + booleanCellFalseLabel: 'usant', + + // Actions cell more text + actionsCellMore: 'meir', + + // Column pinning text + pinToLeft: 'Fest til venstre', + pinToRight: 'Fest til høgre', + unpin: 'Lausne', + + // Tree Data + treeDataGroupingHeaderName: 'Grupper', + treeDataExpand: 'vis barn', + treeDataCollapse: 'skjul barn', + + // Grouping columns + groupingColumnHeaderName: 'Grupper', + groupColumn: (name) => `Grupper på ${name}`, + unGroupColumn: (name) => `Slutt å grupper på ${name}`, + + // Master/detail + detailPanelToggle: 'Utvid/kollaps detalj panel', + expandDetailPanel: 'Utvid', + collapseDetailPanel: 'Kolaps', + + // Row reordering text + rowReorderingHeaderName: 'Radreorganisering', + + // Aggregation + aggregationMenuItemHeader: 'Aggregering', + aggregationFunctionLabelSum: 'sum', + aggregationFunctionLabelAvg: 'snitt', + aggregationFunctionLabelMin: 'min', + aggregationFunctionLabelMax: 'maks', + aggregationFunctionLabelSize: 'størrelse', +}; + +export const nnNO: Localization = getGridLocalization(nnNOGrid, nnNOCore); diff --git a/packages/x-data-grid/src/locales/trTR.ts b/packages/x-data-grid/src/locales/trTR.ts index 559544cce2f0..fbbd318ff9ca 100644 --- a/packages/x-data-grid/src/locales/trTR.ts +++ b/packages/x-data-grid/src/locales/trTR.ts @@ -38,10 +38,10 @@ const trTRGrid: Partial = { toolbarExportExcel: 'Excel olarak aktar', // Columns management text - // columnsManagementSearchTitle: 'Search', - // columnsManagementNoColumns: 'No columns', - // columnsManagementShowHideAllText: 'Show/Hide All', - // columnsManagementReset: 'Reset', + columnsManagementSearchTitle: 'Arama', + columnsManagementNoColumns: 'Kolon yok', + columnsManagementShowHideAllText: 'Hepsini Göster/Gizle', + columnsManagementReset: 'Sıfırla', // Filter panel text filterPanelAddFilter: 'Filtre Ekle', @@ -81,21 +81,21 @@ const trTRGrid: Partial = { headerFilterOperatorEquals: 'Şuna eşittir', headerFilterOperatorStartsWith: 'Şununla başlar', headerFilterOperatorEndsWith: 'Şununla biter', - // headerFilterOperatorIs: 'Is', - // headerFilterOperatorNot: 'Is not', - // headerFilterOperatorAfter: 'Is after', - // headerFilterOperatorOnOrAfter: 'Is on or after', - // headerFilterOperatorBefore: 'Is before', - // headerFilterOperatorOnOrBefore: 'Is on or before', - // headerFilterOperatorIsEmpty: 'Is empty', - // headerFilterOperatorIsNotEmpty: 'Is not empty', - // headerFilterOperatorIsAnyOf: 'Is any of', - // 'headerFilterOperator=': 'Equals', - // 'headerFilterOperator!=': 'Not equals', - // 'headerFilterOperator>': 'Greater than', - // 'headerFilterOperator>=': 'Greater than or equal to', - // 'headerFilterOperator<': 'Less than', - // 'headerFilterOperator<=': 'Less than or equal to', + headerFilterOperatorIs: 'Eşittir', + headerFilterOperatorNot: 'Eşit değil', + headerFilterOperatorAfter: 'Sonra', + headerFilterOperatorOnOrAfter: 'Sonra veya eşit', + headerFilterOperatorBefore: 'Önce', + headerFilterOperatorOnOrBefore: 'Önce veya eşit', + headerFilterOperatorIsEmpty: 'Boş', + headerFilterOperatorIsNotEmpty: 'Boş değil', + headerFilterOperatorIsAnyOf: 'Herhangi biri', + 'headerFilterOperator=': 'Eşittir', + 'headerFilterOperator!=': 'Eşit değil', + 'headerFilterOperator>': 'Büyüktür', + 'headerFilterOperator>=': 'Büyük veya eşit', + 'headerFilterOperator<': 'Küçüktür', + 'headerFilterOperator<=': 'Küçük veya eşit', // Filter values text filterValueAny: 'herhangi', diff --git a/packages/x-data-grid/src/tests/columns.DataGrid.test.tsx b/packages/x-data-grid/src/tests/columns.DataGrid.test.tsx index 528bb11fc88b..652d3e9bf153 100644 --- a/packages/x-data-grid/src/tests/columns.DataGrid.test.tsx +++ b/packages/x-data-grid/src/tests/columns.DataGrid.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createRenderer } from '@mui/internal-test-utils'; -import { DataGrid, DataGridProps, GridRowsProp, GridColDef } from '@mui/x-data-grid'; +import { createRenderer, fireEvent, screen } from '@mui/internal-test-utils'; +import { DataGrid, DataGridProps, GridRowsProp, GridColDef, gridClasses } from '@mui/x-data-grid'; import { getCell, getColumnHeaderCell, getColumnHeadersTextContent } from 'test/utils/helperFn'; const isJSDOM = /jsdom/.test(window.navigator.userAgent); @@ -121,4 +121,44 @@ describe(' - Columns', () => { // should not override valueFormatter with the default numeric one expect(getCell(0, 0).textContent).to.equal('formatted: 1'); }); + + // https://github.com/mui/mui-x/issues/13719 + it('should not crash when updating columns immediately after scrolling', function test() { + if (isJSDOM) { + this.skip(); // Needs layout + } + + const data = [ + { id: 1, value: 'A' }, + { id: 2, value: 'B' }, + { id: 3, value: 'C' }, + { id: 4, value: 'D' }, + { id: 5, value: 'E' }, + { id: 6, value: 'E' }, + { id: 7, value: 'F' }, + { id: 8, value: 'G' }, + { id: 9, value: 'H' }, + ]; + + function DynamicVirtualizationRange() { + const [cols, setCols] = React.useState([{ field: 'id' }, { field: 'value' }]); + + return ( +
+ +
+ +
+
+ ); + } + + render(); + + const virtualScroller = document.querySelector(`.${gridClasses.virtualScroller}`)!; + virtualScroller.scrollTop = 1_000; + virtualScroller.dispatchEvent(new Event('scroll')); + + fireEvent.click(screen.getByText('Update columns')); + }); }); diff --git a/packages/x-data-grid/src/tests/export.DataGrid.test.tsx b/packages/x-data-grid/src/tests/export.DataGrid.test.tsx index 0e6b3745103b..76852db95927 100644 --- a/packages/x-data-grid/src/tests/export.DataGrid.test.tsx +++ b/packages/x-data-grid/src/tests/export.DataGrid.test.tsx @@ -106,12 +106,12 @@ describe(' - Export', () => { expect(csv).to.equal( [ 'name', - "'=1+1", - "'+1+1", - "'-1+1", - "'@1+1", - "'\t1+1", - '"\r1+1"', + '"\'=1+1"', + '"\'+1+1"', + '"\'-1+1"', + '"\'@1+1"', + '"\'\t1+1"', + '"\'\r1+1"', '",=1+1"', '"value,=1+1"', ].join('\r\n'), diff --git a/packages/x-data-grid/src/utils/composeGridClasses.ts b/packages/x-data-grid/src/utils/composeGridClasses.ts new file mode 100644 index 000000000000..f3b5b9ac6285 --- /dev/null +++ b/packages/x-data-grid/src/utils/composeGridClasses.ts @@ -0,0 +1,10 @@ +import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import { getDataGridUtilityClass } from '../constants/gridClasses'; +import type { DataGridProcessedProps } from '../models/props/DataGridProps'; + +export function composeGridClasses( + classes: DataGridProcessedProps['classes'], + slots: Parameters[0], +) { + return composeClasses(slots, getDataGridUtilityClass, classes); +} diff --git a/packages/x-data-grid/src/utils/createSelector.ts b/packages/x-data-grid/src/utils/createSelector.ts index 7feb525a5a0a..647ed4283853 100644 --- a/packages/x-data-grid/src/utils/createSelector.ts +++ b/packages/x-data-grid/src/utils/createSelector.ts @@ -1,7 +1,7 @@ import * as React from 'react'; import { createSelector as reselectCreateSelector, Selector, SelectorResultArray } from 'reselect'; import type { GridCoreApi } from '../models/api/gridCoreApi'; -import { buildWarning } from './warning'; +import { warnOnce } from '../internals/utils/warning'; type CacheKey = { id: number }; @@ -38,11 +38,6 @@ type CreateSelectorFunction = >, R const cache = new WeakMap>(); -const missingInstanceIdWarning = buildWarning([ - 'MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', - 'To fix, call it with `apiRef`, for example `mySelector(apiRef)`, or pass the instance ID explicitly, for example `mySelector(state, apiRef.current.instanceId)`.', -]); - function checkIsAPIRef(value: any) { return 'current' in value && 'instanceId' in value.current; } @@ -135,12 +130,15 @@ export const createSelectorMemoized: CreateSelectorFunction = (...args: any) => const isAPIRef = checkIsAPIRef(stateOrApiRef); const cacheKey = isAPIRef ? stateOrApiRef.current.instanceId - : instanceId ?? DEFAULT_INSTANCE_ID; + : (instanceId ?? DEFAULT_INSTANCE_ID); const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef; if (process.env.NODE_ENV !== 'production') { if (cacheKey.id === 'default') { - missingInstanceIdWarning(); + warnOnce([ + 'MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', + 'To fix, call it with `apiRef`, for example `mySelector(apiRef)`, or pass the instance ID explicitly, for example `mySelector(state, apiRef.current.instanceId)`.', + ]); } } diff --git a/packages/x-data-grid/src/utils/platform.ts b/packages/x-data-grid/src/utils/platform.ts new file mode 100644 index 000000000000..eb6f9b7a3d3d --- /dev/null +++ b/packages/x-data-grid/src/utils/platform.ts @@ -0,0 +1,3 @@ +const userAgent = typeof navigator !== 'undefined' ? navigator.userAgent.toLowerCase() : 'empty'; + +export const isFirefox = userAgent.includes('firefox'); diff --git a/packages/x-data-grid/src/utils/warning.ts b/packages/x-data-grid/src/utils/warning.ts deleted file mode 100644 index f9eb314b2e76..000000000000 --- a/packages/x-data-grid/src/utils/warning.ts +++ /dev/null @@ -1,35 +0,0 @@ -export const buildWarning = ( - message: string | string[], - gravity: 'warning' | 'error' = 'warning', -) => { - let alreadyWarned = false; - - const cleanMessage = Array.isArray(message) ? message.join('\n') : message; - - return () => { - if (!alreadyWarned) { - alreadyWarned = true; - if (gravity === 'error') { - console.error(cleanMessage); - } else { - console.warn(cleanMessage); - } - } - }; -}; - -export const wrapWithWarningOnCall = ( - method: F, - message: string | string[], -) => { - if (process.env.NODE_ENV === 'production') { - return method; - } - - const warning = buildWarning(message); - - return (...args: any[]) => { - warning(); - return method(...args); - }; -}; diff --git a/packages/x-date-pickers-pro/package.json b/packages/x-date-pickers-pro/package.json index 871ef7396a28..45fc2a705a6b 100644 --- a/packages/x-date-pickers-pro/package.json +++ b/packages/x-date-pickers-pro/package.json @@ -1,6 +1,6 @@ { "name": "@mui/x-date-pickers-pro", - "version": "7.11.0", + "version": "7.11.1", "description": "The Pro plan edition of the Date and Time Picker components (MUI X).", "author": "MUI Team", "main": "src/index.ts", @@ -42,10 +42,9 @@ "directory": "packages/x-date-pickers-pro" }, "dependencies": { - "@babel/runtime": "^7.24.8", - "@mui/base": "^5.0.0-beta.40", - "@mui/system": "^5.16.2", - "@mui/utils": "^5.16.2", + "@babel/runtime": "^7.25.0", + "@mui/system": "^5.16.5", + "@mui/utils": "^5.16.5", "@mui/x-date-pickers": "workspace:*", "@mui/x-license": "workspace:*", "clsx": "^2.1.1", @@ -96,7 +95,7 @@ } }, "devDependencies": { - "@mui/internal-test-utils": "^1.0.4", + "@mui/internal-test-utils": "^1.0.5", "@types/luxon": "^3.4.2", "@types/prop-types": "^15.7.12", "date-fns": "^2.30.0", @@ -104,7 +103,7 @@ "dayjs": "^1.11.11", "luxon": "^3.4.4", "moment": "^2.30.1", - "rimraf": "^5.0.8" + "rimraf": "^5.0.9" }, "engines": { "node": ">=14.0.0" diff --git a/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.test.tsx b/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.test.tsx index 129d6c7ba2f2..1836534d0282 100644 --- a/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.test.tsx +++ b/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.test.tsx @@ -11,10 +11,10 @@ import { import { adapterToUse, buildPickerDragInteractions, - MockedDataTransfer, rangeCalendarDayTouches, createPickerRenderer, } from 'test/utils/pickers'; +import { MockedDataTransfer } from 'test/utils/dragAndDrop'; import { DateRangeCalendar, dateRangeCalendarClasses as classes, diff --git a/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.tsx b/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.tsx index 4d4e418bea87..3e0272ae130c 100644 --- a/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.tsx +++ b/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.tsx @@ -3,7 +3,8 @@ import PropTypes from 'prop-types'; import clsx from 'clsx'; import useEventCallback from '@mui/utils/useEventCallback'; import useMediaQuery from '@mui/material/useMediaQuery'; -import { resolveComponentProps, useSlotProps } from '@mui/base/utils'; +import resolveComponentProps from '@mui/utils/resolveComponentProps'; +import useSlotProps from '@mui/utils/useSlotProps'; import { styled, useThemeProps } from '@mui/material/styles'; import composeClasses from '@mui/utils/composeClasses'; import useId from '@mui/utils/useId'; @@ -21,7 +22,7 @@ import { PickerSelectionState, useNow, DEFAULT_DESKTOP_MODE_MEDIA_QUERY, - buildWarning, + warnOnce, useControlledValueWithTimezone, useViews, } from '@mui/x-date-pickers/internals'; @@ -77,11 +78,6 @@ const DateRangeCalendarMonthContainer = styled('div', { const weeksContainerHeight = (DAY_RANGE_SIZE + DAY_MARGIN * 2) * 6; -const warnInvalidCurrentMonthCalendarPosition = buildWarning([ - 'The `currentMonthCalendarPosition` prop must be an integer between `1` and the amount of calendars rendered.', - 'For example if you have 2 calendars rendered, it should be equal to either 1 or 2.', -]); - const DayCalendarForRange = styled(DayCalendar)(({ theme }) => ({ minWidth: 312, minHeight: weeksContainerHeight, @@ -506,7 +502,10 @@ const DateRangeCalendar = React.forwardRef(function DateRangeCalendar< const visibleMonths = React.useMemo(() => { if (process.env.NODE_ENV !== 'production') { if (currentMonthCalendarPosition > calendars || currentMonthCalendarPosition < 1) { - warnInvalidCurrentMonthCalendarPosition(); + warnOnce([ + 'MUI X: The `currentMonthCalendarPosition` prop must be an integer between `1` and the amount of calendars rendered.', + 'For example if you have 2 calendars rendered, it should be equal to either 1 or 2.', + ]); } } @@ -696,10 +695,12 @@ DateRangeCalendar.propTypes = { loading: PropTypes.bool, /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.types.ts b/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.types.ts index 7830eba35b47..ac56c4d44149 100644 --- a/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.types.ts +++ b/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.types.ts @@ -1,6 +1,6 @@ import * as React from 'react'; import { SxProps } from '@mui/system'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import { Theme } from '@mui/material/styles'; import { PickerValidDate, TimezoneProps } from '@mui/x-date-pickers/models'; import { diff --git a/packages/x-date-pickers-pro/src/DateRangePicker/DateRangePicker.tsx b/packages/x-date-pickers-pro/src/DateRangePicker/DateRangePicker.tsx index 237b8dc110df..7fa21dbb2ee8 100644 --- a/packages/x-date-pickers-pro/src/DateRangePicker/DateRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/DateRangePicker/DateRangePicker.tsx @@ -181,10 +181,12 @@ DateRangePicker.propTypes = { localeText: PropTypes.object, /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers-pro/src/DateRangePicker/DateRangePickerToolbar.tsx b/packages/x-date-pickers-pro/src/DateRangePicker/DateRangePickerToolbar.tsx index da4b3debfa1d..e712df988508 100644 --- a/packages/x-date-pickers-pro/src/DateRangePicker/DateRangePickerToolbar.tsx +++ b/packages/x-date-pickers-pro/src/DateRangePicker/DateRangePickerToolbar.tsx @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import clsx from 'clsx'; import Typography from '@mui/material/Typography'; import { styled, useThemeProps } from '@mui/material/styles'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { PickersToolbar, PickersToolbarButton, diff --git a/packages/x-date-pickers-pro/src/DateRangePickerDay/DateRangePickerDay.tsx b/packages/x-date-pickers-pro/src/DateRangePickerDay/DateRangePickerDay.tsx index a285918781a3..2c466c3680a0 100644 --- a/packages/x-date-pickers-pro/src/DateRangePickerDay/DateRangePickerDay.tsx +++ b/packages/x-date-pickers-pro/src/DateRangePickerDay/DateRangePickerDay.tsx @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import clsx from 'clsx'; import { useLicenseVerifier } from '@mui/x-license'; import { alpha, styled, useThemeProps } from '@mui/material/styles'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { useUtils } from '@mui/x-date-pickers/internals'; import { PickerValidDate } from '@mui/x-date-pickers/models'; import { PickersDay, PickersDayProps } from '@mui/x-date-pickers/PickersDay'; diff --git a/packages/x-date-pickers-pro/src/DateTimeRangePicker/DateTimeRangePicker.tsx b/packages/x-date-pickers-pro/src/DateTimeRangePicker/DateTimeRangePicker.tsx index 573a2317e277..4d94546246f8 100644 --- a/packages/x-date-pickers-pro/src/DateTimeRangePicker/DateTimeRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/DateTimeRangePicker/DateTimeRangePicker.tsx @@ -191,6 +191,7 @@ DateTimeRangePicker.propTypes = { localeText: PropTypes.object, /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** @@ -204,6 +205,7 @@ DateTimeRangePicker.propTypes = { maxTime: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers-pro/src/DateTimeRangePicker/DateTimeRangePickerToolbar.tsx b/packages/x-date-pickers-pro/src/DateTimeRangePicker/DateTimeRangePickerToolbar.tsx index 26816d573602..3d8c07b23c6f 100644 --- a/packages/x-date-pickers-pro/src/DateTimeRangePicker/DateTimeRangePickerToolbar.tsx +++ b/packages/x-date-pickers-pro/src/DateTimeRangePicker/DateTimeRangePickerToolbar.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import { styled, useThemeProps } from '@mui/material/styles'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { BaseToolbarProps, ExportedBaseToolbarProps, diff --git a/packages/x-date-pickers-pro/src/DesktopDateRangePicker/DesktopDateRangePicker.tsx b/packages/x-date-pickers-pro/src/DesktopDateRangePicker/DesktopDateRangePicker.tsx index f783f0caa865..1a583b12807b 100644 --- a/packages/x-date-pickers-pro/src/DesktopDateRangePicker/DesktopDateRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/DesktopDateRangePicker/DesktopDateRangePicker.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { extractValidationProps, PickerViewRendererLookup } from '@mui/x-date-pickers/internals'; import { PickerValidDate } from '@mui/x-date-pickers/models'; -import { resolveComponentProps } from '@mui/base/utils'; +import resolveComponentProps from '@mui/utils/resolveComponentProps'; import { refType } from '@mui/utils'; import { rangeValueManager } from '../internals/utils/valueManagers'; import { DesktopDateRangePickerProps } from './DesktopDateRangePicker.types'; @@ -216,10 +216,12 @@ DesktopDateRangePicker.propTypes = { localeText: PropTypes.object, /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers-pro/src/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.tsx b/packages/x-date-pickers-pro/src/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.tsx index d90ff4da876f..f3d52bc90d1f 100644 --- a/packages/x-date-pickers-pro/src/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.tsx @@ -11,7 +11,7 @@ import { useUtils, } from '@mui/x-date-pickers/internals'; import { PickerValidDate } from '@mui/x-date-pickers/models'; -import { resolveComponentProps } from '@mui/base/utils'; +import resolveComponentProps from '@mui/utils/resolveComponentProps'; import { refType } from '@mui/utils'; import { renderDigitalClockTimeView, @@ -359,6 +359,7 @@ DesktopDateTimeRangePicker.propTypes = { localeText: PropTypes.object, /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** @@ -372,6 +373,7 @@ DesktopDateTimeRangePicker.propTypes = { maxTime: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers-pro/src/MobileDateRangePicker/MobileDateRangePicker.tsx b/packages/x-date-pickers-pro/src/MobileDateRangePicker/MobileDateRangePicker.tsx index 0621f3a26f77..54558b1607ea 100644 --- a/packages/x-date-pickers-pro/src/MobileDateRangePicker/MobileDateRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/MobileDateRangePicker/MobileDateRangePicker.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { extractValidationProps, PickerViewRendererLookup } from '@mui/x-date-pickers/internals'; import { PickerValidDate } from '@mui/x-date-pickers/models'; -import { resolveComponentProps } from '@mui/base/utils'; +import resolveComponentProps from '@mui/utils/resolveComponentProps'; import { refType } from '@mui/utils'; import { rangeValueManager } from '../internals/utils/valueManagers'; import { MobileDateRangePickerProps } from './MobileDateRangePicker.types'; @@ -212,10 +212,12 @@ MobileDateRangePicker.propTypes = { localeText: PropTypes.object, /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers-pro/src/MobileDateTimeRangePicker/MobileDateTimeRangePicker.tsx b/packages/x-date-pickers-pro/src/MobileDateTimeRangePicker/MobileDateTimeRangePicker.tsx index 8586aa9e32cf..504484d7f344 100644 --- a/packages/x-date-pickers-pro/src/MobileDateTimeRangePicker/MobileDateTimeRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/MobileDateTimeRangePicker/MobileDateTimeRangePicker.tsx @@ -15,7 +15,7 @@ import { useUtils, } from '@mui/x-date-pickers/internals'; import { PickerValidDate } from '@mui/x-date-pickers/models'; -import { resolveComponentProps } from '@mui/base/utils'; +import resolveComponentProps from '@mui/utils/resolveComponentProps'; import { renderDigitalClockTimeView, renderMultiSectionDigitalClockTimeView, @@ -349,6 +349,7 @@ MobileDateTimeRangePicker.propTypes = { localeText: PropTypes.object, /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** @@ -362,6 +363,7 @@ MobileDateTimeRangePicker.propTypes = { maxTime: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers-pro/src/MultiInputDateRangeField/MultiInputDateRangeField.tsx b/packages/x-date-pickers-pro/src/MultiInputDateRangeField/MultiInputDateRangeField.tsx index 018b78837697..909fc6c29e7c 100644 --- a/packages/x-date-pickers-pro/src/MultiInputDateRangeField/MultiInputDateRangeField.tsx +++ b/packages/x-date-pickers-pro/src/MultiInputDateRangeField/MultiInputDateRangeField.tsx @@ -5,7 +5,7 @@ import Stack, { StackProps } from '@mui/material/Stack'; import MuiTextField from '@mui/material/TextField'; import Typography from '@mui/material/Typography'; import { styled, useThemeProps } from '@mui/material/styles'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import { unstable_composeClasses as composeClasses, unstable_generateUtilityClass as generateUtilityClass, @@ -252,10 +252,12 @@ MultiInputDateRangeField.propTypes = { formatDensity: PropTypes.oneOf(['dense', 'spacious']), /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers-pro/src/MultiInputDateRangeField/MultiInputDateRangeField.types.ts b/packages/x-date-pickers-pro/src/MultiInputDateRangeField/MultiInputDateRangeField.types.ts index e933812498ed..d70dd6ef8bb1 100644 --- a/packages/x-date-pickers-pro/src/MultiInputDateRangeField/MultiInputDateRangeField.types.ts +++ b/packages/x-date-pickers-pro/src/MultiInputDateRangeField/MultiInputDateRangeField.types.ts @@ -1,6 +1,6 @@ import * as React from 'react'; import { PickerValidDate } from '@mui/x-date-pickers/models'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import Typography from '@mui/material/Typography'; import Stack, { StackProps } from '@mui/material/Stack'; import TextField from '@mui/material/TextField'; diff --git a/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.tsx b/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.tsx index bdeca2c378b7..133685debe58 100644 --- a/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.tsx +++ b/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.tsx @@ -5,7 +5,7 @@ import Stack, { StackProps } from '@mui/material/Stack'; import MuiTextField from '@mui/material/TextField'; import Typography from '@mui/material/Typography'; import { styled, useThemeProps } from '@mui/material/styles'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import { unstable_composeClasses as composeClasses, unstable_generateUtilityClass as generateUtilityClass, @@ -261,6 +261,7 @@ MultiInputDateTimeRangeField.propTypes = { formatDensity: PropTypes.oneOf(['dense', 'spacious']), /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** @@ -274,6 +275,7 @@ MultiInputDateTimeRangeField.propTypes = { maxTime: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.ts b/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.ts index 6199fe64b64b..65f89beffb37 100644 --- a/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.ts +++ b/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import Typography from '@mui/material/Typography'; import Stack, { StackProps } from '@mui/material/Stack'; import TextField from '@mui/material/TextField'; diff --git a/packages/x-date-pickers-pro/src/MultiInputTimeRangeField/MultiInputTimeRangeField.tsx b/packages/x-date-pickers-pro/src/MultiInputTimeRangeField/MultiInputTimeRangeField.tsx index a92f6ca3675c..ee04099dff91 100644 --- a/packages/x-date-pickers-pro/src/MultiInputTimeRangeField/MultiInputTimeRangeField.tsx +++ b/packages/x-date-pickers-pro/src/MultiInputTimeRangeField/MultiInputTimeRangeField.tsx @@ -5,7 +5,7 @@ import Stack, { StackProps } from '@mui/material/Stack'; import MuiTextField from '@mui/material/TextField'; import Typography from '@mui/material/Typography'; import { styled, useThemeProps } from '@mui/material/styles'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import { unstable_composeClasses as composeClasses, unstable_generateUtilityClass as generateUtilityClass, diff --git a/packages/x-date-pickers-pro/src/MultiInputTimeRangeField/MultiInputTimeRangeField.types.ts b/packages/x-date-pickers-pro/src/MultiInputTimeRangeField/MultiInputTimeRangeField.types.ts index aaedafde0864..718b2728541d 100644 --- a/packages/x-date-pickers-pro/src/MultiInputTimeRangeField/MultiInputTimeRangeField.types.ts +++ b/packages/x-date-pickers-pro/src/MultiInputTimeRangeField/MultiInputTimeRangeField.types.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import Typography from '@mui/material/Typography'; import Stack, { StackProps } from '@mui/material/Stack'; import TextField from '@mui/material/TextField'; diff --git a/packages/x-date-pickers-pro/src/SingleInputDateRangeField/SingleInputDateRangeField.tsx b/packages/x-date-pickers-pro/src/SingleInputDateRangeField/SingleInputDateRangeField.tsx index 19713bd25d41..edc1e5b91b69 100644 --- a/packages/x-date-pickers-pro/src/SingleInputDateRangeField/SingleInputDateRangeField.tsx +++ b/packages/x-date-pickers-pro/src/SingleInputDateRangeField/SingleInputDateRangeField.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import MuiTextField from '@mui/material/TextField'; import { useThemeProps } from '@mui/material/styles'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import { refType } from '@mui/utils'; import { useClearableField } from '@mui/x-date-pickers/hooks'; import { convertFieldResponseIntoMuiTextFieldProps } from '@mui/x-date-pickers/internals'; @@ -203,10 +203,12 @@ SingleInputDateRangeField.propTypes = { margin: PropTypes.oneOf(['dense', 'none', 'normal']), /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers-pro/src/SingleInputDateRangeField/SingleInputDateRangeField.types.ts b/packages/x-date-pickers-pro/src/SingleInputDateRangeField/SingleInputDateRangeField.types.ts index 518f3373ed36..f9dc8c7a978f 100644 --- a/packages/x-date-pickers-pro/src/SingleInputDateRangeField/SingleInputDateRangeField.types.ts +++ b/packages/x-date-pickers-pro/src/SingleInputDateRangeField/SingleInputDateRangeField.types.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import TextField from '@mui/material/TextField'; import { UseFieldInternalProps } from '@mui/x-date-pickers/internals'; import { BuiltInFieldTextFieldProps, PickerValidDate } from '@mui/x-date-pickers/models'; diff --git a/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.tsx b/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.tsx index 1c87d69a63a2..57d0a57f3a91 100644 --- a/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.tsx +++ b/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.tsx @@ -5,7 +5,7 @@ import { convertFieldResponseIntoMuiTextFieldProps } from '@mui/x-date-pickers/i import { PickersTextField } from '@mui/x-date-pickers/PickersTextField'; import { useThemeProps } from '@mui/material/styles'; import { refType } from '@mui/utils'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import { useClearableField } from '@mui/x-date-pickers/hooks'; import { PickerValidDate } from '@mui/x-date-pickers/models'; import { SingleInputDateTimeRangeFieldProps } from './SingleInputDateTimeRangeField.types'; @@ -213,6 +213,7 @@ SingleInputDateTimeRangeField.propTypes = { margin: PropTypes.oneOf(['dense', 'none', 'normal']), /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** @@ -226,6 +227,7 @@ SingleInputDateTimeRangeField.propTypes = { maxTime: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.ts b/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.ts index 9e2e93d3323c..d67d6a040e48 100644 --- a/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.ts +++ b/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import TextField from '@mui/material/TextField'; import { UseFieldInternalProps } from '@mui/x-date-pickers/internals'; import { BuiltInFieldTextFieldProps, PickerValidDate } from '@mui/x-date-pickers/models'; diff --git a/packages/x-date-pickers-pro/src/SingleInputTimeRangeField/SingleInputTimeRangeField.tsx b/packages/x-date-pickers-pro/src/SingleInputTimeRangeField/SingleInputTimeRangeField.tsx index 8d483b9a2cfc..cd37622a001e 100644 --- a/packages/x-date-pickers-pro/src/SingleInputTimeRangeField/SingleInputTimeRangeField.tsx +++ b/packages/x-date-pickers-pro/src/SingleInputTimeRangeField/SingleInputTimeRangeField.tsx @@ -6,7 +6,7 @@ import { convertFieldResponseIntoMuiTextFieldProps } from '@mui/x-date-pickers/i import { PickerValidDate } from '@mui/x-date-pickers/models'; import { PickersTextField } from '@mui/x-date-pickers/PickersTextField'; import { useThemeProps } from '@mui/material/styles'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import { refType } from '@mui/utils'; import { SingleInputTimeRangeFieldProps } from './SingleInputTimeRangeField.types'; import { useSingleInputTimeRangeField } from './useSingleInputTimeRangeField'; diff --git a/packages/x-date-pickers-pro/src/SingleInputTimeRangeField/SingleInputTimeRangeField.types.ts b/packages/x-date-pickers-pro/src/SingleInputTimeRangeField/SingleInputTimeRangeField.types.ts index e6623980cc2a..93e4a1019b5f 100644 --- a/packages/x-date-pickers-pro/src/SingleInputTimeRangeField/SingleInputTimeRangeField.types.ts +++ b/packages/x-date-pickers-pro/src/SingleInputTimeRangeField/SingleInputTimeRangeField.types.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import TextField from '@mui/material/TextField'; import { UseFieldInternalProps } from '@mui/x-date-pickers/internals'; import { PickerValidDate, BuiltInFieldTextFieldProps } from '@mui/x-date-pickers/models'; diff --git a/packages/x-date-pickers-pro/src/StaticDateRangePicker/StaticDateRangePicker.tsx b/packages/x-date-pickers-pro/src/StaticDateRangePicker/StaticDateRangePicker.tsx index 5a68a35efe9a..74ff932d922d 100644 --- a/packages/x-date-pickers-pro/src/StaticDateRangePicker/StaticDateRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/StaticDateRangePicker/StaticDateRangePicker.tsx @@ -165,10 +165,12 @@ StaticDateRangePicker.propTypes = { localeText: PropTypes.object, /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers-pro/src/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.tsx b/packages/x-date-pickers-pro/src/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.tsx index 371cb6dfdcc8..cb635fdba2ca 100644 --- a/packages/x-date-pickers-pro/src/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import { useLicenseVerifier } from '@mui/x-license'; import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'; import { PickersLayout, PickersLayoutSlotProps } from '@mui/x-date-pickers/PickersLayout'; diff --git a/packages/x-date-pickers-pro/src/internals/hooks/useEnrichedRangePickerFieldProps.ts b/packages/x-date-pickers-pro/src/internals/hooks/useEnrichedRangePickerFieldProps.ts index dab1f11a3451..92161a1d50da 100644 --- a/packages/x-date-pickers-pro/src/internals/hooks/useEnrichedRangePickerFieldProps.ts +++ b/packages/x-date-pickers-pro/src/internals/hooks/useEnrichedRangePickerFieldProps.ts @@ -2,7 +2,8 @@ import * as React from 'react'; import Stack, { StackProps } from '@mui/material/Stack'; import Typography, { TypographyProps } from '@mui/material/Typography'; import TextField from '@mui/material/TextField'; -import { resolveComponentProps, SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; +import resolveComponentProps from '@mui/utils/resolveComponentProps'; import useEventCallback from '@mui/utils/useEventCallback'; import useForkRef from '@mui/utils/useForkRef'; import { diff --git a/packages/x-date-pickers-pro/src/internals/hooks/useMobileRangePicker/useMobileRangePicker.tsx b/packages/x-date-pickers-pro/src/internals/hooks/useMobileRangePicker/useMobileRangePicker.tsx index e10a45588e8e..8c0ff7404326 100644 --- a/packages/x-date-pickers-pro/src/internals/hooks/useMobileRangePicker/useMobileRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/internals/hooks/useMobileRangePicker/useMobileRangePicker.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import { useLicenseVerifier } from '@mui/x-license'; import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'; import { PickersLayout, PickersLayoutSlotProps } from '@mui/x-date-pickers/PickersLayout'; diff --git a/packages/x-date-pickers-pro/src/models/fields.ts b/packages/x-date-pickers-pro/src/models/fields.ts index 3f3b0c3d499b..169c946d77c3 100644 --- a/packages/x-date-pickers-pro/src/models/fields.ts +++ b/packages/x-date-pickers-pro/src/models/fields.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import { BaseFieldProps, UseFieldResponse } from '@mui/x-date-pickers/internals'; import { BaseSingleInputPickersTextFieldProps, diff --git a/packages/x-date-pickers/package.json b/packages/x-date-pickers/package.json index 3912e7e305c8..9bd1c74dae01 100644 --- a/packages/x-date-pickers/package.json +++ b/packages/x-date-pickers/package.json @@ -1,6 +1,6 @@ { "name": "@mui/x-date-pickers", - "version": "7.11.0", + "version": "7.11.1", "description": "The community edition of the Date and Time Picker components (MUI X).", "author": "MUI Team", "main": "src/index.ts", @@ -45,10 +45,9 @@ "directory": "packages/x-date-pickers" }, "dependencies": { - "@babel/runtime": "^7.24.8", - "@mui/base": "^5.0.0-beta.40", - "@mui/system": "^5.16.2", - "@mui/utils": "^5.16.2", + "@babel/runtime": "^7.25.0", + "@mui/system": "^5.16.5", + "@mui/utils": "^5.16.5", "@types/react-transition-group": "^4.4.10", "clsx": "^2.1.1", "prop-types": "^15.8.1", @@ -98,7 +97,7 @@ } }, "devDependencies": { - "@mui/internal-test-utils": "^1.0.4", + "@mui/internal-test-utils": "^1.0.5", "@types/luxon": "^3.4.2", "@types/moment-hijri": "^2.1.4", "@types/moment-jalaali": "^0.7.9", @@ -108,10 +107,10 @@ "dayjs": "^1.11.11", "luxon": "^3.4.4", "moment": "^2.30.1", - "moment-hijri": "^2.1.2", + "moment-hijri": "^2.30.0", "moment-jalaali": "^0.10.1", "moment-timezone": "^0.5.45", - "rimraf": "^5.0.8" + "rimraf": "^5.0.9" }, "engines": { "node": ">=14.0.0" diff --git a/packages/x-date-pickers/src/AdapterDateFns/AdapterDateFns.test.tsx b/packages/x-date-pickers/src/AdapterDateFns/AdapterDateFns.test.tsx index 130c14f28821..6f8301a14602 100644 --- a/packages/x-date-pickers/src/AdapterDateFns/AdapterDateFns.test.tsx +++ b/packages/x-date-pickers/src/AdapterDateFns/AdapterDateFns.test.tsx @@ -19,6 +19,14 @@ describe('', () => { }); describe('Adapter localization', () => { + describe('Default locale', () => { + const adapter = new AdapterDateFns(); + + it('getCurrentLocaleCode: should return locale code', () => { + expect(adapter.getCurrentLocaleCode()).to.equal('en-US'); + }); + }); + describe('English', () => { const adapter = new AdapterDateFns({ locale: enUS }); const date = adapter.date(TEST_DATE_ISO_STRING)!; diff --git a/packages/x-date-pickers/src/AdapterDateFns/AdapterDateFns.ts b/packages/x-date-pickers/src/AdapterDateFns/AdapterDateFns.ts index 9bc30bf3dddf..414637955b35 100644 --- a/packages/x-date-pickers/src/AdapterDateFns/AdapterDateFns.ts +++ b/packages/x-date-pickers/src/AdapterDateFns/AdapterDateFns.ts @@ -85,13 +85,16 @@ export class AdapterDateFns implements MuiPickersAdapter { constructor({ locale, formats }: AdapterOptions = {}) { - if (typeof addDays !== 'function') { - throw new Error( - [ - 'MUI: The `date-fns` package v3.x is not compatible with this adapter.', - 'Please, install v2.x of the package or use the `AdapterDateFnsV3` instead.', - ].join('\n'), - ); + /* istanbul ignore next */ + if (process.env.NODE_ENV !== 'production') { + if (typeof addDays !== 'function') { + throw new Error( + [ + 'MUI: The `date-fns` package v3.x is not compatible with this adapter.', + 'Please, install v2.x of the package or use the `AdapterDateFnsV3` instead.', + ].join('\n'), + ); + } } super({ locale: locale ?? defaultLocale, formats, longFormatters }); } diff --git a/packages/x-date-pickers/src/AdapterDateFnsBase/AdapterDateFnsBase.ts b/packages/x-date-pickers/src/AdapterDateFnsBase/AdapterDateFnsBase.ts index 5cd1018dd540..32f9f873d0aa 100644 --- a/packages/x-date-pickers/src/AdapterDateFnsBase/AdapterDateFnsBase.ts +++ b/packages/x-date-pickers/src/AdapterDateFnsBase/AdapterDateFnsBase.ts @@ -10,9 +10,9 @@ import { MakeRequired } from '../internals/models/helpers'; type DateFnsLocaleBase = { formatLong?: { - date?: any; - time?: any; - dateTime?: any; + date: (...args: Array) => any; + time: (...args: Array) => any; + dateTime: (...args: Array) => any; }; code?: string; }; @@ -115,7 +115,10 @@ type DateFnsAdapterBaseOptions = MakeRe AdapterOptions, 'locale' > & { - longFormatters: Record<'p' | 'P', (token: string, formatLong: any) => string>; + longFormatters: Record< + 'p' | 'P', + (token: string, formatLong: DateFnsLocaleBase['formatLong']) => string + >; lib?: string; }; @@ -212,19 +215,15 @@ export class AdapterDateFnsBase return value; }; - public getCurrentLocaleCode = () => { - return this.locale?.code || 'en-US'; + public getCurrentLocaleCode = (): string => { + // `code` is undefined only in `date-fns` types, but all locales have it + return this.locale.code!; }; // Note: date-fns input types are more lenient than this adapter, so we need to expose our more // strict signature and delegate to the more lenient signature. Otherwise, we have downstream type errors upon usage. public is12HourCycleInCurrentLocale = () => { - if (this.locale) { - return /a/.test(this.locale.formatLong!.time({ width: 'short' })); - } - - // By default, date-fns is using en-US locale with am/pm enabled - return true; + return /a/.test(this.locale.formatLong!.time({ width: 'short' })); }; public expandFormat = (format: string) => { diff --git a/packages/x-date-pickers/src/AdapterDateFnsJalali/AdapterDateFnsJalali.test.tsx b/packages/x-date-pickers/src/AdapterDateFnsJalali/AdapterDateFnsJalali.test.tsx index 916be6d43e29..b88d9390fced 100644 --- a/packages/x-date-pickers/src/AdapterDateFnsJalali/AdapterDateFnsJalali.test.tsx +++ b/packages/x-date-pickers/src/AdapterDateFnsJalali/AdapterDateFnsJalali.test.tsx @@ -16,6 +16,12 @@ describe('', () => { describeJalaliAdapter(AdapterDateFnsJalali, {}); describe('Adapter localization', () => { + it('getCurrentLocaleCode: should return locale code', () => { + const adapter = new AdapterDateFnsJalali({ locale: enUS }); + + expect(adapter.getCurrentLocaleCode()).to.equal('en-US'); + }); + it('Formatting', () => { const adapter = new AdapterDateFnsJalali(); diff --git a/packages/x-date-pickers/src/AdapterDateFnsJalali/AdapterDateFnsJalali.ts b/packages/x-date-pickers/src/AdapterDateFnsJalali/AdapterDateFnsJalali.ts index 99bd27d11cf1..6fc2d35761f9 100644 --- a/packages/x-date-pickers/src/AdapterDateFnsJalali/AdapterDateFnsJalali.ts +++ b/packages/x-date-pickers/src/AdapterDateFnsJalali/AdapterDateFnsJalali.ts @@ -126,13 +126,16 @@ export class AdapterDateFnsJalali implements MuiPickersAdapter { constructor({ locale, formats }: AdapterOptions = {}) { - if (typeof addDays !== 'function') { - throw new Error( - [ - 'MUI: The `date-fns-jalali` package v3.x is not compatible with this adapter.', - 'Please, install v2.x of the package or use the `AdapterDateFnsJalaliV3` instead.', - ].join('\n'), - ); + /* istanbul ignore next */ + if (process.env.NODE_ENV !== 'production') { + if (typeof addDays !== 'function') { + throw new Error( + [ + 'MUI: The `date-fns-jalali` package v3.x is not compatible with this adapter.', + 'Please, install v2.x of the package or use the `AdapterDateFnsJalaliV3` instead.', + ].join('\n'), + ); + } } super({ locale: locale ?? defaultLocale, @@ -152,10 +155,6 @@ export class AdapterDateFnsJalali return dateFnsParse(value, format, new Date(), { locale: this.locale }); }; - public getCurrentLocaleCode = (): string => { - return this.locale?.code || 'fa-IR'; - }; - public isValid = (value: Date | null): boolean => { if (value == null) { return false; diff --git a/packages/x-date-pickers/src/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.ts b/packages/x-date-pickers/src/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.ts index 2a74aa3c39bf..1dc566b74605 100644 --- a/packages/x-date-pickers/src/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.ts +++ b/packages/x-date-pickers/src/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.ts @@ -127,18 +127,21 @@ export class AdapterDateFnsJalali implements MuiPickersAdapter { constructor({ locale, formats }: AdapterOptions = {}) { - if (typeof addDays !== 'function') { - throw new Error( - [ - `MUI: The \`date-fns-jalali\` package v2.x is not compatible with this adapter.`, - 'Please, install v3.x of the package or use the `AdapterDateFnsJalali` instead.', - ].join('\n'), - ); - } - if (!longFormatters) { - throw new Error( - 'MUI: The minimum supported `date-fns-jalali` package version compatible with this adapter is `3.2.x`.', - ); + /* istanbul ignore next */ + if (process.env.NODE_ENV !== 'production') { + if (typeof addDays !== 'function') { + throw new Error( + [ + `MUI: The \`date-fns-jalali\` package v2.x is not compatible with this adapter.`, + 'Please, install v3.x of the package or use the `AdapterDateFnsJalali` instead.', + ].join('\n'), + ); + } + if (!longFormatters) { + throw new Error( + 'MUI: The minimum supported `date-fns-jalali` package version compatible with this adapter is `3.2.x`.', + ); + } } super({ locale: locale ?? defaultLocale, @@ -159,10 +162,6 @@ export class AdapterDateFnsJalali return dateFnsParse(value, format, new Date(), { locale: this.locale }); }; - public getCurrentLocaleCode = (): string => { - return this.locale?.code || 'fa-IR'; - }; - public isValid = (value: Date | null): boolean => { if (value == null) { return false; diff --git a/packages/x-date-pickers/src/AdapterDateFnsV3/AdapterDateFnsV3.ts b/packages/x-date-pickers/src/AdapterDateFnsV3/AdapterDateFnsV3.ts index a47b56c227d4..9c5332b9e1fe 100644 --- a/packages/x-date-pickers/src/AdapterDateFnsV3/AdapterDateFnsV3.ts +++ b/packages/x-date-pickers/src/AdapterDateFnsV3/AdapterDateFnsV3.ts @@ -87,18 +87,21 @@ export class AdapterDateFns implements MuiPickersAdapter { constructor({ locale, formats }: AdapterOptions = {}) { - if (typeof addDays !== 'function') { - throw new Error( - [ - `MUI: The \`date-fns\` package v2.x is not compatible with this adapter.`, - 'Please, install v3.x of the package or use the `AdapterDateFns` instead.', - ].join('\n'), - ); - } - if (!longFormatters) { - throw new Error( - 'MUI: The minimum supported `date-fns` package version compatible with this adapter is `3.2.x`.', - ); + /* istanbul ignore next */ + if (process.env.NODE_ENV !== 'production') { + if (typeof addDays !== 'function') { + throw new Error( + [ + `MUI: The \`date-fns\` package v2.x is not compatible with this adapter.`, + 'Please, install v3.x of the package or use the `AdapterDateFns` instead.', + ].join('\n'), + ); + } + if (!longFormatters) { + throw new Error( + 'MUI: The minimum supported `date-fns` package version compatible with this adapter is `3.2.x`.', + ); + } } super({ locale: locale ?? enUS, formats, longFormatters }); } diff --git a/packages/x-date-pickers/src/AdapterDayjs/AdapterDayjs.test.tsx b/packages/x-date-pickers/src/AdapterDayjs/AdapterDayjs.test.tsx index 6c9db0b98d11..dda1f5c56ab9 100644 --- a/packages/x-date-pickers/src/AdapterDayjs/AdapterDayjs.test.tsx +++ b/packages/x-date-pickers/src/AdapterDayjs/AdapterDayjs.test.tsx @@ -39,6 +39,17 @@ describe('', () => { }, }); + describe('Adapter timezone', () => { + it('setTimezone: should throw warning if no plugin is available', () => { + const modifiedAdapter = new AdapterDayjs(); + // @ts-ignore + modifiedAdapter.hasTimezonePlugin = () => false; + + const date = modifiedAdapter.date(TEST_DATE_ISO_STRING)!; + expect(() => modifiedAdapter.setTimezone(date, 'Europe/London')).to.throw(); + }); + }); + describe('Adapter localization', () => { describe('English', () => { const adapter = new AdapterDayjs({ locale: 'en' }); diff --git a/packages/x-date-pickers/src/AdapterDayjs/AdapterDayjs.ts b/packages/x-date-pickers/src/AdapterDayjs/AdapterDayjs.ts index 47221a9ac21b..1245f256ea80 100644 --- a/packages/x-date-pickers/src/AdapterDayjs/AdapterDayjs.ts +++ b/packages/x-date-pickers/src/AdapterDayjs/AdapterDayjs.ts @@ -13,7 +13,7 @@ import { PickersTimezone, DateBuilderReturnType, } from '../models'; -import { buildWarning } from '../internals/utils/warning'; +import { warnOnce } from '../internals/utils/warning'; defaultDayjs.extend(localizedFormatPlugin); defaultDayjs.extend(weekOfYearPlugin); @@ -22,13 +22,6 @@ defaultDayjs.extend(advancedFormatPlugin); type Constructor = (...args: Parameters) => Dayjs; -const localeNotFoundWarning = buildWarning([ - 'Your locale has not been found.', - 'Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale', - "Or you forget to import the locale from 'dayjs/locale/{localeUsed}'", - 'fallback on English locale', -]); - const formatTokenMap: FieldFormatTokenMap = { // Year YY: 'year', @@ -255,7 +248,15 @@ export class AdapterDayjs implements MuiPickersAdapter { let localeObject = locales[locale]; if (localeObject === undefined) { - localeNotFoundWarning(); + /* istanbul ignore next */ + if (process.env.NODE_ENV !== 'production') { + warnOnce([ + 'MUI X: Your locale has not been found.', + 'Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale.', + "Or you forget to import the locale from 'dayjs/locale/{localeUsed}'", + 'fallback on English locale.', + ]); + } localeObject = locales.en; } @@ -277,7 +278,7 @@ export class AdapterDayjs implements MuiPickersAdapter { if (timezone !== 'UTC') { const fixedValue = value.tz(this.cleanTimezone(timezone), true); // @ts-ignore - if ((fixedValue.$offset ?? 0) === (value.$offset ?? 0)) { + if (fixedValue.$offset === (value.$offset ?? 0)) { return value; } // Change only what is needed to avoid creating a new object with unwanted data diff --git a/packages/x-date-pickers/src/AdapterLuxon/AdapterLuxon.ts b/packages/x-date-pickers/src/AdapterLuxon/AdapterLuxon.ts index 066a0ab572b6..3fd21f704315 100644 --- a/packages/x-date-pickers/src/AdapterLuxon/AdapterLuxon.ts +++ b/packages/x-date-pickers/src/AdapterLuxon/AdapterLuxon.ts @@ -485,6 +485,7 @@ export class AdapterLuxon implements MuiPickersAdapter { }; public getWeekNumber = (value: DateTime) => { + /* istanbul ignore next */ return value.localWeekNumber ?? value.weekNumber; }; diff --git a/packages/x-date-pickers/src/AdapterMoment/AdapterMoment.ts b/packages/x-date-pickers/src/AdapterMoment/AdapterMoment.ts index 6550ba949aa7..57ba9986e51f 100644 --- a/packages/x-date-pickers/src/AdapterMoment/AdapterMoment.ts +++ b/packages/x-date-pickers/src/AdapterMoment/AdapterMoment.ts @@ -247,7 +247,7 @@ export class AdapterMoment implements MuiPickersAdapter { const cleanZone = timezone === 'default' ? // @ts-ignore - this.moment.defaultZone?.name ?? 'system' + (this.moment.defaultZone?.name ?? 'system') : timezone; if (cleanZone === 'system') { diff --git a/packages/x-date-pickers/src/AdapterMomentJalaali/AdapterMomentJalaali.ts b/packages/x-date-pickers/src/AdapterMomentJalaali/AdapterMomentJalaali.ts index 497cd0044f1c..435022269f28 100644 --- a/packages/x-date-pickers/src/AdapterMomentJalaali/AdapterMomentJalaali.ts +++ b/packages/x-date-pickers/src/AdapterMomentJalaali/AdapterMomentJalaali.ts @@ -228,6 +228,10 @@ export class AdapterMomentJalaali return value.jDate(); }; + public getDaysInMonth = (value: Moment) => { + return this.moment.jDaysInMonth(value.jYear(), value.jMonth()); + }; + public setYear = (value: Moment, year: number) => { return value.clone().jYear(year); }; diff --git a/packages/x-date-pickers/src/DateCalendar/DateCalendar.tsx b/packages/x-date-pickers/src/DateCalendar/DateCalendar.tsx index b64273eeeeb4..765f75bd9fbe 100644 --- a/packages/x-date-pickers/src/DateCalendar/DateCalendar.tsx +++ b/packages/x-date-pickers/src/DateCalendar/DateCalendar.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import { styled, useThemeProps } from '@mui/material/styles'; import { unstable_composeClasses as composeClasses, @@ -472,10 +472,12 @@ DateCalendar.propTypes = { loading: PropTypes.bool, /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers/src/DateCalendar/DateCalendar.types.ts b/packages/x-date-pickers/src/DateCalendar/DateCalendar.types.ts index a2f496173a7f..7189f354b50f 100644 --- a/packages/x-date-pickers/src/DateCalendar/DateCalendar.types.ts +++ b/packages/x-date-pickers/src/DateCalendar/DateCalendar.types.ts @@ -1,7 +1,7 @@ import * as React from 'react'; import { SxProps } from '@mui/system'; import { Theme } from '@mui/material/styles'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import { PickersCalendarHeader, PickersCalendarHeaderProps, diff --git a/packages/x-date-pickers/src/DateCalendar/DayCalendar.tsx b/packages/x-date-pickers/src/DateCalendar/DayCalendar.tsx index 5c06161d17c1..f1a173e45249 100644 --- a/packages/x-date-pickers/src/DateCalendar/DayCalendar.tsx +++ b/packages/x-date-pickers/src/DateCalendar/DayCalendar.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import useEventCallback from '@mui/utils/useEventCallback'; import Typography from '@mui/material/Typography'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import { useRtl } from '@mui/system/RtlProvider'; import { styled, useThemeProps } from '@mui/material/styles'; import { diff --git a/packages/x-date-pickers/src/DateField/DateField.tsx b/packages/x-date-pickers/src/DateField/DateField.tsx index 5e242f80b992..5f707a99d31a 100644 --- a/packages/x-date-pickers/src/DateField/DateField.tsx +++ b/packages/x-date-pickers/src/DateField/DateField.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import MuiTextField from '@mui/material/TextField'; import { useThemeProps } from '@mui/material/styles'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import { refType } from '@mui/utils'; import { DateFieldProps } from './DateField.types'; import { useDateField } from './useDateField'; @@ -195,10 +195,12 @@ DateField.propTypes = { margin: PropTypes.oneOf(['dense', 'none', 'normal']), /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers/src/DateField/DateField.types.ts b/packages/x-date-pickers/src/DateField/DateField.types.ts index ef75f2b56090..cf1bdfcc800a 100644 --- a/packages/x-date-pickers/src/DateField/DateField.types.ts +++ b/packages/x-date-pickers/src/DateField/DateField.types.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import TextField from '@mui/material/TextField'; import { ExportedUseClearableFieldProps, diff --git a/packages/x-date-pickers/src/DateField/tests/editing.DateField.test.tsx b/packages/x-date-pickers/src/DateField/tests/editing.DateField.test.tsx index d68fab6c666c..7c6ac2b0a0bc 100644 --- a/packages/x-date-pickers/src/DateField/tests/editing.DateField.test.tsx +++ b/packages/x-date-pickers/src/DateField/tests/editing.DateField.test.tsx @@ -744,6 +744,63 @@ describe(' - Editing', () => { }); }); + describeAdapters('Disabled field', DateField, ({ renderWithProps }) => { + it('should not allow key editing on disabled field', () => { + // Test with v7 input + const onChangeV7 = spy(); + const v7Response = renderWithProps({ + enableAccessibleFieldDOMStructure: true, + onChange: onChangeV7, + disabled: true, + }); + + const keys = [ + 'ArrowUp', + 'ArrowDown', + 'PageUp', + 'PageDown', + 'Home', + 'End', + 'Delete', + 'ArrowLeft', + 'ArrowRight', + ]; + + v7Response.selectSection('month'); + + keys.forEach((key) => { + v7Response.pressKey(0, key); + expectFieldValueV7(v7Response.getSectionsContainer(), 'MM/DD/YYYY'); + expect(onChangeV7.callCount).to.equal(0); + }); + + // digit key press + userEvent.keyPress(v7Response.getActiveSection(0), { key: '2' }); + expectFieldValueV7(v7Response.getSectionsContainer(), 'MM/DD/YYYY'); + + v7Response.unmount(); + + // Test with v6 input + const onChangeV6 = spy(); + const v6Response = renderWithProps({ + onChange: onChangeV6, + enableAccessibleFieldDOMStructure: false, + disabled: true, + }); + + const input = getTextbox(); + v6Response.selectSection('month'); + + // v6 doesn't allow focusing on sections when disabled + keys.forEach((key) => { + fireEvent.change(input, { target: { value: key } }); + expect(document.activeElement).not.to.equal(input); + expectFieldValueV6(input, ''); + }); + expect(onChangeV6.callCount).to.equal(0); + }); + }); + describeAdapters('Digit editing', DateField, ({ adapter, testFieldChange, renderWithProps }) => { it('should set the day to the digit pressed when no digit no value is provided', () => { testFieldChange({ @@ -1743,6 +1800,43 @@ describe(' - Editing', () => { fireEvent.change(input, { target: { value: '2/05/2018' } }); // check that the search query has been cleared after pasting expectFieldValueV6(input, '02/05/2018'); // If internal state is not reset it would be 12 instead of 02 }); + + it('should not allow pasting on disabled field', () => { + // Test with v7 input + const onChangeV7 = spy(); + const v7Response = renderWithProps({ + enableAccessibleFieldDOMStructure: true, + onChange: onChangeV7, + disabled: true, + }); + + v7Response.selectSection('month'); + + // Select all sections + fireEvent.keyDown(v7Response.getActiveSection(0), { key: 'a', ctrlKey: true }); + + firePasteEventV7(v7Response.getSectionsContainer(), '09/16/2022'); + expect(onChangeV7.callCount).to.equal(0); + expectFieldValueV7(v7Response.getSectionsContainer(), 'MM/DD/YYYY'); + + v7Response.unmount(); + + // Test with v6 input + const onChangeV6 = spy(); + const v6Response = renderWithProps({ + onChange: onChangeV6, + enableAccessibleFieldDOMStructure: false, + disabled: true, + }); + const input = getTextbox(); + v6Response.selectSection('month'); + firePasteEventV6(input, '9'); + + // v6 doesn't allow focusing on sections when disabled + expect(document.activeElement).not.to.equal(input); + expect(onChangeV6.callCount).to.equal(0); + expectFieldValueV6(input, ''); + }); }); describeAdapters( diff --git a/packages/x-date-pickers/src/DatePicker/DatePicker.tsx b/packages/x-date-pickers/src/DatePicker/DatePicker.tsx index f65788a14bc0..e93c88833ba4 100644 --- a/packages/x-date-pickers/src/DatePicker/DatePicker.tsx +++ b/packages/x-date-pickers/src/DatePicker/DatePicker.tsx @@ -154,10 +154,12 @@ DatePicker.propTypes = { localeText: PropTypes.object, /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers/src/DatePicker/DatePickerToolbar.tsx b/packages/x-date-pickers/src/DatePicker/DatePickerToolbar.tsx index 46c31a964c5d..e90974b9ac84 100644 --- a/packages/x-date-pickers/src/DatePicker/DatePickerToolbar.tsx +++ b/packages/x-date-pickers/src/DatePicker/DatePickerToolbar.tsx @@ -3,7 +3,7 @@ import clsx from 'clsx'; import PropTypes from 'prop-types'; import Typography from '@mui/material/Typography'; import { styled, useThemeProps } from '@mui/material/styles'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { PickersToolbar } from '../internals/components/PickersToolbar'; import { usePickersTranslations } from '../hooks/usePickersTranslations'; import { useUtils } from '../internals/hooks/useUtils'; diff --git a/packages/x-date-pickers/src/DateTimeField/DateTimeField.tsx b/packages/x-date-pickers/src/DateTimeField/DateTimeField.tsx index e0e3bb78b356..44db7bb3fb50 100644 --- a/packages/x-date-pickers/src/DateTimeField/DateTimeField.tsx +++ b/packages/x-date-pickers/src/DateTimeField/DateTimeField.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import MuiTextField from '@mui/material/TextField'; import { useThemeProps } from '@mui/material/styles'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import { refType } from '@mui/utils'; import { DateTimeFieldProps } from './DateTimeField.types'; import { useDateTimeField } from './useDateTimeField'; @@ -205,6 +205,7 @@ DateTimeField.propTypes = { margin: PropTypes.oneOf(['dense', 'none', 'normal']), /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** @@ -218,6 +219,7 @@ DateTimeField.propTypes = { maxTime: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers/src/DateTimeField/DateTimeField.types.ts b/packages/x-date-pickers/src/DateTimeField/DateTimeField.types.ts index 4f6301f55c08..625f70532e55 100644 --- a/packages/x-date-pickers/src/DateTimeField/DateTimeField.types.ts +++ b/packages/x-date-pickers/src/DateTimeField/DateTimeField.types.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import TextField from '@mui/material/TextField'; import { DateTimeValidationError, diff --git a/packages/x-date-pickers/src/DateTimePicker/DateTimePicker.tsx b/packages/x-date-pickers/src/DateTimePicker/DateTimePicker.tsx index f931e2606cd4..a8126e9c5474 100644 --- a/packages/x-date-pickers/src/DateTimePicker/DateTimePicker.tsx +++ b/packages/x-date-pickers/src/DateTimePicker/DateTimePicker.tsx @@ -169,6 +169,7 @@ DateTimePicker.propTypes = { localeText: PropTypes.object, /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** @@ -182,6 +183,7 @@ DateTimePicker.propTypes = { maxTime: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers/src/DayCalendarSkeleton/DayCalendarSkeleton.tsx b/packages/x-date-pickers/src/DayCalendarSkeleton/DayCalendarSkeleton.tsx index c6bfb2ae1f11..a42de4d0dc78 100644 --- a/packages/x-date-pickers/src/DayCalendarSkeleton/DayCalendarSkeleton.tsx +++ b/packages/x-date-pickers/src/DayCalendarSkeleton/DayCalendarSkeleton.tsx @@ -4,7 +4,7 @@ import clsx from 'clsx'; import Skeleton from '@mui/material/Skeleton'; import { styled, useThemeProps, Theme } from '@mui/material/styles'; import { SxProps } from '@mui/system'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { DAY_SIZE, DAY_MARGIN } from '../internals/constants/dimensions'; import { DayCalendarSkeletonClasses, diff --git a/packages/x-date-pickers/src/DesktopDatePicker/DesktopDatePicker.tsx b/packages/x-date-pickers/src/DesktopDatePicker/DesktopDatePicker.tsx index ef7bc618e178..5e0c6e75ae8a 100644 --- a/packages/x-date-pickers/src/DesktopDatePicker/DesktopDatePicker.tsx +++ b/packages/x-date-pickers/src/DesktopDatePicker/DesktopDatePicker.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import { resolveComponentProps } from '@mui/base/utils'; +import resolveComponentProps from '@mui/utils/resolveComponentProps'; import { refType } from '@mui/utils'; import { singleItemValueManager } from '../internals/utils/valueManagers'; import { DesktopDatePickerProps } from './DesktopDatePicker.types'; @@ -199,10 +199,12 @@ DesktopDatePicker.propTypes = { localeText: PropTypes.object, /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers/src/DesktopDateTimePicker/DesktopDateTimePicker.tsx b/packages/x-date-pickers/src/DesktopDateTimePicker/DesktopDateTimePicker.tsx index 42695c7bb8e0..f728453aa5ae 100644 --- a/packages/x-date-pickers/src/DesktopDateTimePicker/DesktopDateTimePicker.tsx +++ b/packages/x-date-pickers/src/DesktopDateTimePicker/DesktopDateTimePicker.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import { resolveComponentProps } from '@mui/base/utils'; +import resolveComponentProps from '@mui/utils/resolveComponentProps'; import { refType } from '@mui/utils'; import Divider from '@mui/material/Divider'; import { singleItemValueManager } from '../internals/utils/valueManagers'; @@ -350,6 +350,7 @@ DesktopDateTimePicker.propTypes = { localeText: PropTypes.object, /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** @@ -363,6 +364,7 @@ DesktopDateTimePicker.propTypes = { maxTime: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers/src/DesktopTimePicker/DesktopTimePicker.tsx b/packages/x-date-pickers/src/DesktopTimePicker/DesktopTimePicker.tsx index 63a21269ac3b..31232c0cfb7e 100644 --- a/packages/x-date-pickers/src/DesktopTimePicker/DesktopTimePicker.tsx +++ b/packages/x-date-pickers/src/DesktopTimePicker/DesktopTimePicker.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import { resolveComponentProps } from '@mui/base/utils'; +import resolveComponentProps from '@mui/utils/resolveComponentProps'; import { refType } from '@mui/utils'; import { singleItemValueManager } from '../internals/utils/valueManagers'; import { TimeField } from '../TimeField'; diff --git a/packages/x-date-pickers/src/DigitalClock/DigitalClock.tsx b/packages/x-date-pickers/src/DigitalClock/DigitalClock.tsx index 81d214a13049..e2e2c7558540 100644 --- a/packages/x-date-pickers/src/DigitalClock/DigitalClock.tsx +++ b/packages/x-date-pickers/src/DigitalClock/DigitalClock.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import clsx from 'clsx'; import PropTypes from 'prop-types'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import { alpha, styled, useThemeProps } from '@mui/material/styles'; import useEventCallback from '@mui/utils/useEventCallback'; import composeClasses from '@mui/utils/composeClasses'; diff --git a/packages/x-date-pickers/src/DigitalClock/DigitalClock.types.ts b/packages/x-date-pickers/src/DigitalClock/DigitalClock.types.ts index 7b98c84670d6..3d5910de62db 100644 --- a/packages/x-date-pickers/src/DigitalClock/DigitalClock.types.ts +++ b/packages/x-date-pickers/src/DigitalClock/DigitalClock.types.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import MenuItem from '@mui/material/MenuItem'; import { DigitalClockClasses } from './digitalClockClasses'; import { diff --git a/packages/x-date-pickers/src/LocalizationProvider/LocalizationProvider.tsx b/packages/x-date-pickers/src/LocalizationProvider/LocalizationProvider.tsx index 230d00084b76..9e177e149985 100644 --- a/packages/x-date-pickers/src/LocalizationProvider/LocalizationProvider.tsx +++ b/packages/x-date-pickers/src/LocalizationProvider/LocalizationProvider.tsx @@ -133,8 +133,8 @@ export const LocalizationProvider = function LocalizationProvider< } return { - minDate: utils.date('1900-01-01T00:00:00.000')!, - maxDate: utils.date('2099-12-31T00:00:00.000')!, + minDate: utils.date('1900-01-01T00:00:00.000'), + maxDate: utils.date('2099-12-31T00:00:00.000'), }; }, [utils]); diff --git a/packages/x-date-pickers/src/MobileDatePicker/MobileDatePicker.tsx b/packages/x-date-pickers/src/MobileDatePicker/MobileDatePicker.tsx index 870bee0911cf..5f33b9a15dcf 100644 --- a/packages/x-date-pickers/src/MobileDatePicker/MobileDatePicker.tsx +++ b/packages/x-date-pickers/src/MobileDatePicker/MobileDatePicker.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import { resolveComponentProps } from '@mui/base/utils'; +import resolveComponentProps from '@mui/utils/resolveComponentProps'; import { refType } from '@mui/utils'; import { useMobilePicker } from '../internals/hooks/useMobilePicker'; import { MobileDatePickerProps } from './MobileDatePicker.types'; @@ -196,10 +196,12 @@ MobileDatePicker.propTypes = { localeText: PropTypes.object, /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers/src/MobileDateTimePicker/MobileDateTimePicker.tsx b/packages/x-date-pickers/src/MobileDateTimePicker/MobileDateTimePicker.tsx index 8c4aa9ac36e2..50ab45e2b37f 100644 --- a/packages/x-date-pickers/src/MobileDateTimePicker/MobileDateTimePicker.tsx +++ b/packages/x-date-pickers/src/MobileDateTimePicker/MobileDateTimePicker.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import { resolveComponentProps } from '@mui/base/utils'; +import resolveComponentProps from '@mui/utils/resolveComponentProps'; import { refType } from '@mui/utils'; import { singleItemValueManager } from '../internals/utils/valueManagers'; import { DateTimeField } from '../DateTimeField'; @@ -226,6 +226,7 @@ MobileDateTimePicker.propTypes = { localeText: PropTypes.object, /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** @@ -239,6 +240,7 @@ MobileDateTimePicker.propTypes = { maxTime: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers/src/MobileTimePicker/MobileTimePicker.tsx b/packages/x-date-pickers/src/MobileTimePicker/MobileTimePicker.tsx index 159260767130..021ec100c680 100644 --- a/packages/x-date-pickers/src/MobileTimePicker/MobileTimePicker.tsx +++ b/packages/x-date-pickers/src/MobileTimePicker/MobileTimePicker.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import { resolveComponentProps } from '@mui/base/utils'; +import resolveComponentProps from '@mui/utils/resolveComponentProps'; import { refType } from '@mui/utils'; import { singleItemValueManager } from '../internals/utils/valueManagers'; import { TimeField } from '../TimeField'; diff --git a/packages/x-date-pickers/src/MonthCalendar/MonthCalendar.tsx b/packages/x-date-pickers/src/MonthCalendar/MonthCalendar.tsx index 0668c0f57a60..8dd82e718275 100644 --- a/packages/x-date-pickers/src/MonthCalendar/MonthCalendar.tsx +++ b/packages/x-date-pickers/src/MonthCalendar/MonthCalendar.tsx @@ -343,10 +343,12 @@ MonthCalendar.propTypes = { hasFocus: PropTypes.bool, /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers/src/MonthCalendar/PickersMonth.tsx b/packages/x-date-pickers/src/MonthCalendar/PickersMonth.tsx index 33e457bcb1a6..9c1bcf3bcf3d 100644 --- a/packages/x-date-pickers/src/MonthCalendar/PickersMonth.tsx +++ b/packages/x-date-pickers/src/MonthCalendar/PickersMonth.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import clsx from 'clsx'; import { styled, alpha, useThemeProps } from '@mui/material/styles'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import composeClasses from '@mui/utils/composeClasses'; import useEnhancedEffect from '@mui/utils/useEnhancedEffect'; import { diff --git a/packages/x-date-pickers/src/MultiSectionDigitalClock/MultiSectionDigitalClock.types.ts b/packages/x-date-pickers/src/MultiSectionDigitalClock/MultiSectionDigitalClock.types.ts index 31f2ac1d1d73..e7efd1b3a350 100644 --- a/packages/x-date-pickers/src/MultiSectionDigitalClock/MultiSectionDigitalClock.types.ts +++ b/packages/x-date-pickers/src/MultiSectionDigitalClock/MultiSectionDigitalClock.types.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import MenuItem from '@mui/material/MenuItem'; import { MultiSectionDigitalClockClasses } from './multiSectionDigitalClockClasses'; import { diff --git a/packages/x-date-pickers/src/PickersCalendarHeader/PickersCalendarHeader.tsx b/packages/x-date-pickers/src/PickersCalendarHeader/PickersCalendarHeader.tsx index 8bc20e9e3309..84cdf31ad41d 100644 --- a/packages/x-date-pickers/src/PickersCalendarHeader/PickersCalendarHeader.tsx +++ b/packages/x-date-pickers/src/PickersCalendarHeader/PickersCalendarHeader.tsx @@ -3,8 +3,8 @@ import PropTypes from 'prop-types'; import clsx from 'clsx'; import Fade from '@mui/material/Fade'; import { styled, useThemeProps } from '@mui/material/styles'; -import { useSlotProps } from '@mui/base/utils'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; +import composeClasses from '@mui/utils/composeClasses'; import IconButton from '@mui/material/IconButton'; import { usePickersTranslations } from '../hooks/usePickersTranslations'; import { useUtils } from '../internals/hooks/useUtils'; diff --git a/packages/x-date-pickers/src/PickersCalendarHeader/PickersCalendarHeader.types.ts b/packages/x-date-pickers/src/PickersCalendarHeader/PickersCalendarHeader.types.ts index 8effea890681..87c37e46afa0 100644 --- a/packages/x-date-pickers/src/PickersCalendarHeader/PickersCalendarHeader.types.ts +++ b/packages/x-date-pickers/src/PickersCalendarHeader/PickersCalendarHeader.types.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import IconButton from '@mui/material/IconButton'; import SvgIcon from '@mui/material/SvgIcon'; import { SxProps, Theme } from '@mui/material/styles'; diff --git a/packages/x-date-pickers/src/PickersLayout/PickersLayout.tsx b/packages/x-date-pickers/src/PickersLayout/PickersLayout.tsx index dd899cdf44d0..a61368d59aa9 100644 --- a/packages/x-date-pickers/src/PickersLayout/PickersLayout.tsx +++ b/packages/x-date-pickers/src/PickersLayout/PickersLayout.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import { styled, useThemeProps } from '@mui/material/styles'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { PickersLayoutProps } from './PickersLayout.types'; import { pickersLayoutClasses, getPickersLayoutUtilityClass } from './pickersLayoutClasses'; import usePickerLayout from './usePickerLayout'; diff --git a/packages/x-date-pickers/src/PickersLayout/PickersLayout.types.ts b/packages/x-date-pickers/src/PickersLayout/PickersLayout.types.ts index d68ca961c2eb..69a3fac2cdc2 100644 --- a/packages/x-date-pickers/src/PickersLayout/PickersLayout.types.ts +++ b/packages/x-date-pickers/src/PickersLayout/PickersLayout.types.ts @@ -1,6 +1,6 @@ import * as React from 'react'; import { SxProps, Theme } from '@mui/material/styles'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import { PickersActionBar, PickersActionBarProps } from '../PickersActionBar'; import { BaseToolbarProps, ExportedBaseToolbarProps } from '../internals/models/props/toolbar'; import { BaseTabsProps, ExportedBaseTabsProps } from '../internals/models/props/tabs'; diff --git a/packages/x-date-pickers/src/PickersLayout/usePickerLayout.tsx b/packages/x-date-pickers/src/PickersLayout/usePickerLayout.tsx index 561d73fec586..e9fab40f161f 100644 --- a/packages/x-date-pickers/src/PickersLayout/usePickerLayout.tsx +++ b/packages/x-date-pickers/src/PickersLayout/usePickerLayout.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { useSlotProps } from '@mui/base/utils'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; +import composeClasses from '@mui/utils/composeClasses'; import { PickersActionBar, PickersActionBarAction } from '../PickersActionBar'; import { PickersLayoutProps, SubComponents } from './PickersLayout.types'; import { getPickersLayoutUtilityClass } from './pickersLayoutClasses'; diff --git a/packages/x-date-pickers/src/PickersSectionList/PickersSectionList.tsx b/packages/x-date-pickers/src/PickersSectionList/PickersSectionList.tsx index c9aaac3716cb..ada0fed9cd07 100644 --- a/packages/x-date-pickers/src/PickersSectionList/PickersSectionList.tsx +++ b/packages/x-date-pickers/src/PickersSectionList/PickersSectionList.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import composeClasses from '@mui/utils/composeClasses'; import useForkRef from '@mui/utils/useForkRef'; import { styled, useThemeProps } from '@mui/material/styles'; diff --git a/packages/x-date-pickers/src/PickersSectionList/PickersSectionList.types.ts b/packages/x-date-pickers/src/PickersSectionList/PickersSectionList.types.ts index 179fbb03807b..99781b259a84 100644 --- a/packages/x-date-pickers/src/PickersSectionList/PickersSectionList.types.ts +++ b/packages/x-date-pickers/src/PickersSectionList/PickersSectionList.types.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import { PickersSectionListClasses } from './pickersSectionListClasses'; export interface PickersSectionListSlots { diff --git a/packages/x-date-pickers/src/PickersTextField/PickersInputBase/PickersInputBase.tsx b/packages/x-date-pickers/src/PickersTextField/PickersInputBase/PickersInputBase.tsx index 7c118ea29b1a..e7813d3adbf8 100644 --- a/packages/x-date-pickers/src/PickersTextField/PickersInputBase/PickersInputBase.tsx +++ b/packages/x-date-pickers/src/PickersTextField/PickersInputBase/PickersInputBase.tsx @@ -6,7 +6,7 @@ import useForkRef from '@mui/utils/useForkRef'; import { refType } from '@mui/utils'; import composeClasses from '@mui/utils/composeClasses'; import capitalize from '@mui/utils/capitalize'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import visuallyHidden from '@mui/utils/visuallyHidden'; import { useRtl } from '@mui/system/RtlProvider'; import { diff --git a/packages/x-date-pickers/src/StaticDatePicker/StaticDatePicker.tsx b/packages/x-date-pickers/src/StaticDatePicker/StaticDatePicker.tsx index 7fcb43423bc9..7482205b4b95 100644 --- a/packages/x-date-pickers/src/StaticDatePicker/StaticDatePicker.tsx +++ b/packages/x-date-pickers/src/StaticDatePicker/StaticDatePicker.tsx @@ -138,10 +138,12 @@ StaticDatePicker.propTypes = { localeText: PropTypes.object, /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers/src/StaticDateTimePicker/StaticDateTimePicker.tsx b/packages/x-date-pickers/src/StaticDateTimePicker/StaticDateTimePicker.tsx index a8e81bcbd303..01dd868201d1 100644 --- a/packages/x-date-pickers/src/StaticDateTimePicker/StaticDateTimePicker.tsx +++ b/packages/x-date-pickers/src/StaticDateTimePicker/StaticDateTimePicker.tsx @@ -167,6 +167,7 @@ StaticDateTimePicker.propTypes = { localeText: PropTypes.object, /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** @@ -180,6 +181,7 @@ StaticDateTimePicker.propTypes = { maxTime: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers/src/TimeClock/ClockNumber.tsx b/packages/x-date-pickers/src/TimeClock/ClockNumber.tsx index bab778903644..c407a02a7adf 100644 --- a/packages/x-date-pickers/src/TimeClock/ClockNumber.tsx +++ b/packages/x-date-pickers/src/TimeClock/ClockNumber.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import clsx from 'clsx'; import { styled, useThemeProps } from '@mui/material/styles'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { CLOCK_WIDTH, CLOCK_HOUR_WIDTH } from './shared'; import { ClockNumberClasses, diff --git a/packages/x-date-pickers/src/TimeClock/ClockPointer.tsx b/packages/x-date-pickers/src/TimeClock/ClockPointer.tsx index 735b228846ec..db50723091b6 100644 --- a/packages/x-date-pickers/src/TimeClock/ClockPointer.tsx +++ b/packages/x-date-pickers/src/TimeClock/ClockPointer.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import clsx from 'clsx'; import { styled, useThemeProps } from '@mui/material/styles'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { CLOCK_WIDTH, CLOCK_HOUR_WIDTH } from './shared'; import { TimeView } from '../models'; import { ClockPointerClasses, getClockPointerUtilityClass } from './clockPointerClasses'; diff --git a/packages/x-date-pickers/src/TimeField/TimeField.tsx b/packages/x-date-pickers/src/TimeField/TimeField.tsx index da1ecf38b3f8..10d4918133ed 100644 --- a/packages/x-date-pickers/src/TimeField/TimeField.tsx +++ b/packages/x-date-pickers/src/TimeField/TimeField.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import MuiTextField from '@mui/material/TextField'; import { useThemeProps } from '@mui/material/styles'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import { refType } from '@mui/utils'; import { TimeFieldProps } from './TimeField.types'; import { useTimeField } from './useTimeField'; diff --git a/packages/x-date-pickers/src/TimeField/TimeField.types.ts b/packages/x-date-pickers/src/TimeField/TimeField.types.ts index 0633093cf7f5..478cf08ee9ee 100644 --- a/packages/x-date-pickers/src/TimeField/TimeField.types.ts +++ b/packages/x-date-pickers/src/TimeField/TimeField.types.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import TextField from '@mui/material/TextField'; import { UseFieldInternalProps } from '../internals/hooks/useField'; import { MakeOptional } from '../internals/models/helpers'; diff --git a/packages/x-date-pickers/src/TimePicker/TimePickerToolbar.tsx b/packages/x-date-pickers/src/TimePicker/TimePickerToolbar.tsx index ef2d545cfad0..6bc310619603 100644 --- a/packages/x-date-pickers/src/TimePicker/TimePickerToolbar.tsx +++ b/packages/x-date-pickers/src/TimePicker/TimePickerToolbar.tsx @@ -3,7 +3,7 @@ import clsx from 'clsx'; import PropTypes from 'prop-types'; import { useRtl } from '@mui/system/RtlProvider'; import { styled, useThemeProps } from '@mui/material/styles'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { PickersToolbarText } from '../internals/components/PickersToolbarText'; import { PickersToolbarButton } from '../internals/components/PickersToolbarButton'; import { PickersToolbar } from '../internals/components/PickersToolbar'; diff --git a/packages/x-date-pickers/src/YearCalendar/PickersYear.tsx b/packages/x-date-pickers/src/YearCalendar/PickersYear.tsx index a2fa699d1093..4cfd69ba8232 100644 --- a/packages/x-date-pickers/src/YearCalendar/PickersYear.tsx +++ b/packages/x-date-pickers/src/YearCalendar/PickersYear.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import clsx from 'clsx'; import { styled, alpha, useThemeProps } from '@mui/material/styles'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import composeClasses from '@mui/utils/composeClasses'; import useEnhancedEffect from '@mui/utils/useEnhancedEffect'; import { diff --git a/packages/x-date-pickers/src/YearCalendar/YearCalendar.tsx b/packages/x-date-pickers/src/YearCalendar/YearCalendar.tsx index 08a40cfb1146..5cf5d7ec126e 100644 --- a/packages/x-date-pickers/src/YearCalendar/YearCalendar.tsx +++ b/packages/x-date-pickers/src/YearCalendar/YearCalendar.tsx @@ -362,10 +362,12 @@ YearCalendar.propTypes = { hasFocus: PropTypes.bool, /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate: PropTypes.object, /** * Minimal selectable date. + * @default 1900-01-01 */ minDate: PropTypes.object, /** diff --git a/packages/x-date-pickers/src/hooks/useClearableField.tsx b/packages/x-date-pickers/src/hooks/useClearableField.tsx index fb06acdfbd90..52e3838e15b3 100644 --- a/packages/x-date-pickers/src/hooks/useClearableField.tsx +++ b/packages/x-date-pickers/src/hooks/useClearableField.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; -import { SlotComponentProps, useSlotProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import MuiIconButton from '@mui/material/IconButton'; import InputAdornment from '@mui/material/InputAdornment'; import { SxProps } from '@mui/system'; diff --git a/packages/x-date-pickers/src/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.tsx b/packages/x-date-pickers/src/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.tsx index c8af2ef21e8e..a5dd5873308f 100644 --- a/packages/x-date-pickers/src/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.tsx +++ b/packages/x-date-pickers/src/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.tsx @@ -3,8 +3,8 @@ import clsx from 'clsx'; import Typography from '@mui/material/Typography'; import { useRtl } from '@mui/system/RtlProvider'; import { styled, useThemeProps } from '@mui/material/styles'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; -import { useSlotProps } from '@mui/base/utils'; +import composeClasses from '@mui/utils/composeClasses'; +import useSlotProps from '@mui/utils/useSlotProps'; import IconButton from '@mui/material/IconButton'; import { ArrowLeftIcon, ArrowRightIcon } from '../../../icons'; import { diff --git a/packages/x-date-pickers/src/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.types.tsx b/packages/x-date-pickers/src/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.types.tsx index b4242649bfbc..f32e1745edf7 100644 --- a/packages/x-date-pickers/src/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.types.tsx +++ b/packages/x-date-pickers/src/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.types.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import IconButton from '@mui/material/IconButton'; import SvgIcon from '@mui/material/SvgIcon'; import { PickersArrowSwitcherClasses } from './pickersArrowSwitcherClasses'; diff --git a/packages/x-date-pickers/src/internals/components/PickersPopper.tsx b/packages/x-date-pickers/src/internals/components/PickersPopper.tsx index 6ad3bdedcdfb..81d3d1d5b448 100644 --- a/packages/x-date-pickers/src/internals/components/PickersPopper.tsx +++ b/packages/x-date-pickers/src/internals/components/PickersPopper.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { useSlotProps, SlotComponentProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import Grow from '@mui/material/Grow'; import Fade from '@mui/material/Fade'; import MuiPaper, { PaperProps as MuiPaperProps } from '@mui/material/Paper'; @@ -11,6 +11,7 @@ import BaseFocusTrap, { TrapFocusProps as MuiTrapFocusProps, } from '@mui/material/Unstable_TrapFocus'; import { + SlotComponentProps, unstable_useForkRef as useForkRef, unstable_useEventCallback as useEventCallback, unstable_ownerDocument as ownerDocument, @@ -40,7 +41,7 @@ export interface PickersPopperSlots { desktopTransition?: React.JSXElementConstructor; /** * Custom component for trapping the focus inside the views on desktop. - * @default FocusTrap from '@mui/base'. + * @default TrapFocus from '@mui/material'. */ desktopTrapFocus?: React.JSXElementConstructor; /** @@ -402,7 +403,7 @@ export function PickersPopper(inProps: PickerPopperProps) { } }; - const Transition = slots?.desktopTransition ?? reduceAnimations ? Fade : Grow; + const Transition = (slots?.desktopTransition ?? reduceAnimations) ? Fade : Grow; const FocusTrap = slots?.desktopTrapFocus ?? BaseFocusTrap; const Paper = slots?.desktopPaper ?? PickersPopperPaper; diff --git a/packages/x-date-pickers/src/internals/components/PickersToolbar.tsx b/packages/x-date-pickers/src/internals/components/PickersToolbar.tsx index 780756015029..3f4279540336 100644 --- a/packages/x-date-pickers/src/internals/components/PickersToolbar.tsx +++ b/packages/x-date-pickers/src/internals/components/PickersToolbar.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import clsx from 'clsx'; import Typography from '@mui/material/Typography'; import { styled, useThemeProps } from '@mui/material/styles'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { BaseToolbarProps } from '../models/props/toolbar'; import { getPickersToolbarUtilityClass, PickersToolbarClasses } from './pickersToolbarClasses'; import { DateOrTimeViewWithMeridiem } from '../models'; diff --git a/packages/x-date-pickers/src/internals/components/PickersToolbarButton.tsx b/packages/x-date-pickers/src/internals/components/PickersToolbarButton.tsx index 17b44028ca76..e79c5cec6346 100644 --- a/packages/x-date-pickers/src/internals/components/PickersToolbarButton.tsx +++ b/packages/x-date-pickers/src/internals/components/PickersToolbarButton.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import clsx from 'clsx'; import Button, { ButtonProps } from '@mui/material/Button'; import { styled, useThemeProps } from '@mui/material/styles'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { TypographyProps } from '@mui/material/Typography'; import { PickersToolbarText } from './PickersToolbarText'; import { ExtendMui } from '../models/helpers'; diff --git a/packages/x-date-pickers/src/internals/components/PickersToolbarText.tsx b/packages/x-date-pickers/src/internals/components/PickersToolbarText.tsx index f5ba8185d9e9..a3b0c533e77e 100644 --- a/packages/x-date-pickers/src/internals/components/PickersToolbarText.tsx +++ b/packages/x-date-pickers/src/internals/components/PickersToolbarText.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import clsx from 'clsx'; import Typography, { TypographyProps } from '@mui/material/Typography'; import { styled, useThemeProps } from '@mui/material/styles'; -import { unstable_composeClasses as composeClasses } from '@mui/utils'; +import composeClasses from '@mui/utils/composeClasses'; import { getPickersToolbarTextUtilityClass, pickersToolbarTextClasses, diff --git a/packages/x-date-pickers/src/internals/hooks/useDesktopPicker/useDesktopPicker.tsx b/packages/x-date-pickers/src/internals/hooks/useDesktopPicker/useDesktopPicker.tsx index 3f54c063f181..56e943302f79 100644 --- a/packages/x-date-pickers/src/internals/hooks/useDesktopPicker/useDesktopPicker.tsx +++ b/packages/x-date-pickers/src/internals/hooks/useDesktopPicker/useDesktopPicker.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import MuiInputAdornment from '@mui/material/InputAdornment'; import IconButton from '@mui/material/IconButton'; import useForkRef from '@mui/utils/useForkRef'; diff --git a/packages/x-date-pickers/src/internals/hooks/useDesktopPicker/useDesktopPicker.types.ts b/packages/x-date-pickers/src/internals/hooks/useDesktopPicker/useDesktopPicker.types.ts index 76ae02864952..59ff56096d93 100644 --- a/packages/x-date-pickers/src/internals/hooks/useDesktopPicker/useDesktopPicker.types.ts +++ b/packages/x-date-pickers/src/internals/hooks/useDesktopPicker/useDesktopPicker.types.ts @@ -2,7 +2,7 @@ import * as React from 'react'; import IconButton, { IconButtonProps } from '@mui/material/IconButton'; import { InputAdornmentProps } from '@mui/material/InputAdornment'; import TextField from '@mui/material/TextField'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import { BaseNonStaticPickerProps, BasePickerProps, diff --git a/packages/x-date-pickers/src/internals/hooks/useField/useField.ts b/packages/x-date-pickers/src/internals/hooks/useField/useField.ts index 330222121083..1d8bc5fdcffb 100644 --- a/packages/x-date-pickers/src/internals/hooks/useField/useField.ts +++ b/packages/x-date-pickers/src/internals/hooks/useField/useField.ts @@ -118,6 +118,9 @@ export const useField = < const handleContainerKeyDown = useEventCallback((event: React.KeyboardEvent) => { onKeyDown?.(event); + if (disabled) { + return; + } // eslint-disable-next-line default-case switch (true) { // Select all diff --git a/packages/x-date-pickers/src/internals/hooks/useField/useField.utils.ts b/packages/x-date-pickers/src/internals/hooks/useField/useField.utils.ts index 1d5719f585e8..71b5465dce55 100644 --- a/packages/x-date-pickers/src/internals/hooks/useField/useField.utils.ts +++ b/packages/x-date-pickers/src/internals/hooks/useField/useField.utils.ts @@ -747,7 +747,7 @@ export const mergeDateIntoReferenceDate = ( return mergedDate; }, referenceDate); -export const isAndroid = () => navigator.userAgent.toLowerCase().indexOf('android') > -1; +export const isAndroid = () => navigator.userAgent.toLowerCase().includes('android'); // TODO v8: Remove if we drop the v6 TextField approach. export const getSectionOrder = ( @@ -833,7 +833,7 @@ export const getSectionValueText = ( switch (section.type) { case 'month': { if (section.contentType === 'digit') { - return utils.format(utils.setMonth(utils.date()!, Number(section.value) - 1), 'month'); + return utils.format(utils.setMonth(utils.date(), Number(section.value) - 1), 'month'); } const parsedDate = utils.parse(section.value, section.format); return parsedDate ? utils.format(parsedDate, 'month') : undefined; @@ -841,7 +841,7 @@ export const getSectionValueText = ( case 'day': return section.contentType === 'digit' ? utils.format( - utils.setDate(utils.startOfYear(utils.date()!), Number(section.value)), + utils.setDate(utils.startOfYear(utils.date()), Number(section.value)), 'dayOfMonthFull', ) : section.value; diff --git a/packages/x-date-pickers/src/internals/hooks/useField/useFieldV6TextField.ts b/packages/x-date-pickers/src/internals/hooks/useField/useFieldV6TextField.ts index 104b46094201..288b0ee44de9 100644 --- a/packages/x-date-pickers/src/internals/hooks/useField/useFieldV6TextField.ts +++ b/packages/x-date-pickers/src/internals/hooks/useField/useFieldV6TextField.ts @@ -88,7 +88,7 @@ export const useFieldV6TextField: UseFieldTextField = (params) => { inputRef: inputRefProp, placeholder: inPlaceholder, }, - internalProps: { readOnly = false }, + internalProps: { readOnly = false, disabled = false }, parsedSelectedSections, activeSectionIndex, state, @@ -273,7 +273,7 @@ export const useFieldV6TextField: UseFieldTextField = (params) => { // prevent default to avoid the input `onChange` handler being called event.preventDefault(); - if (readOnly) { + if (readOnly || disabled) { return; } diff --git a/packages/x-date-pickers/src/internals/hooks/useField/useFieldV7TextField.ts b/packages/x-date-pickers/src/internals/hooks/useField/useFieldV7TextField.ts index c50d244f1b1e..c6fc37752e6e 100644 --- a/packages/x-date-pickers/src/internals/hooks/useField/useFieldV7TextField.ts +++ b/packages/x-date-pickers/src/internals/hooks/useField/useFieldV7TextField.ts @@ -311,7 +311,7 @@ export const useFieldV7TextField: UseFieldTextField = (params) => { // prevent default to avoid the input `onInput` handler being called event.preventDefault(); - if (readOnly || typeof parsedSelectedSections !== 'number') { + if (readOnly || disabled || typeof parsedSelectedSections !== 'number') { return; } diff --git a/packages/x-date-pickers/src/internals/hooks/useMobilePicker/useMobilePicker.tsx b/packages/x-date-pickers/src/internals/hooks/useMobilePicker/useMobilePicker.tsx index 7c3212cd2cc5..b98cf417300b 100644 --- a/packages/x-date-pickers/src/internals/hooks/useMobilePicker/useMobilePicker.tsx +++ b/packages/x-date-pickers/src/internals/hooks/useMobilePicker/useMobilePicker.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import useForkRef from '@mui/utils/useForkRef'; import useId from '@mui/utils/useId'; import { PickersModalDialog } from '../../components/PickersModalDialog'; diff --git a/packages/x-date-pickers/src/internals/hooks/useMobilePicker/useMobilePicker.types.ts b/packages/x-date-pickers/src/internals/hooks/useMobilePicker/useMobilePicker.types.ts index c983d49d2d99..d741a588e9e5 100644 --- a/packages/x-date-pickers/src/internals/hooks/useMobilePicker/useMobilePicker.types.ts +++ b/packages/x-date-pickers/src/internals/hooks/useMobilePicker/useMobilePicker.types.ts @@ -1,6 +1,6 @@ import * as React from 'react'; import TextField from '@mui/material/TextField'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import { BaseNonStaticPickerProps, BasePickerProps, diff --git a/packages/x-date-pickers/src/internals/hooks/usePicker/usePicker.ts b/packages/x-date-pickers/src/internals/hooks/usePicker/usePicker.ts index 62f6ac8089da..b150b8fe3dee 100644 --- a/packages/x-date-pickers/src/internals/hooks/usePicker/usePicker.ts +++ b/packages/x-date-pickers/src/internals/hooks/usePicker/usePicker.ts @@ -3,16 +3,10 @@ import { usePickerValue } from './usePickerValue'; import { usePickerViews } from './usePickerViews'; import { usePickerLayoutProps } from './usePickerLayoutProps'; import { InferError } from '../useValidation'; -import { buildWarning } from '../../utils/warning'; +import { warnOnce } from '../../utils/warning'; import { FieldSection, PickerValidDate } from '../../../models'; import { DateOrTimeViewWithMeridiem } from '../../models'; -const warnRenderInputIsDefined = buildWarning([ - 'The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.', - 'You can replace it with the `textField` component slot in most cases.', - 'For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5).', -]); - export const usePicker = < TValue, TDate extends PickerValidDate, @@ -40,7 +34,11 @@ export const usePicker = < >): UsePickerResponse> => { if (process.env.NODE_ENV !== 'production') { if ((props as any).renderInput != null) { - warnRenderInputIsDefined(); + warnOnce([ + 'MUI X: The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.', + 'You can replace it with the `textField` component slot in most cases.', + 'For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5).', + ]); } } const pickerValueResponse = usePickerValue({ diff --git a/packages/x-date-pickers/src/internals/index.ts b/packages/x-date-pickers/src/internals/index.ts index d336ee07f1e0..bf9c07dd4c1f 100644 --- a/packages/x-date-pickers/src/internals/index.ts +++ b/packages/x-date-pickers/src/internals/index.ts @@ -151,7 +151,7 @@ export { validateDate } from './utils/validation/validateDate'; export { validateDateTime } from './utils/validation/validateDateTime'; export { validateTime } from './utils/validation/validateTime'; export { applyDefaultViewProps } from './utils/views'; -export { buildDeprecatedPropsWarning, buildWarning } from './utils/warning'; +export { warnOnce } from './utils/warning'; export { DayCalendar } from '../DateCalendar/DayCalendar'; export type { diff --git a/packages/x-date-pickers/src/internals/models/validation.ts b/packages/x-date-pickers/src/internals/models/validation.ts index 2488416d7848..1d2e7f46d8ec 100644 --- a/packages/x-date-pickers/src/internals/models/validation.ts +++ b/packages/x-date-pickers/src/internals/models/validation.ts @@ -61,10 +61,12 @@ export interface BaseDateValidationProps extends FutureAndPastValidationProps { /** * Maximal selectable date. + * @default 2099-12-31 */ maxDate?: TDate; /** * Minimal selectable date. + * @default 1900-01-01 */ minDate?: TDate; } diff --git a/packages/x-date-pickers/src/internals/utils/date-utils.ts b/packages/x-date-pickers/src/internals/utils/date-utils.ts index 80e086cfc3cf..5f04069743a4 100644 --- a/packages/x-date-pickers/src/internals/utils/date-utils.ts +++ b/packages/x-date-pickers/src/internals/utils/date-utils.ts @@ -149,7 +149,7 @@ export const formatMeridiem = ( utils: MuiPickersAdapter, meridiem: 'am' | 'pm', ) => { - const date = utils.setHours(utils.date()!, meridiem === 'am' ? 2 : 14); + const date = utils.setHours(utils.date(), meridiem === 'am' ? 2 : 14); return utils.format(date, 'meridiem'); }; diff --git a/packages/x-date-pickers/src/internals/utils/warning.ts b/packages/x-date-pickers/src/internals/utils/warning.ts index 109a1abfc878..f0d34fc59f68 100644 --- a/packages/x-date-pickers/src/internals/utils/warning.ts +++ b/packages/x-date-pickers/src/internals/utils/warning.ts @@ -1,41 +1,25 @@ -export const buildDeprecatedPropsWarning = (message: string | string[]) => { - let alreadyWarned = false; +const warnedOnceCache = new Set(); +// TODO move to @mui/x-internals +// TODO eventually move to @base_ui/internals. Base UI, etc. too need this helper. +export function warnOnce(message: string | string[], gravity: 'warning' | 'error' = 'warning') { if (process.env.NODE_ENV === 'production') { - return () => {}; + return; } const cleanMessage = Array.isArray(message) ? message.join('\n') : message; - return (deprecatedProps: { [key: string]: any }) => { - const deprecatedKeys = Object.entries(deprecatedProps) - .filter(([, value]) => value !== undefined) - .map(([key]) => `- ${key}`); + if (!warnedOnceCache.has(cleanMessage)) { + warnedOnceCache.add(cleanMessage); - if (!alreadyWarned && deprecatedKeys.length > 0) { - alreadyWarned = true; - - console.warn([cleanMessage, 'deprecated props observed:', ...deprecatedKeys].join('\n')); + if (gravity === 'error') { + console.error(cleanMessage); + } else { + console.warn(cleanMessage); } - }; -}; - -export const buildWarning = ( - message: string | string[], - gravity: 'warning' | 'error' = 'warning', -) => { - let alreadyWarned = false; - - const cleanMessage = Array.isArray(message) ? message.join('\n') : message; + } +} - return () => { - if (!alreadyWarned) { - alreadyWarned = true; - if (gravity === 'error') { - console.error(cleanMessage); - } else { - console.warn(cleanMessage); - } - } - }; -}; +export function clearWarningsCache() { + warnedOnceCache.clear(); +} diff --git a/packages/x-date-pickers/src/locales/index.ts b/packages/x-date-pickers/src/locales/index.ts index c84168c4bd60..6e7da2dcb09d 100644 --- a/packages/x-date-pickers/src/locales/index.ts +++ b/packages/x-date-pickers/src/locales/index.ts @@ -20,6 +20,7 @@ export * from './kzKZ'; export * from './mk'; export * from './nbNO'; export * from './nlNL'; +export * from './nnNO'; export * from './plPL'; export * from './ptBR'; export * from './roRO'; diff --git a/packages/x-date-pickers/src/locales/nnNO.ts b/packages/x-date-pickers/src/locales/nnNO.ts new file mode 100644 index 000000000000..8603b926a464 --- /dev/null +++ b/packages/x-date-pickers/src/locales/nnNO.ts @@ -0,0 +1,100 @@ +import { PickersLocaleText } from './utils/pickersLocaleTextApi'; +import { getPickersLocalization } from './utils/getPickersLocalization'; +import { TimeViewWithMeridiem } from '../internals/models'; + +const timeViews: Record = { + hours: 'timar', + minutes: 'minuttar', + seconds: 'sekundar', + meridiem: 'meridiem', +}; + +const nnNOPickers: Partial> = { + // Calendar navigation + previousMonth: 'Forrige månad', + nextMonth: 'Neste månad', + + // View navigation + openPreviousView: 'Opne forrige visning', + openNextView: 'Opne neste visning', + calendarViewSwitchingButtonAriaLabel: (view) => + view === 'year' + ? 'årsvisning er open, byt til kalendervisning' + : 'kalendervisning er open, byt til årsvisning', + + // DateRange labels + start: 'Start', + end: 'Slutt', + startDate: 'Startdato', + startTime: 'Starttid', + endDate: 'Sluttdato', + endTime: 'Slutttid', + + // Action bar + cancelButtonLabel: 'Avbryt', + clearButtonLabel: 'Fjern', + okButtonLabel: 'OK', + todayButtonLabel: 'I dag', + + // Toolbar titles + datePickerToolbarTitle: 'Vel dato', + dateTimePickerToolbarTitle: 'Vel dato & klokkeslett', + timePickerToolbarTitle: 'Vel klokkeslett', + dateRangePickerToolbarTitle: 'Vel datoperiode', + + // Clock labels + clockLabelText: (view, time, adapter) => + `Vel ${timeViews[view]}. ${time === null ? 'Ingen tid vald' : `Vald tid er ${adapter.format(time, 'fullTime')}`}`, + hoursClockNumberText: (hours) => `${hours} timar`, + minutesClockNumberText: (minutes) => `${minutes} minuttar`, + secondsClockNumberText: (seconds) => `${seconds} sekundar`, + + // Digital clock labels + selectViewText: (view) => `Vel ${timeViews[view]}`, + + // Calendar labels + calendarWeekNumberHeaderLabel: 'Vekenummer', + calendarWeekNumberHeaderText: '#', + calendarWeekNumberAriaLabelText: (weekNumber) => `Veke ${weekNumber}`, + calendarWeekNumberText: (weekNumber) => `${weekNumber}`, + + // Open picker labels + openDatePickerDialogue: (value, utils) => + value !== null && utils.isValid(value) + ? `Vel dato, vald dato er ${utils.format(value, 'fullDate')}` + : 'Vel dato', + openTimePickerDialogue: (value, utils) => + value !== null && utils.isValid(value) + ? `Vel tid, vald tid er ${utils.format(value, 'fullTime')}` + : 'Vel tid', + fieldClearLabel: 'Fjern verdi', + + // Table labels + timeTableLabel: 'vel tid', + dateTableLabel: 'vel dato', + + // Field section placeholders + fieldYearPlaceholder: (params) => 'Å'.repeat(params.digitAmount), + fieldMonthPlaceholder: (params) => (params.contentType === 'letter' ? 'MMMM' : 'MM'), + fieldDayPlaceholder: () => 'DD', + fieldWeekDayPlaceholder: (params) => (params.contentType === 'letter' ? 'EEEE' : 'EE'), + fieldHoursPlaceholder: () => 'tt', + fieldMinutesPlaceholder: () => 'mm', + fieldSecondsPlaceholder: () => 'ss', + fieldMeridiemPlaceholder: () => 'aa', + + // View names + year: 'År', + month: 'Månad', + day: 'Dag', + weekDay: 'Vekedag', + hours: 'Timar', + minutes: 'Minuttar', + seconds: 'Sekundar', + meridiem: 'Meridiem', + + // Common + empty: 'Tom', +}; + +export const nnNO = getPickersLocalization(nnNOPickers); diff --git a/packages/x-internals/README.md b/packages/x-internals/README.md index e4389f60af4d..fc88a82e83b3 100644 --- a/packages/x-internals/README.md +++ b/packages/x-internals/README.md @@ -1,4 +1,4 @@ # @mui/x-internals -Shared utilities used by MUI X packages. +Shared utilities used by MUI X packages. This package should never be installed or used directly. diff --git a/packages/x-internals/package.json b/packages/x-internals/package.json index 3d17cf0498c3..ce017cd12f5b 100644 --- a/packages/x-internals/package.json +++ b/packages/x-internals/package.json @@ -1,6 +1,6 @@ { "name": "@mui/x-internals", - "version": "7.11.0", + "version": "7.11.1", "description": "Utility functions for the MUI X packages (internal use only).", "author": "MUI Team", "license": "MIT", @@ -41,15 +41,15 @@ "directory": "packages/x-internals" }, "dependencies": { - "@babel/runtime": "^7.24.8", - "@mui/utils": "^5.16.2" + "@babel/runtime": "^7.25.0", + "@mui/utils": "^5.16.5" }, "peerDependencies": { "react": "^17.0.0 || ^18.0.0" }, "devDependencies": { - "@mui/internal-test-utils": "^1.0.4", - "rimraf": "^5.0.8" + "@mui/internal-test-utils": "^1.0.5", + "rimraf": "^5.0.9" }, "engines": { "node": ">=14.0.0" diff --git a/packages/x-license/package.json b/packages/x-license/package.json index 6bfc37b7fdd8..9fe318b3ffef 100644 --- a/packages/x-license/package.json +++ b/packages/x-license/package.json @@ -1,6 +1,6 @@ { "name": "@mui/x-license", - "version": "7.11.0", + "version": "7.11.1", "description": "MUI X License verification", "author": "MUI Team", "main": "src/index.ts", @@ -34,15 +34,15 @@ "directory": "packages/x-license" }, "dependencies": { - "@babel/runtime": "^7.24.8", - "@mui/utils": "^5.16.2" + "@babel/runtime": "^7.25.0", + "@mui/utils": "^5.16.5" }, "peerDependencies": { "react": "^17.0.0 || ^18.0.0" }, "devDependencies": { - "@mui/internal-test-utils": "^1.0.4", - "rimraf": "^5.0.8" + "@mui/internal-test-utils": "^1.0.5", + "rimraf": "^5.0.9" }, "engines": { "node": ">=14.0.0" diff --git a/packages/x-tree-view-pro/README.md b/packages/x-tree-view-pro/README.md index 7f48bdf17d35..9d9bfe64f275 100644 --- a/packages/x-tree-view-pro/README.md +++ b/packages/x-tree-view-pro/README.md @@ -15,7 +15,7 @@ This component has the following peer dependencies that you will need to install ```json "peerDependencies": { - "@mui/material": "^5.15.0", + "@mui/material": "^5.15.14", "react": "^17.0.0 || ^18.0.0", "react-dom": "^17.0.0 || ^18.0.0" }, diff --git a/packages/x-tree-view-pro/package.json b/packages/x-tree-view-pro/package.json index db7d30a12e06..5aa07ec37682 100644 --- a/packages/x-tree-view-pro/package.json +++ b/packages/x-tree-view-pro/package.json @@ -43,10 +43,9 @@ "directory": "packages/x-tree-view-pro" }, "dependencies": { - "@babel/runtime": "^7.24.8", - "@mui/base": "^5.0.0-beta.40", - "@mui/system": "^5.16.2", - "@mui/utils": "^5.16.2", + "@babel/runtime": "^7.25.0", + "@mui/system": "^5.16.5", + "@mui/utils": "^5.16.5", "@mui/x-internals": "workspace:*", "@mui/x-license": "workspace:*", "@mui/x-tree-view": "workspace:*", @@ -63,8 +62,8 @@ "react-dom": "^17.0.0 || ^18.0.0" }, "devDependencies": { - "@mui/internal-test-utils": "^1.0.4", - "rimraf": "^5.0.8" + "@mui/internal-test-utils": "^1.0.5", + "rimraf": "^5.0.9" }, "engines": { "node": ">=14.0.0" diff --git a/packages/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.plugins.ts b/packages/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.plugins.ts index dca59df1cdf4..70dbf423afe4 100644 --- a/packages/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.plugins.ts +++ b/packages/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.plugins.ts @@ -14,6 +14,10 @@ import { MergeSignaturesProperty, TreeViewCorePluginParameters, } from '@mui/x-tree-view/internals'; +import { + useTreeViewItemsReordering, + UseTreeViewItemsReorderingParameters, +} from '../internals/plugins/useTreeViewItemsReordering'; export const RICH_TREE_VIEW_PRO_PLUGINS = [ useTreeViewItems, @@ -22,6 +26,7 @@ export const RICH_TREE_VIEW_PRO_PLUGINS = [ useTreeViewFocus, useTreeViewKeyboardNavigation, useTreeViewIcons, + useTreeViewItemsReordering, ] as const; export type RichTreeViewProPluginSignatures = ConvertPluginsIntoSignatures< @@ -45,4 +50,5 @@ export interface RichTreeViewProPluginParameters, - UseTreeViewIconsParameters {} + UseTreeViewIconsParameters, + UseTreeViewItemsReorderingParameters {} diff --git a/packages/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.tsx b/packages/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.tsx index 3eee6b03f115..fe08a3f193c3 100644 --- a/packages/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.tsx +++ b/packages/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; import composeClasses from '@mui/utils/composeClasses'; import { useLicenseVerifier, Watermark } from '@mui/x-license'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import { TreeItem, TreeItemProps } from '@mui/x-tree-view/TreeItem'; -import { useTreeView, TreeViewProvider, buildWarning } from '@mui/x-tree-view/internals'; +import { useTreeView, TreeViewProvider, warnOnce } from '@mui/x-tree-view/internals'; import { styled, createUseThemeProps } from '../internals/zero-styled'; import { getRichTreeViewProUtilityClass } from './richTreeViewProClasses'; import { RichTreeViewProProps } from './RichTreeViewPro.types'; @@ -65,12 +65,6 @@ function WrappedTreeItem({ const releaseInfo = getReleaseInfo(); -const childrenWarning = buildWarning([ - 'MUI X: The `RichTreeViewPro` component does not support JSX children.', - 'If you want to add items, you need to use the `items` prop', - 'Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/items/', -]); - /** * * Demos: @@ -91,7 +85,11 @@ const RichTreeViewPro = React.forwardRef(function RichTreeViewPro< if (process.env.NODE_ENV !== 'production') { if ((props as any).children != null) { - childrenWarning(); + warnOnce([ + 'MUI X: The `RichTreeViewPro` component does not support JSX children.', + 'If you want to add items, you need to use the `items` prop.', + 'Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/items/.', + ]); } } diff --git a/packages/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.types.ts b/packages/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.types.ts index 2f882e8dc922..81b1eeac8782 100644 --- a/packages/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.types.ts +++ b/packages/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.types.ts @@ -1,7 +1,7 @@ import * as React from 'react'; import { Theme } from '@mui/material/styles'; import { SxProps } from '@mui/system'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import { TreeItem, TreeItemProps } from '@mui/x-tree-view/TreeItem'; import { TreeItem2Props } from '@mui/x-tree-view/TreeItem2'; import { TreeViewItemId } from '@mui/x-tree-view/models'; diff --git a/packages/x-tree-view-pro/src/internals/index.ts b/packages/x-tree-view-pro/src/internals/index.ts new file mode 100644 index 000000000000..cb9559d5f241 --- /dev/null +++ b/packages/x-tree-view-pro/src/internals/index.ts @@ -0,0 +1 @@ +export { UseTreeViewItemsReorderingSignature } from './plugins/useTreeViewItemsReordering'; diff --git a/packages/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/index.ts b/packages/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/index.ts new file mode 100644 index 000000000000..517ac7914e58 --- /dev/null +++ b/packages/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/index.ts @@ -0,0 +1,7 @@ +export { useTreeViewItemsReordering } from './useTreeViewItemsReordering'; +export type { + UseTreeViewItemsReorderingSignature, + UseTreeViewItemsReorderingParameters, + UseTreeViewItemsReorderingDefaultizedParameters, + TreeViewItemReorderPosition, +} from './useTreeViewItemsReordering.types'; diff --git a/packages/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.itemPlugin.ts b/packages/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.itemPlugin.ts new file mode 100644 index 000000000000..18d5014bfccf --- /dev/null +++ b/packages/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.itemPlugin.ts @@ -0,0 +1,155 @@ +import * as React from 'react'; +import { + MuiCancellableEvent, + TreeViewItemPlugin, + useTreeViewContext, + UseTreeViewItemsSignature, + isTargetInDescendants, +} from '@mui/x-tree-view/internals'; +import { TreeItem2Props } from '@mui/x-tree-view/TreeItem2'; +import { + UseTreeItem2DragAndDropOverlaySlotPropsFromItemsReordering, + UseTreeItem2RootSlotPropsFromItemsReordering, + UseTreeViewItemsReorderingSignature, + TreeViewItemItemReorderingValidActions, + UseTreeItem2ContentSlotPropsFromItemsReordering, +} from './useTreeViewItemsReordering.types'; + +export const isAndroid = () => navigator.userAgent.toLowerCase().includes('android'); + +export const useTreeViewItemsReorderingItemPlugin: TreeViewItemPlugin = ({ + props, +}) => { + const { itemsReordering, instance } = + useTreeViewContext<[UseTreeViewItemsSignature, UseTreeViewItemsReorderingSignature]>(); + const { itemId } = props; + + const validActionsRef = React.useRef(null); + + return { + propsEnhancers: { + root: ({ + rootRefObject, + contentRefObject, + externalEventHandlers, + }): UseTreeItem2RootSlotPropsFromItemsReordering => { + const draggable = instance.canItemBeDragged(itemId); + if (!draggable) { + return {}; + } + + const handleDragStart = (event: React.DragEvent & MuiCancellableEvent) => { + externalEventHandlers.onDragStart?.(event); + if (event.defaultMuiPrevented || event.defaultPrevented) { + return; + } + + // We don't use `event.currentTarget` here. + // This is to allow people to pass `onDragStart` to another element than the root. + if (isTargetInDescendants(event.target as HTMLElement, rootRefObject.current)) { + return; + } + + // Comment to show the children in the drag preview + // TODO: Improve the customization of the drag preview + event.dataTransfer.effectAllowed = 'move'; + event.dataTransfer.setDragImage(contentRefObject.current!, 0, 0); + + const { types } = event.dataTransfer; + if (isAndroid() && !types.includes('text/plain') && !types.includes('text/uri-list')) { + event.dataTransfer.setData('text/plain', 'android-fallback'); + } + + // iOS requires a media type to be defined + event.dataTransfer.setData('application/mui-x', ''); + + instance.startDraggingItem(itemId); + }; + + const handleRootDragOver = (event: React.DragEvent & MuiCancellableEvent) => { + externalEventHandlers.onDragOver?.(event); + if (event.defaultMuiPrevented) { + return; + } + + event.preventDefault(); + }; + + const handleRootDragEnd = (event: React.DragEvent & MuiCancellableEvent) => { + externalEventHandlers.onDragEnd?.(event); + if (event.defaultMuiPrevented) { + return; + } + + instance.stopDraggingItem(itemId); + }; + + return { + draggable: true, + onDragStart: handleDragStart, + onDragOver: handleRootDragOver, + onDragEnd: handleRootDragEnd, + }; + }, + content: ({ + externalEventHandlers, + contentRefObject, + }): UseTreeItem2ContentSlotPropsFromItemsReordering => { + const currentDrag = itemsReordering.currentDrag; + if (!currentDrag || currentDrag.draggedItemId === itemId) { + return {}; + } + + const handleDragOver = (event: React.DragEvent & MuiCancellableEvent) => { + externalEventHandlers.onDragOver?.(event); + if (event.defaultMuiPrevented || validActionsRef.current == null) { + return; + } + + const rect = (event.target as HTMLDivElement).getBoundingClientRect(); + const y = event.clientY - rect.top; + const x = event.clientX - rect.left; + instance.setDragTargetItem({ + itemId, + validActions: validActionsRef.current, + targetHeight: rect.height, + cursorY: y, + cursorX: x, + contentElement: contentRefObject.current!, + }); + }; + + const handleDragEnter = (event: React.DragEvent & MuiCancellableEvent) => { + externalEventHandlers.onDragEnter?.(event); + if (event.defaultMuiPrevented) { + return; + } + + validActionsRef.current = instance.getDroppingTargetValidActions(itemId); + }; + + return { + onDragEnter: handleDragEnter, + onDragOver: handleDragOver, + }; + }, + dragAndDropOverlay: (): UseTreeItem2DragAndDropOverlaySlotPropsFromItemsReordering => { + const currentDrag = itemsReordering.currentDrag; + if (!currentDrag || currentDrag.targetItemId !== itemId || currentDrag.action == null) { + return {}; + } + + const targetDepth = + currentDrag.newPosition?.parentId == null + ? 0 + : // The depth is always defined because drag&drop is only usable with Rich Tree View components. + instance.getItemMeta(currentDrag.newPosition.parentId).depth! + 1; + + return { + action: currentDrag.action, + style: { '--TreeView-targetDepth': targetDepth } as React.CSSProperties, + }; + }, + }, + }; +}; diff --git a/packages/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.test.tsx b/packages/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.test.tsx new file mode 100644 index 000000000000..b316969dbc1f --- /dev/null +++ b/packages/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.test.tsx @@ -0,0 +1,370 @@ +import { describeTreeView } from 'test/utils/tree-view/describeTreeView'; +import { expect } from 'chai'; +import { spy } from 'sinon'; +import { fireEvent, createEvent } from '@mui/internal-test-utils'; +import { UseTreeViewItemsReorderingSignature } from '@mui/x-tree-view-pro/internals'; +import { DragEventTypes, MockedDataTransfer } from 'test/utils/dragAndDrop'; +import { + UseTreeViewExpansionSignature, + UseTreeViewItemsSignature, +} from '@mui/x-tree-view/internals'; +import { chooseActionToApply } from './useTreeViewItemsReordering.utils'; +import { TreeViewItemItemReorderingValidActions } from './useTreeViewItemsReordering.types'; + +interface DragEventOptions { + /** + * Coordinates of the mouse pointer relative to the target element. + * @default: { x: targetWidth / 2, y: targetHeight / 2 } + */ + coordinates?: { x: number; y: number }; +} + +const buildTreeViewDragInteractions = (dataTransfer: DataTransfer) => { + const createFireEvent = + (type: DragEventTypes) => + (target: HTMLElement, options: DragEventOptions = {}) => { + const rect = target.getBoundingClientRect(); + const coordinates = options.coordinates ?? { x: rect.width / 2, y: rect.height / 2 }; + const createdEvent = createEvent[type](target, { + clientX: rect.left + coordinates.x, + clientY: rect.top + coordinates.y, + }); + Object.defineProperty(createdEvent, 'dataTransfer', { + value: dataTransfer, + }); + + return fireEvent(target, createdEvent); + }; + + const dragStart = createFireEvent('dragStart'); + const dragEnter = createFireEvent('dragEnter'); + const dragOver = createFireEvent('dragOver'); + const dragEnd = createFireEvent('dragEnd'); + + return { + fullDragSequence: ( + draggedItem: HTMLElement, + targetItem: HTMLElement, + options: DragEventOptions = {}, + ) => { + dragStart(draggedItem); + dragEnter(targetItem); + dragOver(targetItem, { coordinates: options.coordinates }); + dragEnd(draggedItem); + }, + }; +}; + +describeTreeView< + [UseTreeViewItemsReorderingSignature, UseTreeViewItemsSignature, UseTreeViewExpansionSignature] +>('useTreeViewItemsReordering', ({ render, treeViewComponentName }) => { + if (treeViewComponentName === 'SimpleTreeView' || treeViewComponentName === 'RichTreeView') { + return; + } + + let dragEvents: ReturnType; + // eslint-disable-next-line mocha/no-top-level-hooks + beforeEach(() => { + const dataTransfer = new MockedDataTransfer(); + dragEvents = buildTreeViewDragInteractions(dataTransfer); + }); + + // eslint-disable-next-line mocha/no-top-level-hooks + afterEach(() => { + dragEvents = {} as typeof dragEvents; + }); + + describe('itemReordering prop', () => { + it('should allow to drag and drop items when props.itemsReordering={true}', () => { + const response = render({ + experimentalFeatures: { indentationAtItemLevel: true, itemsReordering: true }, + items: [{ id: '1' }, { id: '2' }, { id: '3' }], + itemsReordering: true, + }); + + dragEvents.fullDragSequence(response.getItemRoot('1'), response.getItemContent('2')); + expect(response.getItemIdTree()).to.deep.equal([ + { id: '2', children: [{ id: '1' }] }, + { id: '3' }, + ]); + }); + + it('should not allow to drag and drop items when props.itemsReordering={false}', () => { + const response = render({ + experimentalFeatures: { indentationAtItemLevel: true, itemsReordering: true }, + items: [{ id: '1' }, { id: '2' }, { id: '3' }], + itemsReordering: false, + }); + + dragEvents.fullDragSequence(response.getItemRoot('1'), response.getItemContent('2')); + expect(response.getItemIdTree()).to.deep.equal([{ id: '1' }, { id: '2' }, { id: '3' }]); + }); + + it('should not allow to drag and drop items when props.itemsReordering is not defined', () => { + const response = render({ + experimentalFeatures: { indentationAtItemLevel: true }, + items: [{ id: '1' }, { id: '2' }, { id: '3' }], + }); + + dragEvents.fullDragSequence(response.getItemRoot('1'), response.getItemContent('2')); + expect(response.getItemIdTree()).to.deep.equal([{ id: '1' }, { id: '2' }, { id: '3' }]); + }); + + it('should allow to expand the new parent of the dragged item when it was not expandable before', () => { + const response = render({ + experimentalFeatures: { indentationAtItemLevel: true, itemsReordering: true }, + items: [{ id: '1', children: [{ id: '1.1' }] }, { id: '2' }], + itemsReordering: true, + defaultExpandedItems: ['1'], + }); + + dragEvents.fullDragSequence(response.getItemRoot('1.1'), response.getItemContent('2')); + + fireEvent.focus(response.getItemRoot('2')); + fireEvent.keyDown(response.getItemRoot('2'), { key: 'Enter' }); + + expect(response.getItemIdTree()).to.deep.equal([ + { id: '1', children: [] }, + { id: '2', children: [{ id: '1.1' }] }, + ]); + }); + }); + + describe('onItemPositionChange prop', () => { + it('should call onItemPositionChange when an item is moved', () => { + const onItemPositionChange = spy(); + const response = render({ + experimentalFeatures: { indentationAtItemLevel: true, itemsReordering: true }, + items: [{ id: '1' }, { id: '2' }, { id: '3' }], + itemsReordering: true, + onItemPositionChange, + }); + + dragEvents.fullDragSequence(response.getItemRoot('1'), response.getItemContent('2')); + expect(onItemPositionChange.callCount).to.equal(1); + expect(onItemPositionChange.lastCall.firstArg).to.deep.equal({ + itemId: '1', + oldPosition: { parentId: null, index: 0 }, + newPosition: { parentId: '2', index: 0 }, + }); + }); + }); + + describe('isItemReorderable prop', () => { + it('should not allow to drag an item when isItemReorderable returns false', () => { + const response = render({ + experimentalFeatures: { indentationAtItemLevel: true, itemsReordering: true }, + items: [{ id: '1' }, { id: '2' }, { id: '3' }], + itemsReordering: true, + canMoveItemToNewPosition: () => false, + }); + + dragEvents.fullDragSequence(response.getItemRoot('1'), response.getItemContent('2')); + expect(response.getItemIdTree()).to.deep.equal([{ id: '1' }, { id: '2' }, { id: '3' }]); + }); + + it('should allow to drag an item when isItemReorderable returns true', () => { + const response = render({ + experimentalFeatures: { indentationAtItemLevel: true, itemsReordering: true }, + items: [{ id: '1' }, { id: '2' }, { id: '3' }], + itemsReordering: true, + canMoveItemToNewPosition: () => true, + }); + + dragEvents.fullDragSequence(response.getItemRoot('1'), response.getItemContent('2')); + expect(response.getItemIdTree()).to.deep.equal([ + { id: '2', children: [{ id: '1' }] }, + { id: '3' }, + ]); + }); + }); + + describe('canMoveItemToNewPosition prop', () => { + it('should not allow to drop an item when canMoveItemToNewPosition returns false', () => { + const response = render({ + experimentalFeatures: { indentationAtItemLevel: true, itemsReordering: true }, + items: [{ id: '1' }, { id: '2' }, { id: '3' }], + itemsReordering: true, + canMoveItemToNewPosition: () => false, + }); + + dragEvents.fullDragSequence(response.getItemRoot('1'), response.getItemContent('2')); + expect(response.getItemIdTree()).to.deep.equal([{ id: '1' }, { id: '2' }, { id: '3' }]); + }); + + it('should allow to drop an item when canMoveItemToNewPosition returns true', () => { + const response = render({ + experimentalFeatures: { indentationAtItemLevel: true, itemsReordering: true }, + items: [{ id: '1' }, { id: '2' }, { id: '3' }], + itemsReordering: true, + canMoveItemToNewPosition: () => true, + }); + + dragEvents.fullDragSequence(response.getItemRoot('1'), response.getItemContent('2')); + expect(response.getItemIdTree()).to.deep.equal([ + { id: '2', children: [{ id: '1' }] }, + { id: '3' }, + ]); + }); + }); +}); + +describe('getNewPosition util', () => { + // The actions use the following tree when dropping "1.1" on "1.2": + // - 1 + // - 1.1 + // - 1.2 + // - 1.3 + // - 2 + const ALL_ACTIONS: TreeViewItemItemReorderingValidActions = { + 'reorder-above': { parentId: '1', index: 0 }, + 'reorder-below': { parentId: '1', index: 1 }, + 'make-child': { parentId: '1.2', index: 0 }, + 'move-to-parent': { parentId: null, index: 2 }, + }; + + const FAKE_CONTENT_ELEMENT = {} as HTMLDivElement; + + const COMMON_PROPERTIES = { + itemChildrenIndentation: 12, + validActions: ALL_ACTIONS, + targetHeight: 100, + targetDepth: 1, + cursorY: 50, + cursorX: 100, + contentElement: FAKE_CONTENT_ELEMENT, + }; + + it('should choose the "reorder-above" action when the cursor is in the top quarter of the target item', () => { + expect( + chooseActionToApply({ + ...COMMON_PROPERTIES, + cursorY: 1, + }), + ).to.equal('reorder-above'); + + expect( + chooseActionToApply({ + ...COMMON_PROPERTIES, + cursorY: 24, + }), + ).to.equal('reorder-above'); + }); + + it('should choose the "reorder-above" action when the cursor is in the top half of the target item and the "make-child" action is not valid', () => { + expect( + chooseActionToApply({ + ...COMMON_PROPERTIES, + cursorY: 25, + validActions: { ...ALL_ACTIONS, 'make-child': undefined }, + }), + ).to.equal('reorder-above'); + + expect( + chooseActionToApply({ + ...COMMON_PROPERTIES, + cursorY: 49, + validActions: { ...ALL_ACTIONS, 'make-child': undefined }, + }), + ).to.equal('reorder-above'); + }); + + it('should choose the "reorder-below" action when the cursor is in the bottom quarter of the target item', () => { + expect( + chooseActionToApply({ + ...COMMON_PROPERTIES, + cursorY: 99, + }), + ).to.equal('reorder-below'); + + expect( + chooseActionToApply({ + ...COMMON_PROPERTIES, + cursorY: 76, + }), + ).to.equal('reorder-below'); + }); + + it('should choose the "reorder-below" action when the cursor is in the bottom half of the target item and the "make-child" action is not valid', () => { + expect( + chooseActionToApply({ + ...COMMON_PROPERTIES, + cursorY: 75, + validActions: { ...ALL_ACTIONS, 'make-child': undefined }, + }), + ).to.equal('reorder-below'); + + expect( + chooseActionToApply({ + ...COMMON_PROPERTIES, + cursorY: 51, + validActions: { ...ALL_ACTIONS, 'make-child': undefined }, + }), + ).to.equal('reorder-below'); + + expect( + chooseActionToApply({ + ...COMMON_PROPERTIES, + cursorY: 50, + validActions: { ...ALL_ACTIONS, 'make-child': undefined }, + }), + ).to.equal('reorder-below'); + }); + + it('should choose the "make-child" action when the cursor is in the middle of the target item', () => { + expect( + chooseActionToApply({ + ...COMMON_PROPERTIES, + cursorY: 25, + }), + ).to.equal('make-child'); + + expect( + chooseActionToApply({ + ...COMMON_PROPERTIES, + cursorY: 50, + }), + ).to.equal('make-child'); + + expect( + chooseActionToApply({ + ...COMMON_PROPERTIES, + cursorY: 74, + }), + ).to.equal('make-child'); + }); + + it('should choose the "move-to-parent" action when the cursor is inside the depth-offset of the target item', () => { + expect( + chooseActionToApply({ + ...COMMON_PROPERTIES, + cursorX: 1, + cursorY: 1, + }), + ).to.equal('move-to-parent'); + + expect( + chooseActionToApply({ + ...COMMON_PROPERTIES, + cursorX: 11, + cursorY: 1, + }), + ).to.equal('move-to-parent'); + + expect( + chooseActionToApply({ + ...COMMON_PROPERTIES, + cursorX: 1, + cursorY: 50, + }), + ).to.equal('move-to-parent'); + + expect( + chooseActionToApply({ + ...COMMON_PROPERTIES, + cursorX: 1, + cursorY: 99, + }), + ).to.equal('move-to-parent'); + }); +}); diff --git a/packages/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.ts b/packages/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.ts new file mode 100644 index 000000000000..e9065681e876 --- /dev/null +++ b/packages/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.ts @@ -0,0 +1,278 @@ +import * as React from 'react'; +import { warnOnce, TreeViewPlugin } from '@mui/x-tree-view/internals'; +import { TreeViewItemsReorderingAction } from '@mui/x-tree-view/models'; +import { + TreeViewItemItemReorderingValidActions, + TreeViewItemReorderPosition, + UseTreeViewItemsReorderingInstance, + UseTreeViewItemsReorderingSignature, +} from './useTreeViewItemsReordering.types'; +import { + chooseActionToApply, + isAncestor, + moveItemInTree, +} from './useTreeViewItemsReordering.utils'; +import { useTreeViewItemsReorderingItemPlugin } from './useTreeViewItemsReordering.itemPlugin'; + +export const useTreeViewItemsReordering: TreeViewPlugin = ({ + params, + instance, + state, + setState, + experimentalFeatures, +}) => { + const isItemsReorderingEnabled = + params.itemsReordering && !!experimentalFeatures?.itemsReordering; + + if (process.env.NODE_END !== 'production') { + if ( + params.itemsReordering && + (!experimentalFeatures?.indentationAtItemLevel || !experimentalFeatures?.itemsReordering) + ) { + warnOnce([ + 'MUI X: The items reordering feature requires the `indentationAtItemLevel` and `itemsReordering` experimental features to be enabled.', + 'You can do it by passing `experimentalFeatures={{ indentationAtItemLevel: true, itemsReordering: true }}` to the `RichTreeViewPro` component.', + 'Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/items/', + ]); + } + } + + const canItemBeDragged = React.useCallback( + (itemId: string) => { + if (!isItemsReorderingEnabled) { + return false; + } + + const isItemReorderable = params.isItemReorderable; + if (isItemReorderable) { + return isItemReorderable(itemId); + } + + return true; + }, + [isItemsReorderingEnabled, params.isItemReorderable], + ); + + const getDroppingTargetValidActions = React.useCallback( + (itemId: string) => { + if (!state.itemsReordering) { + throw new Error('There is no ongoing reordering.'); + } + + if (itemId === state.itemsReordering.draggedItemId) { + return {}; + } + + const canMoveItemToNewPosition = params.canMoveItemToNewPosition; + const targetItemMeta = instance.getItemMeta(itemId); + const targetItemIndex = instance.getItemIndex(targetItemMeta.id); + const draggedItemMeta = instance.getItemMeta(state.itemsReordering.draggedItemId); + const draggedItemIndex = instance.getItemIndex(draggedItemMeta.id); + + const oldPosition: TreeViewItemReorderPosition = { + parentId: draggedItemMeta.parentId, + index: draggedItemIndex, + }; + + const checkIfPositionIsValid = (positionAfterAction: TreeViewItemReorderPosition) => { + let isValid: boolean; + // If the new position is equal to the old one, we don't want to show any dropping UI. + if ( + positionAfterAction.parentId === oldPosition.parentId && + positionAfterAction.index === oldPosition.index + ) { + isValid = false; + } else if (canMoveItemToNewPosition) { + isValid = canMoveItemToNewPosition({ + itemId, + oldPosition, + newPosition: positionAfterAction, + }); + } else { + isValid = true; + } + + return isValid; + }; + + const positionsAfterAction: Record< + TreeViewItemsReorderingAction, + TreeViewItemReorderPosition | null + > = { + 'make-child': { parentId: targetItemMeta.id, index: 0 }, + 'reorder-above': { + parentId: targetItemMeta.parentId, + index: + targetItemMeta.parentId === draggedItemMeta.parentId && + targetItemIndex > draggedItemIndex + ? targetItemIndex - 1 + : targetItemIndex, + }, + 'reorder-below': targetItemMeta.expandable + ? null + : { + parentId: targetItemMeta.parentId, + index: + targetItemMeta.parentId === draggedItemMeta.parentId && + targetItemIndex > draggedItemIndex + ? targetItemIndex + : targetItemIndex + 1, + }, + 'move-to-parent': + targetItemMeta.parentId == null + ? null + : { + parentId: targetItemMeta.parentId, + index: instance.getItemOrderedChildrenIds(targetItemMeta.parentId).length, + }, + }; + + const validActions: TreeViewItemItemReorderingValidActions = {}; + Object.keys(positionsAfterAction).forEach((action) => { + const positionAfterAction = positionsAfterAction[action as TreeViewItemsReorderingAction]; + if (positionAfterAction != null && checkIfPositionIsValid(positionAfterAction)) { + validActions[action as TreeViewItemsReorderingAction] = positionAfterAction; + } + }); + + return validActions; + }, + [instance, state.itemsReordering, params.canMoveItemToNewPosition], + ); + + const startDraggingItem = React.useCallback( + (itemId: string) => { + setState((prevState) => ({ + ...prevState, + itemsReordering: { + targetItemId: itemId, + draggedItemId: itemId, + action: null, + newPosition: null, + }, + })); + }, + [setState], + ); + + const stopDraggingItem = React.useCallback( + (itemId: string) => { + if (state.itemsReordering == null || state.itemsReordering.draggedItemId !== itemId) { + return; + } + + if ( + state.itemsReordering.draggedItemId === state.itemsReordering.targetItemId || + state.itemsReordering.action == null || + state.itemsReordering.newPosition == null + ) { + setState((prevState) => ({ ...prevState, itemsReordering: null })); + return; + } + + const draggedItemMeta = instance.getItemMeta(state.itemsReordering.draggedItemId); + + const oldPosition: TreeViewItemReorderPosition = { + parentId: draggedItemMeta.parentId, + index: instance.getItemIndex(draggedItemMeta.id), + }; + + const newPosition = state.itemsReordering.newPosition; + + setState((prevState) => ({ + ...prevState, + itemsReordering: null, + items: moveItemInTree({ + itemToMoveId: itemId, + newPosition, + oldPosition, + prevState: prevState.items, + }), + })); + + const onItemPositionChange = params.onItemPositionChange; + onItemPositionChange?.({ + itemId, + newPosition, + oldPosition, + }); + }, + [setState, state.itemsReordering, instance, params.onItemPositionChange], + ); + + const setDragTargetItem = React.useCallback< + UseTreeViewItemsReorderingInstance['setDragTargetItem'] + >( + ({ itemId, validActions, targetHeight, cursorY, cursorX, contentElement }) => { + setState((prevState) => { + const prevSubState = prevState.itemsReordering; + if (prevSubState == null || isAncestor(instance, itemId, prevSubState.draggedItemId)) { + return prevState; + } + const action = chooseActionToApply({ + itemChildrenIndentation: params.itemChildrenIndentation, + validActions, + targetHeight, + targetDepth: prevState.items.itemMetaMap[itemId].depth!, + cursorY, + cursorX, + contentElement, + }); + + const newPosition = action == null ? null : validActions[action]!; + + if ( + prevSubState.targetItemId === itemId && + prevSubState.action === action && + prevSubState.newPosition?.parentId === newPosition?.parentId && + prevSubState.newPosition?.index === newPosition?.index + ) { + return prevState; + } + + return { + ...prevState, + itemsReordering: { + ...prevSubState, + targetItemId: itemId, + newPosition, + action, + }, + }; + }); + }, + [instance, setState, params.itemChildrenIndentation], + ); + + return { + instance: { + canItemBeDragged, + getDroppingTargetValidActions, + startDraggingItem, + stopDraggingItem, + setDragTargetItem, + }, + contextValue: { + itemsReordering: { + enabled: isItemsReorderingEnabled, + currentDrag: state.itemsReordering, + }, + }, + }; +}; + +useTreeViewItemsReordering.itemPlugin = useTreeViewItemsReorderingItemPlugin; + +useTreeViewItemsReordering.getDefaultizedParams = (params) => ({ + ...params, + itemsReordering: params.itemsReordering ?? false, +}); + +useTreeViewItemsReordering.getInitialState = () => ({ itemsReordering: null }); + +useTreeViewItemsReordering.params = { + itemsReordering: true, + isItemReorderable: true, + canMoveItemToNewPosition: true, + onItemPositionChange: true, +}; diff --git a/packages/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.types.ts b/packages/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.types.ts new file mode 100644 index 000000000000..2f2e909cc31e --- /dev/null +++ b/packages/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.types.ts @@ -0,0 +1,160 @@ +import * as React from 'react'; +import { + DefaultizedProps, + TreeViewPluginSignature, + UseTreeViewItemsSignature, + MuiCancellableEventHandler, +} from '@mui/x-tree-view/internals'; +import { TreeViewItemId, TreeViewItemsReorderingAction } from '@mui/x-tree-view/models'; +import { TreeItem2DragAndDropOverlayProps } from '@mui/x-tree-view/TreeItem2DragAndDropOverlay'; + +export interface UseTreeViewItemsReorderingInstance { + /** + * Check if a given item can be dragged. + * @param {TreeViewItemId} itemId The id of the item to check. + * @returns {boolean} `true` if the item can be dragged, `false` otherwise. + */ + canItemBeDragged: (itemId: TreeViewItemId) => boolean; + /** + * Get the valid reordering action if a given item is the target of the ongoing reordering. + * @param {TreeViewItemId} itemId The id of the item to get the action of. + * @returns {TreeViewItemItemReorderingValidActions} The valid actions for theF item. + */ + getDroppingTargetValidActions: (itemId: TreeViewItemId) => TreeViewItemItemReorderingValidActions; + /** + * Start a reordering for the given item. + * @param {TreeViewItemId} itemId The id of the item to start the reordering for. + */ + startDraggingItem: (itemId: TreeViewItemId) => void; + /** + * Stop the reordering of a given item. + * @param {TreeViewItemId} itemId The id of the item to stop the reordering for. + */ + stopDraggingItem: (itemId: TreeViewItemId) => void; + /** + * Set the new target item for the ongoing reordering. + * The action will be determined based on the position of the cursor inside the target and the valid actions for this target. + * @param {object} params The params describing the new target item. + * @param {TreeViewItemId} params.itemId The id of the new target item. + * @param {TreeViewItemItemReorderingValidActions} params.validActions The valid actions for the new target item. + * @param {number} params.targetHeight The height of the target item. + * @param {number} params.cursorY The Y coordinate of the mouse cursor. + * @param {number} params.cursorX The X coordinate of the mouse cursor. + * @param {HTMLDivElement} params.contentElement The DOM element rendered for the content slot. + */ + setDragTargetItem: (params: { + itemId: TreeViewItemId; + validActions: TreeViewItemItemReorderingValidActions; + targetHeight: number; + cursorY: number; + cursorX: number; + contentElement: HTMLDivElement; + }) => void; +} + +export interface TreeViewItemReorderPosition { + parentId: string | null; + index: number; +} + +export type TreeViewItemItemReorderingValidActions = { + [key in TreeViewItemsReorderingAction]?: TreeViewItemReorderPosition; +}; + +export interface UseTreeViewItemsReorderingParameters { + /** + * If `true`, the reordering of items is enabled. + * Make sure to also enable the `itemsReordering` experimental feature: + * ``. + * @default false + */ + itemsReordering?: boolean; + /** + * Used to determine if a given item can be reordered. + * @param {string} itemId The id of the item to check. + * @returns {boolean} `true` if the item can be reordered. + * @default () => true + */ + isItemReorderable?: (itemId: string) => boolean; + /** + * Used to determine if a given item can move to some new position. + * @param {object} params The params describing the item re-ordering. + * @param {string} params.itemId The id of the item to check. + * @param {TreeViewItemReorderPosition} params.oldPosition The old position of the item. + * @param {TreeViewItemReorderPosition} params.newPosition The new position of the item. + * @returns {boolean} `true` if the item can move to the new position. + */ + canMoveItemToNewPosition?: (params: { + itemId: string; + oldPosition: TreeViewItemReorderPosition; + newPosition: TreeViewItemReorderPosition; + }) => boolean; + /** + * Callback fired when a tree item is moved in the tree. + * @param {object} params The params describing the item re-ordering. + * @param {string} params.itemId The id of the item moved. + * @param {TreeViewItemReorderPosition} params.oldPosition The old position of the item. + * @param {TreeViewItemReorderPosition} params.newPosition The new position of the item. + */ + onItemPositionChange?: (params: { + itemId: string; + oldPosition: TreeViewItemReorderPosition; + newPosition: TreeViewItemReorderPosition; + }) => void; +} + +export type UseTreeViewItemsReorderingDefaultizedParameters = DefaultizedProps< + UseTreeViewItemsReorderingParameters, + 'itemsReordering' +>; + +export interface UseTreeViewItemsReorderingState { + itemsReordering: { + draggedItemId: string; + targetItemId: string; + newPosition: TreeViewItemReorderPosition | null; + action: TreeViewItemsReorderingAction | null; + } | null; +} + +interface UseTreeViewItemsReorderingContextValue { + itemsReordering: { + enabled: boolean; + currentDrag: UseTreeViewItemsReorderingState['itemsReordering']; + }; +} + +export type UseTreeViewItemsReorderingSignature = TreeViewPluginSignature<{ + params: UseTreeViewItemsReorderingParameters; + defaultizedParams: UseTreeViewItemsReorderingDefaultizedParameters; + instance: UseTreeViewItemsReorderingInstance; + state: UseTreeViewItemsReorderingState; + contextValue: UseTreeViewItemsReorderingContextValue; + experimentalFeatures: 'itemsReordering'; + dependencies: [UseTreeViewItemsSignature]; +}>; + +export interface UseTreeItem2RootSlotPropsFromItemsReordering { + draggable?: true; + onDragStart?: MuiCancellableEventHandler; + onDragOver?: MuiCancellableEventHandler; + onDragEnd?: MuiCancellableEventHandler; +} + +export interface UseTreeItem2ContentSlotPropsFromItemsReordering { + onDragEnter?: MuiCancellableEventHandler; + onDragOver?: MuiCancellableEventHandler; +} + +export interface UseTreeItem2DragAndDropOverlaySlotPropsFromItemsReordering + extends TreeItem2DragAndDropOverlayProps {} + +declare module '@mui/x-tree-view/useTreeItem2' { + interface UseTreeItem2RootSlotOwnProps extends UseTreeItem2RootSlotPropsFromItemsReordering {} + + interface UseTreeItem2ContentSlotOwnProps + extends UseTreeItem2ContentSlotPropsFromItemsReordering {} + + interface UseTreeItem2DragAndDropOverlaySlotOwnProps + extends UseTreeItem2DragAndDropOverlaySlotPropsFromItemsReordering {} +} diff --git a/packages/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.utils.ts b/packages/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.utils.ts new file mode 100644 index 000000000000..bfd7f19a3ba8 --- /dev/null +++ b/packages/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.utils.ts @@ -0,0 +1,199 @@ +import { + TreeViewInstance, + UseTreeViewItemsSignature, + UseTreeViewItemsState, + buildSiblingIndexes, + TREE_VIEW_ROOT_PARENT_ID, +} from '@mui/x-tree-view/internals'; +import { TreeViewItemId, TreeViewItemsReorderingAction } from '@mui/x-tree-view/models'; +import { + TreeViewItemItemReorderingValidActions, + TreeViewItemReorderPosition, +} from './useTreeViewItemsReordering.types'; + +/** + * Checks if the item with the id itemIdB is an ancestor of the item with the id itemIdA. + */ +export const isAncestor = ( + instance: TreeViewInstance<[UseTreeViewItemsSignature]>, + itemIdA: string, + itemIdB: string, +): boolean => { + const itemMetaA = instance.getItemMeta(itemIdA); + if (itemMetaA.parentId === itemIdB) { + return true; + } + + if (itemMetaA.parentId == null) { + return false; + } + + return isAncestor(instance, itemMetaA.parentId, itemIdB); +}; + +/** + * Transforms a CSS string `itemChildrenIndentation` into a number representing the indentation in number. + * @param {string | null} itemChildrenIndentation The indentation as passed to the `itemChildrenIndentation` prop. + * @param {HTMLElement} contentElement The DOM element to which the indentation will be applied. + */ +const parseItemChildrenIndentation = ( + itemChildrenIndentation: string | number, + contentElement: HTMLElement, +) => { + if (typeof itemChildrenIndentation === 'number') { + return itemChildrenIndentation; + } + + const pixelExec = /^(\d.+)(px)$/.exec(itemChildrenIndentation); + if (pixelExec) { + return parseFloat(pixelExec[1]); + } + + // If the format is neither `px` nor a number, we need to measure the indentation using an actual DOM element. + const tempElement = document.createElement('div'); + tempElement.style.width = itemChildrenIndentation; + tempElement.style.position = 'absolute'; + contentElement.appendChild(tempElement); + const value = tempElement.offsetWidth; + contentElement.removeChild(tempElement); + + return value; +}; + +interface GetNewPositionParams { + itemChildrenIndentation: string | number; + validActions: TreeViewItemItemReorderingValidActions; + targetHeight: number; + targetDepth: number; + cursorY: number; + cursorX: number; + contentElement: HTMLDivElement; +} + +export const chooseActionToApply = ({ + itemChildrenIndentation, + validActions, + targetHeight, + targetDepth, + cursorX, + cursorY, + contentElement, +}: GetNewPositionParams) => { + let action: TreeViewItemsReorderingAction | null; + + const itemChildrenIndentationPx = parseItemChildrenIndentation( + itemChildrenIndentation, + contentElement, + ); + // If we can move the item to the parent of the target, then we allocate the left offset to this action + // Support moving to other ancestors + if (validActions['move-to-parent'] && cursorX < itemChildrenIndentationPx * targetDepth) { + action = 'move-to-parent'; + } + + // If we can move the item inside the target, then we have the following split: + // - the upper quarter of the target moves it above + // - the lower quarter of the target moves it below + // - the inner half makes it a child + else if (validActions['make-child']) { + if (validActions['reorder-above'] && cursorY < (1 / 4) * targetHeight) { + action = 'reorder-above'; + } else if (validActions['reorder-below'] && cursorY > (3 / 4) * targetHeight) { + action = 'reorder-below'; + } else { + action = 'make-child'; + } + } + // If we can't move the item inside the target, then we have the following split: + // - the upper half of the target moves it above + // - the lower half of the target moves it below + else { + // eslint-disable-next-line no-lonely-if + if (validActions['reorder-above'] && cursorY < (1 / 2) * targetHeight) { + action = 'reorder-above'; + } else if (validActions['reorder-below'] && cursorY >= (1 / 2) * targetHeight) { + action = 'reorder-below'; + } else { + action = null; + } + } + + return action; +}; + +export const moveItemInTree = ({ + itemToMoveId, + oldPosition, + newPosition, + prevState, +}: { + itemToMoveId: TreeViewItemId; + oldPosition: TreeViewItemReorderPosition; + newPosition: TreeViewItemReorderPosition; + prevState: UseTreeViewItemsState['items']; +}): UseTreeViewItemsState['items'] => { + const itemToMoveMeta = prevState.itemMetaMap[itemToMoveId]; + + const oldParentId = oldPosition.parentId ?? TREE_VIEW_ROOT_PARENT_ID; + const newParentId = newPosition.parentId ?? TREE_VIEW_ROOT_PARENT_ID; + + // 1. Update the `itemOrderedChildrenIds`. + const itemOrderedChildrenIds = { ...prevState.itemOrderedChildrenIds }; + if (oldParentId === newParentId) { + const updatedChildren = [...itemOrderedChildrenIds[oldParentId]]; + updatedChildren.splice(oldPosition.index, 1); + updatedChildren.splice(newPosition.index, 0, itemToMoveId); + itemOrderedChildrenIds[itemToMoveMeta.parentId ?? TREE_VIEW_ROOT_PARENT_ID] = updatedChildren; + } else { + const updatedOldParentChildren = [...itemOrderedChildrenIds[oldParentId]]; + updatedOldParentChildren.splice(oldPosition.index, 1); + itemOrderedChildrenIds[oldParentId] = updatedOldParentChildren; + + const updatedNewParentChildren = [...(itemOrderedChildrenIds[newParentId] ?? [])]; + updatedNewParentChildren.splice(newPosition.index, 0, itemToMoveId); + itemOrderedChildrenIds[newParentId] = updatedNewParentChildren; + } + + // 2. Update the `itemChildrenIndexes` + const itemChildrenIndexes = { ...prevState.itemChildrenIndexes }; + itemChildrenIndexes[oldParentId] = buildSiblingIndexes(itemOrderedChildrenIds[oldParentId]); + if (newParentId !== oldParentId) { + itemChildrenIndexes[newParentId] = buildSiblingIndexes(itemOrderedChildrenIds[newParentId]); + } + + // 3. Update the `itemMetaMap` + const itemMetaMap = { ...prevState.itemMetaMap }; + + // 3.1 Update the `expandable` property of the old and the new parent + if (oldParentId !== TREE_VIEW_ROOT_PARENT_ID && oldParentId !== newParentId) { + itemMetaMap[oldParentId].expandable = itemOrderedChildrenIds[oldParentId].length > 0; + } + if (newParentId !== TREE_VIEW_ROOT_PARENT_ID && newParentId !== oldParentId) { + itemMetaMap[newParentId].expandable = itemOrderedChildrenIds[newParentId].length > 0; + } + + // 3.2 Update the `parentId` and `depth` properties of the item to move + // The depth is always defined because drag&drop is only usable with Rich Tree View components. + const itemToMoveDepth = newPosition.parentId == null ? 0 : itemMetaMap[newParentId].depth! + 1; + itemMetaMap[itemToMoveId] = { + ...itemToMoveMeta, + parentId: newPosition.parentId, + depth: itemToMoveDepth, + }; + + // 3.3 Update the depth of all the children of the item to move + const updateItemDepth = (itemId: string, depth: number) => { + itemMetaMap[itemId] = { ...itemMetaMap[itemId], depth }; + itemOrderedChildrenIds[itemId]?.forEach((childId) => updateItemDepth(childId, depth + 1)); + }; + itemOrderedChildrenIds[itemToMoveId]?.forEach((childId) => + updateItemDepth(childId, itemToMoveDepth + 1), + ); + + return { + ...prevState, + itemOrderedChildrenIds, + itemChildrenIndexes, + itemMetaMap, + }; +}; diff --git a/packages/x-tree-view/package.json b/packages/x-tree-view/package.json index 0dbfdfef5451..900ba5e3db75 100644 --- a/packages/x-tree-view/package.json +++ b/packages/x-tree-view/package.json @@ -1,6 +1,6 @@ { "name": "@mui/x-tree-view", - "version": "7.11.0", + "version": "7.11.1", "description": "The community edition of the Tree View components (MUI X).", "author": "MUI Team", "main": "src/index.ts", @@ -43,10 +43,9 @@ "directory": "packages/x-tree-view" }, "dependencies": { - "@babel/runtime": "^7.24.8", - "@mui/base": "^5.0.0-beta.40", - "@mui/system": "^5.16.2", - "@mui/utils": "^5.16.2", + "@babel/runtime": "^7.25.0", + "@mui/system": "^5.16.5", + "@mui/utils": "^5.16.5", "@mui/x-internals": "workspace:*", "@types/react-transition-group": "^4.4.10", "clsx": "^2.1.1", @@ -61,9 +60,9 @@ "react-dom": "^17.0.0 || ^18.0.0" }, "devDependencies": { - "@mui/internal-test-utils": "^1.0.4", + "@mui/internal-test-utils": "^1.0.5", "@types/prop-types": "^15.7.12", - "rimraf": "^5.0.8" + "rimraf": "^5.0.9" }, "engines": { "node": ">=14.0.0" diff --git a/packages/x-tree-view/src/RichTreeView/RichTreeView.tsx b/packages/x-tree-view/src/RichTreeView/RichTreeView.tsx index 753d3cde0668..6eb825d49fa1 100644 --- a/packages/x-tree-view/src/RichTreeView/RichTreeView.tsx +++ b/packages/x-tree-view/src/RichTreeView/RichTreeView.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import composeClasses from '@mui/utils/composeClasses'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import { getRichTreeViewUtilityClass } from './richTreeViewClasses'; import { RichTreeViewProps } from './RichTreeView.types'; import { styled, createUseThemeProps } from '../internals/zero-styled'; @@ -9,7 +9,7 @@ import { useTreeView } from '../internals/useTreeView'; import { TreeViewProvider } from '../internals/TreeViewProvider'; import { RICH_TREE_VIEW_PLUGINS, RichTreeViewPluginSignatures } from './RichTreeView.plugins'; import { TreeItem, TreeItemProps } from '../TreeItem'; -import { buildWarning } from '../internals/utils/warning'; +import { warnOnce } from '../internals/utils/warning'; const useThemeProps = createUseThemeProps('MuiRichTreeView'); @@ -61,12 +61,6 @@ function WrappedTreeItem({ return {children}; } -const childrenWarning = buildWarning([ - 'MUI X: The `RichTreeView` component does not support JSX children.', - 'If you want to add items, you need to use the `items` prop', - 'Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/items/', -]); - /** * * Demos: @@ -85,7 +79,11 @@ const RichTreeView = React.forwardRef(function RichTreeView< if (process.env.NODE_ENV !== 'production') { if ((props as any).children != null) { - childrenWarning(); + warnOnce([ + 'MUI X: The `RichTreeView` component does not support JSX children.', + 'If you want to add items, you need to use the `items` prop.', + 'Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/items/.', + ]); } } @@ -256,6 +254,12 @@ RichTreeView.propTypes = { * @param {array} itemIds The ids of the expanded items. */ onExpandedItemsChange: PropTypes.func, + /** + * Callback fired when the `content` slot of a given tree item is clicked. + * @param {React.MouseEvent} event The DOM event that triggered the change. + * @param {string} itemId The id of the focused item. + */ + onItemClick: PropTypes.func, /** * Callback fired when a tree item is expanded or collapsed. * @param {React.SyntheticEvent} event The DOM event that triggered the change. @@ -264,10 +268,9 @@ RichTreeView.propTypes = { */ onItemExpansionToggle: PropTypes.func, /** - * Callback fired when tree items are focused. - * @param {React.SyntheticEvent} event The DOM event that triggered the change. **Warning**: This is a generic event not a focus event. + * Callback fired when a given tree item is focused. + * @param {React.SyntheticEvent | null} event The DOM event that triggered the change. **Warning**: This is a generic event not a focus event. * @param {string} itemId The id of the focused item. - * @param {string} value of the focused item. */ onItemFocus: PropTypes.func, /** diff --git a/packages/x-tree-view/src/RichTreeView/RichTreeView.types.ts b/packages/x-tree-view/src/RichTreeView/RichTreeView.types.ts index a1102b3f64e0..d229ed984215 100644 --- a/packages/x-tree-view/src/RichTreeView/RichTreeView.types.ts +++ b/packages/x-tree-view/src/RichTreeView/RichTreeView.types.ts @@ -1,7 +1,7 @@ import * as React from 'react'; import { Theme } from '@mui/material/styles'; import { SxProps } from '@mui/system'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import { RichTreeViewClasses } from './richTreeViewClasses'; import { RichTreeViewPluginParameters, diff --git a/packages/x-tree-view/src/SimpleTreeView/SimpleTreeView.tsx b/packages/x-tree-view/src/SimpleTreeView/SimpleTreeView.tsx index cac64b7acf05..b508c5f92bd4 100644 --- a/packages/x-tree-view/src/SimpleTreeView/SimpleTreeView.tsx +++ b/packages/x-tree-view/src/SimpleTreeView/SimpleTreeView.tsx @@ -1,14 +1,14 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import composeClasses from '@mui/utils/composeClasses'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import { styled, createUseThemeProps } from '../internals/zero-styled'; import { getSimpleTreeViewUtilityClass } from './simpleTreeViewClasses'; import { SimpleTreeViewProps } from './SimpleTreeView.types'; import { useTreeView } from '../internals/useTreeView'; import { TreeViewProvider } from '../internals/TreeViewProvider'; import { SIMPLE_TREE_VIEW_PLUGINS, SimpleTreeViewPluginSignatures } from './SimpleTreeView.plugins'; -import { buildWarning } from '../internals/utils/warning'; +import { warnOnce } from '../internals/utils/warning'; const useThemeProps = createUseThemeProps('MuiSimpleTreeView'); @@ -42,12 +42,6 @@ type SimpleTreeViewComponent = ((); const depthContext = React.useContext(TreeViewItemDepthContext); @@ -217,9 +219,11 @@ export const TreeItem = React.forwardRef(function TreeItem( const { expanded, focused, selected, disabled, handleExpansion } = useTreeItemState(itemId); - const { contentRef, rootRef } = runItemPlugins(props); - const handleRootRef = useForkRef(inRef, rootRef); - const handleContentRef = useForkRef(ContentProps?.ref, contentRef); + const { contentRef, rootRef, propsEnhancers } = runItemPlugins(props); + const rootRefObject = React.useRef(null); + const contentRefObject = React.useRef(null); + const handleRootRef = useForkRef(inRef, rootRef, rootRefObject); + const handleContentRef = useForkRef(ContentProps?.ref, contentRef, contentRefObject); const slots = { expandIcon: inSlots?.expandIcon ?? contextIcons.slots.expandIcon ?? TreeViewExpandIcon, @@ -350,6 +354,25 @@ export const TreeItem = React.forwardRef(function TreeItem( const idAttribute = instance.getTreeItemIdAttribute(itemId, id); const tabIndex = instance.canItemBeTabbed(itemId) ? 0 : -1; + const enhancedRootProps = + propsEnhancers.root?.({ + rootRefObject, + contentRefObject, + externalEventHandlers: extractEventHandlers(other), + }) ?? {}; + const enhancedContentProps = + propsEnhancers.content?.({ + rootRefObject, + contentRefObject, + externalEventHandlers: extractEventHandlers(ContentProps), + }) ?? {}; + const enhancedDragAndDropOverlayProps = + propsEnhancers.dragAndDropOverlay?.({ + rootRefObject, + contentRefObject, + externalEventHandlers: {}, + }) ?? {}; + return ( {children && ( diff --git a/packages/x-tree-view/src/TreeItem/TreeItem.types.ts b/packages/x-tree-view/src/TreeItem/TreeItem.types.ts index 0e2a66d0565a..41dcfe6960f5 100644 --- a/packages/x-tree-view/src/TreeItem/TreeItem.types.ts +++ b/packages/x-tree-view/src/TreeItem/TreeItem.types.ts @@ -1,6 +1,6 @@ import * as React from 'react'; import { Theme } from '@mui/material/styles'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import { TransitionProps } from '@mui/material/transitions'; import { SxProps } from '@mui/system'; import { TreeItemContentProps } from './TreeItemContent'; diff --git a/packages/x-tree-view/src/TreeItem/TreeItemContent.tsx b/packages/x-tree-view/src/TreeItem/TreeItemContent.tsx index c04b65ed08ea..686d7d9c88a5 100644 --- a/packages/x-tree-view/src/TreeItem/TreeItemContent.tsx +++ b/packages/x-tree-view/src/TreeItem/TreeItemContent.tsx @@ -3,6 +3,10 @@ import PropTypes from 'prop-types'; import clsx from 'clsx'; import Checkbox from '@mui/material/Checkbox'; import { useTreeItemState } from './useTreeItemState'; +import { + TreeItem2DragAndDropOverlay, + TreeItem2DragAndDropOverlayProps, +} from '../TreeItem2DragAndDropOverlay'; export interface TreeItemContentProps extends React.HTMLAttributes { className?: string; @@ -47,6 +51,7 @@ export interface TreeItemContentProps extends React.HTMLAttributes * The icon to display next to the tree item's label. Either a parent or end icon. */ displayIcon?: React.ReactNode; + dragAndDropOverlayProps?: TreeItem2DragAndDropOverlayProps; } export type TreeItemContentClassKey = keyof NonNullable; @@ -68,6 +73,7 @@ const TreeItemContent = React.forwardRef(function TreeItemContent( itemId, onClick, onMouseDown, + dragAndDropOverlayProps, ...other } = props; @@ -81,6 +87,7 @@ const TreeItemContent = React.forwardRef(function TreeItemContent( handleExpansion, handleSelection, handleCheckboxSelection, + handleContentClick, preventSelection, expansionTrigger, } = useTreeItemState(itemId); @@ -97,6 +104,8 @@ const TreeItemContent = React.forwardRef(function TreeItemContent( }; const handleClick = (event: React.MouseEvent) => { + handleContentClick?.(event, itemId); + if (checkboxRef.current?.contains(event.target as HTMLElement)) { return; } @@ -141,6 +150,7 @@ const TreeItemContent = React.forwardRef(function TreeItemContent( )}
{label}
+ {dragAndDropOverlayProps && } ); }); @@ -159,6 +169,10 @@ TreeItemContent.propTypes = { * The icon to display next to the tree item's label. Either a parent or end icon. */ displayIcon: PropTypes.node, + dragAndDropOverlayProps: PropTypes.shape({ + action: PropTypes.oneOf(['make-child', 'move-to-parent', 'reorder-above', 'reorder-below']), + style: PropTypes.object, + }), /** * The icon to display next to the tree item's label. Either an expansion or collapse icon. */ diff --git a/packages/x-tree-view/src/TreeItem/treeItemClasses.ts b/packages/x-tree-view/src/TreeItem/treeItemClasses.ts index ceff7c2a2ca6..a8ac533418c6 100644 --- a/packages/x-tree-view/src/TreeItem/treeItemClasses.ts +++ b/packages/x-tree-view/src/TreeItem/treeItemClasses.ts @@ -22,6 +22,8 @@ export interface TreeItemClasses { label: string; /** Styles applied to the checkbox element. */ checkbox: string; + /** Styles applied to the drag and drop overlay. */ + dragAndDropOverlay: string; } export type TreeItemClassKey = keyof TreeItemClasses; @@ -41,4 +43,5 @@ export const treeItemClasses: TreeItemClasses = generateUtilityClasses('MuiTreeI 'iconContainer', 'label', 'checkbox', + 'dragAndDropOverlay', ]); diff --git a/packages/x-tree-view/src/TreeItem/useTreeItemState.ts b/packages/x-tree-view/src/TreeItem/useTreeItemState.ts index 531f340b62c2..7f41a5ad7dcc 100644 --- a/packages/x-tree-view/src/TreeItem/useTreeItemState.ts +++ b/packages/x-tree-view/src/TreeItem/useTreeItemState.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { useTreeViewContext } from '../internals/TreeViewProvider/useTreeViewContext'; +import { useTreeViewContext } from '../internals/TreeViewProvider'; import { UseTreeViewSelectionSignature } from '../internals/plugins/useTreeViewSelection'; import { UseTreeViewExpansionSignature } from '../internals/plugins/useTreeViewExpansion'; import { UseTreeViewFocusSignature } from '../internals/plugins/useTreeViewFocus'; @@ -17,6 +17,7 @@ type UseTreeItemStateOptionalPlugins = readonly []; export function useTreeItemState(itemId: string) { const { instance, + items: { onItemClick }, selection: { multiSelect, checkboxSelection, disableSelection }, expansion: { expansionTrigger }, } = useTreeViewContext(); @@ -96,6 +97,7 @@ export function useTreeItemState(itemId: string) { handleExpansion, handleSelection, handleCheckboxSelection, + handleContentClick: onItemClick, preventSelection, expansionTrigger, }; diff --git a/packages/x-tree-view/src/TreeItem2/TreeItem2.tsx b/packages/x-tree-view/src/TreeItem2/TreeItem2.tsx index 3f429e6a5860..a1f72bfc089d 100644 --- a/packages/x-tree-view/src/TreeItem2/TreeItem2.tsx +++ b/packages/x-tree-view/src/TreeItem2/TreeItem2.tsx @@ -5,7 +5,7 @@ import unsupportedProp from '@mui/utils/unsupportedProp'; import { alpha } from '@mui/material/styles'; import Collapse from '@mui/material/Collapse'; import MuiCheckbox, { CheckboxProps } from '@mui/material/Checkbox'; -import { useSlotProps } from '@mui/base/utils'; +import useSlotProps from '@mui/utils/useSlotProps'; import { shouldForwardProp } from '@mui/system/createStyled'; import composeClasses from '@mui/utils/composeClasses'; import { styled, createUseThemeProps } from '../internals/zero-styled'; @@ -17,6 +17,7 @@ import { } from '../useTreeItem2'; import { getTreeItemUtilityClass } from '../TreeItem'; import { TreeItem2Icon } from '../TreeItem2Icon'; +import { TreeItem2DragAndDropOverlay } from '../TreeItem2DragAndDropOverlay'; import { TreeItem2Provider } from '../TreeItem2Provider'; const useThemeProps = createUseThemeProps('MuiTreeItem2'); @@ -43,6 +44,7 @@ export const TreeItem2Content = styled('div', { borderRadius: theme.shape.borderRadius, width: '100%', boxSizing: 'border-box', // prevent width + padding to overflow + position: 'relative', display: 'flex', alignItems: 'center', gap: theme.spacing(1), @@ -187,6 +189,7 @@ const useUtilityClasses = (ownerState: TreeItem2OwnerState) => { checkbox: ['checkbox'], label: ['label'], groupTransition: ['groupTransition'], + dragAndDropOverlay: ['dragAndDropOverlay'], }; return composeClasses(slots, getTreeItemUtilityClass, classes); @@ -221,6 +224,7 @@ export const TreeItem2 = React.forwardRef(function TreeItem2( getCheckboxProps, getLabelProps, getGroupTransitionProps, + getDragAndDropOverlayProps, status, } = useTreeItem2({ id, @@ -299,6 +303,16 @@ export const TreeItem2 = React.forwardRef(function TreeItem2( className: classes.groupTransition, }); + const DragAndDropOverlay: React.ElementType | undefined = + slots.dragAndDropOverlay ?? TreeItem2DragAndDropOverlay; + const dragAndDropOverlayProps = useSlotProps({ + elementType: DragAndDropOverlay, + getSlotProps: getDragAndDropOverlayProps, + externalSlotProps: slotProps.dragAndDropOverlay, + ownerState: {}, + className: classes.dragAndDropOverlay, + }); + return ( @@ -308,6 +322,7 @@ export const TreeItem2 = React.forwardRef(function TreeItem2( diff --git a/packages/x-tree-view/src/TreeItem2/TreeItem2.types.ts b/packages/x-tree-view/src/TreeItem2/TreeItem2.types.ts index 697a62ab17df..a82f1ec7b75f 100644 --- a/packages/x-tree-view/src/TreeItem2/TreeItem2.types.ts +++ b/packages/x-tree-view/src/TreeItem2/TreeItem2.types.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import { UseTreeItem2Parameters, UseTreeItem2Status } from '../useTreeItem2'; import { TreeItemClasses } from '../TreeItem'; import { TreeItem2IconSlotProps, TreeItem2IconSlots } from '../TreeItem2Icon'; @@ -37,6 +37,12 @@ export interface TreeItem2Slots extends TreeItem2IconSlots { * @default TreeItem2Label */ label?: React.ElementType; + /** + * The component that renders the overlay when an item reordering is ongoing. + * Warning: This slot is only useful when using the `RichTreeViewPro` component. + * @default TreeItem2DragAndDropOverlay + */ + dragAndDropOverlay?: React.ElementType; } export interface TreeItem2SlotProps extends TreeItem2IconSlotProps { @@ -46,6 +52,7 @@ export interface TreeItem2SlotProps extends TreeItem2IconSlotProps { iconContainer?: SlotComponentProps<'div', {}, {}>; checkbox?: SlotComponentProps<'button', {}, {}>; label?: SlotComponentProps<'div', {}, {}>; + dragAndDropOverlay?: SlotComponentProps<'div', {}, {}>; } export interface TreeItem2Props diff --git a/packages/x-tree-view/src/TreeItem2DragAndDropOverlay/TreeItem2DragAndDropOverlay.tsx b/packages/x-tree-view/src/TreeItem2DragAndDropOverlay/TreeItem2DragAndDropOverlay.tsx new file mode 100644 index 000000000000..a435c62372f8 --- /dev/null +++ b/packages/x-tree-view/src/TreeItem2DragAndDropOverlay/TreeItem2DragAndDropOverlay.tsx @@ -0,0 +1,72 @@ +import * as React from 'react'; +import { alpha } from '@mui/material/styles'; +import { shouldForwardProp } from '@mui/system'; +import { TreeItem2DragAndDropOverlayProps } from './TreeItem2DragAndDropOverlay.types'; +import { TreeViewItemsReorderingAction } from '../models'; +import { styled } from '../internals/zero-styled'; + +const TreeItem2DragAndDropOverlayRoot = styled('div', { + name: 'MuiTreeItem2DragAndDropOverlay', + slot: 'Root', + overridesResolver: (props, styles) => styles.root, + shouldForwardProp: (prop) => shouldForwardProp(prop) && prop !== 'action', +})<{ action?: TreeViewItemsReorderingAction | null }>(({ theme }) => ({ + position: 'absolute', + left: 0, + display: 'flex', + top: 0, + bottom: 0, + right: 0, + pointerEvents: 'none', + variants: [ + { + props: { action: 'make-child' }, + style: { + marginLeft: 'calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))', + borderRadius: theme.shape.borderRadius, + backgroundColor: alpha((theme.vars || theme).palette.primary.dark, 0.15), + }, + }, + { + props: { action: 'reorder-above' }, + style: { + marginLeft: 'calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))', + borderTop: `1px solid ${alpha((theme.vars || theme).palette.grey[900], 0.6)}`, + ...(theme.palette.mode === 'dark' && { + borderTop: `1px solid ${alpha((theme.vars || theme).palette.grey[100], 0.6)}`, + }), + }, + }, + { + props: { action: 'reorder-below' }, + style: { + marginLeft: 'calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))', + borderBottom: `1px solid ${alpha((theme.vars || theme).palette.grey[900], 0.6)}`, + ...(theme.palette.mode === 'dark' && { + borderBottom: `1px solid ${alpha((theme.vars || theme).palette.grey[100], 0.6)}`, + }), + }, + }, + { + props: { action: 'move-to-parent' }, + style: { + marginLeft: + 'calc(var(--TreeView-indentMultiplier) * calc(var(--TreeView-itemDepth) - 1))' as any, + borderBottom: `1px solid ${alpha((theme.vars || theme).palette.grey[900], 0.6)}`, + ...(theme.palette.mode === 'dark' && { + borderBottom: `1px solid ${alpha((theme.vars || theme).palette.grey[900], 0.6)}`, + }), + }, + }, + ], +})); + +function TreeItem2DragAndDropOverlay(props: TreeItem2DragAndDropOverlayProps) { + if (props.action == null) { + return null; + } + + return ; +} + +export { TreeItem2DragAndDropOverlay }; diff --git a/packages/x-tree-view/src/TreeItem2DragAndDropOverlay/TreeItem2DragAndDropOverlay.types.ts b/packages/x-tree-view/src/TreeItem2DragAndDropOverlay/TreeItem2DragAndDropOverlay.types.ts new file mode 100644 index 000000000000..a2b3b4d22468 --- /dev/null +++ b/packages/x-tree-view/src/TreeItem2DragAndDropOverlay/TreeItem2DragAndDropOverlay.types.ts @@ -0,0 +1,7 @@ +import * as React from 'react'; +import { TreeViewItemsReorderingAction } from '../models'; + +export interface TreeItem2DragAndDropOverlayProps { + action?: TreeViewItemsReorderingAction; + style?: React.CSSProperties; +} diff --git a/packages/x-tree-view/src/TreeItem2DragAndDropOverlay/index.ts b/packages/x-tree-view/src/TreeItem2DragAndDropOverlay/index.ts new file mode 100644 index 000000000000..548f1827a8bc --- /dev/null +++ b/packages/x-tree-view/src/TreeItem2DragAndDropOverlay/index.ts @@ -0,0 +1,2 @@ +export { TreeItem2DragAndDropOverlay } from './TreeItem2DragAndDropOverlay'; +export type { TreeItem2DragAndDropOverlayProps } from './TreeItem2DragAndDropOverlay.types'; diff --git a/packages/x-tree-view/src/TreeItem2Icon/TreeItem2Icon.tsx b/packages/x-tree-view/src/TreeItem2Icon/TreeItem2Icon.tsx index 6247cbb4dcab..b07e292a9aaa 100644 --- a/packages/x-tree-view/src/TreeItem2Icon/TreeItem2Icon.tsx +++ b/packages/x-tree-view/src/TreeItem2Icon/TreeItem2Icon.tsx @@ -1,8 +1,9 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import { resolveComponentProps, useSlotProps } from '@mui/base/utils'; +import resolveComponentProps from '@mui/utils/resolveComponentProps'; +import useSlotProps from '@mui/utils/useSlotProps'; import { TreeItem2IconProps } from './TreeItem2Icon.types'; -import { useTreeViewContext } from '../internals/TreeViewProvider/useTreeViewContext'; +import { useTreeViewContext } from '../internals/TreeViewProvider'; import { UseTreeViewIconsSignature } from '../internals/plugins/useTreeViewIcons'; import { TreeViewCollapseIcon, TreeViewExpandIcon } from '../icons'; diff --git a/packages/x-tree-view/src/TreeItem2Icon/TreeItem2Icon.types.ts b/packages/x-tree-view/src/TreeItem2Icon/TreeItem2Icon.types.ts index eca8d8da6012..cd66abb4f8a2 100644 --- a/packages/x-tree-view/src/TreeItem2Icon/TreeItem2Icon.types.ts +++ b/packages/x-tree-view/src/TreeItem2Icon/TreeItem2Icon.types.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import { UseTreeItem2Status } from '../useTreeItem2'; export interface TreeItem2IconSlots { diff --git a/packages/x-tree-view/src/TreeItem2Provider/TreeItem2Provider.tsx b/packages/x-tree-view/src/TreeItem2Provider/TreeItem2Provider.tsx index 2b5387522cef..ad586535f16f 100644 --- a/packages/x-tree-view/src/TreeItem2Provider/TreeItem2Provider.tsx +++ b/packages/x-tree-view/src/TreeItem2Provider/TreeItem2Provider.tsx @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import { TreeItem2ProviderProps } from './TreeItem2Provider.types'; -import { useTreeViewContext } from '../internals/TreeViewProvider/useTreeViewContext'; +import { useTreeViewContext } from '../internals/TreeViewProvider'; function TreeItem2Provider(props: TreeItem2ProviderProps) { const { children, itemId } = props; diff --git a/packages/x-tree-view/src/TreeView/TreeView.tsx b/packages/x-tree-view/src/TreeView/TreeView.tsx index b5c09b361f67..ad40046fb705 100644 --- a/packages/x-tree-view/src/TreeView/TreeView.tsx +++ b/packages/x-tree-view/src/TreeView/TreeView.tsx @@ -178,6 +178,12 @@ TreeView.propTypes = { * @param {array} itemIds The ids of the expanded items. */ onExpandedItemsChange: PropTypes.func, + /** + * Callback fired when the `content` slot of a given tree item is clicked. + * @param {React.MouseEvent} event The DOM event that triggered the change. + * @param {string} itemId The id of the focused item. + */ + onItemClick: PropTypes.func, /** * Callback fired when a tree item is expanded or collapsed. * @param {React.SyntheticEvent} event The DOM event that triggered the change. @@ -186,10 +192,9 @@ TreeView.propTypes = { */ onItemExpansionToggle: PropTypes.func, /** - * Callback fired when tree items are focused. - * @param {React.SyntheticEvent} event The DOM event that triggered the change. **Warning**: This is a generic event not a focus event. + * Callback fired when a given tree item is focused. + * @param {React.SyntheticEvent | null} event The DOM event that triggered the change. **Warning**: This is a generic event not a focus event. * @param {string} itemId The id of the focused item. - * @param {string} value of the focused item. */ onItemFocus: PropTypes.func, /** diff --git a/packages/x-tree-view/src/hooks/useTreeItem2Utils/useTreeItem2Utils.tsx b/packages/x-tree-view/src/hooks/useTreeItem2Utils/useTreeItem2Utils.tsx index ab33dc1eb1a8..b7b3b99bf501 100644 --- a/packages/x-tree-view/src/hooks/useTreeItem2Utils/useTreeItem2Utils.tsx +++ b/packages/x-tree-view/src/hooks/useTreeItem2Utils/useTreeItem2Utils.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { useTreeViewContext } from '../../internals/TreeViewProvider/useTreeViewContext'; +import { useTreeViewContext } from '../../internals/TreeViewProvider'; import { UseTreeViewSelectionSignature } from '../../internals/plugins/useTreeViewSelection'; import { UseTreeViewExpansionSignature } from '../../internals/plugins/useTreeViewExpansion'; import { UseTreeViewItemsSignature } from '../../internals/plugins/useTreeViewItems'; diff --git a/packages/x-tree-view/src/internals/TreeViewProvider/index.ts b/packages/x-tree-view/src/internals/TreeViewProvider/index.ts index ffee8fb725aa..e5f68e1bc90c 100644 --- a/packages/x-tree-view/src/internals/TreeViewProvider/index.ts +++ b/packages/x-tree-view/src/internals/TreeViewProvider/index.ts @@ -1,4 +1,5 @@ export { TreeViewProvider } from './TreeViewProvider'; +export { useTreeViewContext } from './useTreeViewContext'; export type { TreeViewProviderProps, TreeViewContextValue, diff --git a/packages/x-tree-view/src/internals/index.ts b/packages/x-tree-view/src/internals/index.ts index 09cddc526a7c..a17a5f7a414d 100644 --- a/packages/x-tree-view/src/internals/index.ts +++ b/packages/x-tree-view/src/internals/index.ts @@ -1,5 +1,5 @@ export { useTreeView } from './useTreeView'; -export { TreeViewProvider } from './TreeViewProvider'; +export { TreeViewProvider, useTreeViewContext } from './TreeViewProvider'; export { unstable_resetCleanupTracking } from './hooks/useInstanceEventHandler'; @@ -10,6 +10,12 @@ export type { MergeSignaturesProperty, TreeViewPublicAPI, TreeViewExperimentalFeatures, + TreeViewItemMeta, + TreeViewInstance, + DefaultizedProps, + TreeViewItemPlugin, + MuiCancellableEvent, + MuiCancellableEventHandler, } from './models'; // Core plugins @@ -38,10 +44,15 @@ export type { UseTreeViewIconsSignature, UseTreeViewIconsParameters, } from './plugins/useTreeViewIcons'; -export { useTreeViewItems } from './plugins/useTreeViewItems'; +export { + useTreeViewItems, + buildSiblingIndexes, + TREE_VIEW_ROOT_PARENT_ID, +} from './plugins/useTreeViewItems'; export type { UseTreeViewItemsSignature, UseTreeViewItemsParameters, + UseTreeViewItemsState, } from './plugins/useTreeViewItems'; export { useTreeViewJSXItems } from './plugins/useTreeViewJSXItems'; export type { @@ -49,4 +60,5 @@ export type { UseTreeViewJSXItemsParameters, } from './plugins/useTreeViewJSXItems'; -export { buildWarning } from './utils/warning'; +export { isTargetInDescendants } from './utils/tree'; +export { warnOnce } from './utils/warning'; diff --git a/packages/x-tree-view/src/internals/models/index.ts b/packages/x-tree-view/src/internals/models/index.ts index 37098f979a24..7478186e4ea9 100644 --- a/packages/x-tree-view/src/internals/models/index.ts +++ b/packages/x-tree-view/src/internals/models/index.ts @@ -1,3 +1,5 @@ export * from './helpers'; export * from './plugin'; +export * from './itemPlugin'; export * from './treeView'; +export * from './MuiCancellableEvent'; diff --git a/packages/x-tree-view/src/internals/models/itemPlugin.ts b/packages/x-tree-view/src/internals/models/itemPlugin.ts new file mode 100644 index 000000000000..2356e8deeb68 --- /dev/null +++ b/packages/x-tree-view/src/internals/models/itemPlugin.ts @@ -0,0 +1,51 @@ +import * as React from 'react'; +import { EventHandlers } from '@mui/utils'; +import type { + UseTreeItem2ContentSlotOwnProps, + UseTreeItem2DragAndDropOverlaySlotOwnProps, + UseTreeItem2RootSlotOwnProps, +} from '../../useTreeItem2'; + +export interface TreeViewItemPluginSlotPropsEnhancerParams { + rootRefObject: React.MutableRefObject; + contentRefObject: React.MutableRefObject; + externalEventHandlers: EventHandlers; +} + +type TreeViewItemPluginSlotPropsEnhancer = ( + params: TreeViewItemPluginSlotPropsEnhancerParams, +) => Partial; + +export interface TreeViewItemPluginSlotPropsEnhancers { + root?: TreeViewItemPluginSlotPropsEnhancer; + content?: TreeViewItemPluginSlotPropsEnhancer; + dragAndDropOverlay?: TreeViewItemPluginSlotPropsEnhancer; +} + +export interface TreeViewItemPluginResponse { + /** + * Root of the `content` slot enriched by the plugin. + */ + contentRef?: React.RefCallback | null; + /** + * Ref of the `root` slot enriched by the plugin + */ + rootRef?: React.RefCallback | null; + /** + * Callback to enhance the slot props of the Tree Item. + * + * Not all slots are enabled by default, + * if a new plugin needs to pass to an unconfigured slot, + * it just needs to be added to `TreeViewItemPluginSlotPropsEnhancers` + */ + propsEnhancers?: TreeViewItemPluginSlotPropsEnhancers; +} + +export interface TreeViewItemPluginOptions + extends Omit { + props: TProps; +} + +export type TreeViewItemPlugin = ( + options: TreeViewItemPluginOptions, +) => void | TreeViewItemPluginResponse; diff --git a/packages/x-tree-view/src/internals/models/plugin.ts b/packages/x-tree-view/src/internals/models/plugin.ts index 03d91239fbcb..9dda02da7565 100644 --- a/packages/x-tree-view/src/internals/models/plugin.ts +++ b/packages/x-tree-view/src/internals/models/plugin.ts @@ -1,9 +1,10 @@ import * as React from 'react'; -import { EventHandlers } from '@mui/base/utils'; +import { EventHandlers } from '@mui/utils'; import { TreeViewExperimentalFeatures, TreeViewInstance, TreeViewModel } from './treeView'; import type { MergeSignaturesProperty, OptionalIfEmpty } from './helpers'; import { TreeViewEventLookupElement } from './events'; import type { TreeViewCorePluginSignatures } from '../corePlugins'; +import { TreeViewItemPlugin } from './itemPlugin'; import { TreeViewItemId } from '../../models'; export interface TreeViewPluginOptions { @@ -136,25 +137,6 @@ export type TreeViewUsedModels = export type TreeViewUsedEvents = TSignature['events'] & MergeSignaturesProperty, 'events'>; -export interface TreeViewItemPluginOptions extends TreeViewItemPluginResponse { - props: TProps; -} - -export interface TreeViewItemPluginResponse { - /** - * Root of the `content` slot enriched by the plugin. - */ - contentRef?: React.RefCallback | null; - /** - * Ref of the `root` slot enriched by the plugin - */ - rootRef?: React.RefCallback | null; -} - -export type TreeViewItemPlugin = ( - options: TreeViewItemPluginOptions, -) => void | TreeViewItemPluginResponse; - export type TreeItemWrapper = (params: { itemId: TreeViewItemId; children: React.ReactNode; diff --git a/packages/x-tree-view/src/internals/plugins/useTreeViewFocus/useTreeViewFocus.ts b/packages/x-tree-view/src/internals/plugins/useTreeViewFocus/useTreeViewFocus.ts index d2128d3c91b8..62cc95cb0912 100644 --- a/packages/x-tree-view/src/internals/plugins/useTreeViewFocus/useTreeViewFocus.ts +++ b/packages/x-tree-view/src/internals/plugins/useTreeViewFocus/useTreeViewFocus.ts @@ -1,6 +1,6 @@ import * as React from 'react'; import useEventCallback from '@mui/utils/useEventCallback'; -import { EventHandlers } from '@mui/base/utils'; +import { EventHandlers } from '@mui/utils'; import ownerDocument from '@mui/utils/ownerDocument'; import { TreeViewPlugin, TreeViewUsedInstance } from '../../models'; import { UseTreeViewFocusSignature } from './useTreeViewFocus.types'; diff --git a/packages/x-tree-view/src/internals/plugins/useTreeViewFocus/useTreeViewFocus.types.ts b/packages/x-tree-view/src/internals/plugins/useTreeViewFocus/useTreeViewFocus.types.ts index ec7c9d9958a5..9fb3d1038316 100644 --- a/packages/x-tree-view/src/internals/plugins/useTreeViewFocus/useTreeViewFocus.types.ts +++ b/packages/x-tree-view/src/internals/plugins/useTreeViewFocus/useTreeViewFocus.types.ts @@ -40,10 +40,9 @@ export interface UseTreeViewFocusInstance extends UseTreeViewFocusPublicAPI { export interface UseTreeViewFocusParameters { /** - * Callback fired when tree items are focused. - * @param {React.SyntheticEvent} event The DOM event that triggered the change. **Warning**: This is a generic event not a focus event. + * Callback fired when a given tree item is focused. + * @param {React.SyntheticEvent | null} event The DOM event that triggered the change. **Warning**: This is a generic event not a focus event. * @param {string} itemId The id of the focused item. - * @param {string} value of the focused item. */ onItemFocus?: (event: React.SyntheticEvent | null, itemId: string) => void; } diff --git a/packages/x-tree-view/src/internals/plugins/useTreeViewIcons/useTreeViewIcons.types.ts b/packages/x-tree-view/src/internals/plugins/useTreeViewIcons/useTreeViewIcons.types.ts index 5705fbbddaa0..a303f54a8410 100644 --- a/packages/x-tree-view/src/internals/plugins/useTreeViewIcons/useTreeViewIcons.types.ts +++ b/packages/x-tree-view/src/internals/plugins/useTreeViewIcons/useTreeViewIcons.types.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { SlotComponentProps } from '@mui/base/utils'; +import { SlotComponentProps } from '@mui/utils'; import { TreeViewPluginSignature } from '../../models'; import { UseTreeViewItemsSignature } from '../useTreeViewItems'; import { UseTreeViewSelectionSignature } from '../useTreeViewSelection'; diff --git a/packages/x-tree-view/src/internals/plugins/useTreeViewItems/index.ts b/packages/x-tree-view/src/internals/plugins/useTreeViewItems/index.ts index 63c1a5d694ce..b98e02587536 100644 --- a/packages/x-tree-view/src/internals/plugins/useTreeViewItems/index.ts +++ b/packages/x-tree-view/src/internals/plugins/useTreeViewItems/index.ts @@ -3,4 +3,6 @@ export type { UseTreeViewItemsSignature, UseTreeViewItemsParameters, UseTreeViewItemsDefaultizedParameters, + UseTreeViewItemsState, } from './useTreeViewItems.types'; +export { buildSiblingIndexes, TREE_VIEW_ROOT_PARENT_ID } from './useTreeViewItems.utils'; diff --git a/packages/x-tree-view/src/internals/plugins/useTreeViewItems/useTreeViewItems.test.tsx b/packages/x-tree-view/src/internals/plugins/useTreeViewItems/useTreeViewItems.test.tsx index 0c4f938375f1..7c2a65c072f6 100644 --- a/packages/x-tree-view/src/internals/plugins/useTreeViewItems/useTreeViewItems.test.tsx +++ b/packages/x-tree-view/src/internals/plugins/useTreeViewItems/useTreeViewItems.test.tsx @@ -183,6 +183,35 @@ describeTreeView< }); }); + describe('onItemClick prop', () => { + it('should call onItemClick when clicking on the content of an item', () => { + const onItemClick = spy(); + + const response = render({ + items: [{ id: '1' }], + onItemClick, + }); + + fireEvent.click(response.getItemContent('1')); + expect(onItemClick.callCount).to.equal(1); + expect(onItemClick.lastCall.lastArg).to.equal('1'); + }); + + it('should not call onItemClick for the ancestors on the clicked item', () => { + const onItemClick = spy(); + + const response = render({ + items: [{ id: '1', children: [{ id: '1.1' }] }], + defaultExpandedItems: ['1'], + onItemClick, + }); + + fireEvent.click(response.getItemContent('1.1')); + expect(onItemClick.callCount).to.equal(1); + expect(onItemClick.lastCall.lastArg).to.equal('1.1'); + }); + }); + describe('API methods', () => { describe('getItem', () => { // This method is only usable with Rich Tree View components diff --git a/packages/x-tree-view/src/internals/plugins/useTreeViewItems/useTreeViewItems.tsx b/packages/x-tree-view/src/internals/plugins/useTreeViewItems/useTreeViewItems.tsx index e5488fdc03e3..01ac6d4de49c 100644 --- a/packages/x-tree-view/src/internals/plugins/useTreeViewItems/useTreeViewItems.tsx +++ b/packages/x-tree-view/src/internals/plugins/useTreeViewItems/useTreeViewItems.tsx @@ -272,8 +272,11 @@ export const useTreeViewItems: TreeViewPlugin = ({ areItemUpdatesPrevented, }, contextValue: { - disabledItemsFocusable: params.disabledItemsFocusable, - indentationAtItemLevel: experimentalFeatures.indentationAtItemLevel ?? false, + items: { + onItemClick: params.onItemClick, + disabledItemsFocusable: params.disabledItemsFocusable, + indentationAtItemLevel: experimentalFeatures.indentationAtItemLevel ?? false, + }, }, }; }; @@ -307,5 +310,6 @@ useTreeViewItems.params = { isItemDisabled: true, getItemLabel: true, getItemId: true, + onItemClick: true, itemChildrenIndentation: true, }; diff --git a/packages/x-tree-view/src/internals/plugins/useTreeViewItems/useTreeViewItems.types.ts b/packages/x-tree-view/src/internals/plugins/useTreeViewItems/useTreeViewItems.types.ts index 266c5b00de4f..956f8861f4c4 100644 --- a/packages/x-tree-view/src/internals/plugins/useTreeViewItems/useTreeViewItems.types.ts +++ b/packages/x-tree-view/src/internals/plugins/useTreeViewItems/useTreeViewItems.types.ts @@ -1,3 +1,4 @@ +import * as React from 'react'; import { TreeViewItemMeta, DefaultizedProps, TreeViewPluginSignature } from '../../models'; import { TreeViewBaseItem, TreeViewItemId } from '../../../models'; @@ -25,6 +26,7 @@ export interface UseTreeViewItemsPublicAPI { /** * Get the ids of a given item's children. * Those ids are returned in the order they should be rendered. + * To get the root items, pass `null` as the `itemId`. * @param {TreeViewItemId | null} itemId The id of the item to get the children of. * @returns {TreeViewItemId[]} The ids of the item's children. */ @@ -84,7 +86,7 @@ export interface UseTreeViewItemsInstance extends UseTreeViewItems areItemUpdatesPrevented: () => boolean; } -export interface UseTreeViewItemsParameters { +export interface UseTreeViewItemsParameters { /** * If `true`, will allow focus on disabled items. * @default false @@ -116,6 +118,12 @@ export interface UseTreeViewItemsParameters { * @default (item) => item.id */ getItemId?: (item: R) => TreeViewItemId; + /** + * Callback fired when the `content` slot of a given tree item is clicked. + * @param {React.MouseEvent} event The DOM event that triggered the change. + * @param {string} itemId The id of the focused item. + */ + onItemClick?: (event: React.MouseEvent, itemId: string) => void; /** * Horizontal indentation between an item and its children. * Examples: 24, "24px", "2rem", "2em". @@ -124,7 +132,7 @@ export interface UseTreeViewItemsParameters { itemChildrenIndentation?: string | number; } -export type UseTreeViewItemsDefaultizedParameters = DefaultizedProps< +export type UseTreeViewItemsDefaultizedParameters = DefaultizedProps< UseTreeViewItemsParameters, 'disabledItemsFocusable' | 'itemChildrenIndentation' >; @@ -144,9 +152,13 @@ export interface UseTreeViewItemsState { }; } -interface UseTreeViewItemsContextValue - extends Pick, 'disabledItemsFocusable'> { - indentationAtItemLevel: boolean; +interface UseTreeViewItemsContextValue { + items: Pick< + UseTreeViewItemsDefaultizedParameters, + 'disabledItemsFocusable' | 'onItemClick' + > & { + indentationAtItemLevel: boolean; + }; } export type UseTreeViewItemsSignature = TreeViewPluginSignature<{ diff --git a/packages/x-tree-view/src/internals/plugins/useTreeViewJSXItems/useTreeViewJSXItems.tsx b/packages/x-tree-view/src/internals/plugins/useTreeViewJSXItems/useTreeViewJSXItems.tsx index 125fc300dd40..545a74bef743 100644 --- a/packages/x-tree-view/src/internals/plugins/useTreeViewJSXItems/useTreeViewJSXItems.tsx +++ b/packages/x-tree-view/src/internals/plugins/useTreeViewJSXItems/useTreeViewJSXItems.tsx @@ -5,7 +5,7 @@ import useEnhancedEffect from '@mui/utils/useEnhancedEffect'; import { TreeViewItemPlugin, TreeViewItemMeta, TreeViewPlugin } from '../../models'; import { UseTreeViewJSXItemsSignature } from './useTreeViewJSXItems.types'; import { publishTreeViewEvent } from '../../utils/publishTreeViewEvent'; -import { useTreeViewContext } from '../../TreeViewProvider/useTreeViewContext'; +import { useTreeViewContext } from '../../TreeViewProvider'; import { TreeViewChildrenItemContext, TreeViewChildrenItemProvider, diff --git a/packages/x-tree-view/src/internals/plugins/useTreeViewKeyboardNavigation/useTreeViewKeyboardNavigation.ts b/packages/x-tree-view/src/internals/plugins/useTreeViewKeyboardNavigation/useTreeViewKeyboardNavigation.ts index 2a414205c2e9..1e8c939257d1 100644 --- a/packages/x-tree-view/src/internals/plugins/useTreeViewKeyboardNavigation/useTreeViewKeyboardNavigation.ts +++ b/packages/x-tree-view/src/internals/plugins/useTreeViewKeyboardNavigation/useTreeViewKeyboardNavigation.ts @@ -1,18 +1,18 @@ import * as React from 'react'; import { useRtl } from '@mui/system/RtlProvider'; import useEventCallback from '@mui/utils/useEventCallback'; -import { TreeViewItemMeta, TreeViewPlugin } from '../../models'; +import { TreeViewItemMeta, TreeViewPlugin, MuiCancellableEvent } from '../../models'; import { getFirstNavigableItem, getLastNavigableItem, getNextNavigableItem, getPreviousNavigableItem, + isTargetInDescendants, } from '../../utils/tree'; import { TreeViewFirstCharMap, UseTreeViewKeyboardNavigationSignature, } from './useTreeViewKeyboardNavigation.types'; -import { MuiCancellableEvent } from '../../models/MuiCancellableEvent'; function isPrintableCharacter(string: string) { return !!string && string.length === 1 && !!string.match(/\S/); @@ -92,7 +92,7 @@ export const useTreeViewKeyboardNavigation: TreeViewPlugin< if ( event.altKey || - event.currentTarget !== (event.target as HTMLElement).closest('*[role="treeitem"]') + isTargetInDescendants(event.target as HTMLElement, event.currentTarget as HTMLElement) ) { return; } diff --git a/packages/x-tree-view/src/internals/plugins/useTreeViewKeyboardNavigation/useTreeViewKeyboardNavigation.types.ts b/packages/x-tree-view/src/internals/plugins/useTreeViewKeyboardNavigation/useTreeViewKeyboardNavigation.types.ts index 8572a6e75fc2..9bab5a805ad6 100644 --- a/packages/x-tree-view/src/internals/plugins/useTreeViewKeyboardNavigation/useTreeViewKeyboardNavigation.types.ts +++ b/packages/x-tree-view/src/internals/plugins/useTreeViewKeyboardNavigation/useTreeViewKeyboardNavigation.types.ts @@ -1,10 +1,9 @@ import * as React from 'react'; -import { TreeViewPluginSignature } from '../../models'; +import { TreeViewPluginSignature, MuiCancellableEvent } from '../../models'; import { UseTreeViewItemsSignature } from '../useTreeViewItems'; import { UseTreeViewSelectionSignature } from '../useTreeViewSelection'; import { UseTreeViewFocusSignature } from '../useTreeViewFocus'; import { UseTreeViewExpansionSignature } from '../useTreeViewExpansion'; -import { MuiCancellableEvent } from '../../models/MuiCancellableEvent'; import { TreeViewItemId } from '../../../models'; export interface UseTreeViewKeyboardNavigationInstance { diff --git a/packages/x-tree-view/src/internals/useTreeView/useTreeView.ts b/packages/x-tree-view/src/internals/useTreeView/useTreeView.ts index ca3022d1938a..09f41ff67af7 100644 --- a/packages/x-tree-view/src/internals/useTreeView/useTreeView.ts +++ b/packages/x-tree-view/src/internals/useTreeView/useTreeView.ts @@ -1,6 +1,6 @@ import * as React from 'react'; import useForkRef from '@mui/utils/useForkRef'; -import { EventHandlers } from '@mui/base/utils'; +import { EventHandlers } from '@mui/utils'; import { TreeViewAnyPluginSignature, TreeViewInstance, diff --git a/packages/x-tree-view/src/internals/useTreeView/useTreeView.types.ts b/packages/x-tree-view/src/internals/useTreeView/useTreeView.types.ts index e3ab5a0cf4e6..d4ebb91b39c4 100644 --- a/packages/x-tree-view/src/internals/useTreeView/useTreeView.types.ts +++ b/packages/x-tree-view/src/internals/useTreeView/useTreeView.types.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { EventHandlers } from '@mui/base/utils'; +import { EventHandlers } from '@mui/utils'; import type { TreeViewContextValue } from '../TreeViewProvider'; import { TreeViewAnyPluginSignature, diff --git a/packages/x-tree-view/src/internals/useTreeView/useTreeViewBuildContext.ts b/packages/x-tree-view/src/internals/useTreeView/useTreeViewBuildContext.ts index f114dafa377a..288a308346ce 100644 --- a/packages/x-tree-view/src/internals/useTreeView/useTreeViewBuildContext.ts +++ b/packages/x-tree-view/src/internals/useTreeView/useTreeViewBuildContext.ts @@ -7,6 +7,8 @@ import { TreeViewAnyPluginSignature, TreeViewInstance, TreeViewPublicAPI, + TreeViewItemPluginSlotPropsEnhancers, + TreeViewItemPluginSlotPropsEnhancerParams, } from '../models'; import { TreeViewCorePluginSignatures } from '../corePlugins'; @@ -24,6 +26,9 @@ export const useTreeViewBuildContext = { let finalRootRef: React.RefCallback | null = null; let finalContentRef: React.RefCallback | null = null; + const pluginPropEnhancers: TreeViewItemPluginSlotPropsEnhancers[] = []; + const pluginPropEnhancersNames: { [key in keyof TreeViewItemPluginSlotPropsEnhancers]?: true } = + {}; plugins.forEach((plugin) => { if (!plugin.itemPlugin) { @@ -41,11 +46,47 @@ export const useTreeViewBuildContext = { + pluginPropEnhancersNames[ + propsEnhancerName as keyof TreeViewItemPluginSlotPropsEnhancers + ] = true; + }); + } }); + const resolvePropsEnhancer = + (currentSlotName: keyof TreeViewItemPluginSlotPropsEnhancers) => + (currentSlotParams: TreeViewItemPluginSlotPropsEnhancerParams) => { + const enhancedProps = {}; + pluginPropEnhancers.forEach((propsEnhancersForCurrentPlugin) => { + const propsEnhancerForCurrentPluginAndSlot = + propsEnhancersForCurrentPlugin[currentSlotName]; + if (propsEnhancerForCurrentPluginAndSlot != null) { + Object.assign(enhancedProps, propsEnhancerForCurrentPluginAndSlot(currentSlotParams)); + } + }); + + return enhancedProps; + }; + + const propsEnhancers = Object.fromEntries( + Object.keys(pluginPropEnhancersNames).map( + (propEnhancerName) => + [ + propEnhancerName, + resolvePropsEnhancer(propEnhancerName as keyof TreeViewItemPluginSlotPropsEnhancers), + ] as const, + ), + ); + return { contentRef: finalContentRef, rootRef: finalRootRef, + propsEnhancers, }; }; diff --git a/packages/x-tree-view/src/internals/utils/tree.ts b/packages/x-tree-view/src/internals/utils/tree.ts index 54c935a19f55..deacfe7bbb71 100644 --- a/packages/x-tree-view/src/internals/utils/tree.ts +++ b/packages/x-tree-view/src/internals/utils/tree.ts @@ -259,3 +259,14 @@ export const getAllNavigableItems = ( return navigableItems; }; + +/** + * Checks if the target is in a descendant of this item. + * This can prevent from firing some logic on the ancestors on the interacted item when the event handler is on the root. + * @param {HTMLElement} target The target to check + * @param {HTMLElement | null} itemRoot The root of the item to check if the event target is in its descendants + * @returns {boolean} Whether the target is in a descendant of this item + */ +export const isTargetInDescendants = (target: HTMLElement, itemRoot: HTMLElement | null) => { + return itemRoot !== target.closest('*[role="treeitem"]'); +}; diff --git a/packages/x-tree-view/src/internals/utils/warning.ts b/packages/x-tree-view/src/internals/utils/warning.ts index d029d0ae8e23..f0d34fc59f68 100644 --- a/packages/x-tree-view/src/internals/utils/warning.ts +++ b/packages/x-tree-view/src/internals/utils/warning.ts @@ -1,19 +1,25 @@ -export const buildWarning = ( - message: string | string[], - gravity: 'warning' | 'error' = 'warning', -) => { - let alreadyWarned = false; +const warnedOnceCache = new Set(); + +// TODO move to @mui/x-internals +// TODO eventually move to @base_ui/internals. Base UI, etc. too need this helper. +export function warnOnce(message: string | string[], gravity: 'warning' | 'error' = 'warning') { + if (process.env.NODE_ENV === 'production') { + return; + } const cleanMessage = Array.isArray(message) ? message.join('\n') : message; - return () => { - if (!alreadyWarned) { - alreadyWarned = true; - if (gravity === 'error') { - console.error(cleanMessage); - } else { - console.warn(cleanMessage); - } + if (!warnedOnceCache.has(cleanMessage)) { + warnedOnceCache.add(cleanMessage); + + if (gravity === 'error') { + console.error(cleanMessage); + } else { + console.warn(cleanMessage); } - }; -}; + } +} + +export function clearWarningsCache() { + warnedOnceCache.clear(); +} diff --git a/packages/x-tree-view/src/models/items.ts b/packages/x-tree-view/src/models/items.ts index 006f82e39724..f1ef54da13b9 100644 --- a/packages/x-tree-view/src/models/items.ts +++ b/packages/x-tree-view/src/models/items.ts @@ -4,3 +4,9 @@ export type TreeViewItemId = string; export type TreeViewBaseItem = R & { children?: TreeViewBaseItem[]; }; + +export type TreeViewItemsReorderingAction = + | 'reorder-above' + | 'reorder-below' + | 'make-child' + | 'move-to-parent'; diff --git a/packages/x-tree-view/src/useTreeItem2/index.ts b/packages/x-tree-view/src/useTreeItem2/index.ts index dc1a81e7f114..f99a0f545223 100644 --- a/packages/x-tree-view/src/useTreeItem2/index.ts +++ b/packages/x-tree-view/src/useTreeItem2/index.ts @@ -3,5 +3,10 @@ export type { UseTreeItem2Parameters, UseTreeItem2ReturnValue, UseTreeItem2Status, + UseTreeItem2RootSlotOwnProps, UseTreeItem2ContentSlotOwnProps, + UseTreeItem2LabelSlotOwnProps, + UseTreeItem2IconContainerSlotOwnProps, + UseTreeItem2GroupTransitionSlotOwnProps, + UseTreeItem2DragAndDropOverlaySlotOwnProps, } from './useTreeItem2.types'; diff --git a/packages/x-tree-view/src/useTreeItem2/useTreeItem2.ts b/packages/x-tree-view/src/useTreeItem2/useTreeItem2.ts index 904a6706dcc5..64639815422f 100644 --- a/packages/x-tree-view/src/useTreeItem2/useTreeItem2.ts +++ b/packages/x-tree-view/src/useTreeItem2/useTreeItem2.ts @@ -1,5 +1,6 @@ import * as React from 'react'; -import { EventHandlers, extractEventHandlers } from '@mui/base/utils'; +import { EventHandlers } from '@mui/utils'; +import extractEventHandlers from '@mui/utils/extractEventHandlers'; import useForkRef from '@mui/utils/useForkRef'; import { UseTreeItem2Parameters, @@ -12,9 +13,12 @@ import { UseTreeItem2CheckboxSlotProps, UseTreeItem2MinimalPlugins, UseTreeItem2OptionalPlugins, + UseTreeItem2DragAndDropOverlaySlotProps, + UseTreeItem2RootSlotPropsFromUseTreeItem, + UseTreeItem2ContentSlotPropsFromUseTreeItem, } from './useTreeItem2.types'; -import { useTreeViewContext } from '../internals/TreeViewProvider/useTreeViewContext'; -import { MuiCancellableEvent } from '../internals/models/MuiCancellableEvent'; +import { useTreeViewContext } from '../internals/TreeViewProvider'; +import { MuiCancellableEvent } from '../internals/models'; import { useTreeItem2Utils } from '../hooks/useTreeItem2Utils'; import { TreeViewItemDepthContext } from '../internals/TreeViewItemDepthContext'; @@ -26,10 +30,9 @@ export const useTreeItem2 = < ): UseTreeItem2ReturnValue => { const { runItemPlugins, + items: { onItemClick, disabledItemsFocusable, indentationAtItemLevel }, selection: { multiSelect, disableSelection, checkboxSelection }, expansion: { expansionTrigger }, - disabledItemsFocusable, - indentationAtItemLevel, instance, publicAPI, } = useTreeViewContext(); @@ -37,10 +40,13 @@ export const useTreeItem2 = < const { id, itemId, label, children, rootRef } = parameters; - const { rootRef: pluginRootRef, contentRef } = runItemPlugins(parameters); + const { rootRef: pluginRootRef, contentRef, propsEnhancers } = runItemPlugins(parameters); const { interactions, status } = useTreeItem2Utils({ itemId, children }); + const rootRefObject = React.useRef(null); + const contentRefObject = React.useRef(null); const idAttribute = instance.getTreeItemIdAttribute(itemId, id); - const handleRootRef = useForkRef(rootRef, pluginRootRef)!; + const handleRootRef = useForkRef(rootRef, pluginRootRef, rootRefObject)!; + const handleContentRef = useForkRef(contentRef, contentRefObject)!; const checkboxRef = React.useRef(null); const createRootHandleFocus = @@ -82,6 +88,8 @@ export const useTreeItem2 = < const createContentHandleClick = (otherHandlers: EventHandlers) => (event: React.MouseEvent & MuiCancellableEvent) => { otherHandlers.onClick?.(event); + onItemClick?.(event, itemId); + if (event.defaultMuiPrevented || checkboxRef.current?.contains(event.target as HTMLElement)) { return; } @@ -155,7 +163,7 @@ export const useTreeItem2 = < ariaSelected = true; } - const response: UseTreeItem2RootSlotProps = { + const props: UseTreeItem2RootSlotPropsFromUseTreeItem = { ...externalEventHandlers, ref: handleRootRef, role: 'treeitem', @@ -171,13 +179,19 @@ export const useTreeItem2 = < }; if (indentationAtItemLevel) { - response.style = { + props.style = { '--TreeView-itemDepth': typeof depthContext === 'function' ? depthContext(itemId) : depthContext, } as React.CSSProperties; } - return response; + const enhancedRootProps = + propsEnhancers.root?.({ rootRefObject, contentRefObject, externalEventHandlers }) ?? {}; + + return { + ...props, + ...enhancedRootProps, + } as UseTreeItem2RootSlotProps; }; const getContentProps = = {}>( @@ -185,20 +199,26 @@ export const useTreeItem2 = < ): UseTreeItem2ContentSlotProps => { const externalEventHandlers = extractEventHandlers(externalProps); - const response: UseTreeItem2ContentSlotProps = { + const props: UseTreeItem2ContentSlotPropsFromUseTreeItem = { ...externalEventHandlers, ...externalProps, - ref: contentRef, + ref: handleContentRef, onClick: createContentHandleClick(externalEventHandlers), onMouseDown: createContentHandleMouseDown(externalEventHandlers), status, }; if (indentationAtItemLevel) { - response.indentationAtItemLevel = true; + props.indentationAtItemLevel = true; } - return response; + const enhancedContentProps = + propsEnhancers.content?.({ rootRefObject, contentRefObject, externalEventHandlers }) ?? {}; + + return { + ...props, + ...enhancedContentProps, + } as UseTreeItem2ContentSlotProps; }; const getCheckboxProps = = {}>( @@ -222,7 +242,6 @@ export const useTreeItem2 = < externalProps: ExternalProps = {} as ExternalProps, ): UseTreeItem2LabelSlotProps => { const externalEventHandlers = { - ...extractEventHandlers(parameters), ...extractEventHandlers(externalProps), }; @@ -267,6 +286,26 @@ export const useTreeItem2 = < return response; }; + const getDragAndDropOverlayProps = = {}>( + externalProps: ExternalProps = {} as ExternalProps, + ): UseTreeItem2DragAndDropOverlaySlotProps => { + const externalEventHandlers = { + ...extractEventHandlers(externalProps), + }; + + const enhancedDragAndDropOverlayProps = + propsEnhancers.dragAndDropOverlay?.({ + rootRefObject, + contentRefObject, + externalEventHandlers, + }) ?? {}; + + return { + ...externalProps, + ...enhancedDragAndDropOverlayProps, + } as UseTreeItem2DragAndDropOverlaySlotProps; + }; + return { getRootProps, getContentProps, @@ -274,6 +313,7 @@ export const useTreeItem2 = < getIconContainerProps, getCheckboxProps, getLabelProps, + getDragAndDropOverlayProps, rootRef: handleRootRef, status, publicAPI, diff --git a/packages/x-tree-view/src/useTreeItem2/useTreeItem2.types.ts b/packages/x-tree-view/src/useTreeItem2/useTreeItem2.types.ts index 8d29f86796e3..42173dbc4f57 100644 --- a/packages/x-tree-view/src/useTreeItem2/useTreeItem2.types.ts +++ b/packages/x-tree-view/src/useTreeItem2/useTreeItem2.types.ts @@ -1,7 +1,6 @@ import * as React from 'react'; import { TreeViewItemId } from '../models'; -import { MuiCancellableEventHandler } from '../internals/models/MuiCancellableEvent'; -import { TreeViewPublicAPI } from '../internals/models'; +import { TreeViewPublicAPI, MuiCancellableEventHandler } from '../internals/models'; import { UseTreeViewSelectionSignature } from '../internals/plugins/useTreeViewSelection'; import { UseTreeViewItemsSignature } from '../internals/plugins/useTreeViewItems'; import { UseTreeViewFocusSignature } from '../internals/plugins/useTreeViewFocus'; @@ -34,7 +33,7 @@ export interface UseTreeItem2Parameters { children?: React.ReactNode; } -export interface UseTreeItem2RootSlotOwnProps { +export interface UseTreeItem2RootSlotPropsFromUseTreeItem { role: 'treeitem'; tabIndex: 0 | -1; id: string; @@ -51,10 +50,12 @@ export interface UseTreeItem2RootSlotOwnProps { style?: React.CSSProperties; } +export interface UseTreeItem2RootSlotOwnProps extends UseTreeItem2RootSlotPropsFromUseTreeItem {} + export type UseTreeItem2RootSlotProps = ExternalProps & UseTreeItem2RootSlotOwnProps; -export interface UseTreeItem2ContentSlotOwnProps { +export interface UseTreeItem2ContentSlotPropsFromUseTreeItem { onClick: MuiCancellableEventHandler; onMouseDown: MuiCancellableEventHandler; ref: React.RefCallback | null; @@ -65,6 +66,9 @@ export interface UseTreeItem2ContentSlotOwnProps { indentationAtItemLevel?: true; } +export interface UseTreeItem2ContentSlotOwnProps + extends UseTreeItem2ContentSlotPropsFromUseTreeItem {} + export type UseTreeItem2ContentSlotProps = ExternalProps & UseTreeItem2ContentSlotOwnProps; @@ -109,6 +113,11 @@ export interface UseTreeItem2GroupTransitionSlotOwnProps { export type UseTreeItem2GroupTransitionSlotProps = ExternalProps & UseTreeItem2GroupTransitionSlotOwnProps; +export interface UseTreeItem2DragAndDropOverlaySlotOwnProps {} + +export type UseTreeItem2DragAndDropOverlaySlotProps = ExternalProps & + UseTreeItem2DragAndDropOverlaySlotOwnProps; + export interface UseTreeItem2Status { expandable: boolean; expanded: boolean; @@ -169,6 +178,15 @@ export interface UseTreeItem2ReturnValue< getGroupTransitionProps: = {}>( externalProps?: ExternalProps, ) => UseTreeItem2GroupTransitionSlotProps; + /** + * Resolver for the DragAndDropOverlay slot's props. + * Warning: This slot is only useful when using the `RichTreeViewPro` component. + * @param {ExternalProps} externalProps Additional props for the DragAndDropOverlay slot + * @returns {UseTreeItem2DragAndDropOverlaySlotProps} Props that should be spread on the DragAndDropOverlay slot + */ + getDragAndDropOverlayProps: = {}>( + externalProps?: ExternalProps, + ) => UseTreeItem2DragAndDropOverlaySlotProps; /** * A ref to the component's root DOM element. */ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fb60aefead45..d8d123b88b8c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,7 +6,7 @@ settings: overrides: react-is: ^18.3.1 - '@types/node': ^18.19.39 + '@types/node': ^18.19.42 patchedDependencies: babel-plugin-replace-imports@1.0.2: @@ -20,81 +20,87 @@ importers: .: devDependencies: + '@actions/core': + specifier: ^1.10.1 + version: 1.10.1 + '@actions/github': + specifier: ^6.0.0 + version: 6.0.0 '@argos-ci/core': - specifier: ^2.3.0 - version: 2.3.0 + specifier: ^2.4.0 + version: 2.4.0 '@babel/cli': specifier: ^7.24.8 - version: 7.24.8(@babel/core@7.24.8) + version: 7.24.8(@babel/core@7.25.2) '@babel/core': - specifier: ^7.24.8 - version: 7.24.8 + specifier: ^7.25.2 + version: 7.25.2 '@babel/node': - specifier: ^7.24.8 - version: 7.24.8(@babel/core@7.24.8) + specifier: ^7.25.0 + version: 7.25.0(@babel/core@7.25.2) '@babel/plugin-transform-class-properties': specifier: ^7.24.7 - version: 7.24.7(@babel/core@7.24.8) + version: 7.24.7(@babel/core@7.25.2) '@babel/plugin-transform-object-rest-spread': specifier: ^7.24.7 - version: 7.24.7(@babel/core@7.24.8) + version: 7.24.7(@babel/core@7.25.2) '@babel/plugin-transform-private-methods': specifier: ^7.24.7 - version: 7.24.7(@babel/core@7.24.8) + version: 7.24.7(@babel/core@7.25.2) '@babel/plugin-transform-private-property-in-object': specifier: ^7.24.7 - version: 7.24.7(@babel/core@7.24.8) + version: 7.24.7(@babel/core@7.25.2) '@babel/plugin-transform-react-constant-elements': - specifier: ^7.24.7 - version: 7.24.7(@babel/core@7.24.8) + specifier: ^7.25.1 + version: 7.25.1(@babel/core@7.25.2) '@babel/plugin-transform-runtime': specifier: ^7.24.7 - version: 7.24.7(@babel/core@7.24.8) + version: 7.24.7(@babel/core@7.25.2) '@babel/preset-env': - specifier: ^7.24.8 - version: 7.24.8(@babel/core@7.24.8) + specifier: ^7.25.2 + version: 7.25.2(@babel/core@7.25.2) '@babel/preset-react': specifier: ^7.24.7 - version: 7.24.7(@babel/core@7.24.8) + version: 7.24.7(@babel/core@7.25.2) '@babel/preset-typescript': specifier: ^7.24.7 - version: 7.24.7(@babel/core@7.24.8) + version: 7.24.7(@babel/core@7.25.2) '@babel/register': specifier: ^7.24.6 - version: 7.24.6(@babel/core@7.24.8) + version: 7.24.6(@babel/core@7.25.2) '@babel/traverse': - specifier: ^7.24.8 - version: 7.24.8 + specifier: ^7.25.2 + version: 7.25.2 '@babel/types': - specifier: ^7.24.8 - version: 7.24.8 + specifier: ^7.25.2 + version: 7.25.2 '@emotion/cache': - specifier: ^11.11.0 - version: 11.11.0 + specifier: ^11.13.1 + version: 11.13.1 '@emotion/react': - specifier: ^11.11.4 - version: 11.11.4(@types/react@18.3.3)(react@18.3.1) + specifier: ^11.13.0 + version: 11.13.0(@types/react@18.3.3)(react@18.3.1) '@emotion/styled': - specifier: ^11.11.5 - version: 11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + specifier: ^11.13.0 + version: 11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/icons-material': - specifier: ^5.16.2 - version: 5.16.2(@mui/material@5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@mui/material@5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/internal-markdown': - specifier: ^1.0.7 + specifier: ^1.0.8 version: 1.0.8 '@mui/internal-test-utils': - specifier: ^1.0.4 - version: 1.0.4(@babel/core@7.24.8)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^1.0.5 + version: 1.0.5(@babel/core@7.25.2)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/material': - specifier: ^5.16.2 - version: 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/monorepo': - specifier: github:mui/material-ui#0d9333e9f3999d96679a2691e2815296a81475f2 - version: https://codeload.github.com/mui/material-ui/tar.gz/0d9333e9f3999d96679a2691e2815296a81475f2(encoding@0.1.13) + specifier: github:mui/material-ui#4a82b6b0e0395db8fa0a0d49b6b76de4516b1579 + version: https://codeload.github.com/mui/material-ui/tar.gz/4a82b6b0e0395db8fa0a0d49b6b76de4516b1579(encoding@0.1.13) '@mui/utils': - specifier: ^5.16.2 - version: 5.16.2(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@types/react@18.3.3)(react@18.3.1) '@next/eslint-plugin-next': specifier: 14.2.5 version: 14.2.5 @@ -102,8 +108,8 @@ importers: specifier: ^7.1.1 version: 7.1.1(@octokit/core@4.2.4(encoding@0.1.13)) '@octokit/rest': - specifier: ^21.0.0 - version: 21.0.0 + specifier: ^21.0.1 + version: 21.0.1 '@playwright/test': specifier: ^1.44.1 version: 1.44.1 @@ -126,14 +132,14 @@ importers: specifier: ^6.3.8 version: 6.3.8 '@types/lodash': - specifier: ^4.17.6 - version: 4.17.6 + specifier: ^4.17.7 + version: 4.17.7 '@types/mocha': specifier: ^10.0.7 version: 10.0.7 '@types/node': - specifier: ^18.19.39 - version: 18.19.39 + specifier: ^18.19.42 + version: 18.19.42 '@types/react': specifier: ^18.3.3 version: 18.3.3 @@ -154,19 +160,19 @@ importers: version: 17.0.32 '@typescript-eslint/eslint-plugin': specifier: ^7.16.1 - version: 7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0)(typescript@5.5.3) + version: 7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/parser': specifier: ^7.16.1 - version: 7.16.1(eslint@8.57.0)(typescript@5.5.3) + version: 7.16.1(eslint@8.57.0)(typescript@5.5.4) autoprefixer: specifier: ^10.4.19 - version: 10.4.19(postcss@8.4.39) + version: 10.4.19(postcss@8.4.40) axe-core: specifier: 4.9.1 version: 4.9.1 babel-loader: specifier: ^9.1.3 - version: 9.1.3(@babel/core@7.24.8)(webpack@5.92.1(webpack-cli@5.1.4)) + version: 9.1.3(@babel/core@7.25.2)(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4)) babel-plugin-istanbul: specifier: ^7.0.0 version: 7.0.0 @@ -189,14 +195,14 @@ importers: specifier: ^0.4.24 version: 0.4.24 chai: - specifier: ^4.4.1 - version: 4.4.1 + specifier: ^4.5.0 + version: 4.5.0 chai-dom: specifier: ^1.12.0 - version: 1.12.0(chai@4.4.1) + version: 1.12.0(chai@4.5.0) compression-webpack-plugin: specifier: ^11.1.0 - version: 11.1.0(webpack@5.92.1(webpack-cli@5.1.4)) + version: 11.1.0(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4)) concurrently: specifier: ^8.2.2 version: 8.2.2 @@ -220,25 +226,25 @@ importers: version: 8.57.0 eslint-config-airbnb: specifier: ^19.0.4 - version: 19.0.4(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0))(eslint-plugin-jsx-a11y@6.9.0(eslint@8.57.0))(eslint-plugin-react-hooks@4.6.2(eslint@8.57.0))(eslint-plugin-react@7.34.4(eslint@8.57.0))(eslint@8.57.0) + version: 19.0.4(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0))(eslint-plugin-jsx-a11y@6.9.0(eslint@8.57.0))(eslint-plugin-react-hooks@4.6.2(eslint@8.57.0))(eslint-plugin-react@7.35.0(eslint@8.57.0))(eslint@8.57.0) eslint-config-airbnb-typescript: specifier: ^18.0.0 - version: 18.0.0(@typescript-eslint/eslint-plugin@7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0)(typescript@5.5.3))(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.3))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0))(eslint@8.57.0) + version: 18.0.0(@typescript-eslint/eslint-plugin@7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0))(eslint@8.57.0) eslint-config-prettier: specifier: ^9.1.0 version: 9.1.0(eslint@8.57.0) eslint-import-resolver-webpack: specifier: ^0.13.8 - version: 0.13.8(eslint-plugin-import@2.29.1)(webpack@5.92.1(webpack-cli@5.1.4)) + version: 0.13.8(eslint-plugin-import@2.29.1)(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4)) eslint-plugin-filenames: specifier: ^1.3.2 version: 1.3.2(eslint@8.57.0) eslint-plugin-import: specifier: ^2.29.1 - version: 2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0) + version: 2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0) eslint-plugin-jsdoc: - specifier: ^48.5.2 - version: 48.5.2(eslint@8.57.0) + specifier: ^48.8.3 + version: 48.8.3(eslint@8.57.0) eslint-plugin-jsx-a11y: specifier: ^6.9.0 version: 6.9.0(eslint@8.57.0) @@ -249,14 +255,14 @@ importers: specifier: ^10.4.3 version: 10.4.3(eslint@8.57.0) eslint-plugin-prettier: - specifier: ^5.1.3 - version: 5.1.3(@types/eslint@8.56.10)(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.2) + specifier: ^5.2.1 + version: 5.2.1(@types/eslint@8.56.11)(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3) eslint-plugin-react: - specifier: ^7.34.4 - version: 7.34.4(eslint@8.57.0) + specifier: ^7.35.0 + version: 7.35.0(eslint@8.57.0) eslint-plugin-react-compiler: - specifier: 0.0.0-experimental-51a85ea-20240601 - version: 0.0.0-experimental-51a85ea-20240601(eslint@8.57.0) + specifier: 0.0.0-experimental-9ed098e-20240725 + version: 0.0.0-experimental-9ed098e-20240725(eslint@8.57.0) eslint-plugin-react-hooks: specifier: ^4.6.2 version: 4.6.2(eslint@8.57.0) @@ -277,10 +283,10 @@ importers: version: 14.0.1 html-webpack-plugin: specifier: ^5.6.0 - version: 5.6.0(webpack@5.92.1(webpack-cli@5.1.4)) + version: 5.6.0(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4)) jsdom: - specifier: 24.1.0 - version: 24.1.0 + specifier: 24.1.1 + version: 24.1.1 jss: specifier: ^10.10.0 version: 10.10.0 @@ -307,10 +313,10 @@ importers: version: 0.4.0 karma-webpack: specifier: ^5.0.1 - version: 5.0.1(webpack@5.92.1(webpack-cli@5.1.4)) + version: 5.0.1(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4)) lerna: - specifier: ^8.1.6 - version: 8.1.6(babel-plugin-macros@3.1.0)(encoding@0.1.13) + specifier: ^8.1.7 + version: 8.1.7(@swc/core@1.6.13)(babel-plugin-macros@3.1.0)(encoding@0.1.13) lodash: specifier: ^4.17.21 version: 4.17.21 @@ -318,8 +324,8 @@ importers: specifier: ^0.13.0 version: 0.13.0 mocha: - specifier: ^10.6.0 - version: 10.6.0 + specifier: ^10.7.0 + version: 10.7.0 moment: specifier: ^2.30.1 version: 2.30.1 @@ -330,11 +336,11 @@ importers: specifier: ^17.0.0 version: 17.0.0 prettier: - specifier: ^3.3.2 - version: 3.3.2 + specifier: ^3.3.3 + version: 3.3.3 pretty-quick: specifier: ^4.0.0 - version: 4.0.0(prettier@3.3.2) + version: 4.0.0(prettier@3.3.3) process: specifier: ^0.11.10 version: 0.11.10 @@ -348,8 +354,8 @@ importers: specifier: ^13.0.0 version: 13.0.0 rimraf: - specifier: ^5.0.8 - version: 5.0.8 + specifier: ^5.0.9 + version: 5.0.9 serve: specifier: ^14.2.3 version: 14.2.3 @@ -361,16 +367,16 @@ importers: version: 3.0.0 string-replace-loader: specifier: ^3.1.0 - version: 3.1.0(webpack@5.92.1(webpack-cli@5.1.4)) + version: 3.1.0(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4)) terser-webpack-plugin: specifier: ^5.3.10 - version: 5.3.10(webpack@5.92.1(webpack-cli@5.1.4)) + version: 5.3.10(@swc/core@1.6.13)(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4)) tsx: specifier: ^4.16.2 version: 4.16.2 typescript: - specifier: ^5.5.3 - version: 5.5.3 + specifier: ^5.5.4 + version: 5.5.4 unist-util-visit: specifier: ^2.0.3 version: 2.0.3 @@ -379,7 +385,7 @@ importers: version: 0.12.5 webpack: specifier: ^5.92.1 - version: 5.92.1(webpack-cli@5.1.4) + version: 5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4) webpack-bundle-analyzer: specifier: ^4.10.2 version: 4.10.2 @@ -393,62 +399,62 @@ importers: docs: dependencies: '@babel/core': - specifier: ^7.24.8 - version: 7.24.8 + specifier: ^7.25.2 + version: 7.25.2 '@babel/runtime': - specifier: ^7.24.8 - version: 7.24.8 + specifier: ^7.25.0 + version: 7.25.0 '@babel/runtime-corejs2': - specifier: ^7.24.8 - version: 7.24.8 + specifier: ^7.25.0 + version: 7.25.0 '@docsearch/react': - specifier: ^3.6.0 - version: 3.6.0(@algolia/client-search@4.22.1)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.13.0) + specifier: ^3.6.1 + version: 3.6.1(@algolia/client-search@4.22.1)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.13.0) '@emotion/cache': - specifier: ^11.11.0 - version: 11.11.0 + specifier: ^11.13.1 + version: 11.13.1 '@emotion/react': - specifier: ^11.11.4 - version: 11.11.4(@types/react@18.3.3)(react@18.3.1) + specifier: ^11.13.0 + version: 11.13.0(@types/react@18.3.3)(react@18.3.1) '@emotion/server': specifier: ^11.11.0 version: 11.11.0 '@emotion/styled': - specifier: ^11.11.5 - version: 11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) - '@mui/base': - specifier: ^5.0.0-beta.40 - version: 5.0.0-beta.40(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^11.13.0 + version: 11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/docs': - specifier: 6.0.0-beta.2 - version: 6.0.0-beta.2(xvcyxsjuxdjkfydrsw5rybb6wy) + specifier: 6.0.0-beta.4 + version: 6.0.0-beta.4(v73oylu5qs3cavoyvfoft6xvce) '@mui/icons-material': - specifier: ^5.16.2 - version: 5.16.2(@mui/material@5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@mui/material@5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/joy': specifier: ^5.0.0-beta.48 - version: 5.0.0-beta.48(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 5.0.0-beta.48(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/lab': - specifier: ^5.0.0-alpha.172 - version: 5.0.0-alpha.172(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/material@5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^5.0.0-alpha.173 + version: 5.0.0-alpha.173(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/material@5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/material': - specifier: ^5.16.2 - version: 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/material-nextjs': - specifier: ^5.15.11 - version: 5.15.11(@emotion/cache@11.11.0)(@emotion/server@11.11.0)(@mui/material@5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(next@14.2.5(@babel/core@7.24.8)(@opentelemetry/api@1.8.0)(@playwright/test@1.44.1)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) + specifier: ^5.16.4 + version: 5.16.4(@emotion/cache@11.13.1)(@emotion/server@11.11.0)(@mui/material@5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(next@14.2.5(@babel/core@7.25.2)(@opentelemetry/api@1.8.0)(@playwright/test@1.44.1)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) '@mui/styles': - specifier: ^5.16.2 - version: 5.16.2(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@types/react@18.3.3)(react@18.3.1) '@mui/system': - specifier: ^5.16.2 - version: 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/utils': - specifier: ^5.16.2 - version: 5.16.2(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@types/react@18.3.3)(react@18.3.1) '@mui/x-charts': specifier: workspace:* version: link:../packages/x-charts/build + '@mui/x-charts-vendor': + specifier: workspace:* + version: link:../packages/x-charts-vendor '@mui/x-data-grid': specifier: workspace:* version: link:../packages/x-data-grid/build @@ -471,17 +477,17 @@ importers: specifier: workspace:* version: link:../packages/x-tree-view/build '@react-spring/web': - specifier: ^9.7.3 - version: 9.7.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^9.7.4 + version: 9.7.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@tanstack/query-core': - specifier: ^5.50.1 - version: 5.50.1 + specifier: ^5.51.15 + version: 5.51.15 ast-types: specifier: ^0.14.2 version: 0.14.2 autoprefixer: specifier: ^10.4.19 - version: 10.4.19(postcss@8.4.39) + version: 10.4.19(postcss@8.4.40) babel-plugin-module-resolver: specifier: ^5.0.2 version: 5.0.2 @@ -538,7 +544,7 @@ importers: version: 3.1.0 jscodeshift: specifier: 0.16.1 - version: 0.16.1(@babel/preset-env@7.24.8(@babel/core@7.24.8)) + version: 0.16.1(@babel/preset-env@7.25.2(@babel/core@7.25.2)) lodash: specifier: ^4.17.21 version: 4.17.21 @@ -555,8 +561,8 @@ importers: specifier: ^2.30.1 version: 2.30.1 moment-hijri: - specifier: ^2.1.2 - version: 2.1.2 + specifier: ^2.30.0 + version: 2.30.0 moment-jalaali: specifier: ^0.10.1 version: 0.10.1 @@ -565,13 +571,13 @@ importers: version: 0.5.45 next: specifier: ^14.2.5 - version: 14.2.5(@babel/core@7.24.8)(@opentelemetry/api@1.8.0)(@playwright/test@1.44.1)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 14.2.5(@babel/core@7.25.2)(@opentelemetry/api@1.8.0)(@playwright/test@1.44.1)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) nprogress: specifier: ^0.2.0 version: 0.2.0 postcss: - specifier: ^8.4.39 - version: 8.4.39 + specifier: ^8.4.40 + version: 8.4.40 prismjs: specifier: ^1.29.0 version: 1.29.0 @@ -594,11 +600,11 @@ importers: specifier: ^18.3.1 version: 18.3.1 react-router: - specifier: ^6.24.1 - version: 6.24.1(react@18.3.1) + specifier: ^6.25.1 + version: 6.25.1(react@18.3.1) react-router-dom: - specifier: ^6.24.1 - version: 6.24.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^6.25.1 + version: 6.25.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react-runner: specifier: ^1.0.5 version: 1.0.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -609,14 +615,14 @@ importers: specifier: ^0.23.9 version: 0.23.9 rimraf: - specifier: ^5.0.8 - version: 5.0.8 + specifier: ^5.0.9 + version: 5.0.9 rxjs: specifier: ^7.8.1 version: 7.8.1 styled-components: - specifier: ^6.1.11 - version: 6.1.11(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^6.1.12 + version: 6.1.12(react-dom@18.3.1(react@18.3.1))(react@18.3.1) stylis: specifier: ^4.3.2 version: 4.3.2 @@ -628,17 +634,17 @@ importers: version: 4.10.2 devDependencies: '@babel/plugin-transform-react-constant-elements': - specifier: ^7.24.7 - version: 7.24.7(@babel/core@7.24.8) + specifier: ^7.25.1 + version: 7.25.1(@babel/core@7.25.2) '@babel/preset-typescript': specifier: ^7.24.7 - version: 7.24.7(@babel/core@7.24.8) + version: 7.24.7(@babel/core@7.25.2) '@mui/internal-docs-utils': - specifier: ^1.0.7 - version: 1.0.7 + specifier: ^1.0.8 + version: 1.0.8 '@mui/internal-scripts': - specifier: ^1.0.12 - version: 1.0.12 + specifier: ^1.0.13 + version: 1.0.13 '@types/chance': specifier: ^1.1.6 version: 1.1.6 @@ -651,9 +657,12 @@ importers: '@types/doctrine': specifier: ^0.0.9 version: 0.0.9 + '@types/gtag.js': + specifier: ^0.0.20 + version: 0.0.20 '@types/lodash': - specifier: ^4.17.6 - version: 4.17.6 + specifier: ^4.17.7 + version: 4.17.7 '@types/luxon': specifier: ^3.4.2 version: 3.4.2 @@ -674,7 +683,7 @@ importers: version: 4.2.6 '@types/webpack-bundle-analyzer': specifier: ^4.7.0 - version: 4.7.0(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1)) + version: 4.7.0(@swc/core@1.6.13)(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1)) gm: specifier: ^1.25.0 version: 1.25.0 @@ -685,62 +694,47 @@ importers: packages/eslint-plugin-material-ui: devDependencies: '@types/eslint': - specifier: ^8.56.10 - version: 8.56.10 + specifier: ^8.56.11 + version: 8.56.11 '@typescript-eslint/parser': specifier: ^7.16.1 - version: 7.16.1(eslint@8.57.0)(typescript@5.5.3) + version: 7.16.1(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/utils': specifier: ^7.16.1 - version: 7.16.1(eslint@8.57.0)(typescript@5.5.3) + version: 7.16.1(eslint@8.57.0)(typescript@5.5.4) packages/x-charts: dependencies: '@babel/runtime': - specifier: ^7.24.8 - version: 7.24.8 + specifier: ^7.25.0 + version: 7.25.0 '@emotion/react': specifier: ^11.9.0 - version: 11.11.4(@types/react@18.3.3)(react@18.3.1) + version: 11.13.0(@types/react@18.3.3)(react@18.3.1) '@emotion/styled': specifier: ^11.8.1 - version: 11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) - '@mui/base': - specifier: ^5.0.0-beta.40 - version: 5.0.0-beta.40(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/material': specifier: ^5.15.14 - version: 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/system': - specifier: ^5.16.2 - version: 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/utils': - specifier: ^5.16.2 - version: 5.16.2(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@types/react@18.3.3)(react@18.3.1) + '@mui/x-charts-vendor': + specifier: workspace:* + version: link:../x-charts-vendor '@react-spring/rafz': - specifier: ^9.7.3 - version: 9.7.3 + specifier: ^9.7.4 + version: 9.7.4 '@react-spring/web': - specifier: ^9.7.3 - version: 9.7.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^9.7.4 + version: 9.7.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) clsx: specifier: ^2.1.1 version: 2.1.1 - d3-color: - specifier: ^3.1.0 - version: 3.1.0 - d3-delaunay: - specifier: ^6.0.4 - version: 6.0.4 - d3-interpolate: - specifier: ^3.0.1 - version: 3.0.1 - d3-scale: - specifier: ^4.0.2 - version: 4.0.2 - d3-shape: - specifier: ^3.2.0 - version: 3.2.0 prop-types: specifier: ^15.8.1 version: 15.8.1 @@ -752,29 +746,14 @@ importers: version: 18.3.1(react@18.3.1) devDependencies: '@mui/internal-test-utils': - specifier: ^1.0.4 - version: 1.0.4(@babel/core@7.24.8)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^1.0.5 + version: 1.0.5(@babel/core@7.25.2)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@react-spring/core': - specifier: ^9.7.3 - version: 9.7.3(react@18.3.1) + specifier: ^9.7.4 + version: 9.7.4(react@18.3.1) '@react-spring/shared': - specifier: ^9.7.3 - version: 9.7.3(react@18.3.1) - '@types/d3-color': - specifier: ^3.1.3 - version: 3.1.3 - '@types/d3-delaunay': - specifier: ^6.0.4 - version: 6.0.4 - '@types/d3-interpolate': - specifier: ^3.0.4 - version: 3.0.4 - '@types/d3-scale': - specifier: ^4.0.8 - version: 4.0.8 - '@types/d3-shape': - specifier: ^3.1.6 - version: 3.1.6 + specifier: ^9.7.4 + version: 9.7.4(react@18.3.1) '@types/prop-types': specifier: ^15.7.12 version: 15.7.12 @@ -782,63 +761,48 @@ importers: specifier: ^3.1.3 version: 3.1.3 rimraf: - specifier: ^5.0.8 - version: 5.0.8 + specifier: ^5.0.9 + version: 5.0.9 publishDirectory: build packages/x-charts-pro: dependencies: '@babel/runtime': - specifier: ^7.24.8 - version: 7.24.8 + specifier: ^7.25.0 + version: 7.25.0 '@emotion/react': specifier: ^11.9.0 - version: 11.11.4(@types/react@18.3.3)(react@18.3.1) + version: 11.13.0(@types/react@18.3.3)(react@18.3.1) '@emotion/styled': specifier: ^11.8.1 - version: 11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) - '@mui/base': - specifier: ^5.0.0-beta.40 - version: 5.0.0-beta.40(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/material': specifier: ^5.15.14 - version: 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/system': - specifier: ^5.16.2 - version: 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/utils': - specifier: ^5.16.2 - version: 5.16.2(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@types/react@18.3.3)(react@18.3.1) '@mui/x-charts': specifier: workspace:* version: link:../x-charts/build + '@mui/x-charts-vendor': + specifier: workspace:* + version: link:../x-charts-vendor '@mui/x-license': specifier: workspace:* version: link:../x-license/build '@react-spring/rafz': - specifier: ^9.7.3 - version: 9.7.3 + specifier: ^9.7.4 + version: 9.7.4 '@react-spring/web': - specifier: ^9.7.3 - version: 9.7.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^9.7.4 + version: 9.7.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) clsx: specifier: ^2.1.1 version: 2.1.1 - d3-color: - specifier: ^3.1.0 - version: 3.1.0 - d3-delaunay: - specifier: ^6.0.4 - version: 6.0.4 - d3-interpolate: - specifier: ^3.0.1 - version: 3.0.1 - d3-scale: - specifier: ^4.0.2 - version: 4.0.2 - d3-shape: - specifier: ^3.2.0 - version: 3.2.0 prop-types: specifier: ^15.8.1 version: 15.8.1 @@ -850,11 +814,27 @@ importers: version: 18.3.1(react@18.3.1) devDependencies: '@react-spring/core': - specifier: ^9.7.3 - version: 9.7.3(react@18.3.1) + specifier: ^9.7.4 + version: 9.7.4(react@18.3.1) '@react-spring/shared': - specifier: ^9.7.3 - version: 9.7.3(react@18.3.1) + specifier: ^9.7.4 + version: 9.7.4(react@18.3.1) + '@types/prop-types': + specifier: ^15.7.12 + version: 15.7.12 + csstype: + specifier: ^3.1.3 + version: 3.1.3 + rimraf: + specifier: ^5.0.9 + version: 5.0.9 + publishDirectory: build + + packages/x-charts-vendor: + dependencies: + '@babel/runtime': + specifier: ^7.25.0 + version: 7.25.0 '@types/d3-color': specifier: ^3.1.3 version: 3.1.3 @@ -870,31 +850,85 @@ importers: '@types/d3-shape': specifier: ^3.1.6 version: 3.1.6 - '@types/prop-types': - specifier: ^15.7.12 - version: 15.7.12 - csstype: - specifier: ^3.1.3 - version: 3.1.3 + '@types/d3-time': + specifier: ^3.0.3 + version: 3.0.3 + d3-color: + specifier: ^3.1.0 + version: 3.1.0 + d3-delaunay: + specifier: ^6.0.4 + version: 6.0.4 + d3-interpolate: + specifier: ^3.0.1 + version: 3.0.1 + d3-scale: + specifier: ^4.0.2 + version: 4.0.2 + d3-shape: + specifier: ^3.2.0 + version: 3.2.0 + d3-time: + specifier: ^3.1.0 + version: 3.1.0 + delaunator: + specifier: ^5.0.1 + version: 5.0.1 + robust-predicates: + specifier: ^3.0.2 + version: 3.0.2 + devDependencies: + '@babel/plugin-transform-runtime': + specifier: ^7.24.7 + version: 7.24.7(@babel/core@7.25.2) + '@types/d3-array': + specifier: ^3.0.3 + version: 3.2.1 + '@types/d3-format': + specifier: ^3.0.4 + version: 3.0.4 + '@types/d3-path': + specifier: ^3.0.1 + version: 3.1.0 + '@types/d3-time-format': + specifier: ^4.0.3 + version: 4.0.3 + d3-array: + specifier: ^3.1.6 + version: 3.2.4 + d3-format: + specifier: ^3.1.0 + version: 3.1.0 + d3-path: + specifier: ^3.0.1 + version: 3.1.0 + d3-time-format: + specifier: ^4.1.0 + version: 4.1.0 + execa: + specifier: ^9.3.0 + version: 9.3.0 + internmap: + specifier: ^2.0.3 + version: 2.0.3 rimraf: specifier: ^5.0.8 - version: 5.0.8 - publishDirectory: build + version: 5.0.9 packages/x-codemod: dependencies: '@babel/core': - specifier: ^7.24.8 - version: 7.24.8 + specifier: ^7.25.2 + version: 7.25.2 '@babel/runtime': - specifier: ^7.24.8 - version: 7.24.8 + specifier: ^7.25.0 + version: 7.25.0 '@babel/traverse': - specifier: ^7.24.8 - version: 7.24.8 + specifier: ^7.25.2 + version: 7.25.2 jscodeshift: specifier: 0.16.1 - version: 0.16.1(@babel/preset-env@7.24.8(@babel/core@7.24.8)) + version: 0.16.1(@babel/preset-env@7.25.2(@babel/core@7.25.2)) yargs: specifier: ^17.7.2 version: 17.7.2 @@ -909,24 +943,24 @@ importers: specifier: ^0.5.45 version: 0.5.45 rimraf: - specifier: ^5.0.8 - version: 5.0.8 + specifier: ^5.0.9 + version: 5.0.9 publishDirectory: build packages/x-data-grid: dependencies: '@babel/runtime': - specifier: ^7.24.8 - version: 7.24.8 + specifier: ^7.25.0 + version: 7.25.0 '@mui/material': specifier: ^5.15.14 - version: 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/system': - specifier: ^5.16.2 - version: 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/utils': - specifier: ^5.16.2 - version: 5.16.2(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@types/react@18.3.3)(react@18.3.1) '@mui/x-internals': specifier: workspace:* version: link:../x-internals/build @@ -947,11 +981,11 @@ importers: version: 4.1.8 devDependencies: '@mui/internal-test-utils': - specifier: ^1.0.4 - version: 1.0.4(@babel/core@7.24.8)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^1.0.5 + version: 1.0.5(@babel/core@7.25.2)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/joy': specifier: ^5.0.0-beta.48 - version: 5.0.0-beta.48(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 5.0.0-beta.48(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/types': specifier: ^7.2.15 version: 7.2.15(@types/react@18.3.3) @@ -959,24 +993,21 @@ importers: specifier: ^15.7.12 version: 15.7.12 rimraf: - specifier: ^5.0.8 - version: 5.0.8 + specifier: ^5.0.9 + version: 5.0.9 publishDirectory: build packages/x-data-grid-generator: dependencies: '@babel/runtime': - specifier: ^7.24.8 - version: 7.24.8 - '@mui/base': - specifier: ^5.0.0-beta.40 - version: 5.0.0-beta.40(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^7.25.0 + version: 7.25.0 '@mui/icons-material': specifier: ^5.4.1 - version: 5.16.2(@mui/material@5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + version: 5.16.5(@mui/material@5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/material': specifier: ^5.15.14 - version: 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/x-data-grid-premium': specifier: workspace:* version: link:../x-data-grid-premium/build @@ -987,8 +1018,8 @@ importers: specifier: ^2.1.1 version: 2.1.1 lru-cache: - specifier: ^10.3.0 - version: 10.3.0 + specifier: ^10.4.3 + version: 10.4.3 react: specifier: ^17.0.0 || ^18.0.0 version: 18.3.1 @@ -997,24 +1028,24 @@ importers: specifier: ^1.1.6 version: 1.1.6 rimraf: - specifier: ^5.0.8 - version: 5.0.8 + specifier: ^5.0.9 + version: 5.0.9 publishDirectory: build packages/x-data-grid-premium: dependencies: '@babel/runtime': - specifier: ^7.24.8 - version: 7.24.8 + specifier: ^7.25.0 + version: 7.25.0 '@mui/material': specifier: ^5.15.14 - version: 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/system': - specifier: ^5.16.2 - version: 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/utils': - specifier: ^5.16.2 - version: 5.16.2(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@types/react@18.3.3)(react@18.3.1) '@mui/x-data-grid': specifier: workspace:* version: link:../x-data-grid/build @@ -1050,8 +1081,8 @@ importers: version: 4.1.8 devDependencies: '@mui/internal-test-utils': - specifier: ^1.0.4 - version: 1.0.4(@babel/core@7.24.8)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^1.0.5 + version: 1.0.5(@babel/core@7.25.2)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@types/prop-types': specifier: ^15.7.12 version: 15.7.12 @@ -1059,24 +1090,24 @@ importers: specifier: ^2.30.0 version: 2.30.0 rimraf: - specifier: ^5.0.8 - version: 5.0.8 + specifier: ^5.0.9 + version: 5.0.9 publishDirectory: build packages/x-data-grid-pro: dependencies: '@babel/runtime': - specifier: ^7.24.8 - version: 7.24.8 + specifier: ^7.25.0 + version: 7.25.0 '@mui/material': specifier: ^5.15.14 - version: 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/system': - specifier: ^5.16.2 - version: 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/utils': - specifier: ^5.16.2 - version: 5.16.2(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@types/react@18.3.3)(react@18.3.1) '@mui/x-data-grid': specifier: workspace:* version: link:../x-data-grid/build @@ -1106,39 +1137,36 @@ importers: version: 4.1.8 devDependencies: '@mui/internal-test-utils': - specifier: ^1.0.4 - version: 1.0.4(@babel/core@7.24.8)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^1.0.5 + version: 1.0.5(@babel/core@7.25.2)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@types/prop-types': specifier: ^15.7.12 version: 15.7.12 rimraf: - specifier: ^5.0.8 - version: 5.0.8 + specifier: ^5.0.9 + version: 5.0.9 publishDirectory: build packages/x-date-pickers: dependencies: '@babel/runtime': - specifier: ^7.24.8 - version: 7.24.8 + specifier: ^7.25.0 + version: 7.25.0 '@emotion/react': specifier: ^11.9.0 - version: 11.11.4(@types/react@18.3.3)(react@18.3.1) + version: 11.13.0(@types/react@18.3.3)(react@18.3.1) '@emotion/styled': specifier: ^11.8.1 - version: 11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) - '@mui/base': - specifier: ^5.0.0-beta.40 - version: 5.0.0-beta.40(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/material': specifier: ^5.15.14 - version: 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/system': - specifier: ^5.16.2 - version: 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/utils': - specifier: ^5.16.2 - version: 5.16.2(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@types/react@18.3.3)(react@18.3.1) '@types/react-transition-group': specifier: ^4.4.10 version: 4.4.10 @@ -1159,8 +1187,8 @@ importers: version: 4.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) devDependencies: '@mui/internal-test-utils': - specifier: ^1.0.4 - version: 1.0.4(@babel/core@7.24.8)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^1.0.5 + version: 1.0.5(@babel/core@7.25.2)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@types/luxon': specifier: ^3.4.2 version: 3.4.2 @@ -1189,8 +1217,8 @@ importers: specifier: ^2.30.1 version: 2.30.1 moment-hijri: - specifier: ^2.1.2 - version: 2.1.2 + specifier: ^2.30.0 + version: 2.30.0 moment-jalaali: specifier: ^0.10.1 version: 0.10.1 @@ -1198,33 +1226,30 @@ importers: specifier: ^0.5.45 version: 0.5.45 rimraf: - specifier: ^5.0.8 - version: 5.0.8 + specifier: ^5.0.9 + version: 5.0.9 publishDirectory: build packages/x-date-pickers-pro: dependencies: '@babel/runtime': - specifier: ^7.24.8 - version: 7.24.8 + specifier: ^7.25.0 + version: 7.25.0 '@emotion/react': specifier: ^11.9.0 - version: 11.11.4(@types/react@18.3.3)(react@18.3.1) + version: 11.13.0(@types/react@18.3.3)(react@18.3.1) '@emotion/styled': specifier: ^11.8.1 - version: 11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) - '@mui/base': - specifier: ^5.0.0-beta.40 - version: 5.0.0-beta.40(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/material': specifier: ^5.15.14 - version: 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/system': - specifier: ^5.16.2 - version: 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/utils': - specifier: ^5.16.2 - version: 5.16.2(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@types/react@18.3.3)(react@18.3.1) '@mui/x-date-pickers': specifier: workspace:* version: link:../x-date-pickers/build @@ -1236,7 +1261,7 @@ importers: version: 2.1.1 moment-hijri: specifier: ^2.1.2 - version: 2.1.2 + version: 2.30.0 moment-jalaali: specifier: ^0.7.4 || ^0.8.0 || ^0.9.0 || ^0.10.0 version: 0.10.1 @@ -1254,8 +1279,8 @@ importers: version: 4.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) devDependencies: '@mui/internal-test-utils': - specifier: ^1.0.4 - version: 1.0.4(@babel/core@7.24.8)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^1.0.5 + version: 1.0.5(@babel/core@7.25.2)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@types/luxon': specifier: ^3.4.2 version: 3.4.2 @@ -1278,73 +1303,70 @@ importers: specifier: ^2.30.1 version: 2.30.1 rimraf: - specifier: ^5.0.8 - version: 5.0.8 + specifier: ^5.0.9 + version: 5.0.9 publishDirectory: build packages/x-internals: dependencies: '@babel/runtime': - specifier: ^7.24.8 - version: 7.24.8 + specifier: ^7.25.0 + version: 7.25.0 '@mui/utils': - specifier: ^5.16.2 - version: 5.16.2(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@types/react@18.3.3)(react@18.3.1) react: specifier: ^17.0.0 || ^18.0.0 version: 18.3.1 devDependencies: '@mui/internal-test-utils': - specifier: ^1.0.4 - version: 1.0.4(@babel/core@7.24.8)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^1.0.5 + version: 1.0.5(@babel/core@7.25.2)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rimraf: - specifier: ^5.0.8 - version: 5.0.8 + specifier: ^5.0.9 + version: 5.0.9 publishDirectory: build packages/x-license: dependencies: '@babel/runtime': - specifier: ^7.24.8 - version: 7.24.8 + specifier: ^7.25.0 + version: 7.25.0 '@mui/utils': - specifier: ^5.16.2 - version: 5.16.2(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@types/react@18.3.3)(react@18.3.1) react: specifier: ^17.0.0 || ^18.0.0 version: 18.3.1 devDependencies: '@mui/internal-test-utils': - specifier: ^1.0.4 - version: 1.0.4(@babel/core@7.24.8)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^1.0.5 + version: 1.0.5(@babel/core@7.25.2)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rimraf: - specifier: ^5.0.8 - version: 5.0.8 + specifier: ^5.0.9 + version: 5.0.9 publishDirectory: build packages/x-tree-view: dependencies: '@babel/runtime': - specifier: ^7.24.8 - version: 7.24.8 + specifier: ^7.25.0 + version: 7.25.0 '@emotion/react': specifier: ^11.9.0 - version: 11.11.4(@types/react@18.3.3)(react@18.3.1) + version: 11.13.0(@types/react@18.3.3)(react@18.3.1) '@emotion/styled': specifier: ^11.8.1 - version: 11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) - '@mui/base': - specifier: ^5.0.0-beta.40 - version: 5.0.0-beta.40(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/material': specifier: ^5.15.14 - version: 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/system': - specifier: ^5.16.2 - version: 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/utils': - specifier: ^5.16.2 - version: 5.16.2(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@types/react@18.3.3)(react@18.3.1) '@mui/x-internals': specifier: workspace:* version: link:../x-internals/build @@ -1368,39 +1390,36 @@ importers: version: 4.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) devDependencies: '@mui/internal-test-utils': - specifier: ^1.0.4 - version: 1.0.4(@babel/core@7.24.8)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^1.0.5 + version: 1.0.5(@babel/core@7.25.2)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@types/prop-types': specifier: ^15.7.12 version: 15.7.12 rimraf: - specifier: ^5.0.8 - version: 5.0.8 + specifier: ^5.0.9 + version: 5.0.9 publishDirectory: build packages/x-tree-view-pro: dependencies: '@babel/runtime': - specifier: ^7.24.8 - version: 7.24.8 + specifier: ^7.25.0 + version: 7.25.0 '@emotion/react': specifier: ^11.9.0 - version: 11.11.4(@types/react@18.3.3)(react@18.3.1) + version: 11.13.0(@types/react@18.3.3)(react@18.3.1) '@emotion/styled': specifier: ^11.8.1 - version: 11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) - '@mui/base': - specifier: ^5.0.0-beta.40 - version: 5.0.0-beta.40(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/material': specifier: ^5.15.14 - version: 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/system': - specifier: ^5.16.2 - version: 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/utils': - specifier: ^5.16.2 - version: 5.16.2(@types/react@18.3.3)(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@types/react@18.3.3)(react@18.3.1) '@mui/x-internals': specifier: workspace:* version: link:../x-internals/build @@ -1430,26 +1449,35 @@ importers: version: 4.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) devDependencies: '@mui/internal-test-utils': - specifier: ^1.0.4 - version: 1.0.4(@babel/core@7.24.8)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^1.0.5 + version: 1.0.5(@babel/core@7.25.2)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rimraf: - specifier: ^5.0.8 - version: 5.0.8 + specifier: ^5.0.9 + version: 5.0.9 test: devDependencies: '@babel/runtime': - specifier: ^7.24.8 - version: 7.24.8 + specifier: ^7.25.0 + version: 7.25.0 '@emotion/cache': - specifier: ^11.11.0 - version: 11.11.0 + specifier: ^11.13.1 + version: 11.13.1 '@emotion/react': - specifier: ^11.11.4 - version: 11.11.4(@types/react@18.3.3)(react@18.3.1) + specifier: ^11.13.0 + version: 11.13.0(@types/react@18.3.3)(react@18.3.1) '@mui/material': - specifier: ^5.16.2 - version: 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^5.16.5 + version: 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mui/x-charts': + specifier: workspace:* + version: link:../packages/x-charts/build + '@mui/x-charts-pro': + specifier: workspace:* + version: link:../packages/x-charts-pro/build + '@mui/x-charts-vendor': + specifier: workspace:* + version: link:../packages/x-charts-vendor '@mui/x-data-grid': specifier: workspace:* version: link:../packages/x-data-grid/build @@ -1469,8 +1497,8 @@ importers: specifier: ^1.44.1 version: 1.44.1 '@react-spring/web': - specifier: ^9.7.3 - version: 9.7.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^9.7.4 + version: 9.7.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@types/chai': specifier: ^4.3.16 version: 4.3.16 @@ -1487,8 +1515,8 @@ importers: specifier: ^18.3.3 version: 18.3.3 chai: - specifier: ^4.4.1 - version: 4.4.1 + specifier: ^4.5.0 + version: 4.5.0 dayjs: specifier: ^1.11.11 version: 1.11.11 @@ -1508,8 +1536,8 @@ importers: specifier: ^18.3.1 version: 18.3.1(react@18.3.1) react-router-dom: - specifier: ^6.24.1 - version: 6.24.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^6.25.1 + version: 6.25.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) stylis: specifier: ^4.3.2 version: 4.3.2 @@ -1517,12 +1545,69 @@ importers: specifier: ^2.1.1 version: 2.1.1(stylis@4.3.2) + test/performance-charts: + devDependencies: + '@codspeed/vitest-plugin': + specifier: ^3.1.0 + version: 3.1.0(vite@5.3.4(@types/node@18.19.42)(terser@5.27.0))(vitest@2.0.4(@types/node@18.19.42)(@vitest/browser@2.0.4)(@vitest/ui@2.0.4)(jsdom@24.1.1)(terser@5.27.0)) + '@emotion/react': + specifier: ^11.11.4 + version: 11.13.0(@types/react@18.3.3)(react@18.3.1) + '@mui/x-charts': + specifier: workspace:* + version: link:../../packages/x-charts/build + '@mui/x-charts-pro': + specifier: workspace:* + version: link:../../packages/x-charts-pro/build + '@testing-library/jest-dom': + specifier: ^6.4.6 + version: 6.4.6(vitest@2.0.4(@types/node@18.19.42)(@vitest/browser@2.0.4)(@vitest/ui@2.0.4)(jsdom@24.1.1)(terser@5.27.0)) + '@testing-library/react': + specifier: ^16.0.0 + version: 16.0.0(@testing-library/dom@10.3.1)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@testing-library/user-event': + specifier: ^14.5.2 + version: 14.5.2(@testing-library/dom@10.3.1) + '@vitejs/plugin-react': + specifier: ^4.3.1 + version: 4.3.1(vite@5.3.4(@types/node@18.19.42)(terser@5.27.0)) + '@vitejs/plugin-react-swc': + specifier: ^3.7.0 + version: 3.7.0(@swc/helpers@0.5.5)(vite@5.3.4(@types/node@18.19.42)(terser@5.27.0)) + '@vitest/ui': + specifier: 2.0.4 + version: 2.0.4(vitest@2.0.4) + jsdom: + specifier: ^24.1.1 + version: 24.1.1 + react: + specifier: ^18.3.1 + version: 18.3.1 + react-dom: + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) + vitest: + specifier: 2.0.4 + version: 2.0.4(@types/node@18.19.42)(@vitest/browser@2.0.4)(@vitest/ui@2.0.4)(jsdom@24.1.1)(terser@5.27.0) + packages: '@aashutoshrathi/word-wrap@1.2.6': resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} engines: {node: '>=0.10.0'} + '@actions/core@1.10.1': + resolution: {integrity: sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==} + + '@actions/github@6.0.0': + resolution: {integrity: sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==} + + '@actions/http-client@2.2.1': + resolution: {integrity: sha512-KhC/cZsq7f8I4LfZSJKgCvEwfkE8o1538VoBeoGzokVLLnbFDEAdFD3UhoMklxo2un9NJVBdANOresx7vTHlHw==} + + '@adobe/css-tools@4.4.0': + resolution: {integrity: sha512-Ff9+ksdQQB3rMncgqDK78uLznstjyfIf2Arnh22pW8kBpLs6rpKDwgnZT46hin5Hl1WzazzK64DOrhSwYpS7bQ==} + '@algolia/autocomplete-core@1.9.3': resolution: {integrity: sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==} @@ -1585,16 +1670,16 @@ packages: '@algolia/transporter@4.22.1': resolution: {integrity: sha512-kzWgc2c9IdxMa3YqA6TN0NW5VrKYYW/BELIn7vnLyn+U/RFdZ4lxxt9/8yq3DKV5snvoDzzO4ClyejZRdV3lMQ==} - '@ampproject/remapping@2.2.1': - resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} + '@ampproject/remapping@2.3.0': + resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} - '@argos-ci/core@2.3.0': - resolution: {integrity: sha512-0mHncBeOD7GFYfGZYUEcDgLyzsvPyxK/L1MROfAurFeWcw89ODG24JEdPsECtZBSCZMmMcK8XqeJIJkZsnDGZA==} + '@argos-ci/core@2.4.0': + resolution: {integrity: sha512-CY8IQsc71cuIeF2U47aePzH8+YWK4ePG1j+gK5aQ0r744Wc467U4xej7gChMVrAaGlZKsgoIIeXE1ezF+rCryw==} engines: {node: '>=18.0.0'} - '@argos-ci/util@2.0.0': - resolution: {integrity: sha512-wnsNQOjcNfxOi8cHWSv8+GhzUeIitDJgjhuSNR9zrfHB0Y3nDVI57S/mHRo+EMAaWwghfbrxW1ypRCXVseN0GA==} + '@argos-ci/util@2.1.0': + resolution: {integrity: sha512-/78zJjZJCh3i7Eh3/lo7ybXK2pzXFGUNHbK3SgJNKNbFiBDllNRfy+x0kccjvN2gCCDz877jnFOlSoZZuMK56A==} engines: {node: '>=18.0.0'} '@babel/cli@7.24.8': @@ -1608,16 +1693,16 @@ packages: resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} engines: {node: '>=6.9.0'} - '@babel/compat-data@7.24.8': - resolution: {integrity: sha512-c4IM7OTg6k1Q+AJ153e2mc2QVTezTwnb4VzquwcyiEzGnW0Kedv4do/TrkU98qPeC5LNiMt/QXwIjzYXLBpyZg==} + '@babel/compat-data@7.25.2': + resolution: {integrity: sha512-bYcppcpKBvX4znYaPEeFau03bp89ShqNMLs+rmdptMw+heSZh9+z84d2YG+K7cYLbWwzdjtDoW/uqZmPjulClQ==} engines: {node: '>=6.9.0'} - '@babel/core@7.24.8': - resolution: {integrity: sha512-6AWcmZC/MZCO0yKys4uhg5NlxL0ESF3K6IAaoQ+xSXvPyPyxNWRafP+GDbI88Oh68O7QkJgmEtedWPM9U0pZNg==} + '@babel/core@7.25.2': + resolution: {integrity: sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==} engines: {node: '>=6.9.0'} - '@babel/generator@7.24.8': - resolution: {integrity: sha512-47DG+6F5SzOi0uEvK4wMShmn5yY0mVjVJoWTphdY2B4Rx9wHgjK7Yhtr0ru6nE+sn0v38mzrWOlah0p/YlHHOQ==} + '@babel/generator@7.25.0': + resolution: {integrity: sha512-3LEEcj3PVW8pW2R1SR1M89g/qrYk/m/mB/tLqn7dn4sbBUQyTqnlod+II2U4dqiGtUmkcnAmkMDralTFZttRiw==} engines: {node: '>=6.9.0'} '@babel/helper-annotate-as-pure@7.24.7': @@ -1628,8 +1713,8 @@ packages: resolution: {integrity: sha512-xZeCVVdwb4MsDBkkyZ64tReWYrLRHlMN72vP7Bdm3OUOuyFZExhsHUUnuWnm2/XOlAJzR0LfPpB56WXZn0X/lA==} engines: {node: '>=6.9.0'} - '@babel/helper-compilation-targets@7.24.8': - resolution: {integrity: sha512-oU+UoqCHdp+nWVDkpldqIQL/i/bvAv53tRqLG/s+cOXxe66zOYLU7ar/Xs3LdmBihrUMEUhwu6dMZwbNOYDwvw==} + '@babel/helper-compilation-targets@7.25.2': + resolution: {integrity: sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==} engines: {node: '>=6.9.0'} '@babel/helper-create-class-features-plugin@7.24.7': @@ -1638,8 +1723,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-create-regexp-features-plugin@7.24.7': - resolution: {integrity: sha512-03TCmXy2FtXJEZfbXDTSqq1fRJArk7lX9DOFC/47VthYcxyIOx+eXQmdo6DOQvrbpIix+KfXwvuXdFDZHxt+rA==} + '@babel/helper-create-regexp-features-plugin@7.25.2': + resolution: {integrity: sha512-+wqVGP+DFmqwFD3EH6TMTfUNeqDehV3E/dl+Sd54eaXqm17tEUNbEIn4sVivVowbvUpOtIGxdo3GoXyDH9N/9g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -1657,20 +1742,16 @@ packages: resolution: {integrity: sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==} engines: {node: '>=6.9.0'} - '@babel/helper-hoist-variables@7.24.7': - resolution: {integrity: sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==} - engines: {node: '>=6.9.0'} - - '@babel/helper-member-expression-to-functions@7.24.7': - resolution: {integrity: sha512-LGeMaf5JN4hAT471eJdBs/GK1DoYIJ5GCtZN/EsL6KUiiDZOvO/eKE11AMZJa2zP4zk4qe9V2O/hxAmkRc8p6w==} + '@babel/helper-member-expression-to-functions@7.24.8': + resolution: {integrity: sha512-LABppdt+Lp/RlBxqrh4qgf1oEH/WxdzQNDJIu5gC/W1GyvPVrOBiItmmM8wan2fm4oYqFuFfkXmlGpLQhPY8CA==} engines: {node: '>=6.9.0'} '@babel/helper-module-imports@7.24.7': resolution: {integrity: sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==} engines: {node: '>=6.9.0'} - '@babel/helper-module-transforms@7.24.8': - resolution: {integrity: sha512-m4vWKVqvkVAWLXfHCCfff2luJj86U+J0/x+0N3ArG/tP0Fq7zky2dYwMbtPmkc/oulkkbjdL3uWzuoBwQ8R00Q==} + '@babel/helper-module-transforms@7.25.2': + resolution: {integrity: sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -1683,14 +1764,14 @@ packages: resolution: {integrity: sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==} engines: {node: '>=6.9.0'} - '@babel/helper-remap-async-to-generator@7.24.7': - resolution: {integrity: sha512-9pKLcTlZ92hNZMQfGCHImUpDOlAgkkpqalWEeftW5FBya75k8Li2ilerxkM/uBEj01iBZXcCIB/bwvDYgWyibA==} + '@babel/helper-remap-async-to-generator@7.25.0': + resolution: {integrity: sha512-NhavI2eWEIz/H9dbrG0TuOicDhNexze43i5z7lEqwYm0WEZVTwnPpA0EafUTP7+6/W79HWIP2cTe3Z5NiSTVpw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-replace-supers@7.24.7': - resolution: {integrity: sha512-qTAxxBM81VEyoAY0TtLrx1oAEJc09ZK67Q9ljQToqCnA+55eNwCORaxlKyu+rNfX86o8OXRUSNUnrtsAZXM9sg==} + '@babel/helper-replace-supers@7.25.0': + resolution: {integrity: sha512-q688zIvQVYtZu+i2PsdIu/uWGRpfxzr5WESsfpShfZECkO+d2o+WROWezCi/Q6kJ0tfPa5+pUGUlfx2HhrA3Bg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -1719,38 +1800,44 @@ packages: resolution: {integrity: sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==} engines: {node: '>=6.9.0'} - '@babel/helper-wrap-function@7.24.7': - resolution: {integrity: sha512-N9JIYk3TD+1vq/wn77YnJOqMtfWhNewNE+DJV4puD2X7Ew9J4JvrzrFDfTfyv5EgEXVy9/Wt8QiOErzEmv5Ifw==} + '@babel/helper-wrap-function@7.25.0': + resolution: {integrity: sha512-s6Q1ebqutSiZnEjaofc/UKDyC4SbzV5n5SrA2Gq8UawLycr3i04f1dX4OzoQVnexm6aOCh37SQNYlJ/8Ku+PMQ==} engines: {node: '>=6.9.0'} - '@babel/helpers@7.24.8': - resolution: {integrity: sha512-gV2265Nkcz7weJJfvDoAEVzC1e2OTDpkGbEsebse8koXUJUXPsCMi7sRo/+SPMuMZ9MtUPnGwITTnQnU5YjyaQ==} + '@babel/helpers@7.25.0': + resolution: {integrity: sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw==} engines: {node: '>=6.9.0'} '@babel/highlight@7.24.7': resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} engines: {node: '>=6.9.0'} - '@babel/node@7.24.8': - resolution: {integrity: sha512-4JgQZJOVDrMCe2OwP7g4nBEvv0kbTkWYVvkEhFdq8JdEhsy9J5E5ChibbIchTrntKB62lx2I7fVTdM+Se7KVFg==} + '@babel/node@7.25.0': + resolution: {integrity: sha512-fgdlIcf1vLeZ6gUHcl799Wbk6no5tnkGi6t1gpAb1a97ZB+KCRp8Sgb7acGTjnFhOzqzcsbJ4+wzewqb6JM0tA==} engines: {node: '>=6.9.0'} hasBin: true peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/parser@7.24.8': - resolution: {integrity: sha512-WzfbgXOkGzZiXXCqk43kKwZjzwx4oulxZi3nq2TYL9mOjQv6kYwul9mz6ID36njuL7Xkp6nJEfok848Zj10j/w==} + '@babel/parser@7.25.0': + resolution: {integrity: sha512-CzdIU9jdP0dg7HdyB+bHvDJGagUv+qtzZt5rYCWwW6tITNqV9odjp6Qu41gkG0ca5UfdDUWrKkiAnHHdGRnOrA==} engines: {node: '>=6.0.0'} hasBin: true - '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.24.7': - resolution: {integrity: sha512-TiT1ss81W80eQsN+722OaeQMY/G4yTb4G9JrqeiDADs3N8lbPMGldWi9x8tyqCW5NLx1Jh2AvkE6r6QvEltMMQ==} + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.0': + resolution: {integrity: sha512-dG0aApncVQwAUJa8tP1VHTnmU67BeIQvKafd3raEx315H54FfkZSz3B/TT+33ZQAjatGJA79gZqTtqL5QZUKXw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.0': + resolution: {integrity: sha512-Bm4bH2qsX880b/3ziJ8KD711LT7z4u8CFudmjqle65AZj/HNUFhEf90dqYv6O86buWvSBmeQDjv0Tn2aF/bIBA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.24.7': - resolution: {integrity: sha512-unaQgZ/iRu/By6tsjMZzpeBZjChYfLYry6HrEXPoz3KmfF0sVBQ1l8zKMQ4xRGLWVsjuvB8nQfjNP/DcfEOCsg==} + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.0': + resolution: {integrity: sha512-lXwdNZtTmeVOOFtwM/WDe7yg1PL8sYhRk/XH0FzbR2HDQ0xC+EnQ/JHeoMYSavtU115tnUk0q9CDyq8si+LMAA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -1761,8 +1848,8 @@ packages: peerDependencies: '@babel/core': ^7.13.0 - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.24.7': - resolution: {integrity: sha512-utA4HuR6F4Vvcr+o4DnjL8fCOlgRFGbeeBEGNg3ZTrLFw6VWG5XmUrvcQ0FjIYMU2ST4XcR2Wsp7t9qOAPnxMg==} + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.0': + resolution: {integrity: sha512-tggFrk1AIShG/RUQbEwt2Tr/E+ObkfwrPjR6BjbRvsx24+PSjK8zrq0GWPNCjo8qpRx4DuJzlcvWJqlm+0h3kw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -1900,8 +1987,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-async-generator-functions@7.24.7': - resolution: {integrity: sha512-o+iF77e3u7ZS4AoAuJvapz9Fm001PuD2V3Lp6OSE4FYQke+cSewYtnek+THqGRWyQloRCyvWL1OkyfNEl9vr/g==} + '@babel/plugin-transform-async-generator-functions@7.25.0': + resolution: {integrity: sha512-uaIi2FdqzjpAMvVqvB51S42oC2JEVgh0LDsGfZVDysWE8LrJtQC2jvKmOqEYThKyB7bDEb7BP1GYWDm7tABA0Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -1918,8 +2005,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-block-scoping@7.24.7': - resolution: {integrity: sha512-Nd5CvgMbWc+oWzBsuaMcbwjJWAcp5qzrbg69SZdHSP7AMY0AbWFqFO0WTFCA1jxhMCwodRwvRec8k0QUbZk7RQ==} + '@babel/plugin-transform-block-scoping@7.25.0': + resolution: {integrity: sha512-yBQjYoOjXlFv9nlXb3f1casSHOZkWr29NX+zChVanLg5Nc157CrbEX9D7hxxtTpuFy7Q0YzmmWfJxzvps4kXrQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -1936,8 +2023,8 @@ packages: peerDependencies: '@babel/core': ^7.12.0 - '@babel/plugin-transform-classes@7.24.8': - resolution: {integrity: sha512-VXy91c47uujj758ud9wx+OMgheXm4qJfyhj1P18YvlrQkNOSrwsteHk+EFS3OMGfhMhpZa0A+81eE7G4QC+3CA==} + '@babel/plugin-transform-classes@7.25.0': + resolution: {integrity: sha512-xyi6qjr/fYU304fiRwFbekzkqVJZ6A7hOjWZd+89FVcBqPV3S9Wuozz82xdpLspckeaafntbzglaW4pqpzvtSw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -1966,6 +2053,12 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.0': + resolution: {integrity: sha512-YLpb4LlYSc3sCUa35un84poXoraOiQucUTTu8X1j18JV+gNa8E0nyUf/CjZ171IRGr4jEguF+vzJU66QZhn29g==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + '@babel/plugin-transform-dynamic-import@7.24.7': resolution: {integrity: sha512-sc3X26PhZQDb3JhORmakcbvkeInvxz+A8oda99lj7J60QRuPZvNAk9wQlTBS1ZynelDrDmTU4pw1tyc5d5ZMUg==} engines: {node: '>=6.9.0'} @@ -1996,8 +2089,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-function-name@7.24.7': - resolution: {integrity: sha512-U9FcnA821YoILngSmYkW6FjyQe2TyZD5pHt4EVIhmcTkrJw/3KqcrRSxuOo5tFZJi7TE19iDyI1u+weTI7bn2w==} + '@babel/plugin-transform-function-name@7.25.1': + resolution: {integrity: sha512-TVVJVdW9RKMNgJJlLtHsKDTydjZAbwIsn6ySBPQaEAUU5+gVvlJt/9nRmqVbsV/IBanRjzWoaAQKLoamWVOUuA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2008,8 +2101,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-literals@7.24.7': - resolution: {integrity: sha512-vcwCbb4HDH+hWi8Pqenwnjy+UiklO4Kt1vfspcQYFhJdpthSnW8XvWGyDZWKNVrVbVViI/S7K9PDJZiUmP2fYQ==} + '@babel/plugin-transform-literals@7.25.2': + resolution: {integrity: sha512-HQI+HcTbm9ur3Z2DkO+jgESMAMcYLuN/A7NRw9juzxAezN9AvqvUTnpKP/9kkYANz6u7dFlAyOu44ejuGySlfw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2038,8 +2131,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-systemjs@7.24.7': - resolution: {integrity: sha512-GYQE0tW7YoaN13qFh3O1NCY4MPkUiAH3fiF7UcV/I3ajmDKEdG3l+UOcbAm4zUE3gnvUU+Eni7XrVKo9eO9auw==} + '@babel/plugin-transform-modules-systemjs@7.25.0': + resolution: {integrity: sha512-YPJfjQPDXxyQWg/0+jHKj1llnY5f/R6a0p/vP4lPymxLu7Lvl4k2WMitqi08yxwQcCVUUdG9LCUj4TNEgAp3Jw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2122,8 +2215,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-react-constant-elements@7.24.7': - resolution: {integrity: sha512-7LidzZfUXyfZ8/buRW6qIIHBY8wAZ1OrY9c/wTr8YhZ6vMPo+Uc/CVFLYY1spZrEQlD4w5u8wjqk5NQ3OVqQKA==} + '@babel/plugin-transform-react-constant-elements@7.25.1': + resolution: {integrity: sha512-SLV/giH/V4SmloZ6Dt40HjTGTAIkxn33TVIHxNGNvo8ezMhrxBkzisj4op1KZYPIOHFLqhv60OHvX+YRu4xbmQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2140,6 +2233,18 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-react-jsx-self@7.24.7': + resolution: {integrity: sha512-fOPQYbGSgH0HUp4UJO4sMBFjY6DuWq+2i8rixyUMb3CdGixs/gccURvYOAhajBdKDoGajFr3mUq5rH3phtkGzw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-react-jsx-source@7.24.7': + resolution: {integrity: sha512-J2z+MWzZHVOemyLweMqngXrgGC42jQ//R0KdxqkIz/OrbVIIlhFI3WigZ5fO+nwFvBlncr4MGapd8vTyc7RPNQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-react-jsx@7.24.7': resolution: {integrity: sha512-+Dj06GDZEFRYvclU6k4bme55GKBEWUmByM/eoKuqg4zTNQHiApWRhQph5fxQB2wAEFvRzL1tOEj1RJ19wJrhoA==} engines: {node: '>=6.9.0'} @@ -2230,8 +2335,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/preset-env@7.24.8': - resolution: {integrity: sha512-vObvMZB6hNWuDxhSaEPTKCwcqkAIuDtE+bQGn4XMXne1DSLzFVY8Vmj1bm+mUQXYNN8NmaQEO+r8MMbzPr1jBQ==} + '@babel/preset-env@7.25.2': + resolution: {integrity: sha512-Y2Vkwy3ITW4id9c6KXshVV/x5yCGK7VdJmKkzOzNsDZMojRKfSA/033rRbLqlRozmhRXCejxWHLSJOg/wUHfzw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2268,29 +2373,44 @@ packages: '@babel/regjsgen@0.8.0': resolution: {integrity: sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==} - '@babel/runtime-corejs2@7.24.8': - resolution: {integrity: sha512-vGYjT6h/MNSJ74UXgcgmoRNrMiSwMCgSy/HXMM0jTQJ811YfpBxvxidMPRdJnTaUjDpqwWI2XC6bkz0vnWpjfQ==} + '@babel/runtime-corejs2@7.25.0': + resolution: {integrity: sha512-aoYVE3tm+vgAoezmXFWmVcp+NlSdsUqQMPL7c6zRxq8KDHCf570pamC7005Q/UkSlTuoL6oeE16zIw/9J3YFyw==} engines: {node: '>=6.9.0'} - '@babel/runtime@7.24.8': - resolution: {integrity: sha512-5F7SDGs1T72ZczbRwbGO9lQi0NLjQxzl6i4lJxLxfW9U5UluCSyEJeniWvnhl3/euNiqQVbo8zruhsDfid0esA==} + '@babel/runtime@7.25.0': + resolution: {integrity: sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==} engines: {node: '>=6.9.0'} - '@babel/template@7.24.7': - resolution: {integrity: sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==} + '@babel/template@7.25.0': + resolution: {integrity: sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.24.8': - resolution: {integrity: sha512-t0P1xxAPzEDcEPmjprAQq19NWum4K0EQPjMwZQZbHt+GiZqvjCHjj755Weq1YRPVzBI+3zSfvScfpnuIecVFJQ==} + '@babel/traverse@7.25.2': + resolution: {integrity: sha512-s4/r+a7xTnny2O6FcZzqgT6nE4/GHEdcqj4qAeglbUOh0TeglEfmNJFAd/OLoVtGd6ZhAO8GCVvCNUO5t/VJVQ==} engines: {node: '>=6.9.0'} - '@babel/types@7.24.8': - resolution: {integrity: sha512-SkSBEHwwJRU52QEVZBmMBnE5Ux2/6WU1grdYyOhpbCNxbmJrDuDCphBzKZSO3taf0zztp+qkWlymE5tVL5l0TA==} + '@babel/types@7.25.2': + resolution: {integrity: sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==} engines: {node: '>=6.9.0'} '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} + '@bundled-es-modules/cookie@2.0.0': + resolution: {integrity: sha512-Or6YHg/kamKHpxULAdSqhGqnWFneIXu1NKvvfBBzKGwpVsYuFIQ5aBPHDnnoR3ghW1nvSkALd+EF9iMtY7Vjxw==} + + '@bundled-es-modules/statuses@1.0.1': + resolution: {integrity: sha512-yn7BklA5acgcBr+7w064fGV+SGIFySjCKpqjcWgBAIfrAkY+4GQTJJHQMeT3V/sgz23VTEVV8TtOmkvJAhFVfg==} + + '@codspeed/core@3.1.0': + resolution: {integrity: sha512-oYd7X46QhnRkgRbZkqAoX9i3Fwm17FpunK4Ee5RdrvRYR0Xr93ewH8/O5g6uyTPDOOqDEv1v2KRYtWhVgN+2VQ==} + + '@codspeed/vitest-plugin@3.1.0': + resolution: {integrity: sha512-ms11tUytiQTgB+idxZRUuCUQfgz4LaKTDJCLYm5VTSpOCUU7D5+QWvJnA8X8B9glPfR5siIK8RxrnZP4yuysKQ==} + peerDependencies: + vite: ^4.2.0 || ^5.0.0 + vitest: '>=1.2.2' + '@colors/colors@1.5.0': resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} engines: {node: '>=0.1.90'} @@ -2299,11 +2419,11 @@ packages: resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} engines: {node: '>=10.0.0'} - '@docsearch/css@3.6.0': - resolution: {integrity: sha512-+sbxb71sWre+PwDK7X2T8+bhS6clcVMLwBPznX45Qu6opJcgRjAp7gYSDzVFp187J+feSj5dNBN1mJoi6ckkUQ==} + '@docsearch/css@3.6.1': + resolution: {integrity: sha512-VtVb5DS+0hRIprU2CO6ZQjK2Zg4QU5HrDM1+ix6rT0umsYvFvatMAnf97NHZlVWDaaLlx7GRfR/7FikANiM2Fg==} - '@docsearch/react@3.6.0': - resolution: {integrity: sha512-HUFut4ztcVNmqy9gp/wxNbC7pTOHhgVVkHVGCACTuLhUKUhKAF9KYHJtMiLUJxEqiFLQiuri1fWF8zqwM/cu1w==} + '@docsearch/react@3.6.1': + resolution: {integrity: sha512-qXZkEPvybVhSXj0K7U3bXc233tk5e8PfhoZ6MhPOiik/qUQxYC+Dn9DnoS7CxHQQhHfCvTiN0eY9M12oRghEXw==} peerDependencies: '@types/react': '>= 16.8.0 < 19.0.0' react: '>= 16.8.0 < 19.0.0' @@ -2322,23 +2442,29 @@ packages: '@emnapi/runtime@1.2.0': resolution: {integrity: sha512-bV21/9LQmcQeCPEg3BDFtvwL6cwiTMksYNWQQ4KOxCZikEGalWtenoZ0wCiukJINlGCIi2KXx01g4FoH/LxpzQ==} - '@emotion/babel-plugin@11.11.0': - resolution: {integrity: sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==} + '@emotion/babel-plugin@11.12.0': + resolution: {integrity: sha512-y2WQb+oP8Jqvvclh8Q55gLUyb7UFvgv7eJfsj7td5TToBrIUtPay2kMrZi4xjq9qw2vD0ZR5fSho0yqoFgX7Rw==} - '@emotion/cache@11.11.0': - resolution: {integrity: sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==} + '@emotion/cache@11.13.1': + resolution: {integrity: sha512-iqouYkuEblRcXmylXIwwOodiEK5Ifl7JcX7o6V4jI3iW4mLXX3dmt5xwBtIkJiQEXFAI+pC8X0i67yiPkH9Ucw==} - '@emotion/hash@0.9.1': - resolution: {integrity: sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==} + '@emotion/hash@0.9.2': + resolution: {integrity: sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g==} '@emotion/is-prop-valid@1.2.2': resolution: {integrity: sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw==} + '@emotion/is-prop-valid@1.3.0': + resolution: {integrity: sha512-SHetuSLvJDzuNbOdtPVbq6yMMMlLoW5Q94uDqJZqy50gcmAjxFkVqmzqSGEFq9gT2iMuIeKV1PXVWmvUhuZLlQ==} + '@emotion/memoize@0.8.1': resolution: {integrity: sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==} - '@emotion/react@11.11.4': - resolution: {integrity: sha512-t8AjMlF0gHpvvxk5mAtCqR4vmxiGHCeJBaQO6gncUSdklELOgtwjerNY2yuJNfwnc6vi16U/+uMF+afIawJ9iw==} + '@emotion/memoize@0.9.0': + resolution: {integrity: sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ==} + + '@emotion/react@11.13.0': + resolution: {integrity: sha512-WkL+bw1REC2VNV1goQyfxjx1GYJkcc23CRQkXX+vZNLINyfI7o+uUn/rTGPt/xJ3bJHd5GcljgnxHf4wRw5VWQ==} peerDependencies: '@types/react': '*' react: '>=16.8.0' @@ -2346,8 +2472,8 @@ packages: '@types/react': optional: true - '@emotion/serialize@1.1.4': - resolution: {integrity: sha512-RIN04MBT8g+FnDwgvIUi8czvr1LU1alUMI05LekWB5DGyTm8cCBMCRpq3GqaiyEDRptEXOyXnvZ58GZYu4kBxQ==} + '@emotion/serialize@1.3.0': + resolution: {integrity: sha512-jACuBa9SlYajnpIVXB+XOXnfJHyckDfe6fOpORIM6yhBDlqGuExvDdZYHDQGoDf3bZXGv7tNr+LpLjJqiEQ6EA==} '@emotion/server@11.11.0': resolution: {integrity: sha512-6q89fj2z8VBTx9w93kJ5n51hsmtYuFPtZgnc1L8VzRx9ti4EU6EyvF6Nn1H1x3vcCQCF7u2dB2lY4AYJwUW4PA==} @@ -2357,11 +2483,11 @@ packages: '@emotion/css': optional: true - '@emotion/sheet@1.2.2': - resolution: {integrity: sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==} + '@emotion/sheet@1.4.0': + resolution: {integrity: sha512-fTBW9/8r2w3dXWYM4HCB1Rdp8NLibOw2+XELH5m5+AkWiL/KqYX6dc0kKYlaYyKjrQ6ds33MCdMPEwgs2z1rqg==} - '@emotion/styled@11.11.5': - resolution: {integrity: sha512-/ZjjnaNKvuMPxcIiUkf/9SHoG4Q196DRl1w82hQ3WCsjo1IUR8uaGWrC6a87CrYAW0Kb/pK7hk8BnLgLRi9KoQ==} + '@emotion/styled@11.13.0': + resolution: {integrity: sha512-tkzkY7nQhW/zC4hztlwucpT8QEZ6eUzpXDRhww/Eej4tFfO0FxQYWRyg/c5CCXa4d/f174kqeXYjuQRnhzf6dA==} peerDependencies: '@emotion/react': ^11.0.0-rc.0 '@types/react': '*' @@ -2373,19 +2499,22 @@ packages: '@emotion/unitless@0.8.1': resolution: {integrity: sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==} - '@emotion/use-insertion-effect-with-fallbacks@1.0.1': - resolution: {integrity: sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==} + '@emotion/unitless@0.9.0': + resolution: {integrity: sha512-TP6GgNZtmtFaFcsOgExdnfxLLpRDla4Q66tnenA9CktvVSdNKDvMVuUah4QvWPIpNjrWsGg3qeGo9a43QooGZQ==} + + '@emotion/use-insertion-effect-with-fallbacks@1.1.0': + resolution: {integrity: sha512-+wBOcIV5snwGgI2ya3u99D7/FJquOIniQT1IKyDsBmEgwvpxMNeS65Oib7OnE2d2aY+3BU4OiH+0Wchf8yk3Hw==} peerDependencies: react: '>=16.8.0' - '@emotion/utils@1.2.1': - resolution: {integrity: sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==} + '@emotion/utils@1.4.0': + resolution: {integrity: sha512-spEnrA1b6hDR/C68lC2M7m6ALPUHZC0lIY7jAS/B/9DuuO1ZP04eov8SMv/6fwRd8pzmsn2AuJEznRREWlQrlQ==} - '@emotion/weak-memoize@0.3.1': - resolution: {integrity: sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==} + '@emotion/weak-memoize@0.4.0': + resolution: {integrity: sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==} - '@es-joy/jsdoccomment@0.43.1': - resolution: {integrity: sha512-I238eDtOolvCuvtxrnqtlBaw0BwdQuYqK7eA6XIonicMdOOOb75mqdIzkGDUbS04+1Di007rgm9snFRNeVrOog==} + '@es-joy/jsdoccomment@0.46.0': + resolution: {integrity: sha512-C3Axuq1xd/9VqFZpW4YAzOx5O9q/LP46uIQy/iNDpHG3fmPa6TBtvfglMCs3RBiBxAIi0Go97r8+jvTt55XMyQ==} engines: {node: '>=16'} '@esbuild/aix-ppc64@0.21.5': @@ -2550,6 +2679,10 @@ packages: '@fast-csv/parse@4.3.6': resolution: {integrity: sha512-uRsLYksqpbDmWaSmzvJcuApSEe38+6NQZBUsuAyMZKqHxH0g1wcJgsKUvN3WC8tewaqFjBMMGrkHmC+T7k8LvA==} + '@fastify/busboy@2.1.1': + resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} + engines: {node: '>=14'} + '@floating-ui/core@1.6.0': resolution: {integrity: sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==} @@ -2711,6 +2844,22 @@ packages: cpu: [x64] os: [win32] + '@inquirer/confirm@3.1.17': + resolution: {integrity: sha512-qCpt/AABzPynz8tr69VDvhcjwmzAryipWXtW8Vi6m651da4H/d0Bdn55LkxXD7Rp2gfgxvxzTdb66AhIA8gzBA==} + engines: {node: '>=18'} + + '@inquirer/core@9.0.5': + resolution: {integrity: sha512-QWG41I7vn62O9stYKg/juKXt1PEbr/4ZZCPb4KgXDQGwgA9M5NBTQ7FnOvT1ridbxkm/wTxLCNraUs7y47pIRQ==} + engines: {node: '>=18'} + + '@inquirer/figures@1.0.5': + resolution: {integrity: sha512-79hP/VWdZ2UVc9bFGJnoQ/lQMpL74mGgzSYX1xUqCVk7/v73vJCMw1VuyWN1jGkZ9B3z7THAbySqGbCNefcjfA==} + engines: {node: '>=18'} + + '@inquirer/type@1.5.1': + resolution: {integrity: sha512-m3YgGQlKNS0BM+8AFiJkCsTqHEFCWn6s/Rqye3mYwvqY6LdfUv12eSwbsgNzrYyrLXiy7IrrjDLPysaSBwEfhw==} + engines: {node: '>=18'} + '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} @@ -2751,10 +2900,18 @@ packages: '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} - '@lerna/create@8.1.6': - resolution: {integrity: sha512-z7CjDSWFKS6cqydxP2XDrnmp1MYavSk2sU70ku1uo/38SZvFeUlEAkV6evxc2QJOqWQFsGKOO26zX2DBnQ45YQ==} + '@lerna/create@8.1.7': + resolution: {integrity: sha512-ch81CgU5pBNOiUCQx44F/ZtN4DxxJjUQtuytYRBFWJSHAJ+XPJtiC/yQ9zjr1I1yaUlmNYYblkopoOyziOdJ1w==} engines: {node: '>=18.0.0'} + '@mswjs/cookies@1.1.1': + resolution: {integrity: sha512-W68qOHEjx1iD+4VjQudlx26CPIoxmIAtK4ZCexU0/UJBG6jYhcuyzKJx+Iw8uhBIGd9eba64XgWVgo20it1qwA==} + engines: {node: '>=18'} + + '@mswjs/interceptors@0.29.1': + resolution: {integrity: sha512-3rDakgJZ77+RiQUuSK69t1F0m8BQKA8Vh5DCS5V0DWvNY67zob2JhhQrhCO0AKLGINTRSFd1tBaHcJTkhefoSw==} + engines: {node: '>=18'} + '@mui/base@5.0.0-beta.40': resolution: {integrity: sha512-I/lGHztkCzvwlXpjD2+SNmvNQvB4227xBXhISPjEaJUXGImOQ9f3D2Yj/T3KasSI/h0MLWy74X0J6clhPmsRbQ==} engines: {node: '>=12.0.0'} @@ -2766,12 +2923,12 @@ packages: '@types/react': optional: true - '@mui/core-downloads-tracker@5.16.2': - resolution: {integrity: sha512-BUaUnl3pbd00YR2Da241CYtPw6ldNahyCKZMXXs5F1JZTFKWotNq3qQJC6Yq2YQlK3EflfBqzHj6XwwecocHMg==} + '@mui/core-downloads-tracker@5.16.5': + resolution: {integrity: sha512-ziFn1oPm6VjvHQcdGcAO+fXvOQEgieIj0BuSqcltFU+JXIxjPdVYNTdn2HU7/Ak5Gabk6k2u7+9PV7oZ6JT5sA==} - '@mui/docs@6.0.0-beta.2': - resolution: {integrity: sha512-VLSVlYs09wVyhxrjIEMoyHcJV60mMePjszbzOcGImbRgCdaSw1cwCTzntmB09dRkaDsMhRul1I+poFyQu0nCAA==} - engines: {node: '>=12.0.0'} + '@mui/docs@6.0.0-beta.4': + resolution: {integrity: sha512-zQ/0CPWRmNBDYwLE10FrBm4wnLUCm5200ZsyqFowcHr2Utajmlsby4BIkhjlZ7/XurQr2SW67bA+VIWT+GKvDQ==} + engines: {node: '>=14.0.0'} peerDependencies: '@mui/base': '*' '@mui/icons-material': ^5.0.0 @@ -2779,14 +2936,15 @@ packages: '@mui/system': ^5.0.0 '@types/react': ^17.0.0 || ^18.0.0 chai: ^4.4.1 + csstype: ^3.1.3 next: ^13.5.1 || ^14 react: ^17.0.0 || ^18.0.0 peerDependenciesMeta: '@types/react': optional: true - '@mui/icons-material@5.16.2': - resolution: {integrity: sha512-5Pbxpm+o0Is1MwB4Ds/kHDOuo596NSq3vFEaWzmC+0kGCjoHt9ECiiBWMGr48yJUSbW8iTAgt/ugeJH3ZPRtDg==} + '@mui/icons-material@5.16.5': + resolution: {integrity: sha512-bn88xxU/J9UV0s6+eutq7o3TTOrOlbCX+KshFb8kxgIxJZZfYz3JbAXVMivvoMF4Md6jCVUzM9HEkf4Ajab4tw==} engines: {node: '>=12.0.0'} peerDependencies: '@mui/material': ^5.0.0 @@ -2796,17 +2954,17 @@ packages: '@types/react': optional: true - '@mui/internal-docs-utils@1.0.7': - resolution: {integrity: sha512-vHplixLKu17U7Wa3RDbGv9C3FmXniJKywyZEIeJaTG4ikvl+iWI+BuZPCNniJwj0HSxu3thbyPIrBXijh7j+Xg==} + '@mui/internal-docs-utils@1.0.8': + resolution: {integrity: sha512-krfqmki6Fjlv3+RAAdcf8wB0sg6KF7s4RdT1X3iXuouCYDiQw/t7TiCUAiF7augBCRfPTiWh/FI8MTH4TRlGiQ==} '@mui/internal-markdown@1.0.8': resolution: {integrity: sha512-OU/ieH8HhRbciy3fR5i8vSU/Z4wlfE+iwEFvrqP578jBeqg7X0gvev/uvv9d+FSgRnvgmWJzCYXEPlzlI3MmFA==} - '@mui/internal-scripts@1.0.12': - resolution: {integrity: sha512-7W2OBXKwtDjxFPxQZK796lDDsRtDA/9xWmpmHJMXSJY+gG+8sH6kwsU7pNdf2uB/uC0uCY9kxfWpr+9+0JI5EA==} + '@mui/internal-scripts@1.0.13': + resolution: {integrity: sha512-3g8kl1UEFK6WxoHfstWMDZCW8DimVgfRDh/j2D0CNaKbupfmfdC5e6Of9KDKXV45ATs5LaYfozAKbxMQK7xyhA==} - '@mui/internal-test-utils@1.0.4': - resolution: {integrity: sha512-7scv+UvpqEcFE0vTI6GYXqIQDMbbZKkB0G96gPy5QhMC+zbMHkY5PaOlp+/M1Quu8TW10nmV9gxwiX37o/jg0A==} + '@mui/internal-test-utils@1.0.5': + resolution: {integrity: sha512-5reErcYMSi+PbcuHigno150UDii4pC9TYfL9sY1YcQUtDhQMdNkByvblQZw3X0K2h5puiBYs/cnj670J1JKztA==} peerDependencies: react: ^18.2.0 react-dom: ^18.2.0 @@ -2828,8 +2986,8 @@ packages: '@types/react': optional: true - '@mui/lab@5.0.0-alpha.172': - resolution: {integrity: sha512-stpa3WTsDE1HamFR4eeS6Bhxalm+u9FhzzNph/PrDMdWSRBHlJs2mqvZ6FEoO22O7MOCwNMqbXTkvEwsyEf0ew==} + '@mui/lab@5.0.0-alpha.173': + resolution: {integrity: sha512-Gt5zopIWwxDgGy/MXcp6GueD84xFFugFai4hYiXY0zowJpTVnIrTQCQXV004Q7rejJ7aaCntX9hpPJqCrioshA==} engines: {node: '>=12.0.0'} peerDependencies: '@emotion/react': ^11.5.0 @@ -2846,8 +3004,8 @@ packages: '@types/react': optional: true - '@mui/material-nextjs@5.15.11': - resolution: {integrity: sha512-cp5RWYbBngyi7NKP91R9QITllfxumCVPFjqe4AKzNROVuCot0VpgkafxXqfbv0uFsyUU0ROs0O2M3r17q604Aw==} + '@mui/material-nextjs@5.16.4': + resolution: {integrity: sha512-m2fY/bdfvpUXkjv2k5cwqd42FJZ8QRuZ1MoWt6RW480yIVi4ZRFpccBnJjiC4rXIeslmd/jizHi65Hbz/L/AKQ==} engines: {node: '>=12.0.0'} peerDependencies: '@emotion/cache': ^11.11.0 @@ -2864,8 +3022,8 @@ packages: '@types/react': optional: true - '@mui/material@5.16.2': - resolution: {integrity: sha512-VhPiXg60uITmXnaSr6qlxIOgOviYYBe0Hh7rNaSpaTBAtI6mIcYhdl0jihoL0PN9qa9cEm0GZFdBL0K2/Ub56w==} + '@mui/material@5.16.5': + resolution: {integrity: sha512-eQrjjg4JeczXvh/+8yvJkxWIiKNHVptB/AqpsKfZBWp5mUD5U3VsjODMuUl1K2BSq0omV3CiO/mQmWSSMKSmaA==} engines: {node: '>=12.0.0'} peerDependencies: '@emotion/react': ^11.5.0 @@ -2881,13 +3039,13 @@ packages: '@types/react': optional: true - '@mui/monorepo@https://codeload.github.com/mui/material-ui/tar.gz/0d9333e9f3999d96679a2691e2815296a81475f2': - resolution: {tarball: https://codeload.github.com/mui/material-ui/tar.gz/0d9333e9f3999d96679a2691e2815296a81475f2} - version: 6.0.0-beta.2 + '@mui/monorepo@https://codeload.github.com/mui/material-ui/tar.gz/4a82b6b0e0395db8fa0a0d49b6b76de4516b1579': + resolution: {tarball: https://codeload.github.com/mui/material-ui/tar.gz/4a82b6b0e0395db8fa0a0d49b6b76de4516b1579} + version: 6.0.0-beta.4 engines: {pnpm: 9.5.0} - '@mui/private-theming@5.16.2': - resolution: {integrity: sha512-cxztG36hXxhKvD3dmtwrjSqbMtKeYyf2XCZNk0OKRKi81aytSaPImBiCngHIllrkmClwiWRMKxjOHyhSTlqfUg==} + '@mui/private-theming@5.16.5': + resolution: {integrity: sha512-CSLg0YkpDqg0aXOxtjo3oTMd3XWMxvNb5d0v4AYVqwOltU8q6GvnZjhWyCLjGSCrcgfwm6/VDjaKLPlR14wxIA==} engines: {node: '>=12.0.0'} peerDependencies: '@types/react': ^17.0.0 || ^18.0.0 @@ -2896,8 +3054,8 @@ packages: '@types/react': optional: true - '@mui/styled-engine@5.16.2': - resolution: {integrity: sha512-+a2DE5McPvfuiQXhdfWjcHc82WwBrwCsLryXEhhgsUOVyMgOD8GrEkqr04evivXkIrU2A0fHeWxZu8N+5vogLg==} + '@mui/styled-engine@5.16.4': + resolution: {integrity: sha512-0+mnkf+UiAmTVB8PZFqOhqf729Yh0Cxq29/5cA3VAyDVTRIUUQ8FXQhiAhUIbijFmM72rY80ahFPXIm4WDbzcA==} engines: {node: '>=12.0.0'} peerDependencies: '@emotion/react': ^11.4.1 @@ -2909,8 +3067,8 @@ packages: '@emotion/styled': optional: true - '@mui/styles@5.16.2': - resolution: {integrity: sha512-VixuNxVDl+qurTWAg4NzlHaaUuD/YdAf0pvlAlfr8MBhCr15axfWQxwXhHqC6luVv0QuoG1l1VNx7zzlZZOfIg==} + '@mui/styles@5.16.5': + resolution: {integrity: sha512-E6h6Qd1FNsKozeBQCVpfSngxgigkP5+N8IKiD97ItKaEvaCmYg4/akLVj57Y9tj9OloZxqL8IQS80hw5zF19PA==} engines: {node: '>=12.0.0'} peerDependencies: '@types/react': ^17.0.0 || ^18.0.0 @@ -2919,8 +3077,8 @@ packages: '@types/react': optional: true - '@mui/system@5.16.2': - resolution: {integrity: sha512-gwlqUn2Gs5tF/68wvqlVjsVBahLYwX6WvNTPy/2TXSb7xqJyqso2vGBlImB7/vSaqoZ+jifOEuamSj/nlZIX6A==} + '@mui/system@5.16.5': + resolution: {integrity: sha512-uzIUGdrWddUx1HPxW4+B2o4vpgKyRxGe/8BxbfXVDPNPHX75c782TseoCnR/VyfnZJfqX87GcxDmnZEE1c031g==} engines: {node: '>=12.0.0'} peerDependencies: '@emotion/react': ^11.5.0 @@ -2943,8 +3101,8 @@ packages: '@types/react': optional: true - '@mui/utils@5.16.2': - resolution: {integrity: sha512-AuM5B7DBt8tRgoqgwdx85T6Lkq7QC09PgJs9hb84Z2NfhgSKd5bFUDVW0FXzpX+lFoYG6z9FoInNYT3EMv6VHA==} + '@mui/utils@5.16.5': + resolution: {integrity: sha512-CwhcA9y44XwK7k2joL3Y29mRUnoBt+gOZZdGyw7YihbEwEErJYBtDwbZwVgH68zAljGe/b+Kd5bzfl63Gi3R2A==} engines: {node: '>=12.0.0'} peerDependencies: '@types/react': ^17.0.0 || ^18.0.0 @@ -3177,6 +3335,10 @@ packages: resolution: {integrity: sha512-TWFX7cZF2LXoCvdmJWY7XVPi74aSY0+FfBZNSXEXFkMpjcqsQwDSYVv5FhRFaI0V1ECnwbz4j59T/G+rXNWaIQ==} engines: {node: '>= 14'} + '@octokit/auth-token@4.0.0': + resolution: {integrity: sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==} + engines: {node: '>= 18'} + '@octokit/auth-token@5.1.1': resolution: {integrity: sha512-rh3G3wDO8J9wSjfI436JUKzHIxq8NaiL0tVeB2aXmG6p/9859aUOAjA9pmSPNGGZxfwmaJ9ozOJImuNVJdpvbA==} engines: {node: '>= 18'} @@ -3188,6 +3350,10 @@ packages: resolution: {integrity: sha512-rYKilwgzQ7/imScn3M9/pFfUf4I1AZEH3KhyJmtPdE2zfaXAn2mFfUy4FbKewzc2We5y/LlKLj36fWJLKC2SIQ==} engines: {node: '>= 14'} + '@octokit/core@5.2.0': + resolution: {integrity: sha512-1LFfa/qnMQvEOAdzlQymH0ulepxbxnCYAKJZfMci/5XJyIHWgEYnDmgnKakbTh7CH2tFQ5O60oYDvns4i9RAIg==} + engines: {node: '>= 18'} + '@octokit/core@6.1.2': resolution: {integrity: sha512-hEb7Ma4cGJGEUNOAVmyfdB/3WirWMg5hDuNFVejGEDFqupeOysLc2sG6HJxY2etBp5YQu5Wtxwi020jS9xlUwg==} engines: {node: '>= 18'} @@ -3203,6 +3369,10 @@ packages: resolution: {integrity: sha512-5L4fseVRUsDFGR00tMWD/Trdeeihn999rTMGRMC1G/Ldi1uWlWJzI98H4Iak5DB/RVvQuyMYKqSK/R6mbSOQyg==} engines: {node: '>= 14'} + '@octokit/endpoint@9.0.5': + resolution: {integrity: sha512-ekqR4/+PCLkEBF6qgj8WqJfvDq65RH85OAgrtnVp1mSxaXF03u2xW/hUdweGS5654IlC0wkNYC18Z50tSYTAFw==} + engines: {node: '>= 18'} + '@octokit/graphql@4.8.0': resolution: {integrity: sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==} @@ -3210,6 +3380,10 @@ packages: resolution: {integrity: sha512-Fxyxdy/JH0MnIB5h+UQ3yCoh1FG4kWXfFKkpWqjZHw/p+Kc8Y44Hu/kCgNBT6nU1shNumEchmW/sUO1JuQnPcw==} engines: {node: '>= 14'} + '@octokit/graphql@7.1.0': + resolution: {integrity: sha512-r+oZUH7aMFui1ypZnAvZmn0KSqAUgE1/tUXIWaqUCa1758ts/Jio84GZuzsvUkme98kv0WFY8//n0J1Z+vsIsQ==} + engines: {node: '>= 18'} + '@octokit/graphql@8.1.1': resolution: {integrity: sha512-ukiRmuHTi6ebQx/HFRCXKbDlOh/7xEV6QUXaE7MJEKGNAncGI/STSbOkl12qVXZrfZdpXctx5O9X1AIaebiDBg==} engines: {node: '>= 18'} @@ -3220,6 +3394,9 @@ packages: '@octokit/openapi-types@18.1.1': resolution: {integrity: sha512-VRaeH8nCDtF5aXWnjPuEMIYf1itK/s3JYyJcWFJT8X9pSNnBtriDf7wlEWsGuhPLl4QIH4xM8fqTXDwJ3Mu6sw==} + '@octokit/openapi-types@20.0.0': + resolution: {integrity: sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==} + '@octokit/openapi-types@22.2.0': resolution: {integrity: sha512-QBhVjcUa9W7Wwhm6DBFu6ZZ+1/t/oYxqc2tp81Pi41YNuJinbFRx8B133qVOrAaBbF7D/m0Et6f9/pZt9Rc+tg==} @@ -3243,17 +3420,29 @@ packages: peerDependencies: '@octokit/core': '>=4' + '@octokit/plugin-paginate-rest@9.2.1': + resolution: {integrity: sha512-wfGhE/TAkXZRLjksFXuDZdmGnJQHvtU/joFQdweXUgzo1XwvBCD4o4+75NtFfjfLK5IwLf9vHTfSiU3sLRYpRw==} + engines: {node: '>= 18'} + peerDependencies: + '@octokit/core': '5' + '@octokit/plugin-request-log@1.0.4': resolution: {integrity: sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==} peerDependencies: '@octokit/core': '>=3' - '@octokit/plugin-request-log@5.3.0': - resolution: {integrity: sha512-FiGcyjdtYPlr03ExBk/0ysIlEFIFGJQAVoPPMxL19B24bVSEiZQnVGBunNtaAF1YnvE/EFoDpXmITtRnyCiypQ==} + '@octokit/plugin-request-log@5.3.1': + resolution: {integrity: sha512-n/lNeCtq+9ofhC15xzmJCNKP2BWTv8Ih2TTy+jatNCCq/gQP/V7rK3fjIfuz0pDWDALO/o/4QY4hyOF6TQQFUw==} engines: {node: '>= 18'} peerDependencies: '@octokit/core': '>=6' + '@octokit/plugin-rest-endpoint-methods@10.4.1': + resolution: {integrity: sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg==} + engines: {node: '>= 18'} + peerDependencies: + '@octokit/core': '5' + '@octokit/plugin-rest-endpoint-methods@13.2.2': resolution: {integrity: sha512-EI7kXWidkt3Xlok5uN43suK99VWqc8OaIMktY9d9+RNKl69juoTyxmLoWPIZgJYzi41qj/9zU7G/ljnNOJ5AFA==} engines: {node: '>= 18'} @@ -3284,6 +3473,10 @@ packages: resolution: {integrity: sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ==} engines: {node: '>= 14'} + '@octokit/request-error@5.1.0': + resolution: {integrity: sha512-GETXfE05J0+7H2STzekpKObFe765O5dlAKUTLNGeH+x47z7JjXHfsHKo5z21D/o/IOZTUEI6nyWyR+bZVP/n5Q==} + engines: {node: '>= 18'} + '@octokit/request-error@6.1.1': resolution: {integrity: sha512-1mw1gqT3fR/WFvnoVpY/zUM2o/XkMs/2AszUUG9I69xn0JFLv6PGkPhNk5lbfvROs79wiS0bqiJNxfCZcRJJdg==} engines: {node: '>= 18'} @@ -3295,6 +3488,10 @@ packages: resolution: {integrity: sha512-ow4+pkVQ+6XVVsekSYBzJC0VTVvh/FCTUUgTsboGq+DTeWdyIFV8WSCdo0RIxk6wSkBTHqIK1mYuY7nOBXOchw==} engines: {node: '>= 14'} + '@octokit/request@8.4.0': + resolution: {integrity: sha512-9Bb014e+m2TgBeEJGEbdplMVWwPmL1FPtggHQRkV+WVsMggPtEkLKPlcVYm/o8xKLkpJ7B+6N8WfQMtDLX2Dpw==} + engines: {node: '>= 18'} + '@octokit/request@9.1.1': resolution: {integrity: sha512-pyAguc0p+f+GbQho0uNetNQMmLG1e80WjkIaqqgUkihqUp0boRU6nKItXO4VWnr+nbZiLGEyy4TeKRwqaLvYgw==} engines: {node: '>= 18'} @@ -3306,8 +3503,8 @@ packages: resolution: {integrity: sha512-m2a9VhaP5/tUw8FwfnW2ICXlXpLPIqxtg3XcAiGMLj/Xhw3RSBfZ8le/466ktO1Gcjr8oXudGnHhxV1TXJgFxw==} engines: {node: '>= 14'} - '@octokit/rest@21.0.0': - resolution: {integrity: sha512-XudXXOmiIjivdjNZ+fN71NLrnDM00sxSZlhqmPR3v0dVoJwyP628tSlc12xqn8nX3N0965583RBw5GPo6r8u4Q==} + '@octokit/rest@21.0.1': + resolution: {integrity: sha512-RWA6YU4CqK0h0J6tfYlUFnH3+YgBADlxaHXaKSG+BVr2y4PTfbU2tlKuaQoQZ83qaTbi4CUxLNAmbAqR93A6mQ==} engines: {node: '>= 18'} '@octokit/tsconfig@1.0.2': @@ -3316,6 +3513,9 @@ packages: '@octokit/types@10.0.0': resolution: {integrity: sha512-Vm8IddVmhCgU1fxC1eyinpwqzXPEYu0NrYzD3YZjlGjyftdLBTeqNblRC0jmJmgxbJIsQlyogVeGnrNaaMVzIg==} + '@octokit/types@12.6.0': + resolution: {integrity: sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==} + '@octokit/types@13.5.0': resolution: {integrity: sha512-HdqWTf5Z3qwDVlzCrP8UJquMwunpDiMPt5er+QjGzL4hqr/vBVY/MauQgS1xWxCDT1oMx1EULyqxncdCY/NVSQ==} @@ -3325,6 +3525,15 @@ packages: '@octokit/types@9.3.2': resolution: {integrity: sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA==} + '@open-draft/deferred-promise@2.2.0': + resolution: {integrity: sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==} + + '@open-draft/logger@0.3.0': + resolution: {integrity: sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==} + + '@open-draft/until@2.1.0': + resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==} + '@opentelemetry/api@1.8.0': resolution: {integrity: sha512-I/s6F7yKUDdtMsoBWXJe8Qz40Tui5vsuKCWJEWVL+5q9sSWRzzx6v2KeNsOBEwd94j0eWkpWCH4yB6rZg9Mf0w==} engines: {node: '>=8.0.0'} @@ -3348,37 +3557,117 @@ packages: '@popperjs/core@2.11.8': resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} - '@react-spring/animated@9.7.3': - resolution: {integrity: sha512-5CWeNJt9pNgyvuSzQH+uy2pvTg8Y4/OisoscZIR8/ZNLIOI+CatFBhGZpDGTF/OzdNFsAoGk3wiUYTwoJ0YIvw==} + '@react-spring/animated@9.7.4': + resolution: {integrity: sha512-7As+8Pty2QlemJ9O5ecsuPKjmO0NKvmVkRR1n6mEotFgWar8FKuQt2xgxz3RTgxcccghpx1YdS1FCdElQNexmQ==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 - '@react-spring/core@9.7.3': - resolution: {integrity: sha512-IqFdPVf3ZOC1Cx7+M0cXf4odNLxDC+n7IN3MDcVCTIOSBfqEcBebSv+vlY5AhM0zw05PDbjKrNmBpzv/AqpjnQ==} + '@react-spring/core@9.7.4': + resolution: {integrity: sha512-GzjA44niEJBFUe9jN3zubRDDDP2E4tBlhNlSIkTChiNf9p4ZQlgXBg50qbXfSXHQPHak/ExYxwhipKVsQ/sUTw==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 - '@react-spring/rafz@9.7.3': - resolution: {integrity: sha512-9vzW1zJPcC4nS3aCV+GgcsK/WLaB520Iyvm55ARHfM5AuyBqycjvh1wbmWmgCyJuX4VPoWigzemq1CaaeRSHhQ==} + '@react-spring/rafz@9.7.4': + resolution: {integrity: sha512-mqDI6rW0Ca8IdryOMiXRhMtVGiEGLIO89vIOyFQXRIwwIMX30HLya24g9z4olDvFyeDW3+kibiKwtZnA4xhldA==} - '@react-spring/shared@9.7.3': - resolution: {integrity: sha512-NEopD+9S5xYyQ0pGtioacLhL2luflh6HACSSDUZOwLHoxA5eku1UPuqcJqjwSD6luKjjLfiLOspxo43FUHKKSA==} + '@react-spring/shared@9.7.4': + resolution: {integrity: sha512-bEPI7cQp94dOtCFSEYpxvLxj0+xQfB5r9Ru1h8OMycsIq7zFZon1G0sHrBLaLQIWeMCllc4tVDYRTLIRv70C8w==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 - '@react-spring/types@9.7.3': - resolution: {integrity: sha512-Kpx/fQ/ZFX31OtlqVEFfgaD1ACzul4NksrvIgYfIFq9JpDHFwQkMVZ10tbo0FU/grje4rcL4EIrjekl3kYwgWw==} + '@react-spring/types@9.7.4': + resolution: {integrity: sha512-iQVztO09ZVfsletMiY+DpT/JRiBntdsdJ4uqk3UJFhrhS8mIC9ZOZbmfGSRs/kdbNPQkVyzucceDicQ/3Mlj9g==} - '@react-spring/web@9.7.3': - resolution: {integrity: sha512-BXt6BpS9aJL/QdVqEIX9YoUy8CE6TJrU0mNCqSoxdXlIeNcEBWOfIyE6B14ENNsyQKS3wOWkiJfco0tCr/9tUg==} + '@react-spring/web@9.7.4': + resolution: {integrity: sha512-UMvCZp7I5HCVIleSa4BwbNxynqvj+mJjG2m20VO2yPoi2pnCYANy58flvz9v/YcXTAvsmL655FV3pm5fbr6akA==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - '@remix-run/router@1.17.1': - resolution: {integrity: sha512-mCOMec4BKd6BRGBZeSnGiIgwsbLGp3yhVqAD8H+PxiRNEHgDpZb8J1TnrSDlg97t0ySKMQJTHCWBCmBpSmkF6Q==} + '@remix-run/router@1.18.0': + resolution: {integrity: sha512-L3jkqmqoSVBVKHfpGZmLrex0lxR5SucGA0sUfFzGctehw+S/ggL9L/0NnC5mw6P8HUWpFZ3nQw3cRApjjWx9Sw==} engines: {node: '>=14.0.0'} + '@rollup/rollup-android-arm-eabi@4.18.1': + resolution: {integrity: sha512-lncuC4aHicncmbORnx+dUaAgzee9cm/PbIqgWz1PpXuwc+sa1Ct83tnqUDy/GFKleLiN7ZIeytM6KJ4cAn1SxA==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.18.1': + resolution: {integrity: sha512-F/tkdw0WSs4ojqz5Ovrw5r9odqzFjb5LIgHdHZG65dFI1lWTWRVy32KDJLKRISHgJvqUeUhdIvy43fX41znyDg==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.18.1': + resolution: {integrity: sha512-vk+ma8iC1ebje/ahpxpnrfVQJibTMyHdWpOGZ3JpQ7Mgn/3QNHmPq7YwjZbIE7km73dH5M1e6MRRsnEBW7v5CQ==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.18.1': + resolution: {integrity: sha512-IgpzXKauRe1Tafcej9STjSSuG0Ghu/xGYH+qG6JwsAUxXrnkvNHcq/NL6nz1+jzvWAnQkuAJ4uIwGB48K9OCGA==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-linux-arm-gnueabihf@4.18.1': + resolution: {integrity: sha512-P9bSiAUnSSM7EmyRK+e5wgpqai86QOSv8BwvkGjLwYuOpaeomiZWifEos517CwbG+aZl1T4clSE1YqqH2JRs+g==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.18.1': + resolution: {integrity: sha512-5RnjpACoxtS+aWOI1dURKno11d7krfpGDEn19jI8BuWmSBbUC4ytIADfROM1FZrFhQPSoP+KEa3NlEScznBTyQ==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.18.1': + resolution: {integrity: sha512-8mwmGD668m8WaGbthrEYZ9CBmPug2QPGWxhJxh/vCgBjro5o96gL04WLlg5BA233OCWLqERy4YUzX3bJGXaJgQ==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.18.1': + resolution: {integrity: sha512-dJX9u4r4bqInMGOAQoGYdwDP8lQiisWb9et+T84l2WXk41yEej8v2iGKodmdKimT8cTAYt0jFb+UEBxnPkbXEQ==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-powerpc64le-gnu@4.18.1': + resolution: {integrity: sha512-V72cXdTl4EI0x6FNmho4D502sy7ed+LuVW6Ym8aI6DRQ9hQZdp5sj0a2usYOlqvFBNKQnLQGwmYnujo2HvjCxQ==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.18.1': + resolution: {integrity: sha512-f+pJih7sxoKmbjghrM2RkWo2WHUW8UbfxIQiWo5yeCaCM0TveMEuAzKJte4QskBp1TIinpnRcxkquY+4WuY/tg==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.18.1': + resolution: {integrity: sha512-qb1hMMT3Fr/Qz1OKovCuUM11MUNLUuHeBC2DPPAWUYYUAOFWaxInaTwTQmc7Fl5La7DShTEpmYwgdt2hG+4TEg==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.18.1': + resolution: {integrity: sha512-7O5u/p6oKUFYjRbZkL2FLbwsyoJAjyeXHCU3O4ndvzg2OFO2GinFPSJFGbiwFDaCFc+k7gs9CF243PwdPQFh5g==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.18.1': + resolution: {integrity: sha512-pDLkYITdYrH/9Cv/Vlj8HppDuLMDUBmgsM0+N+xLtFd18aXgM9Nyqupb/Uw+HeidhfYg2lD6CXvz6CjoVOaKjQ==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-win32-arm64-msvc@4.18.1': + resolution: {integrity: sha512-W2ZNI323O/8pJdBGil1oCauuCzmVd9lDmWBBqxYZcOqWD6aWqJtVBQ1dFrF4dYpZPks6F+xCZHfzG5hYlSHZ6g==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.18.1': + resolution: {integrity: sha512-ELfEX1/+eGZYMaCIbK4jqLxO1gyTSOIlZr6pbC4SRYFaSIDVKOnZNMdoZ+ON0mrFDp4+H5MhwNC1H/AhE3zQLg==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.18.1': + resolution: {integrity: sha512-yjk2MAkQmoaPYCSu35RLJ62+dz358nE83VfTePJRp8CG7aMg25mEJYpXFiD+NcevhX8LxD5OP5tktPXnXN7GDw==} + cpu: [x64] + os: [win32] + '@sec-ant/readable-stream@0.4.1': resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} @@ -3466,19 +3755,112 @@ packages: '@socket.io/component-emitter@3.1.0': resolution: {integrity: sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==} + '@swc/core-darwin-arm64@1.6.13': + resolution: {integrity: sha512-SOF4buAis72K22BGJ3N8y88mLNfxLNprTuJUpzikyMGrvkuBFNcxYtMhmomO0XHsgLDzOJ+hWzcgjRNzjMsUcQ==} + engines: {node: '>=10'} + cpu: [arm64] + os: [darwin] + + '@swc/core-darwin-x64@1.6.13': + resolution: {integrity: sha512-AW8akFSC+tmPE6YQQvK9S2A1B8pjnXEINg+gGgw0KRUUXunvu1/OEOeC5L2Co1wAwhD7bhnaefi06Qi9AiwOag==} + engines: {node: '>=10'} + cpu: [x64] + os: [darwin] + + '@swc/core-linux-arm-gnueabihf@1.6.13': + resolution: {integrity: sha512-f4gxxvDXVUm2HLYXRd311mSrmbpQF2MZ4Ja6XCQz1hWAxXdhRl1gpnZ+LH/xIfGSwQChrtLLVrkxdYUCVuIjFg==} + engines: {node: '>=10'} + cpu: [arm] + os: [linux] + + '@swc/core-linux-arm64-gnu@1.6.13': + resolution: {integrity: sha512-Nf/eoW2CbG8s+9JoLtjl9FByBXyQ5cjdBsA4efO7Zw4p+YSuXDgc8HRPC+E2+ns0praDpKNZtLvDtmF2lL+2Gg==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + + '@swc/core-linux-arm64-musl@1.6.13': + resolution: {integrity: sha512-2OysYSYtdw79prJYuKIiux/Gj0iaGEbpS2QZWCIY4X9sGoETJ5iMg+lY+YCrIxdkkNYd7OhIbXdYFyGs/w5LDg==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + + '@swc/core-linux-x64-gnu@1.6.13': + resolution: {integrity: sha512-PkR4CZYJNk5hcd2+tMWBpnisnmYsUzazI1O5X7VkIGFcGePTqJ/bWlfUIVVExWxvAI33PQFzLbzmN5scyIUyGQ==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + + '@swc/core-linux-x64-musl@1.6.13': + resolution: {integrity: sha512-OdsY7wryTxCKwGQcwW9jwWg3cxaHBkTTHi91+5nm7hFPpmZMz1HivJrWAMwVE7iXFw+M4l6ugB/wCvpYrUAAjA==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + + '@swc/core-win32-arm64-msvc@1.6.13': + resolution: {integrity: sha512-ap6uNmYjwk9M/+bFEuWRNl3hq4VqgQ/Lk+ID/F5WGqczNr0L7vEf+pOsRAn0F6EV+o/nyb3ePt8rLhE/wjHpPg==} + engines: {node: '>=10'} + cpu: [arm64] + os: [win32] + + '@swc/core-win32-ia32-msvc@1.6.13': + resolution: {integrity: sha512-IJ8KH4yIUHTnS/U1jwQmtbfQals7zWPG0a9hbEfIr4zI0yKzjd83lmtS09lm2Q24QBWOCFGEEbuZxR4tIlvfzA==} + engines: {node: '>=10'} + cpu: [ia32] + os: [win32] + + '@swc/core-win32-x64-msvc@1.6.13': + resolution: {integrity: sha512-f6/sx6LMuEnbuxtiSL/EkR0Y6qUHFw1XVrh6rwzKXptTipUdOY+nXpKoh+1UsBm/r7H0/5DtOdrn3q5ZHbFZjQ==} + engines: {node: '>=10'} + cpu: [x64] + os: [win32] + + '@swc/core@1.6.13': + resolution: {integrity: sha512-eailUYex6fkfaQTev4Oa3mwn0/e3mQU4H8y1WPuImYQESOQDtVrowwUGDSc19evpBbHpKtwM+hw8nLlhIsF+Tw==} + engines: {node: '>=10'} + peerDependencies: + '@swc/helpers': '*' + peerDependenciesMeta: + '@swc/helpers': + optional: true + '@swc/counter@0.1.3': resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} '@swc/helpers@0.5.5': resolution: {integrity: sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==} - '@tanstack/query-core@5.50.1': - resolution: {integrity: sha512-lpfhKPrJlyV2DSVcQb/HuozH3Av3kws4ge22agx+lNGpFkS4vLZ7St0l3GLwlAD+bqB+qXGex3JdRKUNtMviEQ==} + '@swc/types@0.1.9': + resolution: {integrity: sha512-qKnCno++jzcJ4lM4NTfYifm1EFSCeIfKiAHAfkENZAV5Kl9PjJIyd2yeeVv6c/2CckuLyv2NmRC5pv6pm2WQBg==} + + '@tanstack/query-core@5.51.15': + resolution: {integrity: sha512-xyobHDJ0yhPE3+UkSQ2/4X1fLSg7ICJI5J1JyU9yf7F3deQfEwSImCDrB1WSRrauJkMtXW7YIEcC0oA6ZZWt5A==} '@testing-library/dom@10.3.1': resolution: {integrity: sha512-q/WL+vlXMpC0uXDyfsMtc1rmotzLV8Y0gq6q1gfrrDjQeHoeLrqHbxdPvPNAh1i+xuJl7+BezywcXArz7vLqKQ==} engines: {node: '>=18'} + '@testing-library/jest-dom@6.4.6': + resolution: {integrity: sha512-8qpnGVincVDLEcQXWaHOf6zmlbwTKc6Us6PPu4CRnPXCzo2OGBS5cwgMMOWdxDpEz1mkbvXHpEy99M5Yvt682w==} + engines: {node: '>=14', npm: '>=6', yarn: '>=1'} + peerDependencies: + '@jest/globals': '>= 28' + '@types/bun': latest + '@types/jest': '>= 28' + jest: '>= 28' + vitest: '>= 0.32' + peerDependenciesMeta: + '@jest/globals': + optional: true + '@types/bun': + optional: true + '@types/jest': + optional: true + jest: + optional: true + vitest: + optional: true + '@testing-library/react@16.0.0': resolution: {integrity: sha512-guuxUKRWQ+FgNX0h0NS0FIq3Q3uLtWVpBzcLOggmfMoUpgBnzBzvLLd4fbm6yS8ydJd94cIfY4yP9qUQjM2KwQ==} engines: {node: '>=18'} @@ -3494,6 +3876,12 @@ packages: '@types/react-dom': optional: true + '@testing-library/user-event@14.5.2': + resolution: {integrity: sha512-YAh82Wh4TIrxYLmfGcixwD18oIjyC1pFQC2Y01F2lzV2HTMiYrI0nze0FD0ocB//CKS/7jIUgae+adPqxK5yCQ==} + engines: {node: '>=12', npm: '>=6'} + peerDependencies: + '@testing-library/dom': '>=7.21.4' + '@tootallnate/once@2.0.0': resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} engines: {node: '>= 10'} @@ -3539,15 +3927,24 @@ packages: '@types/cookie@0.4.1': resolution: {integrity: sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==} + '@types/cookie@0.6.0': + resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} + '@types/cors@2.8.17': resolution: {integrity: sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==} + '@types/d3-array@3.2.1': + resolution: {integrity: sha512-Y2Jn2idRrLzUfAKV2LyRImR+y4oa2AntrgID95SHJxuMUrkNXmanDSed71sRNZysveJVt1hLLemQZIady0FpEg==} + '@types/d3-color@3.1.3': resolution: {integrity: sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==} '@types/d3-delaunay@6.0.4': resolution: {integrity: sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw==} + '@types/d3-format@3.0.4': + resolution: {integrity: sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g==} + '@types/d3-interpolate@3.0.4': resolution: {integrity: sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==} @@ -3563,6 +3960,9 @@ packages: '@types/d3-shape@3.1.6': resolution: {integrity: sha512-5KKk5aKGu2I+O6SONMYSNflgiP0WfZIQvVUMan50wHsLG1G94JlxEVnCpQARfTtzytuY0p/9PXXZb3I7giofIA==} + '@types/d3-time-format@4.0.3': + resolution: {integrity: sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg==} + '@types/d3-time@3.0.3': resolution: {integrity: sha512-2p6olUZ4w3s+07q3Tm2dbiMZy5pCDfYwtLXXHUnVzXgQlZ/OyPtUz6OL382BkOuGlLXqfT+wqv8Fw2v8/0geBw==} @@ -3572,8 +3972,8 @@ packages: '@types/eslint-scope@3.7.7': resolution: {integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==} - '@types/eslint@8.56.10': - resolution: {integrity: sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==} + '@types/eslint@8.56.11': + resolution: {integrity: sha512-sVBpJMf7UPo/wGecYOpk2aQya2VUGeHhe38WG7/mN5FufNSubf5VT9Uh9Uyp8/eLJpu1/tuhJ/qTo4mhSB4V4Q==} '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} @@ -3590,6 +3990,9 @@ packages: '@types/fs-extra@11.0.4': resolution: {integrity: sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==} + '@types/gtag.js@0.0.20': + resolution: {integrity: sha512-wwAbk3SA2QeU67unN7zPxjEHmPmlXwZXZvQEpbEUQuMCRGgKyE1m6XDuTUA9b6pCGb/GqJmdfMOY5LuDjJSbbg==} + '@types/history@4.7.11': resolution: {integrity: sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA==} @@ -3623,8 +4026,8 @@ packages: '@types/karma@6.3.8': resolution: {integrity: sha512-+QGoOPhb1f6Oli8pG+hxdnGDzVhIrpsHaFSJ4UJg15Xj+QBtluKELkJY+L4Li532HmT3l5K5o1FoUZHRQeOOaQ==} - '@types/lodash@4.17.6': - resolution: {integrity: sha512-OpXEVoCKSS3lQqjx9GGGOapBeuW5eUboYHRlHP9urXPX25IKZ6AnP5ZRxtVf63iieUbsHxLn8NQ5Nlftc6yzAA==} + '@types/lodash@4.17.7': + resolution: {integrity: sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==} '@types/luxon@3.4.2': resolution: {integrity: sha512-TifLZlFudklWlMBfhubvgqTXRzLDI5pCbGa4P8a3wPyUQSW+1xQ5eDsreP9DWHX3tjq1ke96uYG/nwundroWcA==} @@ -3653,8 +4056,11 @@ packages: '@types/moment-jalaali@0.7.9': resolution: {integrity: sha512-gsDOoAzRnCfQTbfdlUrCvX6R0wIto6CvwfvV2C3j4qJLK+DEiTK8Rl/xlOCBO9C6qeUfX8oyZ2UfjnXJTOvHSA==} - '@types/node@18.19.39': - resolution: {integrity: sha512-nPwTRDKUctxw3di5b4TfT3I0sWDiWoPQCZjXhvdkINntwr8lcoVCKsTgnXeRubKIlfnV+eN/HYk6Jb40tbcEAQ==} + '@types/mute-stream@0.0.4': + resolution: {integrity: sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow==} + + '@types/node@18.19.42': + resolution: {integrity: sha512-d2ZFc/3lnK2YCYhos8iaNIYu9Vfhr92nHiyJHRltXWjXUBjEE+A4I58Tdbnw4VhggSW+2j5y5gTrLs4biNnubg==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -3713,6 +4119,9 @@ packages: '@types/sinonjs__fake-timers@8.1.5': resolution: {integrity: sha512-mQkU2jY8jJEF7YHjHvsQO8+3ughTL1mcnn96igfhONmR+fUPSKIkefQYpSe8bsly2Ep7oQbn/6VG5/9/0qcArQ==} + '@types/statuses@2.0.5': + resolution: {integrity: sha512-jmIUGWrAiwu3dZpxntxieC+1n/5c3mjrImkmOSQ2NC5uP6cYO4aAZDdSmRcI5C1oiTmqlZGHC+/NmJrKogbP5A==} + '@types/stylis@4.2.5': resolution: {integrity: sha512-1Xve+NMN7FWjY14vLoY5tL3BVEQ/n42YLwaqJIPYhotZ9uBHt87VceMwWQpzmdEt2TNXIorIFG+YeCUUW7RInw==} @@ -3728,6 +4137,9 @@ packages: '@types/webpack-bundle-analyzer@4.7.0': resolution: {integrity: sha512-c5i2ThslSNSG8W891BRvOd/RoCjI2zwph8maD22b1adtSns20j+0azDDMCK06DiVrzTgnwiDl5Ntmu1YRJw8Sg==} + '@types/wrap-ansi@3.0.0': + resolution: {integrity: sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==} + '@types/ws@7.4.7': resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} @@ -3798,6 +4210,55 @@ packages: '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + '@vitejs/plugin-react-swc@3.7.0': + resolution: {integrity: sha512-yrknSb3Dci6svCd/qhHqhFPDSw0QtjumcqdKMoNNzmOl5lMXTTiqzjWtG4Qask2HdvvzaNgSunbQGet8/GrKdA==} + peerDependencies: + vite: ^4 || ^5 + + '@vitejs/plugin-react@4.3.1': + resolution: {integrity: sha512-m/V2syj5CuVnaxcUJOQRel/Wr31FFXRFlnOoq1TVtkCxsY5veGMTEmpWHndrhB2U8ScHtCQB1e+4hWYExQc6Lg==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + vite: ^4.2.0 || ^5.0.0 + + '@vitest/browser@2.0.4': + resolution: {integrity: sha512-QsIkbqPqHsXvgxjCjjgKjuWKmrC0VJgpaDkuEmOy5gTnErhhifWIfp3HpH92K7cscfaIao+RlKv5f8nUMgjfmA==} + peerDependencies: + playwright: '*' + safaridriver: '*' + vitest: 2.0.4 + webdriverio: '*' + peerDependenciesMeta: + playwright: + optional: true + safaridriver: + optional: true + webdriverio: + optional: true + + '@vitest/expect@2.0.4': + resolution: {integrity: sha512-39jr5EguIoanChvBqe34I8m1hJFI4+jxvdOpD7gslZrVQBKhh8H9eD7J/LJX4zakrw23W+dITQTDqdt43xVcJw==} + + '@vitest/pretty-format@2.0.4': + resolution: {integrity: sha512-RYZl31STbNGqf4l2eQM1nvKPXE0NhC6Eq0suTTePc4mtMQ1Fn8qZmjV4emZdEdG2NOWGKSCrHZjmTqDCDoeFBw==} + + '@vitest/runner@2.0.4': + resolution: {integrity: sha512-Gk+9Su/2H2zNfNdeJR124gZckd5st4YoSuhF1Rebi37qTXKnqYyFCd9KP4vl2cQHbtuVKjfEKrNJxHHCW8thbQ==} + + '@vitest/snapshot@2.0.4': + resolution: {integrity: sha512-or6Mzoz/pD7xTvuJMFYEtso1vJo1S5u6zBTinfl+7smGUhqybn6VjzCDMhmTyVOFWwkCMuNjmNNxnyXPgKDoPw==} + + '@vitest/spy@2.0.4': + resolution: {integrity: sha512-uTXU56TNoYrTohb+6CseP8IqNwlNdtPwEO0AWl+5j7NelS6x0xZZtP0bDWaLvOfUbaYwhhWp1guzXUxkC7mW7Q==} + + '@vitest/ui@2.0.4': + resolution: {integrity: sha512-9SNE9ve3kgDkVTxJsY7BjqSwyqDVRJbq/AHVHZs+V0vmr/0cCX6yGT6nOahSXEsXFtKAsvRtBXKlTgr+5njzZQ==} + peerDependencies: + vitest: 2.0.4 + + '@vitest/utils@2.0.4': + resolution: {integrity: sha512-Zc75QuuoJhOBnlo99ZVUkJIuq4Oj0zAkrQ2VzCqNCx6wAwViHEh5Fnp4fiJTE9rA+sAoXRf00Z9xGgfEzV6fzQ==} + '@webassemblyjs/ast@1.12.1': resolution: {integrity: sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==} @@ -4116,9 +4577,6 @@ packages: resolution: {integrity: sha512-UW+Mz8LG/sPSU8jRDCjVr6J/ZKAGpHfwrZ6kWTG5qCxIEiXdVshqGnu5vEZA8S1y6X4aCSbQZ0/EEsfvEvBiSg==} engines: {node: '>= 0.4'} - array.prototype.toreversed@1.1.2: - resolution: {integrity: sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA==} - array.prototype.tosorted@1.1.4: resolution: {integrity: sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==} engines: {node: '>= 0.4'} @@ -4142,6 +4600,10 @@ packages: assertion-error@1.1.0: resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + ast-types-flow@0.0.8: resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==} @@ -4364,6 +4826,10 @@ packages: engines: {node: '>=10.12.0'} hasBin: true + cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + cacache@18.0.3: resolution: {integrity: sha512-qXCd4rh6I07cnDqh8V48/94Tc/WSfj+o3Gn6NZ0aZovS255bUx8O13uKxRFd2eWG0xgsco7+YItQNPaa5E85hg==} engines: {node: ^16.14.0 || >=18.0.0} @@ -4411,10 +4877,14 @@ packages: peerDependencies: chai: '>= 3' - chai@4.4.1: - resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} + chai@4.5.0: + resolution: {integrity: sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==} engines: {node: '>=4'} + chai@5.1.1: + resolution: {integrity: sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==} + engines: {node: '>=12'} + chainsaw@0.1.0: resolution: {integrity: sha512-75kWfWt6MEKNC8xYXIdRpDehRYY/tNSgwKaJq+dbbDcxORuVrrQ+SEHoWsniVn9XPYfP4gmdWIeDk/4YNp1rNQ==} @@ -4426,6 +4896,10 @@ packages: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} + chalk@3.0.0: + resolution: {integrity: sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==} + engines: {node: '>=8'} + chalk@4.1.0: resolution: {integrity: sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==} engines: {node: '>=10'} @@ -4460,6 +4934,10 @@ packages: check-error@1.0.3: resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} + check-error@2.1.1: + resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} + engines: {node: '>= 16'} + chokidar@3.5.3: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} @@ -4512,6 +4990,10 @@ packages: resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} engines: {node: '>= 10'} + cli-width@4.1.0: + resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} + engines: {node: '>= 12'} + client-only@0.0.1: resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==} @@ -4811,6 +5293,9 @@ packages: resolution: {integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==} engines: {node: '>= 6'} + css.escape@1.5.1: + resolution: {integrity: sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==} + cssesc@3.0.0: resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} engines: {node: '>=4'} @@ -4981,6 +5466,10 @@ packages: resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} engines: {node: '>=6'} + deep-eql@5.0.2: + resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} + engines: {node: '>=6'} + deep-equal@2.2.3: resolution: {integrity: sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==} engines: {node: '>= 0.4'} @@ -5343,8 +5832,8 @@ packages: '@typescript-eslint/parser': optional: true - eslint-plugin-jsdoc@48.5.2: - resolution: {integrity: sha512-VXBJFviQz30rynlOEQ+dNWLmeopjoAgutUVrWOZwm6Ki4EVDm4XkyIqAV/Zhf7FcDr0AG0aGmRn5FxxCtAF0tA==} + eslint-plugin-jsdoc@48.8.3: + resolution: {integrity: sha512-AtIvwwW9D17MRkM0Z0y3/xZYaa9mdAvJrkY6fU/HNUwGbmMtHVvK4qRM9CDixGVtfNrQitb8c6zQtdh6cTOvLg==} engines: {node: '>=18'} peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 @@ -5361,8 +5850,8 @@ packages: peerDependencies: eslint: '>=7.0.0' - eslint-plugin-prettier@5.1.3: - resolution: {integrity: sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==} + eslint-plugin-prettier@5.2.1: + resolution: {integrity: sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: '@types/eslint': '>=8.0.0' @@ -5375,8 +5864,8 @@ packages: eslint-config-prettier: optional: true - eslint-plugin-react-compiler@0.0.0-experimental-51a85ea-20240601: - resolution: {integrity: sha512-ROiKTVu9pZsNHyJepZj/JULWnkw8+I8+9gOF/MkJ8Q22/9f9MkPQkD2f6FXzVH+iyWbp7DQ3RXKhB3hWhf8AIg==} + eslint-plugin-react-compiler@0.0.0-experimental-9ed098e-20240725: + resolution: {integrity: sha512-Xv2iD8kU6R4Wdjdh1WhdP8UnSqSV+/XcadxwBCmMr836fQUoXGuw/uVGc01v9opZs9SwKzo+8My6ayVCgAinPA==} engines: {node: ^14.17.0 || ^16.0.0 || >= 18.0.0} peerDependencies: eslint: '>=7' @@ -5387,11 +5876,11 @@ packages: peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 - eslint-plugin-react@7.34.4: - resolution: {integrity: sha512-Np+jo9bUwJNxCsT12pXtrGhJgT3T44T1sHhn1Ssr42XFn8TES0267wPGo5nNrMHi8qkyimDAX2BUmkf9pSaVzA==} + eslint-plugin-react@7.35.0: + resolution: {integrity: sha512-v501SSMOWv8gerHkk+IIQBkcGRGrO2nfybfj5pLxuJNFTPxxA3PSryhXTK+9pNbtkggheDdsC0E9Q8CuPk6JKA==} engines: {node: '>=4'} peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 eslint-scope@5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} @@ -5434,8 +5923,8 @@ packages: engines: {node: '>=4'} hasBin: true - esquery@1.5.0: - resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} + esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} engines: {node: '>=0.10'} esrecurse@4.3.0: @@ -5458,6 +5947,9 @@ packages: resolution: {integrity: sha512-YNF+mZ/Wu2FU/gvmzuWtYc8rloubL7wfXCTgouFrnjGVXPA/EeYYA7pupXWrb3Iv1cTBeSSxxJIbK23l4MRNqg==} engines: {node: '>=8.3.0'} + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} @@ -5488,6 +5980,10 @@ packages: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} + execa@8.0.1: + resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} + engines: {node: '>=16.17'} + execa@9.3.0: resolution: {integrity: sha512-l6JFbqnHEadBoVAVpN5dl2yCyfX28WoBAGaoQcNmLLSedOxTxcn2Qa83s8I/PA5i56vWru2OHOtrwF7Om2vqlg==} engines: {node: ^18.19.0 || >=20.5.0} @@ -5547,6 +6043,9 @@ packages: fastq@1.17.0: resolution: {integrity: sha512-zGygtijUMT7jnk3h26kUms3BkSDp4IfIKjmnqI2tvx6nuBfiF1UqOxbnLfzdv+apBy+53oaImsKtMw/xYbW+1w==} + fflate@0.8.2: + resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==} + fg-loadcss@3.1.0: resolution: {integrity: sha512-UgtXKza8nBUO6UWW4c+MOprRL4W5WbIkzPJafnw6y6f5jhA3FiSZkWz8eXeAeX+mC4A/qq0ByDLiAk6erNARaQ==} engines: {node: '>= 11.9.0'} @@ -5627,8 +6126,8 @@ packages: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true - flatted@3.2.9: - resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} + flatted@3.3.1: + resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} flow-parser@0.227.0: resolution: {integrity: sha512-nOygtGKcX/siZK/lFzpfdHEfOkfGcTW7rNroR1Zsz6T/JxSahPALXVt5qVHq/fgvMJuv096BTKbgxN3PzVBaDA==} @@ -5781,6 +6280,10 @@ packages: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} + get-stream@8.0.1: + resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} + engines: {node: '>=16'} + get-stream@9.0.1: resolution: {integrity: sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==} engines: {node: '>=18'} @@ -5884,8 +6387,8 @@ packages: resolution: {integrity: sha512-4kKdWXTtgQ4biIo7hZA396HT062nDVVHPjQcurNZ3o/voYN+o5FUC5kOwuORbpExp3XbTJ3SU7iRipiIhQtovw==} engines: {node: '>=14'} - google-auth-library@9.11.0: - resolution: {integrity: sha512-epX3ww/mNnhl6tL45EQ/oixsY8JLEgUFoT4A5E/5iAR4esld9Kqv6IJGk7EmGuOgDvaarwF95hU2+v7Irql9lw==} + google-auth-library@9.12.0: + resolution: {integrity: sha512-5pWjpxJMNJ5UTuhK7QPD5KFPsbosWkX4ajMDeZwXllTtwwqeiIzPWbHIddkLBkkn0mUPboTmukT5rd30Ec9igQ==} engines: {node: '>=14'} googleapis-common@7.0.1: @@ -5901,6 +6404,10 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + graphql@16.9.0: + resolution: {integrity: sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==} + engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} + gtoken@7.0.1: resolution: {integrity: sha512-KcFVtoP1CVFtQu0aSk3AyAt2og66PFhZAlkUOuWKwzMLoulHXG5W5wE5xAnHb+yl3/wEFoqGW7/cDGMU8igDZQ==} engines: {node: '>=14.0.0'} @@ -5967,6 +6474,9 @@ packages: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} hasBin: true + headers-polyfill@4.0.3: + resolution: {integrity: sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==} + hermes-estree@0.20.1: resolution: {integrity: sha512-SQpZK4BzR48kuOg0v4pb3EAGNclzIlqMj3Opu/mu7bbAoFw6oig6cEt/RAi0zTFW/iW6Iz9X9ggGuZTAZ/yZHg==} @@ -6045,14 +6555,18 @@ packages: resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} engines: {node: '>= 6'} - https-proxy-agent@7.0.4: - resolution: {integrity: sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==} + https-proxy-agent@7.0.5: + resolution: {integrity: sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==} engines: {node: '>= 14'} human-signals@2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} + human-signals@5.0.0: + resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} + engines: {node: '>=16.17.0'} + human-signals@7.0.0: resolution: {integrity: sha512-74kytxOUSvNbjrT9KisAbaTZ/eJwD/LrbM/kh5j0IhPuJzwuA19dWvniFGwBzN9rVjg+O/e+F310PjObDXS+9Q==} engines: {node: '>=18.18.0'} @@ -6260,6 +6774,9 @@ packages: resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} engines: {node: '>= 0.4'} + is-node-process@1.2.0: + resolution: {integrity: sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==} + is-number-object@1.0.7: resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} engines: {node: '>= 0.4'} @@ -6329,6 +6846,10 @@ packages: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} + is-stream@3.0.0: + resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + is-stream@4.0.1: resolution: {integrity: sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==} engines: {node: '>=18'} @@ -6494,8 +7015,8 @@ packages: resolution: {integrity: sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==} engines: {node: '>=12.0.0'} - jsdom@24.1.0: - resolution: {integrity: sha512-6gpM7pRXCwIOKxX47cgOyvyQDN/Eh0f1MeKySBV2xGdKtqJBLj8P25eY3EVCWo2mglDDzozR2r2MW4T+JiNUZA==} + jsdom@24.1.1: + resolution: {integrity: sha512-5O1wWV99Jhq4DV7rCLIoZ/UIhyQeDR7wHVyZAHAshbrvZsLs+Xzz7gtwnlJTJDjleiTKh54F4dXrX70vJQTyJQ==} engines: {node: '>=18'} peerDependencies: canvas: ^2.11.2 @@ -6684,8 +7205,8 @@ packages: resolution: {integrity: sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==} engines: {node: '>= 0.6.3'} - lerna@8.1.6: - resolution: {integrity: sha512-O3zSX/dmchMVy9m37DD1BCx7X68nS5lZFECjqG7Siiv3+KgqKXHnF4JQPJUDD/vG2qBQv5StpXCyqGxR0XJVAQ==} + lerna@8.1.7: + resolution: {integrity: sha512-v2kkBn8Vqtroo30Pr5/JQ9MygRhnCsoI1jSOf3DxWmcTbkpC5U7c6rGr+7NPK6QrxKbC0/Cj4kuIBMb/7f79sQ==} engines: {node: '>=18.0.0'} hasBin: true @@ -6883,12 +7404,14 @@ packages: loupe@2.3.7: resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} + loupe@3.1.1: + resolution: {integrity: sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==} + lower-case@2.0.2: resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} - lru-cache@10.3.0: - resolution: {integrity: sha512-CQl19J/g+Hbjbv4Y3mFNNXFEL/5t/KCg8POCuUqd4rMKjGG+j1ybER83hxV58zL+dFI1PTkt3GNFSHRt+d8qEQ==} - engines: {node: 14 || >=16.14} + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} lru-cache@4.1.5: resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} @@ -6908,6 +7431,9 @@ packages: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true + magic-string@0.30.10: + resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} + make-array@1.0.5: resolution: {integrity: sha512-sgK2SAzxT19rWU+qxKUcn6PAh/swiIiz2F8C2cZjLc1z4iwYIfdoihqFIDQ8BDzAGtWPYJ6Sr13K1j/DXynDLA==} engines: {node: '>=0.10.0'} @@ -7054,6 +7580,10 @@ packages: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} + mimic-fn@4.0.0: + resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} + engines: {node: '>=12'} + min-indent@1.0.1: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} @@ -7136,8 +7666,8 @@ packages: engines: {node: '>=10'} hasBin: true - mocha@10.6.0: - resolution: {integrity: sha512-hxjt4+EEB0SA0ZDygSS015t65lJw/I2yRCS3Ae+SJ5FrbzrXgfYwJr96f0OvIXdj7h4lv/vLCrH3rkiuizFSvw==} + mocha@10.7.0: + resolution: {integrity: sha512-v8/rBWr2VO5YkspYINnvu81inSz2y3ODJrhO175/Exzor1RcEZZkizgE2A+w/CAXXoESS8Kys5E62dOHGHzULA==} engines: {node: '>= 14.0.0'} hasBin: true @@ -7145,8 +7675,8 @@ packages: resolution: {integrity: sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==} engines: {node: '>=0.10.0'} - moment-hijri@2.1.2: - resolution: {integrity: sha512-p5ZOA1UzBHAAXiePh37XRjjwuyH78+1ShYZ7R6jogxketewG7kTCUjUmcP9c4Qsx8D8cqxwUWrESjtgdT6tNoA==} + moment-hijri@2.30.0: + resolution: {integrity: sha512-A3Ss8ASkhkT160laK9gXv+Yle0jA6eg92o8Uw78mU3OlUyaWjW2ntMd04kutawFb01KR0GIeJ8lqgIABGbWj7g==} moment-jalaali@0.10.1: resolution: {integrity: sha512-/iwLtt3onvI6wFydUSTj10nFeNkD9sZ0fSY1gmqC2dwt1yGYJun6agI7E7SiBYi8uzGlt3P4KuPYCMLiv43E+g==} @@ -7174,6 +7704,16 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + msw@2.3.2: + resolution: {integrity: sha512-vDn6d6a50vxPE+HnaKQfpmZ4SVXlOjF97yD5FJcUT3v2/uZ65qvTYNL25yOmnrfCNWZ4wtAS7EbtXxygMug2Tw==} + engines: {node: '>=18'} + hasBin: true + peerDependencies: + typescript: '>= 4.7.x' + peerDependenciesMeta: + typescript: + optional: true + multimatch@5.0.0: resolution: {integrity: sha512-ypMKuglUrZUD99Tk2bUQ+xNQj43lPEfAeX2o9cTteAmShXy2VHDJpuwu1o0xqoKCt9jLVAvwyFKdLTPXKAfJyA==} engines: {node: '>=10'} @@ -7261,6 +7801,10 @@ packages: encoding: optional: true + node-gyp-build@4.8.1: + resolution: {integrity: sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==} + hasBin: true + node-gyp@10.0.1: resolution: {integrity: sha512-gg3/bHehQfZivQVfqIyy8wTdSymF9yTyP4CJifK73imyNMU8AIGQE2pUa7dNWfmMeG9cDVF2eehiRMv0LC1iAg==} engines: {node: ^16.14.0 || >=18.0.0} @@ -7346,8 +7890,8 @@ packages: nth-check@2.1.1: resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} - nwsapi@2.2.10: - resolution: {integrity: sha512-QK0sRs7MKv0tKe1+5uZIQk/C8XGza4DAnztJG8iD+TpJIORARrCxczA738awHrZoHeTjSSoHqao2teO0dC/gFQ==} + nwsapi@2.2.12: + resolution: {integrity: sha512-qXDmcVlZV4XRtKFzddidpfVP4oMSGhga+xdMc25mv8kaLUHtgzCDhUxkrN8exkGdTlLNaXj7CV3GtON7zuGZ+w==} nx@17.3.0: resolution: {integrity: sha512-CoY0qUrO8xErbA/v/bbfDGs+KaD9MCO7PReqmIeyrtDNwFl6vnb+U2MpBxCsRP+YH2Oa8hI8Lu+kcnPktx2v6A==} @@ -7430,6 +7974,10 @@ packages: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} + onetime@6.0.0: + resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} + engines: {node: '>=12'} + open@8.4.2: resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} engines: {node: '>=12'} @@ -7458,6 +8006,9 @@ packages: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} + outvariant@1.4.3: + resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==} + override-require@1.1.1: resolution: {integrity: sha512-eoJ9YWxFcXbrn2U8FKT6RV+/Kj7fiGAB1VvHzbYKt8xM5ZuKZgCGvnHzDxmreEjcBH28ejg5MiOH4iyY1mQnkg==} @@ -7611,8 +8162,8 @@ packages: engines: {node: '>=0.10.0'} hasBin: true - parse-imports@2.1.0: - resolution: {integrity: sha512-JQWgmK2o4w8leUkZeZPatWdAny6vXGU/3siIUvMF6J2rDCud9aTt8h/px9oZJ6U3EcfhngBJ635uPFI0q0VAeA==} + parse-imports@2.1.1: + resolution: {integrity: sha512-TDT4HqzUiTMO1wJRwg/t/hYk8Wdp3iF/ToMIlAoVQfL1Xs/sTxq1dKWSMjMbQmIarfWKymOyly40+zmPHXMqCA==} engines: {node: '>= 18'} parse-json@4.0.0: @@ -7705,9 +8256,16 @@ packages: resolution: {integrity: sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==} engines: {node: '>=12'} + pathe@1.1.2: + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + pathval@1.1.1: resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + pathval@2.0.0: + resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} + engines: {node: '>= 14.16'} + picocolors@1.0.1: resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} @@ -7800,8 +8358,8 @@ packages: resolution: {integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==} engines: {node: ^10 || ^12 || >=14} - postcss@8.4.39: - resolution: {integrity: sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==} + postcss@8.4.40: + resolution: {integrity: sha512-YF2kKIUzAofPMpfH6hOi2cGnv/HrUlfucspc7pDyvv7kGdqXrfj8SCl/t8owkEgKEuu8ZcRjSOxFxVLqwChZ2Q==} engines: {node: ^10 || ^12 || >=14} prelude-ls@1.1.2: @@ -7816,8 +8374,8 @@ packages: resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} engines: {node: '>=6.0.0'} - prettier@3.3.2: - resolution: {integrity: sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==} + prettier@3.3.3: + resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} engines: {node: '>=14'} hasBin: true @@ -7997,15 +8555,19 @@ packages: react-is@18.3.1: resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} - react-router-dom@6.24.1: - resolution: {integrity: sha512-U19KtXqooqw967Vw0Qcn5cOvrX5Ejo9ORmOtJMzYWtCT4/WOfFLIZGGsVLxcd9UkBO0mSTZtXqhZBsWlHr7+Sg==} + react-refresh@0.14.2: + resolution: {integrity: sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==} + engines: {node: '>=0.10.0'} + + react-router-dom@6.25.1: + resolution: {integrity: sha512-0tUDpbFvk35iv+N89dWNrJp+afLgd+y4VtorJZuOCXK0kkCWjEvb3vTJM++SYvMEpbVwXKf3FjeVveVEb6JpDQ==} engines: {node: '>=14.0.0'} peerDependencies: react: '>=16.8' react-dom: '>=16.8' - react-router@6.24.1: - resolution: {integrity: sha512-PTXFXGK2pyXpHzVo3rR9H7ip4lSPZZc0bHG5CARmj65fTT6qG7sTngmb6lcYu1gf3y/8KxORoy9yn59pGpCnpg==} + react-router@6.25.1: + resolution: {integrity: sha512-u8ELFr5Z6g02nUtpPAggP73Jigj1mRePSwhS/2nkTrlPU5yEkH1vYzWNyvSnSzeeE2DNqWdH+P8OhIh9wuXhTw==} engines: {node: '>=14.0.0'} peerDependencies: react: '>=16.8' @@ -8246,19 +8808,24 @@ packages: engines: {node: '>=14'} hasBin: true - rimraf@5.0.8: - resolution: {integrity: sha512-XSh0V2/yNhDEi8HwdIefD8MLgs4LQXPag/nEJWs3YUc3Upn+UHa1GyIkEg9xSSNt7HnkO5FjTvmcRzgf+8UZuw==} - engines: {node: '>=18'} + rimraf@5.0.9: + resolution: {integrity: sha512-3i7b8OcswU6CpU8Ej89quJD4O98id7TtVM5U4Mybh84zQXdrFmDLouWBEEaD/QfO3gDDfH+AGFCGsR7kngzQnA==} + engines: {node: 14 >=14.20 || 16 >=16.20 || >=18} hasBin: true robust-predicates@3.0.2: resolution: {integrity: sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==} + rollup@4.18.1: + resolution: {integrity: sha512-Elx2UT8lzxxOXMpy5HWQGZqkrQOtrVDDa/bm9l10+U4rQnVzbL/LgZ4NOM1MPIDyHk69W4InuYDF5dzRh4Kw1A==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + rrweb-cssom@0.6.0: resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} - rrweb-cssom@0.7.0: - resolution: {integrity: sha512-KlSv0pm9kgQSRxXEMgtivPJ4h826YHsuob8pSHcfSZsSXGtvpEAie8S0AnXuObEJ7nhikOb4ahwxDm0H2yW17g==} + rrweb-cssom@0.7.1: + resolution: {integrity: sha512-TrEMa7JGdVm0UThDJSx7ddw5nVm3UJS9o9CCIZ72B1vSyEZoziDqBYP3XIoi/12lKrJR8rE3jeFHMok2F/Mnsg==} rtl-css-js@1.16.1: resolution: {integrity: sha512-lRQgou1mu19e+Ya0LsTvKrVJ5TYUbqCVPAiImX3UfLTenarvPUl1QFdvu5Z3PYmHT9RCcwIfbjRQBntExyj3Zg==} @@ -8328,8 +8895,8 @@ packages: engines: {node: '>=10'} hasBin: true - semver@7.6.2: - resolution: {integrity: sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==} + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} engines: {node: '>=10'} hasBin: true @@ -8395,6 +8962,9 @@ packages: resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} engines: {node: '>= 0.4'} + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} @@ -8516,6 +9086,9 @@ packages: resolution: {integrity: sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + statuses@1.5.0: resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==} engines: {node: '>= 0.6'} @@ -8524,6 +9097,9 @@ packages: resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} engines: {node: '>= 0.8'} + std-env@3.7.0: + resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} + stop-iteration-iterator@1.0.0: resolution: {integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==} engines: {node: '>= 0.4'} @@ -8539,6 +9115,9 @@ packages: resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} engines: {node: '>=10.0.0'} + strict-event-emitter@0.5.1: + resolution: {integrity: sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==} + string-replace-loader@3.1.0: resolution: {integrity: sha512-5AOMUZeX5HE/ylKDnEa/KKBqvlnFmRZudSOjVJHxhoJg9QYTwl1rECx7SLR8BBH7tfxb4Rp7EM2XVfQFxIhsbQ==} peerDependencies: @@ -8602,6 +9181,10 @@ packages: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} + strip-final-newline@3.0.0: + resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} + engines: {node: '>=12'} + strip-final-newline@4.0.0: resolution: {integrity: sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==} engines: {node: '>=18'} @@ -8623,8 +9206,8 @@ packages: engines: {node: '>=4'} hasBin: true - styled-components@6.1.11: - resolution: {integrity: sha512-Ui0jXPzbp1phYij90h12ksljKGqF8ncGx+pjrNPsSPhbUUjWT2tD1FwGo2LF6USCnbrsIhNngDfodhxbegfEOA==} + styled-components@6.1.12: + resolution: {integrity: sha512-n/O4PzRPhbYI0k1vKKayfti3C/IGcPf+DqcrOB7O/ab9x4u/zjqraneT5N45+sIe87cxrCApXM8Bna7NYxwoTA==} engines: {node: '>= 16'} peerDependencies: react: '>= 16.8.0' @@ -8686,12 +9269,8 @@ packages: symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} - synckit@0.8.8: - resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==} - engines: {node: ^14.18.0 || >=16.0.0} - - synckit@0.9.0: - resolution: {integrity: sha512-7RnqIMq572L8PeEzKeBINYEJDDxpcH8JEgLwUqBd3TkofhFRbkq4QLR0u+36avGAhCRbk2nnmjcW9SE531hPDg==} + synckit@0.9.1: + resolution: {integrity: sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==} engines: {node: ^14.18.0 || >=16.0.0} tapable@0.1.10: @@ -8772,6 +9351,21 @@ packages: tiny-warning@1.0.3: resolution: {integrity: sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==} + tinybench@2.8.0: + resolution: {integrity: sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw==} + + tinypool@1.0.0: + resolution: {integrity: sha512-KIKExllK7jp3uvrNtvRBYBWBOAXSX8ZvoaD8T+7KB/QHIuoJW3Pmr60zucywjAlMb5TeXUkcs/MWeWLu0qvuAQ==} + engines: {node: ^18.0.0 || >=20.0.0} + + tinyrainbow@1.2.0: + resolution: {integrity: sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==} + engines: {node: '>=14.0.0'} + + tinyspy@3.0.0: + resolution: {integrity: sha512-q5nmENpTHgiPVd1cJDDc9cVoYN5x4vCvwT3FMilvKPKneCBZAxn2YWQjDF0UMcE9k0Cay1gBiDfTMU0g+mPMQA==} + engines: {node: '>=14.0.0'} + tmp@0.0.33: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} @@ -8857,6 +9451,10 @@ packages: resolution: {integrity: sha512-ZSDngmP1z6zw+FIkIBjvOp/II/mIub/O7Pp12j1WNsiCpg5R5wAc//i555bBQsE44O94btLt0xM/Zr2LQjwdCg==} engines: {node: ^16.14.0 || >=18.0.0} + tunnel@0.0.6: + resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==} + engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} + type-check@0.3.2: resolution: {integrity: sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==} engines: {node: '>= 0.8.0'} @@ -8869,6 +9467,10 @@ packages: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} + type-detect@4.1.0: + resolution: {integrity: sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==} + engines: {node: '>=4'} + type-fest@0.18.1: resolution: {integrity: sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==} engines: {node: '>=10'} @@ -8897,6 +9499,10 @@ packages: resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} engines: {node: '>=12.20'} + type-fest@4.23.0: + resolution: {integrity: sha512-ZiBujro2ohr5+Z/hZWHESLz3g08BBdrdLMieYFULJO+tWc437sn8kQsWLJoZErY8alNhxre9K4p3GURAG11n+w==} + engines: {node: '>=16'} + type-is@1.6.18: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'} @@ -8923,8 +9529,8 @@ packages: typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} - typescript@5.5.3: - resolution: {integrity: sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==} + typescript@5.5.4: + resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} engines: {node: '>=14.17'} hasBin: true @@ -8945,6 +9551,10 @@ packages: undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + undici@5.28.4: + resolution: {integrity: sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==} + engines: {node: '>=14.0'} + unicode-canonical-property-names-ecmascript@2.0.0: resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==} engines: {node: '>=4'} @@ -9092,6 +9702,64 @@ packages: vfile@4.2.1: resolution: {integrity: sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==} + vite-node@2.0.4: + resolution: {integrity: sha512-ZpJVkxcakYtig5iakNeL7N3trufe3M6vGuzYAr4GsbCTwobDeyPJpE4cjDhhPluv8OvQCFzu2LWp6GkoKRITXA==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + + vite@5.3.4: + resolution: {integrity: sha512-Cw+7zL3ZG9/NZBB8C+8QbQZmR54GwqIz+WMI4b3JgdYJvX+ny9AjJXqkGQlDXSXRP9rP0B4tbciRMOVEKulVOA==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.19.42 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + + vitest@2.0.4: + resolution: {integrity: sha512-luNLDpfsnxw5QSW4bISPe6tkxVvv5wn2BBs/PuDRkhXZ319doZyLOBr1sjfB5yCEpTiU7xCAdViM8TNVGPwoog==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/node': ^18.19.42 + '@vitest/browser': 2.0.4 + '@vitest/ui': 2.0.4 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + void-elements@2.0.1: resolution: {integrity: sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==} engines: {node: '>=0.10.0'} @@ -9206,6 +9874,11 @@ packages: engines: {node: ^16.13.0 || >=18.0.0} hasBin: true + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + wide-align@1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} @@ -9283,8 +9956,8 @@ packages: utf-8-validate: optional: true - ws@8.17.0: - resolution: {integrity: sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==} + ws@8.18.0: + resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -9369,6 +10042,10 @@ packages: resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} engines: {node: '>=12.20'} + yoctocolors-cjs@2.1.2: + resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==} + engines: {node: '>=18'} + yoctocolors@2.0.2: resolution: {integrity: sha512-Ct97huExsu7cWeEjmrXlofevF8CvzUglJ4iGUet5B8xn1oumtAZBpHU4GzYuoE6PVqcZ5hghtBrSlhwHuR1Jmw==} engines: {node: '>=18'} @@ -9393,6 +10070,25 @@ snapshots: '@aashutoshrathi/word-wrap@1.2.6': {} + '@actions/core@1.10.1': + dependencies: + '@actions/http-client': 2.2.1 + uuid: 8.3.2 + + '@actions/github@6.0.0': + dependencies: + '@actions/http-client': 2.2.1 + '@octokit/core': 5.2.0 + '@octokit/plugin-paginate-rest': 9.2.1(@octokit/core@5.2.0) + '@octokit/plugin-rest-endpoint-methods': 10.4.1(@octokit/core@5.2.0) + + '@actions/http-client@2.2.1': + dependencies: + tunnel: 0.0.6 + undici: 5.28.4 + + '@adobe/css-tools@4.4.0': {} + '@algolia/autocomplete-core@1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)(search-insights@2.13.0)': dependencies: '@algolia/autocomplete-plugin-algolia-insights': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)(search-insights@2.13.0) @@ -9483,14 +10179,14 @@ snapshots: '@algolia/logger-common': 4.22.1 '@algolia/requester-common': 4.22.1 - '@ampproject/remapping@2.2.1': + '@ampproject/remapping@2.3.0': dependencies: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - '@argos-ci/core@2.3.0': + '@argos-ci/core@2.4.0': dependencies: - '@argos-ci/util': 2.0.0 + '@argos-ci/util': 2.1.0 axios: 1.7.2(debug@4.3.5) convict: 6.2.4 debug: 4.3.5(supports-color@8.1.1) @@ -9500,11 +10196,11 @@ snapshots: transitivePeerDependencies: - supports-color - '@argos-ci/util@2.0.0': {} + '@argos-ci/util@2.1.0': {} - '@babel/cli@7.24.8(@babel/core@7.24.8)': + '@babel/cli@7.24.8(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@jridgewell/trace-mapping': 0.3.25 commander: 6.2.1 convert-source-map: 2.0.0 @@ -9521,20 +10217,20 @@ snapshots: '@babel/highlight': 7.24.7 picocolors: 1.0.1 - '@babel/compat-data@7.24.8': {} + '@babel/compat-data@7.25.2': {} - '@babel/core@7.24.8': + '@babel/core@7.25.2': dependencies: - '@ampproject/remapping': 2.2.1 + '@ampproject/remapping': 2.3.0 '@babel/code-frame': 7.24.7 - '@babel/generator': 7.24.8 - '@babel/helper-compilation-targets': 7.24.8 - '@babel/helper-module-transforms': 7.24.8(@babel/core@7.24.8) - '@babel/helpers': 7.24.8 - '@babel/parser': 7.24.8 - '@babel/template': 7.24.7 - '@babel/traverse': 7.24.8 - '@babel/types': 7.24.8 + '@babel/generator': 7.25.0 + '@babel/helper-compilation-targets': 7.25.2 + '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) + '@babel/helpers': 7.25.0 + '@babel/parser': 7.25.0 + '@babel/template': 7.25.0 + '@babel/traverse': 7.25.2 + '@babel/types': 7.25.2 convert-source-map: 2.0.0 debug: 4.3.5(supports-color@8.1.1) gensync: 1.0.0-beta.2 @@ -9543,58 +10239,58 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/generator@7.24.8': + '@babel/generator@7.25.0': dependencies: - '@babel/types': 7.24.8 + '@babel/types': 7.25.2 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 2.5.2 '@babel/helper-annotate-as-pure@7.24.7': dependencies: - '@babel/types': 7.24.8 + '@babel/types': 7.25.2 '@babel/helper-builder-binary-assignment-operator-visitor@7.24.7': dependencies: - '@babel/traverse': 7.24.8 - '@babel/types': 7.24.8 + '@babel/traverse': 7.25.2 + '@babel/types': 7.25.2 transitivePeerDependencies: - supports-color - '@babel/helper-compilation-targets@7.24.8': + '@babel/helper-compilation-targets@7.25.2': dependencies: - '@babel/compat-data': 7.24.8 + '@babel/compat-data': 7.25.2 '@babel/helper-validator-option': 7.24.8 browserslist: 4.23.2 lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-create-class-features-plugin@7.24.7(@babel/core@7.24.8)': + '@babel/helper-create-class-features-plugin@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-annotate-as-pure': 7.24.7 '@babel/helper-environment-visitor': 7.24.7 '@babel/helper-function-name': 7.24.7 - '@babel/helper-member-expression-to-functions': 7.24.7 + '@babel/helper-member-expression-to-functions': 7.24.8 '@babel/helper-optimise-call-expression': 7.24.7 - '@babel/helper-replace-supers': 7.24.7(@babel/core@7.24.8) + '@babel/helper-replace-supers': 7.25.0(@babel/core@7.25.2) '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 '@babel/helper-split-export-declaration': 7.24.7 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/helper-create-regexp-features-plugin@7.24.7(@babel/core@7.24.8)': + '@babel/helper-create-regexp-features-plugin@7.25.2(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-annotate-as-pure': 7.24.7 regexpu-core: 5.3.2 semver: 6.3.1 - '@babel/helper-define-polyfill-provider@0.6.1(@babel/core@7.24.8)': + '@babel/helper-define-polyfill-provider@0.6.1(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/helper-compilation-targets': 7.24.8 + '@babel/core': 7.25.2 + '@babel/helper-compilation-targets': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 debug: 4.3.5(supports-color@8.1.1) lodash.debounce: 4.0.8 @@ -9604,83 +10300,78 @@ snapshots: '@babel/helper-environment-visitor@7.24.7': dependencies: - '@babel/types': 7.24.8 + '@babel/types': 7.25.2 '@babel/helper-function-name@7.24.7': dependencies: - '@babel/template': 7.24.7 - '@babel/types': 7.24.8 + '@babel/template': 7.25.0 + '@babel/types': 7.25.2 - '@babel/helper-hoist-variables@7.24.7': + '@babel/helper-member-expression-to-functions@7.24.8': dependencies: - '@babel/types': 7.24.8 - - '@babel/helper-member-expression-to-functions@7.24.7': - dependencies: - '@babel/traverse': 7.24.8 - '@babel/types': 7.24.8 + '@babel/traverse': 7.25.2 + '@babel/types': 7.25.2 transitivePeerDependencies: - supports-color '@babel/helper-module-imports@7.24.7': dependencies: - '@babel/traverse': 7.24.8 - '@babel/types': 7.24.8 + '@babel/traverse': 7.25.2 + '@babel/types': 7.25.2 transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.24.8(@babel/core@7.24.8)': + '@babel/helper-module-transforms@7.25.2(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/helper-environment-visitor': 7.24.7 + '@babel/core': 7.25.2 '@babel/helper-module-imports': 7.24.7 '@babel/helper-simple-access': 7.24.7 - '@babel/helper-split-export-declaration': 7.24.7 '@babel/helper-validator-identifier': 7.24.7 + '@babel/traverse': 7.25.2 transitivePeerDependencies: - supports-color '@babel/helper-optimise-call-expression@7.24.7': dependencies: - '@babel/types': 7.24.8 + '@babel/types': 7.25.2 '@babel/helper-plugin-utils@7.24.8': {} - '@babel/helper-remap-async-to-generator@7.24.7(@babel/core@7.24.8)': + '@babel/helper-remap-async-to-generator@7.25.0(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-annotate-as-pure': 7.24.7 - '@babel/helper-environment-visitor': 7.24.7 - '@babel/helper-wrap-function': 7.24.7 + '@babel/helper-wrap-function': 7.25.0 + '@babel/traverse': 7.25.2 transitivePeerDependencies: - supports-color - '@babel/helper-replace-supers@7.24.7(@babel/core@7.24.8)': + '@babel/helper-replace-supers@7.25.0(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/helper-environment-visitor': 7.24.7 - '@babel/helper-member-expression-to-functions': 7.24.7 + '@babel/core': 7.25.2 + '@babel/helper-member-expression-to-functions': 7.24.8 '@babel/helper-optimise-call-expression': 7.24.7 + '@babel/traverse': 7.25.2 transitivePeerDependencies: - supports-color '@babel/helper-simple-access@7.24.7': dependencies: - '@babel/traverse': 7.24.8 - '@babel/types': 7.24.8 + '@babel/traverse': 7.25.2 + '@babel/types': 7.25.2 transitivePeerDependencies: - supports-color '@babel/helper-skip-transparent-expression-wrappers@7.24.7': dependencies: - '@babel/traverse': 7.24.8 - '@babel/types': 7.24.8 + '@babel/traverse': 7.25.2 + '@babel/types': 7.25.2 transitivePeerDependencies: - supports-color '@babel/helper-split-export-declaration@7.24.7': dependencies: - '@babel/types': 7.24.8 + '@babel/types': 7.25.2 '@babel/helper-string-parser@7.24.8': {} @@ -9688,19 +10379,18 @@ snapshots: '@babel/helper-validator-option@7.24.8': {} - '@babel/helper-wrap-function@7.24.7': + '@babel/helper-wrap-function@7.25.0': dependencies: - '@babel/helper-function-name': 7.24.7 - '@babel/template': 7.24.7 - '@babel/traverse': 7.24.8 - '@babel/types': 7.24.8 + '@babel/template': 7.25.0 + '@babel/traverse': 7.25.2 + '@babel/types': 7.25.2 transitivePeerDependencies: - supports-color - '@babel/helpers@7.24.8': + '@babel/helpers@7.25.0': dependencies: - '@babel/template': 7.24.7 - '@babel/types': 7.24.8 + '@babel/template': 7.25.0 + '@babel/types': 7.25.2 '@babel/highlight@7.24.7': dependencies: @@ -9709,676 +10399,703 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.0.1 - '@babel/node@7.24.8(@babel/core@7.24.8)': + '@babel/node@7.25.0(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/register': 7.24.6(@babel/core@7.24.8) + '@babel/core': 7.25.2 + '@babel/register': 7.24.6(@babel/core@7.25.2) commander: 6.2.1 core-js: 3.35.1 node-environment-flags: 1.0.6 regenerator-runtime: 0.14.1 v8flags: 3.2.0 - '@babel/parser@7.24.8': + '@babel/parser@7.25.0': dependencies: - '@babel/types': 7.24.8 + '@babel/types': 7.25.2 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.0(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/helper-environment-visitor': 7.24.7 + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/traverse': 7.25.2 + transitivePeerDependencies: + - supports-color + + '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.0(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.0(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 - '@babel/plugin-transform-optional-chaining': 7.24.8(@babel/core@7.24.8) + '@babel/plugin-transform-optional-chaining': 7.24.8(@babel/core@7.25.2) transitivePeerDependencies: - supports-color - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.0(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/helper-environment-visitor': 7.24.7 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 + '@babel/traverse': 7.25.2 + transitivePeerDependencies: + - supports-color - '@babel/plugin-proposal-private-methods@7.18.6(@babel/core@7.24.8)': + '@babel/plugin-proposal-private-methods@7.18.6(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/helper-create-class-features-plugin': 7.24.7(@babel/core@7.24.8) + '@babel/core': 7.25.2 + '@babel/helper-create-class-features-plugin': 7.24.7(@babel/core@7.25.2) '@babel/helper-plugin-utils': 7.24.8 transitivePeerDependencies: - supports-color - '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.24.8)': + '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 - '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.24.8)': + '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.24.8)': + '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.24.8)': + '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.24.8)': + '@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.24.8)': + '@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-flow@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-syntax-flow@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-import-assertions@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-syntax-import-assertions@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-import-attributes@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-syntax-import-attributes@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.24.8)': + '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.24.8)': + '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-jsx@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-syntax-jsx@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.24.8)': + '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.24.8)': + '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.24.8)': + '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.24.8)': + '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.24.8)': + '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.24.8)': + '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.24.8)': + '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.24.8)': + '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-typescript@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-syntax-typescript@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.24.8)': + '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/helper-create-regexp-features-plugin': 7.24.7(@babel/core@7.24.8) + '@babel/core': 7.25.2 + '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.25.2) '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-arrow-functions@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-arrow-functions@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-async-generator-functions@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-async-generator-functions@7.25.0(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/helper-environment-visitor': 7.24.7 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-remap-async-to-generator': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.24.8) + '@babel/helper-remap-async-to-generator': 7.25.0(@babel/core@7.25.2) + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.25.2) + '@babel/traverse': 7.25.2 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-async-to-generator@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-async-to-generator@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-module-imports': 7.24.7 '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-remap-async-to-generator': 7.24.7(@babel/core@7.24.8) + '@babel/helper-remap-async-to-generator': 7.25.0(@babel/core@7.25.2) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-block-scoped-functions@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-block-scoped-functions@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-block-scoping@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-block-scoping@7.25.0(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-class-properties@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-class-properties@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/helper-create-class-features-plugin': 7.24.7(@babel/core@7.24.8) + '@babel/core': 7.25.2 + '@babel/helper-create-class-features-plugin': 7.24.7(@babel/core@7.25.2) '@babel/helper-plugin-utils': 7.24.8 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-class-static-block@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-class-static-block@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/helper-create-class-features-plugin': 7.24.7(@babel/core@7.24.8) + '@babel/core': 7.25.2 + '@babel/helper-create-class-features-plugin': 7.24.7(@babel/core@7.25.2) '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.24.8) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.25.2) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-classes@7.24.8(@babel/core@7.24.8)': + '@babel/plugin-transform-classes@7.25.0(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-annotate-as-pure': 7.24.7 - '@babel/helper-compilation-targets': 7.24.8 - '@babel/helper-environment-visitor': 7.24.7 - '@babel/helper-function-name': 7.24.7 + '@babel/helper-compilation-targets': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-replace-supers': 7.24.7(@babel/core@7.24.8) - '@babel/helper-split-export-declaration': 7.24.7 + '@babel/helper-replace-supers': 7.25.0(@babel/core@7.25.2) + '@babel/traverse': 7.25.2 globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-computed-properties@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-computed-properties@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/template': 7.24.7 + '@babel/template': 7.25.0 - '@babel/plugin-transform-destructuring@7.24.8(@babel/core@7.24.8)': + '@babel/plugin-transform-destructuring@7.24.8(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-dotall-regex@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-dotall-regex@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/helper-create-regexp-features-plugin': 7.24.7(@babel/core@7.24.8) + '@babel/core': 7.25.2 + '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.25.2) '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-duplicate-keys@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-duplicate-keys@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-dynamic-import@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.0(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 + '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.25.2) '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.24.8) - '@babel/plugin-transform-exponentiation-operator@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-dynamic-import@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.25.2) + + '@babel/plugin-transform-exponentiation-operator@7.24.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 '@babel/helper-builder-binary-assignment-operator-visitor': 7.24.7 '@babel/helper-plugin-utils': 7.24.8 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-export-namespace-from@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-export-namespace-from@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.24.8) + '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-transform-flow-strip-types@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-flow-strip-types@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-flow': 7.24.7(@babel/core@7.24.8) + '@babel/plugin-syntax-flow': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-for-of@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-for-of@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-function-name@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-function-name@7.25.1(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/helper-compilation-targets': 7.24.8 - '@babel/helper-function-name': 7.24.7 + '@babel/core': 7.25.2 + '@babel/helper-compilation-targets': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 + '@babel/traverse': 7.25.2 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-json-strings@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-json-strings@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.24.8) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-transform-literals@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-literals@7.25.2(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-logical-assignment-operators@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-logical-assignment-operators@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.24.8) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.25.2) - '@babel/plugin-transform-member-expression-literals@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-member-expression-literals@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-modules-amd@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-modules-amd@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/helper-module-transforms': 7.24.8(@babel/core@7.24.8) + '@babel/core': 7.25.2 + '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) '@babel/helper-plugin-utils': 7.24.8 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-commonjs@7.24.8(@babel/core@7.24.8)': + '@babel/plugin-transform-modules-commonjs@7.24.8(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/helper-module-transforms': 7.24.8(@babel/core@7.24.8) + '@babel/core': 7.25.2 + '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) '@babel/helper-plugin-utils': 7.24.8 '@babel/helper-simple-access': 7.24.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-systemjs@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-modules-systemjs@7.25.0(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/helper-hoist-variables': 7.24.7 - '@babel/helper-module-transforms': 7.24.8(@babel/core@7.24.8) + '@babel/core': 7.25.2 + '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) '@babel/helper-plugin-utils': 7.24.8 '@babel/helper-validator-identifier': 7.24.7 + '@babel/traverse': 7.25.2 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-umd@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-modules-umd@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/helper-module-transforms': 7.24.8(@babel/core@7.24.8) + '@babel/core': 7.25.2 + '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) '@babel/helper-plugin-utils': 7.24.8 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-named-capturing-groups-regex@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-named-capturing-groups-regex@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/helper-create-regexp-features-plugin': 7.24.7(@babel/core@7.24.8) + '@babel/core': 7.25.2 + '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.25.2) '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-new-target@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-new-target@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-nullish-coalescing-operator@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-nullish-coalescing-operator@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.8) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-transform-numeric-separator@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-numeric-separator@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.24.8) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.25.2) - '@babel/plugin-transform-object-rest-spread@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-object-rest-spread@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/helper-compilation-targets': 7.24.8 + '@babel/core': 7.25.2 + '@babel/helper-compilation-targets': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.24.8) - '@babel/plugin-transform-parameters': 7.24.7(@babel/core@7.24.8) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-transform-parameters': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-object-super@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-object-super@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-replace-supers': 7.24.7(@babel/core@7.24.8) + '@babel/helper-replace-supers': 7.25.0(@babel/core@7.25.2) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-optional-catch-binding@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-optional-catch-binding@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.24.8) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-transform-optional-chaining@7.24.8(@babel/core@7.24.8)': + '@babel/plugin-transform-optional-chaining@7.24.8(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.8) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.2) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-parameters@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-parameters@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-private-methods@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-private-methods@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/helper-create-class-features-plugin': 7.24.7(@babel/core@7.24.8) + '@babel/core': 7.25.2 + '@babel/helper-create-class-features-plugin': 7.24.7(@babel/core@7.25.2) '@babel/helper-plugin-utils': 7.24.8 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-private-property-in-object@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-private-property-in-object@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-annotate-as-pure': 7.24.7 - '@babel/helper-create-class-features-plugin': 7.24.7(@babel/core@7.24.8) + '@babel/helper-create-class-features-plugin': 7.24.7(@babel/core@7.25.2) '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.24.8) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.25.2) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-property-literals@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-property-literals@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-react-constant-elements@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-react-constant-elements@7.25.1(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-react-display-name@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-react-display-name@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-react-jsx-development@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-react-jsx-development@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/plugin-transform-react-jsx': 7.24.7(@babel/core@7.24.8) + '@babel/core': 7.25.2 + '@babel/plugin-transform-react-jsx': 7.24.7(@babel/core@7.25.2) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-react-jsx@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-react-jsx-self@7.24.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 + + '@babel/plugin-transform-react-jsx-source@7.24.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 + + '@babel/plugin-transform-react-jsx@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-annotate-as-pure': 7.24.7 '@babel/helper-module-imports': 7.24.7 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.24.8) - '@babel/types': 7.24.8 + '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.25.2) + '@babel/types': 7.25.2 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-react-pure-annotations@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-react-pure-annotations@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-annotate-as-pure': 7.24.7 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-regenerator@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-regenerator@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 regenerator-transform: 0.15.2 - '@babel/plugin-transform-reserved-words@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-reserved-words@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-runtime@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-runtime@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-module-imports': 7.24.7 '@babel/helper-plugin-utils': 7.24.8 - babel-plugin-polyfill-corejs2: 0.4.10(@babel/core@7.24.8) - babel-plugin-polyfill-corejs3: 0.10.4(@babel/core@7.24.8) - babel-plugin-polyfill-regenerator: 0.6.1(@babel/core@7.24.8) + babel-plugin-polyfill-corejs2: 0.4.10(@babel/core@7.25.2) + babel-plugin-polyfill-corejs3: 0.10.4(@babel/core@7.25.2) + babel-plugin-polyfill-regenerator: 0.6.1(@babel/core@7.25.2) semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-shorthand-properties@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-shorthand-properties@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-spread@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-spread@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-sticky-regex@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-sticky-regex@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-template-literals@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-template-literals@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-typeof-symbol@7.24.8(@babel/core@7.24.8)': + '@babel/plugin-transform-typeof-symbol@7.24.8(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-typescript@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-typescript@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-annotate-as-pure': 7.24.7 - '@babel/helper-create-class-features-plugin': 7.24.7(@babel/core@7.24.8) + '@babel/helper-create-class-features-plugin': 7.24.7(@babel/core@7.25.2) '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-typescript': 7.24.7(@babel/core@7.24.8) + '@babel/plugin-syntax-typescript': 7.24.7(@babel/core@7.25.2) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-unicode-escapes@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-unicode-escapes@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-unicode-property-regex@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-unicode-property-regex@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/helper-create-regexp-features-plugin': 7.24.7(@babel/core@7.24.8) + '@babel/core': 7.25.2 + '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.25.2) '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-unicode-regex@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-unicode-regex@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/helper-create-regexp-features-plugin': 7.24.7(@babel/core@7.24.8) + '@babel/core': 7.25.2 + '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.25.2) '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-unicode-sets-regex@7.24.7(@babel/core@7.24.8)': + '@babel/plugin-transform-unicode-sets-regex@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 - '@babel/helper-create-regexp-features-plugin': 7.24.7(@babel/core@7.24.8) + '@babel/core': 7.25.2 + '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.25.2) '@babel/helper-plugin-utils': 7.24.8 - '@babel/preset-env@7.24.8(@babel/core@7.24.8)': + '@babel/preset-env@7.25.2(@babel/core@7.25.2)': dependencies: - '@babel/compat-data': 7.24.8 - '@babel/core': 7.24.8 - '@babel/helper-compilation-targets': 7.24.8 + '@babel/compat-data': 7.25.2 + '@babel/core': 7.25.2 + '@babel/helper-compilation-targets': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 '@babel/helper-validator-option': 7.24.8 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.24.8) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.24.8) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.24.8) - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.24.8) - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.24.8) - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.24.8) - '@babel/plugin-syntax-import-assertions': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-syntax-import-attributes': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.24.8) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.24.8) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.24.8) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.8) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.24.8) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.24.8) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.24.8) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.8) - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.24.8) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.24.8) - '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.24.8) - '@babel/plugin-transform-arrow-functions': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-async-generator-functions': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-async-to-generator': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-block-scoped-functions': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-block-scoping': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-class-properties': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-class-static-block': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-classes': 7.24.8(@babel/core@7.24.8) - '@babel/plugin-transform-computed-properties': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-destructuring': 7.24.8(@babel/core@7.24.8) - '@babel/plugin-transform-dotall-regex': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-duplicate-keys': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-dynamic-import': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-exponentiation-operator': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-export-namespace-from': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-for-of': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-function-name': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-json-strings': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-literals': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-logical-assignment-operators': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-member-expression-literals': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-modules-amd': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-modules-commonjs': 7.24.8(@babel/core@7.24.8) - '@babel/plugin-transform-modules-systemjs': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-modules-umd': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-named-capturing-groups-regex': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-new-target': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-nullish-coalescing-operator': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-numeric-separator': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-object-rest-spread': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-object-super': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-optional-catch-binding': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-optional-chaining': 7.24.8(@babel/core@7.24.8) - '@babel/plugin-transform-parameters': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-private-methods': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-private-property-in-object': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-property-literals': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-regenerator': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-reserved-words': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-shorthand-properties': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-spread': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-sticky-regex': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-template-literals': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-typeof-symbol': 7.24.8(@babel/core@7.24.8) - '@babel/plugin-transform-unicode-escapes': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-unicode-property-regex': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-unicode-regex': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-unicode-sets-regex': 7.24.7(@babel/core@7.24.8) - '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.24.8) - babel-plugin-polyfill-corejs2: 0.4.10(@babel/core@7.24.8) - babel-plugin-polyfill-corejs3: 0.10.4(@babel/core@7.24.8) - babel-plugin-polyfill-regenerator: 0.6.1(@babel/core@7.24.8) + '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.25.0(@babel/core@7.25.2) + '@babel/plugin-bugfix-safari-class-field-initializer-scope': 7.25.0(@babel/core@7.25.2) + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.25.0(@babel/core@7.25.2) + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.25.0(@babel/core@7.25.2) + '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.2) + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.25.2) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.25.2) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.25.2) + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-syntax-import-assertions': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-syntax-import-attributes': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.25.2) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.25.2) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.25.2) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.25.2) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.25.2) + '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.25.2) + '@babel/plugin-transform-arrow-functions': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-async-generator-functions': 7.25.0(@babel/core@7.25.2) + '@babel/plugin-transform-async-to-generator': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-block-scoped-functions': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-block-scoping': 7.25.0(@babel/core@7.25.2) + '@babel/plugin-transform-class-properties': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-class-static-block': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-classes': 7.25.0(@babel/core@7.25.2) + '@babel/plugin-transform-computed-properties': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-destructuring': 7.24.8(@babel/core@7.25.2) + '@babel/plugin-transform-dotall-regex': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-duplicate-keys': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-duplicate-named-capturing-groups-regex': 7.25.0(@babel/core@7.25.2) + '@babel/plugin-transform-dynamic-import': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-exponentiation-operator': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-export-namespace-from': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-for-of': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-function-name': 7.25.1(@babel/core@7.25.2) + '@babel/plugin-transform-json-strings': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-literals': 7.25.2(@babel/core@7.25.2) + '@babel/plugin-transform-logical-assignment-operators': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-member-expression-literals': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-modules-amd': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-modules-commonjs': 7.24.8(@babel/core@7.25.2) + '@babel/plugin-transform-modules-systemjs': 7.25.0(@babel/core@7.25.2) + '@babel/plugin-transform-modules-umd': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-named-capturing-groups-regex': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-new-target': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-nullish-coalescing-operator': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-numeric-separator': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-object-rest-spread': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-object-super': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-optional-catch-binding': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-optional-chaining': 7.24.8(@babel/core@7.25.2) + '@babel/plugin-transform-parameters': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-private-methods': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-private-property-in-object': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-property-literals': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-regenerator': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-reserved-words': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-shorthand-properties': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-spread': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-sticky-regex': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-template-literals': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-typeof-symbol': 7.24.8(@babel/core@7.25.2) + '@babel/plugin-transform-unicode-escapes': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-unicode-property-regex': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-unicode-regex': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-unicode-sets-regex': 7.24.7(@babel/core@7.25.2) + '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.25.2) + babel-plugin-polyfill-corejs2: 0.4.10(@babel/core@7.25.2) + babel-plugin-polyfill-corejs3: 0.10.4(@babel/core@7.25.2) + babel-plugin-polyfill-regenerator: 0.6.1(@babel/core@7.25.2) core-js-compat: 3.37.1 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/preset-flow@7.24.7(@babel/core@7.24.8)': + '@babel/preset-flow@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 '@babel/helper-validator-option': 7.24.8 - '@babel/plugin-transform-flow-strip-types': 7.24.7(@babel/core@7.24.8) + '@babel/plugin-transform-flow-strip-types': 7.24.7(@babel/core@7.25.2) - '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.24.8)': + '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/types': 7.24.8 + '@babel/types': 7.25.2 esutils: 2.0.3 - '@babel/preset-react@7.24.7(@babel/core@7.24.8)': + '@babel/preset-react@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 '@babel/helper-validator-option': 7.24.8 - '@babel/plugin-transform-react-display-name': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-react-jsx': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-react-jsx-development': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-react-pure-annotations': 7.24.7(@babel/core@7.24.8) + '@babel/plugin-transform-react-display-name': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-react-jsx': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-react-jsx-development': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-react-pure-annotations': 7.24.7(@babel/core@7.25.2) transitivePeerDependencies: - supports-color - '@babel/preset-typescript@7.24.7(@babel/core@7.24.8)': + '@babel/preset-typescript@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 '@babel/helper-validator-option': 7.24.8 - '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-modules-commonjs': 7.24.8(@babel/core@7.24.8) - '@babel/plugin-transform-typescript': 7.24.7(@babel/core@7.24.8) + '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-modules-commonjs': 7.24.8(@babel/core@7.25.2) + '@babel/plugin-transform-typescript': 7.24.7(@babel/core@7.25.2) transitivePeerDependencies: - supports-color - '@babel/register@7.24.6(@babel/core@7.24.8)': + '@babel/register@7.24.6(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 clone-deep: 4.0.1 find-cache-dir: 2.1.0 make-dir: 2.1.0 @@ -10387,37 +11104,34 @@ snapshots: '@babel/regjsgen@0.8.0': {} - '@babel/runtime-corejs2@7.24.8': + '@babel/runtime-corejs2@7.25.0': dependencies: core-js: 2.6.12 regenerator-runtime: 0.14.1 - '@babel/runtime@7.24.8': + '@babel/runtime@7.25.0': dependencies: regenerator-runtime: 0.14.1 - '@babel/template@7.24.7': + '@babel/template@7.25.0': dependencies: '@babel/code-frame': 7.24.7 - '@babel/parser': 7.24.8 - '@babel/types': 7.24.8 + '@babel/parser': 7.25.0 + '@babel/types': 7.25.2 - '@babel/traverse@7.24.8': + '@babel/traverse@7.25.2': dependencies: '@babel/code-frame': 7.24.7 - '@babel/generator': 7.24.8 - '@babel/helper-environment-visitor': 7.24.7 - '@babel/helper-function-name': 7.24.7 - '@babel/helper-hoist-variables': 7.24.7 - '@babel/helper-split-export-declaration': 7.24.7 - '@babel/parser': 7.24.8 - '@babel/types': 7.24.8 + '@babel/generator': 7.25.0 + '@babel/parser': 7.25.0 + '@babel/template': 7.25.0 + '@babel/types': 7.25.2 debug: 4.3.5(supports-color@8.1.1) globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/types@7.24.8': + '@babel/types@7.25.2': dependencies: '@babel/helper-string-parser': 7.24.8 '@babel/helper-validator-identifier': 7.24.7 @@ -10425,17 +11139,44 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} + '@bundled-es-modules/cookie@2.0.0': + dependencies: + cookie: 0.5.0 + optional: true + + '@bundled-es-modules/statuses@1.0.1': + dependencies: + statuses: 2.0.1 + optional: true + + '@codspeed/core@3.1.0': + dependencies: + axios: 1.7.2(debug@4.3.5) + find-up: 6.3.0 + form-data: 4.0.0 + node-gyp-build: 4.8.1 + transitivePeerDependencies: + - debug + + '@codspeed/vitest-plugin@3.1.0(vite@5.3.4(@types/node@18.19.42)(terser@5.27.0))(vitest@2.0.4(@types/node@18.19.42)(@vitest/browser@2.0.4)(@vitest/ui@2.0.4)(jsdom@24.1.1)(terser@5.27.0))': + dependencies: + '@codspeed/core': 3.1.0 + vite: 5.3.4(@types/node@18.19.42)(terser@5.27.0) + vitest: 2.0.4(@types/node@18.19.42)(@vitest/browser@2.0.4)(@vitest/ui@2.0.4)(jsdom@24.1.1)(terser@5.27.0) + transitivePeerDependencies: + - debug + '@colors/colors@1.5.0': {} '@discoveryjs/json-ext@0.5.7': {} - '@docsearch/css@3.6.0': {} + '@docsearch/css@3.6.1': {} - '@docsearch/react@3.6.0(@algolia/client-search@4.22.1)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.13.0)': + '@docsearch/react@3.6.1(@algolia/client-search@4.22.1)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.13.0)': dependencies: '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)(search-insights@2.13.0) '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1) - '@docsearch/css': 3.6.0 + '@docsearch/css': 3.6.1 algoliasearch: 4.22.1 optionalDependencies: '@types/react': 18.3.3 @@ -10450,13 +11191,13 @@ snapshots: tslib: 2.6.2 optional: true - '@emotion/babel-plugin@11.11.0': + '@emotion/babel-plugin@11.12.0': dependencies: '@babel/helper-module-imports': 7.24.7 - '@babel/runtime': 7.24.8 - '@emotion/hash': 0.9.1 - '@emotion/memoize': 0.8.1 - '@emotion/serialize': 1.1.4 + '@babel/runtime': 7.25.0 + '@emotion/hash': 0.9.2 + '@emotion/memoize': 0.9.0 + '@emotion/serialize': 1.3.0 babel-plugin-macros: 3.1.0 convert-source-map: 1.9.0 escape-string-regexp: 4.0.0 @@ -10466,31 +11207,37 @@ snapshots: transitivePeerDependencies: - supports-color - '@emotion/cache@11.11.0': + '@emotion/cache@11.13.1': dependencies: - '@emotion/memoize': 0.8.1 - '@emotion/sheet': 1.2.2 - '@emotion/utils': 1.2.1 - '@emotion/weak-memoize': 0.3.1 + '@emotion/memoize': 0.9.0 + '@emotion/sheet': 1.4.0 + '@emotion/utils': 1.4.0 + '@emotion/weak-memoize': 0.4.0 stylis: 4.2.0 - '@emotion/hash@0.9.1': {} + '@emotion/hash@0.9.2': {} '@emotion/is-prop-valid@1.2.2': dependencies: '@emotion/memoize': 0.8.1 + '@emotion/is-prop-valid@1.3.0': + dependencies: + '@emotion/memoize': 0.9.0 + '@emotion/memoize@0.8.1': {} - '@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1)': + '@emotion/memoize@0.9.0': {} + + '@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1)': dependencies: - '@babel/runtime': 7.24.8 - '@emotion/babel-plugin': 11.11.0 - '@emotion/cache': 11.11.0 - '@emotion/serialize': 1.1.4 - '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.3.1) - '@emotion/utils': 1.2.1 - '@emotion/weak-memoize': 0.3.1 + '@babel/runtime': 7.25.0 + '@emotion/babel-plugin': 11.12.0 + '@emotion/cache': 11.13.1 + '@emotion/serialize': 1.3.0 + '@emotion/use-insertion-effect-with-fallbacks': 1.1.0(react@18.3.1) + '@emotion/utils': 1.4.0 + '@emotion/weak-memoize': 0.4.0 hoist-non-react-statics: 3.3.2 react: 18.3.1 optionalDependencies: @@ -10498,32 +11245,32 @@ snapshots: transitivePeerDependencies: - supports-color - '@emotion/serialize@1.1.4': + '@emotion/serialize@1.3.0': dependencies: - '@emotion/hash': 0.9.1 - '@emotion/memoize': 0.8.1 - '@emotion/unitless': 0.8.1 - '@emotion/utils': 1.2.1 + '@emotion/hash': 0.9.2 + '@emotion/memoize': 0.9.0 + '@emotion/unitless': 0.9.0 + '@emotion/utils': 1.4.0 csstype: 3.1.3 '@emotion/server@11.11.0': dependencies: - '@emotion/utils': 1.2.1 + '@emotion/utils': 1.4.0 html-tokenize: 2.0.1 multipipe: 1.0.2 through: 2.3.8 - '@emotion/sheet@1.2.2': {} + '@emotion/sheet@1.4.0': {} - '@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1)': + '@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1)': dependencies: - '@babel/runtime': 7.24.8 - '@emotion/babel-plugin': 11.11.0 - '@emotion/is-prop-valid': 1.2.2 - '@emotion/react': 11.11.4(@types/react@18.3.3)(react@18.3.1) - '@emotion/serialize': 1.1.4 - '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.3.1) - '@emotion/utils': 1.2.1 + '@babel/runtime': 7.25.0 + '@emotion/babel-plugin': 11.12.0 + '@emotion/is-prop-valid': 1.3.0 + '@emotion/react': 11.13.0(@types/react@18.3.3)(react@18.3.1) + '@emotion/serialize': 1.3.0 + '@emotion/use-insertion-effect-with-fallbacks': 1.1.0(react@18.3.1) + '@emotion/utils': 1.4.0 react: 18.3.1 optionalDependencies: '@types/react': 18.3.3 @@ -10532,21 +11279,20 @@ snapshots: '@emotion/unitless@0.8.1': {} - '@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@18.3.1)': + '@emotion/unitless@0.9.0': {} + + '@emotion/use-insertion-effect-with-fallbacks@1.1.0(react@18.3.1)': dependencies: react: 18.3.1 - '@emotion/utils@1.2.1': {} + '@emotion/utils@1.4.0': {} - '@emotion/weak-memoize@0.3.1': {} + '@emotion/weak-memoize@0.4.0': {} - '@es-joy/jsdoccomment@0.43.1': + '@es-joy/jsdoccomment@0.46.0': dependencies: - '@types/eslint': 8.56.10 - '@types/estree': 1.0.5 - '@typescript-eslint/types': 7.16.1 comment-parser: 1.4.1 - esquery: 1.5.0 + esquery: 1.6.0 jsdoc-type-pratt-parser: 4.0.0 '@esbuild/aix-ppc64@0.21.5': @@ -10643,7 +11389,7 @@ snapshots: '@fast-csv/format@4.3.5': dependencies: - '@types/node': 18.19.39 + '@types/node': 18.19.42 lodash.escaperegexp: 4.1.2 lodash.isboolean: 3.0.3 lodash.isequal: 4.5.0 @@ -10652,7 +11398,7 @@ snapshots: '@fast-csv/parse@4.3.6': dependencies: - '@types/node': 18.19.39 + '@types/node': 18.19.42 lodash.escaperegexp: 4.1.2 lodash.groupby: 4.6.0 lodash.isfunction: 3.0.9 @@ -10660,6 +11406,8 @@ snapshots: lodash.isundefined: 3.0.1 lodash.uniq: 4.5.0 + '@fastify/busboy@2.1.1': {} + '@floating-ui/core@1.6.0': dependencies: '@floating-ui/utils': 0.2.1 @@ -10789,6 +11537,37 @@ snapshots: '@img/sharp-win32-x64@0.33.4': optional: true + '@inquirer/confirm@3.1.17': + dependencies: + '@inquirer/core': 9.0.5 + '@inquirer/type': 1.5.1 + optional: true + + '@inquirer/core@9.0.5': + dependencies: + '@inquirer/figures': 1.0.5 + '@inquirer/type': 1.5.1 + '@types/mute-stream': 0.0.4 + '@types/node': 18.19.42 + '@types/wrap-ansi': 3.0.0 + ansi-escapes: 4.3.2 + cli-spinners: 2.9.2 + cli-width: 4.1.0 + mute-stream: 1.0.0 + signal-exit: 4.1.0 + strip-ansi: 6.0.1 + wrap-ansi: 6.2.0 + yoctocolors-cjs: 2.1.2 + optional: true + + '@inquirer/figures@1.0.5': + optional: true + + '@inquirer/type@1.5.1': + dependencies: + mute-stream: 1.0.0 + optional: true + '@isaacs/cliui@8.0.2': dependencies: string-width: 5.1.2 @@ -10836,12 +11615,12 @@ snapshots: '@jridgewell/resolve-uri': 3.1.1 '@jridgewell/sourcemap-codec': 1.4.15 - '@lerna/create@8.1.6(babel-plugin-macros@3.1.0)(encoding@0.1.13)(typescript@5.5.3)': + '@lerna/create@8.1.7(@swc/core@1.6.13)(babel-plugin-macros@3.1.0)(encoding@0.1.13)(typescript@5.5.4)': dependencies: '@npmcli/arborist': 7.5.3 '@npmcli/package-json': 5.2.0 '@npmcli/run-script': 8.1.0 - '@nx/devkit': 17.3.0(nx@17.3.0) + '@nx/devkit': 17.3.0(nx@17.3.0(@swc/core@1.6.13)) '@octokit/plugin-enterprise-rest': 6.0.1 '@octokit/rest': 19.0.11(encoding@0.1.13) aproba: 2.0.0 @@ -10854,7 +11633,7 @@ snapshots: console-control-strings: 1.1.0 conventional-changelog-core: 5.0.1 conventional-recommended-bump: 7.0.1 - cosmiconfig: 8.3.6(typescript@5.5.3) + cosmiconfig: 8.3.6(typescript@5.5.4) dedent: 1.5.3(babel-plugin-macros@3.1.0) execa: 5.0.0 fs-extra: 11.2.0 @@ -10880,7 +11659,7 @@ snapshots: npm-package-arg: 11.0.2 npm-packlist: 8.0.2 npm-registry-fetch: 17.1.0 - nx: 17.3.0 + nx: 17.3.0(@swc/core@1.6.13) p-map: 4.0.0 p-map-series: 2.1.0 p-queue: 6.6.2 @@ -10890,12 +11669,13 @@ snapshots: read-cmd-shim: 4.0.0 resolve-from: 5.0.0 rimraf: 4.4.1 - semver: 7.6.2 + semver: 7.6.3 set-blocking: 2.0.0 signal-exit: 3.0.7 slash: 3.0.0 ssri: 10.0.6 string-width: 4.2.3 + strip-ansi: 6.0.1 strong-log-transformer: 2.1.0 tar: 6.2.1 temp-dir: 1.0.0 @@ -10918,12 +11698,25 @@ snapshots: - supports-color - typescript + '@mswjs/cookies@1.1.1': + optional: true + + '@mswjs/interceptors@0.29.1': + dependencies: + '@open-draft/deferred-promise': 2.2.0 + '@open-draft/logger': 0.3.0 + '@open-draft/until': 2.1.0 + is-node-process: 1.2.0 + outvariant: 1.4.3 + strict-event-emitter: 0.5.1 + optional: true + '@mui/base@5.0.0-beta.40(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 '@floating-ui/react-dom': 2.0.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/types': 7.2.15(@types/react@18.3.3) - '@mui/utils': 5.16.2(@types/react@18.3.3)(react@18.3.1) + '@mui/utils': 5.16.5(@types/react@18.3.3)(react@18.3.1) '@popperjs/core': 2.11.8 clsx: 2.1.1 prop-types: 15.8.1 @@ -10932,79 +11725,81 @@ snapshots: optionalDependencies: '@types/react': 18.3.3 - '@mui/core-downloads-tracker@5.16.2': {} + '@mui/core-downloads-tracker@5.16.5': {} - '@mui/docs@6.0.0-beta.2(xvcyxsjuxdjkfydrsw5rybb6wy)': + '@mui/docs@6.0.0-beta.4(v73oylu5qs3cavoyvfoft6xvce)': dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 '@mui/base': 5.0.0-beta.40(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mui/icons-material': 5.16.2(@mui/material@5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + '@mui/icons-material': 5.16.5(@mui/material@5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/internal-markdown': 1.0.8 - '@mui/material': 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mui/system': 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) - chai: 4.4.1 + '@mui/material': 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mui/system': 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + chai: 5.1.1 clipboard-copy: 4.0.1 clsx: 2.1.1 - next: 14.2.5(@babel/core@7.24.8)(@opentelemetry/api@1.8.0)(@playwright/test@1.44.1)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + csstype: 3.1.3 + next: 14.2.5(@babel/core@7.25.2)(@opentelemetry/api@1.8.0)(@playwright/test@1.44.1)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) nprogress: 0.2.0 prop-types: 15.8.1 react: 18.3.1 optionalDependencies: '@types/react': 18.3.3 - '@mui/icons-material@5.16.2(@mui/material@5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react@18.3.1)': + '@mui/icons-material@5.16.5(@mui/material@5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react@18.3.1)': dependencies: - '@babel/runtime': 7.24.8 - '@mui/material': 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@babel/runtime': 7.25.0 + '@mui/material': 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 optionalDependencies: '@types/react': 18.3.3 - '@mui/internal-docs-utils@1.0.7': + '@mui/internal-docs-utils@1.0.8': dependencies: - rimraf: 5.0.8 - typescript: 5.5.3 + rimraf: 5.0.9 + typescript: 5.5.4 '@mui/internal-markdown@1.0.8': dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 lodash: 4.17.21 marked: 13.0.2 prismjs: 1.29.0 - '@mui/internal-scripts@1.0.12': + '@mui/internal-scripts@1.0.13': dependencies: - '@babel/core': 7.24.8 - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.24.8) - '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-syntax-typescript': 7.24.7(@babel/core@7.24.8) - '@babel/types': 7.24.8 - '@mui/internal-docs-utils': 1.0.7 + '@babel/core': 7.25.2 + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.25.2) + '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-syntax-typescript': 7.24.7(@babel/core@7.25.2) + '@babel/types': 7.25.2 + '@mui/internal-docs-utils': 1.0.8 doctrine: 3.0.0 lodash: 4.17.21 - typescript: 5.5.3 + typescript: 5.5.4 uuid: 9.0.1 transitivePeerDependencies: - supports-color - '@mui/internal-test-utils@1.0.4(@babel/core@7.24.8)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@mui/internal-test-utils@1.0.5(@babel/core@7.25.2)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@babel/plugin-transform-modules-commonjs': 7.24.8(@babel/core@7.24.8) - '@babel/preset-typescript': 7.24.7(@babel/core@7.24.8) - '@babel/register': 7.24.6(@babel/core@7.24.8) - '@babel/runtime': 7.24.8 - '@emotion/cache': 11.11.0 - '@emotion/react': 11.11.4(@types/react@18.3.3)(react@18.3.1) + '@babel/plugin-transform-modules-commonjs': 7.24.8(@babel/core@7.25.2) + '@babel/preset-typescript': 7.24.7(@babel/core@7.25.2) + '@babel/register': 7.24.6(@babel/core@7.25.2) + '@babel/runtime': 7.25.0 + '@emotion/cache': 11.13.1 + '@emotion/react': 11.13.0(@types/react@18.3.3)(react@18.3.1) '@testing-library/dom': 10.3.1 '@testing-library/react': 16.0.0(@testing-library/dom@10.3.1)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - chai: 4.4.1 - chai-dom: 1.12.0(chai@4.4.1) + '@testing-library/user-event': 14.5.2(@testing-library/dom@10.3.1) + chai: 4.5.0 + chai-dom: 1.12.0(chai@4.5.0) dom-accessibility-api: 0.6.3 format-util: 1.0.5 fs-extra: 11.2.0 - jsdom: 24.1.0 + jsdom: 24.1.1 lodash: 4.17.21 - mocha: 10.6.0 + mocha: 10.7.0 playwright: 1.45.1 prop-types: 15.8.1 react: 18.3.1 @@ -11019,58 +11814,59 @@ snapshots: - supports-color - utf-8-validate - '@mui/joy@5.0.0-beta.48(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@mui/joy@5.0.0-beta.48(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 '@mui/base': 5.0.0-beta.40(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mui/core-downloads-tracker': 5.16.2 - '@mui/system': 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + '@mui/core-downloads-tracker': 5.16.5 + '@mui/system': 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/types': 7.2.15(@types/react@18.3.3) - '@mui/utils': 5.16.2(@types/react@18.3.3)(react@18.3.1) + '@mui/utils': 5.16.5(@types/react@18.3.3)(react@18.3.1) clsx: 2.1.1 prop-types: 15.8.1 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) optionalDependencies: - '@emotion/react': 11.11.4(@types/react@18.3.3)(react@18.3.1) - '@emotion/styled': 11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + '@emotion/react': 11.13.0(@types/react@18.3.3)(react@18.3.1) + '@emotion/styled': 11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@types/react': 18.3.3 - '@mui/lab@5.0.0-alpha.172(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/material@5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@mui/lab@5.0.0-alpha.173(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/material@5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 '@mui/base': 5.0.0-beta.40(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mui/material': 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mui/system': 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + '@mui/material': 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mui/system': 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/types': 7.2.15(@types/react@18.3.3) - '@mui/utils': 5.16.2(@types/react@18.3.3)(react@18.3.1) + '@mui/utils': 5.16.5(@types/react@18.3.3)(react@18.3.1) clsx: 2.1.1 prop-types: 15.8.1 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) optionalDependencies: - '@emotion/react': 11.11.4(@types/react@18.3.3)(react@18.3.1) - '@emotion/styled': 11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + '@emotion/react': 11.13.0(@types/react@18.3.3)(react@18.3.1) + '@emotion/styled': 11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@types/react': 18.3.3 - '@mui/material-nextjs@5.15.11(@emotion/cache@11.11.0)(@emotion/server@11.11.0)(@mui/material@5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(next@14.2.5(@babel/core@7.24.8)(@opentelemetry/api@1.8.0)(@playwright/test@1.44.1)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)': + '@mui/material-nextjs@5.16.4(@emotion/cache@11.13.1)(@emotion/server@11.11.0)(@mui/material@5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(next@14.2.5(@babel/core@7.25.2)(@opentelemetry/api@1.8.0)(@playwright/test@1.44.1)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)': dependencies: - '@babel/runtime': 7.24.8 - '@mui/material': 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - next: 14.2.5(@babel/core@7.24.8)(@opentelemetry/api@1.8.0)(@playwright/test@1.44.1)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@babel/runtime': 7.25.0 + '@mui/material': 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next: 14.2.5(@babel/core@7.25.2)(@opentelemetry/api@1.8.0)(@playwright/test@1.44.1)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 optionalDependencies: - '@emotion/cache': 11.11.0 + '@emotion/cache': 11.13.1 '@emotion/server': 11.11.0 '@types/react': 18.3.3 - '@mui/material@5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@mui/material@5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@babel/runtime': 7.24.8 - '@mui/core-downloads-tracker': 5.16.2 - '@mui/system': 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + '@babel/runtime': 7.25.0 + '@mui/core-downloads-tracker': 5.16.5 + '@mui/system': 5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/types': 7.2.15(@types/react@18.3.3) - '@mui/utils': 5.16.2(@types/react@18.3.3)(react@18.3.1) + '@mui/utils': 5.16.5(@types/react@18.3.3)(react@18.3.1) + '@popperjs/core': 2.11.8 '@types/react-transition-group': 4.4.10 clsx: 2.1.1 csstype: 3.1.3 @@ -11080,17 +11876,17 @@ snapshots: react-is: 18.3.1 react-transition-group: 4.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) optionalDependencies: - '@emotion/react': 11.11.4(@types/react@18.3.3)(react@18.3.1) - '@emotion/styled': 11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + '@emotion/react': 11.13.0(@types/react@18.3.3)(react@18.3.1) + '@emotion/styled': 11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@types/react': 18.3.3 - '@mui/monorepo@https://codeload.github.com/mui/material-ui/tar.gz/0d9333e9f3999d96679a2691e2815296a81475f2(encoding@0.1.13)': + '@mui/monorepo@https://codeload.github.com/mui/material-ui/tar.gz/4a82b6b0e0395db8fa0a0d49b6b76de4516b1579(encoding@0.1.13)': dependencies: '@googleapis/sheets': 8.0.0(encoding@0.1.13) '@netlify/functions': 2.8.1 '@slack/bolt': 3.19.0 execa: 9.3.0 - google-auth-library: 9.11.0(encoding@0.1.13) + google-auth-library: 9.12.0(encoding@0.1.13) transitivePeerDependencies: - bufferutil - debug @@ -11098,33 +11894,33 @@ snapshots: - supports-color - utf-8-validate - '@mui/private-theming@5.16.2(@types/react@18.3.3)(react@18.3.1)': + '@mui/private-theming@5.16.5(@types/react@18.3.3)(react@18.3.1)': dependencies: - '@babel/runtime': 7.24.8 - '@mui/utils': 5.16.2(@types/react@18.3.3)(react@18.3.1) + '@babel/runtime': 7.25.0 + '@mui/utils': 5.16.5(@types/react@18.3.3)(react@18.3.1) prop-types: 15.8.1 react: 18.3.1 optionalDependencies: '@types/react': 18.3.3 - '@mui/styled-engine@5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(react@18.3.1)': + '@mui/styled-engine@5.16.4(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(react@18.3.1)': dependencies: - '@babel/runtime': 7.24.8 - '@emotion/cache': 11.11.0 + '@babel/runtime': 7.25.0 + '@emotion/cache': 11.13.1 csstype: 3.1.3 prop-types: 15.8.1 react: 18.3.1 optionalDependencies: - '@emotion/react': 11.11.4(@types/react@18.3.3)(react@18.3.1) - '@emotion/styled': 11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + '@emotion/react': 11.13.0(@types/react@18.3.3)(react@18.3.1) + '@emotion/styled': 11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) - '@mui/styles@5.16.2(@types/react@18.3.3)(react@18.3.1)': + '@mui/styles@5.16.5(@types/react@18.3.3)(react@18.3.1)': dependencies: - '@babel/runtime': 7.24.8 - '@emotion/hash': 0.9.1 - '@mui/private-theming': 5.16.2(@types/react@18.3.3)(react@18.3.1) + '@babel/runtime': 7.25.0 + '@emotion/hash': 0.9.2 + '@mui/private-theming': 5.16.5(@types/react@18.3.3)(react@18.3.1) '@mui/types': 7.2.15(@types/react@18.3.3) - '@mui/utils': 5.16.2(@types/react@18.3.3)(react@18.3.1) + '@mui/utils': 5.16.5(@types/react@18.3.3)(react@18.3.1) clsx: 2.1.1 csstype: 3.1.3 hoist-non-react-statics: 3.3.2 @@ -11141,29 +11937,30 @@ snapshots: optionalDependencies: '@types/react': 18.3.3 - '@mui/system@5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1)': + '@mui/system@5.16.5(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1)': dependencies: - '@babel/runtime': 7.24.8 - '@mui/private-theming': 5.16.2(@types/react@18.3.3)(react@18.3.1) - '@mui/styled-engine': 5.16.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(react@18.3.1) + '@babel/runtime': 7.25.0 + '@mui/private-theming': 5.16.5(@types/react@18.3.3)(react@18.3.1) + '@mui/styled-engine': 5.16.4(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(react@18.3.1) '@mui/types': 7.2.15(@types/react@18.3.3) - '@mui/utils': 5.16.2(@types/react@18.3.3)(react@18.3.1) + '@mui/utils': 5.16.5(@types/react@18.3.3)(react@18.3.1) clsx: 2.1.1 csstype: 3.1.3 prop-types: 15.8.1 react: 18.3.1 optionalDependencies: - '@emotion/react': 11.11.4(@types/react@18.3.3)(react@18.3.1) - '@emotion/styled': 11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + '@emotion/react': 11.13.0(@types/react@18.3.3)(react@18.3.1) + '@emotion/styled': 11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@types/react': 18.3.3 '@mui/types@7.2.15(@types/react@18.3.3)': optionalDependencies: '@types/react': 18.3.3 - '@mui/utils@5.16.2(@types/react@18.3.3)(react@18.3.1)': + '@mui/utils@5.16.5(@types/react@18.3.3)(react@18.3.1)': dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 + '@mui/types': 7.2.15(@types/react@18.3.3) '@types/prop-types': 15.7.12 clsx: 2.1.1 prop-types: 15.8.1 @@ -11235,8 +12032,8 @@ snapshots: dependencies: agent-base: 7.1.0 http-proxy-agent: 7.0.2 - https-proxy-agent: 7.0.4 - lru-cache: 10.3.0 + https-proxy-agent: 7.0.5 + lru-cache: 10.4.3 socks-proxy-agent: 8.0.2 transitivePeerDependencies: - supports-color @@ -11260,7 +12057,7 @@ snapshots: hosted-git-info: 7.0.2 json-parse-even-better-errors: 3.0.2 json-stringify-nice: 1.1.4 - lru-cache: 10.3.0 + lru-cache: 10.4.3 minimatch: 9.0.4 nopt: 7.2.1 npm-install-checks: 6.3.0 @@ -11274,7 +12071,7 @@ snapshots: promise-all-reject-late: 1.0.1 promise-call-limit: 3.0.1 read-package-json-fast: 3.0.2 - semver: 7.6.2 + semver: 7.6.3 ssri: 10.0.6 treeverse: 3.0.0 walk-up-path: 3.0.1 @@ -11284,17 +12081,17 @@ snapshots: '@npmcli/fs@3.1.1': dependencies: - semver: 7.6.2 + semver: 7.6.3 '@npmcli/git@5.0.4': dependencies: '@npmcli/promise-spawn': 7.0.1 - lru-cache: 10.3.0 + lru-cache: 10.4.3 npm-pick-manifest: 9.0.1 proc-log: 3.0.0 promise-inflight: 1.0.1 promise-retry: 2.0.1 - semver: 7.6.2 + semver: 7.6.3 which: 4.0.0 transitivePeerDependencies: - bluebird @@ -11317,7 +12114,7 @@ snapshots: json-parse-even-better-errors: 3.0.2 pacote: 18.0.6 proc-log: 4.2.0 - semver: 7.6.2 + semver: 7.6.3 transitivePeerDependencies: - bluebird - supports-color @@ -11334,7 +12131,7 @@ snapshots: json-parse-even-better-errors: 3.0.2 normalize-package-data: 6.0.2 proc-log: 4.2.0 - semver: 7.6.2 + semver: 7.6.3 transitivePeerDependencies: - bluebird @@ -11360,28 +12157,28 @@ snapshots: - bluebird - supports-color - '@nrwl/devkit@17.3.0(nx@17.3.0)': + '@nrwl/devkit@17.3.0(nx@17.3.0(@swc/core@1.6.13))': dependencies: - '@nx/devkit': 17.3.0(nx@17.3.0) + '@nx/devkit': 17.3.0(nx@17.3.0(@swc/core@1.6.13)) transitivePeerDependencies: - nx - '@nrwl/tao@17.3.0': + '@nrwl/tao@17.3.0(@swc/core@1.6.13)': dependencies: - nx: 17.3.0 + nx: 17.3.0(@swc/core@1.6.13) tslib: 2.6.2 transitivePeerDependencies: - '@swc-node/register' - '@swc/core' - debug - '@nx/devkit@17.3.0(nx@17.3.0)': + '@nx/devkit@17.3.0(nx@17.3.0(@swc/core@1.6.13))': dependencies: - '@nrwl/devkit': 17.3.0(nx@17.3.0) + '@nrwl/devkit': 17.3.0(nx@17.3.0(@swc/core@1.6.13)) ejs: 3.1.9 enquirer: 2.3.6 ignore: 5.3.1 - nx: 17.3.0 + nx: 17.3.0(@swc/core@1.6.13) semver: 7.5.3 tmp: 0.2.3 tslib: 2.6.2 @@ -11423,6 +12220,8 @@ snapshots: '@octokit/auth-token@3.0.4': {} + '@octokit/auth-token@4.0.0': {} + '@octokit/auth-token@5.1.1': {} '@octokit/core@3.6.0(encoding@0.1.13)': @@ -11449,6 +12248,16 @@ snapshots: transitivePeerDependencies: - encoding + '@octokit/core@5.2.0': + dependencies: + '@octokit/auth-token': 4.0.0 + '@octokit/graphql': 7.1.0 + '@octokit/request': 8.4.0 + '@octokit/request-error': 5.1.0 + '@octokit/types': 13.5.0 + before-after-hook: 2.2.3 + universal-user-agent: 6.0.1 + '@octokit/core@6.1.2': dependencies: '@octokit/auth-token': 5.1.1 @@ -11476,6 +12285,11 @@ snapshots: is-plain-object: 5.0.0 universal-user-agent: 6.0.1 + '@octokit/endpoint@9.0.5': + dependencies: + '@octokit/types': 13.5.0 + universal-user-agent: 6.0.1 + '@octokit/graphql@4.8.0(encoding@0.1.13)': dependencies: '@octokit/request': 5.6.3(encoding@0.1.13) @@ -11492,6 +12306,12 @@ snapshots: transitivePeerDependencies: - encoding + '@octokit/graphql@7.1.0': + dependencies: + '@octokit/request': 8.4.0 + '@octokit/types': 13.5.0 + universal-user-agent: 6.0.1 + '@octokit/graphql@8.1.1': dependencies: '@octokit/request': 9.1.1 @@ -11502,6 +12322,8 @@ snapshots: '@octokit/openapi-types@18.1.1': {} + '@octokit/openapi-types@20.0.0': {} + '@octokit/openapi-types@22.2.0': {} '@octokit/plugin-enterprise-rest@6.0.1': {} @@ -11522,6 +12344,11 @@ snapshots: '@octokit/tsconfig': 1.0.2 '@octokit/types': 9.3.2 + '@octokit/plugin-paginate-rest@9.2.1(@octokit/core@5.2.0)': + dependencies: + '@octokit/core': 5.2.0 + '@octokit/types': 12.6.0 + '@octokit/plugin-request-log@1.0.4(@octokit/core@3.6.0(encoding@0.1.13))': dependencies: '@octokit/core': 3.6.0(encoding@0.1.13) @@ -11530,10 +12357,15 @@ snapshots: dependencies: '@octokit/core': 4.2.4(encoding@0.1.13) - '@octokit/plugin-request-log@5.3.0(@octokit/core@6.1.2)': + '@octokit/plugin-request-log@5.3.1(@octokit/core@6.1.2)': dependencies: '@octokit/core': 6.1.2 + '@octokit/plugin-rest-endpoint-methods@10.4.1(@octokit/core@5.2.0)': + dependencies: + '@octokit/core': 5.2.0 + '@octokit/types': 12.6.0 + '@octokit/plugin-rest-endpoint-methods@13.2.2(@octokit/core@6.1.2)': dependencies: '@octokit/core': 6.1.2 @@ -11569,6 +12401,12 @@ snapshots: deprecation: 2.3.1 once: 1.4.0 + '@octokit/request-error@5.1.0': + dependencies: + '@octokit/types': 13.5.0 + deprecation: 2.3.1 + once: 1.4.0 + '@octokit/request-error@6.1.1': dependencies: '@octokit/types': 13.5.0 @@ -11595,6 +12433,13 @@ snapshots: transitivePeerDependencies: - encoding + '@octokit/request@8.4.0': + dependencies: + '@octokit/endpoint': 9.0.5 + '@octokit/request-error': 5.1.0 + '@octokit/types': 13.5.0 + universal-user-agent: 6.0.1 + '@octokit/request@9.1.1': dependencies: '@octokit/endpoint': 10.1.1 @@ -11620,11 +12465,11 @@ snapshots: transitivePeerDependencies: - encoding - '@octokit/rest@21.0.0': + '@octokit/rest@21.0.1': dependencies: '@octokit/core': 6.1.2 '@octokit/plugin-paginate-rest': 11.3.1(@octokit/core@6.1.2) - '@octokit/plugin-request-log': 5.3.0(@octokit/core@6.1.2) + '@octokit/plugin-request-log': 5.3.1(@octokit/core@6.1.2) '@octokit/plugin-rest-endpoint-methods': 13.2.2(@octokit/core@6.1.2) '@octokit/tsconfig@1.0.2': {} @@ -11633,6 +12478,10 @@ snapshots: dependencies: '@octokit/openapi-types': 18.1.1 + '@octokit/types@12.6.0': + dependencies: + '@octokit/openapi-types': 20.0.0 + '@octokit/types@13.5.0': dependencies: '@octokit/openapi-types': 22.2.0 @@ -11645,6 +12494,18 @@ snapshots: dependencies: '@octokit/openapi-types': 18.1.1 + '@open-draft/deferred-promise@2.2.0': + optional: true + + '@open-draft/logger@0.3.0': + dependencies: + is-node-process: 1.2.0 + outvariant: 1.4.3 + optional: true + + '@open-draft/until@2.1.0': + optional: true + '@opentelemetry/api@1.8.0': optional: true @@ -11661,38 +12522,87 @@ snapshots: '@popperjs/core@2.11.8': {} - '@react-spring/animated@9.7.3(react@18.3.1)': + '@react-spring/animated@9.7.4(react@18.3.1)': dependencies: - '@react-spring/shared': 9.7.3(react@18.3.1) - '@react-spring/types': 9.7.3 + '@react-spring/shared': 9.7.4(react@18.3.1) + '@react-spring/types': 9.7.4 react: 18.3.1 - '@react-spring/core@9.7.3(react@18.3.1)': + '@react-spring/core@9.7.4(react@18.3.1)': dependencies: - '@react-spring/animated': 9.7.3(react@18.3.1) - '@react-spring/shared': 9.7.3(react@18.3.1) - '@react-spring/types': 9.7.3 + '@react-spring/animated': 9.7.4(react@18.3.1) + '@react-spring/shared': 9.7.4(react@18.3.1) + '@react-spring/types': 9.7.4 react: 18.3.1 - '@react-spring/rafz@9.7.3': {} + '@react-spring/rafz@9.7.4': {} - '@react-spring/shared@9.7.3(react@18.3.1)': + '@react-spring/shared@9.7.4(react@18.3.1)': dependencies: - '@react-spring/types': 9.7.3 + '@react-spring/rafz': 9.7.4 + '@react-spring/types': 9.7.4 react: 18.3.1 - '@react-spring/types@9.7.3': {} + '@react-spring/types@9.7.4': {} - '@react-spring/web@9.7.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@react-spring/web@9.7.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@react-spring/animated': 9.7.3(react@18.3.1) - '@react-spring/core': 9.7.3(react@18.3.1) - '@react-spring/shared': 9.7.3(react@18.3.1) - '@react-spring/types': 9.7.3 + '@react-spring/animated': 9.7.4(react@18.3.1) + '@react-spring/core': 9.7.4(react@18.3.1) + '@react-spring/shared': 9.7.4(react@18.3.1) + '@react-spring/types': 9.7.4 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@remix-run/router@1.17.1': {} + '@remix-run/router@1.18.0': {} + + '@rollup/rollup-android-arm-eabi@4.18.1': + optional: true + + '@rollup/rollup-android-arm64@4.18.1': + optional: true + + '@rollup/rollup-darwin-arm64@4.18.1': + optional: true + + '@rollup/rollup-darwin-x64@4.18.1': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.18.1': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.18.1': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.18.1': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.18.1': + optional: true + + '@rollup/rollup-linux-powerpc64le-gnu@4.18.1': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.18.1': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.18.1': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.18.1': + optional: true + + '@rollup/rollup-linux-x64-musl@4.18.1': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.18.1': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.18.1': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.18.1': + optional: true '@sec-ant/readable-stream@0.4.1': {} @@ -11752,7 +12662,7 @@ snapshots: dependencies: '@sinonjs/commons': 2.0.0 lodash.get: 4.4.2 - type-detect: 4.0.8 + type-detect: 4.1.0 '@sinonjs/text-encoding@0.7.2': {} @@ -11781,18 +12691,18 @@ snapshots: '@slack/logger@3.0.0': dependencies: - '@types/node': 18.19.39 + '@types/node': 18.19.42 '@slack/logger@4.0.0': dependencies: - '@types/node': 18.19.39 + '@types/node': 18.19.42 '@slack/oauth@2.6.2': dependencies: '@slack/logger': 3.0.0 '@slack/web-api': 6.12.0 '@types/jsonwebtoken': 8.5.9 - '@types/node': 18.19.39 + '@types/node': 18.19.42 jsonwebtoken: 9.0.2 lodash.isstring: 4.0.1 transitivePeerDependencies: @@ -11802,7 +12712,7 @@ snapshots: dependencies: '@slack/logger': 3.0.0 '@slack/web-api': 6.12.0 - '@types/node': 18.19.39 + '@types/node': 18.19.42 '@types/p-queue': 2.3.2 '@types/ws': 7.4.7 eventemitter3: 3.1.2 @@ -11822,7 +12732,7 @@ snapshots: '@slack/logger': 3.0.0 '@slack/types': 2.11.0 '@types/is-stream': 1.1.0 - '@types/node': 18.19.39 + '@types/node': 18.19.42 axios: 1.7.2(debug@4.3.5) eventemitter3: 3.1.2 form-data: 2.5.1 @@ -11835,6 +12745,53 @@ snapshots: '@socket.io/component-emitter@3.1.0': {} + '@swc/core-darwin-arm64@1.6.13': + optional: true + + '@swc/core-darwin-x64@1.6.13': + optional: true + + '@swc/core-linux-arm-gnueabihf@1.6.13': + optional: true + + '@swc/core-linux-arm64-gnu@1.6.13': + optional: true + + '@swc/core-linux-arm64-musl@1.6.13': + optional: true + + '@swc/core-linux-x64-gnu@1.6.13': + optional: true + + '@swc/core-linux-x64-musl@1.6.13': + optional: true + + '@swc/core-win32-arm64-msvc@1.6.13': + optional: true + + '@swc/core-win32-ia32-msvc@1.6.13': + optional: true + + '@swc/core-win32-x64-msvc@1.6.13': + optional: true + + '@swc/core@1.6.13(@swc/helpers@0.5.5)': + dependencies: + '@swc/counter': 0.1.3 + '@swc/types': 0.1.9 + optionalDependencies: + '@swc/core-darwin-arm64': 1.6.13 + '@swc/core-darwin-x64': 1.6.13 + '@swc/core-linux-arm-gnueabihf': 1.6.13 + '@swc/core-linux-arm64-gnu': 1.6.13 + '@swc/core-linux-arm64-musl': 1.6.13 + '@swc/core-linux-x64-gnu': 1.6.13 + '@swc/core-linux-x64-musl': 1.6.13 + '@swc/core-win32-arm64-msvc': 1.6.13 + '@swc/core-win32-ia32-msvc': 1.6.13 + '@swc/core-win32-x64-msvc': 1.6.13 + '@swc/helpers': 0.5.5 + '@swc/counter@0.1.3': {} '@swc/helpers@0.5.5': @@ -11842,12 +12799,16 @@ snapshots: '@swc/counter': 0.1.3 tslib: 2.6.2 - '@tanstack/query-core@5.50.1': {} + '@swc/types@0.1.9': + dependencies: + '@swc/counter': 0.1.3 + + '@tanstack/query-core@5.51.15': {} '@testing-library/dom@10.3.1': dependencies: '@babel/code-frame': 7.24.7 - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 '@types/aria-query': 5.0.4 aria-query: 5.3.0 chalk: 4.1.2 @@ -11855,9 +12816,22 @@ snapshots: lz-string: 1.5.0 pretty-format: 27.5.1 + '@testing-library/jest-dom@6.4.6(vitest@2.0.4(@types/node@18.19.42)(@vitest/browser@2.0.4)(@vitest/ui@2.0.4)(jsdom@24.1.1)(terser@5.27.0))': + dependencies: + '@adobe/css-tools': 4.4.0 + '@babel/runtime': 7.25.0 + aria-query: 5.3.0 + chalk: 3.0.0 + css.escape: 1.5.1 + dom-accessibility-api: 0.6.3 + lodash: 4.17.21 + redent: 3.0.0 + optionalDependencies: + vitest: 2.0.4(@types/node@18.19.42)(@vitest/browser@2.0.4)(@vitest/ui@2.0.4)(jsdom@24.1.1)(terser@5.27.0) + '@testing-library/react@16.0.0(@testing-library/dom@10.3.1)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 '@testing-library/dom': 10.3.1 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) @@ -11865,6 +12839,10 @@ snapshots: '@types/react': 18.3.3 '@types/react-dom': 18.3.0 + '@testing-library/user-event@14.5.2(@testing-library/dom@10.3.1)': + dependencies: + '@testing-library/dom': 10.3.1 + '@tootallnate/once@2.0.0': {} '@tufjs/canonical-json@2.0.0': {} @@ -11878,29 +12856,29 @@ snapshots: '@types/babel__core@7.20.5': dependencies: - '@babel/parser': 7.24.8 - '@babel/types': 7.24.8 + '@babel/parser': 7.25.0 + '@babel/types': 7.25.2 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 '@types/babel__traverse': 7.20.6 '@types/babel__generator@7.6.8': dependencies: - '@babel/types': 7.24.8 + '@babel/types': 7.25.2 '@types/babel__template@7.4.4': dependencies: - '@babel/parser': 7.24.8 - '@babel/types': 7.24.8 + '@babel/parser': 7.25.0 + '@babel/types': 7.25.2 '@types/babel__traverse@7.20.6': dependencies: - '@babel/types': 7.24.8 + '@babel/types': 7.25.2 '@types/body-parser@1.19.5': dependencies: '@types/connect': 3.4.38 - '@types/node': 18.19.39 + '@types/node': 18.19.42 '@types/chai-dom@1.11.3': dependencies: @@ -11912,18 +12890,25 @@ snapshots: '@types/connect@3.4.38': dependencies: - '@types/node': 18.19.39 + '@types/node': 18.19.42 '@types/cookie@0.4.1': {} + '@types/cookie@0.6.0': + optional: true + '@types/cors@2.8.17': dependencies: - '@types/node': 18.19.39 + '@types/node': 18.19.42 + + '@types/d3-array@3.2.1': {} '@types/d3-color@3.1.3': {} '@types/d3-delaunay@6.0.4': {} + '@types/d3-format@3.0.4': {} + '@types/d3-interpolate@3.0.4': dependencies: '@types/d3-color': 3.1.3 @@ -11940,16 +12925,18 @@ snapshots: dependencies: '@types/d3-path': 3.1.0 + '@types/d3-time-format@4.0.3': {} + '@types/d3-time@3.0.3': {} '@types/doctrine@0.0.9': {} '@types/eslint-scope@3.7.7': dependencies: - '@types/eslint': 8.56.10 + '@types/eslint': 8.56.11 '@types/estree': 1.0.5 - '@types/eslint@8.56.10': + '@types/eslint@8.56.11': dependencies: '@types/estree': 1.0.5 '@types/json-schema': 7.0.15 @@ -11958,7 +12945,7 @@ snapshots: '@types/express-serve-static-core@4.17.42': dependencies: - '@types/node': 18.19.39 + '@types/node': 18.19.42 '@types/qs': 6.9.11 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -11975,7 +12962,9 @@ snapshots: '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 18.19.39 + '@types/node': 18.19.42 + + '@types/gtag.js@0.0.20': {} '@types/history@4.7.11': {} @@ -11985,7 +12974,7 @@ snapshots: '@types/is-stream@1.1.0': dependencies: - '@types/node': 18.19.39 + '@types/node': 18.19.42 '@types/istanbul-lib-coverage@2.0.6': {} @@ -12000,20 +12989,20 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 18.19.39 + '@types/node': 18.19.42 '@types/jsonwebtoken@8.5.9': dependencies: - '@types/node': 18.19.39 + '@types/node': 18.19.42 '@types/karma@6.3.8': dependencies: - '@types/node': 18.19.39 + '@types/node': 18.19.42 log4js: 6.9.1 transitivePeerDependencies: - supports-color - '@types/lodash@4.17.6': {} + '@types/lodash@4.17.7': {} '@types/luxon@3.4.2': {} @@ -12039,7 +13028,12 @@ snapshots: dependencies: moment: 2.30.1 - '@types/node@18.19.39': + '@types/mute-stream@0.0.4': + dependencies: + '@types/node': 18.19.42 + optional: true + + '@types/node@18.19.42': dependencies: undici-types: 5.26.5 @@ -12092,13 +13086,13 @@ snapshots: '@types/send@0.17.4': dependencies: '@types/mime': 1.3.5 - '@types/node': 18.19.39 + '@types/node': 18.19.42 '@types/serve-static@1.15.5': dependencies: '@types/http-errors': 2.0.4 '@types/mime': 3.0.4 - '@types/node': 18.19.39 + '@types/node': 18.19.42 '@types/sinon@17.0.3': dependencies: @@ -12106,6 +13100,9 @@ snapshots: '@types/sinonjs__fake-timers@8.1.5': {} + '@types/statuses@2.0.5': + optional: true + '@types/stylis@4.2.5': {} '@types/stylis@4.2.6': {} @@ -12114,20 +13111,23 @@ snapshots: '@types/unist@2.0.10': {} - '@types/webpack-bundle-analyzer@4.7.0(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1))': + '@types/webpack-bundle-analyzer@4.7.0(@swc/core@1.6.13)(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1))': dependencies: - '@types/node': 18.19.39 + '@types/node': 18.19.42 tapable: 2.2.1 - webpack: 5.92.1(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1)) + webpack: 5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1)) transitivePeerDependencies: - '@swc/core' - esbuild - uglify-js - webpack-cli + '@types/wrap-ansi@3.0.0': + optional: true + '@types/ws@7.4.7': dependencies: - '@types/node': 18.19.39 + '@types/node': 18.19.42 '@types/yargs-parser@21.0.3': {} @@ -12135,34 +13135,34 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0)(typescript@5.5.3)': + '@typescript-eslint/eslint-plugin@7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.16.1(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/parser': 7.16.1(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/scope-manager': 7.16.1 - '@typescript-eslint/type-utils': 7.16.1(eslint@8.57.0)(typescript@5.5.3) - '@typescript-eslint/utils': 7.16.1(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/type-utils': 7.16.1(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/utils': 7.16.1(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/visitor-keys': 7.16.1 eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.5.3) + ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: - typescript: 5.5.3 + typescript: 5.5.4 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.3)': + '@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/scope-manager': 7.16.1 '@typescript-eslint/types': 7.16.1 - '@typescript-eslint/typescript-estree': 7.16.1(typescript@5.5.3) + '@typescript-eslint/typescript-estree': 7.16.1(typescript@5.5.4) '@typescript-eslint/visitor-keys': 7.16.1 debug: 4.3.5(supports-color@8.1.1) eslint: 8.57.0 optionalDependencies: - typescript: 5.5.3 + typescript: 5.5.4 transitivePeerDependencies: - supports-color @@ -12171,21 +13171,21 @@ snapshots: '@typescript-eslint/types': 7.16.1 '@typescript-eslint/visitor-keys': 7.16.1 - '@typescript-eslint/type-utils@7.16.1(eslint@8.57.0)(typescript@5.5.3)': + '@typescript-eslint/type-utils@7.16.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: - '@typescript-eslint/typescript-estree': 7.16.1(typescript@5.5.3) - '@typescript-eslint/utils': 7.16.1(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/typescript-estree': 7.16.1(typescript@5.5.4) + '@typescript-eslint/utils': 7.16.1(eslint@8.57.0)(typescript@5.5.4) debug: 4.3.5(supports-color@8.1.1) eslint: 8.57.0 - ts-api-utils: 1.3.0(typescript@5.5.3) + ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: - typescript: 5.5.3 + typescript: 5.5.4 transitivePeerDependencies: - supports-color '@typescript-eslint/types@7.16.1': {} - '@typescript-eslint/typescript-estree@7.16.1(typescript@5.5.3)': + '@typescript-eslint/typescript-estree@7.16.1(typescript@5.5.4)': dependencies: '@typescript-eslint/types': 7.16.1 '@typescript-eslint/visitor-keys': 7.16.1 @@ -12193,19 +13193,19 @@ snapshots: globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.4 - semver: 7.6.2 - ts-api-utils: 1.3.0(typescript@5.5.3) + semver: 7.6.3 + ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: - typescript: 5.5.3 + typescript: 5.5.4 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.16.1(eslint@8.57.0)(typescript@5.5.3)': + '@typescript-eslint/utils@7.16.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@typescript-eslint/scope-manager': 7.16.1 '@typescript-eslint/types': 7.16.1 - '@typescript-eslint/typescript-estree': 7.16.1(typescript@5.5.3) + '@typescript-eslint/typescript-estree': 7.16.1(typescript@5.5.4) eslint: 8.57.0 transitivePeerDependencies: - supports-color @@ -12218,6 +13218,84 @@ snapshots: '@ungap/structured-clone@1.2.0': {} + '@vitejs/plugin-react-swc@3.7.0(@swc/helpers@0.5.5)(vite@5.3.4(@types/node@18.19.42)(terser@5.27.0))': + dependencies: + '@swc/core': 1.6.13(@swc/helpers@0.5.5) + vite: 5.3.4(@types/node@18.19.42)(terser@5.27.0) + transitivePeerDependencies: + - '@swc/helpers' + + '@vitejs/plugin-react@4.3.1(vite@5.3.4(@types/node@18.19.42)(terser@5.27.0))': + dependencies: + '@babel/core': 7.25.2 + '@babel/plugin-transform-react-jsx-self': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-react-jsx-source': 7.24.7(@babel/core@7.25.2) + '@types/babel__core': 7.20.5 + react-refresh: 0.14.2 + vite: 5.3.4(@types/node@18.19.42)(terser@5.27.0) + transitivePeerDependencies: + - supports-color + + '@vitest/browser@2.0.4(typescript@5.5.4)(vitest@2.0.4)': + dependencies: + '@testing-library/dom': 10.3.1 + '@testing-library/user-event': 14.5.2(@testing-library/dom@10.3.1) + '@vitest/utils': 2.0.4 + magic-string: 0.30.10 + msw: 2.3.2(typescript@5.5.4) + sirv: 2.0.4 + vitest: 2.0.4(@types/node@18.19.42)(@vitest/browser@2.0.4)(@vitest/ui@2.0.4)(jsdom@24.1.1)(terser@5.27.0) + ws: 8.18.0 + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + optional: true + + '@vitest/expect@2.0.4': + dependencies: + '@vitest/spy': 2.0.4 + '@vitest/utils': 2.0.4 + chai: 5.1.1 + tinyrainbow: 1.2.0 + + '@vitest/pretty-format@2.0.4': + dependencies: + tinyrainbow: 1.2.0 + + '@vitest/runner@2.0.4': + dependencies: + '@vitest/utils': 2.0.4 + pathe: 1.1.2 + + '@vitest/snapshot@2.0.4': + dependencies: + '@vitest/pretty-format': 2.0.4 + magic-string: 0.30.10 + pathe: 1.1.2 + + '@vitest/spy@2.0.4': + dependencies: + tinyspy: 3.0.0 + + '@vitest/ui@2.0.4(vitest@2.0.4)': + dependencies: + '@vitest/utils': 2.0.4 + fast-glob: 3.3.2 + fflate: 0.8.2 + flatted: 3.3.1 + pathe: 1.1.2 + sirv: 2.0.4 + tinyrainbow: 1.2.0 + vitest: 2.0.4(@types/node@18.19.42)(@vitest/browser@2.0.4)(@vitest/ui@2.0.4)(jsdom@24.1.1)(terser@5.27.0) + + '@vitest/utils@2.0.4': + dependencies: + '@vitest/pretty-format': 2.0.4 + estree-walker: 3.0.3 + loupe: 3.1.1 + tinyrainbow: 1.2.0 + '@webassemblyjs/ast@1.12.1': dependencies: '@webassemblyjs/helper-numbers': 1.11.6 @@ -12294,19 +13372,19 @@ snapshots: '@webassemblyjs/ast': 1.12.1 '@xtuc/long': 4.2.2 - '@webpack-cli/configtest@2.1.1(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1))(webpack@5.92.1(webpack-cli@5.1.4))': + '@webpack-cli/configtest@2.1.1(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1))(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4))': dependencies: - webpack: 5.92.1(webpack-cli@5.1.4) + webpack: 5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4) webpack-cli: 5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1) - '@webpack-cli/info@2.0.2(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1))(webpack@5.92.1(webpack-cli@5.1.4))': + '@webpack-cli/info@2.0.2(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1))(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4))': dependencies: - webpack: 5.92.1(webpack-cli@5.1.4) + webpack: 5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4) webpack-cli: 5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1) - '@webpack-cli/serve@2.0.5(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1))(webpack@5.92.1(webpack-cli@5.1.4))': + '@webpack-cli/serve@2.0.5(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1))(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4))': dependencies: - webpack: 5.92.1(webpack-cli@5.1.4) + webpack: 5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4) webpack-cli: 5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1) '@xtuc/ieee754@1.2.0': {} @@ -12602,13 +13680,6 @@ snapshots: es-array-method-boxes-properly: 1.0.0 is-string: 1.0.7 - array.prototype.toreversed@1.1.2: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-shim-unscopables: 1.0.2 - array.prototype.tosorted@1.1.4: dependencies: call-bind: 1.0.7 @@ -12636,6 +13707,8 @@ snapshots: assertion-error@1.1.0: {} + assertion-error@2.0.1: {} + ast-types-flow@0.0.8: {} ast-types@0.14.2: @@ -12656,14 +13729,14 @@ snapshots: asynckit@0.4.0: {} - autoprefixer@10.4.19(postcss@8.4.39): + autoprefixer@10.4.19(postcss@8.4.40): dependencies: browserslist: 4.23.2 caniuse-lite: 1.0.30001642 fraction.js: 4.3.7 normalize-range: 0.1.2 picocolors: 1.0.1 - postcss: 8.4.39 + postcss: 8.4.40 postcss-value-parser: 4.2.0 available-typed-arrays@1.0.7: @@ -12684,12 +13757,12 @@ snapshots: dependencies: deep-equal: 2.2.3 - babel-loader@9.1.3(@babel/core@7.24.8)(webpack@5.92.1(webpack-cli@5.1.4)): + babel-loader@9.1.3(@babel/core@7.25.2)(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4)): dependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 find-cache-dir: 4.0.0 schema-utils: 4.2.0 - webpack: 5.92.1(webpack-cli@5.1.4) + webpack: 5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4) babel-plugin-istanbul@7.0.0: dependencies: @@ -12703,7 +13776,7 @@ snapshots: babel-plugin-macros@3.1.0: dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 cosmiconfig: 7.1.0 resolve: 1.22.8 @@ -12717,40 +13790,40 @@ snapshots: babel-plugin-optimize-clsx@2.6.2: dependencies: - '@babel/generator': 7.24.8 - '@babel/template': 7.24.7 - '@babel/types': 7.24.8 + '@babel/generator': 7.25.0 + '@babel/template': 7.25.0 + '@babel/types': 7.25.2 find-cache-dir: 3.3.2 lodash: 4.17.21 object-hash: 2.2.0 - babel-plugin-polyfill-corejs2@0.4.10(@babel/core@7.24.8): + babel-plugin-polyfill-corejs2@0.4.10(@babel/core@7.25.2): dependencies: - '@babel/compat-data': 7.24.8 - '@babel/core': 7.24.8 - '@babel/helper-define-polyfill-provider': 0.6.1(@babel/core@7.24.8) + '@babel/compat-data': 7.25.2 + '@babel/core': 7.25.2 + '@babel/helper-define-polyfill-provider': 0.6.1(@babel/core@7.25.2) semver: 6.3.1 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-corejs3@0.10.4(@babel/core@7.24.8): + babel-plugin-polyfill-corejs3@0.10.4(@babel/core@7.25.2): dependencies: - '@babel/core': 7.24.8 - '@babel/helper-define-polyfill-provider': 0.6.1(@babel/core@7.24.8) + '@babel/core': 7.25.2 + '@babel/helper-define-polyfill-provider': 0.6.1(@babel/core@7.25.2) core-js-compat: 3.37.1 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-regenerator@0.6.1(@babel/core@7.24.8): + babel-plugin-polyfill-regenerator@0.6.1(@babel/core@7.25.2): dependencies: - '@babel/core': 7.24.8 - '@babel/helper-define-polyfill-provider': 0.6.1(@babel/core@7.24.8) + '@babel/core': 7.25.2 + '@babel/helper-define-polyfill-provider': 0.6.1(@babel/core@7.25.2) transitivePeerDependencies: - supports-color babel-plugin-preval@5.1.0: dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 '@types/babel__core': 7.20.5 babel-plugin-macros: 3.1.0 require-from-string: 2.0.2 @@ -12922,12 +13995,14 @@ snapshots: yargs: 16.2.0 yargs-parser: 20.2.9 + cac@6.7.14: {} + cacache@18.0.3: dependencies: '@npmcli/fs': 3.1.1 fs-minipass: 3.0.3 glob: 10.3.10 - lru-cache: 10.3.0 + lru-cache: 10.4.3 minipass: 7.0.4 minipass-collect: 2.0.1 minipass-flush: 1.0.5 @@ -12975,11 +14050,11 @@ snapshots: caniuse-lite@1.0.30001642: {} - chai-dom@1.12.0(chai@4.4.1): + chai-dom@1.12.0(chai@4.5.0): dependencies: - chai: 4.4.1 + chai: 4.5.0 - chai@4.4.1: + chai@4.5.0: dependencies: assertion-error: 1.1.0 check-error: 1.0.3 @@ -12987,7 +14062,15 @@ snapshots: get-func-name: 2.0.2 loupe: 2.3.7 pathval: 1.1.1 - type-detect: 4.0.8 + type-detect: 4.1.0 + + chai@5.1.1: + dependencies: + assertion-error: 2.0.1 + check-error: 2.1.1 + deep-eql: 5.0.2 + loupe: 3.1.1 + pathval: 2.0.0 chainsaw@0.1.0: dependencies: @@ -13003,6 +14086,11 @@ snapshots: escape-string-regexp: 1.0.5 supports-color: 5.5.0 + chalk@3.0.0: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + chalk@4.1.0: dependencies: ansi-styles: 4.3.0 @@ -13031,6 +14119,8 @@ snapshots: dependencies: get-func-name: 2.0.2 + check-error@2.1.1: {} + chokidar@3.5.3: dependencies: anymatch: 3.1.3 @@ -13073,6 +14163,9 @@ snapshots: cli-width@3.0.0: {} + cli-width@4.1.0: + optional: true + client-only@0.0.1: {} clipboard-copy@4.0.1: {} @@ -13186,11 +14279,11 @@ snapshots: dependencies: mime-db: 1.52.0 - compression-webpack-plugin@11.1.0(webpack@5.92.1(webpack-cli@5.1.4)): + compression-webpack-plugin@11.1.0(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4)): dependencies: schema-utils: 4.2.0 serialize-javascript: 6.0.2 - webpack: 5.92.1(webpack-cli@5.1.4) + webpack: 5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4) compression@1.7.4: dependencies: @@ -13273,7 +14366,7 @@ snapshots: handlebars: 4.7.8 json-stringify-safe: 5.0.1 meow: 8.1.2 - semver: 7.6.2 + semver: 7.6.3 split: 1.0.1 conventional-commits-filter@3.0.0: @@ -13336,14 +14429,14 @@ snapshots: path-type: 4.0.0 yaml: 1.10.2 - cosmiconfig@8.3.6(typescript@5.5.3): + cosmiconfig@8.3.6(typescript@5.5.4): dependencies: import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 path-type: 4.0.0 optionalDependencies: - typescript: 5.5.3 + typescript: 5.5.4 cp-file@10.0.0: dependencies: @@ -13407,11 +14500,13 @@ snapshots: css-vendor@2.0.8: dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 is-in-browser: 1.1.3 css-what@6.1.0: {} + css.escape@1.5.1: {} + cssesc@3.0.0: {} cssjanus@2.1.0: {} @@ -13539,13 +14634,13 @@ snapshots: date-fns-jalali@2.30.0-0: dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 date-fns-jalali@3.6.0-1: {} date-fns@2.30.0: dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 date-fns@3.6.0: {} @@ -13588,7 +14683,9 @@ snapshots: deep-eql@4.1.3: dependencies: - type-detect: 4.0.8 + type-detect: 4.1.0 + + deep-eql@5.0.2: {} deep-equal@2.2.3: dependencies: @@ -13683,7 +14780,7 @@ snapshots: dom-helpers@5.2.1: dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 csstype: 3.1.3 dom-serialize@2.2.1: @@ -13767,7 +14864,7 @@ snapshots: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.17 - '@types/node': 18.19.39 + '@types/node': 18.19.42 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -13966,31 +15063,31 @@ snapshots: optionalDependencies: source-map: 0.2.0 - eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0))(eslint@8.57.0): + eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0))(eslint@8.57.0): dependencies: confusing-browser-globals: 1.0.11 eslint: 8.57.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0) object.assign: 4.1.5 object.entries: 1.1.8 semver: 6.3.1 - eslint-config-airbnb-typescript@18.0.0(@typescript-eslint/eslint-plugin@7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0)(typescript@5.5.3))(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.3))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0))(eslint@8.57.0): + eslint-config-airbnb-typescript@18.0.0(@typescript-eslint/eslint-plugin@7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0))(eslint@8.57.0): dependencies: - '@typescript-eslint/eslint-plugin': 7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0)(typescript@5.5.3) - '@typescript-eslint/parser': 7.16.1(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/eslint-plugin': 7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/parser': 7.16.1(eslint@8.57.0)(typescript@5.5.4) eslint: 8.57.0 - eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0))(eslint@8.57.0) + eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0))(eslint@8.57.0) transitivePeerDependencies: - eslint-plugin-import - eslint-config-airbnb@19.0.4(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0))(eslint-plugin-jsx-a11y@6.9.0(eslint@8.57.0))(eslint-plugin-react-hooks@4.6.2(eslint@8.57.0))(eslint-plugin-react@7.34.4(eslint@8.57.0))(eslint@8.57.0): + eslint-config-airbnb@19.0.4(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0))(eslint-plugin-jsx-a11y@6.9.0(eslint@8.57.0))(eslint-plugin-react-hooks@4.6.2(eslint@8.57.0))(eslint-plugin-react@7.35.0(eslint@8.57.0))(eslint@8.57.0): dependencies: eslint: 8.57.0 - eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0) + eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) - eslint-plugin-react: 7.34.4(eslint@8.57.0) + eslint-plugin-react: 7.35.0(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) object.assign: 4.1.5 object.entries: 1.1.8 @@ -14007,12 +15104,12 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-webpack@0.13.8(eslint-plugin-import@2.29.1)(webpack@5.92.1(webpack-cli@5.1.4)): + eslint-import-resolver-webpack@0.13.8(eslint-plugin-import@2.29.1)(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4)): dependencies: array.prototype.find: 2.2.2 debug: 3.2.7 enhanced-resolve: 0.9.1 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0) find-root: 1.1.0 hasown: 2.0.2 interpret: 1.4.0 @@ -14021,18 +15118,18 @@ snapshots: lodash: 4.17.21 resolve: 2.0.0-next.5 semver: 5.7.2 - webpack: 5.92.1(webpack-cli@5.1.4) + webpack: 5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4) transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.0(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-webpack@0.13.8(eslint-plugin-import@2.29.1)(webpack@5.92.1(webpack-cli@5.1.4)))(eslint@8.57.0): + eslint-module-utils@2.8.0(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-webpack@0.13.8(eslint-plugin-import@2.29.1)(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4)))(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 7.16.1(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/parser': 7.16.1(eslint@8.57.0)(typescript@5.5.4) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-webpack: 0.13.8(eslint-plugin-import@2.29.1)(webpack@5.92.1(webpack-cli@5.1.4)) + eslint-import-resolver-webpack: 0.13.8(eslint-plugin-import@2.29.1)(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4)) transitivePeerDependencies: - supports-color @@ -14044,7 +15141,7 @@ snapshots: lodash.snakecase: 4.1.1 lodash.upperfirst: 4.3.1 - eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-webpack@0.13.8)(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.3 @@ -14054,7 +15151,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-webpack@0.13.8(eslint-plugin-import@2.29.1)(webpack@5.92.1(webpack-cli@5.1.4)))(eslint@8.57.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-webpack@0.13.8(eslint-plugin-import@2.29.1)(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4)))(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -14065,25 +15162,25 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 7.16.1(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/parser': 7.16.1(eslint@8.57.0)(typescript@5.5.4) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jsdoc@48.5.2(eslint@8.57.0): + eslint-plugin-jsdoc@48.8.3(eslint@8.57.0): dependencies: - '@es-joy/jsdoccomment': 0.43.1 + '@es-joy/jsdoccomment': 0.46.0 are-docs-informative: 0.0.2 comment-parser: 1.4.1 debug: 4.3.5(supports-color@8.1.1) escape-string-regexp: 4.0.0 eslint: 8.57.0 - esquery: 1.5.0 - parse-imports: 2.1.0 - semver: 7.6.2 + esquery: 1.6.0 + parse-imports: 2.1.1 + semver: 7.6.3 spdx-expression-parse: 4.0.0 - synckit: 0.9.0 + synckit: 0.9.1 transitivePeerDependencies: - supports-color @@ -14114,21 +15211,21 @@ snapshots: globals: 13.24.0 rambda: 7.5.0 - eslint-plugin-prettier@5.1.3(@types/eslint@8.56.10)(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.2): + eslint-plugin-prettier@5.2.1(@types/eslint@8.56.11)(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3): dependencies: eslint: 8.57.0 - prettier: 3.3.2 + prettier: 3.3.3 prettier-linter-helpers: 1.0.0 - synckit: 0.8.8 + synckit: 0.9.1 optionalDependencies: - '@types/eslint': 8.56.10 + '@types/eslint': 8.56.11 eslint-config-prettier: 9.1.0(eslint@8.57.0) - eslint-plugin-react-compiler@0.0.0-experimental-51a85ea-20240601(eslint@8.57.0): + eslint-plugin-react-compiler@0.0.0-experimental-9ed098e-20240725(eslint@8.57.0): dependencies: - '@babel/core': 7.24.8 - '@babel/parser': 7.24.8 - '@babel/plugin-proposal-private-methods': 7.18.6(@babel/core@7.24.8) + '@babel/core': 7.25.2 + '@babel/parser': 7.25.0 + '@babel/plugin-proposal-private-methods': 7.18.6(@babel/core@7.25.2) eslint: 8.57.0 hermes-parser: 0.20.1 zod: 3.23.8 @@ -14140,12 +15237,11 @@ snapshots: dependencies: eslint: 8.57.0 - eslint-plugin-react@7.34.4(eslint@8.57.0): + eslint-plugin-react@7.35.0(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlast: 1.2.5 array.prototype.flatmap: 1.3.2 - array.prototype.toreversed: 1.1.2 array.prototype.tosorted: 1.1.4 doctrine: 2.1.0 es-iterator-helpers: 1.0.19 @@ -14201,7 +15297,7 @@ snapshots: eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 - esquery: 1.5.0 + esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 file-entry-cache: 6.0.1 @@ -14235,7 +15331,7 @@ snapshots: esprima@4.0.1: {} - esquery@1.5.0: + esquery@1.6.0: dependencies: estraverse: 5.3.0 @@ -14251,12 +15347,16 @@ snapshots: estree-to-babel@3.2.1: dependencies: - '@babel/traverse': 7.24.8 - '@babel/types': 7.24.8 + '@babel/traverse': 7.25.2 + '@babel/types': 7.25.2 c8: 7.14.0 transitivePeerDependencies: - supports-color + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.5 + esutils@2.0.3: {} etag@1.8.1: {} @@ -14303,6 +15403,18 @@ snapshots: signal-exit: 3.0.7 strip-final-newline: 2.0.0 + execa@8.0.1: + dependencies: + cross-spawn: 7.0.3 + get-stream: 8.0.1 + human-signals: 5.0.0 + is-stream: 3.0.0 + merge-stream: 2.0.0 + npm-run-path: 5.3.0 + onetime: 6.0.0 + signal-exit: 4.1.0 + strip-final-newline: 3.0.0 + execa@9.3.0: dependencies: '@sindresorhus/merge-streams': 4.0.0 @@ -14405,6 +15517,8 @@ snapshots: dependencies: reusify: 1.0.4 + fflate@0.8.2: {} + fg-loadcss@3.1.0: {} figures@3.2.0: @@ -14502,13 +15616,13 @@ snapshots: flat-cache@3.2.0: dependencies: - flatted: 3.2.9 + flatted: 3.3.1 keyv: 4.5.4 rimraf: 3.0.2 flat@5.0.2: {} - flatted@3.2.9: {} + flatted@3.3.1: {} flow-parser@0.227.0: {} @@ -14607,7 +15721,7 @@ snapshots: gaxios@6.1.1(encoding@0.1.13): dependencies: extend: 3.0.2 - https-proxy-agent: 7.0.4 + https-proxy-agent: 7.0.5 is-stream: 2.0.1 node-fetch: 2.7.0(encoding@0.1.13) transitivePeerDependencies: @@ -14653,6 +15767,8 @@ snapshots: get-stream@6.0.1: {} + get-stream@8.0.1: {} + get-stream@9.0.1: dependencies: '@sec-ant/readable-stream': 0.4.1 @@ -14688,7 +15804,7 @@ snapshots: git-semver-tags@5.0.1: dependencies: meow: 8.1.2 - semver: 7.6.2 + semver: 7.6.3 git-up@7.0.0: dependencies: @@ -14807,7 +15923,7 @@ snapshots: transitivePeerDependencies: - supports-color - google-auth-library@9.11.0(encoding@0.1.13): + google-auth-library@9.12.0(encoding@0.1.13): dependencies: base64-js: 1.5.1 ecdsa-sig-formatter: 1.0.11 @@ -14823,7 +15939,7 @@ snapshots: dependencies: extend: 3.0.2 gaxios: 6.1.1(encoding@0.1.13) - google-auth-library: 9.11.0(encoding@0.1.13) + google-auth-library: 9.12.0(encoding@0.1.13) qs: 6.11.2 url-template: 2.0.8 uuid: 9.0.1 @@ -14839,6 +15955,9 @@ snapshots: graphemer@1.4.0: {} + graphql@16.9.0: + optional: true + gtoken@7.0.1(encoding@0.1.13): dependencies: gaxios: 6.1.1(encoding@0.1.13) @@ -14897,6 +16016,9 @@ snapshots: he@1.2.0: {} + headers-polyfill@4.0.3: + optional: true + hermes-estree@0.20.1: {} hermes-parser@0.20.1: @@ -14919,7 +16041,7 @@ snapshots: hosted-git-info@7.0.2: dependencies: - lru-cache: 10.3.0 + lru-cache: 10.4.3 html-encoding-sniffer@4.0.0: dependencies: @@ -14945,7 +16067,7 @@ snapshots: readable-stream: 1.0.34 through2: 0.4.2 - html-webpack-plugin@5.6.0(webpack@5.92.1(webpack-cli@5.1.4)): + html-webpack-plugin@5.6.0(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4)): dependencies: '@types/html-minifier-terser': 6.1.0 html-minifier-terser: 6.1.0 @@ -14953,7 +16075,7 @@ snapshots: pretty-error: 4.0.0 tapable: 2.2.1 optionalDependencies: - webpack: 5.92.1(webpack-cli@5.1.4) + webpack: 5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4) htmlparser2@6.1.0: dependencies: @@ -15002,7 +16124,7 @@ snapshots: transitivePeerDependencies: - supports-color - https-proxy-agent@7.0.4: + https-proxy-agent@7.0.5: dependencies: agent-base: 7.1.0 debug: 4.3.5(supports-color@8.1.1) @@ -15011,6 +16133,8 @@ snapshots: human-signals@2.1.0: {} + human-signals@5.0.0: {} + human-signals@7.0.0: {} hyperlinker@1.0.0: {} @@ -15066,7 +16190,7 @@ snapshots: npm-package-arg: 11.0.2 promzard: 1.0.0 read: 3.0.1 - semver: 7.6.2 + semver: 7.6.3 validate-npm-package-license: 3.0.4 validate-npm-package-name: 5.0.1 transitivePeerDependencies: @@ -15200,6 +16324,9 @@ snapshots: is-negative-zero@2.0.3: {} + is-node-process@1.2.0: + optional: true + is-number-object@1.0.7: dependencies: has-tostringtag: 1.0.2 @@ -15247,6 +16374,8 @@ snapshots: is-stream@2.0.1: {} + is-stream@3.0.0: {} + is-stream@4.0.1: {} is-string@1.0.7: @@ -15310,11 +16439,11 @@ snapshots: istanbul-lib-instrument@6.0.2: dependencies: - '@babel/core': 7.24.8 - '@babel/parser': 7.24.8 + '@babel/core': 7.25.2 + '@babel/parser': 7.25.0 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 - semver: 7.6.2 + semver: 7.6.3 transitivePeerDependencies: - supports-color @@ -15404,7 +16533,7 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 18.19.39 + '@types/node': 18.19.42 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -15419,18 +16548,18 @@ snapshots: dependencies: argparse: 2.0.1 - jscodeshift@0.16.1(@babel/preset-env@7.24.8(@babel/core@7.24.8)): - dependencies: - '@babel/core': 7.24.8 - '@babel/parser': 7.24.8 - '@babel/plugin-transform-class-properties': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-modules-commonjs': 7.24.8(@babel/core@7.24.8) - '@babel/plugin-transform-nullish-coalescing-operator': 7.24.7(@babel/core@7.24.8) - '@babel/plugin-transform-optional-chaining': 7.24.8(@babel/core@7.24.8) - '@babel/plugin-transform-private-methods': 7.24.7(@babel/core@7.24.8) - '@babel/preset-flow': 7.24.7(@babel/core@7.24.8) - '@babel/preset-typescript': 7.24.7(@babel/core@7.24.8) - '@babel/register': 7.24.6(@babel/core@7.24.8) + jscodeshift@0.16.1(@babel/preset-env@7.25.2(@babel/core@7.25.2)): + dependencies: + '@babel/core': 7.25.2 + '@babel/parser': 7.25.0 + '@babel/plugin-transform-class-properties': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-modules-commonjs': 7.24.8(@babel/core@7.25.2) + '@babel/plugin-transform-nullish-coalescing-operator': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-optional-chaining': 7.24.8(@babel/core@7.25.2) + '@babel/plugin-transform-private-methods': 7.24.7(@babel/core@7.25.2) + '@babel/preset-flow': 7.24.7(@babel/core@7.25.2) + '@babel/preset-typescript': 7.24.7(@babel/core@7.25.2) + '@babel/register': 7.24.6(@babel/core@7.25.2) chalk: 4.1.2 flow-parser: 0.227.0 graceful-fs: 4.2.11 @@ -15441,13 +16570,13 @@ snapshots: temp: 0.9.4 write-file-atomic: 5.0.1 optionalDependencies: - '@babel/preset-env': 7.24.8(@babel/core@7.24.8) + '@babel/preset-env': 7.25.2(@babel/core@7.25.2) transitivePeerDependencies: - supports-color jsdoc-type-pratt-parser@4.0.0: {} - jsdom@24.1.0: + jsdom@24.1.1: dependencies: cssstyle: 4.0.1 data-urls: 5.0.0 @@ -15455,11 +16584,11 @@ snapshots: form-data: 4.0.0 html-encoding-sniffer: 4.0.0 http-proxy-agent: 7.0.2 - https-proxy-agent: 7.0.4 + https-proxy-agent: 7.0.5 is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.10 + nwsapi: 2.2.12 parse5: 7.1.2 - rrweb-cssom: 0.7.0 + rrweb-cssom: 0.7.1 saxes: 6.0.0 symbol-tree: 3.2.4 tough-cookie: 4.1.4 @@ -15468,7 +16597,7 @@ snapshots: whatwg-encoding: 3.1.1 whatwg-mimetype: 4.0.0 whatwg-url: 14.0.0 - ws: 8.17.0 + ws: 8.18.0 xml-name-validator: 5.0.0 transitivePeerDependencies: - bufferutil @@ -15536,50 +16665,50 @@ snapshots: lodash.isstring: 4.0.1 lodash.once: 4.1.1 ms: 2.1.3 - semver: 7.6.2 + semver: 7.6.3 jss-plugin-camel-case@10.10.0: dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 hyphenate-style-name: 1.0.4 jss: 10.10.0 jss-plugin-default-unit@10.10.0: dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 jss: 10.10.0 jss-plugin-global@10.10.0: dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 jss: 10.10.0 jss-plugin-nested@10.10.0: dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 jss: 10.10.0 tiny-warning: 1.0.3 jss-plugin-props-sort@10.10.0: dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 jss: 10.10.0 jss-plugin-rule-value-function@10.10.0: dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 jss: 10.10.0 tiny-warning: 1.0.3 jss-plugin-template@10.10.0: dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 jss: 10.10.0 tiny-warning: 1.0.3 jss-plugin-vendor-prefixer@10.10.0: dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 css-vendor: 2.0.8 jss: 10.10.0 @@ -15590,7 +16719,7 @@ snapshots: jss@10.10.0: dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 csstype: 3.1.3 is-in-browser: 1.1.3 tiny-warning: 1.0.3 @@ -15657,11 +16786,11 @@ snapshots: dependencies: graceful-fs: 4.2.11 - karma-webpack@5.0.1(webpack@5.92.1(webpack-cli@5.1.4)): + karma-webpack@5.0.1(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4)): dependencies: glob: 7.2.3 minimatch: 9.0.4 - webpack: 5.92.1(webpack-cli@5.1.4) + webpack: 5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4) webpack-merge: 4.2.2 karma@6.4.3: @@ -15712,13 +16841,13 @@ snapshots: dependencies: readable-stream: 2.3.8 - lerna@8.1.6(babel-plugin-macros@3.1.0)(encoding@0.1.13): + lerna@8.1.7(@swc/core@1.6.13)(babel-plugin-macros@3.1.0)(encoding@0.1.13): dependencies: - '@lerna/create': 8.1.6(babel-plugin-macros@3.1.0)(encoding@0.1.13)(typescript@5.5.3) + '@lerna/create': 8.1.7(@swc/core@1.6.13)(babel-plugin-macros@3.1.0)(encoding@0.1.13)(typescript@5.5.4) '@npmcli/arborist': 7.5.3 '@npmcli/package-json': 5.2.0 '@npmcli/run-script': 8.1.0 - '@nx/devkit': 17.3.0(nx@17.3.0) + '@nx/devkit': 17.3.0(nx@17.3.0(@swc/core@1.6.13)) '@octokit/plugin-enterprise-rest': 6.0.1 '@octokit/rest': 19.0.11(encoding@0.1.13) aproba: 2.0.0 @@ -15732,7 +16861,7 @@ snapshots: conventional-changelog-angular: 7.0.0 conventional-changelog-core: 5.0.1 conventional-recommended-bump: 7.0.1 - cosmiconfig: 8.3.6(typescript@5.5.3) + cosmiconfig: 8.3.6(typescript@5.5.4) dedent: 1.5.3(babel-plugin-macros@3.1.0) envinfo: 7.13.0 execa: 5.0.0 @@ -15763,7 +16892,7 @@ snapshots: npm-package-arg: 11.0.2 npm-packlist: 8.0.2 npm-registry-fetch: 17.1.0 - nx: 17.3.0 + nx: 17.3.0(@swc/core@1.6.13) p-map: 4.0.0 p-map-series: 2.1.0 p-pipe: 3.1.0 @@ -15775,16 +16904,17 @@ snapshots: read-cmd-shim: 4.0.0 resolve-from: 5.0.0 rimraf: 4.4.1 - semver: 7.6.2 + semver: 7.6.3 set-blocking: 2.0.0 signal-exit: 3.0.7 slash: 3.0.0 ssri: 10.0.6 string-width: 4.2.3 + strip-ansi: 6.0.1 strong-log-transformer: 2.1.0 tar: 6.2.1 temp-dir: 1.0.0 - typescript: 5.5.3 + typescript: 5.5.4 upath: 2.0.1 uuid: 10.0.0 validate-npm-package-license: 3.0.4 @@ -15827,7 +16957,7 @@ snapshots: npm-package-arg: 11.0.2 npm-registry-fetch: 17.1.0 proc-log: 4.2.0 - semver: 7.6.2 + semver: 7.6.3 sigstore: 2.2.0 ssri: 10.0.6 transitivePeerDependencies: @@ -15972,7 +17102,7 @@ snapshots: dependencies: date-format: 4.0.14 debug: 4.3.5(supports-color@8.1.1) - flatted: 3.2.9 + flatted: 3.3.1 rfdc: 1.3.1 streamroller: 3.1.5 transitivePeerDependencies: @@ -15988,11 +17118,15 @@ snapshots: dependencies: get-func-name: 2.0.2 + loupe@3.1.1: + dependencies: + get-func-name: 2.0.2 + lower-case@2.0.2: dependencies: tslib: 2.6.2 - lru-cache@10.3.0: {} + lru-cache@10.4.3: {} lru-cache@4.1.5: dependencies: @@ -16011,6 +17145,10 @@ snapshots: lz-string@1.5.0: {} + magic-string@0.30.10: + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + make-array@1.0.5: {} make-dir@2.1.0: @@ -16024,7 +17162,7 @@ snapshots: make-dir@4.0.0: dependencies: - semver: 7.6.2 + semver: 7.6.3 make-fetch-happen@13.0.0: dependencies: @@ -16173,6 +17311,8 @@ snapshots: mimic-fn@2.1.0: {} + mimic-fn@4.0.0: {} + min-indent@1.0.1: {} minimatch@3.0.5: @@ -16252,7 +17392,7 @@ snapshots: mkdirp@1.0.4: {} - mocha@10.6.0: + mocha@10.7.0: dependencies: ansi-colors: 4.1.3 browser-stdout: 1.3.1 @@ -16277,7 +17417,7 @@ snapshots: modify-values@1.0.1: {} - moment-hijri@2.1.2: + moment-hijri@2.30.0: dependencies: moment: 2.30.1 @@ -16304,6 +17444,29 @@ snapshots: ms@2.1.3: {} + msw@2.3.2(typescript@5.5.4): + dependencies: + '@bundled-es-modules/cookie': 2.0.0 + '@bundled-es-modules/statuses': 1.0.1 + '@inquirer/confirm': 3.1.17 + '@mswjs/cookies': 1.1.1 + '@mswjs/interceptors': 0.29.1 + '@open-draft/until': 2.1.0 + '@types/cookie': 0.6.0 + '@types/statuses': 2.0.5 + chalk: 4.1.2 + graphql: 16.9.0 + headers-polyfill: 4.0.3 + is-node-process: 1.2.0 + outvariant: 1.4.3 + path-to-regexp: 6.2.1 + strict-event-emitter: 0.5.1 + type-fest: 4.23.0 + yargs: 17.7.2 + optionalDependencies: + typescript: 5.5.4 + optional: true + multimatch@5.0.0: dependencies: '@types/minimatch': 3.0.5 @@ -16337,7 +17500,7 @@ snapshots: nested-error-stacks@2.1.1: {} - next@14.2.5(@babel/core@7.24.8)(@opentelemetry/api@1.8.0)(@playwright/test@1.44.1)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next@14.2.5(@babel/core@7.25.2)(@opentelemetry/api@1.8.0)(@playwright/test@1.44.1)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@next/env': 14.2.5 '@swc/helpers': 0.5.5 @@ -16347,7 +17510,7 @@ snapshots: postcss: 8.4.31 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - styled-jsx: 5.1.1(@babel/core@7.24.8)(babel-plugin-macros@3.1.0)(react@18.3.1) + styled-jsx: 5.1.1(@babel/core@7.25.2)(babel-plugin-macros@3.1.0)(react@18.3.1) optionalDependencies: '@next/swc-darwin-arm64': 14.2.5 '@next/swc-darwin-x64': 14.2.5 @@ -16400,6 +17563,8 @@ snapshots: optionalDependencies: encoding: 0.1.13 + node-gyp-build@4.8.1: {} + node-gyp@10.0.1: dependencies: env-paths: 2.2.1 @@ -16409,7 +17574,7 @@ snapshots: make-fetch-happen: 13.0.0 nopt: 7.2.1 proc-log: 3.0.0 - semver: 7.6.2 + semver: 7.6.3 tar: 6.2.1 which: 4.0.0 transitivePeerDependencies: @@ -16442,13 +17607,13 @@ snapshots: dependencies: hosted-git-info: 4.1.0 is-core-module: 2.13.1 - semver: 7.6.2 + semver: 7.6.3 validate-npm-package-license: 3.0.4 normalize-package-data@6.0.2: dependencies: hosted-git-info: 7.0.2 - semver: 7.6.2 + semver: 7.6.3 validate-npm-package-license: 3.0.4 normalize-path@3.0.0: {} @@ -16461,7 +17626,7 @@ snapshots: npm-install-checks@6.3.0: dependencies: - semver: 7.6.2 + semver: 7.6.3 npm-normalize-package-bin@3.0.1: {} @@ -16469,7 +17634,7 @@ snapshots: dependencies: hosted-git-info: 7.0.2 proc-log: 4.2.0 - semver: 7.6.2 + semver: 7.6.3 validate-npm-package-name: 5.0.1 npm-packlist@8.0.2: @@ -16481,7 +17646,7 @@ snapshots: npm-install-checks: 6.3.0 npm-normalize-package-bin: 3.0.1 npm-package-arg: 11.0.2 - semver: 7.6.2 + semver: 7.6.3 npm-registry-fetch@17.1.0: dependencies: @@ -16510,11 +17675,11 @@ snapshots: dependencies: boolbase: 1.0.0 - nwsapi@2.2.10: {} + nwsapi@2.2.12: {} - nx@17.3.0: + nx@17.3.0(@swc/core@1.6.13): dependencies: - '@nrwl/tao': 17.3.0 + '@nrwl/tao': 17.3.0(@swc/core@1.6.13) '@yarnpkg/lockfile': 1.1.0 '@yarnpkg/parsers': 3.0.0-rc.46 '@zkochan/js-yaml': 0.0.6 @@ -16559,6 +17724,7 @@ snapshots: '@nx/nx-linux-x64-musl': 17.3.0 '@nx/nx-win32-arm64-msvc': 17.3.0 '@nx/nx-win32-x64-msvc': 17.3.0 + '@swc/core': 1.6.13(@swc/helpers@0.5.5) transitivePeerDependencies: - debug @@ -16668,6 +17834,10 @@ snapshots: dependencies: mimic-fn: 2.1.0 + onetime@6.0.0: + dependencies: + mimic-fn: 4.0.0 + open@8.4.2: dependencies: define-lazy-prop: 2.0.0 @@ -16719,6 +17889,9 @@ snapshots: os-tmpdir@1.0.2: {} + outvariant@1.4.3: + optional: true + override-require@1.1.1: {} p-cancelable@1.1.0: {} @@ -16881,7 +18054,7 @@ snapshots: parse-github-url@1.0.2: {} - parse-imports@2.1.0: + parse-imports@2.1.1: dependencies: es-module-lexer: 1.5.4 slashes: 3.0.12 @@ -16943,7 +18116,7 @@ snapshots: path-scurry@1.10.1: dependencies: - lru-cache: 10.3.0 + lru-cache: 10.4.3 minipass: 7.0.4 path-to-regexp@0.1.7: {} @@ -16960,8 +18133,12 @@ snapshots: path-type@5.0.0: {} + pathe@1.1.2: {} + pathval@1.1.1: {} + pathval@2.0.0: {} + picocolors@1.0.1: {} picomatch@2.3.1: {} @@ -17037,7 +18214,7 @@ snapshots: picocolors: 1.0.1 source-map-js: 1.2.0 - postcss@8.4.39: + postcss@8.4.40: dependencies: nanoid: 3.3.7 picocolors: 1.0.1 @@ -17051,7 +18228,7 @@ snapshots: dependencies: fast-diff: 1.3.0 - prettier@3.3.2: {} + prettier@3.3.3: {} pretty-error@4.0.0: dependencies: @@ -17074,7 +18251,7 @@ snapshots: dependencies: parse-ms: 4.0.0 - pretty-quick@4.0.0(prettier@3.3.2): + pretty-quick@4.0.0(prettier@3.3.3): dependencies: execa: 5.1.1 find-up: 5.0.0 @@ -17082,7 +18259,7 @@ snapshots: mri: 1.2.0 picocolors: 1.0.1 picomatch: 3.0.1 - prettier: 3.3.2 + prettier: 3.3.3 tslib: 2.6.2 prettyjson@1.2.5: @@ -17204,9 +18381,9 @@ snapshots: react-docgen@5.4.3: dependencies: - '@babel/core': 7.24.8 - '@babel/generator': 7.24.8 - '@babel/runtime': 7.24.8 + '@babel/core': 7.25.2 + '@babel/generator': 7.25.0 + '@babel/runtime': 7.25.0 ast-types: 0.14.2 commander: 2.20.3 doctrine: 3.0.0 @@ -17229,16 +18406,18 @@ snapshots: react-is@18.3.1: {} - react-router-dom@6.24.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + react-refresh@0.14.2: {} + + react-router-dom@6.25.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@remix-run/router': 1.17.1 + '@remix-run/router': 1.18.0 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - react-router: 6.24.1(react@18.3.1) + react-router: 6.25.1(react@18.3.1) - react-router@6.24.1(react@18.3.1): + react-router@6.25.1(react@18.3.1): dependencies: - '@remix-run/router': 1.17.1 + '@remix-run/router': 1.18.0 react: 18.3.1 react-runner@1.0.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1): @@ -17254,7 +18433,7 @@ snapshots: react-transition-group@4.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 dom-helpers: 5.2.1 loose-envify: 1.4.0 prop-types: 15.8.1 @@ -17382,7 +18561,7 @@ snapshots: regenerator-transform@0.15.2: dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 regexp.prototype.flags@1.5.2: dependencies: @@ -17510,19 +18689,41 @@ snapshots: dependencies: glob: 9.3.5 - rimraf@5.0.8: + rimraf@5.0.9: dependencies: glob: 10.3.10 robust-predicates@3.0.2: {} + rollup@4.18.1: + dependencies: + '@types/estree': 1.0.5 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.18.1 + '@rollup/rollup-android-arm64': 4.18.1 + '@rollup/rollup-darwin-arm64': 4.18.1 + '@rollup/rollup-darwin-x64': 4.18.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.18.1 + '@rollup/rollup-linux-arm-musleabihf': 4.18.1 + '@rollup/rollup-linux-arm64-gnu': 4.18.1 + '@rollup/rollup-linux-arm64-musl': 4.18.1 + '@rollup/rollup-linux-powerpc64le-gnu': 4.18.1 + '@rollup/rollup-linux-riscv64-gnu': 4.18.1 + '@rollup/rollup-linux-s390x-gnu': 4.18.1 + '@rollup/rollup-linux-x64-gnu': 4.18.1 + '@rollup/rollup-linux-x64-musl': 4.18.1 + '@rollup/rollup-win32-arm64-msvc': 4.18.1 + '@rollup/rollup-win32-ia32-msvc': 4.18.1 + '@rollup/rollup-win32-x64-msvc': 4.18.1 + fsevents: 2.3.3 + rrweb-cssom@0.6.0: {} - rrweb-cssom@0.7.0: {} + rrweb-cssom@0.7.1: {} rtl-css-js@1.16.1: dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 run-async@2.4.1: {} @@ -17590,7 +18791,7 @@ snapshots: dependencies: lru-cache: 6.0.0 - semver@7.6.2: {} + semver@7.6.3: {} send@0.18.0: dependencies: @@ -17682,7 +18883,7 @@ snapshots: dependencies: color: 4.2.3 detect-libc: 2.0.3 - semver: 7.6.2 + semver: 7.6.3 optionalDependencies: '@img/sharp-darwin-arm64': 0.33.4 '@img/sharp-darwin-x64': 0.33.4 @@ -17719,6 +18920,8 @@ snapshots: get-intrinsic: 1.2.4 object-inspect: 1.13.1 + siginfo@2.0.0: {} + signal-exit@3.0.7: {} signal-exit@4.1.0: {} @@ -17870,10 +19073,14 @@ snapshots: dependencies: minipass: 7.0.4 + stackback@0.0.2: {} + statuses@1.5.0: {} statuses@2.0.1: {} + std-env@3.7.0: {} + stop-iteration-iterator@1.0.0: dependencies: internal-slot: 1.0.7 @@ -17893,11 +19100,14 @@ snapshots: streamsearch@1.1.0: {} - string-replace-loader@3.1.0(webpack@5.92.1(webpack-cli@5.1.4)): + strict-event-emitter@0.5.1: + optional: true + + string-replace-loader@3.1.0(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4)): dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.92.1(webpack-cli@5.1.4) + webpack: 5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4) string-width@4.2.3: dependencies: @@ -17979,6 +19189,8 @@ snapshots: strip-final-newline@2.0.0: {} + strip-final-newline@3.0.0: {} + strip-final-newline@4.0.0: {} strip-indent@3.0.0: @@ -17995,7 +19207,7 @@ snapshots: minimist: 1.2.8 through: 2.3.8 - styled-components@6.1.11(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + styled-components@6.1.12(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@emotion/is-prop-valid': 1.2.2 '@emotion/unitless': 0.8.1 @@ -18009,12 +19221,12 @@ snapshots: stylis: 4.3.2 tslib: 2.6.2 - styled-jsx@5.1.1(@babel/core@7.24.8)(babel-plugin-macros@3.1.0)(react@18.3.1): + styled-jsx@5.1.1(@babel/core@7.25.2)(babel-plugin-macros@3.1.0)(react@18.3.1): dependencies: client-only: 0.0.1 react: 18.3.1 optionalDependencies: - '@babel/core': 7.24.8 + '@babel/core': 7.25.2 babel-plugin-macros: 3.1.0 stylis-plugin-rtl@2.1.1(stylis@4.3.2): @@ -18061,12 +19273,7 @@ snapshots: symbol-tree@3.2.4: {} - synckit@0.8.8: - dependencies: - '@pkgr/core': 0.1.1 - tslib: 2.6.2 - - synckit@0.9.0: + synckit@0.9.1: dependencies: '@pkgr/core': 0.1.1 tslib: 2.6.2 @@ -18099,23 +19306,27 @@ snapshots: mkdirp: 0.5.6 rimraf: 2.6.3 - terser-webpack-plugin@5.3.10(webpack@5.92.1(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1))): + terser-webpack-plugin@5.3.10(@swc/core@1.6.13)(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1))): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.2 terser: 5.27.0 - webpack: 5.92.1(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1)) + webpack: 5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1)) + optionalDependencies: + '@swc/core': 1.6.13(@swc/helpers@0.5.5) - terser-webpack-plugin@5.3.10(webpack@5.92.1(webpack-cli@5.1.4)): + terser-webpack-plugin@5.3.10(@swc/core@1.6.13)(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4)): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.2 terser: 5.27.0 - webpack: 5.92.1(webpack-cli@5.1.4) + webpack: 5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4) + optionalDependencies: + '@swc/core': 1.6.13(@swc/helpers@0.5.5) terser@5.27.0: dependencies: @@ -18158,6 +19369,14 @@ snapshots: tiny-warning@1.0.3: {} + tinybench@2.8.0: {} + + tinypool@1.0.0: {} + + tinyrainbow@1.2.0: {} + + tinyspy@3.0.0: {} + tmp@0.0.33: dependencies: os-tmpdir: 1.0.2 @@ -18197,9 +19416,9 @@ snapshots: trough@1.0.5: {} - ts-api-utils@1.3.0(typescript@5.5.3): + ts-api-utils@1.3.0(typescript@5.5.4): dependencies: - typescript: 5.5.3 + typescript: 5.5.4 ts-interface-checker@0.1.13: {} @@ -18235,6 +19454,8 @@ snapshots: transitivePeerDependencies: - supports-color + tunnel@0.0.6: {} + type-check@0.3.2: dependencies: prelude-ls: 1.1.2 @@ -18245,6 +19466,8 @@ snapshots: type-detect@4.0.8: {} + type-detect@4.1.0: {} + type-fest@0.18.1: {} type-fest@0.20.2: {} @@ -18259,6 +19482,9 @@ snapshots: type-fest@2.19.0: {} + type-fest@4.23.0: + optional: true + type-is@1.6.18: dependencies: media-typer: 0.3.0 @@ -18302,7 +19528,7 @@ snapshots: typedarray@0.0.6: {} - typescript@5.5.3: {} + typescript@5.5.4: {} ua-parser-js@0.7.37: {} @@ -18320,6 +19546,10 @@ snapshots: undici-types@5.26.5: {} + undici@5.28.4: + dependencies: + '@fastify/busboy': 2.1.1 + unicode-canonical-property-names-ecmascript@2.0.0: {} unicode-match-property-ecmascript@2.0.0: @@ -18472,6 +19702,68 @@ snapshots: unist-util-stringify-position: 2.0.3 vfile-message: 2.0.4 + vite-node@2.0.4(@types/node@18.19.42)(terser@5.27.0): + dependencies: + cac: 6.7.14 + debug: 4.3.5(supports-color@8.1.1) + pathe: 1.1.2 + tinyrainbow: 1.2.0 + vite: 5.3.4(@types/node@18.19.42)(terser@5.27.0) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + + vite@5.3.4(@types/node@18.19.42)(terser@5.27.0): + dependencies: + esbuild: 0.21.5 + postcss: 8.4.40 + rollup: 4.18.1 + optionalDependencies: + '@types/node': 18.19.42 + fsevents: 2.3.3 + terser: 5.27.0 + + vitest@2.0.4(@types/node@18.19.42)(@vitest/browser@2.0.4)(@vitest/ui@2.0.4)(jsdom@24.1.1)(terser@5.27.0): + dependencies: + '@ampproject/remapping': 2.3.0 + '@vitest/expect': 2.0.4 + '@vitest/pretty-format': 2.0.4 + '@vitest/runner': 2.0.4 + '@vitest/snapshot': 2.0.4 + '@vitest/spy': 2.0.4 + '@vitest/utils': 2.0.4 + chai: 5.1.1 + debug: 4.3.5(supports-color@8.1.1) + execa: 8.0.1 + magic-string: 0.30.10 + pathe: 1.1.2 + std-env: 3.7.0 + tinybench: 2.8.0 + tinypool: 1.0.0 + tinyrainbow: 1.2.0 + vite: 5.3.4(@types/node@18.19.42)(terser@5.27.0) + vite-node: 2.0.4(@types/node@18.19.42)(terser@5.27.0) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 18.19.42 + '@vitest/browser': 2.0.4(typescript@5.5.4)(vitest@2.0.4) + '@vitest/ui': 2.0.4(vitest@2.0.4) + jsdom: 24.1.1 + transitivePeerDependencies: + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + void-elements@2.0.1: {} w3c-xmlserializer@5.0.0: @@ -18514,9 +19806,9 @@ snapshots: webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1): dependencies: '@discoveryjs/json-ext': 0.5.7 - '@webpack-cli/configtest': 2.1.1(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1))(webpack@5.92.1(webpack-cli@5.1.4)) - '@webpack-cli/info': 2.0.2(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1))(webpack@5.92.1(webpack-cli@5.1.4)) - '@webpack-cli/serve': 2.0.5(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1))(webpack@5.92.1(webpack-cli@5.1.4)) + '@webpack-cli/configtest': 2.1.1(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1))(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4)) + '@webpack-cli/info': 2.0.2(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1))(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4)) + '@webpack-cli/serve': 2.0.5(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1))(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4)) colorette: 2.0.20 commander: 10.0.1 cross-spawn: 7.0.3 @@ -18525,7 +19817,7 @@ snapshots: import-local: 3.1.0 interpret: 3.1.1 rechoir: 0.8.0 - webpack: 5.92.1(webpack-cli@5.1.4) + webpack: 5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4) webpack-merge: 5.10.0 optionalDependencies: webpack-bundle-analyzer: 4.10.2 @@ -18542,7 +19834,7 @@ snapshots: webpack-sources@3.2.3: {} - webpack@5.92.1(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1)): + webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1)): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.5 @@ -18565,7 +19857,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(webpack@5.92.1(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1))) + terser-webpack-plugin: 5.3.10(@swc/core@1.6.13)(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.92.1))) watchpack: 2.4.1 webpack-sources: 3.2.3 optionalDependencies: @@ -18575,7 +19867,7 @@ snapshots: - esbuild - uglify-js - webpack@5.92.1(webpack-cli@5.1.4): + webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.5 @@ -18598,7 +19890,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(webpack@5.92.1(webpack-cli@5.1.4)) + terser-webpack-plugin: 5.3.10(@swc/core@1.6.13)(webpack@5.92.1(@swc/core@1.6.13)(webpack-cli@5.1.4)) watchpack: 2.4.1 webpack-sources: 3.2.3 optionalDependencies: @@ -18676,6 +19968,11 @@ snapshots: dependencies: isexe: 3.1.1 + why-is-node-running@2.3.0: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + wide-align@1.1.5: dependencies: string-width: 4.2.3 @@ -18749,7 +20046,7 @@ snapshots: ws@8.11.0: {} - ws@8.17.0: {} + ws@8.18.0: {} xcase@2.0.1: {} @@ -18829,6 +20126,9 @@ snapshots: yocto-queue@1.0.0: {} + yoctocolors-cjs@2.1.2: + optional: true + yoctocolors@2.0.2: {} zip-stream@4.1.1: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 6e7e91713fc8..132ec1119136 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -2,3 +2,4 @@ packages: - 'packages/*' - 'docs' - 'test' + - 'test/performance-charts' diff --git a/renovate.json b/renovate.json index 3c2f3598dfdb..43c1d692a475 100644 --- a/renovate.json +++ b/renovate.json @@ -81,11 +81,11 @@ { "groupName": "MUI Core", "matchPackageNames": [ - "@mui/base", "@mui/icons-material", "@mui/joy", "@mui/lab", "@mui/material", + "@mui/material-nextjs", "@mui/styles", "@mui/system", "@mui/types", diff --git a/scripts/githubActions/issueBodyCleanup.js b/scripts/githubActions/issueBodyCleanup.js new file mode 100644 index 000000000000..91d251828f51 --- /dev/null +++ b/scripts/githubActions/issueBodyCleanup.js @@ -0,0 +1,84 @@ +function extractInputSection(lines, title) { + const index = lines.findIndex((line) => line.startsWith('###') && line.includes(title)); + if (index === -1) { + return ''; + } + return lines.splice(index, 4)[2].trim(); +} + +/** + * @param {Object} params + * @param {import("@actions/core")} params.core + * @param {ReturnType} params.github + * @param {import("@actions/github").context} params.context + */ +module.exports = async ({ core, context, github }) => { + try { + const owner = context.repo.owner; + const repo = context.repo.repo; + const issueNumber = context.issue.number; + + const issue = await github.rest.issues.get({ + owner, + repo, + issue_number: issueNumber, + }); + + const lines = issue.data.body.split('\n'); + + const searchKeywords = extractInputSection(lines, 'Search keywords'); + + // get the order id and set it as an output for the support label step + let orderID = extractInputSection(lines, 'Order ID or Support key'); + if (orderID === '_No response_') { + orderID = ''; + } + + core.setOutput('ORDER_ID', orderID); + + const products = extractInputSection(lines, 'Affected products'); + + // debug log all values + core.debug(`>>> Search Keywords: ${searchKeywords}`); + core.debug(`>>> Order ID: ${orderID}`); + core.debug(`>>> Affected Products: ${products}`); + + lines.push(''); + lines.push(`**Search keywords**: ${searchKeywords}`); + if (orderID !== '') { + lines.push(`**Order ID**: ${orderID}`); + } + + const body = lines.join('\n'); + core.debug(`>>> Cleaned issue body: ${body}`); + + const labels = issue.data.labels.map((label) => label.name); + + const productMap = { + 'Data Grid': 'data grid', + 'Date and Time Pickers': 'pickers', + Charts: 'charts', + 'Tree View': 'tree view', + }; + + if (products !== '') { + products.split(',').forEach((product) => { + if (productMap[product.trim()]) { + labels.push(`component: ${productMap[product.trim()]}`); + } + }); + } + + core.debug(`>>> Labels: ${labels.join(',')}`); + + await github.rest.issues.update({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body, + labels, + }); + } catch (error) { + core.setFailed(error.message); + } +}; diff --git a/scripts/githubActions/orderIdValidation.js b/scripts/githubActions/orderIdValidation.js new file mode 100644 index 000000000000..1acc23cc1d00 --- /dev/null +++ b/scripts/githubActions/orderIdValidation.js @@ -0,0 +1,66 @@ +/** + * @param {Object} params + * @param {import("@actions/core")} params.core + * @param {ReturnType} params.github + * @param {import("@actions/github").context} params.context + */ +module.exports = async ({ core, context, github }) => { + try { + const owner = context.repo.owner; + const repo = context.repo.repo; + const issueNumber = context.issue.number; + + const orderId = process.env.ORDER_ID; + const orderApiToken = process.env.ORDER_API_TOKEN; + + const orderApi = 'https://store-wp.mui.com/wp-json/wc/v3/orders/'; + + core.debug(`>>> Order ID: ${orderId}`); + + if (!orderId) { + core.info('No Order ID'); + } else { + const order = await fetch(`${orderApi}${orderId}`, { + headers: { + Authorization: orderApiToken, + 'User-Agent': 'MUI-Tools-Private/X-Orders-Inspector v1', + }, + }); + + const orderDetails = await order.json(); + + core.debug(`>>> Order Items: ${orderDetails.line_items?.join(',')}`); + + const plan = + orderDetails.line_items?.filter((item) => /\b(pro|premium)\b/i.test(item.name))[0].name || + ''; + + if (!plan) { + core.info('No Pro or Premium plan found in order'); + return; + } + + const planName = plan.match(/\b(pro|premium)\b/i)[0].toLowerCase(); + + if (planName !== 'pro' && planName !== 'premium') { + core.debug(`>>> planName: ${planName}`); + core.info('planName could not be extracted'); + return; + } + + const labelName = `support: ${planName} standard`; + + core.debug(`>>> planName: ${planName}`); + core.debug(`>>> labelName: ${labelName}`); + + await github.rest.issues.addLabels({ + owner, + repo, + issue_number: issueNumber, + labels: [labelName], + }); + } + } catch (error) { + core.setFailed(error.message); + } +}; diff --git a/scripts/localeNames.js b/scripts/localeNames.js index 08757be676e0..5b0b0a23398f 100644 --- a/scripts/localeNames.js +++ b/scripts/localeNames.js @@ -35,6 +35,7 @@ module.exports = { 'ko-KR': 'Korean', mk: 'Macedonian', 'nb-NO': 'Norwegian (Bokmål)', + 'nn-NO': 'Norwegian (Nynorsk)', 'fa-IR': 'Persian', 'pl-PL': 'Polish', 'pt-PT': 'Portuguese', diff --git a/scripts/useReactVersion.mjs b/scripts/useReactVersion.mjs index 1a36599fce68..366bd770e53c 100644 --- a/scripts/useReactVersion.mjs +++ b/scripts/useReactVersion.mjs @@ -1,109 +1 @@ -/* eslint-disable no-console */ -/** - * Given the dist tag fetch the corresponding - * version and make sure this version is used throughout the repository. - * - * If you work on this file: - * WARNING: This script can only use built-in modules since it has to run before - * `pnpm install` - */ -import childProcess from 'child_process'; -import fs from 'fs'; -import os from 'os'; -import path from 'path'; -import { promisify } from 'util'; -import { getWorkspaceRoot } from './utils.mjs'; - -// TODO: reuse the `useReactVersion.mjs` from the monorepo - -const exec = promisify(childProcess.exec); - -// packages published from the react monorepo using the same version -const reactPackageNames = ['react', 'react-dom', 'react-is', 'react-test-renderer', 'scheduler']; -const devDependenciesPackageNames = ['@testing-library/react']; - -// if we need to support more versions we will need to add new mapping here -const additionalVersionsMappings = { - 17: { - '@testing-library/react': '^12.1.0', - }, - 19: {}, -}; - -async function main(version) { - if (typeof version !== 'string') { - throw new TypeError(`expected version: string but got '${version}'`); - } - - if (version === 'stable') { - console.log('Nothing to do with stable'); - return; - } - - const packageJsonPath = path.resolve(getWorkspaceRoot(), 'package.json'); - const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, { encoding: 'utf8' })); - - // the version is something in format: "17.0.0" - let majorVersion = null; - - if (version.startsWith('^') || version.startsWith('~') || !Number.isNaN(version.charAt(0))) { - majorVersion = version.replace('^', '').replace('~', '').split('.')[0]; - } - - await Promise.all( - reactPackageNames.map(async (reactPackageName) => { - const { stdout: versions } = await exec(`npm dist-tag ls ${reactPackageName} ${version}`); - const tagMapping = versions.split('\n').find((mapping) => { - return mapping.startsWith(`${version}: `); - }); - - let packageVersion = null; - - if (tagMapping === undefined) { - // Some specific version is being requested - if (majorVersion) { - packageVersion = version; - if (reactPackageName === 'scheduler') { - // get the scheduler version from the react-dom's dependencies entry - const { stdout: reactDOMDependenciesString } = await exec( - `npm view --json react-dom@${version} dependencies`, - ); - packageVersion = JSON.parse(reactDOMDependenciesString).scheduler; - } - } else { - throw new Error(`Could not find '${version}' in "${versions}"`); - } - } else { - packageVersion = tagMapping.replace(`${version}: `, ''); - } - - packageJson.resolutions[reactPackageName] = packageVersion; - }), - ); - - // At this moment all dist tags reference React 18 version, so we don't need - // to update these dependencies unless an older version is used, or when the - // next/experimental dist tag reference to a future version of React - // packageJson.devDependencies['@testing-library/react'] = 'alpha'; - - if (majorVersion && additionalVersionsMappings[majorVersion]) { - devDependenciesPackageNames.forEach((packageName) => { - if (!additionalVersionsMappings[majorVersion][packageName]) { - throw new Error( - `Version ${majorVersion} does not have version defined for the ${packageName}`, - ); - } - packageJson.devDependencies[packageName] = - additionalVersionsMappings[majorVersion][packageName]; - }); - } - - // add newline for clean diff - fs.writeFileSync(packageJsonPath, `${JSON.stringify(packageJson, null, 2)}${os.EOL}`); -} - -const [version = process.env.REACT_VERSION] = process.argv.slice(2); -main(version).catch((error) => { - console.error(error); - process.exit(1); -}); +import '@mui/monorepo/scripts/useReactVersion.mjs'; diff --git a/scripts/x-charts-pro.exports.json b/scripts/x-charts-pro.exports.json index bec72c5ad30a..7da58b547b02 100644 --- a/scripts/x-charts-pro.exports.json +++ b/scripts/x-charts-pro.exports.json @@ -321,6 +321,12 @@ { "name": "useYColorScale", "kind": "Function" }, { "name": "useYScale", "kind": "Function" }, { "name": "useZColorScale", "kind": "Function" }, + { "name": "useZoom", "kind": "Function" }, { "name": "ZAxisContextProvider", "kind": "Function" }, - { "name": "ZAxisContextProviderProps", "kind": "TypeAlias" } + { "name": "ZAxisContextProviderProps", "kind": "TypeAlias" }, + { "name": "ZoomData", "kind": "TypeAlias" }, + { "name": "ZoomOptions", "kind": "TypeAlias" }, + { "name": "ZoomProps", "kind": "TypeAlias" }, + { "name": "ZoomSetup", "kind": "Function" }, + { "name": "ZoomState", "kind": "TypeAlias" } ] diff --git a/scripts/x-data-grid-premium.exports.json b/scripts/x-data-grid-premium.exports.json index 97afc72b4262..ac6c300397a0 100644 --- a/scripts/x-data-grid-premium.exports.json +++ b/scripts/x-data-grid-premium.exports.json @@ -628,6 +628,7 @@ { "name": "gridVisiblePinnedColumnDefinitionsSelector", "kind": "Variable" }, { "name": "gridVisibleRowsLookupSelector", "kind": "Variable" }, { "name": "GridWorkspacesIcon", "kind": "Variable" }, + { "name": "isAutogeneratedRow", "kind": "Variable" }, { "name": "isGroupingColumn", "kind": "Variable" }, { "name": "isLeaf", "kind": "Function" }, { "name": "LicenseInfo", "kind": "Class" }, diff --git a/scripts/x-data-grid-pro.exports.json b/scripts/x-data-grid-pro.exports.json index 4ba16d506778..e9620df666a0 100644 --- a/scripts/x-data-grid-pro.exports.json +++ b/scripts/x-data-grid-pro.exports.json @@ -581,6 +581,7 @@ { "name": "gridVisibleColumnFieldsSelector", "kind": "Variable" }, { "name": "gridVisiblePinnedColumnDefinitionsSelector", "kind": "Variable" }, { "name": "gridVisibleRowsLookupSelector", "kind": "Variable" }, + { "name": "isAutogeneratedRow", "kind": "Variable" }, { "name": "isLeaf", "kind": "Function" }, { "name": "LicenseInfo", "kind": "Class" }, { "name": "LoadingOverlayPropsOverrides", "kind": "Interface" }, diff --git a/scripts/x-data-grid.exports.json b/scripts/x-data-grid.exports.json index ada1c4cbd351..ac66be0724d0 100644 --- a/scripts/x-data-grid.exports.json +++ b/scripts/x-data-grid.exports.json @@ -531,6 +531,7 @@ { "name": "gridVisibleColumnFieldsSelector", "kind": "Variable" }, { "name": "gridVisiblePinnedColumnDefinitionsSelector", "kind": "Variable" }, { "name": "gridVisibleRowsLookupSelector", "kind": "Variable" }, + { "name": "isAutogeneratedRow", "kind": "Variable" }, { "name": "isLeaf", "kind": "Function" }, { "name": "LoadingOverlayPropsOverrides", "kind": "Interface" }, { "name": "Logger", "kind": "Interface" }, diff --git a/scripts/x-tree-view.exports.json b/scripts/x-tree-view.exports.json index ee24f7972ee1..a694660c3afa 100644 --- a/scripts/x-tree-view.exports.json +++ b/scripts/x-tree-view.exports.json @@ -60,14 +60,20 @@ { "name": "TreeViewCollapseIcon", "kind": "Variable" }, { "name": "TreeViewExpandIcon", "kind": "Variable" }, { "name": "TreeViewItemId", "kind": "TypeAlias" }, + { "name": "TreeViewItemsReorderingAction", "kind": "TypeAlias" }, { "name": "TreeViewProps", "kind": "Interface" }, { "name": "TreeViewSlotProps", "kind": "Interface" }, { "name": "TreeViewSlots", "kind": "Interface" }, { "name": "unstable_resetCleanupTracking", "kind": "Variable" }, { "name": "unstable_useTreeItem2", "kind": "Variable" }, { "name": "UseTreeItem2ContentSlotOwnProps", "kind": "Interface" }, + { "name": "UseTreeItem2DragAndDropOverlaySlotOwnProps", "kind": "Interface" }, + { "name": "UseTreeItem2GroupTransitionSlotOwnProps", "kind": "Interface" }, + { "name": "UseTreeItem2IconContainerSlotOwnProps", "kind": "Interface" }, + { "name": "UseTreeItem2LabelSlotOwnProps", "kind": "Interface" }, { "name": "UseTreeItem2Parameters", "kind": "Interface" }, { "name": "UseTreeItem2ReturnValue", "kind": "Interface" }, + { "name": "UseTreeItem2RootSlotOwnProps", "kind": "Interface" }, { "name": "UseTreeItem2Status", "kind": "Interface" }, { "name": "useTreeItem2Utils", "kind": "Variable" }, { "name": "useTreeItemState", "kind": "Function" }, diff --git a/test/README.md b/test/README.md index e2bb080720fb..f2cf5858e304 100644 --- a/test/README.md +++ b/test/README.md @@ -4,7 +4,7 @@ You can check integration of different versions of React (for example different [release channels](https://react.dev/community/versioning-policy) or PRs to React) by running the following commands: -1. `node scripts/useReactVersion.mjs `. +1. `pnpm use-react-version `. Possible values for `version`: diff --git a/test/package.json b/test/package.json index 76fe5249513a..8ea4fd7beb8d 100644 --- a/test/package.json +++ b/test/package.json @@ -6,30 +6,33 @@ "typescript": "tsc -p tsconfig.json" }, "devDependencies": { - "@babel/runtime": "^7.24.8", - "@emotion/cache": "^11.11.0", - "@emotion/react": "^11.11.4", - "@mui/material": "^5.16.2", + "@babel/runtime": "^7.25.0", + "@emotion/cache": "^11.13.1", + "@emotion/react": "^11.13.0", + "@mui/material": "^5.16.5", "@mui/x-data-grid": "workspace:*", "@mui/x-data-grid-pro": "workspace:*", "@mui/x-date-pickers": "workspace:*", "@mui/x-date-pickers-pro": "workspace:*", + "@mui/x-charts": "workspace:*", + "@mui/x-charts-pro": "workspace:*", + "@mui/x-charts-vendor": "workspace:*", "@mui/x-license": "workspace:*", "@playwright/test": "^1.44.1", - "@react-spring/web": "^9.7.3", + "@react-spring/web": "^9.7.4", "@types/chai": "^4.3.16", "@types/karma": "^6.3.8", "@types/moment-jalaali": "^0.7.9", "@types/prop-types": "^15.7.12", "@types/react": "^18.3.3", - "chai": "^4.4.1", + "chai": "^4.5.0", "dayjs": "^1.11.11", "moment": "^2.30.1", "moment-jalaali": "^0.10.1", "prop-types": "^15.8.1", "react": "^18.3.1", "react-dom": "^18.3.1", - "react-router-dom": "^6.24.1", + "react-router-dom": "^6.25.1", "stylis": "^4.3.2", "stylis-plugin-rtl": "^2.1.1" } diff --git a/test/performance-charts/package.json b/test/performance-charts/package.json new file mode 100644 index 000000000000..cf2d27c5edd5 --- /dev/null +++ b/test/performance-charts/package.json @@ -0,0 +1,25 @@ +{ + "name": "@mui-x-internal/performance-charts", + "version": "7.8.0", + "private": true, + "type": "module", + "scripts": { + "test:performance": "vitest bench" + }, + "devDependencies": { + "@codspeed/vitest-plugin": "^3.1.0", + "@emotion/react": "^11.11.4", + "@mui/x-charts": "workspace:*", + "@mui/x-charts-pro": "workspace:*", + "@testing-library/jest-dom": "^6.4.6", + "@testing-library/react": "^16.0.0", + "@testing-library/user-event": "^14.5.2", + "@vitejs/plugin-react": "^4.3.1", + "@vitejs/plugin-react-swc": "^3.7.0", + "@vitest/ui": "2.0.4", + "jsdom": "^24.1.1", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "vitest": "2.0.4" + } +} diff --git a/test/performance-charts/tests/BarChart.bench.tsx b/test/performance-charts/tests/BarChart.bench.tsx new file mode 100644 index 000000000000..2b382867de7c --- /dev/null +++ b/test/performance-charts/tests/BarChart.bench.tsx @@ -0,0 +1,47 @@ +import * as React from 'react'; +// eslint-disable-next-line no-restricted-imports +import { render, cleanup } from '@testing-library/react'; +import { afterEach, bench, describe } from 'vitest'; +import { BarChart } from '@mui/x-charts/BarChart'; +import { options } from '../utils/options'; + +describe('BarChart', () => { + afterEach(() => { + cleanup(); + }); + + const dataLength = 250; + const data = Array.from({ length: dataLength + 1 }).map((_, i) => ({ + x: i, + y: 50 + Math.sin(i / 5) * 25, + })); + + const xData = data.map((d) => d.x); + const yData = data.map((d) => d.y); + + bench( + 'BarChart with big data amount', + async () => { + const { findByText } = render( + , + ); + + await findByText(dataLength.toLocaleString(), { ignore: 'span' }); + }, + options, + ); +}); diff --git a/test/performance-charts/tests/LineChart.bench.tsx b/test/performance-charts/tests/LineChart.bench.tsx new file mode 100644 index 000000000000..0fb97433f1f2 --- /dev/null +++ b/test/performance-charts/tests/LineChart.bench.tsx @@ -0,0 +1,42 @@ +import * as React from 'react'; +// eslint-disable-next-line no-restricted-imports +import { render, cleanup } from '@testing-library/react'; +import { afterEach, bench, describe } from 'vitest'; +import { LineChart } from '@mui/x-charts/LineChart'; +import { options } from '../utils/options'; + +describe('LineChart', () => { + afterEach(() => { + cleanup(); + }); + + const dataLength = 600; + const data = Array.from({ length: dataLength }).map((_, i) => ({ + x: i, + y: 50 + Math.sin(i / 5) * 25, + })); + + const xData = data.map((d) => d.x); + const yData = data.map((d) => d.y); + + bench( + 'LineChart with big data amount', + async () => { + const { findByText } = render( + , + ); + + await findByText(dataLength.toLocaleString(), { ignore: 'span' }); + }, + options, + ); +}); diff --git a/test/performance-charts/tests/ScatterChart.bench.tsx b/test/performance-charts/tests/ScatterChart.bench.tsx new file mode 100644 index 000000000000..42063af167ae --- /dev/null +++ b/test/performance-charts/tests/ScatterChart.bench.tsx @@ -0,0 +1,42 @@ +import * as React from 'react'; +// eslint-disable-next-line no-restricted-imports +import { render, cleanup } from '@testing-library/react'; +import { afterEach, bench, describe } from 'vitest'; +import { ScatterChart } from '@mui/x-charts/ScatterChart'; +import { options } from '../utils/options'; + +describe('ScatterChart', () => { + afterEach(() => { + cleanup(); + }); + + const dataLength = 1_000; + const data = Array.from({ length: dataLength }).map((_, i) => ({ + id: i, + x: i, + y: 50 + Math.sin(i / 5) * 25, + })); + + const xData = data.map((d) => d.x); + + bench( + 'ScatterChart with big data amount', + async () => { + const { findByText } = render( + , + ); + + await findByText(dataLength.toLocaleString(), { ignore: 'span' }); + }, + options, + ); +}); diff --git a/test/performance-charts/tsconfig.json b/test/performance-charts/tsconfig.json new file mode 100644 index 000000000000..62629e3afbe6 --- /dev/null +++ b/test/performance-charts/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "../../tsconfig.json", + "include": ["tests/**/*", "utils/**/*"], + "exclude": ["node_modules"] +} diff --git a/test/performance-charts/utils/options.ts b/test/performance-charts/utils/options.ts new file mode 100644 index 000000000000..bebd108eb508 --- /dev/null +++ b/test/performance-charts/utils/options.ts @@ -0,0 +1,9 @@ +import { BenchOptions } from 'vitest'; + +const iterations = process.env.BENCHMARK_ITERATIONS + ? parseInt(process.env.BENCHMARK_ITERATIONS, 10) + : 1; + +export const options: BenchOptions = { + iterations, +}; diff --git a/test/performance-charts/vitest.config.ts b/test/performance-charts/vitest.config.ts new file mode 100644 index 000000000000..d3217a4508bb --- /dev/null +++ b/test/performance-charts/vitest.config.ts @@ -0,0 +1,22 @@ +import { defineConfig } from 'vitest/config'; +import codspeedPlugin from '@codspeed/vitest-plugin'; +import react from '@vitejs/plugin-react'; + +export default defineConfig({ + plugins: [codspeedPlugin(), react()], + test: { + environment: 'jsdom', + // testTimeout: 20000, + // benchmark: { + // outputJson: '../../test-results/benchmark-charts.json', + // }, + // browser: { + // enabled: true, + // name: 'chromium', + // provider: 'playwright', + // providerOptions: { + // timeout: 60000, + // }, + // }, + }, +}); diff --git a/test/utils/dragAndDrop.ts b/test/utils/dragAndDrop.ts new file mode 100644 index 000000000000..04a4c05d17d9 --- /dev/null +++ b/test/utils/dragAndDrop.ts @@ -0,0 +1,65 @@ +export type DragEventTypes = + | 'dragStart' + | 'dragOver' + | 'dragEnter' + | 'dragLeave' + | 'dragEnd' + | 'drop'; + +export class MockedDataTransfer implements DataTransfer { + data: Record; + + dropEffect: 'none' | 'copy' | 'move' | 'link'; + + effectAllowed: + | 'none' + | 'copy' + | 'copyLink' + | 'copyMove' + | 'link' + | 'linkMove' + | 'move' + | 'all' + | 'uninitialized'; + + files: FileList; + + img?: Element; + + items: DataTransferItemList; + + types: string[]; + + xOffset: number; + + yOffset: number; + + constructor() { + this.data = {}; + this.dropEffect = 'none'; + this.effectAllowed = 'all'; + this.files = [] as unknown as FileList; + this.items = [] as unknown as DataTransferItemList; + this.types = []; + this.xOffset = 0; + this.yOffset = 0; + } + + clearData() { + this.data = {}; + } + + getData(format: string) { + return this.data[format]; + } + + setData(format: string, data: string) { + this.data[format] = data; + } + + setDragImage(img: Element, xOffset: number, yOffset: number) { + this.img = img; + this.xOffset = xOffset; + this.yOffset = yOffset; + } +} diff --git a/test/utils/pickers/calendar.ts b/test/utils/pickers/calendar.ts index c06241ae0dc1..93fd8107afe1 100644 --- a/test/utils/pickers/calendar.ts +++ b/test/utils/pickers/calendar.ts @@ -1,4 +1,5 @@ import { fireEvent, createEvent } from '@mui/internal-test-utils'; +import { DragEventTypes } from '../dragAndDrop'; export const rangeCalendarDayTouches = { '2018-01-01': { @@ -54,69 +55,3 @@ export const buildPickerDragInteractions = (getDataTransfer: () => DataTransfer return { executeDateDragWithoutDrop, executeDateDrag }; }; - -export type DragEventTypes = - | 'dragStart' - | 'dragOver' - | 'dragEnter' - | 'dragLeave' - | 'dragEnd' - | 'drop'; - -export class MockedDataTransfer implements DataTransfer { - data: Record; - - dropEffect: 'none' | 'copy' | 'move' | 'link'; - - effectAllowed: - | 'none' - | 'copy' - | 'copyLink' - | 'copyMove' - | 'link' - | 'linkMove' - | 'move' - | 'all' - | 'uninitialized'; - - files: FileList; - - img?: Element; - - items: DataTransferItemList; - - types: string[]; - - xOffset: number; - - yOffset: number; - - constructor() { - this.data = {}; - this.dropEffect = 'none'; - this.effectAllowed = 'all'; - this.files = [] as unknown as FileList; - this.items = [] as unknown as DataTransferItemList; - this.types = []; - this.xOffset = 0; - this.yOffset = 0; - } - - clearData() { - this.data = {}; - } - - getData(format: string) { - return this.data[format]; - } - - setData(format: string, data: string) { - this.data[format] = data; - } - - setDragImage(img: Element, xOffset: number, yOffset: number) { - this.img = img; - this.xOffset = xOffset; - this.yOffset = yOffset; - } -} diff --git a/test/utils/pickers/describeGregorianAdapter/testCalculations.ts b/test/utils/pickers/describeGregorianAdapter/testCalculations.ts index 90b8f60581e9..10ef8845ec08 100644 --- a/test/utils/pickers/describeGregorianAdapter/testCalculations.ts +++ b/test/utils/pickers/describeGregorianAdapter/testCalculations.ts @@ -814,6 +814,10 @@ export const testCalculations: DescribeGregorianAdapterTestSuite = ({ expect(adapter.getDaysInMonth(adapter.addMonths(testDateIso, 1))).to.equal(30); }); + it('Method: getDayOfWeek', () => { + expect(adapter.getDayOfWeek(testDateIso)).to.equal(adapter.lib === 'luxon' ? 2 : 3); + }); + describe('Method: getWeekArray', () => { it('should work without timezones', () => { const weekArray = adapter.getWeekArray(testDateIso); @@ -866,7 +870,7 @@ export const testCalculations: DescribeGregorianAdapterTestSuite = ({ }); it('Method: getWeekNumber', () => { - expect(adapter.getWeekNumber!(testDateIso)).to.equal(44); + expect(adapter.getWeekNumber(testDateIso)).to.equal(44); }); it('Method: getYearRange', () => { diff --git a/test/utils/pickers/describeHijriAdapter/testCalculations.ts b/test/utils/pickers/describeHijriAdapter/testCalculations.ts index f6346f26adbf..5a797868ff06 100644 --- a/test/utils/pickers/describeHijriAdapter/testCalculations.ts +++ b/test/utils/pickers/describeHijriAdapter/testCalculations.ts @@ -161,7 +161,7 @@ export const testCalculations: DescribeHijriAdapterTestSuite = ({ adapter }) => }); it('Method: getWeekNumber', () => { - expect(adapter.getWeekNumber!(testDateIso)).to.equal(8); + expect(adapter.getWeekNumber(testDateIso)).to.equal(8); }); describe('Method: getYearRange', () => { diff --git a/test/utils/pickers/describeJalaliAdapter/testCalculations.ts b/test/utils/pickers/describeJalaliAdapter/testCalculations.ts index 6fb225977846..c1c2d7e9f4ea 100644 --- a/test/utils/pickers/describeJalaliAdapter/testCalculations.ts +++ b/test/utils/pickers/describeJalaliAdapter/testCalculations.ts @@ -19,6 +19,19 @@ export const testCalculations: DescribeJalaliAdapterTestSuite = ({ adapter }) => expect(adapter.isEqual(testDateIso, anotherDate)).to.equal(true); expect(adapter.isEqual(null, null)).to.equal(true); + expect(adapter.isEqual(testDateIso, null)).to.equal(false); + }); + + it('Method: isValid', () => { + expect(adapter.isValid(testDateIso)).to.equal(true); + expect(adapter.isValid(null)).to.equal(false); + if (adapter.lib !== 'moment-jalaali') { + expect(adapter.isValid(adapter.date('invalid'))).to.equal(false); + } else { + expect(() => adapter.isValid(adapter.date('invalid'))).toWarnDev( + 'Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not rel', + ); + } }); it('Method: isSameYear', () => { @@ -202,6 +215,10 @@ export const testCalculations: DescribeJalaliAdapterTestSuite = ({ adapter }) => expect(adapter.getDate(testDateIso)).to.equal(8); }); + it('Method: getHours', () => { + expect(adapter.getHours(testDateIso)).to.equal(11); + }); + it('Method: getMinutes', () => { expect(adapter.getMinutes(testDateIso)).to.equal(44); }); @@ -242,6 +259,10 @@ export const testCalculations: DescribeJalaliAdapterTestSuite = ({ adapter }) => expect(adapter.setMilliseconds(testDateIso, 11)).toEqualDateTime('2018-10-30T11:44:00.011Z'); }); + it('Method: getDaysInMonth', () => { + expect(adapter.getDaysInMonth(testDateIso)).to.equal(30); + }); + it('Method: getWeekArray', () => { const weekArray = adapter.getWeekArray(testDateIso); const expectedDate = new Date('2018-10-20T00:00:00.000Z'); @@ -255,7 +276,7 @@ export const testCalculations: DescribeJalaliAdapterTestSuite = ({ adapter }) => }); it('Method: getWeekNumber', () => { - expect(adapter.getWeekNumber!(testDateIso)).to.equal(33); + expect(adapter.getWeekNumber(testDateIso)).to.equal(33); }); it('Method: getYearRange', () => { diff --git a/test/utils/tree-view/describeTreeView/describeTreeView.tsx b/test/utils/tree-view/describeTreeView/describeTreeView.tsx index 82feb196b543..8b61afb3e962 100644 --- a/test/utils/tree-view/describeTreeView/describeTreeView.tsx +++ b/test/utils/tree-view/describeTreeView/describeTreeView.tsx @@ -6,6 +6,7 @@ import { RichTreeViewPro } from '@mui/x-tree-view-pro/RichTreeViewPro'; import { SimpleTreeView } from '@mui/x-tree-view/SimpleTreeView'; import { TreeItem, treeItemClasses } from '@mui/x-tree-view/TreeItem'; import { TreeItem2 } from '@mui/x-tree-view/TreeItem2'; +import { TreeViewBaseItem } from '@mui/x-tree-view/models'; import { TreeViewAnyPluginSignature, TreeViewPublicAPI } from '@mui/x-tree-view/internals/models'; import { MuiRenderResult } from '@mui/internal-test-utils/createRenderer'; import { @@ -14,6 +15,7 @@ import { DescribeTreeViewJSXRenderer, DescribeTreeViewItem, DescribeTreeViewRendererUtils, + TreeViewItemIdTreeElement, } from './describeTreeView.types'; const innerDescribeTreeView = ( @@ -22,12 +24,34 @@ const innerDescribeTreeView = ): void => { const { render } = createRenderer(); - const getUtils = (result: MuiRenderResult): DescribeTreeViewRendererUtils => { + const getUtils = ( + result: MuiRenderResult, + apiRef?: { current: TreeViewPublicAPI }, + ): DescribeTreeViewRendererUtils => { const getRoot = () => result.getByRole('tree'); const getAllTreeItemIds = () => result.queryAllByRole('treeitem').map((item) => item.dataset.testid!); + const getItemIdTree = (): TreeViewItemIdTreeElement[] => { + if (!apiRef) { + throw new Error( + 'Cannot use getItemIdTree in renderFromJSX because the apiRef is not defined', + ); + } + + const cleanItem = (item: TreeViewBaseItem) => { + if (item.children) { + return { id: item.id, children: item.children.map(cleanItem) }; + } + + return { id: item.id }; + }; + + // @ts-ignore + return apiRef.current!.getItemTree().map(cleanItem); + }; + const getFocusedItemId = () => { const activeElement = document.activeElement; if (!activeElement || !activeElement.classList.contains(treeItemClasses.root)) { @@ -77,6 +101,7 @@ const innerDescribeTreeView = isItemExpanded, isItemSelected, getSelectedTreeItems, + getItemIdTree, }; }; @@ -133,7 +158,7 @@ const innerDescribeTreeView = setProps: result.setProps, setItems: (newItems) => result.setProps({ items: newItems }), apiRef: apiRef as unknown as { current: TreeViewPublicAPI }, - ...getUtils(result), + ...getUtils(result, apiRef as unknown as { current: TreeViewPublicAPI }), }; }; diff --git a/test/utils/tree-view/describeTreeView/describeTreeView.types.ts b/test/utils/tree-view/describeTreeView/describeTreeView.types.ts index 8aff13f693ed..d9e17fe48cde 100644 --- a/test/utils/tree-view/describeTreeView/describeTreeView.types.ts +++ b/test/utils/tree-view/describeTreeView/describeTreeView.types.ts @@ -2,8 +2,10 @@ import * as React from 'react'; import { MergeSignaturesProperty, TreeViewAnyPluginSignature, + TreeViewExperimentalFeatures, TreeViewPublicAPI, } from '@mui/x-tree-view/internals/models'; +import { TreeViewItemId } from '@mui/x-tree-view/models'; import { TreeItemProps } from '@mui/x-tree-view/TreeItem'; import { TreeItem2Props } from '@mui/x-tree-view/TreeItem2'; @@ -11,6 +13,11 @@ export type DescribeTreeViewTestRunner, ) => void; +export interface TreeViewItemIdTreeElement { + id: TreeViewItemId; + children?: TreeViewItemIdTreeElement[]; +} + export interface DescribeTreeViewRendererUtils { /** * Returns the `root` slot of the Tree View. @@ -83,6 +90,7 @@ export interface DescribeTreeViewRendererUtils { * @returns {HTMLElement[]} List of the item id of all the items currently selected. */ getSelectedTreeItems: () => string[]; + getItemIdTree: () => TreeViewItemIdTreeElement[]; } export interface DescribeTreeViewRendererReturnValue< @@ -120,6 +128,7 @@ export type DescribeTreeViewRenderer & { item?: Partial | Partial; }; + experimentalFeatures?: TreeViewExperimentalFeatures; }, ) => DescribeTreeViewRendererReturnValue; diff --git a/test/utils/tree-view/fakeContextValue.ts b/test/utils/tree-view/fakeContextValue.ts index 8a0caed46076..058ba59ec240 100644 --- a/test/utils/tree-view/fakeContextValue.ts +++ b/test/utils/tree-view/fakeContextValue.ts @@ -26,11 +26,14 @@ export const getFakeContextValue = ( runItemPlugins: () => ({ rootRef: null, contentRef: null, + propsEnhancers: {}, }), wrapItem: ({ children }) => children, wrapRoot: ({ children }) => children, - disabledItemsFocusable: false, - indentationAtItemLevel: false, + items: { + disabledItemsFocusable: false, + indentationAtItemLevel: false, + }, icons: { slots: {}, slotProps: {}, diff --git a/tsconfig.json b/tsconfig.json index 6a9b26ef2fdf..f0ae11e4e147 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -25,6 +25,8 @@ "@mui/x-charts/*": ["./packages/x-charts/src/*"], "@mui/x-charts-pro": ["./packages/x-charts-pro/src"], "@mui/x-charts-pro/*": ["./packages/x-charts-pro/src/*"], + "@mui/x-charts-vendor": ["./packages/x-charts-vendor"], + "@mui/x-charts-vendor/*": ["./packages/x-charts-vendor/*"], "@mui/x-tree-view": ["./packages/x-tree-view/src"], "@mui/x-tree-view/*": ["./packages/x-tree-view/src/*"], "@mui/x-tree-view-pro": ["./packages/x-tree-view-pro/src"], diff --git a/webpackBaseConfig.js b/webpackBaseConfig.js index 22dddfcfed4f..2ada3fe5f14a 100644 --- a/webpackBaseConfig.js +++ b/webpackBaseConfig.js @@ -16,6 +16,7 @@ module.exports = { '@mui/x-date-pickers-pro': path.resolve(__dirname, './packages/x-date-pickers-pro/src'), '@mui/x-charts': path.resolve(__dirname, './packages/x-charts/src'), '@mui/x-charts-pro': path.resolve(__dirname, './packages/x-charts-pro/src'), + '@mui/x-charts-vendor': path.resolve(__dirname, './packages/x-charts-vendor'), '@mui/x-tree-view': path.resolve(__dirname, './packages/x-tree-view/src'), '@mui/x-tree-view-pro': path.resolve(__dirname, './packages/x-tree-view-pro/src'), '@mui/x-license': path.resolve(__dirname, './packages/x-license/src'),